pax_global_header00006660000000000000000000000064125172363120014514gustar00rootroot0000000000000052 comment=9326ebcdd16fc235131dc0c8dbb71b89140d8bc1 mupen64plus-core-src-2.5/000077500000000000000000000000001251723631200152775ustar00rootroot00000000000000mupen64plus-core-src-2.5/.gitattributes000066400000000000000000000007661251723631200202030ustar00rootroot00000000000000* text=auto # normal text files *.6 text AUTHORS text *.c text *.cfg text *.cht text *.conf text COPYING text *.cpp text *.def text *-license text *.h text *.html text *.ini text INSTALL text LICENSES text Makefile text *.py text README text RELEASE text *.S text *.sh text *.txt text *.ver text # windows specific text files *.sln text eol=crlf *.vcproj text eol=crlf *.vcxproj text eol=crlf *.vcxproj.filters text eol=crlf # binary files *.gz binary *.ttf binary cursor.tex binary font.tex binary mupen64plus-core-src-2.5/.gitignore000066400000000000000000000000711251723631200172650ustar00rootroot00000000000000/projects/unix/_obj*/ /projects/unix/libmupen64plus*.so* mupen64plus-core-src-2.5/.travis.yml000066400000000000000000000016321251723631200174120ustar00rootroot00000000000000language: cpp compiler: - gcc - clang before_install: - sudo add-apt-repository --yes ppa:zoogie/sdl2-snapshots - sudo apt-get update -qq - sudo apt-get install -y libsdl1.2-dev libsdl2-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev pkg-config zlib1g-dev liblircclient-dev binutils-dev env: - OSD=0 - OSD=1 - NO_ASM=1 - LIRC=1 - PROFILE=1 - DEBUGGER=1 - DBG_CORE=1 - DBG_COUNT=1 - DBG_COMPARE=1 - COUNT_INSTR=1 script: - make -C projects/unix V=1 clean && CPPFLAGS="-D__extern_always_inline=inline" LDFLAGS="-Wl,--no-add-needed -Wl,--no-undefined" OPTFLAGS="-O2" make SDL_CONFIG=sdl-config CC="${CC}" CXX="${CXX}" -j$(nproc) -C projects/unix V=1 all - make -C projects/unix V=1 clean && CPPFLAGS="-D__extern_always_inline=inline" LDFLAGS="-Wl,--no-add-needed -Wl,--no-undefined" OPTFLAGS="-O2" make SDL_CONFIG=sdl2-config CC="${CC}" CXX="${CXX}" -j$(nproc) -C projects/unix V=1 all mupen64plus-core-src-2.5/CREDITS000066400000000000000000000154021251723631200163210ustar00rootroot00000000000000=================================================================================================== | Mupen64Plus 2.5 credits April 26th, 2015 | =================================================================================================== bentley - video-glide64mk2: - bugfix: use memmove() instead of memcpy() for overlapping buffers bsmiles32 - core: - refactor profiling: move from r4300 to main folder - major r4300 cpu core refactoring to improve code quality and organization - rsp-hle: - Game-specific fixes: Bottom of the 9th, Goldeneye - Support for MusyX microcodes (v1 and v2) - Huge quantity of code cleanup and refactorings in audio microcode and processing logic - Improve audio microcode identification - Add support for additional audio commands: #16, POLEF, RESAMPLE_ZOH - Move global variables into a struct so code is re-entrant - bugfix: microcode detection could sometimes fail after reset Conchur Navid - All Modules (audio, core, input, rsp-hle, ui-console, video-rice) - C header includes and forward declarations clean-ups - core: - fixes for minor issues revealed by coverity static analysis - input: - support for new SDL2 generic XInput device name - video-rice: - build fixes ecsv - All Modules (audio, core, input, rsp-hle, ui-console, video-glide64mk2, video-rice) - fix all line endings, convert SCM metadata files from Hg to Git - core: - pif_ram fix for Banjo Tooie - SDL2 fixes - game-specific override for # of clock cycles per cpu instruction - input: - convert SDL2 keycodes to sdl1.2 keysyms so that input section parameters in mupen64plus.cfg will work with sdl1.2 keysyms - SDL2: support for mapping mouse to controller analog x/y - use prioritization to decide among multiple matching auto-config sections (for SDL2 / XInput) - rsp-hle: - Huge quantity of code cleanups and refactoring to improve organization - video-glide64mk2 - fix colors in compressed fxt1 textures by importing mesa code - replace patented S3TC algorithm with S2TC - Enable the dump_cache to allow loading of dat files - bugfix: work around problem in OSD callback whereby core code doesn't re-activate shader - bugfix: Resident Evil II hang - allow user override of game-specific settings via mupen64plus.cfg fayvel - All Modules (audio, core, input, rsp-hle, ui-console, video-glide64mk2, video-rice) - Travis CI config file - core: - OpenGL ES support - wiki documentation fixes - input: - fix SDL2 build regression - video-glide64mk2: - remove unused #ifdef sections - various build fixes - video-rice: - fix for INI file loading under Windows - minor OpenGL ES fixes Gillou68310 - All Modules (audio, core, input, rsp-hle, ui-console, video-glide64mk2, video-rice) - MSVC2010 project file - core: - new_dynarec: fixes for various MIPS instructions - new_dynarec: port asm code to Intel format, add MSVC build support - video-rice: - OpenGL ES fixes - Add hack-fix to show last heart and map arrows in Zelda OoT & MM - Support screenshots with OpenGL ES gizmo98 - core: - raspberry pi fixes and build system improvements - input: - auto-configs for multiple devices - video-rice: - makefile build support for Raspberry Pi - OpenGL ES build fixes kode54 - rsp-hle: - Implement IIR filter for nAudio (for Conker's Bad Fur Day) krnlyng - audio: - implement audioresource support for integration with Linux-based Nemo Mobile OS - core: - add render callback to input plugin - video-glide64mk2: - add OpenGL ES support (2.0) (from mupen64plus-ae) - bugfix: chroma_color uniform variable name was not being set (from Themaister) - video-rice: - integrate OpenGL ES code into build system - support Rotate option in OpenGL ES littleguy77 - android makefile and project history (for: audio, core, rsp-hle) - core: - fix config parameter name for savestate slot - fixes to MD5 values in mupen64plus.ini - ui-console: - compile-time flag to support building ui-console as a library (used by Android frontend) - video-glide64mk2: - add config option to force polygon offset values (fixes artifacts on certains games / renderers) - Implement optional frameskip feature, which drops frames instead of rendering if game is going slow - video-rice: - Android build fix - opengl es minor fixes and cleanups - add config option to force polygon offset values (fixes artifacts on certains games / renderers) Narann - core: - implement ConfigSetParameterHelp - ui-console: - add support for loading savestate immediately on emulator startup - video-rice: - Lots of code cleanup, removal of deprecated code, and simplifications - Add config parameter versioning - Modernize OpenGL interfaces, remove code for supporting very old opengl versions - Graphics fixes for: fog, RDP InsertMatrix Nebuleon - simplify makefiles (for: audio, input) - core: - floating-point optimizations (don't set rounding modes when not needed) - compatibility fixes regarding FPU rounding modes - decouple pure interpreter from cached interpreter - use stdint.h types Paulscode - core: - fix bug in speed limiter Richard42 - All Modules (audio, core, input, rsp-hle, ui-console, video-glide64mk2, video-rice) - Visual Studio 2013 project/solution files - fix and maintain OSX builds - core: - regression test improvements - input: - merge new auto-configurations from users - When Mouse=True but pointer is un-grabbed, fall back to joystick settings for analog x/y - video-glide64mk2: - use SDL threads instead of C++11 threads, which are not currntly supported in Apple's clang compiler - fix texture pack read failure on some 64-bit platforms, found by EndoplasmaticReticulum on github - bugfix: memory bugs found by coverity in fxt1 code ricrpi - core: - rewrite speed limiter code to improve performance on Raspberry Pi - ARM build fixes and optimizations rlabrecque - video-glide64mk2: - on Win32, don't set gamma table because it breaks monitor calibration - video-rice: - bugfix: crash if RiceVideoLinux.ini not found s-verma - input: - Prevent mouse/trackpad auto-centering behavior by pressing left-Windows key twinaphex - glide64mk2: - Fix broken C version of MulMatricesC - correct N64 ROM header analysis for PAL/NTSC detection, to get proper frequency for frame skipper Ursula Abendroth - All Modules (audio, core, input, rsp-hle, ui-console, video-glide64mk2, video-rice) - makefile: use SDL2 by default if present - video-glide64mk2: - patch to clean up antialiasing patches from willrandship willrandship - video-glide64mk2: - add option to enable full-scene antialiasing wnayes - core: - code cleanups in debugger mupen64plus-core-src-2.5/INSTALL000066400000000000000000000015151251723631200163320ustar00rootroot00000000000000Mupen64Plus-Core INSTALL ------------------------ This text file was written to explain the installation process of the Mupen64Plus-Core module. If this module is part of a Mupen64Plus source code bundle, the user should run the "m64p_install.sh" script in the root of the unzipped bundle to install all of the included modules in the bundle. If this module is a standalone source code release, you should build the library from source code and install it via the makefile, like this: $ cd projects/unix $ make all $ sudo make install If you want to build the Mupen64Plus-Core module for installation in a home folder for a single user, you may build it like this (replacing with your desired local installation path): $ cd projects/unix $ make all SHAREDIR= $ make install LIBDIR= SHAREDIR= mupen64plus-core-src-2.5/LICENSES000066400000000000000000000041621251723631200164320ustar00rootroot00000000000000Mupen64Plus-Core LICENSES ------------------------- Mupen64Plus-Core is licensed under the GNU General Public License version 2. Please see the included doc/gpl-license file for the terms and conditions of the GNU General Public License. The authors of Mupen64Plus-Core are: * Richard Goedeken (Richard42) * Sven Eckelmann (ecsv) * John Chadwick (NMN) * James Hood (Ebenblues) * Scott Gorman (okaygo) * Scott Knauert (Tillin9) * Jesse Dean (DarkJezter) * Louai Al-Khanji (slougi) * Bob Forder (orbitaldecay) * Jason Espinosa (hasone) * Bobby Smiles (bsmiles32) * Dorian Fevrier (Narann) * Richard Hender (ricrpi) * Will Nayes (wnayes) * Conchur Navid * Gillou68310 * HyperHacker * littleguy77 * Nebuleon * and others. The Mupen64Plus API documentation (located in doc/emuwiki-api-doc/*) is Copyright(C) 2009-2011 by Richard Goedeken and is licensed under the GNU General Public License version 2. Mupen64Plus is based on GPL-licensed source code from Mupen64 v0.5, originally written by: * Hacktarux * Dave2001 * Zilmar * Gregor Anich (Blight) * Juha Luotio (JttL) * and others. The OGLFT library used for the On-Screen Display is based on GPL/LGPL-licensed code Copyright 2002 lignum Computing. Please see the included doc/lgpl-license file for the terms and conditions of the GNU Lesser General Public License. More information about this library is available at the following websites: - http://oglft.sourceforge.net/index.html - http://directory.fsf.org/project/OGLFT/ Additionally, mupen includes a number of components licensed under other OSI approved licenses: The BSD license: * minizip by Gilles Vollant and others, ftp://ftp.info-zip.org/pub/infozip/license.html * src/memory/n64_cic_nus_6105.c/.h, by X-Scale The zlib/libpng license: * Adler-32 by Mark Adler * libpng by Glenn Randers-Pehrson, Peter Deutsch, and Guy Eric Schalnat * MD5 hasing code by Peter Deutsch The Bitstream license: * The TrueType font (data/font.ttf) is licensed by the Bitstream license. Please see the included doc/font-license file for the terms and conditions of the Bitstream license. mupen64plus-core-src-2.5/README000066400000000000000000000143451251723631200161660ustar00rootroot00000000000000Mupen64Plus-Core README ----------------------- The most current version of this README and more documentation can be found on the Mupen64Plus wiki: http://code.google.com/p/mupen64plus/wiki/README Mupen64Plus is based off of mupen64, originally created by Hacktarux. This package contains the only the Mupen64Plus core library. For a fully functional emulator, the user must also install graphics, sound, input, and RSP plugins, as well as a user interface program (called a front-end). README Sections 1. Requirements for building or running Mupen64Plus 2. Building From Source 3. Installation 4. Key Commands In Emulator 1. Requirements and Pre-requisites ---------------------------------- *Binary Package Requirements* - SDL 1.2 or 2.0 - libpng - freetype 2 - zlib *Source Build Requirements* In addition to the binary libraries, the following packages are required if you build Mupen64Plus from source: - GNU C and C++ compiler, libraries, and headers - GNU make - Development packages for all the libraries above 2. Building From Source ----------------------- If you downloaded the binary distribution of Mupen64Plus, skip to the Installation section. To build the source distribution, unzip and cd into the projects/unix directory, then build using make: $ unzip mupen64plus-core-x-y-z-src.zip $ cd mupen64plus-core-x-y-z-src/projects/unix $ make all Type 'make' by itself to view all available build options: $ make Mupen64Plus makefile. Targets: all == Build Mupen64Plus and all plugins clean == remove object files install == Install Mupen64Plus and all plugins uninstall == Uninstall Mupen64Plus and all plugins Options: BITS=32 == build 32-bit binaries on 64-bit machine LIRC=1 == enable LIRC support NO_ASM=1 == build without assembly (no dynamic recompiler or MMX/SSE code) USE_GLES=1 == build against GLESv2 instead of OpenGL VC=1 == build against Broadcom Videocore GLESv2 NEON=1 == (ARM only) build for hard floating point environments VFP_HARD=1 == (ARM only) full hardware floating point ABI SHAREDIR=path == extra path to search for shared data files WARNFLAGS=flag == compiler warning levels (default: -Wall) OPTFLAGS=flag == compiler optimization (default: -O3) PIC=(1|0) == Force enable/disable of position independent code OSD=(1|0) == Enable/disable build of OpenGL On-screen display NEW_DYNAREC=1 == Replace dynamic recompiler with Ari64's experimental dynarec POSTFIX=name == String added to the name of the the build (default: '') Install Options: PREFIX=path == install/uninstall prefix (default: /usr/local/) SHAREDIR=path == path to install shared data (default: PREFIX/share/mupen64plus/) LIBDIR=path == path to install plugin libs (default: PREFIX/lib) INCDIR=path == path to install core header files (default: PREFIX/include/mupen64plus) DESTDIR=path == path to prepend to all installation paths (only for packagers) Debugging Options: PROFILE=1 == build gprof instrumentation into binaries for profiling DEBUG=1 == add debugging symbols to binaries DEBUGGER=1 == build graphical debugger DBG_CORE=1 == print debugging info in r4300 core DBG_COUNT=1 == print R4300 instruction count totals (64-bit dynarec only) DBG_COMPARE=1 == enable core-synchronized r4300 debugging DBG_TIMING=1 == print timing data DBG_PROFILE=1 == dump profiling data for r4300 dynarec to data file V=1 == show verbose compiler output 3. Installation --------------- *Binary Distribution* To install the binary distribution of Mupen64Plus, su to root and run the provided install.sh script: $ su # ./install.sh # exit $ The install script will copy the executable to /usr/local/bin and a directory called /usr/local/share/mupen64plus will be created to hold plugins and other files used by mupen64plus. NOTE: By default, install.sh uses /usr/local for the install prefix. Although the user can specify an alternate prefix to install.sh at the commandline, the mupen64plus binary was compiled to look for the install directory in /usr/local, so specifying an alternate prefix to install.sh will cause problems (the mupen64plus front-end application will not find the directory containing the core library) unless the directory to which you install it is known by your dynamic library loader (ie, included in /etc/ld.conf.so) If you want to use a prefix other than /usr/local, you may also download the source code package and build with the PREFIX option (see below). *Source Distribution* After building mupen64plus and all plugins, su to root and type 'make install' to install Mupen64Plus. The install process will copy the executable to $PREFIX/bin and a directory called $PREFIX/share/mupen64plus will be created to hold plugins and other files used by mupen64plus. By default, PREFIX is set to /usr/local. This can be changed by passing the PREFIX option to make. NOTE: you must pass the prefix, when building AND installing. For example, to install mupen64plus to /usr, do this: $ make PREFIX=/usr all $ sudo make PREFIX=/usr install $ 4. Key Commands In Emulator --------------------------- The keys or joystick/mouse inputs which will be mapped to the N64 controller for playing the games are determined by the input plugin. The emulator core also supports several key commands during emulation, which may be configured by editing the ~/.config/mupen64plus/mupen64plus.cfg file. They are: Escape == Quit the emulator 0-9 == Select virtual 'slot' for save/load state (F5 and F7) commands F5 == Save emulator state F7 == Load emulator state F9 == Reset emulator F10 == slow down emulator by 5% F11 == speed up emulator by 5% F12 == take screenshot Alt-Enter == Toggle between windowed and fullscreen (may not be supported by all video plugins) p or P == Pause on/off m or M == Mute/unmute sound g or G == Press "Game Shark" button (only if cheats are enabled) / or ? == single frame advance while paused F == Fast Forward (playback at 250% normal speed while F key is pressed) [ == Decrease volume ] == Increase volume mupen64plus-core-src-2.5/RELEASE000066400000000000000000001026121251723631200163040ustar00rootroot00000000000000Mupen64Plus-Core Emulator Library RELEASE ----------------------------------------- Mupen64Plus-core v2.5 - April 26, 2015 -------------------------------------- - Game-specific fixes (Banjo Tooie, Zelda Ocarina of Time, DK64, Hydro Thunder, others) - Game-specific override for # of clock cycles per cpu instruction - Many bug fixes for SDL 2.0 - Various instruction-specific optimizations in new dynarec - Cheat fixes for WWF No Mercy, Bomberman Hero, Super Mario 64, and Pokemon Stadium (E) - Major R4300 CPU core refactoring in many subsystems to improve code organization - Rewrite speed limiter code to improve performance and audio synchronization - Separate the logic of the Pure Interpreter from the Cached Interpreter - Regression test improvements: add speed tests, ignore border in video tests due to Rice scissor problems - New Dynarec: Speed improvements, accuracy fixes, build support for MSVC - Support for building against OpenGL ES - Build system improvements for ARM / Raspberry Pi - Video Extension: support OpenGL context version and profile selection (needed for GLideN64 under OSX) Mupen64Plus v2.0 - July 4th, 2013 --------------------------------- - Fixes for various games (DK64, Zelda, Blast Corps) - add Ari64's dynamic recompiler for x86 (32-bit) and ARM - improved PJ64 savestate loading - support video window resizing (with help from video plugin and front-end application) - Auto-detect savestate type (Mupen64Plus or PJ64) when loading from a slot - many various code cleanups in core from casualjames - support to build against SDL2 - debugger code cleanup - Project files for Visual Studio 2012 - Makefile changes - add support for PowerPC and MinGW32 builds - add cross-compiling support to build Win32 executables (MXE) under Linux Mupen64Plus v1.99.5 - March 10, 2012 ------------------------------------ - New feature: support for N64 internal real-time clock - use X-Scale's PIF-CIC algorithm instead of the hard-coded challenge-response pairs - New config parameter for path to save SRAM/EEPROM/MPK files, so they can be separated from emulator snapshots - updated core for new Mupen64plus 2.0 API versioning scheme - split core configuration data into 2 sections: Core and CoreEvents. Added version numbers and upgrade handling to both - Accurately emulate the RSP DMA operation (from Bobby Smiles) - bugfix: #290 - OnScreenDisplay text is sometimes captured in screenshots - bugfix: when the front-end specifies an override for the configuration directory, always use this path, so that we don't load the config from there and then save it back to the default user path - bugfix: #468 - On-screen-display problem under OSX - bugfix: Use option SaveStatePath from config file - bugfix: don't call SDL_Quit() until the core library is being unloaded. fixes some front-end use cases - bugfix: #410 - segfault in dma_pi_write()-->strlen() if /home/username/.local/share/mupen64plus/ owned by root - bugfix: for Interpreter cores, use proper math functions for ceil/floor/round/trunc instead of x87 rounding modes - many makefile fixes and improvements Mupen64Plus v1.99.4 - February 22, 2010 --------------------------------------- - Added some type checking to ConfigGetParameter() function, and a new error type - Bugfix: avoid segfault in the video extension code if SDL initialization fails (because video plugin fails) - Added new CoreGetRomSettings() function for front-ends - Allow to run dynarec in hardware DEP protected windows - Allow core .cfg parser to accept strings without quotes around them - API change: use new ReadScreen2() video plugin function - New re-entrant R4300 disassembler, from tty68k/zzt32, a man who loves MIPS processors - makefile fixes and improvements, code cleanups Mupen64Plus v1.99.3 - February 13, 2010 --------------------------------------- - New feature: configuration function ConfigGetParameterType() - New feature: up to 1000 screenshots per ROM are allowed - New feature: support for Gameshark 3.3 patch codes - Bugfix: Use Dynarec by default when core supports it. If dynarec is selected but unavailable, fall back to cached interpreter - Bugfix: screenshot directory handling code used unix-specific path separators; now is platform-independent - Bugfix: #313 - 64-bit inline assembly code in r4300/x86_64/rjump.c needs to have underscores before the symbols names in OSX - Bugfix: old bug in the core - hang if a ROM *without* a 16kb EEPROM type is loaded after a ROM *with* a 16kb EEPROM type - Bugfix: rumble feature caused memory corruption - Bugfix: Problem with zilmar API: the plugin RomOpen() functions had no way of returning errors to the core, causing crashes - Replaced api documentation .tar.gz file with the mediawiki text - Build script improvements: - new feature: m64p_update.sh script can take an input argument to update to a tag or revision - new feature: added bash script for building source packages of individual modules - Makefile improvements: - dont run ldconfig on make install unless user is root - added OS type GNU/kFreeBSD Mupen64Plus v1.99.2 - January 6, 2010 --------------------------------------- - doc: added tarball of emuwiki api documentation from 2010-01-06 for backup purposes - clean-up: removed almost all of the ifdef WIN32 statements - bugfix: stop spamming console with "Core: couldn't open memory pack file '...' for reading" messages - bugfix: stop spamming console with "Core: couldn't open eeprom file '...' for reading" messages - new feature: MSVC8 project file for mupen64plus-core, refactored code for VC8 compatibility - Makefile improvements: - throw error if OS/CPU not supported - use DESTDIR in install/uninstall paths - Allow user-specified CC/CXX/LD paths - makefile needs to install Core header files so that plugins can be built later Mupen64Plus v1.99.1 - December 14, 2009 --------------------------------------- New 2.0 architecture advantages: - Simplified emulator Core, making it much more portable - Removed all GUI code from plugins, making them simpler and more portable - User interface development is not tied to Core emulator releases - All messages from core/plugins can be filtered and shown in GUI instead of only on console - Video Extension allows Front-end to override some video functions, ie to support embedded render window - Startup in Fullscreen mode, instead of always starting in windowed mode and switching to FS after few seconds - video resolution can be given via command-line parameter - all configuration options for core and plugins are in a single config file, can be configured with a single GUI - dummy plugins are automatically used if plugin loading fails for any reason - core and plugins all use the same conventions for where to put data/config files Mupen64Plus core: - New feature: cheat code support - New feature: Keyboard shortcuts for Core commands are now user-configurable - New feature: can load/save PJ64 state files - Major code cleanup, refactored build system to separate source and object files - Removed many dependencies to simplify porting to other platforms - Moved all of the SDL event-related stuff into a new source file eventloop.c - Use XDG directory convention for file locations on Unix - bugfix: frame advance feature should advance every frame, instead of every vertical interrupt (every field) - bugfix: allow diagonal hat movements for core joystick commands - bugfix: modified SDL event loop joystick code so that gameshark button press is captured, and joystick commands that are level-triggered instead of edge-triggered (such as fast foward) can be accommodated - bugfix: fixed the outstanding SDL event issues by re-writing the code which handles the joystick-event-driven core commands. Now the axis-based commands use hysteresis and there is a single global event function for determining if the gameshark button is pressed - bugfix: OSD crash after pause-stop-start-pause of emulator - bugfix: Set video width and status, aiDacrate during savestate load - bugfix: in pure interpreter, Dont allow to override r0 register - bugfix #52: PJ64 load state patch from olejl77 - bugfix #268: use aligned malloc and mprotect to set executable status for dynarec emitted code - bugfix #51: Floating Point Register data was not correctly converted when switching between 32-bit (MIPS-I) mode and 64-bit (MIPS III). New code more closely emulates behavior of r4300 hardware. Fixes collision problems in Banjo-Tooie - bugfix #272: rounding mode for x86 FPU not being set correctly in interpreter and pure interpreter cores - bugfix: many games need different ScreenUpdateSetting to work properly with Rice Video Mupen64Plus v1.5 - January 4, 2009 ---------------------------------- Major New Features: - support for Macintosh OSX platform with Intel CPUs - Qt4 GUI by slougi, Tillin9, and others - Rom Cache System (r636, others), by Tillin9, Okaygo, and Hasone. Minor New Features: - r1235: Debugger: memory breakpoint speedup - r1170-1178,1181: QT GUI: translations for English, Norwegian, German, and Dutch - r1155: Use configurable key commands for special emulator functions - r1134: got our own custom test ROM, courtesy of Marshallh - r1046: debugger: new r4300 disassembler from ZZT32 - r829: jttl_audio: added GTK GUI configuration dialog - r793: soft reset (hit F9) - r782: jttl_audio: both SDL-based and OSS-based volume control methods are now supported - r765: added savestate conversion tool to be able to load pre-v1.5 savestate files - r711: 7-zip support - r692: Multi-file Zip support - r667: GTK GUI: user-configurable columns in ROM browser - r659: LZMA archive support - r638: BZip2 archive support - r629,634: LIRC - added support for speedup, slowdown, pause, and frame advance Updates: - r1007,1032: GTK GUI improvements - r970, 1019: use SDL threading support instead of pthreads - r935,938,940: Gtk GUI updates for core and Jttl - r642,655-657,663,664,747,759,761-763,768-770,774,775,780,781,783,786,787,825,828,931: mupen64plus.ini updates: Good Names, stars, EEPROM types, players, rumble support Bugfixes: - r1247: rsp_hle: memory overwrite bug with Zelda:OOT - r1234: out of bound array bug in memory access function handlers - r1222,1223,1228,1229: Debugger fixes - r1183: Blight Input: sometimes the axis direction would flip - r1133: Added stop rumble to load savestate, fixes issue 165 - r1077: GTK GUI bugfixes - r1063: rice video: crash in MMX/SSE checking functions - r800: logical error in strcpy loop in util.c - r798: small bugfixes in blight_input: 1. only save config file after running config dialog, not every time DLL is closed. 2. If rumble is not available on a controller, don't allow user to switch between rumble and mempack. 3. If rumble is selected in config file but not available on a controller, select mempack instead. - r789: 3 glN64 bugfixes (segfaults on a 64-bit system in Perfect Dark): prevent clamp values from being negative, handle TMEM wrap-arounds from wacky height/line values in texture cache load and texture CRC functions - r788: rice video: add checks for uint32 height/width parameters which can be negative, causing segfault on 64-bit systems - r784: 64-bit problem causing GUI crashes - gotta save/restore all the callee-saved registers around the dynarec - r758: fixed some savestate problems - r748: Fixed 64-bit dynarec crash in genj_idle() and genjal_idle() - r715: Bugfixes thanks to Valgrind. Two using strcpy with source and destination overlay, i.e. strcpy(p,p+1) - r700: set ScreenUpdateSetting=1 in rice video ini file for Conkers BFD - r694: require bash shell scripting for install.sh - r686: fixed OSD crash bug after running a game, disabling OSD, then running another game - r684: OGLFT measuring functions were taking a huge chunk of CPU time. Refactored code to measure only once and store the line size and the message sizes instead of re-measuring all the time. This eliminated nearly all of the OSD overhead on my PC - r681: Refactored OGLFT to do color setting outside of glyph compiling, so the OSD fading doesnt force bitmaps to be continually recreated with calls to renderGlyph. Seems to have cut the excessive cpu usage of the OSD about by half - r680: removed many unused classes from OGLFT font library code - r676: bugfix in my BYTESWAP macros - r674: Removed glide64/Tmem_nasm.asm source file and the project dependency on nasm/yasm assemblers - r673: removed inline assembly sections in rdp_loadblock and rdp_loadtile, including their dependency on functions in Tmem_nasm.asm. Replaced with new C code. This fixes a segfault on some 64-bit source builds - r669: string function causing crash on 64-bit linux - r667: issue #88 - added basic view menu in GTK GUI - r628,633: Small patch to get glide64.so to compile with O3 optimizations - r622: Fixed segfault in Glide64 as per issue 133 - r619: fix LIRC build to integrate w/ new screenshot mechanism - r608: another couple of memory leak fixes from Tub, in main/config.c - r605: fix from Tub for free() bug in main/util.c/list_delete() - r587: issue #111: close screenshot file after saving Mupen64Plus v1.4 - June 14, 2008 ----------------------------------- - New feature: Graphical debugger for R4300 core - New feature: On Screen Display - New feature: KDE4 GUI (experimental) - New feature: cheat system with Gameshark codes - New feature: search/filter box in GTK GUI - New feature: Single frame advance - New feature: adjust emulator playback speed up or down in 5% increments - New feature: Rumble Pak support with force feedback - New feature: Map emulator functions (fullscreen, stop emulation, etc) to joystick buttons or axis movements. - New feature: Volume up/down - Blight Input: Individually configure each direction of X and Y axis, which allows inverting the axis - JTTL_Audio: libsamplerate support for high quality audio resampling - GTK GUI: Removed second status bar which was not used - GTK GUI: Implemented accelerator keys - GTK GUI: Replaced custom directory browser with GTK file chooser - GTK GUI: numerous small changes and fixes - Added Mupen64Plus 'man' (manual) page - Removed mupen64_audio plugin, as it was unnecessary and mostly broken - Added NoMemoryExpansion parameter to emulate 4MB console; fixes some games - Overhaul of rom handling functions; numerous small fixes - Bugfix: Removed NoAudioDelay core option to resolve issue #48 - Bugfix: check for stopped state in dynarec jump function, to fix unresponsive emulator when game gets stuck in loop - Bugfix: GTK GUI: #6 - if a ROM is selected in the ROM browser and 'play' is pressed, emulation will start - Bugfix: GTK GUI: #62 - ROM browser column sorting works - Bugfix: Rice Video: Support hi-res textures with different scale factors for X and Y - Bugfix: Blight Input: don't use 100% CPU in configuration dialog Mupen64Plus v1.3 - March 29th, 2008 ----------------------------------- - New feature: Glide64 video plugin for 32-bit and 64-bit, renamed project Mupen64Plus - New feature: Combine mupen64 and mupen64_nogui into a single binary - New feature: ability to change icon size - New feature: support different directories for install (plugins, icons, etc) and config (save games, config files) - New feature: support for creating/using ~/.mupen64plus dir for storing user data - New feature: support for installation via "make install" or "./install.sh" - New feature: support for plugins given via command line option in GUI mode - New feature: config dialog checkbox to toggle "noask" setting - New feature: pause/continue functionality with LIRC - Removed messagebox utility and replaced it with cleaner alert_message/confirm_message calls - GTK GUI: Set parent window for all popups so WM will center popup windows over the main gui window - Added README file with information about usage of Mupen64Plus and plugins - Removed mupen64_soft_gfx, as it didn't work - Removed Win32 code from RSP HLE plugin, - Change fullscreen hotkey to Alt+Enter - Only plugin filenames (not paths) are stored in the mupen64plus.conf file - Modified pre.mk and glide64 makefile to auto-select yasm or nasm - Bugfix: Rice Video: Make configuration during gameplay possible again - Bugfix: many compiler warnings and errors in Glide64 - Bugfix: segfault in Goldeneye and Perfect Dark for 64-bit dynarec - Bugfix: 64-bit dynarec bug in genld() - Bugfix: buffer overflow allocating temp strings for basename/dirname - Bugfix: GTK GUI: Exiting via File -> Exit wasn't writing out config file to disk - Bugfix: GTK GUI: "About" menu does not pop up while emulation is running - Bugfix: Glide64: Refactored a bunch of inline asm code with potential bugs - Bugfix: Added plugin error checking before emulator is started - Bugfix: Logo not loading in "about" window - Bugfix: Segfault in plugin_scan_directory() - Bugfix: ROM pause/continue while playing - Bugfix: Too many dialog windows when loading a bad dump or hacked rom - Bugfix: Closing emulation window now stops emulator - Bugfix: Rice Video: config dialog bug, now it displays proper resolution - Bugfix: GTK GUI: "Toolbar Style" now works - Bugfix: Glide64: changed inline asm label syntax, for compatibility with gcc 4.3.0 - Bugfix: Many other minor bug fixes, GTK warnings fixes, translation corrections, etc Mupen64-amd64 v1.2 - February 10th, 2008 ---------------------------------------- - New feature: Dynamic Recompiler for 64-bit - New feature: New ROM Browser for Mupen64 GUI build - New feature: LIRC remote control integration for NOGUI build - Added R4300 instruction counting capability to 64-bit Dynarec - Added R4300 profile data output for 32-bit and 64-bit dynamic recompilers - TLB Optimization / bugfix - Revised makefiles to support PPC builds - Bugfix: memory leaks in mupenIniApi.c - Bugfix: corrupted filenames being saved to disk for mupen64.ini - Bugfix: crash in jttl_audio - Bugfix: crash when running game from gui after first time - Bugfix: spurious noise blip when running game from gui after first time RiceVideoLinux v1.2 - February 10th, 2008 ----------------------------------------- - Revised makefiles to support PPC builds - Added more logging to hi-res texture loading - Bugfix: Texture dumping now works Mupen64-amd64 v1.1 - December 9th, 2007 ---------------------------------------- - New icons for GTK GUI - Removed GTK 1.2 GUI build; GTK 2.0 is required now - Added file pointer checking for frwite() calls and error logging - Added scrolling to the the rom list widget - Added main/version.h file to store Mupen64-amd64 package version - Print joystick numbers along with names in blight input to tell multiple devices apart - Merged okaygo's TLB hack for Goldeneye from Mupen64++ - Rework GTK GUI config dialog; fixed bugs in ROM directory list - Bugfix: segfault from playing same game twice in a row from GUI - Bugfix: segfault from fwrite() failure in dma_pi_read in memory/dma.c - Bugfix: exit properly instead of segfault after dyna_stop is called - Bugfix: blight input: SDL_PumpEvents must be called from thread which initialized SDL video mode - Bugfix: blight_input: joystick handling caused glitch in config dialog - Bugfix: makefile: 32-bit CFLAGS must be used when doing 32-bit build on 64-bit machine - Bugfix: Added makefile to root folder for building releases RiceVideoLinux v1.1 - December 9th, 2007 ----------------------------------------- - Removed configure script and config.h; added SDL and GTK library checking and handling in main makefile - Added capability to load 24-bit PNG files into 32-bit texture buffer - Added more error logging to hi-res texture code - Added combiner type logging to DeviceBuilder class - Bugfix: added quotes around BUILD_NUMBER to prevent segfault on About box - Bugfix: SSE vertex lighting inline ASM code was incorrect - Bugfix: makefile: 32-bit CFLAGS must be used when doing 32-bit build on 64-bit machine - Bugfix: segfault with hi-res textures (incorrect scale factor used when creating memory buffer) - Bugfix: modified DrawSprite function in RenderExt.cpp to eliminate gaps between textures in Puyo Puyo 4 - Bugfix: opengl error in ApplyTextureFilter due to wrong enum type - Bugfix: Simplified fragment program and removed ATTRIB parameters to fix problems on Intel X3100 hardware Mupen64-amd64 v1.0 - November 12th, 2007 ---------------------------------------- - Forked from Mupen64 v0.5 - Ported to 64-bit architecture by NMN/SirRichard42 - Fixed texture cache problem in glN64 - Print more information during plugin loading process - Added blight input config file for logitech dual-action style controllers - Added SDL_GL_SWAP_CONTROL attribute in glN64 to prevent tearing - Changed glVoids to voids due to strange compilation bug that occurs on certain systems - Totally refactored makefiles; now plugins are built as sub-modules - Better logging for R4300 core selection, disallow Dynamic Recompilation for 64-bit builds at compile time - Set execstack attribute for all mupen64 binaries, to prevent segfault when Dynamic Recompilation is used - Lots of code cleanup - Removed 'multi-user' mode of operation - Removed 'configure' script and config.h file - Refactored plugin loading code in _nogui build, much more user-friendly now - Added comments and SDL shutdown code to main.c - Bugfix: fixed memory leaks in plugin.c - Bugfix: strcpy in main/gui_gtk/config.c should not copy overlapping strings - Bugfix: blight audio: only close down audio and timer sub-systems when exiting RiceVideoLinux v1.0 - November 12th, 2007 ----------------------------------------- - Forked from RiceVideo 6.1.1 beta 10 - Ported to Linux by Hacktarux - Ported to 64-bit architecture by SirRichard42 - Added rudimentary debug support for Linux - Merged all Non-Win32 changes from Mudlord's RiceVideo SVN 6.1.3.2 (mostly hi-res texture load/save) - Added more logging information - Tweaked Z-Buffer and Z-Bias (Decal Z-mode) handling to be like that of D3D renderer - Added screenshot capability for Linux build - Cleaned up Makefile, added 32-bit and debug build modes, help info - Removed all Win32 code, massive cleanup - Fixed uninitialized data members in several places - Bugfix: crash in Banjo Kazooie - dont delete cached texture if its currently loaded in the g_textures array - Bugfix: crash in Carmaggedon caused by illegal values in texture loading function - Bugfix: screen flashes in Mario Kart and Kirby64, tweaked .ini ScreenUpdateSetting what's new in 0.5: - Core + detection of invalid code cache for ambiguous region now use adler32 (faster than previous algorithm) + fixed a bug in ini file compression + added support for framebuffer effects functions : these functions are there to help the plugins that support framebuffer extension to zilmar's spec. These functions are based on rice's idea. I've worked closely with Gonetz to implement these and the only plugin that support this feature is Glide64 0.8 (when option is enabled). Many hard to emulate framebuffer effects are supported by this feature. Mariokart's monitor in first race running fullspeed and puzzle effect in banjo's intro are two examples that i can think about but there are many more. + detection of VI interupt rate works on weird country codes + better detection of self modifying code in dma + warnings fixed on new gcc versions + rsp's dmem and imem are now contiguous in PC's memory (some windows plugins were requiring this) + slightly improved audio timing + better detection of self modifying code when accessing memory through TLB + fixed a bug in RSP memory write + reading from ai_current_delay register should work even when Count register is looping + in interpreter code : fixed a bug in jump opcodes (detection of exceptions in delay slot in some rare conditions) + the event scheduler has better support for Count register loops + better AI interrupt handling (for musyx games for example) + jump opcodes changed in pure interpreter core so that they are timed exactly like on the other cores (easier to debug this way) + fixed a bug when accessing memory through invalid TLB in LDL, LDR, LWL, LWR, SWL, SDL, SDR, SWR opcodes + added LL, SC opcodes + two consecutive jump opcodes doesn't crash in the dynarec (result is undefined according to the r4300 manual but some games are doing it). + basic implementation of fpu opcodes in dynarec + division by 0 in FPU opcodes is returning NaN + all jump opcodes implemented in the dynarec + faster inside function loop with dynarec (register cache) + various bug fixes in dynarec opcodes + memory access improvements in dynarec - Linux version + GUI and all plugins have been switched to GKT2 (all old plugins should be recompiled for GTK2) + detection of GTK 1.2 or GTK 2 in the configure script : if both are detected, the user can choose which one to use + configure script rewritten so that it's compatible with standard unix shells instead of bash + much improved multi-user install support : if multi-user is choosen in configure script, mupen64 should be compiled ("make") and installed ("make install"). Then, when a user launch mupen64, it will create automatically a .mupen64 folder in his home and put all required files there. + language saved and restored correctly when quitting mupen64 + the console version (mupen64_nogui) has command line support and can read settings from the gui version config file thanks to jogibear's patch + autoincrement save slot option when quick saving (thanks to jdratlif's patch) + speed limiter in the core + support for plugin configuration changes when a rom is running - Windows version + autoincrement save slot option when quick saving (thanks to jdratlif's patch) + stabilty improvements on the GUI (when closing a rom for example) + added support for readScreen function to support avi recording feature on plugins that don't use opengl or directx (ie: glide64...) - Sound plugin + thread synchronisation improvements what's new in 0.4: - A totally new core based on a dynamic recompiler with register caching, it doesn't compile the fpu yet but it's already much faster compared to older versions of mupen64 :) - Self mod code detection has been improved and emulation is faster now - A lot of little fixes that should improve compaibitlity quite a bit - A new video recording feature (record in own mupen64 movie format that can be converted later into a standard avi file) - The windows GUI has been redesigned by linker - A lot of other things i forgot... sorry :P what's new in 0.3: - All versions + General speed up, 10-20 in most games Save states long loading time fixed, now it should load in less than a second + sound sync is far more accurate now (thanks to Azimer) it makes some additionnal games booting + 64dd detection to fix F-zero + a little idle loops bug has been fixed - Windows port + Configuration and initialisation of plugins now can be done prior running a rom. It fixes numerous configuration issues with plugins as well + Recent roms menu with option to clear and freeze + Command line arguments support with option to run in GUIless mode, compatible with 1964 options, read more about it in pdf + Choosing and saving of plugins used per game, access it from Rom Properties + Reset rom menu added + Speed Modifier to allow game to run at any speed between 1-200% of original Use + and - to increase, decrease it, while in the game. And . to return to 100%. + Start game in fullscreen option + Pause emulation when idle fixes + Global plugin settings (should be unchecked if you want to use plugins per game option from rom properties) + Switch on/off ToolBar (ALT+T) and Status Bar (ALT+S), useful when plugin sets wrong resolution in windowed mode, and for those who hate toolbars :) + Selection of columns to show in rom browser + English language template updated + Support for debugview by linker Put dll in the main folder, if you want to see log output + Tonnes of little fixes... - RSP hle plugin + mario kart sound fixed what's new in 0.2: - Core + better sound plugin integration + optimizations in interrupt handling + a totally new interpreter core (half of a compiler => far much faster) it caches the opcodes when they're decoded + self modifying code detection code for the new interpreter and the compiler when it'll be implemented + RSP plugin integration + pif2 implemented for banjo tooie - RSP hle plugin + the first version of this plugin based on uhle sound code + 3 main audio ucode implemented (based on uhle) + mp3 ucode implemented (direct asm to c translation) + jpeg ucode (direct asm to c translation) + boot code for btooie and dk + on windows: ability to use the hle part of a sound plugin while using another to output the sound (example: using hle from Azimer's plugin and ouputing with Jabo's plugin) This option doesn't work with azimer's audio plugin 0.3 version Please see more info about RSP and this feature in readme.pdf in chapter "3.3.2 Configuration" - Sound Plugin for linux + a new lle sound plugin that's using the OSS api - Windows port + Major cleanup of gui code and bug fixes + Gui improvements in rombrowser + Gui changes in configuration sheets and about dialog + Updates in language support and template Dialog with proper credits to translators ,send us your translations now :) + Support for screenshots from menu (depends on video plugin) (F3 key) + Added some shortcuts for gui functions to accelerators + Option to choose directories of plugins,screenshots and save states in sheets + Auto limit VI/s according to game region (60 or 50) + Ini updated with latest N64 releases + ... what's new in 0.1: - Core + sram bug zelda oot fixed + flashram is working + a new interupt system that'll enabled more accurate timing in the future but can cause some compatibility issues right now + bug in DMULT/DMULTU opcode fixed + some optimizations in jump instructions + sound plugins support implemented but not well supported use sound at your own risk :D + a clean tlb implementation + tlb exception handled correctly + compressed save states with slots + the whole memory map has been almost completes + newly emulated games include goldeneye, conker's bad fur day and perfect dark :) - Windows port + Zipped Cache to Rom Browser + Multy slot save states + Md5 based Ini + Rom properties dialog + Sound support + Config plugins dialog Allows you to chose and configure plugins + Multy directories in rom browser with recursion as an option + Audit roms dialog + Many bugs fixed and minor features added + ... - Linux port + A new gui made by Blight very similar to the windows one Everything in the gui is new so one line many new things ;) what's new in 0.0.90: - this is a huge update many games are playable now :) but only pure interpreter work on this release it will be fixed in the future but currently i am only working on compatibility - i have totally rewritten the pure interpreter core - nearly all missing opcodes have been added - interrupt code has been totally rewritten and should never crash now - tlb code rewritten, it's faster even if it's not perfect yet - some fpu opcodes have been debugged - fpu precision emulation improvements (only for x86 processors) - many bugs to allow port to big endian processors - fixed endianness when cpu write directly to pif ram - rewritten dma code for pure interpreter (with this core it always work now ) - update dp status register when a display list has been processed it fixed a lot of roms - implemented 8Mb RDRAM - implemented memory pack, eeprom, sram (thanks to Jabo and Zilmar for the pj64 source code on this part) - flashram is partially implemented (it's enough to get zelda2 starting) - a new debugger for linux was made by DavFR (it's for linux and it uses gtk library) - zip file support - a new gui for windows port has been made by ShadowPri, it features a rom browser with *classic* UHLE look,multy directories support , a toolbar (thx Schibo for help on it :), multy languages support, saving of configuration, .... - and much more ;) what's new in 0.0.4: - a new pure interpreter core (better compatibility but really slow, will help to debug in the future) - input plugins (a basic keyboard plugin is included and the obsidian joystick plugin ) - coprocessor unusable exception implemented - gui for windows - again many little bugs i can't remember fixed - automatic comparison between two cores via a pipe (for debugging) - .... what's new in 0.0.3: - unaligned dma exception fix - a little gui in gtk - new opcodes implemented - memory map fixes - better initial registers (this was find in the pj64 source code thanks Zilmar and Jabo) - implemented Zilmar spec Gfx plugins - included : a linux port of the tr64 plugin v0.5c what's new in 0.0.2: - MARIO64 works!!! - sound temporarly disabled (Just to not hurt your ears because hle audio doesn't work :) - various speed improvements - various stupid bugs removed what's new in 0.0.1: - everything it's the first public release :) mupen64plus-core-src-2.5/data/000077500000000000000000000000001251723631200162105ustar00rootroot00000000000000mupen64plus-core-src-2.5/data/font.ttf000066400000000000000000002006141251723631200177000ustar00rootroot00000000000000OS/2´_ôcëpVPCLTÑŠ^—ëÈ6cmap¤Ãè ±lXcvt ÿÓ9üüfpgmç´ñÄ&`‹gaspH glyf tAÏ&ìŠ~hdmx4ð!ìHheadÝ„¢ÐT6hheaEoëL$hmtx ÆŽ²´Ä0kernÜRÕ™½ -ŠlocaóËÒ=»„maxpG:ë, nameټȵßpost´Z/»¸ôŽprep;ñ øh::_:: dM0­l  ƒ p t › &   Y &  &   c . 5 ` õ s 0¡ & {Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.Bitstream Vera SansBitstreamVeraSans-RomanRelease 1.10Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera". This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names. The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org.http://www.bitstream.comCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved.Bitstream Vera SansBitstreamVeraSans-RomanRelease 1.10Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera". This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names. The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org.http://www.bitstream.com5¸ËËÁªœ¦¸fqË ²…u¸Ãˉ-˦ðÓª‡ËªJ3ËÙôT´œ99N´R¸çÍ7sÍ`s3¢V¦V9Åɸßsºé3¼Dßͪåªˤ{¸o{RÇÍššoËÍžÓðºƒÕ˜HžÕÁËöƒT3fÓǤ͚sÕ þ+¤´œbœ-ÕÕÕð{T¤¸#Ӹ˦Ãì“ Ó\qÛ…#¨H99`Õš#fy```{œw`ªé`b{Å{´RÍf¼fwÍ;…‰{ÍJ/œœ}oo5jo{®²-–{öƒT7öœáföÍD)fîs¸€@ÿûþúù%ø2÷–öõþôþó%òñ–ð%ïŠAïþî–í–ìúëúêþé:èBçþæ2åäSå–äŠAäSãâ/ãúâ/áþàþß2ÞÝ–ÜþÛÚ}Ù»ØþÖŠAÖ}ÕÔGÕ}ÔGÓÒÓþÒÑþÐþÏþÎþÍ–ÌËÌþËÊ2ÉþÆ…ÆÅÄþÃþÂþÁþÀþ¿þ¾þ½þ¼þ»þº¹†%¹þ¸·»¸þ·¶]·»·€¶µ%¶]@ÿ¶@µ%´þ³–²þ±þ°þ¯þ®d­¬«%¬d«ª«%ª©ŠA©ú¨þ§þ¦þ¥¤þ£¢£2¢¡d ŠA –Ÿþž žþ œ›œd›š›š™ ˜þ—– —þ– •ŠA•–”“”(“’ú‘»‘þ]»€Ž%]@Ž%þŒ‹.Œþ‹.І%ŠA‰ˆ ‰ˆ ‡†%‡d†…†%…„þƒ‚ƒþ‚þ€þþ@ÿ~}}~þ}}|d{T{%zþyþxw v uþtúsúrúqúpþoþnþl!kþjBjSiþh}gBfþeþdþcþbþa:`ú^ ]þ[þZþYX YúX WW2VþUTUBTSSRQJQþP OþNMNþMLþKJKþJIJI IH GþF–E–DþC-CúB»AK@þ?þ>=>=<=<; <@ÿ; :þ9þ878ú76765 65 43 21 2þ1 0/ 0 / .- .- ,2+*%+d*)*%)('%(A'%&% &% $þ#þ"!! dú d BþúBBþdþþþþBþ-B}dþ  þ   þ  þ-þdþ@-þ-þ¸d…++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++¶, °%Id°@QX ÈY!-,°%Id°@QX ÈY!-,  °P° y ¸ÿÿPXY°°%°%#á °P° y ¸ÿÿPXY°°%á-,KPX °ýEDY!-,°%E`D-,KSX°%°%EDY!!-,ED-fþ–f¤@ ûû/ÄÔì1ÔìÔì0!%!!füsüåþ–øòr)5Õ @@ƒ ü<ì2991/äüÌ0K° TX½ @ ÿÀ878Y¶ P ]%3#3#5ËËË¢þþÕýqþ›eŪéÕM@„üüÜì1ô<ì20K°TK°T[X½@ÿÀ878Y@0 @ P ` p   ¿ ]#!#oª$ªÕýÕ+ýÕ+ž¾`@1 ‡  ‡   üÌ91/<Ô<<ü<<Ô<<Ä2ì220@   ]!! !3!!!!#!#!5!!5!þÝT%Dh$i g8þ¡R>þ›h gþÛg¡hþÅ`Tþ¾if…þ²‡þaŸþašþ²™þbžþbž™NšŸªþÓm!(/Õ@U" '&( /)/))/B" ) *!††#Љ*Љ- ) " & 0ü<ìô<ü<ôäì1/äìÄÔäì2Äîî99990KSXíí9í9íY"K° TX½0@00ÿÀ878YK° TK°T[K°T[X½0ÿÀ00@878Y#.'5.546753.'>54&´diÒjfÑoÝÉÚÌd]®SS¯\ãÖãÖdtzqá{þÓ---´@AÈ$¬–£¼ëè¯*.þU#´œ©Ãš jXV`ÕþOnZXhqÿã)ð #'3•@6$%&%&'$'B’ ’.’$’ &Œ($‘4'!%   ! + 1 4üÄìôìîöî991ä2ô<äìîöîî0KSXííY"K° TK° T[K° T[K°T[K°T[K° T[X½4@44ÿÀ878Y"32654&'2#"&546"32654&%3#2#"&546ÑWccWUccUžº» º»ü—VcbWWcd1 üZ ž¼»ŸŸ¹º‘”„‚••‚ƒ•Ü»»ÛÛ»¼Ûa•‚„””„–ùó Û»½ÚÛ¼ºÜÿãþð 0Í@–  † †  † †††  !         B  (('•+•'”$‘Œ .  .'.'!!1üìÄÔÔìÆî99999991/ÆäöæîîÆ9990KSXíí9í9í9í9í9íí9í9ííí9Y"²2]@² " ) **&:4D ^YZ UZZY0g{›š™—• “••"™-  ' (   2'') #**(/2; 49?2J LKFO2VZ Y UY\_2j i`2uy z““—•œœŸš › š 2 2°29]]3267 >73#'#"5467.54632.#"ò[UÔ _¦Iþ{ü;Bº h]ühäƒñþΆ†02Þ¸S¥UWžDiƒ;#Q¡X’Â?@ýøYËr„þþ~þã“YW×€ác?}<¢Å$$¶/1oX3gŪoÕB@ „üì1ôì0K°TK°T[X½@ÿÀ878Y@ @P`p ]#oªÕýÕ+°þò{ O@˜—  Üä2ì991üì0K°TX½@ÿÀ878YK°TX½ÿÀ@878Y#&547{†‚ƒ… –•”—æþ>ççþ;åëÆàßÄì¤þòo @˜— Ü<ôì991üì03#654¤ –••– …ƒƒìþ<ßàþ:ëåÅççÂ=JÃðN@,  ™ ™ ‘    Ô<ä2Ü<ä2991ôÔ<ì2Äì2990%#'%%73%Ãþ™g:þ°rþ°:gþ™:PrPßÂÃbËþ‡yËbÃÂcËyþ‡ËÙÛ #@ œ  Üü<ü<ì1/Ô<ü<Ä0!!#!5!®-ýÓ¨ýÓ-ýÓªýÓ-ª-žÿÃþ@ žƒüìÔÌ1üì073#ðÓ¤Rþ¬þÀ@d߃¶œÜÌ1Ôì0!!dý僤ۮþ·ƒüì1/ì073#ÛÓÓþþÿB²Õ-@BŸ/Ä991ôì0KSXííY"3#ªýøªÕùm‡ÿãð #@   ‘Œ üìôì1äôìî0"32'2#"‹œœû þ÷ûûþ÷ PþÍþÌþÍþÍ3343 þsþ†þ‡þsyzáZÕ K@B     ÔìÄüì1/ì2ôìÔì0KSXY"K°TX½ ÿÀ @878Y´]7!5%3!!þJþ™eÊJü¤ªsH¸HúÕª–Jð¥@'B¡”  ‘   üÄÔìÀÀ91/ì2ôìôì0KSXíí9Y"K°TK°T[K°T[X½@ÿÀ878Y@2UVVzzv‡tvust‚†‚‚‚¨¨]]%!!567>54&#"5>32‰ÁüLs3aM§†_ÓxzÔXèE[þôªªªw‘:m—Iw–BCÌ12èÂ\¥pþëœÿãsð({@. † †     “  “#‘Œ£)&  )üÄÄÔìôì991ìäôäìæîîîî90K°TK°T[X½)@))ÿÀ878Y@ daa d!]!"&'532654&+532654&#"5>32?‘£þÐþè^ÇjTÈm¾Ç¹¥®¶•ž£˜S¾rsÉYæ Ž%ÄÝò%%Ã12–„•¦wps{$&´ Ѳ|«d¤Õ Œ@   B     ÜÔ<Äì291/äÔ<ì290KSXÉÉY"K° TK° T[X½@ÿÀ878Y@* *HYiwŠ+&+6NO O Vfuz… ]] !33##!5þþ5þÕÕÉý^%üãÍü3¨þ `ÞÿãdÕu@#†  ‰   Œ¤  üÄÔìÄî1ääôìæîþÄî90K°TK°T[X½@ÿÀ878YK°TX½ÿÀ@878Y!!>32!"&'532654&#"Ýý ,X,ú$þÔþï^ÃhZÀk­ÊÊ­Q¡TÕªþ’þîêñþõ Ë10¶œœ¶$&ÿã–ð $X@$ †   ¥  ‰"‘Œ% " !%üììôìä1äôäüäîîî90@ËËÍÍÍËˤ²]]"32654&.#">32# !2¤ˆŸŸˆˆŸŸ L›LÈÓ;²káþðâþýþîPL›;º¢¡»»¡¢ºy¸$&þòþïW]þïëæþêyb¥¨hÕc@B üÌÄ991/ôì0KSXííY"K°TX½@ÿÀ878Y@X9Hg°°]]!#!¨ÀýâÓþý3ÕVú+‹ÿã‹ð #/C@%  ' - ‘Œ'£0 $*$ !0üÄìôÄìîî991ìäôìîî990"32654&%&&54632#"$54632654&#"‹¥¥¦¥þ¥‚‘ÿÞßþ‘’£þ÷÷÷þ÷¤H‘ƒ‚““‚ƒ‘Åš‡‡š›†‡šV ²€³Ðг€² "ÆÙèèÙÆat‚‚tt‚‚ÿã‡ð$X@#†  ¥ ‰ ‘Œ%!"" %üìäôìì1äôìæþõîî90@ÄÂÀÀÀÂμé]]7532#"543 !"&2654&#"áLœKÈÓ:²làþûâþ±þåLœ>ˆŸŸˆˆŸŸ¸$& V\ëæþsþ†þŸþ[—º¢¡»»¡¢ºðÃ#@ƒ¦ƒü<ì21/ìôì073#3#ðÓÓÓÓþþ#þžÿÃ# %@ƒžƒ¦  ü<ì2ÔÌ1äüìî03#3#ðÓÓÓ¤R#þýÙ¬þÀ@Ù^Û¦M@*œœœœB¨§$#üì291ôì90KSXííííY" 5Ûûøúþðþ‘þ“¶ѦÑÙ`Û¢@ œœ#ü<Ä21ÔìÔì0!!!!Ùúþúþ¢¨ðªÙ^Û¦O@+œœœœB¨§$#ü<ì91ôì90KSXííííY"55Ùúþð¶þ/¦þ/¶m“°ð$p@+$  †ˆ•‘ƒ   &%ÜÄüìÔìî99991/îöþôîÍ9990K° TX½%@%%ÿÀ878Y¶y z z ]%3##546?>54&#"5>32‡ËËÅ¿8ZZ93ƒlO³a^Ág¸ßHZX/'þþ‘še‚VY5^1YnFC¼98ŸL‰VV/5<4‡þœq¢ L•@2  ©©L43¬0©7¬$©7CM34( (+(I+*(I,=MÜìüìþýþ<Æî991ÔÄüìþíÔÆÅî2Äî990K° TK° T[K°T[K°T[K°T[X½MÿÀMM@878Y@ NN/N?N]32654&#"#"&5463253>54&'&$#"3267#"$'&5476$32úŽ|{zy!<›g¬×Ø«gœ;’¥?@hþÕ°{â`±smiùhZ}þÙ˜¹þ¸€€†ˆ~R½Ôk{KOþÂþè£¤ŽŒ¥¤þHMIùÈÈúKLƒý ß±k¼Pƒ‹A@fþµÁŸþêjhmWQoagƒ}}I½¶J}‡® bæ{þùþÐhÕ º@A       B•    ÔÄ91/<äÔì90KSXííííííííY"² ]@:XvpŒ VXP ghxv|rwx‡ˆ€ ˜™–]] !3#!#¼þî%þ{å9Òˆý_ˆÕý®ú+þÉìÕ C@#• •• ­ . !üì2üìÔì9991/ììôìî90²"]!2654&#!2654&#%!2#!“D££þ¼+”‘‘”þ çú€|•¥þðûýèÉý݇‹Œ…fþ>orqp¦À±‰¢ ˘ÈÚsÿã'ð6@ ¡® •¡®•‘Œ 0üì2ì1äôìôìîöî0´].# !267# !2'fç‚ÿþð‚çfjí„þ­þz†S†íbÕ_^þÇþØþÙþÇ^_ÓHHŸghŸGɰÕ.@• •  2 üìôì99991/ìôì0²`]3 !%! )“ô5þáþËþBŸ²–þhþPþa/ûw.,¦þ—þ€þ~þ–É‹Õ .@•••­   üì2ÔÄÄ1/ììôìî0² ]!!!!!!ɰýÇý9øü>ÕªþFªýãªÉ#Õ )@••­ üì2ÔÄ1/ìôìî0² ]!!!!#ÉZýpPý°ÊÕªþHªý7sÿã‹ð9@ ••¡®•‘Œ43 üìüäüÄ1äôìôìþÔî990%!5!# !2&&# !26Ãþ¶uþæ þ¢þu‹^’opü‹þîþík¨Õ‘¦ýSU™mn™HF×_`þÎþÑþÒþÎ%É;Õ ,@•­ 8  üì2üì21/<ä2üì0²P ]3!3#!#ÉÊÞÊÊý"ÊÕýœdú+Çý9É“Õ9·¯üì1/ì0K°TX½ÿÀ@878Y@ 0@P`Ÿ]3#ÉÊÊÕú+ÿ–þf“Õ M@ •° 9 üìä991äüì990K°TX½ ÿÀ @878Y@ 0 @ P ` Ÿ ]3+53265ÉÊÍãM?†nÕú“þòôª–ÂÉjÕ ï@(B¯  üì2ÔÄ91/<ì290KSXííííY"²]@’ ((764GFCUgvwƒˆ”›ç    (+*66650 A@E@@@ b`hgwp ‹‹Ž š¶µÅÅ×Öèéèê÷øù,]q]q3! !#ÉÊžýþöý3ÊÕý‰wýHüãÏý1ÉjÕ%@ •:üìì1/äì0@ 0P€€]3!!ÉÊ×ü_ÕúÕªÉÕ ¿@4  B ¯   >  üìüì91/<Äì290KSXííííY"²p]@V   && & 45 i|{y €‚‚  #,'( 4<VY ej vy •›]]! !###É-}-ÅþËþÄÕüøú+üúáÉ3Õ y@B¯6 üìüì991/<ì2990KSXííY"² ]@068HGif€ FIWXeiy…Š•šŸ ]]!3!#É–ÄþðýjÄÕûáú+áûsÿãÙð #@•• ‘Œ 3üìüì1äôìî0"32' ! 'ÜþýÜÜþÿÜ:xþˆþÆþÅþ‡yLþ¸þåþæþ¸HH¤þ[þžþŸþ[¤bb¥ÉÕ:@••   ? üì2üì91/ôìÔì0@ ?_¯]32654&#%!2+#“þššþ8ÈûþÿûþÊ/ýÏ’‡†’¦ãÛÝâý¨sþøÙð R@*  B ••‘Œ    3üìüì9991Ääôìî990KSXíí9Y""32#'# ! 'ÜþýÜÜþÿ? ôÝ!#þÅþ‡y;:xÑLþ¸þåþæþ¸HHúÏþÝï¥ab¥þ[þžþüþŽÉTÕ±@5  B• •   ?  üì2üÄì99991/<ôìÔì9990KSXíí9Y"²@]@Bz%%%&'&&& 66FFhuuwˆˆ˜˜]]#.+#! 32654&#A{>ÍÙ¿J‹xÜÊÈüƒý‰þ’••’¼~þh–bý‰ÕÖØºOýƒ…‡ÿã¢ð'~@<    B ¡”••”%‘Œ( "-"(ÜÄìüìä99991äôäìîöîÆ90KSXí9í9Y"²)]¶)/)O)].#"!"&'532654&/.54$32HsÌ_¥³w¦zâ×þÝþçjï€{ìr­¼‡š{âÊõiÚ¤Å76€vce+Ù¶Ùà0/ÐEFˆ~n|-À«Æä&ÿúéÕJ@•@@Ôäüä1/ôì20K° TX½@ÿÀ878Y@  @ p Ÿ ]!!#!ïýîËýîÕªúÕ+²ÿã)ÕK@ •Œ  8Aüìüì1ä2ôì99990K°TX½@ÿÀ878Y¶Ÿ]332653! ²Ë®Ã®ËþßþæþåþßÕüuðÓÓð‹ü\þÜþÖ*$hÕ·@'B¯ÔÄ91/ì290KSXííííY"²P]@b*GGZ}ƒ *&&))% 833<<7HEEIIGYVfiizvvyyu€˜—)]]!3 3JýÆÓÙÚÒýÇÕûéú+D¦Õ {@I      B ¯    ÔÌ91/<ì2290KSXííííííííY"²]@ò  ($ >>4 0 LMB @ Yjkg ` {|€ –•     !   # $ %  <:5306 9 ? 0FFJ@E@BBB@@ D M @@XVY Pfgab```d d d wv{xwtyywpx  †‡ˆ‰… Š —Ÿ¯[]]3 3 3# #DÌ:9ã:9Íþ‰þþÅþÂþÕûîûîú+úð=;Õ ]@F      B ¯   ÔÄÜÄ91/<ì290KSXííííííííY"K° TK° T[K°T[X½ ÿÀ @878Y@¸ '' 486 KX[fkww †€‡‹… ”—–     &()&(' ) 54<;:;4 4 8 ? H O X _ eejjhiil l xyyx}  x €€ƒˆ…„ƒ ”——•“ Ÿ ¯ @]]3 3 # #ÙsuÙþ Ùþ\þYÚÕýÕ+ý3üø{ý…ÿüçÕ”@(B¯@@ Ôäüä91/ì290KSXííííY"² ]@<5000F@@@QQQe„“ &)78@ ghxp Ÿ ]]3 3#Ùž›ÙýðËÕýšfüòý9Ç\Õ ›@B••B ÜÄÔä991/ìôì0KSXííY"K° TK° T[X½ @ ÿÀ878Y@@ )&8HGH    / 59? GJO UYfio wx Ÿ ]]!!!5!s•üPÇû=°ügÕšûoªš‘°þòXS@©²©±CÜüÌ21üìôì0K° TX½ÿÀ@878YK°TK°T[X½@ÿÀ878Y!#3!°¨ððþXùüÿB²Õ-@BŸ/Ä991ôì0KSXííY"#ªªýøÕùm“Çþòo<@©²©±Cü<Üì1üìôì0K°TK°T[X½ÿÀ@878Y!53#5oþXïïøÞÙ¨ÛÕ@ ÜÌ91ôÌ290##¼ÉþHþHÉÕýÓ‹þu-ÿìþþ¬µ©ÄÄ1Ôì0!5ûØþ¬ªð‰f1@ ´³DÜì1ôì0K° TK°T[X½ÿÀ@878Y #o™þºfþŠv{ÿã-{ %¼@'  ©¹ †º¹#¸Œ   E&üìÌÔì22991/ÄäôüôìÆîî9990@n0000 0!0"?'@@@@ @!@"PPPP P!P"P'p'…‡‡‡ ‡!…"' 'ð'000 0!@@@ @!PPP P!``` `!ppp p!€€€ €!]]"326=7#5#"&5463!54&#"5>32¾ß¬o™¹¸¸?¼ˆ¬Ëýû§—`¶Te¾Zóð3f{bsÙ´)LýªfaÁ¢½À‹..ª''üºÿ㤠8@¹  ¹Œ¸—G Füì22ôì1/ìäôÄìÆî0¶`€ ]4&#"326>32#"&'#3å§’’§§’’§ýŽ:±{ÌÿÿÌ{±:¹¹/ËççËËççRdaþ¼þøþøþ¼ad¨qÿãç{?@†ˆ† ˆ ¹¹¸Œ HEüä2ì1äôìþôîõî0@ € ].#"3267#"!2çNP³ÆÆ³PNM¥]ýþÖ-U¢5¬++ãÍÍã++ª$$>:#qÿãZ8@¹¹Œ¸—G Eüìôì221/ìäôÄìÄî0¶`€ ]3#5#"3232654&#"¢¸¸:±|ËÿÿË|±ýǧ’’¨¨’’§¶^ùì¨daDDaþËççËËççqÿã{p@$ †ˆ©¹ »¹¸ ŒKEüìôìÄ91äôìäîîôî90@)?p Ðð?????,// , ooooo ]q]!3267# 32.#"ü² Í·jÇbcÐkþôþÇ)ü⸥ˆš¹^Z¾Ç44®*,8 CþÝÄ—´®ž/øp@ ©‡—¼    Lü<Äü<ÄÄ991/ä2üìî2990K° TX½ÿÀ@878YK°TX½@ÿÀ878Y¶@P ]#"!!##535463ø°cM/þѹ°°®½™Phcü/ÑN»«qþVZ{ (J@#  †¹¹&#¸'¼ ¹½& G E)üÄìôì221/ÄäìäôÄìþÕî990¶`*€* *]4&#"326!"&'5326=#"3253¢¥•”¥¥”•¥¸þþúa¬QQžRµ´9²|ÎüüÎ|²9¸=ÈÜÜÈÇÜÜëþâþé³,*½¿[cb::bcªºd4@ ‡¸ — N  Füì2ôì1/<ìôÄì90²`]#4&#"#3>32d¸||•¬¹¹B³uÁƤý\žŸž¾¤ý‡ýžedïÁy+@¾±¼Fü<ì21/äüì0@  @ P ` p ]3#3#Á¸¸¸¸`û éÿÛþVy D@ ¾ ‡½¼ ±O  Fü<ì2ä991ìäôìî990@ @P`p]3+532653#Á¸£µF1iL¸¸`ûŒÖÀœa™(麜 ¼@)B¼— F üì2ÔÄ91/<ìä90KSXííííY"² ]@_ ')+Vfgsw‚‰Ž“–—£    ('(++@ h` ‰…‰š—ª§¶ÅÖ÷ð÷ð]q]33 ##º¹%ëý®kðýǹüiãýôý¬#ýÝÁy"·—Füì1/ì0@ @P`pð]3#Á¸¸ùìº{"Z@&  ‡ ¸¼PPF#üì2üüüì91/<<äô<Äì290@0$P$p$$ $ $¿$ß$ÿ$ ]>32#4&#"#4&#"#3>32)EÀ‚¯¾¹ru¦¹rw¦¹¹?°yz«‰|võâý\ž¡œ¾¤ý‡ž¢›¿£ý‡`®gb|ºd{6@ ‡¸ ¼ N  Füì2ôì1/<äôÄì90´`Ï]#4&#"#3>32d¸||•¬¹¹B³uÁƤý\žŸž¾¤ý‡`®edïqÿãu{ J@¹¹ ¸Œ QEüìôì1äôìî0@#?{{   {  { ð]"32654&'2#"s”¬«•“¬¬“ðþîðñþïßçÉÉçèÈÇéœþÈþìþíþÇ98ºþV¤{>@¹¹¸Œ½¼ GFüì22ôì1äääôÄìÄî0@ `€ à]%#3>32#"&4&#"326s¹¹:±{ÌÿÿÌ{±8§’’§§’’§¨ý® ªdaþ¼þøþøþ¼aëËççËËççqþVZ{ >@¹  ¹¸Œ½¼ GEüìôì221äääôÄìÆî0@ `€ à]32654&#"#"3253#/§’’¨¨’’§s:±|ËÿÿË|±:¸¸/ËççËËççý®daDDadªùöºJ{0@  ‡¸ ¼ FüÄì21/äôìÄÔÌ90´PŸ].#"#3>32JI,œ§¹¹:º….´˾ý²`®fcoÿãÇ{'ç@<  S  SB †‰†‰¹¹%¸Œ( R"E(üÄìÔìä99991äôìþõîõî90KSXí9í9Y"²']@m   . , , , ; ; ; ; $( ( *//*(() )!$'† † † †      '/)?)_))€)) )ð)]]q.#"#"&'532654&/.54632‹N¨Z‰‰b”?Ä¥÷ØZÃlfÆa‚Œe«@«˜àÎf´?®((TT@I!*™‰œ¶##¾55YQKP%$•‚ž¬7òž8@©¼‡  Fü<Äü<Ä2991/ìô<Äì2990²¯]!!;#"&5#53w{þ…Ks½½Õ¢‡‡žþÂý ‰NšŸÒ`>®ÿãX`6@ ‡Œ ¼  NFüìôì21/ä2ôÄì90´`Ï]332653#5#"&®¸||•­¸¸C±uÁȺ¦ýaŸŸ¾¤{û ¬fcð=`@'B¿ÔÄ91/ì290KSXííííY"K° TX½ÿÀ@878YK°TK°T[X½@ÿÀ878Y@ŽHj{†€‘¤  &&)) 55::0FFIIFH@VVYYPffiigh`ut{{uz……‰‰‰†––—š˜˜—¨§°Àßÿ>]]3 3#=Ã^^Ãþ\ú`üT¬û V5` @IU U U U   B ¿    ÔÌ91/<ì2290KSXííííííííY"K° TK°T[K°T[K°T[K° T[X½ ÿÀ @878YK° TK° T[K°T[X½ @ ÿÀ878Y@ÿ" 5 IIF @ [[U P nnf yy‡™˜” ¼¼ÎÇÏ         %%#'!%""%' $ ! # 9669 0FHF@B@@@D D D @@VVVPQRRPS T U cdejejjjn a g ouuy}x}zzxy  { v } ‡ˆ——”“œ›˜˜™@/– Ÿ¦¦¤¤««©©«¤ ¯µ±½»¸ ¿ÄÃÌÊy]]333# #V¸æåÙæå¸þÛÙñòÙ`ü–jü–jû –üj;y` Z@F      B ¿  ÔÄÔÄ91/<ì290KSXííííííííY"K° TK°T[K°T[K°T[X½ ÿÀ @878YK°TX½ @ ÿÀ878Y@˜   & =1 UWX f vzvt ‚ ™Ÿ—’ ¦©¯¥£       )&% * :9746 9 0 IFE J @ YVYYWVYVV Y P o x ›”«¤° Ï ß ÿ /]] # # 3 dþkªÙþºþºÙ³þrÙ))`ýßýÁ¸þHJþq=þV`¢@C        B  ‡½ ¼  ÔÄÄ91ä2ôì9990KSXíííííí2Y"K° TK°T[X½ÿÀ@878YK°TX½@ÿÀ878Y@ð     # 5 I O N Z Z j ‡ € “        '$$  )( % $ $ ' ** 755008 6 6 8 990A@@@@@@@@B E G II@TQQUPPVUVW W U U YYPffh ii`{xx‰Š … … ‰ ‰‰™ • • šš¤ ¤ ««°Ïßÿe]]+5326?3 3“N”|“lLT3!þ;Ã^^ÃhÈzšH†TNü”lXÛ` ´@B©¼© ÜÄ2Ä991/ìôì0KSXííY"K° TK° T[X½ @ ÿÀ878YK°TX½ ÿÀ @878Y@B&GI  + 690 @@E@@CWY_ ``f``b € ¯ ]]!!!5!qjýL´ü}´ýe`¨üÛ“¨%þ²$‚@4 %   ! © ©À ©±% $  C %Ô<Äü<Ä299999991üìÄôìî99999990K° TX½%ÿÀ%%@878Y²&]#"&=4&+5326=46;#"3>ù©lŽ==k©ù>DV[noZV¾”Ýï—ts•ðÝ“XøŽŽœøXþ®·±Ôì1üÌ0#®ªøþ²$ž@6%   ©©#À©±%#C %Ô<Ä2ü<Ä99999991üìÄôìî99999990K° TX½%@%%ÿÀ878YK°TX½%ÿÀ%%@878Y²&]326=467.=4&+532;#"+FŒUZooZUŒF?ù§lŽ>>Žl§ù?¾VøœŽŽøŽW“Ýð•st—ïÝ”ÙÓÛ1#@ œœ ÔÄ1ÔüÔìÀ990#"'&'&'&#"56632326Ûi³an’ ›^X¬bi³an“ ›^V©1²OD;>MS²OE<>LÿÿhN'$¼uhm !Ë@T   !!  ! !!!B  Á • Ž  !  VV!"ÔÄÔì2Ôî299999991/<æÖîÔî9990KSXííííííííY"² #]@  s › P#f iu {yyv v!€# ]]4&#"326!.54632#!#TY?@WX??Y˜þð!þX=>Ÿsr¡?<Òˆý_ˆÕZ?YWA?XXþóýN)sIs ¡rFv)ú‹þÿÿsþu'ð'&Ý-ÿÿÉ‹k'(žuÿÿÉ3^'1þuÿÿsÿãÙN'2'uÿÿ²ÿã)N'8îuÿÿ{ÿã-f'DRÿÿ{ÿã-f'DCRÿÿ{ÿã-f'D×Rÿÿ{ÿã-'DŽRÿÿ{ÿã-7'DØRÿÿ{ÿã-'DÜRÿÿqþuç{'FÝÿÿqÿãf'H‹ÿÿqÿãf'HC‹ÿÿqÿãf'H׋ÿÿqÿã'HŽ‹ÿÿof'ÖÿÿÿÿǦf'ÖCÿÿÿÿÞ\f'Ö×ÿÿÿÿôF'ÖŽÿÿÿºd7'Qؘÿÿqÿãuf'Rsÿÿqÿãuf'RCsÿÿqÿãuf'R×sÿÿqÿãu'RŽsÿÿqÿãu7'RØsÿÿ®ÿãXf'X{ÿÿ®ÿãXf'XC{ÿÿ®ÿãXf'X×{ÿÿ®ÿãX'XŽ{9ÿ;ÇÕ '@¹  YW Y Ô<ìü<ì1äôÔ<ì203!!#!5!¨°oþ‘°þ‘oÕþ\™û£]™Ãu=ð  @ÃÄà ‘ Z[ZÜìüì1ôìüì0"32654&'2#"&546PnnPPnoO@v+..¹†‡´¸ooPOmmOOp1.-rB„·´‡†º¬þÇ#˜!Q@+  †ˆ †ˆ ¹ ¹¸Œ"  "ÜìÔ<Ô<<ì221äô<ÄìÄþôîõî9990%&&'667#&73¦“¤¤JˆDF‰HA‰Mfñþ÷ ñfI‰ƒX⸹⡬)*ü *'ª#þä 32þá!bð`@!† ©  ”‘   Ü<ÌÌü<ÄÔÄ1/ì2ôäìÔ<î2î990K° TX½ÿÀ@878Y´66].#"!!!!53#535632NLˆ=”t‡þy-üìÇÇÖè=—´¶))›Ô×þ/ªªÑîó\ÿ=¢ð >‘@54&.#"#"&'532654/.5467.54632{?>‹ú?>ÌS8alÎÓƒ\]>9Ì­IšXW”:fqÝÖ€][;;ȦI™¨.Z.L…‡-[.Kˆ“¤''PGZswšeZŒ54m@ލ¤''TLf{x™f[1,pE‚Ÿ3Ñ…! · Ç \ Ôì1Ôì04632#"&3­~|«¬}}¬ú|««|}¬¬žÿ;9Õ %@Á]] ÔÔüÜì91Ä2ôì90!###&&54$yÀ¾Ž×ëÕùfùáNݸ¾èºÿã¬/š@0-'!  *†¹*¹—Œ.  !' $'$-F0üÄüÌÆîÔîî99991/äþîþÕî990@@'(Š Š     ! "&  : :!MM I!I"jj ¥¥¦ ]]4632#"&'532654&/.5467.#"#ºïÚÐÛ—¨:A9¦`áÓ@ˆIPŒAtx;e\`W§—ƒq‚ˆ»qÈÛèàs`/Q*%jŽd¬·¤_[?T>7;‡[¬gp‹ƒû“åÍ/8L`@6EBC?2ÉH0É9JCÊ 9ÊÉÈ É$HE301BKL?gwyVpMIßÑ`3þœDåÍ/IC@&=Ë>:ÌAÊ$1Ë04ÌGÊÉÈ$É 7aD=0^* D^ JÜÌüìþí2î1/îöþýîÖîýîÖî02#"$'&5476$"32676654&'&&&&#"3267#"&54632˜mmllmmþù˜˜þùmmllmm˜ƒâ^^``^^⃄ã^]]^\^ã§B‚B•§«›@zBC‰FØûûØIˆÍnmmþúš˜þûmmnnmm˜šmmng^^^å‚ã^^__^]⃅ã]^^õ! ¯Ÿ®"ôÐÑò'“FÕ >@!  É  b b cbcÔäüäÔìÔì91ô<<ì2Ô<<Ä903#######5J®¤ªqÃ7ËrqËrÉÕÿý¾äþÑ/þB^þä^sîRf1@ ´³DÔì1ôì0K° TK°T[X½ÿÀ@878Y3#‹Çþº™fþˆ×F)’@ÎÍddÜüÔì1ü<ì20K° TK° T[X½@ÿÀ878YK° TK° T[K°T[K°T[X½ÿÀ@878YK°TK°T[X½@ÿÀ878Y@````pppp]3#%3#^ËËþyËËÊÊÊÙ'ÛÝ>@" Ïœ Ï œ  Ü<Ä291Ô<Ì2ü<ìþ<ì990!!!!!'7!5!7!Ù}®/þHÃ{üúþþ}®þÕ¶Ãý‡¢;fÕ¨ðªþÇfÓªðHÕ‡@9  B• ••••­    ÔÔ<ì2ÔÄÄ91/<ììÄôììîî0KSXííííY"²€]@gww† …– ¿ ]!!!!!!#!5ýÇý9øü=ýð Íq‹þ¶ËÕªþFªýãªþÕžüðfÿºå +ž@< +,  )&  *&•& •‘&Œ,+,* # )#3,üìüìÀ999999991äôìîÀÀ99999990@*WZWU!je!{vu! FYVjddj(|svz( ]] 324&'.#"&5!27!"&''¶ý3>¡_Ü'y=¡_Üþý''†NOy;‚ÝW¢fªNPþˆþÆ€Ý[¢gXü²@CHp¸¸@Cþ¸þåp¼Džf b¥MK¿YÆgþöžþŸþ[KK¿XÝÝÏî /ÿ@- !$'!!0 $*0ÔÄÔÄ99991ÔÄÔÄÀ9990@¾     $$$   $$ $ ***///***55500055 5 :::???:::EEE@@@EE E JJJOOOJJJV´° °!°"°&°'°(´)]]32654&#".#"326#"&54632>32#"&“1†Te€vYR…Ä1…UfvYR†F^ˆº§†_™HDža†¼§†^•/XZ‡ie†‡7XX„je†ˆ‡ߦ¯Ø~ŠŠƒá§¯ÖwÙÛ .@МР œ   Ô<ì2ü<ì21/ìÔ<ìü<ì0!!#!5!!!®-ýÓ¨ýÓ-ýÓúþþ}ªþ}ƒªƒû¦ªÙÛ¨ T@.œœœœBѧœ $# ü<ì2291/ìôì90KSXííííY" 5!!Ûü@Àúþúþúþøþëþî²pªoüªÙÛ¨ V@/œœœœBѧœ$ # ü<<ì291/ìôì90KSXííííY"55!5ÙúþÁAúþø°þ‘ªþ²ýǪªRÃÕÆ@F  B Ó Ó   fe f eÔ<ì2ìüì2ì99991/ä2Ô<ì2Ô<ì290KSXííííY"K° TX½ÿÀ@878Y@(†¦ µ' ' ')((79‡ ˆ¦ ¥ª©]]!#!5!5'!5!3 3!!!þcÉþ` Tþ´þþ{y¿þÂþµTŸÇþ9Ç{3›{JýD¼ý¶{›3®þVå` M@% ‡Œ ¼½!   NF!üì2ôìÄ91ää2ô<ìÜÄ990¶"`"Ï"]3326533267#"&'#"&'®¸Š‡”•¸#% )I#ER2‘bf*þV ýH‘”¨¨ü¢<9 ”NPOONNý×hÿçÁ-)b@'! '!Õ* $$*ÔÌÜÌ9991äÌÜÌÎÎ990K° TK° T[K°T[K°T[K°T[X½*@**ÿÀ878Y>54&#"#"&54632#"&54324&#"32ôIH7$$0e´ÖþßÕ˜ËÝ¢e‚ WOmVPmmW£Kƒt,>bþÊþùþ±þFØ£Æ[àt}þþÏt{þw;Á ]@    ÔÄ91ÄÔÌÎ990@0QVPZ spvupz €€ Z pp{ t €€ ]]!! !!5 7êüA ýJïúÞÕýIÁÁý3ýÀ•!ãœþwqÁ@×Ö¯ggÔìÔì1üìì20!#!#œÕðý ïÁø¶}ùƒÿáÿðª/#Ë@1 ÚÙ"ØÕ $ #" #h#$ÔÔÔì9999991/<äôì22î9990K° TX½$ÿÀ$$@878Y@V             ##(]]#3267#"&5467!##"#>3!‡¶i/7.%7vy"PþºÂµÃ)6<  ¥y‘þJ\:1fd.¡xüo‘@E¦}/þú%&@ Û Ûܱ& iji&Üìüì1üìÜäÞä026732#"&'&&#"#"&546327j ¾ÊPd@7*8  k½ÄOeD=!0 þú°l9¼TA6?&#Hý•Ánþ!þbSA8?SsÕ;ð)_@3(%ãÝá%Ý ßÞÝ à‘* "(kl"k *ÜìÌüì22ÀÀ9991ôäüôìÄîíÖîî99990!!#5#"&5463354&#"56632"32655‹°ýP®•,]€˜¿¼¶uu>ˆDI‘E·³þì¡~bRh‚P{¸þ@p?D‡q‡Š[[""°ðCO@Mr`Õdð.@ãáÝ àÝ‘ klk Üìüì991ôìôìüì0!!2#"&546"32654&‹°ýPX³Îγ³Ðгi~hi}|P{Ý¿¿Ûܾ¿Ýs¡ˆ…  …‰ NÏç@@" å‘å  mm  ÔììÔììÀÀ9991/<ì2ôì0%!5654#"!5!&5! Ïý¨±ÆþøØØþ÷Dzý¨?ž‘1/Ž¡²²²aLÊð"þÝïÊþ´a²²‹*¸>ŠþwþËÂþØ{ÿão{3>@C'-%= 4©%†ˆ©:¹.†-º*¹»1 ¸Œ%?47&%7& =&-7"E?üìÌÔü<ÔìÄ999991Ää2ô<Ääü<ôìÄî2îôîî9990@0+0,0-0.0/00@+@,@-@.@/@0P+P,P-P.P/P0…+…0€@@ @°@À@Ð@à@à@ð@??? ??0,0-0.0/@,@-@.@/P,P-P.P/ooo oo`,`-`.`/p,p-p.p/€,€-€.€/]q].#">32!3267#"&'#"&5463!54&#"5>32"326=¶¥‰™¹DJÔ„âü² Ì·hÈddÐj§øMIؽÒýû§—`¶Te¾ZŽÕï߬o™¹”—´®ž0Z^þÝúZ¿È55®*,ywxx»¨½À‹..ª''`þf{bsÙ´)Hÿ¢œ¼ +ä@<+,&  )&  *&¹& ¹¸&Œ,+,* # #Q)E,üì2ôì2À9999991äôìîÀÀ99999990@p(?-YVUV jf!{    { z{ {!"#$%{&›•%¨ -ð-&YVUZ(ifej(ztvz(‰•š$¢­$]] 32654&'.#".5327#"&''‰þ)gA“¬\*g>—©}66ñ]ŸC‹_’56þîð`¡?‹`!ý°*(èÈOuš))ëÓHn.—MÅw834¨O³MÆxþíþÇ43¨Nÿã¬Õ $†@/ †ˆ !ƒ# •Œ#%" " "!& %ÜìÔüìÔì99991äôìþÍôî9990K°TK°T[K°T[X½%ÿÀ%%@878Y@ ttttv]33267#"&546?>7>5#53ô¾7ZZ:3ƒmN´`^Àg¸àIYX0&ÄÊÊDœe‚WX5^1YnFC¼98ŸL‰VV/5<6þ5Õ b@ƒ ü<ì2991/ôüÌ0K° TX½ @ ÿÀ878YK°TK°T[K°T[X½ ÿÀ @878Y¶ P ]#53#3ËËË¢×þú+eþ›ÙÛ^@ œÜÔì1ÔÄì0!#!Ù¨û¦^ýÁ•=ÿ×} *@    ÔÌ91ÔÌÄ903##'%\½sý®BþÁ}}`ùºs-Pbý;þV#Š@@   B   ©Šæ©Šæ©!—$  $ÔÌ91Ä2Äüìôìîöîî299990KSXí2í9Y"K° TX½$ÿÀ$$@878Y.#"!!#"&'53267#5!>32&P,`r<þÃ:¼º:d/4a/am"‰ø?$Æ—5dð¤z„þÉý…þãÓ¦!!‰¦­J·ÃÙÛô;?@.9*-" *œ19œ"œ œ<-<Ô<Ä21ÔìÔìÜüÔìÀ9999990#"'&'&'&#"56632326#"'&'&'&#"56632326Ûi³an’ ›^X¬bi³an“ ›^V©gi³an’ ›^X¬bi³an“ ›^V©o³NE;=LT³NE;=KÚ²OE;=LS²NE;=Kÿú`Á8@ÔÌ91/ÄÌ90@cmpxyvn]] !3!¬þ^DýïàCúšîûÄú?ž%# †@Ièèèè è è è  è B  ç¦ o o nüü<Ôì2991ô<ì2990KSXííííííííY"55%þÓ-þ+#þÓ-þ+#¿þôþô¿¢R¢¿þôþô¿¢RÁH# †@I è è è è èèèèB  ç¦ o opü<üÔ<ì991ô<ì2990KSXííííííííY"5%5ÁÕþ+-þÓ²Õþ+-þÓ#þ^Rþ^¿  ¿þ^Rþ^¿  ìþ #@ƒ   ÔüÔìÔì1/<<ì220%3#%3#%3#–ÔÔ©ÕÕú­ÕÕþþþþþþÿÿhk'$¼uÿÿh^'$¼uÿÿsÿãÙ^'2'us Õ;@•••­   üìÔÄÄÔì299991/ìì2ôì2î0!!!!! !# !3úýÇý9øû×þOþA¿±gþ¿þÀ@AÕªþFªýãª|pm|ªþáþàþßþßqÿãÃ{'3„@1†ˆ ©. ¹(¹»"%¸Œ4"1 K1 Q+E4üìôüôìÄ9991ä2ô<Ääì2Äî2îôî90@%?5_5p5Ÿ5Ï5Ð5ð5????? ooooo ]q].#"!3267#"&'#"32>32%"32654& ¤‰™¹Hü² Ì·jÈbdÐj òQGÑŒñþïñŒÓBNèâú°”¬«•“¬¬”˜³®ž5Z¾Ç44®*,nmnm98olkpþ݇çÉÉçèÈÇééy¶©é/Æ1üì0!!üyéyµ©/Ì1Ôì0!!øy®émÕ '@ž   ÜüÌÔÌþÔÎ1ô<ì20#53#53Ó¤RšÓ¤Ré­?þÁ­­?þÁ®émÕ '@ ž  ÜìÔÌÜîÔÎ1ô<ì203#%3#Ó¤RšÓ¤RÕ¬þÀ@¬¬þÀ@®éÓÕ@ žÜüÔÌ1ôì0#53Ó¤Ré­?þÁ²þ×Õ@ žqÜìÔÌ1ôì03#Ó¤RÕ˜þÁ?Ù–Ûo )@êêœ r ÜÔ<ü<Ä1ÔÄüÄîî03#3#!!ßööööýúúþoöþõAªþ#îu"@ÔÌ91ÔÌ990 úþþôþ þ üÏüÇ9%ûÛûÓ-ÿÿ=þV'\Ž^ÿÿÿüçN'<suþ‰ÿãÍð+@BŒ‘ÔÌ1ää0KSXííY"3#- ü\ ðùó^R¼²#/ƒ@I -'! - -¹ëì'¹ë!0 *$0* $ $(st*(s0Üäìôäì9999999991ÔäìôäìÀ9999999907'#"&''7&&5467'766324&#"326{ÏrÎ%$&(ÑrÏ;t=:x=ÏqÏ%%&&ÏsÏ7t@?s9ÏqÏ(&%%ÏsÎ>v:@t8ÎsÏ'%$þ|pššprœžs#G@%èèèèBç¦onüì291ôì90KSXííííY"5sþÓ-þ+#¿þôþô¿¢RÁ–#I@&èèèèBç¦opü<ì91ôì90KSXííííY"5ÁÕþ+-þÓ#þ^Rþ^¿  /J›@( ©‡¾±— ¼ Lü<Ä2Äü<Äî2991/<æ2îþîîî2990K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@0P€€€ Ðï]]#!##53546;#"3#J¹þ¹°°­³¹°cMù¹¹`û Ñü/ÑN·¯™Phc²é/J„@! © ‡— ¼   Lü<ÄÄü<Äî991/<æ2þîî2990K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@0P€ € € Ðï]!#!"!!##53546J¹þ·cM/þѹ°°®ùì{Phcü/ÑN»«9ÿ;ÇÕ>@ ¹¹  ÂY W Y Ô<<ì2ü<<ì21äôÄ2Ä2î2î20%!#!5!!5!3!!!Çþ‘°þ‘oþ‘o°oþ‘oßþ\¤š™¤þ\™ýáÛH®F·ƒÔì1Ôì03#ÛÓÓFþ®ÿÓþ@ žƒÔìÔÌ1üì0%3#Ó¤Rþ¬þÀ@®ÿmþ '@ žƒ   ÜìÔÌÜîÔÎ1ü<ì20%3#%3#šÓ¤RþfÓ¤Rþ¬þÀ@¬¬þÀ@qÿã Lð #'3?K®@D$%&%&'$'B@’ .’(’F’4 :&Œ$‘L%IC'1+C =  1 =I 7+ ! LüäìÔÄìäîîöîî991ä2ô<<ä2ì2îöîî20KSXííY"K°TK° T[K° T[K° T[K° T[K°T[X½L@LLÿÀ878Y"32654&'2#"&5462#"&546!3#"32654&2#"&546"32654&ôWddWUccUžº» º»ùtž¼»ŸŸ¹º% üZ VcbWWcd²žº» º»ŸWccWUcc‘”„‚••‚ƒ•Ü»»ÛÛ»¼ÛàÛ»½ÚÛ¼ºÜùóŽ•‚„””„–ýŸÜ»»ÛÛ»¼Û”„‚••‚ƒ•ÿÿhm'$¼uÿÿÉ‹m'(žuÿÿhk'$¼uÿÿÉ‹N'(žuÿÿÉ‹k'(žuÿÿ¢k',ÿ/uÿÿÿþ`m',ÿ/uÿÿXN',ÿ/uÿÿ;ºk',ÿ/uÿÿsÿãÙk'2'uÿÿsÿãÙm'2'uÿÿsÿãÙk'2'uÿÿ²ÿã)k'8îuÿÿ²ÿã)m'8îuÿÿ²ÿã)k'8îuÁy` ·¿Füì1/ì0@ @P`p]3#Á¸¸`û Áî?f7@ ´³uÜì91ôì290K° TK°T[X½ÿÀ@878Y3#'#¶”õ‹´´‹fþˆõõ¶J7c@$  Ãà íVwVvôìüì99991ü<üÔ<ì99990K° TK° T[X½ÿÀ@878Y'.#"#>3232673#"&ü9! &$}f[&@%9! &$}f[&@Z7IR‡“!7IR‡“Õb+ö/·ïîÔÌ1üì0K° TK°T[X½ÿÀ@878Y!!ÕVýªö”Ç)9H W@ ð³VVÜìÔì1ô<Ôì0K° TX½ÿÀ@878YK°TK°T[K°T[X½@ÿÀ878Y332673#"&Çv aWV` v ž‘‘žHKKJLšDf,@ ÎÍdÔì1üì0K° TX½ÿÀ@878Y3#šÌÌÌîá _@Áò ÁñV xVÔìôì1ôìôì0K° TK° T[X½ÿÀ@878YK° TK° T[K° T[X½ÿÀ@878Y4&#"3267#"&54632˜X@AWWA@XzŸssŸŸssŸô?XW@AWX@s  ssŸŸ#þuÁ@  ó' ÜÔìÔÌ1/ÔüÄ90!#"&'532654&'T76xv.W+"J/;<+->i0Y[ ƒ0.W=ðî®fB@´³ÔÜÔÌ991ô<ì20K° TK°T[X½ÿÀ@878Y3#3#ü²ø‡ªß‰fþˆxþˆLþuÁ @  óô 'ÔìÄÔÌ1/üüÄ90!33267#"&546¸w-+76 >&Dzs5=X..… W]0iÁî?f7@ ´³uÜì91ô<ì90K° TK°T[X½ÿÀ@878Y373¶õ‹´´‹õîxõõþˆÿòuÕ ?@ •  : yô<ìÄü<Ä991/äì90´0P]3%!!'7ÓË9Pþw×ü^”MáÕý˜Ûoþîýãª;jnžH ^@ — z z Ô<äü<ä991/ì90K°TX½ @ ÿÀ878Y@ @ P ` sz p à ð ]37#'7Ǹ}Lɸ{JÅý¦ZjüãšXjÿÿ‡ÿã¢m'6‹uÿÿoÿãÇf'Vàÿÿ\m'=¾uÿÿXÛf']àþ¢®˜@ õõÜ<ì21ÔìÔì0##®ªªª˜ý öý ö ºÕ g@  © ••  2  yô<ì2ÄôìÄ91/Æ2îöîî20@( °Ÿ Ÿ Ÿ Ÿ ŸŸŸŸ¿ ¿ ¿ ¿ ¿¿¿¿]]! )#53!!3 !Ó ±–þiþPþ`ÉÉËPþ°ó5þáþËÕþ—þ€þ~þ–¼ãþýê.,qÿãu('@^%{&%#${##{#({'(#&'('%$%(('"#" ! B('&%"! ##¹ ¹Œ#±)&' ! (%#" QE)üìôì99999991ìÄôìî9990KSXÉÉÉÉííííY"²?*]@v%+("/#/$)%-&-'*(6%F%X X!` `!f"u u!u"%#%$&&&''(6$6%F$E%Z Z!b b!z{     {zzv v!x" *ð*']].#"32654&#"5432''%'3%F2X)§¹®’‘®6 ~rþäæçþåÝ4*ŸþÁ!µäM!þÙ“ØÃ¼ÞÞ¼z¼&þà­ÿþÉ7ÿú7´kc\Ì‘oabÿÿÿüçk'<suÿÿ=þVf'\^ÉÕ =@• •ö  ? üì22üì91/ôüìÔì0@ ?_]332+#32654&#ÉÊþûþÿûþÊÊþš™ŽÕþøáÜÜâþ®'ýÑ’††‘ºþV¤>@¹¹Œ¸½— GFüì22ôì1ìääôÄìÆî0@ `€ à]%#3>32#"&4&#"326s¹¹:±{ÌÿÿÌ{±8§’’§§’’§¨ý®¾ý¢daþ¼þøþøþ¼aëËççËËççÙ-Û×¶œÔÄ1Ôì0!!Ùúþת?œÅ …@M œ  œœœœœ œ œ B   Ô<Ì291Ô<Ì290KSXííííííííY" '7œþ7Éwþ5þ5vÈþ8vËËLþ5þ7yËþ5yÉËyþ5ˉœÅß ,@Ý ÝÝ ÷‘ |]|| Üôäüä1ôììÔìî2035733!œÌßæ‰Íý× c)t'ý+n^œ´ðJ@$}}BÝÝ÷ Ý‘~ÜÄÔÄì91ôÄìüìî90KSXí2íY"!!56754&#"56632 ¨ýª"?XhU4zHM…9‘®þµ8rn81^BQ##{„l‹þä0bÍð(H@' Ý Ý Ý Ý ø÷Ý ø#‘)~&~ )ÜÄÄÔìÔì9991ôäìüäìÔìîî90#"&'532654&##532654&#"56632 \e¾±9}F4wCmxolV^^ad_(fQI€7©Z`mR|†yOFJLl?<:=svcE`ÿÿ‰ÿãð'ð'¼5 ‹ýdÿÿ‰ÿã?ð'ð'¼5ñ‹ýdÿÿbÿãð'ò'¼5 ‹ýdÿÿsÿã‹m'* uÿÿqþVZH'JÚ‹ÿÿÉ•P', ÿ/uÿÿ‡þu¢ð'6Ý‹ÿÿoþuÇ{'VÝÿÿsÿã'k'&-uÿÿqÿãçf'F‰ÿÿsÿã'm'&-uÿÿqÿãçf'Fà‰qÿãô$J@$Ó ù"¹¹ Œ¸—   GE%üìô<Äü<Ä1/ìäôÄìÄîý<î20¶`&€& &]!5!533##5#"3232654&#"¢þºF¸šš¸:±|ËÿÿË|±ýǧ’’¨¨’’§¶N}““}úü¨daDDaþËççËËççd߃¶œÜÌ1Ôì0!!dý僤ÛH®F·ƒÔì1Ôì03#ÛÓÓFþÿãð1@: Ó"+Ó ¡®•¡®•/‘Œ) 2+"!)#&  , & &*!/<ÔÄ2üÄÄ99999999991Ä2äôìôìîöîî2Ý<î20K° TK° T[K° T[K°T[K°T[K°T[X½2ÿÀ22@878Y@z  1Ti lnooooiko o!o"o#n$l%i'i-ŸŸŸ Ÿ Ÿ Ÿ Ÿ ŸŸŸŸŸŸ–Ÿ Ÿ!Ÿ"Ÿ#Ÿ$Ÿ%Ÿ&Ÿ'Ÿ(Ÿ)Ÿ*Ÿ+Ÿ,-2   USjg ]].#"!!!!3267#"#734&5465#7332[©fÊ A7ýæ¾8þŠ Êf©[Y¹`íþË(Ó7‹Â7œ(6ìb¹bÕiZÈ»{.# .{»ÊZiÓHH"{/ #/{"G×)Ù¥@ ÎddÔüÜì1Ô<ì20K°TK°T[X½@ÿÀ878YK°TK° T[K°T[X½ÿÀ@878YK°TK°T[X½@ÿÀ878YK°TX½ÿÀ@878Y@````pppp]3#%3#^ËËþyËËÙËËËsîðö@BúÄÀ1ôÌ0KSXÉÉY"K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@ %%6FVjg //]]3#7¹ä™öþø¶Jéu@!  ÃÃúVV ÔìÔì99991ô<ìÔì2990K° TX½ÿÀ@878YK°TX½@ÿÀ878Y´ ]'.#"#4632326=3#"&ü9 $(}gV$=09" (}gT";9! 2-ev 3)dw î‹ö‰@BúÄÀ1ôÌ0KSXÉÉY"K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@*$$5CUUŸŸ¯¯//]]#ÇÄ™æöþøÏî1øw@ úÔÄ91ô<Ä90K° TX½ÿÀ@878YK°TX½@ÿÀ878YK°TX½ÿÀ@878Y@ //- ]3#'#¢¼Ó‹¦¦‹øþö²²Ïî1ø†@ úÔÄ91ôÄ290K° TK° T[K° T[K° T[X½ÿÀ@878YK°TX½@ÿÀ878YK°TX½ÿÀ@878Y@ "  ]373¢Ó‹¦¦‹Óî ²²þö?œôß Ô@ Ý ÷‘ ] ÜÔ<Äì291ôüÔ<ì290K°TK°T[K°T[K°T[K° T[K° T[X½@ÿÀ878YK°TK°T[X½ÿÀ@878Y@T /9IFYi‹«»       "5GK S[ e„¥µ]] !33##5!5ÝþË5¦‡‡þbfþ]ýämººyÇ9ø j@à úVVÔìÔì1ôüÄ20K° TX½ÿÀ@878YK°TX½@ÿÀ878YK°TK°T[X½ÿÀ@878Y332673#"&Çv cSRav  Ÿø6978w{zšfÛ¶úÔÌ1ôÌ03#šÌÌÛÍ  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßà>: ~ÿ1BSax~’ÇÝ©À & 0 : ¬!""""+"H"e%Êûÿÿ   0AR^x}’ÆØ©À  0 9 ¬!""""+"H"`%ÊûÿÿÿãÿõÿØÿ ÿ^ÿCÿhÿüöüÛà–à…àVßjÞqÞ_Úï¿8ôüúúü (B¬£„…½–熎‹©¤ŠÙƒ“ñò—ˆÃÝðžªóôõ¢­ÉÇ®bcdËeÈÊÏÌÍÎèfÒÐѯgï‘ÕÓÔhêì‰jikmln oqprsutvwéxzy{}|¸¡~€ëíºýþÿøÖùúãä×àÚÛÜßØÞ²³¶·Ä´µÅ‚‡«˜¨š™î¼¥’”•Íf‹‹55®Å´žªšq=3ۤ=´Ù‹žãd‹Û²‡á–œdž¨‹²ð²ž´Ù´Ù´Ù?“‡y}É–s)ÉÉšÉ3sÉ\É\ÿ–?ÉuÉçÉüÉLsÓÉLsɇãÿúÛ²yéD{=ãÿü{\°²Ç´Ùÿìªç{ºfqqìqÑ/qº9Á9ÿÛ¢º9Á˺ºåqºqJº+o#7®¼=‹V¼;¼=3X²´Ùyy–sÉüÉLsÛ²ç{ç{ç{ç{ç{ç{fqìqìqìqìq99ÿÇ9ÿÞ9ÿôºåqåqåqåqåq®®®®9ì\¸3ž º's×´ÙËLfªÝ´Ù´Ù´ÙR®#hdœ¶ÿá+/ÅsÅ`NÛ{åH?55´Ù=´ÙZÿúåžåÁìyyLss/q%®%®‹®‹²´Ùô¼=ãÿüVþ‰^3ž3Á / /9‹Û‹®%® ¼qyÉyÉÉ\¢\ÿþ\\;LsLsLsÛ²Û²Û²9ÁÁ¶ÕÇšî#ðLÁÿòF‡+o{\3X²3 åqãÿü¼=×ɺ´Ù´5‰5^5bÁ‰Á‰Áb3sq\ɇ+o–sfq–sfqqãd‹Û×s¶ ÏÏ5?Çšÿ+   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóõôöøùúûüýþÿ     sfthyphenperiodcenteredEuroc6459c6460c6461c6462c6463c6466c6467c6468c6469""""X“ÿ¶Oƒ²ö!n˜´ÊÞE‚~áL·üeÏî  R s ®  ß X ° û : i “ æ  = z /¬E…ëuñ)pཊëP‹±á@Ö"m¹#{ßC€øw³R¡Ø‡Äº‡wè [ r ó!5!B!â!ï!ü" ""#"0"="J"W"d"q"~"‹"˜"¥"²"¿"Ì"Ù"æ"ó## ##'#4#A#N#[#h#”#Ï$4$%3%S%&&º'K''·((X(Ã)_*%*\*£*é+z+Ó,D,,±-P- ..R.ª/‡0A0½11!1P1Ï2H2z2ß3F3p3p3}3Š3—3æ4z44£4Ñ4ÿ5595g5‘5ž5«5Ï6[6“6Í7C7©7ë888J999)969C9P9]9j9w9„9‘9ž9«9¸9Å9Ò9ï::{: :å;;^;Ž;Ä;ô<"<_<§<´<Á<Î<Û<þ=c>;>H>U>˜>ç>ý?a??Ü@:@K@\@m@z@‡@”@¡@®@»@È@Õ@âA@AVAkBEBªB÷C_C²CÿDUDÛE*E?-†” x$ÿÓ%ÿ·&')*K+-r./2934K57ÿD9ÿˆ:ÿ­;ÿš<ÿ =IQR&UYÿÉZ\ÿÜbÿÓdg9xy&z&{&|&}&‰­ÿÓ®ÿÓ¯9ºÿÜ»ÿ ÇÿÓÉÿÓÐ9Ñ9Ò9åéêÿ ëÿÜìöKûý$ÿÓ$ÿÜ$ÿÜ$$9$&ÿÜ$*ÿÜ$2ÿÜ$4ÿÜ$6$7ÿa$8$9ÿ}$:ÿ$;$<ÿa$FÿÜ$GÿÜ$HÿÜ$Iÿ·$RÿÜ$TÿÜ$WÿÜ$X$Yÿˆ$Zÿ­$\ÿu$b9$dÿÜ$gÿÜ$h$oÿÜ$pÿÜ$qÿÜ$rÿÜ$sÿÜ$yÿÜ$zÿÜ${ÿÜ$|ÿÜ$}ÿÜ$~$$€$$©ÿ·$ª$­9$®9$¯ÿÜ$´þø$µÿ$ºÿu$»ÿa$Å/$Ç9$É9$ÐÿÜ$ÑÿÜ$ÒÿÜ$Ó$Ô$Õ$ã$êÿa$ëÿu$öÿÜ$ù$ûÿÜ$üÿÜ$ýÿÜ$þÿÜ%%&ÿÜ%*ÿÜ%2ÿÜ%6ÿÜ%9ÿÁ%:ÿ·%<ÿ%dÿÜ%gÿÜ%©ÿÁ%ªÿÜ%¯ÿÜ%´ÿ%µÿ%»ÿ%Åÿ­%ÐÿÜ%ÑÿÜ%ÒÿÜ%ãÿÜ%êÿ%öÿÜ%ùÿÜ%ûÿÜ%ýÿÜ&&$&6&<ÿÜ&b&©ÿÜ&ªÿÜ&­&®&´&µ&&»ÿÜ&Å&Ç&É&ã&êÿÜ&ù''$ÿÜ'9ÿÜ':'<ÿ'bÿÜ'©ÿÜ'ªÿÜ'­ÿÜ'®ÿÜ'´ÿÓ'µÿÉ'»ÿ'ÅÿD'ÇÿÜ'ÉÿÜ'êÿ))þ·)ÿa)$ÿD)6ÿÜ)7ÿÜ)DÿD)Hÿ)Lÿk)Rÿ·)Uÿk)Xÿ)\ÿD)bÿD)iÿD)jÿD)kÿD)lÿD)mÿD)nÿD)pÿ)qÿ)rÿ)sÿ)yÿ·)zÿ·){ÿ·)|ÿ·)}ÿ·)~ÿ)ÿ)€ÿ)ÿ)©)ª)­ÿD)®ÿD)´ÿÓ)µ)ºÿD)Åþˆ)ÇÿD)ÉÿD)ãÿÜ)ëÿD)ùÿÜ**$*7ÿ·*:*<ÿš*b*©ÿÜ*ªÿÜ*­*®*´ÿÓ*µÿÓ*»ÿš*ÅÿÉ*Ç*É*êÿš++ÿÜ++©+ª+´ÿ·+µÿÁ+Åÿ·-ÿ·-$ÿÜ-bÿÜ-©ÿÜ-ªÿÜ-­ÿÜ-®ÿÜ-´ÿ·-µÿÁ-Åÿ-ÇÿÜ-ÉÿÜ.ÿ).$ÿÜ.&ÿ.2ÿ.7ÿa.8ÿÉ.:ÿ·.<ÿ·.DÿÜ.Hÿš.Rÿš.Xÿš.\ÿk.bÿÜ.dÿ.gÿ.hÿÉ.iÿÜ.jÿÜ.kÿÜ.lÿÜ.mÿÜ.nÿÜ.pÿš.qÿš.rÿš.sÿš.yÿš.zÿš.{ÿš.|ÿš.}ÿš.~ÿš.ÿš.€ÿš.ÿš.©ÿ}.ª.­ÿÜ.®ÿÜ.¯ÿ.´ÿÁ.µÿÁ.ºÿk.»ÿ·.Å.ÇÿÜ.ÉÿÜ.Ðÿ.Ñÿ.Òÿ.ÓÿÉ.ÔÿÉ.ÕÿÉ.êÿ·.ëÿk.ûÿ.ýÿ/ÿÜ/$//2ÿ·/7þæ/8ÿš/9ÿ/:ÿD/<þð/D/HÿÜ/RÿÜ/XÿÜ/\ÿD/b//gÿ·/hÿš/i/j/k/l/m/n/pÿÜ/qÿÜ/rÿÜ/sÿÜ/yÿÜ/zÿÜ/{ÿÜ/|ÿÜ/}ÿÜ/~ÿÜ/ÿÜ/€ÿÜ/ÿÜ/©/ª/­//®//¯ÿ·/´þa/µýæ/ºÿD/»þð/Å/Ç//É//Ðÿ·/Ñÿ·/Òÿ·/Óÿš/Ôÿš/Õÿš/êþð/ëÿD292ÿ­2ÿÜ2$ÿÜ29ÿÜ2;ÿ}2<ÿ2bÿÜ2©ÿÜ2ª2­ÿÜ2®ÿÜ2´ÿÓ2µÿÜ2»ÿ2ÅÿD2ÇÿÜ2ÉÿÜ2êÿ3ÿÓ3þÁ33$ÿ}383:3<ÿÓ3Dÿ¤3Hÿ·3LÿÓ3QÿÜ3Rÿ·3UÿÜ3VÿÜ3XÿÜ3\3bÿ}3h3iÿ¤3jÿ¤3kÿ¤3lÿ¤3mÿ¤3nÿ¤3pÿ·3qÿ·3rÿ·3sÿ·3xÿÜ3yÿ·3zÿ·3{ÿ·3|ÿ·3}ÿ·3~ÿÜ3ÿÜ3€ÿÜ3ÿÜ3©ÿÜ3ª3­ÿ}3®ÿ}3´&3µ&3º3»ÿÓ3Åþ·3Çÿ}3Éÿ}3Ó3Ô3Õ3äÿÜ3êÿÓ3ë3úÿÜ494©4ª4´ÿÓ4µÿÜ4Åÿ}5ÿ­5ÿ·5ÿÁ5$ÿ­5&ÿš57ÿk59ÿ5:ÿ­5<ÿ}5DÿÓ5Hÿ¤5Rÿ¤5Xÿ¤5\ÿ5bÿ­5dÿš5iÿÓ5jÿÓ5kÿÓ5lÿÓ5mÿÓ5nÿÓ5pÿ¤5qÿ¤5rÿ¤5sÿ¤5yÿ¤5zÿ¤5{ÿ¤5|ÿ¤5}ÿ¤5~ÿ¤5ÿ¤5€ÿ¤5ÿ¤5©ÿ5ªÿÜ5­ÿ­5®ÿ­5´ÿk5µÿ}5ºÿ5»ÿ}5ÅÿÜ5Çÿ­5Éÿ­5êÿ}5ëÿ5ûÿš5ýÿš6$&6&6*6264666b&6d6g6­&6®&6¯6Ç&6É&6Ð6Ñ6Ò6ã6ö6ù6û6ý7ÿD7ÿ 7ÿ7$ÿa7&ÿˆ77ÿÜ7Dþ­7Fþ¤7Hþ¤7LÿÁ7Rþ¤7UþÓ7Vþ­7XþÉ7Zþ­7\þÁ7bÿa7dÿˆ7iþ­7jþ­7kþ­7lþ­7mþ­7nþ­7oþ¤7pþ¤7qþ¤7rþ¤7sþ¤7yþ¤7zþ¤7{þ¤7|þ¤7}þ¤7~þÉ7þÉ7€þÉ7þÉ7©ÿD7ªÿ7­ÿa7®ÿa7´7µÿÓ7ºþÁ7Åþø7Çÿa7Éÿa7äþ­7ëþÁ7úþ­7ûÿˆ7üþ¤7ýÿˆ7þþ¤8$8-8=ÿÜ8b8­8®8Ç8É8åÿÜ9ÿˆ9þø9ÿY9$ÿ}92ÿÜ9Dÿa9Hÿa9LÿÓ9Rÿa9Xÿu9\ÿÉ9bÿ}9gÿÜ9iÿa9jÿa9kÿa9lÿa9mÿa9nÿa9pÿa9qÿa9rÿa9sÿa9yÿa9zÿa9{ÿa9|ÿa9}ÿa9~ÿu9ÿu9€ÿu9ÿu9©ÿN9ªÿ9­ÿ}9®ÿ}9¯ÿÜ9´9µ9ºÿÉ9Åþæ9Çÿ}9Éÿ}9ÐÿÜ9ÑÿÜ9ÒÿÜ9ëÿÉ:ÿ­:ÿ:ÿˆ:$ÿ:Dÿ}:Hÿˆ:LÿÓ:Rÿˆ:Uÿ¤:Xÿ·:\ÿÜ:bÿ:iÿ}:jÿ}:kÿ}:lÿ}:mÿ}:nÿ}:pÿˆ:qÿˆ:rÿˆ:sÿˆ:yÿˆ:zÿˆ:{ÿˆ:|ÿˆ:}ÿˆ:~ÿ·:ÿ·:€ÿ·:ÿ·:©ÿ:ªÿÜ:­ÿ:®ÿ:´ÿÜ:µ:ºÿÜ:Åþø:Çÿ:Éÿ:ëÿÜ;ÿš;$;&ÿk;2ÿ};7ÿÜ;Hÿ¤;b;dÿk;gÿ};pÿ¤;qÿ¤;rÿ¤;sÿ¤;©ÿ;ª;­;®;¯ÿ};´ÿa;µÿ­;ÅÿÓ;Ç;É;Ðÿ};Ñÿ};Òÿ};ûÿk;ýÿk<ÿ <þa<þð<$ÿa<&ÿ<2ÿ<Dþæ<Hþð<Lÿ·<Rþð<Xÿ<bÿa<dÿ<gÿ<iþæ<jþæ<kþæ<lþæ<mþæ<nþæ<pþð<qþð<rþð<sþð<yþð<zþð<{þð<|þð<}þð<~ÿ<ÿ<€ÿ<ÿ<©ÿ<ªÿk<­ÿa<®ÿa<¯ÿ<´ÿ<µÿÜ<Åþø<Çÿa<Éÿa<Ðÿ<Ñÿ<Òÿ<ûÿ<ýÿ=ÿÜ=©=ª=´ÿÜ=µÿÜ=ÅÿÜH[ÿÜIÿIÿkIÿ·IWÿÜIZÿÜI\ÿÜI©ÿ·IªÿÜI´AIµIºÿÜIÅÿIëÿÜNDÿÜNHÿ·NRÿ·NXÿÁN\ÿ·NiÿÜNjÿÜNkÿÜNlÿÜNmÿÜNnÿÜNpÿ·Nqÿ·Nrÿ·Nsÿ·Nyÿ·Nzÿ·N{ÿ·N|ÿ·N}ÿ·N~ÿÁNÿÁN€ÿÁNÿÁNºÿ·Nëÿ·QQQQ©QªQ´ÿkQµÿQÅÿ¤R&RÿÜRR[ÿÁR©RªR´ÿkRµÿ·RÅÿ}Uÿ}UÿDUÿÜUFÿÓUGÿÜUHÿÓUIUJÿÜUKÿÜUPÿÜUQÿÜURÿÓUTÿÜUUÿÜUXUYUZU[ÿÉU\U]UoÿÓUpÿÓUqÿÓUrÿÓUsÿÓUxÿÜUyÿÓUzÿÓU{ÿÓU|ÿÓU}ÿÓU~UU€UU©ÿ·UªU´UµVUºUÅþÉUæUëU÷ÿÜUüÿÓUþÿÓYÿÉYÿaYÿY©ÿÜYªÿÜY´YµÿÜYÅþðZZÿDZÿZ©ÿÜZªÿÜZ´ZµZÅÿ)[FÿÜ[HÿÁ[RÿÁ[oÿÜ[pÿÁ[qÿÁ[rÿÁ[sÿÁ[yÿÁ[zÿÁ[{ÿÁ[|ÿÁ[}ÿÁ[üÿÜ[þÿÜ\ÿÜ\þÜ\ÿk\©ÿÜ\ªÿÜ\´\µ\ÅþÓbÿÓbÿÜbÿÜb$9b&ÿÜb*ÿÜb2ÿÜb4ÿÜb6b7ÿab8b9ÿ}b:ÿb;b<ÿabFÿÜbGÿÜbHÿÜbIÿ·bRÿÜbTÿÜbWÿÜbXbYÿˆbZÿ­b\ÿubb9bdÿÜbgÿÜbhboÿÜbpÿÜbqÿÜbrÿÜbsÿÜbyÿÜbzÿÜb{ÿÜb|ÿÜb}ÿÜb~bb€bb©ÿ·bªb­9b®9b¯ÿÜb´þøbµÿbºÿub»ÿabÅ/bÇ9bÉ9bÐÿÜbÑÿÜbÒÿÜbÓbÔbÕbãbêÿabëÿuböÿÜbùbûÿÜbüÿÜbýÿÜbþÿÜdd$d6d<ÿÜdbd©ÿÜdªÿÜd­d®d´dµ&d»ÿÜdÅdÇdÉdãdêÿÜdùg9gÿ­gÿÜg$ÿÜg9ÿÜg;ÿ}g<ÿgbÿÜg©ÿÜgªg­ÿÜg®ÿÜg´ÿÓgµÿÜg»ÿgÅÿDgÇÿÜgÉÿÜgêÿh$h-h=ÿÜhbh­h®hÇhÉhåÿÜp[ÿÜq[ÿÜr[ÿÜs[ÿÜxxxx©xªx´ÿkxµÿxÅÿ¤y&yÿÜyy[ÿÁy©yªy´ÿkyµÿ·yÅÿ}z&zÿÜzz[ÿÁz©zªz´ÿkzµÿ·zÅÿ}{&{ÿÜ{{[ÿÁ{©{ª{´ÿk{µÿ·{Åÿ}|&|ÿÜ||[ÿÁ|©|ª|´ÿk|µÿ·|Åÿ}}&}ÿÜ}}[ÿÁ}©}ª}´ÿk}µÿ·}Åÿ}‰&‰©‰ª‰´ÿ‰µÿ‰Åÿ­©ª´ÿ­µÿ¤Åÿ©$©%ÿÜ©&ÿÜ©'ÿÜ©)©*ÿÜ©+©-ÿÜ©.©/©2©3©4©5©7ÿ©9ÿ©:ÿÜ©;©<ÿk©=©I©Q©R©U©YÿÜ©ZÿÜ©\ÿÜ©b©dÿÜ©g©x©y©z©{©|©}©‰©—©­©®©¯©ºÿÜ©»ÿk©Ç©É©Ð©Ñ©Ò©å©é©êÿk©ëÿÜ©ì©öÿÜ©ûÿÜ©ýÿܪ$ÿ·ª%ÿ·ª&ÿܪ'ÿܪ)ª*ª+ª-ÿܪ.ª/ª2ÿܪ3ª4ª5ª7ÿDª9ÿNª:ÿª;ÿª<ÿª=ªIªQªRªUªYÿܪZÿܪ\ÿܪbÿ·ªdÿܪgÿܪxªyªzª{ª|ª}ª‰ªª­ÿ·ª®ÿ·ª¯ÿܪºÿܪ»ÿªÇÿ·ªÉÿ·ªÐÿܪÑÿܪÒÿܪåªéªêÿªëÿܪìªöªûÿܪýÿÜ­ÿÓ­ÿÜ­ÿÜ­$9­&ÿÜ­*ÿÜ­2ÿÜ­4ÿÜ­6­7ÿa­8­9ÿ}­:ÿ­;­<ÿa­FÿÜ­GÿÜ­HÿÜ­Iÿ·­RÿÜ­TÿÜ­WÿÜ­X­Yÿˆ­Zÿ­­\ÿu­b9­dÿÜ­gÿÜ­h­oÿÜ­pÿÜ­qÿÜ­rÿÜ­sÿÜ­yÿÜ­zÿÜ­{ÿÜ­|ÿÜ­}ÿÜ­~­­€­­©ÿ·­ª­­9­®9­¯ÿÜ­´þø­µÿ­ºÿu­»ÿa­Å/­Ç9­É9­ÐÿÜ­ÑÿÜ­ÒÿÜ­Ó­Ô­Õ­ã­êÿa­ëÿu­öÿÜ­ù­ûÿÜ­üÿÜ­ýÿÜ­þÿÜ®ÿÓ®ÿÜ®ÿÜ®$9®&ÿÜ®*ÿÜ®2ÿÜ®4ÿÜ®6®7ÿa®8®9ÿ}®:ÿ®;®<ÿa®FÿÜ®GÿÜ®HÿÜ®Iÿ·®RÿÜ®TÿÜ®WÿÜ®X®Yÿˆ®Zÿ­®\ÿu®b9®dÿÜ®gÿÜ®h®oÿÜ®pÿÜ®qÿÜ®rÿÜ®sÿÜ®yÿÜ®zÿÜ®{ÿÜ®|ÿÜ®}ÿÜ®~®®€®®©ÿ·®ª®­9®®9®¯ÿÜ®´þø®µÿ®ºÿu®»ÿa®Å/®Ç9®É9®ÐÿÜ®ÑÿÜ®ÒÿܮӮԮծã®êÿa®ëÿu®öÿÜ®ù®ûÿÜ®üÿÜ®ýÿÜ®þÿܯ9¯ÿ­¯ÿܯ$ÿܯ9ÿܯ;ÿ}¯<ÿ¯bÿܯ©ÿܯª¯­ÿܯ®ÿܯ´ÿÓ¯µÿܯ»ÿ¯ÅÿD¯ÇÿܯÉÿܯêÿ´$þø´%ÿÁ´&ÿ·´'ÿÁ´)ÿÁ´*ÿ·´+ÿÁ´-ÿÁ´.ÿÁ´/ÿÁ´2ÿ·´3ÿÁ´4ÿ·´5ÿÁ´7´9´:´;ÿˆ´<´=ÿÜ´Iÿ·´Qÿ´Rÿk´Uÿ´Yÿ·´Zÿ·´\ÿ·´bþø´dÿ·´gÿ·´xÿ´yÿk´zÿk´{ÿk´|ÿk´}ÿk´‰ÿÁ´þ}´­þø´®þø´¯ÿ·´ºÿ·´»´Çþø´Éþø´Ðÿ·´Ñÿ·´Òÿ·´åÿÜ´éÿ·´ê´ëÿ·´ìÿÁ´öÿ·´ûÿ·´ýÿ·ºÿܺþܺÿkº©ÿܺªÿܺ´ºµºÅþÓ»ÿ »þa»þð»$ÿa»&ÿ»2ÿ»Dþæ»Hþð»Lÿ·»Rþð»Xÿ»bÿa»dÿ»gÿ»iþæ»jþæ»kþæ»lþæ»mþæ»nþæ»pþð»qþð»rþð»sþð»yþð»zþð»{þð»|þð»}þð»~ÿ»ÿ»€ÿ»ÿ»©ÿ»ªÿk»­ÿa»®ÿa»¯ÿ»´ÿ»µÿÜ»Åþø»Çÿa»Éÿa»Ðÿ»Ñÿ»Òÿ»ûÿ»ýÿÅ$&Å%ÿ·Å&ÿÅ'ÿ·Å)ÿ·Å*ÿ·Å+ÿ·Å-/Å.ÿ·Å/ÿ·Å2ÿÅ3ÿ·Å4ÿÅ5ÿ·Å7þæÅ9þˆÅ:ÿÅ;ÿ·Å<þˆÅ=ÅIÿÜÅQÿ·ÅRÿ·ÅUÿ·ÅYÿÅZÿ<Å\ÿÅb&ÅdÿÅgÿÅxÿ·Åyÿ·Åzÿ·Å{ÿ·Å|ÿ·Å}ÿ·Å‰ÿ·Å&Å­&Å®&ůÿźÿÅ»þˆÅÇ&ÅÉ&ÅÐÿÅÑÿÅÒÿÅåÅéÿ·ÅêþˆÅëÿÅìÿ·Åöÿ·ÅûÿÅýÿÇÿÓÇÿÜÇÿÜÇ$9Ç&ÿÜÇ*ÿÜÇ2ÿÜÇ4ÿÜÇ6Ç7ÿaÇ8Ç9ÿ}Ç:ÿÇ;Ç<ÿaÇFÿÜÇGÿÜÇHÿÜÇIÿ·ÇRÿÜÇTÿÜÇWÿÜÇXÇYÿˆÇZÿ­Ç\ÿuÇb9ÇdÿÜÇgÿÜÇhÇoÿÜÇpÿÜÇqÿÜÇrÿÜÇsÿÜÇyÿÜÇzÿÜÇ{ÿÜÇ|ÿÜÇ}ÿÜÇ~ÇÇ€ÇÇ©ÿ·ÇªÇ­9Ç®9ǯÿÜÇ´þøÇµÿǺÿuÇ»ÿaÇÅ/ÇÇ9ÇÉ9ÇÐÿÜÇÑÿÜÇÒÿÜÇÓÇÔÇÕÇãÇêÿaÇëÿuÇöÿÜÇùÇûÿÜÇüÿÜÇýÿÜÇþÿÜÉÿÓÉÿÜÉÿÜÉ$9É&ÿÜÉ*ÿÜÉ2ÿÜÉ4ÿÜÉ6É7ÿaÉ8É9ÿ}É:ÿÉ;É<ÿaÉFÿÜÉGÿÜÉHÿÜÉIÿ·ÉRÿÜÉTÿÜÉWÿÜÉXÉYÿˆÉZÿ­É\ÿuÉb9ÉdÿÜÉgÿÜÉhÉoÿÜÉpÿÜÉqÿÜÉrÿÜÉsÿÜÉyÿÜÉzÿÜÉ{ÿÜÉ|ÿÜÉ}ÿÜÉ~ÉÉ€ÉÉ©ÿ·ÉªÉ­9É®9ɯÿÜÉ´þøÉµÿɺÿuÉ»ÿaÉÅ/ÉÇ9ÉÉ9ÉÐÿÜÉÑÿÜÉÒÿÜÉÓÉÔÉÕÉãÉêÿaÉëÿuÉöÿÜÉùÉûÿÜÉüÿÜÉýÿÜÉþÿÜÐ9Ðÿ­ÐÿÜÐ$ÿÜÐ9ÿÜÐ;ÿ}Ð<ÿÐbÿÜЩÿÜЪЭÿÜЮÿÜдÿÓеÿÜлÿÐÅÿDÐÇÿÜÐÉÿÜÐêÿÑ9Ñÿ­ÑÿÜÑ$ÿÜÑ9ÿÜÑ;ÿ}Ñ<ÿÑbÿÜÑ©ÿÜѪѭÿÜÑ®ÿÜÑ´ÿÓѵÿÜÑ»ÿÑÅÿDÑÇÿÜÑÉÿÜÑêÿÒ9Òÿ­ÒÿÜÒ$ÿÜÒ9ÿÜÒ;ÿ}Ò<ÿÒbÿÜÒ©ÿÜÒªÒ­ÿÜÒ®ÿÜÒ´ÿÓÒµÿÜÒ»ÿÒÅÿDÒÇÿÜÒÉÿÜÒêÿÓ$Ó-Ó=ÿÜÓbÓ­Ó®ÓÇÓÉÓåÿÜÔ$Ô-Ô=ÿÜÔbÔ­Ô®ÔÇÔÉÔåÿÜÕ$Õ-Õ=ÿÜÕbÕ­Õ®ÕÇÕÉÕåÿÜã$&ã&ã*ã2ã4ã6ãb&ãdãgã­&ã®&ã¯ãÇ&ãÉ&ãÐãÑãÒãããöãùãûãýåÿÜå©åªå´ÿÜåµÿÜåÅÿÜéé©éªé´ÿ¤éµÿéÅÿ·êÿ êþaêþðê$ÿaê&ÿê2ÿêDþæêHþðêLÿ·êRþðêXÿêbÿaêdÿêgÿêiþæêjþæêkþæêlþæêmþæênþæêpþðêqþðêrþðêsþðêyþðêzþðê{þðê|þðê}þðê~ÿêÿê€ÿêÿê©ÿêªÿkê­ÿaê®ÿaê¯ÿê´ÿêµÿÜêÅþøêÇÿaêÉÿaêÐÿêÑÿêÒÿêûÿêýÿëÿÜëþÜëÿkë©ÿÜëªÿÜë´ëµëÅþÓììÿkìÿ·ì©ìªì´ÿÜìµìÅÿDöö$ö7ÿ·ö:ö<ÿšöbö©ÿÜöªÿÜö­ö®ö´ÿÓöµÿÓö»ÿšöÅÿÉöÇöÉöêÿšù$&ù&ù*ù2ù4ù6ùb&ùdùgù­&ù®&ù¯ùÇ&ùÉ&ùÐùÑùÒùãùöùùùûùýûû$û6û<ÿÜûbû©ÿÜûªÿÜû­û®û´ûµ&û»ÿÜûÅûÇûÉûãûêÿÜûùýý$ý6ý<ÿÜýbý©ÿÜýªÿÜý­ý®ý´ýµ&ý»ÿÜýÅýÇýÉýãýêÿÜýù MB@hmþ ¼þ‰þ‰ L GÌþBGÌSf €¯ JBits@ ûþšmãB±‹`#cÕVeraSansÿÿÿÿ6ÿÿþ628R00@                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        "                      "       #                       #     $               $    &              &    ÿÿ P ì_<õº¹ð¸ºÂg‘þ‰þ Lmmupen64plus-core-src-2.5/data/mupen64plus.ini000066400000000000000000014446011251723631200211250ustar00rootroot00000000000000; Mupen64Plus Rom Catalog ; Generated by M64P_INICreater.php ; Script coded by: okaygo ; ; Total Rom Count: 3048 ; Fri, 06 Jun 08 23:13:38 -0400 [34AB1DEA3111A233A8B5C5679DE22E83] GoodName=007 - The World is Not Enough (E) (M3) [!] CRC=3B941695 F90A5EEB SaveType=Controller Pack Status=1 Rumble=Yes Players=4 [9D58996A8AA91263B5CD45C385F45FE4] GoodName=007 - The World is Not Enough (U) [!] CRC=033F4C13 319EE7A7 SaveType=Controller Pack Status=1 Rumble=Yes Players=4 [0846FFFDA3081821EA0DCBB7D4DEAAA3] GoodName=007 - The World is Not Enough (U) [t1] CRC=5B6AC01B 8D1A562A RefMD5=9D58996A8AA91263B5CD45C385F45FE4 [1D86AE43FF88E4583C8161815577F1CD] GoodName=007 - The World is Not Enough (U) [t1][f1] (PAL-NTSC) CRC=5B6AC01B 8D1A562A RefMD5=9D58996A8AA91263B5CD45C385F45FE4 [632C98CF281CDA776E66685B278A4FA6] GoodName=1080 Snowboarding (E) (M4) [!] CRC=58FD3F25 D92EAA8D SaveType=SRAM Status=2 Players=2 Rumble=Yes [4E08D29B094C13C030AC73A1DA2F8CD2] GoodName=1080 Snowboarding (E) (M4) [b1] CRC=6BB11645 2C6F637E RefMD5=632C98CF281CDA776E66685B278A4FA6 [4FCA132D6C96130371F4186A3DF85077] GoodName=1080 Snowboarding (E) (M4) [b1][f2] (NTSC) CRC=58FD3F25 D92EAA8D RefMD5=632C98CF281CDA776E66685B278A4FA6 [EC9DB32624B6C16376429D0660F0710B] GoodName=1080 Snowboarding (E) (M4) [f1] CRC=AF61F386 29F1112C RefMD5=632C98CF281CDA776E66685B278A4FA6 [5CA3A45C21E16EDAFBAFE1BD0491DC8D] GoodName=1080 Snowboarding (E) (M4) [f2] (NTSC) CRC=93C5ED78 F67E8528 RefMD5=632C98CF281CDA776E66685B278A4FA6 [FA27089C425DBAB99F19245C5C997613] GoodName=1080 Snowboarding (JU) (M2) [!] CRC=1FBAF161 2C1C54F1 SaveType=SRAM Status=2 Players=2 Rumble=Yes [E428181D573E25DCC0DC7F9F3BF4D1E1] GoodName=1080 Snowboarding (JU) (M2) [b1] CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [A3D30FBDFD84B5E7298568BBD5CED7FD] GoodName=1080 Snowboarding (JU) (M2) [b2] CRC=1FBAF161 2C1C54F1 RefMD5=FA27089C425DBAB99F19245C5C997613 [FE15A6E7AF4E37487252369D6F0AB35B] GoodName=1080 Snowboarding (JU) (M2) [b3] CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [7657C4BB92E3F6F126D94F5942FDB445] GoodName=1080 Snowboarding (JU) (M2) [b4] CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [C7AC7460AF3897BB38D6745BC4557C8E] GoodName=1080 Snowboarding (JU) (M2) [b5] CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [FE320327CF6EDC64D06BFA56D8E7A085] GoodName=1080 Snowboarding (JU) (M2) [b6] CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [C36AC032E36C61723698344C33DC1F7E] GoodName=1080 Snowboarding (JU) (M2) [b7] CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [DAFE880CEF56AF0231EBA2390259A2AC] GoodName=1080 Snowboarding (JU) (M2) [b8] CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [A0B2E39FD3FE3802C369A6937416B38E] GoodName=1080 Snowboarding (JU) (M2) [b9] CRC=1FBAF161 2C1C54F1 RefMD5=FA27089C425DBAB99F19245C5C997613 [2C6A75570997BA7A1244950AC8FE6CBF] GoodName=1080 Snowboarding (JU) (M2) [ba] CRC=35F53383 0C8D0AE4 RefMD5=FA27089C425DBAB99F19245C5C997613 [3B5691B895B415056E4EA69695DC26B4] GoodName=1080 Snowboarding (JU) (M2) [f1] (DS-1) CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [6CEACF73F03BA3DE740BDB00D7CC18A1] GoodName=1080 Snowboarding (JU) (M2) [f2] (PAL) CRC=9207357A E85D4001 RefMD5=FA27089C425DBAB99F19245C5C997613 [765DC057507AA32DAAEC194E32FF26B1] GoodName=1080 Snowboarding (JU) (M2) [f2][b1] CRC=1FBAF161 2C1C54F1 RefMD5=FA27089C425DBAB99F19245C5C997613 [1ED9C697BD2F2AEBE6B3B8BF0D24A8CA] GoodName=1080 Snowboarding (JU) (M2) [f3][t1] CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [C70578054AA00D7F95AE1D64E3AA9995] GoodName=1080 Snowboarding (JU) (M2) [f3][t2] (All Levels) CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [00CE20766866883063AF3A6C3368039F] GoodName=1080 Snowboarding (JU) (M2) [f4] (PAL-Z64) CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [AEE3FA928B2C1B73D841B47074D91C71] GoodName=1080 Snowboarding (JU) (M2) [f5] (SRAM) CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [B5AC31D584BB2EF93C2A229E19B6D9A1] GoodName=1080 Snowboarding (JU) (M2) [h1C] CRC=35F53383 0C8D0AE4 RefMD5=FA27089C425DBAB99F19245C5C997613 [136245692E02003ED1A972F424CD9323] GoodName=1080 Snowboarding (JU) (M2) [h2C] CRC=92072A84 275952F8 RefMD5=FA27089C425DBAB99F19245C5C997613 [EC4458443FBA0F09B8593AC5ED114C26] GoodName=1964 Demo by Steb (PD) CRC=5C450380 4B5CB6E6 [E76EA30A71F9DC19C6502591FA7CB8E2] GoodName=2 Blokes & An Armchair - Nintendo 64 Remix Remix by Tesko (PD) [f1] CRC=04815914 87141455 [B05E10857A76AB70A83017ADDE8A8ACC] GoodName=2 Blokes & An Armchair - Nintendo 64 Remix Remix by Tesko (PD) CRC=04815914 87141455 [8BEC4EDFA1446859DA896E4EBAE8F925] GoodName=3DS Model Conversion by Snake (PD) CRC=4C304819 2CBE7573 Players=0 Rumble=No Status=4 SaveType=None [DF6BC38C3D0C722DADD4EEDB5DFCE305] GoodName=3DS Model Conversion by Snake (PD) [h1C] CRC=4C304819 2CBE7573 RefMD5=8BEC4EDFA1446859DA896E4EBAE8F925 [0A5ACFEA0C7CF68AE25202040D5AD1EB] GoodName=40 Winks (U) (M3) [!] CRC=ABA51D09 C668BAD9 [66335F4DC6AB27034398BC26F263B897] GoodName=64 Hanafuda - Tenshi no Yakusoku (J) [!] CRC=36F22FBF 318912F2 Players=1 Rumble=No SaveType=Eeprom 4KB Status=5 [2CF9EDB51ADA9DE2AE7AD9FD5ACC5580] GoodName=64 Oozumou (J) [!] CRC=9C961069 F5EA488D Players=4 SaveType=None Status=5 Rumble=No CountPerOp=1 [88763C3FD50E036BBB9CF504F77C0741] GoodName=64 Oozumou (J) [b1] CRC=9C961069 F5EA488D RefMD5=2CF9EDB51ADA9DE2AE7AD9FD5ACC5580 [9A737609D5A7565589DA44381C476FD3] GoodName=64 Oozumou (J) [b2] CRC=9C961069 F5EA488D RefMD5=2CF9EDB51ADA9DE2AE7AD9FD5ACC5580 [CD4F6C55A7567A25954908DF613B236F] GoodName=64 Oozumou (J) [b3] CRC=9C961069 F5EA488D RefMD5=2CF9EDB51ADA9DE2AE7AD9FD5ACC5580 [F7C796371E77E0A6FBD02EB866341952] GoodName=64 Oozumou 2 (J) [!] CRC=85C18B16 DF9622AF Players=4 SaveType=None Rumble=No Status=5 [6B947F654775CF5DACD1E5D53D577DA7] GoodName=64 Trump Collection - Alice no Wakuwaku Trump World (J) [!] CRC=7A6081FC FF8F7A78 Players=4 SaveType=Eeprom 4KB Rumble=No Status=5 [2C6FDCF4A6A6614D09224EFAA55FB531] GoodName=64 Trump Collection - Alice no Wakuwaku Trump World (J) [h1C] CRC=7A6081FC FF8F7A78 RefMD5=6B947F654775CF5DACD1E5D53D577DA7 [EA6A92DE5A221A00814F7448BF6F1B31] GoodName=64 de Hakken!! Tamagotchi Minna de Tamagotchi World (J) [!] CRC=B98BA456 5B2B76AF Rumble=Yes Players=4 Status=2 SaveType=Eeprom 4KB CountPerOp=1 [11B20CFE8E3ECCC680AA8157A7906D6D] GoodName=64 de Hakken!! Tamagotchi Minna de Tamagotchi World (J) [b1] CRC=B98BA456 5B2B76AF RefMD5=EA6A92DE5A221A00814F7448BF6F1B31 [D8F6D887B94BA913EF60A0B03F781AE6] GoodName=64 de Hakken!! Tamagotchi Minna de Tamagotchi World (J) [h1C] CRC=B98BA456 5B2B76AF RefMD5=EA6A92DE5A221A00814F7448BF6F1B31 [326BF85C5EF158205364710454EE1AF1] GoodName=64 de Hakken!! Tamagotchi Minna de Tamagotchi World (J) [h2C] CRC=B98BA456 5B2B76AF RefMD5=EA6A92DE5A221A00814F7448BF6F1B31 [11B891B7551BFBDB79732BFB94B45603] GoodName=64 de Hakken!! Tamagotchi Minna de Tamagotchi World (J) [o1] CRC=B98BA456 5B2B76AF RefMD5=EA6A92DE5A221A00814F7448BF6F1B31 [14E8E1761B8994C54B304418CEA49773] GoodName=77a Special Edition by Count0 (PD) CRC=975B7845 A2505C18 Players=2 Status=1 Rumble=No SaveType=Eeprom 16KB [45C610FC443D0DF07ED9F07AC8B7C54A] GoodName=77a Special Edition by Count0 (PD) [b1] CRC=975B7845 A2505C18 RefMD5=14E8E1761B8994C54B304418CEA49773 [7D6AC6295EF6A0ABB3D4594AF407B7A6] GoodName=77a by Count0 (POM '98) (PD) CRC=D6D29529 D4EADEE4 Players=2 Status=1 Rumble=No SaveType=None [A8426180C65A4C9DD1DF9FD033DDCBB6] GoodName=77a by Count0 (POM '98) (PD) [b1] CRC=D6D29529 D4EADEE4 RefMD5=7D6AC6295EF6A0ABB3D4594AF407B7A6 [4A5C509A20DB7A429DC1DD4E219AD4A2] GoodName=AI Shougi 3 (J) [!] Players=4 Status=1 SaveType=Eeprom 4KB CRC=8CC182A6 C2D0CAB0 [D9FE93EBA610E60F8F5D9880E52DB056] GoodName=Absolute Crap #2 by Lem (PD) Status=3 Players=0 SaveType=None Rumble=No CRC=2E7E893C 4E68B642 [9E59882163EA99A45629B9B8B491D86B] GoodName=Absolute Crap #2 by Lem (PD) [b1] CRC=2E7E893C 4E68B642 RefMD5=D9FE93EBA610E60F8F5D9880E52DB056 [D5F73BB1FC46328440C3BD9812A49284] GoodName=Absolute Crap #2 by Lem (PD) [b2] CRC=2E7E893C 4E68B642 RefMD5=D9FE93EBA610E60F8F5D9880E52DB056 [2F02D478FC89E46FA143B128E29B434C] GoodName=Absolute Crap Intro #1 by Kid Stardust (PD) [b1] CRC=B0667DED BB39A4B8 RefMD5=FF4D4FEFF0AF8A0F9B9AE509DA7D9071 [E06A7190B2DF9CCCCA30C1724DDFE95B] GoodName=Absolute Crap Intro #1 by Kid Stardust (PD) [h1C] CRC=B0667DED BB39A4B8 RefMD5=FF4D4FEFF0AF8A0F9B9AE509DA7D9071 [FF4D4FEFF0AF8A0F9B9AE509DA7D9071] GoodName=Absolute Crap Intro #1 by Kid Stardust (PD) CRC=B0667DED BB39A4B8 Players=0 Status=5 Rumble=No SaveType=None [35BA407EA9E4EF7C0ACE8B4F58BEEC41] GoodName=Action Replay Pro 64 V3.0 (Unl) CRC=F1297BC9 42CDAE9D Status=0 [0D77918E6C989261EEF81FE244E48EEF] GoodName=Action Replay Pro 64 V3.0 (Unl) [b1] CRC=158A155D C1538CDB RefMD5=35BA407EA9E4EF7C0ACE8B4F58BEEC41 [FD8681CBF1A599FF2EA55DBF40EA7D27] GoodName=Action Replay Pro 64 V3.0 (Unl) [f1] CRC=8A155D15 53C1DB8C RefMD5=35BA407EA9E4EF7C0ACE8B4F58BEEC41 [67AFA5DF80A5CFC91FCE1DC918EA0A4F] GoodName=Action Replay Pro 64 V3.3 (Unl) CRC=A8D1DAF2 31206B53 Status=0 [7558E3DA7225712936D3BA3DCE210C36] GoodName=AeroFighters Assault (E) (M3) [!] CRC=62F6BE95 F102D6D6 Players=4 SaveType=Eeprom 4KB Rumble=Yes Status=3 [915E7762364C2449AAEBC4CA5278D1E8] GoodName=AeroFighters Assault (E) (M3) [f1] (NTSC) CRC=0BBCDFCF 2DD952CC RefMD5=7558E3DA7225712936D3BA3DCE210C36 [6C25C8D7CE393C0214917A211A199F0C] GoodName=AeroFighters Assault (E) (M3) [o1] CRC=62F6BE95 F102D6D6 RefMD5=7558E3DA7225712936D3BA3DCE210C36 [79FB6E2452AF077C5EF1DDE5FC810F04] GoodName=AeroFighters Assault (U) [!] CRC=1B598BF1 ECA29B45 Players=4 SaveType=Eeprom 4KB Rumble=Yes Status=3 [CF5FF92EED5FD3C714BC3C4D15C47AE3] GoodName=AeroFighters Assault (U) [b1] CRC=1B598BF1 ECA29B45 RefMD5=79FB6E2452AF077C5EF1DDE5FC810F04 [7E3E9BC4188B37A4FC283E22BEDB5D49] GoodName=AeroFighters Assault (U) [b2] CRC=1B598BF1 ECA29B45 RefMD5=79FB6E2452AF077C5EF1DDE5FC810F04 [48522CCF3D059DDF2DCF5D6AEE2D1FD7] GoodName=AeroFighters Assault (U) [b3] CRC=1B598BF1 ECA29B45 RefMD5=79FB6E2452AF077C5EF1DDE5FC810F04 [24CA46D2C8E2D68978AEAE46C3862F1E] GoodName=AeroFighters Assault (U) [f1] (PAL) CRC=5C4EB1C9 12A49603 RefMD5=79FB6E2452AF077C5EF1DDE5FC810F04 [0635FE16018BB216E5CD29C300CADC74] GoodName=AeroFighters Assault (U) [h1C] CRC=1B598BF1 ECA29B45 RefMD5=79FB6E2452AF077C5EF1DDE5FC810F04 [6A56589EC8FADD1139EC4B6EED9D19AE] GoodName=AeroFighters Assault (U) [h2C] CRC=1B598BF1 ECA29B45 RefMD5=79FB6E2452AF077C5EF1DDE5FC810F04 [63657276E7256DCA562F024FC71F4A47] GoodName=AeroFighters Assault (U) [h3C] CRC=1B598BF1 ECA29B45 RefMD5=79FB6E2452AF077C5EF1DDE5FC810F04 [05056045447BF1FBA8F9878A7F6009F3] GoodName=AeroGauge (E) (M3) [!] CRC=D83045C8 F29D3A36 Players=4 SaveType=Controller Pack Rumble=No Status=4 [FD979768AC0EC6CBBCA8C5339D62BB05] GoodName=AeroGauge (E) (M3) [f1] (NTSC) CRC=440355A4 869CE5F9 RefMD5=05056045447BF1FBA8F9878A7F6009F3 [E0256E4270887B99DA7E91A620FFEFF3] GoodName=AeroGauge (E) (M3) [h1C] CRC=D83045C8 F29D3A36 RefMD5=05056045447BF1FBA8F9878A7F6009F3 [25D19487CB80DB724DB9D735F2C28E8B] GoodName=AeroGauge (E) (M3) [h2C] CRC=D83045C8 F29D3A36 RefMD5=05056045447BF1FBA8F9878A7F6009F3 [E970AF3DE25BB5AE1154010E26AF776F] GoodName=AeroGauge (J) (V1.0) (Kiosk Demo) [!] CRC=B00903C9 3916C146 [6A52188E8A7D008F1921AA8A6D40A74C] GoodName=AeroGauge (J) (V1.0) (Kiosk Demo) [b1] CRC=3F47EEA0 5DDF7A3C [5AB4773BB270BE3A72BB79EF68DEA414] GoodName=AeroGauge (J) (V1.0) (Kiosk Demo) [b2] CRC=B00903C9 3916C146 [13CCAA36D309B78D20C9C0C89A8CE650] GoodName=AeroGauge (J) (V1.0) (Kiosk Demo) [b3] CRC=B00903C9 3916C146 [AC5828BA750A4DCDC840050DE66305E2] GoodName=AeroGauge (J) (V1.0) (Kiosk Demo) [b4] CRC=3F47EEA0 5DDF7A3C [0620C2D134A0430F4AFA208FFEDA67B8] GoodName=AeroGauge (J) (V1.1) [!] CRC=80F41131 384645F6 Players=4 SaveType=Controller Pack Rumble=No Status=4 [CC8C56B4E37BC5A501087E7CE8C12CC5] GoodName=AeroGauge (J) (V1.1) [b1] CRC=80F41131 384645F6 RefMD5=0620C2D134A0430F4AFA208FFEDA67B8 [426725BFE1A505D4C3B12862188A2526] GoodName=AeroGauge (J) (V1.1) [b2] RefMD5=0620C2D134A0430F4AFA208FFEDA67B8 CRC=80F41131 384645F6 [A74429738648C96FAB23944CCB06AA6C] GoodName=AeroGauge (J) (V1.1) [b3] RefMD5=0620C2D134A0430F4AFA208FFEDA67B8 CRC=80F41131 384645F6 [E38C4D24254BB3CB6C9EC75CD29A6566] GoodName=AeroGauge (J) (V1.1) [b4] RefMD5=0620C2D134A0430F4AFA208FFEDA67B8 CRC=80F41131 384645F6 [E80AD38B3139CBA5A367CB9B0B21AAFA] GoodName=AeroGauge (J) (V1.1) [b5] RefMD5=0620C2D134A0430F4AFA208FFEDA67B8 CRC=80F41131 384645F6 [CDCB7101471DD1129DF63D6076834337] GoodName=AeroGauge (J) (V1.1) [b6] RefMD5=0620C2D134A0430F4AFA208FFEDA67B8 CRC=80F41131 384645F6 [AB36ED30033F4101D3F660951A568413] GoodName=AeroGauge (J) (V1.1) [b7] RefMD5=0620C2D134A0430F4AFA208FFEDA67B8 CRC=80F41131 384645F6 [9D7DAD00EAAC504D459608AB30CB0C1E] GoodName=AeroGauge (J) (V1.1) [f1] (PAL) CRC=4795217F 63D42538 [72C7FFCEA6C1430616867616F5E9D51A] GoodName=AeroGauge (U) [!] CRC=AEBE463E CC71464B Players=4 SaveType=Controller Pack Status=4 [B8BA26F0C27253B80E5C7D96B0FB66AB] GoodName=AeroGauge (U) [T+Ita0.01_Cattivik66] CRC=AEBE463E CC71464B RefMD5=72C7FFCEA6C1430616867616F5E9D51A [3D6C792ED4FA3CE5C92013F15BCCD327] GoodName=AeroGauge (U) [b1] CRC=AEBE463E CC71464B RefMD5=72C7FFCEA6C1430616867616F5E9D51A [B7DB0D2CDCAB307D744B6370F1BBA9C1] GoodName=AeroGauge (U) [f1] (PAL) CRC=FDAA963C FDCCD971 [11BE82186C64EF407B28403D49B199DB] GoodName=AeroGauge (U) [h1C] CRC=AEBE463E CC71464B RefMD5=72C7FFCEA6C1430616867616F5E9D51A [31E739E6420DA88ABF4980AD0C76439A] GoodName=AeroGauge (U) [h2C] CRC=AEBE463E CC71464B RefMD5=72C7FFCEA6C1430616867616F5E9D51A [54D0A39123C15F74AABB1ECC24D4D6A0] GoodName=Aidyn Chronicles - The First Mage (E) [!] CRC=2DC4FFCC C8FF5A21 Players=1 SaveType=Controller Pack Status=3 [AF149336B3DDB899598E7BE8740D7DC6] GoodName=Aidyn Chronicles - The First Mage (U) [!] CRC=E6A95A4F BAD2EA23 Players=1 SaveType=Controller Pack Status=3 [31448B07CBC932018870F71D1254E317] GoodName=Aidyn Chronicles - The First Mage (U) [o1] CRC=E6A95A4F BAD2EA23 RefMD5=AF149336B3DDB899598E7BE8740D7DC6 [E8891F8F498A615A6CBAF75B7DDC9FA6] GoodName=Airboarder 64 (E) [!] CRC=27C425D0 8C2D99C1 Players=4 SaveType=Controller Pack Status=4 Rumble=Yes CountPerOp=1 [DCFB92A4B106FE61E54579B1D3B7336E] GoodName=Airboarder 64 (E) [f1] (NTSC) CRC=89A498AE DE3CD49A RefMD5=E8891F8F498A615A6CBAF75B7DDC9FA6 [A0EE7484500178BAB44FDE0AF6D5748F] GoodName=Airboarder 64 (E) [h1C] CRC=27C425D0 8C2D99C1 RefMD5=E8891F8F498A615A6CBAF75B7DDC9FA6 [CCEE2FCF38DC2200128D75D15DB53283] GoodName=Airboarder 64 (J) [!] CRC=6C45B60C DCE50E30 Players=4 Status=4 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [F558165311C9CDCA73FB089E298F2056] GoodName=Airboarder 64 (J) [b1] CRC=6C45B60C DCE50E30 RefMD5=CCEE2FCF38DC2200128D75D15DB53283 [62B005D0E9DAE96526443498D6420EC3] GoodName=Airboarder 64 (J) [b1][t1] CRC=F255D6F1 B65D6728 RefMD5=CCEE2FCF38DC2200128D75D15DB53283 [C429FE5C86F14764923F08D44884C823] GoodName=Airboarder 64 (J) [b2] CRC=F255D6F1 B65D6728 RefMD5=CCEE2FCF38DC2200128D75D15DB53283 [16CB66DD44F7A46EEAC5FFCB38FBE26B] GoodName=Airboarder 64 (J) [b3] CRC=6C45B60C DCE50E30 RefMD5=CCEE2FCF38DC2200128D75D15DB53283 [278EF4B79B3544DE327CF7DBCDD60081] GoodName=Airboarder 64 (J) [f1] (PAL) CRC=26809B20 39A516A4 RefMD5=CCEE2FCF38DC2200128D75D15DB53283 [C02C32351BD69CB2D3FAC355BE074DC0] GoodName=Airboarder 64 (J) [h1C] CRC=6C45B60C DCE50E30 RefMD5=CCEE2FCF38DC2200128D75D15DB53283 [78CABB696CA4847BFAD09B01257C6FDA] GoodName=Airboarder 64 (J) [h2C] CRC=6C45B60C DCE50E30 RefMD5=CCEE2FCF38DC2200128D75D15DB53283 [B6894826F5386019B19F0A775D11B042] GoodName=Airboarder 64 (J) [h3C] CRC=6C45B60C DCE50E30 RefMD5=CCEE2FCF38DC2200128D75D15DB53283 [F9027DF3909C849CBADDAB1C1468BACC] GoodName=Airboarder 64 (J) [h4C] CRC=6C45B60C DCE50E30 RefMD5=CCEE2FCF38DC2200128D75D15DB53283 [41BE85236052A2E8EED144989B0A3E0A] GoodName=Airboarder 64 (J) [h5C] CRC=F255D6F1 B65D6728 RefMD5=CCEE2FCF38DC2200128D75D15DB53283 [037B58EE5FB4F3BFF408EE406E3539C0] GoodName=Airboarder 64 (J) [h6C] CRC=6C45B60C DCE50E30 RefMD5=CCEE2FCF38DC2200128D75D15DB53283 [63F850D7CC829B287FF1DC61CA3F7CCA] GoodName=Airboarder 64 (J) [t1] CRC=F255D6F1 B65D6728 RefMD5=CCEE2FCF38DC2200128D75D15DB53283 [256A1CB23F9E1A2762A7A171417B5D68] GoodName=Akumajou Dracula Mokushiroku - Real Action Adventure (J) [!] CRC=B6951A94 63C849AF [47EA239717C4D225C9D0E9FD37B9FCB3] GoodName=Akumajou Dracula Mokushiroku Gaiden - Legend of Cornell (J) [!] CRC=A5533106 B9F25E5B [ECD127A57E25CE8514307BB47ECC1E95] GoodName=Alienstyle Intro by Renderman (PD) [a1] CRC=43EFB5BB D8C62E2B Players=0 Status=5 SaveType=None Rumble=No [232A5DC2E98C6CAB1D9F73C1D1C1C73A] GoodName=Alienstyle Intro by Renderman (PD) CRC=888EEC7A 42361983 Players=0 Status=5 SaveType=None Rumble=No [E3F4C868917A12BD5E84D94D1C260C7D] GoodName=All Star Tennis '99 (E) (M5) [!] CRC=DFD784AD AE426603 Players=4 SaveType=Eeprom 4KB Status=4 [4DC614B1022252F41E4E182249FA7BAA] GoodName=All Star Tennis '99 (E) (M5) [f1] (NTSC) CRC=3015A8AD 8CEAF5F8 RefMD5=E3F4C868917A12BD5E84D94D1C260C7D [37962CB6D58C2D6B044EAECDCF70EC09] GoodName=All Star Tennis '99 (E) (M5) [f2] (NTSC) CRC=6FD0035D 371B785D RefMD5=E3F4C868917A12BD5E84D94D1C260C7D [E034C969BCDC2E8DBE2C8A73BED57B53] GoodName=All Star Tennis '99 (E) (M5) [f3] (NTSC) CRC=2E341C3D 5AC8DEA3 RefMD5=E3F4C868917A12BD5E84D94D1C260C7D [7FB6422E5BBF60FEE39651EFF3F79BAB] GoodName=All Star Tennis '99 (E) (M5) [f4] (NTSC) CRC=F3700A53 4795C23D RefMD5=E3F4C868917A12BD5E84D94D1C260C7D [AFC3DC9BB737D81903F6CE4875B63AE9] GoodName=All Star Tennis '99 (U) [!] CRC=E185E291 4E50766D Players=4 SaveType=Eeprom 4KB Status=4 [A90FE01FDAFFB70DD123C0BA04589FAA] GoodName=All Star Tennis '99 (U) [T+Bra1.0_Guto] CRC=E185E291 4E50766D RefMD5=AFC3DC9BB737D81903F6CE4875B63AE9 [A2FA12A1DEFCB152DFD04E82968C7D3A] GoodName=All Star Tennis '99 (U) [f1] (PAL) CRC=2D56F77B CBE813FC RefMD5=AFC3DC9BB737D81903F6CE4875B63AE9 [D341A40EA9FBE95B6F0F99DFC5901FB7] GoodName=All Star Tennis '99 (U) [f2] (PAL) CRC=35D13E0D E8652252 RefMD5=AFC3DC9BB737D81903F6CE4875B63AE9 [953B00882A99D650E1F2817674595F0B] GoodName=All Star Tennis '99 (U) [h1C] CRC=E185E291 4E50766D RefMD5=AFC3DC9BB737D81903F6CE4875B63AE9 [ED5F1E12DA36DBEC8A0A24ED98D4AED5] GoodName=All-Star Baseball '99 (E) [!] CRC=D9EDD54D 6BB8E274 Players=4 SaveType=Controller Pack Rumble=Yes Status=3 [78551D23F230B58B9F449CDB4A285761] GoodName=All-Star Baseball '99 (U) [!] CRC=C43E23A7 40B1681A Players=4 SaveType=Controller Pack Status=3 Rumble=Yes [045E0B801F70ADE69981FCBB2EDE5376] GoodName=All-Star Baseball '99 (U) [f1] (PAL) CRC=A6421764 ED1A13E9 RefMD5=78551D23F230B58B9F449CDB4A285761 [13B5AE646CC09876D64366BB07796C78] GoodName=All-Star Baseball '99 (U) [o1] CRC=C43E23A7 40B1681A RefMD5=78551D23F230B58B9F449CDB4A285761 [90448C4175EE9D0247674474DCABDFED] GoodName=All-Star Baseball 2000 (E) [!] CRC=A19F8089 77884B51 Players=4 SaveType=Controller Pack Rumble=Yes Status=0 [E4076E07DBDA9CEAB5EDCEF4D4648EAB] GoodName=All-Star Baseball 2000 (E) [f1] (NTSC) CRC=581900E5 8E662FC8 RefMD5=90448C4175EE9D0247674474DCABDFED [AADA358CE97F06C4DF5BF55987268844] GoodName=All-Star Baseball 2000 (U) [!] CRC=5E547A4D 90E60795 RefMD5=90448C4175EE9D0247674474DCABDFED [5D29C01B96A738C3EB68254EF40552F3] GoodName=All-Star Baseball 2000 (U) [f1] (PAL) CRC=44127A31 6D341229 RefMD5=90448C4175EE9D0247674474DCABDFED [93B98D93275F803EF4C925BAE5FB711F] GoodName=All-Star Baseball 2000 (U) [h1C] CRC=5E547A4D 90E60795 RefMD5=90448C4175EE9D0247674474DCABDFED [07AB7C19DBE85C8CC0961BAAF3B5CA79] GoodName=All-Star Baseball 2000 (U) [h2C] CRC=5E547A4D 90E60795 RefMD5=90448C4175EE9D0247674474DCABDFED [6E01B8D425AE74EF5A0F875C700A3B18] GoodName=All-Star Baseball 2001 (U) [!] CRC=5446C6EF E18E47BB RefMD5=90448C4175EE9D0247674474DCABDFED [CD04ABC5979F22EF5D6FDC4DCFAA4D50] GoodName=All-Star Baseball 2001 (U) [f1] (PAL) CRC=993CC742 EE65D7A4 RefMD5=90448C4175EE9D0247674474DCABDFED [9BC0E3361385713BDF50F0EEBF59FFE0] GoodName=Alleycat 64 by Dosin (POM '99) (PD) CRC=306B3375 05F4E698 Players=1 Status=3 Rumble=No SaveType=None [2DCE0F6556C00B44367586FD1EEB40E5] GoodName=Alleycat 64 by Dosin (POM '99) (PD) [b1] CRC=306B3375 05F4E698 RefMD5=9BC0E3361385713BDF50F0EEBF59FFE0 [58B27AE9B41B755E4F9C503656B93A97] GoodName=Analogue Test Utility by WT_Riker (POM '99) (PD) [b1] CRC=E4C44FDA 98532F4A [25099EEB13E4FB47E390087EF6A20CBC] GoodName=Analogue Test Utility by WT_Riker (POM '99) (PD) CRC=E4C44FDA 98532F4A Players=1 SaveType=None Status=5 Rumble=No [0C2CBAFEC6F184AD39EF29B2B5E0F44A] GoodName=Armorines - Project S.W.A.R.M. (E) [!] CRC=3CC77150 21CDB987 Players=4 SaveType=Controller Pack Rumble=Yes Status=5 [0B5F909546DE5A414F2281AD0C83D9F9] GoodName=Armorines - Project S.W.A.R.M. (E) [f1] (NTSC) CRC=CCDEAF02 8AFC4B28 RefMD5=0C2CBAFEC6F184AD39EF29B2B5E0F44A [2BC48B3E6F61896B9BC7BEF5205CC49C] GoodName=Armorines - Project S.W.A.R.M. (G) [!] CRC=C0F6DB17 80E0D532 Players=4 SaveType=Controller Pack Rumble=Yes Status=5 [43C23D76E4B6B1CBFCE446DFADFB0396] GoodName=Armorines - Project S.W.A.R.M. (G) [f1] (NTSC) CRC=2CEEE754 31B69DBE RefMD5=2BC48B3E6F61896B9BC7BEF5205CC49C [6E6E7A703C131ADADDF4175E9037A2EB] GoodName=Armorines - Project S.W.A.R.M. (U) [!] CRC=1FB5D932 3BA9481B Players=4 SaveType=Controller Pack Rumble=Yes Status=5 [4C15C85280DFB003C3BE6506B217B775] GoodName=Armorines - Project S.W.A.R.M. (U) [f1] (PAL) CRC=EA090572 192F9673 RefMD5=6E6E7A703C131ADADDF4175E9037A2EB [0FDC4ACAB1B531CBB4DFB142CD630B7A] GoodName=Armorines - Project S.W.A.R.M. (U) [t1] CRC=E820670A A99ED0EF RefMD5=6E6E7A703C131ADADDF4175E9037A2EB [755DF7F57EDF87706D4C80FF15883312] GoodName=Army Men - Air Combat (U) [!] CRC=4C52BBB2 CEAB0F6B Players=4 SaveType=Controller Pack Rumble=Yes Status=3 [53E2872612760133AB7B2CC2E22B847C] GoodName=Army Men - Sarge's Heroes (E) (M3) [!] CRC=B210DF19 98B58D1A Players=4 SaveType=Controller Pack [B8085C2EDB1C6D23E52ED8C06D92B4F8] GoodName=Army Men - Sarge's Heroes (U) [!] CRC=862C0657 8DFD896D SaveType=Controller Pack Players=4 Rumble=Yes Status=4 [906D5A77188A0DC90EBF294EF8A3915E] GoodName=Army Men - Sarge's Heroes (U) [b1] CRC=D51CF20D 5534AF93 RefMD5=B8085C2EDB1C6D23E52ED8C06D92B4F8 [F1116FAEBBA932A0159B882AF9946BE6] GoodName=Army Men - Sarge's Heroes (U) [f1] (PAL) CRC=94123517 300EEA90 RefMD5=B8085C2EDB1C6D23E52ED8C06D92B4F8 [3D1C87BCF3F8AE8E55FC87A25BE4173C] GoodName=Army Men - Sarge's Heroes (U) [t1] CRC=A7507855 0D454C66 RefMD5=B8085C2EDB1C6D23E52ED8C06D92B4F8 [4E39474136C94CE25061FB6C0B473E29] GoodName=Army Men - Sarge's Heroes (U) [t2] CRC=5E23985B E3CF7CDA RefMD5=B8085C2EDB1C6D23E52ED8C06D92B4F8 [A952E495077D13C8D9587B7B8BBDE2DB] GoodName=Army Men - Sarge's Heroes (U) [t3] CRC=5E23985B E3CF7CDA RefMD5=B8085C2EDB1C6D23E52ED8C06D92B4F8 [6EEA5C4A6256092ED8F9BA8861C689C6] GoodName=Army Men - Sarge's Heroes 2 (U) [!] CRC=B20F73B6 2975FC34 Players=4 SaveType=Controller Pack Rumble=Yes Status=3 [F818FB61331122D455692C00EDB2A2FF] GoodName=Army Men - Sarge's Heroes 2 (U) [t1] CRC=B24303F4 9F7D2445 RefMD5=6EEA5C4A6256092ED8F9BA8861C689C6 [874C7B7B365D2C20AAA1A0C90C93F9B8] GoodName=Asteroids Hyper 64 (U) [!] CRC=D1F7D8AB 293B0446 Players=4 SaveType=Controller Pack Status=3 Rumble=Yes [94751FE93510EBA2D42D82269B224CF8] GoodName=Asteroids Hyper 64 (U) [o1] CRC=D1F7D8AB 293B0446 RefMD5=874C7B7B365D2C20AAA1A0C90C93F9B8 [48E6A629101B200A70873589B5D2F524] GoodName=Asteroids Hyper 64 (U) [o1][f1] (PAL) CRC=39CE39C1 04271200 RefMD5=874C7B7B365D2C20AAA1A0C90C93F9B8 [00396D6B4E66D323D4AD29833A53DF74] GoodName=Asteroids Hyper 64 (U) [o1][t1] CRC=5638C715 5EA6181D RefMD5=874C7B7B365D2C20AAA1A0C90C93F9B8 [CF63AB6AF5FBD5DBFE500DD9A658E069] GoodName=Attax64 by Pookae (POM '99) (PD) CRC=26E43C40 E11F283C Players=4 Status=3 Rumble=No SaveType=None [553037C41F9029F544353B8446BE77D9] GoodName=Attax64 by Pookae (POM '99) (PD) [b1] CRC=26E43C40 E11F283C RefMD5=CF63AB6AF5FBD5DBFE500DD9A658E069 [7853F02DC66A35BC8C2BC33D03B8F0CA] GoodName=Automobili Lamborghini (E) [!] CRC=FC7797BF 4A95E83C Players=4 SaveType=Controller Pack Rumble=Yes Status=4 [DE4631D6419B7361DE9C4A5472964D21] GoodName=Automobili Lamborghini (E) [o1] CRC=FC7797BF 4A95E83C RefMD5=7853F02DC66A35BC8C2BC33D03B8F0CA [EC39579F066A9714FF030D07DEC3C9D3] GoodName=Automobili Lamborghini (U) [!] CRC=41B25DC4 1B726786 Players=5 SaveType=Controller Pack Rumble=Yes Status=4 [E86A022815D0B7E65FD5557F0B3451D4] GoodName=Automobili Lamborghini (U) [T+Ita_cattivik66][b3] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [B293E449967B246451564B25A4A36BEC] GoodName=Automobili Lamborghini (U) [T+Ita_cattivik66][b4] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [1F324E92AF23CDC5499BBC35F3840205] GoodName=Automobili Lamborghini (U) [b1] CRC=4DB05DC4 28DBF801 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [4086114FFB03B156DBCAA0364EB0F81B] GoodName=Automobili Lamborghini (U) [b2] CRC=4DB05DC4 28DBF801 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [D861B752F59774A5597E66E8C58E52D9] GoodName=Automobili Lamborghini (U) [b3] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [B708601A36054FCA51D849D6D26CEC5C] GoodName=Automobili Lamborghini (U) [b4] CRC=DB833E34 63548286 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [0D0D6A170871ED3433A52D110B01357E] GoodName=Automobili Lamborghini (U) [b5] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [69431C0E9152A9C5B62131C034250A25] GoodName=Automobili Lamborghini (U) [b6] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [D441BB80EFD86B8FD65CE855FEC21631] GoodName=Automobili Lamborghini (U) [f1] CRC=4DB05DC4 28DBF801 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [4CEF5CDD83360127B0445E7A9EA0BC8F] GoodName=Automobili Lamborghini (U) [h1C] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [DAC77D638FF03E77F569119116D4B668] GoodName=Automobili Lamborghini (U) [h2C] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [17951444830696AAFC07F311AB128099] GoodName=Automobili Lamborghini (U) [o1] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [8FF8B861A0D095B910DD97EB1ECC02FF] GoodName=Automobili Lamborghini (U) [o1][T+Ita_cattivik66] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [87D7EEBD0E6B403A2022BBD84BC12868] GoodName=Automobili Lamborghini (U) [o2] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [805F74AEF610BA2C1F6FCEF723CD1970] GoodName=Automobili Lamborghini (U) [o3] CRC=4DB05DC4 28DBF801 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [EC9B393B3F52B76C02E3BF2AA20145A5] GoodName=Automobili Lamborghini (U) [o4] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [4E730D045AC33A64BA97D5672589C6C7] GoodName=Automobili Lamborghini (U) [o5] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [8E2F186FC1B86ABC1CC04FFE1845C6AC] GoodName=Automobili Lamborghini (U) [o6] CRC=DB833E34 63548286 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [835E98C0B8A16401BDC6653E8855F0D6] GoodName=Automobili Lamborghini (U) [o7] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [0AD7111C5DB3CA075DCD5AC9838C3B24] GoodName=Automobili Lamborghini (U) [o7][T+Ita_cattivik66] CRC=41B25DC4 1B726786 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [A6836524B4E71E5AD14DD8C3651665AD] GoodName=Automobili Lamborghini (U) [t1] CRC=DB833E34 63548286 RefMD5=EC39579F066A9714FF030D07DEC3C9D3 [3B4330445D9AAE1EF9C56B1393E281E3] GoodName=BB SRAM Manager (PD) CRC=4E5507F2 E7D3B413 [8222D1129394AB4F382476D8231EF9F6] GoodName=BMP View by Count0 (PD) CRC=273433C0 02B1F61B [8183688A4B7D0A390496B5655BCD252E] GoodName=Baku Bomberman (J) [!] CRC=E340A49C 74318D41 SaveType=Eeprom 4KB Players=4 [70415D917D5B7BEEFEDAFDB65CD64D43] GoodName=Baku Bomberman (J) [b1] CRC=E340A49C 74318D41 RefMD5=8183688A4B7D0A390496B5655BCD252E [5259F6331389F6AF55B867F60AA373C8] GoodName=Baku Bomberman (J) [h1C] CRC=E340A49C 74318D41 RefMD5=8183688A4B7D0A390496B5655BCD252E [70632EE119E54F76A344A7B04340A6F9] GoodName=Baku Bomberman (J) [t1] CRC=3A595B0E F8788AA6 RefMD5=8183688A4B7D0A390496B5655BCD252E [CA956015B6820DCFF1C814F3532E18B1] GoodName=Baku Bomberman 2 (J) [!] CRC=E73C7C4F AF93B838 SaveType=Eeprom 4KB Players=4 [8107825AC2A522057422463ED81E276B] GoodName=Bakuretsu Muteki Bangai-O (J) [!] CRC=DF98B95D 58840978 Players=1 [A78517540876AE94C2027FE260633CA8] GoodName=Bakuretsu Muteki Bangai-O (J) [f1] (PAL) CRC=0866BEDD AE31C2EE RefMD5=8107825AC2A522057422463ED81E276B [040538EA3C225D1E7F2497ACEFDE8CD0] GoodName=Bakuretsu Muteki Bangai-O (J) [h1C] CRC=DF98B95D 58840978 RefMD5=8107825AC2A522057422463ED81E276B [09FD63AFA1156405E618752FC583DF93] GoodName=Bakushou Jinsei 64 - Mezase! Resort Ou (J) [!] CRC=88CF980A 8ED52EB5 [E16CFE9268E472A7814C58783AE7D3A2] GoodName=Bakushou Jinsei 64 - Mezase! Resort Ou (J) [h1C] CRC=88CF980A 8ED52EB5 [3D3855A86FD5A1B4D30BEB0F5A4A85AF] GoodName=Banjo to Kazooie no Daibouken (J) [!] CRC=5168D520 CA5FCD0D Players=1 SaveType=Eeprom 4KB [7FDAFD3252C0F59FFBA59CD42729D959] GoodName=Banjo to Kazooie no Daibouken (J) [f1] CRC=18439105 60424C9E RefMD5=3D3855A86FD5A1B4D30BEB0F5A4A85AF [89BBBB739E54721F77F1A6441C00C093] GoodName=Banjo to Kazooie no Daibouken (J) [f2] CRC=18439105 60424C9E RefMD5=3D3855A86FD5A1B4D30BEB0F5A4A85AF [B49EC888940FAB43651E48F760BF7BBD] GoodName=Banjo to Kazooie no Daibouken (J) [f3] CRC=18439105 60424C9E RefMD5=3D3855A86FD5A1B4D30BEB0F5A4A85AF [715A8816F30FA24B8D174DC5CB6F25A9] GoodName=Banjo to Kazooie no Daibouken 2 (J) [!] CRC=514B6900 B4B19881 SaveType=Eeprom 16KB Players=1 [06A43BACF5C0687F596DF9B018CA6D7F] GoodName=Banjo-Kazooie (E) (M3) [!] CRC=733FCCB1 444892F9 Players=1 SaveType=Eeprom 4KB [5FC8116DAFDEC73DE9C5CCC2D8E14B4F] GoodName=Banjo-Kazooie (E) (M3) [f1] CRC=192C1422 5B8CFF48 RefMD5=06A43BACF5C0687F596DF9B018CA6D7F [F81C314B04CEE9DC92FD4D50811F6FBB] GoodName=Banjo-Kazooie (E) (M3) [f2] CRC=192C15DA 74BD6300 RefMD5=06A43BACF5C0687F596DF9B018CA6D7F [B29599651A13F681C9923D69354BF4A3] GoodName=Banjo-Kazooie (U) (V1.0) [!] CRC=A4BF9306 BF0CDFD1 SaveType=Eeprom 4KB Players=1 [8E870036E7A40BA42803C333A412EFE7] GoodName=Banjo-Kazooie (U) (V1.0) [b1] CRC=A4BF9306 BF0CDFD1 RefMD5=B29599651A13F681C9923D69354BF4A3 [63609225DA40E2BAEC425F4AEB365330] GoodName=Banjo-Kazooie (U) (V1.0) [b2] CRC=A4BF9306 BF0CDFD1 RefMD5=B29599651A13F681C9923D69354BF4A3 [880BB39F8B31C087D66F7193D3528EFE] GoodName=Banjo-Kazooie (U) (V1.0) [b3] CRC=A4BF9306 BF0CDFD1 RefMD5=B29599651A13F681C9923D69354BF4A3 [6E3FBAF95C79A3668B6A9211F1372216] GoodName=Banjo-Kazooie (U) (V1.0) [b4] CRC=16EDC447 B291F183 RefMD5=B29599651A13F681C9923D69354BF4A3 [508B2D76887E3FE169B60B6CF70E6DBA] GoodName=Banjo-Kazooie (U) (V1.0) [b5] CRC=A4BF9306 BF0CDFD1 RefMD5=B29599651A13F681C9923D69354BF4A3 [4782CA6F893AA03F701D6EDA7552711B] GoodName=Banjo-Kazooie (U) (V1.0) [b6] CRC=FEF9D364 FBD6D06E RefMD5=B29599651A13F681C9923D69354BF4A3 [B6BC123E51AE5C3190BCA41CFC1D637F] GoodName=Banjo-Kazooie (U) (V1.0) [b7] CRC=A4BF9306 BF0CDFD1 RefMD5=B29599651A13F681C9923D69354BF4A3 [F9E8FEF0005E26720EB0D0FDFAB7A859] GoodName=Banjo-Kazooie (U) (V1.0) [f1] CRC=16EDC447 B291F183 RefMD5=B29599651A13F681C9923D69354BF4A3 [7173250DC66CA58024C1C4D27B0F8720] GoodName=Banjo-Kazooie (U) (V1.0) [t1] CRC=16EDC447 B291F183 RefMD5=B29599651A13F681C9923D69354BF4A3 [B11F476D4BC8E039355241E871DC08CF] GoodName=Banjo-Kazooie (U) (V1.1) [!] CRC=CD7559AC B26CF5AE RefMD5=B29599651A13F681C9923D69354BF4A3 [61B5C5C3E5E1A81E5D37072C01B39B76] GoodName=Banjo-Tooie (A) [!] CRC=155B7CDF F0DA7325 SaveType=Eeprom 16KB Players=1 [8B2E56F18421A67BCA861427453A1E19] GoodName=Banjo-Tooie (E) (M4) [!] CRC=C9176D39 EA4779D1 SaveType=Eeprom 16KB Players=1 [40E98FAA24AC3EBE1D25CB5E5DDF49E4] GoodName=Banjo-Tooie (U) [!] CRC=C2E9AA9A 475D70AA SaveType=Eeprom 16KB Players=1 [BF3E84CDD01CAC05987FD8DA5191534B] GoodName=Bass Hunter 64 (E) [!] CRC=B088FBB4 441E4B1D Players=1 SaveType=Eeprom 4KB CountPerOp=1 [2C618F6C69C3B4803F08762A03835139] GoodName=Bass Rush - ECOGEAR PowerWorm Championship (J) [!] CRC=D76333AC 0CB6219D Players=1 CountPerOp=1 [B1AB1D5B3B92B0ACA380D0291DA0689E] GoodName=Bass Rush - ECOGEAR PowerWorm Championship (J) [b1] CRC=D76333AC 0CB6219D RefMD5=2C618F6C69C3B4803F08762A03835139 [1F997B26062B7D59F23193F448157EE3] GoodName=Bass Rush - ECOGEAR PowerWorm Championship (J) [b2] CRC=D76333AC 0CB6219D RefMD5=2C618F6C69C3B4803F08762A03835139 [930C7F6E5863471DDE1816D28A10EB88] GoodName=Bassmasters 2000 (U) [!] CRC=BCFACCAA B814D8EF Players=4 SaveType=Controller Pack CountPerOp=1 [D8903586B5E479E6C4937879650D0D2D] GoodName=Bassmasters 2000 (U) [b1] CRC=BCFACCAA B814D8EF RefMD5=930C7F6E5863471DDE1816D28A10EB88 [342476D20D7A7BF4C5484D2DEFCC79E7] GoodName=Bassmasters 2000 (U) [f1] (PAL) CRC=DC41E81E AC36CAD1 RefMD5=930C7F6E5863471DDE1816D28A10EB88 [A08676124B326B1035B202C83A97468F] GoodName=Batman Beyond - Return of the Joker (U) [!] CRC=204489C1 1286CF2B [E4498D8FE11A6E0CC0737D89361DE097] GoodName=Batman Beyond - Return of the Joker (U) [o1] CRC=204489C1 1286CF2B Players=1 SaveType=None [1C7FA31271E5588C968675E932C08991] GoodName=Batman Beyond - Return of the Joker (U) [o1][t1] CRC=D8928E46 965CE432 RefMD5=E4498D8FE11A6E0CC0737D89361DE097 [A5EE8A6C34863E3D0EB8C06AE8668B30] GoodName=Batman of the Future - Return of the Joker (E) (M3) [!] CRC=259F7F84 7C9EED26 Players=1 SaveType=None [F5C9B6E4DB938258EA277670B6D37F16] GoodName=Batman of the Future - Return of the Joker (E) (M3) [b1] CRC=259F7F84 7C9EED26 RefMD5=A5EE8A6C34863E3D0EB8C06AE8668B30 [8743BDDE07A2E9E0E5A0792D7D8678CB] GoodName=Batman of the Future - Return of the Joker (E) (M3) [o1] CRC=259F7F84 7C9EED26 RefMD5=A5EE8A6C34863E3D0EB8C06AE8668B30 [3406A505C22BAC2F40D9BFC6FF08CF86] GoodName=BattleTanx (U) [!] CRC=6AA4DDE7 E3E2F4E7 SaveType=Controller Pack Players=4 CountPerOp=3 [94A7605A28861C43F636AE0FF7F25F2E] GoodName=BattleTanx (U) [b1] CRC=6AA4DDE7 E3E2F4E7 RefMD5=3406A505C22BAC2F40D9BFC6FF08CF86 [722D55C70368323D79AB1B63696A45E4] GoodName=BattleTanx (U) [b1][t1] CRC=3D615CF5 6984930A RefMD5=3406A505C22BAC2F40D9BFC6FF08CF86 [EDD7187C79CEBDB0D1FABC040502E940] GoodName=BattleTanx (U) [f1] (PAL) CRC=9A75C9C2 A4488353 RefMD5=3406A505C22BAC2F40D9BFC6FF08CF86 [220B85771E64C554514163120C2F82F4] GoodName=BattleTanx (U) [t1] CRC=3D615CF5 6984930A RefMD5=3406A505C22BAC2F40D9BFC6FF08CF86 [D6E667FE10AFE8F7116888EFDE98AE0E] GoodName=BattleTanx - Global Assault (E) (M3) [!] CRC=0CAD17E6 71A5B797 Players=4 SaveType=Controller Pack [654557C316F901A2CA6F7F4B43343147] GoodName=BattleTanx - Global Assault (U) [!] CRC=75A4E247 6008963D Players=4 SaveType=Controller Pack CountPerOp=3 [DC5AAE1CADF43DF43184D2935C32C26C] GoodName=BattleTanx - Global Assault (U) [f1] (Country Check) CRC=8A2E80DC 00F61BE4 RefMD5=D6E667FE10AFE8F7116888EFDE98AE0E [D6D30577E6E8341495B7D8066035C21D] GoodName=BattleTanx - Global Assault (U) [f2] (PAL) CRC=90111D7E E4B49428 RefMD5=D6E667FE10AFE8F7116888EFDE98AE0E [266C0989ED0929DF499389954779EA97] GoodName=Battlezone - Rise of the Black Dogs (U) [!] CRC=55D4C4CE 7753C78A Players=4 SaveType=Controller Pack [A94135D163E6091C960ADC918C1FB8A7] GoodName=Beetle Adventure Racing! (E) (M3) [!] CRC=A1B64A61 D014940B Players=4 SaveType=Controller Pack CountPerOp=3 [9D5A1B779F8B43E63E8CE8427675A7EF] GoodName=Beetle Adventure Racing! (E) (M3) [h1C] CRC=A1B64A61 D014940B RefMD5=A94135D163E6091C960ADC918C1FB8A7 [6B4398CE56A9C4786F2087F681FFFAF3] GoodName=Beetle Adventure Racing! (E) (M3) [t1] CRC=59445C71 1F1FE699 RefMD5=A94135D163E6091C960ADC918C1FB8A7 [5FFD43089B7334072B2B74421618D973] GoodName=Beetle Adventure Racing! (J) [!] CRC=9C7318D2 24AE0DC1 Players=4 SaveType=Controller Pack [E126B84FA242916289D04D68C0E20BFE] GoodName=Beetle Adventure Racing! (J) [b1] CRC=9C7318D2 24AE0DC1 RefMD5=5FFD43089B7334072B2B74421618D973 [CF97C336479DDBF1217E4DDE89D9D2D3] GoodName=Beetle Adventure Racing! (U) (M3) [!] CRC=EDF419A8 BF1904CC SaveType=Controller Pack Players=4 [D11BC38F26EA2835FBF017FE9BD404FE] GoodName=Beetle Adventure Racing! (U) (M3) [b1] CRC=EDF419A8 BF1904CC RefMD5=CF97C336479DDBF1217E4DDE89D9D2D3 [40CBC5A23B7D8C1FDD47D78CACA29248] GoodName=Beetle Adventure Racing! (U) (M3) [b2] CRC=EDF419A8 BF1904CC RefMD5=CF97C336479DDBF1217E4DDE89D9D2D3 [CC9F8A2181C6C9C5ED49B77FF632395A] GoodName=Beetle Adventure Racing! (U) (M3) [f1] (PAL) CRC=1E17A377 9D8C5E86 RefMD5=CF97C336479DDBF1217E4DDE89D9D2D3 [EFFB7B42C6D7C29540C93006E6142F99] GoodName=Beetle Adventure Racing! (U) (M3) [t1] CRC=559A0FD3 897F777C RefMD5=CF97C336479DDBF1217E4DDE89D9D2D3 [C246BD299AA756459193F406A261D1D1] GoodName=Beetle Adventure Racing! (U) (M3) [t2] CRC=522409D3 9340EBFF RefMD5=CF97C336479DDBF1217E4DDE89D9D2D3 [AD7C7B994994CF56481E4450E958049F] GoodName=Berney Must Die! by Nop_ (POM '99) (PD) CRC=3A089BBC 54AB2C06 Status=0 SaveType=Controller Pack [108A605E3D57A5E5C52398B675861EF4] GoodName=Berney Must Die! by Nop_ (POM '99) (PD) [t1] CRC=861F9BDC C3353C85 RefMD5=AD7C7B994994CF56481E4450E958049F [BF6780E2982C16D4A4FDB553BE8F9226] GoodName=Big Mountain 2000 (U) [!] CRC=08FFA4B7 01F453B6 SaveType=Eeprom 4KB Players=4 Rumble=Yes [CFE3E75B8B4C75F231CBBD9C99804EC3] GoodName=Big Mountain 2000 (U) [t1] CRC=B0119B37 B9774FD5 RefMD5=BF6780E2982C16D4A4FDB553BE8F9226 [0059B65E1C813BC8BD1A61A1FE009CCD] GoodName=Bike Race '98 V1.0 by NAN (PD) CRC=713FDDD3 72D6A0EF Players=1 Status=2 SaveType=None Rumble=No [A1025E61229D5D855D232210B39F5E66] GoodName=Bike Race '98 V1.0 by NAN (PD) [b1] CRC=713FDDD3 72D6A0EF RefMD5=0059B65E1C813BC8BD1A61A1FE009CCD [1CCD7DB5B3F57944CAF7DA86EF1763E3] GoodName=Bike Race '98 V1.2 by NAN (PD) CRC=F4B64159 46FC16CF Players=1 Status=2 SaveType=None Rumble=No [58B2716389BA3C5575B5A287E59F49AF] GoodName=Bike Race '98 V1.2 by NAN (PD) [b1] CRC=F4B64159 46FC16CF RefMD5=1CCD7DB5B3F57944CAF7DA86EF1763E3 [133B6615CD0936AC705DFC81E4389CBB] GoodName=Bike Race '98 V1.2 by NAN (PD) [b2] CRC=F4B64159 46FC16CF RefMD5=1CCD7DB5B3F57944CAF7DA86EF1763E3 [42672BA5E98CD21D7F3E3745E69038DD] GoodName=Bio F.R.E.A.K.S. (E) [!] CRC=AB7C101D EC58C8B0 [0F412C4CDE69AE41B89D390731D34F71] GoodName=Bio F.R.E.A.K.S. (E) [b1] CRC=AB7C101D EC58C8B0 Players=4 SaveType=Controller Pack [B90AB8F7605D971CC7A6D9BA5E67D1AF] GoodName=Bio F.R.E.A.K.S. (U) [!] CRC=08123595 0510F1DE Players=4 SaveType=Controller Pack [801ECC49DAF04FBA099C6F75A06F0454] GoodName=Bio F.R.E.A.K.S. (U) [b1] CRC=08123595 0510F1DE RefMD5=B90AB8F7605D971CC7A6D9BA5E67D1AF [F64B263F67ACA5DE1957299FD92FB35A] GoodName=Bio F.R.E.A.K.S. (U) [b2] CRC=08123595 0510F1DE RefMD5=B90AB8F7605D971CC7A6D9BA5E67D1AF [3F2802F12058B4511A0778A891050297] GoodName=Bio F.R.E.A.K.S. (U) [b3] CRC=B6223A7B 2139CEA6 RefMD5=B90AB8F7605D971CC7A6D9BA5E67D1AF [E02AEF75AC059FC2446BFFDD06EE64A9] GoodName=Bio F.R.E.A.K.S. (U) [h1C] CRC=08123595 0510F1DE RefMD5=B90AB8F7605D971CC7A6D9BA5E67D1AF [879A085B07B7E6D52DFE2CE636D7A239] GoodName=Bio F.R.E.A.K.S. (U) [t1] CRC=B6223A7B 2139CEA6 RefMD5=B90AB8F7605D971CC7A6D9BA5E67D1AF [F77D70959222276491222F31EBFF3BF1] GoodName=Biohazard 2 (J) [!] CRC=7EAE2488 9D40A35A SaveType=SRAM Players=1 CountPerOp=1 [13D7834291A311077B84B9A2816AF6FC] GoodName=Birthday Demo for Steve by Nep (PD) [b1] CRC=C2B35C2F 5CD995A2 [4443B11C457348B0B6B64650909F0143] GoodName=Birthday Demo for Steve by Nep (PD) CRC=C2B35C2F 5CD995A2 [889D4D337AD11CE94357511C725EAB6A] GoodName=Blast Corps (E) (M2) [!] CRC=7C64E6DB 55B924DB Players=1 SaveType=Eeprom 4KB [7C9C000B61BF0BCF81AFD4E583EC9B2A] GoodName=Blast Corps (E) (M2) [b1] CRC=7C64E6DB 55B924DB RefMD5=889D4D337AD11CE94357511C725EAB6A [36C97C12DDABB02D7D2D3F6B33B3D83F] GoodName=Blast Corps (E) (M2) [b2] CRC=7C64E6DB 55B924DB RefMD5=889D4D337AD11CE94357511C725EAB6A [A8DFDFF49144627492DA9B0B65B91845] GoodName=Blast Corps (U) (V1.0) [!] CRC=7C647C25 D9D901E6 Players=1 SaveType=Eeprom 4KB [000E40366ECE225565D3EC83BE7D97A4] GoodName=Blast Corps (U) (V1.0) [b1] CRC=7C647C25 D9D901E6 RefMD5=A8DFDFF49144627492DA9B0B65B91845 [4BFB72FC9A787543323ADEFC8EC2A042] GoodName=Blast Corps (U) (V1.0) [b2] CRC=7C647C25 D9D901E6 RefMD5=A8DFDFF49144627492DA9B0B65B91845 [5875FC73069077C93E214233B60F0BDC] GoodName=Blast Corps (U) (V1.1) [!] CRC=7C647E65 1948D305 Players=1 SaveType=Eeprom 4KB [16B82D53D7F038A8FE67A78027720516] GoodName=Blast Dozer (J) [!] CRC=65234451 EBD3346F Players=1 SaveType=Eeprom 4KB [FA3A5597012B710C844682DA586A62C9] GoodName=Blast Dozer (J) [b1] CRC=65234451 EBD3346F RefMD5=16B82D53D7F038A8FE67A78027720516 [31B4A8ED52B48E756B344C9F22736E50] GoodName=Blues Brothers 2000 (E) (M6) [!] CRC=D571C883 822D3FCF Players=2 SaveType=Controller Pack [997FD8F79CD6F3CD1C1C1FD21E358717] GoodName=Blues Brothers 2000 (U) [!] CRC=7CD08B12 1153FF89 Players=2 SaveType=Controller Pack [96D5910A6FFD3EE53638251ACE86E0CB] GoodName=Blues Brothers 2000 (U) [f1] (PAL-NTSC) CRC=A9A17EF3 AB1F8703 RefMD5=997FD8F79CD6F3CD1C1C1FD21E358717 [A6E03FA194A2932D36E0A67F9F64D92E] GoodName=Blues Brothers 2000 (U) [t1] CRC=A0976BE9 FF41562B RefMD5=997FD8F79CD6F3CD1C1C1FD21E358717 [A8D31D9715BB5645EFC3245A6497F542] GoodName=Blues Brothers 2000 (U) [t1][f1] (PAL-NTSC) CRC=ABB57137 960F561D RefMD5=997FD8F79CD6F3CD1C1C1FD21E358717 [B27FA5E9AD0CB47BB3A74FFAC7BC8EDF] GoodName=Body Harvest (E) (M3) [!] CRC=0B58B8CD B7B291D2 SaveType=Eeprom 4KB Players=1 CountPerOp=1 [0EF2448C243F86C4C9F194F49CFD8352] GoodName=Body Harvest (E) (M3) [f1] (NTSC) CRC=6F66B92D 80B9E520 RefMD5=B27FA5E9AD0CB47BB3A74FFAC7BC8EDF [3B8585ED03E8DDB89D7DE456317545E7] GoodName=Body Harvest (U) [!] CRC=5326696F FE9A99C3 Players=1 SaveType=Eeprom 4KB CountPerOp=1 [77554810629D4EF4D93519745FA6066B] GoodName=Body Harvest (U) [b1] CRC=5326696F FE9A99C3 RefMD5=3B8585ED03E8DDB89D7DE456317545E7 [D266B288829193BD8205DDDCDFA5CF30] GoodName=Body Harvest (U) [b1][t1] CRC=C535091F D60CCF6C RefMD5=3B8585ED03E8DDB89D7DE456317545E7 [13532519CBC43BFA638FD5A7754EE281] GoodName=Body Harvest (U) [b2] CRC=00A46EE3 554158C6 RefMD5=3B8585ED03E8DDB89D7DE456317545E7 [D8BD69AEE8246A3127A58E202D447BA1] GoodName=Body Harvest (U) [t1] CRC=C535091F D60CCF6C RefMD5=3B8585ED03E8DDB89D7DE456317545E7 [1CF31E7F6E0DEB2C18C39DDD4EED9E51] GoodName=Bokujou Monogatari 2 (J) [!] CRC=B3D451C6 E1CB58E2 [C902BB7203C6C77DDA16ABCDF8995E32] GoodName=Bokujou Monogatari 2 (J) [b1] CRC=B3D451C6 E1CB58E2 [B68F49AA8F6F7499184AC6B7B8570F2B] GoodName=Bomberman 64 (E) [!] CRC=5A160336 BC7B37B0 Players=4 SaveType=Eeprom 4KB [B9E6A38B28108E4D6E6A0A47BF981747] GoodName=Bomberman 64 (E) [b1] CRC=5A160336 BC7B37B0 RefMD5=B68F49AA8F6F7499184AC6B7B8570F2B [4D5C42B239DFD67E40D4E9476A208A1E] GoodName=Bomberman 64 (E) [b2] CRC=5A160336 BC7B37B0 RefMD5=B68F49AA8F6F7499184AC6B7B8570F2B [0283CC125AEA29EF72A03BEE7D759C5D] GoodName=Bomberman 64 (E) [h1C] CRC=5A160336 BC7B37B0 RefMD5=B68F49AA8F6F7499184AC6B7B8570F2B [9976833301116D0CB9E278E857921BF6] GoodName=Bomberman 64 (E) [t1] CRC=938CA401 43339F1B RefMD5=B68F49AA8F6F7499184AC6B7B8570F2B [093058ECE14C8CC1A887B2087EB5CFE9] GoodName=Bomberman 64 (U) [!] CRC=F568D51E 7E49BA1E Players=4 SaveType=Eeprom 4KB [BB4C5769EED69362F1A90A2BE19998D6] GoodName=Bomberman 64 (U) [b1] CRC=F568D51E 7E49BA1E RefMD5=093058ECE14C8CC1A887B2087EB5CFE9 [FA4347AC05BC0C0BBC8CABE3ED90B8A4] GoodName=Bomberman 64 (U) [o1] CRC=F568D51E 7E49BA1E RefMD5=093058ECE14C8CC1A887B2087EB5CFE9 [567B8914E0642721408D46627E36003B] GoodName=Bomberman 64 - Arcade Edition (J) [f1] (PAL) CRC=DF6FF0F4 29D14238 [852E8651D6C610CE593C35CEA678C9F1] GoodName=Bomberman 64 - Arcade Edition (J) [f2] (PAL-CRC) CRC=E87F1ACE 809F204B [08E491F87445C6E5C168D982FC665D5F] GoodName=Bomberman 64 - Arcade Edition (J) CRC=DF6FF0F4 29D14238 [AEC1FDB0F1CAAD86C9F457989A4CE482] GoodName=Bomberman 64 - The Second Attack! (U) [!] CRC=237E73B4 D63B6B37 Players=4 SaveType=Eeprom 4KB [9058970DDF26431A4DAF353C2EEA86AB] GoodName=Bomberman 64 - The Second Attack! (U) [t1][f1] (PAL-NTSC) CRC=9BA3E5CC EB222304 RefMD5=AEC1FDB0F1CAAD86C9F457989A4CE482 [F79EF0813157880FFBAD6199E07579BE] GoodName=Bomberman Hero (E) [!] CRC=D85C4E29 88E276AF Players=4 SaveType=Eeprom 4KB [EA6D0EBD673A66C395569A2A230AEA6F] GoodName=Bomberman Hero (E) [b1] CRC=D85C4E29 88E276AF RefMD5=F79EF0813157880FFBAD6199E07579BE [141430D034C16FC4B4BA20D53EAB61C1] GoodName=Bomberman Hero (E) [b2] CRC=D85C4E29 88E276AF RefMD5=F79EF0813157880FFBAD6199E07579BE [8A8E73D70CBC902CD99C7A4E2B982778] GoodName=Bomberman Hero (E) [b3] CRC=D85C4E29 88E276AF RefMD5=F79EF0813157880FFBAD6199E07579BE [008710F628C29D69BD939066A44AB877] GoodName=Bomberman Hero (E) [f1] (NTSC) CRC=D85C4E29 88E276AF RefMD5=F79EF0813157880FFBAD6199E07579BE [EF2453BFF7AD0C4BFA9AB0BD6324EBF3] GoodName=Bomberman Hero (U) [!] CRC=4446FDD6 E3788208 Players=4 SaveType=Eeprom 4KB [5642E51D746F603DFE5A71C5CBDB5C73] GoodName=Bomberman Hero (U) [b1] CRC=4446FDD6 E3788208 RefMD5=EF2453BFF7AD0C4BFA9AB0BD6324EBF3 [1143B49D788BA477DAE98C05D6623344] GoodName=Bomberman Hero (U) [b2] CRC=DA573DB9 9442D273 RefMD5=EF2453BFF7AD0C4BFA9AB0BD6324EBF3 [1BCED1BA1BF5A0E2FF5768C714EE4627] GoodName=Bomberman Hero (U) [b3] CRC=DA573DB9 9442D273 RefMD5=EF2453BFF7AD0C4BFA9AB0BD6324EBF3 [8A0479714259954BAE41D5275AC926F4] GoodName=Bomberman Hero (U) [t1] CRC=DA573DB9 9442D273 RefMD5=EF2453BFF7AD0C4BFA9AB0BD6324EBF3 [EE273763C7391458865FF26C7EA0C3F1] GoodName=Bomberman Hero - Mirian Oujo wo Sukue! (J) [!] CRC=67FF12CC 76BF0212 Players=4 SaveType=Eeprom 4KB [E7D3A4A73D373DA534A025E99B4D0EEF] GoodName=Bomberman Hero - Mirian Oujo wo Sukue! (J) [b1] CRC=67FF12CC 76BF0212 RefMD5=EE273763C7391458865FF26C7EA0C3F1 [8FA5E55E5597E2615F81CD236DCA4721] GoodName=Bomberman Hero - Mirian Oujo wo Sukue! (J) [b2] CRC=DDEF1333 E7209D07 RefMD5=EE273763C7391458865FF26C7EA0C3F1 [F39476591E147906291BA48145F304B0] GoodName=Bomberman Hero - Mirian Oujo wo Sukue! (J) [b3] CRC=DDEF1333 E7209D07 RefMD5=EE273763C7391458865FF26C7EA0C3F1 [49E9C7AACF839E46EA2D255A99FB2613] GoodName=Bomberman Hero - Mirian Oujo wo Sukue! (J) [b4] CRC=67FF12CC 76BF0212 RefMD5=EE273763C7391458865FF26C7EA0C3F1 [D4806CD9D9DFC7E52D6F825B5D5CC7C2] GoodName=Bomberman Hero - Mirian Oujo wo Sukue! (J) [b5] CRC=DDEF1333 E7209D07 RefMD5=EE273763C7391458865FF26C7EA0C3F1 [30194320B54FF67CB0CDA5DDB061D933] GoodName=Bomberman Hero - Mirian Oujo wo Sukue! (J) [b6] CRC=DDEF1333 E7209D07 RefMD5=EE273763C7391458865FF26C7EA0C3F1 [2C68A2D12C1EBFA2AD8F0BE1A09AEEE7] GoodName=Bomberman Hero - Mirian Oujo wo Sukue! (J) [b7] CRC=67FF12CC 76BF0212 RefMD5=EE273763C7391458865FF26C7EA0C3F1 [4022B2A0F22218870764CDAE73580762] GoodName=Bomberman Hero - Mirian Oujo wo Sukue! (J) [b8] CRC=DDEF1333 E7209D07 RefMD5=EE273763C7391458865FF26C7EA0C3F1 [A12B361F9D38FDFE3183C2B4C1F2F217] GoodName=Bomberman Hero - Mirian Oujo wo Sukue! (J) [o1] CRC=67FF12CC 76BF0212 RefMD5=EE273763C7391458865FF26C7EA0C3F1 [C4543F27B4E481D0818B51036B67DFEF] GoodName=Bomberman Hero - Mirian Oujo wo Sukue! (J) [t1] CRC=DDEF1333 E7209D07 RefMD5=EE273763C7391458865FF26C7EA0C3F1 [B5772A2827BEFC81E107AE756B36BB2A] GoodName=Boot Emu by Jovis (PD) CRC=2D15DC8C D3BBDB52 [FB19AFD5E8C49978E6E6AE3622E0498A] GoodName=Bottom of the 9th (U) [!] CRC=D72FD14D 1FED32C4 SaveType=Controller Pack Players=4 [6E207C47FAAD2A4F64AE721A3A8F6161] GoodName=Bottom of the 9th (U) [b1] CRC=D72FD14D 1FED32C4 RefMD5=FB19AFD5E8C49978E6E6AE3622E0498A [62E92102D6FD1701A6E904DA6AB58AE8] GoodName=Brunswick Circuit Pro Bowling (U) [!] CRC=1E22CF2E 42AAC813 [14D070077D70C94CBB1413C7641E7272] GoodName=Brunswick Circuit Pro Bowling (U) [b1] CRC=91644B9F 8CDD0DA5 Players=4 SaveType=Controller Pack [2D30FBE45C2858957F9EFDB5E9000033] GoodName=Brunswick Circuit Pro Bowling (U) [o1] CRC=1E22CF2E 42AAC813 RefMD5=14D070077D70C94CBB1413C7641E7272 [C3A55D506E5BD011EC20F601EA2B33BB] GoodName=Brunswick Circuit Pro Bowling (U) [o1][f1] (PAL) CRC=91644B9F 8CDD0DA5 RefMD5=14D070077D70C94CBB1413C7641E7272 [A2E4BE02876CB0F0D1E925FF95090C96] GoodName=Buck Bumble (E) (M5) [!] CRC=D5B2339C CABCCAED Players=4 SaveType=Controller Pack [AEE981977D8F069003574CD10A268D47] GoodName=Buck Bumble (J) [!] CRC=D7C762B6 F83D9642 Players=4 SaveType=Controller Pack [41417FCE2B37EAAE787C5A845A0015C4] GoodName=Buck Bumble (U) [!] CRC=85AE781A C756F05D Players=4 SaveType=Controller Pack [01933A0CBBDE1D4EB4C58CC6C6C27633] GoodName=Buck Bumble (U) [b1][t1] CRC=3C2B07FC 8C6AC97B RefMD5=41417FCE2B37EAAE787C5A845A0015C4 [CD19788AE04DAD7AF27FD0C591983CCE] GoodName=Buck Bumble (U) [b2] CRC=E8522F04 43FA513A RefMD5=41417FCE2B37EAAE787C5A845A0015C4 [C129EE8DA7FE1B976D71932733385438] GoodName=Buck Bumble (U) [f1] (PAL) CRC=3C2AC7FA 72BC3A5F RefMD5=41417FCE2B37EAAE787C5A845A0015C4 [28F8F7D8423B291E3056047C62E2937A] GoodName=Buck Bumble (U) [t1] CRC=3C2B07FC 8C6AC97B RefMD5=41417FCE2B37EAAE787C5A845A0015C4 [ED3E962653A1CD56AAB175DEEE6EE52A] GoodName=Bug's Life, A (E) [!] CRC=8F12C096 45DC17E1 Players=1 SaveType=Controller Pack CountPerOp=1 [5BF0F2351AEE577A8345D6E13D197E06] GoodName=Bug's Life, A (E) [f1] (NTSC) CRC=09035DC5 870C1041 RefMD5=ED3E962653A1CD56AAB175DEEE6EE52A [D2860D4FBD0EC4B2711A6EF8D78F9866] GoodName=Bug's Life, A (F) [!] CRC=2B38AEC0 6350B810 SaveType=Controller Pack Players=1 CountPerOp=1 [504C92A5978B7EAE7A3FD30645E06D39] GoodName=Bug's Life, A (F) [f1] (NTSC) CRC=BD58346E 67E74459 RefMD5=D2860D4FBD0EC4B2711A6EF8D78F9866 [CBEF54768670F4B5602CCBC90150007A] GoodName=Bug's Life, A (G) [!] CRC=DFF227D9 0D4D8169 Players=1 SaveType=Controller Pack CountPerOp=1 [919E5D60A7F9A79D89AC179123D47EEE] GoodName=Bug's Life, A (G) [f1] (NTSC) CRC=31E33A96 2744267B RefMD5=CBEF54768670F4B5602CCBC90150007A [E3609FD12369C464E832C6D2A4D20790] GoodName=Bug's Life, A (I) [!] CRC=F63B89CE 4582D57D Players=1 SaveType=Controller Pack CountPerOp=1 [7FD6BFFB80F920E01EF869829D485EA3] GoodName=Bug's Life, A (U) [!] CRC=82DC04FD CF2D82F4 Players=1 SaveType=Controller Pack CountPerOp=1 [14ACC20454B0C2789C9F7EF7A556231A] GoodName=Bug's Life, A (U) [b1] CRC=82DC04FD CF2D82F4 Players=1 SaveType=Controller Pack CountPerOp=1 [6472BD444D2025B1D883FFAE35D94FD4] GoodName=Bug's Life, A (U) [b1][f1] (PAL) CRC=2FE62885 F6853DAF RefMD5=14ACC20454B0C2789C9F7EF7A556231A [08E3F4EEEA56C873A84EA076AA362EDD] GoodName=Bug's Life, A (U) [f1] (PAL) CRC=2FE62885 F6853DAF RefMD5=7FD6BFFB80F920E01EF869829D485EA3 [B8B760613CAA702E33F271741170632A] GoodName=Bug's Life, A (U) [t1] CRC=3F4AFB7B 2D24C8F8 RefMD5=7FD6BFFB80F920E01EF869829D485EA3 [30AAE8A534C72FFC89343E8EF0F1C5A1] GoodName=Bug's Life, A (U) [t2] CRC=3F4AFB7B 2D24C8F8 RefMD5=7FD6BFFB80F920E01EF869829D485EA3 [8567382D3CD5BC0406B7B4C780F621DC] GoodName=Bust-A-Move '99 (U) [!] CRC=4222D89F AFE0B637 Players=4 SaveType=Controller Pack [B292B14BBC7FFCC2A741FE87A80B8D4D] GoodName=Bust-A-Move '99 (U) [b1] CRC=8AFB2D9A 9F186C02 RefMD5=8567382D3CD5BC0406B7B4C780F621DC [4EA8627701C3D6AF50DDAA607AA3B7F9] GoodName=Bust-A-Move '99 (U) [f1] (PAL) CRC=F23CA406 EC2ACE78 RefMD5=8567382D3CD5BC0406B7B4C780F621DC [094F639A9BA63B2136D2887C8D72BCA0] GoodName=Bust-A-Move 2 - Arcade Edition (E) [!] CRC=CEDCDE1E 513A0502 Players=2 SaveType=Controller Pack [AE0693C8D73E5A1407A2EDF41F1164A9] GoodName=Bust-A-Move 2 - Arcade Edition (E) [b1] CRC=B121ED86 883423F1 RefMD5=094F639A9BA63B2136D2887C8D72BCA0 [8897A39E34AEE4D3F807AF255C6617D6] GoodName=Bust-A-Move 2 - Arcade Edition (U) [!] CRC=8A86F073 CD45E54B Players=2 SaveType=Controller Pack [84DD20F80DB23CB49BFE98639BE6CD71] GoodName=Bust-A-Move 2 - Arcade Edition (U) [b1] CRC=8A86F073 CD45E54B RefMD5=8897A39E34AEE4D3F807AF255C6617D6 [5065D7A833FC73CB75DED8D639AAADA5] GoodName=Bust-A-Move 2 - Arcade Edition (U) [b2] CRC=2D03FD5B D5C096D5 RefMD5=8897A39E34AEE4D3F807AF255C6617D6 [EF3D1E9059723766941FF4E0E913C941] GoodName=Bust-A-Move 2 - Arcade Edition (U) [b3] CRC=322EF540 38D316EB RefMD5=8897A39E34AEE4D3F807AF255C6617D6 [8EEF2BB9543B78197CEDDA6DA860DA97] GoodName=Bust-A-Move 2 - Arcade Edition (U) [b4] CRC=8A86F073 CD45E54B RefMD5=8897A39E34AEE4D3F807AF255C6617D6 [3EA21256DDC4157C3231AE5CC9C4652A] GoodName=Bust-A-Move 3 DX (E) [!] CRC=E328B4FA 004A28E1 [16D7676C2394E422076F7CB855DE901B] GoodName=Bust-A-Move 3 DX (E) [b1] CRC=364C4ADC D3050993 [0BD4AEB12E502C39140E4DA52F77642E] GoodName=Bust-A-Move 3 DX (E) [b2] CRC=E328B4FA 004A28E1 [089D12EE45BFACD4A9FC93185AF5C42B] GoodName=Bust-A-Move 3 DX (E) [b3] CRC=E328B4FA 004A28E1 [1BDC2BFDD0B6CA9D8FD354AEAF1A3CF6] GoodName=Bust-A-Move 3 DX (E) [f1] (NTSC100%) CRC=364C4ADC D3050993 [F7CA97BE225630B7690A862FCA97E442] GoodName=Bust-A-Move 3 DX (E) [f2] (NTSC-Z64) CRC=D5BDCD1D 393AFE43 [3CA46AD43F9B62DF409759D56468F18E] GoodName=Bust-A-Move 3 DX (E) [f3] (NTSC) CRC=D5BDCD1D 393AFE43 [6A78DA715440C0C6872B5D78D31BFD3B] GoodName=CD64 BIOS Direct-Upgrade V1.08 CRC=549EA1B0 F666F794 [176D518AD6E1D89BC0FEF0672A4C1882] GoodName=CD64 BIOS Direct-Upgrade V1.09 CRC=8E3D8D2E 9850573F [0B7C2A6D2B3DE3D7D0FF7AAFAB6F8DA7] GoodName=CD64 BIOS Direct-Upgrade V1.10 CRC=3E93A24F AC2D58E1 [30D7D730E8C131C77EC6F6390B9EB8B3] GoodName=CD64 BIOS Direct-Upgrade V1.11 CRC=FAB972E4 1CB0882B [CF1E4E42B93ECBB080C05B73BB4AF808] GoodName=CD64 BIOS Direct-Upgrade V1.13 CRC=960621E3 7D4D5BB0 [B03E6FAFEA6A314285D0181D5D2ABBAB] GoodName=CD64 BIOS Direct-Upgrade V1.20 CRC=D32264A1 989987EA [A911F13E7D4CF157C79330E908BAE9A7] GoodName=CD64 BIOS Direct-Upgrade V1.21 CRC=4F354F88 A75E40E0 [6711B9D80D4D22AD0DC4AF20C9088763] GoodName=CD64 BIOS Direct-Upgrade V1.23 CRC=AAD9FC15 B2C9DA6F [354E8A1BC64683F01FE598F51D5AB4BE] GoodName=CD64 BIOS Direct-Upgrade V1.30 CRC=6BF11774 D330D7ED [F70A06305D5C545980D9D2D16EF122B2] GoodName=CD64 BIOS EEPROM-Burner V1.08 [a1] CRC=626C7AA3 C1480B86 [4EA4119D7D07FD965BB09A974341E0F3] GoodName=CD64 BIOS EEPROM-Burner V1.08 CRC=57D1CEA5 E2CCC89F [D47EC4844C8C3946A3222FB22E103F04] GoodName=CD64 BIOS EEPROM-Burner V1.09 CRC=CADEA283 46EAF060 [E7C8D1090FA90E9B8C29B48734CF3A78] GoodName=CD64 BIOS EEPROM-Burner V1.10 CRC=BE4AF7A0 14E3D32C [E730EDA716AE40BDBC404F7601491D77] GoodName=CD64 BIOS EEPROM-Burner V1.11 (Even Bytes) CRC=43362020 20202020 [706DB19D4AA4EAF902C8B48544884CEF] GoodName=CD64 BIOS EEPROM-Burner V1.11 (Odd Bytes) CRC=44342020 20202056 [CBEA298BFE9B59BBDBC379ABFD2CD208] GoodName=CD64 BIOS EEPROM-Burner V1.11 CRC=4A0CD2F4 F1F22FE3 [8191F6945DAB90A17E752AA3C94B0402] GoodName=CD64 BIOS EEPROM-Burner V1.21 (Even Bytes) CRC=43362020 20202020 [1DF4F3503FEFFBA6214092E0ABBA33B2] GoodName=CD64 BIOS EEPROM-Burner V1.21 (Odd Bytes) CRC=44342020 20202056 [16E77C21E1EA47FDD8C5635CFFF94BFD] GoodName=CD64 BIOS EEPROM-Burner V1.21 CRC=E74607D1 751139B4 [AAAA0551DB73728D79EBC1D1EDD127F6] GoodName=CD64 BIOS EEPROM-Burner V1.23 (Even Bytes) CRC=43362020 20202020 [168872484F1E933FF351D1C3DC1FC601] GoodName=CD64 BIOS EEPROM-Burner V1.23 (Odd Bytes) CRC=44342020 20202056 [DA027DB6DCB643B0BFCE71720A1F7500] GoodName=CD64 BIOS EEPROM-Burner V1.23 CRC=FE169919 46F54C2D [781AE174BEDA8641E3F0E1EFAD761050] GoodName=CD64 BIOS EEPROM-Burner V1.30 (Even Bytes) CRC=43362020 20202020 [3965F14D450F019BEB8591AA10AFC2BF] GoodName=CD64 BIOS EEPROM-Burner V1.30 (Odd Bytes) CRC=44342020 20202056 [51313E88D86DFF531E386529BBE45DD5] GoodName=CD64 BIOS EEPROM-Burner V1.30 CRC=C7F15051 EE3DEE75 [A99D3F4334F2F59B247FD5CB3DC85A77] GoodName=CD64 Memory Test (PD) CRC=95081A8B 49DFE4FA [226127FDBA21FC9019397ED2C5E5B19F] GoodName=CZN Module Player (PD) CRC=5B9D65DF A18AB4AE [965AD2FA317F0644E49A89A3219719CB] GoodName=California Speed (U) [!] CRC=AC16400E CF5D071A SaveType=Controller Pack Players=4 CountPerOp=1 [C95353C14C4AE3DC95D1D91D6566EF92] GoodName=California Speed (U) [f1] (Country Check) CRC=AC16460E 46F60594 RefMD5=965AD2FA317F0644E49A89A3219719CB [7658075D52C403783640DFAC2F8B6A9E] GoodName=California Speed (U) [f2] (PAL) CRC=41D44009 5E94483F RefMD5=965AD2FA317F0644E49A89A3219719CB [EEEAD69D62EB43F093D9D46C38A82AC5] GoodName=California Speed (U) [t1] CRC=150DDE31 969D3994 RefMD5=965AD2FA317F0644E49A89A3219719CB [CA21467BDE6B355E7A15B8F1ADA7B24D] GoodName=Carmageddon 64 (E) (M4) (Eng-Spa-Fre-Ger) [!] CRC=580162EC E3108BF1 Players=4 SaveType=Controller Pack CountPerOp=1 [A5DB496C328C36682EB770CEFE6C2064] GoodName=Carmageddon 64 (E) (M4) (Eng-Spa-Fre-Ger) [f1] (NTSC) CRC=BCC83145 6B7F5DA6 RefMD5=CA21467BDE6B355E7A15B8F1ADA7B24D [59EB5646FA079BCBD7A340D7A10196DD] GoodName=Carmageddon 64 (E) (M4) (Eng-Spa-Fre-Ita) [!] CRC=E48E01F5 E6E51F9B Players=4 SaveType=Controller Pack CountPerOp=1 [D5271DB3CBE6B24099DCC6878C137FF7] GoodName=Carmageddon 64 (E) (M4) (Eng-Spa-Fre-Ita) [b1] CRC=E48E01F5 E6E51F9B RefMD5=59EB5646FA079BCBD7A340D7A10196DD [BCD2A45C39128B7D7E29E351788E860E] GoodName=Carmageddon 64 (E) (M4) (Eng-Spa-Fre-Ita) [f1] (NTSC) CRC=A1CC026F E09D1766 RefMD5=59EB5646FA079BCBD7A340D7A10196DD [3559BE56B70BAFB77C900516B909BFEF] GoodName=Carmageddon 64 (E) (M4) (Eng-Spa-Fre-Ita) [f2] (NTSC) CRC=5D0283F5 2CDEEA76 RefMD5=59EB5646FA079BCBD7A340D7A10196DD [31BB57C1FAD0D47DC2353C1950B11886] GoodName=Carmageddon 64 (U) [!] CRC=F00F2D4E 340FAAF4 Players=4 SaveType=Controller Pack CountPerOp=1 [57146B6CD8EE7D96B01A811F98A1AC61] GoodName=Castlevania (E) (M3) [!] CRC=64F1B7CA 71A23755 Players=1 SaveType=Controller Pack [DE30F7C3D077778380E2B3D507EFE2D3] GoodName=Castlevania (E) (M3) [b1] CRC=64F1B7CA 71A23755 RefMD5=57146B6CD8EE7D96B01A811F98A1AC61 [96C8DA6D1567F43570CCB362811114DE] GoodName=Castlevania (E) (M3) [t1] CRC=DA0E5024 969ED261 RefMD5=57146B6CD8EE7D96B01A811F98A1AC61 [1CC5CF3B4D29D8C3ADE957648B529DC1] GoodName=Castlevania (U) (V1.0) [!] CRC=F35D5F95 8AFE3D69 Players=1 SaveType=Controller Pack [C19E5A3FCDF52C7292097F215DDC428A] GoodName=Castlevania (U) (V1.0) [b1] CRC=F35D5F95 8AFE3D69 RefMD5=1CC5CF3B4D29D8C3ADE957648B529DC1 [1A9EBA4D8CB647FD03AAEB022D04344F] GoodName=Castlevania (U) (V1.0) [b2] CRC=F35D5F95 8AFE3D69 RefMD5=1CC5CF3B4D29D8C3ADE957648B529DC1 [A4DB62BABE8583E5F5674FFCFF8B8DFC] GoodName=Castlevania (U) (V1.0) [b3] CRC=F35D5F95 8AFE3D69 RefMD5=1CC5CF3B4D29D8C3ADE957648B529DC1 [3E972E3340BED6E47D3C515DD10EAEDA] GoodName=Castlevania (U) (V1.0) [b4] CRC=F35D5F95 8AFE3D69 RefMD5=1CC5CF3B4D29D8C3ADE957648B529DC1 [1FEC5A43F756C4AAE958CD286F6451C5] GoodName=Castlevania (U) (V1.0) [t1] CRC=0B28EBA3 5E062616 RefMD5=1CC5CF3B4D29D8C3ADE957648B529DC1 [EBDC9053485AAEE05378A9D95D991104] GoodName=Castlevania (U) (V1.0) [t2] CRC=036CBFE5 9E626365 RefMD5=1CC5CF3B4D29D8C3ADE957648B529DC1 [8F94C0A43D697D8DEAE9DE660865A966] GoodName=Castlevania (U) (V1.0) [t3] CRC=0B28EBA3 5E062616 RefMD5=1CC5CF3B4D29D8C3ADE957648B529DC1 [8ADA90FBD3313D5080007905D183CBD4] GoodName=Castlevania (U) (V1.0) [t4] CRC=0B28EBA3 5E062616 RefMD5=1CC5CF3B4D29D8C3ADE957648B529DC1 [06B58673F7D31C56F8FE8186E86F6BD6] GoodName=Castlevania (U) (V1.2) [!] CRC=4BCDFF47 AAA3AF8F Players=1 SaveType=Controller Pack [78D5F8A98A5ED21D0817856BCD2AD750] GoodName=Castlevania - Legacy of Darkness (E) (M3) [!] CRC=A2C54BE7 6719CBB2 Players=1 SaveType=Controller Pack [3152B82C03FC7B928D3D5C43F95AEF51] GoodName=Castlevania - Legacy of Darkness (E) (M3) [h1C] CRC=A2C54BE7 6719CBB2 RefMD5=78D5F8A98A5ED21D0817856BCD2AD750 [45EF2794A1AC6AD737288A6577D55194] GoodName=Castlevania - Legacy of Darkness (E) (M3) [o1] CRC=A2C54BE7 6719CBB2 RefMD5=78D5F8A98A5ED21D0817856BCD2AD750 [25258460F98F567497B24844ABE3A05B] GoodName=Castlevania - Legacy of Darkness (U) [!] CRC=1CC06338 87388926 Players=1 SaveType=Controller Pack [5F73634C622ABEDF6204CB801872C79C] GoodName=Castlevania - Legacy of Darkness (U) [b1] CRC=1CC06338 87388926 RefMD5=25258460F98F567497B24844ABE3A05B [2D6ABF559A9AAE65BBEB0E60B3F82D1B] GoodName=Castlevania - Legacy of Darkness (U) [f1] (PAL) CRC=0CE3D2E6 6C6E443D RefMD5=25258460F98F567497B24844ABE3A05B [DE4CA7C5F9DD9216771451A5AFF9F634] GoodName=Castlevania - Legacy of Darkness (U) [f2] (PAL) CRC=7FD0761E 2190A9ED RefMD5=25258460F98F567497B24844ABE3A05B [956FCD46E850E9D10E623C6749D5524E] GoodName=Castlevania - Legacy of Darkness (U) [t1] CRC=64B62D16 43A2A592 RefMD5=25258460F98F567497B24844ABE3A05B [31FB88048076ACE4BD4205C5F40414AB] GoodName=Centre Court Tennis (E) [!] CRC=DCCF2134 9DD63578 Players=4 [F52661EF93B9FD4DF16F1F113082AEAA] GoodName=Centre Court Tennis (E) [f1] (NTSC) CRC=B6C4F400 92A39D47 RefMD5=31FB88048076ACE4BD4205C5F40414AB [53EE0172E29CDCBBFA5957A442863E5A] GoodName=Centre Court Tennis (E) [h1C] CRC=DCCF2134 9DD63578 RefMD5=31FB88048076ACE4BD4205C5F40414AB [1CD90B13B7FD6AFDCB838F801D807826] GoodName=Chameleon Twist (E) [!] CRC=B9AF8CC6 DEC9F19F Players=4 SaveType=Eeprom 4KB [AB7D5366FEDCF8EC2D414B6001BEB399] GoodName=Chameleon Twist (E) [b1] CRC=B9AF8CC6 DEC9F19F RefMD5=1CD90B13B7FD6AFDCB838F801D807826 [7C74D08A04B6B1B670D90CDB153F083C] GoodName=Chameleon Twist (E) [b2] CRC=B9AF8CC6 DEC9F19F RefMD5=1CD90B13B7FD6AFDCB838F801D807826 [2151AB8629DACD8936439FC90F0AFD10] GoodName=Chameleon Twist (E) [b3] CRC=B9AF8CC6 DEC9F19F RefMD5=1CD90B13B7FD6AFDCB838F801D807826 [3682AEBA1DA191A1CB2C513B1F834F70] GoodName=Chameleon Twist (E) [f1] (NTSC) CRC=4191BA80 41C5E21A RefMD5=1CD90B13B7FD6AFDCB838F801D807826 [C71750C4B84081F3331D957D3FE932AD] GoodName=Chameleon Twist (E) [o1] CRC=B9AF8CC6 DEC9F19F RefMD5=1CD90B13B7FD6AFDCB838F801D807826 [3728BE19FDCFC3ECEBD8C7504C13D1F5] GoodName=Chameleon Twist (E) [o2] CRC=B9AF8CC6 DEC9F19F RefMD5=1CD90B13B7FD6AFDCB838F801D807826 [C0EB519122D63A944A122437EC1B98EE] GoodName=Chameleon Twist (J) [!] CRC=A4F2F521 F0EB168E Players=4 SaveType=Eeprom 4KB [397BE52D4FB7DF1E26C6275E05425571] GoodName=Chameleon Twist (U) [!] CRC=6420535A 50028062 SaveType=Eeprom 4KB Players=4 [AB299B3943161B9C2ABF03F5A9824E9F] GoodName=Chameleon Twist (U) [b1] CRC=6420535A 50028062 RefMD5=397BE52D4FB7DF1E26C6275E05425571 [959E64F082449BDBD0E5164C32491470] GoodName=Chameleon Twist (U) [b2] CRC=6420535A 50028062 RefMD5=397BE52D4FB7DF1E26C6275E05425571 [277D852DF9C71BE8DCBA01BA8C862482] GoodName=Chameleon Twist (U) [b3] CRC=6420535A 50028062 RefMD5=397BE52D4FB7DF1E26C6275E05425571 [0A04F5F5938218B510A573B86967B199] GoodName=Chameleon Twist (U) [t1] CRC=1CD50DF2 345593AF RefMD5=397BE52D4FB7DF1E26C6275E05425571 [45D1D039AB7926ADC748DE640AFD986A] GoodName=Chameleon Twist 2 (E) [!] CRC=07A69D01 9A7D41A1 Players=1 SaveType=Controller Pack [3A5EDF7256EA5E7AF4B451E07CC54003] GoodName=Chameleon Twist 2 (E) [b1] CRC=07A69D01 9A7D41A1 RefMD5=45D1D039AB7926ADC748DE640AFD986A [A55AF433E65E3690E2DC2B16018E9A0F] GoodName=Chameleon Twist 2 (J) [!] CRC=0549765A 93B9D042 Players=1 SaveType=Controller Pack [7A638431CE966DDA97B282FF04B1D9D7] GoodName=Chameleon Twist 2 (J) [b1] CRC=0549765A 93B9D042 RefMD5=A55AF433E65E3690E2DC2B16018E9A0F [24658C0D8AC2C4FD58A74F13BCA1D16A] GoodName=Chameleon Twist 2 (J) [b2] CRC=7D5772F8 3A6785EF RefMD5=A55AF433E65E3690E2DC2B16018E9A0F [99605763AD74D40D5B2D24CF3F0A3CD5] GoodName=Chameleon Twist 2 (J) [b3] CRC=0549765A 93B9D042 RefMD5=A55AF433E65E3690E2DC2B16018E9A0F [33B9DDDD6D7039CE1C9E6773056A65C8] GoodName=Chameleon Twist 2 (J) [b4] CRC=0549765A 93B9D042 RefMD5=A55AF433E65E3690E2DC2B16018E9A0F [740AD4DB03952BBE997DB09947A41E62] GoodName=Chameleon Twist 2 (J) [o1] CRC=0549765A 93B9D042 RefMD5=A55AF433E65E3690E2DC2B16018E9A0F [4C5F3C38743EBB2D12154A83C026DA46] GoodName=Chameleon Twist 2 (J) [o2] CRC=0549765A 93B9D042 RefMD5=A55AF433E65E3690E2DC2B16018E9A0F [D85C29FD57FE481A34AFBCDB9774395A] GoodName=Chameleon Twist 2 (J) [t1] CRC=7D5772F8 3A6785EF RefMD5=A55AF433E65E3690E2DC2B16018E9A0F [00327E0B5DF6DCE6DECC31353F33A3D3] GoodName=Chameleon Twist 2 (U) [!] CRC=CD538CE4 618AFCF9 Players=1 SaveType=Controller Pack [80F4CD56317218264E35894BA22CAD35] GoodName=Chameleon Twist 2 (U) [t1] CRC=752E1BF8 E81DF66D RefMD5=00327E0B5DF6DCE6DECC31353F33A3D3 [4A3263EAB67FAB2D1171A23765D73AC6] GoodName=Chaos 89 Demo (PD) CRC=EDA1A0C7 58EE0464 [DD53E1F83E8789D23DF6AF942FFEF236] GoodName=Charlie Blast's Territory (E) [!] CRC=FB3C48D0 8D28F69F SaveType=None Players=4 CountPerOp=1 [A7C15E0C1E7D898C1B20276DF7A62660] GoodName=Charlie Blast's Territory (E) [o1] CRC=FB3C48D0 8D28F69F RefMD5=DD53E1F83E8789D23DF6AF942FFEF236 [59FA8C6D533D36C0FFC2AAFAB7166E6F] GoodName=Charlie Blast's Territory (U) [!] CRC=1E0E96E8 4E28826B SaveType=None Players=4 CountPerOp=1 [7FFD84FC7D112EAB4EEF15CB10189A38] GoodName=Charlie Blast's Territory (U) [hIR] CRC=1E0E96E8 4E28826B RefMD5=59FA8C6D533D36C0FFC2AAFAB7166E6F [7CBB43473597F48AA9A8E0B0D38CE685] GoodName=Charlie Blast's Territory (U) [hI] CRC=A6FD0808 6E6B3ECA RefMD5=59FA8C6D533D36C0FFC2AAFAB7166E6F [8F6BED633BE214CF039DBDAC356231CE] GoodName=Chopper Attack (E) [!] CRC=2E359339 3FA5EDA6 Players=1 SaveType=Eeprom 4KB [AC129AB2688C02419FC190A87F2A2E93] GoodName=Chopper Attack (E) [b1] CRC=2E359339 3FA5EDA6 RefMD5=8F6BED633BE214CF039DBDAC356231CE [0A3955C704210225D95937DCAB86C9E3] GoodName=Chopper Attack (E) [t1] CRC=D852E238 0E52A960 RefMD5=8F6BED633BE214CF039DBDAC356231CE [C37E8AFB4F3ECC86D01CE7388CA59347] GoodName=Chopper Attack (U) [!] CRC=214CAD94 BE1A3B24 Players=1 SaveType=Eeprom 4KB [14AEB927F3620EFE48AF7FC748C1931F] GoodName=Chopper Attack (U) [b1] CRC=ACBF6069 EABEE162 RefMD5=C37E8AFB4F3ECC86D01CE7388CA59347 [B8BEA2194D7D75A1711C024F5069D18E] GoodName=Chopper Attack (U) [b2] CRC=214CAD94 BE1A3B24 RefMD5=C37E8AFB4F3ECC86D01CE7388CA59347 [34957B173CD33C999B954E7034FC01EA] GoodName=Chopper Attack (U) [b3] CRC=214CAD94 BE1A3B24 RefMD5=C37E8AFB4F3ECC86D01CE7388CA59347 [B34CBCA3EEE5C010FF3E504AF2064069] GoodName=Chopper Attack (U) [b4] CRC=BF5D6D65 3F4A9C03 RefMD5=C37E8AFB4F3ECC86D01CE7388CA59347 [5FA39EF0EBE18DA55C260A3A89F935B6] GoodName=Chopper Attack (U) [b5] CRC=214CAD94 BE1A3B24 RefMD5=C37E8AFB4F3ECC86D01CE7388CA59347 [64C75E19890ACDE25842A815A21D55C9] GoodName=Chopper Attack (U) [b6] CRC=214CAD94 BE1A3B24 RefMD5=C37E8AFB4F3ECC86D01CE7388CA59347 [F10D601D64786C52CAC1FD0AB5511C82] GoodName=Chopper Attack (U) [t1] CRC=BF5D6D65 3F4A9C03 RefMD5=C37E8AFB4F3ECC86D01CE7388CA59347 [8287A908E36E79B2D3AF0BD22C43ECD9] GoodName=Choro Q 64 (J) [!] CRC=2BCCF9C4 403D9F6F Players=4 SaveType=Eeprom 4KB [2C944319017A21652566CC4196C714CC] GoodName=Choro Q 64 (J) [b1] CRC=2BCCF9C4 403D9F6F RefMD5=8287A908E36E79B2D3AF0BD22C43ECD9 [470E1635A9693102B426A840DBD691E5] GoodName=Choro Q 64 (J) [b2] CRC=2BCCF9C4 403D9F6F RefMD5=8287A908E36E79B2D3AF0BD22C43ECD9 [04A2C1A6EFAE28E07A4AD77603081F86] GoodName=Choro Q 64 (J) [b3] CRC=2BCCF9C4 403D9F6F RefMD5=8287A908E36E79B2D3AF0BD22C43ECD9 [5F4D852BD3B707C1B4FE29F2FE19C687] GoodName=Choro Q 64 (J) [b4] CRC=2BCCF9C4 403D9F6F RefMD5=8287A908E36E79B2D3AF0BD22C43ECD9 [7151AE130BA8DC97A205B62FF0EE0FB6] GoodName=Choro Q 64 (J) [h1C] CRC=2BCCF9C4 403D9F6F RefMD5=8287A908E36E79B2D3AF0BD22C43ECD9 [9081370141079031EBBDBCA56FC8C7D8] GoodName=Choro Q 64 II - Hacha Mecha Grand Prix Race (J) [!] CRC=26CD0F54 53EBEFE0 Players=4 [78838C202C4FF5A460586451EE9182AA] GoodName=Chou Kuukan Night Pro Yakyuu King (J) [!] CRC=8ACE6683 3FBA426E Players=4 [5224CCBE260A4B7713D662D9BC269063] GoodName=Chou Kuukan Night Pro Yakyuu King (J) [b1] CRC=8ACE6683 3FBA426E RefMD5=78838C202C4FF5A460586451EE9182AA [9C39391D103E6DB39CEC6C774EDB082A] GoodName=Chou Kuukan Night Pro Yakyuu King (J) [h1C] CRC=8ACE6683 3FBA426E RefMD5=78838C202C4FF5A460586451EE9182AA [97EAB4DC83DA0AD2890DE2AAAA5D109A] GoodName=Chou Kuukan Night Pro Yakyuu King 2 (J) [!] CRC=3A180FF4 5C8E8AF7 Players=4 [9466618F4497DA6C9091E05CC9666786] GoodName=Chou Snobow Kids (J) [!] CRC=A7941528 61F1199D Players=4 SaveType=Eeprom 4KB [74341014043CC42D8804DADBF252B344] GoodName=Chou Snobow Kids (J) [f1] (PAL) CRC=2FEB152B 9C205EA5 RefMD5=9466618F4497DA6C9091E05CC9666786 [BA145D51B681EF4432DB59C1DA703047] GoodName=Christmas Flame Demo by Halley's Comet Software (PD) CRC=B484EB31 D44B1928 [2A0BF5A9A136D57AF01D199B16899634] GoodName=City-Tour GP - Zennihon GT Senshuken (J) [!] CRC=F8009DB0 6B291823 Players=4 SaveType=Eeprom 4KB CountPerOp=1 [4808E8129B22AC8B3185B37243113005] GoodName=City-Tour GP - Zennihon GT Senshuken (J) [b1] CRC=F8009DB0 6B291823 RefMD5=2A0BF5A9A136D57AF01D199B16899634 [2BD614A2A1A317ECBEEB4193954C5FA5] GoodName=City-Tour GP - Zennihon GT Senshuken (J) [b2] CRC=F8009DB0 6B291823 RefMD5=2A0BF5A9A136D57AF01D199B16899634 [E226801C0B57FD2F2D2E303986DB5E5C] GoodName=City-Tour GP - Zennihon GT Senshuken (J) [b3] CRC=F8009DB0 6B291823 RefMD5=2A0BF5A9A136D57AF01D199B16899634 [30E7E083B978408D5B7760D0CE4DC61D] GoodName=Clay Fighter - Sculptor's Cut (U) [!] CRC=FA5A3DFF B4C9CDB9 SaveType=None Players=4 [052BB2C8C4174633A0D38DEB4D31C719] GoodName=Clay Fighter - Sculptor's Cut (U) [b1] CRC=FA5A3DFF B4C9CDB9 RefMD5=30E7E083B978408D5B7760D0CE4DC61D [D47AB8CA78D9686A7021EBBBA00B0AA0] GoodName=Clay Fighter - Sculptor's Cut (U) [b2] CRC=FA5A3DFF B4C9CDB9 RefMD5=30E7E083B978408D5B7760D0CE4DC61D [B8047551F6E44E367862E9BC9C2A4DDF] GoodName=Clay Fighter - Sculptor's Cut (U) [h1C] CRC=FA5A3DFF B4C9CDB9 RefMD5=30E7E083B978408D5B7760D0CE4DC61D [CCD869C8D45C3998ADDCBF43791D6C56] GoodName=Clay Fighter - Sculptor's Cut (U) [h2C] CRC=FA5A3DFF B4C9CDB9 RefMD5=30E7E083B978408D5B7760D0CE4DC61D [CD00C317003B03CD0BBEEC4570D2B55D] GoodName=Clay Fighter - Sculptor's Cut (U) [t1] CRC=6C48FE11 8E1A27EC RefMD5=30E7E083B978408D5B7760D0CE4DC61D [CBBEAFF5A9074D1A5507CF46CD683D36] GoodName=Clay Fighter 63 1-3 (Beta) [!] CRC=2B6FA7C0 09A71225 [BE41BA94878999987DC8D2FD3A5551D9] GoodName=Clay Fighter 63 1-3 (Beta) [b1] CRC=2B6FA7C0 09A71225 [41965B533F3DD95663361D9DF68B0C1F] GoodName=Clay Fighter 63 1-3 (E) [!] CRC=8E9692B3 4264BB2A Players=4 SaveType=None [46B95EA3EB82654439A6750443BCDE53] GoodName=Clay Fighter 63 1-3 (E) [b1][h1C] CRC=8E9692B3 4264BB2A RefMD5=41965B533F3DD95663361D9DF68B0C1F [2084974C9098B2D01C1F58B0E56EE058] GoodName=Clay Fighter 63 1-3 (E) [h1C] CRC=8E9692B3 4264BB2A RefMD5=41965B533F3DD95663361D9DF68B0C1F [3207BF22E305C488109B09A03706F36F] GoodName=Clay Fighter 63 1-3 (U) [!] CRC=F03C24CA C5237BCC Players=4 SaveType=None [7A4ACAB8997D180C045D9286C917ED1B] GoodName=Clay Fighter 63 1-3 (U) [b1] CRC=F03C24CA C5237BCC RefMD5=3207BF22E305C488109B09A03706F36F [0EDBCB64159B7E32DDA165A7A363AB35] GoodName=Clay Fighter 63 1-3 (U) [b2] CRC=F03C24CA C5237BCC RefMD5=3207BF22E305C488109B09A03706F36F [D41EE755C8DDF4BBD5E368670C672488] GoodName=Clay Fighter 63 1-3 (U) [o1] CRC=2B6FA7C0 09A71225 RefMD5=3207BF22E305C488109B09A03706F36F [6746F4CC43ACEBF3F04B1677B16C1935] GoodName=Clay Fighter 63 1-3 (U) [o2] CRC=F03C24CA C5237BCC RefMD5=3207BF22E305C488109B09A03706F36F [0E38732BC5F564D74D57EF0A0CBA8D56] GoodName=Cliffi's Little Intro by Cliffi (POM '99) (PD) [b1] CRC=10637557 03E93693 [BE2AB7CD9DBDDA8DDAE1EA288C663F15] GoodName=Cliffi's Little Intro by Cliffi (POM '99) (PD) CRC=4B0313E2 65657446 [42DA4C7D040F9E7CD046A42EC3E68027] GoodName=Command & Conquer (E) (M2) [!] CRC=AE5B9465 C54D6576 Players=1 SaveType=Flash RAM [4D972AE7FAA1AA3ED26026F6F46C8A6A] GoodName=Command & Conquer (E) (M2) [b1] CRC=AE5B9465 C54D6576 RefMD5=42DA4C7D040F9E7CD046A42EC3E68027 [C0CC62AC4B06416C9DB5B765ADE5F626] GoodName=Command & Conquer (E) (M2) [b2] CRC=AE5B9465 C54D6576 RefMD5=42DA4C7D040F9E7CD046A42EC3E68027 [1D26E8B65CD2F1BF1EABAFFDBBFC1F26] GoodName=Command & Conquer (E) (M2) [b3] CRC=AE5B9465 C54D6576 RefMD5=42DA4C7D040F9E7CD046A42EC3E68027 [E19F762182F4B4ADF5D8F6D998033059] GoodName=Command & Conquer (E) (M2) [f1] (Z64) CRC=EA630EC7 2B2F37F3 RefMD5=42DA4C7D040F9E7CD046A42EC3E68027 [1A9195662C89DCBEA88BCFA99B096CDE] GoodName=Command & Conquer (G) [!] CRC=B5025BAD D32675FD Players=1 SaveType=Flash RAM [19A646E0148EA6695E797C1990919B8A] GoodName=Command & Conquer (G) [f1] (Z64) CRC=705AC38A A8D714E8 RefMD5=1A9195662C89DCBEA88BCFA99B096CDE [B436F4717AC585B0D847756468FD6393] GoodName=Command & Conquer (U) [!] CRC=95286EB4 B76AD58F Players=1 SaveType=Flash RAM [57044E8F223D117F55B22E7FD2EDF71E] GoodName=Command & Conquer (U) [b1] CRC=F921961E E09D8B11 RefMD5=B436F4717AC585B0D847756468FD6393 [715D537C6D78440C085DDD22E827C260] GoodName=Command & Conquer (U) [f1] (Z64) CRC=22AD2E8E 73CC712C RefMD5=B436F4717AC585B0D847756468FD6393 [B206F917C1B4FD41CDADC4064C48B07B] GoodName=Congratulations Demo for SPLiT by Widget and Immortal (PD) [b1] CRC=D2B908C8 E0E73A1D [2616B2901F794EADFD26D5FA2BF5564D] GoodName=Congratulations Demo for SPLiT by Widget and Immortal (PD) CRC=D2B908C8 E0E73A1D [05194D49C14E52055DF72A54D40791E1] GoodName=Conker's Bad Fur Day (E) [!] CRC=373F5889 9A6CA80A SaveType=Eeprom 16KB Players=4 [00E2920665F2329B95797A7EAABC2390] GoodName=Conker's Bad Fur Day (U) [!] CRC=30C7AC50 7704072D SaveType=Eeprom 16KB Players=4 [DB7A03B77D44DB81B8A3FCDFC4B72D8C] GoodName=Cruis'n Exotica (U) [!] CRC=46A3F7AF 0F7591D0 SaveType=Eeprom 4KB Players=2 [A8266778591994EFA3A3B9E6E806F8C8] GoodName=Cruis'n Exotica (U) [t1] CRC=1E4C4743 FEA2C4D1 RefMD5=DB7A03B77D44DB81B8A3FCDFC4B72D8C [69CD5BA6BC9310B9E37CCB1BC6BD16AD] GoodName=Cruis'n USA (E) [!] CRC=503EA760 E1300E96 Players=2 SaveType=Eeprom 4KB [00A3E885F8D899646228A21D946B2102] GoodName=Cruis'n USA (U) (V1.0) [!] CRC=FF2F2FB4 D161149A Players=2 SaveType=Eeprom 4KB [190906A8A5F1C1D4909F6374A784ECA4] GoodName=Cruis'n USA (U) (V1.0) [T+Ita0.40] CRC=FF2F2FB4 D161149A RefMD5=00A3E885F8D899646228A21D946B2102 [635C94434922DC73C58965004E3F699D] GoodName=Cruis'n USA (U) (V1.0) [b1] CRC=FF2F2FB4 D161149A RefMD5=00A3E885F8D899646228A21D946B2102 [D37AB17D3E27ED333704C44DCFAA28E7] GoodName=Cruis'n USA (U) (V1.0) [b2] CRC=FF2F2FB4 D161149A RefMD5=00A3E885F8D899646228A21D946B2102 [1D4843F0C69E273A1099A4267BB9F526] GoodName=Cruis'n USA (U) (V1.0) [b3] CRC=FF2F2FB4 D161149A RefMD5=00A3E885F8D899646228A21D946B2102 [B0679C685A1FB4D2BA96E4BB941262DE] GoodName=Cruis'n USA (U) (V1.0) [b4] CRC=FF2F2FB4 D161149A RefMD5=00A3E885F8D899646228A21D946B2102 [A8D5B5F1902AFB1346D97A9D0D52B292] GoodName=Cruis'n USA (U) (V1.0) [b5] CRC=FF2F2FB4 D161149A RefMD5=00A3E885F8D899646228A21D946B2102 [45FC88E2BA6711F25F0DE988E719DF29] GoodName=Cruis'n USA (U) (V1.1) [!] CRC=5306CF45 CBC49250 Players=2 SaveType=Eeprom 4KB [2838A9018AD2BCB8B7F6161C746A1B71] GoodName=Cruis'n USA (U) (V1.2) [!] CRC=B3402554 7340C004 Players=2 SaveType=Eeprom 4KB [AF950A1B6C460D7FC3E78375D35047EF] GoodName=Cruis'n World (E) [!] CRC=83F3931E CB72223D SaveType=Eeprom 16KB Players=4 [626478CC0790B1452045A3D853B46C18] GoodName=Cruis'n World (E) [b1] CRC=312E2FC5 CB76AB4D RefMD5=AF950A1B6C460D7FC3E78375D35047EF [942A09966EC752A5EE81D042AF11D4BB] GoodName=Cruis'n World (E) [b2] CRC=AFF44E2D 2ECB9679 RefMD5=AF950A1B6C460D7FC3E78375D35047EF [B22A6E184CB0657882CB4D6A81534254] GoodName=Cruis'n World (E) [f1] CRC=AFF44E2D 2ECB9679 RefMD5=AF950A1B6C460D7FC3E78375D35047EF [0BD71426A0240CA4D871A8F54B7761F0] GoodName=Cruis'n World (E) [f2] CRC=AFF44E2D 2ECB9679 RefMD5=AF950A1B6C460D7FC3E78375D35047EF [12CE267F5D538C2959BDEBA5E87BDE79] GoodName=Cruis'n World (E) [f3] (NTSC) CRC=AF3E4E2D 9C63E651 RefMD5=AF950A1B6C460D7FC3E78375D35047EF [AADA4CBD938E58A447B399A1D46F03E6] GoodName=Cruis'n World (U) [!] CRC=DFE61153 D76118E6 SaveType=Eeprom 16KB Players=4 [B97C963235635672CBEAB35154DFDFA2] GoodName=Cruis'n World (U) [b1] CRC=E2A32049 46E8F8E2 RefMD5=AADA4CBD938E58A447B399A1D46F03E6 [82C6213EF921BF2805B3CA7CA4F08BFB] GoodName=Cruis'n World (U) [b2] CRC=E2A32049 46E8F8E2 RefMD5=AADA4CBD938E58A447B399A1D46F03E6 [63DA3150AC7B603187DE3951A3270F6E] GoodName=Cruis'n World (U) [b3] CRC=DFE61153 D76118E6 RefMD5=AADA4CBD938E58A447B399A1D46F03E6 [4BCDE237F4A390A564369696D0579760] GoodName=Cruis'n World (U) [f1] CRC=E2A32049 46E8F8E2 RefMD5=AADA4CBD938E58A447B399A1D46F03E6 [AD4A781024E29F4A735CB4B87F2D59DB] GoodName=Cruis'n World (U) [o1] CRC=DFE61153 D76118E6 RefMD5=AADA4CBD938E58A447B399A1D46F03E6 [8D4DAA86BF542D8A55460F56C52F7D02] GoodName=Cube Demo (PD) CRC=0E3ED77B 8E1C26FD [6F936ECE2BA8EA8C74BDBBA9BDA1407A] GoodName=Cube Demo (PD) [b1] CRC=0E3ED77B 8E1C26FD RefMD5=8D4DAA86BF542D8A55460F56C52F7D02 [9A3014ED85F796CCB836E85E78D2618A] GoodName=Cube Demo (PD) [b2] CRC=0E3ED77B 8E1C26FD RefMD5=8D4DAA86BF542D8A55460F56C52F7D02 [827CFFD3648116511ED2D5DA76C83FBB] GoodName=Cube Demo by Msftug (PD) CRC=37BDF228 92CF779C [A06D2E83CF2628915E8847F609474661] GoodName=Custom Robo (J) [!] CRC=83CB0B87 7E325457 Players=4 [115118DD5E0F02D82BA1BF070A7B78F1] GoodName=Custom Robo V2 (J) [!] CRC=079501B9 AB0232AB Players=4 [8C4A4CD472D610CDA5459B3A92F21D30] GoodName=CyberTiger (E) [!] CRC=D1A78A07 52A3DD3E Players=4 SaveType=Controller Pack [88072F30D4F9CF384B2B3A0300649218] GoodName=CyberTiger (U) [!] CRC=E8FC8EA1 9F738391 Players=4 SaveType=Controller Pack [9801AAA87D650C42B021F94D5C34C7A4] GoodName=DKONG Demo (PD) CRC=B323E37C BBC35EC4 [F0D62C8FD773F55A34EAAC20D3B95F17] GoodName=DS1 Manager V1.0 by R. Bubba Magillicutty (PD) CRC=1194FFD2 808C6FB1 [4F94D90294D6E5C1FC116E073DD3F542] GoodName=DS1 Manager V1.1 by R. Bubba Magillicutty (PD) CRC=D7484C2A 56CFF26D [52037ED117D09F46F82C3F72044366E7] GoodName=DS1 SRAM Manager V1.1 by _Sage_ (PD) CRC=201DA461 EC0C992B [3A1488C2A8A8F2AB9368D7C056EB02A2] GoodName=Dance Dance Revolution - Disney Dancing Museum (J) [!] CRC=7188F445 84410A68 Players=2 [0B86FA9259E2B751111A1701091644B1] GoodName=Dance Dance Revolution - Disney Dancing Museum (J) [o1] CRC=7188F445 84410A68 RefMD5=3A1488C2A8A8F2AB9368D7C056EB02A2 [885A29B9A52183B96E5D636F2B765231] GoodName=Dance Dance Revolution - Disney Dancing Museum (J) [o2] CRC=7188F445 84410A68 RefMD5=3A1488C2A8A8F2AB9368D7C056EB02A2 [4242FDE5B74F22AAF5746459E126121F] GoodName=Dark Rift (E) [!] CRC=7ED67CD4 B4415E6D Players=2 SaveType=None Rumble=No [0DD2887AF64C5786C1C66877AFCC0B97] GoodName=Dark Rift (E) [b1] CRC=7ED67CD4 B4415E6D RefMD5=4242FDE5B74F22AAF5746459E126121F [ECB170EBBFDA0E932C07524040BCC36C] GoodName=Dark Rift (U) [!] CRC=A4A52B58 23759841 Players=2 SaveType=None Rumble=No [CBFEAD02C508DADFB44A00E7F7ED61B8] GoodName=Dark Rift (U) [t1] CRC=DAA66890 ED4CCD04 RefMD5=ECB170EBBFDA0E932C07524040BCC36C [A2A4A0318DAB366A595336B6F80FF3AB] GoodName=Deadly Arts (U) [!] CRC=F5363349 DBF9D21B Players=4 SaveType=Controller Pack [F403FCEB3FCD41BB5830142989FC9486] GoodName=Deadly Arts (U) [b1] CRC=F5363349 DBF9D21B RefMD5=A2A4A0318DAB366A595336B6F80FF3AB [C644E318B33C4EBD94695C0C3E1E80FF] GoodName=Defi au Tetris Magique (F) [!] CRC=3F66A9D9 9BCB5B00 SaveType=None Players=4 [772FA166E5DB51EFFC77FB8D832AC4D2] GoodName=Densha de Go! 64 (J) [!] CRC=17C54A61 4A83F2E7 Players=1 [BA99C445ADC6994C97FE6463F3E0EC10] GoodName=Densha de Go! 64 (J) [f1] (PAL) CRC=CF138879 2A6144CB RefMD5=772FA166E5DB51EFFC77FB8D832AC4D2 [1051E1402EE110F3C5E372C9E1C5B338] GoodName=Derby Stallion 64 (J) (Beta) CRC=96BA4EFB C9988E4E [7F57463856540104B21A5289312B626F] GoodName=Derby Stallion 64 (J) [!] CRC=A5F667E1 DA1FBD1F Players=4 [BDA717ECC8434F12F313342485828B58] GoodName=Destruction Derby 64 (E) (M3) [!] CRC=630AA37D 896BD7DB Players=4 SaveType=Controller Pack CountPerOp=1 [7FCCB47498EEC06E96AE9372247D1E90] GoodName=Destruction Derby 64 (U) [!] CRC=DEE584A2 0F161187 Players=4 SaveType=Controller Pack CountPerOp=1 [02EEF6ED11174664A548626337879E8C] GoodName=Destruction Derby 64 (U) [f1] (PAL) CRC=8637C692 CAD23999 RefMD5=7FCCB47498EEC06E96AE9372247D1E90 [825EA802BC3CBA523667B64DD696C597] GoodName=Destruction Derby 64 (U) [t1] CRC=8637BEAA 9B0EB296 RefMD5=7FCCB47498EEC06E96AE9372247D1E90 [6D75719BFA6244C4591070D3F7356072] GoodName=Dexanoid R1 by Protest Design (PD) CRC=76712159 35666812 Players=1 SaveType=None Status=3 Rumble=No [875FA77726E7CD99BD410E3FC86C7777] GoodName=Dexanoid R1 by Protest Design (PD) [b1] CRC=1EDA4DE0 22BF698D RefMD5=6D75719BFA6244C4591070D3F7356072 [CF2276AFD84E06AC780DBA2E0EA4806D] GoodName=Dexanoid R1 by Protest Design (PD) [f1] (PAL) CRC=CFEAACE9 1D532607 RefMD5=6D75719BFA6244C4591070D3F7356072 [AE13E575386775E766F0E00AD2A40C9E] GoodName=Dexanoid R1 by Protest Design (PD) [f2] (PAL) CRC=3C7AEE05 56099CB6 RefMD5=6D75719BFA6244C4591070D3F7356072 [8E4D5C6D95EFD1C94BB13644F7672909] GoodName=Dexanoid R1 by Protest Design (PD) [t1] CRC=0EC580B5 EBEE9C03 RefMD5=6D75719BFA6244C4591070D3F7356072 [54BE265E7B2C28AB92BF1A4130ACB5A2] GoodName=Dezaemon 3D (J) [!] CRC=8979169C F189F6A0 Players=1 [01E34CD8A451F0B5AEF93CCF9ADB37AF] GoodName=Dezaemon 3D (J) [b1] CRC=8979169C F189F6A0 RefMD5=54BE265E7B2C28AB92BF1A4130ACB5A2 [60A5F3E1E94F696BF5384022247B4059] GoodName=Dezaemon 3D (J) [b1][t1] CRC=33487563 AC0AE62A RefMD5=54BE265E7B2C28AB92BF1A4130ACB5A2 [358941CA393F6D7415E99B28D49CCF68] GoodName=Dezaemon 3D (J) [b2] CRC=8979169C F189F6A0 RefMD5=54BE265E7B2C28AB92BF1A4130ACB5A2 [108B1A72E6F93E6935E1AD8D619797DB] GoodName=Dezaemon 3D (J) [t1] CRC=33487563 AC0AE62A RefMD5=54BE265E7B2C28AB92BF1A4130ACB5A2 [0F0B7B78B345FBF2581D834CB4A81245] GoodName=Diddy Kong Racing (E) (M3) (V1.0) [!] CRC=FD73F775 9724755A Players=4 SaveType=Eeprom 4KB [79748E4E030B047DBAE8252C21305C75] GoodName=Diddy Kong Racing (E) (M3) (V1.0) [f1] CRC=85443325 77D72F56 RefMD5=0F0B7B78B345FBF2581D834CB4A81245 [542FED7864218156EA90050013CD048E] GoodName=Diddy Kong Racing (E) (M3) (V1.0) [o1] CRC=FD73F775 9724755A RefMD5=0F0B7B78B345FBF2581D834CB4A81245 [6B2BAFE540E0AF052A78E85B992BE999] GoodName=Diddy Kong Racing (E) (M3) (V1.1) [!] CRC=596E145B F7D9879F Players=4 SaveType=Eeprom 4KB [35CF26D4D33717BA730D7978E2F2107D] GoodName=Diddy Kong Racing (E) (M3) (V1.1) [f1] (Z64) CRC=D84C17CA 13F8F651 RefMD5=6B2BAFE540E0AF052A78E85B992BE999 [0D68A405BCB04318A294DBEABF1DE063] GoodName=Diddy Kong Racing (J) [f1] (Z64) CRC=F389A35A 17785562 Players=4 SaveType=Eeprom 4KB [10747662A55241B9234CD114C940504F] GoodName=Diddy Kong Racing (J) CRC=7435C9BB 39763CF4 Players=4 SaveType=Eeprom 4KB [4F0E07F0EEAC7E5D7CE3A75461888D03] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [!] CRC=53D440E7 7519B011 Players=4 SaveType=Eeprom 4KB [94D81D14A2D768DD0EDA3A845AFB25CD] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [T+Bra_EmuBrazil] CRC=53D440E7 7519B011 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [49551E729A39F9640058AB5771A49311] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [b1] CRC=D5295672 9CB57015 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [DBE3F0869F817DCD52A5CB9D43BB4FD1] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [b2] CRC=D5295672 9CB57015 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [AB34FECD9A7A1030EC0892328F9CEF8A] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [b3] CRC=D5295672 9CB57015 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [699A6BA5281EA0C83190E9D45C708C26] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [b4] CRC=D5295672 9CB57015 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [F388EE4148A7A4A2C8A815823D23149C] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [b5] CRC=D5295672 9CB57015 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [C980D2C07B98452110A3A8E52DB5DA88] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [b6] CRC=D5295672 9CB57015 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [07703E5A6268EEDF552FE770F24273A7] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [b7] CRC=D5295672 9CB57015 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [A3551578B7298A2E4719A9108E0AA37B] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [f1] CRC=D5295672 9CB57015 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [1236FB3FC8464B559BDEDFA966D6679F] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [f1][h1C] CRC=D5295672 9CB57015 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [A1D47DB4C6B93C78FE55CBFC1BB28D28] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [f2] CRC=D5295672 9CB57015 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [B4E658DFF037706FFB2EB64F1DFDBB3F] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [f3] CRC=E9C8E262 A1D5FACA RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [FA94645F1A15ABA440AD0136ED92E9D1] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [f4] CRC=2954A98F C2236510 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [511833A46BE4E00D1B3655C88E278422] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [o1] CRC=53D440E7 7519B011 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [DF4FC3C46307527707F9106E75074829] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [o1][f1] CRC=D5295672 9CB57015 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [422FD8833F865C4A6C17FCAC4450A69E] GoodName=Diddy Kong Racing (U) (M2) (V1.0) [o2] CRC=53D440E7 7519B011 RefMD5=4F0E07F0EEAC7E5D7CE3A75461888D03 [B31F8CCA50F31ACC9B999ED5B779D6ED] GoodName=Diddy Kong Racing (U) (M2) (V1.1) [!] CRC=E402430D D2FCFC9D Players=4 SaveType=Eeprom 4KB [FBCCFED51A43B0012CE927CC73D6AADA] GoodName=Diddy Kong Racing SRAM by Group5 (PD) CRC=9F35059D 48B7F411 Players=4 SaveType=SRAM [0E0E920AB13EF13508F5A98CC4CD2FF8] GoodName=Disney's Donald Duck - Goin' Quackers (U) [!] CRC=C16C421B A21580F7 Players=1 SaveType=Eeprom 4KB CountPerOp=3 [BD1DE2FC1CF31096423563A40ECBF933] GoodName=Disney's Tarzan (E) [!] CRC=D614E5BF A76DBCC1 Players=1 SaveType=Controller Pack CountPerOp=1 [AF740B224E5DD0BD09F7254811559ADF] GoodName=Disney's Tarzan (E) [h1C] CRC=D614E5BF A76DBCC1 RefMD5=BD1DE2FC1CF31096423563A40ECBF933 [5D82E903F65341487DDC11AF80AD607A] GoodName=Disney's Tarzan (F) [!] CRC=001A3BD0 AFB3DE1A Players=1 SaveType=Controller Pack CountPerOp=1 [DF3CDD959E8C63B45F557FC197CE0E63] GoodName=Disney's Tarzan (G) [!] CRC=4C261323 4F295E1A Players=1 SaveType=Controller Pack CountPerOp=1 [A29E203DDB6293B7D105BF4A2EEEDD1E] GoodName=Disney's Tarzan (G) [h1C] CRC=4C261323 4F295E1A RefMD5=DF3CDD959E8C63B45F557FC197CE0E63 [EAE7E0EE5328ED9F13B9CF9990189928] GoodName=Disney's Tarzan (U) [!] CRC=CBFE69C7 F2C0AB2A Players=1 SaveType=Controller Pack CountPerOp=1 [C56AD8ABD0FB5EFEF1FA0229F9A2EFF0] GoodName=Disney's Tarzan (U) [f1] (PAL) CRC=988C4CC3 C9F310C5 RefMD5=EAE7E0EE5328ED9F13B9CF9990189928 [CC8B0A9F15B92D68963668A3495A6BF6] GoodName=Disney's Tarzan (U) [f2] (PAL) CRC=8BDDD635 EC0E9198 RefMD5=EAE7E0EE5328ED9F13B9CF9990189928 [E9C2B20EA27E6CAB89842AF4D768724E] GoodName=Disney's Tarzan (U) [t1] CRC=8BEE2831 D09BC906 RefMD5=EAE7E0EE5328ED9F13B9CF9990189928 [38DCF67CBA39A84108ADF48EE53544B0] GoodName=Display List Ate My Mind Demo by Kid Stardust (PD) CRC=887C368D D1663AA2 [A92F9FCD93D20778ED8FF15546BB30F5] GoodName=Doctor V64 BIOS V1.01 CRC=204F4E4C 59000000 [3509A4E21E43CEDBD704F8A1192C31DF] GoodName=Doctor V64 BIOS V1.02 CRC=204F4E4C 59000000 [A7BD2F54D9646D43A2A4AD388450223B] GoodName=Doctor V64 BIOS V1.03 CRC=204F4E4C 59000000 [30E25793ACC95529F8C69A55C6679E73] GoodName=Doctor V64 BIOS V1.04 CRC=204F4E4C 59000000 [9B69D303AFFA2CD9ABA96C21A2C21476] GoodName=Doctor V64 BIOS V1.05 CRC=204F4E4C 59000000 [ADE88A1544D469D77D4568364EF25319] GoodName=Doctor V64 BIOS V1.08 CRC=204F4E4C 59000000 [1C0FCFC7B304698F77069A5F31D27DE1] GoodName=Doctor V64 BIOS V1.09 CRC=204F4E4C 59000000 [A133F08F88F6D49E1D23D051524AD094] GoodName=Doctor V64 BIOS V1.10 CRC=204F4E4C 59000000 [601E5335E43F83676F9F341B57D03611] GoodName=Doctor V64 BIOS V1.10r (RBubba Hack) CRC=204F4E4C 59000000 [4AFA73E31031C0F582C11CDA47CC8729] GoodName=Doctor V64 BIOS V1.11 CRC=204F4E4C 59000000 [AAC7B04083FB1B9AC5B478AD89D8D3BA] GoodName=Doctor V64 BIOS V1.21 CRC=00000000 00000000 [4EAE45340300293065CEF5B598C0AC6E] GoodName=Doctor V64 BIOS V1.22 CRC=00000000 00000000 [ED9D2C04A7A0934372216ED8321EA6E3] GoodName=Doctor V64 BIOS V1.30 CRC=204F4E4C 59000000 [041813684340CE4D988B2EBA341CE5C5] GoodName=Doctor V64 BIOS V1.31 (Blue) CRC=204F4E4C 59000000 [2DF942636FB2BF924844A8F4129913BE] GoodName=Doctor V64 BIOS V1.31 CRC=204F4E4C 59000000 [B978DD8BA5F4DAC6850B7D1297EB1F11] GoodName=Doctor V64 BIOS V1.32 CRC=00000000 00000000 [F015AE0F3AD80975FB21B43EF7F14422] GoodName=Doctor V64 BIOS V1.33 CRC=00000000 00000000 [F9D9666DE2F946C9A7D6173DFADF9A81] GoodName=Doctor V64 BIOS V1.33b CRC=204F4E4C 59000000 [E60CE3D4354066CFD80129CB6C2466D5] GoodName=Doctor V64 BIOS V1.40 CRC=204F4E4C 59000000 [D62566C4A47396BFC97173D8CF468A5D] GoodName=Doctor V64 BIOS V1.40b CRC=00000000 00000000 [22134E81100D2854323B064EDD98AAC4] GoodName=Doctor V64 BIOS V1.41 CRC=204F4E4C 59000000 [25D9CDCD8C23AF6559228C4435FF0CB3] GoodName=Doctor V64 BIOS V1.41b CRC=00000000 00000000 [69A7D3A2F2805BC2FC84DB917F8AF592] GoodName=Doctor V64 BIOS V1.50 CRC=204F4E4C 59000000 [9516794650A56E60353135BB9A63C872] GoodName=Doctor V64 BIOS V1.51 CRC=204F4E4C 59000000 [FCB5472F929C8DA0DAED4C0984F8053B] GoodName=Doctor V64 BIOS V1.52 (CH2 Hack) CRC=204F4E4C 59000000 [27369BF665AD2FE9F23C6C6D202AA5E8] GoodName=Doctor V64 BIOS V1.52 CRC=204F4E4C 59000000 [941BA29D2945FA5C903FB0FC6491AC62] GoodName=Doctor V64 BIOS V1.53 CRC=00000000 00000000 [E7C2944774E1610EE6DF7358717B5DA3] GoodName=Doctor V64 BIOS V1.60 CRC=00000000 00000000 [B85FCEC60C7BEA9106BD9B9C14479EE7] GoodName=Doctor V64 BIOS V1.61 CRC=00000000 00000000 [D4BC7E3227225E303A7F6491C1DBB4CB] GoodName=Doctor V64 BIOS V1.70 CRC=00000000 00000000 [BCAC0108F0D521FF5478BA6C50B23774] GoodName=Doctor V64 BIOS V1.71 CRC=00000000 00000000 [D2DA27872F13C0BBB2D686C495F13499] GoodName=Doctor V64 BIOS V1.72 CRC=00000000 00000000 [13CD4C03FCA1BC23AE8B57885E76BCA6] GoodName=Doctor V64 BIOS V1.73 CRC=00000000 00000000 [A2604CB559D289837F718DB02AFEA85E] GoodName=Doctor V64 BIOS V1.74 (Revive Version) CRC=00000000 00000000 [8B95ABB5F6E71454FE2C415A0787A384] GoodName=Doctor V64 BIOS V1.74 CRC=00000000 00000000 [83B122B18B98B96A63C6F824833116BC] GoodName=Doctor V64 BIOS V1.75 CRC=00000000 00000000 [B444CC20AEFAD0DE4A552D8DD0486E82] GoodName=Doctor V64 BIOS V1.76 CRC=00000000 00000000 [B5D92FF099B3B74C6D0F0D75590EAC36] GoodName=Doctor V64 BIOS V1.80 CRC=00000000 00000000 [8CD8FDF74A47CA163CD23AE1D01B7E95] GoodName=Doctor V64 BIOS V1.81 CRC=00000000 00000000 [AAD6807D240FC3FF4FEDAB57135AD458] GoodName=Doctor V64 BIOS V1.82 CRC=00000000 00000000 [4121DD79CEBF67EBCA1AA2B3A7AED858] GoodName=Doctor V64 BIOS V1.83 CRC=00000000 00000000 [D3EA654D4679E0BF40BB671CA7D4A7A3] GoodName=Doctor V64 BIOS V1.90 CRC=00000000 00000000 [CF8B2C134C3FCD5A5D74402D75CA0543] GoodName=Doctor V64 BIOS V1.91 CRC=00000000 00000000 [0F83626497B7ACC4AAB3EB39CDE893D3] GoodName=Doctor V64 BIOS V1.92 CRC=00000000 00000000 [6B626C55C99CD12E88A3DB3B52372104] GoodName=Doctor V64 BIOS V1.93 CRC=00000000 00000000 [483BD87237BB38884E7E22F4981ACFDB] GoodName=Doctor V64 BIOS V1.94 CRC=00000000 00000000 [553F6E6766B85CB0247E5CA62F515C75] GoodName=Doctor V64 BIOS V2.00 CRC=00000000 00000000 [A89761018FA98E5C919F4CA0BB3E6001] GoodName=Doctor V64 BIOS V2.00b CRC=00000000 00000000 [AE36DD0BCC2F515917B0CF52AEE48AC1] GoodName=Doctor V64 BIOS V2.01 (Red) CRC=00000000 00000000 [0C91C461ED69EC1E93E9E0DEF9053546] GoodName=Doctor V64 BIOS V2.01 CRC=00000000 00000000 [BA2816F0B775099E42F124E5C43FE30C] GoodName=Doctor V64 BIOS V2.01b CRC=00000000 00000000 [DDD1958DF0330B79288B51E65E1E36A0] GoodName=Doctor V64 BIOS V2.02 CRC=00000000 00000000 [5AAA98D1FDF963FB88B3D25476924A04] GoodName=Doctor V64 BIOS V2.02b CRC=00000000 00000000 [030EAB316DC3A2D33AAC3DE15FDC4473] GoodName=Doctor V64 BIOS V2.03 (Black) CRC=00000000 00000000 [2F4E88C48823714825F35148F5B5738D] GoodName=Doctor V64 BIOS V2.03 (Blue) CRC=00000000 00000000 [7F34EB3E1363580FEA95B23A9CB1C3AF] GoodName=Doctor V64 BIOS V2.03 (Green) CRC=00000000 00000000 [A550DEBDF72B753B52882A1A573560B5] GoodName=Doctor V64 BIOS V2.03 (Purple) CRC=00000000 00000000 [014A2B82FDF9A72FC5A26A7EAF8F8176] GoodName=Doctor V64 BIOS V2.03 (Red) CRC=00000000 00000000 [41010B4BFE1F8DB801237B02A9FA265F] GoodName=Doctor V64 BIOS V2.03 CRC=00000000 00000000 [E8B403A0F0E212FA5C1220AF10D9C379] GoodName=Donald Duck - Quack Attack (E) (M5) [!] CRC=3DF17480 193DED5A Players=1 SaveType=Eeprom 4KB CountPerOp=3 [07C4944DDAAD234F1F6B0B200BEA60B2] GoodName=Donald Duck - Quack Attack (E) (M5) [b1] CRC=85E42D70 132BD5C2 RefMD5=E8B403A0F0E212FA5C1220AF10D9C379 [3BAFF04C5DD367F362248DC627D848C1] GoodName=Donald Duck - Quack Attack (E) (M5) [f1] (NTSC) CRC=8A5B9018 0A661D8F RefMD5=E8B403A0F0E212FA5C1220AF10D9C379 [118E9CE360B97A6F8DAB2C9F30660BF5] GoodName=Donkey Kong 64 (E) [!] CRC=11936D8C 6F2C4B43 SaveType=Eeprom 16KB Players=4 Rumble=Yes CountPerOp=1 [428067DC7DB42DFC977A775F0A6E55B1] GoodName=Donkey Kong 64 (E) [b1] CRC=11936D8C 6F2C4B43 RefMD5=118E9CE360B97A6F8DAB2C9F30660BF5 [C48C46362602766EA758FAAEED88AF50] GoodName=Donkey Kong 64 (E) [f1] (Boot&Save) CRC=1F95CAAA 047FC22A RefMD5=118E9CE360B97A6F8DAB2C9F30660BF5 [7BE2AAB259C437E8BA91FF8E5903837C] GoodName=Donkey Kong 64 (E) [f1] (Save) CRC=1F95CAAA 047FC22A RefMD5=118E9CE360B97A6F8DAB2C9F30660BF5 [5B677F4BF93D6578252FCAD2C8CEB637] GoodName=Donkey Kong 64 (J) [!] CRC=053C89A7 A5064302 SaveType=Eeprom 16KB Players=4 CountPerOp=1 [98A5836E3A5DA7BD0B5819E7498ACEA2] GoodName=Donkey Kong 64 (U) (Kiosk Demo) [!] CRC=0DD4ABAB B5A2A91E SaveType=Eeprom 16KB CountPerOp=1 [843DB032839BF1AA74759F2E39A2ABDC] GoodName=Donkey Kong 64 (U) (Kiosk Demo) [b1] CRC=F5C21403 8FCA0710 RefMD5=98A5836E3A5DA7BD0B5819E7498ACEA2 [34E6B35260F03CA72593FA373E38BBEA] GoodName=Donkey Kong 64 (U) (Kiosk Demo) [b2] CRC=0DD4ABAB B5A2A91E RefMD5=98A5836E3A5DA7BD0B5819E7498ACEA2 [3F1A1B941E58FF977EF47B65CE359A26] GoodName=Donkey Kong 64 (U) (Kiosk Demo) [f1] (PAL) CRC=F5C21403 8FCA0710 RefMD5=98A5836E3A5DA7BD0B5819E7498ACEA2 [9EC41ABF2519FC386CADD0731F6E868C] GoodName=Donkey Kong 64 (U) [!] CRC=EC58EABF AD7C7169 SaveType=Eeprom 16KB Players=4 CountPerOp=1 [6B4772AA1743FEAC1919618B3FC6B3E1] GoodName=Donkey Kong 64 (U) [b1] CRC=EC58EABF AD7C7169 RefMD5=9EC41ABF2519FC386CADD0731F6E868C [4D4483C0CA3B86997E41A7032F6AD25F] GoodName=Donkey Kong 64 (U) [f1] (Save) CRC=CE84793D 27ECC1AD RefMD5=9EC41ABF2519FC386CADD0731F6E868C [CED71061B6A8581DC0B95970D522848A] GoodName=Donkey Kong 64 (U) [f2] CRC=CE84793D 27ECC1AD RefMD5=9EC41ABF2519FC386CADD0731F6E868C [E56EF244D61B15DBAEF474F9C0C0B23A] GoodName=Donkey Kong 64 (U) [f3] CRC=CED986FD 3344AC38 RefMD5=9EC41ABF2519FC386CADD0731F6E868C [190CCCA6526DC4A1F611E3B40F5131C0] GoodName=Doom 64 (E) [!] CRC=2C739EAC 9EF77726 Players=1 SaveType=Controller Pack [B482F51B616F4337F1B3BF5EFDD650D4] GoodName=Doom 64 (E) [b1] CRC=2C739EAC 9EF77726 RefMD5=190CCCA6526DC4A1F611E3B40F5131C0 [06F15EF2228C1B1147C41DCCAA07D9DE] GoodName=Doom 64 (J) [!] CRC=7AA65B36 FDCEE5AD Players=1 SaveType=Controller Pack [053BB6D2E14D67F0FB0B509F2A6B4485] GoodName=Doom 64 (J) [b1] CRC=7AA65B36 FDCEE5AD RefMD5=06F15EF2228C1B1147C41DCCAA07D9DE [B67748B64A2CC7EFD2F3AD4504561E0E] GoodName=Doom 64 (U) (V1.0) [!] CRC=A83E101A E937B69D Players=1 SaveType=Controller Pack [BF710F7D1D51EC89AC3F58022B2B5D7F] GoodName=Doom 64 (U) (V1.0) [T+Bra1.0_Doom64BR] CRC=B01A1DAB 7F7827E3 RefMD5=B67748B64A2CC7EFD2F3AD4504561E0E [6EACFE4F39265F24FB8145FDED8272F6] GoodName=Doom 64 (U) (V1.0) [b1] CRC=A83E101A E937B69D RefMD5=B67748B64A2CC7EFD2F3AD4504561E0E [81FD532B1C7C2CCD687E56696E073C83] GoodName=Doom 64 (U) (V1.0) [b2] CRC=A83E101A E937B69D RefMD5=B67748B64A2CC7EFD2F3AD4504561E0E [7497ADADADA89230827C06E4BFFBBBD8] GoodName=Doom 64 (U) (V1.0) [o1] CRC=A83E101A E937B69D RefMD5=B67748B64A2CC7EFD2F3AD4504561E0E [4DC885150DFEC67ACDD807F9FFE9596E] GoodName=Doom 64 (U) (V1.0) [t1] CRC=13D0EE29 D57A41AD RefMD5=B67748B64A2CC7EFD2F3AD4504561E0E [29E85B9D9072AC232CEB87EFE826269A] GoodName=Doom 64 (U) (V1.0) [t2] CRC=13D0EE29 D57A41AD RefMD5=B67748B64A2CC7EFD2F3AD4504561E0E [1B1378BB9EE819F740550F566745AF73] GoodName=Doom 64 (U) (V1.1) [!] CRC=423E96F4 CE88F05B Players=1 SaveType=Controller Pack [C2166455E94E89E9E3AB612B4377C443] GoodName=Doraemon - Nobita to 3tsu no Seireiseki (J) [!] CRC=BFF7B1C2 AEBF148E Players=4 [989E7B15D24649B784813E1A07DF6887] GoodName=Doraemon - Nobita to 3tsu no Seireiseki (J) [b1] CRC=BFF7B1C2 AEBF148E RefMD5=C2166455E94E89E9E3AB612B4377C443 [7E0DA017551101DA1C4FB6A0C49A2328] GoodName=Doraemon - Nobita to 3tsu no Seireiseki (J) [b2] CRC=BFF7B1C2 AEBF148E RefMD5=C2166455E94E89E9E3AB612B4377C443 [BE0000D3415787F9920E178942C297C5] GoodName=Doraemon - Nobita to 3tsu no Seireiseki (J) [b3] CRC=BFF7B1C2 AEBF148E RefMD5=C2166455E94E89E9E3AB612B4377C443 [C2909D5799099819E9A7ECE3CD4737FC] GoodName=Doraemon - Nobita to 3tsu no Seireiseki (J) [t1] CRC=55C0515C 901DA4A7 RefMD5=C2166455E94E89E9E3AB612B4377C443 [0580D96A71671C9E6972FDCF5897CC26] GoodName=Doraemon 2 - Nobita to Hikari no Shinden (J) [!] CRC=B6306E99 B63ED2B2 SaveType=Eeprom 16KB Players=1 [7CC16A6090CAC3749DD6B71CA7A58605] GoodName=Doraemon 2 - Nobita to Hikari no Shinden (J) [b1] CRC=B6306E99 B63ED2B2 RefMD5=0580D96A71671C9E6972FDCF5897CC26 [5A28008B05923016EA411BACE06EF32A] GoodName=Doraemon 2 - Nobita to Hikari no Shinden (J) [b2] CRC=4E30BD3A B77D6DFB RefMD5=0580D96A71671C9E6972FDCF5897CC26 [7E4BCA92DA50145C9906B2A72F9351B5] GoodName=Doraemon 2 - Nobita to Hikari no Shinden (J) [f1] (PAL) CRC=4E30BD3A B77D6DFB RefMD5=0580D96A71671C9E6972FDCF5897CC26 [58ADC17903754FEBF77DC9CD3DB8B7D8] GoodName=Doraemon 2 - Nobita to Hikari no Shinden (J) [f2] CRC=4E30BD3A B77D6DFB RefMD5=0580D96A71671C9E6972FDCF5897CC26 [BEFA319919474BAE05DFCB570CC0CF31] GoodName=Doraemon 2 - Nobita to Hikari no Shinden (J) [t1] CRC=4ECEB1DE 552B6E88 RefMD5=0580D96A71671C9E6972FDCF5897CC26 [A4A1D490BA67831775FC381B846E2168] GoodName=Doraemon 3 - Nobita no Machi SOS! (J) [!] CRC=A8275140 B9B056E8 SaveType=Eeprom 16KB Players=1 [FB7565FE1EAAED1CACFAE3B011FA6CB6] GoodName=Doraemon 3 - Nobita no Machi SOS! (J) [f1] (PAL-NTSC) CRC=D8059804 92739B11 RefMD5=A4A1D490BA67831775FC381B846E2168 [A4F7C57C180297B2E7BA5A5FEB44FE0B] GoodName=Doubutsu no Mori (J) [!] CRC=BD8E206D 98C35E1C Players=1 [0AA8E4B96EBB5B8A5CF91CFB04BC3741] GoodName=Doubutsu no Mori (J) [T+Eng2007-03-22_Brandon Dixon] CRC=BD8E206D 98C35E1C RefMD5=A4F7C57C180297B2E7BA5A5FEB44FE0B [7C58DB7EE170912A2DF84E67A489058A] GoodName=Doubutsu no Mori (J) [T-Eng2007-02-08_Brandon Dixon] CRC=BD8E206D 98C35E1C RefMD5=A4F7C57C180297B2E7BA5A5FEB44FE0B [5E2A5C56CA1A0CCAEA3AE5F852E0C58D] GoodName=Doubutsu no Mori (J) [T-Eng2007-02-09_Brandon Dixon] CRC=BD8E206D 98C35E1C RefMD5=A4F7C57C180297B2E7BA5A5FEB44FE0B [1A7936367413E5D6874ABDA6D623AD32] GoodName=Dr. Mario 64 (U) [!] CRC=769D4D13 DA233FFE Players=4 [0AD0800D351F77EC31092096D58C25F0] GoodName=Dragon King by CrowTRobo (PD) [b1] CRC=19E0E54C CB721FD2 [944ECED50E57D46779576F732CB27DC0] GoodName=Dragon King by CrowTRobo (PD) CRC=19E0E54C CB721FD2 [F120FADB52B414EB4FB7D13092AC3CDB] GoodName=Dual Heroes (E) [!] CRC=B6524461 ED6D04B1 SaveType=Controller Pack Players=4 [B01D031BE1789565E2B8A44CD76B96C6] GoodName=Dual Heroes (E) [b1] CRC=B6524461 ED6D04B1 RefMD5=F120FADB52B414EB4FB7D13092AC3CDB [DFEBF3A9570B95D95CA6BE2CE8311D1D] GoodName=Dual Heroes (E) [b2] CRC=B6524461 ED6D04B1 RefMD5=F120FADB52B414EB4FB7D13092AC3CDB [B406AD1694D65725FD31A054F6ECE213] GoodName=Dual Heroes (E) [f1] (NTSC) CRC=926C2E3B 9829A216 RefMD5=F120FADB52B414EB4FB7D13092AC3CDB [E7652ED5CECEB5B1BC14495C58546D1C] GoodName=Dual Heroes (J) [!] CRC=056EAB63 C215FCD5 Players=4 SaveType=Controller Pack [A7D3E42EFFD6E7935DA7C9A6B6899CAC] GoodName=Dual Heroes (J) [o1] CRC=056EAB63 C215FCD5 RefMD5=E7652ED5CECEB5B1BC14495C58546D1C [54C610270D3F5EEA39BC6A8F73B3B909] GoodName=Dual Heroes (J) [o2] CRC=056EAB63 C215FCD5 RefMD5=E7652ED5CECEB5B1BC14495C58546D1C [923D65E69F51858C697E0E5759CD038B] GoodName=Dual Heroes (U) [!] CRC=A62230C3 F0834488 Players=4 SaveType=Controller Pack [E3EF8D7ACCA9CCB551C26B0F879E6B25] GoodName=Dual Heroes (U) [b1] CRC=A62230C3 F0834488 RefMD5=923D65E69F51858C697E0E5759CD038B [02192B4B3797983BBE5E452336584208] GoodName=Duck Dodgers Starring Daffy Duck (U) (M3) [!] CRC=FBB9F1FA 6BF88689 Players=4 CountPerOp=1 [B5A5A71483679DCCACBDA770647A9DBF] GoodName=Duck Dodgers Starring Daffy Duck (U) (M3) [t1] CRC=83E7E0D2 B5B7E503 RefMD5=02192B4B3797983BBE5E452336584208 [86E98AACA0D90BF744DA090539BA4AD8] GoodName=Duke Nukem - ZER0 H0UR (E) [!] CRC=DC36626A 3F3770CB Players=4 SaveType=Controller Pack CountPerOp=1 [51A1EEE441240229BEB2E6CD8FAB285C] GoodName=Duke Nukem - ZER0 H0UR (E) [f1] (NTSC) CRC=0BD8008B 26051E1D RefMD5=86E98AACA0D90BF744DA090539BA4AD8 [E2B73FEB0843874EA831A2E0076FCB72] GoodName=Duke Nukem - ZER0 H0UR (F) [!] CRC=32CA974B B2C29C50 Players=4 SaveType=Controller Pack CountPerOp=1 [026789D47DB5FE202A76F89797B33AC7] GoodName=Duke Nukem - ZER0 H0UR (U) [!] CRC=04DAF07F 0D18E688 Players=4 SaveType=Controller Pack CountPerOp=1 [69ED326664E48BAA9CE743E6E9C450DA] GoodName=Duke Nukem - ZER0 H0UR (U) [b1] CRC=04DAF07F 0D18E688 RefMD5=026789D47DB5FE202A76F89797B33AC7 [75239D11AEE906C9ABEA752BA1E2AA00] GoodName=Duke Nukem - ZER0 H0UR (U) [b2] CRC=BCEAF9B7 F84FF876 RefMD5=026789D47DB5FE202A76F89797B33AC7 [4446E99E8D43E1B7557412ACEA918F68] GoodName=Duke Nukem - ZER0 H0UR (U) [b3] CRC=BCEAF9B7 F84FF876 RefMD5=026789D47DB5FE202A76F89797B33AC7 [BD4E03620567C6291F11B9217AC67C28] GoodName=Duke Nukem - ZER0 H0UR (U) [b4] CRC=04DAF07F 0D18E688 RefMD5=026789D47DB5FE202A76F89797B33AC7 [A3D49AAC6BC8EEA0D707042A68D2D48C] GoodName=Duke Nukem - ZER0 H0UR (U) [t1] CRC=BCEAF9B7 F84FF876 RefMD5=026789D47DB5FE202A76F89797B33AC7 [8657CBA95C409B74C1F5632CBC36643F] GoodName=Duke Nukem 64 (E) [!] CRC=57BFF74D DE747743 Players=4 SaveType=Controller Pack [A6AC9D140112BD7A3AA8A5ABA79EBD88] GoodName=Duke Nukem 64 (E) [b1] CRC=57BFF74D DE747743 RefMD5=8657CBA95C409B74C1F5632CBC36643F [31F08F1D2F789C5D698B7E05F287E7AE] GoodName=Duke Nukem 64 (E) [o1] CRC=57BFF74D DE747743 RefMD5=8657CBA95C409B74C1F5632CBC36643F [E2E79C7167BDB26E176D220904739C91] GoodName=Duke Nukem 64 (F) CRC=1E12883D D3B92718 Players=4 SaveType=Controller Pack [C7F1A43764A26DA2E43F2A36A5F76E4C] GoodName=Duke Nukem 64 (U) [!] CRC=A273AB56 DA33DB9A Players=4 SaveType=Controller Pack [9BE63892A2AA2B20B75B3AC4E7B7DCDF] GoodName=Duke Nukem 64 (U) [b1] CRC=3F84EB47 141964BF RefMD5=C7F1A43764A26DA2E43F2A36A5F76E4C [685EB7D3D1F2C82932EDF7B476A6E21B] GoodName=Duke Nukem 64 (U) [b2] CRC=A273AB56 DA33DB9A RefMD5=C7F1A43764A26DA2E43F2A36A5F76E4C [D13D7E9AA29D972CB93C39A15F304FAA] GoodName=Duke Nukem 64 (U) [b3] CRC=A273AB56 DA33DB9A RefMD5=C7F1A43764A26DA2E43F2A36A5F76E4C [82FE3916997DA14A02C2301AC2B5E321] GoodName=Duke Nukem 64 (U) [h1C] CRC=A273AB56 DA33DB9A RefMD5=C7F1A43764A26DA2E43F2A36A5F76E4C [6F14B999499E90761D8444F784564AB3] GoodName=Duke Nukem 64 (U) [o1] CRC=A273AB56 DA33DB9A RefMD5=C7F1A43764A26DA2E43F2A36A5F76E4C [557F89A263B2028936753956F7902299] GoodName=Duke Nukem 64 (U) [t1] CRC=3F84EB47 141964BF RefMD5=C7F1A43764A26DA2E43F2A36A5F76E4C [A6DF7D8C1E2DAB58496EF633AC09366E] GoodName=Duke Nukem 64 (U) [t2] CRC=3F84EB47 141964BF RefMD5=C7F1A43764A26DA2E43F2A36A5F76E4C [8B7E6FF3453F660DCFC7B968E622E7C9] GoodName=Duke Nukem 64 (U) [t3] CRC=3F84EB47 141964BF RefMD5=C7F1A43764A26DA2E43F2A36A5F76E4C [9A008AF4E90D7C55F21039F4E82170EF] GoodName=Dynamix Intro (Hidden Song) by Widget and Immortal (PD) CRC=B8E73356 040E42EC [5809670A42CA34D39A39598EFA82F5F3] GoodName=Dynamix Intro by Widget and Immortal (PD) CRC=086E91C9 89F47C51 Players=0 Status=3 Rumble=No SaveType=None [E06B804B5A8809C42E99B229106CC813] GoodName=Dynamix Readme by Widget and Immortal (PD) CRC=186CC1A9 A0DE4C8D RefMD5=5809670A42CA34D39A39598EFA82F5F3 [F32E61E30C5BC232A01E52F8BC2EEF07] GoodName=Dynamix Intro by Widget and Immortal (PD) [h1C] CRC=086E91C9 89F47C51 RefMD5=5809670A42CA34D39A39598EFA82F5F3 [1830EDE2557E8685E6F76D05CC65076A] GoodName=ECW Hardcore Revolution (E) [!] CRC=8C38E5DB B37C27D7 SaveType=Controller Pack Players=4 [91545C2642DB6349B8D18BF0BEE29162] GoodName=ECW Hardcore Revolution (E) [b1] CRC=8C38E5DB B37C27D7 RefMD5=1830EDE2557E8685E6F76D05CC65076A [8EEBB16B7A4D39AE8BC8CCCBC41F0A01] GoodName=ECW Hardcore Revolution (U) [!] CRC=BDF9766D BD068D70 Players=4 SaveType=Controller Pack [BF2DF4B86FAA2181A7ACFE2643FA2293] GoodName=Earthworm Jim 3D (E) (M6) [!] CRC=492B9DE8 C6CCC81C Players=1 SaveType=Eeprom 4KB [97EA079ECF105EA16654A855644D870A] GoodName=Earthworm Jim 3D (E) (M6) [b1] CRC=492B9DE8 C6CCC81C RefMD5=BF2DF4B86FAA2181A7ACFE2643FA2293 [980DFB38AD9A883119DE135F45B7DB36] GoodName=Earthworm Jim 3D (U) [!] CRC=DF574191 9EB5123D Players=1 SaveType=Eeprom 4KB [554EE4BF15388DDE586DE90AC72EF5FA] GoodName=Earthworm Jim 3D (U) [T+Rus] CRC=34DBB6CF EA06789D RefMD5=980DFB38AD9A883119DE135F45B7DB36 [B27336A278658AC6D62AB6C4C3FB1DB6] GoodName=Earthworm Jim 3D (U) [f1] (PAL) CRC=04853364 948ACF82 RefMD5=980DFB38AD9A883119DE135F45B7DB36 [6B870EBEDCBD81B9FF369008F904C1CD] GoodName=Earthworm Jim 3D (U) [hI] CRC=04842D98 1A9FF551 RefMD5=980DFB38AD9A883119DE135F45B7DB36 [60F0CBE10DCE67FDD6527A78B51DCCBC] GoodName=Earthworm Jim 3D (U) [t1] CRC=0484CD98 1AFE0B59 RefMD5=980DFB38AD9A883119DE135F45B7DB36 [935DD85AD198BBDE92161CDCE47CBFB3] GoodName=Eikou no Saint Andrews (J) [!] CRC=0DED0568 1502515E Players=4 [936DB74AE766BB1219E8A712F0D06E4A] GoodName=Eikou no Saint Andrews (J) [b1] CRC=0DED0568 1502515E RefMD5=935DD85AD198BBDE92161CDCE47CBFB3 [0F7C52AD7C7C88103960F44FCD0B119A] GoodName=Eikou no Saint Andrews (J) [b2] CRC=0DED0568 1502515E RefMD5=935DD85AD198BBDE92161CDCE47CBFB3 [08CCA8D372EA8C38148F77AB5A03354D] GoodName=Eikou no Saint Andrews (J) [h1C] CRC=0DED0568 1502515E RefMD5=935DD85AD198BBDE92161CDCE47CBFB3 [CEC824B5DA28B974B1562338EB728805] GoodName=Eikou no Saint Andrews (J) [h2C] CRC=0DED0568 1502515E RefMD5=935DD85AD198BBDE92161CDCE47CBFB3 [15DF97A59B2354B130DEC3FB86BBA513] GoodName=Elmo's Letter Adventure (U) [!] CRC=F2A653CB 60633B3B SaveType=None Players=1 [F733453ED26AFA0ACA8D3EB3B5B6D8EA] GoodName=Elmo's Number Journey (U) [!] CRC=02B1538F C94B88D0 Players=1 SaveType=None [D42CC78A2BF0D34518B8E0D0439E432E] GoodName=Eltale Monsters (J) [!] CRC=E13AE2DC 4FB65CE8 Players=4 SaveType=Controller Pack [752EF6D2C2A6DBBB8CBAEFB596412C1D] GoodName=Eltale Monsters (J) [b1] CRC=E13AE2DC 4FB65CE8 RefMD5=D42CC78A2BF0D34518B8E0D0439E432E [75A8F25B679A0D148F0D8E1143104845] GoodName=Eurasia First N64 Intro by Sispeo (PD) CRC=52F22511 B9D85F75 [761DC0DE0913D697ED1F9899948552BB] GoodName=Eurasia Intro by Ste (PD) [b1] CRC=52F22511 B9D85F75 [F7E6C9CFF1BC16B0DEDA0ECEFC5C3DFB] GoodName=Eurasia Intro by Ste (PD) CRC=93A94333 5A613C39 [F1D0406A74AD74BE5891620B7FE6640D] GoodName=Evek - V64jr Save Manager by WT_Riker (PD) CRC=D49DFF90 8DB53A8C [8FA253FD69B73DF9A831EF2F731491F2] GoodName=Excitebike 64 (E) [!] CRC=202A8EE4 83F88B89 SaveType=Eeprom 16KB Players=4 CountPerOp=1 [BF15A61AFF71C93BF5E05243F57BCA1D] GoodName=Excitebike 64 (J) [!] CRC=861C3519 F6091CE5 SaveType=Eeprom 16KB Players=4 [E0018C33346714B63A55C0E040F23DEA] GoodName=Excitebike 64 (U) (Kiosk Demo) [!] CRC=AF754F7B 1DD17381 SaveType=Eeprom 16KB [7200D1C1CF489FAFFF767729F215E6E6] GoodName=Excitebike 64 (U) [!] CRC=07861842 A12EBC9F SaveType=Eeprom 16KB Players=4 CountPerOp=1 [496929EA74183198D121035EA808C480] GoodName=Excitebike 64 (U) [b1] CRC=07861842 A12EBC9F RefMD5=7200D1C1CF489FAFFF767729F215E6E6 [48D1FA279FEA4C99CFEEC90E9AD1668F] GoodName=Excitebike 64 (U) [f1] CRC=E5B7F405 2C4462BF RefMD5=7200D1C1CF489FAFFF767729F215E6E6 [285D3277D28CA3B9A5A2BE8971CCD767] GoodName=Excitebike 64 (U) [f2] (Save) CRC=E5B7F405 2C4462BF RefMD5=7200D1C1CF489FAFFF767729F215E6E6 [6DCFDE0423D1DB58EA9E6A8F1BFFD849] GoodName=Explode Demo by NaN (PD) CRC=3E5D6755 9AE4BD3B [3B2CA0DA0810C95B31DF8C1FB8811BE2] GoodName=Extreme-G (E) (M5) [!] CRC=8E9D834E 1E8B29A9 Players=4 SaveType=Controller Pack [BF72E10EB79E00E095829112576F01FE] GoodName=Extreme-G (E) (M5) [b1] CRC=8E9D834E 1E8B29A9 RefMD5=3B2CA0DA0810C95B31DF8C1FB8811BE2 [A059E27DE410BDA05D8603C22776979F] GoodName=Extreme-G (E) (M5) [b2] CRC=8E9D834E 1E8B29A9 RefMD5=3B2CA0DA0810C95B31DF8C1FB8811BE2 [B74A059D227830C606BA79134278F55E] GoodName=Extreme-G (E) (M5) [b3] CRC=8E9D834E 1E8B29A9 RefMD5=3B2CA0DA0810C95B31DF8C1FB8811BE2 [2257945EABC008E4D6464196B288D5BF] GoodName=Extreme-G (E) (M5) [b4] CRC=8E9D834E 1E8B29A9 RefMD5=3B2CA0DA0810C95B31DF8C1FB8811BE2 [972D0468CEB1221214ADED7181DA7853] GoodName=Extreme-G (E) (M5) [h1C] CRC=8E9D834E 1E8B29A9 RefMD5=3B2CA0DA0810C95B31DF8C1FB8811BE2 [A7CD65E5A4A8838D1CD452BA66E74DF6] GoodName=Extreme-G (J) [!] CRC=EE802DC4 690BD57D Players=4 SaveType=Controller Pack [3E660D3F991C0529E90BFEC0244DB31A] GoodName=Extreme-G (U) [!] CRC=FDA245D2 A74A3D47 SaveType=Controller Pack Players=4 [6D954294E254E239B3EA694C2D9ADFF9] GoodName=Extreme-G (U) [h1C] CRC=FDA245D2 A74A3D47 RefMD5=3E660D3F991C0529E90BFEC0244DB31A [E5D2C7CE59282C0D716DD67CA787CF7B] GoodName=Extreme-G (U) [o1] CRC=FDA245D2 A74A3D47 RefMD5=3E660D3F991C0529E90BFEC0244DB31A [B760D4C35303C74B893F1168415D743D] GoodName=Extreme-G (U) [t1] CRC=9FD881BC 0A62D002 RefMD5=3E660D3F991C0529E90BFEC0244DB31A [BB7F98E657FB4B5FCC7DC04BD72E2D2B] GoodName=Extreme-G XG2 (E) (M5) [!] CRC=1185EC85 4B5A7731 Players=4 SaveType=Controller Pack [F17884A2C16FB6FD11A74D65B1388B4A] GoodName=Extreme-G XG2 (J) [!] CRC=399B9B81 D533AD11 Players=4 SaveType=Controller Pack [44FE06BA3686C02A7988F27600A533DA] GoodName=Extreme-G XG2 (U) [!] CRC=5CD4150B 470CC2F1 Players=4 SaveType=Controller Pack [B0F9C3EC65C1C88A43C694EBF429E008] GoodName=Extreme-G XG2 (U) [t1] CRC=21910973 0F2E70D2 RefMD5=44FE06BA3686C02A7988F27600A533DA [A6BD93EA576CDF8569F68171452F7E8A] GoodName=F-1 Pole Position 64 (E) (M3) [!] CRC=FDD248B2 569A020E Players=1 SaveType=Controller Pack [ACBB37B24238F82B2333B710CBEE388A] GoodName=F-1 Pole Position 64 (E) (M3) [b1] CRC=FDD248B2 569A020E RefMD5=A6BD93EA576CDF8569F68171452F7E8A [049DB657F4223D949F56E9DC5B6A9180] GoodName=F-1 Pole Position 64 (U) (M3) [!] CRC=AE82687A 9A3F388D Players=1 SaveType=Controller Pack [6CE5D16E977B1D4E0E71E209B2932099] GoodName=F-1 Pole Position 64 (U) (M3) [b1] CRC=AE82687A 9A3F388D RefMD5=049DB657F4223D949F56E9DC5B6A9180 [C8C14D748679AE6F8FF1A62C4AD3B61E] GoodName=F-1 Pole Position 64 (U) (M3) [b2] CRC=AE82687A 9A3F388D RefMD5=049DB657F4223D949F56E9DC5B6A9180 [9E684FDCAC7B5999CC863084DECA463D] GoodName=F-1 Pole Position 64 (U) (M3) [h1C] CRC=AE82687A 9A3F388D RefMD5=049DB657F4223D949F56E9DC5B6A9180 [9FBE3363DA6C146EF2E29605BCA834FF] GoodName=F-1 World Grand Prix (E) [!] CRC=CC3CC8B3 0EC405A4 Players=4 SaveType=Eeprom 4KB [08B8942E977A81CAF81DAC2237E1AA65] GoodName=F-1 World Grand Prix (E) [h1C] CRC=CC3CC8B3 0EC405A4 RefMD5=9FBE3363DA6C146EF2E29605BCA834FF [35F6C42D5A9284688284C24250F4D6BE] GoodName=F-1 World Grand Prix (F) [!] CRC=B70BAEE5 3A5005A8 Players=4 SaveType=Eeprom 4KB [A8C78454C70BD73375AAF69C4078D5DA] GoodName=F-1 World Grand Prix (G) [!] CRC=38442634 66B3F060 Players=4 SaveType=Eeprom 4KB [AA15FA62A776917E594A17B49BBC6980] GoodName=F-1 World Grand Prix (G) [b1] CRC=38442634 66B3F060 RefMD5=A8C78454C70BD73375AAF69C4078D5DA [43115145F2DC0F3D0C6091D05CB9FA52] GoodName=F-1 World Grand Prix (G) [b1][o1] CRC=38442634 66B3F060 RefMD5=A8C78454C70BD73375AAF69C4078D5DA [38B0DB4916328672ED592759FFB1F09C] GoodName=F-1 World Grand Prix (G) [h1C] CRC=38442634 66B3F060 RefMD5=A8C78454C70BD73375AAF69C4078D5DA [3CEE1895A80005940887C9830B09DDE6] GoodName=F-1 World Grand Prix (G) [o1] CRC=38442634 66B3F060 RefMD5=A8C78454C70BD73375AAF69C4078D5DA [6E5858A47CB42F9B1CB26042BA229EF6] GoodName=F-1 World Grand Prix (G) [o1][h1C] CRC=38442634 66B3F060 RefMD5=A8C78454C70BD73375AAF69C4078D5DA [F248F0AAE609111BA9DFF9FD7AFBC485] GoodName=F-1 World Grand Prix (J) [!] CRC=64BF47C4 F4BD22BA Players=4 SaveType=Eeprom 4KB [7DFE40E387971269F38FE3CBE803567A] GoodName=F-1 World Grand Prix (J) [h1C] CRC=64BF47C4 F4BD22BA RefMD5=F248F0AAE609111BA9DFF9FD7AFBC485 [A81B1DE864DF3F4BB0903760BE673F21] GoodName=F-1 World Grand Prix (U) [!] CRC=CC3CC8B3 0EC405A4 SaveType=Eeprom 4KB Players=4 [4E450DD2899FE7434110E30E19DD10A2] GoodName=F-1 World Grand Prix (U) [h1C] CRC=CC3CC8B3 0EC405A4 RefMD5=A81B1DE864DF3F4BB0903760BE673F21 [05426547E5AD9DBF88CF0A401032079D] GoodName=F-1 World Grand Prix (U) [h2C] CRC=CC3CC8B3 0EC405A4 RefMD5=A81B1DE864DF3F4BB0903760BE673F21 [BC0FD2468AC7769A37C3C58CD5699585] GoodName=F-1 World Grand Prix II (E) (M4) [!] CRC=07C1866E 5775CCDE Players=4 [D9B59E463A73FA880E6682A08D1C3071] GoodName=F-1 World Grand Prix II (E) (M4) [f1] (NTSC) CRC=67C38660 94038DC6 RefMD5=BC0FD2468AC7769A37C3C58CD5699585 [E94A9142B1D981A6556747BA147E1A19] GoodName=F-1 World Grand Prix II (E) (M4) [h1C] CRC=07C1866E 5775CCDE RefMD5=BC0FD2468AC7769A37C3C58CD5699585 [EE79A8FE287B5DCAEA584439363342FC] GoodName=F-ZERO X (E) [!] CRC=776646F6 06B9AC2B Players=4 SaveType=SRAM [0722E679F9695D9E5F1D2823DC7D8004] GoodName=F-ZERO X (E) [b1] CRC=776646F6 06B9AC2B RefMD5=EE79A8FE287B5DCAEA584439363342FC [99DC3FF78356CE77CB240AC7782EE6E5] GoodName=F-ZERO X (E) [b2] CRC=DAA6CA7D 56AA4394 RefMD5=EE79A8FE287B5DCAEA584439363342FC [2E95E5833894A6E1E3D109E3B3D809F1] GoodName=F-ZERO X (E) [b3] CRC=EC986EA9 EB463E4A RefMD5=EE79A8FE287B5DCAEA584439363342FC [308384EEEB6A88B5B498179E7484944F] GoodName=F-ZERO X (E) [b4] CRC=DAA6CA7D 56AA4394 RefMD5=EE79A8FE287B5DCAEA584439363342FC [D1368C0E3869B85947A55C3DA6FFCA10] GoodName=F-ZERO X (E) [f1] CRC=DAA6CA7D 56AA4394 RefMD5=EE79A8FE287B5DCAEA584439363342FC [ACE58F325D5EECBE033B21F2C7BFE870] GoodName=F-ZERO X (E) [h1C] CRC=776646F6 06B9AC2B RefMD5=EE79A8FE287B5DCAEA584439363342FC [58D200D43620007314304F4E6C9E6528] GoodName=F-ZERO X (J) [!] CRC=4D3E622E 9B828B4E Players=4 SaveType=SRAM [C14AE14C6DE0DCA126C423C4ADBEE315] GoodName=F-ZERO X (J) [b1] CRC=076C5C15 BDA9D062 RefMD5=58D200D43620007314304F4E6C9E6528 [E6EC9D86F94CEB2E311F9C23BBD3781F] GoodName=F-ZERO X (J) [b2] CRC=076C5C15 BDA9D062 RefMD5=58D200D43620007314304F4E6C9E6528 [6AC12C2D6C0CCDF27C0D5179A500BB2D] GoodName=F-ZERO X (J) [b3] CRC=076C5C15 BDA9D062 RefMD5=58D200D43620007314304F4E6C9E6528 [75AEA2B252309552E434B30EDFE72711] GoodName=F-ZERO X (J) [t1] CRC=076C5C15 BDA9D062 RefMD5=58D200D43620007314304F4E6C9E6528 [C1CDB77BEA29A4B6F9A0829F8BA8A3F3] GoodName=F-ZERO X (U) (DXP Track Pack Hack) CRC=3983D1A9 2004158C [753437D0D8ADA1D12F3F9CF0F0A5171F] GoodName=F-ZERO X (U) [!] CRC=B30ED978 3003C9F9 SaveType=SRAM Players=4 [3AE32658B839FFA3189E3CA84E0B884A] GoodName=F-ZERO X (U) [f1] (Sex V1.0 Hack) CRC=7E399849 03DAC1CD [8363F102FE496B8D06494AA22E183A3E] GoodName=F-ZERO X (U) [f1] (Sex V1.1 Hack) CRC=D767D118 A1B07602 [7AC3B9A3AA846C439575912811B3E6E0] GoodName=F-ZERO X (U) [f1] CRC=B0B4EDFF B2A20628 RefMD5=753437D0D8ADA1D12F3F9CF0F0A5171F [EA168957B644AFE852DA1B827AFC3F9F] GoodName=F-ZERO X (U) [f2] (GameShark) CRC=0B46D03D 5FFAE173 RefMD5=753437D0D8ADA1D12F3F9CF0F0A5171F [9581FC6CEAC86DC8A2AEE4053043E422] GoodName=F1 Racing Championship (E) (M5) [!] CRC=3CECBCB8 6126BF07 Players=2 [AA951294528CA2CF55F810F9FE433F8D] GoodName=F1 Racing Championship (E) (M5) [f1] (NTSC) CRC=67D239A0 960F3A1A RefMD5=9581FC6CEAC86DC8A2AEE4053043E422 [26B18D35984528AE2F90ADBB2F2642F7] GoodName=FIFA - Road to World Cup 98 (E) (M7) [!] CRC=0E31EDF0 C37249D5 Players=4 SaveType=Controller Pack [479554129EB27A3546BAC96C80AF4F88] GoodName=FIFA - Road to World Cup 98 (E) (M7) [o1] CRC=0E31EDF0 C37249D5 RefMD5=26B18D35984528AE2F90ADBB2F2642F7 [2C6D146A8473511CFCFBBE8518F49D71] GoodName=FIFA - Road to World Cup 98 (U) (M7) [!] CRC=CB1ACDDE CF291DF2 Players=4 SaveType=Controller Pack [4E275B05BABCA9F2CD77749026BEA5ED] GoodName=FIFA - Road to World Cup 98 (U) (M7) [b1] CRC=CB1ACDDE CF291DF2 RefMD5=2C6D146A8473511CFCFBBE8518F49D71 [4CAAE8CA91F58D746B6A00BCBC122B87] GoodName=FIFA - Road to World Cup 98 (U) (M7) [b2] CRC=CB1ACDDE CF291DF2 RefMD5=2C6D146A8473511CFCFBBE8518F49D71 [217D93B21FEC3A5506DB014BF445B581] GoodName=FIFA - Road to World Cup 98 (U) (M7) [b3] CRC=CB1ACDDE CF291DF2 RefMD5=2C6D146A8473511CFCFBBE8518F49D71 [4421F891F0BA3CC7AA0FD566A162F2C8] GoodName=FIFA - Road to World Cup 98 (U) (M7) [b4] CRC=CB1ACDDE CF291DF2 RefMD5=2C6D146A8473511CFCFBBE8518F49D71 [0B8303E33B3F6E57531FB8EB3FAE65E9] GoodName=FIFA - Road to World Cup 98 (U) (M7) [o1] CRC=CB1ACDDE CF291DF2 RefMD5=2C6D146A8473511CFCFBBE8518F49D71 [3611779F29997267622CBC80E2D087CC] GoodName=FIFA - Road to World Cup 98 - World Cup heno Michi (J) [!] CRC=F5733C67 17A3973A Players=4 SaveType=Controller Pack [6432C622C05EA9CD3217E280AC2CE37C] GoodName=FIFA 99 (E) (M8) [!] CRC=0198A651 FC219D84 Players=4 SaveType=Controller Pack [940FFB6C94F84BFFD972A69ED86DD2FD] GoodName=FIFA 99 (E) (M8) [hI] CRC=F82C85BE DEB717E2 RefMD5=6432C622C05EA9CD3217E280AC2CE37C [148DE3073727B9FD156F10AFADD46864] GoodName=FIFA 99 (U) [!] CRC=7613A630 3ED696F3 Players=4 SaveType=Controller Pack [22082B8D892A2560032FD4DA5AB975A1] GoodName=FIFA 99 (U) [b1] CRC=21250314 E6A82CB9 RefMD5=148DE3073727B9FD156F10AFADD46864 [9A7006212947EE7648EE1D13162E55E0] GoodName=FIFA Soccer 64 (E) (M3) [!] CRC=C3F19159 65D2BC5A Players=4 SaveType=Controller Pack [1D71761771E3BFFC091E38B9E8B5E590] GoodName=FIFA Soccer 64 (E) (M3) [b1] CRC=C3F19159 65D2BC5A RefMD5=9A7006212947EE7648EE1D13162E55E0 [B5FBF033D76FDE89375D84B8918A5B61] GoodName=FIFA Soccer 64 (E) (M3) [o1] CRC=C3F19159 65D2BC5A RefMD5=9A7006212947EE7648EE1D13162E55E0 [084ABA16D84C87712A731D485FCDBE3E] GoodName=FIFA Soccer 64 (E) (M3) [o2] CRC=C3F19159 65D2BC5A RefMD5=9A7006212947EE7648EE1D13162E55E0 [376FFEC460443409BC29BB815ABFB42A] GoodName=FIFA Soccer 64 (E) (M3) [o3] CRC=C3F19159 65D2BC5A RefMD5=9A7006212947EE7648EE1D13162E55E0 [CF55223F9E3BD118969A34950BEDFD1F] GoodName=FIFA Soccer 64 (E) (M3) [o4] CRC=C3F19159 65D2BC5A RefMD5=9A7006212947EE7648EE1D13162E55E0 [CC7C58A032AABA19E72CCBFA6B3EEFF6] GoodName=FIFA Soccer 64 (U) (M3) [!] CRC=C3F19159 65D2BC5A Players=4 SaveType=Controller Pack [CA56F2DE80839EC88750C15A21AA7C53] GoodName=FIFA Soccer 64 (U) (M3) [b1] CRC=C3F19159 65D2BC5A RefMD5=CC7C58A032AABA19E72CCBFA6B3EEFF6 [37B24EE746A1EFD54730B5E24551E8CB] GoodName=FIFA Soccer 64 (U) (M3) [o1] CRC=C3F19159 65D2BC5A RefMD5=CC7C58A032AABA19E72CCBFA6B3EEFF6 [D99B1A3F6D72DEFD76F3620959B94944] GoodName=Famista 64 (J) [!] CRC=6DFF4C37 B1B763FD [EACE2271AE7F32A71625C9074115D640] GoodName=Famista 64 (J) [b1] CRC=6DFF4C37 B1B763FD [FE1B92F6A7E15A1AF367FAD957375B20] GoodName=Famista 64 (J) [b2] CRC=6DFF4C37 B1B763FD [4C9B2848A2EED723C331973A926488AB] GoodName=Famista 64 (J) [b3] CRC=6DFF4C37 B1B763FD [35F3928F12DA627DB79EDFC96B93F8D3] GoodName=Famista 64 (J) [b4] CRC=6DFF4C37 B1B763FD [9213243118ACCE5664D1A35CCDCCD87E] GoodName=Famista 64 (J) [b5] CRC=6DFF4C37 B1B763FD [155FA36DD3927A73534461B50417325F] GoodName=Famista 64 (J) [b6] CRC=6DFF4C37 B1B763FD [30413678CE47E1A2EB8DA80AF0D768F5] GoodName=Famista 64 (J) [b7] CRC=6DFF4C37 B1B763FD [ADAD4FF18E09D2F5B29AA6B5F159EF4E] GoodName=Famista 64 (J) [o1] CRC=6DFF4C37 B1B763FD [04DD2A319F4F5C22569B612CFDF9F00C] GoodName=Fighter Destiny 2 (U) [!] CRC=AEEF2F45 F97E30F1 Players=2 SaveType=Controller Pack [7B5AFA5D60F53FA640A5F2F24F5B2741] GoodName=Fighter Destiny 2 (U) [f1] (PAL-NTSC) CRC=11FBD007 E7029A81 RefMD5=04DD2A319F4F5C22569B612CFDF9F00C [EF5CB24CE3FE4E0F850901205437B574] GoodName=Fighter's Destiny (E) [!] CRC=36F1C74B F2029939 Players=2 SaveType=Eeprom 4KB [44B0BE1C4B48F6119D3AC9424903D0EB] GoodName=Fighter's Destiny (F) [!] CRC=0C41F9C2 01717A0D Players=2 SaveType=Eeprom 4KB [1CF379ACA2397222AF9F3DC5D8E3C444] GoodName=Fighter's Destiny (G) [!] CRC=FE94E570 E4873A9C Players=2 SaveType=Eeprom 4KB [D61D97A7658C419A25A9BAC96B0A3DF8] GoodName=Fighter's Destiny (U) [!] CRC=52F78805 8B8FCAB7 Players=2 SaveType=Eeprom 4KB [6E7C82AFF9F73A3DBF5B18D924BDF103] GoodName=Fighter's Destiny (U) [b1] CRC=52F78805 8B8FCAB7 RefMD5=D61D97A7658C419A25A9BAC96B0A3DF8 [5FB4DE8B475C4427F0F30A28C1266CF9] GoodName=Fighter's Destiny (U) [o1] CRC=52F78805 8B8FCAB7 RefMD5=D61D97A7658C419A25A9BAC96B0A3DF8 [722C3A74A90305D6079A37994CEBF5B2] GoodName=Fighting Cup (J) [!] CRC=49E46C2D 7B1A110C Players=2 SaveType=Eeprom 4KB [0035E8205336982E362402AAEA37D147] GoodName=Fighting Force 64 (E) [!] CRC=66CF0FFE AD697F9C Players=4 SaveType=Controller Pack CountPerOp=1 [E7008D17FD71D9C2BDA1362C885388B2] GoodName=Fighting Force 64 (U) [!] CRC=32EFC7CB C3EA3F20 Players=4 SaveType=Controller Pack CountPerOp=1 [13962910EFD82C2A2333CF38EE1FCD96] GoodName=Fighting Force 64 (U) [T+Ita_Cattivik66] CRC=32EFC7CB C3EA3F20 RefMD5=E7008D17FD71D9C2BDA1362C885388B2 [55868ECCCC14F43BF61032DE21D9F026] GoodName=Fighting Force 64 (U) [t1] CRC=655BE931 9FB2E4FB RefMD5=E7008D17FD71D9C2BDA1362C885388B2 [F427033D9184ACA164B971E559C0B420] GoodName=Fighting Force 64 (U) [t1][f1] (PAL) CRC=6976748D 1BF61F62 RefMD5=E7008D17FD71D9C2BDA1362C885388B2 [3B86A6C5B478A0D33A6547D3EA276AFE] GoodName=Fire Demo by Lac (PD) CRC=8E248649 2E1CDE52 SaveType=None Players=0 Rumble=No Status=3 [75F4A7E5932FB4AE791875E770E51C72] GoodName=Fireworks Demo by CrowTRobo (PD) CRC=ECAEC238 EE351DDA [BD46DD6275077D5A701482571F5DCDCC] GoodName=Fish Demo by NaN (PD) CRC=5CABD891 6229F6CE [ADD115AAD0AB7D33BFD243936D809178] GoodName=Flying Dragon (E) [!] CRC=22E9623F B60E52AD SaveType=Controller Pack Players=4 CountPerOp=1 [272B359D8F8AC48ACBF053C262F422E4] GoodName=Flying Dragon (U) [!] CRC=A92D52E5 1D26B655 SaveType=Controller Pack Players=4 CountPerOp=1 [46E9A352AD6AFB83B0557EC659957B2E] GoodName=Flying Dragon (U) [b1] CRC=A92D52E5 1D26B655 RefMD5=272B359D8F8AC48ACBF053C262F422E4 [1E672743A9B6B4E9DFB40D4004735F38] GoodName=Flying Dragon (U) [b2] CRC=A92D52E5 1D26B655 RefMD5=272B359D8F8AC48ACBF053C262F422E4 [171E55BF4383676C0B8F3D38B0D6A739] GoodName=Fogworld USA Demo by Horizon64 (PD) [h1C][o1] CRC=11C646E7 4D86C048 [B9A7BEFADFC4C46D61883B012FD2E69F] GoodName=Fogworld USA Demo by Horizon64 (PD) CRC=11C646E7 4D86C048 [8286DED701DFA22436D311BD5B93BD29] GoodName=Forsaken 64 (E) (M4) [!] CRC=142A17AA 13028D96 Players=4 SaveType=Controller Pack [74650F7154E0B2DD7C364F511B0D6A77] GoodName=Forsaken 64 (G) [!] CRC=C3CD76FF 9B9DCBDE Players=4 SaveType=Controller Pack [F023F3189722A96ACDCF0BDD9154EF11] GoodName=Forsaken 64 (G) [h1C] CRC=C3CD76FF 9B9DCBDE RefMD5=74650F7154E0B2DD7C364F511B0D6A77 [B775E4FF0205C405E3AA0A8DF50C54DE] GoodName=Forsaken 64 (G) [o1] CRC=C3CD76FF 9B9DCBDE RefMD5=74650F7154E0B2DD7C364F511B0D6A77 [5CDEE5503A57D14533C66B35A5848899] GoodName=Forsaken 64 (U) [!] CRC=9E330C01 8C0314BA Players=4 SaveType=Controller Pack [C61FBF0BE56FBCD8FD373EDFB5D3E538] GoodName=Forsaken 64 (U) [b1] CRC=9E330C01 8C0314BA RefMD5=5CDEE5503A57D14533C66B35A5848899 [795F7C1D3D98125C3AEA0FFFE54410DE] GoodName=Forsaken 64 (U) [t1] CRC=21FF0391 09F141A1 RefMD5=5CDEE5503A57D14533C66B35A5848899 [ECB92E2663D5B3EEA08A149FC31E3701] GoodName=Forsaken 64 (U) [t2] CRC=21FF0391 09F141A1 RefMD5=5CDEE5503A57D14533C66B35A5848899 [A50182B02E3F0D28BE1AC341DDC92DCA] GoodName=Forsaken 64 (U) [t3] CRC=5E0C3DF7 8BA027D9 RefMD5=5CDEE5503A57D14533C66B35A5848899 [360DC6BE6D06DCA12E53C077AC0D2571] GoodName=Fox Sports College Hoops '99 (U) [!] CRC=3261D479 ED0DBC25 [EE0C756F832827E3ACDF6DBD410ADCA4] GoodName=Fox Sports College Hoops '99 (U) [f1] (PAL) CRC=3261D429 70AF148E [5C4496C6D937364DE0022D1C07BE38A1] GoodName=Fractal Zoomer Demo by RedboX (PD) CRC=30E6FE79 3EEA5386 [7C87831B28D5E49F4EC2BDAE9D01F3B9] GoodName=Freekworld BBS Intro by Rene (PD) [a1] CRC=714001E3 2EB04B67 [DE7384A7DA97EEEAEF80CBEFBD17961A] GoodName=Freekworld BBS Intro by Rene (PD) CRC=714001E3 2EB04B67 [7CCB9B385D1405603E7F645352EA62AA] GoodName=Freekworld New Intro by Ste (PD) CRC=69458FFE C9D007AB [372F76C0DBE0BE41F5A0A47252869E8E] GoodName=Friendship Demo by Renderman (PD) [b1] CRC=CEE5C8CD D3D85466 [C18F1C91F6F15971DB18167EB72E6CEF] GoodName=Friendship Demo by Renderman (PD) CRC=CEE5C8CD D3D85466 [CB2C9C6104C3EF69A1CF979525F2F73D] GoodName=Frogger 2 (U) (Alpha) [!] CRC=E8E5B179 44AA30E8 [27F61A55E27EA7F1EDE4CA11966ACC7C] GoodName=Frogger 2 (U) (Alpha) [o1] CRC=E8E5B179 44AA30E8 [FA6CE44ECF86DEC0AFA321D82CD3ED6E] GoodName=Frogger 2 (U) (Alpha) [o2] CRC=E8E5B179 44AA30E8 [BBCDE4966BEE5602A80D9B8C1011DFA6] GoodName=Fushigi no Dungeon - Fuurai no Shiren 2 - Oni Shuurai! Shiren Jou! (J) [!] CRC=F774EAEE F0D8B13E Players=4 CountPerOp=1 [316C59DAE45C20250A0419A937E7D65B] GoodName=G.A.S.P!! Fighter's NEXTream (E) [!] CRC=68FCF726 49658CBC Players=4 SaveType=Controller Pack [6C73558DE5A1EEE6597D7264F9A11B0C] GoodName=G.A.S.P!! Fighter's NEXTream (J) [!] CRC=AF8679B6 5E1011BF Players=4 SaveType=Controller Pack [D7C983F603EE7AE8156C6EAEEF7195C4] GoodName=G.A.S.P!! Fighter's NEXTream (J) [o1] CRC=AF8679B6 5E1011BF RefMD5=6C73558DE5A1EEE6597D7264F9A11B0C [F61757BE8ECF0D7068C23CFCE23D2F10] GoodName=GBlator for CD64 (PD) [f1] (V64-PAL) CRC=5D1795D2 C0D72338 [ECE232D98B095604D1C15F9571DE45F8] GoodName=GBlator for CD64 (PD) CRC=5D8B9226 47605A2A [E3FDAB4E3C417E623A02875D6A6E7467] GoodName=GBlator for NTSC Dr V64 (PD) CRC=5C1AAD1C AF7BF297 [0F85543F27896856EB82C52E3C7CCAB5] GoodName=GBlator for PAL Dr V64 (PD) CRC=5D0F8DD2 990BE538 [628AA3CD492559B705488F634797E045] GoodName=GT 64 - Championship Edition (E) (M3) [!] CRC=EE4A0E33 8FD588C9 SaveType=Eeprom 4KB Players=4 CountPerOp=1 [15DB716942C36A0CB392226001536A2A] GoodName=GT 64 - Championship Edition (E) (M3) [b1] CRC=B6A90FB4 E2C235BA RefMD5=628AA3CD492559B705488F634797E045 [6969E979395A0AF64CAF2DF9C1054C94] GoodName=GT 64 - Championship Edition (E) (M3) [f1] (NTSC) CRC=B6A90FB4 E2C235BA RefMD5=628AA3CD492559B705488F634797E045 [F3E25D0A7B98E8E25B7570A6E056D33C] GoodName=GT 64 - Championship Edition (E) (M3) [f2] (NTSC) CRC=93A292F1 ADF98E2E RefMD5=628AA3CD492559B705488F634797E045 [FE81AA381719FADA693D803BAE7D5EB9] GoodName=GT 64 - Championship Edition (U) [!] CRC=C49ADCA2 F1501B62 Players=4 SaveType=Eeprom 4KB CountPerOp=1 [4695A944B019F3829F2616591659A7CE] GoodName=GT 64 - Championship Edition (U) [b1] CRC=C49ADCA2 F1501B62 RefMD5=FE81AA381719FADA693D803BAE7D5EB9 [9B5A92F32B9C807B2A9C01E42EF8F461] GoodName=GT Demo (PD) [a1] CRC=2575EF19 D13D2A2C [C41F0D1EDD2C8259EB27A8C97CAA3D71] GoodName=GT Demo (PD) CRC=2575EF19 D13D2A2C [3DE02CF363E4D081530FEF53FDAB5780] GoodName=Game Boy 64 (POM '98) (PD) (Illegal Mode Enabled) CRC=97FC2167 4616872B [6C36E6A39ABBAB3E9139E9ECBC67E569] GoodName=Game Boy 64 (POM '98) (PD) CRC=97FC2167 4616872B [47C7DF82B3ADEAE19C8AFACE40FEB1AC] GoodName=Game Boy 64 + Super Mario 3 (PD) CRC=60D0A702 432236C6 [7AD954ADD3779FB3BE5904D1B935EBFB] GoodName=GameBooster 64 V1.1 (NTSC) (Unl) [b1] CRC=1A5C1CAD 7BAF97F2 [C60F99DCF6B05FAA2C33970462F93865] GoodName=GameBooster 64 V1.1 (NTSC) (Unl) [f1] CRC=5C1AAD1C AF7BF297 [60D0264B38E22EF0D6B9549E4C81C29F] GoodName=GameBooster 64 V1.1 (NTSC) (Unl) CRC=12678830 4E5AE439 [DB02D36555E2473EA3036B8E0868254E] GoodName=GameBooster 64 V1.1 (PAL) (Unl) [b1] CRC=D06002A7 2243C636 [4C383E57BC1062466328D0B59FB7AA67] GoodName=GameBooster 64 V1.1 (PAL) (Unl) [f1] (Sound) CRC=3BCCD2DB 953FA1F5 [1A56FE2B2FE339C7DD4FF8D37EC8654B] GoodName=GameBooster 64 V1.1 (PAL) (Unl) CRC=12678830 4E5AE439 [437EFD7FD7F84F4C0F802D3BF1F8464E] GoodName=GameShark Pro V2.0 (Unl) CRC=16FB52A4 7AED1FB3 [F275A4216744D8F04B4A0CD74DE53111] GoodName=GameShark Pro V3.3 (Apr 2000) (Unl) [!] CRC=EA6D5BF8 E2B4696C [9F556D184D945369DDD11B5F815814A8] GoodName=GameShark Pro V3.3 (Mar 2000) (Unl) [!] CRC=8F89ABA0 C34C2610 [96CA36D474E82C270A129D775C63167A] GoodName=Ganbare Goemon - Derodero Douchuu Obake Tenkomori (J) [!] CRC=457B9CD9 09C55352 SaveType=Controller Pack Players=4 [7EB07675E2E9CB547A3B238AA71F57CC] GoodName=Ganbare Goemon - Derodero Douchuu Obake Tenkomori (J) [t1] CRC=BD8E0304 33E3998A RefMD5=96CA36D474E82C270A129D775C63167A [3F50712011BE1CB59B45684D7D61F11E] GoodName=Ganbare Goemon - Derodero Douchuu Obake Tenkomori (J) [t2] CRC=A39C0306 F1DD4CC6 RefMD5=96CA36D474E82C270A129D775C63167A [2BDE49F2855030DE342976C9A95B81B3] GoodName=Ganbare Goemon - Mononoke Sugoroku (J) [!] CRC=B2C6D27F 2DA48CFD Players=4 [7F4E8F2ECF04BE27E660AC2EFDAC0C68] GoodName=Ganbare Goemon - Neo Momoyama Bakufu no Odori (J) [b1] CRC=832C168B 56A2CDAE [19BFC2C0124C009B51FE1724B07FAC81] GoodName=Ganbare Goemon - Neo Momoyama Bakufu no Odori (J) [b2] CRC=832C168B 56A2CDAE [A2B81C0B7E3989152CA90901D05E6352] GoodName=Ganbare Goemon - Neo Momoyama Bakufu no Odori (J) [h1C] CRC=832C168B 56A2CDAE [A7C82BB5098A7526D5417EE9A8981F48] GoodName=Ganbare Goemon - Neo Momoyama Bakufu no Odori (J) [h1C][t1] CRC=7BB5698F D99BF02B [9B929E0BF8D63E62820F2FA6257CC5CF] GoodName=Ganbare Goemon - Neo Momoyama Bakufu no Odori (J) CRC=832C168B 56A2CDAE [8D8F3A8393F3F5489B3B144369565594] GoodName=Ganbare Nippon! Olympics 2000 (J) [!] CRC=21FFFD0A FA0D1D98 Players=4 SaveType=Controller Pack [28C2108A375F7731E719333A09439D2F] GoodName=Gauntlet Legends (E) [!] CRC=D543BCD6 2BA5E256 Players=4 SaveType=Controller Pack [0806E6DB8B2BF0501BE9F2D78D280DCF] GoodName=Gauntlet Legends (E) [b1] CRC=D543BCD6 2BA5E256 RefMD5=28C2108A375F7731E719333A09439D2F [3B2615D754A61E45B1034D555D830A78] GoodName=Gauntlet Legends (J) [!] CRC=70B0260E 6716D04C Players=4 SaveType=Controller Pack [9CB963E8B71F18568F78EC1AF120362E] GoodName=Gauntlet Legends (U) [!] CRC=729B5E32 B728D980 Players=4 SaveType=Controller Pack [50F8E73CA0160EB1A339AC2137A7B559] GoodName=Gauntlet Legends (U) [f1] (PAL) CRC=AA89A18D 0FC2AFE6 RefMD5=9CB963E8B71F18568F78EC1AF120362E [5270D98F9E67DC7EF354ECE109C2A18F] GoodName=Getter Love!! (J) [!] CRC=489C84E6 4C6E49F9 Players=4 [3BE170E7E94A03BD4E36732EB137EE39] GoodName=Getter Love!! (J) [b1] CRC=489C84E6 4C6E49F9 RefMD5=5270D98F9E67DC7EF354ECE109C2A18F [1E6573F2A7454C133EB05A14C15909A9] GoodName=Getter Love!! (J) [b2] CRC=489C84E6 4C6E49F9 RefMD5=5270D98F9E67DC7EF354ECE109C2A18F [43B9A7A5CCB6EA3F4860F9F80D73669D] GoodName=Gex 3 - Deep Cover Gecko (E) (M2) (Fre-Ger) [!] CRC=874733A4 A823745A Players=1 SaveType=Controller Pack [9F0492A34D7A2D7C4E9F29DC1848A04A] GoodName=Gex 3 - Deep Cover Gecko (E) (M3) (Eng-Spa-Ita) [!] CRC=99179359 2FE7EBC3 Players=1 SaveType=Controller Pack [6770DDEC84EB21A5E0D0F55DFD52A01A] GoodName=Gex 3 - Deep Cover Gecko (U) [!] CRC=3EDC7E12 E26C1CC9 Players=1 SaveType=Controller Pack [6E0FCFF93600A28C379EF52940C54E68] GoodName=Gex 3 - Deep Cover Gecko (U) [f1] (PAL) CRC=E68A9F6E 24FB3315 RefMD5=6770DDEC84EB21A5E0D0F55DFD52A01A [EF0988EFDCEA31B88A3920CEEC17B4FF] GoodName=Gex 3 - Deep Cover Gecko (U) [t1] CRC=E6896018 6013AD31 RefMD5=6770DDEC84EB21A5E0D0F55DFD52A01A [5BBA457E286D250101CE274E0E58080D] GoodName=Gex 64 - Enter the Gecko (E) [!] CRC=E68A000E 639166DD Players=1 SaveType=Controller Pack [47F9D900C97ECE154BB40A9C6DCCD3FD] GoodName=Gex 64 - Enter the Gecko (U) [!] CRC=89FED774 CAAFE21B Players=1 SaveType=Controller Pack [A33677B04870DE18013B760B4F53F6BF] GoodName=Gex 64 - Enter the Gecko (U) [f1] (PAL) CRC=4445612B F8CC9F8B RefMD5=47F9D900C97ECE154BB40A9C6DCCD3FD [68828BDCAAE1C222DABB679B74B8ACD0] GoodName=Gex 64 - Enter the Gecko (U) [t1] CRC=71ED5D14 76A110D0 RefMD5=47F9D900C97ECE154BB40A9C6DCCD3FD [3419EC10EE470F1888811D4A9B5FAACE] GoodName=Ghemor - CD64 Xfer & Save Util (CommsLink) by CrowTRobo (PD) CRC=2F67DC59 74AAD9F1 [20DA03C2098F83A790E929AC9A4CDB2E] GoodName=Ghemor - CD64 Xfer & Save Util (Parallel) by CrowTRobo (PD) CRC=0D99E899 43E0FCD1 [2F2163C53DB135792331DF00398B3F87] GoodName=Glover (E) (M3) [!] CRC=F5237301 99E3EE93 Players=1 SaveType=Eeprom 4KB [8881FBEAE9B84485CF66876B60CD45DF] GoodName=Glover (E) (M3) [f1] (NTSC) CRC=4D2B5318 47DB5316 RefMD5=2F2163C53DB135792331DF00398B3F87 [87AA5740DFF79291EE97832DA1F86205] GoodName=Glover (U) [!] CRC=8E6E01FF CCB4F948 Players=1 SaveType=Eeprom 4KB [A1C34717476027DFBA72EEA56F94D650] GoodName=Glover (U) [b1] CRC=0E450FFC 9FFC8375 RefMD5=87AA5740DFF79291EE97832DA1F86205 [873DC63304F632A71B309988C39C48F7] GoodName=Glover (U) [b2] CRC=7773E2BB 71D0A925 RefMD5=87AA5740DFF79291EE97832DA1F86205 [87615822A0E00DD4FC7FDF636D4B8139] GoodName=Glover (U) [t1] CRC=51938192 BD4A98A1 RefMD5=87AA5740DFF79291EE97832DA1F86205 [29BC5C1A24D3979D376AD421000AC9CB] GoodName=Goemon's Great Adventure (U) [!] CRC=4252A5AD AE6FBF4E Players=4 SaveType=Controller Pack [E048C2FE226634F039882C35A2A4EEA9] GoodName=Golden Nugget 64 (U) [!] CRC=4690FB1C 4CD56D44 Players=4 SaveType=Controller Pack [7CE28ADAB6FE43207B4BB19564C38AEF] GoodName=Golden Nugget 64 (U) [b1] CRC=4690FB1C 4CD56D44 RefMD5=E048C2FE226634F039882C35A2A4EEA9 [5340DD96CF1CD7AC6D72000D40B915CE] GoodName=Golden Nugget 64 (U) [b2] CRC=4690FB1C 4CD56D44 RefMD5=E048C2FE226634F039882C35A2A4EEA9 [2DB6ED9A6A244CB209FFDF52D9006E4D] GoodName=Golden Nugget 64 (U) [f1] (PAL) CRC=438CEBDC 44C1837C RefMD5=E048C2FE226634F039882C35A2A4EEA9 [F68F02A69829469F208D538D7CF4A215] GoodName=Golden Nugget 64 (U) [h1C] CRC=4690FB1C 4CD56D44 RefMD5=E048C2FE226634F039882C35A2A4EEA9 [CFF69B70A8AD674A0EFE5558765855C9] GoodName=GoldenEye 007 (E) [!] CRC=0414CA61 2E57B8AA Players=4 SaveType=Eeprom 4KB Rumble=No Status=4 [ECD4F078DC77F4B2D12C1C0F5CABA323] GoodName=GoldenEye 007 (E) [b1] CRC=0414CA61 2E57B8AA RefMD5=CFF69B70A8AD674A0EFE5558765855C9 [D83BDE156D6FC400C28308A447B8FCA0] GoodName=GoldenEye 007 (E) [h1C] CRC=0414CA61 2E57B8AA RefMD5=CFF69B70A8AD674A0EFE5558765855C9 [F7A0EFCF8DB90FBD6FD9BFC570A4804A] GoodName=GoldenEye 007 (E) [t1] (Rapid Fire) CRC=540F359D FF327745 RefMD5=CFF69B70A8AD674A0EFE5558765855C9 [1880DA358F875C0740D4A6731E110109] GoodName=GoldenEye 007 (J) [!] CRC=A24F4CF1 A82327BA Players=4 SaveType=Eeprom 4KB Rumble=Yes Status=4 [FB916F914D9635F8FCBCE37A6466079D] GoodName=GoldenEye 007 (J) [t1] (Rapid Fire) CRC=B244B30C 72A648D8 RefMD5=1880DA358F875C0740D4A6731E110109 [3AA7D5F55E3E5E6C7419CC1625AF69BC] GoodName=GoldenEye 007 (U) (Frozen Enemies Hack) CRC=DCBCACD1 D72FAA33 [9AB9FB9782C7BB42A48C1465CD8F4EF6] GoodName=GoldenEye 007 (E) (Citadel Hack) CRC=44853212 B1F75C3E [ECAB0839D3ED0E3AA8516EF1C077CF0D] GoodName=GoldenEye 007 (U) (Citadel Hack) CRC=1C6F7718 CBAC1E7E [7DD2F0E19E35511C3E1C81D206CDC472] GoodName=GoldenEye 007 (U) (G5 Multi (for backups) Hack) CRC=F2C3A524 A1C4DB13 [F4AB4CD6A8AF21E8A51BF48578CC7F24] GoodName=GoldenEye 007 (U) (G5 Multi Hack) CRC=DCBC50D1 09FD1AA3 [FD35D8A9DE0F5AB500A588A6AB5F6FB9] GoodName=GoldenEye 007 (U) (Tetris Hack) CRC=A84D23BA A1974DBD [3BC50511DE8598A49E79F4CF2E4CF8E0] GoodName=GoldenEye 007 (U) (God Mode Hack) CRC=DCBCACD1 E1051EA6 [86C6B996A55F90FC2410B16AE4BA5EE0] GoodName=GoldenEye 007 (U) (No Music Hack) CRC=DCBCACD1 A67DDFB4 [15B57CDECA506B34FF6246ED06AABD50] GoodName=GoldenEye 007 (U) (No Power Bar Hack) CRC=DCBCACD1 F294D541 [70C525880240C1E838B8B1BE35666C3B] GoodName=GoldenEye 007 (U) [!] CRC=DCBC50D1 09FD1AA3 Players=4 SaveType=Eeprom 4KB Rumble=No Status=4 [0B5A50E8D477B3BC53BE997264FE84A5] GoodName=GoldenEye 007 (U) [b1] CRC=DCBC50D1 09FD1AA3 RefMD5=70C525880240C1E838B8B1BE35666C3B [C7A22DC5D95EBE1F8EDB0D68C13027C1] GoodName=GoldenEye 007 (U) [h1C] CRC=DCBC50D1 09FD1AA3 RefMD5=70C525880240C1E838B8B1BE35666C3B [22FF6C18EB028792EF350554B1E1FA68] GoodName=GoldenEye 007 (U) [o1] CRC=DCBC50D1 09FD1AA3 RefMD5=70C525880240C1E838B8B1BE35666C3B [6B8BA063C40420C164AA81ACB6089CB6] GoodName=GoldenEye 007 (U) [o2] CRC=DCBC50D1 09FD1AA3 RefMD5=70C525880240C1E838B8B1BE35666C3B [18C00B5C3D9DF09AB9E8A737E61C3B47] GoodName=GoldenEye 007 (U) [t1] (Rapid Fire) CRC=E09DAF6C 8A2B86F4 RefMD5=70C525880240C1E838B8B1BE35666C3B [2E50BC853F6EFC1E0D5E4679739F43C4] GoodName=GoldenEye 007 (U) [t2] CRC=8E1B3303 9D4F5035 RefMD5=70C525880240C1E838B8B1BE35666C3B [95B784D6DD3470903BAF6BBB533E088B] GoodName=GoldenEye 007 (U) [t3] (All Guns Zoom Mode) CRC=1C6F7718 CBAC1E7E RefMD5=70C525880240C1E838B8B1BE35666C3B [AD3D099C84096DBACAD7F1CF982631B2] GoodName=GoldenEye 007 Intro by SonCrap (PD) CRC=9303DD17 0813B398 [9B8A7541D0234F4D97004ECBC216D9C2] GoodName=HIPTHRUST by MooglyGuy (PD) CRC=88A12FB3 8A583CBD [821A739790F1D390DC7D4168C5E032DE] GoodName=HSD Quick Intro (PD) CRC=BD1263E5 388C9BE7 [7B38C3F7DA8D9778B41B0047A133590A] GoodName=HSV Adventure Racing (A) [b1] CRC=72611D7D 9919BDD2 CountPerOp=3 [8C7AF37A3CB7306EBCCAC4029EB5C57D] GoodName=HSV Adventure Racing (A) [f1] (NTSC) CRC=B20CC247 B879579A [26F7D8F4640EBDFA823F84E5F89D62BF] GoodName=HSV Adventure Racing (A) CRC=72611D7D 9919BDD2 CountPerOp=3 [3D4C7B11076BAFA4620BCC154C0EEEF3] GoodName=Hamster Monogatari 64 (J) [!] CRC=95A80114 E0B72A7F Players=1 CountPerOp=1 [617197EF2B6B51E58488C9F6B75F112E] GoodName=Hard Coded Demo by Silo and Fractal (PD) [a1] CRC=775AFA9C 0EB52EF6 CountPerOp=1 [FB8974C6130A6B8585EA98D6661553BC] GoodName=Hard Coded Demo by Silo and Fractal (PD) CRC=775AFA9C 0EB52EF6 CountPerOp=1 [193913BB063F3D945019E8F765F48F1C] GoodName=Hard Pom '99 Demo by TS_Garp (POM '99) (PD) CRC=9856E53D AF483207 [A02A4FB4B93E9847348440652CEF8D4D] GoodName=Harukanaru Augusta Masters 98 (J) [!] CRC=09AE57B1 182A5637 Players=1 [397A69AA3829EA5FECB4CDF399084E31] GoodName=Harukanaru Augusta Masters 98 (J) [b1] CRC=09AE57B1 182A5637 RefMD5=A02A4FB4B93E9847348440652CEF8D4D [FA6B3E3A04DE8D96B2C26F974F59A34D] GoodName=Harukanaru Augusta Masters 98 (J) [b2] CRC=09AE57B1 182A5637 RefMD5=A02A4FB4B93E9847348440652CEF8D4D [4454122EC735252E40EC22FF5DE021C6] GoodName=Harukanaru Augusta Masters 98 (J) [h1C] CRC=09AE57B1 182A5637 RefMD5=A02A4FB4B93E9847348440652CEF8D4D [6DA848A70D83ECE130D274124760928E] GoodName=Harvest Moon 64 (U) [!] CRC=98DF9DFC 6606C189 Players=1 SaveType=SRAM CountPerOp=1 [3CDD87026EFEC9A03648D225F97858A5] GoodName=Harvest Moon 64 (U) [T+Pol001] CRC=98DF9DFC 6606C189 RefMD5=6DA848A70D83ECE130D274124760928E [245FD6D774B74D4703822511CA174A54] GoodName=Harvest Moon 64 (U) [b1] CRC=98DF9DFC 6606C189 RefMD5=6DA848A70D83ECE130D274124760928E [218DE5B3709555DA3870CE859D1975E5] GoodName=Harvest Moon 64 (U) [f1] (PAL) CRC=6BCF21E8 CAB5AF4F RefMD5=6DA848A70D83ECE130D274124760928E [956AEC111B74720D55496F81ADA0FEFD] GoodName=Harvest Moon 64 (U) [t1] CRC=60CC9644 C62AE877 RefMD5=6DA848A70D83ECE130D274124760928E [54AD823812D2C2E8B1688C4ACE2E654D] GoodName=Harvest Moon 64 (U) [t1][f1] (PAL-NTSC) CRC=60CC9644 C62AE877 RefMD5=6DA848A70D83ECE130D274124760928E [19F4694B8557BC095EE07B5C8FBD23B5] GoodName=Heavy 64 Demo by Destop (PD) CRC=5D391A40 84D7A637 [5E8539E037EEA88C5A2746F60E431C8D] GoodName=Heiwa Pachinko World 64 (J) [!] CRC=3E70E866 4438BAE8 Players=1 [9D0D85E3A0C94B98D6404E8FC28E7B01] GoodName=Heiwa Pachinko World 64 (J) [b1] CRC=3E70E866 4438BAE8 RefMD5=5E8539E037EEA88C5A2746F60E431C8D [C2BEDCB364162D6DAC86548D7721F827] GoodName=Heiwa Pachinko World 64 (J) [b2] CRC=3E70E866 4438BAE8 RefMD5=5E8539E037EEA88C5A2746F60E431C8D [3B6994B373BEC6E917F0B834AA6D1A46] GoodName=Heiwa Pachinko World 64 (J) [b3] CRC=3E70E866 4438BAE8 RefMD5=5E8539E037EEA88C5A2746F60E431C8D [013E130D0D4F132741AA38D1A397E10A] GoodName=Heiwa Pachinko World 64 (J) [h1C] CRC=3E70E866 4438BAE8 RefMD5=5E8539E037EEA88C5A2746F60E431C8D [FDF797C5FFB531FCF04E0A1928691EA3] GoodName=Heiwa Pachinko World 64 (J) [o1] CRC=3E70E866 4438BAE8 RefMD5=5E8539E037EEA88C5A2746F60E431C8D [1546877FD85C00A83515005727E5FDA5] GoodName=Hercules - The Legendary Journeys (E) (M6) [!] CRC=AE90DBEB 79B89123 CountPerOp=1 [6BBD8C42F6EF8F5B9541D6F4DB657DD7] GoodName=Hercules - The Legendary Journeys (U) [!] CRC=7F3CEB77 8981030A Players=1 SaveType=Controller Pack CountPerOp=1 [57D8E020643146B325A11612FEFACF74] GoodName=Hercules - The Legendary Journeys (U) [o1] CRC=7F3CEB77 8981030A RefMD5=6BBD8C42F6EF8F5B9541D6F4DB657DD7 [8CF8043BDFA89A2B0C4699D0E695E844] GoodName=Hercules - The Legendary Journeys (U) [t1][f1] (PAL-NTSC) CRC=DB7184C9 F53AC14A RefMD5=6BBD8C42F6EF8F5B9541D6F4DB657DD7 [C2C3115821C738A4834E977E8325F89E] GoodName=Hercules - The Legendary Journeys (U) [t1][f1][b1] CRC=DB7184C9 F53AC14A RefMD5=6BBD8C42F6EF8F5B9541D6F4DB657DD7 [3F1CF2D6C1580FDCCD662F9FCF8C4214] GoodName=Hercules - The Legendary Journeys (U) [t1][f2] (PAL-NTSC) CRC=DB7184C9 F53AC14A RefMD5=6BBD8C42F6EF8F5B9541D6F4DB657DD7 [2080262A251D270F9CE819887F2104A7] GoodName=Hexen (E) [!] CRC=95B2B30B 2B6415C1 Players=4 SaveType=Controller Pack CountPerOp=1 [E86A8BF46985B7CE8459AFBE5FC3DCC3] GoodName=Hexen (E) [h1C] CRC=95B2B30B 2B6415C1 RefMD5=2080262A251D270F9CE819887F2104A7 [A5921C00111200257284CE0ABA0904CA] GoodName=Hexen (F) [!] CRC=5C1B5FBD 7E961634 Players=4 SaveType=Controller Pack CountPerOp=1 [08CBB141DEC604E4DAD2787F237D57A2] GoodName=Hexen (G) [!] CRC=9AB3B50A BC666105 Players=4 SaveType=Controller Pack CountPerOp=1 [35E9ECE11306EF7D8F5F09F65761D365] GoodName=Hexen (G) [h1C] CRC=9AB3B50A BC666105 RefMD5=08CBB141DEC604E4DAD2787F237D57A2 [672152CF4DCB5D0A19662C11EFF71452] GoodName=Hexen (J) [!] CRC=66751A57 54A29D6E Players=4 SaveType=Controller Pack CountPerOp=1 [EB98F1B8C6898AF7417F6882946DA9B3] GoodName=Hexen (U) [!] CRC=9CAB6AEA 87C61C00 Players=4 SaveType=Controller Pack [B06625703DB3A03BAE3D02FD0F904541] GoodName=Hexen (U) [b1] CRC=9CAB6AEA 87C61C00 RefMD5=EB98F1B8C6898AF7417F6882946DA9B3 [EA5A22A5A2DA96D88939171CEA41A1F1] GoodName=Hexen (U) [h1C] CRC=9CAB6AEA 87C61C00 RefMD5=EB98F1B8C6898AF7417F6882946DA9B3 [9301923AE938320FF0186B7279AFE6D8] GoodName=Hexen (U) [t1] CRC=E6BA0A06 8A3D2C2F RefMD5=EB98F1B8C6898AF7417F6882946DA9B3 [59BA99120BE9D438C53EAED6091B9B7D] GoodName=Hexen (U) [t2] CRC=E6BA0A06 8A3D2C2F RefMD5=EB98F1B8C6898AF7417F6882946DA9B3 [1280C78F286FC1C437A4905EE42C47F1] GoodName=Hey You, Pikachu! (U) [!] CRC=D3F10E5D 052EA579 Players=1 SaveType=Eeprom 4KB Rumble=Yes [DCC316EFFC4928F5B0AE8D273D8024BF] GoodName=HiRes CFB Demo (PD) CRC=4072572D A23DB72C [73084495F3209C54900525436BBBC531] GoodName=Hiryuu no Ken Twin (J) [!] CRC=35FF8F1A 6E79E3BE CountPerOp=1 [8976913EFBE98EFED3B0B32CBCAA8B49] GoodName=Hiryuu no Ken Twin (J) [h1C] CRC=35FF8F1A 6E79E3BE CountPerOp=1 [E0C39E55DE1D588371D5F99056F3578C] GoodName=Hiryuu no Ken Twin (J) [h2C] CRC=35FF8F1A 6E79E3BE CountPerOp=1 [EA9B6EA32CCEB8F7EFBB2FEA211B8E89] GoodName=Hiryuu no Ken Twin (J) [h3C] CRC=35FF8F1A 6E79E3BE CountPerOp=1 [FA6A2E00BBFF236DAC91F08544AFFA40] GoodName=Holy Magic Century (E) [!] CRC=277B129D DD3879FF Players=1 SaveType=Controller Pack [80CC112F62E9A8581A1BB6A1D1E1488B] GoodName=Holy Magic Century (E) [b1] CRC=277B129D DD3879FF RefMD5=FA6A2E00BBFF236DAC91F08544AFFA40 [668908C495432AD099C5439E38809053] GoodName=Holy Magic Century (F) [h1C] CRC=B35FEBB0 7427B204 [27D3EFBD35B1F580330961480B988FB5] GoodName=Holy Magic Century (F) [o1] CRC=B35FEBB0 7427B204 [988F5ABD96259196343659E913666820] GoodName=Holy Magic Century (F) CRC=B35FEBB0 7427B204 [AB676C3E9D26A77450DDB4AACD1A3861] GoodName=Holy Magic Century (G) [!] CRC=75FA0E14 C9B3D105 Players=1 SaveType=Controller Pack [ACF823A6EF4E77FE5B940D716DCED6E9] GoodName=Holy Magic Century (G) [b1] CRC=75FA0E14 C9B3D105 RefMD5=AB676C3E9D26A77450DDB4AACD1A3861 [E26F4FFD2AA19E6EE9F9216A15189F14] GoodName=Holy Magic Century (G) [b2] CRC=75FA0E14 C9B3D105 RefMD5=AB676C3E9D26A77450DDB4AACD1A3861 [F40D3DE4745BACC69458BAB25D6067F9] GoodName=Holy Magic Century (G) [b3] CRC=75FA0E14 C9B3D105 RefMD5=AB676C3E9D26A77450DDB4AACD1A3861 [B1A67AEBC2BE89A800E5EB60C0DFA968] GoodName=Hoshi no Kirby 64 (J) (V1.0) [!] CRC=C1D702BD 6D416547 SaveType=Eeprom 4KB Players=4 [460A42ED5612EBBF92F386689067384E] GoodName=Hoshi no Kirby 64 (J) (V1.0) [f1] CRC=22F301B6 D0A03C3C RefMD5=B1A67AEBC2BE89A800E5EB60C0DFA968 [07EA11684D74DA87719F05A1BDC4CCB3] GoodName=Hoshi no Kirby 64 (J) (V1.0) [f2] CRC=57CD5D6D 046282B1 RefMD5=B1A67AEBC2BE89A800E5EB60C0DFA968 [FFDB4456F799722BCFE430632C3986AE] GoodName=Hoshi no Kirby 64 (J) (V1.1) [!] CRC=CA1BB86F 41CCA5C5 Players=4 SaveType=Eeprom 4KB [3EC0471E2CBEE17471DDBF80C56606D5] GoodName=Hoshi no Kirby 64 (J) (V1.2) [!] CRC=0C581C7A 3D6E20E4 Players=4 SaveType=Eeprom 4KB [35E039F8E79843917D02BE06D00C457B] GoodName=Hoshi no Kirby 64 (J) (V1.3) [!] CRC=BCB1F89F 060752A2 Players=4 SaveType=Eeprom 4KB [EF34DA35EF8A0734843CB182C19FEB26] GoodName=Hot Wheels Turbo Racing (E) (M3) [!] CRC=E7D20193 C1158E93 Players=4 SaveType=Controller Pack [BB8A58282C5D4E32B34556407ACD920E] GoodName=Hot Wheels Turbo Racing (E) (M3) [b1] CRC=E7D20193 C1158E93 RefMD5=EF34DA35EF8A0734843CB182C19FEB26 [4311A1AEF1898678331F7E3486055307] GoodName=Hot Wheels Turbo Racing (U) [!] CRC=C7C98F8E 42145DDE Players=4 SaveType=Controller Pack [50091668743D2DE7CAA253420D32C2D8] GoodName=Hot Wheels Turbo Racing (U) [f1] (PAL) CRC=14DE709E F882947D RefMD5=4311A1AEF1898678331F7E3486055307 [7D32A665027ABB585BD4FB7194752B34] GoodName=Hot Wheels Turbo Racing (U) [t1] CRC=1FDFCBDC FCD77D11 RefMD5=4311A1AEF1898678331F7E3486055307 [97E706ED9CC6F30708FFDC187C85D59F] GoodName=Human Grand Prix - New Generation (J) [!] CRC=5535972E BD8E3295 Players=1 SaveType=Controller Pack [F9A6FFD35D478A8E2B369460BFAB2CC8] GoodName=Human Grand Prix - New Generation (J) [b1] CRC=5535972E BD8E3295 RefMD5=97E706ED9CC6F30708FFDC187C85D59F [7BD3F10D47DB6D062280D8AE750A1ACB] GoodName=Human Grand Prix - New Generation (J) [o1] CRC=5535972E BD8E3295 RefMD5=97E706ED9CC6F30708FFDC187C85D59F [DA861C4D9202F661575466450A27C412] GoodName=Hybrid Heaven (E) (M3) [!] CRC=641D3A7F 86820466 Players=2 SaveType=Controller Pack [24B023696975D27EAE8319EF40001348] GoodName=Hybrid Heaven (E) (M3) [b1] CRC=641D3A7F 86820466 RefMD5=DA861C4D9202F661575466450A27C412 [E6F18336406EF3BFC990483BBF184ACD] GoodName=Hybrid Heaven (E) (M3) [f1] (NTSC) CRC=DCCEDB8F BA79BEDE RefMD5=DA861C4D9202F661575466450A27C412 [9946EFF915FC947A226407AC1F7B35C4] GoodName=Hybrid Heaven (J) [!] CRC=0DE2CE36 D41D29E6 Players=2 SaveType=Controller Pack [94B284286A090B5980B7F18A4FA77853] GoodName=Hybrid Heaven (J) [b1] CRC=0DE2CE36 D41D29E6 RefMD5=9946EFF915FC947A226407AC1F7B35C4 [151E92F5E3EE294BAFF5D4C3E4E95D77] GoodName=Hybrid Heaven (J) [f1] (PAL) CRC=DE4E5E2E DCD0615D RefMD5=9946EFF915FC947A226407AC1F7B35C4 [C47E95BB32AB132C41D67BD243F9E02A] GoodName=Hybrid Heaven (U) [!] CRC=102888BF 434888CA Players=2 SaveType=Controller Pack [115521BAC11608FEBCE874F243ACC66E] GoodName=Hybrid Heaven (U) [f1] (PAL) CRC=FB610592 898A9705 RefMD5=C47E95BB32AB132C41D67BD243F9E02A [0A44393E1C97E4F91303029E27F28AF4] GoodName=Hybrid Heaven (U) [t1] CRC=E8DBC96A DAC9E2EE RefMD5=C47E95BB32AB132C41D67BD243F9E02A [434BB8DE49011573AC38E893224C5623] GoodName=Hydro Thunder (E) [!] CRC=B58988E9 B1FC4BE8 Players=4 SaveType=Controller Pack CountPerOp=1 [1F57194EA272CF5DB500D228E9C94D75] GoodName=Hydro Thunder (E) [f1] (NTSC) CRC=EDFB6B01 8893F62C RefMD5=434BB8DE49011573AC38E893224C5623 [4B4C85D9DD2D460ADAFABAE8DB48B4FA] GoodName=Hydro Thunder (F) [!] CRC=29A045CE ABA9060E Players=4 SaveType=Controller Pack CountPerOp=1 [54F43E6B68782E98CAABEA5E7976B2BE] GoodName=Hydro Thunder (U) [!] CRC=C8DC65EB 3D8C8904 SaveType=Controller Pack Players=4 CountPerOp=1 [22AAD544C062FB8A2DC6B2DEB32DE188] GoodName=Hydro Thunder (U) [b1] CRC=C8DC65EB 3D8C8904 RefMD5=54F43E6B68782E98CAABEA5E7976B2BE [71DCDBE9F4B37A251E2877900CDBF406] GoodName=Hydro Thunder (U) [b1][f1] (PAL) CRC=63CCD041 F12A8BC0 RefMD5=54F43E6B68782E98CAABEA5E7976B2BE [A5B6E5D7B689216BA5C8F6360BF89B67] GoodName=Hydro Thunder (U) [b1][t1] CRC=B6DB2595 BC45273B RefMD5=54F43E6B68782E98CAABEA5E7976B2BE [85ACEBC851A407630D7464CCB63408BE] GoodName=Hydro Thunder (U) [b2] CRC=C8DC65EB 3D8C8904 RefMD5=54F43E6B68782E98CAABEA5E7976B2BE [F47575C35C7352E685B848CDAFF96B80] GoodName=Hydro Thunder (U) [b3] CRC=C8DC65EB 3D8C8904 RefMD5=54F43E6B68782E98CAABEA5E7976B2BE [D2F7B3ACE75A2CE7A06BEAC929711D94] GoodName=Hyper Olympics Nagano 64 (J) [!] CRC=2FC5C34C 7A05CC9D Players=4 SaveType=Controller Pack [3B6FF1829CBBEAE87704F53950791D64] GoodName=Hyper Olympics Nagano 64 (J) [b1] CRC=2FC5C34C 7A05CC9D RefMD5=D2F7B3ACE75A2CE7A06BEAC929711D94 [F4D2BE1C47486AB3A6FCCCD2E7532C67] GoodName=Hyper Olympics Nagano 64 (J) [b2] CRC=2FC5C34C 7A05CC9D RefMD5=D2F7B3ACE75A2CE7A06BEAC929711D94 [BAC8634F10F286E6A0DB889FCD12B25E] GoodName=Hyper Olympics Nagano 64 (J) [b3] CRC=2FC5C34C 7A05CC9D RefMD5=D2F7B3ACE75A2CE7A06BEAC929711D94 [20AE0BA68601EB0A49D61BC7A00FEADD] GoodName=Hyper Olympics Nagano 64 (J) [o1] CRC=2FC5C34C 7A05CC9D RefMD5=D2F7B3ACE75A2CE7A06BEAC929711D94 [DC577D70E9308F94E5F3CE03F3508539] GoodName=Ide Yosuke no Mahjong Juku (J) [!] CRC=77DA3B8D 162B0D7C Players=1 [92A6FFA1C8D537C7A97C5C613CAE05C6] GoodName=Ide Yosuke no Mahjong Juku (J) [b1] CRC=77DA3B8D 162B0D7C RefMD5=DC577D70E9308F94E5F3CE03F3508539 [25B297143E9E5CCBB4B80A7FB6AF399B] GoodName=Iggy's Reckin' Balls (E) [!] CRC=D692CC5E EC58D072 Players=2 SaveType=Controller Pack [26CEC7A56ABB81F3468CFA26D8F16B67] GoodName=Iggy's Reckin' Balls (E) [o1] CRC=D692CC5E EC58D072 RefMD5=25B297143E9E5CCBB4B80A7FB6AF399B [464211ABB602EE1005974D2D835A3BCF] GoodName=Iggy's Reckin' Balls (U) [!] CRC=E616B5BC C9658B88 Players=2 SaveType=Controller Pack [8BF0EAFB7014B7B5CE8E7D778B6B4B99] GoodName=Iggy's Reckin' Balls (U) [o1] CRC=E616B5BC C9658B88 RefMD5=464211ABB602EE1005974D2D835A3BCF [C70B0B680807F2B8C2C3D5DC495FA8C2] GoodName=Iggy-kun no Bura Bura Poyon (J) [!] CRC=69458B9E FC95F936 Players=2 SaveType=Controller Pack [827106236756DC5B585C4226184835FA] GoodName=Iggy-kun no Bura Bura Poyon (J) [o1] CRC=69458B9E FC95F936 RefMD5=C70B0B680807F2B8C2C3D5DC495FA8C2 [C605F40BF669E00A5E51BAF0D00621EA] GoodName=In-Fisherman Bass Hunter 64 (U) [!] CRC=8C138BE0 95700E46 SaveType=Eeprom 4KB Players=1 CountPerOp=1 [1AF93922A67085AB2C777B1F08AF365B] GoodName=In-Fisherman Bass Hunter 64 (U) [f1] (PAL) CRC=F050D644 B5A5CED1 RefMD5=C605F40BF669E00A5E51BAF0D00621EA [70DE1EAB508596B6BBEFD168B5D07194] GoodName=Indiana Jones and the Infernal Machine (U) [!] CRC=AF9DCC15 1A723D88 Players=1 SaveType=Eeprom 4KB [6F417D30D772F4420C9384E9BBB7BC01] GoodName=Indiana Jones and the Infernal Machine (E) CRC=3A6F8C6B 2897BAEB SaveType=Eeprom 4KB Players=1 [A7781D441AF55C4FF8AFC68AB3A59313] GoodName=Indy Racing 2000 (U) [!] CRC=E436467A 82DE8F9B SaveType=Eeprom 4KB Players=4 [34489365B550F32C97337D86D52D8C84] GoodName=International Superstar Soccer '98 (E) [!] CRC=F41B6343 C10661E6 Players=4 SaveType=Controller Pack [7DCC05B98E2FA690B478808EBBAD5D1A] GoodName=International Superstar Soccer '98 (U) [!] CRC=7F0FDA09 6061CE0B Players=4 SaveType=Controller Pack [43B326B27B89288F2D17D22EA49F86BD] GoodName=International Superstar Soccer '98 (U) [o1] CRC=7F0FDA09 6061CE0B RefMD5=7DCC05B98E2FA690B478808EBBAD5D1A [9F101B6F6BEF4F267DEB5C6C37A24B97] GoodName=International Superstar Soccer 2000 (E) (M2) (Eng-Ger) [!] CRC=336364A0 06C8D5BF Players=4 SaveType=Controller Pack [CC2BE97A16744860FAE8A94611479C4C] GoodName=International Superstar Soccer 2000 (E) (M2) (Fre-Ita) [!] CRC=BAE8E871 35FF944E Players=4 SaveType=Controller Pack [23A4ED8D79882594206173B1D476F0E9] GoodName=International Superstar Soccer 2000 (U) (M2) [!] CRC=8E835437 CD5748B4 Players=4 SaveType=Controller Pack [ACF18822457A451B09BD88E15A70505C] GoodName=International Superstar Soccer 2000 (U) (M2) [f1] (PAL) CRC=30B6A6AB 319EFD09 RefMD5=23A4ED8D79882594206173B1D476F0E9 [376803F28CA8B2133671783419933CA2] GoodName=International Superstar Soccer 64 (E) [!] CRC=E2D37CF0 F57E4EAE Players=4 SaveType=Controller Pack CountPerOp=1 [7FCC22F4BF1FC82F886C455981D2A420] GoodName=International Superstar Soccer 64 (E) [b1] CRC=E2D37CF0 F57E4EAE RefMD5=376803F28CA8B2133671783419933CA2 [FD0102D535BC3BBB22DD823A636DC757] GoodName=International Superstar Soccer 64 (E) [b2] CRC=E2D37CF0 F57E4EAE RefMD5=376803F28CA8B2133671783419933CA2 [65B9CAC3900435ED6893B9D489F1655F] GoodName=International Superstar Soccer 64 (E) [h1C] CRC=E2D37CF0 F57E4EAE RefMD5=376803F28CA8B2133671783419933CA2 [70D480A73DB5751EED9E826108005834] GoodName=International Superstar Soccer 64 (E) [h2C] CRC=E2D37CF0 F57E4EAE RefMD5=376803F28CA8B2133671783419933CA2 [6A345402AE1DB5CE1041365E36126BCE] GoodName=International Superstar Soccer 64 (U) [!] CRC=5F2763C4 62412AE5 Players=4 SaveType=Controller Pack CountPerOp=1 [C0969E1C141BE6E144E651CAB1AEA3D8] GoodName=International Superstar Soccer 64 (U) [b1] CRC=5F2763C4 62412AE5 RefMD5=6A345402AE1DB5CE1041365E36126BCE [0321FCDCD35E6DC0D3F4DC1251919997] GoodName=International Superstar Soccer 64 (U) [h1C] CRC=5F2763C4 62412AE5 RefMD5=6A345402AE1DB5CE1041365E36126BCE [37A4F634CADB89DC3E43D389ED050925] GoodName=International Superstar Soccer 64 (U) [h2C] CRC=5F2763C4 62412AE5 RefMD5=6A345402AE1DB5CE1041365E36126BCE [35662CFD07FD6AF4BAB90CA23F7C98E6] GoodName=International Track & Field 2000 (U) [!] CRC=20073BC7 5E3B0111 Players=4 SaveType=Controller Pack [970488FB7D9C5C25BD924E6F898B84A0] GoodName=International Track & Field Summer Games (E) (M3) [!] CRC=6712C779 3B72781D Players=4 SaveType=Controller Pack [1247B093E0FD6CCFD50D15DE59301076] GoodName=J.League Dynamite Soccer 64 (J) [!] CRC=87766747 91C27165 Players=4 [849DA5F1790A386B1CD9118CA1398E9D] GoodName=J.League Dynamite Soccer 64 (J) [b1] CRC=87766747 91C27165 RefMD5=1247B093E0FD6CCFD50D15DE59301076 [F3A1B04E1F3436E183932B54212B75B5] GoodName=J.League Dynamite Soccer 64 (J) [b2] CRC=87766747 91C27165 RefMD5=1247B093E0FD6CCFD50D15DE59301076 [20FBBA5FCCB7454367E071A744D6BB2F] GoodName=J.League Dynamite Soccer 64 (J) [b3] CRC=87766747 91C27165 RefMD5=1247B093E0FD6CCFD50D15DE59301076 [2085FBD994D3597A8A520F695E336382] GoodName=J.League Dynamite Soccer 64 (J) [b4] CRC=87766747 91C27165 RefMD5=1247B093E0FD6CCFD50D15DE59301076 [E0071B3CE2E29597DC4C73D83402723C] GoodName=J.League Dynamite Soccer 64 (J) [h1C] CRC=87766747 91C27165 RefMD5=1247B093E0FD6CCFD50D15DE59301076 [F7544B9DF78D3CDB1C1B31006372C531] GoodName=J.League Dynamite Soccer 64 (J) [h2C] CRC=87766747 91C27165 RefMD5=1247B093E0FD6CCFD50D15DE59301076 [F848E34DC2918C708D2D0C02E082B06B] GoodName=J.League Dynamite Soccer 64 (J) [h3C] CRC=87766747 91C27165 RefMD5=1247B093E0FD6CCFD50D15DE59301076 [E3CE4ADB8A7C0CF39E11A2846E00178A] GoodName=J.League Eleven Beat 1997 (J) [b1][h1C] CRC=4FBFA429 6920BB15 [BEF0F36513F6FA8B01638319252B2B99] GoodName=J.League Eleven Beat 1997 (J) [b2][h1C] CRC=4FBFA429 6920BB15 [476FDC0554BD3B4746FC871FDD02F4B2] GoodName=J.League Eleven Beat 1997 (J) [h1C] CRC=4FBFA429 6920BB15 [30E23D3DE446E37E5E7FBEF6794A6FC9] GoodName=J.League Eleven Beat 1997 (J) CRC=4FBFA429 6920BB15 [209DB8333EEB526AE9A91209175348CE] GoodName=J.League Live 64 (J) [!] CRC=54554A42 E4985FFB Players=4 [46F584DBFA1E292F0ECA74CA1B12009C] GoodName=J.League Live 64 (J) [b1] CRC=54554A42 E4985FFB RefMD5=209DB8333EEB526AE9A91209175348CE [800ACC7D609ECDB3E09E68CBD05F5FA0] GoodName=J.League Tactics Soccer (J) (V1.0) [!] CRC=E8D29DA0 15E61D94 Players=4 [F604701C59C7D2BBA2492D0073E928F2] GoodName=J.League Tactics Soccer (J) (V1.0) [b1] CRC=E8D29DA0 15E61D94 RefMD5=800ACC7D609ECDB3E09E68CBD05F5FA0 [7D5AFCD953BB15EC204B175761CA28C2] GoodName=J.League Tactics Soccer (J) (V1.0) [f1] (PAL) CRC=E8D2A500 5AA8DBCA RefMD5=800ACC7D609ECDB3E09E68CBD05F5FA0 [793DBF504E20C92F6B73B4E8A25A220C] GoodName=J.League Tactics Soccer (J) (V1.1) [!] CRC=C6CE0AAA D117F019 Players=4 [45F6B7EAF40E8445205904934EE365A6] GoodName=JPEG Slideshow Viewer by Garth Elgar (PD) CRC=A957851C 535A5667 [8EE01DE7DA2E9AD08D7ED913A5EE8632] GoodName=Jangou Simulation Mahjong Do 64 (J) [!] CRC=C73AD016 48C5537D Players=1 [82388A4B44EF74F9C250C8152AB93669] GoodName=Jangou Simulation Mahjong Do 64 (J) [b1] CRC=C73AD016 48C5537D RefMD5=8EE01DE7DA2E9AD08D7ED913A5EE8632 [014464F2AC70FBBB94B08B9762E65A72] GoodName=Jangou Simulation Mahjong Do 64 (J) [b2] CRC=C73AD016 48C5537D RefMD5=8EE01DE7DA2E9AD08D7ED913A5EE8632 [304F496CE0858959700C7F71E55C55B7] GoodName=Jangou Simulation Mahjong Do 64 (J) [b3] CRC=C73AD016 48C5537D RefMD5=8EE01DE7DA2E9AD08D7ED913A5EE8632 [A45F7200537C0D928A88CBBA2DFEB680] GoodName=Jeopardy! (U) [!] CRC=69256460 B9A3F586 Players=1 SaveType=None [05318721C273CB65CFBDF78AC2724BF2] GoodName=Jeopardy! (U) [h1C] CRC=69256460 B9A3F586 RefMD5=A45F7200537C0D928A88CBBA2DFEB680 [190584D9C0DC2875183FB84C5072B8F1] GoodName=Jeopardy! (U) [o1] CRC=69256460 B9A3F586 RefMD5=A45F7200537C0D928A88CBBA2DFEB680 [79BDD4467E102A1CBB4CC74DFC96BF7D] GoodName=Jeopardy! (U) [o1][h1C] CRC=69256460 B9A3F586 RefMD5=A45F7200537C0D928A88CBBA2DFEB680 [4C5BE1BFC1CCCFF501EBA2A685226962] GoodName=Jeremy McGrath Supercross 2000 (E) [!] CRC=21F7ABFB 6A8AA7E8 SaveType=Controller Pack Players=4 [8046A4B8ABD4353B2AB9696106CCF8D2] GoodName=Jeremy McGrath Supercross 2000 (U) [!] CRC=BB30B1A5 FCF712CE Players=4 SaveType=Controller Pack [29E0AB31B3FC6A6B1EFC11FBDB82CB97] GoodName=Jeremy McGrath Supercross 2000 (U) [f1] CRC=46C6F185 E13841C8 RefMD5=8046A4B8ABD4353B2AB9696106CCF8D2 [BAAF237E71AA7526C9B2F01C08B68A53] GoodName=Jet Force Gemini (E) (M4) [!] CRC=68D7A1DE 0079834A Players=4 SaveType=Flash RAM Rumble=Yes [821E7F74880BBD04AA9501D3BB25138E] GoodName=Jet Force Gemini (E) (M4) [T+Ita0.9beta_Rulesless] CRC=68D7A1DE 0079834A RefMD5=BAAF237E71AA7526C9B2F01C08B68A53 [76996A6CC868AC0E2BB2506A3C4DB606] GoodName=Jet Force Gemini (E) (M4) [f1] CRC=B66E0F7C 2709C22F RefMD5=BAAF237E71AA7526C9B2F01C08B68A53 [5BBE9ADE7171F2E1DAAA7C48FAD38728] GoodName=Jet Force Gemini (U) (Kiosk Demo) [!] CRC=DFD8AB47 3CDBEB89 Players=4 Rumble=Yes [E423A21C971B8A91C3E8980E2605B840] GoodName=Jet Force Gemini (U) (Kiosk Demo) [b1] CRC=DFD8AB47 3CDBEB89 [2525E3734B921E662903E94BAB119C32] GoodName=Jet Force Gemini (U) (Kiosk Demo) [b1][f1] (Save) CRC=9C660FA0 C06A610D [B4E3489F9B655439F9902F7A466CF973] GoodName=Jet Force Gemini (U) (Kiosk Demo) [b1][f2] CRC=8547FED3 C4945FAF [69144CEED3F4D7B208D81A3DC3F57AD0] GoodName=Jet Force Gemini (U) (Kiosk Demo) [b2] CRC=DFD8AB47 3CDBEB89 [772CC6EAB2620D2D3CDC17BBC26C4F68] GoodName=Jet Force Gemini (U) [!] CRC=8A6009B6 94ACE150 Players=4 SaveType=Flash RAM Rumble=Yes [92E6117285EC6A2D836B1C6839DDFD9B] GoodName=Jet Force Gemini (U) [b1] CRC=75CAA990 9FFDC9BD RefMD5=772CC6EAB2620D2D3CDC17BBC26C4F68 [745FCD72A921ED178AF6C319B09DF1F3] GoodName=Jet Force Gemini (U) [b2] CRC=CDB8B4D0 8832352D RefMD5=772CC6EAB2620D2D3CDC17BBC26C4F68 [878D8A26FD02FDB08200464CB6F566EF] GoodName=Jikkyou G1 Stable (J) [!] CRC=AF19D9F5 B70223CC Players=4 [4BBAF03594C6DCECB135AC8C57CB4CD7] GoodName=Jikkyou G1 Stable (J) [b1] CRC=AF19D9F5 B70223CC RefMD5=878D8A26FD02FDB08200464CB6F566EF [3D2CCA1B2E3BDE267769812219EDB864] GoodName=Jikkyou J.League 1999 - Perfect Striker 2 (J) [!] CRC=63112A53 A29FA88F Players=4 [84B1421F658D5185812D861E23437520] GoodName=Jikkyou J.League 1999 - Perfect Striker 2 (J) [b1] CRC=63112A53 A29FA88F RefMD5=3D2CCA1B2E3BDE267769812219EDB864 [657C57E1AAA698A6E83398D300AA8445] GoodName=Jikkyou J.League 1999 - Perfect Striker 2 (J) [f1] (PAL) CRC=3DBD5E85 EA9A328A RefMD5=3D2CCA1B2E3BDE267769812219EDB864 [EA9826D391B299137788DE21E20AF6EA] GoodName=Jikkyou J.League 1999 - Perfect Striker 2 (J) [f2] (PAL) CRC=22CA2C52 CA62736F RefMD5=3D2CCA1B2E3BDE267769812219EDB864 [58153AC5C4030D1BFD3C15CF57FB02E7] GoodName=Jikkyou J.League Perfect Striker (J) [!] CRC=146C4366 72A6DEB3 Players=4 [759B8749E55113526E8C1C468E244CA8] GoodName=Jikkyou J.League Perfect Striker (J) [b1] CRC=146C4366 72A6DEB3 RefMD5=58153AC5C4030D1BFD3C15CF57FB02E7 [F012DC3C0CAA38618A1FAD27C73FCBD5] GoodName=Jikkyou J.League Perfect Striker (J) [b2] CRC=146C4366 72A6DEB3 RefMD5=58153AC5C4030D1BFD3C15CF57FB02E7 [6D1D465EBAACD3747B1362037ABED9EF] GoodName=Jikkyou J.League Perfect Striker (J) [b3] CRC=146C4366 72A6DEB3 RefMD5=58153AC5C4030D1BFD3C15CF57FB02E7 [C7152167915E8EB928C0CBBF9AF9886E] GoodName=Jikkyou J.League Perfect Striker (J) [f1] (PAL) CRC=3BCCA16E 0AF6D30F RefMD5=58153AC5C4030D1BFD3C15CF57FB02E7 [7FC933A64884A382AA07605EA7204FF5] GoodName=Jikkyou Powerful Pro Yakyuu - Basic Han 2001 (J) [!] CRC=6EDD4766 A93E9BA8 Players=4 CountPerOp=3 [23409668A6E6C4ECE7B5FB0B7D0E8F2C] GoodName=Jikkyou Powerful Pro Yakyuu 2000 (J) (V1.0) [!] CRC=0AC244D1 1F0EC605 Players=4 [B653C963ED8D3A749676810F07CFE4E5] GoodName=Jikkyou Powerful Pro Yakyuu 2000 (J) (V1.1) [!] CRC=4264DF23 BE28BDF7 Players=4 [FDA57F65EB159278223EB9D03267C27F] GoodName=Jikkyou Powerful Pro Yakyuu 4 (J) (V1.0) [!] CRC=34495BAD 502E9D26 Players=4 [7CC328FFAA5B77CD6247124DD0AF8899] GoodName=Jikkyou Powerful Pro Yakyuu 4 (J) (V1.0) [b1] CRC=34495BAD 502E9D26 Players=4 [924E6553AEDE5EA66E2E14D29E48D929] GoodName=Jikkyou Powerful Pro Yakyuu 4 (J) (V1.0) [b2] CRC=34495BAD 502E9D26 RefMD5=7CC328FFAA5B77CD6247124DD0AF8899 [D9BA9FC609BFCDAC0081B7C568311BE1] GoodName=Jikkyou Powerful Pro Yakyuu 4 (J) (V1.0) [b3] CRC=34495BAD 502E9D26 RefMD5=7CC328FFAA5B77CD6247124DD0AF8899 [2BBD484BFA0F16C09C7F13FBDC2637C6] GoodName=Jikkyou Powerful Pro Yakyuu 4 (J) (V1.0) [b4] CRC=34495BAD 502E9D26 RefMD5=7CC328FFAA5B77CD6247124DD0AF8899 [1480E755E96B392490F606A75BC306C6] GoodName=Jikkyou Powerful Pro Yakyuu 4 (J) (V1.0) [b5] CRC=34495BAD 502E9D26 RefMD5=7CC328FFAA5B77CD6247124DD0AF8899 [950B88955933F42514A3F4284F5A285C] GoodName=Jikkyou Powerful Pro Yakyuu 4 (J) (V1.0) [o1] CRC=34495BAD 502E9D26 RefMD5=7CC328FFAA5B77CD6247124DD0AF8899 [B454490EB44F0978F009FA41DE8C478E] GoodName=Jikkyou Powerful Pro Yakyuu 4 (J) (V1.1) [!] CRC=D7891F1C C3E43788 Players=4 [E9F989E09E3F1519AEFE619889A4F710] GoodName=Jikkyou Powerful Pro Yakyuu 5 (J) [!] CRC=D22943DA AC2B77C0 Players=4 [CAFF2DAC142F169EE76965CA00518B26] GoodName=Jikkyou Powerful Pro Yakyuu 5 (J) [b1] CRC=D22943DA AC2B77C0 RefMD5=E9F989E09E3F1519AEFE619889A4F710 [4AC1589C067AC573FD63912A5C6C47A5] GoodName=Jikkyou Powerful Pro Yakyuu 5 (J) [f1] CRC=95854656 C8A24DC5 RefMD5=E9F989E09E3F1519AEFE619889A4F710 [8AF9D04DBA1313D1F5F4BA51D9592FBB] GoodName=Jikkyou Powerful Pro Yakyuu 5 (J) [f2] (PAL) CRC=38D637C1 5F05D28F RefMD5=E9F989E09E3F1519AEFE619889A4F710 [E6129460E23170FFD4EC4B09D5E0CC56] GoodName=Jikkyou Powerful Pro Yakyuu 6 (J) [b1] CRC=B75E20B7 B3FEFDFD RefMD5=E9F989E09E3F1519AEFE619889A4F710 [060D0313E23B660180441FCC7D24D7DB] GoodName=Jikkyou Powerful Pro Yakyuu 6 (J) [!] CRC=B75E20B7 B3FEFDFD RefMD5=E9F989E09E3F1519AEFE619889A4F710 [A05E7DB2409DEECCA36E48E9D931CACB] GoodName=Jikkyou World Soccer - World Cup France '98 (J) (V1.0) [!] CRC=3FEA5620 7456DB40 Players=4 [538B54C2AAEA73FAA3A021D42A3225BE] GoodName=Jikkyou World Soccer - World Cup France '98 (J) (V1.1) [!] CRC=C954B38C 6F62BEB3 RefMD5=A05E7DB2409DEECCA36E48E9D931CACB [2E5FD9303138E8F558BF67BB9E799960] GoodName=Jikkyou World Soccer - World Cup France '98 (J) (V1.2) [!] CRC=E1C7ABD6 4E707F28 Players=4 [EF0F425689586850A6F5796124B0C85B] GoodName=Jikkyou World Soccer 3 (J) [!] CRC=E0A79F8C 32CC97FA Players=4 CountPerOp=1 [68230D510015FF6817EF898C0B8B636C] GoodName=Jinsei Game 64 (J) [!] CRC=4AAAF6ED 376428AD Players=4 [FBB0F6AF0A931EE4FEAEE4F3CC7DBE03] GoodName=Jinsei Game 64 (J) [f1] (PAL) CRC=7B016055 F8AC6092 RefMD5=68230D510015FF6817EF898C0B8B636C [7AB29C6AD2D8F4007D8213EB3411E0BD] GoodName=John Romero's Daikatana (E) (M3) [!] CRC=0F743195 D8A6DB95 Players=4 SaveType=Controller Pack [2B417AD282DB321C9C67EDA7131A7F06] GoodName=John Romero's Daikatana (E) (M3) [f1] (NTSC) CRC=B6835E54 04A4A0D0 RefMD5=7AB29C6AD2D8F4007D8213EB3411E0BD [164050084561ECB691A51B6D1E5BF4AE] GoodName=John Romero's Daikatana (E) (M3) [h1C] CRC=0F743195 D8A6DB95 RefMD5=7AB29C6AD2D8F4007D8213EB3411E0BD [57D31EA7121DD5A05B547225EFA5CFD7] GoodName=John Romero's Daikatana (J) [!] CRC=9D7E3C4B E60F4A6C Players=4 SaveType=Controller Pack [5B4C268422469F50B94779E655F2B798] GoodName=John Romero's Daikatana (U) [!] CRC=D0151AB0 FE5CA14B Players=4 SaveType=Controller Pack [DFF0EFE2B35FCDE506D21B0C0BD373A5] GoodName=Kakutou Denshou - F-Cup Maniax (J) [!] CRC=4F29474F 30CB707A Players=2 SaveType=Controller Pack [9A70D30114F440B5240C10260AB2C8ED] GoodName=Kakutou Denshou - F-Cup Maniax (J) [f1] (PAL) CRC=F6E3494A E4EC8933 RefMD5=DFF0EFE2B35FCDE506D21B0C0BD373A5 [EEC0FAB75AF59E9C23E6DE2132DE89FF] GoodName=Ken Griffey Jr.'s Slugfest (U) [!] CRC=36281F23 009756CF SaveType=Flash RAM Players=4 [040A9EA84FA3C73A8F318358E3250AA4] GoodName=Ken Griffey Jr.'s Slugfest (U) [b1] CRC=76A8C9F4 3391893D RefMD5=EEC0FAB75AF59E9C23E6DE2132DE89FF [D9160E48CE1F06B9B749B43A38367A28] GoodName=Ken Griffey Jr.'s Slugfest (U) [b2] CRC=36281F23 009756CF RefMD5=EEC0FAB75AF59E9C23E6DE2132DE89FF [BF07DE5816FFEC94AF30CB9B9B35909F] GoodName=Ken Griffey Jr.'s Slugfest (U) [f1] CRC=76A8C9F4 3391893D RefMD5=EEC0FAB75AF59E9C23E6DE2132DE89FF [47B0348020C4200608B7EBD512028788] GoodName=Ken Griffey Jr.'s Slugfest (U) [f2] (PAL) CRC=76A8C9F4 3391893D RefMD5=EEC0FAB75AF59E9C23E6DE2132DE89FF [57C6B3E6309AC2F4BB64B5161E4ED8EF] GoodName=Ken Griffey Jr.'s Slugfest (U) [f3] (Nosave) CRC=730D25F4 4A37A36E RefMD5=EEC0FAB75AF59E9C23E6DE2132DE89FF [3E003A77F044F0C97748BE6861C55038] GoodName=Ken Griffey Jr.'s Slugfest (U) [f4] (Nosave-Z64) CRC=EAC07419 0F9F72A0 RefMD5=EEC0FAB75AF59E9C23E6DE2132DE89FF [9362C5AC8CA78C12FF553CB7F12A7FF1] GoodName=Ken Griffey Jr.'s Slugfest (U) [f5] CRC=76A8C9F4 3391893D RefMD5=EEC0FAB75AF59E9C23E6DE2132DE89FF [68EB1713156605D5B05CFB838C214EF2] GoodName=Kid Stardust Intro with Sound by Kid Stardust (PD) [a1] CRC=64709212 699BCF3B [69F3D2580CB4C91C91C2E238C72B4403] GoodName=Kid Stardust Intro with Sound by Kid Stardust (PD) CRC=64709212 699BCF3B [C93D92F10A1A97D2BA87386BE7D178FD] GoodName=Killer Instinct Gold (E) [!] CRC=979B263E F8470004 SaveType=Eeprom 4KB Players=2 [A63F43CC53D9E57A045E1E20A5B12592] GoodName=Killer Instinct Gold (E) [o1] CRC=979B263E F8470004 RefMD5=C93D92F10A1A97D2BA87386BE7D178FD [8E33AD20C31FEB61D7230FAD28846C5C] GoodName=Killer Instinct Gold (U) (V1.0) [!] CRC=9E8FE2BA 8B270770 Players=2 SaveType=Eeprom 4KB [F73EA6171B04CD9FF05B76274E824194] GoodName=Killer Instinct Gold (U) (V1.0) [b1] CRC=9E8FE2BA 8B270770 RefMD5=8E33AD20C31FEB61D7230FAD28846C5C [F871B07C700F5BB373E648FC64D99D2E] GoodName=Killer Instinct Gold (U) (V1.0) [b1][t1] CRC=06CB44B7 3163DB94 RefMD5=8E33AD20C31FEB61D7230FAD28846C5C [D4CD4F6A5029048B44C8B420982E664E] GoodName=Killer Instinct Gold (U) (V1.0) [b2] CRC=06CB44B7 3163DB94 RefMD5=8E33AD20C31FEB61D7230FAD28846C5C [3EE5EF09471ED2ADF02E6E1BA8D17963] GoodName=Killer Instinct Gold (U) (V1.0) [b3] CRC=06CB44B7 3163DB94 RefMD5=8E33AD20C31FEB61D7230FAD28846C5C [DD44E1D799FB9000983C5291D9D34306] GoodName=Killer Instinct Gold (U) (V1.0) [b4] CRC=06CB44B7 3163DB94 RefMD5=8E33AD20C31FEB61D7230FAD28846C5C [C0B6DEEF900B63A5E4624804B14A1BA6] GoodName=Killer Instinct Gold (U) (V1.0) [b5] CRC=9E8FE2BA 8B270770 RefMD5=8E33AD20C31FEB61D7230FAD28846C5C [4C58608F3879627886051B7C035E3C23] GoodName=Killer Instinct Gold (U) (V1.0) [o1] CRC=9E8FE2BA 8B270770 RefMD5=8E33AD20C31FEB61D7230FAD28846C5C [DF607E79B1539F7D6F9AD34C31F42296] GoodName=Killer Instinct Gold (U) (V1.0) [o2] CRC=9E8FE2BA 8B270770 RefMD5=8E33AD20C31FEB61D7230FAD28846C5C [7496F1814AFBD1FC85FE76D6EBE9EA03] GoodName=Killer Instinct Gold (U) (V1.0) [t1] CRC=06CB44B7 3163DB94 RefMD5=8E33AD20C31FEB61D7230FAD28846C5C [1C3B29CC7F362CA63AC1C26456737BB3] GoodName=Killer Instinct Gold (U) (V1.0) [t2] CRC=06CB44B7 3163DB94 RefMD5=8E33AD20C31FEB61D7230FAD28846C5C [4C9B419DC583C0DF4AB908ADF83BFC65] GoodName=Killer Instinct Gold (U) (V1.1) [!] CRC=9E8FCDFA 49F5652B Players=2 SaveType=Eeprom 4KB [0CFF6A7C1B1334E07585F0C5CDB53B40] GoodName=Killer Instinct Gold (U) (V1.1) [o1] CRC=9E8FCDFA 49F5652B RefMD5=4C9B419DC583C0DF4AB908ADF83BFC65 [DD0A82FCC10397AFB37F12BB7F94E67A] GoodName=Killer Instinct Gold (U) (V1.2) [!] CRC=F908CA4C 36464327 Players=2 SaveType=Eeprom 4KB [2D79C395765A601F967CD3EF7CBF439E] GoodName=Killer Instinct Gold (U) (V1.2) [b1] CRC=06CB44B7 3163DB94 RefMD5=DD0A82FCC10397AFB37F12BB7F94E67A [3166BE5787BC30526E71277ECA3091DF] GoodName=Killer Instinct Gold (U) (V1.2) [o1] CRC=F908CA4C 36464327 RefMD5=DD0A82FCC10397AFB37F12BB7F94E67A [CCA4E87EC206B5B65AEAB9531C0F275B] GoodName=King Hill 64 - Extreme Snowboarding (J) [!] CRC=519EA4E1 EB7584E8 Players=4 SaveType=Controller Pack [CE9AE0AA6DBBF965B1F72BC3AA6A7CEF] GoodName=King Hill 64 - Extreme Snowboarding (J) [b1] CRC=519EA4E1 EB7584E8 RefMD5=CCA4E87EC206B5B65AEAB9531C0F275B [18E741AAC72ECA5A9FEFEFE6F7A3E57A] GoodName=King Hill 64 - Extreme Snowboarding (J) [b2] CRC=519EA4E1 EB7584E8 RefMD5=CCA4E87EC206B5B65AEAB9531C0F275B [32257BFFFD9B2D680F582E148E9B0611] GoodName=Kira to Kaiketsu! 64 Tanteidan (J) [!] CRC=75BC6AD6 78552BC9 Players=4 [A44B7A612964A6D6139D0426E569D9C9] GoodName=Kirby 64 - The Crystal Shards (E) [!] CRC=0D93BA11 683868A6 Players=4 SaveType=Eeprom 4KB [E3BFAF1AD4A58A3AB7FD7310C1F45D81] GoodName=Kirby 64 - The Crystal Shards (E) [b1] CRC=0D93BA11 683868A6 RefMD5=A44B7A612964A6D6139D0426E569D9C9 [E32385ECE93DF2228FBEFE3113220A20] GoodName=Kirby 64 - The Crystal Shards (E) [f1] CRC=94593D97 846A278C RefMD5=A44B7A612964A6D6139D0426E569D9C9 [D33E4254336383A17FF4728360562ADA] GoodName=Kirby 64 - The Crystal Shards (U) [!] CRC=46039FB4 0337822C Players=4 SaveType=Eeprom 4KB [329C0A564D3B4477E2887097389AB7D6] GoodName=Kirby 64 - The Crystal Shards (U) [b1] CRC=80A2BBB5 828DFD3E RefMD5=D33E4254336383A17FF4728360562ADA [0CBA02D6EA55809A1E8D9BA02D199B7D] GoodName=Kirby 64 - The Crystal Shards (U) [b2] CRC=22F301B6 D0A03C3C RefMD5=D33E4254336383A17FF4728360562ADA [0A010DFFB20B9A4FB7BA2F962788F54F] GoodName=Kirby 64 - The Crystal Shards (U) [f1] CRC=D3F52BA5 1258EDFE RefMD5=D33E4254336383A17FF4728360562ADA [99F4652FEFF7373576ED440E1D33DB24] GoodName=Kirby 64 - The Crystal Shards (U) [t1] CRC=CBF72BBD 5D1587B2 RefMD5=D33E4254336383A17FF4728360562ADA [D31A94A5685A21A932CC886D64CC9B21] GoodName=Knife Edge - Nose Gunner (E) [!] CRC=4A997C74 E2087F99 SaveType=None Players=4 [436BA873E9466AAB237D9429348A5F70] GoodName=Knife Edge - Nose Gunner (J) [!] CRC=931AEF3F EF196B90 SaveType=None Players=4 [8043D829FCD4F8F72DD81E5C6DDE916F] GoodName=Knife Edge - Nose Gunner (U) [!] CRC=FCE0D799 65316C54 Players=4 SaveType=None [ABFDAA35C995C839D0773D3601D59E67] GoodName=Knife Edge - Nose Gunner (U) [b1][t1] CRC=84F5C897 A870AC11 RefMD5=8043D829FCD4F8F72DD81E5C6DDE916F [FCFBFD04A56400DE8B84297CF37CEE3D] GoodName=Knife Edge - Nose Gunner (U) [hI] CRC=84F5CF63 08EE7EDC RefMD5=8043D829FCD4F8F72DD81E5C6DDE916F [760110BC5733A4AC31EE680A06F4F2A1] GoodName=Knife Edge - Nose Gunner (U) [hI][t1] CRC=84F5C897 A870AC11 RefMD5=8043D829FCD4F8F72DD81E5C6DDE916F [2CA82F82284D2B3FE381999889350855] GoodName=Knife Edge - Nose Gunner (U) [t1] CRC=84F5C897 A870AC11 RefMD5=8043D829FCD4F8F72DD81E5C6DDE916F [E95D73FF55FBB63E79AA9EAB14608584] GoodName=Knockout Kings 2000 (E) [!] CRC=E3D6A795 2A1C5D3C Players=2 SaveType=Controller Pack [008B473841CE4D9AC050D55F99B4B5D4] GoodName=Knockout Kings 2000 (U) [!] CRC=0894909C DAD4D82D Players=2 SaveType=Controller Pack [630400D4E2DCED3DDE56DFCCF39A512A] GoodName=Knockout Kings 2000 (U) [f1] (PAL) CRC=8D6F5219 D43B163C RefMD5=008B473841CE4D9AC050D55F99B4B5D4 [C6B01C020FDFD2E5C037C5A330B161AD] GoodName=Kobe Bryant in NBA Courtside (E) [!] CRC=1739EFBA D0B43A68 SaveType=Eeprom 16KB Players=4 [54FD2659FCCE58FCC6EE544F95F8F7A3] GoodName=Kobe Bryant in NBA Courtside (E) [f1] CRC=D03F0CCB 11F19CDD RefMD5=C6B01C020FDFD2E5C037C5A330B161AD [D37C79E4E4EABCB5DC6A07BD76688223] GoodName=Kobe Bryant's NBA Courtside (U) [!] CRC=616B8494 8A509210 SaveType=Eeprom 16KB Players=4 [EF9A84FBF0B4C31E581648F256E8ED81] GoodName=Kobe Bryant's NBA Courtside (U) [f1] CRC=5BC51145 D3A29FE7 RefMD5=D37C79E4E4EABCB5DC6A07BD76688223 [AA0727F8F2B2C233F7BFD202194D41BC] GoodName=Kobe Bryant's NBA Courtside (U) [h1C] CRC=616B8494 8A509210 RefMD5=D37C79E4E4EABCB5DC6A07BD76688223 [E7432C73FE47991B52EB4A44156A8D9D] GoodName=LCARS Demo by WT Riker (PD) [b1] CRC=F828DF21 C5E83F66 [28803DC0D1CD120E5C0285F7291626B8] GoodName=LCARS Demo by WT Riker (PD) CRC=F828DF21 C5E83F66 [6310C7173385ED2B06020F3B90158E9E] GoodName=LEGO Racers (E) (M10) [!] CRC=F478D8B3 9716DD6D SaveType=Controller Pack Players=2 CountPerOp=3 [97C4CAE584F427EC44266E9B98FBF7B6] GoodName=LEGO Racers (U) (M10) [b1] CRC=096A40EA 8ABE0A10 SaveType=Controller Pack Players=2 CountPerOp=3 [26B5EAA13DC5B5E35307FE8C0CF5B6BA] GoodName=LEGO Racers (U) (M10) [!] CRC=096A40EA 8ABE0A10 SaveType=Controller Pack Players=2 CountPerOp=3 [E74404ED5A7076855CDE3832474751B6] GoodName=LEGO Racers (U) (M10) [b1][f1] (PAL) CRC=BB53C809 269594C6 RefMD5=97C4CAE584F427EC44266E9B98FBF7B6 [1221C67C46C77487D35F03D3D13A3022] GoodName=LEGO Racers (U) (M10) [b1][t1] CRC=B0AC4321 3F4DA1AF RefMD5=97C4CAE584F427EC44266E9B98FBF7B6 [050531139C082E35B101E0929B6E07EA] GoodName=LaC's MOD Player - The Temple Gates (PD) CRC=8E97A4A6 D1F31B33 Status=3 SaveType=None Players=0 Rumble=No [9602768EA88F4F5B53237E1AA20DE68A] GoodName=LaC's Universal Bootemu V1.0 (PD) CRC=EF623F50 ECBB509B [EB712F2E8A6A893141B82607B11DA8A2] GoodName=LaC's Universal Bootemu V1.1 (PD) CRC=BB752DA7 30D8BEF4 [15C2C37D4FFA1E2C5BC4D1029BC225AC] GoodName=LaC's Universal Bootemu V1.2 (PD) CRC=FF0AC362 F4EC09B3 [EB11FC0797AE1107201C4601FEE5471A] GoodName=Last Legion UX (J) [!] CRC=7F304099 52CF5276 Players=4 [8E55FD6990472A08568324309C2FD31F] GoodName=Last Legion UX (J) [a1] CRC=7F304099 52CF5276 Players=4 [7B5988138A8ADCA592DE616260B2700D] GoodName=Last Legion UX (J) [b1] CRC=7F304099 52CF5276 RefMD5=EB11FC0797AE1107201C4601FEE5471A [F8D705AD5EFF0DB9E3E17A7ECB6D2123] GoodName=Last Legion UX (J) [b2] CRC=7F304099 52CF5276 RefMD5=EB11FC0797AE1107201C4601FEE5471A [0C13E0449A28EA5B925CDB8AF8D29768] GoodName=Zelda no Densetsu - Toki no Ocarina - Zelda Collection Version (J) (GC) [!] CRC=F7F52DB8 2195E636 SaveType=Flash RAM Status=4 Rumble=Yes Players=1 ; Subscreen Delay Fix Cheat0=801DB78B 0002 ; End Credits Fix Cheat1=D109A814 0320,8109A814 0000,D109A816 F809,8109A816 0000 [33FB7852C180B18EA0B9620B630F413F] GoodName=Zelda no Densetsu - Toki no Ocarina GC (J) (GC) [!] CRC=F611F4BA C584135C SaveType=Flash RAM Status=4 Rumble=Yes Players=1 ; Subscreen Delay Fix Cheat0=801DB78B 0002 ; End Credits Fix Cheat1=D109A834 0320,8109A834 0000,D109A836 F809,8109A836 0000 [69895C5C78442260F6EAFB2506DC482A] GoodName=Zelda no Densetsu - Toki no Ocarina GC URA (J) (GC) [!] CRC=F43B45BA 2F0E9B6F SaveType=Flash RAM Status=4 Rumble=Yes Players=1 ; Subscreen Delay Fix Cheat0=801DB78B 0002 ; End Credits Fix Cheat1=D109A814 0320,8109A814 0000,D109A816 F809,8109A816 0000 [13FAB67E603B002CEAF0EEA84130E973] GoodName=Legend of Zelda, The - Majora's Mask (E) (M4) (V1.0) [!] CRC=E97955C6 BC338D38 SaveType=Flash RAM Status=4 Rumble=Yes Players=1 [5798E844953662880C5EB4134F886909] GoodName=Legend of Zelda, The - Majora's Mask (E) (M4) (V1.0) [T+Ita1.0Beta_Vampire] CRC=E97955C6 BC338D38 RefMD5=13FAB67E603B002CEAF0EEA84130E973 [36759C85694A4CF5A1F089A4136DAE2B] GoodName=Legend of Zelda, The - Majora's Mask (E) (M4) (V1.0) [T-Ita0.9M_Vampire] CRC=E97955C6 BC338D38 RefMD5=13FAB67E603B002CEAF0EEA84130E973 [6CBAC6E5B13A4A92347488DE1C806BC0] GoodName=Legend of Zelda, The - Majora's Mask (E) (M4) (V1.0) [T-Ita0.9P1+G_Vampire] CRC=E97955C6 BC338D38 RefMD5=13FAB67E603B002CEAF0EEA84130E973 [44494CD5D6E3332F79465DE51C2EC636] GoodName=Legend of Zelda, The - Majora's Mask (E) (M4) (V1.0) [T-Ita0.9Z3_Vampire] CRC=E97955C6 BC338D38 RefMD5=13FAB67E603B002CEAF0EEA84130E973 [585AA96CBB44DF3BBB3B294538B0605A] GoodName=Legend of Zelda, The - Majora's Mask (E) (M4) (V1.0) [T-Ita0.9e_Vampire] CRC=E97955C6 BC338D38 RefMD5=13FAB67E603B002CEAF0EEA84130E973 [5FD0F1EE3F6E0C1E0BA9A91ED797A8B9] GoodName=Legend of Zelda, The - Majora's Mask (E) (M4) (V1.0) [T-Ita0.9f_Vampire] CRC=E97955C6 BC338D38 RefMD5=13FAB67E603B002CEAF0EEA84130E973 [035239281994E1E254D7AFC79F5570FB] GoodName=Legend of Zelda, The - Majora's Mask (E) (M4) (V1.0) [f1] CRC=E7428718 97751A86 RefMD5=13FAB67E603B002CEAF0EEA84130E973 [BECCFDED43A2F159D03555027462A950] GoodName=Legend of Zelda, The - Majora's Mask (E) (M4) (V1.1) CRC=0A5D8F83 98C5371A SaveType=Flash RAM Status=4 Rumble=Yes Players=1 [6DC88503DF78FE4FAA16BCF7AEC4D1E7] GoodName=Legend of Zelda, The - Majora's Mask (E) (M4) (V1.1) [T+Ita1.0Beta_Vampire] CRC=0A5D8F83 98C5371A RefMD5=BECCFDED43A2F159D03555027462A950 [2A0A8ACB61538235BC1094D297FB6556] GoodName=Legend of Zelda, The - Majora's Mask (U) [!] CRC=5354631C 03A2DEF0 SaveType=Flash RAM Status=4 Rumble=Yes Players=1 [9C7D1B51ECBC9AC333D00273F96758B1] GoodName=Legend of Zelda, The - Majora's Mask (U) [T+Pol1.0] CRC=5354631C 03A2DEF0 RefMD5=2A0A8ACB61538235BC1094D297FB6556 [B90B728E0643ABC582793B451444733E] GoodName=Legend of Zelda, The - Majora's Mask (U) [T+Rus0.85_Alex] CRC=5354631C 03A2DEF0 RefMD5=2A0A8ACB61538235BC1094D297FB6556 [04150A63D1574673BEAB036E4EB5A249] GoodName=Legend of Zelda, The - Majora's Mask (U) [T+RusPreAlpha_Alex&gottax] CRC=5354631C 03A2DEF0 RefMD5=2A0A8ACB61538235BC1094D297FB6556 [5D5DD380115ABF43958A710C7B597771] GoodName=Legend of Zelda, The - Majora's Mask (U) [T-Rus0.1_Alex] CRC=5354631C 03A2DEF0 RefMD5=2A0A8ACB61538235BC1094D297FB6556 [7863ED3EE54F72BD59CF970C5C402FA2] GoodName=Legend of Zelda, The - Majora's Mask (U) [T-Rus0.2_Alex] CRC=5354631C 03A2DEF0 RefMD5=2A0A8ACB61538235BC1094D297FB6556 [E684C672C2BF64717A10F1D104108998] GoodName=Legend of Zelda, The - Majora's Mask (U) [T-Rus0.36Alex] CRC=5354631C 03A2DEF0 RefMD5=2A0A8ACB61538235BC1094D297FB6556 [BD26BC90750D6388972C7E29441039DF] GoodName=Legend of Zelda, The - Majora's Mask (U) [T-Rus0.50_Alex] CRC=5354631C 03A2DEF0 RefMD5=2A0A8ACB61538235BC1094D297FB6556 [3DF7F2AF3E7B1F2FD55C2C02125F0130] GoodName=Legend of Zelda, The - Majora's Mask (U) [f1] CRC=696F2896 764F6D3F RefMD5=2A0A8ACB61538235BC1094D297FB6556 [8F281800FBA5DDCB1D2B377731FC0215] GoodName=Legend of Zelda, The - Majora's Mask - Preview Demo (U) [!] CRC=BF799345 39FF7A02 [AC0751DBC23AB2EC0C3144203ACA0003] GoodName=Legend of Zelda, The - Majora's Mask (U) (GC) CRC=B443EB08 4DB31193 SaveType=Flash RAM Status=4 Rumble=Yes Players=1 [DBE9AF0DB46256E42B5C67902B696549] GoodName=Legend of Zelda, The - Majora's Mask - Collector's Edition (E) (M4) (GC) [!] CRC=6AECEC4F F0924814 Players=1 [9F04C8E68534B870F707C247FA4B50FC] GoodName=Zelda no Densetsu - Toki no Ocarina (J) (V1.0) [!] CRC=EC7011B7 7616D72B SaveType=SRAM Status=4 Rumble=Yes Players=1 ; Subscreen Delay Fix Cheat0=801DA5CB 0002 [A04EBD753276C52E95E25AF7683DA32D] GoodName=Zelda no Densetsu - Toki no Ocarina (J) (V1.0) [T+Chi.02_madcell] CRC=EC7011B7 7616D72B RefMD5=9F04C8E68534B870F707C247FA4B50FC [D48CFE3FBF77D5335731509BFDE10D47] GoodName=Zelda no Densetsu - Toki no Ocarina (J) (V1.0) [T+Chi] CRC=EC7011B7 7616D72B RefMD5=9F04C8E68534B870F707C247FA4B50FC [BF0622C4C479E8FF5983DB3786F84293] GoodName=Zelda no Densetsu - Toki no Ocarina (J) (V1.0) [f1] CRC=9FD0987D 7EAE10D8 RefMD5=9F04C8E68534B870F707C247FA4B50FC [1BF5F42B98C3E97948F01155F12E2D88] GoodName=Zelda no Densetsu - Toki no Ocarina (J) (V1.1) [!] CRC=D43DA81F 021E1E19 SaveType=SRAM Status=4 Rumble=Yes Players=1 ; Subscreen Delay Fix Cheat0=801DA78B 0002 [2258052847BDD056C8406A9EF6427F13] GoodName=Zelda no Densetsu - Toki no Ocarina (J) (V1.2) [!] CRC=693BA2AE B7F14E9F RefMD5=1BF5F42B98C3E97948F01155F12E2D88 ; Subscreen Delay Fix Cheat0=801DAE8B 0002 [E040DE91A74B61E3201DB0E2323F768A] GoodName=Legend of Zelda, The - Ocarina of Time (E) (M3) (V1.0) [!] CRC=B044B569 373C1985 Status=4 Players=1 SaveType=SRAM Rumble=Yes ; Subscreen Delay Fix Cheat0=801D860B 0002 [2B60EF777F759B4F0E19DDF3CB84D9AB] GoodName=Legend of Zelda, The - Ocarina of Time (E) (M3) (V1.0) [b1] CRC=B044B569 373C1985 RefMD5=E040DE91A74B61E3201DB0E2323F768A [20C68EAFDFCB1BA98B495E5BEED5E4B6] GoodName=Legend of Zelda, The - Ocarina of Time (E) (M3) (V1.0) [f1] (zpfc) CRC=EEE48FAF 6A92BAFF RefMD5=E040DE91A74B61E3201DB0E2323F768A [175EDAB7F1A3DFBB5D23C4AA1B9D647E] GoodName=Legend of Zelda, The - Ocarina of Time (E) (M3) (V1.0) [f2] (zpc1) CRC=96961E83 B5DE0894 RefMD5=E040DE91A74B61E3201DB0E2323F768A [D714580DD74C2C033F5E1B6DC0AEAC77] GoodName=Legend of Zelda, The - Ocarina of Time (E) (M3) (V1.1) [!] CRC=B2055FBD 0BAB4E0C Status=4 Players=1 SaveType=SRAM Rumble=Yes ; Subscreen Delay Fix Cheat0=801D864B 0002 [5BD1FE107BF8106B2AB6650ABECD54D6] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [!] CRC=EC7011B7 7616D72B Status=4 SaveType=SRAM Players=1 Rumble=Yes ; Subscreen Delay Fix Cheat0=801DA5CB 0002 [A43A350385FA814EC9793B7ACD9E18F4] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) (Room121 Hack) CRC=EBE8AA17 B1EF65E6 [640B928AD387B271094F64B9B93ABBFC] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T+Dut] CRC=C7C3086D 93826E6E RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [6B3DB6AAA348F5721AFAF892E9B274DE] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T+Ita100] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [48CA89956120E0522D4B6B7E2810D04C] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T+Pol1.3] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [77BF20D3ECA19EBCFC5FED35F5CF65DC] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T+Por1.0] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [7FD3BA9B095C244367E84A6E4493349B] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T+Por1.5BetaFinal] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [7037DF7E0050A6D8B9B338C774A1CEB0] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T+Rus1.0beta2_Sergey Anton] CRC=F8B1C7C7 1EFCA431 RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [B0BB6CAB395C93C966F1CA485FC1BFBC] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T+Rus101b2] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [10A2E08708E25195E063D2E05231AB66] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T+Spa01b_toruzz] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [BBCCE848679F3D0722CBA622505FB206] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T+Spa097b2] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [51778E50CE70466796F8D51C686224C4] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T+Spa1.0] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [44E6921A257E913977088B9B6BA9D25B] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T+Spa2.0_eduardo_a2j] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [AAEB5ACA09291E8F5FEDFA1F576D9F0A] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Pol1.2] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [1746D1CC38C42F08F0CD12D170C046B8] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Por.09] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [0D6331C2FA062F20272CC1A7F80F7271] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Por.14] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [FF7C6D9909D36D3A11D4C9052EAFB2E8] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Por.22] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [D4718E7EA75847646025D07626A1DF69] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Por.26] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [E784353B07DAFCB66690193B03CC3E1F] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Por.28] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [E6A5B9A18BB8D0508FBB703EB90703B7] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Por.30] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [79BE4EEEB2DD94E542516DFC189B099E] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Por.33] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [65AC7755CB41E937A1DC5C58902A4222] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Por.35] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [7B3AD8B6FE2D8F0602ED1006FD673970] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Por.37] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [F85FC5CE4451C1E9F3EE00B814489A51] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Por.42] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [92AED3D84A1AA0082B128E2CFD84C4AA] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Rus.01] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [5DF98AE5EAC2797555587D3391222FE4] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Rus.06] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [A1F18DE7D5570A502C7C93B7BF27E868] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Rus.82] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [A5A8A0249E14A052227B3ED71A98F0B4] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Rus099bfix] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [3FE076D5992C53DE6E095E53E53D9BC5] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Rus099wip] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [40F4A3A5FE703527E03C5747BC0A2FD6] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T-Spa1.0_eduardo] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [EE38A903556C24520CD162FD046748A2] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [b1] CRC=EC7011B7 7616D72B RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [8C1348872D9AC31FF9D22C07D7186CCB] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [f1] CRC=9FD0987D 7EAE10D8 RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [DB2D737DE0F117D419B3A48442B6DB22] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [f2] CRC=9FD0987D 7EAE10D8 RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [4472B1F6B9D594B6361DFA396F8CFB2C] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.0) [f3] CRC=9FD0987D 7EAE10D8 RefMD5=5BD1FE107BF8106B2AB6650ABECD54D6 [721FDCC6F5F34BE55C43A807F2A16AF4] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.1) [!] CRC=D43DA81F 021E1E19 Status=4 SaveType=SRAM Players=1 Rumble=Yes ; Subscreen Delay Fix Cheat0=801DA78B 0002 [92C842FC8CF706FF290044D40A64D346] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.1) [T+Ita100] CRC=D43DA81F 021E1E19 RefMD5=721FDCC6F5F34BE55C43A807F2A16AF4 [F5B33DC7DC76BB308801CB518B1515F3] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.1) [T+Por1.0] CRC=D43DA81F 021E1E19 RefMD5=721FDCC6F5F34BE55C43A807F2A16AF4 [C949E4929A001B339DAE000A3DA9E0A8] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.1) [T+Por100%] CRC=D43DA81F 021E1E19 RefMD5=721FDCC6F5F34BE55C43A807F2A16AF4 [53E09E6B72F114440B389FA8549E8F97] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.1) [T+Spa01b_toruzz] CRC=D43DA81F 021E1E19 RefMD5=721FDCC6F5F34BE55C43A807F2A16AF4 [EA4FA94072849F88CAC96E60C1EDD41D] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.1) [T-Spa1.0_eduardo] CRC=D43DA81F 021E1E19 RefMD5=721FDCC6F5F34BE55C43A807F2A16AF4 [B3E1D1B92626BA86E5BDF0F18409A25B] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.1) [T-Spa1.0_eduardo][b1] CRC=D43DA81F 021E1E19 RefMD5=721FDCC6F5F34BE55C43A807F2A16AF4 [468F7EAA4B94B831AEED8B83C062B5CB] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.1) [b1] CRC=D43DA81F 021E1E19 RefMD5=721FDCC6F5F34BE55C43A807F2A16AF4 [DD824A8E1A6778FA5229433109AFAEFF] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.1) [b2] CRC=CF8EC901 7EC2C48D RefMD5=721FDCC6F5F34BE55C43A807F2A16AF4 [57A9719AD547C516342E1A15D5C28C3D] GoodName=Legend of Zelda, The - Ocarina of Time (U) (V1.2) [!] CRC=693BA2AE B7F14E9F Players=1 SaveType=SRAM ; Subscreen Delay Fix Cheat0=801DAE8B 0002 [CD09029EDCFB7C097AC01986A0F83D3F] GoodName=Legend of Zelda, The - Ocarina of Time (U) (GC) [!] CRC=F3DD35BA 4152E075 Status=4 Players=1 SaveType=SRAM Rumble=Yes ; Subscreen Delay Fix Cheat0=801DB78B 0002 ; End Credits Fix Cheat1=D109A814 0320,8109A814 0000,D109A816 F809,8109A816 0000 [2C27B4E000E85FD78DBCA551F1B1C965] GoodName=Legend of Zelda, The - Ocarina of Time (E) (GC) [!] CRC=09465AC3 F8CB501B Status=4 Players=1 SaveType=SRAM Rumble=Yes ; Subscreen Delay Fix Cheat0=801D8F8B 0002 ; End Credits Fix Cheat1=D109A8E4 0320,8109A8E4 0000,D109A8E6 F809,8109A8E6 0000 [77314FE3C3EDD472D0554C12FEDB38F4] GoodName=Legend of Zelda, The - Ocarina of Time (E) (GC) [f1] CRC=A3271D83 05B533A5 RefMD5=2C27B4E000E85FD78DBCA551F1B1C965 [1618403427E4344A57833043DB5CE3C3] GoodName=Legend of Zelda, The - Ocarina of Time - Master Quest (E) (GC) [!] CRC=1D4136F3 AF63EEA9 Status=4 Players=1 SaveType=SRAM Rumble=Yes ; Subscreen Delay Fix Cheat0=801D8F4B 0002 ; End Credits Fix Cheat1=D109A8C4 0320,8109A8C4 0000,D109A8C6 F809,8109A8C6 0000 [BC2ECBE96B04EDC56B08347DF7C7FECD] GoodName=Legend of Zelda, The - Ocarina of Time - Master Quest (E) (GC) [T+Ita70%_Rulesless] CRC=1D4136F3 AF63EEA9 RefMD5=1618403427E4344A57833043DB5CE3C3 [83673D0A0EF4705C624043788EBF11EE] GoodName=Legend of Zelda, The - Ocarina of Time - Master Quest (E) (GC) [T+Pol1.0] CRC=1D4136F3 AF63EEA9 RefMD5=1618403427E4344A57833043DB5CE3C3 [A34093AC2B038A92CCF525CAB4CE346E] GoodName=Legend of Zelda, The - Ocarina of Time - Master Quest (E) (GC) [f1] (NTSC) CRC=27A3831D B505A533 RefMD5=1618403427E4344A57833043DB5CE3C3 [2DE4D0F0788871CC4BB6D30B60F72184] GoodName=Legend of Zelda, The - Ocarina of Time - Master Quest (E) (GC) [h1C] CRC=1D4136F3 AF63EEA9 RefMD5=1618403427E4344A57833043DB5CE3C3 [DA35577FE54579F6A266931CC75F512D] GoodName=Legend of Zelda, The - Ocarina of Time - Master Quest (U) (GC) [!] CRC=F034001A AE47ED06 Status=4 Players=1 SaveType=SRAM Rumble=Yes ; Subscreen Delay Fix Cheat0=801DB74B 0002 ; End Credits Fix Cheat1=D109A7F4 0320,8109A7F4 0000,D109A7F6 F809,8109A7F6 0000 [26A1616667EEC82288534C47B6927D45] GoodName=Legend of Zelda, The - Ocarina of Time - Master Quest (U) (Debug Version) [f1] CRC=917D1B16 831F9BE1 RefMD5=DA35577FE54579F6A266931CC75F512D [8AD8D24EA38B68DFAB154C2585FB550C] GoodName=Legend of Zelda, The - Ocarina of Time - Master Quest (U) (Debug Version) [f2] CRC=917D18F6 69BC5453 RefMD5=DA35577FE54579F6A266931CC75F512D [8CA71E87DE4CE5E9F6EC916202A623E9] GoodName=Legend of Zelda, The - Ocarina of Time - Master Quest (U) (Debug Version) CRC=917D18F6 69BC5453 RefMD5=DA35577FE54579F6A266931CC75F512D [55685D6324EFDE5BC9D26C98706B0B8A] GoodName=Les Razmoket - La Chasse Aux Tresors (F) [!] CRC=2B696CB4 7B93DCD8 [AEE5016E6D60D12AD768E9F6D10ADDE8] GoodName=Let's Smash Tennis (J) [!] CRC=3D67C62B 31D03150 [EF878DFACF5CD5C00BA3297B0DC888D2] GoodName=Light Force First N64 Demo by Fractal (PD) CRC=7D292963 D5277C1F [9656C4A5251F054704E35134006CFFC7] GoodName=Liner V1.00 by Colin Phillipps of Memir (PD) CRC=8A8E474B 6458BF2B Status=1 SaveType=None Players=4 Rumble=No [AF701EE852ECD13F5F9F3284EBE60561] GoodName=Liner V1.00 by Colin Phillipps of Memir (PD) [b1] CRC=8A8E474B 6458BF2B RefMD5=9656C4A5251F054704E35134006CFFC7 [500AFE6D6732E0888D108410D135B78E] GoodName=Liner V1.00 by Colin Phillipps of Memir (PD) [b2] CRC=8A8E474B 6458BF2B RefMD5=9656C4A5251F054704E35134006CFFC7 [99380A8ED84C89E54DE53E0B1FB423C9] GoodName=Liner V1.02 by Colin Phillipps of Memir (PD) CRC=F7B1C8E8 70536D3E Status=1 SaveType=None Players=4 Rumble=No [E62F4FDCC82C244BA9709E40756D9B62] GoodName=Lode Runner 3-D (E) (M5) [!] CRC=60460680 305F0E72 SaveType=Eeprom 4KB Rumble=Yes Players=1 Status=3 [6B1E294A9199E6F22DBC6ABC59BD7568] GoodName=Lode Runner 3-D (E) (M5) [b1] CRC=E378B28A 0CA18BCC RefMD5=E62F4FDCC82C244BA9709E40756D9B62 [D2BD8DD8C3BE1E8F0B8AE49206DBD7E5] GoodName=Lode Runner 3-D (J) [!] CRC=964ADD0B B29213DB SaveType=Eeprom 4KB Rumble=Yes Players=1 Status=3 [D038813541589F0B3F1F900F4FD22C9B] GoodName=Lode Runner 3-D (U) [!] CRC=255018DF 57D6AE3A SaveType=Eeprom 4KB Rumble=Yes Players=1 Status=3 [5FBA92D908B9962F26D389C85F6E88CF] GoodName=Lode Runner 3-D (U) [b1][f1] (PAL) CRC=275A4533 ACD94796 RefMD5=D038813541589F0B3F1F900F4FD22C9B [3F5CA81183EA0E69F35417F6BBD7C5AC] GoodName=Lode Runner 3-D (U) [f1] (PAL) CRC=275A4533 ACD94796 RefMD5=D038813541589F0B3F1F900F4FD22C9B [789482B7931419FCE7FC2472026E1C65] GoodName=Lode Runner 3-D (U) [t1] CRC=BD13F636 02079573 RefMD5=D038813541589F0B3F1F900F4FD22C9B [1408FCF68B60D845F090107EF355A7E5] GoodName=Looney Tunes - Duck Dodgers (E) (M6) [!] CRC=0AA0055B 7637DF65 [4CCFF861AD2CFD65CC660F496C1D1664] GoodName=Lt. Duck Dodgers (Prototype) CRC=FBB9F1FA 6BF88689 CountPerOp=1 [7A99628EDF0A6602D0C408F31B701435] GoodName=Lylat Wars (A) (M3) [!] CRC=2483F22B 136E025E Rumble=Yes Players=4 SaveType=Eeprom 4KB [B182BBBC8CE22BD3F44BB6ED91F6ACD4] GoodName=Lylat Wars (A) (M3) [f1] CRC=2483F22B 136E025E RefMD5=7A99628EDF0A6602D0C408F31B701435 [1E03884F7017230E96F741085E5817F8] GoodName=Lylat Wars (A) (M3) [t1] (Boost) CRC=AF13E2C2 2D502822 RefMD5=7A99628EDF0A6602D0C408F31B701435 [A2957C46E62CEC7B10EDE4547F70425F] GoodName=Lylat Wars (A) (M3) [t2] (No Damage-Unbreakable Wings) CRC=8B31F4AD F366CBFA RefMD5=7A99628EDF0A6602D0C408F31B701435 [884CCCA35CBEEDB8ED288326F9662100] GoodName=Lylat Wars (E) (M3) [!] CRC=F4CBE92C B392ED12 Players=4 Rumble=Yes SaveType=Eeprom 4KB [F0FF28B0D26CDEFC11F22FE73148A6DC] GoodName=Lylat Wars (E) (M3) [f1] CRC=F4CBE92C B392ED12 RefMD5=884CCCA35CBEEDB8ED288326F9662100 [37F7F2F2CFB488E48A2706FC8C4B2DD5] GoodName=Lylat Wars (E) (M3) [f1][h1C] CRC=F4CBE92C B392ED12 RefMD5=884CCCA35CBEEDB8ED288326F9662100 [499013DA36AD50C94B2CE6B794CC9983] GoodName=Lylat Wars (E) (M3) [f2] (NTSC) CRC=F667DC04 86510A81 RefMD5=884CCCA35CBEEDB8ED288326F9662100 [12F0671C66D25622C4C9CD71C678A1F6] GoodName=Lylat Wars (E) (M3) [t1] (Boost) CRC=834C19FF 8A93F7D4 RefMD5=884CCCA35CBEEDB8ED288326F9662100 [281E754123EC0CC688C4AA7C853DE303] GoodName=Lylat Wars (E) (M3) [t2] (No Damage-Unbreakable Wings) CRC=58B5EA62 27177133 RefMD5=884CCCA35CBEEDB8ED288326F9662100 [41FE06C68915666E5F8FEF81B8FFF59F] GoodName=MAME 64 Beta 3 (PD) CRC=D5CA46C2 F8555155 [3803F70982907C7C24713A7F9742B6CD] GoodName=MAME 64 Demo (PD) [b1] CRC=9CCE5B1D 6351E283 [0E2516C65B94214C891B2D07C3D92AEC] GoodName=MAME 64 Demo (PD) [b2] CRC=9CCE5B1D 6351E283 [42AC30399688F98E58BE6AD1D2217E56] GoodName=MAME 64 Demo (PD) CRC=9CCE5B1D 6351E283 [C9319D97DABE9E842401433A27E00DAC] GoodName=MAME 64 V1.0 (PD) [b1] CRC=9CCE5B1D 6351E283 [6591A5FCFFF8879382C966906C3186E0] GoodName=MAME 64 V1.0 (PD) CRC=9CCE5B1D 6351E283 [D63FAF99E7876C39A9ACA2659596342F] GoodName=MMR by Count0 (PD) [b1] CRC=9E6581AB 57CC8CED [65B71F404DC3CF9A135D3229FFEA3C15] GoodName=MMR by Count0 (PD) CRC=9E6581AB 57CC8CED [0054B7FC0C2ACBED650EFE727CDBA472] GoodName=MRC - Multi Racing Championship (E) (M3) [!] CRC=B8F0BD03 4479189E SaveType=Eeprom 4KB Players=4 [362D10C7D270AE48D83D1D7BB78BF527] GoodName=MRC - Multi Racing Championship (E) (M3) [b1] CRC=B8F0BD03 4479189E RefMD5=0054B7FC0C2ACBED650EFE727CDBA472 [25E39A8B45FDDFA1989CE6662F87EF23] GoodName=MRC - Multi Racing Championship (E) (M3) [b2] CRC=B8F0BD03 4479189E RefMD5=0054B7FC0C2ACBED650EFE727CDBA472 [F5723C4CCFB9A1CE28426962D59CC85F] GoodName=MRC - Multi Racing Championship (E) (M3) [b3] CRC=B8F0BD03 4479189E RefMD5=0054B7FC0C2ACBED650EFE727CDBA472 [FEA06F46F61DEB721CF905C785299994] GoodName=MRC - Multi Racing Championship (E) (M3) [h1C] CRC=B8F0BD03 4479189E RefMD5=0054B7FC0C2ACBED650EFE727CDBA472 [74904F302A25620D7F63C0CB5333D464] GoodName=MRC - Multi Racing Championship (E) (M3) [o1] CRC=B8F0BD03 4479189E RefMD5=0054B7FC0C2ACBED650EFE727CDBA472 [8E18064A2C4B3EC15A20C3D676644B3A] GoodName=MRC - Multi Racing Championship (J) [!] CRC=A6B6B413 15D113CC Players=4 SaveType=Eeprom 4KB [C306C80A07743F75B0C69AF2B484E957] GoodName=MRC - Multi Racing Championship (J) [b1] CRC=A6B6B413 15D113CC RefMD5=8E18064A2C4B3EC15A20C3D676644B3A [CBA2CCCD3C3772B96CDA7128090C1FD7] GoodName=MRC - Multi Racing Championship (J) [b2] CRC=A6B6B413 15D113CC RefMD5=8E18064A2C4B3EC15A20C3D676644B3A [8F33FE36837198B3F21CC1F37FC67CC8] GoodName=MRC - Multi Racing Championship (J) [b3] CRC=A6B6B413 15D113CC RefMD5=8E18064A2C4B3EC15A20C3D676644B3A [6073174A8DA1305CF91B59369FAEFDDF] GoodName=MRC - Multi Racing Championship (J) [b4] CRC=A6B6B413 15D113CC RefMD5=8E18064A2C4B3EC15A20C3D676644B3A [BB82ADC51562F8CDDCDF4F6FAD2479BA] GoodName=MRC - Multi Racing Championship (J) [b5] CRC=A6B6B413 15D113CC RefMD5=8E18064A2C4B3EC15A20C3D676644B3A [FC61D60F2C6FE4610F70CE4949A7A062] GoodName=MRC - Multi Racing Championship (U) [!] CRC=2AF9B65C 85E2A2D7 Players=4 SaveType=Eeprom 4KB [E38F1DAE2A2023A529B47A26E4666759] GoodName=MRC - Multi Racing Championship (U) [b1] CRC=2AF9B65C 85E2A2D7 RefMD5=FC61D60F2C6FE4610F70CE4949A7A062 [535995506105D0EABA796E371660CBF2] GoodName=MRC - Multi Racing Championship (U) [b2] CRC=2AF9B65C 85E2A2D7 RefMD5=FC61D60F2C6FE4610F70CE4949A7A062 [7E8F028411746CF816848384B788B624] GoodName=MRC - Multi Racing Championship (U) [b3] CRC=2AF9B65C 85E2A2D7 RefMD5=FC61D60F2C6FE4610F70CE4949A7A062 [677356691E55A9061772585CDDFD7F76] GoodName=MRC - Multi Racing Championship (U) [o1] CRC=2AF9B65C 85E2A2D7 RefMD5=FC61D60F2C6FE4610F70CE4949A7A062 [72F324B7E115618771C506AF3F604F8F] GoodName=MSFTUG Intro #1 by LaC (PD) CRC=94D3D5CB E8808606 [523883A766C662E8377CD256755B27B4] GoodName=Mace - The Dark Age (E) [!] CRC=1145443D 11610EDB Players=4 SaveType=None [9CF16783687686C8FE2ABE0B71316C3D] GoodName=Mace - The Dark Age (E) [b1] CRC=1145443D 11610EDB RefMD5=523883A766C662E8377CD256755B27B4 [2249D931B5D2D4544EEB75E5B4136709] GoodName=Mace - The Dark Age (E) [b2] CRC=1145443D 11610EDB RefMD5=523883A766C662E8377CD256755B27B4 [87BD533084ACB4DC6C3E01B32F26357C] GoodName=Mace - The Dark Age (E) [o1] CRC=1145443D 11610EDB RefMD5=523883A766C662E8377CD256755B27B4 [8E2B951678785DB1F54A31F778BFA491] GoodName=Mace - The Dark Age (E) [o2] CRC=1145443D 11610EDB RefMD5=523883A766C662E8377CD256755B27B4 [39A2BCA1C17CD4CF1A9F3AE2B725B5C6] GoodName=Mace - The Dark Age (U) [!] CRC=6B700750 29D621FE Players=4 SaveType=None [DF342B032ED1ED15C24448EC6BE9F34E] GoodName=Mace - The Dark Age (U) [b1] CRC=6B700750 29D621FE RefMD5=39A2BCA1C17CD4CF1A9F3AE2B725B5C6 [57CB2D2F6C87F520016AACF7E2785222] GoodName=Mace - The Dark Age (U) [b2] CRC=6B700750 29D621FE RefMD5=39A2BCA1C17CD4CF1A9F3AE2B725B5C6 [D1CE0FA3D46CA27F1C15E782ACEC49DA] GoodName=Mace - The Dark Age (U) [b3] CRC=022E6456 75BBB3C7 RefMD5=39A2BCA1C17CD4CF1A9F3AE2B725B5C6 [243F8C4067D50D994C1E883968DE8C61] GoodName=Mace - The Dark Age (U) [b4] CRC=022E6456 75BBB3C7 RefMD5=39A2BCA1C17CD4CF1A9F3AE2B725B5C6 [88B638825A16E46837FB521EDA328C5A] GoodName=Mace - The Dark Age (U) [b5] CRC=6B700750 29D621FE RefMD5=39A2BCA1C17CD4CF1A9F3AE2B725B5C6 [62A0CE9A58273811E34CC73BE8E6F8C4] GoodName=Mace - The Dark Age (U) [b6] CRC=6B700750 29D621FE RefMD5=39A2BCA1C17CD4CF1A9F3AE2B725B5C6 [B96ABFBD746BC25243D607613297D769] GoodName=Mace - The Dark Age (U) [b7] CRC=6B700750 29D621FE RefMD5=39A2BCA1C17CD4CF1A9F3AE2B725B5C6 [1D4BD885DB0C0C5365698526077E10F4] GoodName=Mace - The Dark Age (U) [b8] CRC=6B700750 29D621FE RefMD5=39A2BCA1C17CD4CF1A9F3AE2B725B5C6 [1C897EC059C6C34C8ED57E1965410F2E] GoodName=Mace - The Dark Age (U) [b9] CRC=6B700750 29D621FE RefMD5=39A2BCA1C17CD4CF1A9F3AE2B725B5C6 [64D508C5E0F1050048BE429E20EF4B07] GoodName=Mace - The Dark Age (U) [o1] CRC=6B700750 29D621FE RefMD5=39A2BCA1C17CD4CF1A9F3AE2B725B5C6 [67C96076459EB5F71733F39D7FCC76A3] GoodName=Madden Football 64 (E) [!] CRC=A197CB52 7520DE0E SaveType=Eeprom 16KB Players=4 [5CBF54627693F800524038127BBF46BF] GoodName=Madden Football 64 (E) [b1] CRC=A197CB52 7520DE0E RefMD5=67C96076459EB5F71733F39D7FCC76A3 [903B912CE88626900221731224E9DBE8] GoodName=Madden Football 64 (U) [!] CRC=13836389 265B3C76 SaveType=Eeprom 16KB Players=4 [5CA2A7F712B6C5737D0B46E67C8DDA44] GoodName=Madden Football 64 (U) [b1] CRC=13836389 265B3C76 RefMD5=903B912CE88626900221731224E9DBE8 [9AE941A12974B7B56CFA8B5EA1E670D7] GoodName=Madden Football 64 (U) [b2] CRC=13836389 265B3C76 RefMD5=903B912CE88626900221731224E9DBE8 [CA7161F298DF38BC8182B21BB754DB4B] GoodName=Madden Football 64 (U) [h1C] CRC=13836389 265B3C76 RefMD5=903B912CE88626900221731224E9DBE8 [732167D19C627CAF7384C780C64AB80A] GoodName=Madden Football 64 (U) [o1] CRC=13836389 265B3C76 RefMD5=903B912CE88626900221731224E9DBE8 [E979BF2E2B43CCB5E2E0A2798AD7770C] GoodName=Madden Football 64 (U) [o1][h1C] CRC=13836389 265B3C76 RefMD5=903B912CE88626900221731224E9DBE8 [0966CB688D6A5F1B22B4FAB5A393C0E2] GoodName=Madden Football 64 (U) [o2] CRC=13836389 265B3C76 RefMD5=903B912CE88626900221731224E9DBE8 [DB24A5DBA68F21D4513A37F7A7B0CF60] GoodName=Madden Football 64 (U) [o3] CRC=13836389 265B3C76 RefMD5=903B912CE88626900221731224E9DBE8 [955D19E26B4BA7CC941F86A54A0FC13D] GoodName=Madden NFL 2000 (U) [!] CRC=0CB81686 5FD85A81 Players=4 SaveType=Controller Pack CountPerOp=1 [441FA65FAA5C12339F89A0BB7DB43C8F] GoodName=Madden NFL 2001 (U) [!] CRC=EB38F792 190EA246 Players=4 SaveType=Controller Pack CountPerOp=1 [AD0F2EC565D7575FB37512BC8DF8A092] GoodName=Madden NFL 2002 (U) [!] CRC=D7134F8D C11A00B5 SaveType=Controller Pack Players=4 CountPerOp=1 [E7BF80861A0AB2A788959463D953B5D5] GoodName=Madden NFL 99 (E) [!] CRC=3925D625 8C83C75E Players=4 SaveType=Controller Pack CountPerOp=1 [9CB5F5CD6AB141454D645C92FD9BF67C] GoodName=Madden NFL 99 (E) [h1C] CRC=3925D625 8C83C75E RefMD5=E7BF80861A0AB2A788959463D953B5D5 [507CEAB72EF2A1BF145BF190F5CE1C80] GoodName=Madden NFL 99 (U) [!] CRC=DEB78BBA 52F6BD9D Players=4 SaveType=Controller Pack CountPerOp=1 [C049FCD4CB185A553D8122CFE6C30139] GoodName=Madden NFL 99 (U) [o1] CRC=DEB78BBA 52F6BD9D RefMD5=507CEAB72EF2A1BF145BF190F5CE1C80 [20E51B27E8098A9D101B44689014C281] GoodName=Magical Tetris Challenge (E) [!] CRC=E4906679 9F243F05 Players=4 SaveType=None [20D02EECFA887DC5A31948B18B4BB18D] GoodName=Magical Tetris Challenge (E) [b1] CRC=E4906679 9F243F05 RefMD5=20E51B27E8098A9D101B44689014C281 [5BDE53960AD95F4C25C76C0F70C35244] GoodName=Magical Tetris Challenge (E) [f1] (NTSC) CRC=70BF6C4C 6F365E21 RefMD5=20E51B27E8098A9D101B44689014C281 [E0992A90191BE4F1B2BA02258599334E] GoodName=Magical Tetris Challenge (G) [!] CRC=E1EF93F7 14908B0B Players=4 SaveType=None [79FCC98002D1F4C79DEAF55784222DF8] GoodName=Magical Tetris Challenge (U) [!] CRC=75B61647 7ADABF78 Players=4 SaveType=None [BD5BB4CE1FACE911F9D8C777E2594998] GoodName=Magical Tetris Challenge (U) [b1][hI] CRC=CDCCFF87 1D76A49E RefMD5=79FCC98002D1F4C79DEAF55784222DF8 [36BEDFD15CB70478916BAA469491D80D] GoodName=Magical Tetris Challenge (U) [hI] CRC=CDCCFF87 1D76A49E RefMD5=79FCC98002D1F4C79DEAF55784222DF8 [F1FF1F364C459701F42BEB8989675D44] GoodName=Magical Tetris Challenge Featuring Mickey (J) [!] CRC=80C8564A 929C65AB Players=4 SaveType=None [9F6DB67262220C62536CEBE0AF3C8E73] GoodName=Magical Tetris Challenge Featuring Mickey (J) [b1] CRC=E6FCB468 CFAC7528 RefMD5=F1FF1F364C459701F42BEB8989675D44 [8AE2E8F0C356FEE638C8D908DCBB3381] GoodName=Mahjong 64 (J) [!] CRC=C53EDC41 ECE19359 Players=1 [E67651E58A4B864765A752E3BEB5F4E4] GoodName=Mahjong 64 (J) [o1] CRC=C53EDC41 ECE19359 RefMD5=8AE2E8F0C356FEE638C8D908DCBB3381 [F931E1DF9524BACEF6B731D50D7DC10F] GoodName=Mahjong 64 (J) [o2] CRC=C53EDC41 ECE19359 RefMD5=8AE2E8F0C356FEE638C8D908DCBB3381 [E942A3EEB1EB572BADD6F705EB12A22C] GoodName=Mahjong Hourouki Classic (J) [!] CRC=CCCC821E 96E88A83 Players=1 [50A8B47E5F8FE5BF955AFA70FE3893AC] GoodName=Mahjong Hourouki Classic (J) [b1] CRC=CCCC821E 96E88A83 RefMD5=E942A3EEB1EB572BADD6F705EB12A22C [D2CB04B88E565170D820E3CF78B54863] GoodName=Mahjong Hourouki Classic (J) [b2] CRC=CCCC821E 96E88A83 RefMD5=E942A3EEB1EB572BADD6F705EB12A22C [D1855B19BA0D65C103FE9318F14F5D7D] GoodName=Mahjong Hourouki Classic (J) [b3] CRC=CCCC821E 96E88A83 RefMD5=E942A3EEB1EB572BADD6F705EB12A22C [CF0D228E8EFDF823A227979BB352DD5B] GoodName=Mahjong Master (J) [!] CRC=0FC42C70 8754F1CD Players=1 [AD1AD9FE15C4565FF88B9B48AF6F300C] GoodName=Mahjong Master (J) [b1] CRC=0FC42C70 8754F1CD RefMD5=CF0D228E8EFDF823A227979BB352DD5B [E0D1170D521B49E3A5EDACA3A6F579AB] GoodName=Mahjong Master (J) [b2] CRC=0FC42C70 8754F1CD RefMD5=CF0D228E8EFDF823A227979BB352DD5B [3BD16F3DDB0DD890412BFE1E59CA5463] GoodName=Mahjong Master (J) [o1] CRC=0FC42C70 8754F1CD RefMD5=CF0D228E8EFDF823A227979BB352DD5B [152B9939A5F50734D5401980028856B4] GoodName=Major League Baseball Featuring Ken Griffey Jr. (E) [!] CRC=CDB998BE 1024A5C8 Players=4 SaveType=SRAM [62CD83FC8FC8E8CF8899320BF25474CE] GoodName=Major League Baseball Featuring Ken Griffey Jr. (E) [b1] CRC=59F34558 0C3130E4 RefMD5=152B9939A5F50734D5401980028856B4 [D5696CB5A4F2185BD8469DF018B7856B] GoodName=Major League Baseball Featuring Ken Griffey Jr. (E) [f1] CRC=59F34558 0C3130E4 RefMD5=152B9939A5F50734D5401980028856B4 [764F22AD3D0F59667A7F083D2F789B31] GoodName=Major League Baseball Featuring Ken Griffey Jr. (U) [!] CRC=80C1C05C EA065EF4 Players=4 SaveType=SRAM [97FE61E8719CF0A4747301E97C759CBF] GoodName=Major League Baseball Featuring Ken Griffey Jr. (U) [b1] CRC=B1CF1114 5E59B81D RefMD5=764F22AD3D0F59667A7F083D2F789B31 [E1BD016961EDEB895F12676AD4B77FB5] GoodName=Major League Baseball Featuring Ken Griffey Jr. (U) [b2] CRC=0BFC12D9 1B377DA7 RefMD5=764F22AD3D0F59667A7F083D2F789B31 [16F2644156AC9DD15CA8CC01DEAE5E7E] GoodName=Major League Baseball Featuring Ken Griffey Jr. (U) [b3] CRC=80C1C05C EA065EF4 RefMD5=764F22AD3D0F59667A7F083D2F789B31 [257057553D60C1DD1B7FDC5814CB21D9] GoodName=Major League Baseball Featuring Ken Griffey Jr. (U) [f1] CRC=B1CF1114 5E59B81D RefMD5=764F22AD3D0F59667A7F083D2F789B31 [30B2E1F7F3AFDC5D8E6A42C8885AAD93] GoodName=Mandelbrot Zoomer by RedBox (PD) CRC=30E6FE79 3EEA5386 Status=3 Players=0 Rumble=No SaveType=None [4E054610A872E1313228637C815E514C] GoodName=Manic Miner - Hidden Levels by RedboX (PD) CRC=A47D4AD4 F5B0C6CB Players=1 SaveType=None Status=1 Rumble=No [B18BC60EA6B9C72048FD84A2B8F182D4] GoodName=Manic Miner by RedboX (PD) CRC=A47D4AD4 8BFA81F9 Players=1 SaveType=None Status=1 Rumble=No [4D010AE1AF4B04D6B70B799C56F05993] GoodName=Mario Golf (E) [!] CRC=62E957D0 7FC15A5D Players=4 SaveType=SRAM [CF6BD6E20B40635B0E6DED5BB5114875] GoodName=Mario Golf (E) [f1] (Z64-Save) CRC=1D82BE21 7EF19C9A RefMD5=4D010AE1AF4B04D6B70B799C56F05993 [02C8E8FD7EB19BFEB325E2DB0380506A] GoodName=Mario Golf (E) [f2] (Z64-Save) CRC=1D82BE21 7EF19C9A RefMD5=4D010AE1AF4B04D6B70B799C56F05993 [18E09C0650FA3F83A90089DADD96A213] GoodName=Mario Golf (E) [h1C] CRC=62E957D0 7FC15A5D RefMD5=4D010AE1AF4B04D6B70B799C56F05993 [55634FF90EE997790781F79A5B0097EE] GoodName=Mario Golf (E) [o1] CRC=62E957D0 7FC15A5D RefMD5=4D010AE1AF4B04D6B70B799C56F05993 [78BB5B9A279156BD61BE132817A9B2C8] GoodName=Mario Golf (E) [o1][h1C] CRC=62E957D0 7FC15A5D RefMD5=4D010AE1AF4B04D6B70B799C56F05993 [7A5D0D77A462B5A7C372FB19EFDE1A5F] GoodName=Mario Golf (U) [!] CRC=664BA3D4 678A80B7 Players=4 SaveType=SRAM [D31466B4B14B03387FE52FBBBCD25A5C] GoodName=Mario Golf (U) [b1] CRC=E8761702 26AD5DBE RefMD5=7A5D0D77A462B5A7C372FB19EFDE1A5F [11FED930D4C4DD0CA7CB03B5F1BF0A12] GoodName=Mario Golf (U) [b1][f1] (PAL) CRC=84CDFB72 9CA8D544 RefMD5=7A5D0D77A462B5A7C372FB19EFDE1A5F [374FD81C3E8E858EEB2226501659B333] GoodName=Mario Golf (U) [b2] CRC=84CDFB72 9CA8D544 RefMD5=7A5D0D77A462B5A7C372FB19EFDE1A5F [BE28EF71E1EE0092EEC4AA395ACFEEFF] GoodName=Mario Golf (U) [f1] (PAL) CRC=84CDFB72 9CA8D544 RefMD5=7A5D0D77A462B5A7C372FB19EFDE1A5F [2FACDF2F3E52EE8A603DE79348E441E6] GoodName=Mario Golf (U) [f2] (Z64-Save) CRC=A19FA3D0 E06B2D11 RefMD5=7A5D0D77A462B5A7C372FB19EFDE1A5F [903E6929666531D72D05D1E4C522E305] GoodName=Mario Golf (U) [o2][h1C] CRC=664BA3D4 678A80B7 RefMD5=7A5D0D77A462B5A7C372FB19EFDE1A5F [12569B4FA5239A3AD53DE5D2E0243488] GoodName=Mario Golf (U) [t1] CRC=26647A17 8D3980C3 RefMD5=7A5D0D77A462B5A7C372FB19EFDE1A5F [E5A041B1B7C8E3B4C2E8178E5A138E2D] GoodName=Mario Golf 64 (J) [!] CRC=D48944D1 B0D93A0E Players=4 SaveType=SRAM [B5A98CED4B9A10682988CCB219A5C9A7] GoodName=Mario Golf 64 (J) [b1] CRC=D48944D1 B0D93A0E RefMD5=E5A041B1B7C8E3B4C2E8178E5A138E2D [334D4E8443A67E964649B28428C8F1AE] GoodName=Mario Golf 64 (J) [b1][f1] (PAL) CRC=B771E0A9 7B4A96E6 RefMD5=E5A041B1B7C8E3B4C2E8178E5A138E2D [6D84657C9A145E67B2A8A61CD31A7218] GoodName=Mario Golf 64 (J) [b2] CRC=D48944D1 B0D93A0E RefMD5=E5A041B1B7C8E3B4C2E8178E5A138E2D [C14090CD5CF313A471B5CD3D55EC0B53] GoodName=Mario Golf 64 (J) [f1] (PAL) CRC=B771E0A9 7B4A96E6 RefMD5=E5A041B1B7C8E3B4C2E8178E5A138E2D [CD87BA2998D63C13B4366EB2C54E1EB6] GoodName=Mario Golf 64 (J) [o1] CRC=D48944D1 B0D93A0E RefMD5=E5A041B1B7C8E3B4C2E8178E5A138E2D [8FAD1E4FA7BAF1443B7F21AD1947B429] GoodName=Mario Kart 64 (E) (V1.0) [!] CRC=C3B6DE9D 65D2DE76 Status=3 SaveType=Eeprom 4KB Players=4 Rumble=No [EC0FAE8002AC6356E0470CE21BFEFA4F] GoodName=Mario Kart 64 (E) (V1.0) (Super W00ting Hack) CRC=E470469D E105C984 RefMD5=8FAD1E4FA7BAF1443B7F21AD1947B429 [B97FC8B1D00B9D673C229CA7FAE453D4] GoodName=Mario Kart 64 (E) (V1.0) [T+Ita_Cattivik66] CRC=C3B6DE9D 65D2DE76 RefMD5=8FAD1E4FA7BAF1443B7F21AD1947B429 [E292551471766D7F51907F2BC65079AA] GoodName=Mario Kart 64 (E) (V1.0) [b1] CRC=C3B6DE9D 65D2DE76 RefMD5=8FAD1E4FA7BAF1443B7F21AD1947B429 [8E632F2AFF9AEF3F5C1AE2FEBD482D9D] GoodName=Mario Kart 64 (E) (V1.0) [b2] CRC=C3B6DE9D 65D2DE76 RefMD5=8FAD1E4FA7BAF1443B7F21AD1947B429 [2BB149A583FDEFEA96805F628FE42FD9] GoodName=Mario Kart 64 (E) (V1.1) [!] CRC=2577C7D4 D18FAAAE Status=3 SaveType=Eeprom 4KB Players=4 Rumble=Yes [2A64632C71FFB90DF3AE83836DEDD7A6] GoodName=Mario Kart 64 (E) (V1.1) [T+Ita_Cattivik66][b1] CRC=2577C7D4 D18FAAAE RefMD5=2BB149A583FDEFEA96805F628FE42FD9 [A30CFA60CCCE25F1324D4AD98C26AF5D] GoodName=Mario Kart 64 (E) (V1.1) [o1] CRC=2577C7D4 D18FAAAE RefMD5=2BB149A583FDEFEA96805F628FE42FD9 [BF964CECA78A13A82055EBDA80B95CCA] GoodName=Mario Kart 64 (J) (V1.0) [!] CRC=6BFF4758 E5FF5D5E Status=3 SaveType=Eeprom 4KB Players=4 Rumble=No [8FD3C06ED13CD27BB3D664C92A455AA8] GoodName=Mario Kart 64 (J) (V1.0) [T+Ita_Cattivik66][b1] CRC=6BFF4758 E5FF5D5E RefMD5=BF964CECA78A13A82055EBDA80B95CCA [37AA3A354FBE508F5449E0C515083128] GoodName=Mario Kart 64 (J) (V1.0) [b1] CRC=6BFF4758 E5FF5D5E RefMD5=BF964CECA78A13A82055EBDA80B95CCA [80B4F92970CBB13344F57E827C60959B] GoodName=Mario Kart 64 (J) (V1.0) [b2] CRC=6BFF4758 E5FF5D5E RefMD5=BF964CECA78A13A82055EBDA80B95CCA [36295982651A9974EB7342B1DD5245E1] GoodName=Mario Kart 64 (J) (V1.0) [o1] CRC=6BFF4758 E5FF5D5E RefMD5=BF964CECA78A13A82055EBDA80B95CCA [60535265BAE43DDFCBDB0D71594B1693] GoodName=Mario Kart 64 (J) (V1.1) [!] CRC=C9C3A987 5810344C Status=3 SaveType=Eeprom 4KB Players=4 Rumble=No [231F0134D2899C08930F6E34682D2C0B] GoodName=Mario Kart 64 (J) (V1.1) [b1] CRC=C9C3A987 5810344C RefMD5=60535265BAE43DDFCBDB0D71594B1693 [84F11CACB9608E2E595FA5FBB8C91CE9] GoodName=Mario Kart 64 (J) (V1.1) [b1][T+Ita_Cattivik66] CRC=C9C3A987 5810344C RefMD5=60535265BAE43DDFCBDB0D71594B1693 [B5D68FF8E5A982400556C530409263DB] GoodName=Mario Kart 64 (J) (V1.1) [b1][f1] (PAL) CRC=B6F68615 F4E26039 RefMD5=60535265BAE43DDFCBDB0D71594B1693 [3A67D9986F54EB282924FCA4CD5F6DFF] GoodName=Mario Kart 64 (U) [!] CRC=3E5055B6 2E92DA52 Status=3 SaveType=Eeprom 4KB Players=4 Rumble=No [B63346465FE70DA3B1E7493CE5A15A31] GoodName=Mario Kart 64 (U) (Super W00ting Hack) CRC=4D9C55B6 85E58D87 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [D1958141566ECC4942C71D1E97171639] GoodName=Mario Kart 64 (U) [T+Ita0.01_Cattivik66] CRC=3E5055B6 2E92DA52 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [65CBD8DCEC6B7CE61E1CB233EFA4A317] GoodName=Mario Kart 64 (U) [T+Por1.0_Dr_X] CRC=3E5055B6 2E92DA52 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [4A5E85A3E7118A742E3678F8F7E82B0E] GoodName=Mario Kart 64 (U) [b1] CRC=3E5055B6 2E92DA52 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [ABDB8D8C53E1F938853EC80742C8AF77] GoodName=Mario Kart 64 (U) [b2] CRC=3E5055B6 2E92DA52 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [FE75ABB3934F88429E138019146E8393] GoodName=Mario Kart 64 (U) [b3] CRC=3E5055B6 2E92DA52 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [C3565B1C983B83C6C965BB88E24135B2] GoodName=Mario Kart 64 (U) [b4] CRC=3E5055B6 2E92DA52 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [7D54D888964A3B0D058EB80886C44C88] GoodName=Mario Kart 64 (U) [h1C] CRC=3E5055B6 2E92DA52 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [7C5E794E856311403FEF548DAE98A183] GoodName=Mario Kart 64 (U) [o1] CRC=3E5055B6 2E92DA52 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [6C634D0CE7CD99CCCBB4CE8EB837EDB4] GoodName=Mario Kart 64 (U) [o2] CRC=3E5055B6 2E92DA52 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [3AA8C8C023F6AB8384CBDD412DECF977] GoodName=Mario Kart 64 (U) [t1] CRC=465035CA C6DE1A09 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [22E183BD8AF57A79DEB6679CA919B61E] GoodName=Mario Kart 64 (U) [t2] (Course Cheat) CRC=085055B6 5346ED7B RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [9F85F64C6DD30CA67EB355EF0332F102] GoodName=Mario Kart 64 (U) [t3] (Star Cheat) CRC=0B623F24 F8D4F434 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [0B2B6CC62CFEEB7C4642A3643A3ED3C8] GoodName=Mario Kart 64 (U) [t4] CRC=465035CA C6DE1A09 RefMD5=3A67D9986F54EB282924FCA4CD5F6DFF [9773150709BD804B8E57E35F1D6B0EED] GoodName=Mario Party (E) (M3) [!] CRC=9C663069 80F24A80 Players=4 SaveType=Eeprom 4KB CountPerOp=1 [2608A4D7A695D0B1A1BBC47695EACE0E] GoodName=Mario Party (E) (M3) [b1] CRC=9C663069 80F24A80 RefMD5=9773150709BD804B8E57E35F1D6B0EED [37EB3D60A2E85BE5077F73A5DF651F05] GoodName=Mario Party (E) (M3) [h1C] CRC=9C663069 80F24A80 RefMD5=9773150709BD804B8E57E35F1D6B0EED [3F556CC3B3A996CD2F471FA0D992D529] GoodName=Mario Party (J) [!] CRC=ADA815BE 6028622F Players=4 SaveType=Eeprom 4KB CountPerOp=1 [8BC2712139FBF0C56C8EA835802C52DC] GoodName=Mario Party (U) [!] CRC=2829657E A0621877 Players=4 SaveType=Eeprom 4KB CountPerOp=1 [D072DDBCC5961AE85E6FA9BF50241370] GoodName=Mario Party (U) [f1] (PAL) CRC=5B904BAE 4CA06CC9 RefMD5=8BC2712139FBF0C56C8EA835802C52DC [F70112B652B0EE4856AF83F4E8005C31] GoodName=Mario Party 2 (E) (M5) [!] CRC=82380387 DFC744D9 Players=4 SaveType=Eeprom 4KB CountPerOp=1 [F23E4CD437465F3E725262253CF3EA59] GoodName=Mario Party 2 (J) [!] CRC=ED567D0F 38B08915 Players=4 SaveType=Eeprom 4KB CountPerOp=1 [04840612A35ECE222AFDB2DFBF926409] GoodName=Mario Party 2 (U) [!] CRC=9EA95858 AF72B618 Players=4 SaveType=Eeprom 4KB CountPerOp=1 [F253C5A0FB69AB56A1548D435AF84D0F] GoodName=Mario Party 2 (U) [f1] (PAL) CRC=C6C71B88 6422C633 RefMD5=04840612A35ECE222AFDB2DFBF926409 [CD75CCD32EB435713EA54DFF313FA50C] GoodName=Mario Party 2 (U) [f2] (PAL) CRC=C63B1ADA 9CEAEB08 RefMD5=04840612A35ECE222AFDB2DFBF926409 [8E62EC6FBE3CC9FF6284191C9C88E68F] GoodName=Mario Party 3 (E) (M4) [!] CRC=C5674160 0F5F453C SaveType=Eeprom 16KB Players=4 CountPerOp=1 [ED99F330CE7A2638AB13351012EEB86B] GoodName=Mario Party 3 (J) [!] CRC=0B0AB4CD 7B158937 SaveType=Eeprom 16KB Players=4 CountPerOp=1 [76A8BBC81BC2060EC99C9645867237CC] GoodName=Mario Party 3 (U) [!] CRC=7C3829D9 6E8247CE SaveType=Eeprom 16KB Players=4 CountPerOp=1 [BDD79F498F37D01B8958F56EC6FFA097] GoodName=Mario Party 3 (U) [f1] CRC=65DB63E3 64357A65 RefMD5=76A8BBC81BC2060EC99C9645867237CC [F8F9116279FBAFD511748542994598B2] GoodName=Mario Party 3 (U) [f2] (PAL) CRC=822E0915 0338FD50 RefMD5=76A8BBC81BC2060EC99C9645867237CC [5C3D2699C01EBD30D42C6F52491EA7F0] GoodName=Mario Party 3 (U) [f3] CRC=DF0C666A 1F52B368 RefMD5=76A8BBC81BC2060EC99C9645867237CC [DF54F17FB84FB5B5BCF6AA9AF65B0942] GoodName=Mario Story (J) [!] CRC=3BA7CDDC 464E52A0 Status=2 Players=1 SaveType=Flash RAM Rumble=Yes CountPerOp=1 [FFF9B3E22ABB9B60215DAFB13AD5A4DE] GoodName=Mario Tennis (E) [!] CRC=839F3AD5 406D15FA SaveType=Eeprom 16KB Players=4 [759358FAD1ED5AE31DCB2001A07F2FE5] GoodName=Mario Tennis (U) [!] CRC=5001CF4F F30CB3BD SaveType=Eeprom 16KB Players=4 [7FB25633FDB226F35A222B4EA17BD2DC] GoodName=Mario Tennis (U) [f1] (Save) CRC=BC47A8BF 5529DE0F RefMD5=759358FAD1ED5AE31DCB2001A07F2FE5 [8EB1C2443D0B2E6EDA52A4EEA66D6C35] GoodName=Mario Tennis 64 (J) [!] CRC=3A6C42B5 1ACADA1B SaveType=Eeprom 16KB Players=4 [DD4A580E27D82BCCA6A229BA17C69368] GoodName=Mario Tennis 64 (J) [f1] (Country Check) CRC=3A3FA519 9595CD82 RefMD5=8EB1C2443D0B2E6EDA52A4EEA66D6C35 [6BAB5F2A62A4BABAF456D5DA2976871D] GoodName=Mario no Photopie (J) [!] CRC=9A9890AC F0C313DF Players=1 [7F4ED2AAF94A2197B0AD63C6ECE9DEA9] GoodName=Mario no Photopie (J) [a1] CRC=9A9890AC F0C313DF Players=1 [2202B39B9017BB061822552AF83FD331] GoodName=MeeTING Demo by Renderman (PD) [b1] CRC=A806749B 1F521F45 [DD65E5F4B192A12966BBDD6718B694E6] GoodName=MeeTING Demo by Renderman (PD) CRC=A806749B 1F521F45 [3620674ACB51E436D5150738AC1C0969] GoodName=Mega Man 64 (U) [!] CRC=0EC158F5 FB3E6896 Players=1 SaveType=Flash RAM Rumble=Yes [01A1304D98A58E2D5069079A4F4441F9] GoodName=Mega Man 64 (U) [t1][f1] (PAL-NTSC) CRC=B63200D4 E36CF5AA RefMD5=3620674ACB51E436D5150738AC1C0969 [2F4C29DD26B6D5311F3D46063A393687] GoodName=Memory Manager V1.0b by R. Bubba Magillicutty (PD) CRC=4DEC9986 A8904450 [C77AC9BC65EEEA761FC8B081AF728CDB] GoodName=Mempack Manager for Jr 0.9 by deas (PD) CRC=81A3F478 B6965E3E [E1A9CBDB3C066E4BC0A4FB71ADA70CB2] GoodName=Mempack Manager for Jr 0.9b by deas (PD) CRC=1EC6C03C B0954ADA [9CF33B5F0D677C7BCE85CB877B0942CD] GoodName=Mempack Manager for Jr 0.9c by deas (PD) CRC=D2015E56 A9FE0CE6 [BAD7C9731029AD4880FF4B92E5569065] GoodName=Mempack to N64 Uploader by Destop V1.0 (PD) CRC=6A097D8B F999048C [A4039368E0472C68E3072C02C7A80F94] GoodName=Mia Hamm Soccer 64 (U) (M2) [!] CRC=1001F10C 3D51D8C1 Players=4 SaveType=Controller Pack [892222CC4BAF9958405D20BC492175BF] GoodName=Michael Owens WLS 2000 (E) [!] CRC=E36166C2 8613A2E5 Players=4 SaveType=Controller Pack [6A814E33BB6D449BE23FBBCAC7606C0B] GoodName=Michael Owens WLS 2000 (E) [b1] CRC=E36166C2 8613A2E5 RefMD5=892222CC4BAF9958405D20BC492175BF [EC700909D09C081DA0E4BAE454C657F0] GoodName=Michael Owens WLS 2000 (E) [b2] CRC=9ABC592A 2AA5DEE2 RefMD5=892222CC4BAF9958405D20BC492175BF [BD5D214BED53C4682E9FF8B8E9919CD4] GoodName=Michael Owens WLS 2000 (E) [f1] (NTSC) CRC=9ABC592A 2AA5DEE2 RefMD5=892222CC4BAF9958405D20BC492175BF [288A514E98972BF9D329167AA29E66B6] GoodName=Mickey no Racing Challenge USA (J) [!] CRC=736AE6AF 4117E9C7 Players=4 SaveType=Eeprom 4KB [5BA3DC37860C08A209F24286B8DFEC8C] GoodName=Mickey's Speedway USA (E) (M5) [!] CRC=DED0DD9A E78225A7 Players=4 SaveType=Eeprom 4KB [0BF64427CF68E49C70E9EC2C9D815209] GoodName=Mickey's Speedway USA (U) [!] CRC=FA8C4571 BBE7F9C0 Players=4 SaveType=Eeprom 4KB [B025F0E20FB41A0AAE280847329CB919] GoodName=Mickey's Speedway USA (U) [t1] CRC=38112EC7 E91410C3 RefMD5=0BF64427CF68E49C70E9EC2C9D815209 [9A8465E302263D635557A14AA197FE3C] GoodName=Micro Machines 64 Turbo (E) (M5) [!] CRC=2A49018D D0034A02 SaveType=Controller Pack [68246CF0AB9DE7B6F84751FCC86A959A] GoodName=Micro Machines 64 Turbo (E) (M5) [b1] CRC=2A49018D D0034A02 RefMD5=9A8465E302263D635557A14AA197FE3C [7D61BB9D25BAF9A608139592DC4E28DC] GoodName=Micro Machines 64 Turbo (E) (M5) [b1][f1] (NTSC) CRC=700F6DD9 E2EB805F RefMD5=9A8465E302263D635557A14AA197FE3C [E48559E990DE24458F8A3ACDF3AEE901] GoodName=Micro Machines 64 Turbo (E) (M5) [t1] CRC=ADCDEC69 D0179F38 RefMD5=9A8465E302263D635557A14AA197FE3C [74EB415E16C333B252847A8E09432FD9] GoodName=Micro Machines 64 Turbo (U) [!] CRC=F1850C35 ACE07912 SaveType=Controller Pack [BB9F2E48015D9DFB347B4BE4C2DFB334] GoodName=Micro Machines 64 Turbo (U) [a1][!] CRC=F1850C35 ACE07912 SaveType=Controller Pack [656B1442015CF95D4D1E01713309F71D] GoodName=Micro Machines 64 Turbo (U) [b1] CRC=F1850C35 ACE07912 RefMD5=74EB415E16C333B252847A8E09432FD9 [C44D99D0437142211DACA4826F8ECB88] GoodName=Micro Machines 64 Turbo (U) [t1] CRC=A986ECC1 50AC924B RefMD5=74EB415E16C333B252847A8E09432FD9 [2B86775EA4D848202E4F4A39C33571CA] GoodName=Midway's Greatest Arcade Hits Volume 1 (U) [!] CRC=E4B35E4C 1AC45CC9 SaveType=Controller Pack Players=1 [47EA6F037B093381CA88A41FBB6C4199] GoodName=Midway's Greatest Arcade Hits Volume 1 (U) [b1] CRC=E4B35E4C 1AC45CC9 RefMD5=2B86775EA4D848202E4F4A39C33571CA [1FE59964EC1A5899F3C7D97590F676EB] GoodName=Midway's Greatest Arcade Hits Volume 1 (U) [b2] CRC=3F462D42 93AE9238 RefMD5=2B86775EA4D848202E4F4A39C33571CA [B07FF4F972B269F2BDC69713B4B701A7] GoodName=Midway's Greatest Arcade Hits Volume 1 (U) [o1] CRC=E4B35E4C 1AC45CC9 RefMD5=2B86775EA4D848202E4F4A39C33571CA [24467B76A192DFB67069C5A87B8606D0] GoodName=Midway's Greatest Arcade Hits Volume 1 (U) [o1][t1] CRC=3F462D42 93AE9238 RefMD5=2B86775EA4D848202E4F4A39C33571CA [D30A4723E266D57D86BDC52F932D0DF1] GoodName=Midway's Greatest Arcade Hits Volume 1 (U) [t1] CRC=3F462D42 93AE9238 RefMD5=2B86775EA4D848202E4F4A39C33571CA [EB357505EFC9D17A08ADBA5590896C4D] GoodName=Midway's Greatest Arcade Hits Volume 1 (U) [t2] CRC=3F462D42 93AE9238 RefMD5=2B86775EA4D848202E4F4A39C33571CA [9D401FA1A1DDDF5C8995278E09E2210D] GoodName=Midway's Greatest Arcade Hits Volume 1 (U) [t2][b1] CRC=3F462D42 93AE9238 RefMD5=2B86775EA4D848202E4F4A39C33571CA [EB1908E51C8D10AF8B9CAF77797BFE00] GoodName=Mike Piazza's Strike Zone (U) [!] CRC=09D53E16 3AB268B9 Players=2 SaveType=Controller Pack [F5978A54BB22E3BC4D46C0C3E9597B12] GoodName=Mike Piazza's Strike Zone (U) [h1C] CRC=09D53E16 3AB268B9 RefMD5=EB1908E51C8D10AF8B9CAF77797BFE00 [1B41A885CBAA693714575383DB4C05BE] GoodName=Mike Piazza's Strike Zone (U) [h2C] CRC=09D53E16 3AB268B9 RefMD5=EB1908E51C8D10AF8B9CAF77797BFE00 [83C51E3CD82A0D86CACE6D852990814F] GoodName=Mike Piazza's Strike Zone (U) [h3C] CRC=09D53E16 3AB268B9 RefMD5=EB1908E51C8D10AF8B9CAF77797BFE00 [43B02AF2789990A14F77CE020E6F135C] GoodName=Milo's Astro Lanes (E) [!] CRC=9A490D9D 8F013ADC SaveType=Controller Pack Players=4 [988B490C2AEBF7DE3C274B7EAEEF0999] GoodName=Milo's Astro Lanes (E) [o1] CRC=9A490D9D 8F013ADC RefMD5=43B02AF2789990A14F77CE020E6F135C [F152C4A90B33D0D2BFAF782F56B202DF] GoodName=Milo's Astro Lanes (E) [o2] CRC=9A490D9D 8F013ADC RefMD5=43B02AF2789990A14F77CE020E6F135C [4F256146BAC4A3DDE5AD0D5F9C909251] GoodName=Milo's Astro Lanes (U) [!] CRC=2E955ECD F3000884 Players=4 SaveType=Controller Pack [AC004667AB4578BAA9A1C0A7771E8B17] GoodName=Milo's Astro Lanes (U) [b1] CRC=2E955ECD F3000884 RefMD5=4F256146BAC4A3DDE5AD0D5F9C909251 [BE83566E7C7B9249FAC73DD2F1121424] GoodName=Milo's Astro Lanes (U) [h1C] CRC=2E955ECD F3000884 RefMD5=4F256146BAC4A3DDE5AD0D5F9C909251 [0FE31A113EF389F8F95460D340C7D922] GoodName=Milo's Astro Lanes (U) [h2C] CRC=2E955ECD F3000884 RefMD5=4F256146BAC4A3DDE5AD0D5F9C909251 [3D5F017D75679CEFCE2127CACC46C9F2] GoodName=Milo's Astro Lanes (U) [o1] CRC=2E955ECD F3000884 RefMD5=4F256146BAC4A3DDE5AD0D5F9C909251 [FD85E6B20A9099F670C3CFBD13AEE719] GoodName=Milo's Astro Lanes (U) [o1][b1] CRC=2E955ECD F3000884 RefMD5=4F256146BAC4A3DDE5AD0D5F9C909251 [C0513AE9494462433CDC83870320DA4E] GoodName=Mind Present Demo 0 by Widget and Immortal (POM '98) (PD) [b1] CRC=C811CBB1 8FB7617C [589DD744C7B07EC4DA91568CFBAC09EF] GoodName=Mind Present Demo 0 by Widget and Immortal (POM '98) (PD) CRC=C811CBB1 8FB7617C [4D1243D71F5536A416F3664A02FDF8E2] GoodName=Mind Present Demo Readme by Widget and Immortal (POM '98) (PD) CRC=139A06BC 416B0055 [EB3B078A74D4DC827E1E79791004DFBB] GoodName=Mischief Makers (E) [!] CRC=418BDA98 248A0F58 Players=1 SaveType=Eeprom 4KB [5690D74157C6623E2928A6F0353EF4AF] GoodName=Mischief Makers (E) [b1] CRC=418BDA98 248A0F58 RefMD5=EB3B078A74D4DC827E1E79791004DFBB [495A9BFFD6620BE43225DB7133373FC5] GoodName=Mischief Makers (U) [!] CRC=0B93051B 603D81F9 Players=1 SaveType=Eeprom 4KB [CCF012DF82022D4797CE4CC5405E084F] GoodName=Mischief Makers (U) [b1] CRC=0B93051B 603D81F9 RefMD5=495A9BFFD6620BE43225DB7133373FC5 [B3A172FE81F7BB47519D8E19E5F08154] GoodName=Mischief Makers (U) [o1] CRC=0B93051B 603D81F9 RefMD5=495A9BFFD6620BE43225DB7133373FC5 [599B5D40B51F53C2C9A909E0139702FC] GoodName=Mission Impossible (E) [!] CRC=2256ECDA 71AB1B9C Players=1 SaveType=Eeprom 4KB [5CDC052C88A5CADCC3C73B165163E8C7] GoodName=Mission Impossible (E) [b1] CRC=2256ECDA 71AB1B9C RefMD5=599B5D40B51F53C2C9A909E0139702FC [FD0C0E8C523437F9B6B630E369FDFC69] GoodName=Mission Impossible (F) [!] CRC=20095B34 343D9E87 Players=1 SaveType=Eeprom 4KB [FF9CC9E03993DD15F1436AF3874F94CF] GoodName=Mission Impossible (F) [b1] CRC=20095B34 343D9E87 RefMD5=FD0C0E8C523437F9B6B630E369FDFC69 [D2442969E039254CF1B9B059DBB6311C] GoodName=Mission Impossible (F) [b2] CRC=20095B34 343D9E87 RefMD5=FD0C0E8C523437F9B6B630E369FDFC69 [4111482C92EE806484AAA2C210893A52] GoodName=Mission Impossible (G) [!] CRC=93EB3F7E 81675E44 Players=1 SaveType=Eeprom 4KB [66C7EB8148E0714B5A71F5717DFF8642] GoodName=Mission Impossible (I) [!] CRC=EBA949DC 39BAECBD Players=1 SaveType=Eeprom 4KB [CA60967822CCCEFE22299691B453D893] GoodName=Mission Impossible (I) [f1] (NTSC) CRC=C76B18F6 AAB1BDF3 RefMD5=66C7EB8148E0714B5A71F5717DFF8642 [D1BA3B1899576A4B67908ABB6544D75A] GoodName=Mission Impossible (S) [!] CRC=5F6A04E2 D4FA070D Players=1 SaveType=Eeprom 4KB [217B0E4723DBACDA40B70B26E610F5F9] GoodName=Mission Impossible (S) [f1] (NTSC) CRC=635CB5C6 E9192BFF RefMD5=D1BA3B1899576A4B67908ABB6544D75A [EEBDFBD7CB57202D70CFFFCAAF55E93E] GoodName=Mission Impossible (U) [!] CRC=26035CF8 802B9135 Players=1 SaveType=Eeprom 4KB [550F4C177942FC0DF00B646C42EB4A90] GoodName=Mission Impossible (U) [b1] CRC=26035CF8 802B9135 RefMD5=EEBDFBD7CB57202D70CFFFCAAF55E93E [0D97158C3408F8E3E6D38A17223AC881] GoodName=Mission Impossible (U) [b2] CRC=09D4D757 F2775DBD RefMD5=EEBDFBD7CB57202D70CFFFCAAF55E93E [FA31743C3FC0236D6CEC0BD514DFB053] GoodName=Mission Impossible (U) [f1] (PAL) CRC=09D4D757 F2775DBD RefMD5=EEBDFBD7CB57202D70CFFFCAAF55E93E [5320608C729C9F5B32581F81604D75E6] GoodName=Mission Impossible (U) [t1] CRC=B0105C85 6E5094B9 RefMD5=EEBDFBD7CB57202D70CFFFCAAF55E93E [4FF9589A3224AAA46E9877D6B25E68E3] GoodName=Monaco Grand Prix (U) [!] CRC=28768D6D B379976C Players=4 SaveType=Controller Pack [9BF4D7FBE8157C9D6866A90269DCA7CB] GoodName=Monaco Grand Prix (U) [f1] (PAL) CRC=DA233397 FF46DF64 RefMD5=4FF9589A3224AAA46E9877D6B25E68E3 [C93A17D130B96FBA27A0E959CAB2A450] GoodName=Monaco Grand Prix - Racing Simulation 2 (E) (M4) [!] CRC=28705FA5 B509690E Players=4 SaveType=Controller Pack [F81580C9C480DDF1B8F7E6A56D1B9CD5] GoodName=Money Creates Taste Demo by Count0 (POM '99) (PD) [f1] CRC=97E57686 F271C12F [A74DBAA3BF59DE13B6A191A6675C85D7] GoodName=Money Creates Taste Demo by Count0 (POM '99) (PD) CRC=282A4262 58B47E76 [D51506EDB0A941A00EB45850703B32CB] GoodName=Monopoly (U) [!] CRC=5AC383E1 D712E387 Players=4 SaveType=Eeprom 4KB CountPerOp=1 [26C3654D20B8718A75B5FE8DA5B3284A] GoodName=Monopoly (U) [f1] (PAL) CRC=B9D36858 559A8241 RefMD5=D51506EDB0A941A00EB45850703B32CB [E3B408997D7DB91F8219F168C6D57D26] GoodName=Monster Truck Madness 64 (E) (M5) [!] CRC=D3D806FC B43AA2A8 Players=4 SaveType=None CountPerOp=3 [12534DAB32DBFC6CA4F66D05729102E6] GoodName=Monster Truck Madness 64 (E) (M5) [f1] (NTSC) CRC=AE5E467C D7194A71 RefMD5=E3B408997D7DB91F8219F168C6D57D26 [514D61D3B3D5E6326869783EB2E84A00] GoodName=Monster Truck Madness 64 (U) [!] CRC=B19AD999 7E585118 Players=4 SaveType=None CountPerOp=3 [3C9F329D5E0C7FE57355B8DC68F79331] GoodName=Monster Truck Madness 64 (U) [t1] CRC=29A9E7F6 1B90CFCE RefMD5=514D61D3B3D5E6326869783EB2E84A00 [462B9C4F38758C2E558312AC60DF2B91] GoodName=Morita Shougi 64 (J) [!] CRC=E8E8DD70 415DD198 Players=4 [264B82F0FC2431D6EEFDE9C9F3ED7596] GoodName=Mortal Kombat 4 (E) [!] CRC=73036F3B CE0D69E9 Players=2 SaveType=Controller Pack Rumble=Yes [58EFAF3D7D0985BC426245EFA5418CC2] GoodName=Mortal Kombat 4 (E) [h1C] CRC=73036F3B CE0D69E9 RefMD5=264B82F0FC2431D6EEFDE9C9F3ED7596 [619B1F196B70260DCE89B21E66D10934] GoodName=Mortal Kombat 4 (E) [t1] (Hit Anywhere) CRC=72836ECB 75D15FAE RefMD5=264B82F0FC2431D6EEFDE9C9F3ED7596 [C70B91430866300CE38B49098019EF9D] GoodName=Mortal Kombat 4 (U) [!] CRC=417DD4F4 1B482FE2 Players=2 SaveType=Controller Pack Rumble=Yes [CCD5A3B82976D65B3B42E8E2B2B43B48] GoodName=Mortal Kombat 4 (U) [b1] CRC=F96E28F7 421A4285 RefMD5=C70B91430866300CE38B49098019EF9D [4C7092585CF64BBE7F26ECA720AE8941] GoodName=Mortal Kombat 4 (U) [b2] CRC=DB6E353B 205B0C53 RefMD5=C70B91430866300CE38B49098019EF9D [480855E2348D6B85721C620AE9FEF138] GoodName=Mortal Kombat 4 (U) [b3] CRC=417DD4F4 1B482FE2 RefMD5=C70B91430866300CE38B49098019EF9D [F972B634F638CC54AD6DCBFDC661CC02] GoodName=Mortal Kombat 4 (U) [h1C] CRC=417DD4F4 1B482FE2 RefMD5=C70B91430866300CE38B49098019EF9D [A5F7C9F5B711ECA7C2A2923EEA6CF762] GoodName=Mortal Kombat 4 (U) [t1] CRC=DB6E353B 205B0C53 RefMD5=C70B91430866300CE38B49098019EF9D [24E39D47A0D1AFA138B1F39AA2DAA648] GoodName=Mortal Kombat 4 (U) [t1][f1] (PAL) CRC=DB6E353B 205B0C53 RefMD5=C70B91430866300CE38B49098019EF9D [18E1CA4BE7D8E56AC940852EC5E3ED22] GoodName=Mortal Kombat 4 (U) [t2] (Hit Anywhere) CRC=417DD7F4 C95B6E9E RefMD5=C70B91430866300CE38B49098019EF9D [38A82A56AE61A4D354C6A26E64D25E1C] GoodName=Mortal Kombat Mythologies - Sub-Zero (E) [!] CRC=FF44EDC4 1AAE9213 Players=1 Rumble=Yes SaveType=Controller Pack [DAFEE0C1FC99882A2C6A340BF0E58A08] GoodName=Mortal Kombat Mythologies - Sub-Zero (E) [h1C] CRC=FF44EDC4 1AAE9213 RefMD5=38A82A56AE61A4D354C6A26E64D25E1C [528445FB76D0F060DF5CBE71AEEDA20F] GoodName=Mortal Kombat Mythologies - Sub-Zero (E) [t1] (Endless Ice) CRC=6DF2CB25 4D4821F8 RefMD5=38A82A56AE61A4D354C6A26E64D25E1C [DEEC4FAEC416F4E02D934C2E42C0CAAD] GoodName=Mortal Kombat Mythologies - Sub-Zero (U) [!] CRC=C34304AC 2D79C021 Players=1 SaveType=Controller Pack Rumble=Yes [8F2544F095EF7D9A5096E3D52472D699] GoodName=Mortal Kombat Mythologies - Sub-Zero (U) [b1] CRC=834304AE 5845CD3A RefMD5=DEEC4FAEC416F4E02D934C2E42C0CAAD [1793B45C4797D9418685946A002B5D15] GoodName=Mortal Kombat Mythologies - Sub-Zero (U) [b2] CRC=C34304AC 2D79C021 RefMD5=DEEC4FAEC416F4E02D934C2E42C0CAAD [5443BFB72D91D0DFD72FC1C6FA03A113] GoodName=Mortal Kombat Mythologies - Sub-Zero (U) [b3] CRC=C34304AC 2D79C021 RefMD5=DEEC4FAEC416F4E02D934C2E42C0CAAD [7CCC138882A64267AD58449F309FC1D1] GoodName=Mortal Kombat Mythologies - Sub-Zero (U) [f1] CRC=834304AE 5845CD3A RefMD5=DEEC4FAEC416F4E02D934C2E42C0CAAD [A6C51954EE5DF373E159E0E55DEAE239] GoodName=Mortal Kombat Mythologies - Sub-Zero (U) [f3] (PAL) CRC=834304AE 5845CD3A RefMD5=DEEC4FAEC416F4E02D934C2E42C0CAAD [FFF4E1455C03F71272063C309D9F9102] GoodName=Mortal Kombat Mythologies - Sub-Zero (U) [h1C] CRC=C34304AC 2D79C021 RefMD5=DEEC4FAEC416F4E02D934C2E42C0CAAD [FCD0BFF90306B13EB8E5007E5B4C2CB7] GoodName=Mortal Kombat Mythologies - Sub-Zero (U) [h2C] CRC=834304AE 5845CD3A RefMD5=DEEC4FAEC416F4E02D934C2E42C0CAAD [5583527ED4AA49CF713FAE400E77F9A2] GoodName=Mortal Kombat Mythologies - Sub-Zero (U) [o1] CRC=C34304AC 2D79C021 RefMD5=DEEC4FAEC416F4E02D934C2E42C0CAAD [AB06E6D777AE710F9B5A4DC4E7A295C8] GoodName=Mortal Kombat Mythologies - Sub-Zero (U) [t1] CRC=5972E751 228381B3 RefMD5=DEEC4FAEC416F4E02D934C2E42C0CAAD [85B99F3D09C4070EEA7669A09D20243F] GoodName=Mortal Kombat Mythologies - Sub-Zero (U) [t2] (Endless Ice) CRC=ADDD6241 AA79B2F2 RefMD5=DEEC4FAEC416F4E02D934C2E42C0CAAD [B278DDD3FB63F70B8B6EFEF445D81595] GoodName=Mortal Kombat SRAM Loader (PD) CRC=947A4B47 90BFECA6 [7A558BBAD8CE8828414A9CF3B044A87D] GoodName=Mortal Kombat Trilogy (E) [!] CRC=8C3D1192 BEF172E1 SaveType=None Players=2 Rumble=No [1C6FE6A40AAC4BD515373B6ED8D25DBF] GoodName=Mortal Kombat Trilogy (E) [b1] CRC=8C3D1192 BEF172E1 RefMD5=7A558BBAD8CE8828414A9CF3B044A87D [0F9B89C903BEFEDCFD107E5B5ADE687F] GoodName=Mortal Kombat Trilogy (E) [h1C] CRC=8C3D1192 BEF172E1 RefMD5=7A558BBAD8CE8828414A9CF3B044A87D [B05DEC10CDEFACF4153E345940410477] GoodName=Mortal Kombat Trilogy (E) [o1] CRC=8C3D1192 BEF172E1 RefMD5=7A558BBAD8CE8828414A9CF3B044A87D [AB72CB8971FA37176D3219B5F49AF442] GoodName=Mortal Kombat Trilogy (E) [t1] (Hit Anywhere) CRC=8C3D1192 B5096A18 RefMD5=7A558BBAD8CE8828414A9CF3B044A87D [CFC196103E355B12A50605AB268992FA] GoodName=Mortal Kombat Trilogy (E) [t2] (All Attacks Hurt P1) CRC=833D11B6 1848E72B RefMD5=7A558BBAD8CE8828414A9CF3B044A87D [9CC60D046372D2C9A529ED225E3CDB08] GoodName=Mortal Kombat Trilogy (E) [t3] (All Attacks Hurt P2) CRC=833D1192 D3C58762 RefMD5=7A558BBAD8CE8828414A9CF3B044A87D [EBF2AC190EBB2FE6D75AD0ACAA2A82CD] GoodName=Mortal Kombat Trilogy (E) [t4] (Hyper Mode) CRC=93ED1192 2B2C6244 RefMD5=7A558BBAD8CE8828414A9CF3B044A87D [ED7773988BCC03D06E2330A8E77BEC6F] GoodName=Mortal Kombat Trilogy (E) [t5] (2x Aggressor) CRC=8C352E50 6B93F13B RefMD5=7A558BBAD8CE8828414A9CF3B044A87D [DF00C698E2B18A6CA94C09CCD82CACEB] GoodName=Mortal Kombat Trilogy (E) [t6] (P1 Invincible) CRC=8C3511AE 57115A86 RefMD5=7A558BBAD8CE8828414A9CF3B044A87D [9B7F29AAB911D6753F2011C48DA752BF] GoodName=Mortal Kombat Trilogy (U) (V1.0) [!] CRC=D9F75C12 A8859B59 Players=2 SaveType=None Rumble=No [7CD386C8D2E69DBBF55F02A564BD6A9A] GoodName=Mortal Kombat Trilogy (U) (V1.0) [b1] CRC=D9F75C12 A8859B59 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [77CE01C32E172C7DD812C4F1179FBA2E] GoodName=Mortal Kombat Trilogy (U) (V1.0) [b2] CRC=D9F75C12 A8859B59 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [9DA1E143FF580834FE485D08C21B6D01] GoodName=Mortal Kombat Trilogy (U) (V1.0) [b3] CRC=D9F75C12 A8859B59 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [ED4414B512CF22DA64B080D34B5E2F4F] GoodName=Mortal Kombat Trilogy (U) (V1.0) [b4] CRC=D9F75C12 A8859B59 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [57464801A058B97E056766DDFCF93A69] GoodName=Mortal Kombat Trilogy (U) (V1.0) [b5] CRC=D9F75C12 A8859B59 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [8CE0A41CB29C14300B482E0E9897EBBF] GoodName=Mortal Kombat Trilogy (U) (V1.0) [h1C] CRC=D9F75C12 A8859B59 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [4DBAD6B0E2F30A63F974A85513B668E0] GoodName=Mortal Kombat Trilogy (U) (V1.0) [h2C] CRC=D9F75C12 A8859B59 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [976825DAB07E6F5D69BFD5B46337DE85] GoodName=Mortal Kombat Trilogy (U) (V1.0) [o1] CRC=D9F75C12 A8859B59 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [EE052C69FFA67DB3544872AB0E745DDF] GoodName=Mortal Kombat Trilogy (U) (V1.0) [o1][h1C] CRC=D9F75C12 A8859B59 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [10774BFBC9D815194AD904F898CBE96F] GoodName=Mortal Kombat Trilogy (U) (V1.0) [o1][h2C] CRC=D9F75C12 A8859B59 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [04A3F6D2A30FEDE6CADC5C2FCBCFBD12] GoodName=Mortal Kombat Trilogy (U) (V1.0) [t1] (Hit Anywhere) CRC=F9F75B92 AFEC042B RefMD5=9B7F29AAB911D6753F2011C48DA752BF [CCD0BA9C220D1EE91B39747A6E5065EE] GoodName=Mortal Kombat Trilogy (U) (V1.0) [t2] (All Attacks Hurt P1) CRC=F2F75C36 36637257 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [548C444FB604CA179EAD4115FFB070FC] GoodName=Mortal Kombat Trilogy (U) (V1.0) [t3] (All Attacks Hurt P2) CRC=D2F75C12 E89EB415 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [4DED9381CD0D396AE6C9634D575DD93C] GoodName=Mortal Kombat Trilogy (U) (V1.0) [t4] (Hyper Mode) CRC=A2015C11 C317ECAB RefMD5=9B7F29AAB911D6753F2011C48DA752BF [F5509B1EA83A49D01E5E4EF475B87278] GoodName=Mortal Kombat Trilogy (U) (V1.0) [t5] (2x Aggressor) CRC=D9FECC50 D3AA8423 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [D68FC4D8568B7D02EFD47F32B9C091D7] GoodName=Mortal Kombat Trilogy (U) (V1.0) [t6] (P1 Invincible) CRC=A1815C2E C6806731 RefMD5=9B7F29AAB911D6753F2011C48DA752BF [3DCB15043063BD656A0223C519218CFB] GoodName=Mortal Kombat Trilogy (U) (V1.2) [!] CRC=83F33AA9 A901D40D Players=2 SaveType=None Rumble=No [27F761B7DD73E12BB311772780D6B9F4] GoodName=Mortal Kombat Trilogy (U) (V1.2) [t1] (Hit Anywhere) CRC=83F33AA9 2649847A RefMD5=3DCB15043063BD656A0223C519218CFB [8A7B5A6AB0E815DBDFFD1FC99939CE9F] GoodName=Mortal Kombat Trilogy (U) (V1.2) [t2] (All Attacks Hurt P1) CRC=BCF33AAD BF3C37EC RefMD5=3DCB15043063BD656A0223C519218CFB [37FEB7178712980DD0953D195187C35D] GoodName=Mortal Kombat Trilogy (U) (V1.2) [t3] (All Attacks Hurt P2) CRC=9CF33AA9 3F05381F RefMD5=3DCB15043063BD656A0223C519218CFB [D3B28E1E154C5B58A40E3D71D8599CE2] GoodName=Mortal Kombat Trilogy (U) (V1.2) [t4] (Hyper Mode) CRC=9C013AA8 EB3267A7 RefMD5=3DCB15043063BD656A0223C519218CFB [0D708DDE7EC6B67E705F1D865D70AFDA] GoodName=Mortal Kombat Trilogy (U) (V1.2) [t5] (2x Aggressor) CRC=83FB2B69 7A5D2980 RefMD5=3DCB15043063BD656A0223C519218CFB [68EBC8C849459FE30E7162D48EBAC0BD] GoodName=Mortal Kombat Trilogy (U) (V1.2) [t6] (P1 Invincible) CRC=83F33AA9 A901D40D RefMD5=3DCB15043063BD656A0223C519218CFB [08BEA3310E778A6584EB64CD3F15F86E] GoodName=Ms. Pac-Man - Maze Madness (U) [!] CRC=1938525C 586E9656 SaveType=Controller Pack Players=4 Rumble=No [F905CA22CC030BBED516F3D1B6C2153A] GoodName=My Angel Demo (PD) CRC=9865799F 006F908C [E6B5C17B7BBBB7C432B3506C085D16C4] GoodName=Mystical Ninja 2 Starring Goemon (E) (M3) [!] CRC=7F9345D3 841ECADE Players=1 SaveType=Controller Pack Rumble=No CountPerOp=1 [75AD771425CBE2B1E8C7B4D94E67B1CA] GoodName=Mystical Ninja 2 Starring Goemon (E) (M3) [hI] CRC=C27F7CEC 85E0806F RefMD5=E6B5C17B7BBBB7C432B3506C085D16C4 [004EA34EE12CBABDC053419714E66DD4] GoodName=Mystical Ninja 2 Starring Goemon (E) (M3) [t1] CRC=C27F7CEC 85E0806F RefMD5=E6B5C17B7BBBB7C432B3506C085D16C4 [698930C7CCD844673D77FFECCB3DD66E] GoodName=Mystical Ninja Starring Goemon (E) [!] CRC=F5360FBE 2BF1691D Players=1 SaveType=Controller Pack Rumble=No [DBD2BC43FCDADACD234AEFC8130A5413] GoodName=Mystical Ninja Starring Goemon (E) [b1] CRC=F5360FBE 2BF1691D RefMD5=698930C7CCD844673D77FFECCB3DD66E [8F1C1FEAAF0D053E230361E3F81B0269] GoodName=Mystical Ninja Starring Goemon (E) [h1C] CRC=F5360FBE 2BF1691D RefMD5=698930C7CCD844673D77FFECCB3DD66E [1FFBDAB727C9D634D4F4DDBD9F358445] GoodName=Mystical Ninja Starring Goemon (E) [t1] CRC=835B97A2 FF6C0060 RefMD5=698930C7CCD844673D77FFECCB3DD66E [643CCE1AB06F97E9590241D27E5C2363] GoodName=Mystical Ninja Starring Goemon (U) [!] CRC=FCBCCB21 72903C6B Players=1 SaveType=Controller Pack Rumble=No [42E282A3F208C4BDE50A4A4301181B16] GoodName=Mystical Ninja Starring Goemon (U) [h1C] CRC=FCBCCB21 72903C6B RefMD5=643CCE1AB06F97E9590241D27E5C2363 [07A7D3DB5B64A6CCF9D44B321472CC21] GoodName=Mystical Ninja Starring Goemon (U) [t1] CRC=7AADA8DD 94DAB468 RefMD5=643CCE1AB06F97E9590241D27E5C2363 [55F99A3F3402491E9517980BE636E3FE] GoodName=Mystical Ninja Starring Goemon (U) [t1][h2C] CRC=7AADA8DD 94DAB468 RefMD5=643CCE1AB06F97E9590241D27E5C2363 [4D1821886352EAA2F663CFF63ED17DD8] GoodName=Mystical Ninja Starring Goemon (U) [t2] CRC=7AADA8DD 94DAB468 RefMD5=643CCE1AB06F97E9590241D27E5C2363 [17B839B8E72A6287A5BB3CEFCBC035E9] GoodName=N64 Scene Gallery by CALi (PD) CRC=6D2C07F1 C884F0D0 [882B30625B722B5C29D0D94E70D9302E] GoodName=N64 Seminar Demo - CPU by ZoRAXE (PD) CRC=FD61BB45 FBB51EB2 [8B7816E975DB27B4BF591BFC73C43944] GoodName=N64 Seminar Demo - RSP by ZoRAXE (PD) CRC=6D03673A 1D63C191 [023175B6C809704F00A317ABCD25A8F9] GoodName=N64 Stars Demo (PD) [b1] CRC=71255651 C6AE0EA6 [67836FE63901319874E0754BC918AF7D] GoodName=N64 Stars Demo (PD) CRC=71255651 C6AE0EA6 [F4B5863F550BC83C7924E423B01E1C5A] GoodName=N64probe (Button Test) by MooglyGuy (PD) CRC=44410533 0C61FA96 [45FEB0FBBEC6CB48FF21DEAE176E9B6B] GoodName=NASCAR 2000 (U) [!] CRC=DF331A18 5FD4E044 Players=2 Rumble=Yes SaveType=Controller Pack [DB3A918FA61E1FB3110CFE6E9DA33E97] GoodName=NASCAR 2000 (U) [f1] (PAL) CRC=651F2792 E40CC56B RefMD5=45FEB0FBBEC6CB48FF21DEAE176E9B6B [15A87A6D01DBA1A7C4375FFBC1214BB8] GoodName=NASCAR 99 (E) (M3) [!] CRC=AE4992C9 9253B253 Players=2 Rumble=Yes SaveType=Controller Pack [A31AD7E7E6177BED7345635FDA563FCA] GoodName=NASCAR 99 (E) (M3) [h1C] CRC=AE4992C9 9253B253 RefMD5=15A87A6D01DBA1A7C4375FFBC1214BB8 [DC5F1A814C8423B4B43F71C229D65A84] GoodName=NASCAR 99 (U) [!] CRC=23749578 80DC58FD Players=2 SaveType=Controller Pack Rumble=Yes [AC88A7D81FF0B712EA3A302419F3A927] GoodName=NASCAR 99 (U) [b1] CRC=23749578 80DC58FD RefMD5=DC5F1A814C8423B4B43F71C229D65A84 [DA77C8AB76E6209550D56FED1817AFBD] GoodName=NASCAR 99 (U) [b2] CRC=FCB2955B B302626D RefMD5=DC5F1A814C8423B4B43F71C229D65A84 [A267D8C94031678DD395FE4667C4A76A] GoodName=NASCAR 99 (U) [b3] CRC=23E39896 73AB48DC RefMD5=DC5F1A814C8423B4B43F71C229D65A84 [71BE7A48778737FDDD3CDE7849502C5B] GoodName=NASCAR 99 (U) [f1] (PAL) CRC=FCB2955B B302626D RefMD5=DC5F1A814C8423B4B43F71C229D65A84 [DB644859C4DCE5418010A2427E3904C0] GoodName=NASCAR 99 (U) [o1] CRC=23749578 80DC58FD RefMD5=DC5F1A814C8423B4B43F71C229D65A84 [73BB54FFD3C0FC71F941D9A8CC57E2A1] GoodName=NBA Courtside 2 - Featuring Kobe Bryant (U) [!] CRC=916852D8 73DBEAEF Players=4 Rumble=Yes SaveType=Flash RAM [EE4DCAED6759CE013BC7B5E8E815B343] GoodName=NBA Courtside 2 - Featuring Kobe Bryant (U) [f1] (PAL) CRC=3F16568F 37D93603 RefMD5=73BB54FFD3C0FC71F941D9A8CC57E2A1 [F734667EF21DA97092F54D2547E11E51] GoodName=NBA Courtside 2 - Featuring Kobe Bryant (U) [f2] CRC=2816D957 A59FF70A RefMD5=73BB54FFD3C0FC71F941D9A8CC57E2A1 [032ADEEF1C2D0B4387FAC099334F72E3] GoodName=NBA Courtside 2 - Featuring Kobe Bryant (U) [hI] CRC=24F7EB57 74B3F9F4 RefMD5=73BB54FFD3C0FC71F941D9A8CC57E2A1 [94E3F2ACE3EB74150F036B217FF50370] GoodName=NBA Courtside 2 - Featuring Kobe Bryant (U) [hI][f1] (PAL) CRC=26211297 97DB4DFC RefMD5=73BB54FFD3C0FC71F941D9A8CC57E2A1 [62365463743857CFC823978E0E590D84] GoodName=NBA Hangtime (E) [!] CRC=C788DCAE BD03000A Players=4 Rumble=No SaveType=Controller Pack [0057A561D7034392D4267A4134DA41B0] GoodName=NBA Hangtime (E) [h1C] CRC=C788DCAE BD03000A RefMD5=62365463743857CFC823978E0E590D84 [DC15FCBEAE0F1FEF7BEE141D77BB25A0] GoodName=NBA Hangtime (U) [!] CRC=4E69B487 FE18E290 Players=4 SaveType=Controller Pack Rumble=No [9C595E5A5F027385A340ADDF609852DD] GoodName=NBA Hangtime (U) [b1] CRC=4E69B487 FE18E290 RefMD5=DC15FCBEAE0F1FEF7BEE141D77BB25A0 [4955DEA9356D1506D6DE8BD8DA10E938] GoodName=NBA Hangtime (U) [b2] CRC=4E69B487 FE18E290 RefMD5=DC15FCBEAE0F1FEF7BEE141D77BB25A0 [C8D6A414505595C13C7DA4D07A172343] GoodName=NBA Hangtime (U) [b3] CRC=4E69B487 FE18E290 RefMD5=DC15FCBEAE0F1FEF7BEE141D77BB25A0 [C2D094778DA53C7A84466130EC5C65B0] GoodName=NBA Hangtime (U) [f1] (PAL) CRC=4E69B487 FE18E290 RefMD5=DC15FCBEAE0F1FEF7BEE141D77BB25A0 [80F918D90DF42C9841AE998A89223C1E] GoodName=NBA Hangtime (U) [o1] CRC=4E69B487 FE18E290 RefMD5=DC15FCBEAE0F1FEF7BEE141D77BB25A0 [62E182D019DCE0C0EEAA3BE2023A327A] GoodName=NBA Hangtime (U) [o1][f1] CRC=4E69B487 FE18E290 RefMD5=DC15FCBEAE0F1FEF7BEE141D77BB25A0 [4C7A2F4881EACA75DC2FC36673AE2A20] GoodName=NBA In the Zone '98 (J) [!] CRC=36ACBA9B F28D4D94 Players=4 SaveType=Controller Pack Rumble=No [4151ED80568EFCCA34F8831D957EB7A6] GoodName=NBA In the Zone '98 (J) [o1] CRC=36ACBA9B F28D4D94 RefMD5=4C7A2F4881EACA75DC2FC36673AE2A20 [23215642F5FAAAD0761166EA018963F0] GoodName=NBA In the Zone '98 (J) [o2] CRC=36ACBA9B F28D4D94 RefMD5=4C7A2F4881EACA75DC2FC36673AE2A20 [BBB48BE198089A26050C84FE5B7B8BD5] GoodName=NBA In the Zone '98 (U) [!] CRC=6A121930 665CC274 Players=4 Rumble=No SaveType=Controller Pack [EE43F010F2E87BC68535D333FE64C516] GoodName=NBA In the Zone '98 (U) [b1] CRC=6A121930 665CC274 RefMD5=BBB48BE198089A26050C84FE5B7B8BD5 [49B49E6DD528E896DE9BCE3DCCF3442E] GoodName=NBA In the Zone '98 (U) [b2] CRC=6A121930 665CC274 RefMD5=BBB48BE198089A26050C84FE5B7B8BD5 [42F3A177F54C86F2C8EE6AFDB892A5A9] GoodName=NBA In the Zone '98 (U) [b3] CRC=36ACBA9B F28D4D94 RefMD5=BBB48BE198089A26050C84FE5B7B8BD5 [BF33C371BF396A5F6E72627A34AEDAF5] GoodName=NBA In the Zone '98 (U) [h1C] CRC=6A121930 665CC274 RefMD5=BBB48BE198089A26050C84FE5B7B8BD5 [62DFA8A5906E973A2C923A165EBE00A1] GoodName=NBA In the Zone '98 (U) [h2C] CRC=6A121930 665CC274 RefMD5=BBB48BE198089A26050C84FE5B7B8BD5 [92D2BD868B17B3CA8A19116ADDB963B0] GoodName=NBA In the Zone '98 (U) [o1] CRC=6A121930 665CC274 RefMD5=BBB48BE198089A26050C84FE5B7B8BD5 [6CBF4014C053E16852A3DB80AEB4C853] GoodName=NBA In the Zone '99 (U) [!] CRC=A292524F 3D6C2A49 Players=4 SaveType=Controller Pack Rumble=Yes CountPerOp=1 [F8F87AEB2C537C9CB2E9913050BFC928] GoodName=NBA In the Zone 2 (J) [!] CRC=AAE11F01 2625A045 Players=4 SaveType=Controller Pack Rumble=Yes [4244CC48674C26BD848718C05688F821] GoodName=NBA In the Zone 2000 (E) [!] CRC=B3054F9F 96B69EB5 Players=4 SaveType=Controller Pack Rumble=Yes [AF6521E33FDE918B9A2298FA0BD3AA90] GoodName=NBA In the Zone 2000 (E) [h1C] CRC=B3054F9F 96B69EB5 RefMD5=4244CC48674C26BD848718C05688F821 [1942833AC1A71BE8BAE74BBDFD6DE278] GoodName=NBA In the Zone 2000 (U) [!] CRC=8DF95B18 ECDA497B Players=4 SaveType=Controller Pack Rumble=Yes [F4401BCC9DD25254503E32B482EB3FAA] GoodName=NBA In the Zone 2000 (U) [f1] (PAL) CRC=4F8AA5EC 1E6E72DE RefMD5=1942833AC1A71BE8BAE74BBDFD6DE278 [604FEB17258044A3E6C3AA9D2C5B62F9] GoodName=NBA Jam 2000 (E) [!] CRC=B6D0CAA0 E3F493C8 Players=4 Rumble=Yes SaveType=Controller Pack [AFECC9A2DF7B1A66A6B7AB3AA8B4BD2E] GoodName=NBA Jam 2000 (U) [!] CRC=EBEEA8DB F2ECB23C Players=4 Rumble=Yes SaveType=Controller Pack [E25F3A1136C9C81702E0827040C5A115] GoodName=NBA Jam 2000 (U) [f1] (PAL) CRC=F3996B67 3A3030FA RefMD5=AFECC9A2DF7B1A66A6B7AB3AA8B4BD2E [BE72BE370BC0A76D403FF2B9ED2A9173] GoodName=NBA Jam 99 (E) [!] CRC=E600831E 59F422A8 Players=4 Rumble=Yes SaveType=Controller Pack [0A9D53EF71A0C6F2AE3A0435E3D58747] GoodName=NBA Jam 99 (E) [h1C] CRC=E600831E 59F422A8 RefMD5=BE72BE370BC0A76D403FF2B9ED2A9173 [ADBE5CA10F659AF2BE712038E8522704] GoodName=NBA Jam 99 (U) [!] CRC=810729F6 E03FCFC1 Players=4 Rumble=Yes SaveType=Controller Pack [7344483130995CA211B5B9FF9891A9DE] GoodName=NBA Jam 99 (U) [b1] CRC=810729F6 E03FCFC1 RefMD5=ADBE5CA10F659AF2BE712038E8522704 [5382AD48844A3473D4CBA87C85F2BAC2] GoodName=NBA Jam 99 (U) [f1] (PAL) CRC=61079876 32DB765E RefMD5=ADBE5CA10F659AF2BE712038E8522704 [7FEC099D1A989D5222D3F9E1A7770404] GoodName=NBA Live 2000 (E) (M4) [!] CRC=EB499C8F CD4567B6 Players=4 Rumble=Yes SaveType=Controller Pack [FC47F85CC501C8C5BD9D0CA4DB48258F] GoodName=NBA Live 2000 (U) (M4) [!] CRC=5F25B0EE 6227C1DB Players=4 SaveType=Controller Pack Rumble=Yes [226C19C8759314AC740420DDC3A34EB4] GoodName=NBA Live 99 (E) (M5) [!] CRC=CF84F45F 00E4F6EB Players=4 SaveType=Controller Pack Rumble=Yes [DBE79AE6531B491B8F8EE8B2B814D665] GoodName=NBA Live 99 (U) (M5) [!] CRC=57F81C9B 1133FA35 Players=4 SaveType=Controller Pack Rumble=Yes [7044E135E702B32DFCF13E688461967F] GoodName=NBA Live 99 (U) (M5) [b1] CRC=57F81C9B 1133FA35 RefMD5=DBE79AE6531B491B8F8EE8B2B814D665 [4DD6A2CF6091A92C43CE1B4A1B6F1556] GoodName=NBA Live 99 (U) (M5) [b2] CRC=57F81C9B 1133FA35 RefMD5=DBE79AE6531B491B8F8EE8B2B814D665 [5F46FC3780A50D5BB8FCB0F1C95686B0] GoodName=NBA Live 99 (U) (M5) [b3] CRC=57F81C9B 1133FA35 RefMD5=DBE79AE6531B491B8F8EE8B2B814D665 [A4111A6CDDBDE0A45489106F0DF0CA2B] GoodName=NBA Pro 98 (E) [!] CRC=ACDE962F B2CBF87F Players=4 SaveType=Controller Pack Rumble=No [C5EBBDD41EAEA8BD02CF520640CCCCDF] GoodName=NBA Pro 99 (E) [!] CRC=8D1780B6 57B3B976 Players=4 SaveType=Controller Pack Rumble=No [9A203506DB213F97FE28210AAF56F820] GoodName=NBA Pro 99 (E) [f1] (NTSC) CRC=356130AD 29367E56 RefMD5=C5EBBDD41EAEA8BD02CF520640CCCCDF [881E98B47F32093C330A8B0DAD6BB65D] GoodName=NBA Showtime - NBA on NBC (U) [!] CRC=3FFE80F4 A7C15F7E Players=4 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [76DB89759121710C416ECFB1736B5E39] GoodName=NBA Showtime - NBA on NBC (U) [f1] (Country Check) CRC=E78F66E6 754ABDF5 RefMD5=881E98B47F32093C330A8B0DAD6BB65D [760D5F0A578D65E68F5B4E8F64271C88] GoodName=NBA Showtime - NBA on NBC (U) [f1] (PAL) CRC=9CEED5BA 62A146D5 RefMD5=881E98B47F32093C330A8B0DAD6BB65D [A05D4FF483AF3F1C55BEDC455E7EDBBE] GoodName=NBC First Intro by CALi (PD) CRC=15DB95D4 77BC52D8 [325B9DCD5D23F269017C16E2BA62DEA3] GoodName=NBC-LFC Kings of Porn Vol 01 (PD) [a1] CRC=DD95F49D 2A9B8893 [88095C9BD22232383AF82235F03B2658] GoodName=NBC-LFC Kings of Porn Vol 01 (PD) CRC=AB9F8D97 95EAA766 RefMD5=325B9DCD5D23F269017C16E2BA62DEA3 [CE915D72FEA86AA99D9C015661A3D768] GoodName=NBCG Special Edition (PD) CRC=011F98B2 1E1C8263 [8CE55DA21D0FA7B41646A1F3F45F57A1] GoodName=NBCG's Kings of Porn Demo (PD) CRC=61A5FCEE B59FD8D3 [C0ABE398CBC45EC90D03C5ADC26C1065] GoodName=NBCG's Tag Gallery 01 by CALi (PD) CRC=15AA9AF2 FF33D333 [F27300E1883EA849A69567D3AEDC5F56] GoodName=NBCrew 2 Demo (PD) CRC=84067BAC 87FBA623 [4CF0249345388BB098F79DDCD7A00798] GoodName=NEO Myth N64 Menu Demo V0.1 (PD) CRC=6539E529 1FE8CE01 [7F6C5E71711DEC81E77CCF71060F67CA] GoodName=NFL Blitz (U) [!] CRC=D094B170 D7C4B5CC Players=2 Rumble=Yes SaveType=Controller Pack [F0A1CC3D1D99A60F35D37DDCCF43CABB] GoodName=NFL Blitz (U) [f1] (PAL) CRC=3D6044AB 46768D77 RefMD5=7F6C5E71711DEC81E77CCF71060F67CA [7E856FA8F743900FEBA5A4E28C234AF7] GoodName=NFL Blitz - Special Edition (U) [!] CRC=30EAD54F 31620BF6 Players=4 Rumble=Yes SaveType=Controller Pack [BA49514441023722F02D41C62612F6C3] GoodName=NFL Blitz 2000 (U) [!] CRC=15A00969 34E5A285 Players=4 Rumble=Yes SaveType=Controller Pack [DDBE4248EA34E11C091A975776042670] GoodName=NFL Blitz 2000 (U) [f1] (PAL) CRC=FEB72E1D 5BD2C925 RefMD5=BA49514441023722F02D41C62612F6C3 [E4EDD73CB036C6B143CEE9AEEED60341] GoodName=NFL Blitz 2001 (U) [!] CRC=36FA35EB E85E2E36 Players=4 SaveType=Controller Pack Rumble=Yes [D13A38B9639CF1944FE7024E4C58739D] GoodName=NFL Blitz 2001 (U) [f1] (PAL-NTSC) CRC=EB7709E2 27A91031 RefMD5=E4EDD73CB036C6B143CEE9AEEED60341 [75C0121D84915BF5C1FBD389CF9F9C17] GoodName=NFL Quarterback Club 2000 (E) [!] CRC=88BD5A9E E81FDFBF Players=4 SaveType=Controller Pack Rumble=Yes [EC18E3131040842E32EBAB66C7496EBD] GoodName=NFL Quarterback Club 2000 (U) [!] CRC=E3AB4ED0 83040DD2 Players=4 SaveType=Controller Pack Rumble=Yes [55224F1148F873A689604F2DC6432682] GoodName=NFL Quarterback Club 2000 (U) [b1] CRC=E3AB4ED0 83040DD2 RefMD5=EC18E3131040842E32EBAB66C7496EBD [604E2FB5AC9A26A81883A4C19037862A] GoodName=NFL Quarterback Club 2000 (U) [b2] CRC=E3AB4ED0 83040DD2 RefMD5=EC18E3131040842E32EBAB66C7496EBD [FD2CBDEA0992452B52E2803224232D12] GoodName=NFL Quarterback Club 2001 (U) [!] CRC=28784622 FFB22985 Players=4 SaveType=Controller Pack Rumble=Yes [A18CA5DBC85668667AA467ADD6A62B39] GoodName=NFL Quarterback Club 98 (E) [!] CRC=4B629EF4 99B21D9B Players=4 SaveType=Controller Pack Rumble=Yes [37954BA9067840FAFF851092043F0435] GoodName=NFL Quarterback Club 98 (E) [o1] CRC=4B629EF4 99B21D9B RefMD5=A18CA5DBC85668667AA467ADD6A62B39 [709F966C30CE6DF1833E95740A5A2AB2] GoodName=NFL Quarterback Club 98 (U) [!] CRC=D89BE2F8 99C97ADF Players=4 SaveType=Controller Pack Rumble=Yes [B39D12910D12498605A9F793C29866BE] GoodName=NFL Quarterback Club 98 (U) [b1] CRC=D89BE2F8 99C97ADF RefMD5=709F966C30CE6DF1833E95740A5A2AB2 [8A47091F443117BFA629B0B29D4450C6] GoodName=NFL Quarterback Club 98 (U) [o1] CRC=D89BE2F8 99C97ADF RefMD5=709F966C30CE6DF1833E95740A5A2AB2 [7EC0484C2BA6AA9F0A45D7AC1F4117DA] GoodName=NFL Quarterback Club 99 (E) [!] CRC=52A3CF47 4EC13BFC Players=4 Rumble=Yes SaveType=Controller Pack [EBDC155D7462F8C73DB4730C6BF4010D] GoodName=NFL Quarterback Club 99 (E) [b1] CRC=52A3CF47 4EC13BFC RefMD5=7EC0484C2BA6AA9F0A45D7AC1F4117DA [928869D1CE001B813BA908DFE18D7F94] GoodName=NFL Quarterback Club 99 (U) [!] CRC=BE76EDFF 20452D09 Players=4 Rumble=Yes SaveType=Controller Pack [B7E41D34D209B6CFA92E3D622F911C4E] GoodName=NHL 99 (E) [!] CRC=287D601E ABF4F8AE Players=4 SaveType=Controller Pack Rumble=Yes [A62FA044BCB5507D358424ABDA6419DB] GoodName=NHL 99 (U) [!] CRC=591A806E A5E6921D Players=4 SaveType=Controller Pack Rumble=Yes [349F61F9747F2D2098F305924C97A1BF] GoodName=NHL Blades of Steel '99 (U) [!] CRC=82EFDC30 806A2461 Players=4 SaveType=Controller Pack Rumble=Yes [9FF8AFF664781384A5FC01449DC5AD8D] GoodName=NHL Blades of Steel '99 (U) [f1] (PAL) CRC=82EFDC30 806A2461 RefMD5=349F61F9747F2D2098F305924C97A1BF [46476A5626CD99B3749AC1EE1E234FAC] GoodName=NHL Breakaway 98 (E) [!] CRC=29CE7692 71C58579 Players=4 Rumble=Yes SaveType=Controller Pack [43D788E7CAEA1146228B763C13E8E740] GoodName=NHL Breakaway 98 (E) [f1] (NTSC) CRC=C5F020F3 27B2CA73 RefMD5=46476A5626CD99B3749AC1EE1E234FAC [5CB521B928FB94E84F4E0E49B6E25CD4] GoodName=NHL Breakaway 98 (E) [h1C] CRC=29CE7692 71C58579 RefMD5=46476A5626CD99B3749AC1EE1E234FAC [75F197DEF1D084534857493582D84E73] GoodName=NHL Breakaway 98 (E) [o1] CRC=29CE7692 71C58579 RefMD5=46476A5626CD99B3749AC1EE1E234FAC [9EA99ED5E27E35976E8266FACF5064CD] GoodName=NHL Breakaway 98 (E) [o1][h1C] CRC=29CE7692 71C58579 RefMD5=46476A5626CD99B3749AC1EE1E234FAC [B62076FA1421B8E7FDEC2B4F8A910EA3] GoodName=NHL Breakaway 98 (U) [!] CRC=6DFDCDC3 4DE701C8 Players=4 SaveType=Controller Pack Rumble=Yes [1D178B74A163711CA9C06327F3B709CF] GoodName=NHL Breakaway 98 (U) [h1C] CRC=6DFDCDC3 4DE701C8 RefMD5=B62076FA1421B8E7FDEC2B4F8A910EA3 [BA863554222E503BAC7F01FA4888BE8A] GoodName=NHL Breakaway 98 (U) [o1] CRC=6DFDCDC3 4DE701C8 RefMD5=B62076FA1421B8E7FDEC2B4F8A910EA3 [5DFB0200B6698CEF2BA2A1775BA252A8] GoodName=NHL Breakaway 98 (U) [o1][h1C] CRC=6DFDCDC3 4DE701C8 RefMD5=B62076FA1421B8E7FDEC2B4F8A910EA3 [4BA95AA97ECFEE36051EBE0A9024EEE8] GoodName=NHL Breakaway 99 (E) [!] CRC=874621CB 0031C127 Players=4 SaveType=Controller Pack Rumble=Yes [417AFE49BF73F3663C5F5F0AF897FC79] GoodName=NHL Breakaway 99 (E) [b1] CRC=874621CB 0031C127 RefMD5=4BA95AA97ECFEE36051EBE0A9024EEE8 [AF1D07679014760B88923A4827658CAF] GoodName=NHL Breakaway 99 (U) [!] CRC=441768D0 7D73F24F Players=4 SaveType=Controller Pack Rumble=Yes [07C102E1ADF6190E05EF3C897090DFD3] GoodName=NHL Breakaway 99 (U) [b1] CRC=441768D0 7D73F24F RefMD5=AF1D07679014760B88923A4827658CAF [1614E1C0BEBFAA0855DA9990EF859A68] GoodName=NHL Breakaway 99 (U) [b2] CRC=F0C5F320 B22773CA RefMD5=AF1D07679014760B88923A4827658CAF [A61854CF27E536C8513174FAEF08DFCB] GoodName=NHL Pro 99 (E) [!] CRC=A9895CD9 7020016C Players=4 Rumble=No SaveType=Controller Pack [BCEE33DC37C872A188A72EEAF41369F4] GoodName=NHL Pro 99 (E) [o1] CRC=A9895CD9 7020016C RefMD5=A61854CF27E536C8513174FAEF08DFCB [3E217E9C70608E56DA20FEAC9A458EFC] GoodName=NUTS - Nintendo Ultra64 Test Suite by MooglyGuy (PD) CRC=EFDAFEA4 E38D6A80 [B935B87F3DCCA8AEEB6A9365124846DC] GoodName=Nagano Winter Olympics '98 (E) [!] CRC=6D452016 713C09EE Players=4 SaveType=Controller Pack Rumble=No [D5CE3A477104213499FFEA3A0BCB1555] GoodName=Nagano Winter Olympics '98 (E) [h1C] CRC=6D452016 713C09EE [D4D046F74BE40E067875701751647178] GoodName=Nagano Winter Olympics '98 (E) [o1] CRC=6D452016 713C09EE RefMD5=B935B87F3DCCA8AEEB6A9365124846DC [C17F78A103D99B21533F0C1566378EF6] GoodName=Nagano Winter Olympics '98 (U) [!] CRC=8D2BAE98 D73725BF Players=4 SaveType=Controller Pack Rumble=No [48782BC5728F38099B21E8B281ADC1CA] GoodName=Nagano Winter Olympics '98 (U) [T+Ita_HRG] CRC=8D2BAE98 D73725BF RefMD5=C17F78A103D99B21533F0C1566378EF6 [63C2A327F7195FF43229738D315CF51C] GoodName=Nagano Winter Olympics '98 (U) [b1] CRC=8D2BAE98 D73725BF RefMD5=C17F78A103D99B21533F0C1566378EF6 [2131A0AE317D243618A1E90E2153215C] GoodName=Nagano Winter Olympics '98 (U) [b2] CRC=8D2BAE98 D73725BF RefMD5=C17F78A103D99B21533F0C1566378EF6 [96F8B3E6F6B91923462B02554025C403] GoodName=Nagano Winter Olympics '98 (U) [h1C] CRC=8D2BAE98 D73725BF RefMD5=C17F78A103D99B21533F0C1566378EF6 [C9F607002F051F087F4FD68B8B77B4D3] GoodName=Nagano Winter Olympics '98 (U) [o1] CRC=8D2BAE98 D73725BF RefMD5=C17F78A103D99B21533F0C1566378EF6 [A8CDD4C61604B9C279861289ED7C4542] GoodName=Nagano Winter Olympics '98 (U) [o2] CRC=8D2BAE98 D73725BF RefMD5=C17F78A103D99B21533F0C1566378EF6 [E61251D2819E3BF3A9C0B95329F60F70] GoodName=Namco Museum 64 (U) [!] CRC=5129B6DA 9DEF3C8C Players=1 Rumble=No [EAD417FF24EAB32E2BF45CEA9200D425] GoodName=Namco Museum 64 (U) [f1] (PAL) CRC=A896AB1D 27E73688 RefMD5=E61251D2819E3BF3A9C0B95329F60F70 [1F455908263C2745E4100C0319B0F4C0] GoodName=Namco Museum 64 (U) [o1] CRC=5129B6DA 9DEF3C8C RefMD5=E61251D2819E3BF3A9C0B95329F60F70 [98C0A62FE977A8202F558E5F2E2A5A60] GoodName=Namco Museum 64 (U) [o1][f1] (PAL) CRC=AE21569D 5A5BC572 RefMD5=E61251D2819E3BF3A9C0B95329F60F70 [E001B32D05D36EDB7E8A99B7C7E4C789] GoodName=Namco Museum 64 (U) [t1] CRC=A864A921 99082CD0 RefMD5=E61251D2819E3BF3A9C0B95329F60F70 [CB7C26C00AB065F372DDA9950260BCBA] GoodName=Namp64 - N64 MP3-Player by Obsidian (PD) CRC=C4855DA2 83BBA182 [5E1940CA1236A76E8F2D15DE0414AE55] GoodName=Neon Genesis Evangelion (J) [!] CRC=147E0EDB 36C5B12C SaveType=Eeprom 16KB Players=1 Rumble=Yes [34F5F402064F76B375771EBF80DBE734] GoodName=Neon Genesis Evangelion (J) [b1] CRC=147E0EDB 36C5B12C RefMD5=5E1940CA1236A76E8F2D15DE0414AE55 [4374A8342E612951148136194053967C] GoodName=Neon Genesis Evangelion (J) [b2] CRC=147E0EDB 36C5B12C RefMD5=5E1940CA1236A76E8F2D15DE0414AE55 [DB2A3682451F1A6CEAFBF44792D4A5A7] GoodName=Neon Genesis Evangelion (J) [b3] CRC=147E0EDB 36C5B12C RefMD5=5E1940CA1236A76E8F2D15DE0414AE55 [7FE719DDE2CF1C9227BB9650AFA21A4B] GoodName=Neon Genesis Evangelion (J) [f1] (PAL) CRC=AC000A2B 38E3A55C RefMD5=5E1940CA1236A76E8F2D15DE0414AE55 [4723E4599E37DB86B9BBD2FD18BFDB8F] GoodName=Neon64 First Public Beta Release V2 by Halley's Comet Software (PD) CRC=3B18F6F9 8C4BE567 [B7A1D8B4BD19C710E4B9DAAC5590E301] GoodName=Neon64 First Public Beta Release V3 by Halley's Comet Software (PD) CRC=4F707583 2D6326AA [E062DD1E3C8B7A266FA018C6FBC17455] GoodName=Neon64 First Public Beta Release by Halley's Comet Software (PD) CRC=3B18F4F7 82BFB2B3 [5E4DABADB17439A1F2122F5E2C141FD1] GoodName=Neon64 V1.0 by Halley's Comet Software (PD) CRC=E87D098B 4C70341C [83CB0CE82555FE733A121C052BDF3662] GoodName=Neon64 V1.1 by Halley's Comet Software (PD) [o2] CRC=AE809DD0 0A99B360 [CA02C44E41D6A7CD51785DB0981C54C7] GoodName=Neon64 V1.1 by Halley's Comet Software (PD) CRC=ED42A2D4 7A71CD91 [08EBE38D2EA9BCACED94805BBBCE7192] GoodName=Neon64 V1.2 by Halley's Comet Software (PD) [o1] CRC=7040B082 1BE98D03 [D54FB5A78A2A9189D01ACF20A6043F4B] GoodName=Neon64 V1.2 by Halley's Comet Software (PD) CRC=ED42A2D4 7A71CD91 [43475AA0D793806C23D8645F49F6656D] GoodName=Neon64 V1.2a by Halley's Comet Software (PD) [b1] CRC=A9F7BB48 D63C5F56 [38D04A1C192D591940437B6BAF628119] GoodName=Neon64 V1.2a by Halley's Comet Software (PD) [o1] CRC=5AAD4E36 6625D1D2 [9FFA642B02C27D8E01EAB17B0F0F4251] GoodName=Neon64 V1.2a by Halley's Comet Software (PD) CRC=ED42A2D4 7A71CD91 [C4ECFEC66ECEEA23F39632AB6753300F] GoodName=New Tetris, The (E) [!] CRC=E61CFF0A CE1C0D71 [7A28179B00734C9AA0F0609FAFAAFD5F] GoodName=New Tetris, The (U) [!] CRC=2153143F 992D6351 Players=4 Rumble=No SaveType=SRAM [0B13983A634732FDE9D2D638C0A14C51] GoodName=New Tetris, The (U) [f1] (PAL) CRC=208A0427 DF465260 RefMD5=7A28179B00734C9AA0F0609FAFAAFD5F [99B35D7833DAEBCE199CDCC240E29FDF] GoodName=New Tetris, The (U) [f2] (PAL) CRC=208A0437 0E53FF5F RefMD5=7A28179B00734C9AA0F0609FAFAAFD5F [E2304DF5FF6B40E74FD5BF62655D3E57] GoodName=New Tetris, The (U) [f3] (PAL) CRC=43D67345 A60D5D3D RefMD5=7A28179B00734C9AA0F0609FAFAAFD5F [4116CF435DB315A2481AF8D1E9352FEB] GoodName=Nightmare Creatures (U) [!] CRC=2857674D CC4337DA Players=1 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [60A2CFF1515D4C7902DDE32A6E01D411] GoodName=Nightmare Creatures (U) [b1] CRC=2857674D CC4337DA RefMD5=4116CF435DB315A2481AF8D1E9352FEB [68B478C274812450369DBF153CAD185D] GoodName=Nightmare Creatures (U) [b2] CRC=2857674D CC4337DA RefMD5=4116CF435DB315A2481AF8D1E9352FEB [FF02FE6A6FE7F6C31BCA6962E53A63CA] GoodName=Nightmare Creatures (U) [t1] CRC=AFDCF850 5CCD80DE RefMD5=4116CF435DB315A2481AF8D1E9352FEB [49198056DDEBB41B1A820A09289A2E3F] GoodName=Nightmare Creatures (U) [t2] CRC=AFDCF850 5CCD80DE RefMD5=4116CF435DB315A2481AF8D1E9352FEB [B04957D052EF850C5EDECE69DB7377B3] GoodName=Nintama Rantarou 64 Game Gallery (J) [!] CRC=CD3C3CDF 317793FA Players=4 CountPerOp=1 [66DB457B130D31A286A23D6E4DD9726E] GoodName=Nintendo All-Star! Dairantou Smash Brothers (J) [!] CRC=67D20729 F696774C Status=3 SaveType=SRAM Players=4 Rumble=Yes [B2DF29627E0219A9C14605F46803C94C] GoodName=Nintendo All-Star! Dairantou Smash Brothers (J) [b1] CRC=67D20729 F696774C RefMD5=66DB457B130D31A286A23D6E4DD9726E [57CBADB75429AAFC0D7040DE69DC8D70] GoodName=Nintendo All-Star! Dairantou Smash Brothers (J) [b2] CRC=88FFAB7D 298294A2 RefMD5=66DB457B130D31A286A23D6E4DD9726E [3D78B907657918C8C58EA002FEEE1D0F] GoodName=Nintendo All-Star! Dairantou Smash Brothers (J) [b3] CRC=67D20729 F696774C RefMD5=66DB457B130D31A286A23D6E4DD9726E [4CFAED7DAD4EE592572964BA03D8C07E] GoodName=Nintendo All-Star! Dairantou Smash Brothers (J) [f1] CRC=308BC746 A229B775 RefMD5=66DB457B130D31A286A23D6E4DD9726E [9C0E454CFFE65835AED12B39A8D9D6EC] GoodName=Nintendo All-Star! Dairantou Smash Brothers (J) [f2] CRC=88FFAB7D 298294A2 RefMD5=66DB457B130D31A286A23D6E4DD9726E [9A27D420B43A908ECF4F28F859E1C541] GoodName=Nintendo All-Star! Dairantou Smash Brothers (J) [f3] CRC=88FFAB7D 298294A2 RefMD5=66DB457B130D31A286A23D6E4DD9726E [053C515BEBE73391B4479A90A8EE93F9] GoodName=Nintendo All-Star! Dairantou Smash Brothers (J) [f4] (PAL) CRC=58886DD0 AD93BCB1 RefMD5=66DB457B130D31A286A23D6E4DD9726E [0AEE21A365F9450C258A59556F77EDB8] GoodName=Nintendo Family by CALi (PD) CRC=60E528A6 9500D4D3 [C10B51EEAC9F520419F23F95228C719A] GoodName=Nintendo On My Mind Demo by Kid Stardust (PD) CRC=6B2AFCC7 EEB27A34 [F79F17353DC5683AB60257462BE9D2FD] GoodName=Nintendo WideBoy 64 by SonCrap (PD) CRC=D1C6C55D F010EF52 [9EB9A0A45C2DD35DCB5A4A8A7FC4B151] GoodName=Nintro64 Demo by Lem (POM '98) (PD) [b1] CRC=4E01B4A6 C884D085 [497D1E0677395A921B6006BBF41EED04] GoodName=Nintro64 Demo by Lem (POM '98) (PD) CRC=4E01B4A6 C884D085 [898362D1F6E207818E8CDF88225017B6] GoodName=NuFan Demo by Kid Stardust (PD) [b1] CRC=FA7D3935 97AC54FC [9ED82C5E9B6BF204276B434C8B0F6892] GoodName=NuFan Demo by Kid Stardust (PD) CRC=FA7D3935 97AC54FC [710BA49EBD5C9A2B26653FAE93BD667A] GoodName=Nuclear Strike 64 (E) (M2) [!] CRC=8A97A197 272DF6C1 Players=1 SaveType=Controller Pack Rumble=Yes CountPerOp=1 [59C28E02BAF4065051C63EA51736892A] GoodName=Nuclear Strike 64 (E) (M2) [h1C] CRC=8A97A197 272DF6C1 RefMD5=710BA49EBD5C9A2B26653FAE93BD667A [D43C2E1938534363E56A22413B91D051] GoodName=Nuclear Strike 64 (G) [!] CRC=8F50B845 D729D22F Players=1 SaveType=Controller Pack Rumble=Yes CountPerOp=1 [FFC584040D0D052FBAB4CB6C19245449] GoodName=Nuclear Strike 64 (U) [!] CRC=4998DDBB F7B7AEBC Players=1 SaveType=Controller Pack Rumble=Yes CountPerOp=1 [76C8EFDD11F6D2E553055B801A022653] GoodName=Nuclear Strike 64 (U) [b1] CRC=4998DDBB F7B7AEBC RefMD5=FFC584040D0D052FBAB4CB6C19245449 [A3134DAE771ADDB83191422615DF8551] GoodName=Nuclear Strike 64 (U) [f1] (PAL) CRC=E6B339F6 22AE6901 RefMD5=FFC584040D0D052FBAB4CB6C19245449 [2B7370E6880F83C808A2CB9E7F33DC46] GoodName=Nuclear Strike 64 (U) [t1] CRC=FE5DC5D4 E1815BE5 RefMD5=FFC584040D0D052FBAB4CB6C19245449 [50C10082D0C077FDB5658EF5A6E3F54F] GoodName=Nushi Tsuri 64 (J) [!] CRC=D83BB920 CC406416 Players=1 CountPerOp=1 [7412417C50A42427637575A3CD2E652E] GoodName=Nushi Tsuri 64 (J) [b1] CRC=24081000 AD880000 RefMD5=50C10082D0C077FDB5658EF5A6E3F54F [EEFD695B00354C5199DF348ECF404A0F] GoodName=Nushi Tsuri 64 (J) [b2] CRC=9ADD5DE5 451F0A65 RefMD5=50C10082D0C077FDB5658EF5A6E3F54F [C187BD285BA0E2D0EF5CFFEE44B367EE] GoodName=Nushi Tsuri 64 (J) [b3] CRC=D83BB920 CC406416 RefMD5=50C10082D0C077FDB5658EF5A6E3F54F [0B281D478B1B4FF9329B45EEB80D53F2] GoodName=Nushi Tsuri 64 (J) [b4] CRC=D83BB920 CC406416 RefMD5=50C10082D0C077FDB5658EF5A6E3F54F [FABCB3078EDE955C04A00479EE11C43F] GoodName=Nushi Tsuri 64 (J) [b5] CRC=49D83BB9 20CC4064 RefMD5=50C10082D0C077FDB5658EF5A6E3F54F [828E0C399C0AA7E3B047859F4FAD3550] GoodName=Nushi Tsuri 64 - Shiokaze ni Notte (J) [b1] CRC=5B9A9618 4B86828E RefMD5=EEB69597E42E2F5D2914070ACF161B4F [A366BCBF8FF44D23A9450ECD8C71223C] GoodName=Nushi Tsuri 64 - Shiokaze ni Notte (J) [b2] CRC=5B9B1618 1B43C649 RefMD5=EEB69597E42E2F5D2914070ACF161B4F [EEB69597E42E2F5D2914070ACF161B4F] GoodName=Nushi Tsuri 64 - Shiokaze ni Notte (J) [!] CRC=5B9B1618 1B43C649 Players=1 CountPerOp=1 [E2FB4F16A039A0E302D28ACA94D5D928] GoodName=O.D.T. (E) (M5) [!] CRC=E86415A6 98395B53 [4116E492168AAFFF1BD3100C7B0AA28F] GoodName=O.D.T. (U) (M3) [!] CRC=2655BB70 667D9925 [09BA01C6EC8B178A27FBEE3A9DEE8EB6] GoodName=Oerjan Intro by Oerjan (POM '99) (PD) CRC=7F2D025D 2B7DA4AD [E96FECBA52905DB14ADDAD7CFD61091F] GoodName=Off Road Challenge (E) [!] CRC=812289D0 C2E53296 Players=2 Rumble=Yes SaveType=Controller Pack [F30DFECB19DBD82A2FD334A8A37B8D38] GoodName=Off Road Challenge (E) [b1] CRC=24081000 AD880000 RefMD5=E96FECBA52905DB14ADDAD7CFD61091F [1538A4235FDED9D65B98C25EDF6F9C0E] GoodName=Off Road Challenge (E) [b2] CRC=812289D0 C2E53296 RefMD5=E96FECBA52905DB14ADDAD7CFD61091F [AF7083FC0ABCFD5A2C6A5E971453D831] GoodName=Off Road Challenge (U) [!] CRC=319093EC 0FC209EF Players=2 Rumble=Yes SaveType=Controller Pack [DC34F5AA26488352B4D025EDBF47FE39] GoodName=Off Road Challenge (U) [b1] CRC=319093EC 0FC209EF RefMD5=AF7083FC0ABCFD5A2C6A5E971453D831 [6F378FFB873C217675F4CDD00A0318D4] GoodName=Off Road Challenge (U) [b2] CRC=319093EC 0FC209EF RefMD5=AF7083FC0ABCFD5A2C6A5E971453D831 [D3BDAA50D6C0EFFF9D696C521B704376] GoodName=Off Road Challenge (U) [t1] CRC=698FE5E8 1D57B278 RefMD5=AF7083FC0ABCFD5A2C6A5E971453D831 [A45C39767D33AC21956A3D4E6C03CFA1] GoodName=Ogre Battle 64 - Person of Lordly Caliber (J) (V1.1) [!] CRC=0375CF67 56A93FAA Players=1 Rumble=No SaveType=SRAM [A3F64D34614A0B01B6A49AE4031ACBDF] GoodName=Ogre Battle 64 - Person of Lordly Caliber (J) (V1.1) [b1] CRC=0375CF67 56A93FAA RefMD5=A45C39767D33AC21956A3D4E6C03CFA1 [5468A2AC2E93AD3F49E9B271C8341CAC] GoodName=Ogre Battle 64 - Person of Lordly Caliber (J) (V1.1) [b1][o1] CRC=0375CF67 56A93FAA RefMD5=A45C39767D33AC21956A3D4E6C03CFA1 [7AF70073E7CFD8945E087A7FFD6D8348] GoodName=Ogre Battle 64 - Person of Lordly Caliber (J) (V1.1) [b2] CRC=0375CF67 56A93FAA RefMD5=A45C39767D33AC21956A3D4E6C03CFA1 [F666E020218392E52662FDDFA1EA4F21] GoodName=Ogre Battle 64 - Person of Lordly Caliber (U) [!] CRC=E6419BC5 69011DE3 Players=1 SaveType=SRAM Rumble=No [465DFD27DDAB4F5488F4DADC09B7F938] GoodName=Olympic Hockey Nagano '98 (E) (M4) [!] CRC=AE2D3A35 24F0D41A SaveType=Controller Pack Players=4 [02AA0C059EC36145927353C8E617AA41] GoodName=Olympic Hockey Nagano '98 (E) (M4) [h1C] CRC=AE2D3A35 24F0D41A RefMD5=465DFD27DDAB4F5488F4DADC09B7F938 [8A964671C5A4F4FC62787F1F25EDD70D] GoodName=Olympic Hockey Nagano '98 (J) [!] CRC=90F43037 5C5370F5 Players=4 SaveType=Controller Pack [9C99C6D9EA98A960056C531CB78EB35B] GoodName=Olympic Hockey Nagano '98 (U) [!] CRC=7EC22587 EF1AE323 Players=4 SaveType=Controller Pack [8F9810383B86E86EC447F65D47CA74A7] GoodName=Olympic Hockey Nagano '98 (U) [T+Ita_cattivik66] CRC=7EC22587 EF1AE323 RefMD5=9C99C6D9EA98A960056C531CB78EB35B [7BD97D75D09E38996F82C6190780D447] GoodName=Olympic Hockey Nagano '98 (U) [b1] CRC=7EC22587 EF1AE323 RefMD5=9C99C6D9EA98A960056C531CB78EB35B [3A314CE9388E4178FD6FC9C74D5E7137] GoodName=Olympic Hockey Nagano '98 (U) [b2] CRC=7EC22587 EF1AE323 RefMD5=9C99C6D9EA98A960056C531CB78EB35B [CFCB20EACFCEAA43FDDBE05FB0D170D1] GoodName=Olympic Hockey Nagano '98 (U) [b3] CRC=7EC22587 EF1AE323 RefMD5=9C99C6D9EA98A960056C531CB78EB35B [3E973B5BBEF8B24A4C4D7C326955E71F] GoodName=Olympic Hockey Nagano '98 (U) [h1C] CRC=7EC22587 EF1AE323 RefMD5=9C99C6D9EA98A960056C531CB78EB35B [3796829F54958CE103DCF5E3E8EB80B4] GoodName=Onegai Monsters (J) [!] CRC=DC649466 572FF0D9 Players=4 [B19805B3DFECF85FEA7E04614362DC28] GoodName=Onegai Monsters (J) [b1] CRC=DC649466 572FF0D9 RefMD5=3796829F54958CE103DCF5E3E8EB80B4 [91CF1982F309BD73822165087DAD4371] GoodName=Operation WinBack (E) (M5) [!] CRC=D5898CAF 6007B65B Players=4 SaveType=Controller Pack Rumble=Yes [F2DF4577D3749345F93BA0606BECA8DD] GoodName=PC-Engine 64 (POM '99) (PD) [t1] CRC=4B548E10 BB510803 [70FD44B722B55956BE86B660F153713D] GoodName=PC-Engine 64 (POM '99) (PD) CRC=9118F1B8 987DAC8C [52F4F3320607F3E8DD1A16A2F1BFBDB0] GoodName=PD Ultraman Battle Collection 64 (J) [!] CRC=F468118C E32EE44E SaveType=Eeprom 16KB [4FD424DF60F80EE7E362A9572049BA11] GoodName=PD Ultraman Battle Collection 64 (J) [b1] CRC=F468118C E32EE44E RefMD5=52F4F3320607F3E8DD1A16A2F1BFBDB0 [2755152E6168516F2224ADC6737B96F0] GoodName=PD Ultraman Battle Collection 64 (J) [f1] (PAL) CRC=37B52113 3A77A655 RefMD5=52F4F3320607F3E8DD1A16A2F1BFBDB0 [826AE85B4E74354EE378E8DC2AD33271] GoodName=PD Ultraman Battle Collection 64 (J) [f2] (PAL) CRC=170D4973 8FA23F51 RefMD5=52F4F3320607F3E8DD1A16A2F1BFBDB0 [0112FFAADA116D172ABCE136E9043A93] GoodName=PGA European Tour (E) (M5) [!] CRC=EE08C602 6BC2D5A6 Players=4 Rumble=Yes SaveType=Eeprom 4KB [2F6B0ACB7270F78C972F5E6D4C75B02B] GoodName=PGA European Tour (E) (M5) [f1] (NTSC) CRC=5243B915 BE7743B1 RefMD5=0112FFAADA116D172ABCE136E9043A93 [7DBA0D5D4279274AF07B0EF3EC3A84AD] GoodName=PGA European Tour (E) (M5) [f2] (NTSC) CRC=76515D11 42BF7875 RefMD5=0112FFAADA116D172ABCE136E9043A93 [617CECA1D2BEFFCE943EF832326898BF] GoodName=PGA European Tour (U) [!] CRC=B54CE881 BCCB6126 Players=4 Rumble=Yes SaveType=Eeprom 4KB [8E79EC6D9F8DB1C50100860BF4437462] GoodName=POMbaer Demo by Kid Stardust (POM '99) (PD) CRC=9D63C653 C26B460F [0BBE17EC2271DC293F1D2F4A7B0D61D4] GoodName=POMolizer Demo by Renderman (POM '99) (PD) CRC=EDAFD3C0 39EF3599 [D60046C23400BFEBD5B051F89E7F2F07] GoodName=Pachinko 365 Nichi (J) [!] CRC=74554B3B F4AEBCB5 Players=1 Rumble=No [2002438491F94C468CB487032AC4AA33] GoodName=Pachinko 365 Nichi (J) [b1] CRC=74554B3B F4AEBCB5 RefMD5=D60046C23400BFEBD5B051F89E7F2F07 [F38ECA581BF6944EA35E3A816AD472DF] GoodName=Pachinko 365 Nichi (J) [b2] CRC=74554B3B F4AEBCB5 RefMD5=D60046C23400BFEBD5B051F89E7F2F07 [FE38BB1EAA1C74BAF01847BDE64E7F9D] GoodName=Pamela Demo (PD) CRC=26AD85C5 F908A36B [3AAF74D7E6D560C9CB1331209AD00F22] GoodName=Pamela Demo - Resized (PD) CRC=26AD85C5 F908A36B [A9BE6A493A680642D840F859A65816CA] GoodName=Paper Mario (E) (M4) [!] CRC=19AB29AF C71BCD28 Status=2 Players=1 SaveType=Flash RAM Rumble=Yes CountPerOp=1 [A722F8161FF489943191330BF8416496] GoodName=Paper Mario (U) [!] CRC=65EEE53A ED7D733C Status=2 Players=1 SaveType=Flash RAM Rumble=Yes CountPerOp=1 [8595BA0A0D2EA73944228BDED4A969AD] GoodName=Paper Mario (U) [T+Chi] CRC=85F5A08A EAC7053E RefMD5=A722F8161FF489943191330BF8416496 [B7F2EB7989C9C00096655D087D72EC51] GoodName=Paperboy (E) [!] CRC=AC976B38 C3A9C97A [C4CBCB54B010A5A71FE5CAA391E5C25F] GoodName=Paperboy (U) [!] CRC=3E198D9E F2E1267E Players=1 SaveType=Controller Pack Rumble=No [12827E2EF6EB1FF0F8AA494E671C3094] GoodName=Paperboy (U) [f1] (PAL) CRC=8952E61E AA89984C RefMD5=C4CBCB54B010A5A71FE5CAA391E5C25F [5DF3D21223F0DAFD0417998E9C1E7065] GoodName=Paperboy (U) [hI] CRC=89529B12 0853ED3B RefMD5=C4CBCB54B010A5A71FE5CAA391E5C25F [0451768553AB8CDD6C9CA37514E6C339] GoodName=Paperboy (U) [hI][f1] (PAL) CRC=8F00E51E 030C92C8 RefMD5=C4CBCB54B010A5A71FE5CAA391E5C25F [1F72E506250B16726E2C5A629CAE8E0F] GoodName=Paperboy (U) [hI][t1] CRC=8632071E 637E1042 RefMD5=C4CBCB54B010A5A71FE5CAA391E5C25F [DF2A6A2446E8E01375ADE872A8F93366] GoodName=Paperboy (U) [t1] CRC=8632071E 637E1042 RefMD5=C4CBCB54B010A5A71FE5CAA391E5C25F [D78E10C6B3E98F3B32FE0F23ED72DB42] GoodName=Parlor! Pro 64 - Pachinko Jikki Simulation Game (J) [!] CRC=CFE2CB31 4D6B1E1D Players=1 Rumble=No [6DF573EE08C4577BBBF117B813D93B19] GoodName=Pause Demo by RedboX (PD) CRC=7D1727F1 6C6B83EB [20DA62ECE553EDE84D02283174BECC8F] GoodName=Penny Racers (E) [!] CRC=C83CEB83 FDC56219 SaveType=Eeprom 4KB Players=4 Rumble=No Status=3 [B6DF5A75CED54DFEE0E29BCE9ABD0AAF] GoodName=Penny Racers (E) [h1C] CRC=C83CEB83 FDC56219 RefMD5=20DA62ECE553EDE84D02283174BECC8F [6AE97EC4933A13C153A281DC8B68A0D9] GoodName=Penny Racers (E) [h2C] CRC=C83CEB83 FDC56219 RefMD5=20DA62ECE553EDE84D02283174BECC8F [518B14054A667A3B9E0B72D3BF784E41] GoodName=Penny Racers (U) [!] CRC=73ABB1FB 9CCA6093 SaveType=Eeprom 4KB Players=4 Rumble=No Status=3 [26F033C7716A10755A3D22C62ACF6851] GoodName=Penny Racers (U) [hI] CRC=AB5E61C8 A2FA7596 RefMD5=518B14054A667A3B9E0B72D3BF784E41 [D9B5CD305D228424891CE38E71BC9213] GoodName=Perfect Dark (E) (M5) [!] CRC=E4B08007 A602FF33 SaveType=Eeprom 16KB Players=4 Rumble=Yes [9E6D80933B63B183CCBD8B5F6543DCAD] GoodName=Perfect Dark (E) (M5) [b1] CRC=E4B08007 A602FF33 RefMD5=D9B5CD305D228424891CE38E71BC9213 [538D2B75945EAE069B29C46193E74790] GoodName=Perfect Dark (J) [!] CRC=96747EB4 104BB243 SaveType=Eeprom 16KB [7F4171B0C8D17815BE37913F535E4E93] GoodName=Perfect Dark (U) (V1.0) [!] CRC=DDF460CC 3CA634C0 SaveType=Eeprom 16KB Players=4 Rumble=Yes [BF167523E079C57DCCA880A6F38889F2] GoodName=Perfect Dark (U) (V1.0) [f1] (PAL) CRC=65264217 7FB64F7F RefMD5=7F4171B0C8D17815BE37913F535E4E93 [E03B088B6AC9E0080440EFED07C1E40F] GoodName=Perfect Dark (U) (V1.1) [!] CRC=41F2B98F B458B466 SaveType=Eeprom 16KB Players=4 Rumble=Yes [E0BCB2758EDF0AC6AB7DB36D98E1E57C] GoodName=Pikachu Genki Dechu (J) [!] CRC=3F245305 FC0B74AA Players=1 Rumble=Yes SaveType=Eeprom 4KB [D0AE6C07AC0481EBA5FF9CE798A69574] GoodName=Pikachu Genki Dechu (J) [b1] CRC=3F245305 FC0B74AA RefMD5=E0BCB2758EDF0AC6AB7DB36D98E1E57C [3FCD4969F9A080BD2BCB913EC5D7A3BD] GoodName=Pilotwings 64 (E) (M3) [!] CRC=1AA05AD5 46F52D80 Players=1 Rumble=No SaveType=Eeprom 4KB CountPerOp=3 ; Land Shadow Fix (disabled because can cause hangs when pressing Quit after landing) ;Cheat0=D0264361 0012,80264361 00FF,D0264BE1 0012,80264BE1 00FF,D0264DA1 0012,80264DA1 00FF,D02647E1 0012,802647E1 00FF,D02646A1 0012,802646A1 00FF,D0264661 0012,80264661 00FF,D02649A1 0012,802649A1 00FF ;Cheat1=D0264BA1 0012,80264BA1 00FF,D0264AA1 0012,80264AA1 00FF,D02641E1 0020,802641E1 00FF,D02648E1 0020,802648E1 00FF,D0264D61 0020,80264D61 00FF,D0264A21 0020,80264A21 00FF,D02645A1 0020,802645A1 00FF ;Cheat2=D02647A1 0020,802647A1 00FF,D02642A1 0029,802642A1 00FF,D0264921 0029,80264921 00FF,D0264621 0029,80264621 00FF,D0264A21 0029,80264A21 00FF,D0264C61 0029,80264C61 00FF,D02647A1 0029,802647A1 00FF ;Cheat3=D0264FE1 0029,80264FE1 00FF,D0265161 0029,80265161 00FF,D0264AA1 0029,80264AA1 00FF,D02641E1 003D,802641E1 00FF,D02649E1 003D,802649E1 00FF,D0264561 003D,80264561 00FF,D02646E1 003D,802646E1 00FF ;Cheat4=D0264721 003D,80264721 00FF [F21E2A3A05ACF49586F32DCE5C449FE4] GoodName=Pilotwings 64 (E) (M3) [b1] CRC=1AA05AD5 46F52D80 RefMD5=3FCD4969F9A080BD2BCB913EC5D7A3BD [987682CC63777221B938CC465607BD8C] GoodName=Pilotwings 64 (E) (M3) [b2] CRC=1AA05AD5 46F52D80 RefMD5=3FCD4969F9A080BD2BCB913EC5D7A3BD [99FD0E1CBA30C18C869F2DE98678CD16] GoodName=Pilotwings 64 (E) (M3) [h1C] CRC=1AA05AD5 46F52D80 RefMD5=3FCD4969F9A080BD2BCB913EC5D7A3BD [E8E6EC0692009009F5DCA6827B21F59A] GoodName=Pilotwings 64 (J) [!] CRC=09CC4801 E42EE491 Players=1 SaveType=Eeprom 4KB Rumble=No CountPerOp=3 ; Land Shadow Fix (disabled because can cause hangs when pressing Quit after landing) ;Cheat0=D02639B1 0012,802639B1 00FF,D0264231 0012,80264231 00FF,D02643F1 0012,802643F1 00FF,D0263E31 0012,80263E31 00FF,D0263CF1 0012,80263CF1 00FF,D0263CB1 0012,80263CB1 00FF,D0263FF1 0012,80263FF1 00FF ;Cheat1=D02641F1 0012,802641F1 00FF,D02640F1 0012,802640F1 00FF,D0263831 0020,80263831 00FF,D0263F31 0020,80263F31 00FF,D02643B1 0020,802643B1 00FF,D0264071 0020,80264071 00FF,D0263BF1 0020,80263BF1 00FF ;Cheat2=D0263DF1 0020,80263DF1 00FF,D02638F1 0029,802638F1 00FF,D0263F71 0029,80263F71 00FF,D0263C71 0029,80263C71 00FF,D0264071 0029,80264071 00FF,D02642B1 0029,802642B1 00FF,D0263DF1 0029,80263DF1 00FF ;Cheat3=D0264631 0029,80264631 00FF,D02647B1 0029,802647B1 00FF,D02640F1 0029,802640F1 00FF,D0263831 003D,80263831 00FF,D0264031 003D,80264031 00FF,D0263BB1 003D,80263BB1 00FF,D0263D31 003D,80263D31 00FF ;Cheat4=D0263D71 003D,80263D71 00FF [2740F1B89CE7D78A5D31CF60C97A0C11] GoodName=Pilotwings 64 (J) [b1] CRC=09CC4801 E42EE491 RefMD5=E8E6EC0692009009F5DCA6827B21F59A [8B346182730CEAFFE5E2CCF6D223C5EF] GoodName=Pilotwings 64 (U) [!] CRC=C851961C 78FCAAFA Players=1 SaveType=Eeprom 4KB Rumble=No CountPerOp=3 ; Land Shadow Fix (disabled because can cause hangs when pressing Quit after landing) ;Cheat0=D0263B41 0012,80263B41 00FF,D02643C1 0012,802643C1 00FF,D0264581 0012,80264581 00FF,D0263FC1 0012,80263FC1 00FF,D0263E81 0012,80263E81 00FF,D0263E41 0012,80263E41 00FF,D0264181 0012,80264181 00FF ;Cheat1=D0264381 0012,80264381 00FF,D0264281 0012,80264281 00FF,D02639C1 0020,802639C1 00FF,D02640C1 0020,802640C1 00FF,D0264541 0020,80264541 00FF,D0264201 0020,80264201 00FF,D0263D81 0020,80263D81 00FF ;Cheat2=D0263F81 0020,80263F81 00FF,D0263A81 0029,80263A81 00FF,D0264101 0029,80264101 00FF,D0263E01 0029,80263E01 00FF,D0264201 0029,80264201 00FF,D0264441 0029,80264441 00FF,D0263F81 0029,80263F81 00FF ;Cheat3=D02647C1 0029,802647C1 00FF,D0264941 0029,80264941 00FF,D0264281 0029,80264281 00FF,D02639C1 003D,802639C1 00FF,D02641C1 003D,802641C1 00FF,D0263D41 003D,80263D41 00FF,D0263EC1 003D,80263EC1 00FF ;Cheat4=D0263F01 003D,80263F01 00FF [E28F8F19E56CC6C7A0F3A3286AEB60C1] GoodName=Pilotwings 64 (U) [h1C] CRC=C851961C 78FCAAFA RefMD5=8B346182730CEAFFE5E2CCF6D223C5EF [F69DE158BC76416B4C6C4704B15B6EB0] GoodName=Pilotwings 64 (U) [t1] CRC=70478A35 F9897402 RefMD5=8B346182730CEAFFE5E2CCF6D223C5EF [BE9E0C9D509AAB0C72F7788D6BE3B443] GoodName=Pip's Pong by Mr. Pips (PD) [b1] CRC=D072CFE7 CE134788 [E821B540A91B7BF088E52ABC02A5CC9A] GoodName=Pip's Pong by Mr. Pips (PD) CRC=D072CFE7 CE134788 [63CBABEF9069FE3375A7726C89E9E25D] GoodName=Pip's Porn Pack 1 by Mr. Pips (PD) CRC=D851B920 F3D6C0CE [3DF1646CC28C04133B3CB5EB143AE016] GoodName=Pip's Porn Pack 2 by Mr. Pips (POM '99) (PD) CRC=BF9D0FB0 981C22D1 [547CF20308F2CE2CE5B5310A5E555113] GoodName=Pip's Porn Pack 3 by Mr. Pips (PD) CRC=EA2A6A75 52B2C00F [5D144D323785818A9BD5C667A5567BBD] GoodName=Pip's RPGs Beta 12 by Mr. Pips (PD) CRC=3CB8AAB8 05C8E573 [EFBCB657A3B05B5CB080FD628B852BD0] GoodName=Pip's RPGs Beta 14 by Mr. Pips (PD) CRC=56563C89 C803F77B [C6FAAC42045BE1AF769EC52CEA6DED52] GoodName=Pip's RPGs Beta 15 by Mr. Pips (PD) CRC=AFBBB9D5 8EE82954 [10A28DF32D06B7D3D9B14091AC9D2E14] GoodName=Pip's RPGs Beta 2 by Mr. Pips (PD) CRC=DAD7F751 8B6322F0 [6402498E891455FFB86C95AD8ABB87F6] GoodName=Pip's RPGs Beta 3 by Mr. Pips (PD) CRC=C830954A 29E257FC [10E62952244834E0B52AF32898DE8D9F] GoodName=Pip's RPGs Beta 6 by Mr. Pips (PD) CRC=7194B65B 9DE67E7D [35FAB2CC64E0E808EB629A25542C7326] GoodName=Pip's RPGs Beta 7 by Mr. Pips (PD) CRC=DB363DDA 50C1C2A5 [9E35B55606BDF4C77A1E817CE503A951] GoodName=Pip's RPGs Beta x (PD) [a1] CRC=668FA336 2C67F3AC [F8D6C5ABA62FC302C2848C53104E2683] GoodName=Pip's RPGs Beta x (PD) CRC=BB787C13 78C1605D [45CDCBCB7159EBAE1ED4D7AAE70749E0] GoodName=Pip's Tic Tak Toe by Mark Pips (PD) CRC=6459533B 7E22B56C [99D711AB6DFD36121E5C23C1DBA78C01] GoodName=Pip's World Game 1 by Mr. Pips (PD) [b1] CRC=762C75D1 AA09C759 [4D28DDB5B93EA302EE9F27805DE1B46F] GoodName=Pip's World Game 1 by Mr. Pips (PD) CRC=762C75D1 AA09C759 [BBF5060E64BD0201954E65BD281EC486] GoodName=Pip's World Game 2 by Mr. Pips (PD) [b1] CRC=FC051819 A46A48F6 [9358AA90887FC31C45BC2B849C37D6A0] GoodName=Pip's World Game 2 by Mr. Pips (PD) CRC=FC051819 A46A48F6 [9C1B750A2F9DFC53361F72F4BFB647A7] GoodName=Pipendo by Mr. Pips (PD) CRC=45627CED 28005F9C [1D7CFC7CDB5A0E1B69B1DC2E58A4F192] GoodName=Planet Console Intro (PD) CRC=1077590A B537FDA2 [83B75800690AF27800DF362697E5205E] GoodName=Plasma Demo (PD) [a1] CRC=7D1727F1 6C6B83EB [E27C00C2114A56D18DD27B426193B79C] GoodName=Plasma Demo (PD) CRC=E9F52336 6BEFAA5F [FBDD74ED68E6A0CD734562D56CCB752D] GoodName=Pocket Monsters Snap (J) [!] CRC=EC0F690D 32A7438C Players=1 Rumble=Yes SaveType=Flash RAM ; Pass 1st Level and Controller Fix Cheat0=D136D22C 802A,8036D21F 0000 ; Make Picture selectable Cheat1=D11E1EC4 2881,811E1EC4 2001,D11E1EC6 0098,811E1EC6 0001 [42CC0FE1442B0A498DFD8F743179C51A] GoodName=Pocket Monsters Snap (J) [b1] CRC=BB2D10F8 B8ED4D23 RefMD5=FBDD74ED68E6A0CD734562D56CCB752D [76AE2B6F38E611683ACA3B87D1B3D5CE] GoodName=Pocket Monsters Snap (J) [f1] CRC=BB2D10F8 B8ED4D23 RefMD5=FBDD74ED68E6A0CD734562D56CCB752D [CCA8D3874996A78C3B5828E7A66AC916] GoodName=Pocket Monsters Snap (J) [f2] (GameShark) CRC=412D7090 CEDABAC3 RefMD5=FBDD74ED68E6A0CD734562D56CCB752D [C46E087D966A35095DF96799B0B4FFAE] GoodName=Pocket Monsters Stadium (J) [!] CRC=665E8259 D098BD1D Players=4 Rumble=Yes [B43B3C7A3D2149FEEDC8BA3B8198BE5D] GoodName=Pocket Monsters Stadium (J) [b1] CRC=665E8259 D098BD1D RefMD5=C46E087D966A35095DF96799B0B4FFAE [D0698135C4A74CDEA8374DA0BD15DFDB] GoodName=Pocket Monsters Stadium (J) [b2] CRC=58FBD28F FEB595F0 RefMD5=C46E087D966A35095DF96799B0B4FFAE [1A5D6FBF59D1639AF71B61410553AB04] GoodName=Pocket Monsters Stadium (J) [f1] (Boot-PAL) CRC=58FBD28F FEB595F0 RefMD5=C46E087D966A35095DF96799B0B4FFAE [9BBC3945F526C8329710824C29FFC040] GoodName=Pocket Monsters Stadium (J) [f2] (Boot) CRC=76AF28D8 64A07F55 RefMD5=C46E087D966A35095DF96799B0B4FFAE [2449BB712A64E3363A6CBD56F5ADEDA5] GoodName=Pocket Monsters Stadium 2 (J) [!] CRC=63775886 5FB80E7B SaveType=Flash RAM Players=4 Rumble=Yes [907403B12D2AD59A0F186A1632AE39B9] GoodName=Pocket Monsters Stadium 2 (J) [f1] CRC=FE667A12 0D2195AD RefMD5=2449BB712A64E3363A6CBD56F5ADEDA5 [3F39C01455B585CAEB2DF8A09765D0B3] GoodName=Pocket Monsters Stadium 2 (J) [f2] CRC=FE667A12 0D2195AD RefMD5=2449BB712A64E3363A6CBD56F5ADEDA5 [DC8F45A200FED15C3B0BD97A2F52ACA5] GoodName=Pocket Monsters Stadium 2 (J) [f3] CRC=058381EF 6A36FEC6 RefMD5=2449BB712A64E3363A6CBD56F5ADEDA5 [E5D7B56B5EDBD8575ECEB9E5ECCF4A00] GoodName=Pocket Monsters Stadium 2 (J) [f4] CRC=FE667A12 0D2195AD RefMD5=2449BB712A64E3363A6CBD56F5ADEDA5 [A17AADCC962393D476EDC321E59C504B] GoodName=Pocket Monsters Stadium Kin Gin (J) [!] CRC=EE4FD7C2 9CF1D938 Players=4 SaveType=Flash RAM Rumble=Yes [2EF9FA16DE2A09EA15B6289447F40490] GoodName=Pokemon Puzzle League (E) [!] CRC=4A1CD153 D830AEF8 Players=2 SaveType=Flash RAM Rumble=No [A3BA044DFC00BB766B4B2BFB9D4B5BE9] GoodName=Pokemon Puzzle League (F) [!] CRC=3EB2E6F3 062F9EFE Players=2 SaveType=Flash RAM Rumble=No [000364BAC80E41D9060A31A5923874B7] GoodName=Pokemon Puzzle League (G) [!] CRC=7A4747AC 44EEEC23 Players=2 SaveType=Flash RAM Rumble=No [E722576A15182CFED6782379CE4BC8BE] GoodName=Pokemon Puzzle League (U) [!] CRC=19C553A7 A70F4B52 Players=2 SaveType=Flash RAM Rumble=No [DC09E2685EB95471311E57B3605F4894] GoodName=Pokemon Puzzle League (U) [t1] CRC=E1AAA925 27C9C94B RefMD5=E722576A15182CFED6782379CE4BC8BE [D5EDC7B884DFBA7CF4AC4CDFA8AC64A4] GoodName=Pokemon Puzzle League (U) [t2] CRC=AAE125A9 C9274BC9 RefMD5=E722576A15182CFED6782379CE4BC8BE [E5A0CA3DC54B38EA7FCD927E3CFFAD3B] GoodName=Pokemon Snap (A) [!] CRC=7BB18D40 83138559 Players=1 SaveType=Flash RAM Rumble=Yes ; Pass 1st Level and Controller Fix Cheat0=D1382D1C 802C,80382D0F 0000 ; Make Picture selectable Cheat1=D11E3C44 2881,811E3C44 2001,D11E3C46 0098,811E3C46 0001 [A88FCF3FF00F21D3CEC44D2E0FAAAAD8] GoodName=Pokemon Snap (A) [f1] (GameShark) CRC=F795ACE1 8DEDE03C RefMD5=E5A0CA3DC54B38EA7FCD927E3CFFAD3B [F2A8106403D2BF9350BFEAB08689D54A] GoodName=Pokemon Snap (E) [!] CRC=4FF5976F ACF559D8 Players=1 SaveType=Flash RAM Rumble=Yes ; Pass 1st Level and Controller Fix Cheat0=D1381BFC 802C,80381BEF 0000 ; Make Picture selectable Cheat1=D11E3824 2881,811E3824 2001,D11E3826 0098,811E3826 0001 [E9028F9CCC307806695DD81742D05D5D] GoodName=Pokemon Snap (F) [!] CRC=BA6C293A 9FAFA338 Players=1 SaveType=Flash RAM Rumble=Yes ; Pass 1st Level and Controller Fix Cheat0=D1381BFC 802C,80381BEF 0000 ; Make Picture selectable Cheat1=D11E3744 2881,811E3744 2001,D11E3746 0098,811E3746 0001 [5FA70A63E352EA804607999674381749] GoodName=Pokemon Snap (F) [b1] CRC=BA6C293A 9FAFA338 RefMD5=E9028F9CCC307806695DD81742D05D5D [144B8906DC40534CFBEF6D7B994A982B] GoodName=Pokemon Snap (G) [!] CRC=5753720D 2A8A884D Players=1 SaveType=Flash RAM Rumble=Yes ; Pass 1st Level and Controller Fix Cheat0=D1381BDC 802C,80381BCF 0000 ; Make Picture selectable Cheat2=D11E3744 2881,811E3744 2001,D11E3746 0098,811E3746 0001 [D0453459095F69BE36D675D8F743069B] GoodName=Pokemon Snap (I) [!] CRC=C0C85046 61051B05 Players=1 SaveType=Flash RAM Rumble=Yes ; Pass 1st Level and Controller Fix Cheat0=D1381BFC 802C,80381BEF 0000 ; Make Picture selectable Cheat1=D11E3994 2881,811E3994 2001,D11E3996 0098,811E3996 0001 [A45D7115BE5A06FD1567F9F913C3BDF8] GoodName=Pokemon Snap (S) [!] CRC=817D286A EF417416 Players=1 SaveType=Flash RAM Rumble=Yes ; Pass 1st Level and Controller Fix Cheat0=D1381BFC 802C,80381BEF 0000 ; Make Picture selectable Cheat1=D11E38C4 2881,811E38C4 2001,D11E38C6 0098,811E38C6 0001 [FC3C9329B7CDD67CF7650ABF63B9A580] GoodName=Pokemon Snap (U) [!] CRC=CA12B547 71FA4EE4 Players=1 SaveType=Flash RAM Rumble=Yes ; Pass 1st Level and Controller Fix Cheat0=D1382D1C 802C,80382D0F 0000 ; Make Picture selectable Cheat1=D11E3184 2881,811E3184 2001,D11E3186 0098,811E3186 0001 [CCA6F7593302D46ADA66C991C976DA2D] GoodName=Pokemon Snap (U) [T+Spa] CRC=CA12B547 71FA4EE4 RefMD5=FC3C9329B7CDD67CF7650ABF63B9A580 [E3D4F75C24DA0521488E704812259A46] GoodName=Pokemon Snap (U) [f1] (Save) CRC=3FF65EDD 0F8158B0 RefMD5=FC3C9329B7CDD67CF7650ABF63B9A580 [373FBBF4B909E7C8A3AAB3DD80DEBD11] GoodName=Pokemon Snap (U) [f2] (Save-PAL) CRC=38186DAF 232AE3D8 RefMD5=FC3C9329B7CDD67CF7650ABF63B9A580 [BCB210A6A3DCA9A653F836E2957BD6DC] GoodName=Pokemon Snap (U) [f3] (GameShark) CRC=03529CD9 186BDDCD RefMD5=FC3C9329B7CDD67CF7650ABF63B9A580 [53A5D74FA55E378ADA84AF9B0ED2B728] GoodName=Pokemon Snap (U) [f3] CRC=3FF65EDD 0F8158B0 RefMD5=FC3C9329B7CDD67CF7650ABF63B9A580 [A9C272687DABD59C5144774B53BCC35A] GoodName=Pokemon Snap Station (U) [!] CRC=39119872 07722E9F Players=1 Rumble=Yes ; Pass 1st Level and Controller Fix Cheat0=D1382D1C 802C,80382D0F 0000 ; Make Picture selectable Cheat1=D11E30F4 2881,811E30F4 2001,D11E30F6 0098,811E30F6 0001 [B88F0EC125C54685FA516D233B564842] GoodName=Pokemon Snap Station (U) [f1] CRC=4B34DF0B 5899C0FE RefMD5=A9C272687DABD59C5144774B53BCC35A [2859090D78581E0925A3AF8045E81E4B] GoodName=Pokemon Stadium (E) (V1.0) [!] CRC=84077275 57315B9C Players=2 Rumble=Yes SaveType=Flash RAM [9CC940F5F463416F0B2C15F07A088F33] GoodName=Pokemon Stadium (E) (V1.0) [f1] CRC=9DFE20E9 18894032 RefMD5=2859090D78581E0925A3AF8045E81E4B [31EE2DE8E65E30F5934C450DBAA924F0] GoodName=Pokemon Stadium (E) (V1.1) [!] CRC=91C9E05D AD3AAFB9 Players=2 SaveType=Flash RAM Rumble=Yes [0E85A098D0F0E8A7EB572A69612A6873] GoodName=Pokemon Stadium (F) [!] CRC=A23553A3 42BF2D39 Players=2 SaveType=Flash RAM Rumble=Yes [4688C66F8C13EDA13DD5678176A7FD8A] GoodName=Pokemon Stadium (F) [f1] CRC=7E3D8157 D9BF4D91 RefMD5=0E85A098D0F0E8A7EB572A69612A6873 [24BE2CCB0DEA0755908C02BF67E22FE5] GoodName=Pokemon Stadium (G) [!] CRC=42011E1B E3552DB5 Players=2 SaveType=Flash RAM Rumble=Yes [8FAA825507E6CD3F388CC33343FAE547] GoodName=Pokemon Stadium (G) [f1] CRC=D7F73553 1347659F RefMD5=24BE2CCB0DEA0755908C02BF67E22FE5 [A81321759AF38BEB30A40FDACA2EA22A] GoodName=Pokemon Stadium (I) [!] CRC=A53FA82D DAE2C15D Players=2 SaveType=Flash RAM Rumble=Yes [D14A499BC4E324974EAE3E42DEC58625] GoodName=Pokemon Stadium (S) [!] CRC=B6E549CE DC8134C0 Players=2 SaveType=Flash RAM Rumble=Yes [8D296A614A47AC99B80D1EDE669E62B3] GoodName=Pokemon Stadium (S) [f1] CRC=4C115008 9F124960 RefMD5=D14A499BC4E324974EAE3E42DEC58625 [ED1378BC12115F71209A77844965BA50] GoodName=Pokemon Stadium (U) (V1.0) [!] CRC=90F5D9B3 9D0EDCF0 Players=2 SaveType=Flash RAM Rumble=Yes [C9214988B08511D2F44FAC2FAD2EE67A] GoodName=Pokemon Stadium (U) (V1.0) [f1] CRC=84EBE70F 352C5E3F RefMD5=ED1378BC12115F71209A77844965BA50 [A7087A96A709E4C662A459B4B4159094] GoodName=Pokemon Stadium (U) (V1.1) [!] CRC=1A122D43 C17DAF0F Players=2 SaveType=Flash RAM Rumble=Yes [A0087A475A29F38BD4CE5DF0A41A89CB] GoodName=Pokemon Stadium (U) (V1.1) [f1] CRC=3FC42B3E CED602E6 RefMD5=A7087A96A709E4C662A459B4B4159094 [B1271DB50D6EF8F6B53CC640C3743E4F] GoodName=Pokemon Stadium 2 (E) [!] CRC=2952369C B6E4C3A8 Players=2 SaveType=Flash RAM Rumble=Yes [BB1623BD4751240138DE55E18D3ACA7E] GoodName=Pokemon Stadium 2 (E) [T+Ita0.05] CRC=2952369C B6E4C3A8 RefMD5=B1271DB50D6EF8F6B53CC640C3743E4F [4748D96916AE2BCC5FC1630515EE2561] GoodName=Pokemon Stadium 2 (F) [!] CRC=AC5AA5C7 A9B0CDC3 Players=2 SaveType=Flash RAM Rumble=Yes [484F3E696C94980ACF3D7068F9ACC98F] GoodName=Pokemon Stadium 2 (G) [!] CRC=439B7E7E C1A1495D Players=2 SaveType=Flash RAM Rumble=Yes [5A04D7F1AB9C6B080176567AA7168D3A] GoodName=Pokemon Stadium 2 (I) [!] CRC=EFCEAF00 22094848 Players=2 SaveType=Flash RAM Rumble=Yes [B26AAFD452C9816E1B7AA0954E75825F] GoodName=Pokemon Stadium 2 (S) [!] CRC=D0A1FC5B 2FB8074B Players=2 SaveType=Flash RAM Rumble=Yes [1561C75D11CEDF356A8DDB1A4A5F9D5D] GoodName=Pokemon Stadium 2 (U) [!] CRC=03571182 892FD06D Players=2 SaveType=Flash RAM Rumble=Yes [BBDC4C4F1C474298189312008A1768C4] GoodName=Polaris SnoCross (U) [!] CRC=41380792 A167E045 Players=2 Rumble=Yes SaveType=Controller Pack [F27CBDB653AAF1D4856A53D5951F36DD] GoodName=Polaris SnoCross (U) [o1][t1] CRC=B8B73263 1492FC49 RefMD5=BBDC4C4F1C474298189312008A1768C4 [35A01AEB01F3184DD20904AF28FA71C6] GoodName=Polaris SnoCross (U) [t1] CRC=B8B73263 1492FC49 RefMD5=BBDC4C4F1C474298189312008A1768C4 [8847BD6403BA49FD62899115D661B623] GoodName=Pom Part 1 Demo (PD) CRC=1BC0CA2C 0F516B86 [037D2727B90998BED41DA0F290BB8441] GoodName=Pom Part 2 Demo (PD) CRC=ACD51083 EEC8DBED [5426EAED0D350367393F385025AF164C] GoodName=Pom Part 3 Demo (PD) CRC=1FE04890 D6696958 [C7921F3D4B91A42472DADD4DBA2CDC54] GoodName=Pom Part 4 Demo (PD) CRC=CFBEE39B 76F0A14A [F67C06AF4F6613804B3F700B1169B58D] GoodName=Pom Part 5 Demo (PD) CRC=2803B8CE 4A1EE409 [BA976164C2A900C03F445ACD51518FB0] GoodName=Pong V0.01 by Omsk (PD) CRC=C252F9B1 AD70338C [8EACC93671249508BF12CF6EC101056D] GoodName=Pong by Oman (PD) CRC=DAA76993 D8ACF77C Players=2 Status=3 Rumble=No SaveType=None [68C7FC1924AB4400CB65E40C32B7D3A6] GoodName=Pong by Oman (PD) [a1] CRC=DAA76993 D8ACF77C RefMD5=8EACC93671249508BF12CF6EC101056D [E3CFB5F1828CAF1F00B23ADA863460AD] GoodName=Pong by Oman (PD) [h1C][o1] CRC=DAA76993 D8ACF77C RefMD5=8EACC93671249508BF12CF6EC101056D [CD4D5C6C96C8C528A0FCE2958A4A7AC9] GoodName=Pong by Oman (PD) [t1] CRC=6BE878A8 3DC16D91 RefMD5=8EACC93671249508BF12CF6EC101056D [8CC73C373016070647030DDE492FDC8C] GoodName=Power League Baseball 64 (J) [!] CRC=D7A6DCFA CCFEB6B7 Players=4 Rumble=No [6504FC6F3ADB596F7D68060EB39A75B4] GoodName=Power League Baseball 64 (J) [o1] CRC=D7A6DCFA CCFEB6B7 RefMD5=8CC73C373016070647030DDE492FDC8C [AE3BDF729214964620417CC3163F0BB6] GoodName=Power Rangers - Lightspeed Rescue (E) [!] CRC=39F60C11 AB2EBA7D SaveType=Controller Pack Players=2 Rumble=Yes [24B5BFA896802253D2B715FC760D1B3E] GoodName=Power Rangers - Lightspeed Rescue (E) [f1] (NTSC) CRC=8CD06379 62319493 RefMD5=AE3BDF729214964620417CC3163F0BB6 [91D74621DDEF6D37FB845B3BC7059A38] GoodName=Power Rangers - Lightspeed Rescue (U) [!] CRC=CF8957AD 96D57EA9 Players=2 SaveType=Controller Pack Rumble=Yes [2991BB68ECA54813D6B834ADBBBACC4C] GoodName=Powerpuff Girls, The - Chemical X-Traction (U) [!] CRC=FC74D475 9A0278AB Players=2 Rumble=No [25BAFC84BA4D87854DC44DF3EF8764EA] GoodName=Premier Manager 64 (E) [!] CRC=F3D27F54 C111ACF9 Players=1 Rumble=No [527F05F166398599F0A1B10F8E1F9585] GoodName=Premier Manager 64 (E) [f1] (NTSC) CRC=F45A6784 F587C72F RefMD5=25BAFC84BA4D87854DC44DF3EF8764EA [ED4FE5EAA6631BB142DEF7F317315DFA] GoodName=Premier Manager 64 (E) [f2] (NTSC100%) CRC=C98C4580 A8C84DAD RefMD5=25BAFC84BA4D87854DC44DF3EF8764EA [7995D76F4CE236B0F0289F47AE523D32] GoodName=Pro Mahjong Kiwame 64 (J) [!] CRC=9BA10C4E 0408ABD3 Players=1 Rumble=No CountPerOp=1 [D1624977A3C25192671772623FA76438] GoodName=Pro Mahjong Kiwame 64 (J) [b1] CRC=9BA10C4E 0408ABD3 RefMD5=7995D76F4CE236B0F0289F47AE523D32 [6FEC88E88ED25AE7E823A69444D6098A] GoodName=Pro Mahjong Kiwame 64 (J) [o1] CRC=9BA10C4E 0408ABD3 RefMD5=7995D76F4CE236B0F0289F47AE523D32 [F1A2E4DD22ADF4F90DA4BDDCA37D5F18] GoodName=Pro Mahjong Tsuwamono 64 - Jansou Battle ni Chousen (J) [!] CRC=1BDCB30F A132D876 Players=1 Rumble=No CountPerOp=1 [4FA4DC582C23EEE81FEB39B7EEBD15D6] GoodName=Psychodelic Demo by Ste (POM '98) (PD) [b1] CRC=C5C4F0D5 4EEF2573 [592292DF29823A0FD81ED32666878C15] GoodName=Psychodelic Demo by Ste (POM '98) (PD) CRC=C5C4F0D5 4EEF2573 [22B86AB3F320A607899A0516C90A24D0] GoodName=Puyo Puyo 4 - Puyo Puyo Party (J) [!] CRC=4B4672B9 2DBE5DE7 Players=4 Rumble=No [FAAA2094B04DCA4C287AF9334D22529D] GoodName=Puyo Puyo Sun 64 (J) [!] CRC=94807E6B 60CC62E4 Players=2 Rumble=Yes [20C7ABF5A4DB8DC1C70725FD213E29A2] GoodName=Puyo Puyo Sun 64 (J) [b1] CRC=94807E6B 60CC62E4 RefMD5=FAAA2094B04DCA4C287AF9334D22529D [B478D4AF60D43C38BA81DE9FAEA6E057] GoodName=Puzzle Bobble 64 (J) [!] CRC=C0DE0747 A2DF72D3 Players=4 SaveType=Controller Pack Rumble=Yes [9B463A87DA73B8C923B05C3BD46EDB09] GoodName=Puzzle Bobble 64 (J) [f1] (PAL) CRC=53D93EA2 B88836C6 RefMD5=B478D4AF60D43C38BA81DE9FAEA6E057 [EA335A87C87F302C6A10D0D3D3E09B72] GoodName=Puzzle Bobble 64 (J) [f2] (PAL) CRC=412E02B8 51A57E8E RefMD5=B478D4AF60D43C38BA81DE9FAEA6E057 [FBDD421FC2105CF4B9663DF97FD7041D] GoodName=Puzzle Master 64 by Michael Searl (PD) CRC=4BBBA2E2 8BF3BBB2 Players=1 Rumble=No SaveType=None Status=2 [592CE7718EFDD1FF2F077C9B2B5275FB] GoodName=Quake 64 (E) [!] CRC=16931D74 65DC6D34 Players=2 Rumble=Yes SaveType=Controller Pack [30EDCCA84850E3B4129936350A9B6B8B] GoodName=Quake 64 (E) [o1] CRC=16931D74 65DC6D34 RefMD5=592CE7718EFDD1FF2F077C9B2B5275FB [FE4AC551B284BD0924F2AAA387249B4B] GoodName=Quake 64 (E) [t1] CRC=68CE63CC 2FFE262C RefMD5=592CE7718EFDD1FF2F077C9B2B5275FB [097605021951024C3ECB2D502C0C2A9F] GoodName=Quake 64 (U) [!] CRC=9F5BF79C D2FE08A0 Players=2 Rumble=Yes SaveType=Controller Pack [87F35BC0C6E2EAD981B49D691095B118] GoodName=Quake 64 (U) [b1] CRC=254CF663 DC8131EE RefMD5=097605021951024C3ECB2D502C0C2A9F [295FAA9B7CC7127BC82AEA90ADB211E5] GoodName=Quake 64 (U) [h1C] CRC=9F5BF79C D2FE08A0 RefMD5=097605021951024C3ECB2D502C0C2A9F [2138CE5AEC363BAC2F18CE65A78ECA25] GoodName=Quake 64 (U) [o1] CRC=9F5BF79C D2FE08A0 RefMD5=097605021951024C3ECB2D502C0C2A9F [D599490909FAACB26D134D152CB5F1ED] GoodName=Quake 64 (U) [o1][t1] CRC=254CF663 DC8131EE RefMD5=097605021951024C3ECB2D502C0C2A9F [F2FA48329FF6DDBB7BD4EEA838FD800B] GoodName=Quake 64 (U) [o2] CRC=9F5BF79C D2FE08A0 RefMD5=097605021951024C3ECB2D502C0C2A9F [7B593077EFC15B44C8D8FF639D6FB434] GoodName=Quake 64 (U) [o2][t1] CRC=254CF663 DC8131EE RefMD5=097605021951024C3ECB2D502C0C2A9F [953BB3AD87B3C1B7AC85F12B135FAA85] GoodName=Quake 64 (U) [t1] CRC=254CF663 DC8131EE RefMD5=097605021951024C3ECB2D502C0C2A9F [C31A8BB6705BD2112A5ABF4F825FD3C0] GoodName=Quake 64 Intro (PD) CRC=F4D89C08 3F34930D [673D4BA4F41A0FE23650F06AF53EEC50] GoodName=Quake II (E) [!] CRC=7433D9D7 2C4322D0 Players=4 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [55A789C553827114306E29D71E26E5DC] GoodName=Quake II (E) [h1C] CRC=7433D9D7 2C4322D0 RefMD5=673D4BA4F41A0FE23650F06AF53EEC50 [CC93C30C633FF461C29B54CEABEFD701] GoodName=Quake II (U) [!] CRC=BDA8F143 B1AF2D62 Players=4 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [920FAACCE1F8A80022433ACFD5CD2BC3] GoodName=Quake II (U) [f1] (PAL) CRC=4F8B1784 763A4E04 RefMD5=CC93C30C633FF461C29B54CEABEFD701 [EA552E33973468233A0712C251ABDB6B] GoodName=Quest 64 (U) [!] CRC=C8BB4DD9 CC5F430B Players=1 Rumble=No SaveType=Controller Pack [6F32B4DE3B3FC0C719BF9EA27EFC18BE] GoodName=Quest 64 (U) [b1] CRC=C8BB4DD9 CC5F430B RefMD5=EA552E33973468233A0712C251ABDB6B [0E2CAB03B712E7D4E1C6501978E2E637] GoodName=Quest 64 (U) [b2] CRC=C8BB4DD9 CC5F430B RefMD5=EA552E33973468233A0712C251ABDB6B [4890576C70E8486D2A90424C57C53752] GoodName=Quest 64 (U) [b3] CRC=C8BB4DD9 CC5F430B RefMD5=EA552E33973468233A0712C251ABDB6B [E9EFCC508A7054BB94E5B3243018F1AC] GoodName=Quest 64 (U) [b4] CRC=C8BB4DD9 CC5F430B RefMD5=EA552E33973468233A0712C251ABDB6B [131CCC5C9E9BD830147562DFD06444BF] GoodName=Quest 64 (U) [b5] CRC=C8BB4DD9 CC5F430B RefMD5=EA552E33973468233A0712C251ABDB6B [C01A079E0005DCF5AD9AB0D58CD9515E] GoodName=Quest 64 (U) [t1] CRC=5F48A227 B97D9B7F RefMD5=EA552E33973468233A0712C251ABDB6B [5DF35D0C05E58FCE938BAEC6CB2A230E] GoodName=R.I.P. Jay Demo by Ste (PD) [b1] CRC=32A92961 DB34982C [03418F1567DC45CBB4B4E9DA772CAA7F] GoodName=R.I.P. Jay Demo by Ste (PD) CRC=32A92961 DB34982C [FFE3839FD3974A0858A62CF363D0F8DB] GoodName=RADWAR 2K Party Inv. Intro by Ayatolloh (PD) CRC=C9011D05 EF078B8C [34AF9F96DE01A7DF6B296598908BB398] GoodName=RPA Site Intro by Lem (PD) CRC=79E318E1 86861726 [4561840840760FFA7B59F03A5F416A5C] GoodName=RR64 - Ridge Racer 64 (E) [!] CRC=FEE97010 4E94A9A0 SaveType=Eeprom 16KB Players=4 Rumble=Yes [990F97D56456FC23E52BD263E709E21E] GoodName=RR64 - Ridge Racer 64 (U) [!] CRC=2500267E 2A7EC3CE SaveType=Eeprom 16KB Players=4 Rumble=Yes [8CF63267BA38AB73763354C79C4ADB74] GoodName=RR64 - Ridge Racer 64 (U) [f1] (PAL) CRC=4E17004A 259E946C RefMD5=990F97D56456FC23E52BD263E709E21E [07D6006F744727DAAC7F53692AD950C4] GoodName=RR64 - Ridge Racer 64 (U) [t1] CRC=5A98A468 AB27C89D RefMD5=990F97D56456FC23E52BD263E709E21E [A1082A6676455C040843FD75E92DE1A3] GoodName=RTL World League Soccer 2000 (G) [!] CRC=658F8F37 1813D28D Players=4 Rumble=No [09BEE9D7EB1159D11E49BDFB03A2C4CC] GoodName=RTL World League Soccer 2000 (G) [f1] (NTSC) CRC=D250103E 136A0F0C RefMD5=A1082A6676455C040843FD75E92DE1A3 [4392F33C4282B68C9DEF5111CCF733CA] GoodName=RTL World League Soccer 2000 (G) [f1][o1] CRC=D250103E 136A0F0C RefMD5=A1082A6676455C040843FD75E92DE1A3 [AA57D69867F53456F351A289EBA08C3D] GoodName=Racing Simulation 2 (G) [!] CRC=2877AC2D C3DC139A Players=2 Rumble=Yes SaveType=Controller Pack [6160D5DE99BE421ACB620D2D203C2FEC] GoodName=Racing Simulation 2 (G) [h1C] CRC=2877AC2D C3DC139A RefMD5=AA57D69867F53456F351A289EBA08C3D [167A3502F06CF0EEF56758533F3D0E52] GoodName=Rakuga Kids (E) [!] CRC=67D21868 C5424061 Players=2 Rumble=No [28FE768CED3C87659B343A7811CFAC0A] GoodName=Rakuga Kids (E) [b1] CRC=67D21868 C5424061 RefMD5=167A3502F06CF0EEF56758533F3D0E52 [7F0900DD9726A7E56A398E910D014B61] GoodName=Rakuga Kids (E) [f1] (NTSC) CRC=49020C8E A000B949 RefMD5=167A3502F06CF0EEF56758533F3D0E52 [98A802D44FE4169FD73D7B481C08613E] GoodName=Rakuga Kids (E) [h1C] CRC=67D21868 C5424061 RefMD5=167A3502F06CF0EEF56758533F3D0E52 [813AD5C00BAD7C4D41F8558CECEDAE51] GoodName=Rakuga Kids (J) [!] CRC=9F1ECAF0 EEC48A0E Players=2 Rumble=No [378C6CE13DF3363F77D76B64C8DAB287] GoodName=Rakuga Kids (J) [b1] CRC=9F1ECAF0 EEC48A0E RefMD5=813AD5C00BAD7C4D41F8558CECEDAE51 [08D79A5C0F393D81296F50A6D556D999] GoodName=Rakuga Kids (J) [h1C] CRC=9F1ECAF0 EEC48A0E RefMD5=813AD5C00BAD7C4D41F8558CECEDAE51 [0630226F63561A05916EDCFBC8D96C04] GoodName=Rally '99 (J) [!] CRC=35D9BA0C DF485586 Players=4 Rumble=Yes SaveType=Controller Pack [035B02E493A388E950FB42F4B3D891F8] GoodName=Rally '99 (J) [f1] (PAL) CRC=4C2B343C 7249BAFF RefMD5=0630226F63561A05916EDCFBC8D96C04 [0458BC47CD771D8BC66B0CEAE6895724] GoodName=Rally Challenge 2000 (U) [!] CRC=73A88E3D 3AC5C571 Players=4 Rumble=Yes SaveType=Controller Pack [08E02F52E0547686A9BFAC7CBB03C129] GoodName=Rampage - World Tour (E) [!] CRC=84D44448 67CA19B0 Players=2 Rumble=Yes SaveType=Controller Pack [410146EA14CF34D134BC97C78522D322] GoodName=Rampage - World Tour (E) [h1C] CRC=84D44448 67CA19B0 RefMD5=08E02F52E0547686A9BFAC7CBB03C129 [4645672A0CF00ADA9B5E37CFDE8B024E] GoodName=Rampage - World Tour (U) [!] CRC=C29FF9E4 264BFE7D Players=2 Rumble=Yes SaveType=Controller Pack [1659F9F8C8A5C24F775B245BDA574462] GoodName=Rampage - World Tour (U) [b1] CRC=C29FF9E4 264BFE7D RefMD5=4645672A0CF00ADA9B5E37CFDE8B024E [71EC90E34421CEEAA8B71ACAF76EFD33] GoodName=Rampage - World Tour (U) [b2] CRC=C29FF9E4 264BFE7D RefMD5=4645672A0CF00ADA9B5E37CFDE8B024E [669584EEB9F85C7A8A96B716A2B43739] GoodName=Rampage - World Tour (U) [b3] CRC=C29FF9E4 264BFE7D RefMD5=4645672A0CF00ADA9B5E37CFDE8B024E [70C3E7412FF8196E16CCA076B3B622F7] GoodName=Rampage - World Tour (U) [b4] CRC=C29FF9E4 264BFE7D RefMD5=4645672A0CF00ADA9B5E37CFDE8B024E [BE823D7958151B97F812FBF01E7621D2] GoodName=Rampage - World Tour (U) [h1C] CRC=C29FF9E4 264BFE7D RefMD5=4645672A0CF00ADA9B5E37CFDE8B024E [E3060D3FADA2A502764E765F8140FC42] GoodName=Rampage - World Tour (U) [t1] CRC=588F980C 63FF7803 RefMD5=4645672A0CF00ADA9B5E37CFDE8B024E [4D280855EA4FFE98054BDF633EA5A7F7] GoodName=Rampage - World Tour (U) [t2] CRC=588F980C 63FF7803 RefMD5=4645672A0CF00ADA9B5E37CFDE8B024E [1492806F12D33C3EA0EDB6848D43B1CC] GoodName=Rampage 2 - Universal Tour (E) [!] CRC=5DFC4249 99529C07 Players=3 Rumble=Yes SaveType=Controller Pack [8113D0EA2008402D4631F241F625D16B] GoodName=Rampage 2 - Universal Tour (U) [!] CRC=673D099B A4C808DE Players=3 Rumble=Yes SaveType=Controller Pack [EBAFB5C3BCC84543A8E7FEF1993E573F] GoodName=Rampage 2 - Universal Tour (U) [t1] CRC=BF4317E2 2DF987E2 RefMD5=8113D0EA2008402D4631F241F625D16B [EA383E48637B44FFF9294D23B076548B] GoodName=Rampage 2 - Universal Tour (U) [t2] CRC=FD2FC875 3BD10D89 RefMD5=8113D0EA2008402D4631F241F625D16B [C7B9024594F932BA5E3A1FB70FE9BD6B] GoodName=Rape Kombat Trilogy Beta1 (Mortal Kombat Hack) CRC=9A2949C1 04E76074 [BC66239C12AE8696926E50C2B6ED9C49] GoodName=Rat Attack (E) (M6) [!] CRC=20FD0BF1 F5CF1D87 Players=4 Rumble=Yes SaveType=Controller Pack [E0BB65C30C1185FD9997020A1994B07E] GoodName=Rat Attack (E) (M6) [f1] (NTSC) CRC=85670AB4 3834BE8A RefMD5=BC66239C12AE8696926E50C2B6ED9C49 [6F868B1652183376665F67F8183EEB5C] GoodName=Rat Attack (E) (M6) [h1C] CRC=20FD0BF1 F5CF1D87 RefMD5=BC66239C12AE8696926E50C2B6ED9C49 [F661889FDF65DDCD212E9FB53B2C8F50] GoodName=Rat Attack (U) (M6) [!] CRC=0304C48E AC4001B8 Players=4 Rumble=Yes SaveType=Controller Pack [5DBBFD5ACE8222FA8FE51BE113453C13] GoodName=Rayman 2 - The Great Escape (E) (M5) [!] CRC=60D5E10B 8BEDED46 Players=1 Rumble=Yes SaveType=Controller Pack [EF2001F581A80D760C51D130725A9930] GoodName=Rayman 2 - The Great Escape (E) (M5) [f1] (NTSC) CRC=B8C303FA 544BB5FA RefMD5=5DBBFD5ACE8222FA8FE51BE113453C13 [53B325CCDF2069AB20CAF1C9B401CD20] GoodName=Rayman 2 - The Great Escape (E) (M5) [f2] (NTSC) CRC=7055FD0A E0A45808 RefMD5=5DBBFD5ACE8222FA8FE51BE113453C13 [03AA4D09FDE77EED9B95BE68E603D233] GoodName=Rayman 2 - The Great Escape (U) (M5) [!] CRC=F3C5BF9B 160F33E2 Players=1 Rumble=Yes SaveType=Controller Pack [2B1D9F38389522A372D950E1BC6FA13F] GoodName=Rayman 2 - The Great Escape (U) (M5) [t1] CRC=8BB6E3EB 2402CC87 RefMD5=03AA4D09FDE77EED9B95BE68E603D233 [406B08987AB92D73D72B597EC6B11BD9] GoodName=Razor Freestyle Scooter (U) [!] CRC=3918834A 15B50C29 Players=2 Rumble=No CountPerOp=1 [FAA64ABB0D222FCC0C6E2515D3805D9F] GoodName=Re-Volt (E) (M4) [!] CRC=C3E7E29E 5D7251CC Players=4 Rumble=Yes SaveType=Controller Pack [3FC4D3187435443455F8355B2D3F8934] GoodName=Re-Volt (U) [!] CRC=0F1FA987 BFC1AFA6 Players=4 Rumble=Yes SaveType=Controller Pack [377DAF6EDD0C996422D2A9C8C5DEC033] GoodName=Re-Volt (U) [f1] (Country Check) CRC=529AA985 A85509A3 RefMD5=3FC4D3187435443455F8355B2D3F8934 [77DC38CCE0FFAB004FD54F54EE25A593] GoodName=Re-Volt (U) [f2] (PAL) CRC=53575A75 54573214 RefMD5=3FC4D3187435443455F8355B2D3F8934 [197E24C1AB6503998798D7F56EAE7ADD] GoodName=Re-Volt (U) [t1] CRC=B754A584 D3530516 RefMD5=3FC4D3187435443455F8355B2D3F8934 [ADC95AE01855FA305B13F8B22427E597] GoodName=Ready 2 Rumble Boxing (E) (M3) [!] CRC=8BD4A334 1E138B05 Players=2 Rumble=Yes SaveType=Controller Pack [70F73D01FEAF768758F31B23DE2C2620] GoodName=Ready 2 Rumble Boxing (E) (M3) [t1] (P1 Untouchable) CRC=8638A334 8EBF1508 RefMD5=ADC95AE01855FA305B13F8B22427E597 [A42F6F14F7EA10ABEB3B55FFD42EB572] GoodName=Ready 2 Rumble Boxing (U) [!] CRC=EAB7B429 BAC92C57 Players=2 Rumble=Yes SaveType=Controller Pack [25620A9C9F372023A8BA862330E6373A] GoodName=Ready 2 Rumble Boxing (U) [f1] (PAL) CRC=5D6AA6EA 657352B1 RefMD5=A42F6F14F7EA10ABEB3B55FFD42EB572 [CCECEAA389A7847DE3433888C66A76E5] GoodName=Ready 2 Rumble Boxing (U) [t1] (P1 Untouchable) CRC=E655B42D F22370DD RefMD5=A42F6F14F7EA10ABEB3B55FFD42EB572 [DF4446A2B55C4D8D67E9C0C19E0FD9FB] GoodName=Ready 2 Rumble Boxing - Round 2 (U) [!] CRC=E9219533 13FBAFBD Players=2 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [CB97350D5CAB48EAB8B954D91C0E5DAC] GoodName=Ready 2 Rumble Boxing - Round 2 (U) [t1] CRC=6CED60AC C74292DC RefMD5=DF4446A2B55C4D8D67E9C0C19E0FD9FB [B04F298721223A22E1150CEBC712EE6A] GoodName=Resident Evil 2 (E) (M2) [!] CRC=9B500E8E E90550B3 Players=1 Rumble=Yes SaveType=SRAM CountPerOp=1 [1ADD2C0217662B307CDFD876B35FBF7A] GoodName=Resident Evil 2 (U) (V1.1) [!] CRC=AA18B1A5 07DB6AEB Players=1 Rumble=Yes SaveType=SRAM CountPerOp=1 [AD922DAE446A301E1AAFE1DFBAD75A2E] GoodName=Road Rash 64 (E) [!] CRC=02D8366A 6CABEF9C Players=4 Rumble=Yes SaveType=Controller Pack CountPerOp=3 [5EB2B1892B68767EB1D310FF7507D34E] GoodName=Road Rash 64 (E) [h1C] CRC=02D8366A 6CABEF9C RefMD5=AD922DAE446A301E1AAFE1DFBAD75A2E [28C2373F6D831EEC81F6146A809E701B] GoodName=Road Rash 64 (U) [!] CRC=F050746C 247B820B Players=4 Rumble=Yes SaveType=Controller Pack CountPerOp=3 [7966F17F36C43D3807C0949AAD45168A] GoodName=Road Rash 64 (U) [f1] (PAL) CRC=422D29E1 C1FB33F3 RefMD5=28C2373F6D831EEC81F6146A809E701B [C6867566C9E173BEAB459C5945B69C23] GoodName=Road Rash 64 (U) [t1] CRC=48176863 E1829A22 RefMD5=28C2373F6D831EEC81F6146A809E701B [41F67B5C8BB8DAEFFD989123846FC063] GoodName=Roadsters Trophy (E) (M6) [!] CRC=74E87A70 6293AED4 Players=4 SaveType=Controller Pack Rumble=Yes [D3644B398C090528E0ED9EB3C140366E] GoodName=Roadsters Trophy (U) (M3) [!] CRC=0B6B4DDB 9671E682 Players=4 SaveType=Controller Pack Rumble=Yes CountPerOp=1 [AE705F25C57ACABBD0E8BAE5EC6E237F] GoodName=Roadsters Trophy (U) (M3) [f1] (PAL) CRC=787AECF1 CC8147BA RefMD5=D3644B398C090528E0ED9EB3C140366E [5C9C715430ACBAEF3A5FBDB3E6661ACF] GoodName=Roadsters Trophy (U) (M3) [t1] CRC=74BCA5D3 4A945F7E RefMD5=D3644B398C090528E0ED9EB3C140366E [444F70A655AC89CA900F6FAFAF926B16] GoodName=Robot Ponkotsu 64 - 7tsu no Umi no Caramel (J) [!] CRC=272B690F AD0A7A77 Players=1 Rumble=No [34779AF3681F58E4F642F03EAEF198F9] GoodName=Robot Ponkotsu 64 - 7tsu no Umi no Caramel (J) [f1] (PAL) CRC=7F564549 ED60C5E6 RefMD5=444F70A655AC89CA900F6FAFAF926B16 [27C6F780F9032A531E9A322969CD9159] GoodName=Robotech - Crystal Dreams (Beta) [a1] CRC=75A0B893 4CA321B5 [B39592C6C9A3121258BDB62485956880] GoodName=Robotech - Crystal Dreams (Beta) CRC=75A0B893 4CA321B5 [2ABCD1AD41B3356FBC1018ECB121283E] GoodName=Robotron 64 (E) [!] CRC=9FF69D4F 195F0059 Players=1 SaveType=Controller Pack Rumble=No [360044D5675A328E62191250F43B6671] GoodName=Robotron 64 (E) [h1C] CRC=9FF69D4F 195F0059 RefMD5=2ABCD1AD41B3356FBC1018ECB121283E [5698757883A6F46FE5B4C9B6E780B480] GoodName=Robotron 64 (U) [!] CRC=AC8E4B32 E7B47326 Players=1 Rumble=No SaveType=Controller Pack [C4A9BBF989DDFAF5F389E4ADC6195DBC] GoodName=Robotron 64 (U) [b1] CRC=AC8E4B32 E7B47326 RefMD5=5698757883A6F46FE5B4C9B6E780B480 [8555DCF12FD35206451FB415F3FD2EEF] GoodName=Robotron 64 (U) [b2] CRC=8F4C4B32 6D881FCA RefMD5=5698757883A6F46FE5B4C9B6E780B480 [AB50026DAEA629F554408E5BA3EFA182] GoodName=Robotron 64 (U) [b3] CRC=8F4C4B32 6D881FCA RefMD5=5698757883A6F46FE5B4C9B6E780B480 [1AA79B5DEFE1F5852D5ADD799383CCCD] GoodName=Robotron 64 (U) [b4] CRC=575CCC2E A8B5ACE0 RefMD5=5698757883A6F46FE5B4C9B6E780B480 [377B9C40EBE4F4CF845E577A8DC9ACCB] GoodName=Robotron 64 (U) [f1] (PAL) CRC=8F4C4B32 6D881FCA RefMD5=5698757883A6F46FE5B4C9B6E780B480 [27E4C31540E18E3E8CEA97BFF744CC11] GoodName=Robotron 64 (U) [o1] CRC=AC8E4B32 E7B47326 RefMD5=5698757883A6F46FE5B4C9B6E780B480 [E151CCE259636C5AE15CA1C8B380EE76] GoodName=Robotron 64 (U) [t1] CRC=575CCC2E A8B5ACE0 RefMD5=5698757883A6F46FE5B4C9B6E780B480 [427C5457D4A29A222811F0CAA9CCA7B9] GoodName=Rocket - Robot on Wheels (E) (M3) [!] CRC=9FD375F8 45F32DC8 SaveType=Eeprom 4KB Players=1 Rumble=Yes [C2907EB2F9A350793317ECE878A3B8E3] GoodName=Rocket - Robot on Wheels (U) [!] CRC=0C5EE085 A167DD3E SaveType=Eeprom 4KB Players=1 Rumble=Yes [E8CBAADEDB6D19ACC142BE3105E94C4F] GoodName=Rocket - Robot on Wheels (U) [b1] CRC=0C5EE085 A167DD3E RefMD5=C2907EB2F9A350793317ECE878A3B8E3 [991E5F527EC9330320E65233C293D4C5] GoodName=Rocket - Robot on Wheels (U) [f1] (PAL) CRC=B9233DC7 9CCF2D4C RefMD5=C2907EB2F9A350793317ECE878A3B8E3 [B042C238C4093DB533EC4E849C40DE4F] GoodName=Rocket - Robot on Wheels (U) [t1] CRC=B31A9FBB 26D03050 RefMD5=C2907EB2F9A350793317ECE878A3B8E3 [0C74B44680276FFE808CFA6045329819] GoodName=Rockman Dash (J) [!] CRC=D666593B D7A25C07 Players=1 SaveType=Flash RAM Rumble=Yes [73971508A3B4CA92F7F4CF59C9170372] GoodName=Rotating Demo USA by Rene (PD) [a1] CRC=6FA4B821 29561690 [0BF79F532C938384431DA9406B846AFA] GoodName=Rotating Demo USA by Rene (PD) CRC=6FA4B821 29561690 [DEC4598A39728C28CD0CEBA45A173CE1] GoodName=Rugrats - Die grosse Schatzsuche (G) [!] CRC=451ACA0F 7863BC8A Players=4 Rumble=Yes SaveType=None [8C432235A57D34BC4A9B8B290E21E01E] GoodName=Rugrats - Scavenger Hunt (U) [!] CRC=0C02B3C5 9E2511B8 Players=4 Rumble=Yes SaveType=None [C3ED4CD05978DECFD761FA2503DCB39E] GoodName=Rugrats - Scavenger Hunt (U) [f1] (PAL) CRC=F04A729C 19971680 RefMD5=8C432235A57D34BC4A9B8B290E21E01E [55185016031CDC73C0FD471527C35706] GoodName=Rugrats - Treasure Hunt (E) [!] CRC=4D3ADFDA 7598FCAE Players=4 Rumble=Yes SaveType=None [950161325C7E11A057CC85C95685DB05] GoodName=Rugrats - Treasure Hunt (E) [h1C] CRC=4D3ADFDA 7598FCAE RefMD5=55185016031CDC73C0FD471527C35706 [229089089661F517C863242D6BB77746] GoodName=Rugrats in Paris - The Movie (E) [!] CRC=0AC61D39 ABFA03A6 Players=2 Rumble=Yes SaveType=Controller Pack [207EFE58C7C221DBDFFF285AB80126C1] GoodName=Rugrats in Paris - The Movie (U) [!] CRC=1FC21532 0B6466D4 Players=2 Rumble=Yes SaveType=Controller Pack [F3515A45EC01D2C9FEAFBAB2B85D72C4] GoodName=Rugrats in Paris - The Movie (U) [T+Spa0.10] CRC=40D5D2DE 78489F0F RefMD5=207EFE58C7C221DBDFFF285AB80126C1 [681DF5A32E857E77194106B35304D6B5] GoodName=Rush 2 - Extreme Racing USA (E) (M6) [!] CRC=B7CF2136 FA0AA715 Players=2 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [8A59477C29B4353FEAB85303C58B98F0] GoodName=Rush 2 - Extreme Racing USA (E) (M6) [h1I] CRC=09A0A6E5 8396630D RefMD5=681DF5A32E857E77194106B35304D6B5 [E9F65EA602A442966BE4DDCE799A8E20] GoodName=Rush 2 - Extreme Racing USA (E) (M6) [h2I] CRC=09A0A6E5 8396630D RefMD5=681DF5A32E857E77194106B35304D6B5 [6A925AB624EE3B343231D799733BA898] GoodName=Rush 2 - Extreme Racing USA (U) [!] CRC=EDD6E031 68136013 Players=2 SaveType=Controller Pack Rumble=Yes CountPerOp=1 [7ED3F10BC32CF76F172D8C31D15A2799] GoodName=S.C.A.R.S. (E) (M3) [!] CRC=918E2D60 F865683E Players=4 Rumble=Yes SaveType=Controller Pack [0DC80ADCD95AF4FC8FE2C7E648CA64F0] GoodName=S.C.A.R.S. (E) (M3) [h1C] CRC=918E2D60 F865683E RefMD5=7ED3F10BC32CF76F172D8C31D15A2799 [D0AA9D20A4B85FE514D2A3150D0133EA] GoodName=S.C.A.R.S. (U) [!] CRC=769147F3 2033C10E Players=4 Rumble=Yes SaveType=Controller Pack [D0A050E86E27126FD7324B5674A30764] GoodName=S.C.A.R.S. (U) [f1] (PAL) CRC=8954584D EFE71E95 RefMD5=D0AA9D20A4B85FE514D2A3150D0133EA [40866BBE1629E9B170DE552ACA83D967] GoodName=S.C.A.R.S. (U) [t1] CRC=8954A655 3B38F292 RefMD5=D0AA9D20A4B85FE514D2A3150D0133EA [637A7EA2A39F20C5B20834187230D89D] GoodName=SD Hiryuu no Ken Densetsu (J) [!] CRC=EBF5F6B7 C956D739 Players=1 [F29A0A02C41815EE3F5437E409EC327B] GoodName=SD Hiryuu no Ken Densetsu (J) [f1] (PAL) CRC=EBF5F6B7 C956D739 RefMD5=637A7EA2A39F20C5B20834187230D89D [52FD60268A69DC7B532AD58EDD2133C0] GoodName=SLiDeS (PD) CRC=5BBE6E34 088B6D0E Status=2 Players=1 Rumble=No SaveType=None [F323E3807A6AEDEDEAC9E0739490D13C] GoodName=SNES 9X Alpha by Loom-Crazy Nation (PD) [f1] (V64BIOS1.91) CRC=CA69ECE5 13A88244 [29E875C7FFA44CA629F2576CB47A1020] GoodName=SNES 9X Alpha by Loom-Crazy Nation (PD) CRC=CA69ECE5 13A88244 [919A27C2ABBEA83BA996CEE553227929] GoodName=SPLiT's Nacho64 by SPLiT (PD) CRC=1FBD27A9 6CC3EB42 Players=0 Status=3 Rumble=No SaveType=None [A63921B3190C45940721BA3AC64D1114] GoodName=SPLiT's Nacho64 by SPLiT (PD) [f1] (PAL) CRC=1899FF33 885180E6 RefMD5=919A27C2ABBEA83BA996CEE553227929 [123417811CDC49118EB01ECF76BAF760] GoodName=SRAM Manager V1.0 Beta (32Mbit) (PD) [a1] CRC=029CAE05 2B8F9DF1 [891E4A11B6F80E31A2F247FEA3730744] GoodName=SRAM Manager V1.0 Beta (32Mbit) (PD) CRC=029CAE05 2B8F9DF1 [98A5DBA896685D86A07CEEA283FD36D3] GoodName=SRAM Manager V1.0 Beta (PD) CRC=029CAE05 2B8F9DF1 [57BEB4B0AFDD4AFADE9DB6A13B72D17D] GoodName=SRAM Manager V1.0 PAL Beta (PD) CRC=4DEC9986 A8904450 [ED46A867A648A101D239DA0650B49783] GoodName=SRAM Manager V2.0 (PD) [a1] CRC=4E5507F2 E7D3B413 [657836F55DCB952C56BC5C645D82D6C2] GoodName=SRAM Manager V2.0 (PD) [h1C] CRC=4E5507F2 E7D3B413 [2E8367ED95724816646131BAD480BDD2] GoodName=SRAM Manager V2.0 (PD) [h2C] CRC=4E5507F2 E7D3B413 [597ADB9702440E72D5954D50671D9C57] GoodName=SRAM Manager V2.0 (PD) CRC=4E5507F2 E7D3B413 [00F846A9AA9E0083CE8C0E566843A7C7] GoodName=SRAM Upload Tool (PD) CRC=98A2BB11 EE4D4A86 [2FA1AC0A989D5F081D6A8733F2330923] GoodName=SRAM Upload Tool + Star Fox 64 SRAM (PD) CRC=3C524346 E4ABE776 [103592E65C65464C141A2184DBFD0947] GoodName=SRAM Upload Tool V1 by LaC (PD) CRC=3B8E7E01 6AE876A8 [71C2E66CCE1FEC929B5485AC41A61D95] GoodName=SRAM Upload Tool V1.1 by Lac (PD) [b1] CRC=98A2BB11 EE4D4A86 [2B2186A38B0B3541C3227144EA3C71A3] GoodName=SRAM Upload Tool V1.1 by Lac (PD) CRC=3C524346 E4ABE776 [F26102590AA6982EA78701E6A418BED0] GoodName=SRAM Uploader-Editor by BlackBag (PD) CRC=EC9BECFF CAB83632 [A5C1F8AF5D9AA7D2C771DA1C84841017] GoodName=SRAM to DS1 Tool by WT_Riker (PD) CRC=52BA5D2A 9BE3AB78 [C4E47228706BC724D7FBD811231D20C9] GoodName=Saikyou Habu Shougi (J) [!] CRC=5E3E60E8 4AB5D495 Players=1 Rumble=No [D92EEBA87794311C8F4443C29CC177C5] GoodName=Saikyou Habu Shougi (J) [h1C] CRC=5E3E60E8 4AB5D495 RefMD5=C4E47228706BC724D7FBD811231D20C9 [0F205BA6B663C3C31579894873CAFA66] GoodName=Saikyou Habu Shougi (J) [h2C] CRC=5E3E60E8 4AB5D495 RefMD5=C4E47228706BC724D7FBD811231D20C9 [95C345EE264F3A91F1381E76CAD82F11] GoodName=Saikyou Habu Shougi (J) [h3C] CRC=5E3E60E8 4AB5D495 RefMD5=C4E47228706BC724D7FBD811231D20C9 [34F623903C3E2DBF8FB1E47F688D1859] GoodName=Saikyou Habu Shougi (J) [h4C] CRC=5E3E60E8 4AB5D495 RefMD5=C4E47228706BC724D7FBD811231D20C9 [630A177A8D5B603F8C86D8A089E3471B] GoodName=Sample Demo by Florian (PD) [b1] CRC=C541EAB4 7397CB5F [2F8109E5C9BCC45B9987F31EA00ECA66] GoodName=Sample Demo by Florian (PD) CRC=C541EAB4 7397CB5F [81B1122EE15F7B50A341AE62E9C5716B] GoodName=San Francisco Rush - Extreme Racing (E) (M3) [!] CRC=61D116B0 FA24D60C Players=2 SaveType=Controller Pack Rumble=Yes [4FDF9E702D4A6A75124623D9434BF99F] GoodName=San Francisco Rush - Extreme Racing (E) (M3) [h1C] CRC=61D116B0 FA24D60C RefMD5=81B1122EE15F7B50A341AE62E9C5716B [F015FC28E1D62A36B4EBF4C79CA8F285] GoodName=San Francisco Rush - Extreme Racing (U) (M3) [!] CRC=2A6B1820 6ABCF466 Players=2 SaveType=Controller Pack Rumble=Yes [2A8086945375826FA6495F1EF2F1DFB6] GoodName=San Francisco Rush - Extreme Racing (U) (M3) [b1] CRC=2A6B1820 6ABCF466 RefMD5=F015FC28E1D62A36B4EBF4C79CA8F285 [C870967473A8BD2942D00EAA3D7CCC9E] GoodName=San Francisco Rush - Extreme Racing (U) (M3) [b2] CRC=2A6B1820 6ABCF466 RefMD5=F015FC28E1D62A36B4EBF4C79CA8F285 [CFD1B123BBABF1658CA6D52F34434A1E] GoodName=San Francisco Rush - Extreme Racing (U) (M3) [b3] CRC=2A6B1820 6ABCF466 RefMD5=F015FC28E1D62A36B4EBF4C79CA8F285 [AD921B1336EDA406D124940BED174465] GoodName=San Francisco Rush - Extreme Racing (U) (M3) [o1] CRC=2A6B1820 6ABCF466 RefMD5=F015FC28E1D62A36B4EBF4C79CA8F285 [390FC46621581FA62F7F4CC3537F255D] GoodName=San Francisco Rush - Extreme Racing (U) (M3) [o2] CRC=2A6B1820 6ABCF466 RefMD5=F015FC28E1D62A36B4EBF4C79CA8F285 [90CA5D19B7F085474EBD2186D70C59AF] GoodName=San Francisco Rush - Extreme Racing (U) (M3) [o3] CRC=2A6B1820 6ABCF466 RefMD5=F015FC28E1D62A36B4EBF4C79CA8F285 [02B16AC23998F78F09AF6513F4ACB664] GoodName=San Francisco Rush 2049 (E) (M6) [!] CRC=51D29418 D5B46AE3 Players=4 SaveType=Controller Pack Rumble=Yes CountPerOp=1 [AF5BE0ADFF51A8E9C6D771282C295810] GoodName=San Francisco Rush 2049 (U) [!] CRC=B9A9ECA2 17AAE48E Players=4 SaveType=Controller Pack Rumble=Yes CountPerOp=1 [1977D63B511A900628DB2A3A104160AC] GoodName=San Francisco Rush 2049 (U) [t1] CRC=01D66F37 365F18B3 RefMD5=AF5BE0ADFF51A8E9C6D771282C295810 [3B6DD7B60437234895500BEFF28DF6D6] GoodName=Scooby-Doo! - Classic Creep Capers (E) [!] CRC=E3BD221D 3C0834D3 Players=1 SaveType=Controller Pack Rumble=No [16CC6DB10A56331B56F374B4FB254D5E] GoodName=Scooby-Doo! - Classic Creep Capers (U) [!] CRC=0C814EC4 58FE5CA8 Players=1 SaveType=Controller Pack Rumble=No [A485A6E9E30B7D55D23D8DD043770C64] GoodName=Shadow Man (E) (M3) [!] CRC=60C437E5 A2251EE3 SaveType=Controller Pack Rumble=Yes Players=1 CountPerOp=1 [235511BBDB21AF5A767BDB7502A80F06] GoodName=Shadow Man (F) [!] CRC=EA06F8C3 07C2DEED SaveType=Controller Pack Rumble=Yes Players=1 CountPerOp=1 [AF40EF12CE923FF1C26E76CC9D9B9ED9] GoodName=Shadow Man (G) [!] CRC=84D5FD75 BBFD3CDF SaveType=Controller Pack Rumble=Yes Players=1 CountPerOp=1 [CFBDC1C5E419FF162DF02A0065D9BC1D] GoodName=Shadow Man (G) [b1] CRC=84D5FD75 BBFD3CDF RefMD5=AF40EF12CE923FF1C26E76CC9D9B9ED9 [630776E478E00CDA1D09BAB55656ACA7] GoodName=Shadow Man (G) [b2] CRC=84D5FD75 BBFD3CDF RefMD5=AF40EF12CE923FF1C26E76CC9D9B9ED9 [0802F5BB4004D8948A6C0B51C8857B74] GoodName=Shadow Man (G) [f1] (NTSC) CRC=720278EC 594B7975 RefMD5=AF40EF12CE923FF1C26E76CC9D9B9ED9 [B457298B87B85BBF950F24867DAA9475] GoodName=Shadow Man (U) [!] CRC=3A4760B5 2D74D410 SaveType=Controller Pack Rumble=Yes Players=1 CountPerOp=1 [474647AEDFA95AEF73229A2784897EDD] GoodName=Shadow Man (U) [b1] CRC=3A4760B5 2D74D410 RefMD5=B457298B87B85BBF950F24867DAA9475 [5AE3BB3604539ABDEBA639E5892BD60E] GoodName=Shadow Man (U) [b2] CRC=3A4760B5 2D74D410 RefMD5=B457298B87B85BBF950F24867DAA9475 [22A689C97FAEDF39A8F115DB8F71830C] GoodName=Shadow Man (U) [b3] CRC=82342320 BC65A550 RefMD5=B457298B87B85BBF950F24867DAA9475 [C76828840668B6F3D4670CF4AD89C4AA] GoodName=Shadow Man (U) [t1] CRC=82342320 BC65A550 RefMD5=B457298B87B85BBF950F24867DAA9475 [A06E757CF1930B29FA4C0B5C9F31335F] GoodName=Shadowgate 64 - Trials Of The Four Towers (E) (M2) (Ita-Spa) [!] CRC=02B46F55 61778D0B Players=1 Rumble=No SaveType=Controller Pack [11169A32D449EC3A8903CA8A9D69A6AA] GoodName=Shadowgate 64 - Trials Of The Four Towers (E) (M3) (Fre-Ger-Dut) [!] CRC=2BC1FCF2 7B9A0DF4 Players=1 Rumble=No SaveType=Controller Pack [E8955C3B743FDDFE403E52E769E9853F] GoodName=Shadowgate 64 - Trials Of The Four Towers (E) [!] CRC=D84EEA84 45B2F1B4 Players=1 Rumble=No SaveType=Controller Pack [5582CF3BB6E6B11D6D97F6FDD1EE9A3B] GoodName=Shadowgate 64 - Trials Of The Four Towers (E) [f1] (NTSC) CRC=80203B94 57B7F424 RefMD5=E8955C3B743FDDFE403E52E769E9853F [C4F4CA4FFA94A870D0A3E18B74FE9FDE] GoodName=Shadowgate 64 - Trials Of The Four Towers (J) [b1] CRC=CCEDB696 D3883DB4 RefMD5=E8955C3B743FDDFE403E52E769E9853F [66C31F31A386320F61AAF8F5F7936053] GoodName=Shadowgate 64 - Trials Of The Four Towers (J) [b2] CRC=CCEDB696 D3883DB4 RefMD5=1960A3879FADF2C5EFF5BEB47E0E1441 [1960A3879FADF2C5EFF5BEB47E0E1441] GoodName=Shadowgate 64 - Trials Of The Four Towers (J) CRC=CCEDB696 D3883DB4 Players=1 Rumble=No SaveType=Controller Pack [407A1A18BD7DBE0485329296C3F84EB8] GoodName=Shadowgate 64 - Trials Of The Four Towers (U) (M2) [!] CRC=036897CE E0D4FA54 Players=1 Rumble=No SaveType=Controller Pack [3B21996F8C6496903C01DCBD77DDD6EE] GoodName=Shadowgate 64 - Trials Of The Four Towers (U) (M2) [f1] (PAL) CRC=015BB81E F105AC82 RefMD5=407A1A18BD7DBE0485329296C3F84EB8 [3D8F438057CB98F3C9E1472ABFF61610] GoodName=Shadowgate 64 - Trials Of The Four Towers (U) (M2) [f2] (PAL) CRC=123D0F44 CF60A446 RefMD5=407A1A18BD7DBE0485329296C3F84EB8 [F6B0E57512FDDD06345DD41B7C73B228] GoodName=Shag'a'Delic Demo by Steve and NEP (PD) CRC=9D9C362D 5BE66B08 [13893DB9E919C4E7CF0C0B0064CCB554] GoodName=Shigesato Itoi's No. 1 Bass Fishing! Definitive Edition (J) [!] CRC=D137A2CA 62B65053 Players=1 Rumble=Yes CountPerOp=1 [16EC788C8A4E7EEE268FDF9072A4F0D4] GoodName=Shigesato Itoi's No. 1 Bass Fishing! Definitive Edition (J) [b1] CRC=D137A2CA 62B65053 RefMD5=13893DB9E919C4E7CF0C0B0064CCB554 [13D9514A4D208DC6C7B0C833F68114D2] GoodName=Shin Nihon Pro Wrestling - Toukon Road - Brave Spirits (J) [!] CRC=EF703CA4 4D4A9AC9 Players=4 [DC1A78608B19DBE2AE3DC0CAD9B79472] GoodName=Shin Nihon Pro Wrestling - Toukon Road - Brave Spirits (J) [b1] CRC=EF703CA4 4D4A9AC9 RefMD5=13D9514A4D208DC6C7B0C833F68114D2 [113044B16B75F98792BF9C20C6B6282B] GoodName=Shin Nihon Pro Wrestling - Toukon Road 2 - The Next Generation (J) [!] CRC=551C7F43 9149831C Players=4 [37149C4064A1D120B9F4F5482A915262] GoodName=Shuffle Puck 64 (PD) CRC=F7DF7D0D ED52018F [244BEA64EA209990E9C69A830B507135] GoodName=Sim City 2000 (J) [!] CRC=B1D5280C 4BA7BC2A Players=1 Rumble=No [FD2D06E59BF17A1BD1DA98454F83AB0D] GoodName=Sim City 2000 (J) [b1] CRC=B1D5280C 4BA7BC2A RefMD5=244BEA64EA209990E9C69A830B507135 [F0AD16AA47258818D320A5217F2E6B1E] GoodName=Sim City 2000 (J) [b1][o1] CRC=B1D5280C 4BA7BC2A RefMD5=244BEA64EA209990E9C69A830B507135 [A698B3419600E7E283AA1313FB2522CF] GoodName=Sim City 2000 (J) [b2] CRC=B1D5280C 4BA7BC2A RefMD5=244BEA64EA209990E9C69A830B507135 [65FC73D7ABFFABAFFF3C35FF3CB60DE2] GoodName=Sim City 2000 (J) [h1C] CRC=B1D5280C 4BA7BC2A RefMD5=244BEA64EA209990E9C69A830B507135 [137471D67DC8847815E327A73EA30068] GoodName=Sim City 2000 (J) [o1] CRC=B1D5280C 4BA7BC2A RefMD5=244BEA64EA209990E9C69A830B507135 [973DE87CFC38353259F3B1F6678FEB76] GoodName=Sim City 2000 (J) [o1][h1C] CRC=B1D5280C 4BA7BC2A RefMD5=244BEA64EA209990E9C69A830B507135 [3E6FF36AE59F9261ED275FEABBF76CED] GoodName=Simon for N64 V0.1a by Jean-Luc Picard (POM '99) (PD) CRC=18531B7D 074AF73E SaveType=Controller Pack Status=1 [F7F44996DD1140469C6C866DA0AFFAD7] GoodName=Sinus (PD) CRC=C603175E ACADF5EC Status=3 Players=0 Rumble=No SaveType=None [3194C65208047C938EF443325E1E73C1] GoodName=Sitero Demo by Renderman (PD) CRC=9A6CF2F5 D5F365EE [B8D4B92E66A312708626B3216DE07A3A] GoodName=Snobow Kids (J) [!] CRC=84FC04FF B1253CE9 SaveType=Controller Pack Players=4 Rumble=Yes [A29129B8C044D8A825F7F3780153FCC7] GoodName=Snobow Kids (J) [h1C] CRC=84FC04FF B1253CE9 RefMD5=B8D4B92E66A312708626B3216DE07A3A [4379C26BF067F7161BC6629445E22188] GoodName=Snobow Kids (J) [h2C] CRC=84FC04FF B1253CE9 RefMD5=B8D4B92E66A312708626B3216DE07A3A [F7E66DA23C8BB8E59F641A636A9CAE82] GoodName=Snow Speeder (J) [!] CRC=2EF4D519 C64A0C5E SaveType=Eeprom 4KB Players=4 Rumble=Yes [F0FE973338C7170D54CB41602B9D48A3] GoodName=Snow Speeder (J) [b1] CRC=2EF4D519 C64A0C5E RefMD5=F7E66DA23C8BB8E59F641A636A9CAE82 [AB4382E583AE139EEDBAFCE5FA87E4C8] GoodName=Snowboard Kids (E) [!] CRC=5FD7CDA0 D9BB51AD SaveType=Controller Pack Players=4 Rumble=Yes [55D13DC1512B1A3656DB8130E59E31D2] GoodName=Snowboard Kids (E) [h1C] CRC=5FD7CDA0 D9BB51AD RefMD5=AB4382E583AE139EEDBAFCE5FA87E4C8 [EB31F4F9C1FE26A3A663F74E9790516E] GoodName=Snowboard Kids (U) [!] CRC=DBF4EA9D 333E82C0 SaveType=Controller Pack Players=4 Rumble=Yes [FB1F9F093F6081E5695F688B9EFD4095] GoodName=Snowboard Kids (U) [b1] CRC=DBF4EA9D 333E82C0 RefMD5=EB31F4F9C1FE26A3A663F74E9790516E [4B6914D5552E4FF348FB590D52A6DF8A] GoodName=Snowboard Kids (U) [b2] CRC=DBF4EA9D 333E82C0 RefMD5=EB31F4F9C1FE26A3A663F74E9790516E [349FF1B4AE28E31A2B2DC93D76A5219E] GoodName=Snowboard Kids (U) [b3] CRC=DBF4EA9D 333E82C0 RefMD5=EB31F4F9C1FE26A3A663F74E9790516E [759DF0ADF7F78D603AD344C89F360E32] GoodName=Snowboard Kids (U) [h1C] CRC=DBF4EA9D 333E82C0 RefMD5=EB31F4F9C1FE26A3A663F74E9790516E [641A6513E4FE77B88085478F99F1857D] GoodName=Snowboard Kids (U) [t1] CRC=A1E78A63 022A67C9 RefMD5=EB31F4F9C1FE26A3A663F74E9790516E [47B5E3955D54F969941533F26691AB38] GoodName=Snowboard Kids 2 (E) [!] CRC=C2751D1A F8C19BFF SaveType=Eeprom 4KB Players=4 Rumble=Yes [08E1152E9D9742E9BBF6C224B6958F2D] GoodName=Snowboard Kids 2 (U) [!] CRC=930C29EA 939245BF SaveType=Controller Pack Players=4 Rumble=Yes [22C7FCDBC74DE237E0FC7778D8A6E671] GoodName=Snowboard Kids 2 (U) [f1] (PAL) CRC=D3DF2FEE 8090B699 RefMD5=08E1152E9D9742E9BBF6C224B6958F2D [835B149A0A312262A69DAA010728A825] GoodName=Snowboard Kids 2 (U) [f2] (PAL) CRC=D3DF2FEE 8090B699 RefMD5=08E1152E9D9742E9BBF6C224B6958F2D [B7240CADA85A35B6C872A865F6A018A1] GoodName=Soncrap Intro by RedboX (PD) CRC=AAA66229 98CA5CAA [7D47911B5C3D91A303EF19E764F3C02B] GoodName=Sonic Wings Assault (J) [!] CRC=22212351 4046594B Players=4 Rumble=Yes SaveType=Eeprom 4KB [40CC2085A5C12456BEF830B047068326] GoodName=South Park (E) (M3) [!] CRC=20B53662 7B61899F Players=4 Rumble=Yes SaveType=Controller Pack [26C99A528862342791193CA6AAACC9DD] GoodName=South Park (E) (M3) [b1] CRC=20B53662 7B61899F RefMD5=40CC2085A5C12456BEF830B047068326 [7C63BF480D1F84FC2C0D4A959154FA27] GoodName=South Park (E) (M3) [h1C] CRC=20B53662 7B61899F RefMD5=40CC2085A5C12456BEF830B047068326 [2C94A246E701D667BA807DAB6C9771E2] GoodName=South Park (G) [!] CRC=91B66D42 16AC4E46 Players=4 Rumble=Yes SaveType=Controller Pack [1730119B0455EF89C4E495DEC8E950A5] GoodName=South Park (U) [!] CRC=7ECBE939 3C331795 Players=4 Rumble=Yes SaveType=Controller Pack [BE22C6B95553B9CD5E0934B66BC36C84] GoodName=South Park (U) [b1] CRC=7ECBE939 3C331795 RefMD5=1730119B0455EF89C4E495DEC8E950A5 [6917DEEEBC2FA9E185582215E7460271] GoodName=South Park (U) [f1] (PAL) CRC=42EDB4BB DEA42760 RefMD5=1730119B0455EF89C4E495DEC8E950A5 [AC52781C224E9EB0B8F408A782FAC22A] GoodName=South Park (U) [t1] CRC=018CF733 5409AD45 RefMD5=1730119B0455EF89C4E495DEC8E950A5 [F1AE48B778C8431A50C37EB1ED96B120] GoodName=South Park - Chef's Luv Shack (E) [!] CRC=C00CA948 8E60D34B Players=4 Rumble=No SaveType=None [6AF573EB055648A8542AA82D9524FB2F] GoodName=South Park - Chef's Luv Shack (U) [!] CRC=C00CA948 8E60D34B Players=4 Rumble=No SaveType=None [FE2AA269FD3EC81C358845BBA6CA0167] GoodName=South Park - Chef's Luv Shack (U) [f1] (Country Check) CRC=C19EA928 226B2610 RefMD5=6AF573EB055648A8542AA82D9524FB2F [C33FA02791077A71B0AFE1CFED47C180] GoodName=South Park Rally (E) [!] CRC=4F8AFC3A F7912DF2 Players=4 Rumble=Yes SaveType=Controller Pack [1C494719032FF99382B167C43FB11762] GoodName=South Park Rally (U) [!] CRC=07F3B276 EC8F3D39 Players=4 Rumble=Yes SaveType=Controller Pack [CD17388E175BCF0F621EE9313D5A1C8D] GoodName=South Park Rally (U) [f1] (PAL) CRC=A4C8852A E512045C RefMD5=1C494719032FF99382B167C43FB11762 [5DA2C22480A3F6FE9BEF9C6AD4852D37] GoodName=South Park Rally (U) [t1] CRC=BE37CDC8 A88CB420 RefMD5=1C494719032FF99382B167C43FB11762 [DDA7AA9C5D1E617DA183750F82B55780] GoodName=South Park Rally (U) [t2] CRC=BE37CDC8 A88CB420 RefMD5=1C494719032FF99382B167C43FB11762 [7F9CDBBB1AAAAF0983C64988EF9C58BE] GoodName=Space Dynamites (J) [!] CRC=37463412 EAC5388D Players=2 SaveType=None Rumble=No [19BA66FEE088181BBB0ACA6894BB8971] GoodName=Space Dynamites (J) [b1] CRC=37463412 EAC5388D RefMD5=7F9CDBBB1AAAAF0983C64988EF9C58BE [C72417E0F8F043F9F11851633C4B1A57] GoodName=Space Invaders (U) [!] CRC=EBFE2397 FF74DA34 SaveType=Controller Pack Players=2 Rumble=Yes [63FA04C30C4A0FBE162BCDEC3CB42888] GoodName=Space Invaders (U) [f1] (PAL) CRC=00EDCC34 75D2DEA0 RefMD5=C72417E0F8F043F9F11851633C4B1A57 [8C87830FF258893C453D70A90F62019F] GoodName=Space Invaders (U) [t1] CRC=33828616 933456E0 RefMD5=C72417E0F8F043F9F11851633C4B1A57 [4EE1DC953B1FF209811CF2808D78F064] GoodName=Space Invaders (U) [t2] CRC=138D7E56 72BCC9D9 RefMD5=C72417E0F8F043F9F11851633C4B1A57 [FCA7AFCADCF5E5545A62919BA94DAD18] GoodName=Space Station Silicon Valley (E) (M7) [!] CRC=FC70E272 08FFE7AA Players=1 Rumble=Yes SaveType=Eeprom 4KB [5919371BCA053C750D1CB357C58953A5] GoodName=Space Station Silicon Valley (E) (M7) [b1] CRC=FC70E272 08FFE7AA RefMD5=FCA7AFCADCF5E5545A62919BA94DAD18 [E66ED1CC4AB95D0872BB2EBC49B206C4] GoodName=Space Station Silicon Valley (J) [!] CRC=BFE23884 EF48EAAF Players=1 Rumble=Yes SaveType=Eeprom 4KB [868B37D1B66D1D994E2BAD4E218BF129] GoodName=Space Station Silicon Valley (U) [!] CRC=BFE23884 EF48EAAF Players=1 Rumble=Yes SaveType=Eeprom 4KB [4A8F8EBB93AF51878C8FB9057AD5F43C] GoodName=Space Station Silicon Valley (U) [f1] (PAL) CRC=47F09853 29CCE24F RefMD5=868B37D1B66D1D994E2BAD4E218BF129 [7AE0BA601FD72514C984BC80EE6BAB8E] GoodName=Space Station Silicon Valley (U) [f2] (PAL) CRC=BFE23884 EF48EAAF RefMD5=868B37D1B66D1D994E2BAD4E218BF129 [630E4122B0743A29C246DA2C257F92DA] GoodName=Spacer by Memir (POM '99) (PD) CRC=A3A044B5 6DB1BF5E Players=4 Status=3 SaveType=None CountPerOp=1 [3A6A249843DDEAFFFD334AB3C5931F8D] GoodName=Spacer by Memir (POM '99) (PD) [t1] CRC=1B6FAB59 99199038 RefMD5=630E4122B0743A29C246DA2C257F92DA [A8E8AD9B1A05205085DCB4EADBE38020] GoodName=Spacer by Memir (POM '99) (PD) [t2] CRC=1B6FAB59 99199038 RefMD5=630E4122B0743A29C246DA2C257F92DA [E8D70E021C40078F8A82318AE8165A73] GoodName=Spacer by Memir (POM '99) (PD) [t2][b1] CRC=1B6FAB59 99199038 RefMD5=630E4122B0743A29C246DA2C257F92DA [44D7F3FC23428913D10E68017ACB097F] GoodName=Spice Girls Rotator Demo by RedboX (PD) [a1] CRC=8F5179C4 803526DC [1934618C99A70DD8E74305C6DB06CAF3] GoodName=Spice Girls Rotator Demo by RedboX (PD) CRC=8F5179C4 803526DC [7F1991B8861E7E532EC21ECF2AF82191] GoodName=Spider-Man (U) [!] CRC=A60ED171 3D85D06E Players=1 Rumble=Yes SaveType=Controller Pack [8C5D52229DA5A223EA2DA093A5B9D31B] GoodName=Spider-Man (U) [t1] CRC=3E6250B2 12F5155C RefMD5=7F1991B8861E7E532EC21ECF2AF82191 [041CE6116C560C239023EFB88705DA94] GoodName=Split! 3D Demo by Lem (PD) CRC=60B8BCC9 2EC4DFB6 [515C86480A7FC1238BFE252BD2C53B36] GoodName=Sporting Clays by Charles Doty (PD) CRC=E584FE34 9D91B1E2 Players=1 SaveType=None Status=3 [993CCC0961CFD9F1342AD99A1BA2E282] GoodName=Sporting Clays by Charles Doty (PD) [a1] CRC=5402C27E 60021F86 RefMD5=515C86480A7FC1238BFE252BD2C53B36 [094FE60C44F35BDC7FBE85339E9C4470] GoodName=Sporting Clays by Charles Doty (PD) [b1] CRC=E584FE34 9D91B1E2 RefMD5=515C86480A7FC1238BFE252BD2C53B36 [446D5215C4D34EB8AB0F355F324B8D0E] GoodName=Star Fox 64 (J) [!] CRC=FFCAA7C1 68858537 Players=4 Rumble=Yes SaveType=Eeprom 4KB [C4179723DC6E5D319C97F2F66AB05162] GoodName=Star Fox 64 (J) [f1] CRC=FFCAA7C1 68858537 RefMD5=446D5215C4D34EB8AB0F355F324B8D0E [D0DD14F100B3825536DB8F32C332457F] GoodName=Star Fox 64 (J) [o1] CRC=FFCAA7C1 68858537 RefMD5=446D5215C4D34EB8AB0F355F324B8D0E [D43D1E41DBA17FFF92829FD2495B7619] GoodName=Star Fox 64 (J) [o1][f1] CRC=FFCAA7C1 68858537 RefMD5=446D5215C4D34EB8AB0F355F324B8D0E [0C9F7FA54CA36BFC6D8BE4187E4ABD99] GoodName=Star Fox 64 (J) [o2][f1] CRC=FFCAA7C1 68858537 RefMD5=446D5215C4D34EB8AB0F355F324B8D0E [B74F70654B2FE3FC573D3BC913A62268] GoodName=Star Fox 64 (J) [o3][f1] CRC=FFCAA7C1 68858537 RefMD5=446D5215C4D34EB8AB0F355F324B8D0E [AF8A5A437F286FA230D99507109C79D9] GoodName=Star Fox 64 (J) [t1] (Boost) CRC=305AB328 F72F632A RefMD5=446D5215C4D34EB8AB0F355F324B8D0E [5E3B1FAC7C16D30499B3FAA36CAF98FD] GoodName=Star Fox 64 (J) [t2] (No Damage-Unbreakable Wings) CRC=1180A247 EBE234B3 RefMD5=446D5215C4D34EB8AB0F355F324B8D0E [CAF9A78DB13EE00002FF63A3C0C5EABB] GoodName=Star Fox 64 (U) (V1.0) [!] CRC=A7D015F8 2289AA43 Players=4 Rumble=Yes SaveType=Eeprom 4KB [5653B6DDAE328C870138E71EC30122A1] GoodName=Star Fox 64 (U) (V1.0) [f1] CRC=A7D015F8 2289AA43 RefMD5=CAF9A78DB13EE00002FF63A3C0C5EABB [ECB9184142D288B40BCD198FB191A275] GoodName=Star Fox 64 (U) (V1.0) [f1][h1C] CRC=A7D015F8 2289AA43 RefMD5=CAF9A78DB13EE00002FF63A3C0C5EABB [E566D58641BEDD25C450E443608EB46E] GoodName=Star Fox 64 (U) (V1.0) [f1][o1] CRC=A7D015F8 2289AA43 RefMD5=CAF9A78DB13EE00002FF63A3C0C5EABB [D81FFD06311AB9334858CCC28EFE992A] GoodName=Star Fox 64 (U) (V1.0) [f2] (PAL) CRC=CBD83828 6FDEBEDC RefMD5=CAF9A78DB13EE00002FF63A3C0C5EABB [7052F9C1BE69B103D6BE3DE61A94F861] GoodName=Star Fox 64 (U) (V1.0) [h1C] CRC=A7D015F8 2289AA43 RefMD5=CAF9A78DB13EE00002FF63A3C0C5EABB [80E9D39B21E537FF53FD362B7272F255] GoodName=Star Fox 64 (U) (V1.0) [o1][f1] CRC=A7D015F8 2289AA43 RefMD5=CAF9A78DB13EE00002FF63A3C0C5EABB [06DB24BEFB76C04D06D4DDC3A50D5319] GoodName=Star Fox 64 (U) (V1.0) [o2][f1] CRC=CBD83828 6FDEBEDC RefMD5=CAF9A78DB13EE00002FF63A3C0C5EABB [831DC9EEB9114912ABABC15B6B14DA4B] GoodName=Star Fox 64 (U) (V1.0) [o3][f1] CRC=A7D015F8 2289AA43 RefMD5=CAF9A78DB13EE00002FF63A3C0C5EABB [23E5AF30267036A69A8328F005DF07B1] GoodName=Star Fox 64 (U) (V1.0) [t1] CRC=CBD83828 6FDEBEDC RefMD5=CAF9A78DB13EE00002FF63A3C0C5EABB [3D38BCD5B57CEECB0985609CCE940FFA] GoodName=Star Fox 64 (U) (V1.0) [t2] (Boost) CRC=1B80E202 CB5AE74F RefMD5=CAF9A78DB13EE00002FF63A3C0C5EABB [63CE29BBA130AACD05402EFC06C0DC89] GoodName=Star Fox 64 (U) (V1.0) [t3] (No Damage-Unbreakable Wings) CRC=F6621BFB 186D11A6 RefMD5=CAF9A78DB13EE00002FF63A3C0C5EABB [741A94EEE093C4C8684E66B89F8685E8] GoodName=Star Fox 64 (U) (V1.1) [!] CRC=BA780BA0 0F21DB34 Players=4 Rumble=Yes SaveType=Eeprom 4KB [F0CD3B2DB0F20FFDD64BF081176EB421] GoodName=Star Fox 64 (U) (V1.1) [t1] (Energy) CRC=C3CA0BA3 25397DC8 RefMD5=741A94EEE093C4C8684E66B89F8685E8 [FFA562936DB863EA02204F9F514B6067] GoodName=Star Fox 64 (U) (V1.1) [t2] (Boost) CRC=8264014A 3C9FBFC1 RefMD5=741A94EEE093C4C8684E66B89F8685E8 [14A21928BE46C18BA04161305E89F5DE] GoodName=Star Soldier - Vanishing Earth (J) [!] CRC=B703EB23 28AAE53A Players=1 Rumble=Yes SaveType=Eeprom 4KB [565DA8D53422F16207ECF11A81D2E649] GoodName=Star Soldier - Vanishing Earth (J) [b1] CRC=B703EB23 28AAE53A RefMD5=14A21928BE46C18BA04161305E89F5DE [006CAFEC9BA13060D4D2F0BE211081BD] GoodName=Star Soldier - Vanishing Earth (J) [h1C] CRC=B703EB23 28AAE53A RefMD5=14A21928BE46C18BA04161305E89F5DE [97275F6585547462A73910E9A80E4067] GoodName=Star Soldier - Vanishing Earth (J) [o1] CRC=B703EB23 28AAE53A RefMD5=14A21928BE46C18BA04161305E89F5DE [CD40D9DD238E23AD79DC4484F77A7C4A] GoodName=Star Soldier - Vanishing Earth (J) [t1] CRC=31100ADC 86E97D63 RefMD5=14A21928BE46C18BA04161305E89F5DE [EE045A2E9F924CD8FD00018B50E46650] GoodName=Star Soldier - Vanishing Earth (U) [!] CRC=DDD93C85 DAE381E8 Players=1 Rumble=Yes SaveType=Eeprom 4KB [A68B65E6B4BC976AD9DEAB335DE3BF70] GoodName=Star Soldier - Vanishing Earth (U) [t1] CRC=DDD982EF 3B0D6FEC RefMD5=EE045A2E9F924CD8FD00018B50E46650 [CA28A3645FC7AD969EBD75C5D6506E7A] GoodName=Star Twins (J) [!] CRC=F163A242 F2449B3B Players=4 SaveType=Flash RAM Rumble=Yes [E1376F9B151EE3DA3E8ED52D970480EF] GoodName=Star Wars - Rogue Squadron (E) (M3) (V1.0) (Language Select Hack) CRC=7EE0E945 7D8FEE20 RefMD5=7F919D2E35CBE561E139AE8FE93ACA86 [7F919D2E35CBE561E139AE8FE93ACA86] GoodName=Star Wars - Rogue Squadron (E) (M3) (V1.0) [!] CRC=7EE0E8BB 49E411AA Players=1 SaveType=Eeprom 4KB Rumble=Yes [231F61E0D66A70B173BB22672EE67BD6] GoodName=Star Wars - Rogue Squadron (E) (M3) (V1.0) [t1] CRC=5E6508BB F321C996 RefMD5=7F919D2E35CBE561E139AE8FE93ACA86 [A9DD498E6A28F55311CE4EF057E164B8] GoodName=Star Wars - Rogue Squadron (E) (M3) (V1.1) [!] CRC=219191C1 33183C61 Players=1 SaveType=Eeprom 4KB Rumble=Yes [6560FFC9208A31F0518036F7937B53DA] GoodName=Star Wars - Rogue Squadron (U) (M3) (Language Select Hack) CRC=66A24A12 22AF6AC2 RefMD5=47CAC4E2A6309458342F21A9018FFBF0 [47CAC4E2A6309458342F21A9018FFBF0] GoodName=Star Wars - Rogue Squadron (U) (M3) [!] CRC=66A24BEC 2EADD94F Players=1 SaveType=Eeprom 4KB Rumble=Yes [0583AD9FDD1E3D10076AAB40E5B4E7BB] GoodName=Star Wars - Rogue Squadron (U) (M3) [b1] CRC=66A24BEC 2EADD94F RefMD5=47CAC4E2A6309458342F21A9018FFBF0 [4903C39007AEACC113FE0E9E4BBE4711] GoodName=Star Wars - Rogue Squadron (U) (M3) [t1] CRC=165CBDA2 05A62246 RefMD5=47CAC4E2A6309458342F21A9018FFBF0 [591CF8E672C9CC0FE9C871CC56DCC854] GoodName=Star Wars - Shadows of the Empire (E) [!] CRC=4D486681 AB7D9245 Players=1 Rumble=No SaveType=Eeprom 4KB [818737338B3F1D87B7E1B7FB55057BB5] GoodName=Star Wars - Shadows of the Empire (E) [b1] CRC=4D486681 AB7D9245 RefMD5=591CF8E672C9CC0FE9C871CC56DCC854 [E83325EC6E8520B0CBDB49B52418FE4E] GoodName=Star Wars - Shadows of the Empire (E) [b2] CRC=4D486681 AB7D9245 RefMD5=591CF8E672C9CC0FE9C871CC56DCC854 [64E59BA2F7BA4DAFFDD5934F818DC7DA] GoodName=Star Wars - Shadows of the Empire (E) [b3] CRC=4D486681 AB7D9245 RefMD5=591CF8E672C9CC0FE9C871CC56DCC854 [554BFCC857BE49B2AACD077E6059B281] GoodName=Star Wars - Shadows of the Empire (E) [b4] CRC=4D486681 AB7D9245 RefMD5=591CF8E672C9CC0FE9C871CC56DCC854 [30BDF5405A8C615DC924DB9480E996B7] GoodName=Star Wars - Shadows of the Empire (E) [o1] CRC=4D486681 AB7D9245 RefMD5=591CF8E672C9CC0FE9C871CC56DCC854 [5CCE8AD5F86E8A373A7525DC4C7E6705] GoodName=Star Wars - Shadows of the Empire (U) (V1.0) [!] CRC=264D7E5C 18874622 Players=1 Rumble=No SaveType=Eeprom 4KB [C88637DCC7A00FED6297B61E79CF75A9] GoodName=Star Wars - Shadows of the Empire (U) (V1.0) [b1] CRC=BC3C9F6C 93B3CB13 RefMD5=5CCE8AD5F86E8A373A7525DC4C7E6705 [C68CB260A7FD8D177640FA487DCCACF6] GoodName=Star Wars - Shadows of the Empire (U) (V1.0) [b2] CRC=BDA75F12 BDDC1661 RefMD5=5CCE8AD5F86E8A373A7525DC4C7E6705 [7527B90543E3D6042A72619818B47145] GoodName=Star Wars - Shadows of the Empire (U) (V1.0) [o1] CRC=264D7E5C 18874622 RefMD5=5CCE8AD5F86E8A373A7525DC4C7E6705 [C69FA82E2CA2460000C629E9D46D4DC2] GoodName=Star Wars - Shadows of the Empire (U) (V1.0) [t1] CRC=BC3C9F6C 93B3CB13 RefMD5=5CCE8AD5F86E8A373A7525DC4C7E6705 [F8906B10BAE363ACB170FA841A88E96C] GoodName=Star Wars - Shadows of the Empire (U) (V1.0) [t2] CRC=BDA75F12 BDDC1661 RefMD5=5CCE8AD5F86E8A373A7525DC4C7E6705 [FA635E837275D28FD5A24D5675BA42C8] GoodName=Star Wars - Shadows of the Empire (U) (V1.1) [!] CRC=4147B091 63251060 Players=1 SaveType=Eeprom 4KB Rumble=No [E8EE7D44858C1AB90C1F48A649DC98B6] GoodName=Star Wars - Shadows of the Empire (U) (V1.1) [b1] CRC=D3E792A5 05D39C97 RefMD5=FA635E837275D28FD5A24D5675BA42C8 [64B4FB2D4C49AE6902F13149C81CF2A1] GoodName=Star Wars - Shadows of the Empire (U) (V1.1) [o1] CRC=4147B091 63251060 RefMD5=FA635E837275D28FD5A24D5675BA42C8 [7BC08EAF55A645DE9226617C3F83B19F] GoodName=Star Wars - Shadows of the Empire (U) (V1.1) [t1] CRC=D3E792A5 05D39C97 RefMD5=FA635E837275D28FD5A24D5675BA42C8 [C7B40352AAD8D863D88D51672F9A0087] GoodName=Star Wars - Shadows of the Empire (U) (V1.2) [!] CRC=4DD7ED54 74F9287D Players=1 Rumble=No SaveType=Eeprom 4KB [3FE2B38E18152162A34E3002DEA071F7] GoodName=Star Wars - Shadows of the Empire (U) (V1.2) [b1] CRC=D3E792A5 05D39C97 RefMD5=C7B40352AAD8D863D88D51672F9A0087 [3BD4EE76D4CBB14D69BA628533BD7CBC] GoodName=Star Wars - Shadows of the Empire (U) (V1.2) [b2] CRC=D3E792A5 05D39C97 RefMD5=C7B40352AAD8D863D88D51672F9A0087 [CD2C0DFDAC5572988AAB98D125EEEB53] GoodName=Star Wars - Shadows of the Empire (U) (V1.2) [o1] CRC=4DD7ED54 74F9287D RefMD5=C7B40352AAD8D863D88D51672F9A0087 [8603B180E70B2A72EF77D46C2BEC2234] GoodName=Star Wars - Shutsugeki! Rogue Chuutai (J) [!] CRC=827E4890 958468DC Players=1 Rumble=No SaveType=Eeprom 4KB [5B6B6B0C8C9A40286DCF61706B6A05CB] GoodName=Star Wars - Teikoku no Kage (J) [!] CRC=FE24AC63 1B41AA17 RefMD5=8603B180E70B2A72EF77D46C2BEC2234 [B5FDFDF26E1F27EAF0BD849CAA4CC3B8] GoodName=Star Wars - Teikoku no Kage (J) [o1] CRC=FE24AC63 1B41AA17 RefMD5=8603B180E70B2A72EF77D46C2BEC2234 [222F1E75F70A654B642382989E024749] GoodName=Star Wars - Teikoku no Kage (J) [o2] CRC=FE24AC63 1B41AA17 RefMD5=8603B180E70B2A72EF77D46C2BEC2234 [0BD1F7BB9F4B02520E4E9285C809F099] GoodName=Star Wars Episode I - Battle for Naboo (E) [!] CRC=EAE6ACE2 020B4384 Players=1 Rumble=Yes SaveType=Eeprom 4KB [3CB88B934572E7520F35E5458798775B] GoodName=Star Wars Episode I - Battle for Naboo (U) [!] CRC=3D02989B D4A381E2 Players=1 Rumble=Yes SaveType=Eeprom 4KB [B4724120C269A1DC86991D34B1561F3D] GoodName=Star Wars Episode I - Battle for Naboo (U) [b1] CRC=3D02989B D4A381E2 RefMD5=3CB88B934572E7520F35E5458798775B [24E6E064454DE99C88EBA9F8C3574AF3] GoodName=Star Wars Episode I - Battle for Naboo (U) [t1] CRC=FD8F6875 42608FDC RefMD5=3CB88B934572E7520F35E5458798775B [6EF9FED309F28BD59B605F128869AA00] GoodName=Star Wars Episode I - Racer (E) (M3) [!] CRC=53ED2DC4 06258002 SaveType=Eeprom 16KB [8CC7E31925FBFA13A584F529E8912207] GoodName=Star Wars Episode I - Racer (E) (M3) [f1] (Save) CRC=166312CB C30220D2 RefMD5=6EF9FED309F28BD59B605F128869AA00 [7579AB0E79B1011479B88F2BF39D48E0] GoodName=Star Wars Episode I - Racer (J) [!] CRC=61F5B152 046122AB SaveType=Eeprom 16KB [CFA21E43DAC50DFF3122ABF3AF3511F8] GoodName=Star Wars Episode I - Racer (J) [b1] CRC=61F5B152 046122AB RefMD5=7579AB0E79B1011479B88F2BF39D48E0 [1EE8800A4003E7F9688C5A35F929D01B] GoodName=Star Wars Episode I - Racer (U) [!] CRC=72F70398 6556A98B SaveType=Eeprom 16KB [E4353B43CB4302B7A308A42D6BB04435] GoodName=Star Wars Episode I - Racer (U) [f1] (Save) CRC=86EDC3C1 E983A7BF RefMD5=1EE8800A4003E7F9688C5A35F929D01B [D6EED7BA15E4CF88B4D235A016B1C880] GoodName=Star Wars Episode I - Racer (U) [t1] CRC=C3193C16 53A19708 RefMD5=1EE8800A4003E7F9688C5A35F929D01B [81FE5AD03175B6F2D23DBF5A549B0CDA] GoodName=Star Wars Episode I - Racer (U) [t2] CRC=1C37BF54 AC368304 RefMD5=1EE8800A4003E7F9688C5A35F929D01B [0BE4958B3E8EED916307DC9F5DE3206D] GoodName=Star Wars Episode I - Racer (U) [t3] CRC=88C79381 85786A83 RefMD5=1EE8800A4003E7F9688C5A35F929D01B [F21C920F0A7BF42F80C38C39CD61BD60] GoodName=Star Wars Episode I - Racer (U) [t4] CRC=B722133E 5EECEC4D RefMD5=1EE8800A4003E7F9688C5A35F929D01B [3EB732A8D004263AD8EB0DA59A29582A] GoodName=StarCraft 64 (Beta) CRC=BC9B2CC3 4ED04DA5 Status=1 Players=2 SaveType=Flash RAM Rumble=Yes [432DF5EAC0BA573C6587A5BB4E51834A] GoodName=StarCraft 64 (Beta) [f1] CRC=BC9B2CC3 4ED04DA5 RefMD5=3EB732A8D004263AD8EB0DA59A29582A [30486A26C7B87CDBDB1A421493CC745A] GoodName=StarCraft 64 (Beta) [f2] (PAL) CRC=036A20D8 A99C4D3D RefMD5=3EB732A8D004263AD8EB0DA59A29582A [A9683B99E82271DBF84DDB59806E9423] GoodName=StarCraft 64 (Beta) [f3] (Country Code) CRC=BC9B2CC3 4ED04DA5 RefMD5=3EB732A8D004263AD8EB0DA59A29582A [72B60FAC5EE257FA387B43C57632D50C] GoodName=StarCraft 64 (E) [!] CRC=42CF5EA3 9A1334DF Status=1 Players=2 SaveType=Flash RAM Rumble=Yes [B75945407D7DEA00A2A29AD24056A416] GoodName=StarCraft 64 (E) [b1] CRC=42CF5EA3 9A1334DF RefMD5=72B60FAC5EE257FA387B43C57632D50C [762543CC6409C199FD50A3BCF545730D] GoodName=StarCraft 64 (E) [f1] (NTSC) CRC=C7501968 06533B11 RefMD5=72B60FAC5EE257FA387B43C57632D50C [559F71B861F639B6376D891E3023414B] GoodName=StarCraft 64 (U) [!] CRC=0684FBFB 5D3EA8A5 Status=1 Players=2 SaveType=Flash RAM Rumble=Yes [A9C393AA232B32798ADF378F4318F99F] GoodName=Starshot - Space Circus Fever (E) (M3) [!] CRC=D89E0E55 B17AA99A Players=1 SaveType=Eeprom 4KB Rumble=No [B23BFC7DC874DDAA2005F9AFF59A47FF] GoodName=Starshot - Space Circus Fever (E) (M3) [f1] (NTSC100%) CRC=287AAA27 8C2C02D8 RefMD5=A9C393AA232B32798ADF378F4318F99F [AA11E9E44B401794C37290896C9412AC] GoodName=Starshot - Space Circus Fever (E) (M3) [f2] (NTSC) CRC=AD199971 1075F279 RefMD5=A9C393AA232B32798ADF378F4318F99F [BAE518E0D40F846B17C510E4EA9E8C52] GoodName=Starshot - Space Circus Fever (E) (M3) [f3] (NTSC) CRC=ADD78971 A09C18CF RefMD5=A9C393AA232B32798ADF378F4318F99F [530B796EA3B1748841F9D057F3F9EFA8] GoodName=Starshot - Space Circus Fever (E) (M3) [t1] CRC=AD197171 04DB7E9E RefMD5=A9C393AA232B32798ADF378F4318F99F [42AF1992978229BBB5F560571708E25E] GoodName=Starshot - Space Circus Fever (U) (M3) [!] CRC=94EDA5B8 8673E903 Players=1 SaveType=Eeprom 4KB Rumble=No [BD22A79568534B42EAA3D8DB9A7C4C91] GoodName=Starshot - Space Circus Fever (U) (M3) [b1] CRC=94EDA5B8 8673E903 RefMD5=42AF1992978229BBB5F560571708E25E [E8B666A429FEDB2A1A1228CD450CD4FC] GoodName=Stunt Racer 64 (U) [!] CRC=9510D8D7 35100DD2 SaveType=Controller Pack Players=4 Rumble=Yes [14DDF19382385774F253049ABEAF01D2] GoodName=Summer64 Demo by Lem (PD) [b1] CRC=4794B85F 3EBD5B68 [1B1DC8B1DD950E70C0F532DD81C9A982] GoodName=Summer64 Demo by Lem (PD) CRC=4794B85F 3EBD5B68 [B3C1D4B9EC7DCD2922E681DBBC393915] GoodName=Super B-Daman - Battle Phoenix 64 (J) [!] CRC=F4646B69 C5751095 Players=2 Rumble=Yes [4168C145279EA29912BA0E35DCA35289] GoodName=Super Bomberman 2 by Rider (POM '99) (PD) CRC=BB214F79 8B88B16B Status=1 Players=4 [09C5B4D19364EFE48BB818087734978E] GoodName=Super Bowling (J) [!] CRC=F3F2F385 6E490C7F Players=4 Rumble=Yes [FA3A043997A3ACDF17337385B126BC04] GoodName=Super Bowling 64 (U) [!] CRC=AA1D215A 91CBBE9A Players=4 Rumble=Yes [7FCF424B960F4E429FD683A4B19B3356] GoodName=Super Fighter Demo Halley's Comet Software (PD) CRC=1AD61BB9 F1E2BE1A [A215BC1CE06960E0C469DB9520E907C6] GoodName=Super Irishley Drunk Giant WaLuigi 64 (Super Mario 64 Hack) CRC=635A42C5 BDC58EDC [45676429EF6B90E65B517129B700308E] GoodName=Super Mario 64 (E) (M3) [!] CRC=A03CF036 BCC1C5D2 SaveType=Eeprom 4KB Players=1 Rumble=No Status=4 [9EE432F07F1E4E9A13CD0090CCC5A94B] GoodName=Super Mario 64 (E) (M3) [b1] CRC=A03CF036 BCC1C5D2 RefMD5=45676429EF6B90E65B517129B700308E [225223ABF4BC1F3E38A45873BA94CEBC] GoodName=Super Mario 64 (E) (M3) [b2] CRC=A03CF036 BCC1C5D2 RefMD5=45676429EF6B90E65B517129B700308E [6A954E08533C13DBD7599068D03A3ADB] GoodName=Super Mario 64 (E) (M3) [h1C] CRC=A03CF036 BCC1C5D2 RefMD5=45676429EF6B90E65B517129B700308E [D1F6BC22557BF5607AA2E3C61BE44D59] GoodName=Super Mario 64 (E) (M3) [o1] CRC=A03CF036 BCC1C5D2 RefMD5=45676429EF6B90E65B517129B700308E [DF2031338C9B0AB8317661AFA64E5F9E] GoodName=Super Mario 64 (E) (M3) [o2] CRC=A03CF036 BCC1C5D2 RefMD5=45676429EF6B90E65B517129B700308E [121A19E2A547C554155433788986033C] GoodName=Super Mario 64 (E) (M3) [t1] CRC=77C44B0F 5E8948A3 RefMD5=45676429EF6B90E65B517129B700308E [994D171A0154ABE747338890AF179252] GoodName=Super Mario 64 (E) (M3) [t2] CRC=16510823 E2EEE387 RefMD5=45676429EF6B90E65B517129B700308E [85D61F5525AF708C9F1E84DCE6DC10E9] GoodName=Super Mario 64 (J) [!] CRC=4EAA3D0E 74757C24 SaveType=Eeprom 4KB Players=1 Rumble=No Status=4 [DBF7F4D881E1DF604C41367B04233E74] GoodName=Super Mario 64 (J) [h1C] CRC=4EAA3D0E 74757C24 RefMD5=85D61F5525AF708C9F1E84DCE6DC10E9 [E458F74E694B2916EBA9818103F7CF13] GoodName=Super Mario 64 (U) (Enable Hidden Scroller Hack) CRC=DACDE68E 7381B3C9 RefMD5=45676429EF6B90E65B517129B700308E [FF5A05FFDE29707C15D89E807ED66B81] GoodName=Super Mario 64 (U) (No Cap Hack) CRC=5B5DA9FB 11EEE5E5 RefMD5=45676429EF6B90E65B517129B700308E [6C5AEE2BE768E581038F3B211D7F6066] GoodName=Super Mario 64 (U) (Silver Mario Hack) CRC=658E2804 443386FA RefMD5=45676429EF6B90E65B517129B700308E [20B854B239203BAF6C961B850A4A51A2] GoodName=Super Mario 64 (U) [!] CRC=635A2BFF 8B022326 SaveType=Eeprom 4KB Players=1 Rumble=No Status=4 [597204EE766B93C1AE33B7FC0739E170] GoodName=Super Mario 64 (U) [T+Rus] CRC=267FBAD5 7593FADC RefMD5=20B854B239203BAF6C961B850A4A51A2 [E51A6FF9B2DBBD216158CACFF35EB215] GoodName=Super Mario 64 (U) [T+SpaFinal_Mistergame] CRC=635A42C5 BDC58EDC RefMD5=20B854B239203BAF6C961B850A4A51A2 [99BD941850AA68440B886EA05539F7DC] GoodName=Super Mario 64 (U) [T+SpaFinal_Mistergame][a1] CRC=635A42C5 BDC58EDC RefMD5=20B854B239203BAF6C961B850A4A51A2 [35BBAF4869D0B0D2147D35F1EC3CF2CA] GoodName=Super Mario 64 (U) [T-Ita1.0final_beta1_Rulesless] CRC=819D5B33 A5096295 RefMD5=20B854B239203BAF6C961B850A4A51A2 [CDACC6FE2CC7851A1110A60CE76FBDFB] GoodName=Super Mario 64 (U) [T+Ita2.0final_beta2_Rulesless] CRC=490A59F2 22BC515E RefMD5=20B854B239203BAF6C961B850A4A51A2 [933C474FC970A0E7D659F32334DB6475] GoodName=Super Mario 64 (U) [b1] CRC=635A2BFF 8B022326 RefMD5=20B854B239203BAF6C961B850A4A51A2 [0513A584BC6B3859555E72E10008B55F] GoodName=Super Mario 64 (U) [b2] CRC=77C44B0F 5E8948A3 RefMD5=20B854B239203BAF6C961B850A4A51A2 [C3A4EBEEA4D22D8FC245B346D5C1A81E] GoodName=Super Mario 64 (U) [h1C] CRC=635A2BFF 8B022326 RefMD5=20B854B239203BAF6C961B850A4A51A2 [179537A49DAA33BF031F09A9589EAA28] GoodName=Super Mario 64 (U) [h2C] CRC=635A2BFF 8B022326 RefMD5=20B854B239203BAF6C961B850A4A51A2 [AED29A731056F34B79E6B996BDBAFB63] GoodName=Super Mario 64 (U) [o1] CRC=635A2BFF 8B022326 RefMD5=20B854B239203BAF6C961B850A4A51A2 [3F3EBFAD624D623FAFEF767B99609E15] GoodName=Super Mario 64 (U) [t1] (Invincible) CRC=5C8BD407 63F71E2A RefMD5=20B854B239203BAF6C961B850A4A51A2 [B48A8F8E2D9C7403210C2AA5262D94C7] GoodName=Super Mario 64 (U) [t2] (Speed) CRC=5B652BFF 8FA82E35 RefMD5=20B854B239203BAF6C961B850A4A51A2 [C293D2ADF01E0528554CDBADF0F86554] GoodName=Super Mario 64 (U) [t3] CRC=FECE2B85 331406D1 RefMD5=20B854B239203BAF6C961B850A4A51A2 [2D727C3278AA232D94F2FB45AEC4D303] GoodName=Super Mario 64 - Shindou Edition (J) [!] CRC=D6FBA4A8 6326AA2C SaveType=Eeprom 4KB Players=1 Rumble=Yes Status=4 [23033085561CD331CC81F0026FCB2CE2] GoodName=Super Mario 64 - Shindou Edition (J) [b1] CRC=D6FBA4A8 6326AA2C RefMD5=2D727C3278AA232D94F2FB45AEC4D303 [8C361E9283D740E2F266782D9C1CE914] GoodName=Super Mario 64 - Shindou Edition (J) [b2] CRC=D6FBA4A8 6326AA2C RefMD5=2D727C3278AA232D94F2FB45AEC4D303 [E824B289A850E7E161AF761D876F1CAE] GoodName=Super Mario 64 - Shindou Edition (J) [h1C] CRC=D6FBA4A8 6326AA2C RefMD5=2D727C3278AA232D94F2FB45AEC4D303 [7BA990008966BDA71D8CB78FB7BA414E] GoodName=Super Mario 64 - Shindou Edition (J) [h2C] CRC=D6FBA4A8 6326AA2C RefMD5=2D727C3278AA232D94F2FB45AEC4D303 [A75637B1D22F59F2C32BDA359A9EE79E] GoodName=Super Mario Magic Plant Adventure 64 (Super Mario 64 Hack) CRC=635A42C5 BDC58EDC RefMD5=20B854B239203BAF6C961B850A4A51A2 [3EC3F83EAB22702E146C467EB1DB45FA] GoodName=Super Robot Spirits (J) [!] CRC=66572080 28E348E1 Players=2 Rumble=Yes [E92FC6AE193092F6B597E05946B558EB] GoodName=Super Robot Spirits (J) [b1] CRC=66572080 28E348E1 RefMD5=3EC3F83EAB22702E146C467EB1DB45FA [3F4B73963ABC91CEE59C416063EFD4AE] GoodName=Super Robot Taisen 64 (J) [!] CRC=1649D810 F73AD6D2 Players=1 Rumble=No [462A2AF0E3B72DA4A0E9266078EE5717] GoodName=Super Robot Taisen 64 (J) [b1] CRC=1649D810 F73AD6D2 RefMD5=3F4B73963ABC91CEE59C416063EFD4AE [BB5C21BFEA9AA7E9C90FE76C132BEC49] GoodName=Super Robot Taisen 64 (J) [b2] CRC=1649D810 F73AD6D2 RefMD5=3F4B73963ABC91CEE59C416063EFD4AE [9AF2919C27FCF6972986993C564947CD] GoodName=Super Robot Taisen 64 (J) [f1] (PAL) CRC=AF981AB7 AA1A0A7A [694DEA68DBF1C3F06FF0476ACF2169E6] GoodName=Super Smash Bros. (A) [!] CRC=DD26FDA1 CB4A6BE3 Status=3 SaveType=SRAM Players=4 Rumble=Yes [7F18A06BB16A507E23F9DD636B7046A6] GoodName=Super Smash Bros. (A) [f1] CRC=9624C4F9 3FB02E03 RefMD5=694DEA68DBF1C3F06FF0476ACF2169E6 [5E54C6C563B09C107F86FB33E914EF81] GoodName=Super Smash Bros. (E) (M3) [!] CRC=93945F48 5C0F2E30 Status=3 SaveType=SRAM Players=4 Rumble=Yes [4D37726FDFEC039CB36E2AAE65B9727D] GoodName=Super Smash Bros. (E) (M3) [b1] CRC=593BD58B C330786C RefMD5=5E54C6C563B09C107F86FB33E914EF81 [99C1AB76126B7BADFA9023D50DCA1430] GoodName=Super Smash Bros. (E) (M3) [f1] CRC=593BD58B C330786C RefMD5=5E54C6C563B09C107F86FB33E914EF81 [F7C52568A31AADF26E14DC2B6416B2ED] GoodName=Super Smash Bros. (U) [!] CRC=916B8B5B 780B85A4 Status=3 SaveType=SRAM Players=4 Rumble=Yes [508BE860974B75470851A2D25C0FCB36] GoodName=Super Smash Bros. (U) [b1] CRC=916B8B5B 780B85A4 RefMD5=F7C52568A31AADF26E14DC2B6416B2ED [313F1541748ACF01C4355BA471043868] GoodName=Super Smash Bros. (U) [b2] CRC=916B8B5B 780B85A4 RefMD5=F7C52568A31AADF26E14DC2B6416B2ED [326DC227FCCAA4975583E63624DDFDA1] GoodName=Super Smash Bros. (U) [f1] CRC=3409CEB6 CEC8517A RefMD5=F7C52568A31AADF26E14DC2B6416B2ED [C2DBAE0C18C6666336F4CFA896D8ED18] GoodName=Super Smash Bros. (U) [f2] (PAL) CRC=8CF1CECB C8902FF4 RefMD5=F7C52568A31AADF26E14DC2B6416B2ED [5A19D395B6A8B1911DEB334E392F4526] GoodName=Super Smash Bros. (U) [f3] CRC=3409CEB6 CEC8517A RefMD5=F7C52568A31AADF26E14DC2B6416B2ED [98A3122A6D7C9B02381FC5B0CFB8C14B] GoodName=Super Smash Bros. (U) [f4] (GameShark) CRC=EA6D4C3F 13837E54 RefMD5=F7C52568A31AADF26E14DC2B6416B2ED [ED8641A704910BB4A0FAC9AD08F9C1D2] GoodName=Super Smash Bros. (U) [hI] CRC=916B8B5B 780B85A4 RefMD5=F7C52568A31AADF26E14DC2B6416B2ED [6B5D93B3566E96147009D1AC4FB15C97] GoodName=Super Speed Race 64 (J) [!] CRC=9CE02E22 206EF1B0 Players=4 SaveType=Controller Pack Rumble=Yes [27A7A2A19FC67346BB25E3C5BB3A91CE] GoodName=Super Speed Race 64 (J) [o1] CRC=9CE02E22 206EF1B0 RefMD5=6B5D93B3566E96147009D1AC4FB15C97 [DB502D4577EE908160441D38531EBB8D] GoodName=Super WaLuigi 64 (Super Mario 64 Hack) CRC=635A42C5 BDC58EDC RefMD5=20B854B239203BAF6C961B850A4A51A2 [99138CB0D1325F7BB7C2EDAB5D7F6C54] GoodName=Super Wario 64 (Super Mario 64 Hack) CRC=635A42C5 BDC58EDC RefMD5=20B854B239203BAF6C961B850A4A51A2 [7DDF1CC63401CF43836BD14F199B6C70] GoodName=Super Wario 64 V1.0 by Rulesless (Super Mario 64 Hack) [T+Ita] CRC=75A15B07 2E391683 RefMD5=20B854B239203BAF6C961B850A4A51A2 [93582A59F442502CADAA39BD6CC1B2CE] GoodName=Super Wario 64 V1.0 by Rulesless (Super Mario 64 Hack) CRC=635A42C5 BDC58EDC RefMD5=20B854B239203BAF6C961B850A4A51A2 [6D58A01EF7A7A7C779D2A66315992C5F] GoodName=Supercross 2000 (E) (M3) [!] CRC=2CBB127F 09C2BFD8 Players=2 SaveType=Controller Pack Rumble=Yes [60347200A1A7CABC0D849EE69EC51DF7] GoodName=Supercross 2000 (U) [!] CRC=C1452553 5D7B24D9 Players=2 SaveType=Controller Pack Rumble=Yes [53922802F7744CC38BDD75852214057F] GoodName=Supercross 2000 (U) [b1] CRC=C1452553 5D7B24D9 RefMD5=60347200A1A7CABC0D849EE69EC51DF7 [4EAB63BE36DCC7FA6D612BE780BF79C1] GoodName=Supercross 2000 (U) [f1] (PAL) CRC=1917566C 8BE6CD0F RefMD5=60347200A1A7CABC0D849EE69EC51DF7 [5AB39F2D7A144E1BA243DF059560E878] GoodName=Superman (E) (M6) [!] CRC=B44CAB74 07029A29 SaveType=Controller Pack Players=4 Rumble=Yes [3F64B4F72E61225EF3AE93976C9BFC7C] GoodName=Superman (U) (M3) [!] CRC=A2E8F35B C9DC87D9 Players=4 SaveType=Controller Pack Rumble=Yes [04A6F25CB0F2084E631B3B7FFF76BEFD] GoodName=Superman (U) (M3) [T+Ita100_Cattivik66] CRC=A2E8F35B C9DC87D9 RefMD5=3F64B4F72E61225EF3AE93976C9BFC7C [3C28C951B1EA46690065DC32862272E4] GoodName=Superman (U) (M3) [b1] CRC=A2E8F35B C9DC87D9 RefMD5=3F64B4F72E61225EF3AE93976C9BFC7C [574704AFFBD28C7A2728DA85CC1DA0F3] GoodName=Superman (U) (M3) [b2] CRC=A2E8F35B C9DC87D9 RefMD5=3F64B4F72E61225EF3AE93976C9BFC7C [12562BFF127E52A6EE9B4FEF92050AF9] GoodName=Superman (U) (M3) [f1] (PAL) CRC=EEF7DE23 57E4FEA9 RefMD5=3F64B4F72E61225EF3AE93976C9BFC7C [943337C945DA689AF869877498C7AA2C] GoodName=Superman (U) (M3) [f2] (PAL) CRC=06F6B180 97F0AD11 RefMD5=3F64B4F72E61225EF3AE93976C9BFC7C [DBA237ED8415383AFCABA035D817272F] GoodName=Superman (U) (M3) [t1] CRC=5AEB33A3 23063A25 RefMD5=3F64B4F72E61225EF3AE93976C9BFC7C [26F4CA20F7B9C88199AC046C57E282B4] GoodName=Susume! Taisen Puzzle Dama Toukon! Marumata Chou (J) [!] CRC=35E811F3 99792724 Players=2 Rumble=No [59985249F824F74C335C6C47A6E29C4A] GoodName=Susume! Taisen Puzzle Dama Toukon! Marumata Chou (J) [b1] CRC=35E811F3 99792724 RefMD5=26F4CA20F7B9C88199AC046C57E282B4 [993A67ECD02212B4BE5B2E14652F835B] GoodName=Susume! Taisen Puzzle Dama Toukon! Marumata Chou (J) [b2] CRC=35E811F3 99792724 RefMD5=26F4CA20F7B9C88199AC046C57E282B4 [EFE2CEBF5BB21BF766FF72C055DF36BE] GoodName=Susume! Taisen Puzzle Dama Toukon! Marumata Chou (J) [b3] CRC=35E811F3 99792724 RefMD5=26F4CA20F7B9C88199AC046C57E282B4 [B0FE1343A2ED21D2F083041B1FE1B7A9] GoodName=Susume! Taisen Puzzle Dama Toukon! Marumata Chou (J) [h1C] CRC=35E811F3 99792724 RefMD5=26F4CA20F7B9C88199AC046C57E282B4 [987A07DAF0F06567BC8E794291D98695] GoodName=Susume! Taisen Puzzle Dama Toukon! Marumata Chou (J) [h2C] CRC=35E811F3 99792724 RefMD5=26F4CA20F7B9C88199AC046C57E282B4 [E946855EEF7F1BBD47AEECA33A2737BB] GoodName=Susume! Taisen Puzzle Dama Toukon! Marumata Chou (J) [o1] CRC=35E811F3 99792724 RefMD5=26F4CA20F7B9C88199AC046C57E282B4 [D6B0135BE06DF3545A8931957FE805FA] GoodName=Susume! Taisen Puzzle Dama Toukon! Marumata Chou (J) [o2] CRC=35E811F3 99792724 RefMD5=26F4CA20F7B9C88199AC046C57E282B4 [6922A2D0DB719AD7972C0DC146FF0D8C] GoodName=Susume! Taisen Puzzle Dama Toukon! Marumata Chou (J) [o2][b1] CRC=35E811F3 99792724 RefMD5=26F4CA20F7B9C88199AC046C57E282B4 [4BC1D3074FA3A3DCAF1F16888B82A966] GoodName=T-Shirt Demo by Neptune and Steve (POM '98) (PD) [b1] CRC=1AA71519 51360D55 [E4D314C536F7BF78F60197EC238514AE] GoodName=T-Shirt Demo by Neptune and Steve (POM '98) (PD) CRC=1AA71519 51360D55 [ACD0118AC4709DB3943B3D35112C2001] GoodName=TG Rally 2 (E) [!] CRC=F82DD377 8C3FB347 [65E67D43E0A9B146D7881CBC803EC5C3] GoodName=TR64 Demo by FIres and Icepir8 (PD) CRC=2070044B E7D82D16 [07660B03456DD0F776F392EF3E05C481] GoodName=TRON Demo (PD) [a1] CRC=CB3FF554 8773CD0B [4D6E12E0AB62D4045B4934B6D7BB8BDC] GoodName=TRON Demo (PD) CRC=CB3FF554 8773CD0B [503C548F7B38A3721B93FD0ABF979019] GoodName=TRSI Intro by Ayatollah (POM '99) (PD) CRC=2DD07E20 24D40CD6 [192B715E8BC5972A4986DF21DC8BF357] GoodName=Taz Express (E) (M6) [!] CRC=AEBCDD54 15FF834A Players=1 Rumble=No [53DFA593019BDA070DD3CD5FC5B58436] GoodName=Taz Express (E) (M6) [f1] (NTSC) CRC=17679054 E235F4A7 RefMD5=192B715E8BC5972A4986DF21DC8BF357 [AD47A9521988CEDD8D43097CFD9BE042] GoodName=Taz Express (E) (M6) [f2] (NTSC) CRC=00BC1D78 00709D53 RefMD5=192B715E8BC5972A4986DF21DC8BF357 [7F244AFF8D729417E32B6A5B299AFDA5] GoodName=Telefoot Soccer 2000 (F) [!] CRC=D9042FBB FCFF997C Players=4 Rumble=No [8F96FF06D9B3C3219CEBA5CDB7CF19ED] GoodName=Telefoot Soccer 2000 (F) [b1] CRC=6440D7CE F6597A03 RefMD5=7F244AFF8D729417E32B6A5B299AFDA5 [D1B6D277F9FAE2029A7532D8E1F4D6B2] GoodName=Telefoot Soccer 2000 (F) [f1] (NTSC) CRC=6440D7CE F6597A03 RefMD5=7F244AFF8D729417E32B6A5B299AFDA5 [7C8EFCF4FBA28F9F5B5EA10A71283BF3] GoodName=Tetris 64 (J) [!] CRC=963ADBA6 F7D5C89B Players=4 Rumble=Yes [1587B17344A43532B791DCEB237D2BFC] GoodName=Tetris 64 (J) [T+Ita] CRC=963ADBA6 F7D5C89B [ECC06617156122882C4FA4BBCD241A4F] GoodName=Tetris 64 (J) [b1] CRC=963ADBA6 F7D5C89B [9036BB44A51A62CB0A74C288EBB850C7] GoodName=Tetris 64 (J) [b2] CRC=963ADBA6 F7D5C89B [8C9F139BF5FC0B7A0497F28241C6F819] GoodName=Tetris Beta Demo by FusionMan (POM '98) (PD) [b1] CRC=81361532 2AEB643F [674D416C2BD1EF0192BEE34AA260B21A] GoodName=Tetris Beta Demo by FusionMan (POM '98) (PD) CRC=81361532 2AEB643F [765A330D5CE2DBE7120C6C8E18A1487D] GoodName=Tetrisphere (E) [!] CRC=0FE684A9 8BB77AC4 Players=2 Rumble=No SaveType=Eeprom 4KB [A87455244919BDA6E44FA32C7E72BFBA] GoodName=Tetrisphere (E) [b1] CRC=0FE684A9 8BB77AC4 RefMD5=765A330D5CE2DBE7120C6C8E18A1487D [822154EE2B96BF78BCE2E46AF6578131] GoodName=Tetrisphere (E) [b2] CRC=0FE684A9 8BB77AC4 RefMD5=765A330D5CE2DBE7120C6C8E18A1487D [3F88078E2D9DBF6C9372F6373CF9AE09] GoodName=Tetrisphere (U) [!] CRC=3C1FDABE 02A4E0BA Players=2 Rumble=No SaveType=Eeprom 4KB [7211951FDF7DA809D5F3D51CA06CD465] GoodName=Tetrisphere (U) [b1] CRC=3C1FDABE 02A4E0BA RefMD5=3F88078E2D9DBF6C9372F6373CF9AE09 [9F7527EE8A80DAE339DB769EAE707DCC] GoodName=Tetrisphere (U) [t1] CRC=4EF87A50 975A7CC7 RefMD5=3F88078E2D9DBF6C9372F6373CF9AE09 [B11B30536D445AB6C7DC22C85C68A218] GoodName=Textlight Demo by Horizon64 (PD) [b1] CRC=41B1BF58 A1EB9BB7 [33CF09D5EAB2FB1242108A172E1844C2] GoodName=Textlight Demo by Horizon64 (PD) CRC=41B1BF58 A1EB9BB7 [DA934FF1A6CE9EEC70C235F879B23AFE] GoodName=The Corporation 1st Intro by i_savant (PD) [b1] CRC=44705CED 6FDFDE02 [B42C11B1DCBFC0AE42551021CD69AB22] GoodName=The Corporation 1st Intro by i_savant (PD) CRC=44705CED 6FDFDE02 [F6AE85B8CC2B643F37DE95D7F5682262] GoodName=The Corporation 2nd Intro by TS_Garp (PD) [a1] CRC=C3AB938D D48143B2 [EA9D71AF1508636E88D95AC1D525EF93] GoodName=The Corporation 2nd Intro by TS_Garp (PD) [b1] CRC=C3AB938D D48143B2 [756325378480E1252CB089110A689563] GoodName=The Corporation 2nd Intro by TS_Garp (PD) CRC=C3AB938D D48143B2 [D52E871B562AD000BA3728D9B45EC9CB] GoodName=The Corporation XMAS Demo '99 by TS_Garp (PD) [b1] CRC=93DA8551 D231E8AB [AF284AB7FF9363016782E99D00574E70] GoodName=The Corporation XMAS Demo '99 by TS_Garp (PD) CRC=93DA8551 D231E8AB [A09663B596F348D28AF846A51375EB81] GoodName=Tigger's Honey Hunt (E) (M7) [!] CRC=E0C4F72F 769E1506 Players=1 Rumble=No SaveType=Flash RAM CountPerOp=1 [F8636514B5B0EDEBF376C3111D24417A] GoodName=Tigger's Honey Hunt (U) [!] CRC=4EBFDD33 664C9D84 Players=1 Rumble=No SaveType=Flash RAM CountPerOp=1 [7B41F28A920112F17401D633B368BA0C] GoodName=Tigger's Honey Hunt (U) [t1] CRC=E972B385 7668D414 RefMD5=F8636514B5B0EDEBF376C3111D24417A [7B261247150C431DE55AB371E8B46EA8] GoodName=Tokisora Senshi Turok (J) [!] CRC=916AE6B8 8817AB22 Players=1 Rumble=No SaveType=Controller Pack [1B991CF41C70FF2C92FFBEFACABE8D03] GoodName=Tom Clancy's Rainbow Six (E) [!] CRC=4875AF3D 9A66D3A2 Players=2 Rumble=Yes [FC2D2F7EF02484EA0478A5EAFD0CBFF0] GoodName=Tom Clancy's Rainbow Six (E) [b1] CRC=4875AF3D 9A66D3A2 RefMD5=1B991CF41C70FF2C92FFBEFACABE8D03 [C0612AA12888C10E9565A57EB2C3605D] GoodName=Tom Clancy's Rainbow Six (E) [h1C] CRC=4875AF3D 9A66D3A2 RefMD5=1B991CF41C70FF2C92FFBEFACABE8D03 [AAD3D42A9E800780087009B16AFB1327] GoodName=Tom Clancy's Rainbow Six (E) [o1] CRC=4875AF3D 9A66D3A2 RefMD5=1B991CF41C70FF2C92FFBEFACABE8D03 [15E4C1B4F3F459D4CAA7F7E2CF0C95DA] GoodName=Tom Clancy's Rainbow Six (F) [!] CRC=486BF335 034DCC81 Players=2 Rumble=Yes [FDC76A53B1056D3E50EA6A3E295FE4D1] GoodName=Tom Clancy's Rainbow Six (G) [!] CRC=8D412933 588F64DB Players=2 Rumble=Yes [80F3B1ABD9FB9AE73997489DB185A74D] GoodName=Tom Clancy's Rainbow Six (U) [!] CRC=392A0C42 B790E77D Rumble=Yes [2CF9568A149177AC0B86378FBC8DCB71] GoodName=Tom Clancy's Rainbow Six (U) [f1] (PAL) CRC=8B79DBFD 0BB32AC0 RefMD5=80F3B1ABD9FB9AE73997489DB185A74D [B9EF940408E1DFD63F867527E4212B9D] GoodName=Tom Demo (PD) CRC=5ECE09AE 8230C82D [46BE5D00682FCC1F7FC0FBA507E8E5C1] GoodName=Tom and Jerry in Fists of Furry (E) (M6) [!] CRC=2B4F4EFB 43C511FE Players=2 Rumble=Yes SaveType=Eeprom 4KB [9EAA60F295DBA9A9687E3238DABA14EE] GoodName=Tom and Jerry in Fists of Furry (E) (M6) [f1] (NTSC) CRC=EC6F66AC 618EF742 RefMD5=46BE5D00682FCC1F7FC0FBA507E8E5C1 [A63A9AF85BE8BB47C1741B8A37115354] GoodName=Tom and Jerry in Fists of Furry (U) [!] CRC=63E7391C E6CCEA33 Players=2 Rumble=Yes SaveType=Eeprom 4KB [17D6D6DA5D03C9D295D72A212A719EB2] GoodName=Tom and Jerry in Fists of Furry (U) [t1] CRC=9BF2A817 EE20252A RefMD5=A63A9AF85BE8BB47C1741B8A37115354 [3D3573A855835A98DE29D598C35590E0] GoodName=Tonic Trouble (E) (M5) [!] CRC=093F916E 4408B698 Players=1 Rumble=No SaveType=Controller Pack [7D3E935156844DE0002DB875E1076A5C] GoodName=Tonic Trouble (U) (V1.1) [!] CRC=EF9E9714 C03B2C7D Players=1 Rumble=No SaveType=Controller Pack [A6C5625FF127D9E741F595EBF3B3ABB9] GoodName=Tonic Trouble (U) (V1.1) [b1] CRC=EF9E9714 C03B2C7D RefMD5=7D3E935156844DE0002DB875E1076A5C [012C9DAF61705F109392A85B2621CD42] GoodName=Tonic Trouble (U) (V1.1) [f1] (PAL) CRC=1671E7BC B7D756B9 RefMD5=7D3E935156844DE0002DB875E1076A5C [1987E0F12DDD619F440CD9637DF7CC28] GoodName=Tonic Trouble (U) (V1.1) [t1] CRC=1671F4A0 5C0E7928 RefMD5=7D3E935156844DE0002DB875E1076A5C [C9E9C4A18B1540C6B4111331D7C663B8] GoodName=Tony Hawk's Pro Skater (E) [!] CRC=9F8926A5 0587B409 Players=2 Rumble=Yes SaveType=Controller Pack [5ED7E392198A5FA56EE37EA9E93A8D50] GoodName=Tony Hawk's Pro Skater (U) (V1.0) [!] CRC=204EC022 B119D185 Players=2 Rumble=Yes SaveType=Controller Pack [30EC0EEA5C487E5609D9F9F356D21F27] GoodName=Tony Hawk's Pro Skater (U) (V1.0) [t1] CRC=85C52CA4 017EE9A6 RefMD5=5ED7E392198A5FA56EE37EA9E93A8D50 [AFF424A1883DC7BB92C7B2EBE9342F85] GoodName=Tony Hawk's Pro Skater (U) (V1.1) [!] CRC=E0144180 650B78C9 Players=2 Rumble=Yes SaveType=Controller Pack [6BE030475C4DB52F273EF8A02B4DAFA8] GoodName=Tony Hawk's Pro Skater 2 (E) [!] CRC=84EAB557 C88A190F Players=2 Rumble=Yes [29974692808C112B306FBD259273DC96] GoodName=Tony Hawk's Pro Skater 2 (U) [!] CRC=99150E18 1266E6A5 Players=2 Rumble=Yes [9D4891BF26881C4541171B0235015FD4] GoodName=Tony Hawk's Pro Skater 3 (U) CRC=1A7F70B5 00B7B9FD Players=4 Rumble=Yes [B60D26C2C2242BFF61F76469FC272D2A] GoodName=Top Gear Hyper Bike (Beta) CRC=75FBDE20 A3189B31 Players=4 Rumble=Yes SaveType=Controller Pack [0072538EF925645DB310F8E23A480B89] GoodName=Top Gear Hyper Bike (E) [!] CRC=5F3F49C6 0DC714B0 Players=4 Rumble=Yes SaveType=Controller Pack [561B438F6E8240BEF1DAEB36AAE72675] GoodName=Top Gear Hyper Bike (E) [b1] CRC=5F3F49C6 0DC714B0 RefMD5=0072538EF925645DB310F8E23A480B89 [4347174BB415CA970F2D50DF2973F656] GoodName=Top Gear Hyper Bike (J) [!] CRC=845B0269 57DE9502 Players=4 Rumble=Yes SaveType=Controller Pack [7258F4AB367B025C95A4F476C461E717] GoodName=Top Gear Hyper Bike (U) [!] CRC=8ECC02F0 7F8BDE81 Players=4 Rumble=Yes SaveType=Controller Pack [6C65A252F227AEF18DF2DD3CE04CC821] GoodName=Top Gear Overdrive (E) [!] CRC=D09BA538 1C1A5489 Players=4 Rumble=Yes SaveType=Eeprom 4KB [11D6FFF288DE1BD61CCBD7CCA0C4A97B] GoodName=Top Gear Overdrive (E) [h1C] CRC=D09BA538 1C1A5489 RefMD5=6C65A252F227AEF18DF2DD3CE04CC821 [B5691794A851D8B603F0C741D44AA244] GoodName=Top Gear Overdrive (J) [!] CRC=0578F24F 9175BF17 Players=4 Rumble=Yes SaveType=Eeprom 4KB [8C0F46FEF9A6034FCF0B7D6952FFEC53] GoodName=Top Gear Overdrive (J) [b1] CRC=0578F24F 9175BF17 RefMD5=B5691794A851D8B603F0C741D44AA244 [7818696426C0A429FBFCCC4EFE8D5570] GoodName=Top Gear Overdrive (U) [!] CRC=D741CD80 ACA9B912 Players=4 Rumble=Yes SaveType=Eeprom 4KB [773FD446DA7F4E392907505053BF2A42] GoodName=Top Gear Overdrive (U) [o1] CRC=D741CD80 ACA9B912 RefMD5=7818696426C0A429FBFCCC4EFE8D5570 [211256ABBC0844D9152D6A7FFA9E48BD] GoodName=Top Gear Overdrive (U) [t1] CRC=0F5FD10B AAEDEBEB RefMD5=7818696426C0A429FBFCCC4EFE8D5570 [1698508F521280D0A80E078EC981D4AC] GoodName=Top Gear Rally (E) [!] CRC=7F43E701 536328D1 Players=4 Rumble=Yes SaveType=Controller Pack [48D6C194AE106018DDFC3486A8B347F7] GoodName=Top Gear Rally (E) [b1] CRC=7F43E701 536328D1 RefMD5=1698508F521280D0A80E078EC981D4AC [108F6609CB131830EC4C67F4A8A71D30] GoodName=Top Gear Rally (E) [h1C] CRC=7F43E701 536328D1 RefMD5=1698508F521280D0A80E078EC981D4AC [6E0AF13DCEFEE6A11C4D7262206D6D2D] GoodName=Top Gear Rally (J) [!] CRC=0E596247 753D4B8B Players=4 SaveType=Controller Pack Rumble=Yes [6F7030284B6BC84A49E07DA864526B52] GoodName=Top Gear Rally (U) [!] CRC=62269B3D FE11B1E8 Players=4 SaveType=Controller Pack Rumble=Yes [FA88969ECFA72358EF1C045035442F5C] GoodName=Top Gear Rally (U) [b1] CRC=62269B3D FE11B1E8 RefMD5=6F7030284B6BC84A49E07DA864526B52 [E9E3680C47CE093A3F0765539F31C6AE] GoodName=Top Gear Rally (U) [b2] CRC=62269B3D FE11B1E8 RefMD5=6F7030284B6BC84A49E07DA864526B52 [194CE13B2B6B1F584587A68CC2F398DC] GoodName=Top Gear Rally (U) [b3] CRC=62269B3D FE11B1E8 RefMD5=6F7030284B6BC84A49E07DA864526B52 [4FCD85C487E1FBEDFD85E27F991D1FA6] GoodName=Top Gear Rally (U) [o1] CRC=62269B3D FE11B1E8 RefMD5=6F7030284B6BC84A49E07DA864526B52 [C33CD926E1E71F39F7238AF7B9E0DC5C] GoodName=Top Gear Rally 2 (Beta) CRC=EFDF9140 A4168D6B Players=4 Rumble=Yes SaveType=Controller Pack [44C4566572DC0662D4299AB5B19043AE] GoodName=Top Gear Rally 2 (E) [!] CRC=BEBAB677 51B0B5E4 Players=4 Rumble=Yes SaveType=Controller Pack [B10D781EC625CA45713FD34E5096C24A] GoodName=Top Gear Rally 2 (J) [!] CRC=CFEF2CD6 C9E973E6 Players=4 Rumble=Yes SaveType=Controller Pack [1FA409FCAC007DDECCC4CF439A0D8DAE] GoodName=Top Gear Rally 2 (U) [!] CRC=BE5973E0 89B0EDB8 Players=4 Rumble=Yes SaveType=Controller Pack [4648C4F656BD4A74647DF6A7A2985F37] GoodName=Top Gear Rally 2 (U) [f1] (PAL) CRC=1C952873 FDA4238B RefMD5=1FA409FCAC007DDECCC4CF439A0D8DAE [CAA7CAA9ADFB4B8E4B2DBED88F963D07] GoodName=TopGun Demo by Horizon64 (PD) CRC=E8BF8416 F2D9DA43 [5F2C9E5E39AB09311D96E6C751184B6B] GoodName=Toy Story 2 (E) [!] CRC=CCEB3858 26952D97 Players=1 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [FA0F12C15B3655F9F56888C3249B1CED] GoodName=Toy Story 2 (F) [!] CRC=CB93DB97 7F5C63D5 Players=1 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [3F40F37B0464DD065067523FB21016DD] GoodName=Toy Story 2 (G) [!] CRC=782A9075 E552631D Players=1 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [B44E9C2D9D2F2DE3AF4793B824CCF936] GoodName=Toy Story 2 (U) [!] CRC=A150743E CF2522CD Players=1 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [9E4F62BD672E3601F1BBF9CDAB791F9F] GoodName=Toy Story 2 (U) [f1] (PAL) CRC=161545FE A3C44C28 RefMD5=B44E9C2D9D2F2DE3AF4793B824CCF936 [F551ADA6C6FC1877FCA0515DF4F515DF] GoodName=Toy Story 2 (U) [t1] CRC=1416FEBB 93472028 RefMD5=B44E9C2D9D2F2DE3AF4793B824CCF936 [3D22D5BD7997293612ECDD3046BEBA13] GoodName=Transformers - Beast Wars Metals 64 (J) [!] CRC=91691C3D F4AC5B4D Players=2 Rumble=Yes SaveType=None [6D38909FAA2840FC409AFA221489DE49] GoodName=Transformers - Beast Wars Transmetal (U) [!] CRC=4D79D316 E8501B33 Players=2 Rumble=Yes SaveType=None [6F2C37A20E6ECCB657FBFC4BA36A34BB] GoodName=Triple Play 2000 (U) [!] CRC=FE4B6B43 081D29A7 Players=2 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [25E03763FC8A388A33871C58DFEB7C0E] GoodName=Tristar and Lightforce Quake Intro by Ayatollah & Mike (PD) CRC=F4D89C08 3F34930D [A0657BC99E169153FD46AECCFDE748F3] GoodName=Tsumi to Batsu - Hoshi no Keishousha (J) [!] CRC=B6BC0FB0 E3812198 [13FAA58604597E4EDC608070F8E0AE24] GoodName=Turok - Dinosaur Hunter (E) (V1.0) [!] CRC=2F7009DD FC3BAC53 Players=1 Rumble=No SaveType=Controller Pack [6D5147A9CD7DDD0F1FA8B8BDA439A734] GoodName=Turok - Dinosaur Hunter (E) (V1.0) [b1] CRC=665F09DD FC3BAC53 RefMD5=13FAA58604597E4EDC608070F8E0AE24 [E887BEE5B1DE4E4D92ADA183A245150E] GoodName=Turok - Dinosaur Hunter (E) (V1.0) [h1C] CRC=2F7009DD FC3BAC53 RefMD5=13FAA58604597E4EDC608070F8E0AE24 [992BA72F4A1E9C51934FF345CDD0D90C] GoodName=Turok - Dinosaur Hunter (E) (V1.1) [!] CRC=2F700DCD 176CC5C9 Players=1 Rumble=No SaveType=Controller Pack [548FC0E6035B65BC2108255039859934] GoodName=Turok - Dinosaur Hunter (E) (V1.2) [!] CRC=2F700DCD 176CC5C9 Players=1 Rumble=No SaveType=Controller Pack [0C0BFD1038EDA4F5C958DC362CDFF2D6] GoodName=Turok - Dinosaur Hunter (G) [!] CRC=665FD963 B5CC6612 Players=1 Rumble=No SaveType=Controller Pack [AE5107EFDD3C210E1EDD4ACD9B3CAC31] GoodName=Turok - Dinosaur Hunter (U) (V1.0) [!] CRC=2F70F10D 5C4187FF Players=1 Rumble=No SaveType=Controller Pack [E5B207E7C8DBD8BAF9B42C96EF3C42E8] GoodName=Turok - Dinosaur Hunter (U) (V1.0) [b1] CRC=2F70F10D 5C4187FF RefMD5=AE5107EFDD3C210E1EDD4ACD9B3CAC31 [7BBD5A1594526DE1CE6A16F4FAF82E7D] GoodName=Turok - Dinosaur Hunter (U) (V1.0) [h1C] CRC=2F70F10D 5C4187FF RefMD5=AE5107EFDD3C210E1EDD4ACD9B3CAC31 [9D258DF027ED369886A0249BFCA936BD] GoodName=Turok - Dinosaur Hunter (U) (V1.0) [o1] CRC=2F70F10D 5C4187FF RefMD5=AE5107EFDD3C210E1EDD4ACD9B3CAC31 [E7916845B46C3482CF4843968370557E] GoodName=Turok - Dinosaur Hunter (U) (V1.0) [t1] CRC=9542E183 B1D245E6 RefMD5=AE5107EFDD3C210E1EDD4ACD9B3CAC31 [3DC541C0B97DB9C95A6AA8C2DED27F4A] GoodName=Turok - Dinosaur Hunter (U) (V1.0) [t2] CRC=9542E183 B1D245E6 RefMD5=AE5107EFDD3C210E1EDD4ACD9B3CAC31 [37260287D59FE4EC6049C1D22B5614E6] GoodName=Turok - Dinosaur Hunter (U) (V1.1) [!] CRC=2F700DCD 176CC5C9 Players=1 Rumble=No SaveType=Controller Pack [039875B92C0E4FEF9797EC1744877B17] GoodName=Turok - Dinosaur Hunter (U) (V1.2) [!] CRC=2F700DCD 176CC5C9 Players=1 Rumble=No SaveType=Controller Pack [72A6AA28608EE93A1CB6FEB0A5F4C28C] GoodName=Turok - Legenden des Verlorenen Landes (G) [!] CRC=66E4FA0F DE88C7D0 Players=4 SaveType=Controller Pack Rumble=Yes [241CF94BED487FFF62FFB7B846DA46AB] GoodName=Turok - Rage Wars (E) (M3) (Eng-Fre-Ita) CRC=B6BE20A5 FACAF66D Players=4 SaveType=Controller Pack Rumble=Yes [DBA166A42710F40DC78DC52EB37B0BE6] GoodName=Turok - Rage Wars (E) [!] CRC=1EA26214 E790900F Players=4 SaveType=Controller Pack Rumble=Yes [CF5B28578FD62FA1FF8690079F5D68F5] GoodName=Turok - Rage Wars (U) [!] CRC=ADB9498B DAF28F55 Players=4 SaveType=Controller Pack Rumble=Yes [07E123E104BA7B335B53932EDB2CFB2F] GoodName=Turok - Rage Wars (U) [f1] (PAL) CRC=700694EA 636C43D5 RefMD5=CF5B28578FD62FA1FF8690079F5D68F5 [CA825227E9E203E8429600189825AD74] GoodName=Turok - Rage Wars (U) [f2] (PAL) CRC=72618906 0EDC784B RefMD5=CF5B28578FD62FA1FF8690079F5D68F5 [CE72237707F481CFE97FDE330C2AFCD6] GoodName=Turok 2 - Seeds of Evil (E) (Kiosk Demo) [!] CRC=E8C95AFC 35D121DA Players=4 SaveType=None Rumble=Yes [144B10A484A22367FD2679529DBD2FED] GoodName=Turok 2 - Seeds of Evil (E) (M4) [!] CRC=2E0E7749 B8B49D59 Players=4 Rumble=Yes SaveType=Controller Pack [E5A39521FA954EB97B96AC2154A5FD7A] GoodName=Turok 2 - Seeds of Evil (E) [!] CRC=E0B92B94 80E87CBD Players=4 Rumble=Yes SaveType=Controller Pack [AC1C00167B95929F8EE40DFACB49BB57] GoodName=Turok 2 - Seeds of Evil (E) [b1] CRC=E0B92B94 80E87CBD RefMD5=E5A39521FA954EB97B96AC2154A5FD7A [B932116C967795076B5C112841AB4427] GoodName=Turok 2 - Seeds of Evil (G) [!] CRC=FE05840B 9393320C Players=4 Rumble=Yes SaveType=Controller Pack [3BD42F6AEC477C056E1AFEBB3515495C] GoodName=Turok 2 - Seeds of Evil (U) (Kiosk Demo) [!] CRC=E8C95AFC 35D121DA Players=4 Rumble=Yes SaveType=None [4250FF0265AD72FC798E6ABA61CFCD0E] GoodName=Turok 2 - Seeds of Evil (U) (Kiosk Demo) (Gore On Hack) CRC=AAD95AFC BB3A44AC RefMD5=3BD42F6AEC477C056E1AFEBB3515495C [4EA0F7563F2EAEB3D46E860C12FABFCB] GoodName=Turok 2 - Seeds of Evil (U) (Kiosk Demo) [h1C] CRC=E8C95AFC 35D121DA RefMD5=3BD42F6AEC477C056E1AFEBB3515495C [166221365DB70D446C4206083D422DD1] GoodName=Turok 2 - Seeds of Evil (U) (V1.1) CRC=E0B92B94 B9A7E025 Players=4 Rumble=Yes SaveType=Controller Pack [FAD4DA8E17CE12F68CDF29180CDD4A90] GoodName=Turok 2 - Seeds of Evil (U) (V1.0) [!] CRC=49088A11 6494957E Players=4 Rumble=Yes SaveType=Controller Pack [8DC201A0A9CFD1D2C85EE2B42D8AC49A] GoodName=Turok 2 - Seeds of Evil (U) (V1.0) [t1] CRC=544E3629 875BDD4A RefMD5=FAD4DA8E17CE12F68CDF29180CDD4A90 [72BA2C693EFA5FF3B80374CDBD0C957B] GoodName=Turok 2 - Seeds of Evil (U) (V1.0) [t2] CRC=544E3629 875BDD4A RefMD5=FAD4DA8E17CE12F68CDF29180CDD4A90 [401C0DBDF49A64294DAA2BC8607245DD] GoodName=Turok 2 - Seeds of Evil (U) (V1.0) [t3] CRC=544E3629 875BDD4A RefMD5=FAD4DA8E17CE12F68CDF29180CDD4A90 [279EC83BD60A3CCE69A1DB22B0A5C318] GoodName=Turok 3 - Shadow of Oblivion (E) [!] CRC=6A162FF2 2093704C Players=4 Rumble=Yes SaveType=Controller Pack [C38ACBAE773CC3845EA354421E171998] GoodName=Turok 3 - Shadow of Oblivion (U) (Beta-WIP) CRC=D25C1211 13EEBF67 Players=4 Rumble=Yes SaveType=Controller Pack [0A3A4C761960F7D648AFA60B1E565C7C] GoodName=Turok 3 - Shadow of Oblivion (U) (Beta) [h1C] CRC=D25C1211 13EEBF67 RefMD5=69CE88C46A7C829C6F54004DE93EFCEF [69CE88C46A7C829C6F54004DE93EFCEF] GoodName=Turok 3 - Shadow of Oblivion (U) (Beta) CRC=37FA8F16 5F824D37 Players=4 Rumble=Yes SaveType=Controller Pack [1211C556D77B169D81A666A9661E1777] GoodName=Turok 3 - Shadow of Oblivion (U) [!] CRC=89A579F1 667E97EF Players=4 SaveType=Controller Pack Rumble=Yes [8A5F9B3308107C253EC5DCA198F55C83] GoodName=Turok 3 - Shadow of Oblivion (U) [t1] CRC=6192E59D 538A78CF RefMD5=1211C556D77B169D81A666A9661E1777 [A74738D03ACA4E51690408D203E86D49] GoodName=Twintris by Twinsen (POM '98) (PD) CRC=37B8F920 A58BB3EF [420C9FDBAE15767C5E584070209FF253] GoodName=Twisted Edge Extreme Snowboarding (E) [!] CRC=E688A5B8 B14B3F18 SaveType=Controller Pack Players=2 Rumble=Yes [4F0E2AF205BEEB49270154810660FF37] GoodName=Twisted Edge Extreme Snowboarding (E) [b1] CRC=BBC99D32 117DAA80 RefMD5=420C9FDBAE15767C5E584070209FF253 [FDE5F910974A8B9C561A27B07E68F244] GoodName=Twisted Edge Extreme Snowboarding (E) [h1C] CRC=E688A5B8 B14B3F18 RefMD5=420C9FDBAE15767C5E584070209FF253 [9DF6C2C97FA34A978EF3CB77631536FE] GoodName=Twisted Edge Extreme Snowboarding (U) [!] CRC=BBC99D32 117DAA80 Players=2 Rumble=Yes SaveType=Controller Pack [0B0DF8EC747BF99F3A55A3300CE8BC0D] GoodName=U64 (Chrome) Demo by Horizon64 (PD) [a1] CRC=7739A454 A2F52A66 [9B4EFC228C894E1BA80D7D11FDA4E037] GoodName=U64 (Chrome) Demo by Horizon64 (PD) [a1][b1] CRC=7739A454 A2F52A66 [DFB437BFB32864A17E903FEDE9EC3A27] GoodName=U64 (Chrome) Demo by Horizon64 (PD) [b1] CRC=95013CCC 73F7C072 [33EFC323AA05F522CEF2324CC1D3F5DD] GoodName=U64 (Chrome) Demo by Horizon64 (PD) CRC=7739A454 A2F52A66 [A56BEF4C7E6899A96F1F33424B434790] GoodName=U64 (Chrome) Demo by Horizon64 (older) (PD) [b1] CRC=95013CCC 73F7C072 [2628818AF2FEE3C649AAF8627981A63D] GoodName=U64 (Chrome) Demo by Horizon64 (older) (PD) CRC=95013CCC 73F7C072 [FFEB5C1A85BABBBE60F2FEBA2B35C893] GoodName=Uchhannanchan no Hono no Challenger - Denryu IraIra Bou (J) [!] CRC=28D5562D E4D5AE50 Players=4 CountPerOp=1 [07B7A5CFDE9BC43F02A622387C5B5C58] GoodName=Uchhannanchan no Hono no Challenger - Denryu IraIra Bou (J) [h1C] CRC=28D5562D E4D5AE50 RefMD5=FFEB5C1A85BABBBE60F2FEBA2B35C893 [6AFA476787B762DC08F5B9EEB237C4EE] GoodName=Uchhannanchan no Hono no Challenger - Denryu IraIra Bou (J) [h2C] CRC=28D5562D E4D5AE50 RefMD5=FFEB5C1A85BABBBE60F2FEBA2B35C893 [D42E4496BEA3C61E353643C8438CD9C7] GoodName=Uchhannanchan no Hono no Challenger - Denryu IraIra Bou (J) [o1] CRC=28D5562D E4D5AE50 RefMD5=FFEB5C1A85BABBBE60F2FEBA2B35C893 [CEEDAB23299FA003F32975A4C1E407E3] GoodName=Ultra Demo Bootcode by Locke^ (PD) [h1C] CRC=ED42A2D4 7A71CD91 [B882EDA9CBF832BEEA2641E442A79EDD] GoodName=Ultra Demo Bootcode by Locke^ (PD) CRC=ED42A2D4 7A71CD91 [7E6456E104503B51A97735C8FF349E4C] GoodName=Ultra Demo by Locke^ (PD) [a1] CRC=ED42A2D4 7A71CD91 [2E2C990D8BBAEE7E0681FDC89C29C0F3] GoodName=Ultra Demo by Locke^ (PD) CRC=ED42A2D4 7A71CD91 [1DE07FCA04FB0810D95B8AE4DA173A2E] GoodName=UltraMSX2 V1.0 by Jos Kwanten (PD) [f1] (V64) CRC=31C41A8B 544057AE [6A11F7EB319CF603AB30A281E0639126] GoodName=UltraMSX2 V1.0 by Jos Kwanten (PD) CRC=4E7DE4EF 0DEC3712 [FCA7BE078D6DC68AC6F2E1B7B4369720] GoodName=UltraMSX2 V1.0 w-F1 Spirit by Jos Kwanten (PD) CRC=504ABA0A 269AA7F4 [D2BD19A0873A6900AEF07ECCE103710C] GoodName=UltraMSX2 V1.0 w-Salamander by Jos Kwanten (PD) CRC=FF922478 570B5673 [8E3D79FD6C089F88ED7A2CC1CDBDD535] GoodName=UltraSMS V1.0 by Jos Kwanten (PD) [f1] (V64) CRC=CD29E6E5 4533F032 [8095B5926A9FA7A0C9DA7B46731513A1] GoodName=UltraSMS V1.0 by Jos Kwanten (PD) CRC=F291B959 A24CBCAF [27CB290FAB6C32FAA75EB0E53BE73418] GoodName=Ultrafox 64 by Megahawks (PD) CRC=66D8DE56 C2AA25B2 Players=0 SaveType=None Rumble=No Status=3 [C0B245E95A0CE736E1401A2183C3BBD1] GoodName=Unix SRAM-Upload Utility 1.0 by Madman (PD) CRC=5F44492A 18552A0A [DCAC12EB5832D4A489188330EB9EC387] GoodName=V-Rally Edition 99 (E) (M3) [!] CRC=636E6B19 E57DDC5F Players=2 Rumble=Yes SaveType=Eeprom 4KB [7DCEAFF24BB1BB3D9B8FE9B78CCC7048] GoodName=V-Rally Edition 99 (E) (M3) [f1] (NTSC) CRC=75CF4CCD F47E10F6 RefMD5=DCAC12EB5832D4A489188330EB9EC387 [8541D7A8737BE09C52D4EC1274DE2A91] GoodName=V-Rally Edition 99 (J) [!] CRC=4D0224A5 1BEB5794 Players=2 Rumble=Yes SaveType=Eeprom 4KB [0C3448A9D85300ACB9C5556F27A84B23] GoodName=V-Rally Edition 99 (U) [!] CRC=3C059038 C8BF2182 Players=2 Rumble=Yes SaveType=Eeprom 4KB [9768A9874D8329569F8FB27EC0AB723B] GoodName=V-Rally Edition 99 (U) [f1] (PAL) CRC=6F48FF84 754B4549 RefMD5=0C3448A9D85300ACB9C5556F27A84B23 [7E0AC3917227EDF51132FBEBB867FF9B] GoodName=V64Jr 512M Backup Program by HKPhooey (PD) CRC=760EF304 AD6D6A7C [FD523AF9832B5A17F0EB96ED2A77E77B] GoodName=V64Jr Backup Tool V0.2b_Beta by RedboX (PD) CRC=F11B663A 698824C0 [5BAA85768F2410C61FBE2DFB62C3D836] GoodName=V64Jr Backup Tool by WT_Riker (PD) CRC=4BD245D4 4202B322 [19BA19834F948EEE3828640246405B5D] GoodName=V64Jr Flash Save Util by CrowTRobo (PD) CRC=6FC4EEBC 125BF459 [1A232A07B0D2A102CA528E75CB7BBA22] GoodName=VNES64 + Galaga (PD) CRC=DCBE12CD FCCB5E58 Status=0 SaveType=Controller Pack [495E0B30318FC67978D68BD034165981] GoodName=VNES64 + Mario (PD) CRC=66807E77 EBEA2D76 Status=0 SaveType=Controller Pack [2953091D648ED1B60A67200B17A9410D] GoodName=VNES64 + Test Cart (PD) CRC=4537BDFF D1ECB425 [BE804A0317F138775454405155C1D9A5] GoodName=VNES64 V0.1 by Jean-Luc Picard (POM '98) (PD) CRC=4537BDFF D1ECB425 Status=0 SaveType=Controller Pack [062C3AD13478D5C75B4E8DB2FFD500DC] GoodName=VNES64 V0.12 by Jean-Luc Picard (PD) CRC=0E4B8C92 7F47A9B8 Status=0 SaveType=Controller Pack [B61F53695517D380EB7240331A2342C2] GoodName=Vector Demo by Destop (POM '99) (PD) CRC=1CEACBA0 42BC06D6 [A95442CE25EEB3BD31CEF8525B9936FD] GoodName=View N64 Test Program (PD) [b1] CRC=A38F7AA6 03A48A45 [CF17AF84662E1457E61AD54575D50D20] GoodName=View N64 Test Program (PD) CRC=34B493C9 07654185 [DF011E19F41B1B19C21F1E77E13780B7] GoodName=Vigilante 8 (E) [!] CRC=151F79F4 8EEDC8E5 Players=4 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [637B9A40BED777FC96EB1BD07EA74783] GoodName=Vigilante 8 (E) [h1C] CRC=151F79F4 8EEDC8E5 RefMD5=DF011E19F41B1B19C21F1E77E13780B7 [FF9F85C50982DBDBA9853A8915321D31] GoodName=Vigilante 8 (F) [!] CRC=E2BC82A2 591CD694 Players=4 SaveType=Controller Pack Rumble=Yes CountPerOp=1 [B69B84083D1B4EC99A465B3067F74417] GoodName=Vigilante 8 (F) [b1] CRC=E2BC82A2 591CD694 RefMD5=FF9F85C50982DBDBA9853A8915321D31 [37B430EE16167831C6C6292994F93277] GoodName=Vigilante 8 (G) [!] CRC=6EDA5178 D396FEC1 Players=4 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [D616ADF6441ACBBD0E6BEF023A8F6031] GoodName=Vigilante 8 (U) [!] CRC=EA71056A E4214847 Players=4 SaveType=Controller Pack Rumble=Yes CountPerOp=1 [9F42209E413A1A92C788BF7BC26BFB7B] GoodName=Vigilante 8 (U) [b1] CRC=5573C64D 905B49FA RefMD5=D616ADF6441ACBBD0E6BEF023A8F6031 [5DDCE4475A98F7BA9CCE2F255723EB31] GoodName=Vigilante 8 (U) [b2] CRC=EA71056A E4214847 RefMD5=D616ADF6441ACBBD0E6BEF023A8F6031 [B6154ECD50053CA96953176404B07824] GoodName=Vigilante 8 (U) [f1] (PAL) CRC=4FAFC64B B7DBE63A RefMD5=D616ADF6441ACBBD0E6BEF023A8F6031 [F747B178FFAB97EE8545F7E6EFAEF7CA] GoodName=Vigilante 8 (U) [f2] (PAL) CRC=44C54A0B 22C0B63A RefMD5=D616ADF6441ACBBD0E6BEF023A8F6031 [829E4F5DDECED5DB6C64E346EDA47E5C] GoodName=Vigilante 8 (U) [t1] CRC=5573C64D 905B49FA RefMD5=D616ADF6441ACBBD0E6BEF023A8F6031 [47661EF1964524B6319B759913F08B62] GoodName=Vigilante 8 - 2nd Offence (E) [!] CRC=DD10BC7E F900B351 Players=4 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [60CDF7445FAD2ABA05C958F46691501B] GoodName=Vigilante 8 - 2nd Offense (U) [!] CRC=F5C5866D 052713D9 Players=4 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [5E30D0208FC4CB810A464E5DEFFB29A3] GoodName=Vigilante 8 - 2nd Offense (U) [f1] (PAL) CRC=098D46A2 D1A4CF3B RefMD5=60CDF7445FAD2ABA05C958F46691501B [C3005D76AF42E929E5C67421A19F8235] GoodName=Violence Killer - Turok New Generation (J) [!] CRC=60006C98 2605A381 Players=4 Rumble=No SaveType=Controller Pack [50272F8EA99E4E06ADD8CCAB5F5A4F41] GoodName=Violence Killer - Turok New Generation (J) [b1] CRC=60006C98 2605A381 RefMD5=C3005D76AF42E929E5C67421A19F8235 [E790BE1A5B883BEBA44BC0D2666C65F5] GoodName=Virtual Chess 64 (E) (M6) [!] CRC=2FDAA221 A588A7CE Players=2 Rumble=No SaveType=Controller Pack [4166D03402397A56043AC2CD45F4CB87] GoodName=Virtual Chess 64 (E) (M6) [b1] CRC=2FDAA221 A588A7CE RefMD5=E790BE1A5B883BEBA44BC0D2666C65F5 [C5594DEFBCFE16D56284C66FDE49E540] GoodName=Virtual Chess 64 (E) (M6) [b2] CRC=2FDAA221 A588A7CE RefMD5=E790BE1A5B883BEBA44BC0D2666C65F5 [88D89282B2346F98C7F30850B061D486] GoodName=Virtual Chess 64 (E) (M6) [o1] CRC=2FDAA221 A588A7CE RefMD5=E790BE1A5B883BEBA44BC0D2666C65F5 [CB2B7214BE1084F2BFAEE556B0B4FD2C] GoodName=Virtual Chess 64 (E) (M6) [o1][h1C] CRC=2FDAA221 A588A7CE RefMD5=E790BE1A5B883BEBA44BC0D2666C65F5 [F8A35270279B277586D7210FD15134FF] GoodName=Virtual Chess 64 (U) (M3) [!] CRC=82B3248B E73E244D Players=2 Rumble=No SaveType=Controller Pack [F05BD2DAD01F3E354713380AAFFB63E9] GoodName=Virtual Chess 64 (U) (M3) [b1] CRC=82B3248B E73E244D RefMD5=F8A35270279B277586D7210FD15134FF [C252FEC96171ABD07A6C5B99B74924D4] GoodName=Virtual Chess 64 (U) (M3) [b1][o1] CRC=82B3248B E73E244D RefMD5=F8A35270279B277586D7210FD15134FF [F41FCA7F185B3EC45ED90491BC8C0983] GoodName=Virtual Chess 64 (U) (M3) [f1] (PAL) CRC=46F3248B 534F2F61 RefMD5=F8A35270279B277586D7210FD15134FF [E62751EFDE5312ED12DEC6C9FDCBF062] GoodName=Virtual Chess 64 (U) (M3) [f1][o1] CRC=46F3248B 534F2F61 RefMD5=F8A35270279B277586D7210FD15134FF [0343B990F58CD816D96FBE5D5E710C82] GoodName=Virtual Chess 64 (U) [o1] CRC=82B3248B E73E244D RefMD5=F8A35270279B277586D7210FD15134FF [AB68FB43F012C1A45AF1DBCC8E8C109C] GoodName=Virtual Pool 64 (E) [!] CRC=98F9F2D0 03D9F09C Players=2 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [C4FD61C707977F1BF48DC15E31BD2FB1] GoodName=Virtual Pool 64 (E) [o1] CRC=98F9F2D0 03D9F09C RefMD5=AB68FB43F012C1A45AF1DBCC8E8C109C [6D3DB67319DA339DF4B68AD0084904D5] GoodName=Virtual Pool 64 (U) [!] CRC=4E4A7643 A37439D7 Players=2 Rumble=Yes SaveType=Controller Pack CountPerOp=1 [C6855DF00BD5BE8A41DCE809093EE40B] GoodName=Virtual Pool 64 (U) [o1] CRC=4E4A7643 A37439D7 RefMD5=6D3DB67319DA339DF4B68AD0084904D5 [90002501777E3237739F5ED9B0E349E2] GoodName=Virtual Pro Wrestling 2 - Oudou Keishou (J) [!] CRC=CD094235 88074B62 Players=4 Rumble=Yes [5E6202200AF40A8F026780EDFE1E15D0] GoodName=Virtual Pro Wrestling 64 (J) [!] CRC=045C08C4 4AFD798B Players=4 Rumble=Yes [7FDC16C96B517D4E433CF7353B22FBA6] GoodName=Virtual Pro Wrestling 64 (J) [b1] CRC=045C08C4 4AFD798B RefMD5=5E6202200AF40A8F026780EDFE1E15D0 [290BE44B47110A011523A343786A15A0] GoodName=Virtual Pro Wrestling 64 (J) [f1] CRC=B3CD11F6 60725EB0 RefMD5=5E6202200AF40A8F026780EDFE1E15D0 [9B241103CE0F13CAD5FE522DF67ED88B] GoodName=Virtual Pro Wrestling 64 (J) [f2] CRC=B3CD11F6 60725EB0 RefMD5=5E6202200AF40A8F026780EDFE1E15D0 [1D2CB88BBCB67E12289B74F5BD88AE4C] GoodName=Virtual Pro Wrestling 64 (J) [h1C] CRC=045C08C4 4AFD798B RefMD5=5E6202200AF40A8F026780EDFE1E15D0 [35BF5C390AF1AD730E00EB618AED7B72] GoodName=Virtual Springfield Site Intro by Presten (PD) CRC=4F55D05C 0CD66C91 [02AED169EB579494ACE75D22E10D789B] GoodName=WCW Backstage Assault (U) [!] CRC=396F5ADD 6693ECA7 Players=4 SaveType=Controller Pack [9E943752BCF4FBA9CA3028E596F4EB4A] GoodName=WCW Mayhem (E) [!] CRC=AA7B0658 9C96937B Players=4 SaveType=Controller Pack [F1AF35375519E97BB7C0E37E2F68416E] GoodName=WCW Mayhem (E) [h1C] CRC=AA7B0658 9C96937B RefMD5=9E943752BCF4FBA9CA3028E596F4EB4A [87BF3784709CD09693CD7BCC08460C63] GoodName=WCW Mayhem (U) [!] CRC=33BE8CD6 EC186912 Players=4 SaveType=Controller Pack [5D7368D95B89F451E68F0832ED2BA8FF] GoodName=WCW Mayhem (U) [f1] (PAL) CRC=2AD07230 7A0719F7 RefMD5=87BF3784709CD09693CD7BCC08460C63 [1E9FEAD701FE5AAAA248D4713891775D] GoodName=WCW Nitro (U) [!] CRC=D4C45A1A F425B25E Players=4 SaveType=Controller Pack CountPerOp=3 [EC097EB33BAD93A8AC6E15F7839762AB] GoodName=WCW Nitro (U) [b3] CRC=D4C45A1A F425B25E Players=4 SaveType=Controller Pack CountPerOp=3 [BC8BA67065FDBAA731DEFC866D25B8C2] GoodName=WCW Nitro (U) [b1] CRC=D4C45A1A F425B25E RefMD5=1E9FEAD701FE5AAAA248D4713891775D [CE86CE535A5B55AE4A0E6CC942701082] GoodName=WCW Nitro (U) [b2] CRC=5DDB495C CE6E5573 RefMD5=1E9FEAD701FE5AAAA248D4713891775D [8524D92A742BC9D0D6F072F9F80E887C] GoodName=WCW Nitro (U) [f1] (PAL) CRC=85DB4944 43ADE940 RefMD5=1E9FEAD701FE5AAAA248D4713891775D [A6A0109023837C4ED5CAC62F4A66ABA6] GoodName=WCW Nitro (U) [f2] (PAL) CRC=ACDCA0C6 0F4C66F9 RefMD5=1E9FEAD701FE5AAAA248D4713891775D [553D8D5347969C66E5D91C3FE35208B9] GoodName=WCW vs. nWo - World Tour (E) [!] CRC=8BDBAF68 345B4B36 Players=4 SaveType=Controller Pack [203C3BBFDD10C5A0B7C5D0CDB085D853] GoodName=WCW vs. nWo - World Tour (U) (V1.0) [!] CRC=2C3E19BD 5113EE5E Players=4 SaveType=Controller Pack [6BD5C85E25BF3146A42F962A379B4F54] GoodName=WCW vs. nWo - World Tour (U) (V1.0) [b1] CRC=2C3E19BD 5113EE5E RefMD5=203C3BBFDD10C5A0B7C5D0CDB085D853 [B7A220B59303D47F3BEAE233CA868CFD] GoodName=WCW vs. nWo - World Tour (U) (V1.1) [!] CRC=71BE60B9 1DDBFB3C Players=4 SaveType=Controller Pack [30C6676EC1D62122F4E7607EF3ABBD41] GoodName=WCW-nWo Revenge (E) [!] CRC=68E8A875 0CE7A486 SaveType=SRAM Players=4 CountPerOp=1 [07F0AD841350BD7CA1E6A99FB7E887E6] GoodName=WCW-nWo Revenge (E) [h1C] CRC=68E8A875 0CE7A486 RefMD5=30C6676EC1D62122F4E7607EF3ABBD41 [C1384F3637D7A381B29341FED3EF3CEB] GoodName=WCW-nWo Revenge (U) [!] CRC=DEE596AB AF3B7AE7 Players=4 SaveType=SRAM CountPerOp=1 [B230D307428F4B69B3A80109AC905A44] GoodName=WCW-nWo Revenge (U) [b1] CRC=DEE596AB AF3B7AE7 RefMD5=C1384F3637D7A381B29341FED3EF3CEB [117EF2639E0485210C7AB70CBF3E0C00] GoodName=WCW-nWo Revenge (U) [b2] CRC=DEE596AB AF3B7AE7 RefMD5=C1384F3637D7A381B29341FED3EF3CEB [D6CD1AF1597CF0D279A39F75EE07C43A] GoodName=WCW-nWo Revenge (U) [f1] (PAL) CRC=768AD2AA C3C79B68 RefMD5=C1384F3637D7A381B29341FED3EF3CEB [847A00F2C5DA6696FC49702431DF3150] GoodName=WCW-nWo Revenge (U) [f2] (PAL) CRC=768AD2AA C3C79B68 RefMD5=C1384F3637D7A381B29341FED3EF3CEB [EBC0CF55FC58845C6EE86CF8B2D87303] GoodName=WWF - War Zone (E) [!] CRC=33A275A4 B8504459 Players=4 SaveType=Controller Pack [2322DA2B9E7DC74678CD683B7A246B49] GoodName=WWF - War Zone (U) [!] CRC=CD5BEC0F 86FD1008 Players=4 SaveType=Controller Pack [3FDB2E5F9982FDA2C2344A883B8AB6EF] GoodName=WWF Attitude (E) [!] CRC=5BF45B7B 596BEEE8 Players=4 SaveType=Controller Pack [B86EC8D19D7D1A50EA900EA10355A735] GoodName=WWF Attitude (G) [!] CRC=8F3151C8 4F3AF545 Players=4 SaveType=Controller Pack [5AC5CEDBD22CEEA8DD50CF6084193357] GoodName=WWF Attitude (G) [b1] CRC=8F3151C8 4F3AF545 RefMD5=B86EC8D19D7D1A50EA900EA10355A735 [9FAF514CB3DBB742C129DEB395DCA342] GoodName=WWF Attitude (U) [!] CRC=D2BE2F14 38453788 Players=4 SaveType=Controller Pack [6D4CBA7FB2E910CA1A87E63A4C1924C2] GoodName=WWF Attitude (U) [b1] CRC=D2BE2F14 38453788 RefMD5=9FAF514CB3DBB742C129DEB395DCA342 [44BC029B5219E1A16F3B99125056F98B] GoodName=WWF Attitude (U) [b2] CRC=D2BE2F14 38453788 RefMD5=9FAF514CB3DBB742C129DEB395DCA342 [382ECA33C5DD52B8C03A56D20F2D3F21] GoodName=WWF Attitude (U) [f1] (PAL) CRC=D89261A9 B1A2C9AF RefMD5=9FAF514CB3DBB742C129DEB395DCA342 [C9A6446918DA5D65612C521D432B7DA1] GoodName=WWF No Mercy (E) (V1.0) [!] CRC=6D8DF08E D008C3CF SaveType=Flash RAM Players=4 [473FDDBB121255A171A40C14130D0165] GoodName=WWF No Mercy (E) (V1.0) [b1] CRC=6D8DF08E D008C3CF RefMD5=C9A6446918DA5D65612C521D432B7DA1 [400A14F132D993F5544F8B008EC136FA] GoodName=WWF No Mercy (E) (V1.1) [!] CRC=8CDB94C2 CB46C6F0 Players=4 SaveType=Flash RAM [04C492BE7F89FC6F425238BD67629544] GoodName=WWF No Mercy (U) (V1.0) [!] CRC=4E4B0640 1B49BCFB Players=4 SaveType=Flash RAM [51074CFE7A319270CF088A7C65387368] GoodName=WWF No Mercy (U) (V1.0) [t1] CRC=361E1288 7A26BE5F RefMD5=04C492BE7F89FC6F425238BD67629544 [B75149F87CC5F3A508643AC377F2FCC9] GoodName=WWF WrestleMania 2000 (E) [!] CRC=C71353BE AA09A6EE Players=4 SaveType=SRAM [EBB9E3D3782347743BFFB8B6D178FC8A] GoodName=WWF WrestleMania 2000 (E) [h1C] CRC=C71353BE AA09A6EE RefMD5=B75149F87CC5F3A508643AC377F2FCC9 [11EEE2F34BF8DA05A1B8F4FB9FE9F74C] GoodName=WWF WrestleMania 2000 (J) [!] CRC=12737DA5 23969159 Players=4 SaveType=SRAM [AFC5EEDD3FCEEF85458E9C8FA162B303] GoodName=WWF WrestleMania 2000 (J) [b1] CRC=12737DA5 23969159 RefMD5=11EEE2F34BF8DA05A1B8F4FB9FE9F74C [D9030CA30E4D1AF805ACCE1BFED988CC] GoodName=WWF WrestleMania 2000 (U) [!] CRC=90A59003 31089864 Players=4 SaveType=SRAM [CB174FA89F352DD8451A43FEF2B8D1AA] GoodName=WWF WrestleMania 2000 (U) [b1] CRC=90A59003 31089864 RefMD5=D9030CA30E4D1AF805ACCE1BFED988CC [9EAFCA831487923E0BE79717A678894E] GoodName=WWF WrestleMania 2000 (U) [t1] (Never Drop Weapons) CRC=90A59003 31089864 RefMD5=D9030CA30E4D1AF805ACCE1BFED988CC [5F1906DF4EB30537C2AC2FCBD005907D] GoodName=Waialae Country Club - True Golf Classics (E) (M4) (V1.0) [!] CRC=93053075 261E0F43 Players=4 SaveType=Eeprom 4KB [1FC540D2168650E135BCC7D3B542E03A] GoodName=Waialae Country Club - True Golf Classics (E) (M4) (V1.0) [b1] CRC=93053075 261E0F43 RefMD5=5F1906DF4EB30537C2AC2FCBD005907D [F7C1B1EE1CE37CE09AA48C7E0A115EFA] GoodName=Waialae Country Club - True Golf Classics (E) (M4) (V1.1) [!] CRC=0C5057AD 046E126E Players=4 SaveType=Eeprom 4KB [DD8154D507C88694AFD69C7AF16A8CD6] GoodName=Waialae Country Club - True Golf Classics (U) (V1.0) [!] CRC=8066D58A C3DECAC1 Players=4 SaveType=Eeprom 4KB [D25DD15903BDCB7724A2E8A02561987F] GoodName=War Gods (E) [!] CRC=D715CC70 271CF5D6 Players=2 SaveType=None CountPerOp=1 [9FF2BA3C8408DE9F0EDB6D764A97C197] GoodName=War Gods (U) [!] CRC=F7FE28F6 C3F2ACC3 Players=2 SaveType=None CountPerOp=1 [D08D61E3C244A081C166C6A8D539A181] GoodName=War Gods (U) [o1] CRC=F7FE28F6 C3F2ACC3 RefMD5=9FF2BA3C8408DE9F0EDB6D764A97C197 [0D3F2F58310387C60F932F6EC936788D] GoodName=War Gods (U) [o1][h1C] CRC=F7FE28F6 C3F2ACC3 RefMD5=9FF2BA3C8408DE9F0EDB6D764A97C197 [F87937C9DE3703898C480FC84C692523] GoodName=War Gods (U) [o2] CRC=F7FE28F6 C3F2ACC3 RefMD5=9FF2BA3C8408DE9F0EDB6D764A97C197 [5C98466C2B2AAF7F3B51D4406EEE39FD] GoodName=War Gods (U) [o3] CRC=F7FE28F6 C3F2ACC3 RefMD5=9FF2BA3C8408DE9F0EDB6D764A97C197 [771FC17CDC840ED36DB8A699757C37F8] GoodName=War Gods (U) [t1] (God Mode) CRC=59BEB6F9 E6DC1630 RefMD5=9FF2BA3C8408DE9F0EDB6D764A97C197 [D24435C65C48E8DE0831FC8F466BAA51] GoodName=War Gods (U) (Power Bar Hack) CRC=AFBEB6F6 B0E715DC RefMD5=9FF2BA3C8408DE9F0EDB6D764A97C197 [310659115E9939F219A783ABDD456CE9] GoodName=Wave Race 64 (E) (M2) [!] CRC=650EFA96 30DDF9A7 Players=4 Rumble=No SaveType=Eeprom 4KB [A992E010BC3740C7C266D4F6E90226A1] GoodName=Wave Race 64 (E) (M2) [h1C] CRC=650EFA96 30DDF9A7 RefMD5=310659115E9939F219A783ABDD456CE9 [470D3E391A2B4CEBF0A9E15EC49CD324] GoodName=Wave Race 64 (E) (M2) [o1] CRC=650EFA96 30DDF9A7 RefMD5=310659115E9939F219A783ABDD456CE9 [B32E555BC1A375256E8A4021A25339BE] GoodName=Wave Race 64 (J) [!] CRC=5C9191D6 B30AC306 Players=4 Rumble=No SaveType=Eeprom 4KB [AE480013F39D4AEC86EEA1B4995600D1] GoodName=Wave Race 64 (U) (V1.0) [!] CRC=7DE11F53 74872F9D Players=4 Rumble=No SaveType=Eeprom 4KB [D653E6B050F63B5E1C1E9856319287E1] GoodName=Wave Race 64 (U) (V1.0) [t1] CRC=C5F4865F 03340B83 RefMD5=AE480013F39D4AEC86EEA1B4995600D1 [2048A640C12D1CF2052BA1629937D2FF] GoodName=Wave Race 64 (U) (V1.1) [!] CRC=492F4B61 04E5146A Players=4 Rumble=No SaveType=Eeprom 4KB [FF67DF97476C210D158779AE6142F239] GoodName=Wave Race 64 - Shindou Edition (J) (V1.2) [!] CRC=535DF3E2 609789F1 Rumble=Yes Players=4 SaveType=Eeprom 4KB CountPerOp=3 [AFBC694A3BA5AE83D3CEEF906BF01839] GoodName=Wave Race 64 - Shindou Edition (J) (V1.2) [b1] CRC=535DF3E2 609789F1 RefMD5=FF67DF97476C210D158779AE6142F239 [41E419F4392CFEF2C354006169362286] GoodName=Wave Race 64 - Shindou Edition (J) (V1.2) [b2] CRC=535DF3E2 609789F1 RefMD5=FF67DF97476C210D158779AE6142F239 [CAD993128A11B5616E5DDE5CF50CB998] GoodName=Wave Race 64 - Shindou Edition (J) (V1.2) [h1C] CRC=535DF3E2 609789F1 RefMD5=FF67DF97476C210D158779AE6142F239 [F9DA7EB74E391C5E6813212F7F55959A] GoodName=Wave Race 64 - Shindou Edition (J) (V1.2) [o1] CRC=535DF3E2 609789F1 RefMD5=FF67DF97476C210D158779AE6142F239 [24A0D8C8CABC22116E469476FF6C691D] GoodName=Wayne Gretzky's 3D Hockey '98 (E) (M4) [!] CRC=661B45F3 9ED6266D [810F8BC2C8C66BDA3B206C7DD4B6D42F] GoodName=Wayne Gretzky's 3D Hockey '98 (U) [!] CRC=5A9D3859 97AAE710 [096726498E698B51AFE72AAB5262A15A] GoodName=Wayne Gretzky's 3D Hockey '98 (U) [T+Ita_cattivik66] CRC=5A9D3859 97AAE710 [C9F95F9480B5867B03CFC0533F319253] GoodName=Wayne Gretzky's 3D Hockey '98 (U) [h1C] CRC=5A9D3859 97AAE710 [F7E5BDF8E4076C27961BAF9A42C73524] GoodName=Wayne Gretzky's 3D Hockey '98 (U) [h2C] CRC=5A9D3859 97AAE710 [319816AAA30E512827BE7B7F81F80D86] GoodName=Wayne Gretzky's 3D Hockey (E) (M4) [!] CRC=2209094B 2C9559AF Players=4 SaveType=Controller Pack [65F1D583B5392D3467BD187224FBBD89] GoodName=Wayne Gretzky's 3D Hockey (E) (M4) [b1] CRC=2209095F ECD28311 RefMD5=319816AAA30E512827BE7B7F81F80D86 [0905A37DBB3B9CEC38B52F6E109A9EAA] GoodName=Wayne Gretzky's 3D Hockey (E) (M4) [h1C] CRC=2209094B 2C9559AF RefMD5=319816AAA30E512827BE7B7F81F80D86 [61E637B542D5DF178040454075C28E19] GoodName=Wayne Gretzky's 3D Hockey (J) [!] CRC=F1301043 FD80541A Players=4 SaveType=Controller Pack [371620871660767900FC00F72681E1FD] GoodName=Wayne Gretzky's 3D Hockey (J) [b1] CRC=F1301043 FD80541A RefMD5=61E637B542D5DF178040454075C28E19 [03877A5CD0DD1E8C14EEEE70660E79DA] GoodName=Wayne Gretzky's 3D Hockey (J) [o1] CRC=F1301043 FD80541A RefMD5=61E637B542D5DF178040454075C28E19 [81EFB80DB5E014D865EC2EC88C393E4D] GoodName=Wayne Gretzky's 3D Hockey (J) [o2] CRC=F1301043 FD80541A RefMD5=61E637B542D5DF178040454075C28E19 [6DF0D6259261D0096C90BBC6AA037D8E] GoodName=Wayne Gretzky's 3D Hockey (U) (V1.0) [!] CRC=6B45223F F00E5C56 Players=4 SaveType=Controller Pack [EDBDB55AD58554C48B25A47D7E178513] GoodName=Wayne Gretzky's 3D Hockey (U) (V1.0) [b1] CRC=6B45223F F00E5C56 RefMD5=6DF0D6259261D0096C90BBC6AA037D8E [5349ABD4EE13C8F029A60032735B1AE3] GoodName=Wayne Gretzky's 3D Hockey (U) (V1.0) [o1] CRC=6B45223F F00E5C56 RefMD5=6DF0D6259261D0096C90BBC6AA037D8E [04E650B7742A69DAE98F125D1B492D78] GoodName=Wayne Gretzky's 3D Hockey (U) (V1.1) [!] CRC=DC3BAA59 0ABB456A Players=4 SaveType=Controller Pack [98C20A229170CF393BBF442D44FFC5B1] GoodName=Wet Dreams Can Beta Demo by Immortal (POM '99) (PD) CRC=CA3BC095 9649860A [D652769F8EE9BBE5F0BD5DF9B955D47E] GoodName=Wet Dreams Madeiragames Demo by Immortal (POM '99) (PD) CRC=993B7D7A 2E54F04D [37C0C97DFCE99F9968778448F5C9F0B6] GoodName=Wet Dreams Main Demo by Immortal (POM '99) (PD) CRC=A3A95A57 9FE6C27D [7B7B2916A857B9FC513C5F9619B36C98] GoodName=Wet Dreams Readme by Immortal (POM '99) (PD) CRC=9C044945 D31E0B0C Status=5 SaveType=None Players=0 Rumble=No [A99E2CB6ACEF7A004961DE5F6DFEEFF0] GoodName=Wetrix (E) (M6) [!] CRC=CEA8B54F 7F21D503 Players=4 SaveType=Controller Pack CountPerOp=3 [15F425829D54DD290451D2F3EBAF953F] GoodName=Wetrix (E) (M6) [f1] (NTSC) CRC=792C3A8E 0F2200F7 RefMD5=A99E2CB6ACEF7A004961DE5F6DFEEFF0 [087B6C2D5FBD778667C12D7FC7C305A7] GoodName=Wetrix (E) (M6) [t1] CRC=773E3E8E 1E8A0CBE RefMD5=A99E2CB6ACEF7A004961DE5F6DFEEFF0 [E8997BF5662540B184FBF8277D260984] GoodName=Wetrix (J) [!] CRC=DCB6EAFA C6BBCFA3 Players=4 SaveType=Controller Pack CountPerOp=3 [08826E96F3FB022A1C6351774198BA9D] GoodName=Wetrix (J) [o1] CRC=DCB6EAFA C6BBCFA3 RefMD5=E8997BF5662540B184FBF8277D260984 [6E81D3056E409208E4AF2D39A2FF0F03] GoodName=Wetrix (U) (M6) [!] CRC=CEA8B54F 7F21D503 Players=4 SaveType=Controller Pack CountPerOp=3 [2ABE36754E866B9B6C4BDCFFC1D11ABF] GoodName=Wheel of Fortune (U) [!] CRC=E896092B DC244D4E SaveType=None Players=4 [CC75D0771DBC825AC9F499400443A6A0] GoodName=Wheel of Fortune (U) [b1] CRC=E896092B DC244D4E RefMD5=2ABE36754E866B9B6C4BDCFFC1D11ABF [D20F2C6704D5B93372816BA0559E4E0F] GoodName=Wheel of Fortune (U) [o1] CRC=E896092B DC244D4E RefMD5=2ABE36754E866B9B6C4BDCFFC1D11ABF [CC8460B117AAFBD484CF43C1EB3D8E15] GoodName=Wheel of Fortune (U) [o1][b1] CRC=E896092B DC244D4E RefMD5=2ABE36754E866B9B6C4BDCFFC1D11ABF [764DCDF5163D3FCE81D3E7189FA97E05] GoodName=WideBoy BIOS V980910 CRC=D1C6C55D F010EF52 [FFF632A867CDADB5AB2098CB8E2CFADC] GoodName=WideBoy BIOS V980914 CRC=64F1084A 763C7E91 [F85F2A2B6CA64898F0ADD2A78CCDCCF3] GoodName=Wild Choppers (J) [!] CRC=0CEBC4C7 0C9CE932 Players=1 SaveType=Eeprom 4KB [BA538CBF43471B3522C4D08BAD0797A7] GoodName=Wild Choppers (J) [b1] CRC=0CEBC4C7 0C9CE932 RefMD5=F85F2A2B6CA64898F0ADD2A78CCDCCF3 [AC1339207A3E442B61EC0E074673C93B] GoodName=Wild Choppers (J) [b2] CRC=F4520439 753A6281 RefMD5=F85F2A2B6CA64898F0ADD2A78CCDCCF3 [DFB55C3F9B2D2A188616E9C123E0C816] GoodName=Wild Choppers (J) [b3] CRC=0CEBC4C7 0C9CE932 RefMD5=F85F2A2B6CA64898F0ADD2A78CCDCCF3 [7FE135D08035782A8AAE0BEFE9A9780B] GoodName=Wild Choppers (J) [o1] CRC=0CEBC4C7 0C9CE932 RefMD5=F85F2A2B6CA64898F0ADD2A78CCDCCF3 [B2DE25613755B234A376747422D83BBC] GoodName=Wild Choppers (J) [t1] CRC=F4520439 753A6281 RefMD5=F85F2A2B6CA64898F0ADD2A78CCDCCF3 [EE3D3550ACC463CA57408BF14E541F68] GoodName=WinBack (J) [!] CRC=1FA056E0 A4B9946A Players=4 SaveType=Controller Pack [1B94D98F509F467F9BC541102F6EBDFC] GoodName=WinBack (J) [b1] CRC=1FA056E0 A4B9946A RefMD5=EE3D3550ACC463CA57408BF14E541F68 [48DA6CDCAB838153CAA2ECC3DD592A65] GoodName=WinBack - Covert Operations (U) [!] CRC=ED98957E 8242DCAC Players=4 SaveType=Controller Pack [ACC6FD4E26D360D1BED54C316D7E33B9] GoodName=WinBack - Covert Operations (U) [b1] CRC=ED98957E 8242DCAC RefMD5=48DA6CDCAB838153CAA2ECC3DD592A65 [F3365B47E430011D89162FB0D7DD8DE5] GoodName=WinBack - Covert Operations (U) [f1] (PAL) CRC=337F24EE 73A807D9 RefMD5=48DA6CDCAB838153CAA2ECC3DD592A65 [FA34EAEBAA8A4E48D6BBD93DF62CD995] GoodName=WinBack - Covert Operations (U) [t1] CRC=35F51C8E 39EF72B8 RefMD5=48DA6CDCAB838153CAA2ECC3DD592A65 [5783373634B11F81C86908C3D81CA988] GoodName=Wipeout 64 (E) [!] CRC=54310E7D 6B5430D8 Players=4 SaveType=Controller Pack CountPerOp=1 [73C6D87DBE50F73F3B44E0F237A546D7] GoodName=Wipeout 64 (U) [!] CRC=132D2732 C70E9118 SaveType=Controller Pack Players=4 CountPerOp=1 [361F65D37F41536CDE98F83CAD456217] GoodName=Wipeout 64 (U) [o1] CRC=132D2732 C70E9118 RefMD5=73C6D87DBE50F73F3B44E0F237A546D7 [0E274A162CAD0B1B50F9B8D64D9F82FC] GoodName=Wipeout 64 (U) [t1] CRC=A6A99491 52B4E765 RefMD5=73C6D87DBE50F73F3B44E0F237A546D7 [B8DD77F17A8B638B1D38F57C81EAA89A] GoodName=Wipeout 64 (U) [t2] CRC=A6A99491 52B4E765 RefMD5=73C6D87DBE50F73F3B44E0F237A546D7 [0FF1F8628D8FE69582DB54572D2BEA79] GoodName=Wonder Project J2 - Koruro no Mori no Jozet (J) [!] CRC=E43C9765 05B1C1BE Players=1 [17C988866B03E382E1ABCC814187505A] GoodName=Wonder Project J2 - Koruro no Mori no Jozet (J) [T+Eng0.1_Ryu] CRC=6D6AF5BB 88D471E8 RefMD5=0FF1F8628D8FE69582DB54572D2BEA79 [D6E56B92EC7DBFB8B14DD5D8CFF6492E] GoodName=Wonder Project J2 - Koruro no Mori no Jozet (J) [b1] CRC=E43C9765 05B1C1BE RefMD5=0FF1F8628D8FE69582DB54572D2BEA79 [F5977968B621E74773E80CC4A33F7D2E] GoodName=Wonder Project J2 - Koruro no Mori no Jozet (J) [h1C] CRC=E43C9765 05B1C1BE RefMD5=0FF1F8628D8FE69582DB54572D2BEA79 [3AA263ACA66F3A07BB081B575D66DEEB] GoodName=World Cup 98 (E) (M8) [!] CRC=F9FC3090 FF014EC2 Players=4 SaveType=Controller Pack [E3DB1863E138B3AD5685A16029D0A44C] GoodName=World Cup 98 (E) (M8) [f1] (NTSC) CRC=F9FC3090 FF014EC2 RefMD5=3AA263ACA66F3A07BB081B575D66DEEB [4BEF5E9AA9E71205DAC1A7060E778235] GoodName=World Cup 98 (U) (M8) [!] CRC=BD636D6A 5D1F54BA Players=4 SaveType=Controller Pack [431DE8F6611A8131B536F0EDE1F330D9] GoodName=World Driver Championship (E) (M5) [!] CRC=AC062778 DFADFCB8 SaveType=Controller Pack Players=4 [9A2B0F3226FB8D129BEB7509C169476A] GoodName=World Driver Championship (E) (M5) [h1C] CRC=AC062778 DFADFCB8 RefMD5=431DE8F6611A8131B536F0EDE1F330D9 [7C567A5BB1AD4CBE414FB6BBFF66E336] GoodName=World Driver Championship (U) [!] CRC=308DFEC8 CE2EB5F6 SaveType=Controller Pack Players=4 [4B86C373533D015860467C5DC1F1C662] GoodName=World Driver Championship (U) [b1] CRC=308DFEC8 CE2EB5F6 RefMD5=7C567A5BB1AD4CBE414FB6BBFF66E336 [0C26665C2F40A786778EE4370C3A43FC] GoodName=World Driver Championship (U) [f1] (PAL) CRC=2A721F06 4097F7B1 RefMD5=7C567A5BB1AD4CBE414FB6BBFF66E336 [628C10A5D2ACC462C5527E6302467440] GoodName=World Driver Championship (U) [f2] (PAL) CRC=2A980400 7D805B1C RefMD5=7C567A5BB1AD4CBE414FB6BBFF66E336 [A4599EF88F36E62C1692BCEC416C5477] GoodName=World Driver Championship (U) [t1] CRC=C8FEF05D DAA3407D RefMD5=7C567A5BB1AD4CBE414FB6BBFF66E336 [44FC2A7F028F0B6F71B255F672C8B495] GoodName=Worms - Armageddon (E) (M6) [!] CRC=2D21C57B 8FE4C58C Players=4 SaveType=Eeprom 4KB [35FDA68C8481F7C3419CCD91EDBB6A9E] GoodName=Worms - Armageddon (E) (M6) [f1] (NTSC) CRC=94FBA5FD BC8FE181 RefMD5=44FC2A7F028F0B6F71B255F672C8B495 [491D4DB6718302489BF05FB962C73651] GoodName=Worms - Armageddon (U) (M3) [!] CRC=13E959A0 0E93CAB0 Players=4 SaveType=Eeprom 4KB [EC2BCB1B7FC7D068BE1F39E79E49A842] GoodName=Xena Warrior Princess - The Talisman of Fate (E) [!] CRC=0A1667C7 293346A6 SaveType=Controller Pack Status=3 Rumble=Yes Players=4 [1AC234649D28F09E82C0D11ABB17F03B] GoodName=Xena Warrior Princess - The Talisman of Fate (U) [!] CRC=0553AE9D EAD8E0C1 SaveType=Controller Pack Status=3 Rumble=Yes Players=4 [687AF471A5A16D665E16AC1E9069D16B] GoodName=Xena Warrior Princess - The Talisman of Fate (U) [f1] (PAL) CRC=BC875B60 8C993DF1 RefMD5=1AC234649D28F09E82C0D11ABB17F03B [6CB35999D2E3820391913F0E4B9BC072] GoodName=Xena Warrior Princess - The Talisman of Fate (U) [t1] CRC=BEADC61C 8622D9F6 RefMD5=1AC234649D28F09E82C0D11ABB17F03B [9137129A586E1BCAB6AE81BAC6B01275] GoodName=Xplorer64 BIOS V1.067 (G) CRC=656C6561 73652031 [763E5EACA4606E15A1E4D67DD6D987C0] GoodName=XtraLife Dextrose Demo by RedboX (PD) [h1C] CRC=1EDA4DE0 22BF698D [46C45620F26E4ED77B918F862FA597CD] GoodName=XtraLife Dextrose Demo by RedboX (PD) CRC=1EDA4DE0 22BF698D [A954E2BC5D774DC6E1CEBCE529F1CDED] GoodName=Y2K Demo by WT_Riker (PD) [b1] CRC=83F9F2CB E7BC4744 [76A1480BE9985D30FC580E4216974D3E] GoodName=Y2K Demo by WT_Riker (PD) CRC=83F9F2CB E7BC4744 [E24942948F7140EE4260268DB763D0FD] GoodName=Yakouchuu II - Satsujin Kouru (J) [!] CRC=9F8B96C3 A01194DC Players=1 [DD8A0E5472F13EA87B176F0155FA0C66] GoodName=Yoshi Story (J) [!] CRC=2DCFCA60 8354B147 Players=1 SaveType=Eeprom 16KB [B7B236051E4347428288F8D840BFD2E4] GoodName=Yoshi Story (J) [b1] CRC=E3CCFE36 398FBC75 RefMD5=DD8A0E5472F13EA87B176F0155FA0C66 [4BA4B1A2ABAF72EC83A2DB4CB6AEB7D6] GoodName=Yoshi Story (J) [f1] CRC=70666F63 FEC28A44 RefMD5=DD8A0E5472F13EA87B176F0155FA0C66 [38F004F68D5F1ABBC4391D156DEBCAEF] GoodName=Yoshi Story (J) [f2] CRC=70666F63 FEC28A44 RefMD5=DD8A0E5472F13EA87B176F0155FA0C66 [C43E3E28D84F337FF1BC88FA77996D33] GoodName=Yoshi Story (J) [f3] CRC=05BCD54E 97E2A8C9 RefMD5=DD8A0E5472F13EA87B176F0155FA0C66 [20ED9559D47535EA491D3548FB9E15E2] GoodName=Yoshi Story (J) [f4] CRC=D4DD9982 FDBA7B67 RefMD5=DD8A0E5472F13EA87B176F0155FA0C66 [3B41BAD41ABF4512FBF62727410EAC71] GoodName=Yoshi Story (J) [t1] CRC=369B314B E7780D04 RefMD5=DD8A0E5472F13EA87B176F0155FA0C66 [CF3802A99D8FE412359F1EB018FD991F] GoodName=Yoshi Story (J) [t2] (Health and Eggs) CRC=AF5F3773 B29B2C9A RefMD5=DD8A0E5472F13EA87B176F0155FA0C66 [2524E5FB8ED4BB8C831C5AC057E8F344] GoodName=Yoshi's Story (E) (M3) [!] CRC=D3F97D49 6924135B SaveType=Eeprom 16KB Players=1 [6E5E919D0FA292B97AAD08E9200E8C9C] GoodName=Yoshi's Story (E) (M3) [b1] CRC=D3F97D49 6924135B RefMD5=2524E5FB8ED4BB8C831C5AC057E8F344 [5D3C7935193A3B7327021B5E4740DEB6] GoodName=Yoshi's Story (E) (M3) [b2] CRC=D3F97D49 6924135B RefMD5=2524E5FB8ED4BB8C831C5AC057E8F344 [E2F6EF5D4181558656DDE8B0162D39D3] GoodName=Yoshi's Story (E) (M3) [b2][f1] CRC=9CB1BBB0 BC3439C7 RefMD5=2524E5FB8ED4BB8C831C5AC057E8F344 [C80D0A8193D530530AE875F8D9398E82] GoodName=Yoshi's Story (E) (M3) [b3] CRC=D3F97D49 6924135B RefMD5=2524E5FB8ED4BB8C831C5AC057E8F344 [ADEE5835A112677CCF74D5F4A1503294] GoodName=Yoshi's Story (E) (M3) [t1] (Health and Eggs) CRC=94FEDD3F 95719E88 RefMD5=2524E5FB8ED4BB8C831C5AC057E8F344 [586A092E22604840973B82DFACEAC77A] GoodName=Yoshi's Story (U) (M2) [!] CRC=2337D8E8 6B8E7CEC SaveType=Eeprom 16KB Players=1 [B907C051F1D7D0D15DE65EA87CF3F922] GoodName=Yoshi's Story (U) (M2) [b1] CRC=9CB1BBB0 BC3439C7 RefMD5=586A092E22604840973B82DFACEAC77A [B4A2127033CB671EEFE535B08F1AFB38] GoodName=Yoshi's Story (U) (M2) [b2] CRC=88047F1D 3B837D28 RefMD5=586A092E22604840973B82DFACEAC77A [D635824B5FC256DA0F2E457663CFF286] GoodName=Yoshi's Story (U) (M2) [b3] CRC=CCE336FE 8F3975BC RefMD5=586A092E22604840973B82DFACEAC77A [75F91A5D3012080EE9BF90C017B5128F] GoodName=Yoshi's Story (U) (M2) [b4] CRC=395E91DF 441D95C5 RefMD5=586A092E22604840973B82DFACEAC77A [8F47F6A80734D6C8501ADED549FF65C5] GoodName=Yoshi's Story (U) (M2) [b5] CRC=E3CCFE36 398FBC75 RefMD5=586A092E22604840973B82DFACEAC77A [0DCF29478A6DB0A3113B9EDD2AE428E1] GoodName=Yoshi's Story (U) (M2) [f1] CRC=E3CCFE36 398FBC75 RefMD5=586A092E22604840973B82DFACEAC77A [7CE4559FED0EA7D82670E9A4ECC370CD] GoodName=Yoshi's Story (U) (M2) [t1] CRC=88047F1D 3B837D28 RefMD5=586A092E22604840973B82DFACEAC77A [3DA2C5FA29D11D0481B60F6C6B14393A] GoodName=Yoshi's Story (U) (M2) [t2] (Health and Eggs) CRC=E606EE26 8783EC43 RefMD5=586A092E22604840973B82DFACEAC77A [5FE7486A5A458D538179DA898B067AD3] GoodName=Yoshi's Story BootEmu (PD) CRC=83D8A30C 8552C117 [2AE35BDF163613024D876A09F25063F3] GoodName=Yuke Yuke!! Trouble Makers (J) [!] CRC=9FE6162D E97E4037 Players=1 SaveType=Eeprom 4KB [6F9E56C8A2B6BA5F6DBE5214E352590D] GoodName=Yuke Yuke!! Trouble Makers (J) [a1] CRC=9FE6162D E97E4037 RefMD5=2AE35BDF163613024D876A09F25063F3 [BE734B15770D28C0A26D2DB98DF6CCCC] GoodName=Yuke Yuke!! Trouble Makers (J) [b1] CRC=9FE6162D E97E4037 RefMD5=2AE35BDF163613024D876A09F25063F3 [BADCEDF5B6BECDBCCA7267BD2D791EB1] GoodName=Yuke Yuke!! Trouble Makers (J) [o1] CRC=9FE6162D E97E4037 RefMD5=2AE35BDF163613024D876A09F25063F3 [C66D2037A654378C5CD365B135E36D87] GoodName=Z64 BIOS V1.05 CRC=551E06B4 02CD16A8 [730209AD52C178551C29074F49AE9B39] GoodName=Z64 BIOS V1.07 CRC=551E06B4 02CD16A8 [60BC7FE282C6BE6B90EA0B5FC63BC944] GoodName=Z64 BIOS V1.08 (Ravemax Hack V1.00b) CRC=00000000 00005053 [F5441580B27ECFB94A8C6B7989B1D101] GoodName=Z64 BIOS V1.08 CRC=00000000 00005053 [60A39BA7F3DCC592112FDF8220335F3D] GoodName=Z64 BIOS V1.09 CRC=00000000 00005053 [1412DDDCFD2DC960DA7D282D99FC2356] GoodName=Z64 BIOS V1.10b CRC=00000000 00005053 [40E74DA10255DCF00A45F02BED1AFCAD] GoodName=Z64 BIOS V1.11 CRC=00000000 00005053 [E81062B36B08078CE4CFF5A362F44764] GoodName=Z64 BIOS V1.12 CRC=00000000 00005053 [FFAAAFB32A2D87C6B621B62FFC85A2D6] GoodName=Z64 BIOS V2.00 (Barebones) CRC=B038EEEB 00BA6901 [A1CDE773E4FB8B691098F2B3D5F2DBBA] GoodName=Z64 BIOS V2.00 CRC=00000000 00005053 [319377A6D811EF8AD7B3E16B537E6346] GoodName=Z64 BIOS V2.00b (Ravemax Hack) CRC=00000000 00005053 [72775AB85B5106A97DECB0520DFD9180] GoodName=Z64 BIOS V2.10NTSC CRC=00000000 00005053 [DB67B8D7251314163E4F713724F55C66] GoodName=Z64 BIOS V2.10PAL CRC=00000000 00005053 [B15D755B8C6A4B5933802E5F227A183C] GoodName=Z64 BIOS V2.11NTSC CRC=00000000 00005053 [0CC1A139F9C3865FE698C64209C45253] GoodName=Z64 BIOS V2.11PAL CRC=00000000 00005053 [E76F0536CDAD4C6F89802E15A98AE985] GoodName=Z64 BIOS V2.12NTSC CRC=00000000 00005053 [CC2433DFB7738D5CB71A75B054E52DD5] GoodName=Z64 BIOS V2.12PAL CRC=00000000 00005053 [07C468E5050FC619791437930D740B10] GoodName=Z64 BIOS V2.12b (Nintendo Backup Crew Hack) CRC=00000000 00005053 [0170C86E42E15A364CDC6E176A63A500] GoodName=Z64 BIOS V2.12b3 CRC=00000000 00005053 [D65B99356296CA8F6B3273540203E0AA] GoodName=Z64 BIOS V2.12b4 CRC=00000000 00005053 [B6D6EDA244C308E63D36EEC607942605] GoodName=Z64 BIOS V2.13 CRC=00000000 00005053 [A4B138CAEDCE038D93C5B1FEDD897E7D] GoodName=Z64 BIOS V2.15 CRC=00000000 00005053 [4F557C3F71C0D04A54776450913E027F] GoodName=Z64 BIOS V2.16 CRC=00000000 00005053 [8EEE06C88613B1265721B26517B64F2C] GoodName=Z64 BIOS V2.16b CRC=00000000 00005053 [B29240BC2FFA6C46B83023F2226E3CDE] GoodName=Z64 BIOS V2.17 [h1] CRC=00000000 00005053 [0658D69EBA236FDF6DA5D491BDC96574] GoodName=Z64 BIOS V2.17 by zmod.onestop.net (ORB HDisk ZIP250 2.18zd Hack) CRC=00000000 00005053 [568D51E1D4602CD74AC3A2D9719A390A] GoodName=Z64 BIOS V2.17 by zmod.onestop.net (ORB HDisk ZIP250 Hack) CRC=00000000 00005053 [1630A446857F28D3068907F302B02114] GoodName=Z64 BIOS V2.17 CRC=00000000 00005053 [7344708B7E0FC0683BBA86D902B9603D] GoodName=Zelda 64 Boot Emu V1 by Crazy Nation (PD) [a1] CRC=9A7A9F14 05137CC7 [015A3F07366CEF93B5CB38B386E659F4] GoodName=Zelda 64 Boot Emu V1 by Crazy Nation (PD) CRC=9A7A9F14 05137CC7 [E419774A7113F1B82F6621EA512F10CF] GoodName=Zelda 64 Boot Emu V2 by Crazy Nation (PD) [a1] CRC=60005D15 65727EFF [01E2C444385597DC4FCF09E45C522B01] GoodName=Zelda 64 Boot Emu V2 by Crazy Nation (PD) CRC=60005D15 65727EFF [692A33B0D7456FC733A81AB83C20382B] GoodName=Zool - Majou Tsukai Densetsu (J) [!] CRC=1C010CCD 22D3B7FA Players=1 [4F8E5341B89E6C2069A319EF2FB58B16] GoodName=Zool - Majou Tsukai Densetsu (J) [f1] (PAL) CRC=7711DBA7 4856F7E0 RefMD5=692A33B0D7456FC733A81AB83C20382B [1DDE4D26CEDB2E8565AACB2C8098DF8D] GoodName=Neon64 GS V1.05 (Gameshark Version) (PD) CRC=03D7F021 8FDE0000 [775E6D9305BF219C0696063C809F2B48] GoodName=Neon64 GS V1.1 (Gameshark Version) (PD) CRC=3C0A8030 354A4E78 [4C3F1B48E7252391B337D9BAE404CF83] GoodName=Neon64 GS V1.2 (Gameshark Version) (PD) CRC=3C0A8030 354A5198 [81A2C7E1EC426D3AEE1C4B823A2BC7BF] GoodName=Neon64 GS V1.2 (Pro Action Replay Version) (PD) CRC=3C0A802D 354A3458 [90FAF5461E5F5CD5B67CE7891B9B055B] GoodName=Neon64 GS V1.2a (Gameshark Version) (PD) CRC=3C0A8030 354A51B0 [B9A06A029A842207A9E17AA40A702F7B] GoodName=Neon64 GS V1.2a (Pro Action Replay Version) (PD) CRC=3C0A802D 354A3470 [9BE795563DBA802DD566DF75D6106CFC] GoodName=Z64 BIOS V2.18 CRC=00000000 00005053 [4B2DBC0D448B7AD8569291E4E44821F0] GoodName=N64probe by MooglyGuy (PD) CRC=B216B9F1 AB27D881 [D7CB11A82EDAEE3F519346C7EAE201E9] GoodName=ObjectVIEWER V1.1 by Kid Stardust (PD) CRC=34E42466 F50868AC [A1D23D8C7A3194DCD0AC0CA1AF79136E] GoodName=TheMuscularDemo by megahawks (PD) CRC=B0565CCB BDA2C237 [DBF04773EC2B8ADF8A94DB7E3E461138] GoodName=Mupen64Plus Demo by Marshallh (GPL) CRC=DDBA4DE5 B107004A Status=5 Players=0 SaveType=None Rumble=No [46C9461B0B6F232C5A50CA795395D706] GoodName=DS1 Manager V1.1 by R. Bubba Magillicutty (PD) [T+Ita] CRC=868214B8 AB2BE6B7 [02E344EC824BBA4A4CFFCAC5FEADEA51] GoodName=F-ZERO Expansion Kit (N64DD) CRC=2129FFF8 AD000000 [8D3D9F294B6E174BC7B1D2FD1C727530] GoodName=N64DD IPLROM (J) CRC=00000000 00000000 [83807A5437A2EA21E2133DBA1E410750] GoodName=Wonder Project J2 - Koruro no Mori no Jozet (J) [T-Eng0.05] CRC=3A4B5938 A26F989D [E0530F182EA3BB780A6264B1D06737A1] GoodName=Z64 BIOS V2.20cf CRC=00000000 00005053 [D3929AADF7640F8C5B4CE8321AD4393A] GoodName=Zelda no Densetsu - Mujura no Kamen (J) (GC) [!] CRC=8473D0C1 23120666 [15D1A2217CAD61C39CFECBFFA0703E25] GoodName=Zelda no Densetsu - Mujura no Kamen (J) (V1.0) [!] CRC=EC417312 EB31DE5F [3E60CA693BABFF1F62CF8C0AEC338556] GoodName=Zelda no Densetsu - Mujura no Kamen (J) (V1.0) [b1] CRC=EC417312 EB31DE5F [0F6D3EDB5797A775757336549A8A9B94] GoodName=Zelda no Densetsu - Mujura no Kamen (J) (V1.0) [b1][o1] CRC=EC417312 EB31DE5F [E0CED30BF10F05EBAF1F1A27563E3E5D] GoodName=Zelda no Densetsu - Mujura no Kamen (J) (V1.0) [f1] CRC=EE7AF9EC A750B2D3 [0FA23CD30B68EB86548630FE635BB90E] GoodName=Zelda no Densetsu - Mujura no Kamen (J) (V1.0) [o1] CRC=EC417312 EB31DE5F [C38A7F6F6B61862EA383A75CDF888279] GoodName=Zelda no Densetsu - Mujura no Kamen (J) (V1.1) [!] CRC=69AE0438 2C63F3F3 mupen64plus-core-src-2.5/data/mupencheat.txt000066400000000000000000046644641251723631200211320ustar00rootroot00000000000000///* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // * Mupen64plus - mupencheat.txt * // * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * // * Copyright (C) 2008 Gent * // * * // * This program is free software; you can redistribute it and/or modify * // * it under the terms of the GNU General Public License as published by * // * the Free Software Foundation; either version 2 of the License, or * // * (at your option) any later version. * // * * // * This program is distributed in the hope that it will be useful, * // * but WITHOUT ANY WARRANTY; without even the implied warranty of * // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * // * GNU General Public License for more details. * // * * // * You should have received a copy of the GNU General Public License * // * along with this program; if not, write to the * // * Free Software Foundation, Inc., * // * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ // Used and relicensed GPL with permission from Gent // Start Original Header // PJ64 1.7 Official Cheats Database (Project64.cht) Beta Version 1.7.0.13 // All Region Cheat Codes By Gent. // ---------------------------------------------------- // // This Cheat file is only to be used with Project64 version 1.7 // // ---------------------------------------------------- // End Original Header // // This file was converted to a different format from the original PJ64 cheat format. // // [Meta] // Author=Gent // Version=Official Beta Version 1.7.0.13 // Date=30th April 2008 // Homepage=http://www.pj64.net //--------------- (J) Region Cheat Codes --------------- crc 80F41131-384645F6-C:4A gn AeroGauge (J) (V1.1) //---- cn No Damage\Player 1 50000402 0000 8113D058 0000 cn No Damage\Player 2 50000402 0000 8113F0E8 0000 cn Unlock All Tracks and Vehicles 8008D1FC 0001 cn Freeze All Lap Timers 8013CD21 0001 8013CD25 0001 8013CD29 0001 cn Freeze Overall Timer cd All of the Freeze All Lap Timers must be on. These codes will Stop the others from racing against you in Grand Prix mode. To win a race in Grand Prix you must finish at least one lap in the qualify round, then complete all laps in race for first. 8013CD15 0001 cn Laps Of Race 8013CD0E ???? 0001:"1 Lap",0002:"2 Laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"Never Ending Laps" cn Play As\Player 1 8013D015 ???? 0000:"N64 Control Pad",0001:"Interceptor",0002:"Hornet",0003:"Avenger",0004:"Shredder",0005:"Black Lightning",0006:"Vengeance",0007:"Prowler",0008:"Reaper",0009:"Dominator" cn Level Select cd For this cheat to work,as soon as you put the cheat on you must turn it back off,if not you wont beable to quit a Race or even finish one. 8013D01B ???? 0000:"Canyon Rush",0001:"Bikini Island",0002:"China Town",0003:"Neo Arena",0004:"China Town Jam",0005:"Neo Speed Way" cn Play As\Player 2 8013D016 ???? 0000:"N64 Control Pad",0001:"Interceptor",0002:"Hornet",0003:"Avenger",0004:"Shredder",0005:"Black Lightning",0006:"Vengeance",0007:"Prowler",0008:"Reaper",0009:"Dominator" cn Always 1st 8013CD60 0001 cn Music Modifier 80106CCC ???? 00FF:"Music On",0000:"Music Off" crc B00903C9-3916C146-C:4A gn AeroGauge - Kiosk (J) (V1.0) cn No Damage\Player 1 50000402 0000 8113CF08 0000 cn No Damage\Player 2 50000402 0000 8113EF98 0000 cn Unlock All Tracks and Vehicles 8008D0AC 0001 cn Freeze All Lap Timers 8013CBD1 0001 8013CBD5 0001 8013CBD9 0001 cn Freeze Overall Timer cd All of the Freeze All Lap Timers must be on. These codes will Stop the others from racing against you in Grand Prix mode. To win a race in Grand Prix you must finish at least one lap in the qualify round, then complete all laps in race for first. 8013CBC5 0001 cn Laps Of Race 8013CBBE ???? 0001:"1 Lap",0002:"2 Laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"Never Ending Laps" cn Play As\Player 1 8013CEC5 ???? 0000:"N64 Control Pad",0001:"Interceptor",0002:"Hornet",0003:"Avenger",0004:"Shredder",0005:"Black Lightning",0006:"Vengeance",0007:"Prowler",0008:"Reaper",0009:"Dominator" cn Level Select cd For this cheat to work,as soon as you put the cheat on you must turn it back off,if not you wont beable to quit a Race or even finish one. 8013CECB ???? 0000:"Canyon Rush",0001:"Bikini Island",0002:"China Town",0003:"Neo Arena",0004:"China Town Jam",0005:"Neo Speed Way" cn Play As\Player 2 8013CEC6 ???? 0000:"N64 Control Pad",0001:"Interceptor",0002:"Hornet",0003:"Avenger",0004:"Shredder",0005:"Black Lightning",0006:"Vengeance",0007:"Prowler",0008:"Reaper",0009:"Dominator" cn Always 1st 8013CC10 0001 cn Music Modifier 80106B7C ???? 00FF:"Music On",0000:"Music Off" crc B6951A94-63C849AF-C:4A gn Akumajou Dracula Mokushiroku - Real Action Adventure (J) cn Infinite\Health 81389C3E 0064 cn Infinite\Throwing Weapon 81389C48 0064 cn Throwing Weapon Modifier 81389C42 ???? 0000:"Nothing",0001:"Knives",0002:"Exploding Potions",0003:"Cross",0004:"Axes" cn Press L To Levitate D0387D7F 0020 81350810 3FCB cn Have\All Items 50000501 0000 80389C4A 0001 50000301 0000 80389C51 0001 80389C5A 0001 80389C5B 0001 80389C5D 0001 50000E01 0000 80389C60 0001 cn Have\Invincibility 80342BFE 000B cn Infinite\Red Jewels 80389C49 0063 cn Status 80389C88 ???? 0001:"Good",0008:"Vamp",0011:"Poison",0022:"Good but depressed",0066:"Sto",001F:"V+P" cn Open All Doors and Gates,No Bosses 50002A02 0000 81389BD0 FFFF cn Infinite\Energy 80389C3F 0064 cn Infinite\Funds 80389C45 0001 81389C46 869F cn Have\Exp Points 80389C49 0063 cn Max Power Up 80389CED 0002 cn Never Get Poisoned 81389C88 0000 cn Level Select cd You must use this code on a saved game, because the intro to the first level will mess up the game. Now select the saved game, and hold down the GS button until the level loads. Some of the boss stages will not let you fight the boss unless you re-enter the area. Also, with the part of stage modifier, the second code modifies the part of the level that you are in, and 0000 is the level's start. 89389C90 ???? 0000:"Forest of Silence",0002:"Castle Wall",0003:"Villa",0004:"Inside Villa",0006:"Garden Maze",0007:"Tunnel",0008:"Underground Waterway",0009:"Castle Center",0010:"Tower of Execution",0011:"- Tower of Sorcery",0012:"- Tower of Science",0013:"- Duel Tower",0014:"- Fight With Death/Actrise",0015:"- Castle Keep",0016:"- Intro (Glitch)",0017:"- Clock Tower",0018:"- Final Dracula",001A:"- Fight With Maze Boss",001B:"- Room of Clocks",001C:"- ??",001D:"- ??" 89389C92 0000 cn Switch From cd This Switch From Cheat lets you switch characters on a saved game For example, if you are Reindhart and you want to be Carrie in the middle of your game save it and then enable this Cheat and press F1. when you start your saved game back up you'll be Carrie instead of Reindhart. 80389C3D ???? 0000:"Carrie to Reindhart",0001:"Reindhart to Carrie" crc A5533106-B9F25E5B-C:4A gn Akumajou Dracula Mokushiroku Gaiden-Legend of Cornell (J) cn Infinite\Keys\Clocktower A 801CC51F 000A cn Infinite\Keys\Clocktower B 801CC520 000A cn Infinite\Keys\Storeroom 801CC510 000A cn Infinite\Keys\Garden 801CC511 000A cn Infinite\Keys\Copper 801CC512 000A cn Infinite\Keys\Chamber 801CC513 000A cn Infinite\Keys\Execution 801CC514 000A cn Infinite\Keys\Deck 801CC515 000A cn Infinite\Keys\Rose Garden 801CC516 000A cn Infinite\Keys\Thorn 801CC517 000A cn Infinite\Keys\Clocktower C 801CC518 000A cn Infinite\Keys\Clocktower D 801CC519 000A cn Infinite\Keys\Art Tower 1 801CC51A 000A cn Infinite\Keys\Art Tower 2 801CC51B 000A cn Infinite\Keys\Control Room 801CC51C 000A cn Infinite\Keys\Wall 801CC51D 000A cn Infinite\Keys\Clocktower E 801CC51E 000A cn Infinite\Keys\Archives 801CC50E 000A cn Infinite\Keys\Left Tower 801CC50F 000A cn Infinite\Health 811CC4EA 2710 cn Infinite\Gold 811CC4F2 2710 cn Infinite\Specials\Special 1 801CC4F7 000A cn Infinite\Specials\Special 2 801CC4F8 000A cn Infinite\Specials\Special 3 801CC4F9 000A cn Infinite\Items\Roast Chicken 801CC4FA 000A cn Infinite\Items\Roast Beef 801CC4FB 000A cn Infinite\Items\Healing Kit 801CC4FC 000A cn Infinite\Items\Purifying 801CC4FD 000A cn Infinite\Items\Cure Ampoule 801CC4FE 000A cn Infinite\Items\Powerup 801CC4FF 000A cn Infinite\Items\The Contract 801CC504 000A cn Infinite\Items\Magical Nitro 801CC505 000A cn Infinite\Items\Mandragora 801CC506 000A cn Infinite\Items\Sun Card 801CC507 000A cn Infinite\Items\Moon Card 801CC508 000A cn Infinite\Items\Winch Lever 801CC509 000A cn Infinite\Items\Oldrey's Diary 801CC50A 000A cn Infinite\Items\Crest Half A 801CC50B 000A cn Infinite\Items\Crest Half B 801CC50C 000A cn Infinite\Items\Rose Brooch 801CC50D 000A cn Infinite\Items\Throwing Weapons 801CC4F5 0064 cn Infinite\Items\Red Jewels on Pick-Up 801CC4F5 0068 cn Infinite\Bullets cd For Henry 801D5753 0006 cn Wolfman Can Use Weapons cd For Cornell 801CC4E7 0002 cn Wolfman Can't Use Weapons cd For Cornell (Default) 801CC4E7 0004 cn Rapid Fire Gun (Henry-Hold B) cd For Henry, Hold B D11CA1A6 0040 801D5753 0006 cn Max Powerups 801CC7D3 0002 cn Stop Timer Input 811CC4D2 0001 cn Hard Mode Selected In A New Game cd With this code, you will not see the hard level status until you save and restart the game file. No special items are required to access this feature with this code turned on. 8032630F 0002 cn Weapon Modifier 811CC4EE ???? 0000:"Nothing",0001:"Knife",0002:"Potion",0003:"Cross",0004:"Axe" cn Level Modifier 801CC829 ???? 0000:"Forest Of Silence",0001:"Left Tower",0002:"Castle Wall",0003:"Villa",0004:"Villa",0005:"Villa",0006:"Villa",001A:"Villa",0007:"Tunnel",0008:"Underground Waterway",0009:"Castle Center",000A:"Castle Center",000B:"Castle Center",000C:"Castle Center",000D:"Castle Center",000E:"Castle Center",000F:"Castle Center",0010:"Foggy Lake",0011:"Foggy Lake",0012:"Foggy Lake",0013:"Cave Of Spiderwomen",0014:"Castle Keep",0015:"Castle Keep",0016:"Falls Into Space(?)",0017:"Clock Tower",0018:"Final Battle Site",0019:"Castle Center",001B:"Room Of Clocks",001C:"Countryside Where Carrie's Mom Is Buried.(Fall Through Ground)",002B:"Countryside Where Carrie's Mom Is Buried.(Fall Through Ground)",001D:"Tower Of Sorcery",001E:"Tower Of Execution",001F:"Tower Of Execution",0020:"Tower Of Execution",0021:"Tower Of Science",0022:"Tower Of Science",0023:"Tower Of Ruins",0024:"Tower Of Ruins",0025:"Art Tower",0026:"Art Tower",0027:"Dual Tower",0028:"Clock Tower",0029:"Clock Tower",002A:"Outer Wall",002C:"Fall From Sky Ouside Of Castlevania Opening",002D:"Another Free Fall. Forest Where Girl Runs In Opening",002E:"Black Room(?)" cn Inter-Level Modifier 801CC82B ???? 0000:"Forest Of Silence",0001:"Left Tower",0002:"Castle Wall",0003:"Villa",0004:"Villa",0005:"Villa",0006:"Villa",001A:"Villa",0007:"Tunnel",0008:"Underground Waterway",0009:"Castle Center",000A:"Castle Center",000B:"Castle Center",000C:"Castle Center",000D:"Castle Center",000E:"Castle Center",000F:"Castle Center",0010:"Foggy Lake",0011:"Foggy Lake",0012:"Foggy Lake",0013:"Cave Of Spiderwomen",0014:"Castle Keep",0015:"Castle Keep",0016:"Falls Into Space(?)",0017:"Clock Tower",0018:"Final Battle Site",0019:"Castle Center",001B:"Room Of Clocks",001C:"Countryside Where Carrie's Mom Is Buried.(Fall Through Ground)",002B:"Countryside Where Carrie's Mom Is Buried.(Fall Through Ground)",001D:"Tower Of Sorcery",001E:"Tower Of Execution",001F:"Tower Of Execution",0020:"Tower Of Execution",0021:"Tower Of Science",0022:"Tower Of Science",0023:"Tower Of Ruins",0024:"Tower Of Ruins",0025:"Art Tower",0026:"Art Tower",0027:"Dual Tower",0028:"Clock Tower",0029:"Clock Tower",002A:"Outer Wall",002C:"Fall From Sky Ouside Of Castlevania Opening",002D:"Another Free Fall. Forest Where Girl Runs In Opening",002E:"Black Room(?)" cn Cut Scene Modifier cd With this code, you must use the appropiate level mod before you attemp to run these cut scenes. Not doing so will ruin the cut scene as the graphics will be glitched. 801CC843 0009 801CC83B ???? 0003:"Castle Drawbridge Lowers",0004:"Character Enters Castle",0005:"(?)",000A:"(?)",000C:"(?)",0020:"(?)",0021:"(?)",0022:"(?)",0006:"Vampire In Main Entrance Hall Of Villa",0007:"One Of The Working Gears Cut Scenes",0008:"\"I Smell Poison\" From Underground Waterway",0009:"Castle Gate Closes In Villa Upon Entering Villa",000B:"Renon Appears For First Time",000D:"Village Vampire In Upstairs Villa",000E:"Malus Appears For The First Time",000F:"Malus Leaves Garden",0010:"Character In Boat On Foggy Lake",0011:"Seal Removed From Wall In Arena",0012:"Bleeding Statue",0013:"Cosmic Lights",0014:"Explosion At Wall In Arena",0015:"Explosion At Wall In Castle That Leads To Hidden Room",0016:"Malus Appears Again In Upstairs Room Of Castle",0017:"Bull Awakens",0018:"Vincent The Vampire",0019:"One Of The Working Gears Cut Scenes",001A:"Gate Opens In Forest Of Silence",001B:"Meet Renon For The Last Time In Castle Keep.",001C:"This Cut Scene Runs Cut Scene 27 And 2E",001E:"Castle Keep Destructs",001F:"Malus On Flying Horse Outside Castle Keep",0024:"Spider People In Tunnel",0025:"Rosa In Garden",0027:"Castel Destruction",0028:"Space Warp",0029:"Castle Destruction",002A:"Malus Is Saved By Reinhardt",002B:"Malus And Reinhardt On Horse",002E:"Rosa Returns",0030:"Ada, Henry And Cornell At Game End",0031:"Scrolling Text About Castle And Henry",0033:"Vampire In Basement",0034:"Vampire In Villa Basement Destroyed, Woman Vampire Rises",0035:"Finds Hidden Path In Villa Basement",0037:"Lever & Gear In Castle",0038:"Harpie",0039:"Harpie Destroyed",0044:"Death(Grim Reaper)",0045:"Death Is Destroyed",0046:"Castle Drawbridge Closes And Ortega Appears",0047:"Thirsty Man",0048:"Cornell Meets Henry In Garden",0049:"Cornell And Henry Part In Garden",0051:"Monster Dracula Appears",0052:"Actrise Appears In Castle Center",0054:"Actrise Appears Again With Cousin Fernandes Before Fight With Carrie",0055:"Cousin Fernandes Is Destroyed",0056:"Actrise Appears Again Before Fight With Carrie",0057:"Actrise Defeated By Carrie" cn Enable All Characters 8031CBF3 0004 cn Character Modifier 8031CBDB ???? 0005:"Henry",0006:"Reinhardt",0007:"Carrie" cn Status Modifier 801CC534 ???? 0000:"Never Get Poisoned or Vamped",0001:"Normal",0004:"Vamp",0008:"Poison",000C:"Vamped & Poisoned",00FF:"Instant Death" cn Max Weapon Power-Up 801CC7D7 0002 cn Day Modifier For Adult Henry 801CC4CF ???? 0000:"7 Days",0001:"6 Days",0002:"5 Days",0003:"4 Days",0004:"3 Days",0005:"2 Days",0006:"1 Day",0007:"0 Days" cn Infinite\Health Young Henry D11CA1A6 0010 813A6D10 2800 crc 6C45B60C-DCE50E30-C:4A gn Airboarder 64 (J) cn Infinite Turbo\Player 1 80166019 0009 cn Infinite Turbo\Player2 80167991 0009 cn Infinite Time\Street Work & Coin 801137E9 0028 cn Infinite Time\Attack Time Time 000000 811137EA 0000 cn Infinite Time\Time Attack 801137EB 0000 cn Access All Boards & Characters 800500C1 000C cn Maxed Out Turbo Bar 811656E8 429F 80166017 0051 cn Class Score Select 8016609E ???? 0020:"Class C",0040:"Class B",0064:"Class A",00FF:"Class S" cn Coin Perfect Select cd this is for Coin Mode to get Perfect Coin Collection Score straight away when you enter the level 801660B3 ???? 0014:"Green Park Level 1",001A:"Green park Level 2",002B:"Green park Level 3",004A:"Lost Forest Level 1",0059:"Lost Forest Level 2",0080:"Lost Forest Level 3",007D:"Snow Festival 64 Levels 1 2 & 3",006F:"Sunset Island Level 1",0074:"Sunset Island Level 2",0081:"Sunset Island Level 3",006E:"Giant House Level 1",0077:"Giant House Level 2",0072:"Giant House Level 3" cn Options\Music Modifier 800500A9 ???? 00FF:"BGM On",0000:"BGM Off" cn Options\Sound Effects Modifier 810500AA ???? 00FF:"SE On",0000:"SE Off" cn Options\Camera Type Modifier 810500A6 ???? 0000:"Roll On Near",0001:"Roll On Mid",0002:"Roll On Far",0003:"Roll Off Near",0004:"Roll Off Mid",0005:"Roll Off Far" cn Options\DJ Function Modifier 810500AC ???? 0001:"DJ Function On",0000:"DJ Function Off" cn All Street Work Levels Unlocked 50007801 0000 80050170 ???? 0001:"Courses unlocked",0003:"Courses unlocked with C rank",0004:"Courses unlocked with B rank",0005:"Courses unlocked with A rank",0006:"Courses unlocked with S rank" crc E340A49C-74318D41-C:4A gn Baku Bomberman (J) cn Invincible\Player 1 800AEE01 0001 cn Have\Pumped up Red Remote Bombs 802AC653 0004 cn Infinite\Lives 802AB857 0063 cn Infinite\Gems 802AB85F 0063 cn Infinite\Credits 802AB85B 0009 cn Infinite\Time 802AB873 0001 cn Carry 20 Bombs At A Time 800AEE0F 0014 cn Infinite\Energy\Player 1 800AEE07 0002 cn Infinite\Energy\Player 2 800AEECF 0002 cn Infinite\Energy\Player 3 800AEF97 0002 cn Infinite\Energy\Player 4 800AF05F 0002 crc E73C7C4F-AF93B838-C:4A gn Baku Bomberman 2 (J) cn Infinite\Money 810A9BB2 FFFF cn Infinite\Bombs 800AB5B8 0003 cn Have\Max Fire Level 800AB593 0003 cn Infinite\Health 800AB5BF 0005 cn Infinite\Continue Time 810B3B36 0090 cn Have\Fire Bombs 800AB59B 0003 cn Have\Kick Bombs Anytime 800AB5A3 0003 cn Flashing Invincible cd This cheat Makes you Flash But you cant be harmed,Once out of danger Turn the cheat off to stop the flashing.also do not put this on if you have already been hurt or you will stay on the floor. 800AB5C7 000A crc 5168D520-CA5FCD0D-C:4A gn Banjo to Kazooie no Dai Bouken (J) cn Infinite\Eggs 80386AA7 00FF cn Infinite\Lives 80386ACB 00FF cn Infinite\Jiggies 80386B0B 00FF cn Infinite\Notes cd Just collect one Note to Have 255 Notes in all Worlds. 80386B32 00FF 80386AA2 0001 cn Infinite\Health 80386AC3 0008 80386AC7 0008 cn Infinite\Air 81386ACE 0E10 cn Infinite\Gold Feathers 80386AB3 00FF cn Infinite\Red Feathers 80386AAF 00FF cn Infinite\Always Have All Jinjos 80386ABB 00FF cn Have Zero Time all Levels 50000B04 0000 81386B44 3000 cn Infinite\Mumbo Tokens 80386B07 00FF crc 514B6900-B4B19881-C:4A gn Banjo to Kazooie no Dai Bouken 2 (J) cn Infinite\Energy\Banjo and Kazooie cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 80115329 0063 81115A04 0A0A cn Infinite\Air 80125222 42C8 cn Infinite\Energy\Snowball cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 80115329 0063 80115907 0005 cn Infinite\Energy\Bee cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 80115329 0063 80115913 000A 80115914 000A cn Infinite\Energy\Washing Machine cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 80115329 0063 81115916 0A0A cn Infinite\Energy\Stony cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 80115329 0063 80115919 000A 8011591A 000A cn Infinite\Energy\Banjo cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 80115329 0063 8011591F 000A 80115920 000A cn Infinite\Energy\Kazooie cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 80115329 0063 81115922 0A0A cn Infinite\Energy\Submarine cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 80115329 0063 80115925 000A 80115926 000A cn Infinite\Energy\Mumbo cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 80115329 0063 81115928 0A0A cn Infinite\Energy\Detonator cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 80115329 0063 8111592E 0A0A cn Infinite\Energy\T-Rex Baby cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 80115329 0063 8011593F 000A 80115940 000A cn Play As cd To use this cheat, put the cheat on, then press L as you walk through a door to become that chosen character D0080845 0020 801211FC ???? 0001:"Banjo and Kazooie",0002:"Snowball",0006:"Bee",0007:"Washing machine",0008:"Stony",000A:"Banjo",000B:"Kazooie",000C:"Submarine",000D:"Mumbo",000E:"Golden Goliath",000F:"Detonator",0010:"Truck",0012:"T-rex baby",0013:"T-rex daddy" cn Instant Warp\Options\Spiral Mountain cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0000:"AD Grunty's Old Lair",0000:"AE Behind The Waterfall",0000:"AF Top Of Castle",0001:"73 Banjo's house" 801217F3 0001 cn Instant Warp\Options\Jinjo Village cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0001:"42 Jinjo Village",0001:"44 King Jingalings throne room",0001:"43 Bottles house",0001:"45 Green Jinjo's House",0001:"46 Black Jinjo's House",0001:"47 Yellow Jinjo's House",0001:"48 Blue Jinjo's House",0001:"4A Brown Jinjo's House",0001:"4B Orange Jinjo's House",0001:"4C Purple Jinjo's House",0001:"4D Red Jinjo's House",0001:"4E White Jinjo's House" 801217F3 0001 cn Instant Warp\Options\Mayahem Temple cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0000:"B6 Humba's Wigwam",0000:"B7 Mumbo's skull",0000:"B8 The Temple",0000:"B9 Prison Compound",0000:"BC Code chamber",0000:"C4 Jade Snake Grove",0000:"C5 Treasure Chamber",0000:"C6 Kickball Arena",0001:"77 Targitzan's Slighty Sacred Temple",0001:"78 Inside Targitzans Temple",0001:"79 Targitzan Temple Lobby",0001:"7A Targitzan's Temple Boss",0001:"7F Mayan Kickball Arena",0001:"66 Multi",0001:"67 Still",0000:"C8 Kickball Arena",0000:"C9 Kickball Arena" 801217F3 0001 cn Instant Warp\Options\Glitter Gulch Mine cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0000:"C7 Mine",0000:"CA Fuel depot",0000:"CB Crushing shed",0000:"CC Flooded caves",0000:"CD Water storage",0000:"CE Waterfall cavern",0000:"CF Power hut basement",0000:"D0 Chuffy's cab",0000:"D1 Inside chuffy's boiler boss",0000:"D2 Gloomy caverns",0000:"D3 Generator caverns",0000:"D4 Power hut",0000:"D5 Wumba's wigwam",0000:"D7 Train station",0000:"D8 Prospectors hut",0000:"D9 Mumbo's hut",0000:"DA Toxic gas cave",0000:"DB Canary cave",0000:"DC Ordnance storage",0000:"E9 Humba",0001:"26 Water supply pipe",0001:"63 Ordnance Storage entrance",0001:"64 Ordnance Storage game",0001:"65 Ordnance Storage game Multi",0001:"6F Testing",0001:"70 Testing",0001:"71 Mumbo's skull" 801217F3 0001 cn Instant Warp\Options\Witchy World cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0000:"D6 Witcy World",0000:"DD Dodgem dome lobby",0000:"DE Dodgem challenge \"1 vs 1\"",0000:"DF Dodgem challenge \"2 vs 1\"",0000:"E0 Dodgem challenge \"3 vs 1\"",0000:"E1 Crazy castle stockade",0000:"E2 Crazy castle lobby",0000:"E3 Crazy castle pump room",0000:"E4 Balloon burst game",0000:"E5 Hoop hurry game",0000:"E6 Star spinner",0000:"E7 The inferno",0000:"EA Cave of horrors",0000:"EB Haunted cavern",0000:"EC Train station",0001:"24 Saucer of Peril",0001:"3B Crazy castle stockade \"sop\"",0001:"3C Star spinner \"sop\"",0001:"76 Mumbo's skull" 801217F3 0001 cn Instant Warp\Options\Jolly Roger's Lagoon cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0000:"ED Jolly's",0000:"EE Pawno's emporium",0000:"EF mumbo's skull",0000:"F4 Ancient Swimming Baths",0000:"F6 Electric Eels lair",0000:"F7 Seaweed Sanctum",0000:"F8 Inside the big fish",0000:"FA temple of the fishes",0001:"A8 Atlantis",0001:"A9 Seabottom",0001:"81 sea bottom cavern",0001:"82 submarine multi",0001:"A7 Jolly Roger's Lagoon",0000:"FF Blubber's wave race hire" 801217F3 0001 cn Instant Warp\Options\Terrydacty Land cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0001:"12 Terrydacty Land",0001:"13 Terry's nest",0001:"14 Train station",0001:"15 Oogle boogles cave",0001:"16 Inside the mountain",0001:"17 River passage",0001:"18 Styracosaurus family cave",0001:"19 Unga bunga's cave",0001:"1A Stomping plains",0001:"1B Bonfire caverns",0001:"1E Humba's Wigwam",0001:"23 Inside chompa's belly",0001:"83 Chompa's belly multi" 801217F3 0001 cn Instant Warp\Options\Grunty Industries cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0001:"00 Outside",0001:"01 Inside",0001:"02 Train station",0001:"03 Workers quarters",0001:"04 Trash compactor",0001:"05 Elevator shaft",0001:"06 Floor 2",0001:"07 Floor 2 \"electromagnet chamber\"",0001:"08 Floor 3",0001:"09 Floor 3 \"boiler plant\"",0001:"0A Floor 3 \"packing room\"",0001:"0B Floor 4",0001:"0C Floor 4 \"cable room\"",0001:"0D Floor 4 \"quality control\"",0001:"0E Floor 5",0001:"0F Basement",0001:"10 Basement \"repair depot",0001:"11 Basement \"waste disposal\"",0001:"25 Water supply pipe",0001:"72 Mumbo's skull",0001:"62 Floor 4 \"clinkers cavern\"",0001:"87 Sewer entrance" 801217F3 0001 cn Instant Warp\Options\Hailfire Peaks cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0001:"27 Lava side",0001:"28 Icy side",0001:"29 Lava train station",0001:"2A Ice train station",0001:"2B Chilli billi",0001:"2C Chilly willy",0001:"2D Colosseum kickball stadium lobby",0001:"31 Boggy's igloo",0001:"32 Icicle grotto",0001:"33 Inside the volcano",0001:"68 Icy side still" 801217F3 0001 cn Instant Warp\Options\Cloud Cuckoo Land cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0001:"36 Cloud Cuckoo Land 1",0001:"37 Inside the trashcan",0001:"38 Inside the cheesewedge",0001:"39 Zubba's nest",0001:"3A Central cavern",0001:"3D Inside the pot o gold",0001:"3E Mumbo's skull",0001:"3F Mingy jongo's skull",0001:"40 Humba wumba's wigwam",0001:"61 Cloud Cuckoo Land 2",0001:"88 Zubba's nest multi",0001:"85 Trash can mini" 801217F3 0001 cn Instant Warp\Options\Isle O Hags cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0001:"4F Wooded Hollow",0001:"50 Heggy's egg shed",0001:"51 Jiggywiggy's temple",0001:"52 Plateau",0001:"53 Plateau \"Honey B's Hive\"",0001:"54 Pine Grove",0001:"55 Cliff top",0001:"56 Cliff top Mumbo's skull",0001:"5A wasteland",0001:"5B inside another digger tunnel",0001:"5C Quagmire" 801217F3 0001 cn Instant Warp\Options\Cauldron Keep cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0001:"5D Cauldron Keep",0001:"5E The gatehouse",0001:"5F Tower of Tragedy Quiz",0001:"60 Gun chamber",0001:"6A Gun room still",0001:"7B Crazy Castle Stockade balloon burst multi",0001:"7C Crazy Castle Stockade Jump the hoops multi",0001:"7D Grunty Industries packing game",0001:"80 Colosseum kickball arena",0001:"86 Dodgems" 801217F3 0001 cn Instant Warp\Options\Not sure cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D1080844 0000 811217F0 ???? 0000:"FC Lord woo fak fak",0000:"F9 Mr Patch",0001:"21 Inside Chuffy's wagon",0001:"34 Mumbo's Skull",0001:"35 Humba Wumba's wigwam 1",0001:"57 Humba Wumba's wigwam 2",0001:"9B Jingalings Zombified Palace",0001:"A6 Smuggler cavern",0001:"41 Inside the digger tunnel",0001:"43 Bottles house",0001:"69 Bottles house still",0001:"8A HAG Inside",0001:"9A HAG1 Final Boss" 801217F3 0001 cn Beta Bottles Revenge Mode cd Bottles Revenge is a Beta mode from Banjo Tooie that the RWP team recently uncovered after an extraordinary amount of effort. Bottles the Spirit transforms into Bottles the Devil and posses enemies nearby and allows a second player hooked up to Pad 2 to play as that Posses character to try to foil Banjos Plans. As player one goes about its business, player two uses every enemy nearby to try to nab Banjo and take away some life. This mode is incredible, and you can control almost every enemy in the game: slot machines, flying creatures, uggers, zubbas...and this is just the beginning. (Congrats Rare Witch Project) 801255C2 0001 80080881 0002 crc 91691C3D-F4AC5B4D-C:4A gn Transformers - Beast Wars Metals 64 (J) cn Infinite\Health\Player 1 8112A576 270F cn Infinite\Stun Meter\Player 1 8012A579 00FF cn Infinite\Health\Player 2 8114AAF6 270F cn Infinite\Stun Meter\Player 2 8014AAF9 00FF cn Play As\Player 1 801BBA54 ???? 0000:"Optimus Primal",0001:"Rattrap",0002:"Cheetor",0003:"Airazor",0004:"Megatron",0005:"Tarantulas",0006:"Waspinator",0007:"Terrorsaur" cn Play As\Player 2 801BBA55 ???? 0000:"Optimus Primal",0001:"Rattrap",0002:"Cheetor",0003:"Airazor",0004:"Megatron",0005:"Tarantulas",0006:"Waspinator",0007:"Terrorsaur" crc 65234451-EBD3346F-C:4A gn Blast Dozer (J) cn Infinite\Hydraulics Sidesweeper 803EDCE1 0063 cn Infinite\Missiles Motor Bike 803F8C53 0063 cn Infinite\Boosts Buggy Vehicle 803EE491 0064 cn Sideswipe\Can Go In Water 803EDCE2 0063 cn Sidesweep\Can Go Through Anything 803EDCE2 FFFF cn J-Bomb Floats Through Anything 803F7C5A 0001 cn Rapid Fire\Ballista 803F8C5D 0000 cn Rapid Fire\Sideswipe 803EDCE6 0000 cn Drive Through Anything\Ballista 803F8BF8 0001 cn Drive Through Anything\Dump Truck 813EEBE8 0101 cn Drive Through Anything\Red, White, & Blue Car 813EEFC8 0101 cn Drive Through Anything\Skyfall 813EE438 0101 cn Drive Through Anything\Police Car 813F8FD8 0101 cn Drive Through Anything\Red Car 813FC658 0101 cn Drive Through Anything\Van 813F93A8 0101 crc DF6FF0F4-29D14238-C:4A gn Bomberman 64 - Arcade Edition (J) cn Have\Max Fire 8024A39E 00FF cn Have\Max Bombs 8024A39F 00FF cn Bomb Select 8024A3A1 ???? 0002:"Power Bomb",0003:"Jelly Bomb",0004:"Shock Wave Bomb",0005:"Blue Remote Bomb",0006:"Red Beem Bomb",0007:"Invisible Mine Bomb",001D:"Crazy Bomb",0000:"Clear All Special Bombs." cn Walk through\Blocks cd Walk through Blocks like they are not there.Turn cheat to off to go back to normal. 8024A3A5 ???? 0000:"Off",0001:"On" cn Bomberman Speed 8024A3A0 ???? 0004:"Slow",0008:"Normal",000E:"Fast",0010:"Turbo" cn Have\Infinite\Kick 8024A3A6 0002 cn Invincible cd Enemies & Bomb Blasts cant harm you.But if you walk & keep laying Bombs it will most likly freeze.so try to avoid constant bombing while walking.Turn cheat to off to go back to normal. 8024A3A8 ???? 0000:"Off",0001:"On" cn Walk through\Bombs cd Walk through Bombs like they are not there.Turn cheat to off to go back to normal. 8024A3A6 ???? 0000:"Off",0001:"On" cn Infinite\Health Hearts 8024A3AE 00FF cn Infinite\Lives 802E1CE7 00FF cn Infinite\Timer 800FDD72 002A crc 67FF12CC-76BF0212-C:4A gn Bomberman Hero (J) cn Full\Bomb Power 80165239 0003 cn Full\Fire Power 8016523A 0003 cn Infinite\Health 8016523E 0004 cn Infinite\Lives 8016523D 0009 cn Extra Gems D016523B 0000 8016523B 004B cn Max\Bombs 80165239 0008 cn Press L to Levitate cd Press L to levitate & let go to come back down D005A2F5 0020 81154178 41CB D005A2F5 0020 D0154154 0000 80154154 0040 cn Max\Score 80177601 00FF 80177602 00FF cn Max\Explosion 8016523A 0008 crc D7C762B6-F83D9642-C:4A gn Buck Bumble (J) cn Have All\Guns & Infinite Ammo cd Press C Left to receive all Guns 81101DFA 0001 50000B04 0000 810EB156 03E7 cn Infinite\Health cd If you fall into Water just turn off the Infinite Health & put back on after. 810EB148 42D8 cn Infinite\99 Lives 810EB4C0 0005 cn Have All\Keys 810EB150 0101 800EB152 0001 cn Max Bonus 810EB4BA 270F crc A4F2F521-F0EB168E-C:4A gn Chameleon Twist (J) cn Extra Crowns 8024790B 0015 cn Infinite Health 80168E73 000A cn Extended Tongue 8132790E FFFF cn Level Select cd When you press Pause in-game and Stage Quit yo will go to the Stage Screen this cheat lets you choose what Stage you would like to go to but make sure you turn the cheat off and press A to continue to that stage. 8029BF7B ???? 0000:"Stage 1",0001:"Stage 2",0002:"Stage 3",0003:"Stage 4",0004:"Stage 5",0005:"Stage 6",0006:"Stage 7" crc 0549765A-93B9D042-C:4A gn Chameleon Twist 2 (J) cn Infinite Health 80187BBD 000F cn Max Collectable Items 80160641 0014 cn Have 6 Carrots 80160659 007E cn Have All\Levels 80160648 003F cn Have All\Costumes 8016065A 00FE cn Have All\Collectibles\Stage 1 80160650 0014 cn Have All\Collectibles\Stage 2 80160651 0014 cn Have All\Collectibles\Stage 3 80160652 0014 cn Have All\Collectibles\Stage 4 80160653 0014 cn Have All\Collectibles\Stage 5 80160654 0014 cn Have All\Collectibles\Stage 6 80160655 0014 cn Press L To levitate cd Press L To Levitate & Let go to land D0187BF5 0020 81187B20 4200 crc 2BCCF9C4-403D9F6F-C:4A gn Choro Q 64 (J) cn Super Speed cd This is Turbo fast,So to slow it down a little more keep the B button pressed down 81213568 4800 cn Always 1st 802133B6 0001 cn Class Select cd This code is useful because you can play Class AA without having to beat a level! 80206857 ???? 0000:"Class C",0001:"Class B",0003:"Class AA",0004:"1 Play",0005:"2 Play",0006:"3 Play",0007:"4 Play" crc 079501B9-AB0232AB-C:4A cn All Stuff Available For Player 1 cd This modifies your save file. That will make all the multiplayer stages available, as well as unlocking every part. The actual breakdown is: 50003802 0000 810F4230 FFFF cn All Equipment Unlocked 50001402 0000 810F40B0 FFFF cn All Equipment Registered 50001402 0000 810F40D8 FFFF cn All Equipment Unhighlighted 50001402 0000 810F4100 FFFF cn All Help Notes Available For Player 1 50000602 0000 810F409C FFFF cn Side Invincible\Player 1 811FC00C 447A cn Side Invincible\Player 2 811FC034 447A crc 7188F445-84410A68-C:4A gn Dance Dance Revolution - Disney Dancing Museum cn Maximum Song Score\Player 1 8108A260 3B9A 8108A262 C9FF cn Maximum Song Score\Player 2 8108A264 3B9A 8108A266 C9FF cn Maximum Total Score\Player 1 810854E0 3B9A 810854E2 C9FF cn Maximum Total Score\Player 2 81085518 3B9A 8101551A C9FF cn Maximum Dance Gauge\Player 1 810854DC 03E8 cn Maximum Dance Gauge\Player 2 81085514 03E8 cn Unlock All Songs 8015621D 00FF 8115621E FFFF cn Unlock All Puzzles 50001902 0000 81156228 FFFF cn Can Skip End Credits 8015627F 0001 cn Endless Mode 800854CD 0000 cn Results\999 Perfect Steps\Player 1 8108A21E 03E7 cn Results\999 Perfect Steps\Player 2 8108A236 03E7 cn Results\999 Great Steps\Player 1 8108A222 03E7 cn Results\999 Great Steps\Player 2 8108A23A 03E7 cn Results\0 Good Steps\Player 1 8108A226 0000 cn Results\0 Good Steps\Player 2 8108A23E 0000 cn Results\0 Boo Steps\Player 1 8108A22A 0000 cn Results\0 Boo Steps\Player 2 8108A242 0000 cn Results\0 Miss Steps\Player 1 8108A22E 0000 cn Results\0 Miss Steps\Player 2 8108A246 0000 crc 8979169C-F189F6A0-C:4A gn Dezaemon 3D (J) cn Infinite\99 Lives 8023648D 0063 cn Unlock Ramsie Mini-Game 801FF43E 0001 cn Max Score 80249F91 00FF cn Infinite\Speed 8024B6BC ???? 0000:"Normal",0001:"Slow",0002:"Medium",0003:"Fast",0007:"Warp Drive" cn Infinite\Stream Laser 80236CD0 ???? 0000:"2 Stream Laser",0001:"4 Stream Laser",0002:"6 Stream Laser" cn Infinite\Shield 80250971 ???? 0001:"On",0000:"Off" cn Infinite\99 R Button Bombs 8024BD89 0063 crc 7AA65B36-FDCEE5AD-C:4A gn Doom 64 (J) cn Always Have\Gun 80063B33 0001 cn Always Have\Shotgun 80063B37 0001 cn Always Have\Double Shotgun 80063B3B 0001 cn Always Have\Chain Gun 80063B3F 0001 cn Always Have\Missile Launcher 80063B43 0001 cn Always Have\Chainsaw 80063B2B 0001 cn Always Have\Plasma Rifle 80063B47 0001 cn Always Have\BFG 9000 80063B4B 0001 cn Always Have\Have Rocket Launcher 80063B41 0001 cn Always Have\Laser Weapon 80063B4D 0001 cn Always Have\Bio Suite 80063AF3 ???? 00FF:"On",0000:"Off" cn Infinite\Armor 80063ADF 00FF cn Always Have\Rapid Fire 81063BAA 0B94 cn Invincible 80063B7B 0002 cn Turn Map Markers On 80063B7B 0004 cn Invincible And Map Markers 80063B7B 0006 cn Berserk Mode 80063AEB 00FF cn [Max Brightness] cd Enable this cheat on rom load to have Max Brightness (internal) and then put Jabo d3d8 on 160% Max for a extra brightness Boost. 8005B598 0064 cn Have All\Weapons 50000A04 0000 81063B2A 0001 cn Infinite\Ammo All Weapons 50000404 0000 81063B52 013C cn Have All\Keys 50000504 0000 81063AFE FFFF cn Enable Cheat Menu 8005B043 0001 crc BFF7B1C2-AEBF148E-C:4A gn Doraemon - Mittsu no Seireiseki (J) cn Infinite\Lives 800F38C5 000A cn Infinite\Energy 800FB897 00FF cn Infinite\Bells 800F38C3 ???? 0063:"99 Bells",0000:"No Bells" crc BD8E206D-98C35E1C-C:4A gn Dobutsu no Mori (J) cn Hours 80136FBE ???? 0000:"00 AM",0001:"01 AM",0002:"02 AM",0003:"03 AM",0004:"04 AM",0005:"05 AM",0006:"06 AM",0007:"07 AM",0008:"08 AM",0009:"09 AM",000A:"10 AM",000B:"11 AM",000C:"00 PM",000D:"01 PM",000E:"02 PM",000F:"03 PM",0010:"04 PM",0011:"05 PM",0012:"06 PM",0013:"07 PM",0014:"08 PM",0015:"09 PM",0016:"10 PM",0017:"11 PM" cn Minutes 80136FBD ???? 0000:"00",0005:"05",000A:"10",000F:"15",0014:"20",0019:"25",001E:"30",0023:"35",0028:"40",002D:"45",0032:"50",0037:"55",003B:"59" cn Day 80136FBF ???? 0001:"Monday 1st",0002:"Tuesday 2nd",0003:"Wednesday 3rd",0004:"Thursday 4th",0005:"Friday 5th",0006:"Saturday 6th",0007:"Sunday 7th",0008:"Monday 8th",0009:"Tuesday 9th",000A:"Wednesday 10th",000B:"Thursday 11th",000C:"Friday 12th",000D:"Saturday 13th",000E:"Sunday 14th",000F:"Monday 15th",0010:"Tuesday 16th",0011:"Wednesday 17th",0012:"Thursday 18th",0013:"Friday 19th",0014:"Saturday 30th",0015:"Sunday 21st",0016:"Monday 22nd",0017:"Tuesday 23rd",0018:"Wednesday 24th",0019:"Thursday 25th",001A:"Friday 26th",001B:"Saturday 27th",001C:"Sunday 28th",001D:"Monday 29th",001E:"Tuesday 30th",001F:"Wednesday 31st" cn Month 80136FC1 ???? 0001:"Jan",0002:"Feb",0003:"March",0004:"April",0005:"May",0006:"June",0007:"July",0008:"Aug",0009:"Sept",000A:"Oct",000B:"Nov",000C:"Dec" cn Time Passes 80136FD2 ???? 0000:"Time Normal",0001:"Mins Like Seconds",0005:"Hours & Mins Medium",0010:"Hours & Mins Fast",00FF:"Time Zooms By" cn Max Cash 813BC34C FFFF cn Item Select 81126EE8 ???? 1011:"Tall Red Cupboard",1C00:"Pet Cage",1CA6:"Fish Tank (Fish Included!)",1D2B:"Orange NES Game",1D2F:"Grey NES Game",1D33:"Red NES Game",1D37:"Light Blue NES Game",1D3A:"Yellow NES Game",1D3E:"Purple NES Game",1D42:"Blue NES Game",1D47:"Stereo NES Colour",1D4C:"Record Player",1D50:"JukeBox",1DA0:"Grandfather Clock",1DA6:"Stereo Kinda Thing",1DA9:"Stereo",1DAC:"CD Player",1DB3:"Alarm Clock",1EA1:"Lamp",1EA5:"Snowman Fridge",1EAB:"Round Snowman Table",1EAF:"Snowman Bed",1EB0:"Snowman Seat",2100:"1000 Bag",2100:"1000 Bag",2101:"10000 Bag",2101:"10000 Bag",2102:"30000 Bag",2102:"30000 Bag",2103:"100 Bag",2103:"100 Bag",2410:"Nook's Shirt",2410:"Nook's Shirt",2514:"Flat Shell",2514:"Flat Shell",2515:"Pointy Shell",2515:"Pointy Shell",2804:"Orange,2804 Orange" crc 056EAB63-C215FCD5-C:4A gn Dual Heroes (J) cn Infinite\Energy\Player 1 81224DC4 00FF cn Infinite\Energy\Player 2 81224DC6 00FF cn Infinite\Time 81224DCC 00FF cn Never Wins\Player 1 80224DB5 0000 cn Never Wins\Player 2 80224DB7 0000 crc E13AE2DC-4FB65CE8-C:4A gn Eltale Monsters (J) cn Have All Elements 8107A9F4 3232 8107A9F6 3232 cn Infinite Health 8107A9D4 01F4 8107A9D6 01F4 cn Infinite Magic Points 8107A9D8 01F4 8107A9DA 01F4 cn Super Agility 8107A9DE 01F4 cn Super Defense 8107A9DC 01F4 crc 399B9B81-D533AD11-C:4A gn Extreme-G XG2 (J) cn Max Points 80183DD3 0064 cn Infinite\Nitros 81170F02 0003 81170F06 0003 cn Infinite\Shield 81170F2C 42C8 cn Access\All Tracks 50000BD8 0000 80183327 0001 cn Access\All Superbikes 50000304 0000 80183D6F 0001 cn Access\All Secret Characters 50000C04 0000 80183D6F 0001 cn Always 1st 80171063 0001 cn [Screen Hud Clear] cd This Fixes the Problem on all Plugins that have Hud covering the Screen.Let the game load 1st before Putting this code on,Or it will give an error and Freeze 80092D1B 0004 crc 147E0EDB-36C5B12C-C:4A gn Neon Genesis Evangelion (J) cn (Press GS)\To Refill Health cd Don't Press GS after the Enemy is killed, only during the fight! 891F0F18 42C8 891F0F1A 0000 cn (Press GS)\To Kill Enemy cd Don't Press GS after the Enemy is killed, only during the fight! and only use on Press GS Cheat at a time 891F2454 0000 891F2456 0000 891F2458 0000 891F245A 0000 cn (Press L)\ For One Hit Kill cd Don't Press L after the Enemy is killed, only during the fight! D0149DD5 0020 811F2458 0000 D0149DD5 0020 811F245A 0000 cn (Press R)\For Level Warp cd Press Reset and enjoy! D00D5115 0015 800D5115 ???? 002B:"Level 01",002F:"Level 02",0033:"Level 03",0037:"Level 04",003B:"Level 05",003D:"Level 06",0040:"Level 07",0043:"Level 08",0046:"Level 09",0049:"Level 10",004C:"Level 11",004F:"Level 12",0051:"Level 12.5",0053:"Level 13",0018:"Credits 1",0019:"Credits 2",001A:"Credits 3" cn Secret Beta 2 Player Test Mode cd Press Reset and enjoy! Secret 2 Player Test Mode? The Second Player doesn't move ;( D00D5115 0015 800D5115 0055 crc 4D3E622E-9B828B4E-C:4A gn F-Zero X (J) cn Always 1st Place 802C4BC2 0001 cn Infinite Lives 800E5AA9 0005 cn Unlock Everything 800CD428 0001 cn Player 1\Infinite Shield 812C4B48 4336 812C4B4C 4336 cn Have Boost From Start D02C4DAC 003F 802C4925 0050 cn Time Always 00.00.00 1st Place 802C4BC0 0000 802C4BC2 0001 crc 49E46C2D-7B1A110C-C:4A gn Fighting Cup (J) cn Start with Stars Modifier\Player 1 D0208E17 0000 80208E17 ???? 0000:"No Stars",0006:"Max Stars" cn Start with Stars Modifier\Player 2 D020ACDF 0000 8020ACDF ???? 0000:"No Stars",0006:"Max Stars" cn Have 1 Star\Ryuji 80306A0E 0001 cn Have 1 Star\Bob 80306A0F 0001 cn Have 1 Star\Pierre 80306A10 0001 cn Have 1 Star\Meiling 80306A11 0001 cn Have 1 Star\Leon 80306A12 0001 cn Have 1 Star\Abdul 80306A13 0001 cn Have 1 Star\Ninja 80306A14 0001 cn Have 1 Star\Tomahawk 80306A15 0001 cn Have 1 Star\Valerie 80306A16 0001 cn Infinite Health\Player 1 80208F61 0000 80203E83 0000 cn Infinite Health\Player 2 80203E87 0000 8020AE29 0000 cn Start on stage 100 on Survival to get Joker 802EED3B 0063 cn Stop timer for Fastest to get Robot 810AD29C 3F80 crc 28D5562D-E4D5AE50-C:4A gn Fire Electric Pen (J) cn Freeze Timer cd Only enable this cheat once the Timer Go moves to 80. Once the level has ended or you have died disable and enable on 80. 800760CB 0001 crc 70B0260E-6716D04C-C:4A gn GAUNTLET LEGENDS cn Infinite\Max Health 810C5C54 0000 810C5C56 270F 810C5C64 0000 810C5C66 270F cn Infinite\Money 810C5CF6 FFFF cn Max Strength 810C5C04 0000 810C5C06 FFFF cn Max Speed 810C5C14 0000 810C5C16 FFFF cn Max Magic 810C5C24 0000 810C5C26 FFFF cn Max Armour 810C5C34 0000 810C5C36 FFFF cn Infinite\Turbo 800FD30F 0064 cn Level 99 810C5C44 0000 810C5C46 0063 cn Infinite\Special Weapons 800C5FF7 0009 800C5D37 0009 800C5D67 0009 800C5DE7 0009 800C5EB7 0009 cn Always Shoot 5-Way 800FD198 0200 cn Always Shoot 3-Way 800FD19A 0002 cn Always Shoot Rapid Fire 800FD19A 1000 cn Have Window Schards 8104EFCA 000F cn Have Rune Stones 8104EFC6 1FFF cn Infinite\Item On Pickup 50010100 0000 810C5BF6 FFFF cn Infinite\Keys On Pickup 800C5C97 0006 crc 0DE2CE36-D41D29E6-C:4A gn Hybrid Heaven (J) cn Have All\Keys 50000410 0000 80181C70 0063 50000410 0000 80181C78 0063 cn Infinite\Weapons & Items 50000610 0000 80181C10 0063 50000610 0000 80181C18 0063 cn Infinite\Refresh Items 50000D10 0000 80181B48 0063 50000C10 0000 80181B50 0063 cn Infinite\Max Body Stats 81181788 270F 811817C8 0063 50000C02 0000 81181790 270F 50000502 0000 811817C0 270F 50000602 0000 811817E8 270F 50000602 0000 811817F6 270F cn Infinite\Max Health 81181780 270F 81181782 270F cn Level 999 811817C8 270F cn Press L To Levitate D005D8D1 0020 8124C710 3FCB crc 519EA4E1-EB7584E8-C:4A gn KING HILL 64 cn Max\50000 Stunt Points 8108C978 C350 cn Low Timer 8008C8A4 0000 8008C8A6 0000 cn Have\All Characters 8108C9B8 07FF cn Have\All Difficulties 8108C9B0 0700 cn Have\All Tracks 8108C9BC BFFE cn Have\All Boards 8108C9C4 0003 8108C9C6 FFFF crc 6BFF4758-E5FF5D5E-C:4A gn Mario Kart 64 (J) (1.0) cn Infinite Items\2 player Mode\Player 1 80163655 ???? 80163682 ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Infinite Items\2 player Mode\Player 2 80163735 ???? 80163762 ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Infinite Items\3-4 player Mode\Player 1 80163815 ???? 80163842 ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Infinite Items\3-4 player Mode\Player 2 801638F5 ???? 80163922 ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Infinite Items\3-4 player Mode\Player 3 801639D5 ???? 80163A02 ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Infinite Items\3-4 player Mode\Player 4 80163AB5 ???? 80163AE2 ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Have Bonus Mode and All Gold Cups 8018C728 ???? 8018C729 ???? 8018C72A ???? 8018C72B ???? 0000:"Off",00FF:"On" cn Press GS\For Full Debug Menu cd Press GS at the Press Start Menu to access the Debug Menu 8818C80F 0002 cn Press L To Levitate\Player 1 D00F73C5 0020 810F7478 4000 cn Press L To Levitate\Player 2 D00F73D5 0020 810F8250 4000 cn Press L To Levitate\Player 3 D00F73E5 0020 810F9028 4000 cn Press L To Levitate\Player 4 D00F73F5 0020 810F9E00 4000 crc C9C3A987-5810344C-C:4A gn Mario Kart 64 (J) (1.1) cn Have Bonus Mode and All Gold Cups 8018B4D8 ???? 8018B4D9 ???? 8018B4DA ???? 8018B4DB ???? 0000:"Off",00FF:"On" cn Press GS\For Full Debug Menu cd Press GS at the Press Start Menu to access the Debug Menu 8818B5BF 0002 cn Press L To Levitate\Player 1 D00F61B5 0020 810F6268 4000 cn Press L To Levitate\Player 2 D00F61C5 0020 810F7040 4000 cn Press L To Levitate\Player 3 D00F61D5 0020 810F7E18 4000 cn Press L To Levitate\Player 4 D00F61E5 0020 810F8BF0 4000 crc ADA815BE-6028622F-C:4A gn Mario Party (J) cn Top Left Character\Coin Options cd If you want to have full 255 Coins,1st use the 100 Option then put on 255. this will stop the numbers from changing & spoiling the result. 800F2709 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Top Left Character\Star Options 800F270D ???? 0000:"0 Stars",0064:"99 Stars" cn Top Right Character\Coin Options 800F2739 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Top Right Character\Star Options 800F273D ???? 0000:"0 Stars",0064:"99 Stars" cn Lower Left Character\Coin Options 800F2769 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Lower Left Character\Star Options 800F276D ???? 0000:"0 Stars",0064:"99 Stars" cn Lower Right Character\Coin Options 800F2799 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Lower Right Character\Star Options 800F279D ???? 0000:"0 Stars",0064:"99 Stars" cn Top Left Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800D5782 ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Top Right Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800D57C6 ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Lower Left Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800D580A ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Lower Right Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800D584E ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Mini Game\Unlimited 99 lives 800F2C03 0063 cn Mini Game\Max 99 Coins 800F2C0C 0063 crc 3A6C42B5-1ACADA1B-C:4A gn Mario Tennis 64 (J) cn Have All\Characters Available 8105DEB8 FFFF cn Have All\Courts Available 8105DEBC FFFF cn Score\Player 1 8014B1DA ???? 0000:"0",0001:"15",0002:"30",0003:"40" cn Score\Player 2 8014B1DB ???? 0000:"0",0001:"15",0002:"30",0003:"40" crc 736AE6AF-4117E9C7-C:4A gn Mickey no Racing Challenge USA (J) cn Play As 800D3161 ???? 0000:"Mickey Mouse",0001:"Daisy Duck",0002:"Goofy",0003:"Pete",0004:"Minnie Mouse",0005:"Donald Duck",0006:"Huey",0007:"Dewey",0008:"Louie",0009:"Lugwig Von Drake" cn Traffic Troubles\Indianapolis\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018E892 0063 cn Traffic Troubles\San Fransisco\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80191B62 0063 cn Traffic Troubles\New Mexico\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018FD52 0063 cn Traffic Troubles\Grand Canyon\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80193252 0063 cn Motor Way Mania\Los Angeles\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018DCF2 0063 cn Motor Way Mania\Alaska\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018E482 0063 cn Motor Way Mania\Las Vegas\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80192B12 0063 cn Motor Way Mania\Philadelphia\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80193992 0063 cn Freewayphobia\Dakota\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018D212 0063 cn Freewayphobia\Seattle\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018FDF2 0063 cn Freewayphobia\New York\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018F512 0063 cn Freewayphobia\Chicago\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80192042 0063 cn Victory Vehicles\Yellowstone\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018D4C2 0063 cn Victory Vehicles\Washington DC\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80197662 0063 cn Victory Vehicles\Everglades\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018FC22 0063 cn Victory Vehicles\Malibu\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801916B2 0063 cn Frantic Finale\Hawaii\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80192072 0063 cn Frantic Finale\Oregon\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018EA42 0063 cn Frantic Finale\Texas\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018F1E2 0063 cn Frantic Finale\Colorado\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80191992 0063 cn Level Select 801876B9 ???? 0000:"Traffic Troubles",0001:"Motor Way Mania",0002:"Freewayphobia",0003:"Vitory Vehicles",0004:"Frantic Finale",0005:"Time Trial",0006:"Practice",0007:"Contest",0008:"Options" cn Difficulty Select 8007C000 ???? 0000:"Amateur",0001:"Intermediate",0002:"Professional",0003:"Mirror Mode" cn Unlock Everything cd This will unlock all characters, tracks, mirror mode, all in-game cheats, postcards, pluto's collar and give you all Trophies for every track and difficulties. To have this cheat save to mempak, enable it and then go into the Options Menu and disable the cheat. Go to the Wide-Screen Settings and Change it to Wide-Screen [16.9] and then the B button to get back to Wide-Screen Settings, now go back into Wide-Screen [16.9] and change it back to Normal [4.3].and press the B button until you come back to the main Options Menu.Close the game and load it again to see everything saved to the Mempak and unlocked. 800D3208 008F 800D3209 0094 800D320A 0003 800D320C 0001 800D320F 0080 50000502 0000 800D3210 0009 50000502 0000 800D3211 0024 800D321A 0015 800D321B 007F 800D321C 0001 800D321D 00FF 800D321E 0004 800D321F 0022 cn Always 1st & final time 00:00.00 cd All Levels 50000301 0000 801CE6E9 0000 crc 96747EB4-104BB243-C:4A gn Perfect Dark (J) cn Have All Weapons\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 80206B60 0007 801EDB60 0007 801D4B60 0007 cn Infinite\Ammo\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 802062EF 00FF 801ED2EF 00FF 801D42EF 00FF 80205B4B 00FF 801ECB4B 00FF 801D3B4B 00FF cn Infinite\Health\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 812053CC 3F80 811EC3CC 3F80 811D33CC 3F80 cn Infinite\Shield\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 812053E0 3F80 811E35A0 3F80 811CA5A0 3F80 cn Have All\Weapons\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 802087D0 0007 801EF7D0 0007 801D67D0 0007 cn Infinite\Ammo\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 80207F5F 00FF 801EEF5F 00FF 801D5F5F 00FF 802077BB 00FF 801EE7BB 00FF 801D57BB 00FF cn Infinite\Health\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 8120703C 3F80 811EE03C 3F80 811D503C 3F80 cn Infinite\Shield\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 811FE210 3F80 811E5210 3F80 811CC210 3F80 cn All levels Compleate cd This activate's solo missions, give all medals on solo missions, activate cheats, activate cinemas, and who knows what else. I just don't have the time to identify these codes. I know that some of this is creditted to Zap2. I don't have the time to cut those codes out. 50003201 0000 800A2940 0001 50003201 0000 800A2972 0001 50003201 0000 800A29A4 0001 crc 09CC4801-E42EE491-C:4A gn Pilot Wings64 (J) crc EC0F690D-32A7438C-C:4A gn Pocket Monsters Snap (J) cn [Enable All Levels] cd This is needed to be able to Play all Levels of the Game 810C18E2 0006 crc 94807E6B-60CC62E4-C:4A gn Puyo Puyo Sun 64 (J) cn Maximum Score\Player 1 811632CC 05F5 811632CE E0FF cn Maximum Score\Player 2 811632D0 05F5 811632D2 E0FF cn No Warning Icons\Player 1 80164EA3 0000 cn No Warning Icons\Player 2 80164EA7 0000 cn Instant 7th Step of Chain\Player 1 D0163A2B 0001 80163A2B 0007 cn Instant 7th Step of Chain\Player 2 D0163E5B 0001 80163E5B 0007 cn Options Complete Demo Viewer 8016320B 0007 8116320C FFFF 8116320E FFFF cn Mode Total Continues 0 801632AF 0000 801632C7 0000 cn Endless Mode\Player Level 99 Player 1 801632E7 0063 cn Endless Mode\Player Level 99 Player 2 801632EB 0063 cn Nazo Puyo Mode\All Practice Stages Cleared 4 50000402 0000 811631E8 FFFF cn 1P Mode\Stage Select D0162FEB 0001 80162FEB ???? 000D:"Satan Arle game",0008:"Satan Schezo game",000E:"Car-kun Arle game",0009:"Car-kun Schezo game" crc 9F1ECAF0-EEC48A0E-C:4A gn Rakuga Kids (J) cn Infinite Energy\Player 1 800AC339 ???? 0000:"None",0040:"Max" cn Infinite Energy\Player 2 800AC429 ???? 0000:"None",003F:"Max" cn Super Attacks\Player 1 800AC33D ???? 0000:"None",0003:"3" cn Super Attacks\Player 2 800AC42D ???? 0000:"None",0003:"3" cn Infinite Match Time 800AB433 0000 cn Unlock Extras 800ACA05 00FF 800ACA07 00FF crc B6BC0FB0-E3812198-C:4A gn Sin and Punishment - Tsumi To Batsu (J) cn All Levels\Unlock All\Levels - Options Menu 80075DD6 FFFF 80075DD7 FFFF cn All Levels\Unlock All\Option Menu Items 80075DD8 FFFF 80075DD9 FFFF cn All Levels\Infinite\Energy 800D5A9B 00FF cn All Levels\Infinite\Time 800D5A97 0063 cn All Levels\Infinite\Max Credits 80075DDC 00FF cn Level\0-0\Invincible cd Only use one Ivincible level Code at a time for that specific level and only use for that specific level Cheat 8010BB2B 0001 cn Level\1-1\Invincible cd Only use one Ivincible level Code at a time for that specific level and only use for that specific level Cheat 801657FB 0001 cn Level\1-2\Invincible cd Only use one Ivincible level Code at a time for that specific level and only use for that specific level Cheat 801BCFBB 0001 cn Level\1-3\Invincible cd Only use one Ivincible level Code at a time for that specific level and only use for that specific level Cheat 8011270B 0001 cn Level\2-1\Invincible 801BD2BB 0001 cn Level\2-2\Invincible cd Only use one Ivincible level Code at a time for that specific level and only use for that specific level Cheat 801B913B 0001 cn Level\2-3\Invincible cd Only use one Ivincible level Code at a time for that specific level and only use for that specific level Cheat 801A7D0B 0001 cn Level\3-1\Invincible cd Only use one Ivincible level Code at a time for that specific level and only use for that specific level Cheat 8015890B 0001 cn Level\3-2\Invincible cd Only use one Ivincible level Code at a time for that specific level and only use for that specific level Cheat 801B938B 0001 cn Level\3-3\Invincible cd Only use one Ivincible level Code at a time for that specific level and only use for that specific level Cheat 81100E08 C350 cn Level\0-0\Infinite Air Jumping cd Only use one Infinite Air Jumping level Code at a time and only use for that specific level Cheat 8010BB0C 0000 cn Level\1-1\Infinite Air Jumping cd Only use one Infinite Air Jumping level Code at a time for that specific level and only use for that specific level Cheat 801657DC 0000 cn Level\1-2\Infinite Air Jumping cd Only use one Infinite Air Jumping level Code at a time for that specific level and only use for that specific level Cheat 801BCF9C 0000 cn Level\1-3\Infinite Air Jumping cd Only use one Infinite Air Jumping level Code at a time for that specific level and only use for that specific level Cheat 801126EC 0000 cn Level\2-1\Infinite Air Jumping cd Only use one Infinite Air Jumping level Code at a time for that specific level and only use for that specific level Cheat 801BD29C 0000 cn Level\2-2\Infinite Air Jumping cd Only use one Infinite Air Jumping level Code at a time for that specific level and only use for that specific level Cheat 801B911C 0000 cn Level\2-3\Infinite Air Jumping cd Only use one Infinite Air Jumping level Code at a time for that specific level and only use for that specific level Cheat 801A7CEC 0000 cn Level\3-1\Infinite Air Jumping cd Only use one Infinite Air Jumping level Code at a time for that specific level and only use for that specific level Cheat 801588EC 0000 cn Level\3-2\Infinite Air Jumping cd Only use one Infinite Air Jumping level Code at a time for that specific level and only use for that specific level Cheat 801B936C 0000 cn Level\3-3\Infinite Air Jumping cd Only use one Infinite Air Jumping level Code at a time for that specific level and only use for that specific level Cheat 801013CC 0000 crc 66572080-28E348E1-C:4A gn Super Robot Spirits (J) cn Infinite Hp 802016A7 0000 cn Infinite Sp 802016AB 005A cn Infinite Time 80260BDE 0000 cn Player 2 Health Mod 80206AF7 ???? 0000:"Infinite Health",00C8:"Instant Death" cn Play As 801B9D5C ???? 0000:"FINAL BOSS",0001:"R1",0002:"DAITARN 3",0003:"DANCOUGAR",0004:"SHINING GUNDAM",0005:"DUNBINE",0006:"WALKER GALLIER",0007:"VOLTES V",0008:"1st BOSS" crc 67D20729-F696774C-C:4A gn All Star! Dairantou Smash Brothers (J) cn Give Kirby A Wierd Blow-Up 8025C118 000A cn Story Mode\Skip Straight To Master Hand 800A2AA7 000D cn Story Mode\Infinite Time 810A2AEE 43CB cn Story Mode\Player 1\Infinite Lives 800A2B03 0004 cn Story Mode\Player 2\Infinite Lives 800A2B77 0004 cn Story Mode\Player 3\Infinite Lives 800A2BEB 0004 cn Story Mode\Player 4\Infinite Lives 800A2C5F 0004 cn Story Mode\Player 1\Low % Health 810A2B46 0000 cn Story Mode\Player 2\Low % Health 810A2BBA 0000 cn Story Mode\Player 3\Low % Health 810A2C2E 0000 cn Story Mode\Player 4\Low % Health 810A2CA2 0000 cn Story Mode\Player 1\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code could also result freezing at the end of the Level. 800A2AFB ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 2\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A2B6F ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 3\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A2BE3 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 4\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A2C57 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 1\Kirby B Button Move\Hyrule Castle 80266ACF ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Yoshi's Island 80266E0F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Sector Z 8026F0B7 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Peach's Castle 80261D5F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Saffron City 80271A57 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Congo Jungle 8026EA8F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Kirby's Dreamland 8026BAFF ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Planet Zebes 8026DF67 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Metal Mario Stage 80261557 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Fighting Polygon Team 802606DF ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Master Hand Stage 8026FC0F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn VS. Mode\Infinite Time 810A2CDE 43CB cn VS. Mode\Player 1\Low % Health 810A2D36 0000 cn VS. Mode\Player 2\Low % Health 810A2DAA 0000 cn VS. Mode\Player 3\Low % Health 810A2E1E 0000 cn VS. Mode\Player 4\Low % Health 810A2E92 0000 cn VS. Mode\Player 1\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A2CEB ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 2\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A2D5F ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 3\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A2DD3 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 4\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A2E47 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 1\Kirby B Button Move\Hyrule Castle 802619AF ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn VS. Mode\Player 1\Kirby B Button Move\Yoshi's Island 8026C277 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn VS. Mode\Player 1\Kirby B Button Move\Sector Z 80269F47 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn P1 Press Down On D-Pad To Make Items Appear In Random Spots D109CF64 0400 8118B062 0001 cn Have All Characters 810A28F8 0FF0 cn VS. Mode\Have Mushroom Kindom 800A28F7 00FF cn Story Mode\Always Get Pacifist (60,000 Points) 810A2B2E 0000 cn Bonus Stage Character Modifier (Training Mode) cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 8018D193 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" crc 84FC04FF-B1253CE9-C:4A gn Snowbow Kids (J) cn Infinite\Tools Options 801215B5 ???? 0001:"Fan",0002:"Ghost",0003:"Pan",0004:"Rock",0005:"Mouse",0006:"Board" cn Infinite\Lucky Dip cd "Lucky Dip is Infinite Usage Of What Ever You Get From Each Red Box" 801215B4 0003 cn 999 Trick Game Pts cd Press the A Button to stop Count,or it will continue to grow without stoping. 81121360 03E7 cn 1 Lap Race D01215A8 0000 801215A8 0009 cn Infinite\Cash 8012160A C350 cn Enable Sinobin 8110A17E 0100 cn Access Gold Medals 50006002 0000 810EBD42 0101 crc A7941528-61F1199D-C:4A gn Chou Snowbow Kids (J) cn All Gold Medals 50000502 0000 81259130 0101 cn Max Coins 8125A5BE 270F 8025A5BF 00C8 cn Infinite\Trick Game 300 Points 8125A7F2 012C cn Infinite\Tools Options 8025A624 ???? 0001:"Frying Pan",0002:"Ghost",0003:"Super Ghost",0004:"Fan",0005:"Rocket",0006:"Invisible",0007:"Rock",0008:"Rat Face",0009:"Super Rat Face",000A:"Wings" cn Infinite\Weapons Options 8025A622 ???? 0001:"Slap Stick",0002:"Parachute",0003:"Freeze Shot",0004:"Snowman",0005:"Bomb",0006:"Whirlwind" 8025A623 0009 cn Open Extra Characters & Snowboards cd Battle Mode Only 8125916E 0101 80259170 0001 8025915C 0001 8125915E 0101 81259160 0101 crc 61F5B152-046122AB-C:4A gn Star Wars Episode I - Racer (J) cn No Damage 800A8047 0001 cn Always 1st 8011C25D 0001 cn Have All Tracks Completed 811170DA FFFF 811170DC 3FFF 811170DE 3FFF 811170E0 3FFF 811170E2 00FF cn Have All Characters 801170E2 007D 811170E4 FFFF cn Unlock All Tracks 801170D8 00FF 801170D9 00FF 801170DA 00FF 801170DB 00FF 811170D8 FFFF crc 4EAA3D0E-74757C24-C:4A gn Super Mario 64 (J) cn Mario's Cap\Off Options cd Here you can Choose Options with Mario without His Cap on,Do not use with any other Mario with/without Options,Use only one at a time 80339E07 ???? 0001:"Mario No Cap",0002:"Invisible Mario",0004:"Metal Mario",0008:"Flying Mario",000A:"Invisible Flying Mario",000D:"Metal Flying Mario",000F:"Invisible Metal Flying Mario" cn Mario's Cap\On Options cd Here you can Choose Options with Mario with His Cap on,Do not use with any other Mario with/without Options,Use only one at a time 80339E07 ???? 0012:"Invisible Mario",0015:"Metal Mario",0016:"Invisible Metal Mario",0019:"Flying Mario" cn Funny Mario Options\Mario's Cap\Off & in His Hand cd Here you can Choose Options with Mario with His Cap off & in His Hand,Do not use with any other Mario with/without Options,Use only one at a time 80339E07 ???? 0020:"Cap In Hand",0022:"Invisible Mario Cap In Hand",0024:"Metal Mario Cap In Hand",0026:"Invisible Metal Mario Cap In Hand",0028:"Flying Mario Cap In Hand" cn Funny Mario Options\Mario's Cap\On & An Extra in His Hand cd Here you can Choose Options with Mario with His Cap on & An Extra in His Hand,Do not use with any other Mario with/without Options,Use only one at a time 80339E07 ???? 0030:"Cap In Hand",0032:"Invisible Mario Cap In Hand",0034:"Metal Mario Cap In Hand",0036:"Invisible Metal Mario Cap In Hand",0038:"Flying Mario Cap In Hand" cn Infinite\Energy & Breath 80339EAE 0008 cn Infinite\Lives 80339EAD 0064 cn Have\Level Select 8032C64C 0001 cn Don't Hurt Mario\Monsters A0339E27 0001 cn Have\Debug Mode 8032C658 ???? 0001:"On",0000:"Off" cn Press GS for 255 Coins 89339EA8 00FF cn Press L To Levitate cd Press L to levitate & Let go to land D0339C31 0020 81339E4C 4220 D0339C31 0020 81339E0C 0300 D0339C31 0020 81339E0E 0880 cn Have All\175 Stars cd I have Managed to put a Have 175 Stars Option in for you,once the Code is activated, you will see it as a new option in Save Slot A. 80207B0B 00FF 50000D02 0000 81207B0C FFFF cn Have All\Maxed Out Coin Records For All Levels 80207B25 00FF 81207B26 FFFF 81207B28 FFFF 81207B2A FFFF 81207B2C FFFF 81207B2E FFFF 81207B30 FFFF 81207B32 FFFF crc D6FBA4A8-6326AA2C-C:4A gn Super Mario 64 Shindou Edition (J) cn Funny Mario Options\Limbo Mario cd Only Use This Code On Its Own,Do not use with any other Funny Mario Options. 8031DC0C 00C0 cn Funny Mario Options\Runs Backwards cd Only Use This Code On Its Own,Do not use with any other Funny Mario Options. 8031DC0E 0080 cn Mario's Cap\Off Options cd Here you can Choose Options with Mario without His Cap on,Do not use with any other Mario with/without Options,Use only one at a time 8031D9C7 ???? 0001:"Mario No Cap",0002:"Invisible Mario",0004:"Metal Mario",0008:"Flying Mario",000A:"Invisible Flying Mario",000D:"Metal Flying Mario",000F:"Invisible Metal Flying Mario" cn Mario's Cap\On Options cd Here you can Choose Options with Mario with His Cap on,Do not use with any other Mario with/without Options,Use only one at a time 8031D9C7 ???? 0012:"Invisible Mario",0015:"Metal Mario",0016:"Invisible Metal Mario",0019:"Flying Mario" cn Funny Mario Options\Mario's Cap\Off & in His Hand cd Here you can Choose Options with Mario with His Cap off & in His Hand,Do not use with any other Mario with/without Options,Use only one at a time 8031D9C7 ???? 0020:"Cap In Hand",0022:"Invisible Mario Cap In Hand",0024:"Metal Mario Cap In Hand",0026:"Invisible Metal Mario Cap In Hand",0028:"Flying Mario Cap In Hand" cn Funny Mario Options\Mario's Cap\On & An Extra in His Hand cd Here you can Choose Options with Mario with His Cap on & An Extra in His Hand,Do not use with any other Mario with/without Options,Use only one at a time 8031D9C7 ???? 0030:"Cap In Hand",0032:"Invisible Mario Cap In Hand",0034:"Metal Mario Cap In Hand",0036:"Invisible Metal Mario Cap In Hand",0038:"Flying Mario Cap In Hand" cn Infinite\Energy & Breath 8031DA6E 0008 cn Infinite\Lives 8031DA6D 0064 cn Don't Hurt Mario\Monsters A031D9E7 0001 cn Funny Mario Options\Ostrich Mario cd Only Use This Code On Its Own,Do not use with any other Funny Mario Options. 8031DC0C 0070 cn Press GS For 255 Coins cd Press GS Once on a Level To Get that amount of Coins 8931DA68 00FF cn Have All\175 Stars cd I have Managed to put a Have 175 Stars Option in for you,once the Code is activated, you will see it as a new option in Save Slot A. 80203F0B 00FF 50000D02 0000 81203F0C FFFF cn Have All\Maxed Out Coin Records For All Levels 80203F25 00FF 50000702 0000 81203F26 FFFF cn Have\Level Select 8030CCBC 0001 crc 9CE02E22-206EF1B0-C:4A gn Super Speed Race 64 (J) cn Always 1st Place 81098A58 0001 cn Freeze\Lap Timer cd Single and Chapionship Race Modes 800967E5 0000 800967E7 0000 cn Freeze\Pit Timer cd Single and Chapionship Race Modes 800968A5 0000 800968A7 0000 cn Car Select 800C50B1 ???? 0000:"Car 1",0001:"Car 2",0002:"Car 3",0003:"Car 4",0004:"Car 5",0005:"Car 6",0006:"Car 7",0007:"Car 8",0008:"Car 9",0009:"Car 10",000A:"Car 11",000B:"Car 12",000C:"Car 13",000D:"Car 14",000E:"Car 15",000F:"Car 16",0010:"Car 17",0011:"Car 18" cn 1 Lap To Race cd In Single and Chapionship Modes use the Laps In Race Cheat or use the in game setting to choose how many laps you want per race and them use this cheat and amount of Laps to have only have 1 left if needed. 80098A5D ???? 0003:"3 of 3 Laps",0006:"6 of 6 Laps",0009:"9 of 9 Laps",000C:"12 of 12 Laps",000F:"15 of 15 Laps",0012:"18 of 18 Laps",0015:"21 of 21 Laps",0018:"24 of 24 Laps",001B:"27 of 27 Laps",001E:"30 of 30 Laps" cn Freeze\Timer Challenge Timer cd Timer Challenge 800C4F87 0050 cn Laps\In Race\Chapionship Race Mode 800C4ED3 ???? 0003:"3 Laps In Race",0006:"6 Laps In Race",0009:"9 Laps In Race",000C:"12 Laps In Race",000F:"15 Laps In Race",0012:"18 Laps In Race",0015:"21 Laps In Race",0018:"24 Laps In Race",001B:"27 Laps In Race",001E:"30 Laps In Race" cn Laps\In Race\Single Race Mode 800C4ED1 ???? 0003:"3 Laps In Race",0006:"6 Laps In Race",0009:"9 Laps In Race",000C:"12 Laps In Race",000F:"15 Laps In Race",0012:"18 Laps In Race",0015:"21 Laps In Race",0018:"24 Laps In Race",001B:"27 Laps In Race",001E:"30 Laps In Race" cn Pit Stops\Championship 800C4F13 ???? 0000:"Off",0001:"On" cn Pit Stops\Single Race Mode 800C4F11 ???? 0000:"Off",0001:"On" cn Weather\Championship 800C4F33 ???? 0000:"Dry",0001:"Wet",0003:"Night" cn Weather\Single Race Mode 800C4F31 ???? 0000:"Dry",0001:"Wet",0003:"Night" cn Track Direction\Championship 800C4EF3 ???? 0000:"Normal",0001:"Reverse" crc 916AE6B8-8817AB22-C:4A gn Tokisora Senshi Turok (J) cn Infinite\Body Armor 8112FD96 5B23 8012FDD7 0001 cn Infinite\Air 81129030 AAE1 811E85EA F1FF cn Have All\Level Keys 8012FDE3 0007 8012FDE7 0007 8012FDEB 0007 8012FDEF 0007 8012FDF3 0007 8012FDF7 0007 8012FDFB 0007 cn Have All\Weapons 8012FDA7 0001 8012FDAB 0001 8012FDAF 0001 8012FDB3 0001 8012FDB7 0001 8012FDBB 0001 8012FDBF 0001 8012FDC3 0001 8012FDC7 0001 8012FDCB 0001 8012FDCF 0001 8012FDD3 0001 cn Infinite\Ammo 8012FD7F 00FF 8012FD93 00FF 8012FD83 00FF 8012FD63 00FF 8012FD8B 00FF 8012FD67 00FF 8012FD8F 00FF 8012FD6B 00FF cn Diffuculty Modifier 8011252F ???? 0000:"Easy",0001:"Normal",0002:"Hard" cn Infinite\Health 812C15F4 013C cn Have\Backpack 8012FD9B 0001 8012FDDB 0001 cn Infinite\Lives 8012FF0B 00FF cn Have\Cheat Menu 811205F0 FFFF 811205F2 FFFF cn Have All\Gems 8012FF07 00FF crc 5C9191D6-B30AC306-C:4A gn Wave Race 64 (J) cn Misses Don't Count 801D053F 0000 cn Infinite Time Stunt Mode 801D06CE 00FF cn Super Speed 801D0537 0005 D0161DC1 0010 801D0537 0020 cn 99 Points 801D8E13 0063 cn Infinite Course Out Time 801D06F3 00FF cn Maximum Power\Player 1 801D0537 0005 cn Maximum Power\Player 2 801D0B5A 0005 801D0DFA 0005 cn Only Play Glacier Coast 800E84C3 0007 cn Always First Place 801D040F 0000 crc 535DF3E2-609789F1-C:4A gn Wave Race 64 Shindou Edition (J) (V1.2) cn Misses Don't Count 801C399F 0000 cn Infinite Time Stunt Mode 801C3B2E 00FF cn Super Speed 801C3997 0005 D0155221 0010 801C3997 0020 cn 99 Points 801CC273 0063 cn Infinite Course Out Time 801C3B53 00FF cn Maximum Power\Player 1 801C3997 0005 cn Maximum Power\Player 2 801C3FBA 0005 801C425A 0005 cn Always First Place 801C386F 0000 crc DCB6EAFA-C6BBCFA3-C:4A gn Wetrix (J) cn Infinite Lakes 811AC9FE 0009 cn Mega Score 801ACA18 00FF 801DBDC4 00FF cn Always Empty Drain 801ACA51 0000 811ACA52 0000 811ACA54 0000 cn Always Berserk Mode 801ACA6F 00FF cn Stop Level Timer 801ACA72 00FF cn Practice Lessons Open 810C3AEA 0008 cn Always Drop\Player 1 801ACA7B ???? 0000:"Bar",0001:"T",0002:"Corner",0003:"Square",0004:"Down Square",0005:"Down Bar",0006:"Big Water",0007:"Medium Water",0008:"Small Water",0009:"Smallest Water",000A:"Bomb",000B:"Fireball" cn Always Drop\Player 2 801DD1FB ???? 0000:"Bar",0001:"T",0002:"Corner",0003:"Square",0004:"Down Square",0005:"Down Bar",0006:"Big Water",0007:"Medium Water",0008:"Small Water",0009:"Smallest Water",000A:"Bomb",000B:"Fireball" cn Infinite Ducks 801ACA0B 0009 crc 12737DA5-23969159-C:4A gn WWF Wrestlemania 2000 (J) cn Have All Characters 81094BDA FFFF cn Infinite Create-A-Wrestler Attribute Points 8011069B 001E cn Timer Is Always 00:00 80164F2F 0000 cn Max Attributes 80110691 0032 80110693 0032 80110695 0032 80110697 0032 80110699 0032 cn Weapon Select\Player 1 8115D0B6 0300 8115CC10 ???? 0000:"Broom",0101:"Shovel",0202:"Red And White Hockey Stick",0303:"Guitar",0404:"Night Stick",0505:"Head",0606:"Black Hockey Stick",0707:"Bottle",0808:"2x4",0909:"Big Purple Sheet",0A0A:"White Jug",0B0B:"Suit Case",0C0C:"Stick",0D0D:"Head",0E0E:"Big Mallot",0F0F:"Black Microphone",1010:"BaseBall Bat",1111:"Folding Chair",1212:"Board",1313:"Stairs",1414:"Trashcan",FFFF:"Nothing" 8115CC12 0000 8015CCD0 0000 cn Weapon Select\Player 2 8115D54A 0300 8115CC40 ???? 0000:"Broom",0101:"Shovel",0202:"Red And White Hockey Stick",0303:"Guitar",0404:"Night Stick",0505:"Head",0606:"Black Hockey Stick",0707:"Bottle",0808:"2x4",0909:"Big Purple Sheet",0A0A:"White Jug",0B0B:"Suit Case",0C0C:"Stick",0D0D:"Head",0E0E:"Big Mallot",0F0F:"Black Microphone",1010:"BaseBall Bat",1111:"Folding Chair",1212:"Board",1313:"Stairs",1414:"Trashcan",FFFF:"Nothing" 8015CC42 0001 8015CCD1 0001 cn Weapon Select\Player 3 8115D9DE 0300 8115CC70 ???? 0000:"Broom",0101:"Shovel",0202:"Red And White Hockey Stick",0303:"Guitar",0404:"Night Stick",0505:"Head",0606:"Black Hockey Stick",0707:"Bottle",0808:"2x4",0909:"Big Purple Sheet",0A0A:"White Jug",0B0B:"Suit Case",0C0C:"Stick",0D0D:"Head",0E0E:"Big Mallot",0F0F:"Black Microphone",1010:"BaseBall Bat",1111:"Folding Chair",1212:"Board",1313:"Stairs",1414:"Trashcan",FFFF:"Nothing" 8015CC72 0002 8015CCD2 0002 cn Weapon Select\Player 4 8115DE72 0300 8115CC98 ???? 0000:"Broom",0101:"Shovel",0202:"Red And White Hockey Stick",0303:"Guitar",0404:"Night Stick",0505:"Head",0606:"Black Hockey Stick",0707:"Bottle",0808:"2x4",0909:"Big Purple Sheet",0A0A:"White Jug",0B0B:"Suit Case",0C0C:"Stick",0D0D:"Head",0E0E:"Big Mallot",0F0F:"Black Microphone",1010:"BaseBall Bat",1111:"Folding Chair",1212:"Board",1313:"Stairs",1414:"Trashcan",FFFF:"Nothing" 8115CC9A 0003 8015CCD3 0003 cn Always Special\Player 1 8015D0B5 0004 cn Always Special\Player 2 8015D549 0004 cn Always Special\Player 3 8015D9DD 0004 cn Always Special\Player 4 8015DE71 0004 cn Specials Don't Run Out 81120C14 2400 cn Max Spirit\Player 1 8015D075 00FF cn Always Normal Spirit\Player 1 8015D075 0032 cn No Spirit\Player 1 8015D075 0000 cn Max Spirit\Player 2 8015D509 00FF cn Always Normal Spirit\Player 2 8015D509 0032 cn No Spirit\Player 2 8015D509 0000 cn Max Spirit\Player 3 8015D99D 00FF cn Always Normal Spirit\Player 3 8015D99D 0032 cn No Spirit\Player 3 8015D99D 0000 cn Max Spirit\Player 4 8015DE31 00FF cn Always Normal Spirit\Player 4 8015DE31 0032 cn No Spirit\Player 4 8015DE31 0000 cn Ultimate Codes\Player 1 8015D074 0064 cn Ultimate Codes\Player 2 8015D508 0064 cn Ultimate Codes\Player 3 8015D99C 0064 cn Ultimate Codes\Player 4 8015DE30 0064 cn Easy Pins & Longer Submissions\Player 2 8015D508 0064 cn Easy Pins & Longer Submissions\Player 3 8015D99C 0064 cn Easy Pins & Longer Submissions\Player 4 8015DE30 0064 cn Easy Pins & Longer Submissions\Player 1 8015D074 0064 crc EC417312-EB31DE5F-C:4A gn Zelda no Densetsu 2 - Mujura no Kamen (J) (v1.0) cn Have All\Quest Status Items 801EF51D 0005 811EF51E F7CF cn Infinite\Rupees 811EF49A 03E7 cn Infinite\Max & Double Magic Meter 801EF499 0060 811EF4A0 0101 cn Infinite\Arrows 801EF501 0063 cn Infinite\Bombs 801EF506 0063 cn Infinite\Bombchus 801EF507 0063 cn Infinite\Deku Sticks 801EF508 0063 cn Infinite\Deku Nuts 801EF509 0063 cn Infinite\Magic Beans 801EF50A 0063 cn Infinite\Powder Kegs 801EF50C 0063 cn Have\Ocarina of Time 801EF4D0 0000 cn Have\Hero's Bow 801EF4D1 0001 cn Have\Arrows\Fire Arrow 801EF4D2 0002 cn Have\Arrows\Ice Arrow 801EF4D3 0003 cn Have\Arrows\Light Arrow 801EF4D4 0004 cn Have\Bombs 801EF4D6 0006 cn Have\Bombchu 801EF4D7 0007 cn Have\Deku Sticks 801EF4D8 0008 cn Have\Deku Nuts 801EF4D9 0009 cn Have\Magic Beans 801EF4DA 000A cn Have\Powder Kegs 801EF4DC 000C cn Have\Pictograph 801EF4DD 000D cn Have\Lens of Truth 801EF4DE 000E cn Have\Hookshot 801EF4DF 000F cn Have\Great Fairy's Sword 801EF4E0 0010 cn Have\Bottle Modifier\1 801EF4E2 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Bottle Modifier\2 801EF4E3 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Bottle Modifier\3 801EF4E4 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Bottle Modifier\4 801EF4E5 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Bottle Modifier\5 801EF4E6 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Bottle Modifier\6 801EF4E7 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn All Equipment Upgrades 801EF4CD 0023 811EF51A 201B cn Have All\Masks 801EF4E8 005A 801EF4E9 0055 801EF4EA 0063 801EF4EB 0061 801EF4EC 005C 801EF4ED 004E 801EF4EE 0056 801EF4EF 0062 801EF4F0 0054 801EF4F1 005E 801EF4F2 0064 801EF4F3 004F 801EF4F4 0058 801EF4F5 0059 801EF4F6 0053 801EF4F7 005B 801EF4F8 0052 801EF4F9 0050 801EF4FA 005F 801EF4FB 005D 801EF4FC 0057 801EF4FD 0060 801EF4FE 0065 801EF4FF 0051 cn Replace Sword With 801EF4AC ???? 0002:"Fire Arrow w/ Bow",0003:"Ice Arrow w/ Bow",0004:"Light Arrow w/ Bow",0000:"Hero's Bow",0010:"Deity Link's Sword" cn Infinite\Health 811EF496 0140 cn Infinite\Hearts Options 811EF494 ???? 0140:"Max Hearts",0063:"6 Hearts",0043:"4 Hearts" cn Beta World 1 cd Put on the code on load up,After the Nintendo logo you will be in that place of Choice.you can also choose another place & then press F1 (reset) to go to that place this is for beta interest only it will not assist you in playing the game. D01FB9E1 0000 801EF462 ???? 0000:"Mama's House non Beta",0001:"Fearful Spider House",0002:"Beneaf the Graveyard",0003:"Southern Swamp Mr Tingle Entry",0006:"Outside Tourist Information Southern Swamp",0008:"Outside Magic Hag's Potion Shop",000A:"Southern Swamp Woods Of Mystery Entry",0024:"Counter Of The Tresure Chest Shop",002E:"Woodfall Temple non Beta",0032:"Spider Hand",0035:"Statue outside Gorman Track",0036:"Statue outside Lair Of The Temples Boss",0038:"Path to Romani Ranch non Beta",004A:"outside The Royal Palace of the Deku Kingdom",004C:"Ledge in The Royal Palace of the Deku Kingdom",004E:"inside The Royal Palace of the Deku Kingdom 1",0071:"Green Blobs",0074:"Cave Portal to Last Boss Field",007F:"Waterfall Sothern Swamp",008A:"Giant Turtle In the Temple non beta",008B:"Room of Miau & Tijo Zora Great Hall",0094:"Recieving Gorans Mask non Beta",0095:"?",0096:"Hungry Goran in the Snow",00A2:"Statue in Stone Tower",00A6:"Stone Tower non Beta",00B9:"Recieving Deku Mask non Beta",00D9:"Giant Lizards in a Cave",00DA:"Cave with Steaming Water",00FF:"Vamps House In Ikana Canyon" cn Press L To Levitate cd Press L To Levitate & Let go to land D03E6D0B 0020 81400008 40CB cn Play As 801EF480 ???? 0000:"Fierce Deity Link",0001:"Goron Link",0002:"Zora Link",0003:"Deku Link",0004:"Normal Link" cn Warp Modifier cd Put this code on and press the start button and it will now take where you wanted to go, turn it back off after you have got there. D05EC55A 0000 803FF545 0001 813FF54A ???? 0010:"Mayors Residence",0008:"Magic Hags Potion Shop",000A:"Romani Ranch Barn",000B:"Mama's House",000E:"Honey & Darlings Shop",0015:"Final Boss Arena",001F:"Beneath the Graveyard (left entrance)",002F:"Beneath the Graveyard (right entrance)",0030:"Southern Swamp (Reg Entrance)",004F:"Southern Swamp (from tour house)",006E:"Southern Swamp (from Woodfall)",006F:"Southern Swamp (from Deku Palace)",0078:"Path to Ikana Canyon",009E:"Southern Swamp (from Deku Place 2)",009F:"Southern Swamp (From Potion Shop)",00AF:"Boat Cruise (picture taking)",00CD:"Southern Swamp (From Woods of Mystery)",00CE:"Southern Swamp (From Spider House)",00CF:"Southern Swamp (From Ikana Canyon)",00FE:"Southern Swamp (From Owl Warp)",0E00:"Curiosity Shop",0E38:"Ikana Canyon Entrance",1500:"Lens of Truth Cave (get it)",2600:"Stone Tower Temple (Upside down)",2609:"Stone Tower Temple (Boss Room Entrance)",2604:"Treasure Chest Shop",2605:"Treausre Chest Shop (counter)",260E:"Clock Tower (w/ skull kid, silent)",2610:"Stone Tower Temple (endless fall)",6214:"Romani Ranch",9214:"Zora Shop",B214:"Snowhead (Path to temple, warp in)",D214:"East Clock Down" crc 69AE0438-2C63F3F3-C:4A gn Zelda no Densetsu 2 - Mujura no Kamen (J) (V1.1) cn Have All\Quest Status Items 801EF7CD 0005 811EF7CE F7CF cn Infinite\Rupees 811EF74A 03E7 cn Infinite\Max & Double Magic Meter 801EF749 0060 811EF750 0101 cn Infinite\Arrows 801EF7B1 0063 cn Infinite\Bombs 801EF7B6 0063 cn Infinite\Bombchus 801EF7B7 0063 cn Infinite\Deku Sticks 801EF7B8 0063 cn Infinite\Deku Nuts 801EF7B9 0063 cn Infinite\Magic Beans 801EF7BA 0063 cn Infinite\Powder Kegs 801EF7BC 0063 cn Have\Ocarina of Time 801EF780 0000 cn Have\Hero's Bow 801EF781 0001 cn Have\Arrows\Fire Arrow 801EF782 0002 cn Have\Arrows\Ice Arrow 801EF783 0003 cn Have\Arrows\Light Arrow 801EF784 0004 cn Have\Bombs 801EF786 0006 cn Have\Bombchu 801EF787 0007 cn Have\Deku Sticks 801EF788 0008 cn Have\Deku Nuts 801EF789 0009 cn Have\Magic Beans 801EF78A 000A cn Have\Powder Kegs 801EF78C 000C cn Have\Pictograph 801EF78D 000D cn Have\Lens of Truth 801EF78E 000E cn Have\Hookshot 801EF78F 000F cn Have\Great Fairy's Sword 801EF790 0010 cn Have\Bottle Modifier\1 801EF792 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Bottle Modifier\2 801EF793 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Bottle Modifier\3 801EF794 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Bottle Modifier\4 801EF795 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Bottle Modifier\5 801EF796 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Bottle Modifier\6 801EF797 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn All Equipment Upgrades 801EF77D 0023 811EF7CA 201B cn Have All\Masks 801EF798 005A 801EF799 0055 801EF79A 0063 801EF79B 0061 801EF79C 005C 801EF79D 004E 801EF79E 0056 801EF79F 0062 801EF7A0 0054 801EF7A1 005E 801EF7A2 0064 801EF7A3 004F 801EF7A4 0058 801EF7A5 0059 801EF7A6 0053 801EF7A7 005B 801EF7A8 0052 801EF7A9 0050 801EF7AA 005F 801EF7AB 005D 801EF7AC 0057 801EF7AD 0060 801EF7AE 0065 801EF7AF 0051 cn Replace Sword With 801EF75C ???? 0002:"Fire Arrow w/ Bow",0003:"Ice Arrow w/ Bow",0004:"Light Arrow w/ Bow",0000:"Hero's Bow",0010:"Deity Link's Sword" cn Infinite\Health 811EF746 0140 cn Infinite\Hearts Options 811EF744 ???? 0140:"Max Hearts",0063:"6 Hearts",0043:"4 Hearts" cn Beta World 1 cd Put on the code on load up,After the Nintendo logo you will be in that place of Choice.you can also choose another place & then press F1 (reset) to go to that place this is for beta interest only it will not assist you in playing the game. D01FBC91 0000 801EF712 ???? 0000:"Mama's House non Beta",0001:"Fearful Spider House",0002:"Beneaf the Graveyard",0003:"Southern Swamp Mr Tingle Entry",0006:"Outside Tourist Information Southern Swamp",0008:"Outside Magic Hag's Potion Shop",000A:"Southern Swamp Woods Of Mystery Entry",0024:"Counter Of The Tresure Chest Shop",002E:"Woodfall Temple non Beta",0032:"Spider Hand",0035:"Statue outside Gorman Track",0036:"Statue outside Lair Of The Temples Boss",0038:"Path to Romani Ranch non Beta",004A:"outside The Royal Palace of the Deku Kingdom",004C:"Ledge in The Royal Palace of the Deku Kingdom",004E:"inside The Royal Palace of the Deku Kingdom 1",0071:"Green Blobs",0074:"Cave Portal to Last Boss Field",007F:"Waterfall Sothern Swamp",008A:"Giant Turtle In the Temple non beta",008B:"Room of Miau & Tijo Zora Great Hall",0094:"Recieving Gorans Mask non Beta",0095:"?",0096:"Hungry Goran in the Snow",00A2:"Statue in Stone Tower",00A6:"Stone Tower non Beta",00B9:"Recieving Deku Mask non Beta",00D9:"Giant Lizards in a Cave",00DA:"Cave with Steaming Water",00FF:"Vamps House In Ikana Canyon" cn Press L To Levitate cd Press L To Levitate & Let go to land D03E6FCB 0020 814002C8 40CB cn Play As 801EF730 ???? 0000:"Fierce Deity Link",0001:"Goron Link",0002:"Zora Link",0003:"Deku Link",0004:"Normal Link" cn Warp Modifier cd Put this code on and press the start button and it will now take where you wanted to go, turn it back off after you have got there. D03E6FCA 0000 803FF805 0001 813FF80A ???? 0010:"Mayors Residence",0008:"Magic Hags Potion Shop",000A:"Romani Ranch Barn",000B:"Mama's House",000E:"Honey & Darlings Shop",0015:"Final Boss Arena",001F:"Beneath the Graveyard (left entrance)",002F:"Beneath the Graveyard (right entrance)",0030:"Southern Swamp (Reg Entrance)",004F:"Southern Swamp (from tour house)",006E:"Southern Swamp (from Woodfall)",006F:"Southern Swamp (from Deku Palace)",0078:"Path to Ikana Canyon",009E:"Southern Swamp (from Deku Place 2)",009F:"Southern Swamp (From Potion Shop)",00AF:"Boat Cruise (picture taking)",00CD:"Southern Swamp (From Woods of Mystery)",00CE:"Southern Swamp (From Spider House)",00CF:"Southern Swamp (From Ikana Canyon)",00FE:"Southern Swamp (From Owl Warp)",0E00:"Curiosity Shop",0E38:"Ikana Canyon Entrance",1500:"Lens of Truth Cave (get it)",2600:"Stone Tower Temple (Upside down)",2609:"Stone Tower Temple (Boss Room Entrance)",2604:"Treasure Chest Shop",2605:"Treausre Chest Shop (counter)",260E:"Clock Tower (w/ skull kid, silent)",2610:"Stone Tower Temple (endless fall)",6214:"Romani Ranch",9214:"Zora Shop",B214:"Snowhead (Path to temple, warp in)",D214:"East Clock Down" crc 8473D0C1-23120666-C:4A gn Zelda no Densetsu 2 - Mujura no Kamen - Zelda Collection Version (J) (GC Version) [!] cn Infinite\Rupees 811ED85A 03E7 cn Infinite\Health 811ED856 03E7 cn Infinite\Max & Double Magic Meter 801ED859 0060 811ED860 0101 cn Infinite\Items cd This is Infinite use of Bombs,Bombchus,Deku Sticks,Deku Nuts,Magic Beans,& Powder Kegs. But you must also put it's Have on to work. 801ED8C1 0063 50000801 0000 801ED8C6 0063 cn Have\All Masks 811ED8A8 3E39 811ED8AA 4745 811ED8AC 4032 811ED8AE 3A46 811ED8B0 3842 811ED8B2 4833 811ED8B4 3C3D 811ED8B6 373F 811ED8B8 3634 811ED8BA 4341 811ED8BC 3B44 811ED8BE 4935 cn Use all C Buttons 811F1738 0000 811F173A 0000 cn Event Item\Modifier 1 801ED895 ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Event Item\Modifier 2 801ED89B ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Event Item\Modifier 3 801ED8A1 ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Have Item Modifier 801ED8A0 ???? 0005:"Japanese Flute?",000B:"Japanese Item?",0010:"Great Fairy's Sword",0011:"Japanese Hookshot?",0031:"Japanese Scroll?",004A:"Japanese Bow?" cn Have Bottle\Modifier 1 801ED8A2 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have Bottle\Modifier 2 801ED8A3 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have Bottle\Modifier 3 801ED8A4 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have Bottle\Modifier 4 801ED8A5 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have Bottle\Modifier 5 801ED8A6 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have Bottle\Modifier 6 801ED8A7 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Great Fairy's Sword 801ED8A0 0010 cn Have\QuestStatus Items 801ED8DD 0005 811ED8DE F7CF cn Have\Have Ocarina of Time 801ED890 0000 cn Have\Hero's Bow 801ED891 0001 cn Have\Fire Arrow 801ED892 0002 cn Have\Ice Arrow 801ED893 0003 cn Have\Light Arrow 801ED894 0004 cn Have\Bombs 801ED896 0006 cn Have\Bombchu 801ED897 0007 cn Have\Deku Sticks 801ED898 0008 cn Have\Deku Nuts 801ED899 0009 cn Have\Magic Beans 801ED89A 000A cn Have\Powder Kegs 801ED89C 000C cn Have\Pictograph 801ED89D 000D cn Have\Lens of Truth 801ED89E 000E cn Have\Hookshot 801ED89F 000F cn All Equipment Upgrades 801ED88D 0023 811ED8DA 201B 801ED86C 004F cn Replace Sword With cd Only put the Deity Link's Sword on, if using The Play As Fierce Deity Link Code, if not it will turn Fierce Deity Link into a crazed slashing Machine. You have been warned. 801ED86C ???? 004A:"Fire Arrow w/ Bow",004B:"Ice Arrow w/ Bow",004C:"Light Arrow w/ Bow",004D:"Kokiri Sword",004E:"Razor Sword",004F:"Guilded Sword",0050:"Deity Link's Sword" cn Play As 801ED840 ???? 0000:"Fierce Deity Link",0001:"Goron Link",0002:"Zora Link",0003:"Deku Link",0004:"Normal Link" cn Infinite\Hearts Options cd If you need to clear the Infinite Max Hearts from the screen just choose the 6 or 4 Heart Options, take off the cheat & then make a save. 811ED854 ???? 0140:"Max Hearts",0063:"6 Hearts",0043:"4 Hearts" cn Beta World 1 cd Put on the code on load up,After the Nintendo logo you will be in that place of Choice.you can also choose another place & then press F1 (reset) to go to that place this is for beta interest only it will not assist you in playing the game. D03E4CAB 0000 801ED822 ???? 0000:"Mama's House non Beta",0001:"Fearful Spider House",0002:"Beneaf the Graveyard",0003:"Southern Swamp Mr Tingle Entry",0006:"Outside Tourist Information Southern Swamp",0008:"Outside Magic Hag's Potion Shop",000A:"Southern Swamp Woods Of Mystery Entry",0024:"Counter Of The Tresure Chest Shop",002E:"Woodfall Temple non Beta",0032:"Spider Hand",0035:"Statue outside Gorman Track",0036:"Statue outside Lair Of The Temples Boss",0038:"Path to Romani Ranch non Beta",004A:"outside The Royal Palace of the Deku Kingdom",004C:"Ledge in The Royal Palace of the Deku Kingdom",004E:"inside The Royal Palace of the Deku Kingdom 1",0071:"Green Blobs",0074:"Cave Portal to Last Boss Field",007F:"Waterfall Sothern Swamp",008A:"Giant Turtle In the Temple non beta",008B:"Room of Miau & Tijo Zora Great Hall",0094:"Recieving Gorans Mask non Beta",0095:"?",0096:"Hungry Goran in the Snow",00A2:"Statue in Stone Tower",00A6:"Stone Tower non Beta",00B9:"Recieving Deku Mask non Beta",00D9:"Giant Lizards in a Cave",00DA:"Cave with Steaming Water",00FF:"Vamps House In Ikana Canyon" cn Warp Modifier cd Put this code on and it will now take where you wanted to go, turn it back off or it will infinite loop entering all the time. 803E4CAA 0000 803FD505 0001 813FD50A ???? 0010:"Mayors Residence",0008:"Magic Hags Potion Shop",000A:"Romani Ranch Barn",000B:"Mama's House",000E:"Honey & Darlings Shop",0015:"Final Boss Arena",001F:"Beneath the Graveyard (left entrance)",002F:"Beneath the Graveyard (right entrance)",0030:"Southern Swamp (Reg Entrance)",004F:"Southern Swamp (from tour house)",006E:"Southern Swamp (from Woodfall)",006F:"Southern Swamp (from Deku Palace)",0078:"Path to Ikana Canyon",009E:"Southern Swamp (from Deku Place 2)",009F:"Southern Swamp (From Potion Shop)",00AF:"Boat Cruise (picture taking)",00CD:"Southern Swamp (From Woods of Mystery)",00CE:"Southern Swamp (From Spider House)",00CF:"Southern Swamp (From Ikana Canyon)",00FE:"Southern Swamp (From Owl Warp)",0E00:"Curiosity Shop",0E38:"Ikana Canyon Entrance",1500:"Lens of Truth Cave (get it)",2600:"Stone Tower Temple (Upside down)",2609:"Stone Tower Temple (Boss Room Entrance)",2604:"Treasure Chest Shop",2605:"Treausre Chest Shop (counter)",260E:"Clock Tower (w/ skull kid, silent)",2610:"Stone Tower Temple (endless fall)",6214:"Romani Ranch",9214:"Zora Shop",B214:"Snowhead (Path to temple, warp in)",D214:"East Clock Down" cn All Items (Normal Ram Pak Version) FF1E0000 0000 50002402 0202 810EC350 0001 crc EC7011B7-7616D72B-C:4A gn Zelda no Densetsu - Toki no Ocarina (J) (v1.0) cn Infinite\Rupees cd This cheat allows you to have the max Rupees to the Wallet you currently Hold 8111B99C 0001 cn Press R\For Old Or Young Link cd To Activate this Cheat Hold The R Button when walking through a Doorway this will change you to the option on the other side, Disable this Cheat straight away after getting to the other side, in some places you might even get Access Violations. Just press ok untill you can carry on. D01C84B5 0010 8011A5D7 ???? 0001:"Link Young",0000:"Link Old" cn Use Any Item In Any House cd do not use under or in water 8111B7F2 0000 8111B7F4 0000 cn Have\All Equipment cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111A66C 7777 cn Have\All Quest/Status Items cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111A674 30FF 8111A676 FFFF cn Max\Heart Containers 8111A5FE 0140 cn Max\Gold Skulltulas Killed 8011A6A1 0064 cn Time of Day Modifier 8111A5DC ???? 4000:"At Sunrise",5800:"Daylight Out",7000:"Very Bright Out",C000:"At Sunset",D000:"Fairly Dark" cn Infinite\Energy 8111A600 0140 cn Infinite\Magic D011A609 0008 8011A60A 0001 8011A60C 0001 8011A603 0060 cn Tunic & Boot Options cd This changes what you are wearing,once you have enabled the code press Start & then start again. 8011A640 ???? 0011:"Kokiri Tunic & Kokiri Boots",0012:"Goron Tunic & Kokiri Boots",0013:"Zora Tunic & Kokiri Boots",0014:"Black Tunic & Kokiri Boots",0015:"White Tunic & Kokiri Boots",0016:"Yellow Tunic & Kokiri Boots",0021:"Kokiri Tunic & Iron Boots",0022:"Goron Tunic & Iron Boots",0023:"Zora Tunic & Iron Boots",0024:"Black Tunic & Iron Boots",0025:"White Tunic & Iron Boots",0026:"Yellow Tunic & Iron Boots",0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Infinite\Deku Sticks 8011A65C 0009 cn Infinite\Deku Nuts 8011A65D 0009 cn Infinite\Bombs 8011A65E 0009 cn Infinite\Arrows 8011A65F 0009 cn Infinite\Deku Seeds 8011A662 0009 cn Infinite\Bombchu's 8011A664 0009 cn Infinite\Magic Beans 8011A66A 0009 cn Infinite\Big Key,Small Keys,Compass,& Map 8011A678 0007 8011A679 0007 8011A67A 0007 8011A67B 0007 8011A67C 0007 8011A67D 0007 8011A67E 0007 8011A67F 0007 8011A680 0007 8011A681 0007 8011A682 0007 8011A68F 0009 8011A690 0009 8011A691 0009 8011A692 0009 8011A693 0009 8011A699 0009 8011A69C 0009 8011A697 0009 cn Have\Ocarina 8011A64B ???? 0007:"Fairy Ocarina",0008:"Ocarina Of Time" cn Have\Boomerang 8011A650 000E cn Have\Lens of Truth 8011A651 000F cn Have\Megaton Hammer 8011A653 0011 cn Have\Deku Stick 8011A644 0000 cn Have\Deku Nut 8011A645 0001 cn Have\Bombs 8011A646 0002 cn Have\Fairy Bow 8011A647 0003 cn Have\Fairy Slingshot 8011A64A 0006 cn Have\Bombchu 8011A64C 0009 cn Have\Arrows\Fire Arrow 8011A648 0004 cn Have\Arrows\Ice Arrow 8011A64E 000C cn Have\Arrows\Light Arrow 8011A654 0012 cn Have\Hookshot 8011A64D ???? 000A:"Hookshot",000B:"Longshot" cn Have\Magic Beans 8011A652 0010 cn Have\Magic\Fairie's Wind 8011A64F 000D cn Have\Magic\Nayru's Love 8011A655 0013 cn Have\Magic\Din's Fire 8011A649 0005 cn Bottles\Bottle 1 Modifier 8011A656 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 2 Modifier 8011A657 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 3 Modifier 8011A658 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 4 Modifier 8011A659 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Trading\Adult Link Item 8011A65A ???? 002D:"Pocket Egg",002E:"Pocket Cucco",002F:"Cojiro",0030:"Odd Mushroom",0031:"Odd Potion",0032:"Poacher's Saw",0033:"Goron's Sword (Broken)",0034:"Prescription",0035:"Eyeball Frog",0036:"Eye Drops",0037:"Claim Check" cn Trading\Young Link Item 8011A65B ???? 0021:"Weird Egg",0022:"Chicken",0023:"Zelda's Letter",0024:"Keaton Mask",0025:"Skull Mask",0026:"Spooky Mask",0027:"Bunny Hood",0028:"Goron Mask",0029:"Zora Mask",002A:"Gerudo Mask",002B:"Mask of Truth",002C:"SOLD OUT" cn Turn Giant's Knife Into Biggoron's Sword 8011A60E 0001 cn Have Quiver (Holds 30) 8011A671 0001 cn Equipment Modifier 1 cd This modifies the equipment you are carrying.If you Use Black Gauntlets,They are as strong as the Golden Gauntlets. This code also gives you the Silver Scale and the Golden Scale and unlimited rupees. 8011A672 ???? 0002:"Silver Scale",0004:"Golden Scale",0006:"Giant's Knife (Broken)",0035:"Black Gauntlets",0040:"Bullet Bag (Holds 30)",0080:"Bullet Bag (Holds 40)",00C0:"Bullet Bag (Holds 50)" cn Equipment Modifier 2 cd This modifies the equipment you are carrying. 8011A673 ???? 0008:"Bomb Bag (Holds 20)",0010:"Bomb Bag (Holds 30)",0018:"Bomb Bag (Holds 40)",0020:"Goron's Bracelet",0028:"Silver Gauntlets",0030:"Golden Gauntlets" cn Press L To Levitate cd Use this cheat to levitate. You have to deactivate it to come back down. Useful for passing obstacles that usually can be passed only at a later point! D01C84B5 0020 811DAA90 40CB cn Press L For infinite Hover Boots, cd Press L For Infinite Hover Boots & Let go to land,This Only works when you have the Boots on D01C84B5 0020 811DB2B2 000D cn Instant Step Hoover Boots cd Take off from Anywhere & to go higher just press L Once, this will lift you higher while walking.to come back Down Keep R pressed.Once you have enabled the code press Start & then start again. D01C84B5 0020 811DAA90 40CB D01C84B5 0000 811DB2B2 000D 8011A640 ???? 0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Beta\Play Beta Quest Worlds cd Put on the code on load up,After the Nintendo logo you will be in Beta Mode,There are no icons, energy bar etc. on the screen.When you press a C-Buttton you can use an object.Here the objects for the C-Buttons:C-left: arrows, C-down: bombs, C-right: Ocarina of Time. There is also no Navi and start menu.When you go to some places the game will freeze or you can't move. D01C84B5 0000 8011B9E3 ???? 0000:"World 01",0001:"World 02",0002:"World 03",0003:"World 04",0004:"World 05",0007:"World 06",0008:"World 07",0016:"World 08" cn Warp Song Location\Minuet of Forest & Serenade of Water cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011B965 ???? 0000:"Sacred Forest Meadow",0004:"Lake Hylia",0015:"Inside Jabu Jabu's Belly",0018:"Dodongo's Cavern",0068:"Inside The Deku Tree" cn Warp Song Location\Prelude of Light & Nocturne of Shadow cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011B965 ???? 0003:"Kakariko Windmill",0007:"Bombchu Bowling Alley",000F:"Zelda & Impa Flee",0014:"Kakariko Village",0017:"Ganon,Final Battle",001D:"Top of Ganon's Tower",0028:"Bombchu Shop",002C:"Bazaar",0030:"Happy Mask Shop",0034:"Ganon's Tower",0038:"Ganon's Castle",004C:"Inside Spirit Door",006C:"Burning Castle",0050:"House of Skulltula",0064:"Death Mountain Trail",0068:"Graveyard",0070:"Thieves' Hideout",0074:"Royal Family's Tomb",0078:"Great Fairy Fountain 1",0084:"Forest Temple,Room With Falling Floor",0088:"Great Fairy Fountain 2",0099:"Grotto 01",009D:"Grotto 02",00A4:"Grotto 04",00A8:"Grotto 05",00B3:"Grotto 06",00B0:"Grotto 07",00B4:"Grotto 08",00B8:"Grotto 09",00C3:"Grotto 10",00C0:"Grotto 11",00C4:"Grotto 12",00FC:"Grotto 13",00D3:"Bottom of the Well",00D0:"Lon Lon Ranch Shed",00D3:"Lon Lon Ranch Outside Shed",00D8:"Ice Cavern",00E3:"Outside Cow Pen",00E0:"Lost Woods Bridge",00E4:"Lon Lon Ranch Chicken Room",00E8:"In Front of Deku Tree",00EB:"Spirit Temple Boss",00F1:"Castle Courtyard,In Front of Zelda",00F4:"Temple of Time",00F8:"Gerudo Fortress Jail" cn Warp Song Location\Bolero of Fire cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011B965 ???? 0003:"Castle Courtyard",000B:"Dodongo's Cavern Boss",0010:"Inside The Deku Tree Boss",0014:"Shadow Temple Boss",0017:"Water Temple Boss",001C:"Ganon's Castle Tower",001F:"Ganon First Battle",0028:"Ganon's Castle Room Before Ganon",002B:"Inside Ganon's Castle Room With Pillar",002F:"Lon Lon Ranch",0033:"Mido's House",0037:"Saria's House",004B:"Bearded Man's House",0040:"Top of Ganon's Castle",0047:"Outside Saria's House",004F:"Dampe's Race",0057:"Kokiri Forest",005B:"Top of Death Mountain",005F:"Fishing Pond",0068:"Inside Ganon's Castle",007F:"Hyrule Castle Gate",00BA:"Top of Ganon's Tower",00C2:"Great Fairy Fountain",00D6:"Lost Woods Goron Entrance",00DA:"Lost Woods River Entrance",00DE:"Lost Woods Bridge Field Entrance",00E3:"Goron City Lost Woods Entrance",00F6:"Death Mountain Crater",00FD:"Ganon's Castle" cn Warp Song Location\Requiem of Spirit cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011B965 ???? 0005:"Lake Hylia,08 Zora's Domain",0018:"Gerudo Valley",001E:"Lost Woods",0028:"Gerudo Fortress",0030:"Haunted Wasteland",0034:"Ganon's Castle Inside Burning Castle",0038:"Hyrule Castle",003A:"Ganon's Castle",003D:"Death Mountain Trail",004D:"Goron City",0065:"Fire Temple",0069:"Forest Temple",006E:"Shooting Gallery",0079:"Ganon's Castle Inside Burning Castle",007E:"Kakariko Village Entrance",007B:"Zora's River Entrance",0085:"Kokiri Forest Entrance",008A:"Lake Hyrule Entrance",008E:"Gerudo Valley Entrance",0092:"Death Mountain Trail Entrance",0095:"Graveyard Entrance",009E:"Zora's Domain Entrance",00A2:"Zora's Fountain Entrance",00BA:"Goron City Entrance",00BE:"Death Mountain Trail",00C1:"Goron City",00C5:"Lakeside Laboratory",00C9:"Top of Ganon's Castle",00CD:"Hyrule Market (Child Link's)",00CF:"Hyrule Market (Adult Link's)",00F1:"Desert Colossus",00FA:"Lon Lon Ranch Entrance",00FD:"Hyrule Field" cn Max\Double Defense Power cd This gives you White Border Hearts 8011A69F 0014 cn Nayru's Love is Always cd For this to work On Or off, you have to walk through a Doorway to activate the Change. 8111B998 ???? 0000:"OFF",FFFF:"ON" cn Infinite\Timers\All other Timers cd This cheat works on all Race Timers.Under Water with iron Boots etc. 8011B9A1 0032 cn Epona\Max Carrots\Lon Lon Raunch cd This is For Practicing,Racing.Warning take this off before jumping the exit fence after winning Epona 801D8BCA 0006 801F2208 0001 801EEC88 0001 cn Infinite\Timers\Escape From Gannons Tower cd This cheat works only on The Final Boss. 8011B9A5 00B4 cn Beta\Specific things lean cd This code will cause all items on a specific plane to lean. This is helpful for areas in which the plane causes the crash (Ex. Weird Zora's Fountain Beta Quest 01). 80025614 0001 cn Beta\Appear in Strange Places (Hold R) cd If you go to an area where Link is immobile or invisible, using the "appear in strange places" code will almost always fix it, but you'll start somewhere outside of the Arena and in air. I recommend using the infinite step Hover boots code already supplied with PJ64 so you can float back into the arena in the event that this happens. D01C84B5 0010 8111B936 0001 cn Beta\Interface always off/on cd If you go to an area where the interface is accessible, this signigfies that you're not in 'beta' mode anymore. Using the "interface always off/on" code, you can stay in 'beta' mode regardless of what happens. This may cause more crashes in SOME areas, but it's rare and is not too severe. If you need to explore a beta area with the interface, "use the interface always on" portion of the code. Don't use the codes as you start the game. If you need the interface on/off at a specific time, start the game, go to the area, activate the code, keep it on until next reset. 8011B4B9 00FF 8011B92F ???? 0000:"Off",0001:"On" cn Always Have Wallet Size 8011A672 ???? 0047:"Kid Wallet (Holds 99)",0057:"Adult Wallet (Holds 200)",0067:"Giant Wallet (Holds 500)" crc D43DA81F-021E1E19-C:4A gn Zelda no Densetsu - Toki no Ocarina (J) (v1.1) cn Infinite\Rupees cd This cheat allows you to have the max Rupees to the Wallet you currently Hold 8111BB5C 0001 cn Press R\For Old Or Young Link cd To Activate this Cheat Hold The R Button when walking through a Doorway this will change you to the option on the other side, Disable this Cheat straight away after getting to the other side, in some places you might even get Access Violations. Just press ok untill you can carry on. D01C8675 0010 8011A797 ???? 0001:"Link Young",0000:"Link Old" cn Use Any Item In Any House cd do not use under or in water 8111B9B2 0000 8111B9B4 0000 cn Have\All Equipment cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111A82C 7777 cn Have\All Quest/Status Items cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111A834 30FF 8111A836 FFFF cn Max\Heart Containers 8111A7BE 0140 cn Max\Gold Skulltulas Killed 8011A861 0064 cn Time of Day Modifier 8111A79C ???? 4000:"At Sunrise",5800:"Daylight Out",7000:"Very Bright Out",C000:"At Sunset",D000:"Fairly Dark" cn Infinite\Energy 8111A7C0 0140 cn Infinite\Magic D011A7C9 0008 8011A7CA 0001 8011A7CC 0001 8011A7C3 0060 cn Tunic & Boot Options cd This changes what you are wearing,once you have enabled the code press Start & then start again. 8011A800 ???? 0011:"Kokiri Tunic & Kokiri Boots",0012:"Goron Tunic & Kokiri Boots",0013:"Zora Tunic & Kokiri Boots",0014:"Black Tunic & Kokiri Boots",0015:"White Tunic & Kokiri Boots",0016:"Yellow Tunic & Kokiri Boots",0021:"Kokiri Tunic & Iron Boots",0022:"Goron Tunic & Iron Boots",0023:"Zora Tunic & Iron Boots",0024:"Black Tunic & Iron Boots",0025:"White Tunic & Iron Boots",0026:"Yellow Tunic & Iron Boots",0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Infinite\Deku Sticks 8011A81C 0009 cn Infinite\Deku Nuts 8011A81D 0009 cn Infinite\Bombs 8011A81E 0009 cn Infinite\Arrows 8011A81F 0009 cn Infinite\Deku Seeds 8011A822 0009 cn Infinite\Bombchu's 8011A824 0009 cn Infinite\Magic Beans 8011A82A 0009 cn Infinite\Big Key,Small Keys,Compass,& Map 8011A838 0007 8011A839 0007 8011A83A 0007 8011A83B 0007 8011A83C 0007 8011A83D 0007 8011A83E 0007 8011A83F 0007 8011A840 0007 8011A841 0007 8011A842 0007 8011A84F 0009 8011A850 0009 8011A851 0009 8011A852 0009 8011A853 0009 8011A859 0009 8011A85C 0009 8011A857 0009 cn Have\Ocarina 8011A80B ???? 0007:"Fairy Ocarina",0008:"Ocarina Of Time" cn Have\Boomerang 8011A810 000E cn Have\Lens of Truth 8011A811 000F cn Have\Megaton Hammer 8011A813 0011 cn Have\Deku Stick 8011A804 0000 cn Have\Deku Nut 8011A805 0001 cn Have\Bombs 8011A806 0002 cn Have\Fairy Bow 8011A807 0003 cn Have\Fairy Slingshot 8011A80A 0006 cn Have\Bombchu 8011A80C 0009 cn Have\Arrows\Fire Arrow 8011A808 0004 cn Have\Arrows\Ice Arrow 8011A80E 000C cn Have\Arrows\Light Arrow 8011A814 0012 cn Have\Hookshot 8011A80D ???? 000A:"Hookshot",000B:"Longshot" cn Have\Magic Beans 8011A812 0010 cn Have\Magic\Fairie's Wind 8011A80F 000D cn Have\Magic\Nayru's Love 8011A815 0013 cn Have\Magic\Din's Fire 8011A809 0005 cn Bottles\Bottle 1 Modifier 8011A816 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 2 Modifier 8011A817 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 3 Modifier 8011A818 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 4 Modifier 8011A819 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Trading\Adult Link Item 8011A81A ???? 002D:"Pocket Egg",002E:"Pocket Cucco",002F:"Cojiro",0030:"Odd Mushroom",0031:"Odd Potion",0032:"Poacher's Saw",0033:"Goron's Sword (Broken)",0034:"Prescription",0035:"Eyeball Frog",0036:"Eye Drops",0037:"Claim Check" cn Trading\Young Link Item 8011A81B ???? 0021:"Weird Egg",0022:"Chicken",0023:"Zelda's Letter",0024:"Keaton Mask",0025:"Skull Mask",0026:"Spooky Mask",0027:"Bunny Hood",0028:"Goron Mask",0029:"Zora Mask",002A:"Gerudo Mask",002B:"Mask of Truth",002C:"SOLD OUT" cn Turn Giant's Knife Into Biggoron's Sword 8011A7CE 0001 cn Have Quiver (Holds 30) 8011A831 0001 cn Equipment Modifier 1 cd This modifies the equipment you are carrying.If you Use Black Gauntlets,They are as strong as the Golden Gauntlets. This code also gives you the Silver Scale and the Golden Scale and unlimited rupees. 8011A832 ???? 0002:"Silver Scale",0004:"Golden Scale",0006:"Giant's Knife (Broken)",0035:"Black Gauntlets",0040:"Bullet Bag (Holds 30)",0080:"Bullet Bag (Holds 40)",00C0:"Bullet Bag (Holds 50)" cn Equipment Modifier 2 cd This modifies the equipment you are carrying. 8011A833 ???? 0008:"Bomb Bag (Holds 20)",0010:"Bomb Bag (Holds 30)",0018:"Bomb Bag (Holds 40)",0020:"Goron's Bracelet",0028:"Silver Gauntlets",0030:"Golden Gauntlets" cn Press L To Levitate cd Use this cheat to levitate. You have to deactivate it to come back down. Useful for passing obstacles that usually can be passed only at a later point! D01C8675 0020 811DAC50 40CB cn Press L For infinite Hover Boots, cd Press L For Infinite Hover Boots & Let go to land,This Only works when you have the Boots on D01C8675 0020 811DB472 000D cn Instant Step Hoover Boots cd Take off from Anywhere & to go higher just press L Once, this will lift you higher while walking.to come back Down Keep R pressed.Once you have enabled the code press Start & then start again. D01C8675 0020 811DAC50 40CB D01C8675 0000 811DB472 000D 8011A800 ???? 0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Beta\Play Beta Quest Worlds cd Put on the code on load up,After the Nintendo logo you will be in Beta Mode,There are no icons, energy bar etc. on the screen.When you press a C-Buttton you can use an object.Here the objects for the C-Buttons:C-left: arrows, C-down: bombs, C-right: Ocarina of Time. There is also no Navi and start menu.When you go to some places the game will freeze or you can't move. D01C8675 0000 8011BBA3 ???? 0000:"World 01",0001:"World 02",0002:"World 03",0003:"World 04",0004:"World 05",0007:"World 06",0008:"World 07",0016:"World 08" cn Warp Song Location\Minuet of Forest & Serenade of Water cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011BB25 ???? 0000:"Sacred Forest Meadow",0004:"Lake Hylia",0015:"Inside Jabu Jabu's Belly",0018:"Dodongo's Cavern",0068:"Inside The Deku Tree" cn Warp Song Location\Prelude of Light & Nocturne of Shadow cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011BB25 ???? 0003:"Kakariko Windmill",0007:"Bombchu Bowling Alley",000F:"Zelda & Impa Flee",0014:"Kakariko Village",0017:"Ganon,Final Battle",001D:"Top of Ganon's Tower",0028:"Bombchu Shop",002C:"Bazaar",0030:"Happy Mask Shop",0034:"Ganon's Tower",0038:"Ganon's Castle",004C:"Inside Spirit Door",006C:"Burning Castle",0050:"House of Skulltula",0064:"Death Mountain Trail",0068:"Graveyard",0070:"Thieves' Hideout",0074:"Royal Family's Tomb",0078:"Great Fairy Fountain 1",0084:"Forest Temple,Room With Falling Floor",0088:"Great Fairy Fountain 2",0099:"Grotto 01",009D:"Grotto 02",00A4:"Grotto 04",00A8:"Grotto 05",00B3:"Grotto 06",00B0:"Grotto 07",00B4:"Grotto 08",00B8:"Grotto 09",00C3:"Grotto 10",00C0:"Grotto 11",00C4:"Grotto 12",00FC:"Grotto 13",00D3:"Bottom of the Well",00D0:"Lon Lon Ranch Shed",00D3:"Lon Lon Ranch Outside Shed",00D8:"Ice Cavern",00E3:"Outside Cow Pen",00E0:"Lost Woods Bridge",00E4:"Lon Lon Ranch Chicken Room",00E8:"In Front of Deku Tree",00EB:"Spirit Temple Boss",00F1:"Castle Courtyard,In Front of Zelda",00F4:"Temple of Time",00F8:"Gerudo Fortress Jail" cn Warp Song Location\Bolero of Fire cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011BB25 ???? 0003:"Castle Courtyard",000B:"Dodongo's Cavern Boss",0010:"Inside The Deku Tree Boss",0014:"Shadow Temple Boss",0017:"Water Temple Boss",001C:"Ganon's Castle Tower",001F:"Ganon First Battle",0028:"Ganon's Castle Room Before Ganon",002B:"Inside Ganon's Castle Room With Pillar",002F:"Lon Lon Ranch",0033:"Mido's House",0037:"Saria's House",004B:"Bearded Man's House",0040:"Top of Ganon's Castle",0047:"Outside Saria's House",004F:"Dampe's Race",0057:"Kokiri Forest",005B:"Top of Death Mountain",005F:"Fishing Pond",0068:"Inside Ganon's Castle",007F:"Hyrule Castle Gate",00BA:"Top of Ganon's Tower",00C2:"Great Fairy Fountain",00D6:"Lost Woods Goron Entrance",00DA:"Lost Woods River Entrance",00DE:"Lost Woods Bridge Field Entrance",00E3:"Goron City Lost Woods Entrance",00F6:"Death Mountain Crater",00FD:"Ganon's Castle" cn Warp Song Location\Requiem of Spirit cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011BB25 ???? 0005:"Lake Hylia,08 Zora's Domain",0018:"Gerudo Valley",001E:"Lost Woods",0028:"Gerudo Fortress",0030:"Haunted Wasteland",0034:"Ganon's Castle Inside Burning Castle",0038:"Hyrule Castle",003A:"Ganon's Castle",003D:"Death Mountain Trail",004D:"Goron City",0065:"Fire Temple",0069:"Forest Temple",006E:"Shooting Gallery",0079:"Ganon's Castle Inside Burning Castle",007E:"Kakariko Village Entrance",007B:"Zora's River Entrance",0085:"Kokiri Forest Entrance",008A:"Lake Hyrule Entrance",008E:"Gerudo Valley Entrance",0092:"Death Mountain Trail Entrance",0095:"Graveyard Entrance",009E:"Zora's Domain Entrance",00A2:"Zora's Fountain Entrance",00BA:"Goron City Entrance",00BE:"Death Mountain Trail",00C1:"Goron City",00C5:"Lakeside Laboratory",00C9:"Top of Ganon's Castle",00CD:"Hyrule Market (Child Link's)",00CF:"Hyrule Market (Adult Link's)",00F1:"Desert Colossus",00FA:"Lon Lon Ranch Entrance",00FD:"Hyrule Field" cn Max\Double Defense Power cd This gives you White Border Hearts 8011A85F 0014 cn Nayru's Love is Always cd For this to work On Or off, you have to walk through a Doorway to activate the Change. 8111BB58 ???? 0000:"OFF",FFFF:"ON" cn Infinite\Timers\All other Timers cd This cheat works on all Race Timers.Under Water with iron Boots etc. 8011BB61 0032 cn Epona\Max Carrots\Lon Lon Raunch cd This is For Practicing,Racing.Warning take this off before jumping the exit fence after winning Epona 801D8D8A 0006 801F23C8 0001 801EEE48 0001 cn Infinite\Timers\Escape From Gannons Tower cd This cheat works only on The Final Boss. 8011BB65 00B4 cn Beta\Specific things lean cd This code will cause all items on a specific plane to lean. This is helpful for areas in which the plane causes the crash (Ex. Weird Zora's Fountain Beta Quest 01). 800257D4 0001 cn Beta\Appear in Strange Places (Hold R) cd If you go to an area where Link is immobile or invisible, using the "appear in strange places" code will almost always fix it, but you'll start somewhere outside of the Arena and in air. I recommend using the infinite step Hover boots code already supplied with PJ64 so you can float back into the arena in the event that this happens. D01C8675 0010 8111BAF6 0001 cn Beta\Interface always off/on cd If you go to an area where the interface is accessible, this signigfies that you're not in 'beta' mode anymore. Using the "interface always off/on" code, you can stay in 'beta' mode regardless of what happens. This may cause more crashes in SOME areas, but it's rare and is not too severe. If you need to explore a beta area with the interface, "use the interface always on" portion of the code. Don't use the codes as you start the game. If you need the interface on/off at a specific time, start the game, go to the area, activate the code, keep it on until next reset. 8011B679 00FF 8011BAEF ???? 0000:"Off",0001:"On" cn Always Have Wallet Size 8011A832 ???? 0047:"Kid Wallet (Holds 99)",0057:"Adult Wallet (Holds 200)",0067:"Giant Wallet (Holds 500)" crc 693BA2AE-B7F14E9F-C:4A gn Zelda no Densetsu - Toki no Ocarina (J) (v1.2) //--------------- (JU) Region Cheat Codes --------------- cn Infinite\Rupees cd This cheat allows you to have the max Rupees to the Wallet you currently Hold 8111C04C 0001 cn Press R\For Old Or Young Link cd To Activate this Cheat Hold The R Button when walking through a Doorway this will change you to the option on the other side, Disable this Cheat straight away after getting to the other side, in some places you might even get Access Violations. Just press ok untill you can carry on. D01C8D75 0010 8011AC87 ???? 0001:"Link Young",0000:"Link Old" cn Use Any Item In Any House cd do not use under or in water 8111BEA2 0000 8111BEA4 0000 cn Have\All Equipment cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111AD1C 7777 cn Have\All Quest/Status Items cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111AD24 30FF 8111AD26 FFFF cn Max\Heart Containers 8111ACAE 0140 cn Max\Gold Skulltulas Killed 8011AD51 0064 cn Time of Day Modifier 8111AC8C ???? 4000:"At Sunrise",5800:"Daylight Out",7000:"Very Bright Out",C000:"At Sunset",D000:"Fairly Dark" cn Infinite\Energy 8111ACB0 0140 cn Infinite\Magic D011ACB9 0008 8011ACBA 0001 8011ACBC 0001 8011ACB3 0060 cn Tunic & Boot Options cd This changes what you are wearing,once you have enabled the code press Start & then start again. 8011ACF0 ???? 0011:"Kokiri Tunic & Kokiri Boots",0012:"Goron Tunic & Kokiri Boots",0013:"Zora Tunic & Kokiri Boots",0014:"Black Tunic & Kokiri Boots",0015:"White Tunic & Kokiri Boots",0016:"Yellow Tunic & Kokiri Boots",0021:"Kokiri Tunic & Iron Boots",0022:"Goron Tunic & Iron Boots",0023:"Zora Tunic & Iron Boots",0024:"Black Tunic & Iron Boots",0025:"White Tunic & Iron Boots",0026:"Yellow Tunic & Iron Boots",0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Infinite\Deku Sticks 8011AD0C 0009 cn Infinite\Deku Nuts 8011AD0D 0009 cn Infinite\Bombs 8011AD0E 0009 cn Infinite\Arrows 8011AD0F 0009 cn Infinite\Deku Seeds 8011AD12 0009 cn Infinite\Bombchu's 8011AD14 0009 cn Infinite\Magic Beans 8011AD1A 0009 cn Infinite\Big Key,Small Keys,Compass,& Map 8011AD28 0007 8011AD29 0007 8011AD2A 0007 8011AD2B 0007 8011AD2C 0007 8011AD2D 0007 8011AD2E 0007 8011AD2F 0007 8011AD30 0007 8011AD31 0007 8011AD32 0007 8011AD3F 0009 8011AD40 0009 8011AD41 0009 8011AD42 0009 8011AD43 0009 8011AD49 0009 8011AD4C 0009 8011AD47 0009 cn Have\Ocarina 8011ACFB ???? 0007:"Fairy Ocarina",0008:"Ocarina Of Time" cn Have\Boomerang 8011AD00 000E cn Have\Lens of Truth 8011AD01 000F cn Have\Megaton Hammer 8011AD03 0011 cn Have\Deku Stick 8011ACF4 0000 cn Have\Deku Nut 8011ACF5 0001 cn Have\Bombs 8011ACF6 0002 cn Have\Fairy Bow 8011ACF7 0003 cn Have\Fairy Slingshot 8011ACFA 0006 cn Have\Bombchu 8011ACFC 0009 cn Have\Arrows\Fire Arrow 8011ACF8 0004 cn Have\Arrows\Ice Arrow 8011ACFE 000C cn Have\Arrows\Light Arrow 8011AD04 0012 cn Have\Hookshot 8011ACFD ???? 000A:"Hookshot",000B:"Longshot" cn Have\Magic Beans 8011AD02 0010 cn Have\Magic\Fairie's Wind 8011ACFF 000D cn Have\Magic\Nayru's Love 8011AD05 0013 cn Have\Magic\Din's Fire 8011ACF9 0005 cn Bottles\Bottle 1 Modifier 8011AD06 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 2 Modifier 8011AD07 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 3 Modifier 8011AD08 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 4 Modifier 8011AD09 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Trading\Adult Link Item 8011AD0A ???? 002D:"Pocket Egg",002E:"Pocket Cucco",002F:"Cojiro",0030:"Odd Mushroom",0031:"Odd Potion",0032:"Poacher's Saw",0033:"Goron's Sword (Broken)",0034:"Prescription",0035:"Eyeball Frog",0036:"Eye Drops",0037:"Claim Check" cn Trading\Young Link Item 8011AD0B ???? 0021:"Weird Egg",0022:"Chicken",0023:"Zelda's Letter",0024:"Keaton Mask",0025:"Skull Mask",0026:"Spooky Mask",0027:"Bunny Hood",0028:"Goron Mask",0029:"Zora Mask",002A:"Gerudo Mask",002B:"Mask of Truth",002C:"SOLD OUT" cn Turn Giant's Knife Into Biggoron's Sword 8011ACBE 0001 cn Have Quiver (Holds 30) 8011AD21 0001 cn Equipment Modifier 1 cd This modifies the equipment you are carrying.If you Use Black Gauntlets,They are as strong as the Golden Gauntlets. This code also gives you the Silver Scale and the Golden Scale and unlimited rupees. 8011AD22 ???? 0002:"Silver Scale",0004:"Golden Scale",0006:"Giant's Knife (Broken)",0035:"Black Gauntlets",0040:"Bullet Bag (Holds 30)",0080:"Bullet Bag (Holds 40)",00C0:"Bullet Bag (Holds 50)" cn Equipment Modifier 2 cd This modifies the equipment you are carrying. 8011AD23 ???? 0008:"Bomb Bag (Holds 20)",0010:"Bomb Bag (Holds 30)",0018:"Bomb Bag (Holds 40)",0020:"Goron's Bracelet",0028:"Silver Gauntlets",0030:"Golden Gauntlets" cn Press L To Levitate cd Use this cheat to levitate. You have to deactivate it to come back down. Useful for passing obstacles that usually can be passed only at a later point! D01C8D75 0020 811DB350 40CB cn Press L For infinite Hover Boots, cd Press L For Infinite Hover Boots & Let go to land,This Only works when you have the Boots on D01C8D75 0020 811DBB72 000D cn Instant Step Hoover Boots cd Take off from Anywhere & to go higher just press L Once, this will lift you higher while walking.to come back Down Keep R pressed.Once you have enabled the code press Start & then start again. D01C8D75 0020 811DB350 40CB D01C8D75 0000 811DBB72 000D 8011ACF0 ???? 0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Beta\Play Beta Quest Worlds cd Put on the code on load up,After the Nintendo logo you will be in Beta Mode,There are no icons, energy bar etc. on the screen.When you press a C-Buttton you can use an object.Here the objects for the C-Buttons:C-left: arrows, C-down: bombs, C-right: Ocarina of Time. There is also no Navi and start menu.When you go to some places the game will freeze or you can't move. D01C8D75 0000 8011C093 ???? 0000:"World 01",0001:"World 02",0002:"World 03",0003:"World 04",0004:"World 05",0007:"World 06",0008:"World 07",0016:"World 08" cn Warp Song Location\Minuet of Forest & Serenade of Water cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011C015 ???? 0000:"Sacred Forest Meadow",0004:"Lake Hylia",0015:"Inside Jabu Jabu's Belly",0018:"Dodongo's Cavern",0068:"Inside The Deku Tree" cn Warp Song Location\Prelude of Light & Nocturne of Shadow cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011C015 ???? 0003:"Kakariko Windmill",0007:"Bombchu Bowling Alley",000F:"Zelda & Impa Flee",0014:"Kakariko Village",0017:"Ganon,Final Battle",001D:"Top of Ganon's Tower",0028:"Bombchu Shop",002C:"Bazaar",0030:"Happy Mask Shop",0034:"Ganon's Tower",0038:"Ganon's Castle",004C:"Inside Spirit Door",006C:"Burning Castle",0050:"House of Skulltula",0064:"Death Mountain Trail",0068:"Graveyard",0070:"Thieves' Hideout",0074:"Royal Family's Tomb",0078:"Great Fairy Fountain 1",0084:"Forest Temple,Room With Falling Floor",0088:"Great Fairy Fountain 2",0099:"Grotto 01",009D:"Grotto 02",00A4:"Grotto 04",00A8:"Grotto 05",00B3:"Grotto 06",00B0:"Grotto 07",00B4:"Grotto 08",00B8:"Grotto 09",00C3:"Grotto 10",00C0:"Grotto 11",00C4:"Grotto 12",00FC:"Grotto 13",00D3:"Bottom of the Well",00D0:"Lon Lon Ranch Shed",00D3:"Lon Lon Ranch Outside Shed",00D8:"Ice Cavern",00E3:"Outside Cow Pen",00E0:"Lost Woods Bridge",00E4:"Lon Lon Ranch Chicken Room",00E8:"In Front of Deku Tree",00EB:"Spirit Temple Boss",00F1:"Castle Courtyard,In Front of Zelda",00F4:"Temple of Time",00F8:"Gerudo Fortress Jail" cn Warp Song Location\Bolero of Fire cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011C015 ???? 0003:"Castle Courtyard",000B:"Dodongo's Cavern Boss",0010:"Inside The Deku Tree Boss",0014:"Shadow Temple Boss",0017:"Water Temple Boss",001C:"Ganon's Castle Tower",001F:"Ganon First Battle",0028:"Ganon's Castle Room Before Ganon",002B:"Inside Ganon's Castle Room With Pillar",002F:"Lon Lon Ranch",0033:"Mido's House",0037:"Saria's House",004B:"Bearded Man's House",0040:"Top of Ganon's Castle",0047:"Outside Saria's House",004F:"Dampe's Race",0057:"Kokiri Forest",005B:"Top of Death Mountain",005F:"Fishing Pond",0068:"Inside Ganon's Castle",007F:"Hyrule Castle Gate",00BA:"Top of Ganon's Tower",00C2:"Great Fairy Fountain",00D6:"Lost Woods Goron Entrance",00DA:"Lost Woods River Entrance",00DE:"Lost Woods Bridge Field Entrance",00E3:"Goron City Lost Woods Entrance",00F6:"Death Mountain Crater",00FD:"Ganon's Castle" cn Warp Song Location\Requiem of Spirit cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011C015 ???? 0005:"Lake Hylia,08 Zora's Domain",0018:"Gerudo Valley",001E:"Lost Woods",0028:"Gerudo Fortress",0030:"Haunted Wasteland",0034:"Ganon's Castle Inside Burning Castle",0038:"Hyrule Castle",003A:"Ganon's Castle",003D:"Death Mountain Trail",004D:"Goron City",0065:"Fire Temple",0069:"Forest Temple",006E:"Shooting Gallery",0079:"Ganon's Castle Inside Burning Castle",007E:"Kakariko Village Entrance",007B:"Zora's River Entrance",0085:"Kokiri Forest Entrance",008A:"Lake Hyrule Entrance",008E:"Gerudo Valley Entrance",0092:"Death Mountain Trail Entrance",0095:"Graveyard Entrance",009E:"Zora's Domain Entrance",00A2:"Zora's Fountain Entrance",00BA:"Goron City Entrance",00BE:"Death Mountain Trail",00C1:"Goron City",00C5:"Lakeside Laboratory",00C9:"Top of Ganon's Castle",00CD:"Hyrule Market (Child Link's)",00CF:"Hyrule Market (Adult Link's)",00F1:"Desert Colossus",00FA:"Lon Lon Ranch Entrance",00FD:"Hyrule Field" cn Max\Double Defense Power cd This gives you White Border Hearts 8011AD4F 0014 cn Nayru's Love is Always cd For this to work On Or off, you have to walk through a Doorway to activate the Change. 8111C048 ???? 0000:"OFF",FFFF:"ON" cn Infinite\Timers\All other Timers cd This cheat works on all Race Timers.Under Water with iron Boots etc. 8011C051 0032 cn Epona\Max Carrots\Lon Lon Raunch cd This is For Practicing,Racing.Warning take this off before jumping the exit fence after winning Epona 801D927A 0006 801F28B8 0001 801EF338 0001 cn Infinite\Timers\Escape From Gannons Tower cd This cheat works only on The Final Boss. 8011C055 00B4 cn Beta\Specific things lean cd This code will cause all items on a specific plane to lean. This is helpful for areas in which the plane causes the crash (Ex. Weird Zora's Fountain Beta Quest 01). 80025CC4 0001 cn Beta\Appear in Strange Places (Hold R) cd If you go to an area where Link is immobile or invisible, using the "appear in strange places" code will almost always fix it, but you'll start somewhere outside of the Arena and in air. I recommend using the infinite step Hover boots code already supplied with PJ64 so you can float back into the arena in the event that this happens. D01C8B65 0010 8111BFE6 0001 cn Beta\Interface always off/on cd If you go to an area where the interface is accessible, this signigfies that you're not in 'beta' mode anymore. Using the "interface always off/on" code, you can stay in 'beta' mode regardless of what happens. This may cause more crashes in SOME areas, but it's rare and is not too severe. If you need to explore a beta area with the interface, "use the interface always on" portion of the code. Don't use the codes as you start the game. If you need the interface on/off at a specific time, start the game, go to the area, activate the code, keep it on until next reset. 8011BB69 00FF 8011BFDF ???? 0000:"Off",0001:"On" cn Always Have Wallet Size 8011AD22 ???? 0047:"Kid Wallet (Holds 99)",0057:"Adult Wallet (Holds 200)",0067:"Giant Wallet (Holds 500)" crc 1FBAF161-2C1C54F1-C:41 gn 1080 SNOWBOARDING //--------------- (U) Region Cheat Codes --------------- cn Infinite Damage All Players & Levels 803F4C3D 0000 cn Infinite Lives & Continues 8026B1CB 0003 cn Enable All Levels & Boarders 80255089 00FF 8025508B 0005 81255096 FCFF 80255098 0007 cn Stop Timer\Time Attack\Air Make 8031AB5A 0000 cn Stop Timer\Time Attack\Half Pipe 802F649A 0000 cn Stop Timer\Time Attack\Crystal Lake 802A593A 0000 cn Stop Timer\Time Attack\Crystal Peak 802B2CDA 0000 cn Stop Timer\Time Attack\Golden Forrest 802B146A 0000 cn Stop Timer\Time Attack\Mountain Village 802CBA6A 0000 cn Stop Timer\Time Attack\Dragon Cave 802C148A 0000 cn Stop Timer\Time Attack\Deadly Fall 802CF67A 0000 cn Stop Timer\Trick Attack\Air Make 8031ABCA 00C5 cn Stop Timer\Trick Attack\Half Pipe 802F650A 00C5 cn Stop Timer\Trick Attack\Crystal Lake 8029F77A 00C5 cn Stop Timer\Trick Attack\Crystal Peak 802AC9FA 00C5 cn Stop Timer\Trick Attack\Golden Forrest 802AB06A 00C5 cn Stop Timer\Trick Attack\Mountain Village 802C51EA 00C5 cn Stop Timer\Trick Attack\Dragon Cave 802BAE4A 00C5 cn Stop Timer\Trick Attack\Deadly Fall 802C8F1A 00C5 cn Stop Timer\Contest\Crystal Lake 8029C1EA 00C5 cn Stop Timer\Contest\Crystal Peak 802A89AA 00C5 cn Stop Timer\Contest\Golden Forest 802A6E4A 00C5 cn Stop Timer\Contest\Air Make 80319CCA 00C5 cn Stop Timer\Contest\Half Pipe 802F530A 00C5 cn Have All\Match Levels Completed 8025508A 0005 cn Have All\Contest First Place Done 80244098 0007 cn Open Level Character Select cd With these codes, you have to press the buttons listed below when you are viewing a certain boarders stats. Highlight Akari Hayami's stats, and then hold down the C-Left button and then press the A button to be the Crystal Boarder. Highlight Kensuke Kimachi's stats, and then hold down the C-Up button and then press the A button to be the Metal Boarder. Hightlight Rob Haywood's stats, and then hold down the C-Right button and then press the A button to be the Panda Boarder 8125508A ???? 0001:"Easy Level",0002:"Easy & Normal Level",0003:"Easy Normal & Hard Levels",0004:"Easy Normal Hard Levels & Crystal Boarder",0005:"Easy Normal Hard Levels & Crystal & Metal Boarders" cn Play As 800200E7 ???? 0000:"Dion Blaster",0001:"Kensuke Kimachi",0002:"Akari Hayami",0003:"Ricky Winterborn",0004:"Rob Haywood",0005:"Silver Boarder",0006:"Gold Boarder",0007:"Panda Boarder" cn Have All\Trick Attacks Done 81255096 FCFF crc 82DC04FD-CF2D82F4-C:45 gn A Bug's Life (J) cn Infinite\Lives 801E1A38 0009 cn Infinite\Health 801E1A2D 0004 cn Always Have\Super Jump 811E1A28 0020 cn Always Have\50 pieces of corn 801E1A39 0032 cn Have F-L-I-K 801E1A3A 000F cn Levitate cd "Press R To Levitate & Let go to land (:" D008F2C1 0010 801E199E 0001 D008F2C1 0010 801E19AE 0001 cn Unlock All Levels 81099150 000F cn Have All Goldberry Tokens 801E1A26 0000 cn Start with Berry Weapon 811E1A2E ???? 0001:"Blueberry",0002:"Homing Berry",0003:"Goldberry",0004:"Super Berry ?" crc 1B598BF1-ECA29B45-C:45 gn Aerofighter's Assault (U) cn Ultra Fast Missile Recharge 8027E300 0001 cn Rocket Squad 8027E107 0001 cn Tomahawk Squad 8027E109 0001 cn Extra Points D027A20C 0000 8027A20C 00FF cn Extra Planes 8127CCEC FFFF cn 99 Bonus 80130B87 0063 cn 99 Accuracy 80130B80 0063 cn Gun Select 8027E023 ???? 0000:"Chaff",0001:"Jammings",0002:"Air Mines",0003:"Mahibishi",000A:"22mm BB Shot",000B:"22mm",000C:"Hunai Shot",000D:"Fireball",000E:"Sabre",0014:"Fire",0015:"Tomahawk",0016:"Ninja Glitch",0017:"Fire Wave",001E:"Rocket",001F:"Phoenix",0020:"Star",0021:"Fire Arrow",0028:"Ninjabeam" cn Infinite\Chaffs 8027E017 000A cn Infinite\Gun 8027E110 0001 cn Infinite\Special Weapons 8027E4D2 0002 cn Infinite\Armor 8127CFF4 44A0 8127CFF8 44A0 cn Infinite\Health 8027CFF5 00C8 8027CFF9 00C8 cn Always Have\F-15J Eagle 8027CCEC 0010 cn Always Have\X-29A A.T.D. 8027CCED 0020 cn Infinite\99 Lives 80348B98 0063 crc AEBE463E-CC71464B-C:45 gn AEROGAUGE cn No Damage\Player 1 50000402 0000 8113FFD8 0000 cn No Damage\Player 2 50000402 0000 81142078 0000 cn Unlock Hidden Tracks & Cars 8008F29C 0001 cn Freeze All Lap Timers 8013FCA1 0001 8013FCA5 0001 8013FCA9 0001 cn Freeze Overall Timer cd All of the Freeze All Lap Timers must be on. These codes will Stop the others from racing against you in Grand Prix mode. To win a race in Grand Prix you must finish at least one lap in the qualify round, then complete all laps in race for first. 8013FC95 0001 cn Laps Of Race 8013FC8E ???? 0001:"1 Lap",0002:"2 Laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"Never Ending Laps" cn Play As\Player 1 8013FF95 ???? 0000:"N64 Control Pad",0001:"Interceptor",0002:"Hornet",0003:"Avenger",0004:"Shredder",0005:"Black Lightning",0006:"Vengeance",0007:"Prowler",0008:"Reaper",0009:"Dominator" cn Play As\Player 2 8013FF96 ???? 0000:"N64 Control Pad",0001:"Interceptor",0002:"Hornet",0003:"Avenger",0004:"Shredder",0005:"Black Lightning",0006:"Vengeance",0007:"Prowler",0008:"Reaper",0009:"Dominator" cn Level Select 8013FF9B ???? 0000:"Canyon Rush",0001:"Bikini Island",0002:"China Town",0003:"Neo Arena",0004:"China Town Jam",0005:"Neo Speed Way" cn Always 1st 8013FCE0 0001 cn Music Modifier 80109BDC ???? 00FF:"Music On",0000:"Music Off" crc E6A95A4F-BAD2EA23-C:45 gn Aidyn Chronicles - The First Mage (U) cn Infinite\Max Health 80278B98 001E cn Infinite\99 Health Potions cd Do Not put this cheat on until you have collected your 1st Health Potion from the 1st Cheat or you will not be able to get into the Sub menu and Continue the game. 802785CB 0063 cn Have\Max Gold 50000401 0000 80277335 00FF cn Have\Max Total XP 50000401 0000 80278BAD 00FF cn Have\Max Total XP Remaning to Start cd This will give you 16777215 Total XP Remaning to start with and after your 1st batle will allow you to buy your Max Stats 50000401 0000 80278BB1 00FF crc C43E23A7-40B1681A-C:45 gn All-Star Baseball 99 (U) cn Infinite\Character Creation Points 800E2C31 00B0 cn Infinite\Strikes 800ABFB9 0000 cn Infinite\Balls 800ABFB7 0000 cn Infinite\Outs 800ABFBB 0000 cn Max\Character Creation Accuracy 810E2BF0 4170 cn Max\Character Creation Clutch 810E2BF4 4170 cn Max\Character Creation Contact 810E2BFC 4170 cn Max\Character Creation Power 810E2C00 4170 cn Max\Character Creation VS. LHP 810E2C04 4170 cn Max\Character Creation VS. RHP 810E2C08 4170 cn Max\Character Creation Bunting 810E2C0C 4170 cn Max\Character Creation VS LHB 810E2C10 4170 cn Max\Character Creation VS RHB 810E2C14 4170 cn Max\Character Creation Speed 810E2C18 4170 cn Max\Character Creation Defense 810E2C1C 4170 cn Max\Character Creation Arm Strength 810E2C20 4170 cn Max\Character Creation Streak 810E2C24 4170 cn Max\Character Creation Clutch 810E2C28 4170 crc 5E547A4D-90E60795-C:45 gn All-Star Baseball 2000 (U) cn Infinite\Strikes 8006E4E1 0000 cn Infinite\Balls 8006E4DF 0000 cn Infinite\Outs 8006E4E3 0000 cn Infinite\Character Creation Points 81103350 4170 cn Infinite\Pitch Type Creation Points 811039BC 4170 811039C0 4170 cn Character Creation\Max\Accuracy 81115A20 4170 cn Character Creation\Max\Stamina 81115A24 4170 cn Character Creation\Max\Contact 81115A28 4170 cn Character Creation\Max\Power 81115A2C 4170 cn Character Creation\Max\VS LHP 81115A30 4170 cn Character Creation\Max\VS RHP 81115A34 4170 cn Character Creation\Max\Bunting 81115A38 4170 cn Character Creation\Max\VS LHB 81115A3C 4170 cn Character Creation\Max\VS RHB 81115A40 4170 cn Character Creation\Max\Speed 81115A44 4170 cn Character Creation\Max\Defense 81115A48 4170 cn Character Creation\Max\Arm Str. 81115A4C 4170 cn Character Creation\Max\Streak 81115A50 4170 cn Character Creation\Max\Clutch 81115A54 4170 crc E185E291-4E50766D-C:45 gn All Star Tennis '99 (U) cn Game Win Select\Player 1 801BBFA1 ???? 0000:"0 Games Won",0001:"1 Game Won",0002:"2 Games Won",0003:"3 Games Won",0004:"4 Games Won",0005:"5 Games Won",0006:"For Game Set & Match" cn Game Win Select\Player 2 801BBFA2 ???? 0000:"0 Games Won",0001:"1 Game Won",0002:"2 Games Won",0003:"3 Games Won",0004:"4 Games Won",0005:"5 Games Won",0006:"For Game Set & Match" cn Points Select\Player 1 801C7260 ???? 0000:"0 Points",0015:"15 Points",0030:"30 Points",0040:"40 Points" cn Points Select\Player 2 801C7261 ???? 0000:"0 Points",0015:"15 Points",0030:"30 Points",0040:"40 Points" cn Play As\Player 1 800BFFA5 ???? 0000:"Zoe Taylor",0001:"Vanessa Child",0002:"Amanda Coetzer",0003:"Jana Novotna",0004:"Conchita Martinez",0005:"Leon Rodez",0006:"Michael Chang",0007:"Gustavo Kuerten",0008:"Jonas Bjorkman",0009:"Mark Philippoussis",000A:"Randy Powell",000B:"Richard Krajicek" cn Play As\Player 2 800BFFA6 ???? 0000:"Zoe Taylor",0001:"Vanessa Child",0002:"Amanda Coetzer",0003:"Jana Novotna",0004:"Conchita Martinez",0005:"Leon Rodez",0006:"Michael Chang",0007:"Gustavo Kuerten",0008:"Jonas Bjorkman",0009:"Mark Philippoussis",000A:"Randy Powell",000B:"Richard Krajicek" crc 4C52BBB2-CEAB0F6B-C:45 gn Army Men - Air Combat (U) cn Co-Pilot Modifier 800B245C ???? 0000:"Lt. James Marshall \"Woodstock\"",0001:"Lt. John Lawless \"Hardcore\"",0002:"Lt. Dave Parker \"Rawhide\"",0003:"Lt. Felicity Wannamaker \"Bombshell\"",0004:"Sergeant Hawk \"Sarge\" (Hidden Character)" cn Helicopter Modifier 800B2534 ???? 0001:"Huey",0002:"Chinook (Hidden)",0003:"Super Stallion (Hidden)",0004:"Apache (Hidden)" cn Always Play Level Modifier 800B254C ???? 0000:"Mission 1-Plastic Pandemonium",0001:"Mission 2-Going Car-razy",0002:"Mission 3-The Train That Could",0003:"Mission 4-Tan Terror-Tory",0004:"Mission 5-Bug Bath",0005:"Mission 6-Uninvited Guests",0006:"Mission 7-Ants In The Pants",0007:"Mission 8-Saucer Attack",0008:"Mission 9-The Heat is On",0009:"Mission 10-The Melting Pot",000A:"Mission 11-River Rapids Riot",000B:"Mission 12-Nighttime Teddy",000C:"Mission 13-Demolition Time",000D:"Mission 14-Pick Up The Pieces",000E:"Mission 15-Have An Ice Day",000F:"Mission 16-Plastro's Revenge",0010:"Mission 17-Bug Hunt: Chew Chew Bug-B-Q",0011:"Mission 18-Bug Hunt: Crispy Critters",0012:"Mission 19-Flag-Nab-It: Fort Frenzy",0013:"Mission 20-Flag-Nab-it: Freezer Burn",0014:"Mission 21-Food Fight: Picnic Panic",0015:"Mission 22-Food Fight: Cherry Surprise",0016:"Mission 23-Rescue: Don't Feed The Crabs",0017:"Mission 24-Rescue: Tide Pool Terror" cn Start On Play Level Modifier D00B254C 0000 800B254C ???? 0000:"Mission 1-Plastic Pandemonium",0001:"Mission 2-Going Car-razy",0002:"Mission 3-The Train That Could",0003:"Mission 4-Tan Terror-Tory",0004:"Mission 5-Bug Bath",0005:"Mission 6-Uninvited Guests",0006:"Mission 7-Ants In The Pants",0007:"Mission 8-Saucer Attack",0008:"Mission 9-The Heat is On",0009:"Mission 10-The Melting Pot",000A:"Mission 11-River Rapids Riot",000B:"Mission 12-Nighttime Teddy",000C:"Mission 13-Demolition Time",000D:"Mission 14-Pick Up The Pieces",000E:"Mission 15-Have An Ice Day",000F:"Mission 16-Plastro's Revenge",0010:"Mission 17-Bug Hunt: Chew Chew Bug-B-Q",0011:"Mission 18-Bug Hunt: Crispy Critters",0012:"Mission 19-Flag-Nab-It: Fort Frenzy",0013:"Mission 20-Flag-Nab-it: Freezer Burn",0014:"Mission 21-Food Fight: Picnic Panic",0015:"Mission 22-Food Fight: Cherry Surprise",0016:"Mission 23-Rescue: Don't Feed The Crabs",0017:"Mission 24-Rescue: Tide Pool Terror" cn Unlock All Planes 810B252A 0105 crc 862C0657-8DFD896D-C:45 gn Army Men - Sarge's Heroes (U) cn Incendiary Bullets 80054C94 0001 cn All Weapons 8115969E 0001 cn Start With Max Ammo 8115FCBE 0001 cn Invincible 8115FCEE 0001 cn Infinite Continues 81159692 0001 cn Invisible 81159682 0001 cn Tin Solider 811596A2 0001 cn Maximum Visibility 80070F52 0001 cn Flamethrowers Fire In All Directions 8006BD79 0020 cn No Flamethrowers Will Work 8006D69D 0001 cn Multiplayer Cheats\Incendiary Bullets 80054C81 0001 cn Enemies Don't Recongnize You Easily 8005742D 0001 cn Play As 811609A2 ???? 0007:"The Big Green One",0008:"Vikki",0009:"Plastro" cn Play Level 81163FFA 0001 8116403E ???? 88A0:"Spy Blue",88B4:"Bathroom",88C8:"Riff Mission",88E0:"Forest 81163FFA",88F0:"Hoover Mission",8908:"Thick Mission",8920:"Snow Mission",8938:"Shrap Mission",8950:"Fort Plastro",8968:"Scorch Mission",8980:"Showdown",8994:"Sandbox",89A4:"Kitchen",89B4:"Living Room",89C8:"The Way Home" cn You Move Faster 800ABD69 00FF 800ABDA9 00FF cn Press Start For Other Debug Info 8115FCE2 0001 cn Enemies Fight Themselves 800585D8 0020 cn No Enemies In Levels 80056D4C 0020 cn Less Enemies In Levels 80056688 0020 cn Enemies Can't Aim 8006D14C 0020 cn Enemies Have To Reload Their Guns 8006D16A 0020 cn Walls Off For Enemies When Hit 800566D8 0020 cn Bullets Only Damage At Extremely Short Range 8006D15A 0020 cn Improved Gun Handling 8009C014 003E cn Can't Fail Missions 810A04FA ED40 cn Everyone Has Dark Camoflauge On 50000804 0000 81098F22 FAE4 cn Flamethrower Has Air Buster Flame 810A536A 5008 810A5372 5008 cn Flamethrower Has Cloud Flame 810A536A 5224 810A5372 5224 cn Flamethrower Has Invisible Flame 810A536A 52A0 810A5372 52A0 cn Max Kills Multiplayer\Player 1 8033B9BC FFFF cn Max Kills Multiplayer\Player 2 8033BB78 FFFF crc B20F73B6-2975FC34-C:45 gn Army Men - Sarge's Heroes 2 (U) cn Invincible 8135C516 0600 cn All Weapons & Ammo 8115D06E 0001 8116368E 0001 cn Max Ammo 8116368E 0001 cn Continues 8115D062 0001 cn Invisible 8115D052 0001 cn Test Info 8115D3B6 0001 cn Living Large 811636AE 0001 cn Mini Mode 8115D06A 0001 cn Play as 81164372 ???? 0007:"Big Green One",0008:"Vikki",0009:"Plastro",000B:"Mystery Women",000C:"Hail Mendheimicus",000D:"Mini Soldier" cn Enemies Fight Themselves 8005EE9C 0020 cn Move Faster 800B9705 00FF 800B9749 00FF crc 1FB5D932-3BA9481B-C:45 gn Armorines - Project S.W.A.R.M. (U) cn Enable In-Game Cheat Menu & Level Select 81115936 014F cn Infinite Lewis Laser Rifle cd The infinite ammo will not work with these codes if you have the expansion pak inserted into your console. 802E1D6F 0170 cn Infinite Lewis Explosive Projectile Weapon cd The infinite ammo will not work with these codes if you have the expansion pak inserted into your console. 802E1D69 0030 cn Infinite Jungle Chemical Gun cd The infinite ammo will not work with these codes if you have the expansion pak inserted into your console. 802E1D7B 0160 cn Level Select 81115932 0008 cn Infinite Ammo (All Guns) 810496D0 2400 cn Don't Take Any Damage 8104A260 2400 cn Invincible 81048CA0 2400 cn Sound Modifier\Music Volume 80115944 ???? 0000:"Off",003C:"Low (5)",0078:"Medium (1.0)",00BC:"Defualt (1.5)",00F0:"Max (2.0)" cn Sound Modifier\SFX Volume 80115945 ???? 0000:"Off",003C:"Low (5)",0078:"Medium (1.0)",00BC:"Defualt (1.5)",00F0:"Max (2.0)" crc D1F7D8AB-293B0446-C:45 gn Asteroids Hyper 64 (U) cn Extra Lives 8007F90E 0063 cn Extra Points 8107F8FE FFFF cn Infinite Armageddon 8107F892 0001 cn Infinite Items On Pickup 8107F8A2 270F cn Unlock Classic Asteroids 8106DF5A 0001 cn Infinite Lives (Classic Asteroids) 8007F90F 002F crc 41B25DC4-1B726786-C:45 gn Automobili Lamborghini (U) cn Extra Vehicles 50000302 0000 800985C3 0001 50000302 0000 800985CB 0001 cn Max Points 800CE743 FFFF cn Infinite Time 810CE76E 02F4 cn Difficulty Modifier 810CE7A4 ???? 0000:"Novice",0001:"Expert" cn Speeds In Modifier 800CE803 ???? 0000:"KM/H",0001:"MPH" cn Always 1st Place 810A5F70 0001 crc A4BF9306-BF0CDFD1-C:45 gn Banjo-Kazooie cn Infinite\Eggs 80385F67 00FF cn Infinite\Lives 80385F8B 00FF cn Infinite\Jiggies 80385FCB 00FF cn Press L To Levitate cd Press L To Levitate & Let go to land D0281251 0020 8137C4BC 43E0 cn Infinite\Notes cd Just collect one Note to Have 255 Notes in all Worlds. 80385FF2 00FF 80385F62 0001 cn Infinite\Health 80385F83 0008 80385F87 0008 cn Infinite\Air 81385F8E 0E10 cn Infinite\Gold Feathers 80385F73 00FF cn Infinite\Red Feathers 80385F6F 00FF cn Infinite\Always Have All Jinjos 80385F7B 00FF cn Have Zero Time all Levels 50000B04 0000 81386004 3000 cn Character Select cd When Mumbo transforms you hold:C-Up for the Termite,C-Right for the Pumpkin,C-Down for the Walrus,C-Left for the Crocc,R for the Bumble Bee,L for the Washing Machine,Press nothing to turn into Banjo D0281251 0008 8037C2D3 0002 D0281251 0001 8037C2D3 0003 D0281251 0004 8037C2D3 0004 D0281251 0002 8037C2D3 0005 D0281251 0010 8037C2D3 0006 D0281251 0020 8037C2D3 0007 cn Infinite\Mumbo Tokens 80385FC6 00FF 80385FA2 00FF cn Take Off And Fly From Anywhere cd Press A Button. Do not use with Do Shock Spring Jump From Anywhere 8037C1D1 0002 cn Access All Moves 8037C3A0 0001 8037C3A1 007F 8037C3A2 00FF 8037C3A3 00FF cn Game 100% Complete 8137C3A0 001F 50000302 0000 8137C3A2 FFFF 50000602 0000 813832C0 FFFF 81383FCA 0064 81383FDC 0064 50000802 0000 813832F0 FFFF 81385FA0 0063 81385FC4 0063 81385FF0 0064 50000602 0000 81385FF2 6464 50001002 0000 813831A8 FFFF 813831B0 FF7F 813831B2 FFB0 813831B4 3DA6 813831B6 F264 813831C6 FF7F cn Secret Items 81283400 ???? FFFF:"Have All Collected",0000:"Have None" cn Do Shock Spring Jump From Anywhere cd Press A Button. Do not use with Take Off And Fly From Anywhere 8037C1D2 0002 crc C2E9AA9A-475D70AA-C:45 gn Banjo-Tooie (U) cn Infinite\Energy\Banjo and Kazooie cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011B069 0063 8111B644 0A0A cn Infinite\Air 8112B052 42C8 cn Have\AllMoves cd Press Top D-pad Up D1081084 0800 8112C770 8029 D1081084 0800 8112C772 0000 81290018 FFFF 8129001A FFFF 8129001C FFFF 8129001E FFFF cn Have Most of the Game Finished cd Start a new game,when you appear in Spiral Mountain press Top D-Pad. Go to the menu and you will notice all eggs, all moves are available. All the jiggies have been collected. Simply Save and Restart. 5000AC01 0000 80290000 00FF 8029002B 007F 80290063 00FB 80290073 005F D1081084 0800 8112C770 8029 D1081084 0800 8112C772 0000 cn Infinite\Energy\Snowball cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011B069 0063 8011B647 0005 cn Infinite\Energy\Bee cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011B069 0063 8011B653 000A 8011B654 000A cn Infinite\Energy\Washing Machine cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011B069 0063 8111B656 0A0A cn Infinite\Energy\Stony cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011B069 0063 8011B659 000A 8011B65A 000A cn Infinite\Energy\Banjo cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011B069 0063 8011B65F 000A 8011B660 000A cn Infinite\Energy\Kazooie cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011B069 0063 8111B662 0A0A cn Infinite\Energy\Submarine cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011B069 0063 8011B665 000A 8011B666 000A cn Infinite\Energy\Mumbo cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011B069 0063 8111B668 0A0A cn Infinite\Energy\Detonator cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011B069 0063 8111B66E 0A0A cn Infinite\Energy\T-Rex Baby cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011B069 0063 8011B67F 000A 8011B680 000A cn Have\All Moves & Dragon Kazooie cd Press Top D-pad,Do not use with either Have all Moves,Or Have Dragon Kazooie D1081084 0800 8112C770 8029 D1081084 0800 8112C772 0000 81290018 FFFF 8129001A FFFF 8129001C FFFF 8129001E FFFF 81290078 FFFF 8129007A FFFF cn Have\Dragon Kazooie cd Press Top D-pad,Do not use with Have All Modes Or Have All Moves & Dragon Kazooie D1081084 0800 8112C770 8029 D1081084 0800 8112C772 0000 81290078 FFFF 8129007A FFFF cn Play As cd To use this cheat, put the cheat on, then press L as you walk through a door to become that chosen character. Do not try to use the following character in Banjos house or anywhere as small or you will get stuck and wont be able to continue. Snowball Washing machine Submarine Golden Goliath Truck T-rex baby and T-rex daddy D0081085 0020 8012704C ???? 0001:"Banjo and Kazooie",0002:"Snowball",0006:"Bee",0007:"Washing machine",0008:"Stony",000A:"Banjo",000B:"Kazooie",000C:"Submarine",000D:"Mumbo",000E:"Golden Goliath",000F:"Detonator",0010:"Truck",0012:"T-rex baby",0013:"T-rex daddy" cn Instant Warp\Options\Spiral Mountain cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 00AD:"Grunty's Old Lair",00AE:"Behind The Waterfall",00AF:"Top Of Castle",0173:"Banjo's house" 80127643 0001 cn Instant Warp\Options\Jinjo Village cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 0142:"Jinjo Village",0144:"King Jingalings throne room",0143:"Bottles house",0145:"Green Jinjo's House",0146:"Black Jinjo's House",0147:"Yellow Jinjo's House",0148:"Blue Jinjo's House",014A:"Brown Jinjo's House",014B:"Orange Jinjo's House",014C:"Purple Jinjo's House",014D:"Red Jinjo's House",014E:"White Jinjo's House" 80127643 0001 cn Instant Warp\Options\Mayahem Temple cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 00B6:"Humba's Wigwam",00B7:"Mumbo's skull",00B8:"The Temple",00B9:"Prison Compound",00BC:"Code chamber",00C4:"Jade Snake Grove",00C5:"Treasure Chamber",00C6:"Kickball Arena",0177:"Targitzan's Slighty Sacred Temple",0178:"Inside Targitzans Temple",0179:"Targitzan Temple Lobby",017A:"Targitzan's Temple Boss",017F:"Mayan Kickball Arena",0166:"Multi",0167:"Still",00C8:"Kickball Arena",00C9:"Kickball Arena" 80127643 0001 cn Instant Warp\Options\Glitter Gulch Mine cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 00C7:"Mine",00CA:"Fuel depot",00CB:"Crushing shed",00CC:"Flooded caves",00CD:"Water storage",00CE:"Waterfall cavern",00CF:"Power hut basement",00D0:"Chuffy's cab",00D1:"Inside chuffy's boiler boss",00D2:"Gloomy caverns",00D3:"Generator caverns",00D4:"Power hut",00D5:"Wumba's wigwam",00D7:"Train station",00D8:"Prospectors hut",00D9:"Mumbo's hut",00DA:"Toxic gas cave",00DB:"Canary cave",00DC:"Ordnance storage",00E9:"Humba",0126:"Water supply pipe",0163:"Ordnance Storage entrance",0164:"Ordnance Storage game",0165:"Ordnance Storage game Multi",016F:"Testing",0170:"Testing",0171:"Mumbo's skull" 80127643 0001 cn Instant Warp\Options\Witchy World cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 00D6:"Witcy World",00DD:"Dodgem dome lobby",00DE:"Dodgem challenge \"1 vs 1\"",00DF:"Dodgem challenge \"2 vs 1\"",00E0:"Dodgem challenge \"3 vs 1\"",00E1:"Crazy castle stockade",00E2:"Crazy castle lobby",00E3:"Crazy castle pump room",00E4:"Balloon burst game",00E5:"Hoop hurry game",00E6:"Star spinner",00E7:"The inferno",00EA:"Cave of horrors",00EB:"Haunted cavern",00EC:"Train station",0124:"Saucer of Peril",013B:"Crazy castle stockade \"sop\"",013C:"Star spinner \"sop\"",0176:"Mumbo's skull" 80127643 0001 cn Instant Warp\Options\Jolly Roger's Lagoon cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 00ED:"Jolly's",00EE:"Pawno's emporium",00EF:"mumbo's skull",00F4:"Ancient Swimming Baths",00F6:"Electric Eels lair",00F7:"Seaweed Sanctum",00F8:"Inside the big fish",00FA:"temple of the fishes",01A8:"Atlantis",01A9:"Seabottom",0181:"sea bottom cavern",0182:"submarine multi",01A7:"Jolly Roger's Lagoon",00FF:"Blubber's wave race hire" 80127643 0001 cn Instant Warp\Options\Terrydacty Land cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 0112:"Terrydacty Land",0113:"Terry's nest",0114:"Train station",0115:"Oogle boogles cave",0116:"Inside the mountain",0117:"River passage",0118:"Styracosaurus family cave",0119:"Unga bunga's cave",011A:"Stomping plains",011B:"Bonfire caverns",011E:"Humba's Wigwam",0123:"Inside chompa's belly",0183:"Chompa's belly multi" 80127643 0001 cn Instant Warp\Options\Grunty Industries cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 0100:"Outside",0101:"Inside",0102:"Train station",0103:"Workers quarters",0104:"Trash compactor",0105:"Elevator shaft",0106:"Floor 2",0107:"Floor 2 \"electromagnet chamber\"",0108:"Floor 3",0109:"Floor 3 \"boiler plant\"",010A:"Floor 3 \"packing room\"",010B:"Floor 4",010C:"Floor 4 \"cable room\"",010D:"Floor 4 \"quality control\"",010E:"Floor 5",010F:"Basement",0110:"Basement \"repair depot",0111:"Basement \"waste disposal\"",0125:"Water supply pipe",0172:"Mumbo's skull",0162:"Floor 4 \"clinkers cavern\"",0187:"Sewer entrance" 80127643 0001 cn Instant Warp\Options\Hailfire Peaks cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 0127:"Lava side",0128:"Icy side",0129:"Lava train station",012A:"Ice train station",012B:"Chilli billi",012C:"Chilly willy",012D:"Colosseum kickball stadium lobby",0131:"Boggy's igloo",0132:"Icicle grotto",0133:"Inside the volcano",0168:"Icy side still" 80127643 0001 cn Instant Warp\Options\Cloud Cuckoo Land cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 0136:"Cloud Cuckoo Land 1",0137:"Inside the trashcan",0138:"Inside the cheesewedge",0139:"Zubba's nest",013A:"Central cavern",013D:"Inside the pot o gold",013E:"Mumbo's skull",013F:"Mingy jongo's skull",0140:"Humba wumba's wigwam",0161:"Cloud Cuckoo Land 2",0188:"Zubba's nest multi",0185:"Trash can mini" 80127643 0001 cn Instant Warp\Options\Isle O Hags cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 014F:"Wooded Hollow",0150:"Heggy's egg shed",0151:"Jiggywiggy's temple",0152:"Plateau",0153:"Plateau \"Honey B's Hive\"",0154:"Pine Grove",0155:"Cliff top",0156:"Cliff top Mumbo's skull",015A:"wasteland",015B:"inside another digger tunnel",015C:"Quagmire" 80127643 0001 cn Instant Warp\Options\Cauldron Keep cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 015D:"Cauldron Keep",015E:"The gatehouse",015F:"Tower of Tragedy Quiz",0160:"Gun chamber",016A:"Gun room still",017B:"Crazy Castle Stockade balloon burst multi",017C:"Crazy Castle Stockade Jump the hoops multi",017D:"Grunty Industries packing game",0180:"Colosseum kickball arena",0186:"Dodgems" 80127643 0001 cn Instant Warp\Options\Not sure cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D0081084 0000 81127640 ???? 00FC:"Lord woo fak fak",00F9:"Mr Patch",0121:"Inside Chuffy's wagon",0134:"Mumbo's Skull",0135:"Humba Wumba's wigwam 1",0157:"Humba Wumba's wigwam 2",019B:"Jingalings Zombified Palace",01A6:"Smuggler cavern",0141:"Inside the digger tunnel",0143:"Bottles house",0169:"Bottles house still",018A:"HAG Inside",019A:"HAG1 Final Boss" 80127643 0001 cn Monsters dont Hurt Banjo 50002430 0000 80132EF5 0000 50002430 0000 80132EF6 0000 50002430 0000 80132EF7 0000 50002430 0000 80132EF8 0000 50002430 0000 80132EF9 0000 cn Beta Bottles Revenge Mode cd Bottles Revenge is a Beta mode from Banjo Tooie that the RWP team recently uncovered after an extraordinary amount of effort. Bottles the Spirit transforms into Bottles the Devil and posses enemies nearby and allows a second player hooked up to Pad 2 to play as that Posses character to try to foil Banjos Plans. As player one goes about its business, player two uses every enemy nearby to try to nab Banjo and take away some life. This mode is incredible, and you can control almost every enemy in the game: slot machines, flying creatures, uggers, zubbas...and this is just the beginning. (Congrats Rare Witch Project) 8012B3F2 0001 800810C1 0002 crc 8C138BE0-95700E46-C:45 gn In-Fisherman Bass Hunter 64 (U) cn Catch Bigger Fish 80111F06 0001 cn Line Never Breaks 80111F05 0001 cn All Lakes Unlocked 80111F00 0001 cn Extra Cash 80111F0B 0001 cn Easier to Catch Fish 80111F0E 0001 cn No Penalties in Tounament 80111F08 0001 crc BCFACCAA-B814D8EF-C:45 gn Bassmasters 2000 (U) cn Player 1 Max Score (Casting Game) 8107A412 FFFF cn Player 2 Max Score (Casting Game) 8107A416 FFFF crc 204489C1-1286CF2B-C:45 gn Batman Beyond - Return of the Joker (U) cn Infinite\Infinite Health 802086F2 0064 cn Infinite\Infinite Lives 802086F1 0063 cn Infinite\Infinite Batarangs 802086FE 0063 cn Infinite\Max Charge & Magnetic Nun Chaku 802086B9 0064 crc 6AA4DDE7-E3E2F4E7-C:45 gn BattleTanx (U) cn Have Storm Ravens Gang 80135773 0001 cn Run Story 80135770 0001 cn Start With All Weapons 80135765 0001 cn Toads 80135776 0001 cn Trippy 80135771 0001 cn Unlimited Ammo 80135760 0001 cn Frogs 80135775 0001 cn Have All Levels 80135767 0001 cn Hurl Mode 8013576B 0001 cn Invincible 80135763 0001 cn Invisible 8013576A 0001 cn Unlimited Lives 80135772 0001 cn Regenerated Allied Tanks Are Indestrucible In Campaign 8009FB2A 0001 cn Multiplayer\Player 1\Infinite Ammo 802D8603 00FF cn Multiplayer\Player 2\Infinite Ammo 802D9F2B 00FF cn Multiplayer\Player 1\Tank Turret Always On (Use Right/Left C Button) 802DE7FB 0011 802DE7FF 0002 cn Multiplayer\Player 2\Tank Turret Always On 802DEB43 0011 802DEB47 0002 cn Multiplayer\Player 3\Tank Turret Always On 802DEE8B 0011 802DEE8F 0002 cn Multiplayer\Player 4\Tank Turret Always On 802DF1D3 0011 802DF1D7 0002 cn Multiplayer\Player 1\Always Have Radar 802D8195 0080 cn Multiplayer\Player 2\Always Have Radar 802D9ABD 0080 cn Multiplayer\Player 1\Always Has Cloaked On 802D818D 0001 cn Multiplayer\Player 2\Always Has Cloaked On 802D9AB5 0001 cn Multiplayer\Player 1\Your Goalith Tank On Tracks Always Has Radar 802D869D 0080 cn Multiplayer\Player 2\Your Goalith Tank On Tracks Always Has Radar 802D9FC5 0080 cn Multiplayer\Player 1\Your Goalith Tank On Tracks Always Has Cloaked On 802D8695 0001 cn Multiplayer\Player 2\Your Goalith Tank On Tracks Always Has Cloaked On 802D9FBD 0001 cn Multiplayer\Plater 1\One Hit And You Bite It 802D819F 0001 cn MultiPlayer\Player 2\One Hit And You Bite It 802D9AC7 0001 cn Area 51\Shock Wave Weapons 802D5A7D 00AF cn Area 51\Mines Are Invisible 802D5ACB 00CC cn Area 51\Mines Are Toxic Waste 802D5ACB 007C cn Area 51\Turn Ammo Pickup Picture To Flamer Picture 802D5AAF 00AC cn Area 51\Turn Nuke Into Toxic Waste Nuke 802D5A7B 007C cn Multiplayer\Balltlelord Mode\Player 1\All Special Weapons & Infinite Ammo 50000E02 0000 811AD7EE FFFF cn Multiplayer\Balltlelord Mode\Player 2\All Special Weapons & Infinite Ammo 50000E02 0000 811AE186 FFFF cn Multiplayer\Balltlelord Mode\Player 3\All Special Weapons & Infinite Ammo 50000E02 0000 811AEB1E FFFF cn Multiplayer\Balltlelord Mode\Player 4\All Special Weapons & Infinite Ammo 50000E02 0000 811AF4B6 FFFF cn Multiplayer\Deathmatch, Frenzy & Convoy Modes\Player 1\All Special Weapons & Infinite Ammo 50000E02 0000 811AD322 FFFF cn Multiplayer\Deathmatch, Frenzy & Convoy Modes\Player 2\All Special Weapons & Infinite Ammo 50000E02 0000 811ADCBA FFFF cn Multiplayer\Deathmatch, Frenzy & Convoy Modes\Player 3\All Special Weapons & Infinite Ammo 50000E02 0000 811AE652 FFFF cn Multiplayer\Deathmatch, Frenzy & Convoy Modes\Player 4\All Special Weapons & Infinite Ammo 50000E02 0000 811AEFEA FFFF cn Multiplayer\Hold 'Em Mode\Player 1\All Special Weapons & Infinite Ammo 50000E02 0000 811AD7EE FFFF cn Multiplayer\Hold 'Em Mode\Player 2\All Special Weapons & Infinite Ammo 50000E02 0000 811AE186 FFFF cn Multiplayer\Hold 'Em Mode\Player 3\All Special Weapons & Infinite Ammo 50000E02 0000 811AEB1E FFFF cn Multiplayer\Hold 'Em Mode\Player 4\All Special Weapons & Infinite Ammo 50000E02 0000 811AF4B6 FFFF cn All Batteries Have Hellfire 800A34A2 0001 cn All Batteries Have Bad Aim 800A1F7C 0001 cn Buildings Implode Instead Of Explode, And Remain Afire 8009298E 0001 cn Shoot Through Walls 8008E529 0001 cn All Battletanx Are Invincible 8009843D 0001 cn Can't Pick Up Queen Lords 8008A2F0 0001 cn Auto Win All Queen Lord Levels 800A6745 0001 cn Auto Lose All Queen Lord Levels 800A6746 0001 cn Slow Battle Tanks 8009A56A 0001 cn Buildings Fall Fast 80091BBC 0001 cn Nuke Blast Leaves Air Yellow 800F3333 0001 cn Nuke Blast Pink 8008055F 0001 cn Laser Fire Invisible 800846ED 0001 cn Full Control Of Tank In Bonus,Extra Side Player In Battlelord Multi! 800971EE 0001 cn Multiplayer\Balltlelord Mode\Player 1\Infinite Secondary Weapons In Battlelord 802D8609 00FF 802D860B 00FF 802D860D 00FF 802D860F 00FF 802D8611 00FF 802D8615 00FF 802D8617 00FF 802D8619 00FF 802D861B 00FF 802D861D 00FF 802D861F 00FF 802D8621 00FF cn Multiplayer\Balltlelord Mode\Player 2\Infinite Secondary Weapons In Battlelord 802D9F31 00FF 802D9F33 00FF 802D9F35 00FF 802D9F37 00FF 802D9F39 00FF 802D9F3D 00FF 802D9F3F 00FF 802D9F41 00FF 802D9F43 00FF 802D9F45 00FF 802D9F47 00FF 802D9F49 00FF cn In Campaign 3 Enemy Tanks May Join You 802D9AAC 0000 802DB3D4 0000 802DCCFC 0000 cn Multiplayer\Player 1\Main Weapon 802D85EB ???? 0000:"Nothing",0001:"Normal Tank Shells",0002:"Motor Tank Shells",0003:"Big Tank Shells",0004:"Rockets",0005:"Laser",0006:"Nuke",0007:"Gernades",0008:"?",0009:"?",000A:"Nuclear Lasers",000B:"Remote Rockets",000C:"Mines",000D:"Gun Buddies",000E:"Smoke Screen",000F:"Cloaking",0010:"Health" cn Multiplayer\Player 2\Main Weapon 802D9F13 ???? 0000:"Nothing",0001:"Normal Tank Shells",0002:"Motor Tank Shells",0003:"Big Tank Shells",0004:"Rockets",0005:"Laser",0006:"Nuke",0007:"Gernades",0008:"?",0009:"?",000A:"Nuclear Lasers",000B:"Remote Rockets",000C:"Mines",000D:"Gun Buddies",000E:"Smoke Screen",000F:"Cloaking",0010:"Health" cn Multiplayer\Player 1\Secondary Weapon 802D85F7 ???? 0000:"Nothing",0001:"Normal Tank Shells",0002:"Motor Tank Shells",0003:"Big Tank Shells",0004:"Rockets",0005:"Laser",0006:"Nuke",0007:"Gernades",0008:"?",0009:"?",000A:"Nuclear Lasers",000B:"Remote Rockets",000C:"Mines",000D:"Gun Buddies",000E:"Smoke Screen",000F:"Cloaking",0010:"Health" cn Multiplayer\Player 2\Secondary Weapon 802D9F1F ???? 0000:"Nothing",0001:"Normal Tank Shells",0002:"Motor Tank Shells",0003:"Big Tank Shells",0004:"Rockets",0005:"Laser",0006:"Nuke",0007:"Gernades",0008:"?",0009:"?",000A:"Nuclear Lasers",000B:"Remote Rockets",000C:"Mines",000D:"Gun Buddies",000E:"Smoke Screen",000F:"Cloaking",0010:"Health" cn Multiplayer\Player 1\Tank Body Modifier 802D819B ???? 0000:"Normal Tank",0001:"Motor Tank",0002:"Big Tank" cn Multiplayer\Player 2\Tank Body Modifier 802D9AC3 ???? 0000:"Normal Tank",0001:"Motor Tank",0002:"Big Tank" cn Multiplayer\Player 1\Goalith Tank On Tracks Body Modifier 802D86A3 ???? 0000:"Normal Tank",0001:"Motor Tank",0002:"Big Tank" cn Multiplayer\Player 2\Goalith Tank On Tracks Body Modifier 802D9FCB ???? 0000:"Normal Tank",0001:"Motor Tank",0002:"Big Tank" crc 75A4E247-6008963D-C:45 gn BattleTanx - Global Assault (U) cn Rapid Fire 8008E7F0 0001 cn Edge Hits Everything 80071AF0 0043 cn Mini-Tanks 1 80125AB8 0001 cn Mini-Tanks 2 80125AB9 0001 cn Mini-Tanks 3 80125AB9 0001 cn Mini-Tanks 4 80125ABB 0001 cn Mini-Tanks 5 80125ABC 0001 cn Infinite Tank Bucks 80236A9F 0064 cn Level Select 80117F49 0001 cn Invulnerability 80125AB0 0001 cn Start With All Weapons 80125AB1 0001 cn Secret Level 80125AB2 0001 cn Enable Models 80125AB3 0001 cn Cassandra Gang 80125AB5 0001 cn Brandon Gang 80125AB6 0001 crc 55D4C4CE-7753C78A-C:45 gn Battlezone - Rise of the Black Dogs (U) cn Infinite\Weapons 811DF6EA 04B0 cn Infinite\Ship Health 811DF6DE 0BA9 cn Infinite\Shots For Sniper Rifle 811DA682 0003 cn Have\All\Levels Unlocked & Completed For Americans 8006A1F0 0011 cn Have\All\Levels Unlocked & Completed For Soviets 8006A1F1 0008 cn Have\All\Levels Unlocked & Completed For Black Dogs 8006A1F3 000A cn Have\All\Missions Open And Complete For Americans 8006A1EC 0011 cn Have\All\Missions Open And Complete For Soviets 8006A1ED 0008 cn Have\All\Missions Open And Complete For Black Dogs 8006A1EF 000A cn Infinite\Scrap Collected 811FBCC6 FFFF cn Max\Scrap Limit 811FBCCA FFFF cn Infinite\Pilots 811FBCCE FFFF cn Max\Pilot Limits 811FBCD2 FFFF cn Infinite\Armor 8006A1C2 0001 cn Infinite\Ammo 8006A1C1 0001 cn Level Select 8006A1F5 0001 cn Add\Building 8006A1C0 0001 cn Add\Satellite 8006A1C3 0001 crc 4D79D316-E8501B33-C:45 gn Beast Wars Transmetal (U) cn Infinite\Health\Player 1 8112CD46 270F cn Infinite\Stun Meter\Player 1 8012CD49 00FF cn Infinite\Health\Player 2 8114D2C6 270F cn Infinite\Stun Meter\Player 2 8014D2C9 00FF cn Play As\Player 1 801BE2A4 ???? 0000:"Optimus Primal",0001:"Rattrap",0002:"Cheetor",0003:"Airazor",0004:"Megatron",0005:"Tarantulas",0006:"Waspinator",0007:"Terrorsaur" cn Play As\Player 2 801BE2A5 ???? 0000:"Optimus Primal",0001:"Rattrap",0002:"Cheetor",0003:"Airazor",0004:"Megatron",0005:"Tarantulas",0006:"Waspinator",0007:"Terrorsaur" cn Choose Stage\VS. Mode 800ED6CF ???? 0000:"Stage 1",0001:"Stage 2",0002:"Stage 3",0003:"Stage 4",0004:"Stage 5",0005:"Stage 6",0006:"Stage 7",0007:"Stage 8 (Hidden Stage)",0008:"Stage 9 (Hidden Stage)",0009:"Stage A (Hidden Stage)" cn Infinite\Time 80102A94 000A cn Bonus Menu Games\Infinite Time\Escape Race 100 & 200\Player 1 811BD3B6 000A cn Bonus Menu Games\Infinite Time\Escape Race 100 & 200\Player 2 811BD3BA 000A cn Bonus Menu Games\Max\Wins\Sunset & Sunrise Showdown\Player 1 801BC25F 00FF cn Bonus Menu Games\Max\Points\Disc Hunter\Player 1 801BD3E9 00FF cn Bonus Menu Games\Max\Points\Disc Hunter\Player 2 801BD3EB 00FF crc EDF419A8-BF1904CC-C:45 gn Beetle Adventure Racing! (U) cn Have\All Cars 8002CFF7 000B cn Have\All Tracks 8002CFF3 0006 cn Low Timer 81025DD4 3F40 cn Open All Difficulties 8002CFFB 0003 cn Infinite Continues 8002CC57 0005 cn Always Place 1st 81025DD4 1110 81025DDC 3F40 cn Multi-Player Unlock All Levels 50000901 0000 8002D000 0001 crc 08FFA4B7-01F453B6-C:45 gn Big Mountain 2000 (U) cn Always 1st/Low Time 81350C02 0000 80350C17 0063 cn Infinite Stamina 8034F798 0012 cn Free Ride Complete\Stage 1-Skier 800B3578 0001 cn Slalom Complete\Stage 1-Skier 800B357C 0001 cn Giant Slalom Complete\Stage 1-Skier 800B3580 0001 cn Free Ride Complete\Stage 2-Skier 800B3584 0001 cn Slalom Complete\Stage 2-Skier 800B3588 0001 cn Giant Slalom Complete\Stage 2-Skier 800B358C 0001 cn Free Ride Complete\Stage 3-Skier 800B3590 0001 cn Slalom Complete\Stage 3-Skier 800B3594 0001 cn Giant Slalom Complete\Stage 3-Skier 800B3598 0001 cn Free Ride Complete\Stage 4-Skier 800B359C 0001 cn Slalom Complete\Stage 4-Skier 800B35A0 0001 cn Giant Slalom Complete\Stage 4-Skier 800B35A4 0001 cn Free Ride Complete\Stage 1-Boarder 800B357A 0001 cn Slalom Complete\Stage 1-Boarder 800B357E 0001 cn Giant Slalom Complete\Stage 1-Boarder 800B3582 0001 cn Free Ride Complete\Stage 2-Boarder 800B3586 0001 cn Slalom Complete\Stage 2-Boarder 800B358A 0001 cn Giant Slalom Complete\Stage 2-Boarder 800B358E 0001 cn Free Ride Complete\Stage 3-Boarder 800B3592 0001 cn Slalom Complete\Stage 3-Boarder 800B3596 0001 cn Giant Slalom Complete\Stage 3-Boarder 800B359A 0001 cn Free Ride Complete\Stage 4-Boarder 800B359E 0001 cn Slalom Complete\Stage 4-Boarder 800B35A2 0001 cn Giant Slalom Complete\Stage 4-Boarder 800B35A6 0001 cn All Boards Complete 50001802 0000 810B3578 0001 crc 08123595-0510F1DE-C:45 gn Bio F.R.E.A.K.S. (U) cn Never Wins\Player 1 8015029B 0000 cn Needs 1 Match to Win\Player 1 D015029B 0000 8015029B 0001 cn Infinite Health\Player 1 811502AA 6400 cn 1-Hit Death\Player 1 D01502AA 0064 811502AA 0100 cn Infinite Shield\Player 1 811502AE 6400 cn Infinite Jetpack\Player 1 811502B2 3200 cn Play As\Player 1 801ABB2B ???? 000A:"She-Freak",000B:"PainMaster",000C:"Mutilator",000D:"ChainSaw" cn Never Wins\Player 2 80152917 0000 cn Needs 1 Match to Win\Player 2 D0152917 0000 80152917 0001 cn Infinite Health\Player 2 811502AA 6400 cn 1-Hit Death\Player 2 D0152926 0064 81152926 0100 cn Infinite Shield\Player 2 8115292A 6400 cn Infinite Jetpack\Player 2 8115292E 3200 crc 7C647C25-D9D901E6-C:45 gn Blast Corps (U) (V1.0) cn Infinite\Hydraulics Sidesweeper 803EDB51 0063 cn Infinite\Missiles Motor Bike 803F8AC3 0063 cn Infinite\Boosts Buggy Vehicle 803EE301 0064 cn Ballista Can Drive Through Anything 803F8A68 0001 cn Found All\RDUS 8036E9CC C350 cn Found All\Survivors 8036E9C9 00FF cn Found All\Scientists 80364AD0 003F cn Infinite Time D0315610 0000 81315610 0000 D0315612 0001 81315612 0000 crc 7C647E65-1948D305-C:45 gn Blast Corps (U) (V1.1) cn Infinite\Hydraulics Sidesweeper 803EDC00 0063 cn Infinite\Missiles Motor Bike 803F8B72 0063 cn Infinite\Boosts Buggy Vehicle 803EE3B0 0064 cn Ballista Can Drive Through Anything 803F8B17 0001 cn Found All\RDUS 8036EA7C C350 cn Found All\Survivors 8036EA70 00FF cn Found All\Scientists 80364B80 003F cn Infinite Time D03156C0 0000 813156C0 0000 D03156C2 0001 813156C2 0000 crc 7CD08B12-1153FF89-C:45 gn Blues Brothers 2000 (U) cn Have All\Keys cd This will give you the Grey & Red,Green & Gold Keys 800BD0B8 00FF 800BD0BE 00FF 800BD0BD 00FF cn Have All\Music Notes cd This will give you all 10 Music Notes 50000A01 0000 800BD1F0 0001 cn Infinite\Lives 800BD0E3 0009 cn Infinite\Health 800BD0F7 0002 cn Press L to Levitate cd Press L to levitate & let go to come back down D017DBC5 0020 810DAFD8 44CB cn Max Money 810BD0E6 03E7 cn Can Walk When The Game Is Paused 810AB9B6 0001 crc 5326696F-FE9A99C3-C:45 gn Body Harvest (U) cn Infinite\Greece 81052B18 0098 81052B1A 967F cn Infinite\Health 810DDCEC 0258 cn No Humans Killed 8104816A 0000 cn Have Alien Artifact 8004DC5F 0001 cn Item Modifier 8004DC4F ???? 0000:"Nothing",0002:"Howitzer Shells",0040:"Crank",0080:"Windmill Cog",0100:"Heirglyph Map Piece",0400:"Hangar Key",FFFF:"All Items" cn Weapon Select\1st Position 80048138 ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\2nd Position 80048139 ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\3rd Position 8004813A ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\4th Position 8004813B ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\5th Position 8004813C ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\6th Position 8004813D ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\7th Position 8004813E ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\8th Position 8004813F ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Infinite Ammo All Weapons 50001102 0000 81048146 8000 cn Level Select 80047F93 ???? 0001:"Greece",0002:"Java",0003:"America",0004:"Siberia",0005:"Comet" cn Press L To Wall Over Water, Climb Hills D00475D9 0020 8104DCD2 0808 crc F568D51E-7E49BA1E-C:45 gn Bomberman 64 (U) cn Invincible\Player 1 800AEE01 0001 cn Have\Pumped up Red Remote Bombs 802AC653 0004 cn Infinite\Lives 802AC627 0063 cn Infinite\Gems 802AC62F 0063 cn Infinite\Credits 802AC62B 0009 cn Infinite\Time 802AC643 0001 cn Carry 20 Bombs At A Time 800AEE0F 0014 cn Infinite\Energy\Player 1 800AEE07 0002 cn Infinite\Energy\Player 2 800AEECF 0002 cn Infinite\Energy\Player 3 800AEF97 0002 cn Infinite\Energy\Player 4 800AF05F 0002 crc 237E73B4-D63B6B37-C:45 gn Bomberman 64 - The Second Attack! (U) cn Infinite\Money 810ABD52 FFFF cn Infinite\Bombs 800AD758 0003 cn Have\Max Fire Level 800AD733 0003 cn Infinite\Health 800AD75F 0005 cn Infinite\Continue Time 810B5CD6 0090 cn Have\Fire Bombs 800AD73B 0003 cn Have\Kick Bombs Anytime 800AC743 0003 cn Flashing Invincible cd This cheat Makes you Flash But you cant be harmed,Once out of danger Turn the cheat off to stop the flashing.also do not put this on if you have already been hurt or you will stay on the floor. 800AD767 000A crc 4446FDD6-E3788208-C:45 gn Bomberman Hero (U) cn Full\Bomb Power 8016523F 0003 cn Full\Fire Power 80165240 0003 cn Infinite\Health 80165244 0004 cn Infinite\Lives 80165243 0009 cn Extra Gems D0165241 0000 80165241 004B cn Max\Bombs 8016523F 0008 cn Press L to Levitate cd Press L to levitate & let go to come back down D005A455 0020 81154178 41CB D005A455 0020 D0154154 0000 80154154 0040 cn Max\Score 80177608 FFFF cn Max\Explosion 80165240 0008 crc 85AE781A-C756F05D-C:45 gn Buck Bumble (U) cn Have All\Guns & Infinite Ammo cd Press C Left to receive all Guns 810FFF8A 0001 50000B04 0000 810E92E6 03E8 cn Infinite\Health cd If you fall into Water just turn off the Infinite Health & put back on after. 810E92D8 42D8 cn Infinite\99 Lives 810E9650 0005 cn Have All\Keys 810E92E0 0101 800E92E2 0001 cn Max Bonus 810E964A 270F cn Level Select 810FFF92 ???? 0001:"Mission 1 Shock Strike",0002:"Mission 2 Radar Run",0003:"Mission 3 Return Fire",0004:"Mission 4 The Sonar Tower",0005:"Mission 5 Big Blips",0006:"Mission 6 Short Fuse",0007:"Mission 7 Outpost",0008:"Mission 8 Sewer",0009:"Mission 9 Clean Up",000A:"Mission 10 Scramble Pylon",000B:"Mission 11 Herding Research",000C:"Mission 12 The Extractor",000D:"Mission 13 Nuke Tower",000E:"Mission 14 Mucus Storage",000F:"Mission 15 Depot Attack",0010:"Boss Mission Destroy Carrier Level",0011:"Mission 16 Sterilization",0012:"Mission 17 Scorpion Killer",0013:"Mission 18 Core Nuke",0014:"Mission 19 Gate Keeper",0015:"Queen Mission" crc 4222D89F-AFE0B637-C:45 gn Bust A Move '99 (U) cn Ceiling Never Drops\Player 1 810ECDEE 0000 cn Ceiling Never Drops\Player 2 810ECEDE 0000 cn Ceiling Never Drops\Player 3 81158846 0000 cn Ceiling Never Drops\Player 4 81158974 0000 cn Infinite Time To Set Pieces\Player 1 810ECE2C 0000 cn Infinite Time To Set Pieces\Player 2 810ECF1C 0000 cn Infinite Time To Set Pieces\Player 3 81158884 0000 cn Infinite Time To Set Pieces\Player 4 81158936 0000 cn Always Gets Bubbles\Player 1 800ECE59 0007 cn Never Gets Bubbles\Player 1 800ECE59 0000 cn Always Gets Bubbles\Player 2 800ECF49 0007 cn Never Gets Bubbles\Player 2 800ECF49 0000 cn Always Gets Bubbles\Player 3 801588B1 0007 cn Never Gets Bubbles\Player 3 801588B1 0000 cn Always Gets Bubbles\Player 4 801589A1 0007 cn Never Gets Bubbles\Player 4 801589A1 0000 crc 8A86F073-CD45E54B-C:45 gn Bust-A-Move 2 - Arcade Edition (U) cn Infinite Credits 80120171 0005 cn Player 1\Always Gets Bubbles 80171131 0006 cn Player 1\Never Gets Bubbles 80171131 0000 cn Computer\Always Gets Bubbles 80173601 0006 cn Computer\Never Gets Bubbles 80173601 0000 cn Player 1\Infinite Time To Set Pieces 8117AAFC 0000 cn Player 1\Screen Never Fills Over Time 80171125 000A crc AC16400E-CF5D071A-C:45 gn California Speed (U) cn Always Place 1st 80151C01 0000 cn Have All\Tracks 81168F8C FFFF cn Have All\Cars 50001504 0000 800AAE5B 0001 crc F35D5F95-8AFE3D69-C:45 gn Castlevania (U) (V1.0) cn Infinite\Health 81389C3E 0064 cn Infinite\Throwing Weapon 81389C48 0064 cn Throwing Weapon Modifier 81389C42 ???? 0000:"Nothing",0001:"Knives",0002:"Exploding Potions",0003:"Cross",0004:"Axes" cn Press L To Levitate D0387D7F 0020 81350810 3FCB cn Have\All Items 50000501 0000 80389C4A 0001 50000301 0000 80389C51 0001 80389C5A 0001 80389C5B 0001 80389C5D 0001 50000E01 0000 80389C60 0001 cn Have\Invincibility 80342BFE 000B cn Infinite\Red Jewels 80389C49 0063 cn Status 80389C88 ???? 0001:"Good",0008:"Vamp",0011:"Poison",0022:"Good but depressed",0066:"Sto",001F:"V+P" cn Open All Doors and Gates,No Bosses 50002A02 0000 81389BD0 FFFF cn Infinite\Energy 80389C3F 0064 cn Infinite\Funds 80389C45 0001 81389C46 869F cn Have\Exp Points 80389C49 0063 cn Max Power Up 80389CED 0002 cn Never Get Poisoned 81389C88 0000 cn Level Select cd You must use this code on a saved game, because the intro to the first level will mess up the game. Now select the saved game, and hold down the GS button until the level loads. Some of the boss stages will not let you fight the boss unless you re-enter the area. Also, with the part of stage modifier, the second code modifies the part of the level that you are in, and 0000 is the level's start. 89389C90 ???? 0000:"Forest of Silence",0002:"Castle Wall",0003:"Villa",0004:"Inside Villa",0006:"Garden Maze",0007:"Tunnel",0008:"Underground Waterway",0009:"Castle Center",0010:"Tower of Execution",0011:"- Tower of Sorcery",0012:"- Tower of Science",0013:"- Duel Tower",0014:"- Fight With Death/Actrise",0015:"- Castle Keep",0016:"- Intro (Glitch)",0017:"- Clock Tower",0018:"- Final Dracula",001A:"- Fight With Maze Boss",001B:"- Room of Clocks",001C:"- ??",001D:"- ??" 89389C92 0000 cn Switch From cd This Switch From Cheat lets you switch characters on a saved game For example, if you are Reindhart and you want to be Carrie in the middle of your game save it and then enable this Cheat and press F1. when you start your saved game back up you'll be Carrie instead of Reindhart. 80389C3D ???? 0000:"Carrie to Reindhart",0001:"Reindhart to Carrie" crc 4BCDFF47-AAA3AF8F-C:45 gn Castlevania (U) (V1.1) cn Infinite\Health 81389C3E 0064 cn Infinite\Throwing Weapon 81389C48 0064 cn Throwing Weapon Modifier 81389C42 ???? 0000:"Nothing",0001:"Knives",0002:"Exploding Potions",0003:"Cross",0004:"Axes" cn Press L To Levitate D0387D7F 0020 81350810 3FCB cn Have\All Items 50000501 0000 80389C4A 0001 50000301 0000 80389C51 0001 80389C5A 0001 80389C5B 0001 80389C5D 0001 50000E01 0000 80389C60 0001 cn Have\Invincibility 80342BFE 000B cn Infinite\Red Jewels 80389C49 0063 cn Status 80389C88 ???? 0001:"Good",0008:"Vamp",0011:"Poison",0022:"Good but depressed",0066:"Sto",001F:"V+P" cn Open All Doors and Gates,No Bosses 50002A02 0000 81389BD0 FFFF cn Infinite\Energy 80389C3F 0064 cn Infinite\Funds 80389C45 0001 81389C46 869F cn Have\Exp Points 80389C49 0063 cn Max Power Up 80389CED 0002 cn Never Get Poisoned 81389C88 0000 cn Level Select cd You must use this code on a saved game, because the intro to the first level will mess up the game. Now select the saved game, and hold down the GS button until the level loads. Some of the boss stages will not let you fight the boss unless you re-enter the area. Also, with the part of stage modifier, the second code modifies the part of the level that you are in, and 0000 is the level's start. 89389C90 ???? 0000:"Forest of Silence",0002:"Castle Wall",0003:"Villa",0004:"Inside Villa",0006:"Garden Maze",0007:"Tunnel",0008:"Underground Waterway",0009:"Castle Center",0010:"Tower of Execution",0011:"- Tower of Sorcery",0012:"- Tower of Science",0013:"- Duel Tower",0014:"- Fight With Death/Actrise",0015:"- Castle Keep",0016:"- Intro (Glitch)",0017:"- Clock Tower",0018:"- Final Dracula",001A:"- Fight With Maze Boss",001B:"- Room of Clocks",001C:"- ??",001D:"- ??" 89389C92 0000 cn Switch From cd This Switch From Cheat lets you switch characters on a saved game For example, if you are Reindhart and you want to be Carrie in the middle of your game save it and then enable this Cheat and press F1. when you start your saved game back up you'll be Carrie instead of Reindhart. 80389C3D ???? 0000:"Carrie to Reindhart",0001:"Reindhart to Carrie" crc 1CC06338-87388926-C:45 gn Castlevania - Legacy of Darkness (U) cn Infinite\Keys\Clocktower A 801CAB6F 000A cn Infinite\Keys\Clocktower B 801CAB70 000A cn Infinite\Keys\Storeroom 801CAB60 000A cn Infinite\Keys\Garden 801CAB61 000A cn Infinite\Keys\Copper 801CAB62 000A cn Infinite\Keys\Chamber 801CAB63 000A cn Infinite\Keys\Execution 801CAB64 000A cn Infinite\Keys\Deck 801CAB65 000A cn Infinite\Keys\Rose Garden 801CAB66 000A cn Infinite\Keys\Thorn 801CAB67 000A cn Infinite\Keys\Clocktower C 801CAB68 000A cn Infinite\Keys\Clocktower D 801CAB69 000A cn Infinite\Keys\Art Tower 1 801CAB6A 000A cn Infinite\Keys\Art Tower 2 801CAB6B 000A cn Infinite\Keys\Control Room 801CAB6C 000A cn Infinite\Keys\Wall 801CAB6D 000A cn Infinite\Keys\Clocktower E 801CAB6E 000A cn Infinite\Keys\Archives 801CAB5E 000A cn Infinite\Keys\Left Tower 801CAB5F 000A cn Infinite\Health 811CAB3A 2710 cn Infinite\Gold 811CAB42 2710 cn Infinite\Specials\Special 1 801CAB47 000A cn Infinite\Specials\Special 2 801CAB48 000A cn Infinite\Specials\Special 3 801CAB49 000A cn Infinite\Items\Roast Chicken 801CAB4A 000A cn Infinite\Items\Roast Beef 801CAB4B 000A cn Infinite\Items\Healing Kit 801CAB4C 000A cn Infinite\Items\Purifying 801CAB4D 000A cn Infinite\Items\Cure Ampoule 801CAB4E 000A cn Infinite\Items\Powerup 801CAB4F 000A cn Infinite\Items\The Contract 801CAB54 000A cn Infinite\Items\Magical Nitro 801CAB55 000A cn Infinite\Items\Mandragora 801CAB56 000A cn Infinite\Items\Sun Card 801CAB57 000A cn Infinite\Items\Moon Card 801CAB58 000A cn Infinite\Items\Winch Lever 801CAB59 000A cn Infinite\Items\Oldrey's Diary 801CAB5A 000A cn Infinite\Items\Crest Half A 801CAB5B 000A cn Infinite\Items\Crest Half B 801CAB5C 000A cn Infinite\Items\Rose Brooch 801CAB5D 000A cn Infinite\Items\Throwing Weapons 801CAB45 0064 cn Infinite\Items\Red Jewels 801CAB45 0068 cn Infinite\Bullets cd For Henry 801D3DA3 0006 cn Wolfman Can Use Weapons cd For Cornell 801CAB37 0002 cn Wolfman Can't Use Weapons cd For Cornell (Default) 801CAB37 0004 cn Rapid Fire Gun (Henry-Hold B) cd For Henry, Hold B D11C87F6 0040 801D3DA3 0006 cn Max Powerups 801CAE23 0002 cn Stop Timer Input 811CAB22 0001 cn Hard Mode Selected In A New Game cd With this code, you will not see the hard level status until you save and restart the game file. No special items are required to access this feature with this code turned on. 8032495F 0002 cn Weapon Modifier 811CAB3E ???? 0000:"Nothing",0001:"Knife",0002:"Potion",0003:"Cross",0004:"Axe" cn Level Modifier 801CAE79 ???? 0000:"Forest Of Silence",0001:"Left Tower",0002:"Castle Wall",0003:"Villa",0004:"Villa",0005:"Villa",0006:"Villa",001A:"Villa",0007:"Tunnel",0008:"Underground Waterway",0009:"Castle Center",000A:"Castle Center",000B:"Castle Center",000C:"Castle Center",000D:"Castle Center",000E:"Castle Center",000F:"Castle Center",0010:"Foggy Lake",0011:"Foggy Lake",0012:"Foggy Lake",0013:"Cave Of Spiderwomen",0014:"Castle Keep",0015:"Castle Keep",0016:"Falls Into Space(?)",0017:"Clock Tower",0018:"Final Battle Site",0019:"Castle Center",001B:"Room Of Clocks",001C:"Countryside Where Carrie's Mom Is Buried.(Fall Through Ground)",002B:"Countryside Where Carrie's Mom Is Buried.(Fall Through Ground)",001D:"Tower Of Sorcery",001E:"Tower Of Execution",001F:"Tower Of Execution",0020:"Tower Of Execution",0021:"Tower Of Science",0022:"Tower Of Science",0023:"Tower Of Ruins",0024:"Tower Of Ruins",0025:"Art Tower",0026:"Art Tower",0027:"Dual Tower",0028:"Clock Tower",0029:"Clock Tower",002A:"Outer Wall",002C:"Fall From Sky Ouside Of Castlevania Opening",002D:"Another Free Fall. Forest Where Girl Runs In Opening",002E:"Black Room(?)" cn Inter-Level Modifier 801CAE7B ???? 0000:"Forest Of Silence",0001:"Left Tower",0002:"Castle Wall",0003:"Villa",0004:"Villa",0005:"Villa",0006:"Villa",001A:"Villa",0007:"Tunnel",0008:"Underground Waterway",0009:"Castle Center",000A:"Castle Center",000B:"Castle Center",000C:"Castle Center",000D:"Castle Center",000E:"Castle Center",000F:"Castle Center",0010:"Foggy Lake",0011:"Foggy Lake",0012:"Foggy Lake",0013:"Cave Of Spiderwomen",0014:"Castle Keep",0015:"Castle Keep",0016:"Falls Into Space(?)",0017:"Clock Tower",0018:"Final Battle Site",0019:"Castle Center",001B:"Room Of Clocks",001C:"Countryside Where Carrie's Mom Is Buried.(Fall Through Ground)",002B:"Countryside Where Carrie's Mom Is Buried.(Fall Through Ground)",001D:"Tower Of Sorcery",001E:"Tower Of Execution",001F:"Tower Of Execution",0020:"Tower Of Execution",0021:"Tower Of Science",0022:"Tower Of Science",0023:"Tower Of Ruins",0024:"Tower Of Ruins",0025:"Art Tower",0026:"Art Tower",0027:"Dual Tower",0028:"Clock Tower",0029:"Clock Tower",002A:"Outer Wall",002C:"Fall From Sky Ouside Of Castlevania Opening",002D:"Another Free Fall. Forest Where Girl Runs In Opening",002E:"Black Room(?)" cn Cut Scene Modifier cd With this code, you must use the appropiate level mod before you attemp to run these cut scenes. Not doing so will ruin the cut scene as the graphics will be glitched. 801CAE93 0009 801CAE8B ???? 0003:"Castle Drawbridge Lowers",0004:"Character Enters Castle",0005:"(?)",000A:"(?)",000C:"(?)",0020:"(?)",0021:"(?)",0022:"(?)",0006:"Vampire In Main Entrance Hall Of Villa",0007:"One Of The Working Gears Cut Scenes",0008:"\"I Smell Poison\" From Underground Waterway",0009:"Castle Gate Closes In Villa Upon Entering Villa",000B:"Renon Appears For First Time",000D:"Village Vampire In Upstairs Villa",000E:"Malus Appears For The First Time",000F:"Malus Leaves Garden",0010:"Character In Boat On Foggy Lake",0011:"Seal Removed From Wall In Arena",0012:"Bleeding Statue",0013:"Cosmic Lights",0014:"Explosion At Wall In Arena",0015:"Explosion At Wall In Castle That Leads To Hidden Room",0016:"Malus Appears Again In Upstairs Room Of Castle",0017:"Bull Awakens",0018:"Vincent The Vampire",0019:"One Of The Working Gears Cut Scenes",001A:"Gate Opens In Forest Of Silence",001B:"Meet Renon For The Last Time In Castle Keep.",001C:"This Cut Scene Runs Cut Scene 27 And 2E",001E:"Castle Keep Destructs",001F:"Malus On Flying Horse Outside Castle Keep",0024:"Spider People In Tunnel",0025:"Rosa In Garden",0027:"Castel Destruction",0028:"Space Warp",0029:"Castle Destruction",002A:"Malus Is Saved By Reinhardt",002B:"Malus And Reinhardt On Horse",002E:"Rosa Returns",0030:"Ada, Henry And Cornell At Game End",0031:"Scrolling Text About Castle And Henry",0033:"Vampire In Basement",0034:"Vampire In Villa Basement Destroyed, Woman Vampire Rises",0035:"Finds Hidden Path In Villa Basement",0037:"Lever & Gear In Castle",0038:"Harpie",0039:"Harpie Destroyed",0044:"Death(Grim Reaper)",0045:"Death Is Destroyed",0046:"Castle Drawbridge Closes And Ortega Appears",0047:"Thirsty Man",0048:"Cornell Meets Henry In Garden",0049:"Cornell And Henry Part In Garden",0051:"Monster Dracula Appears",0052:"Actrise Appears In Castle Center",0054:"Actrise Appears Again With Cousin Fernandes Before Fight With Carrie",0055:"Cousin Fernandes Is Destroyed",0056:"Actrise Appears Again Before Fight With Carrie",0057:"Actrise Defeated By Carrie" cn Enable Characters All Charactors 8031B243 0004 cn Character Modifier 8031B22B ???? 0000:"Cornell",0001:"Reinhardt",0002:"Carrie",0003:"Henry" cn Status Modifier 801CAB84 ???? 0000:"Never Get Poisoned or Vamped",0001:"Normal",0004:"Vamp",0008:"Poison",000C:"Vamped & Poisoned",00FF:"Instant Death" cn Max Weapon Power-Up 801CAE27 0002 cn Day Modifier For Adult Henry 801CAB1F ???? 0000:"7 Days",0001:"6 Days",0002:"5 Days",0003:"4 Days",0004:"3 Days",0005:"2 Days",0006:"1 Day",0007:"0 Days" cn Infinite\Health Young Henry D11C87F6 0010 813A5360 2800 crc 6420535A-50028062-C:45 gn Chameleon Twist (U) cn Access All Levels 8020850E 00FF 80208510 00FF cn Extra Crowns 80251767 0015 cn Infinite Health 80174CF3 000A cn Extended Tongue 8133176E FFFF cn Level Select 8029087B ???? 0000:"Stage 1",0001:"Stage 2",0002:"Stage 3",0003:"Stage 4",0004:"Stage 5",0005:"Stage 6",0006:"Stage 7" crc CD538CE4-618AFCF9-C:45 gn Chameleon Twist 2 (U) cn Infinite Health 8018BA7D 000F cn Max Collectable Items 80164501 0014 cn Have 6 Carrots 80164519 007E cn Have All\Levels 80164508 003F cn Have All\Costumes 8016451A 00FE cn Have All\Collectibles\Stage 1 80164510 0014 cn Have All\Collectibles\Stage 2 80164511 0014 cn Have All\Collectibles\Stage 3 80164512 0014 cn Have All\Collectibles\Stage 4 80164513 0014 cn Have All\Collectibles\Stage 5 80164514 0014 cn Have All\Collectibles\Stage 6 80164515 0014 cn Press L To levitate cd Press L To Levitate & Let go to land D018BAB5 0020 8118B9E0 4200 crc 1E0E96E8-4E28826B-C:45 gn Charlie Blast's Territory (U) cn Stop Timer From Counting Down (All Levels) 8101D4FC 2400 crc 214CAD94-BE1A3B24-C:45 gn Chopper Attack (U) cn Max Score 81129426 FFFF cn Infinite Weapon\1st Position 8012943B 0063 cn Infinite Weapon\2nd Position 8012943F 0063 cn Infinite Weapon\3rd Position 80129443 0063 cn Infinite Weapon\4th Position 80129447 0063 cn Infinite Weapon\5th Position 8012944B 0063 cn Weapon Modifier\Gun Weapon 80129723 ???? 0000:"No Weapon",0001:"Normal Shot",0002:"2-Way Shot",0003:"3-Way Shot",0004:"4-Way Shot" cn Gun 4-Way Shot 80129723 0004 cn Infinite Fuel 81129726 FFFF cn Infinite Shield 811296C8 03E8 cn Opens All 5 Item Slots 8012945B 0005 cn Weapon Modifier\1st Position cd Must to be used with the Infinite Weapon Codes & the open all 5 item slot code. 80129439 ???? 0000:"Nothing",0001:"AGM",0002:"AAM",0003:"AGAM",0004:"Dummy",0005:"Rocket",0006:"Cluster",0007:"H-Cluster",0008:"H-Plasma" cn Weapon Modifier\2nd Position cd Must to be used with the Infinite Weapon Codes & the open all 5 item slot code. 8012943D ???? 0000:"Nothing",0001:"AGM",0002:"AAM",0003:"AGAM",0004:"Dummy",0005:"Rocket",0006:"Cluster",0007:"H-Cluster",0008:"H-Plasma" cn Weapon Modifier\3rd Position cd Must to be used with the Infinite Weapon Codes & the open all 5 item slot code. 801294F1 ???? 0000:"Nothing",0001:"AGM",0002:"AAM",0003:"AGAM",0004:"Dummy",0005:"Rocket",0006:"Cluster",0007:"H-Cluster",0008:"H-Plasma" cn Weapon Modifier\4th Position cd Must to be used with the Infinite Weapon Codes & the open all 5 item slot code. 801294F5 ???? 0000:"Nothing",0001:"AGM",0002:"AAM",0003:"AGAM",0004:"Dummy",0005:"Rocket",0006:"Cluster",0007:"H-Cluster",0008:"H-Plasma" cn Weapon Modifier\5th Position cd Must to be used with the Infinite Weapon Codes & the open all 5 item slot code. 801294F9 ???? 0000:"Nothing",0001:"AGM",0002:"AAM",0003:"AGAM",0004:"Dummy",0005:"Rocket",0006:"Cluster",0007:"H-Cluster",0008:"H-Plasma" cn Score Attack Mode 81129472 0001 cn Stage Select On 81129476 0001 cn Option On 8112947A 0001 cn Clear Mission Selector 8112947C ???? 0001:"1",0002:"2",0003:"3",0004:"4",0005:"5",0006:"6",0007:"7",0008:"8" cn Texture Mode 81129484 0001 crc F03C24CA-C5237BCC-C:45 gn Clay Fighter 63 1-3 (U) cn Extra Characters/Secret Options 801A2B41 000F cn Stage Modifier 801A2B2B ???? 0000:"Candy Factory",0001:"Claynaveral Hangar",0002:"Camp Claynaveral",0003:"Outhouse",0004:"Mudville Mansion",0005:"Ghastly Graveyard",0006:"Spooky Spire",0007:"Happy Harry's Hut",0008:"Freezing Fortress",0009:"Refuse Room",000A:"Grotto Gulch",000B:"Rubbage Room",000C:"Rubbage Reef",000D:"Kiln's Laboratory",000E:"Kiln's Hideout",000F:"Fiery Furnace",0010:"Research Room",0011:"Clayribbean Cruise",0012:"Santa's Workship",0013:"Kooky Courtyard",0014:"Santa's Toy Factory",0015:"Boogerhenge",0016:"Backwash Bay",0017:"Tureen Toilet",0018:"Tribal Tower",0019:"Aquadome" cn Infinite Time To Choose Your Fighter 81200BEC 03A7 cn Player 1 Character Modifier 801A2B2F ???? 0001:"Blob",0002:"Bonker",0003:"Boogerman",0004:"Dr. Kiln",0005:"Earthworm Jim",0008:"Houngan",0009:"Icky Bod Clay",000A:"Kung Pow",000D:"Sumo Santa",000E:"Taffy",000F:"T-Hoppy" cn Refuse Room, Grotto Gulch, Santa's Worshop\Player 1\Cant be Stunned 801F1B0B 0000 cn Refuse Room, Grotto Gulch, Santa's Worshop\Player 1\Infinite Energy 801F1B13 00AA cn Refuse Room, Grotto Gulch, Santa's Worshop\Player 1\No Energy 801F1B13 0000 cn Refuse Room, Grotto Gulch, Santa's Worshop\Player 1\Full Super Bar 811F1B1A 0200 cn Refuse Room, Grotto Gulch, Santa's Worshop\Player 2\Cant be Stunned 801F4FAB 0000 cn Refuse Room, Grotto Gulch, Santa's Worshop\Player 2\Infinite Energy 801F4FB3 00AA cn Refuse Room, Grotto Gulch, Santa's Worshop\Player 2\No Energy 801F4FB3 0000 cn Refuse Room, Grotto Gulch, Santa's Worshop\Player 2\Full Super Bar 811F4FBA 0200 cn Tribal Tower\Player 1\Cant be Stunned 801F1BAB 0000 cn Tribal Tower\Player 1\Infinite Energy 801F1BB3 00AA cn Tribal Tower\Player 1\No Energy 801F1BB3 0000 cn Tribal Tower\Player 1\Full Super Bar 811F1BBA 0200 cn Tribal Tower\Player 2\Cant be Stunned 801F504B 0000 cn Tribal Tower\Player 2\Infinite Energy 801F5053 00AA cn Tribal Tower\Player 2\No Energy 801F5053 0000 cn Tribal Tower\Player 2\Full Super Bar 811F505A 0200 cn Aquadome\Player 1\Cant be Stunned 801F1E3B 0000 cn Aquadome\Player 1\Infinite Energy 801F1E33 00AA cn Aquadome\Player 1\No Energy 801F1E33 0000 cn Aquadome\Player 1\Full Super Bar 811F1E3A 0200 cn Aquadome\Player 2\Cant be Stunned 801F52CB 0000 cn Aquadome\Player 2\Infinite Energy 801F52D3 00AA cn Aquadome\Player 2\No Energy 801F52D3 0000 cn Aquadome\Player 2\Full Super Bar 811F52DA 0200 cn Outhouse,Claynaveral Hangar,Camp Claynaveral\Player 1\Cant be Stunned 801F233B 0000 cn Outhouse,Claynaveral Hangar,Camp Claynaveral\Player 1\Infinite Energy 801F2343 00AA cn Outhouse,Claynaveral Hangar,Camp Claynaveral\Player 1\No Energy 801F2343 0000 cn Outhouse,Claynaveral Hangar,Camp Claynaveral\Player 1\Full Super Bar 811F234A 0200 cn Outhouse,Claynaveral Hangar,Camp Claynaveral\Player 2\Cant be Stunned 801F57DB 0000 cn Outhouse,Claynaveral Hangar,Camp Claynaveral\Player 2\Infinite Energy 801F57E3 00AA cn Outhouse,Claynaveral Hangar,Camp Claynaveral\Player 2\No Energy 801F57E3 0000 cn Outhouse,Claynaveral Hangar,Camp Claynaveral\Player 2\Full Super Bar 811F57EA 0200 cn Freezing Fortress\Player 1\Cant be Stunned 801F239B 0000 cn Freezing Fortress\Player 1\Infinite Energy 801F23A3 00AA cn Freezing Fortress\Player 1\No Energy 801F23A3 0000 cn Freezing Fortress\Player 1\Full Super Bar 811F23AA 0200 cn Freezing Fortress\Player 2\Cant be Stunned 801F583B 0000 cn Freezing Fortress\Player 2\Infinite Energy 801F5843 00AA cn Freezing Fortress\Player 2\No Energy 801F5843 0000 cn Freezing Fortress\Player 2\Full Super Bar 811F584A 0200 cn Rubbage Reef\Player 1\Cant be Stunned 801F241B 0000 cn Rubbage Reef\Player 1\Infinite Energy 801F2423 00AA cn Rubbage Reef\Player 1\No Energy 801F2423 0000 cn Rubbage Reef\Player 1\Full Super Bar 811F242A 0200 cn Rubbage Reef\Player 2\Cant be Stunned 801F58BB 0000 cn Rubbage Reef\Player 2\Infinite Energy 801F58C3 00AA cn Rubbage Reef\Player 2\No Energy 801F58C3 0000 cn Rubbage Reef\Player 2\Full Super Bar 811F58CA 0200 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion\Player 1\Cant be Stunned 801F244B 0000 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion\Player 1\Infinite Energy 801F2453 00AA cn Happy Harry's Hut, Spooky Spire, Mudville Mansion\Player 1\No Energy 801F2453 0000 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion\Player 1\Full Super Bar 811F245A 0200 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion\Player 2\Cant be Stunned 801F58EB 0000 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion\Player 2\Infinite Energy 801F58F3 00AA cn Happy Harry's Hut, Spooky Spire, Mudville Mansion\Player 2\No Energy 801F58F3 0000 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion\Player 2\Full Super Bar 811F58FA 0200 cn Clayribbean Cruise\Player 1\Cant be Stunned 801F24FB 0000 cn Clayribbean Cruise\Player 1\Infinite Energy 801F2503 00AA cn Clayribbean Cruise\Player 1\No Energy 801F2503 0000 cn Clayribbean Cruise\Player 1\Full Super Bar 811F250A 0200 cn Clayribbean Cruise\Player 2\Cant be Stunned 801F599B 0000 cn Clayribbean Cruise\Player 2\Infinite Energy 801F59A3 00AA cn Clayribbean Cruise\Player 2\No Energy 801F59A3 0000 cn Clayribbean Cruise\Player 2\Full Super Bar 811F59AA 0200 cn Backwash Bay\Player 1\Cant be Stunned 801F258B 0000 cn Backwash Bay\Player 1\Infinite Energy 801F2593 00AA cn Backwash Bay\Player 1\No Energy 801F2593 0000 cn Backwash Bay\Player 1\Full Super Bar 811F259A 0200 cn Backwash Bay\Player 2\Cant be Stunned 801F5A2B 0000 cn Backwash Bay\Player 2\Infinite Energy 801F5A33 00AA cn Backwash Bay\Player 2\No Energy 801F5A33 0000 cn Backwash Bay\Player 2\Full Super Bar 811F5A3A 0200 cn Ghastly Graveyard\Player 1\Cant be Stunned 801F262B 0000 cn Ghastly Graveyard\Player 1\Infinite Energy 801F2633 00AA cn Ghastly Graveyard\Player 1\No Energy 801F2633 0000 cn Ghastly Graveyard\Player 1\Full Super Bar 811F263A 0200 cn Ghastly Graveyard\Player 2\Cant be Stunned 801F5ACB 0000 cn Ghastly Graveyard\Player 2\Infinite Energy 801F5AD3 00AA cn Ghastly Graveyard\Player 2\No Energy 801F5AD3 0000 cn Ghastly Graveyard\Player 2\Full Super Bar 811F5ADA 0200 cn Candy Factory\Player 1\Cant be Stunned 801F270B 0000 cn Candy Factory\Player 1\Infinite Energy 801F2713 00AA cn Candy Factory\Player 1\No Energy 801F2713 0000 cn Candy Factory\Player 1\Full Super Bar 811F271A 0200 cn Candy Factory\Player 2\Cant be Stunned 801F5BAB 0000 cn Candy Factory\Player 2\Infinite Energy 801F5BB3 00AA cn Candy Factory\Player 2\No Energy 801F5BB3 0000 cn Candy Factory\Player 2\Full Super Bar 811F5BBA 0200 cn Kooky Courtyard\Player 1\Cant be Stunned 801F280B 0000 cn Kooky Courtyard\Player 1\Infinite Energy 801F2813 00AA cn Kooky Courtyard\Player 1\No Energy 801F2813 0000 cn Kooky Courtyard\Player 1\Full Super Bar 811F281A 0200 cn Kooky Courtyard\Player 2\Cant be Stunned 801F5CAB 0000 cn Kooky Courtyard\Player 2\Infinite Energy 801F5CB3 00AA cn Kooky Courtyard\Player 2\No Energy 801F5CB3 0000 cn Kooky Courtyard\Player 2\Full Super Bar 811F5CBA 0200 cn Santa's Toy Factory\Player 1\Cant be Stunned 801F2C3B 0000 cn Santa's Toy Factory\Player 1\Infinite Energy 801F2C43 00AA cn Santa's Toy Factory\Player 1\No Energy 801F2C43 0000 cn Santa's Toy Factory\Player 1\Full Super Bar 811F2C4A 0200 cn Santa's Toy Factory\Player 2\Cant be Stunned 801F60DB 0000 cn Santa's Toy Factory\Player 2\Infinite Energy 801F60E3 00AA cn Santa's Toy Factory\Player 2\No Energy 801F60E3 0000 cn Santa's Toy Factory\Player 2\Full Super Bar 811F60EA 0200 cn Boogerhenge, Tureen Toilet\Player 1\Cant be Stunned 801F2FDB 0000 cn Boogerhenge, Tureen Toilet\Player 1\Infinite Energy 801F2FE3 00AA cn Boogerhenge, Tureen Toilet\Player 1\No Energy 801F2FE3 0000 cn Boogerhenge, Tureen Toilet\Player 1\Full Super Bar 811F2FEA 0200 cn Boogerhenge, Tureen Toilet\Player 2\Cant be Stunned 801F647B 0000 cn Boogerhenge, Tureen Toilet\Player 2\Infinite Energy 801F6483 00AA cn Boogerhenge, Tureen Toilet\Player 2\No Energy 801F6483 0000 cn Boogerhenge, Tureen Toilet\Player 2\Full Super Bar 811F648A 0200 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room\Player 1\Cant be Stunned 801F3BBB 0000 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room\Player 1\Infinite Energy 801F3BC3 00AA cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room\Player 1\No Energy 801F3BC3 0000 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room\Player 1\Full Super Bar 811F3BCA 0200 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room\Player 2\Cant be Stunned 801F705B 0000 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room\Player 2\Infinite Energy 801F7063 00AA cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room\Player 2\No Energy 801F7063 0000 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room\Player 2\Full Super Bar 811F706A 0200 cn Rubbage Room\Player 1\Cant be Stunned 801F464B 0000 cn Rubbage Room\Player 1\Infinite Energy 801F4653 00AA cn Rubbage Room\Player 1\No Energy 801F4653 0000 cn Rubbage Room\Player 1\Full Super Bar 811F465A 0200 cn Rubbage Room\Player 2\Cant be Stunned 801F7AEB 0000 cn Rubbage Room\Player 2\Infinite Energy 801F7AF3 00AA cn Rubbage Room\Player 2\No Energy 801F7AF3 0000 cn Rubbage Room\Player 2\Full Super Bar 811F7AFA 0200 crc FA5A3DFF-B4C9CDB9-C:45 gn Clay Fighter - Sculptor's Cut (U) cn Santa's Workshop, Refuse Room, Grotto Gulch\Player 1\Cant be Stunned 801939FF 0000 cn Santa's Workshop, Refuse Room, Grotto Gulch\Player 1\Infinite Health 80193A07 00AA cn Santa's Workshop, Refuse Room, Grotto Gulch\Player 1\No Health 80193A07 0000 cn Santa's Workshop, Refuse Room, Grotto Gulch\Player 1\Full Super Bar 81193A0E 0200 cn Santa's Workshop, Refuse Room, Grotto Gulch\Player 2\Cant be Stunned 80196EEF 0000 cn Santa's Workshop, Refuse Room, Grotto Gulch\Player 2\Infinite Health 80196EF7 00AA cn Santa's Workshop, Refuse Room, Grotto Gulch\Player 2\No Health 80196EF7 0000 cn Santa's Workshop, Refuse Room, Grotto Gulch\Player 2\Full Super Bar 81196EFE 0200 cn Tribal Tower\Player 1\Cant be Stunned 80193A9F 0000 cn Tribal Tower\Player 1\Infinite Health 80193AA7 00AA cn Tribal Tower\Player 1\No Health 80193AA7 0000 cn Tribal Tower\Player 1\Full Super Bar 81193AAE 0200 cn Tribal Tower\Player 2\Cant be Stunned 80196F8F 0000 cn Tribal Tower\Player 2\Infinite Health 80196F97 00AA cn Tribal Tower\Player 2\No Health 80196F97 0000 cn Tribal Tower\Player 2\Full Super Bar 81196F9E 0200 cn Aquadome\Player 1\Cant be Stunned 80193D1F 0000 cn Aquadome\Player 1\Infinite Health 80193D27 00AA cn Aquadome\Player 1\No Health 80193D27 0000 cn Aquadome\Player 1\Full Super Bar 81193D2E 0200 cn Aquadome\Player 2\Cant be Stunned 8019720F 0000 cn Aquadome\Player 2\Infinite Health 80197217 00AA cn Aquadome\Player 2\No Health 80197217 0000 cn Aquadome\Player 2\Full Super Bar 8119721E 0200 cn Clayribbean Cruise\Player 1\Cant be Stunned 80193F3F 0000 cn Clayribbean Cruise\Player 1\Infinite Health 80193F47 00AA cn Clayribbean Cruise\Player 1\No Health 80193F47 0000 cn Clayribbean Cruise\Player 1\Full Super Bar 81193F4E 0200 cn Clayribbean Cruise\Player 2\Cant be Stunned 8019742F 0000 cn Clayribbean Cruise\Player 2\Infinite Health 80197437 00AA cn Clayribbean Cruise\Player 2\No Health 80197437 0000 cn Clayribbean Cruise\Player 2\Full Super Bar 8119743E 0200 cn Camp Claynaveral, ClayNaveral Hangar, OutHouse\Player 1\Cant be Stunned 8019422F 0000 cn Camp Claynaveral, ClayNaveral Hangar, OutHouse\Player 1\Infinite Health 80194237 00AA cn Camp Claynaveral, ClayNaveral Hangar, OutHouse\Player 1\No Health 80194237 0000 cn Camp Claynaveral, ClayNaveral Hangar, OutHouse\Player 1\Full Super Bar 8119423E 0200 cn Camp Claynaveral, ClayNaveral Hangar, OutHouse\Player 2\Cant be Stunned 8019771F 0000 cn Camp Claynaveral, ClayNaveral Hangar, OutHouse\Player 2\Infinite Health 80197727 00AA cn Camp Claynaveral, ClayNaveral Hangar, OutHouse\Player 2\No Health 80197727 0000 cn Camp Claynaveral, ClayNaveral Hangar, OutHouse\Player 2\Full Super Bar 8119772E 0200 cn Freezing Fortress\Player 1\Cant be Stunned 8019428F 0000 cn Freezing Fortress\Player 1\Infinite Health 80194297 00AA cn Freezing Fortress\Player 1\No Health 80194297 0000 cn Freezing Fortress\Player 1\Full Super Bar 8119429E 0200 cn Freezing Fortress\Player 2\Cant be Stunned 8019777F 0000 cn Freezing Fortress\Player 2\Infinite Health 80197787 00AA cn Freezing Fortress\Player 2\No Health 80197787 0000 cn Freezing Fortress\Player 2\Full Super Bar 8119778E 0200 cn Spooky Spire, Happy Harry's Hut, Mudville Mansion\Player 1\Cant be Stunned 8019433F 0000 cn Spooky Spire, Happy Harry's Hut, Mudville Mansion\Player 1\Infinite Health 80194347 00AA cn Spooky Spire, Happy Harry's Hut, Mudville Mansion\Player 1\No Health 80194347 0000 cn Spooky Spire, Happy Harry's Hut, Mudville Mansion\Player 1\Full Super Bar 8119434E 0200 cn Spooky Spire, Happy Harry's Hut, Mudville Mansion\Player 2\Cant be Stunned 8019782F 0000 cn Spooky Spire, Happy Harry's Hut, Mudville Mansion\Player 2\Infinite Health 80197837 00AA cn Spooky Spire, Happy Harry's Hut, Mudville Mansion\Player 2\No Health 80197837 0000 cn Spooky Spire, Happy Harry's Hut, Mudville Mansion\Player 2\Full Super Bar 8119783E 0200 cn Rubbage Reef Code\Player 1\Cant be Stunned 8019430F 0000 cn Rubbage Reef Code\Player 1\Infinite Health 80194317 00AA cn Rubbage Reef Code\Player 1\No Health 80194317 0000 cn Rubbage Reef Code\Player 1\Full Super Bar 8119431E 0200 cn Rubbage Reef Code\Player 2\Cant be Stunned 801977FF 0000 cn Rubbage Reef Code\Player 2\Infinite Health 80197807 00AA cn Rubbage Reef Code\Player 2\No Health 80197807 0000 cn Rubbage Reef Code\Player 2\Full Super Bar 8119780E 0200 cn Backwash Bay\Player 1\Cant be Stunned 8019447F 0000 cn Backwash Bay\Player 1\Infinite Health 80194487 00AA cn Backwash Bay\Player 1\No Health 80194487 0000 cn Backwash Bay\Player 1\Full Super Bar 8119448E 0200 cn Backwash Bay\Player 2\Cant be Stunned 8019796F 0000 cn Backwash Bay\Player 2\Infinite Health 80197977 00AA cn Backwash Bay\Player 2\No Health 80197977 0000 cn Backwash Bay\Player 2\Full Super Bar 8119797E 0200 cn Ghastly Graveyard\Player 1\Cant be Stunned 8019451F 0000 cn Ghastly Graveyard\Player 1\Infinite Health 80194527 00AA cn Ghastly Graveyard\Player 1\No Health 80194527 0000 cn Ghastly Graveyard\Player 1\Full Super Bar 8119452E 0200 cn Ghastly Graveyard\Player 2\Cant be Stunned 80197A0F 0000 cn Ghastly Graveyard\Player 2\Infinite Health 80197A17 00AA cn Ghastly Graveyard\Player 2\No Health 80197A17 0000 cn Ghastly Graveyard\Player 2\Full Super Bar 81197A1E 0200 cn Candy Factory\Player 1\Cant be Stunned 801945FF 0000 cn Candy Factory\Player 1\Infinite Health 80194607 00AA cn Candy Factory\Player 1\No Health 80194607 0000 cn Candy Factory\Player 1\Full Super Bar 8119460E 0200 cn Candy Factory\Player 2\Cant be Stunned 80197AEF 0000 cn Candy Factory\Player 2\Infinite Health 80197AF7 00AA cn Candy Factory\Player 2\No Health 80197AF7 0000 cn Candy Factory\Player 2\Full Super Bar 81197AFE 0200 cn Kooky Courtyard\Player 1\Cant be Stunned 801946FF 0000 cn Kooky Courtyard\Player 1\Infinite Health 80194707 00AA cn Kooky Courtyard\Player 1\No Health 80194707 0000 cn Kooky Courtyard\Player 1\Full Super Bar 8119470E 0200 cn Kooky Courtyard\Player 2\Cant be Stunned 80197BEF 0000 cn Kooky Courtyard\Player 2\Infinite Health 80197BF7 00AA cn Kooky Courtyard\Player 2\No Health 80197BF7 0000 cn Kooky Courtyard\Player 2\Full Super Bar 81197BFE 0200 cn Santa's Toy Factory\Player 1\Cant be Stunned 80194B2F 0000 cn Santa's Toy Factory\Player 1\Infinite Health 80194B37 00AA cn Santa's Toy Factory\Player 1\No Health 80194B37 0000 cn Santa's Toy Factory\Player 1\Full Super Bar 81194B3E 0200 cn Santa's Toy Factory\Player 2\Cant be Stunned 8019801F 0000 cn Santa's Toy Factory\Player 2\Infinite Health 80198027 00AA cn Santa's Toy Factory\Player 2\No Health 80198027 0000 cn Santa's Toy Factory\Player 2\Full Super Bar 8119802E 0200 cn Boogerhenge, Tureen Toilet\Player 1\Cant be Stunned 80194ECF 0000 cn Boogerhenge, Tureen Toilet\Player 1\Infinite Health 80194ED7 00AA cn Boogerhenge, Tureen Toilet\Player 1\No Health 80194ED7 0000 cn Boogerhenge, Tureen Toilet\Player 1\Full Super Bar 81194EDE 0200 cn Boogerhenge, Tureen Toilet\Player 2\Cant be Stunned 801983BF 0000 cn Boogerhenge, Tureen Toilet\Player 2\Infinite Health 801983C7 00AA cn Boogerhenge, Tureen Toilet\Player 2\No Health 801983C7 0000 cn Boogerhenge, Tureen Toilet\Player 2\Full Super Bar 811983CE 0200 cn Dr. Kiln's Laboratory, Research Room, Kilns Hideout, Fiery Furnace\Player 1\Cant be Stunned 80195AAF 0000 cn Dr. Kiln's Laboratory, Research Room, Kilns Hideout, Fiery Furnace\Player 1\Infinite Health 80195AB7 00AA cn Dr. Kiln's Laboratory, Research Room, Kilns Hideout, Fiery Furnace\Player 1\No Health 80195AB7 0000 cn Dr. Kiln's Laboratory, Research Room, Kilns Hideout, Fiery Furnace\Player 1\Full Super Bar 81195ABE 0200 cn Dr. Kiln's Laboratory, Research Room, Kilns Hideout, Fiery Furnace\Player 2\Cant be Stunned 80198F9F 0000 cn Dr. Kiln's Laboratory, Research Room, Kilns Hideout, Fiery Furnace\Player 2\Infinite Health 80198FA7 00AA cn Dr. Kiln's Laboratory, Research Room, Kilns Hideout, Fiery Furnace\Player 2\No Health 80198FA7 0000 cn Dr. Kiln's Laboratory, Research Room, Kilns Hideout, Fiery Furnace\Player 2\Full Super Bar 81198FAE 0200 cn Dog House\Player 1\Cant be Stunned 8019653F 0000 cn Dog House\Player 1\Infinite Health 80196547 00AA cn Dog House\Player 1\No Health 80196547 0000 cn Dog House\Player 1\Full Super Bar 8119654E 0200 cn Dog House\Player 2\Cant be Stunned 80199A2F 0000 cn Dog House\Player 2\Infinite Health 80199A37 00AA cn Dog House\Player 2\No Health 80199A37 0000 cn Dog House\Player 2\Full Super Bar 81199A3E 0200 cn VS. Mode\Player 1\Cant be Stunned 8019195F 0000 cn VS. Mode\Player 1\Infinite Health 80199167 00AA cn VS. Mode\Player 1\No Health 80199167 0000 cn VS. Mode\Player 1\Full Super Bar 8119916E 0200 cn VS. Mode\Player 2\Cant be Stunned 80194E4F 0000 cn VS. Mode\Player 2\Infinite Health 80194E57 00AA cn VS. Mode\Player 2\No Health 80194E57 0000 cn VS. Mode\Player 2\Full Super Bar 81194E5E 0200 cn Other Codes\Have High Five 810AA0BE 0001 cn Other Codes\Have Earth Worm Jim 810AA0E2 0001 cn Other Codes\Have Sumo Santa 810AA106 0001 cn Other Codes\Have Booger Man 810AA12A 0001 cn Other Codes\Debug Mode cd With this code, Press C-Up & C-Down to pick your stage. 810AA1A6 0001 cn Other Codes\Difficulty Modifier 810AE40A ???? 0000:"Cookie",0001:"Easy",0002:"Normal",0003:"Dude",0004:"Psycho" cn Other Codes\Time Limit Modifier 800AE423 ???? 0000:"On",0001:"Off" cn Other Codes\Throws & Holds Modifier 800AE42F ???? 0000:"On",0001:"Off" cn Other Codes\VS. Arena Select Modifier 800AE43B ???? 0000:"Random",0001:"Normal" cn Other Codes\Spillits Modifier 800AE447 ???? 0000:"Normal",0001:"Psycho" cn Other Codes\Health Meters Modifier 800AE5EF ???? 0000:"Off",0001:"On" cn Other Codes\Stun Meters Modifier 800AE5FB ???? 0000:"Off",0001:"On" cn Other Codes\Super Meters Modifier 800AE607 ???? 0000:"Off",0001:"On" cn Other Codes\Portraits Modifier 800AE613 ???? 0000:"Off",0001:"On" crc 2B6FA7C0-09A71225-C:45 gn Clay Fighter 63 1-3 (U) (beta) cn Extra Characters and Secret Options 8019ED41 000F cn Stage Select 8019ED2B ???? 0000:"Candy Factory",0001:"Claynaveral Hangar",0002:"Camp Claynaveral",0003:"Outhouse",0004:"Mudville Mansion",0005:"Ghastly Graveyard",0006:"Spooky Spire",0007:"Happy Harry's Hut",0008:"Freezing Fortress",0009:"Refuse Room",000A:"Grotto Gulch",000B:"Rubbage Room",000C:"Rubbage Reef",000D:"Kiln's Laboratory",000E:"Kiln's Hideout",000F:"Fiery Furnace",0010:"Research Room",0011:"Clayribbean Cruise",0012:"Santa's Workship",0013:"Kooky Courtyard",0014:"Santa's Toy Factory",0015:"Boogerhenge",0016:"Backwash Bay",0017:"Tureen Toilet",0018:"Tribal Tower",0019:"Aquadome" cn Play As\Player1 8019ED2F ???? 0000:"Bad Mr. Frosty",0001:"Blob",0002:"Bonker",0003:"Boogerman",0004:"Dr. Kiln",0005:"Earthworm Jim",0008:"Houngan",0009:"Icky Bod Clay",000A:"Kung Pow",000D:"Sumo Santa",000E:"Taffy",000F:"T-Hoppy" cn Refuse Room, Grotto Gulch, Santa's Workship Stages\Can't be Stunned\Player 1 801EDCE3 0000 cn Refuse Room, Grotto Gulch, Santa's Workship Stages\Infinite Energy\Player 1 801EDCEB 00AA cn Refuse Room, Grotto Gulch, Santa's Workship Stages\No Energy\Player 1 801EDCEB 0000 cn Refuse Room, Grotto Gulch, Santa's Workship Stages\Full Super Bar\Player 1 811EDCF2 0200 cn Tribal Tower Stage\Can't be Stunned\Player 1 801EDD83 0000 cn Tribal Tower Stage\Infinite Energy\Player 1 801EDD8B 00AA cn Tribal Tower Stage\No Energy\Player 1 801EDD8B 0000 cn Tribal Tower Stage\Full Super Bar\Player 1 811EDD92 0200 cn Aquadome Stage\Can't be Stunned\Player 1 801EE013 0000 cn Aquadome Stage\Infinite Energy\Player 1 801EE00B 00AA cn Aquadome Stage\No Energy\Player 1 801EE00B 0000 cn Aquadome Stage\Full Super Bar\Player 1 811EE012 0200 cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\Can't be Stunned\Player 1 801EE513 0000 cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\Infinite Energy\Player 1 801EE51B 00AA cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\No Energy\Player 1 801EE51B 0000 cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\Full Super Bar\Player 1 811EE522 0200 cn Freezing Fortress Stage\Can't be Stunned\Player 1 801EE573 0000 cn Freezing Fortress Stage\Infinite Energy\Player 1 801EE57B 00AA cn Freezing Fortress Stage\No Energy\Player 1 801EE57B 0000 cn Freezing Fortress Stage\Full Super Bar\Player 1 811EE582 0200 cn Rubbage Reef Stage\Can't be Stunned\Player 1 801EE5F3 0000 cn Rubbage Reef Stage\Infinite Energy\Player 1 801EE5FB 00AA cn Rubbage Reef Stage\No Energy\Player 1 801EE5FB 0000 cn Rubbage Reef Stage\Full Super Bar\Player 1 811EE602 0200 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\Can't be Stunned\Player 1 801EE623 0000 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\Infinite Energy\Player 1 801EE62B 00AA cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\No Energy\Player 1 801EE62B 0000 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\Full Super Bar\Player 1 811EE632 0200 cn Clayribbean Cruise Stage\Can't be Stunned\Player 1 801EE6D3 0000 cn Clayribbean Cruise Stage\Infinite Energy\Player 1 801EE6DB 00AA cn Clayribbean Cruise Stage\No Energy\Player 1 801EE6DB 0000 cn Clayribbean Cruise Stage\Full Super Bar\Player 1 811EE6E2 0200 cn Backwash Bay Stage\Can't be Stunned\Player 1 801EE763 0000 cn Backwash Bay Stage\Infinite Energy\Player 1 801EE76B 00AA cn Backwash Bay Stage\No Energy\Player 1 801EE76B 0000 cn Backwash Bay Stage\Full Super Bar\Player 1 811EE772 0200 cn Ghastly Graveyard Stage\Can't be Stunned\Player 1 801EE803 0000 cn Ghastly Graveyard Stage\Infinite Energy\Player 1 801EE80B 00AA cn Ghastly Graveyard Stage\No Energy\Player 1 801EE80B 0000 cn Ghastly Graveyard Stage\Full Super Bar\Player 1 811EE812 0200 cn Candy Factory Stage\Can't be Stunned\Player 1 801EE8E3 0000 cn Candy Factory Stage\Infinite Energy\Player 1 801EE8EB 00AA cn Candy Factory Stage\No Energy\Player 1 801EE8EB 0000 cn Candy Factory Stage\Full Super Bar\Player 1 811EE8F2 0200 cn Kooky Courtyard Stage\Can't be Stunned\Player 1 801EE9E3 0000 cn Kooky Courtyard Stage\Infinite Energy\Player 1 801EE9EB 00AA cn Kooky Courtyard Stage\No Energy\Player 1 801EE9EB 0000 cn Kooky Courtyard Stage\Full Super Bar\Player 1 811EE9F2 0200 cn Santa's Toy Factory Stage\Can't be Stunned\Player 1 801EEE13 0000 cn Santa's Toy Factory Stage\Infinite Energy\Player 1 801EEE1B 00AA cn Santa's Toy Factory Stage\No Energy\Player 1 801EEE1B 0000 cn Santa's Toy Factory Stage\Full Super Bar\Player 1 811EEE22 0200 cn Boogerhenge, Tureen Toilet Stage\Can't be Stunned\Player 1 801EF1B3 0000 cn Boogerhenge, Tureen Toilet Stage\Infinite Energy\Player 1 801EF1BB 00AA cn Boogerhenge, Tureen Toilet Stage\No Energy\Player 1 801EF1BB 0000 cn Boogerhenge, Tureen Toilet Stage\Full Super Bar\Player 1 811EF1C2 0200 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\Can't be Stunned\Player 1 801EFD93 0000 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\Infinite Energy\Player 1 801EFD9B 00AA cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\No Energy\Player 1 801EFD9B 0000 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\Full Super Bar\Player 1 811EFDA2 0200 cn Rubbage Room Stage\Can't be Stunned\Player 1 801F0823 0000 cn Rubbage Room Stage\Infinite Energy\Player 1 801F082B 00AA cn Rubbage Room Stage\No Energy\Player 1 801F082B 0000 cn Rubbage Room Stage\Full Super Bar\Player 1 811F0832 0200 cn Refuse Room, Grotto Gulch, Santa's Workship Stages\Can't be Stunned\Player 2 801F1183 0000 cn Refuse Room, Grotto Gulch, Santa's Workship Stages\Infinite Energy\Player 2 801F118B 00AA cn Refuse Room, Grotto Gulch, Santa's Workship Stages\No Energy\Player 2 801F118B 0000 cn Refuse Room, Grotto Gulch, Santa's Workship Stages\Full Super Bar\Player 2 811F1192 0200 cn Tribal Tower Stage\Can't be Stunned\Player 2 801F1223 0000 cn Tribal Tower Stage\Infinite Energy\Player 2 801F122B 00AA cn Tribal Tower Stage\No Energy\Player 2 801F122B 0000 cn Tribal Tower Stage\Full Super Bar\Player 2 811F1232 0200 cn Aquadome Stage\Can't be Stunned\Player 2 801F14A3 0000 cn Aquadome Stage\Infinite Energy\Player 2 801F14AB 00AA cn Aquadome Stage\No Energy\Player 2 801F14AB 0000 cn Aquadome Stage\Full Super Bar\Player 2 811F14B2 0200 cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\Can't be Stunned\Player 2 801F19B3 0000 cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\Infinite Energy\Player 2 801F19BB 00AA cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\No Energy\Player 2 801F19BB 0000 cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\Full Super Bar\Player 2 811F19C2 0200 cn Freezing Fortress Stage\Can't be Stunned\Player 2 801F1A13 0000 cn Freezing Fortress Stage\Infinite Energy\Player 2 801F1A1B 00AA cn Freezing Fortress Stage\No Energy\Player 2 801F1A1B 0000 cn Freezing Fortress Stage\Full Super Bar\Player 2 811F1A22 0200 cn Rubbage Reef Stage\Can't be Stunned\Player 2 801F1A93 0000 cn Rubbage Reef Stage\Infinite Energy\Player 2 801F1A9B 00AA cn Rubbage Reef Stage\No Energy\Player 2 801F1A9B 0000 cn Rubbage Reef Stage\Full Super Bar\Player 2 811F1AA2 0200 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\Can't be Stunned\Player 2 801F1AC3 0000 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\Infinite Energy\Player 2 801F1ACB 00AA cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\No Energy\Player 2 801F1ACB 0000 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\Full Super Bar\Player 2 811F1AD2 0200 cn Clayribbean Cruise Stage\Can't be Stunned\Player 2 801F1B73 0000 cn Clayribbean Cruise Stage\Infinite Energy\Player 2 801F1B7B 00AA cn Clayribbean Cruise Stage\No Energy\Player 2 801F1B7B 0000 cn Clayribbean Cruise Stage\Full Super Bar\Player 2 811F1B82 0200 cn Backwash Bay Stage\Can't be Stunned\Player 2 801F1C03 0000 cn Backwash Bay Stage\Infinite Energy\Player 2 801F1C0B 00AA cn Backwash Bay Stage\No Energy\Player 2 801F1C0B 0000 cn Backwash Bay Stage\Full Super Bar\Player 2 811F1C12 0200 cn Ghastly Graveyard Stage\Can't be Stunned\Player 2 801F1CA3 0000 cn Ghastly Graveyard Stage\Infinite Energy\Player 2 801F1CAB 00AA cn Ghastly Graveyard Stage\No Energy\Player 2 801F1CAB 0000 cn Ghastly Graveyard Stage\Full Super Bar\Player 2 811F1CB2 0200 cn Candy Factory Stage\Can't be Stunned\Player 2 801F1D83 0000 cn Candy Factory Stage\Infinite Energy\Player 2 801F1D8B 00AA cn Candy Factory Stage\No Energy\Player 2 801F1D8B 0000 cn Candy Factory Stage\Full Super Bar\Player 2 811F1D92 0200 cn Kooky Courtyard Stage\Can't be Stunned\Player 2 801F1E83 0000 cn Kooky Courtyard Stage\Infinite Energy\Player 2 801F1E8B 00AA cn Kooky Courtyard Stage\No Energy\Player 2 801F1E8B 0000 cn Kooky Courtyard Stage\Full Super Bar\Player 2 811F1E92 0200 cn Santa's Toy Factory Stage\Can't be Stunned\Player 2 801F22B3 0000 cn Santa's Toy Factory Stage\Infinite Energy\Player 2 801F22BB 00AA cn Santa's Toy Factory Stage\No Energy\Player 2 801F22BB 0000 cn Santa's Toy Factory Stage\Full Super Bar\Player 2 811F22C2 0200 cn Boogerhenge, Tureen Toilet Stage\Can't be Stunned\Player 2 801F2653 0000 cn Boogerhenge, Tureen Toilet Stage\Infinite Energy\Player 2 801F265B 00AA cn Boogerhenge, Tureen Toilet Stage\No Energy\Player 2 801F265B 0000 cn Boogerhenge, Tureen Toilet Stage\Full Super Bar\Player 2 811F2662 0200 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\Can't be Stunned\Player 2 801F3233 0000 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\Infinite Energy\Player 2 801F323B 00AA cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\No Energy\Player 2 801F323B 0000 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\Full Super Bar\Player 2 811F3242 0200 cn Rubbage Room Stage\Can't be Stunned\Player 2 801F3CC3 0000 cn Rubbage Room Stage\Infinite Energy\Player 2 801F3CCB 00AA cn Rubbage Room Stage\No Energy\Player 2 801F3CCB 0000 cn Rubbage Room Stage\Full Super Bar\Player 2 811F3CD2 0200 crc 95286EB4-B76AD58F-C:45 gn Command & Conquer (U) cn NOD\Max Cash 810C50AE FFFF 810C50B0 0001 cn NOD\Max Power 810C50CE FFFF 810C50D0 0001 cn NOD\Instant\Build Buildings 810C50C6 FFFF cn NOD\Instant\Build Units 810C50BE FFFF cn NOD\Instant\Build Vehicles 810C50C2 FFFF cn NOD\Instant\Build Aircraft 810C50BA FFFF cn NOD\Instant\Air Strike 800962A4 0032 800C4FF8 00FF cn NOD\Instant\Ion Cannon 800962A5 0033 800C4FD8 00FF cn NOD\Instant\Nuclear Strike 800962A6 0034 800C5018 00FF cn GDI\Max Cash 810C4F06 FFFF 810C4F08 0001 cn GDI\Max Power 810C4F26 FFFF 810C4F28 0001 cn GDI\Instant\Build Buildings 810C4F1E FFFF cn GDI\Instant\Build Units 810C4F16 FFFF cn GDI\Instant\Build Vehicles 810C4F1A FFFF cn GDI\Instant\Build Aircraft 810C4F12 FFFF cn GDI\Instant\Air Strike 800962A4 0032 800C4E50 00FF cn GDI\Instant\Ion Cannon 800962A5 0033 800C4E30 00FF cn GDI\Instant\Nuclear Strike 800962A6 0034 800C4E70 00FF cn GDI\Mission 4\Infinite Health Hum-Vee 800ABE99 0096 cn GDI\Mission 4\Infinite Health APC #1 800ABFB1 00C8 cn GDI\Mission 4\Infinite Health APC #2 800AC03D 00C8 cn GDI\Mission 6\Infinite Health Commando 800B56CD 0050 cn GDI\Mission 6\Infinite Health Transportational Helicopter 800BFC95 005A cn GDI\Maximum Killed 80092E53 00C8 cn NOD\Maximum Killed 80092E4F 00C8 cn GDI\None Killed 80092E53 0000 cn NOD\None Killed 80092E4F 0000 cn GDI\Maximum Buildings Lost 80092E5F 00C8 cn NOD\Maximum Buildings Lost 80092E5B 00C8 cn GDI\No Buildings Lost 80092E5F 0000 cn NOD\No Buildings Lost 80092E5B 0000 cn 100% Efficiency 80092E4B 0064 cn 100% Leadership 80092E47 0064 cn Tons Of Ending Credits 81092E3C 0FFF 81092E3E FFFF cn Max Total Score 81092E42 FFFF cn Time Spent On Mission 80092E3B ???? 0000:"No Time",00FF:"Max Time" crc 30C7AC50-7704072D-C:45 gn Conker's Bad Fur Day (U) cn Infinite\Health\Player 1 800CC49A 0006 cn Infinite\Oxygen 800CC382 0001 cn Infinite\Pots of cash 810D214A FFFF cn Access All\Chapters, Scenes,& Multi-Player Characters 50000401 0000 800E9D01 00FF cn Play as Option 1 cd Here you can Choose Options who you want to play as,But only one Option at a time. 800D213F ???? 0001:"Wessle",0003:"Tedi",0004:"Combat Squirrel",0005:"Conker",000B:"Uga",000C:"Bald Caveman",000D:"Caveman",000E:"Mohican Caveman",0010:"Neo Conker",001B:"Villager",0021:"Zombie",0023:"Enemy Bat",0024:"Conkers Bat",0025:"Army Captain",0026:"Tedi Boss",0027:"Gregg",0028:"Gregg skeleton" cn Infinite\Lives Player 1 800D2144 0064 cn Infinite\Health\Player 2 800CC7C6 270F cn Infinite\Health\Player 3 800CCAF2 270F cn Infinite\Health\Player 4 800CCE1E 270F cn Infinite\Time In Multi 8108FD7A 7500 cn Infinite\Bags In Heist 800E0BE4 00FF cn Access All\Characters & Weapons In Multi Race 810E9D02 ???? 00FF:"All Characters & Baseball bat",00FB:"All Characters & Frying Pan",00F3:"All Characters & Bones" cn Infinite\Bombs 802055CA 0030 cn Infinite\Max Kills Player 1 800E0B47 03E7 cn Infinite\Accuracy Count Player 1 cd MULTI ONLY. Only put this code on once you are in the game 800E0B67 0001 cn Infinite\Head Shot Count Player 1 cd MULTI ONLY. Only put this code on once you are in the game,Once you pick up a Gun a shoot once, you will 100%. 800E0B6B 03E7 cn Press L To Levitate\Player 1 cd Press L Button to Levitate & Let go to come back down D0042A15 0020 810CC2F0 41CB cn Press L To Levitate\Player 2 cd Press L Button to Levitate & Let go to come back down D0042A1D 0020 810CC61C 41CB cn Press L To Levitate\Player 3 cd Press L Button to Levitate & Let go to come back down D0042A25 0020 810CC948 41CB cn Press L To Levitate\Player 4 cd Press L Button to Levitate & Let go to come back down D0042A2D 0020 810CCC74 41CB cn Matrix Mode (Anywhere) cd Press R to activate and then Right-C to exit. D1042A14 0010 800BEA0C 0001 D1042A14 0010 810BE574 D202 D1042A14 0001 800BEA0C 0000 D1042A14 0001 810BE574 0000 cn Conkers Speed Select 810CC318 ???? 3F00:"Slow Conker",3F80:"Normal Conker",3FF0:"Fast Conker",4030:"Super Fast Conker" cn Weapon Select In Multi (On Pick Up) cd Select what Weapon you would like in Multi Player and then on a Weapon Pickup you will have the weapon of your choice.to change for another just Enable the one of your choice to have that instead.(you must have a weapon already to change for the next. 80180873 ???? 0001:"Sword",0002:"Nothing",0003:"Yellow Chain-Ssaw",0004:"Throwing Knives",0005:"Riffle",0006:"Long Pistol with Sight",0007:"Rocket Launcher",0008:"Buck Shot",000A:"High Powred Riffle With Scope",000C:"Two Automatic Machine Guns",0013:"Gas Mask" crc 46A3F7AF-0F7591D0-C:45 gn Cruis'n Exotica (U) cn Unlock All Cars 8104F10E FFFF cn Always Place 1st\Player 1 81065174 0000 cn Infinite\Nitros\Player 1 800BE7FD 00FF cn Infinite\Continues 8107F850 00FF cn Infinite\Time 810802D4 4296 cn Play As 800802D0 ???? 0000:"",0001:"",0002:"",0003:"",0004:"",0005:"",0006:"",0007:"",0008:"",0009:"",000A:"",000B:"",000C:"",000D:"",000E:"",000F:"",0010:"",0011:"",0012:"",0013:"",0014:"",0015:"",0016:"",0017:"",0018:"",0019:"" crc FF2F2FB4-D161149A-C:45 gn Cruis'n USA (U) (v1.0) cn Always Place 1st 8015025B 0001 cn Unlimited Time 80150A68 0095 8015097D 0095 cn Car Upgrades\'63 Muscle Car 8015065F 0005 cn Car Upgrades\La Bomba 80150663 0005 cn Car Upgrades\Devastator 80150667 0005 cn Car Upgrades\Italia P69 8015066B 0005 cn Car Upgrades\All-Terrain Vehicle 8015066F 0004 cn Car Upgrades\School Bus 80150673 0004 cn Car Upgrades\Police Car 80150677 0004 cn Infinite Time 80150A6D 0045 cn Stop Elapsed Time And No Traffic 80150A69 0000 cn Play Level Modifier 80150A83 ???? 0000:"Golden Gate Park",0001:"San Francisco",0002:"US 101",0003:"Redwood Forest",0004:"Beverly Hills",0005:"LA Freeway",0006:"Death Valley",0007:"Arizona",0008:"Grand Canyon",0009:"Iowa",000A:"Chicago",000B:"Indiana",000C:"Appalachia",000D:"Washington DC",000E:"Cruise The USA" cn Player 1\Gearbox Type Modifier 80150333 ???? 0000:"Automatic",0001:"Manual" cn Player 1\Always First Place 8015034B 0001 cn Player 1\Always Have Fastest Car 8015033A 000C cn Player 2\Gearbox Type Modifier 801506CF ???? 0000:"Automatic",0001:"Manual" cn Player 2\Always First Place 801506E7 0001 cn Player 2\Always Have Fastest Car 801506D6 000C cn Player 1\Lights & Sirens For Police Car & School Bus 8115065A 0001 8114E4AA 0001 cn Player 2\Lights & Sirens For Police Car & School Bus 811509F6 0001 8114E4C2 0001 crc 5306CF45-CBC49250-C:45 gn Cruis'n USA (U) (v1.1) cn Car Upgrades\'63 Muscle Car 8015053F 0005 cn Car Upgrades\La Bomba 80150543 0005 cn Car Upgrades\Devastator 80150547 0005 cn Car Upgrades\Italia P69 8015054B 0005 cn Car Upgrades\All-Terrain Vehicle 8015054F 0004 cn Car Upgrades\School Bus 80150553 0004 cn Car Upgrades\Police Car 80150557 0004 cn Infinite Time 8015094D 0095 cn Stop Elapsed Time And No Traffic 80150949 0000 cn Play Level Modifier 80150963 ???? 0000:"Golden Gate Park",0001:"San Francisco",0002:"US 101",0003:"Redwood Forest",0004:"Beverly Hills",0005:"LA Freeway",0006:"Death Valley",0007:"Arizona",0008:"Grand Canyon",0009:"Iowa",000A:"Chicago",000B:"Indiana",000C:"Appalachia",000D:"Washington DC",000E:"Cruise The USA" cn Player 1\Gearbox Type Modifier 80150213 ???? 0000:"Automatic",0001:"Manual" cn Player 1\Always First Place 8015022B 0001 cn Player 1\Always Have Fastest Car 8015021A 0001 cn Player 2\Gearbox Type Modifier 801505AF ???? 0000:"Automatic",0001:"Manual" cn Player 2\Always First Place 801505C7 0001 cn Player 2\Always Have Fastest Car 801505B6 0001 cn Player 1\Lights & Sirens For Police Car & School Bus P1 8115053A 0001 8114E38A 0001 cn Player 2\Lights & Sirens For Police Car & School Bus P2 811508D6 0001 8114E3A2 0001 crc B3402554-7340C004-C:45 gn Cruis'n USA (U) (v1.2) cn Car Upgrades\'63 Muscle Car 8015056F 0005 cn Car Upgrades\La Bomba 80150573 0005 cn Car Upgrades\Devastator 80150577 0005 cn Car Upgrades\Italia P69 8015057B 0005 cn Car Upgrades\All-Terrain Vehicle 8015057F 0004 cn Car Upgrades\School Bus 80150583 0004 cn Car Upgrades\Police Car 80150587 0004 cn Infinite Time 8015097D 0095 cn Stop Elapsed Time And No Traffic 80150979 0000 cn Play Level Modifier 80150993 ???? 0000:"Golden Gate Park",0001:"San Francisco",0002:"US 101",0003:"Redwood Forest",0004:"Beverly Hills",0005:"LA Freeway",0006:"Death Valley",0007:"Arizona",0008:"Grand Canyon",0009:"Iowa",000A:"Chicago",000B:"Indiana",000C:"Appalachia",000D:"Washington DC",000E:"Cruise The USA" cn Player 1\Gearbox Type Modifier 80150243 ???? 0000:"Automatic",0001:"Manual" cn Player 1\Always First Place 8015025B 0001 cn Player 1\Always Have Fastest Car 8015024A 0001 cn Player 2\Gearbox Type Modifier 801505DF ???? 0000:"Automatic",0001:"Manual" cn Player 2\Always First Place 801505F7 0001 cn Player 2\Always Have Fastest Car 801505E6 0001 cn Player 1\Lights & Sirens For Police Car & School Bus 8115056A 0001 8114E3BA 0001 cn Player 2\Lights & Sirens For Police Car & School Bus 81150906 0001 8114E3D2 0001 crc DFE61153-D76118E6-C:45 gn Cruis'n World (U) cn Have All Car Upgrades 803BEE42 0005 cn Have All Cars 813BEE78 1FFF cn Time Counts Down Faster 813D0D3E 0000 cn Dancing Girl Always On 803BEE73 0001 803C21CF 0054 cn Player 1\Always Place 1st 803CE023 0001 cn Player 1\Car/Transmission Modifier 803BEE40 ???? 0000:"Serpent (Auto)",0001:"Serpent (Manual)",0002:"Kamikaze (Auto)",0003:"Kamikaze (Manual)",0004:"ATV (Auto",0005:"ATV (Manual)",0006:"Scarab (Auto)",0007:"Scarab (Manual)",0008:"Stallion P6 (Auto)",0009:"Stallion P6 (Manual)",000A:"Banzai GTV (Auto)",000B:"Banzai GTV (Manual)",000C:"Zombie (Auto)",000D:"Zombie (Manual)",000E:"Orca (Auto)",000F:"Orca (manual)",0010:"El Nino (Auto)",0011:"El Nino (Manual)",0012:"Rhino 4x4 (Auto)",0013:"Rhino 4x4 (Manual)",0014:"Sardine Extreme (Auto)",0015:"Sardine Extreme (Manual)",0016:"Road King (Auto)",0017:"Road King (Manual)",0018:"Grass Hopper (Auto)",0019:"Grass Hopper (Manual)",001A:"Bulldog (Auto)",001B:"Bulldog (Manual)",001C:"Enforcer (Auto)",001D:"Enforcer (Manual)",001E:"NY Taxi (Auto)",001F:"NY Taxi (Manual)",0020:"School Bus (Auto)",0021:"School Bus (Manual)",0022:"Exec (Auto)",0023:"Exec (Manual)",0024:"Conductor (Auto)",0025:"Conductor (Manual)",0026:"Speed Demon (Auto)",0027:"Speed Demon (Manual)",0028:"Tommy (Auto)",0029:"Tommy (Manual)",002A:"Rocket (Auto)",002B:"Rocket (Manual)",002C:"The Surgeon (Auto)",002D:"The Surgeon (Manual)",002E:"Monsta (Auto)",002F:"Monsta (Manual)",0030:"Howler (Auto)",0031:"Howler (Manual)" cn Player 1\Stop Elapsed Time 813C7678 3C80 cn Player 2\Always Place 1st 803CE4FB 0001 cn Player 2\Car/Transmission Modifier 803BEE48 ???? 0000:"Serpent (Auto)",0001:"Serpent (Manual)",0002:"Kamikaze (Auto)",0003:"Kamikaze (Manual)",0004:"ATV (Auto",0005:"ATV (Manual)",0006:"Scarab (Auto)",0007:"Scarab (Manual)",0008:"Stallion P6 (Auto)",0009:"Stallion P6 (Manual)",000A:"Banzai GTV (Auto)",000B:"Banzai GTV (Manual)",000C:"Zombie (Auto)",000D:"Zombie (Manual)",000E:"Orca (Auto)",000F:"Orca (manual)",0010:"El Nino (Auto)",0011:"El Nino (Manual)",0012:"Rhino 4x4 (Auto)",0013:"Rhino 4x4 (Manual)",0014:"Sardine Extreme (Auto)",0015:"Sardine Extreme (Manual)",0016:"Road King (Auto)",0017:"Road King (Manual)",0018:"Grass Hopper (Auto)",0019:"Grass Hopper (Manual)",001A:"Bulldog (Auto)",001B:"Bulldog (Manual)",001C:"Enforcer (Auto)",001D:"Enforcer (Manual)",001E:"NY Taxi (Auto)",001F:"NY Taxi (Manual)",0020:"School Bus (Auto)",0021:"School Bus (Manual)",0022:"Exec (Auto)",0023:"Exec (Manual)",0024:"Conductor (Auto)",0025:"Conductor (Manual)",0026:"Speed Demon (Auto)",0027:"Speed Demon (Manual)",0028:"Tommy (Auto)",0029:"Tommy (Manual)",002A:"Rocket (Auto)",002B:"Rocket (Manual)",002C:"The Surgeon (Auto)",002D:"The Surgeon (Manual)",002E:"Monsta (Auto)",002F:"Monsta (Manual)",0030:"Howler (Auto)",0031:"Howler (Manual)" cn Player 2\Stop Elapsed Time 813C78B4 3C80 cn Player 3\Always Place 1st 803CDB4B 0001 cn Player 3\Car/Transmission Modifier 803BEE50 ???? 0000:"Serpent (Auto)",0001:"Serpent (Manual)",0002:"Kamikaze (Auto)",0003:"Kamikaze (Manual)",0004:"ATV (Auto",0005:"ATV (Manual)",0006:"Scarab (Auto)",0007:"Scarab (Manual)",0008:"Stallion P6 (Auto)",0009:"Stallion P6 (Manual)",000A:"Banzai GTV (Auto)",000B:"Banzai GTV (Manual)",000C:"Zombie (Auto)",000D:"Zombie (Manual)",000E:"Orca (Auto)",000F:"Orca (manual)",0010:"El Nino (Auto)",0011:"El Nino (Manual)",0012:"Rhino 4x4 (Auto)",0013:"Rhino 4x4 (Manual)",0014:"Sardine Extreme (Auto)",0015:"Sardine Extreme (Manual)",0016:"Road King (Auto)",0017:"Road King (Manual)",0018:"Grass Hopper (Auto)",0019:"Grass Hopper (Manual)",001A:"Bulldog (Auto)",001B:"Bulldog (Manual)",001C:"Enforcer (Auto)",001D:"Enforcer (Manual)",001E:"NY Taxi (Auto)",001F:"NY Taxi (Manual)",0020:"School Bus (Auto)",0021:"School Bus (Manual)",0022:"Exec (Auto)",0023:"Exec (Manual)",0024:"Conductor (Auto)",0025:"Conductor (Manual)",0026:"Speed Demon (Auto)",0027:"Speed Demon (Manual)",0028:"Tommy (Auto)",0029:"Tommy (Manual)",002A:"Rocket (Auto)",002B:"Rocket (Manual)",002C:"The Surgeon (Auto)",002D:"The Surgeon (Manual)",002E:"Monsta (Auto)",002F:"Monsta (Manual)",0030:"Howler (Auto)",0031:"Howler (Manual)" cn Player 4\Always Place 1st 803CD673 0001 cn Player 4\Car/Transmission Modifier 803BEE58 ???? 0000:"Serpent (Auto)",0001:"Serpent (Manual)",0002:"Kamikaze (Auto)",0003:"Kamikaze (Manual)",0004:"ATV (Auto",0005:"ATV (Manual)",0006:"Scarab (Auto)",0007:"Scarab (Manual)",0008:"Stallion P6 (Auto)",0009:"Stallion P6 (Manual)",000A:"Banzai GTV (Auto)",000B:"Banzai GTV (Manual)",000C:"Zombie (Auto)",000D:"Zombie (Manual)",000E:"Orca (Auto)",000F:"Orca (manual)",0010:"El Nino (Auto)",0011:"El Nino (Manual)",0012:"Rhino 4x4 (Auto)",0013:"Rhino 4x4 (Manual)",0014:"Sardine Extreme (Auto)",0015:"Sardine Extreme (Manual)",0016:"Road King (Auto)",0017:"Road King (Manual)",0018:"Grass Hopper (Auto)",0019:"Grass Hopper (Manual)",001A:"Bulldog (Auto)",001B:"Bulldog (Manual)",001C:"Enforcer (Auto)",001D:"Enforcer (Manual)",001E:"NY Taxi (Auto)",001F:"NY Taxi (Manual)",0020:"School Bus (Auto)",0021:"School Bus (Manual)",0022:"Exec (Auto)",0023:"Exec (Manual)",0024:"Conductor (Auto)",0025:"Conductor (Manual)",0026:"Speed Demon (Auto)",0027:"Speed Demon (Manual)",0028:"Tommy (Auto)",0029:"Tommy (Manual)",002A:"Rocket (Auto)",002B:"Rocket (Manual)",002C:"The Surgeon (Auto)",002D:"The Surgeon (Manual)",002E:"Monsta (Auto)",002F:"Monsta (Manual)",0030:"Howler (Auto)",0031:"Howler (Manual)" cn Have All Car Upgrades 803BEE42 0005 cn Have All Cars 813BEE78 1FFF cn Championship Mode\Max Total Points 813BFBFA FFFF cn Championship Mode\Max Points Per Race 813BFBFE FFFF cn Championship Mode\Max Points To Next Level 813BFBFC FFFF cn Championship Mode\Unlimited Nitro\Player 1 803C75E7 0003 cn Championship Mode\Unlimited Nitro\Player 2 803C7823 0003 cn Championship Mode\Unlimited Nitro\Player 3 803C716F 0003 cn Championship Mode\Cannot Spin Out 803CDD93 0000 cn Championship Mode\Disable Left Lane Traffic 8033C95B 0001 cn Championship Mode\Disable Right Lane Traffic 8033C95F 0001 crc E8FC8EA1-9F738391-C:45 gn CyberTiger (U) cn Always Hole In One 8115E1D6 0000 cn Inventory\Max Distance & Wind Cutter 800B4412 00FF cn Inventory\Max No Bounce & Tee Up 800B4411 00FF cn Inventory\Max Accuracy & Skipper 800B4410 00FF cn Inventory\Max Spinner & Burrow 800B4413 00FF cn Inventory\Max Mystery 800B4420 00F0 cn Big Head 810AE840 401F cn Character Unlock\Kimmi 800B0BBA 0010 cn Character Unlock\Starr 800B0BCE 0010 cn Character Unlock\Marvin The Alien 800B0BD7 0001 cn Change Looks Of Liltiger 800B0BC4 0011 cn Character Unlock\Robert & Delvis 800B0BCA 0011 cn Character Unlock\Bengal The Tiger 800B0BC2 0010 cn Character Unlock\Cindy 800B0BBA 0001 cn Character Unlock\Festus 800B0BD3 0001 cn Character Unlock\Mark 800B0BC7 0012 cn Character Unlock\Twfan & Eagamer 800B0BBE 0011 cn Character Unlock\Traci (Leopard Costume) 800B0BCE 0011 cn Character Unlock\Bobby 800B0BC6 0001 crc A4A52B58-23759841-C:45 gn Dark Rift (U) cn Access Sonork Character 80049DF0 0001 cn Access Demitron Character 80049DF4 0001 cn Infinite Health\All Levels\Player 1 81028988 0800 8102898A 0018 81000060 3C1B 81000062 8008 81000064 8F7B 81000066 0228 8100006C 03E0 8100006E 0008 81000070 A761 81000072 0070 cn Press GS For 2 Rounds Won\Player 1 890B6330 0002 cn Press GS For 2 Rounds Won\Player 2 890B6342 0002 cn Music Modifier 800816B2 ???? 0000:"Music Off",002A:"Volume Low",0055:"Volume Medium",007F:"Volume Max" crc F5363349-DBF9D21B-C:45 gn Deadly Arts (U) cn Player 1\Character Modifier 80105001 ???? 0000:"Azami",0001:"Serina",0002:"Miki",0003:"Kai",0004:"Sakai",0005:"Kengon",0006:"Kyeya",0007:"Kaoru",0008:"Gouriki",0009:"Reiji",000A:"Yami",000B:"Hikari",000C:"Invisible Fighter" cn Player 1\Infinite Energy 81105026 03E8 cn Player 1\No Energy 81105026 0000 cn Player 1\Never Wins 8009E3F4 0000 cn Player 1\Needs 1 Round to Win D009E3F4 0000 8009E3F4 0001 cn Player 2\Character Modifier 8011B399 ???? 0000:"Azami",0001:"Serina",0002:"Miki",0003:"Kai",0004:"Sakai",0005:"Kengon",0006:"Kyeya",0007:"Kaoru",0008:"Gouriki",0009:"Reiji",000A:"Yami",000B:"Hikari",000C:"Invisible Fighter" cn Player 2\Infinite Energy 8111B3BE 03E8 cn Player 2\No Energy 8111B3BE 0000 cn Player 2\P2 Never Wins 8009E3F5 0000 cn Player 2\Needs 1 Round to Win D009E3F5 0000 8009E3F5 0001 cn Have Extra Characters (Gouriki & Reiji) 8009E3DF 00FF crc DEE584A2-0F161187-C:45 gn Destruction Derby 64 (U) cn Solo Mode\Infinite Damage Meter 80125FD9 0026 cn All Cars and Tracks 50000602 0000 81097A18 0101 cn All Difficulty Levels 81097A16 0003 cn Solo Mode\Vehicles\Baja Buggy 80097A18 0001 cn Solo Mode\Vehicles\Low Rider 80097A19 0001 cn Solo Mode\Vehicles\Woody Wagon 80097A1A 0001 cn Solo Mode\Vehicles\Pickup 80097A1B 0001 cn Solo Mode\Vehicles\Taxi Cab 80097A1C 0001 cn Solo Mode\Vehicles\Blue Demon 80097A1D 0001 cn Solo Mode\Vehicles\Rag Top 80097A1E 0001 cn Solo Mode\Vehicles\Hot Rod 80097A1F 0001 cn Solo Mode\Vehicles\Ambulance 80097A20 0001 cn Solo Mode\Vehicles\Watchback 80097A21 0001 cn Solo Mode\Vehicles\Street Rocket 80097A22 0001 cn Solo Mode\Vehicles\Police Car 80097A23 0001 cn Solo Mode\Tracks\Metro Challenge 80095CCC 0001 cn Solo Mode\Tracks\Seascape 80095CCD 0001 cn Solo Mode\Tracks\Boyou Run 80095CCE 0001 cn Solo Mode\Tracks\Terminal Impact 80095CCF 0001 cn Solo Mode\Tracks\Destruction Junction 80095CD0 0001 cn Solo Mode\Tracks\Sunset Canyon 80095CD1 0001 cn Solo Mode\Tracks\Apline Ridge 80095CD2 0001 cn Solo Mode\Tracks\Midnyte Rumble 80095CD3 0001 cn Multiplayer\Tracks\The Junkyard 80095CC8 0001 cn Multiplayer\Tracks\Have Aztec Ruins 80095CC9 0001 cn Multiplayer\Tracks\Urban Mayhem 80095CCA 0001 cn Multiplayer\Tracks\Ground Zero 80095CCB 0001 cn Multiplayer\Junkyard\Infinite Health\Player 1 80205B8B 00BE cn Multiplayer\Junkyard\Infinite Health\Player 2 8021505F 00BE cn Multiplayer\Aztec Ruins\Infinite Health\Player 1 801FC437 00BE cn Multiplayer\Aztec Ruins\Infinite Health\Player 2 80217C5F 00BE cn Multiplayer\Urban Mayhem\Infinite Health\Player 1 8021779F 00BE cn Multiplayer\Urban Mayhem\Infinite Health\Player 2 80235E5F 00BE cn Multiplayer\Ground Zero\Infinite Health\Player 1 801F64D7 00BE cn Multiplayer\Ground Zero\Infinite Health\Player 2 80211D1F 00BE cn Solo Mode\Seascape Sprint\Infinite Health D02D4C24 0080 802D4C33 00E1 cn Solo Mode\Metro Challenge\Infinite Health D02EDB18 0080 802EDB27 00E1 cn Solo Mode\Terminal Impact\Infinite Health D02B5AA3 0080 802B5AB2 00E1 cn Solo Mode\Destruction Junction\Infinite Health D029A9B0 0080 8029A9BF 00E1 cn Solo Mode\Midnyte Rumble\Infinite Health D030C70B 0080 8030C71A 00E1 cn Solo Mode\Bayou Run\Infinite Health D0285E7C 0080 80285E8B 00E1 cn Solo Mode\Alpine Ridge\Infinite Health D02B9D24 0080 802B9D33 00E1 cn Solo Mode\Sunset Canyon\Infinite Health D0303A68 0080 80303A77 00E1 crc 53D440E7-7519B011-C:45 gn Diddy Kong Racing (U) (V1.0) cn Enable All Cheats cd Go into Options & then Magic Codes. Then Code list to turn off & on what you want. 50000401 0000 810DFD9C FFFF cn Have All\Trophies cd Only put this code on once you are inside the lobby to choose a gate,or it will crash the game. 811FC9DE FFFF cn Have All\Keys cd Only put this code on once you are inside the lobby to choose a gate,or it will crash the game. 811FC9D8 FFFF cn Have All\Amulets cd Only put this code on once you are inside the lobby to choose a gate,or it will crash the game. 811FC9E6 FFFF cn Boss Cannot Move\Dino 811DFCF4 44A0 cn Boss Cannot Move\Octo 811E045C 44A0 cn Have All\99 Balloons 810DFD9A FFFF 801FCBED 0063 cn Have All\Levels Completely Finished 50000904 0000 801FCAF7 00FF 801FCB1F 00FF 801FCB27 00FF 50000404 0000 801FCB2F 00FF 801FCB4F 00FF 50000804 0000 801FCB53 00FF cn Have All\Silver Coins\Ancient Lake cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E34AA 0008 cn Have All\Silver Coins\Fossil Canyon cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E694A 0008 cn Have All\Silver Coins\Jungle Falls cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E513A 0008 cn Have All\Silver Coins\Hot Top Volcano cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E480A 0008 cn Have All\Silver Coins\Everfrost Peak cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E513A 0008 cn Have All\Silver Coins\Walrus Cove cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E4C5A 0008 cn Have All\Silver Coins\Snowball Valley cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E4BDA 0008 cn Have All\Silver Coins\Frosty Village cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E612A 0008 cn Have All\Silver Coins\Whale Bay cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E3CDA 0008 cn Have All\Silver Coins\Pirate Lagoon cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E2B3A 0008 cn Have All\Silver Coins\Crescent Island cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E3C0A 0008 cn Have All\Silver Coins\Treasure Caves cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E38FA 0008 cn Have All\Silver Coins\Boulder Canyon cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E63CA 0008 cn Have All\Silver Coins\Greenwood Village cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E4C8A 0008 cn Have All\Silver Coins\Windmill Plains cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E9D9A 0008 cn Have All\Silver Coins\Haunted Woods cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E4BFA 0008 cn Have All\50 Bananas\Ancient Lake cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E32CD 0032 cn Have All\50 Bananas\Fossil Canyon cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E676D 0032 cn Have All\50 Bananas\Jungle Falls cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E44CD 0032 cn Have All\50 Bananas\Hot Top Volcano cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E462D 0032 cn Have All\50 Bananas\Whale Bay cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E3AFD 0032 cn Have All\50 Bananas\Pirate Lagoon cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E295D 0032 cn Have All\50 Bananas\Crescent Island cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E3A2D 0032 cn Have All\50 Bananas\Treasure Caves cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E371D 0032 cn Have All\50 Bananas\Everfrost Peak cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E4F5D 0032 cn Have All\50 Bananas\Walrus Cove cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E4A7D 0032 cn Have All\50 Bananas\Snowball Valley cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E49FD 0032 cn Have All\50 Bananas\Frosty Village cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E5F4D 0032 cn Have All\50 Bananas\Boulder Canyon cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E61ED 0032 cn Have All\50 Bananas\Greenwood Village cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E4AAD 0032 cn Have All\50 Bananas\Windwill Plains cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E9BBD 0032 cn Have All\50 Bananas\Haunted Woods cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E4A1D 0032 cn Have All\50 Bananas\Spacedust Alley cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E654D 0032 cn Have All\50 Bananas\Darkmoon Caverns cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E5D0D 0032 cn Have All\50 Bananas\Star City cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E578D 0032 cn Have All\50 Bananas\Spaceport Alpha cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E3C6D 0032 cn Have All\The pieces of the TT thing 801FC9E6 0004 cn Infinite\Power Ups\Ancient Lake cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E6A2B 0010 cn Infinite\Power Ups\Boulder Canyon cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E8D4B 0010 cn Infinite\Power Ups\Crescent Island cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E718B 0010 cn Infinite\Power Ups\Darkmoon Caverns cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E96AB 0010 cn Infinite\Power Ups\Everfrost Peak cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E871B 0010 cn Infinite\Power Ups\Fossil Canyon cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E9ECB 0010 cn Infinite\Power Ups\Frosty Village cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E96A6 0010 cn Infinite\Power Ups\Greenwood Village cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E820B 0010 cn Infinite\Power Ups\Hot Top Volcano cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E477B 0010 cn Infinite\Power Ups\Haunted Woods cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E817B 0010 cn Infinite\Power Ups\Jungle Falls cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E45BB 0010 cn Infinite\Power Ups\Pirate Lagoon cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E54B6 0010 cn Infinite\Power Ups\Snowball Valley cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E815B 0010 cn Infinite\Power Ups\Spaceport Alpha cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E676B 0010 cn Infinite\Power Ups\Space Dust Alley cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E904B 0010 cn Infinite\Power Ups\Starcity cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E8EEB 0010 cn Infinite\Power Ups\Treasure Cove cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E6E7B 0010 cn Infinite\Power Ups\Walrus Cove cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E81DB 0010 cn Infinite\Power Ups\Whale Bay cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E665B 0010 cn Infinite\Power Ups\Windmill Plains cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801EC6BB 0010 crc E402430D-D2FCFC9D-C:45 gn Diddy Kong Racing (U) (V1.1) cn Enable All Cheats cd Go into Options & then Magic Codes. Then Code list to turn off & on what you want. 810E031C FFFF 810E031E FFFF cn Have All\Trophies cd Only put this code on once you are inside the lobby to choose a gate,or it will crash the game. 811FC9DE FFFF cn Have All\Keys cd Only put this code on once you are inside the lobby to choose a gate,or it will crash the game. 811FD1C8 FFFF cn Have All\Amulets cd Only put this code on once you are inside the lobby to choose a gate,or it will crash the game. 811FD1D6 FFFF cn Boss Cannot Move\Dino 811E0444 44A0 cn Boss Cannot Move\Octo 811E0BAC 44A0 cn Have All\99 Balloons 810E058A FFFF 801FD3DD 0063 cn Have All\Levels Completely Finished 50000904 0000 801FD2E7 00FF 801FD30F 00FF 801FD317 00FF 50000404 0000 801FD31F 00FF 801FD33F 00FF 50000804 0000 801FD343 00FF cn Have All\Silver Coins\Ancient Lake cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E3BFA 0008 cn Have All\Silver Coins\Fossil Canyon cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E709A 0008 cn Have All\Silver Coins\Jungle Falls cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E588A 0008 cn Have All\Silver Coins\Hot Top Volcano cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E4F5A 0008 cn Have All\Silver Coins\Everfrost Peak cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E588A 0008 cn Have All\Silver Coins\Walrus Cove cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E53AA 0008 cn Have All\Silver Coins\Snowball Valley cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E532A 0008 cn Have All\Silver Coins\Frosty Village cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E687A 0008 cn Have All\Silver Coins\Whale Bay cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E442A 0008 cn Have All\Silver Coins\Pirate Lagoon cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E328A 0008 cn Have All\Silver Coins\Crescent Island cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E435A 0008 cn Have All\Silver Coins\Treasure Caves cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E404A 0008 cn Have All\Silver Coins\Boulder Canyon cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E6B1A 0008 cn Have All\Silver Coins\Greenwood Village cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E53DA 0008 cn Have All\Silver Coins\Windmill Plains cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801EA4EA 0008 cn Have All\Silver Coins\Haunted Woods cd Do not use more than 1 Silver Coins up at a time or it will cause a crash 801E534A 0008 cn Have All\50 Bananas\Ancient Lake cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E3A1D 0032 cn Have All\50 Bananas\Fossil Canyon cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E6EBD 0032 cn Have All\50 Bananas\Jungle Falls cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E4C1D 0032 cn Have All\50 Bananas\Hot Top Volcano cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E4D7D 0032 cn Have All\50 Bananas\Whale Bay cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E424D 0032 cn Have All\50 Bananas\Pirate Lagoon cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E30AD 0032 cn Have All\50 Bananas\Crescent Island cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E417D 0032 cn Have All\50 Bananas\Treasure Caves cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E3E6D 0032 cn Have All\50 Bananas\Everfrost Peak cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E56AD 0032 cn Have All\50 Bananas\Walrus Cove cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E51CD 0032 cn Have All\50 Bananas\Snowball Valley cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E514D 0032 cn Have All\50 Bananas\Frosty Village cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E669D 0032 cn Have All\50 Bananas\Boulder Canyon cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E693D 0032 cn Have All\50 Bananas\Greenwood Village cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E51FD 0032 cn Have All\50 Bananas\Windwill Plains cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801EA30D 0032 cn Have All\50 Bananas\Haunted Woods cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E516D 0032 cn Have All\50 Bananas\Spacedust Alley cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E6C9D 0032 cn Have All\50 Bananas\Darkmoon Caverns cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E645D 0032 cn Have All\50 Bananas\Star City cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E5EDD 0032 cn Have All\50 Bananas\Spaceport Alpha cd Do not use more than 1 50 Bananas up at a time or it will cause a crash 801E43BD 0032 cn Have All\The pieces of the TT thing 801FD1D6 0004 cn Infinite\Power Ups\Ancient Lake cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E717B 0010 cn Infinite\Power Ups\Boulder Canyon cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E949B 0010 cn Infinite\Power Ups\Crescent Island cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E78DB 0010 cn Infinite\Power Ups\Darkmoon Caverns cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E9DFB 0010 cn Infinite\Power Ups\Everfrost Peak cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E8E6B 0010 cn Infinite\Power Ups\Fossil Canyon cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801EA61B 0010 cn Infinite\Power Ups\Frosty Village cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E9DF6 0010 cn Infinite\Power Ups\Greenwood Village cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E895B 0010 cn Infinite\Power Ups\Hot Top Volcano cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E4ECB 0010 cn Infinite\Power Ups\Haunted Woods cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E88CB 0010 cn Infinite\Power Ups\Jungle Falls cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E4D0B 0010 cn Infinite\Power Ups\Pirate Lagoon cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E5C06 0010 cn Infinite\Power Ups\Snowball Valley cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E88AB 0010 cn Infinite\Power Ups\Spaceport Alpha cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E6EBB 0010 cn Infinite\Power Ups\Space Dust Alley cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E979B 0010 cn Infinite\Power Ups\Starcity cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E963B 0010 cn Infinite\Power Ups\Treasure Cove cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E75CB 0010 cn Infinite\Power Ups\Walrus Cove cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E892B 0010 cn Infinite\Power Ups\Whale Bay cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801E6DAB 0010 cn Infinite\Power Ups\Windmill Plains cd For Track Race Only.Do not use more than 1 Infinite Power up at a time or it will cause a crash 801ECE0B 0010 crc C16C421B-A21580F7-C:45 gn Disney's Donald Duck - Goin' Quackers (U) cn Infinite\99 Lives 801D72AE 0063 cn Infinite\99 Stars 801D72AF 0063 cn Instant\Rage Attack (Press C-Left) D00CB2A1 0002 801CE5BD 0001 cn Instant\Hyperactive State [Invincible] (Press C-Right) D00CB2A1 0001 801CE616 0001 cn Instant\Carrier Box [Moon Walk] (Press L) cd Press and hold the L Button and you will run floating of any ledge slowing drifting down. If you keep pressing the A Button while Holding L it will act as a Moon Jump. D00CB2A1 0020 801C939F 0001 cn Infinite\Time\Gladstones Time Attack 801D72A7 00FF cn Infinite\Time\Nephews Toy Hunting 801D72A3 0063 cn Have All\Levels and Bonus Stages Unlocked cd Press start in Gyro's Lab and then resume game to see all open 801D72CC 00FF 801D72CD 00FF 801D72CE 00FF 801D72CF 00FF 801D72D3 00FF cn Have All\Time Attack & Toy Hunting Comnpleated (All Levels) cd Press start in Gyro's Lab and then resume game to see all open 801D72D8 00FF 801D72D9 00FF 801D72DA 00FF 801D72DB 00FF 801D72DC 00FF 801D72DD 00FF 801D72DE 00FF 801D72DF 00FF crc CBFE69C7-F2C0AB2A-C:45 gn Disney's Tarzan (U) cn Infinite\Health 811921C0 0120 cn Have\Coins Collected 100% 800DD257 0064 cn Have\Level & Tokens Completed 100% 800DD22F 0000 800DD230 0001 800DD231 0000 cn Access Level Select cd On the main menu Scroll down to make CHEATS visible to go into Level Select.For in-Game Cheats,Pause gameplay. 810DD21C 8001 cn Infinite\Lives 800DD252 ???? 0003:"3 Lives",0063:"99 Lives" cn Have\All TARZAN Letters 800DD225 00FF cn Have\Full Portrait 800DD224 00FF cn Infinite\Red Weapon 81192098 0063 cn Infinite\Green Weapon 81192096 0063 cn Infinite\Purple Weapon 8119209A 0063 cn Press GS For\Sabor Attacks\Sabor 1 Hit Kill 8924A23E 0001 cn Infinite\Bonus Timer cd This is For All Timers on Bonus Levels 801735FE 0025 crc EC58EABF-AD7C7169-C:45 gn Donkey Kong 64 (U) cn Donkey Kong\Infinite Ammo 807FCC45 0096 cn Infinite\Health 817FCC4C 041F cn Donkey Kong\Infinite Musical Instrument 817FC954 0103 817FC958 00FF cn Diddy\Infinite Musical Instrument 817FC9B6 000A cn Tiny\Infinite Musical Instrument 817FCA72 000A cn Lanky\Infinite Musical Instrument 817FCA14 000A cn Chunky\Infinite Musical Instrument 817FCAD0 000A cn Infinite\Camera Film 807FCC49 0005 cn Infinite\Orange Bombs 807FCC41 0096 cn Donkey Kong\Infinite Bananas\Jungle Japes 817FC95A 03E7 cn Donkey Kong\Infinite Bananas\Angry Aztec 817FC95C 03E7 cn Donkey Kong\Infinite Bananas\FactoryLevel 817FC95E 03E7 cn Donkey Kong\Infinite Bananas\Galleon Level 817FC9BE 03E7 cn Donkey Kong\Infinite Bananas\Fungi Forest 817FC962 03E7 cn Donkey Kong\Infinite Bananas\Creepy Castle 817FC966 03E7 cn Donkey Kong\Infinite Bananas\Crystal Caves 817FC964 03E7 cn Donkey Kong\All Golden Bananas\Jungle Japes 817FC992 03E7 cn Donkey Kong\All Golden Bananas\Angry Aztecs 817FC994 03E7 cn Donkey Kong\All Golden Bananas\Frantic Factory 817FC996 03E7 cn Donkey Kong\All Golden Bananas\Gloomy Galleon 817FC998 03E7 cn Donkey Kong\All Golden Bananas\Crystal Caves 817FC99C 03E7 cn Donkey Kong\All Golden Bananas\Creepy Castle 817FC99E 03E7 cn Donkey Kong\All Golden Bananas\DK Isle 817FC9A0 03E7 cn Diddy\All Golden Bananas\Jungle Japes 817FC9F0 0064 cn Diddy\All Golden Bananas\Angry Aztecs 817FC9F2 0064 cn Diddy\All Golden Bananas\Frantic Factory 817FC9F4 0064 cn Diddy\All Golden Bananas\Gloomy Galleon 817FC9F6 0064 cn Diddy\All Golden Bananas\Fungi Forest 817FC9F8 0064 cn Diddy\All Golden Bananas\Crystal Caves 817FC9FA 0064 cn Diddy\All Golden Bananas\Creepy Castle 817FC9FC 0064 cn Diddy\All Golden Bananas\DK Isle 817FC9FE 0064 cn Tiny\All Golden Bananas\Jungle Japes 817FCAAC 0064 cn Tiny\All Golden Bananas\Angry Aztecs 817FCAAE 0064 cn Tiny\All Golden Bananas\Frantic Factory 817FCAB0 0064 cn Tiny\All Golden Bananas\Gloomy Galleon 817FCAB2 0064 cn Tiny\All Golden Bananas\Fungi Forest 817FCAB4 0064 cn Tiny\All Golden Bananas\Crystal Caves 817FCAB6 0064 cn Tiny\All Golden Bananas\Creepy Castle 817FCAA8 0064 cn Tiny\All Golden Bananas\DK Isle 817FCABA 0064 cn Lanky\All Golden Bananas\Jungle Japes 817FCA4E 0064 cn Lanky\All Golden Bananas\Angry Aztecs 817FCA50 0064 cn Lanky\All Golden Bananas\Frantic Factory 817FCA52 0064 cn Lanky\All Golden Bananas\Gloomy Galleon 817FCA54 0064 cn Lanky\All Golden Bananas\Fungi Forest 817FCA56 0064 cn Lanky\All Golden Bananas\Crystal Caves 817FCA58 0064 cn Lanky\All Golden Bananas\Creepy Castle 817FCA5A 0064 cn Lanky\All Golden Bananas\DK Isle 817FCA5C 0064 cn Chunky\All Golden Bananas\Jungle Japes 817FCB0A 0064 cn Chunky\All Golden Bananas\Angry Aztecs 817FCB0C 0064 cn Chunky\All Golden Bananas\Frantic Factory 817FCB0E 0064 cn Chunky\All Golden Bananas\Gloomy Galleon 817FCB10 0064 cn Chunky\All Golden Bananas\Fungi Forest 817FCB12 0064 cn Chunky\All Golden Bananas\Crystal Caves 817FCB14 0064 cn Chunky\All Golden Bananas\Creepy Castle 817FCB16 0064 cn Chunky\All Golden Bananas\DK Isle 817FCB18 0064 cn Donkey Kong\Infinite Coins 817FC956 03E7 cn Diddy\Infinite Coins 817FC9B4 03E7 cn Tiny\Infinite Coins 817FCA70 03E7 cn Lanky\Infinite Coins 817FCA12 03E7 cn Chunky\Infinite Coins 817FCACE 03E7 cn Infinite\Crystal Coconuts 807FCB87 0096 cn Donkey Kong\Has Moves 817FC950 0103 cn Donkey Kong\Have Weapon 817FC952 0103 cn Free Pass (Access All Areas) cd This is exactly what it says, You can walk through Any Locked Door,Gate, Or Area. Have Fun. 8066D226 0001 8066D321 0001 crc A83E101A-E937B69D-C:45 gn Doom64 (U) v1.0 cn Always Have\Gun 800632C3 0001 cn Always Have\Shotgun 800632C7 0001 cn Always Have\Double Shotgun 800632CB 0001 cn Always Have\Chain Gun 800632CF 0001 cn Always Have\Missile Launcher 800632D3 0001 cn Always Have\Chainsaw 800632BB 0001 cn Always Have\Plasma Rifle 800632D7 0001 cn Always Have\BFG 9000 800632DB 0001 cn Always Have\Have Rocket Launcher 800632D1 0001 cn Always Have\Laser Weapon 800632DD 0001 cn Always Have\Bio Suite 80063283 ???? 00FF:"On",0000:"Off" cn Infinite\Armor 8006326F 00FF cn Rapid Fire 8106333A 0B94 cn Invincible 8006330B 0002 cn Turn Map Markers On 8006330B 0004 cn Invincible And Map Markers 8006330B 0006 cn Berserk Mode 8006327B 00FF cn [Max Brightness] cd Enable this cheat on rom load to have Max Brightness (internal) and then put Jabo d3d8 on 160% Max for a extra brightness Boost. 8005A7C8 0064 cn Have All\Weapons 50000A04 0000 810632BA 0001 cn Infinite\Ammo All Weapons 50000404 0000 810632E2 013C cn Have All\Keys 50000504 0000 8106328E FFFF cn Enable Cheat Menu 8005A7D3 0001 crc 423E96F4-CE88F05B-C:45 gn Doom64 (U) v1.1 cn Always Have\Gun 80063373 0001 cn Always Have\Shotgun 80063377 0001 cn Always Have\Double Shotgun 8006337B 0001 cn Always Have\Chain Gun 8006337F 0001 cn Always Have\Missile Launcher 80063383 0001 cn Always Have\Chainsaw 8006336B 0001 cn Always Have\Plasma Rifle 80063387 0001 cn Always Have\BFG 9000 8006338B 0001 cn Always Have\Have Rocket Launcher 80063381 0001 cn Always Have\Laser Weapon 8006338F FFFF cn Always Have\Bio Suite 80063333 ???? 00FF:"On",0000:"Off" cn Infinite\Armor 8006331F 00FF cn Rapid Fire 810633EA 0B94 cn Invincible 800633BB 0002 cn Turn Map Markers On 800633BB 0004 cn Invincible And Map Markers 800633BB 0006 cn Berserk Mode 8006332B 00FF cn [Max Brightness] cd Enable this cheat on rom load to have Max Brightness (internal) and then put Jabo d3d8 on 160% Max for a extra brightness Boost. 8005A878 0064 cn Infinite\Ammo All Weapons 80063393 00FF 80063397 00FF 8006339B 00FF 8006339F 00FF cn Have All Keys 8006333F 0001 80063343 0001 80063344 0001 80063353 0001 8006334F 0001 80063348 0001 cn Enable Cheat Menu 8005A883 0001 crc A62230C3-F0834488-C:45 gn Dual Heroes (U) cn Player 1\Infinite Energy D022671C 0000 8122671C 00FA cn Player 2\Infinite Energy D022671E 0000 8122671E 00FA cn Infinite Time D0226724 0000 81226724 003C cn Player 1\Never Wins D0226715 0001 80226715 0000 cn Player 2\1 Win To Win D0226717 0000 80226717 0001 cn Player 2\Never Wins D0226717 0001 80226717 0000 cn Player 1\1 Win To Win D0226715 0000 80226715 0001 cn Player 1\No Energy D022671C 0000 8122671C 0000 cn Player 2\No Energy D022671E 0000 8122671E 0000 cn Player 1\Infinite Time To Continue 802267CB 0009 803CF2A1 0009 cn Only Play One Round D0226791 0000 81226718 0001 cn Player 2\Lifebar Flashes Red D022672E 0000 8122672E 00CF crc FBB9F1FA-6BF88689-C:45 gn Duck Dodgers Starring Daffy Duck (U) cn Infinite\Lives 80026A67 0063 cn Infinite\Quarks 81159282 FFFF cn Infinite\Atoms 81159286 FFFF crc A273AB56-DA33DB9A-C:45 gn Duke Nukem 64 (U) cn In-Game Cheats\Open Cheat Menu 801012D8 0001 cn In-Game Cheats\Open Invincibility Cheat 801012DC 0001 cn In-Game Cheats\Open Monsters Cheat 801012E0 0001 cn In-Game Cheats\Open All Items Cheat 801012E4 0001 cn In-Game Cheats\Open Goto Level ?? Cheat 801012E8 0001 cn Infinite Night Vision 812A5A5C 0640 cn Infinite Holoduke 812A5A2C 0640 cn Infinite Portable Medikit 812A5A4A 0064 cn Infinite Protective Boots 812A5AA2 00C8 cn In-Game Cheats\Invincibility Cheat On 802AAA68 0001 cn In-Game Cheats\Invincibility Cheat Off 802AAA68 0000 cn In-Game Cheats\Monsters Cheat On 802AABDB 0000 cn In-Game Cheats\Monsters Cheat Off 802AABDB 0001 cn Infinite\Armor 812A5A92 0064 cn Infinite\Vitamin K 812A5A90 0190 cn Infinite\Jet Pack 812A5A8E 0640 cn Infinite\Scuba Gear 812A5A8C 1900 cn Have All Keys 802A5A47 000F cn Player 1\Infinite Health\Hollywood Holocaust 80247463 00FF cn Player 1\Infinite Health\Gun Crazy 80247D53 00FF cn Player 1\Infinite Health\Death Row 80246E5F 00FF cn Player 1\Infinite Health\Toxic Dump 80246D83 00FF cn Player 1\Infinite Health\Launch Facility 80248223 00FF cn Player 1\Infinite Health\The Abyss 80246E07 00FF cn Player 1\Infinite Health\Battleload 80246F67 00FF cn Player 1\Infinite Health\Duke Burger 8024761B 00FF cn Player 1\Infinite Health\Spaceport 8024735B 00FF cn Player 1\Infinite Health\Incubator 80246D2B 00FF cn Player 1\Infinite Health\Warp Factor 8024709B 00FF cn Player 1\Infinite Health\Fusion Station 80247723 00FF cn Player 1\Infinite Health\Occupied Territory 80246DDB 00FF cn Player 1\Infinite Health\Tiberius Station 80246CA7 00FF cn Player 1\Infinite Health\Lunar Reactor 80246C4F 00FF cn Player 1\Infinite Health\Dark Side 802473B3 00FF cn Player 1\Infinite Health\Dread Nought 80246D2B 00FF cn Player 1\Infinite Health\Overlord 80247513 00FF cn Player 1\Infinite Health\Lunatic Fringe 80246D2B 00FF cn Player 1\Infinite Health\Raw Meat 80246DDB 00FF cn Player 1\Infinite Health\Bank Roll 802471A3 00FF cn Player 1\Infinite Health\Flood Zone 80246D2B 00FF cn Player 1\Infinite Health\L.A. Rumble 80246EE3 00FF cn Player 1\Infinite Health\Movie Set 80246DAF 00FF cn Player 1\Infinite Health\Rabit Transit 8024869B 00FF cn Player 1\Infinite Health\Fahrenheith 8024735B 00FF cn Player 1\Infinite Health\Hotel Hell 80246D83 00FF cn Player 1\Infinite Health\Stadium 8024979F 00FF cn Player 1\Infinite Health\Area 51 8024774F 00FF cn Player 1\Infinite Health\Free Way 80247E5B 00FF cn Player 1\Infinite Health\Castle Dukenstein 802490BF 00FF cn Player 1\Infinite Health\Piracy 80247673 00FF cn Player 1\Infinite Health\Shaft 80247AEB 00FF cn Player 1\Infinite Health\Noctis Labyrinthus 80247C1F 00FF cn Player 2\Infinite Health\Hollywood Holocaust 8124D526 00FF cn Player 2\Infinite Health\Gun Crazy 8124E57A 00FF cn Player 2\Infinite Health\Death Row 8124AFAE 00FF cn Player 2\Infinite Health\Toxic Dump 81251BCA 00FF cn Player 2\Infinite Health\Launch Facility 8124AEA6 00FF cn Player 2\Infinite Health\The Abyss 8124FD5E 00FF cn Player 2\Infinite Health\BattleLord 81246CFE 00FF cn Player 2\Infinite Health\Spaceport 8124B13A 00FF cn Player 2\Infinite Health\Incubator 8124CEF6 00FF cn Player 2\Infinite Health\Warp Factor 8124ED8E 00FF cn Player 2\Infinite Health\Fusion Station 81250336 00FF cn Player 2\Infinite Health\Occupied Territory 8124AC96 00FF cn Player 2\Infinite Health\Tiberius Station 8124C8F2 00FF cn Player 2\Infinite Health\Lunar Reactor 81247C1E 00FF cn Player 2\Infinite Health\Dark Side 8124E1DE 00FF cn Player 2\Infinite Health\Dreadnought 81249562 00FF cn Player 2\Infinite Health\Overlord 81247646 00FF cn Player 2\Infinite Health\Raw Meat 8124E052 00FF cn Player 2\Infinite Health\Bank Roll 8124DE6E 00FF cn Player 2\Infinite Health\Flood Zone 8124D736 00FF cn Player 2\Infinite Health\L.A. Rumble 8124BF52 00FF cn Player 2\Infinite Health\Movie Set 81248382 00FF cn Player 2\Infinite Health\Rabid Transit 8124D86A 00FF cn Player 2\Infinite Health\Fahrenheit 8124A1C2 00FF cn Player 2\Infinite Health\Hotel Hell 8124D526 00FF cn Player 2\Infinite Health\Stadium 8124924A 00FF cn Player 2\Infinite Health\Castle Dukenstein 81249092 00FF cn Player 2\Infinite Health\Piracy 81248ABA 00FF cn Player 2\Infinite Health\Shaft 812477A6 00FF cn Player 3\Infinite Health\Hollywood Holocaust 8124BC0E 00FF cn Player 3\Infinite Health\Gun Crazy 8124C086 00FF cn Player 3\Infinite Health\Death Row 8124AF2A 00FF cn Player 3\Infinite Health\Toxic Dump 8125051A 00FF cn Player 3\Infinite Health\Launch Facility 8124AD9E 00FF cn Player 3\Infinite Health\The Abyss 8124FD32 00FF cn Player 3\Infinite Health\BattleLord 81246CD2 00FF cn Player 3\Infinite Health\Spaceport 8124B10E 00FF cn Player 3\Infinite Health\Incubator 8124B1EA 00FF cn Player 3\Infinite Health\Warp Factor 812482FE 00FF cn Player 3\Infinite Health\Fusion Station 8125030A 00FF cn Player 3\Infinite Health\Occupied Territory 8124AC6A 00FF cn Player 3\Infinite Health\Tiberius Station 8124C8C6 00FF cn Player 3\Infinite Health\Lunar Reactor 81247BF2 00FF cn Player 3\Infinite Health\Dark Side 8124E1B2 00FF cn Player 3\Infinite Health\Dreadnought 81249536 00FF cn Player 3\Infinite Health\Overlord 81246EB6 00FF cn Player 3\Infinite Health\Raw Meat 8124E026 00FF cn Player 3\Infinite Health\Bank Roll 8124992A 00FF cn Player 3\Infinite Health\Flood Zone 8124D70A 00FF cn Player 3\Infinite Health\L.A. Rumble 8124BF26 00FF cn Player 3\Infinite Health\Movie Set 81248356 00FF cn Player 3\Infinite Health\Rabid Transit 8124D83E 00FF cn Player 3\Infinite Health\Fahrenheit 8124A196 00FF cn Player 3\Infinite Health\Hotel Hell 8124D4FA 00FF cn Player 3\Infinite Health\Stadium 8124921E 00FF cn Player 3\Infinite Health\Castle Dukenstein 81248432 00FF cn Player 3\Infinite Health\Piracy 81248A8E 00FF cn Player 3\Infinite Health\Shaft 8124777A 00FF cn Player 4\Infinite Health\Hollywood Holocaust 8124B76A 00FF cn Player 4\Infinite Health\Gun Crazy 8124B922 00FF cn Player 4\Infinite Health\Death Row 8124AEFE 00FF cn Player 4\Infinite Health\Toxic Dump 8124DDBE 00FF cn Player 4\Infinite Health\Launch Facility 8124AD1A 00FF cn Player 4\Infinite Health\The Abyss 8124E3C2 00FF cn Player 4\Infinite Health\BattleLord 81246CA6 00FF cn Player 4\Infinite Health\Spaceport 8124979E 00FF cn Player 4\Infinite Health\Incubator 81247F0A 00FF cn Player 4\Infinite Health\Warp Factor 812482D2 00FF cn Player 4\Infinite Health\Fusion Station 81248172 00FF cn Player 4\Infinite Health\Occupied Territory 8124AC3E 00FF cn Player 4\Infinite Health\Tiberius Station 8124C89A 00FF cn Player 4\Infinite Health\Lunar Reactor 81247BC6 00FF cn Player 4\Infinite Health\Dark Side 81247932 00FF cn Player 4\Infinite Health\Dreadnought 8124950A 00FF cn Player 4\Infinite Health\Overlord 81246E8A 00FF cn Player 4\Infinite Health\Raw Meat 8124DFFA 00FF cn Player 4\Infinite Health\Bank Roll 812498FE 00FF cn Player 4\Infinite Health\Flood Zone 81247F36 00FF cn Player 4\Infinite Health\L.A. Rumble 8124A3A6 00FF cn Player 4\Infinite Health\Movie Set 8124832A 00FF cn Player 4\Infinite Health\Rabid Transit 8124B1BE 00FF cn Player 4\Infinite Health\Fahrenheit 8124A16A 00FF cn Player 4\Infinite Health\Hotel Hell 8124C68A 00FF cn Player 4\Infinite Health\Stadium 812491C6 00FF cn Player 4\Infinite Health\Castle Dukenstein 81248406 00FF cn Player 4\Infinite Health\Piracy 81248A62 00FF cn Player 4\Infinite Health\Shaft 8124774E 00FF cn Player 1\Have\Boots 802A5AB9 0001 cn Player 1\Have\Pistol 802A5ABA 0001 cn Player 1\Have\Shotgun 802A5ABB 0001 cn Player 1\Have\SMG 802A5ABC 0001 cn Player 1\Have\Grenade Launcher 802A5ABD 0001 cn Player 1\Have\Pipe Bombs 802A5ABE 0001 cn Player 1\Have\Shrinker 802A5ABF 0001 cn Player 1\Have\Expander 802A5AC0 0001 cn Player 1\Have\Missile Launcher 802A5AC1 0001 cn Player 1\Have\Plasma Cannon 802A5AC2 0001 cn Player 1\Have\Laser Trip Bomb 802A5AC3 0001 cn Player 1\Infinite Ammo\Pistol 802A5A01 00FF cn Player 1\Infinite Ammo\Shotgun 802A5A03 00FF cn Player 1\Infinite Ammo\SMG's 802A5A05 00FF cn Player 1\Infinite Ammo\Grenade Launcher 802A5A07 00FF cn Player 1\Infinite Ammo\Pipe Bombs 802A5A09 00FF cn Player 1\Infinite Ammo\Shrinker 802A5A0B 00FF cn Player 1\Infinite Ammo\Expander 802A5A0D 00FF cn Player 1\Infinite Ammo\Missile Launcher 802A5A0F 00FF cn Player 1\Infinite Ammo\Plasma Cannon 802A5A11 00FF cn Player 1\Infinite Ammo\Laser Trip Bomb 802A5A13 00FF cn Player 2\Have\Boots 802A5E45 0001 cn Player 2\Have\Pistol 802A5E46 0001 cn Player 2\Have\Shotgun 802A5E47 0001 cn Player 2\Have\SMG 802A5E48 0001 cn Player 2\Have\Grenade Launcher 802A5E49 0001 cn Player 2\Have\Pipe Bomb 802A5E4A 0001 cn Player 2\Have\Shrinker 802A5E4B 0001 cn Player 2\Have\Expander 802A5E4C 0001 cn Player 2\Have\Missle Launcher 802A5E4D 0001 cn Player 2\Have\Plasma Cannon 802A5E4E 0001 cn Player 2\Have\Laser Trip Bomb 802A5E4F 0001 cn Player 2\Infinite Ammo\Pistol 802A5D8C 00FF cn Player 2\Infinite Ammo\Shotgun 802A5D8F 00FF cn Player 2\Infinite Ammo\SMG's 802A5D91 00FF cn Player 2\Infinite Ammo\Grenade Launcher 802A5D93 00FF cn Player 2\Infinite Ammo\Pipe Bombs 802A5D95 00FF cn Player 2\Infinite Ammo\Shrinker 802A5D97 00FF cn Player 2\Infinite Ammo\Expander 802A5D99 00FF cn Player 2\Infinite Ammo\Missile Launcher 802A5D9B 00FF cn Player 2\Infinite Ammo\Laser Trip Bomb 802A5D9D 00FF cn Player 2\Infinite Ammo\Plasma Cannon 802A5D9F 00FF cn Player 3\Have\Boots 802A61D1 0001 cn Player 3\Have\Pistol 802A61D2 0001 cn Player 3\Have\Shotgun 802A61D3 0001 cn Player 3\Have\SMG 802A61D4 0001 cn Player 3\Have\Grenade Launcher 802A61D5 0001 cn Player 3\Have\Pipe Bomb 802A61D6 0001 cn Player 3\Have\Shrinker 802A61D7 0001 cn Player 3\Have\Expander 802A61D8 0001 cn Player 3\Have\Missle Launcher 802A61D9 0001 cn Player 3\Have\Plasma Cannon 802A61DA 0001 cn Player 3\Have\Laser Trip Bomb 802A61DB 0001 cn Player 3\Infinite Ammo\Pistol 802A6119 00FF cn Player 3\Infinite Ammo\Shotgun 802A611B 00FF cn Player 3\Infinite Ammo\SMG's 802A611D 00FF cn Player 3\Infinite Ammo\Grenade Launcher 802A611F 00FF cn Player 3\Infinite Ammo\Pipe Bombs 802A6121 00FF cn Player 3\Infinite Ammo\Shrinker 802A6123 00FF cn Player 3\Infinite Ammo\Expander 802A6125 00FF cn Player 3\Infinite Ammo\Missile Launcher 802A6127 00FF cn Player 3\Infinite Ammo\Laser Trip Bomb 802A6129 00FF cn Player 3\Infinite Ammo\Plasma Cannon 802A612B 00FF cn Player 4\Have\Boots 802A655D 0001 cn Player 4\Have\Pistol 802A655E 0001 cn Player 4\Have\SMG 802A655F 0001 cn Player 4\Have\Submachine Guns 802A6560 0001 cn Player 4\Have\Grenade Launcher 802A6561 0001 cn Player 4\Have\Pipe Bomb 802A6562 0001 cn Player 4\Have\Shrinker 802A6563 0001 cn Player 4\Have\Expander 802A6564 0001 cn Player 4\Have\Missle Launcher 802A6565 0001 cn Player 4\Have\Plasma Cannon 802A6566 0001 cn Player 4\Have\Laser Trip Bomb 802A6567 0001 cn Player 4\Infinite Ammo\Pistol 802A64A5 00FF cn Player 4\Infinite Ammo\Shotgun 802A64A7 00FF cn Player 4\Infinite Ammo\SMG's 802A64A9 00FF cn Player 4\Infinite Ammo\Grenade Launcher 802A64AB 00FF cn Player 4\Infinite Ammo\Pipe Bombs 802A64AD 00FF cn Player 4\Infinite Ammo\Shrinker 802A64AF 00FF cn Player 4\Infinite Ammo\Expander 802A64B1 00FF cn Player 4\Infinite Ammo\Missile Launcher 802A64B3 00FF cn Player 4\Infinite Ammo\Laser Trip Bomb 802A64B5 00FF cn Player 4\Infinite Ammo\Plasma Cannon 802A64B7 00FF crc DF574191-9EB5123D-C:45 gn Earthworm Jim 3D (U) cn Infinite Egg Chucker Ammo 800C69BF 00FA cn Infinite Cleaver Ammo 800C6A1F 00FA cn Infinite Blaster Ammo 810C6916 03E7 cn Infinite Rocket Launcher Ammo 810C6946 03E7 cn Infinite Banana Peel Ammo 810C6976 03E7 cn Infinite Green Slimer Ammo 810C69A6 03E7 cn Infinite Shotgun Ammo 810C69EE 03E7 cn Infinite Music Gun Ammo 810C6A06 03E7 cn Infinite Boomerang Knives Ammo 810C6A1E 03E7 cn Infinite Mushroom Ammo 810C6E36 03E7 cn Have 231 Marbles D00E9FF3 0000 800E9FF3 03E7 cn Infinite Health 800C690F 0064 cn Infinite Lives 800C6913 0063 cn Infinite Laser Ammo 800C6917 00FA cn Have All Gold Udders 50002802 0000 810C625A 0101 crc BDF9766D-BD068D70-C:45 gn ECW Hardcore Revolut (U) cn VS & Tournment Mode\Player 1\Infinite Health D02931FD 0029 81293380 0000 D02931FD 0029 81293382 0000 cn VS & Tournment Mode\Player 1\Infinite Health D02931FD 0029 81293380 00FF D02931FD 0029 81293382 00FF cn VS & Tournment Mode\Player 1\Super Strength D02931FD 0029 812933DA FFFF cn VS & Tournment Mode\Player 1\Invincible D02931FD 0029 812933DE FFFF cn VS & Tournment Mode\Player 1\Super Speed D02931FD 0029 812933E2 FFFF cn VS & Tournment Mode\Player 1\Super Stamina D02931FD 0029 812933E6 FFFF cn VS & Tournment Mode\Player 1\Instant Recovery D02931FD 0029 812933EA FFFF cn VS & Tournment Mode\Player 1\Can't Be Pinned D02931FD 0029 8129330A FFFF cn VS & Tournment Mode\Player 1\Can't Be Counted Out D02931FD 0029 8129327E 0384 cn VS & Tournment Mode\Player 2\Infinite Health D02931FD 0029 81294620 0000 D02931FD 0029 81294622 0000 cn VS & Tournment Mode\Player 2\Infinite Health D02931FD 0029 81294620 00FF D02931FD 0029 81294622 00FF cn VS & Tournment Mode\Player 2\Super Strength D02931FD 0029 8129467A FFFF cn VS & Tournment Mode\Player 2\Invincible D02931FD 0029 8129467E FFFF cn VS & Tournment Mode\Player 2\Super Speed D02931FD 0029 81294682 FFFF cn VS & Tournment Mode\Player 2\Super Stamina D02931FD 0029 81294686 FFFF cn VS & Tournment Mode\Player 2\Instant Recovery D02931FD 0029 8129468A FFFF cn VS & Tournment Mode\Player 2\Can't Be Pinned D02931FD 0029 812945AA FFFF cn VS & Tournment Mode\Player 2\Can't Be Counted Out D02931FD 0029 8129451E 0384 cn All Tag Team Modes\Player 1\Infinite Health D029A98D 0029 8129AB10 0000 D029A98D 0029 8129AB12 0000 cn All Tag Team Modes\Player 1\Infinite Health D029A98D 0029 8129AB10 00FF D029A98D 0029 8129AB12 00FF cn All Tag Team Modes\Player 1\Super Strength D029A98D 0029 8129AB6A FFFF cn All Tag Team Modes\Player 1\Invincible D029A98D 0029 8129AB6E FFFF cn All Tag Team Modes\Player 1\Super Speed D029A98D 0029 8129AB72 FFFF cn All Tag Team Modes\Player 1\Super Stamina D029A98D 0029 8129AB76 FFFF cn All Tag Team Modes\Player 1\Instant Recovery D029A98D 0029 8129AB7A FFFF cn All Tag Team Modes\Player 1\Can't Be Pinned D029A98D 0029 8129AA9A FFFF cn All Tag Team Modes\Player 1\Can't Be Counted Out D029A98D 0029 8129AA0E 0384 cn All Tag Team Modes\Player 2\Infinite Health D029A98D 0029 8129BDB0 0000 D029A98D 0029 8129BDB2 0000 cn All Tag Team Modes\Player 2\Infinite Health D029A98D 0029 8129BDB0 00FF D029A98D 0029 8129BDB2 00FF cn All Tag Team Modes\Player 2\Super Strength D029A98D 0029 8129BE0A FFFF cn All Tag Team Modes\Player 2\Invincible D029A98D 0029 8129BE0E FFFF cn All Tag Team Modes\Player 2\Super Speed D029A98D 0029 8129BE12 FFFF cn All Tag Team Modes\Player 2\Super Stamina D029A98D 0029 8129BE16 FFFF cn All Tag Team Modes\Player 2\Instant Recovery D029A98D 0029 8129BE1A FFFF cn All Tag Team Modes\Player 2\Can't Be Pinned D029A98D 0029 8129BD3A FFFF cn All Tag Team Modes\Player 2\Can't Be Counted Out D029A98D 0029 8129BCAE 0384 cn All Tag Team Modes\Player 3\Infinite Health D029A98D 0029 8129D050 0000 D029A98D 0029 8129D052 0000 cn All Tag Team Modes\Player 3\Infinite Health D029A98D 0029 8129D050 00FF D029A98D 0029 8129D052 00FF cn All Tag Team Modes\Player 3\Super Strength D029A98D 0029 8129D0AA FFFF cn All Tag Team Modes\Player 3\Invincible D029A98D 0029 8129D0AE FFFF cn All Tag Team Modes\Player 3\Super Speed D029A98D 0029 8129D0B2 FFFF cn All Tag Team Modes\Player 3\Super Stamina D029A98D 0029 8129D0B6 FFFF cn All Tag Team Modes\Player 3\Instant Recovery D029A98D 0029 8129D0BA FFFF cn All Tag Team Modes\Player 3\Can't Be Pinned D029A98D 0029 8129CFDA FFFF cn All Tag Team Modes\Player 3\Can't Be Counted Out D029A98D 0029 8129CF4E 0384 cn All Tag Team Modes\Player 4\Infinite Health D029A98D 0029 8129E2F0 0000 D029A98D 0029 8129E2F2 0000 cn All Tag Team Modes\Player 4\Infinite Health D029A98D 0029 8129E2F0 00FF D029A98D 0029 8129E2F2 00FF cn All Tag Team Modes\Player 4\Super Strength D029A98D 0029 8129E34A FFFF cn All Tag Team Modes\Player 4\Invincible D029A98D 0029 8129E34E FFFF cn All Tag Team Modes\Player 4\Super Speed D029A98D 0029 8129E352 FFFF cn All Tag Team Modes\Player 4\Super Stamina D029A98D 0029 8129E356 FFFF cn All Tag Team Modes\Player 4\Instant Recovery D029A98D 0029 8129E35A FFFF cn All Tag Team Modes\Player 4\Can't Be Pinned D029A98D 0029 8129E27A FFFF cn All Tag Team Modes\Player 4\Can't Be Counted Out D029A98D 0029 8129E1EE 0384 cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 1\Infinite Health D029A87D 0029 8129AA00 0000 D029A87D 0029 8129AA02 0000 cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 1\Infinite Health D029A87D 0029 8129AA00 00FF D029A87D 0029 8129AA02 00FF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 1\Super Strength D029A87D 0029 8129AA5A FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 1\Invincible D029A87D 0029 8129AA5E FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 1\Super Speed D029A87D 0029 8129AA62 FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 1\Super Stamina D029A87D 0029 8129AA66 FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 1\Instant Recovery D029A87D 0029 8129AA6A FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 1\Can't Be Pinned D029A87D 0029 8129A98A FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 1\Can't Be Counted Out D029A87D 0029 8129A8FE 0384 cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 2\Infinite Health D029A87D 0029 8129BCA0 0000 D029A87D 0029 8129BCA2 0000 cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 2\Infinite Health D029A87D 0029 8129BCA0 00FF D029A87D 0029 8129BCA2 00FF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 2\Super Strength D029A87D 0029 8129BCFA FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 2\Invincible D029A87D 0029 8129BCFE FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 2\Super Speed D029A87D 0029 8129BD02 FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 2\Super Stamina D029A87D 0029 8129BD06 FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 2\Instant Recovery D029A87D 0029 8129BD0A FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 2\Can't Be Pinned D029A87D 0029 8129BC2A FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 2\Can't Be Counted Out D029A87D 0029 8129BB9E 0384 cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 3\Infinite Health D029A87D 0029 8129CF40 0000 D029A87D 0029 8129CF42 0000 cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 3\Infinite Health D029A87D 0029 8129CF40 00FF D029A87D 0029 8129CF42 00FF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 3\Super Strength D029A87D 0029 8129CF9A FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 3\Invincible D029A87D 0029 8129CF9E FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 3\Super Speed D029A87D 0029 8129CFA2 FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 3\Super Stamina D029A87D 0029 8129CFA6 FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 3\Instant Recovery D029A87D 0029 8129CFAA FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 3\Can't Be Pinned D029A87D 0029 8129CECA FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 3\Can't Be Counted Out D029A87D 0029 8129CE3E 0384 cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 4\Infinite Health D029A87D 0029 8129E1E0 0000 D029A87D 0029 8129E1E2 0000 cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 4\Infinite Health D029A87D 0029 8129E1E0 00FF D029A87D 0029 8129E1E2 00FF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 4\Super Strength D029A87D 0029 8129E23A FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 4\Invincible D029A87D 0029 8129E23E FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 4\Super Speed D029A87D 0029 8129E242 FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 4\Super Stamina D029A87D 0029 8129E246 FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 4\Instant Recovery D029A87D 0029 8129E24A FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 4\Can't Be Pinned D029A87D 0029 8129E16A FFFF cn Tornado, Lumberjack, 1-On-3, 3-On-1 Modes\Player 4\Can't Be Counted Out D029A87D 0029 8129E0DE 0384 cn Battle Royal Mode\Player 1\Infinite Health D029A66D 0029 8129A7F0 0000 D029A66D 0029 8129A7F2 0000 cn Battle Royal Mode\Player 1\Infinite Health D029A66D 0029 8129A7F0 00FF D029A66D 0029 8129A7F2 00FF cn Battle Royal Mode\Player 1\Super Strength D029A66D 0029 8129A84A FFFF cn Battle Royal Mode\Player 1\Invincible D029A66D 0029 8129A84E FFFF cn Battle Royal Mode\Player 1\Super Speed D029A66D 0029 8129A852 FFFF cn Battle Royal Mode\Player 1\Super Stamina D029A66D 0029 8129A856 FFFF cn Battle Royal Mode\Player 1\Instant Recovery D029A66D 0029 8129A85A FFFF cn Battle Royal Mode\Player 1\Can't Be Pinned D029A66D 0029 8129A77A FFFF cn Battle Royal Mode\Player 1\Can't Be Counted Out D029A66D 0029 8129A6EE 0384 cn Battle Royal Mode\Player 2\Infinite Health D029A66D 0029 8129BA90 0000 D029A66D 0029 8129BA92 0000 cn Battle Royal Mode\Player 2\Infinite Health D029A66D 0029 8129BA90 00FF D029A66D 0029 8129BA92 00FF cn Battle Royal Mode\Player 2\Super Strength D029A66D 0029 8129BAEA FFFF cn Battle Royal Mode\Player 2\Invincible D029A66D 0029 8129BAEE FFFF cn Battle Royal Mode\Player 2\Super Speed D029A66D 0029 8129BAF2 FFFF cn Battle Royal Mode\Player 2\Super Stamina D029A66D 0029 8129BAF6 FFFF cn Battle Royal Mode\Player 2\Instant Recovery D029A66D 0029 8129BAFA FFFF cn Battle Royal Mode\Player 2\Can't Be Pinned D029A66D 0029 8129BA1A FFFF cn Battle Royal Mode\Player 2\Can't Be Counted Out D029A66D 0029 8129B98E 0384 cn Battle Royal Mode\Player 3\Infinite Health D029A66D 0029 8129CD30 0000 D029A66D 0029 8129CD32 0000 cn Battle Royal Mode\Player 3\Infinite Health D029A66D 0029 8129CD30 00FF D029A66D 0029 8129CD32 00FF cn Battle Royal Mode\Player 3\Super Strength D029A66D 0029 8129CD8A FFFF cn Battle Royal Mode\Player 3\Invincible D029A66D 0029 8129CD8E FFFF cn Battle Royal Mode\Player 3\Super Speed D029A66D 0029 8129CD92 FFFF cn Battle Royal Mode\Player 3\Super Stamina D029A66D 0029 8129CD96 FFFF cn Battle Royal Mode\Player 3\Instant Recovery D029A66D 0029 8129CD9A FFFF cn Battle Royal Mode\Player 3\Can't Be Pinned D029A66D 0029 8129CCBA FFFF cn Battle Royal Mode\Player 3\Can't Be Counted Out D029A66D 0029 8129CC2E 0384 cn Battle Royal Mode\Player 4\Infinite Health D029A66D 0029 8129DFD0 0000 D029A66D 0029 8129DFD2 0000 cn Battle Royal Mode\Player 4\Infinite Health D029A66D 0029 8129DFD0 00FF D029A66D 0029 8129DFD2 00FF cn Battle Royal Mode\Player 4\Super Strength D029A66D 0029 8129E02A FFFF cn Battle Royal Mode\Player 4\Invincible D029A66D 0029 8129E02E FFFF cn Battle Royal Mode\Player 4\Super Speed D029A66D 0029 8129E032 FFFF cn Battle Royal Mode\Player 4\Super Stamina D029A66D 0029 8129E036 FFFF cn Battle Royal Mode\Player 4\Instant Recovery D029A66D 0029 8129E03A FFFF cn Battle Royal Mode\Player 4\Can't Be Pinned D029A66D 0029 8129DF5A FFFF cn Battle Royal Mode\Player 4\Can't Be Counted Out D029A66D 0029 8129DECE 0384 cn 1 On 2 & 2 On 1 Modes\Player 1\Infinite Health D0296E4D 0029 81296FD0 0000 D0296E4D 0029 81296FD2 0000 cn 1 On 2 & 2 On 1 Modes\Player 1\Infinite Health D0296E4D 0029 81296FD0 00FF D0296E4D 0029 81296FD2 00FF cn 1 On 2 & 2 On 1 Modes\Player 1\Super Strength D0296E4D 0029 8129702A FFFF cn 1 On 2 & 2 On 1 Modes\Player 1\Invincible D0296E4D 0029 8129702E FFFF cn 1 On 2 & 2 On 1 Modes\Player 1\Super Speed D0296E4D 0029 81297032 FFFF cn 1 On 2 & 2 On 1 Modes\Player 1\Super Stamina D0296E4D 0029 81297036 FFFF cn 1 On 2 & 2 On 1 Modes\Player 1\Instant Recovery D0296E4D 0029 8129703A FFFF cn 1 On 2 & 2 On 1 Modes\Player 1\Can't Be Pinned D0296E4D 0029 81296F5A FFFF cn 1 On 2 & 2 On 1 Modes\Player 1\Can't Be Counted Out D0296E4D 0029 81296ECE 0384 cn 1 On 2 & 2 On 1 Modes\Player 2\Infinite Health D0296E4D 0029 81298270 0000 D0296E4D 0029 81298272 0000 cn 1 On 2 & 2 On 1 Modes\Player 2\Infinite Health D0296E4D 0029 81298270 00FF D0296E4D 0029 81298272 00FF cn 1 On 2 & 2 On 1 Modes\Player 2\Super Strength D0296E4D 0029 812982CA FFFF cn 1 On 2 & 2 On 1 Modes\Player 2\Invincible D0296E4D 0029 812982CE FFFF cn 1 On 2 & 2 On 1 Modes\Player 2\Super Speed D0296E4D 0029 812982D2 FFFF cn 1 On 2 & 2 On 1 Modes\Player 2\Super Stamina D0296E4D 0029 812982D6 FFFF cn 1 On 2 & 2 On 1 Modes\Player 2\Instant Recovery D0296E4D 0029 812982DA FFFF cn 1 On 2 & 2 On 1 Modes\Player 2\Can't Be Pinned D0296E4D 0029 812981FA FFFF cn 1 On 2 & 2 On 1 Modes\Player 2\Can't Be Counted Out D0296E4D 0029 8129816E 0384 cn 1 On 2 & 2 On 1 Modes\Player 2\Infinite Health D0296E4D 0029 81299510 0000 D0296E4D 0029 81299512 0000 cn 1 On 2 & 2 On 1 Modes\Player 2\Infinite Health D0296E4D 0029 81299510 00FF D0296E4D 0029 81299512 00FF cn 1 On 2 & 2 On 1 Modes\Player 2\Super Strength D0296E4D 0029 8129956A FFFF cn 1 On 2 & 2 On 1 Modes\Player 2\Invincible D0296E4D 0029 8129956E FFFF cn 1 On 2 & 2 On 1 Modes\Player 2\Super Speed D0296E4D 0029 81299572 FFFF cn 1 On 2 & 2 On 1 Modes\Player 2\Super Stamina D0296E4D 0029 81299576 FFFF cn 1 On 2 & 2 On 1 Modes\Player 2\Instant Recovery D0296E4D 0029 8129957A FFFF cn 1 On 2 & 2 On 1 Modes\Player 2\Can't Be Pinned D0296E4D 0029 8129949A FFFF cn 1 On 2 & 2 On 1 Modes\Player 2\Can't Be Counted Out D0296E4D 0029 8129940E 0384 cn 3 Way Dance Mode\Player 1\Infinite Health D0296C3D 0029 81296DC0 0000 D0296C3D 0029 81296DC2 0000 cn 3 Way Dance Mode\Player 1\Infinite Health D0296C3D 0029 81296DC0 00FF D0296C3D 0029 81296DC2 00FF cn 3 Way Dance Mode\Player 1\Super Strength D0296C3D 0029 81296E1A FFFF cn 3 Way Dance Mode\Player 1\Invincible D0296C3D 0029 81296E1E FFFF cn 3 Way Dance Mode\Player 1\Super Speed D0296C3D 0029 81296E22 FFFF cn 3 Way Dance Mode\Player 1\Super Stamina D0296C3D 0029 81296E26 FFFF cn 3 Way Dance Mode\Player 1\Instant Recovery D0296C3D 0029 81296E2A FFFF cn 3 Way Dance Mode\Player 1\Can't Be Pinned D0296C3D 0029 81296D4A FFFF cn 3 Way Dance Mode\Player 1\Can't Be Counted Out D0296C3D 0029 81296CBE 0384 cn 3 Way Dance Mode\Player 2\Infinite Health D0296C3D 0029 81298060 0000 D0296C3D 0029 81298062 0000 cn 3 Way Dance Mode\Player 2\Infinite Health D0296C3D 0029 81298060 00FF D0296C3D 0029 81298062 00FF cn 3 Way Dance Mode\Player 2\Super Strength D0296C3D 0029 812980BA FFFF cn 3 Way Dance Mode\Player 2\Invincible D0296C3D 0029 812980BE FFFF cn 3 Way Dance Mode\Player 2\Super Speed D0296C3D 0029 812980C2 FFFF cn 3 Way Dance Mode\Player 2\Super Stamina D0296C3D 0029 812980C6 FFFF cn 3 Way Dance Mode\Player 2\Instant Recovery D0296C3D 0029 812980CA FFFF cn 3 Way Dance Mode\Player 2\Can't Be Pinned D0296C3D 0029 81297FEA FFFF cn 3 Way Dance Mode\Player 2\Can't Be Counted Out D0296C3D 0029 81297F5E 0384 cn 3 Way Dance Mode\Player 3\Infinite Health D0296C3D 0029 81299300 0000 D0296C3D 0029 81299302 0000 cn 3 Way Dance Mode\Player 3\Infinite Health D0296C3D 0029 81299300 00FF D0296C3D 0029 81299302 00FF cn 3 Way Dance Mode\Player 3\Super Strength D0296C3D 0029 8129935A FFFF cn 3 Way Dance Mode\Player 3\Invincible D0296C3D 0029 8129935E FFFF cn 3 Way Dance Mode\Player 3\Super Speed D0296C3D 0029 81299362 FFFF cn 3 Way Dance Mode\Player 3\Super Stamina D0296C3D 0029 81299366 FFFF cn 3 Way Dance Mode\Player 3\Instant Recovery D0296C3D 0029 8129936A FFFF cn 3 Way Dance Mode\Player 3\Can't Be Pinned D0296C3D 0029 8129928A FFFF cn 3 Way Dance Mode\Player 3\Can't Be Counted Out D0296C3D 0029 812991FE 0384 cn Character Modifier\Player 1 80122773 ???? 000D:"Cyrus the Virus",000F:"Mack Daddy",0015:"Gertner",0019:"Jeff Jones",001C:"Beulah",001D:"Mad Goat",001F:"Nurse",0022:"Tommy Rich",0025:"Santoro",0027:"Sound Guy",0028:"The Sheik",0029:"Skull",002A:"H Slash",002E:"Louie",0030:"J Styles",0032:"Taz",0033:"Trainer",0036:"Excel" cn Character Modifier\Player 2 80122783 ???? 000D:"Cyrus the Virus",000F:"Mack Daddy",0015:"Gertner",0019:"Jeff Jones",001C:"Beulah",001D:"Mad Goat",001F:"Nurse",0022:"Tommy Rich",0025:"Santoro",0027:"Sound Guy",0028:"The Sheik",0029:"Skull",002A:"H Slash",002E:"Louie",0030:"J Styles",0032:"Taz",0033:"Trainer",0036:"Excel" cn Create A Wrestler\Infinite Move % 80131600 0024 cn Create A Wrestler\Infinite Attribute Points 8115DD52 0000 crc F2A653CB-60633B3B-C:45 gn Elmo's Letter Adventure (U) cn Found All Letters 810ACBA2 000C cn Infinite Strikes 810A760A 0000 cn Have No Letters cd Keep you kid busy for hours!!! 810ACBA2 0000 crc 02B1538F-C94B88D0-C:45 gn Elmo's Number Journey (U) cn Found All Numbers 810ACFB2 000C cn Infinite Strikes 810A7A76 0000 cn Have No Numbers cd Keep you kid busy for hours!!! 810ACFB2 0000 crc 07861842-A12EBC9F-C:45 gn Excitebike 64 (U) cn Auto-Pilot Always On Turbo (Original Excitebike Mode) 810E3142 19AA cn Unlock\Difficulties & All Special Tracks 810F2D50 FFFF cn Unlock\Silver & Gold Cup 810F2D4E 0003 cn Max Stunt Points 810E4D18 0098 810E4D1A 967F cn Always Low Temp 810E4F98 0000 810E4F9A 0000 cn Steering Control 800C9E50 0040 cn Super Speed For All 800CA9A0 0040 800CA9A1 0070 cn Power Turbo 800CA99C 0040 800CA99D 00E0 cn No\Overheating 800CA984 00C3 cn No\Collision Drivers 800D9D34 0040 cn Fast\Movement (Player) 800D9D65 00AF cn Slow\Movement (Player) 800D9D65 0060 cn Fast\Movement (Drones) 800D9D55 00A0 cn Slow\Movement (Drones) 800D9D55 0060 cn Earthquake Mode 810D7010 3AD0 crc FDA245D2-A74A3D47-C:45 gn Extreme-G (U) cn Infinite Shields\Player 1 801635F5 00C8 cn Infinite Primary Weapon\Player 1 801635FD 00C8 cn Infinite Turbos\Player 1 801635CB 0003 801635CF 0003 cn Bike Modifier\Player 1 80167C3F ???? 0000:"Raze",0001:"Rana",0002:"Khan",0003:"Grimace",0004:"Mooga",0005:"Jolt",0006:"Main",0007:"Apollyon",0008:"Roach",0009:"Neon" cn Infinite Shields\Player 2 80163D65 00C8 cn Infinite Primary Weapon\Player 2 80163D6D 00C8 cn Infinite Turbos\Player 2 80163D3B 0003 80163D3F 0003 cn Bike Modifier\Player 2 80167C8B ???? 0000:"Raze",0001:"Rana",0002:"Khan",0003:"Grimace",0004:"Mooga",0005:"Jolt",0006:"Main",0007:"Apollyon",0008:"Roach",0009:"Neon" cn Infinite Shields\Player 3 801644D5 00C8 cn Infinite Primary Weapon\Player 3 801644DD 00C8 cn Infinite Turbos\Player 3 801644AB 0003 801644AF 0003 cn Bike Modifier\Player 3 80167CD7 ???? 0000:"Raze",0001:"Rana",0002:"Khan",0003:"Grimace",0004:"Mooga",0005:"Jolt",0006:"Main",0007:"Apollyon",0008:"Roach",0009:"Neon" cn Infinite Shields\Player 4 80164C45 00C8 cn Infinite Primary Weapon\Player 4 80164C4D 00C8 cn Infinite Turbos\Player 4 80164C1B 0003 80164C1F 0003 cn Bike Modifier\Player 4 80167D23 ???? 0000:"Raze",0001:"Rana",0002:"Khan",0003:"Grimace",0004:"Mooga",0005:"Jolt",0006:"Main",0007:"Apollyon",0008:"Roach",0009:"Neon" cn Extra Bikes Unlocked 80167C13 0001 80167C17 0003 cn Extra Levels Unlocked 80167C0B 0001 80167C0F 0001 cn All Tracks Unlocked 8019436E 0008 50000264 0000 80167747 0001 50000264 0000 80167873 0001 50000564 0000 8016799F 0001 cn Mode Select 80095F6F ???? 0001:"Boulder",0002:"Fish Eye Lens",0003:"Boulder & Fish Eye Lens",0004:"Magnify",0008:"Anti-Gravity",000A:"Anti-Gravity & Fish Eye Lens",0010:"Wireframe",0011:"Boulder & Wireframe",0020:"Stealth Mode",0040:"Ghost Mode",0080:"Ugly Mode" crc 5CD4150B-470CC2F1-C:45 gn Extreme-G XG2 (U) cn Infinite\Nitros\Player 1 80170B63 0004 80170B67 0004 cn Infinite\Shield\Player 1 80170B8D 00C8 cn Infinite Lasers\Player 1 80170B99 00C8 cn Infinite Nitros\Player 2 801711CB 0004 801711CF 0004 cn Infinite Shield\Player 2 801711F5 00C8 cn Infinite Lasers\Player 2 80171241 00C8 cn Infinite Nitros\Player 3 80171833 0004 80171837 0004 cn Infinite Shield\Player 3 8017185D 00C8 cn Infinite Lasers\Player 3 80171869 00C8 cn Infinite Nitros\Player 4 80171E9B 0004 80171E9F 0004 cn Infinite Shield\Player 4 80171EC5 00C8 cn Infinite Lasers\Player 4 80171ED1 00C8 cn Access\All Tracks 50000BD8 0000 80182F87 0001 cn Access\All Superbikes 50000304 0000 801839CF 0001 cn Access\All Secret Characters cd This code is Fantastic, You have 12 characters to choose from to you race without any bike, just on foot 50000C04 0000 801839CF 0001 cn [Screen Hud Clear] cd If you are using a Plugin other then Jabos and can not see through the Thick Hud then Let the game load 1st before Putting this code on,Or it will give an error and Freeze 80092B8B 0004 crc AE82687A-9A3F388D-C:45 gn F-1 Pole Position 64 (U) cn Always First Place 810BA6DA 0000 crc 52F78805-8B8FCAB7-C:45 gn Fighter's Destiny (U) cn Start with Stars Modifier\Player 1 D0209757 0000 80209757 ???? 0000:"No Stars",0006:"Max Stars" cn Start with Stars Modifier\Player 2 D020B61F 0000 8020B61F ???? 0000:"No Stars",0006:"Max Stars" cn Have 1 Star\Ryuji 8030734E 0001 cn Have 1 Star\Bob 8030734F 0001 cn Have 1 Star\Pierre 80307350 0001 cn Have 1 Star\Meiling 80307351 0001 cn Have 1 Star\Leon 80307352 0001 cn Have 1 Star\Abdul 80307353 0001 cn Have 1 Star\Ninja 80307354 0001 cn Have 1 Star\Tomahawk 80307355 0001 cn Have 1 Star\Valerie 80307356 0001 cn Infinite Health\Player 1 802098A1 0000 802047C3 0000 cn Infinite Health\Player 2 802047C7 0000 8020B769 0000 cn Start on stage 100 on Survival to get Joker 802EF67B 0063 cn Stop timer for Fastest to get Robot 810ADBDC 3F80 cn Always Win Judge's Decision\Player 1 8020B777 FFFF 802098AF 0000 cn Always Win Judge's Decision\Player 2 802098AF FFFF 8020B777 0000 cn Enable Boro 80307349 0001 cn Level Select 8022A84C ???? 0000:"Fire Mountain",0001:"Desert",0002:"Highlands",0003:"Hong Kong",0004:"Coliseum",0005:"Jungle",0006:"Ninja Room",0007:"Suspension Bridge",0008:"Palace",0009:"Observation",000A:"Pasture",000B:"Joker's Room",000C:"Blue Hell Mountain",000D:"Palace" cn Play As\Player 1 802EF622 ???? 0000:"Ryuji",0001:"Bob",0002:"Pierre",0003:"Meiling",0004:"Leon",0005:"Abdul",0006:"Ninja",0007:"Tomahawk",0008:"Boro",0009:"Valerie",000A:"Ushi",000B:"Joker",000C:"The Master",000D:"No Clue" crc AEEF2F45-F97E30F1-C:45 gn Fighter Destiny 2 (U) cn P1 Always Win Judging 801F727A 00FF cn P2 Always Win Judging 801F53AE 00FF cn P1 Always Lose Judging 801F727A 0000 cn P2 Always Lose Judging 801F53AE 0000 cn Max Attack Power-Fighters Arena 801FBF6E 00C7 cn Max Health Power-Fighters Arena 801FBF6F 00C7 cn Max Recovery-Fighters Arena 801FBF70 00C7 cn Low Time 800BA390 0001 crc 32EFC7CB-C3EA3F20-C:45 gn Fighting Force 64 (U) cn Infinite Lives P1 800CE0F3 0003 cn Infinite Lives P2 800CE0F7 0003 cn Infinite Pistol Ammo 8106006C 2400 cn Infinite Rocket Launcher Ammo 81060130 2400 cn Infinite Shotgun Ammo 810601D8 2400 crc A92D52E5-1D26B655-C:45 gn Flying Dragon (U) cn Infinite\Health\Player 1 8020B7B1 00C8 cn Infinite\Special\Player 1 8120AEB4 0190 cn 1 Win to Win\Player 1 D020C27F 0000 8020C27F 0001 cn Infinite\Health\Player 2 8020BC0D 00C8 cn Infinite\Special\Player 2 8120B1B0 0190 cn 1 Win to Win\Player 2 D020C27F 0000 8020C27F 0010 cn Infinite\Money 8121106C 2704 crc 9E330C01-8C0314BA-C:45 gn Forsaken 64 (U) cn Infinite Shields D014E5E2 0011 8114E5E0 1000 cn Enable Battle Mode And Levels 8008ED6E 0012 cn Gore Mode 8008ED67 0012 cn Infinite Lives 8004013C 0005 cn GS Button For 255 Spare0 Missiles 8814E648 00FF crc 3261D479-ED0DBC25-C:45 gn Fox Sports College Hoops '99 (U) cn Trail Follows The Ball 810B4600 4100 cn Programmers Team 81097088 0100 cn Z-Axis Stadium 80098E98 0088 cn Final Four Stadium 80098E98 0089 cn No Fans In Crowd 810CA520 0454 cn Away Team Scores 0 8012A4EA 0000 cn Away Team Scores 150 8012A4EA 0096 cn Home Team Scores 0 8012A4D2 0000 cn Home Team Scores 150 8012A4D2 0096 cn Infinite Shot Clock 8112A4BC 4210 cn Infinite Time Outs Away 8012A4EC 0006 cn Infinite Time Outs Home 8012A4D4 0006 cn No Time Outs Away 8012A4EC 0000 cn No Time Outs Home 8012A4D4 0000 cn Big Head Mode 81098E88 0100 cn Partially Invisible Players 81098E84 0100 cn Shot Clock Disabled 8109707C 0000 cn GS Button For 1-Second Shot Clock 8912A4BC 3FC0 crc E8E5B179-44AA30E8-C:45 gn Frogger2 (Unreleased Alpha) cn Freeze Timer 80163ABF 000A cn Infinite 99 Lives 80163AC7 0063 cn Infinite Lives (Retro Frogger) 8025AC2F 0005 crc B30ED978-3003C9F9-C:45 gn F-Zero X (U) cn Time Always 00.00.00/1st Place 802C4BC0 0000 802C4BC2 0001 cn Infinite Lives 800E5ED9 0005 cn Unlock Everything 800CD3C8 0001 cn Player 1\Infinite Shield 812C4B48 4326 cn Player 2\Infinite Shield 812C4EF0 4326 cn Player 3\Infinite Shield 812C5298 4326 cn Player 4\Infinite Shield 812C5640 4326 cn Max Shield 812C4B4C 4326 cn Have Boost From Start D02C4DAC 003F 802C4925 0050 cn One Lap To Race D02C4BC9 0000 812C4BC8 0002 D02C4BCB 0001 812C4BCA 0002 cn Expert Mode 800E5ED9 0000 812C4B48 0000 812C4B4C 0000 cn Super Ultimate Mega Fast Mode 812C4984 2222 cn Cool Camera 800E523E 0000 cn Hunk O' Junk 802C4B3F 0040 cn Show 30 Cars Out Of 1 Position 800E5FC7 001D cn Player 1\Invisible Car cd Vs. Mode Only 802C4CCB 0000 cn Player 1\Character Modifier 800E5EE1 ???? 0000:"Captain Falcon",0001:"Dr. Stewart",0002:"Pico",0003:"Samurai Goroh",0004:"Jody Summer",0005:"Mighty Gazelle",0006:"Mr. EAD",0007:"Baba",0008:"Octoman",0009:"Gomar + Shioh",000A:"Kate Alen",000B:"Roger Buster",000C:"James McCloud",000D:"Leon",000E:"Antonio Guster",000F:"Black Shadow",0010:"Michael Chain",0011:"Jack Levin",0012:"Super Arrow",0013:"Mrs. Arrow",0014:"John Tanaka",0015:"Beastman",0016:"Zoda",0017:"Dr. Clash",0018:"Silver Neelsen",0019:"Bio Rex",001A:"Draq",001B:"Billy",001C:"The Skull",001D:"Blood Falcon",001E:"Perfect Captain Falcon" cn Player 2\Character Modifier 802C4F90 ???? 0000:"Captain Falcon",0001:"Dr. Stewart",0002:"Pico",0003:"Samurai Goroh",0004:"Jody Summer",0005:"Mighty Gazelle",0006:"Mr. EAD",0007:"Baba",0008:"Octoman",0009:"Gomar + Shioh",000A:"Kate Alen",000B:"Roger Buster",000C:"James McCloud",000D:"Leon",000E:"Antonio Guster",000F:"Black Shadow",0010:"Michael Chain",0011:"Jack Levin",0012:"Super Arrow",0013:"Mrs. Arrow",0014:"John Tanaka",0015:"Beastman",0016:"Zoda",0017:"Dr. Clash",0018:"Silver Neelsen",0019:"Bio Rex",001A:"Draq",001B:"Billy",001C:"The Skull",001D:"Blood Falcon",001E:"Perfect Captain Falcon" cn Player 3\Character Modifier 802C5338 ???? 0000:"Captain Falcon",0001:"Dr. Stewart",0002:"Pico",0003:"Samurai Goroh",0004:"Jody Summer",0005:"Mighty Gazelle",0006:"Mr. EAD",0007:"Baba",0008:"Octoman",0009:"Gomar + Shioh",000A:"Kate Alen",000B:"Roger Buster",000C:"James McCloud",000D:"Leon",000E:"Antonio Guster",000F:"Black Shadow",0010:"Michael Chain",0011:"Jack Levin",0012:"Super Arrow",0013:"Mrs. Arrow",0014:"John Tanaka",0015:"Beastman",0016:"Zoda",0017:"Dr. Clash",0018:"Silver Neelsen",0019:"Bio Rex",001A:"Draq",001B:"Billy",001C:"The Skull",001D:"Blood Falcon",001E:"Perfect Captain Falcon" cn Player 4\Character Modifier 802C56E0 ???? 0000:"Captain Falcon",0001:"Dr. Stewart",0002:"Pico",0003:"Samurai Goroh",0004:"Jody Summer",0005:"Mighty Gazelle",0006:"Mr. EAD",0007:"Baba",0008:"Octoman",0009:"Gomar + Shioh",000A:"Kate Alen",000B:"Roger Buster",000C:"James McCloud",000D:"Leon",000E:"Antonio Guster",000F:"Black Shadow",0010:"Michael Chain",0011:"Jack Levin",0012:"Super Arrow",0013:"Mrs. Arrow",0014:"John Tanaka",0015:"Beastman",0016:"Zoda",0017:"Dr. Clash",0018:"Silver Neelsen",0019:"Bio Rex",001A:"Draq",001B:"Billy",001C:"The Skull",001D:"Blood Falcon",001E:"Perfect Captain Falcon" cn Player 1\Car Color Modifier 802C4BED ???? 0000:"1st Color",0001:"2nd Color",0002:"3rd Color",0003:"4th Color",0005:"Hidden Color" cn Player 2\Car Color Modifier 802C4F95 ???? 0000:"1st Color",0001:"2nd Color",0002:"3rd Color",0003:"4th Color",0005:"Hidden Color" cn Player 3\Car Color Modifier 802C533D ???? 0000:"1st Color",0001:"2nd Color",0002:"3rd Color",0003:"4th Color",0005:"Hidden Color" cn Player 4\Car Color Modifier 802C56E5 ???? 0000:"1st Color",0001:"2nd Color",0002:"3rd Color",0003:"4th Color",0005:"Hidden Color" cn Track Modifier 800F8517 ???? 0000:"Mute City",0001:"Silence",0002:"Sand Ocean",0003:"Devils Forest",0004:"Big Blue",0005:"Port Town",0006:"Sector Alpha",0007:"Red Canyon",0008:"Devils Forest 2",0009:"Mute City 2",000A:"Big Blue 2",000B:"White Land",000C:"Fire Field",000D:"Silence 2",000E:"Sector Beta",000F:"Red Canyon",0010:"White Land 2",0011:"Mute City 2",0012:"Rainbow Road",0013:"Devils Forest 3",0014:"Space Plant",0015:"Sand Ocean 2",0016:"Port Town 2",0017:"Big Hand" cn Max Grand Prix Points 812C492A FFFF crc 729B5E32-B728D980-C:45 gn GAUNTLET LEGENDS cn Infinite\Max Health 810C5C54 0000 810C5C56 270F 810C5C64 0000 810C5C66 270F cn Infinite\Money 810C5CF6 FFFF cn Max Strength 810C5C04 0000 810C5C06 FFFF cn Max Speed 810C5C14 0000 810C5C16 FFFF cn Max Magic 810C5C24 0000 810C5C26 FFFF cn Max Armour 810C5C34 0000 810C5C36 FFFF cn Infinite\Turbo 800FD30F 0064 cn Level 99 810C5C44 0000 810C5C46 0063 cn Infinite\Special Weapons 800C5FF7 0009 800C5D37 0009 800C5D67 0009 800C5DE7 0009 800C5EB7 0009 cn Always Shoot 5-Way 800FD198 0200 cn Always Shoot 3-Way 800FD19A 0002 cn Always Shoot Rapid Fire 800FD19A 1000 cn Have Window Schards 8104EFCA 000F cn Have Rune Stones 8104EFC6 1FFF cn Infinite\Item On Pickup 50010100 0000 810C5BF6 FFFF cn Infinite\Keys On Pickup 800C5C97 0006 crc 3EDC7E12-E26C1CC9-C:45 gn Gex 3: Deep Cover Gecko (U) cn Start With 50 Remotes D00A54EB 0000 800A54EB 0032 cn Infinite Health 800A54D9 0004 cn Extra Flies D00A54DF 0000 800A54DF 0032 crc 89FED774-CAAFE21B-C:45 gn Gex 64: Enter The Gecko (U) cn Infinite Health 800C56BB 0005 cn Infinite Lives 800C56B7 0005 cn Have All Artifacts 800C56BF 0063 800C56C3 0063 800C56C7 0063 crc 8E6E01FF-CCB4F948-C:45 gn Glover (U) cn Infinite\Double Jumps 8028FC07 0000 cn Press L To Levitate D02AE905 0020 81290334 43E0 cn Infinite\Health 8029018F 0028 cn Infinite\Lives 80290193 000A cn GS Button For 40 Gems 8829018F 0028 cn Infinite\Activate Cheat\Modifier 1 81297BEC ???? 0080:"Level Select",0100:"Open Portals",0200:"Open Levels",0380:"All Of The Above" cn Infinite\Activate Cheat\Modifier 2 81297BEE ???? 0002:"Call Ball (Press L)",0008:"Infinite Lives",0040:"Infinite Energy",0200:"Big Ball",024A:"All Of The Above" cn Infinite\Action Modifier 802901E3 ???? 0000:"Freeze Enemy Spell",0001:"Death Spell",0002:"Frog Spell",0003:"Walk On Walls Spell",0004:"Big Glover Spell",0005:"Tree Spell",0006:"Helicopter Spell",0007:"Enemy Ball Spell",0008:"Purple Bouncy Ball Spell",0009:"Tiny Black/Grey Ball Spell",000A:"Beach Ball Spell",000B:"Hovering Ball Spell",000C:"Green Ball Spell",000D:"Super Call Ball Spell",000E:"Call Ball Spell" crc 4252A5AD-AE6FBF4E-C:45 gn Goemon's Great Adventure (U) cn Infinite Gold P1 81088286 03E7 cn Infinite Health P1 80088284 0003 cn Infinite Lives P1 80088283 0003 cn Infinite Gold P2 8119ADEE 03E7 cn Infinite Health P2 81088290 03E7 cn Infinite Lives P2 8008828D 0003 cn Infinite Coins P1 8119ADEE 03E7 cn Open All Levels 50002D02 0000 810882AA 0303 crc DCBC50D1-09FD1AA3-C:45 gn Goldeneye 007 (U) cn Enable All Levels & In-Built Cheat Menu 8006992E FFFF 80069930 FFFF 80069967 FFFF 8006996C FFFF 80069971 FFFF 80069976 FFFF 8006997B FFFF 8006992F FFFF 80069965 FFFF 8006996A FFFF 8006996F FFFF 80069974 FFFF 80069979 FFFF cn Always Have 00:00 Time (All Levels) 8004837E 0000 8004838E 0000 80048396 0000 80079A22 0000 80079F26 0000 cn Infinite Ammo (All Levels) 80079E3B 0001 cn Bulletproof Bond 8002CE44 0030 cn Weak Enemies 8002CE48 0048 cn Walk through doors, objects 800364CB 0000 cn Enable All Levels 80036FB7 0001 cn All Objectives Complete 80036FD3 0001 cn Gain Access\To Aztec Level Without Beating Secret Agent Or 00 Agent 8002A8FB 001A cn Gain Access\To Egyptian Level Without Beating Secret Agent Or 00 Agent 8002A8FB 001C cn Infinite Health Player 1 (all levels) 8100C0F4 0801 8100C0F6 8090 8100C0F8 AFA4 8100C0FA 0000 81060240 0004 81060242 7600 81060244 3C02 81060246 8008 81060248 8C42 8106024A 9EE0 8106024C 3401 8106024E 3F80 81060250 A441 81060252 00DC 81060254 0800 81060256 303F cn Cradle in multiplayer cd Puts the cradle graphic in the levels screen where the facility normally is in the multiplayer levels screen.Warning it doesn't allow you to enter the multiplayer levels screen,it should automatically have selected cradle, which cannot be changed from the multiplayer menus 8002B11D 0092 8002B11F 0093 8002B127 0029 8002B123 0008 802ADC8D 0052 802ADC8E 0041 802ADC8F 0044 802ADC90 004C 802ADC91 0045 cn Custom Weapon Grouping cd golden gun fun should replace slappers only! appears in the multi weapons. 80048673 0013 81048678 3FC0 80048677 00D0 8004867F 000D 80048683 000A 8004868B 0013 81048690 3FC0 8004868F 00D0 80048697 000D 8004869B 000A 800486A3 0019 810486A8 3FC0 800486A7 00D3 800486AF 0006 800486B3 0003 800486BB 0019 810486C0 3FC0 800486BF 00D3 800486C7 0006 800486CB 0003 800486D3 0013 810486D8 3FC0 800486D7 00D0 800486DF 000D 800486E3 000A 800486EB 0013 810486F0 3FC0 800486EF 00D0 800486F7 000D 800486FB 000A 80048703 0019 81048708 3FC0 80048707 00D3 8004870F 0006 80048713 0003 8004871B 0019 81048720 3FC0 8004871F 00D3 80048727 0006 8004872B 0003 812AEA50 476F 812AEA52 6C64 812AEA54 656E 812AEA56 2047 812AEA58 756E 812AEA5A 2046 812AEA5C 756E 802AEA5E 0000 cn Facility Back Zone In Multiplayer\Part 1\2 players cd All parts must be on for this code to work.this cheat allows you to play the Facility Back Zone In Multiplayer 811E6554 45E4 811E6558 43D5 811E655C C5A7 811E657C 801C 811E657E 6774 811E5164 45E4 811E5168 C383 811E516C 4492 811E518C 801C 811E518E D574 811E78C0 45AD 811E78C4 C383 811E78C8 4440 811E78E8 801C 811E78EA E464 811E4D18 45D0 811E4D1C 4307 811E4D20 C4FB 811E4D40 801C 811E4D42 75EC 811E6738 45CD 811E673C C383 811E6740 43F4 811E6760 801C 811E6762 A0DC 811E5450 45C2 811E5454 4356 811E5458 C598 811E5478 801C 811E547A 6A74 811E5240 4608 811E5244 4307 811E5248 43DC 811E5268 801C 811E526A 962C 811E691C 4606 811E6920 4321 811E6924 449D 811E6944 801C 811E6946 CBEC 801ED447 008A 801ED4DB 008B 801ED56F 008C 801ED603 008D 801ED697 008E 801ED72B 008F 801ED7BF 007D 801ED853 007E 801ED443 002A 801ED4D7 002A 801ED56B 002A 801ED5FF 002A 801ED693 002A 801ED727 002A 801ED7BB 002A 801ED84F 002A 801ED449 0000 801ED4DD 0000 801ED571 0000 801ED605 0000 801ED699 0000 801ED72D 0000 801ED7C1 0000 801ED855 0000 801ED44D 0000 801ED4E1 0000 801ED575 0000 801ED609 0000 801ED69D 0000 801ED731 0000 801ED7C5 0000 801ED859 0000 801EB743 002A 801EB745 0068 811EB746 277F 811EB748 1000 811EB74A 0262 811EB7C2 0190 801EB7C5 0000 811EB7C6 0258 cn Facility Back Zone In Multiplayer\Part 2\2 players cd All parts must be on for this code to work.this cheat allows you to play the Facility Back Zone In Multiplayer 811EB7C8 0000 811EB7CC FFFF 811EB7CE FFFF 811EB7D2 0000 801EB7D5 0000 801EB7DB 0000 811EB7E2 0000 801EB7E7 0000 801EB843 002A 801EB845 0068 811EB846 2780 811EB848 1000 811EB84A 0262 811EB8C2 0190 801EB8C5 0000 811EB8C6 0258 811EB8C8 0000 811EB8CC FFFF 811EB8CE FFFF 811EB8D2 0000 801EB8D5 0000 801EB8DB 0000 811EB8E2 0000 801EB8E7 0000 801EB943 002A 801EB945 0068 811EB946 2791 811EB948 1000 811EB94A 0262 811EB9C2 0190 801EB9C5 0000 811EB9C6 0258 811EB9C8 0000 811EB9CC FFFF 811EB9CE FFFF 811EB9D2 0000 801EB9D5 0000 801EB9DB 0000 811EB9E2 0000 801EB9E7 0000 801EBA43 002A 801EBA45 0068 811EBA46 2792 811EBA48 1000 811EBA4A 0262 811EBAC2 0190 801EBAC5 0000 811EBAC6 0258 811EBAC8 0000 811EBACC FFFF 811EBACE FFFF 811EBAD2 0000 801EBAD5 0000 801EBADB 0000 811EBAE2 0000 801EBAE7 0000 801EBB45 00A0 801EBC45 00A0 801EBD45 00A0 801EBE45 00A0 801EBB47 0075 801EBC47 0076 801EBD47 0077 801EBE47 0078 801EBBE7 0001 801EBCE7 0001 801EBDE7 0001 801EBEE7 0001 801EC247 0071 801ECD47 0072 801ECE47 0074 801ECF47 006C 801ED047 0079 801ED147 0083 D01EBFC5 005A 801EBFC5 0000 D11EBFC6 0000 811EBFC6 F333 D11EBFC8 03E8 811EBFC8 0000 cn Facility Back Zone In Multiplayer\Part 3\2 players cd All parts must be on for this code to work.this cheat allows you to play the Facility Back Zone In Multiplayer D11EBFCA 0000 811EBFCA F0C4 D11EBFCE 4CCC 811EBFCE 000A D11EBFD2 4CCC 811EBFD2 000A D11EBFD4 0003 811EBFD4 0000 D11EBFD6 0000 811EBFD6 02C4 801EBFD9 0004 801EBFDB 0000 811EBFE2 0384 801EBFE7 0004 801EBF45 009E 801EBF47 0084 801EBF48 0010 801EC2D9 0000 801EC447 0085 801EC547 0086 811EA6B6 2743 811EA73E 0114 811EA7F2 0115 811EA8A6 00A3 811EA92E 009D 811EA9E2 00A4 811EAA96 00DA 811EAB1E 00DB 811EABD2 00DF 811EAC86 0130 811EAD0E 008D 811EADC2 012E 811EAE76 0111 811EAEFE 2740 811EAFB2 2741 811EB066 00A0 811EB0EE 009E 811EB1A2 009F 811EB256 274F 811EB2DE 2750 811EB392 0117 811EB446 0131 811EB4CE 008E 811EB582 0132 811EB636 00A1 811EB6BE 0119 811EA62E 00FA 801ED3DF 0000 801ED2DF 0001 D0024337 0007 80024337 001F cn All 64 Characters In Multi Player 8002B197 0040 cn Secret Island on Dam Level cd For the above code to work,Get to the 2nd guard tower & go down the ladder on the left hand side & to the end of the Dock, Press L & GS and you will be transfered in the water. Just keep walking straight & you will get to it. Obviously you can't actually climb ladders or anything, you will simply walkthrough anything on that Part, if you want to walk back to the Dock, when you come near it click the cheat back on & keep pressing L & GS untill you are back on it. D0064F31 0020 800D33ED 0050 880D33ED 0000 cn Replace Cradle with Citadell hidden level 8002A8F7 0029 8104468A 8970 81044690 3F44 81044692 BDEA 81044694 3F80 81044696 0000 81044698 4219 8104469A D89D 80069F80 00C4 crc 98DF9DFC-6606C189-C:45 gn Harvest Moon (U) cn Infinite\Money 811FD60E FFFF cn Belongings\Slot 01 80189084 ???? 0000:"Nothing",0001:"Weeds",0002:"Boulder",0003:"Lumber",0004:"Moondrop Plant",0005:"Pink-Cat-Mint Plant",0006:"Blue Plant",0007:"Cake",0008:"Pie",0009:"Cookie",000A:"Blue Feather",000B:"Pink Liquid In A Bottle",000C:"Red Box",000D:"Turnips",000E:"Potatoes",000F:"Cabbages",0010:"Tomatoes",0011:"Corn",0012:"Eggplant",0013:"Strawberries",0014:"Eggs",0015:"Milk",0016:"M Size Milk",0017:"L Size Milk",0018:"Gold Milk",0019:"Sheared Wool",001A:"High Quality Wool",001B:"Wild Grapes",001C:"Very Berry Fruit",001D:"Tropical Fruit",001E:"Walnuts",001F:"Mushrooms",0020:"Poisonous Mushroom",0021:"Green Box",0022:"Berry Of Full Moon Plant",0023:"Medicinal Herbs",0024:"Edible Herbs",0025:"Small Fish",0026:"Fish",0027:"Big Fish",0028:"Dumpling",0029:"Cotton Candy",002A:"Fried Octopus",002B:"Roasted Corn",002C:"Candy",002D:"Chocolate",002E:"Iron-Ore",002F:"Blue Rock",0030:"Rare Metal",0031:"Moonlight Stone",0032:"Pontata Root",0033:"Chicken",0034:"Chocolate Bar Picture",0035:"???",0036:"Blue Egg Shaped Device",0037:"??",0038:"Chocolate Bar Picture",0039:"Fodder",003A:"White Bag",003B:"Tan Bag",003C:"Green Bag",003D:"Red Bag",003E:"Yellow Bag",003F:"Purple Bag" cn Belongings\Slot 02 80189085 ???? 0000:"Nothing",0001:"Weeds",0002:"Boulder",0003:"Lumber",0004:"Moondrop Plant",0005:"Pink-Cat-Mint Plant",0006:"Blue Plant",0007:"Cake",0008:"Pie",0009:"Cookie",000A:"Blue Feather",000B:"Pink Liquid In A Bottle",000C:"Red Box",000D:"Turnips",000E:"Potatoes",000F:"Cabbages",0010:"Tomatoes",0011:"Corn",0012:"Eggplant",0013:"Strawberries",0014:"Eggs",0015:"Milk",0016:"M Size Milk",0017:"L Size Milk",0018:"Gold Milk",0019:"Sheared Wool",001A:"High Quality Wool",001B:"Wild Grapes",001C:"Very Berry Fruit",001D:"Tropical Fruit",001E:"Walnuts",001F:"Mushrooms",0020:"Poisonous Mushroom",0021:"Green Box",0022:"Berry Of Full Moon Plant",0023:"Medicinal Herbs",0024:"Edible Herbs",0025:"Small Fish",0026:"Fish",0027:"Big Fish",0028:"Dumpling",0029:"Cotton Candy",002A:"Fried Octopus",002B:"Roasted Corn",002C:"Candy",002D:"Chocolate",002E:"Iron-Ore",002F:"Blue Rock",0030:"Rare Metal",0031:"Moonlight Stone",0032:"Pontata Root",0033:"Chicken",0034:"Chocolate Bar Picture",0035:"???",0036:"Blue Egg Shaped Device",0037:"??",0038:"Chocolate Bar Picture",0039:"Fodder",003A:"White Bag",003B:"Tan Bag",003C:"Green Bag",003D:"Red Bag",003E:"Yellow Bag",003F:"Purple Bag" cn Belongings\Slot 03 80189086 ???? 0000:"Nothing",0001:"Weeds",0002:"Boulder",0003:"Lumber",0004:"Moondrop Plant",0005:"Pink-Cat-Mint Plant",0006:"Blue Plant",0007:"Cake",0008:"Pie",0009:"Cookie",000A:"Blue Feather",000B:"Pink Liquid In A Bottle",000C:"Red Box",000D:"Turnips",000E:"Potatoes",000F:"Cabbages",0010:"Tomatoes",0011:"Corn",0012:"Eggplant",0013:"Strawberries",0014:"Eggs",0015:"Milk",0016:"M Size Milk",0017:"L Size Milk",0018:"Gold Milk",0019:"Sheared Wool",001A:"High Quality Wool",001B:"Wild Grapes",001C:"Very Berry Fruit",001D:"Tropical Fruit",001E:"Walnuts",001F:"Mushrooms",0020:"Poisonous Mushroom",0021:"Green Box",0022:"Berry Of Full Moon Plant",0023:"Medicinal Herbs",0024:"Edible Herbs",0025:"Small Fish",0026:"Fish",0027:"Big Fish",0028:"Dumpling",0029:"Cotton Candy",002A:"Fried Octopus",002B:"Roasted Corn",002C:"Candy",002D:"Chocolate",002E:"Iron-Ore",002F:"Blue Rock",0030:"Rare Metal",0031:"Moonlight Stone",0032:"Pontata Root",0033:"Chicken",0034:"Chocolate Bar Picture",0035:"???",0036:"Blue Egg Shaped Device",0037:"??",0038:"Chocolate Bar Picture",0039:"Fodder",003A:"White Bag",003B:"Tan Bag",003C:"Green Bag",003D:"Red Bag",003E:"Yellow Bag",003F:"Purple Bag" cn Belongings\Slot 04 80189087 ???? 0000:"Nothing",0001:"Weeds",0002:"Boulder",0003:"Lumber",0004:"Moondrop Plant",0005:"Pink-Cat-Mint Plant",0006:"Blue Plant",0007:"Cake",0008:"Pie",0009:"Cookie",000A:"Blue Feather",000B:"Pink Liquid In A Bottle",000C:"Red Box",000D:"Turnips",000E:"Potatoes",000F:"Cabbages",0010:"Tomatoes",0011:"Corn",0012:"Eggplant",0013:"Strawberries",0014:"Eggs",0015:"Milk",0016:"M Size Milk",0017:"L Size Milk",0018:"Gold Milk",0019:"Sheared Wool",001A:"High Quality Wool",001B:"Wild Grapes",001C:"Very Berry Fruit",001D:"Tropical Fruit",001E:"Walnuts",001F:"Mushrooms",0020:"Poisonous Mushroom",0021:"Green Box",0022:"Berry Of Full Moon Plant",0023:"Medicinal Herbs",0024:"Edible Herbs",0025:"Small Fish",0026:"Fish",0027:"Big Fish",0028:"Dumpling",0029:"Cotton Candy",002A:"Fried Octopus",002B:"Roasted Corn",002C:"Candy",002D:"Chocolate",002E:"Iron-Ore",002F:"Blue Rock",0030:"Rare Metal",0031:"Moonlight Stone",0032:"Pontata Root",0033:"Chicken",0034:"Chocolate Bar Picture",0035:"???",0036:"Blue Egg Shaped Device",0037:"??",0038:"Chocolate Bar Picture",0039:"Fodder",003A:"White Bag",003B:"Tan Bag",003C:"Green Bag",003D:"Red Bag",003E:"Yellow Bag",003F:"Purple Bag" cn Belongings\Slot 05 80189088 ???? 0000:"Nothing",0001:"Weeds",0002:"Boulder",0003:"Lumber",0004:"Moondrop Plant",0005:"Pink-Cat-Mint Plant",0006:"Blue Plant",0007:"Cake",0008:"Pie",0009:"Cookie",000A:"Blue Feather",000B:"Pink Liquid In A Bottle",000C:"Red Box",000D:"Turnips",000E:"Potatoes",000F:"Cabbages",0010:"Tomatoes",0011:"Corn",0012:"Eggplant",0013:"Strawberries",0014:"Eggs",0015:"Milk",0016:"M Size Milk",0017:"L Size Milk",0018:"Gold Milk",0019:"Sheared Wool",001A:"High Quality Wool",001B:"Wild Grapes",001C:"Very Berry Fruit",001D:"Tropical Fruit",001E:"Walnuts",001F:"Mushrooms",0020:"Poisonous Mushroom",0021:"Green Box",0022:"Berry Of Full Moon Plant",0023:"Medicinal Herbs",0024:"Edible Herbs",0025:"Small Fish",0026:"Fish",0027:"Big Fish",0028:"Dumpling",0029:"Cotton Candy",002A:"Fried Octopus",002B:"Roasted Corn",002C:"Candy",002D:"Chocolate",002E:"Iron-Ore",002F:"Blue Rock",0030:"Rare Metal",0031:"Moonlight Stone",0032:"Pontata Root",0033:"Chicken",0034:"Chocolate Bar Picture",0035:"???",0036:"Blue Egg Shaped Device",0037:"??",0038:"Chocolate Bar Picture",0039:"Fodder",003A:"White Bag",003B:"Tan Bag",003C:"Green Bag",003D:"Red Bag",003E:"Yellow Bag",003F:"Purple Bag" cn Belongings\Slot 06 80189089 ???? 0000:"Nothing",0001:"Weeds",0002:"Boulder",0003:"Lumber",0004:"Moondrop Plant",0005:"Pink-Cat-Mint Plant",0006:"Blue Plant",0007:"Cake",0008:"Pie",0009:"Cookie",000A:"Blue Feather",000B:"Pink Liquid In A Bottle",000C:"Red Box",000D:"Turnips",000E:"Potatoes",000F:"Cabbages",0010:"Tomatoes",0011:"Corn",0012:"Eggplant",0013:"Strawberries",0014:"Eggs",0015:"Milk",0016:"M Size Milk",0017:"L Size Milk",0018:"Gold Milk",0019:"Sheared Wool",001A:"High Quality Wool",001B:"Wild Grapes",001C:"Very Berry Fruit",001D:"Tropical Fruit",001E:"Walnuts",001F:"Mushrooms",0020:"Poisonous Mushroom",0021:"Green Box",0022:"Berry Of Full Moon Plant",0023:"Medicinal Herbs",0024:"Edible Herbs",0025:"Small Fish",0026:"Fish",0027:"Big Fish",0028:"Dumpling",0029:"Cotton Candy",002A:"Fried Octopus",002B:"Roasted Corn",002C:"Candy",002D:"Chocolate",002E:"Iron-Ore",002F:"Blue Rock",0030:"Rare Metal",0031:"Moonlight Stone",0032:"Pontata Root",0033:"Chicken",0034:"Chocolate Bar Picture",0035:"???",0036:"Blue Egg Shaped Device",0037:"??",0038:"Chocolate Bar Picture",0039:"Fodder",003A:"White Bag",003B:"Tan Bag",003C:"Green Bag",003D:"Red Bag",003E:"Yellow Bag",003F:"Purple Bag" cn Belongings\Slot 07 8018908A ???? 0000:"Nothing",0001:"Weeds",0002:"Boulder",0003:"Lumber",0004:"Moondrop Plant",0005:"Pink-Cat-Mint Plant",0006:"Blue Plant",0007:"Cake",0008:"Pie",0009:"Cookie",000A:"Blue Feather",000B:"Pink Liquid In A Bottle",000C:"Red Box",000D:"Turnips",000E:"Potatoes",000F:"Cabbages",0010:"Tomatoes",0011:"Corn",0012:"Eggplant",0013:"Strawberries",0014:"Eggs",0015:"Milk",0016:"M Size Milk",0017:"L Size Milk",0018:"Gold Milk",0019:"Sheared Wool",001A:"High Quality Wool",001B:"Wild Grapes",001C:"Very Berry Fruit",001D:"Tropical Fruit",001E:"Walnuts",001F:"Mushrooms",0020:"Poisonous Mushroom",0021:"Green Box",0022:"Berry Of Full Moon Plant",0023:"Medicinal Herbs",0024:"Edible Herbs",0025:"Small Fish",0026:"Fish",0027:"Big Fish",0028:"Dumpling",0029:"Cotton Candy",002A:"Fried Octopus",002B:"Roasted Corn",002C:"Candy",002D:"Chocolate",002E:"Iron-Ore",002F:"Blue Rock",0030:"Rare Metal",0031:"Moonlight Stone",0032:"Pontata Root",0033:"Chicken",0034:"Chocolate Bar Picture",0035:"???",0036:"Blue Egg Shaped Device",0037:"??",0038:"Chocolate Bar Picture",0039:"Fodder",003A:"White Bag",003B:"Tan Bag",003C:"Green Bag",003D:"Red Bag",003E:"Yellow Bag",003F:"Purple Bag" cn Belongings\Slot 08 8018908B ???? 0000:"Nothing",0001:"Weeds",0002:"Boulder",0003:"Lumber",0004:"Moondrop Plant",0005:"Pink-Cat-Mint Plant",0006:"Blue Plant",0007:"Cake",0008:"Pie",0009:"Cookie",000A:"Blue Feather",000B:"Pink Liquid In A Bottle",000C:"Red Box",000D:"Turnips",000E:"Potatoes",000F:"Cabbages",0010:"Tomatoes",0011:"Corn",0012:"Eggplant",0013:"Strawberries",0014:"Eggs",0015:"Milk",0016:"M Size Milk",0017:"L Size Milk",0018:"Gold Milk",0019:"Sheared Wool",001A:"High Quality Wool",001B:"Wild Grapes",001C:"Very Berry Fruit",001D:"Tropical Fruit",001E:"Walnuts",001F:"Mushrooms",0020:"Poisonous Mushroom",0021:"Green Box",0022:"Berry Of Full Moon Plant",0023:"Medicinal Herbs",0024:"Edible Herbs",0025:"Small Fish",0026:"Fish",0027:"Big Fish",0028:"Dumpling",0029:"Cotton Candy",002A:"Fried Octopus",002B:"Roasted Corn",002C:"Candy",002D:"Chocolate",002E:"Iron-Ore",002F:"Blue Rock",0030:"Rare Metal",0031:"Moonlight Stone",0032:"Pontata Root",0033:"Chicken",0034:"Chocolate Bar Picture",0035:"???",0036:"Blue Egg Shaped Device",0037:"??",0038:"Chocolate Bar Picture",0039:"Fodder",003A:"White Bag",003B:"Tan Bag",003C:"Green Bag",003D:"Red Bag",003E:"Yellow Bag",003F:"Purple Bag" cn Tool\Slot 01 80189075 ???? 0000:"Nothing",0001:"Sickle",0002:"Hoe",0003:"Axe",0004:"Hammer",0005:"Watering Can",0006:"Milker",0007:"Bell",0008:"Brush",0009:"Clippers",000A:"Turnip Seeds",000B:"Potato Seeds",000C:"Cabbage Seeds",000D:"Tomato Seeds",000E:"Corn Seeds",000F:"Eggplant Seeds",0010:"Strawberry Seeds",0011:"Moon Drop Grass Seeds",0012:"Pink-Cat-Mint Seeds",0013:"Blue Mist Seeds",0014:"Bird Feed",0015:"Ball No Picture",0016:"Feeding Bottle",0017:"??",0018:"Fishing Pole",0019:"Miracle Potion",001A:"Medicine For Cows",001B:"Grass Seeds",001C:"Blue Feather",001D:"Empty Bottle",001E:"??",001F:"Weeds No Picture",0020:"Boulder No Picture" cn Tool\Slot 02 80189076 ???? 0000:"Nothing",0001:"Sickle",0002:"Hoe",0003:"Axe",0004:"Hammer",0005:"Watering Can",0006:"Milker",0007:"Bell",0008:"Brush",0009:"Clippers",000A:"Turnip Seeds",000B:"Potato Seeds",000C:"Cabbage Seeds",000D:"Tomato Seeds",000E:"Corn Seeds",000F:"Eggplant Seeds",0010:"Strawberry Seeds",0011:"Moon Drop Grass Seeds",0012:"Pink-Cat-Mint Seeds",0013:"Blue Mist Seeds",0014:"Bird Feed",0015:"Ball No Picture",0016:"Feeding Bottle",0017:"??",0018:"Fishing Pole",0019:"Miracle Potion",001A:"Medicine For Cows",001B:"Grass Seeds",001C:"Blue Feather",001D:"Empty Bottle",001E:"??",001F:"Weeds No Picture",0020:"Boulder No Picture" cn Tool\Slot 03 80189077 ???? 0000:"Nothing",0001:"Sickle",0002:"Hoe",0003:"Axe",0004:"Hammer",0005:"Watering Can",0006:"Milker",0007:"Bell",0008:"Brush",0009:"Clippers",000A:"Turnip Seeds",000B:"Potato Seeds",000C:"Cabbage Seeds",000D:"Tomato Seeds",000E:"Corn Seeds",000F:"Eggplant Seeds",0010:"Strawberry Seeds",0011:"Moon Drop Grass Seeds",0012:"Pink-Cat-Mint Seeds",0013:"Blue Mist Seeds",0014:"Bird Feed",0015:"Ball No Picture",0016:"Feeding Bottle",0017:"??",0018:"Fishing Pole",0019:"Miracle Potion",001A:"Medicine For Cows",001B:"Grass Seeds",001C:"Blue Feather",001D:"Empty Bottle",001E:"??",001F:"Weeds No Picture",0020:"Boulder No Picture" cn Tool\Slot 04 80189078 ???? 0000:"Nothing",0001:"Sickle",0002:"Hoe",0003:"Axe",0004:"Hammer",0005:"Watering Can",0006:"Milker",0007:"Bell",0008:"Brush",0009:"Clippers",000A:"Turnip Seeds",000B:"Potato Seeds",000C:"Cabbage Seeds",000D:"Tomato Seeds",000E:"Corn Seeds",000F:"Eggplant Seeds",0010:"Strawberry Seeds",0011:"Moon Drop Grass Seeds",0012:"Pink-Cat-Mint Seeds",0013:"Blue Mist Seeds",0014:"Bird Feed",0015:"Ball No Picture",0016:"Feeding Bottle",0017:"??",0018:"Fishing Pole",0019:"Miracle Potion",001A:"Medicine For Cows",001B:"Grass Seeds",001C:"Blue Feather",001D:"Empty Bottle",001E:"??",001F:"Weeds No Picture",0020:"Boulder No Picture" cn Tool\Slot 05 80189079 ???? 0000:"Nothing",0001:"Sickle",0002:"Hoe",0003:"Axe",0004:"Hammer",0005:"Watering Can",0006:"Milker",0007:"Bell",0008:"Brush",0009:"Clippers",000A:"Turnip Seeds",000B:"Potato Seeds",000C:"Cabbage Seeds",000D:"Tomato Seeds",000E:"Corn Seeds",000F:"Eggplant Seeds",0010:"Strawberry Seeds",0011:"Moon Drop Grass Seeds",0012:"Pink-Cat-Mint Seeds",0013:"Blue Mist Seeds",0014:"Bird Feed",0015:"Ball No Picture",0016:"Feeding Bottle",0017:"??",0018:"Fishing Pole",0019:"Miracle Potion",001A:"Medicine For Cows",001B:"Grass Seeds",001C:"Blue Feather",001D:"Empty Bottle",001E:"??",001F:"Weeds No Picture",0020:"Boulder No Picture" cn Tool\Slot 06 8018907A ???? 0000:"Nothing",0001:"Sickle",0002:"Hoe",0003:"Axe",0004:"Hammer",0005:"Watering Can",0006:"Milker",0007:"Bell",0008:"Brush",0009:"Clippers",000A:"Turnip Seeds",000B:"Potato Seeds",000C:"Cabbage Seeds",000D:"Tomato Seeds",000E:"Corn Seeds",000F:"Eggplant Seeds",0010:"Strawberry Seeds",0011:"Moon Drop Grass Seeds",0012:"Pink-Cat-Mint Seeds",0013:"Blue Mist Seeds",0014:"Bird Feed",0015:"Ball No Picture",0016:"Feeding Bottle",0017:"??",0018:"Fishing Pole",0019:"Miracle Potion",001A:"Medicine For Cows",001B:"Grass Seeds",001C:"Blue Feather",001D:"Empty Bottle",001E:"??",001F:"Weeds No Picture",0020:"Boulder No Picture" cn Tool\Slot 07 8018907B ???? 0000:"Nothing",0001:"Sickle",0002:"Hoe",0003:"Axe",0004:"Hammer",0005:"Watering Can",0006:"Milker",0007:"Bell",0008:"Brush",0009:"Clippers",000A:"Turnip Seeds",000B:"Potato Seeds",000C:"Cabbage Seeds",000D:"Tomato Seeds",000E:"Corn Seeds",000F:"Eggplant Seeds",0010:"Strawberry Seeds",0011:"Moon Drop Grass Seeds",0012:"Pink-Cat-Mint Seeds",0013:"Blue Mist Seeds",0014:"Bird Feed",0015:"Ball No Picture",0016:"Feeding Bottle",0017:"??",0018:"Fishing Pole",0019:"Miracle Potion",001A:"Medicine For Cows",001B:"Grass Seeds",001C:"Blue Feather",001D:"Empty Bottle",001E:"??",001F:"Weeds No Picture",0020:"Boulder No Picture" cn Tool\Slot 08 8018907C ???? 0000:"Nothing",0001:"Sickle",0002:"Hoe",0003:"Axe",0004:"Hammer",0005:"Watering Can",0006:"Milker",0007:"Bell",0008:"Brush",0009:"Clippers",000A:"Turnip Seeds",000B:"Potato Seeds",000C:"Cabbage Seeds",000D:"Tomato Seeds",000E:"Corn Seeds",000F:"Eggplant Seeds",0010:"Strawberry Seeds",0011:"Moon Drop Grass Seeds",0012:"Pink-Cat-Mint Seeds",0013:"Blue Mist Seeds",0014:"Bird Feed",0015:"Ball No Picture",0016:"Feeding Bottle",0017:"??",0018:"Fishing Pole",0019:"Miracle Potion",001A:"Medicine For Cows",001B:"Grass Seeds",001C:"Blue Feather",001D:"Empty Bottle",001E:"??",001F:"Weeds No Picture",0020:"Boulder No Picture" cn Item\Slot 01 8018908E ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 02 8018908F ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 03 80189090 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 04 80189091 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 05 80189092 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 06 80189093 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 07 80189094 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 08 80189095 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 09 80189096 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 10 80189097 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 11 80189098 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 12 80189099 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 13 8018909A ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 14 8018909B ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 15 8018909C ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 16 8018909D ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 17 8018909E ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 18 8018909F ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 19 801890A0 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 20 801890A1 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 21 801890A2 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 22 801890A3 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 23 801890A4 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Item\Slot 24 801890A5 ???? 0000:"Nothing",0001:"Ocarina",0002:"Flower Card",0003:"Cake Card",0004:"Broken Music Box",0005:"??",0006:"Old Wine",0007:"??",0008:"??",0009:"Book From Library",000A:"Scroll To Bury",000B:"Marble",000C:"GoodLuck Charm",000D:"Empty Metal Bag",000E:"Horse Race Ticket",000F:"Dog Race Ticket",0010:"Potpourri",0011:"Embroidered Hankerchief",0012:"Hand - Knit Socks",0013:"Lucky Bracelet",0014:"Flower Bath Crystals",0015:"Stamina Carrot" cn Infinite\Watering Can Uses 8016FBCD 0004 cn Infinite\Fodder Spout (Sheep And Cows) 81180714 0063 cn Infinite\Chicken Feed 80237411 005C cn Infinite\Lumber 81189E50 03E7 cn Infinite\Stamina 80189060 00FF cn Infinite\Flower Card Points 802373F0 0063 cn Infinite\Medals For Horse & Dog Races 81189B06 270F 81205206 270F cn Infinite\Cake Card Points 80181B10 0063 cn Infinite\Horse Stamina 802F5015 0002 cn Make\Ann Love You 801C3F93 00FF cn Make\Elli Love You 801C3F92 00FF cn Make\Maria Love You 801C3F90 00FF cn Make\Popuri Love You 801C3F91 00FF cn Make\Karen Love You 801C3F94 00FF cn Have\All Pics 8118905A FFFF cn Have\Win Dog Races 801886B0 00FF cn Have\Max Shipped In Bin! 8023738A FFFF crc 7F3CEB77-8981030A-C:45 gn Hercules: The Legendary Journeys (U) cn Infinite Health 810CF93E 03E7 810CF942 03E7 cn Infinite Dinars 800B6043 00E8 800B6042 00E8 cn Infinite Magic 810B65CA 0063 810B65B2 0063 810B65E2 0063 810B65FA 0063 cn Press L to Levitate cd Press L Button to Levitate & Let go to come back down D017D2D5 0020 810CF994 44CB cn Press L for 1 Hit Kill Punch cd Press The L Button & Hold B & Then Let Go to Kill Enimies,Rocks,Tents etc with One Punch. D0103383 0020 800D9BCE 0000 crc 9CAB6AEA-87C61C00-C:45 gn Hexen (U) cn Invincibility\Player 1 8113DB4C FFFF cn Infinite\Blue Mana\Player 1 8013DB7D 00CF cn Infinite\Green Mana\Player 1 8013DB7F 00CF cn Infinite\Ammo & Items\Player 1 50002004 0000 8013DAC3 0064 cn Always Have\Fist,Mace,Staff\Player 1 8013DB75 00FF cn Always Have\Axe,Staff,Frost,Shards\Player 1 8013DB77 00FF cn Always Have\Hammer,Firestorm & Arc of Death\Player 1 8013DB79 00FF cn Always Have\Quietus,Wraithverge,Bloodscourge\Player 1 8013DB7B 00FF cn Open\Main Cheat Menu 80136773 0005 cn Open\All Options in Cheat Menu 81136696 FFFF cn Have All\Keys\Player 1 8113DB5C 07FF cn Boots Of Speed Always On\Player 1 8113DB58 03FF cn Icon Of The Defender Always On\Player 1 8113DB4C 03FF cn Wings Of Wraith Always On\Player 1 8013DB53 03FF cn Play As\Player 1 8014A749 ???? 0000:"Fighter",0000:"1 Cleric",0000:"2 Mage" cn Invincibility\Player 2 8113DCE8 FFFF cn Icon Of The Defender Always On\Player 2 8113DCE8 03FF cn Boots Of Speed Always On\Player 2 8113DCF4 03FF cn Wings Of Wraith Always On\Player 2 8113DCEE 03FF cn Have All\Keys\Player 2 8113DCF8 07FF cn Infinite\Blue Mana\Player 2 8013DD19 00CF cn Infinite\Green Mana\Player 2 8013DD1B 00CF cn Always Have\Fist,Mace,Staff\Player 2 8013DD11 00FF cn Always Have\Axe,Staff,Frost,Shards\Player 2 8013DD13 00FF cn Always Have\Hammer,Firestorm & Arc of Death\Player 2 8013DD15 00FF cn Always Have\Quietus,Wraithverge,Bloodscourge\Player 2 8013DD17 00FF cn Invincibility\Player 3 8113DE84 FFFF cn Icon Of The Defender Always On\Player 3 8113DE84 03FF cn Boots Of Speed Always On\Player 3 8113DE90 03FF cn Wings Of Wraith Always On\Player 3 8113DE8A 03FF cn Have All\Keys\Player 3 8113DE94 07FF cn Infinite\Blue Mana\Player 3 8013DEB5 00CF cn Infinite\Green Mana\Player 3 8013DEB7 00CF cn Always Have\Fist,Mace,Staff\Player 3 8013DEAD 00FF cn Always Have\Axe,Staff,Frost,Shards\Player 3 8013DEAF 00FF cn Always Have\Hammer,Firestorm & Arc of Death\Player 3 8013DEB1 00FF cn Always Have\Quietus,Wraithverge,Bloodscourge\Player 3 8013DEB3 00FF cn Invincibility\Player 4 8113E020 FFFF cn Icon Of The Defender Always On\Player 4 8113E020 03FF cn Boots Of Speed Always On\Player 4 8113E02C 03FF cn Wings Of Wraith Always On\Player 4 8113E026 03FF cn Have All\Keys\Player 4 8113E030 07FF cn Infinite\Blue Mana\Player 4 8013E051 00CF cn Infinite\Green Mana\Player 4 8013E053 00CF cn Always Have\Fist,Mace,Staff\Player 4 8013E049 00FF cn Always Have\Axe,Staff,Frost,Shards\Player 4 8013E04B 00FF cn Always Have\Hammer,Firestorm & Arc of Death\Player 4 8013E04D 00FF cn Always Have\Quietus,Wraithverge,Bloodscourge\Player 4 8013E04F 00FF crc C7C98F8E-42145DDE-C:45 gn Hot Wheels Turbo Racing (U) cn Infinite Turbos\Player 1 80118CFC 000A cn Infinite Turbos\Player 2 80119478 000A cn Start On Lap Modifier\Player 1 D0118AA8 0000 80118AA8 ???? 0000:"1st",0001:"2nd",0002:"3rd",0003:"4th" cn Start On Lap Modifier\Player 2 D0119224 0000 80119224 ???? 0000:"1st",0001:"2nd",0002:"3rd",0003:"4th" cn Max Tournament Points 81124A16 00FF cn Have\All Tracks 81124A0E FFFF cn Have\All Cars & Cups\Player 1 81124A0A FFFF cn Have\All Cars & Cups\Player 2 81124B4A FFFF cn Press L For Time Is Always 0:00:00\Player 1 D0137FE5 0020 810F3900 0000 D0137FE5 0020 810F3902 0000 cn Press L For Time Is Always 0:00:00\Player 2 D0137FED 0020 810F3900 0000 D0137FED 0020 810F3902 0000 cn Have\All Special Cars\Player 1 81124A04 FFFF 81124A06 FFFF 81124A0A FFFF cn Have\All Special Cars\Player 2 81124B44 FFFF 81124B46 FFFF 81124B4A FFFF cn Allways 1st 8111D7EA 0000 crc 102888BF-434888CA-C:45 gn Hybrid Heaven (U) cn Have All\Keys 50000410 0000 8017E130 0063 50000410 0000 8017E138 0063 cn Infinite\Weapons & Items 50000610 0000 8017E0D0 0063 50000610 0000 8017E0D8 0063 cn Infinite\Refresh Items 50000D10 0000 8017E008 0063 50000C10 0000 8017E010 0063 cn Infinite\Max Body Stats 8117DC48 270F 8117DC88 0063 50000C02 0000 8117DC50 270F 50000502 0000 8117DC80 270F 50000602 0000 8117DCA8 270F 50000602 0000 8117DCB6 270F cn Infinite\Max Health 8117DC40 270F 8117DC42 270F cn Level 999 8117DC88 270F cn Press L To Levitate D005CE51 0020 8124A0B0 3FCB cn Have All\Moves 50005306 0000 81183CE0 0100 50005306 0000 81183CE2 00FF cn Editor's Cheat Level and Battle Select 801CC8C4 0005 crc C8DC65EB-3D8C8904-C:45 gn Hydro Thunder (U) cn Always 1st 812C4C96 0001 cn Infinite\Time 812B4890 42C8 cn Infinite\Boosts\Player 1 812C4C9C 4190 cn Have All\Races 812B5C94 0101 812B5C96 0101 812B5C98 0101 812B5C9A 0101 812B5C9C 0101 812B5C9E 0101 812B5CA0 0101 cn Have All\Boats 812B5CA2 0101 812B5CA4 0101 812B5CA6 0101 812B5CA8 0101 812B5CAA 0101 812B5CAC 0101 812B5CAE 0101 cn Infinite\Boosts\Player 2 812C4FCC 4190 cn Hydro Speedway 802B5C94 ???? 0001:"Unlocked & Not Completed",0003:"Unlocked & Completed" crc E436467A-82DE8F9B-C:45 gn Indy Racing 2000 (U) cn Max Exp (Gold Cup - All Classes Unlocked) cd With the 'Max Exp' codes for the Gold Cup, start a new file and leave it and go back to it again. 81033918 7FFF 8103391A FFFF cn Driver Modifier (Champsionship Mode) 812CBEC6 ???? 0000:"Scott Goodyear #4",0001:"Greg Ray #2",0002:"Billy Boat #11",0003:"Eddie Cheever Jr.#51",0004:"Buddy Lazier #91",0005:"Davey Hamilton #9",0006:"Sam Schmidt #99",0007:"Scott Sharp #8",0008:"Buzz Calkins #12",0009:"Kenny Brack #14",000A:"Robbie Buyl #22",000B:"Tyce Carison #20",000C:"Mark Dismore #28",000D:"Roberto Guerrero #50",000E:"Johnny Unser #92",000F:"Robby Unser #81",0010:"Jeff Ward #21",0011:"Stephan Gregoire #7",0012:"Robby McGehee #55",0013:"John Hollansworth Jr. #42" cn Always Place 1st 8012955F 0001 cn Unlock\Gold Cup 1st Upgrade 81023100 0000 81023102 0000 cn Unlock\Gold Cup 2nd Upgrade 81023104 0000 81023106 0000 cn Unlock\Sprint Car Class 810230EE 0000 810230EC 0000 cn Unlock\Formula Cars Part 1 810230F0 0000 810230F2 0000 810230F4 0000 810230F6 0000 crc E616B5BC-C9658B88-C:45 gn Iggy's Reckin' Balls (U) cn Extra Characters 810C632E FFFF cn Always Have 99 Points 810D8EE0 0063 cn Infinite Credits 800BDEA5 0005 cn Enable All Courses 810CCDF2 0B00 810CCDF4 0B00 810CCDF6 0B00 crc 69256460-B9A3F586-C:45 gn Jeopardy (U) cn Max Money\Player 1 81058122 FFFF cn Max Money\Player 2 81058124 FFFF cn Max Money\Player 3 81058126 FFFF crc BB30B1A5-FCF712CE-C:45 gn Jeremy McGrath Supercross 2000 (U) cn Extra Points 800711E7 00FF cn Enable Tabletop Freestyle 81071832 0001 cn Enable Chasm Freestyle 81071834 0001 cn Enable Jim Jam Freestyle 81071838 0001 cn Enable Moon Freestyle 8107183C 0001 crc 8A6009B6-94ACE150-C:45 gn Jet Force Gemini (U) cn Access\All Characters 801E6040 FFFF cn Juno\Infinite Continues 800A3281 0002 cn Juno\Full & Max Health 801BF976 0040 801E61E5 000C 801E61E2 0040 cn Juno\Access\All Keys 811E6248 FFF7 cn Juno\Access\All Objects 811E624A FFFF cn Juno\Infinite\Mizar Tokens 811E61F4 02F4 cn Juno\Max Blue & White Heads 811E61EA 03E7 811E61E8 03E7 cn Juno\Infinite\Max Ammo All Weapons 50000302 0000 811E61F6 02F4 50000802 0000 811E61FC 02F4 50000402 0000 811E620C 02F4 cn Vela\Full & Max Health 801E616F 000C 801E616C 0040 cn Vela\Access\All Keys 811E61D2 FF70 cn Vela\Access\All Objects 811E61D4 FFFF cn Vela\Infinite\Mizar Tokens 811E617E 02F4 cn Vela\Max\Blue & White Heads 811E6174 03E7 811E6172 03E7 cn Vela\Infinite\Max Ammo All Weapons 50000302 0000 811E6180 02F4 50000802 0000 811E6186 02F4 50000402 0000 811E6196 02F4 cn Lupus\Full & Max Health 801BF9EC 0040 801E625B 000C 801E6258 0040 cn Lupus\Access\All Keys 811E62BE FF70 cn Lupus\Access\All Objects 811E62C0 FFFF cn Lupus\Infinite\Mizar Tokens 811E626A 02F4 cn Lupus\Max\Blue & White Heads 811E6260 03E7 811E625E 03E7 cn Lupus\Infinite\Max Ammo All Weapons 50000302 0000 811E626C 02F4 50000802 0000 811E6272 02F4 50000402 0000 811E6282 02F4 cn Access\All Floyd Awards cd only enable One character at a time when using this code 50000501 0000 801E6038 0005 cn Juno\Access\All Weapons cd Do not put this code on until you collect one Extra Weapon then you will have all ready to use 801E61EC 00FF 801E61ED 00FF cn Vela\Access\All Weapons cd Do not put this code on until you collect one Extra Weapon then you will have all ready to use 801E6176 00FF 801E6177 00FF cn Lupus\Access\All Weapons cd Do not put this code on until you collect one Extra Weapon then you will have all ready to use 801E6262 00FF 801E6263 00FF cn Tribals\Have All Tribals\Gold Wood 801E6014 000F cn Tribals\No Tribals Killed\Gold Wood 801E6015 0000 cn Tribals\Have No Tribals Remaining\Gold Wood 801E6016 0000 cn Wide Screen Always Off 800FECA8 0000 crc D0151AB0-FE5CA14B-C:45 gn John Romero's Daikatana (U) cn Infinite\Health 8020A965 0064 cn Infinite\Armor 8020A987 0064 cn Infinite\Experience 8020A967 00FF cn Max\Vitality 8020A969 0007 cn Max\Attack 8020A96B 0007 cn Max\Speed 8020A96D 0007 cn Max\Acro 8020A96F 0007 cn Max\Power 8020A971 0007 cn Infinite\Ammo\Sidewinder 8020A9B0 00FF cn Infinite\Ammo\Shock Wave 8020A9B1 00FF cn Infinite\Ammo\Chvizatergo 8020A9B2 00FF cn Infinite\Ammo\Shot Cycler 8020A9B3 00FF cn Infinite\Ammo\Ion Cannon 8020A9B4 00FF cn Infinite\Ammo\Disc Of Dredalus 8020A9B5 0063 cn Infinite\Ammo\Venomous 8020A9B6 00FF cn Infinite\Ammo\Poseidon Trident 8020A9B7 00FF cn Infinite\Ammo\Hammer 8020A9B8 0000 cn Infinite\Ammo\Sunflares 8020A9B9 00FF cn Infinite\Ammo\Bolter 8020A9BA 00FF cn Infinite\Ammo\Ballista 8020A9BB 00FF cn Infinite\Ammo\Stavros Stave 8020A9BC 00FF cn Infinite\Ammo\Wyndraxs Wisp 8020A9BD 00FF cn Have All Weapons 8120A8F6 FFFF crc 36281F23-009756CF-C:45 gn Ken Griffey Jr.'s Slugfest (U) cn Max\Batting 8105D6D8 4120 cn Max\Power 8105D270 4120 cn Max\Speed 8105CE68 4120 cn Max\Defense 8105CA60 4120 cn Max\Arm Strength 8105C5F8 4120 cn Max\Durability 8105C098 4120 cn Max\Clutch 8105BB98 4120 cn Max\Control 8105B760 4120 cn Max\Stamina 8105B2F8 4120 cn Max\Pitch Speed 8105AE90 4120 cn Infinite\Creation Points 81059408 420C cn Infinite\Strikes 8021AC48 0000 cn Infinite\Balls 8021AC47 0000 cn Inning Selection 8021AC42 ???? 0002:"2nd Inning",0003:"3rd Inning",0004:"4th Inning",0005:"5th Inning",0006:"6th Inning",0007:"7th Inning",0008:"8th Inning",0009:"9th Inning" crc 9E8FE2BA-8B270770-C:45 gn Killer Instinct Gold (U) (v1.0) cn Unlock All Options 8012834C 0006 cn Player 1\Untouchable 801D34D4 000A cn Player 1\Fast\Punch Kick 801D347E 0010 cn Player 1\Fast\Jump Walk 801D347C 0001 cn Player 1\Slow Jump Walk 801D347D 0050 cn Player 1\Infinite Energy 801D3484 0069 cn Player 1\Fight Gargos Immediately 8012834B 000A cn Player 1\Spinal Always Has All Skulls 801D3523 0006 cn Player 1\Fulgore\Always Invisible cd Do not use this with Fulgore Always Visible 801D3478 0020 801D3479 0090 801D34C5 0092 801D3527 005E cn Player 1\Fulgore\Always Visible cd Do not use this with Fulgore Always Invisible 801D3478 0023 801D3479 00F0 801D34C5 0080 801D3527 00AF cn Player 1\Wins Score 8012830A 00FF cn Player 1\Undefeated Players Scroll By Quickly 802C8CE8 0007 cn Player 1\Play As 802C8CB8 ???? 0000:"Jago",0001:"Combo",0002:"Spinal",0003:"Tusk",0004:"Glacius",0005:"Fulgore",0006:"Kim Wu",0007:"Sabrewulf",0008:"Orchid",0009:"Maya",000A:"Gargos" cn Player 1\1-Hit Death D01D3484 0078 801D3484 0001 cn Player 2\Spinal Always Has All Skulls 801D3623 0006 cn Player 2\Fulgore Always Invisible cd Do not use this with Fulgore Always Visible 801D3578 0020 801D3579 0090 801D35C5 0092 801D3527 005E cn Player 2\Fulgore Always Visible cd Do not use this with Fulgore Always Invisible 801D3578 0023 801D3579 00F0 801D35C5 0080 801D3527 00AF cn Player 2\Play As 8004EA9D ???? 0000:"Jago",0001:"Combo",0002:"Spinal",0003:"Tusk",0004:"Glacius",0005:"Fulgore",0006:"Kim Wu",0007:"Sabrewulf",0008:"Orchid",0009:"Maya",000A:"Gargos" cn Player 2\Infinite Energy 801D3584 0078 cn Player 2\Fast\Punch Kick 801D357E 0010 cn Player 2\Fast\Jump Walk 801D357C 0001 cn Player 2\Slow\Punch Kick 801D357F 0050 cn Player 2\Slow\Jump Walk 801D357D 0050 cn Player 2\Untouchable 801D34D5 000A crc 46039FB4-0337822C-C:45 gn Kirby 64 - The Crystal Shards (U) cn Get All Crystals 50000701 0000 800D6BC0 0001 50001701 0000 800D6BC8 0007 cn Unlock All Difficulty Levels\100 Yard Hop 800D6BB9 0003 cn Unlock All Difficulty Levels\Bumper Crop Bump 800D6BBA 0003 cn Unlock All Difficulty Levels\Checkerboard Chase 800D6BBB 0003 cn Infinite Lives 800D714F 0064 cn Infinite Health 810D6E50 40C0 cn Can Fly Forever 8112E7DE 00F0 cn All Stages Complete 50002B01 0000 800D6BE0 0002 crc FCE0D799-65316C54-C:45 gn Knife Edge - Nose Gunner (U) cn Infinite\Armor 8011D467 0064 cn Level 11 Vulcan Cannon 801239B3 000A cn Infinite\Bombs 8011D46F 0003 cn Press\L For Rapid Fire On Nuke & Laser cd Do not use this with Press L For Rapid Fire On Flak D011BE01 0020 8011D497 0028 cn Press\L For Rapid Fire On Flak cd Do not use this with Press L For Rapid Fire On Nuke & Laser D011BE01 0020 8011D497 0014 crc 0894909C-DAD4D82D-C:45 gn Knockout Kings 2000 (U) cn Player 1\Infinite\Health 8106B974 42C8 8106B976 0000 cn Player 2\Infinite\Health 8106BA7C 42C8 8106BA7E 0000 cn Player 1\No Health 8106B974 0000 8106B976 0000 cn Player 2\No Health 8106BA7C 0000 8106BA7E 0000 cn Player 1\Max\Power 8106B980 0000 8106B982 0BB2 cn Player 1\No Power 8106B980 0000 8106B982 0000 cn Player 2\Max\Power 8106BA88 0000 8106BA8A 0BB2 cn Player 2\No Power 8106BA88 0000 8106BA8A 0000 cn Infinite\Creation Points 81063742 0064 cn Big\Head Mode 800F401C 0001 cn Big\Glove Mode 800F401D 0001 cn Player 1\Power Punch After 1st Punch 8006B983 0064 cn Player 2\Power Punch After 1st Punch 8006BA8B 0064 cn Stop Timer 81067546 001C cn Player 1\Character Modifier 800EC6F3 ???? 0000:"Ali",0001:"Frazier",0002:"Holmes",0003:"Holyfield",0004:"Lewis",0005:"Tua",0006:"Spinks",0007:"Butterbean",0008:"De La Hoya",0009:"Leonard",000A:"Hagler",000B:"Duran",000C:"Whitaker",000D:"Quartey",000E:"Carr",000F:"Vargas",0010:"Reid",0011:"Moskey",0012:"Pryor",0013:"Argnello",0014:"O'Grady",0015:"Mayweather",0016:"Manfredy",0017:"Kelley",0018:"Romero",0019:"Random",001A:"Created Boxer",001B:"Creater Boxer",001C:"Dempsey",001D:"K. Orr",001E:"IUppa",001F:"S. Sandoval",0020:"S. Broadhurst",0021:"Pole",0022:"Hasson",0023:"Alameda",0024:"Wahlberg",0025:"Scott",0026:"Hopra",0027:"Eckhardt",0028:"Parker",0029:"Ruiz",002A:"F. Sandoval",002B:"Ang",002C:"Bristov",002D:"Botti",002E:"S. Orr",002F:"Zarifes",0030:"Giolito",0031:"Garrett",0032:"Barclay",0033:"Wynne",0034:"Lupidi",0035:"W. Aguitar",0036:"Di Ricco",0037:"Philippine",0038:"M. Broadhurst",0039:"Weaver",003A:"Lajoie",003B:"Greenberg",003C:"Quinn",003D:"Perone",003E:"Tool",003F:"Bunch",0040:"St. Aubyn",0041:"Wells",0042:"Dexter",0043:"Hsu",0044:"Bazzel",0045:"Thompson",0046:"Eklund",0047:"Tallarico",0048:"de Leon",0049:"Coallier" cn Player 2\Character Modifier 800EC6F7 ???? 0000:"Ali",0001:"Frazier",0002:"Holmes",0003:"Holyfield",0004:"Lewis",0005:"Tua",0006:"Spinks",0007:"Butterbean",0008:"De La Hoya",0009:"Leonard",000A:"Hagler",000B:"Duran",000C:"Whitaker",000D:"Quartey",000E:"Carr",000F:"Vargas",0010:"Reid",0011:"Moskey",0012:"Pryor",0013:"Argnello",0014:"O'Grady",0015:"Mayweather",0016:"Manfredy",0017:"Kelley",0018:"Romero",0019:"Random",001A:"Created Boxer",001B:"Creater Boxer",001C:"Dempsey",001D:"K. Orr",001E:"IUppa",001F:"S. Sandoval",0020:"S. Broadhurst",0021:"Pole",0022:"Hasson",0023:"Alameda",0024:"Wahlberg",0025:"Scott",0026:"Hopra",0027:"Eckhardt",0028:"Parker",0029:"Ruiz",002A:"F. Sandoval",002B:"Ang",002C:"Bristov",002D:"Botti",002E:"S. Orr",002F:"Zarifes",0030:"Giolito",0031:"Garrett",0032:"Barclay",0033:"Wynne",0034:"Lupidi",0035:"W. Aguitar",0036:"Di Ricco",0037:"Philippine",0038:"M. Broadhurst",0039:"Weaver",003A:"Lajoie",003B:"Greenberg",003C:"Quinn",003D:"Perone",003E:"Tool",003F:"Bunch",0040:"St. Aubyn",0041:"Wells",0042:"Dexter",0043:"Hsu",0044:"Bazzel",0045:"Thompson",0046:"Eklund",0047:"Tallarico",0048:"de Leon",0049:"Coallier" cn Ring Modifier 800EC703 ???? 0000:"Great Western Forum",0001:"Caesars Palace",0002:"Ecko Sports Arena",0003:"International Arena",0004:"Local 440",0005:"The Colosseum",0006:"Roppongi Palace",0007:"Wembley Arena",0008:"Knockout Kings Arena" crc 5354631C-03A2DEF0-C:45 gn Legend of Zelda 2, The - Majora's Mask (U) cn Infinite\Health 811EF6A6 0140 cn Infinite\Hearts Options cd If you need to clear the Infinite Max Hearts from the screen just choose the 6 or 4 Heart Options, take off the cheat & then make a save. 811EF6A4 ???? 0140:"Max Hearts",0063:"6 Hearts",0043:"4 Hearts" cn Have\All Quest/Status Items 801EF72D 0005 811EF72E F7CF cn Infinite\Rupees 811EF6AA 03E7 cn Infinite\Max & Double Magic Meter 801EF6A9 0060 811EF6B0 0101 cn Infinite\Items 801EF711 0063 801EF716 0063 801EF717 0063 801EF718 0063 801EF719 0063 801EF71A 0063 801EF71C 0063 801EF71D 0063 cn Have\Ocarina of Time 801EF6E0 0000 cn Have\Hero's Bow 801EF6E1 0001 cn Have\Arrows\Fire Arrow 801EF6E2 0002 cn Have\Arrows\Ice Arrow 801EF6E3 0003 cn Have\Arrows\Light Arrow 801EF6E4 0004 cn Have\Bombs 801EF6E6 0006 cn Have\Bombchu 801EF6E7 0007 cn Have\Deku Sticks 801EF6E8 0008 cn Have\Deku Nuts 801EF6E9 0009 cn Have\Magic Beans 801EF6EA 000A cn Have\Powder Kegs 801EF6EC 000C cn Have\Pictograph 801EF6ED 000D cn Have\Lens of Truth 801EF6EE 000E cn Have\Hookshot 801EF6EF 000F cn Have\Great Fairy's Sword 801EF6F0 0010 cn Maximum Visibility 80166118 0020 cn Fog\Blue 80166108 0020 cn Fog\Pink 8016610C 0020 cn Fog\Yellow 80166110 0020 cn Press L To Levitate cd Press L To Levitate & Let go to land D03E6B3B 0020 813FFE18 40CB cn Have\All Masks 801EF6F8 003E 801EF6F9 0038 801EF6FA 0047 801EF6FB 0045 801EF6FC 0040 801EF6FD 0032 801EF6FE 003A 801EF6FF 0046 801EF700 0039 801EF701 0042 801EF702 0048 801EF703 0033 801EF704 003C 801EF705 003D 801EF706 0037 801EF707 003F 801EF708 0036 801EF709 0034 801EF70A 0043 801EF70B 0041 801EF70C 003B 801EF70D 0044 801EF70E 0049 801EF70F 0035 cn Beta World 1 cd Put on the code on load up,After the Nintendo logo you will be in that place of Choice.you can also choose another place & then press F1 (reset) to go to that place this is for beta interest only it will not assist you in playing the game. D03E6B3B 0000 801EF672 ???? 0000:"Mama's House non Beta",0001:"Fearful Spider House",0002:"Beneaf the Graveyard",0003:"Southern Swamp Mr Tingle Entry",0006:"Outside Tourist Information Southern Swamp",0008:"Outside Magic Hag's Potion Shop",000A:"Southern Swamp Woods Of Mystery Entry",0024:"Counter Of The Tresure Chest Shop",002E:"Woodfall Temple non Beta",0032:"Spider Hand",0035:"Statue outside Gorman Track",0036:"Statue outside Lair Of The Temples Boss",0038:"Path to Romani Ranch non Beta",004A:"outside The Royal Palace of the Deku Kingdom",004C:"Ledge in The Royal Palace of the Deku Kingdom",004E:"inside The Royal Palace of the Deku Kingdom 1",0071:"Green Blobs",0074:"Cave Portal to Last Boss Field",007F:"Waterfall Sothern Swamp",008A:"Giant Turtle In the Temple non beta",008B:"Room of Miau & Tijo Zora Great Hall",0094:"Recieving Gorans Mask non Beta",0095:"?",0096:"Hungry Goran in the Snow",00A2:"Statue in Stone Tower",00A6:"Stone Tower non Beta",00B9:"Recieving Deku Mask non Beta",00D9:"Giant Lizards in a Cave",00DA:"Cave with Steaming Water",00FF:"Vamps House In Ikana Canyon" cn Fight Demo Majora's Mask cd With this code,load the game & put the cheat on. then press start to apear in the Demo mode. 8016A718 0020 cn Event Item\Modifier 1 801EF6E5 ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Event Item\Modifier 2 801EF6EB ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Event Item\Modifier 3 801EF6F1 ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Have\Item Modifier 801EF6F0 ???? 0005:"Japanese Flute?",000B:"Japanese Item?",0010:"Great Fairy's Sword",0011:"Japanese Hookshot?",0031:"Japanese Scroll?",004A:"Japanese Bow?" cn Bottles\Bottle 1 Modifier 801EF6F2 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 2 Modifier 801EF6F3 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 3 Modifier 801EF6F4 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 4 Modifier 801EF6F5 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 5 Modifier 801EF6F6 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 6 Modifier 801EF6F7 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Use C-Buttons Anywhere cd This code allows you to use C-Button Items where you normally can't use them. (Created by: The Gentleman) 811F3588 0000 811F358A 0000 cn All Equipment Upgrades 801EF6DD 0023 811EF72A 201B 801EF6BC 004F cn Replace Sword With cd Only put the Deity Link's Sword on, if using The Play As Fierce Deity Link Code, if not it will turn Fierce Deity Link into a crazed slashing Machine. You have been warned. 801EF6BC ???? 004A:"Fire Arrow w/ Bow",004B:"Ice Arrow w/ Bow",004C:"Light Arrow w/ Bow",004D:"Kokiri Sword",004E:"Razor Sword",004F:"Guilded Sword",0050:"Deity Link's Sword" cn Play As 801EF690 ???? 0000:"Fierce Deity Link",0001:"Goron Link",0002:"Zora Link",0003:"Deku Link",0004:"Normal Link" cn Warp Modifier cd Put this code on and it will now take where you wanted to go, turn it back off or it will infinite loop entering all the time. D03E6B3A 0000 803FF395 0001 813FF39A ???? 0010:"Mayors Residence",0008:"Magic Hags Potion Shop",000A:"Romani Ranch Barn",000B:"Mama's House",000E:"Honey & Darlings Shop",0015:"Final Boss Arena",001F:"Beneath the Graveyard (left entrance)",002F:"Beneath the Graveyard (right entrance)",0030:"Southern Swamp (Reg Entrance)",004F:"Southern Swamp (from tour house)",006E:"Southern Swamp (from Woodfall)",006F:"Southern Swamp (from Deku Palace)",0078:"Path to Ikana Canyon",009E:"Southern Swamp (from Deku Place 2)",009F:"Southern Swamp (From Potion Shop)",00AF:"Boat Cruise (picture taking)",00CD:"Southern Swamp (From Woods of Mystery)",00CE:"Southern Swamp (From Spider House)",00CF:"Southern Swamp (From Ikana Canyon)",00FE:"Southern Swamp (From Owl Warp)",0E00:"Curiosity Shop",0E38:"Ikana Canyon Entrance",1500:"Lens of Truth Cave (get it)",2600:"Stone Tower Temple (Upside down)",2609:"Stone Tower Temple (Boss Room Entrance)",2604:"Treasure Chest Shop",2605:"Treausre Chest Shop (counter)",260E:"Clock Tower (w/ skull kid, silent)",2610:"Stone Tower Temple (endless fall)",6214:"Romani Ranch",9214:"Zora Shop",B214:"Snowhead (Path to temple, warp in)",D214:"East Clock Down" crc B443EB08-4DB31193-C:45 gn Legend of Zelda, The - Majora's Mask (U) (GC Version) cn Infinite\Health 811ED866 0140 cn Infinite\Hearts Options cd If you need to clear the Infinite Max Hearts from the screen just choose the 6 or 4 Heart Options, take off the cheat & then make a save. 811ED864 ???? 0140:"Max Hearts",0063:"6 Hearts",0043:"4 Hearts" cn Have\All Quest/Status Items 801ED8ED 0005 811ED8EE F7CF cn Infinite\Rupees 811ED86A 03E7 cn Infinite\Max & Double Magic Meter 801ED869 0060 811ED870 0101 cn Infinite\Items 801ED8D1 0063 50000501 0000 801ED8D6 0063 50000201 0000 801ED8DC 0063 cn Have\Ocarina of Time 801ED8A0 0000 cn Have\Hero's Bow 801ED8A1 0001 cn Have\Arrows\Fire Arrow 801ED8A2 0002 cn Have\Arrows\Ice Arrow 801ED8A3 0003 cn Have\Arrows\Light Arrow 801ED8A4 0004 cn Have\Bombs 801ED8A6 0006 cn Have\Bombchu 801ED8A7 0007 cn Have\Deku Sticks 801ED8A8 0008 cn Have\Deku Nuts 801ED8A9 0009 cn Have\Magic Beans 801ED8AA 000A cn Have\Powder Kegs 801ED8AC 000C cn Have\Pictograph 801ED8AD 000D cn Have\Lens of Truth 801ED8AE 000E cn Have\Hookshot 801ED8AF 000F cn Have\Great Fairy's Sword 801ED8B0 0010 cn Maximum Visibility 801642D8 0020 cn Fog\Blue 801642C8 0020 cn Fog\Pink 801642CC 0020 cn Fog\Yellow 801642D0 0020 cn Press L To Levitate cd Press L To Levitate & Let go to land D038127B 0020 8139A558 40CB cn Have\All Masks 801ED8B8 003E 801ED8B9 0038 801ED8BA 0047 801ED8BB 0045 801ED8BC 0040 801ED8BD 0032 801ED8BE 003A 801ED8BF 0046 801ED8C0 0039 801ED8C1 0042 801ED8C2 0048 801ED8C3 0033 801ED8C4 003C 801ED8C5 003D 801ED8C6 0037 801ED8C7 003F 801ED8C8 0036 801ED8C9 0034 801ED8CA 0043 801ED8CB 0041 801ED8CC 003B 801ED8CD 0044 801ED8CE 0049 801ED8CF 0035 cn Beta World 1 cd Put on the code on load up,After the Nintendo logo you will be in that place of Choice.you can also choose another place & then press F1 (reset) to go to that place this is for beta interest only it will not assist you in playing the game. D038127B 0000 801ED832 ???? 0000:"Mama's House non Beta",0001:"Fearful Spider House",0002:"Beneaf the Graveyard",0003:"Southern Swamp Mr Tingle Entry",0006:"Outside Tourist Information Southern Swamp",0008:"Outside Magic Hag's Potion Shop",000A:"Southern Swamp Woods Of Mystery Entry",0024:"Counter Of The Tresure Chest Shop",002E:"Woodfall Temple non Beta",0032:"Spider Hand",0035:"Statue outside Gorman Track",0036:"Statue outside Lair Of The Temples Boss",0038:"Path to Romani Ranch non Beta",004A:"outside The Royal Palace of the Deku Kingdom",004C:"Ledge in The Royal Palace of the Deku Kingdom",004E:"inside The Royal Palace of the Deku Kingdom 1",0071:"Green Blobs",0074:"Cave Portal to Last Boss Field",007F:"Waterfall Sothern Swamp",008A:"Giant Turtle In the Temple non beta",008B:"Room of Miau & Tijo Zora Great Hall",0094:"Recieving Gorans Mask non Beta",0095:"?",0096:"Hungry Goran in the Snow",00A2:"Statue in Stone Tower",00A6:"Stone Tower non Beta",00B9:"Recieving Deku Mask non Beta",00D9:"Giant Lizards in a Cave",00DA:"Cave with Steaming Water",00FF:"Vamps House In Ikana Canyon" cn Fight Demo Majora's Mask cd With this code,load the game & put the cheat on. then press start to apear in the Demo mode. 801688D8 0020 cn Event Item\Modifier 1 801ED8A5 ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Event Item\Modifier 2 801ED8AB ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Event Item\Modifier 3 801ED8B1 ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Have\Item Modifier 801ED8B0 ???? 0005:"Japanese Flute?",000B:"Japanese Item?",0010:"Great Fairy's Sword",0011:"Japanese Hookshot?",0031:"Japanese Scroll?",004A:"Japanese Bow?" cn Bottles\Bottle 1 Modifier 801ED8B2 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 2 Modifier 801ED8B3 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 3 Modifier 801ED8B4 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 4 Modifier 801ED8B5 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 5 Modifier 801ED8B6 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 6 Modifier 801ED8B7 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Use C-Buttons Anywhere cd This code allows you to use C-Button Items where you normally can't use them. (Created by: The Gentleman) 811F1748 0000 811F174A 0000 cn All Equipment Upgrades 801ED89D 0023 811ED8EA 201B 801ED87C 004F cn Replace Sword With cd Only put the Deity Link's Sword on, if using The Play As Fierce Deity Link Code, if not it will turn Fierce Deity Link into a crazed slashing Machine. You have been warned. 801ED87C ???? 004A:"Fire Arrow w/ Bow",004B:"Ice Arrow w/ Bow",004C:"Light Arrow w/ Bow",004D:"Kokiri Sword",004E:"Razor Sword",004F:"Guilded Sword",0050:"Deity Link's Sword" cn Play As 801ED850 ???? 0000:"Fierce Deity Link",0001:"Goron Link",0002:"Zora Link",0003:"Deku Link",0004:"Normal Link" cn Warp Modifier cd Put this code on and it will now take where you wanted to go, turn it back off or it will infinite loop entering all the time. D03E4CFA 0000 803FD555 0001 813FD55A ???? 0010:"Mayors Residence",0008:"Magic Hags Potion Shop",000A:"Romani Ranch Barn",000B:"Mama's House",000E:"Honey & Darlings Shop",0015:"Final Boss Arena",001F:"Beneath the Graveyard (left entrance)",002F:"Beneath the Graveyard (right entrance)",0030:"Southern Swamp (Reg Entrance)",004F:"Southern Swamp (from tour house)",006E:"Southern Swamp (from Woodfall)",006F:"Southern Swamp (from Deku Palace)",0078:"Path to Ikana Canyon",009E:"Southern Swamp (from Deku Place 2)",009F:"Southern Swamp (From Potion Shop)",00AF:"Boat Cruise (picture taking)",00CD:"Southern Swamp (From Woods of Mystery)",00CE:"Southern Swamp (From Spider House)",00CF:"Southern Swamp (From Ikana Canyon)",00FE:"Southern Swamp (From Owl Warp)",0E00:"Curiosity Shop",0E38:"Ikana Canyon Entrance",1500:"Lens of Truth Cave (get it)",2600:"Stone Tower Temple (Upside down)",2609:"Stone Tower Temple (Boss Room Entrance)",2604:"Treasure Chest Shop",2605:"Treausre Chest Shop (counter)",260E:"Clock Tower (w/ skull kid, silent)",2610:"Stone Tower Temple (endless fall)",6214:"Romani Ranch",9214:"Zora Shop",B214:"Snowhead (Path to temple, warp in)",D214:"East Clock Down" crc EC7011B7-7616D72B-C:45 gn Legend of Zelda, The - Ocarina of Time (U) (V1.0) cn Infinite\Rupees cd This cheat allows you to have the max Rupees to the Wallet you currently Hold 8111B99C 0001 cn Press R\For Old Or Young Link cd To Activate this Cheat Hold The R Button when walking through a Doorway this will change you to the option on the other side, Disable this Cheat straight away after getting to the other side, in some places you might even get Access Violations. Just press ok untill you can carry on. D01C84B5 0010 8011A5D7 ???? 0001:"Link Young",0000:"Link Old" cn Use Any Item In Any House cd do not use under or in water 8111B7F2 0000 8111B7F4 0000 cn Have\All Equipment cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111A66C 7777 cn Have\All Quest/Status Items cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111A674 30FF 8111A676 FFFF cn Max\Heart Containers 8111A5FE 0140 cn Max\Gold Skulltulas Killed 8011A6A1 0064 cn Time of Day Modifier 8111A5DC ???? 4000:"At Sunrise",5800:"Daylight Out",7000:"Very Bright Out",C000:"At Sunset",D000:"Fairly Dark" cn Infinite\Energy 8111A600 0140 cn Infinite\Magic D011A609 0008 8011A60A 0001 8011A60C 0001 8011A603 0060 cn Tunic & Boot Options cd This changes what you are wearing,once you have enabled the code press Start & then start again. 8011A640 ???? 0011:"Kokiri Tunic & Kokiri Boots",0012:"Goron Tunic & Kokiri Boots",0013:"Zora Tunic & Kokiri Boots",0014:"Black Tunic & Kokiri Boots",0015:"White Tunic & Kokiri Boots",0016:"Yellow Tunic & Kokiri Boots",0021:"Kokiri Tunic & Iron Boots",0022:"Goron Tunic & Iron Boots",0023:"Zora Tunic & Iron Boots",0024:"Black Tunic & Iron Boots",0025:"White Tunic & Iron Boots",0026:"Yellow Tunic & Iron Boots",0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Infinite\Deku Sticks 8011A65C 0009 cn Infinite\Deku Nuts 8011A65D 0009 cn Infinite\Bombs 8011A65E 0009 cn Infinite\Arrows 8011A65F 0009 cn Infinite\Deku Seeds 8011A662 0009 cn Infinite\Bombchu's 8011A664 0009 cn Infinite\Magic Beans 8011A66A 0009 cn Infinite\Big Key,Small Keys,Compass,& Map 8011A678 0007 8011A679 0007 8011A67A 0007 8011A67B 0007 8011A67C 0007 8011A67D 0007 8011A67E 0007 8011A67F 0007 8011A680 0007 8011A681 0007 8011A682 0007 8011A68F 0009 8011A690 0009 8011A691 0009 8011A692 0009 8011A693 0009 8011A699 0009 8011A69C 0009 8011A697 0009 cn Have\Ocarina 8011A64B ???? 0007:"Fairy Ocarina",0008:"Ocarina Of Time" cn Have\Boomerang 8011A650 000E cn Have\Lens of Truth 8011A651 000F cn Have\Megaton Hammer 8011A653 0011 cn Have\Deku Stick 8011A644 0000 cn Have\Deku Nut 8011A645 0001 cn Have\Bombs 8011A646 0002 cn Have\Fairy Bow 8011A647 0003 cn Have\Fairy Slingshot 8011A64A 0006 cn Have\Bombchu 8011A64C 0009 cn Have\Arrows\Fire Arrow 8011A648 0004 cn Have\Arrows\Ice Arrow 8011A64E 000C cn Have\Arrows\Light Arrow 8011A654 0012 cn Have\Hookshot 8011A64D ???? 000A:"Hookshot",000B:"Longshot" cn Have\Magic Beans 8011A652 0010 cn Have\Magic\Fairie's Wind 8011A64F 000D cn Have\Magic\Nayru's Love 8011A655 0013 cn Have\Magic\Din's Fire 8011A649 0005 cn Bottles\Bottle 1 Modifier 8011A656 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 2 Modifier 8011A657 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 3 Modifier 8011A658 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 4 Modifier 8011A659 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Trading\Adult Link Item 8011A65A ???? 002D:"Pocket Egg",002E:"Pocket Cucco",002F:"Cojiro",0030:"Odd Mushroom",0031:"Odd Potion",0032:"Poacher's Saw",0033:"Goron's Sword (Broken)",0034:"Prescription",0035:"Eyeball Frog",0036:"Eye Drops",0037:"Claim Check" cn Trading\Young Link Item 8011A65B ???? 0021:"Weird Egg",0022:"Chicken",0023:"Zelda's Letter",0024:"Keaton Mask",0025:"Skull Mask",0026:"Spooky Mask",0027:"Bunny Hood",0028:"Goron Mask",0029:"Zora Mask",002A:"Gerudo Mask",002B:"Mask of Truth",002C:"SOLD OUT" cn Turn Giant's Knife Into Biggoron's Sword 8011A60E 0001 cn Have Quiver (Holds 30) 8011A671 0001 cn Equipment Modifier 1 cd This modifies the equipment you are carrying. 8011A672 ???? 0002:"Silver Scale",0004:"Golden Scale",0006:"Giant's Knife (Broken)",0035:"Black Gauntlets",0040:"Bullet Bag (Holds 30)",0080:"Bullet Bag (Holds 40)",00C0:"Bullet Bag (Holds 50)" cn Equipment Modifier 2 cd This modifies the equipment you are carrying. 8011A673 ???? 0008:"Bomb Bag (Holds 20)",0010:"Bomb Bag (Holds 30)",0018:"Bomb Bag (Holds 40)",0020:"Goron's Bracelet",0028:"Silver Gauntlets",0030:"Golden Gauntlets" cn Press L\To Levitate cd Press L To Levitate & Let go to land D01C84B5 0020 811DAA90 40CB cn Press L\For infinite Hover Boots cd Press L For Infinite Hover Boots & Let go to land,This Only works when you have the Boots on D01C84B5 0020 811DB2B2 000D cn Instant Step Hoover Boots cd Take off from Anywhere & to go higher just press L Once, this will lift you higher while walking.to come back Down Keep R pressed.Once you have enabled the code press Start & then start again. D01C84B5 0020 811DAA90 40CB D01C84B5 0000 811DB2B2 000D 8011A640 ???? 0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Beta\Play Beta Quest Worlds cd Put on the code on load up,After the Nintendo logo you will be in Beta Mode,There are no icons, energy bar etc. on the screen.When you press a C-Buttton you can use an object.Here the objects for the C-Buttons:C-left: arrows, C-down: bombs, C-right: Ocarina of Time. There is also no Navi and start menu.When you go to some places the game will freeze or you can't move. D01C84B5 0000 8011B9E3 ???? 0000:"World 01",0001:"World 02",0002:"World 03",0003:"World 04",0004:"World 05",0007:"World 06",0008:"World 07",0016:"World 08" cn Warp Song Location\Minuet of Forest & Serenade of Water cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011B965 ???? 0000:"Sacred Forest Meadow",0004:"Lake Hylia",0015:"Inside Jabu Jabu's Belly",0018:"Dodongo's Cavern",0068:"Inside The Deku Tree" cn Warp Song Location\Prelude of Light & Nocturne of Shadow cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011B965 ???? 0003:"Kakariko Windmill",0007:"Bombchu Bowling Alley",000F:"Zelda & Impa Flee",0014:"Kakariko Village",0017:"Ganon,Final Battle",001D:"Top of Ganon's Tower",0028:"Bombchu Shop",002C:"Bazaar",0030:"Happy Mask Shop",0034:"Ganon's Tower",0038:"Ganon's Castle",004C:"Inside Spirit Door",006C:"Burning Castle",0050:"House of Skulltula",0064:"Death Mountain Trail",0068:"Graveyard",0070:"Thieves' Hideout",0074:"Royal Family's Tomb",0078:"Great Fairy Fountain 1",0084:"Forest Temple,Room With Falling Floor",0088:"Great Fairy Fountain 2",0099:"Grotto 01",009D:"Grotto 02",00A4:"Grotto 04",00A8:"Grotto 05",00B3:"Grotto 06",00B0:"Grotto 07",00B4:"Grotto 08",00B8:"Grotto 09",00C3:"Grotto 10",00C0:"Grotto 11",00C4:"Grotto 12",00FC:"Grotto 13",00D3:"Bottom of the Well",00D0:"Lon Lon Ranch Shed",00D3:"Lon Lon Ranch Outside Shed",00D8:"Ice Cavern",00E3:"Outside Cow Pen",00E0:"Lost Woods Bridge",00E4:"Lon Lon Ranch Chicken Room",00E8:"In Front of Deku Tree",00EB:"Spirit Temple Boss",00F1:"Castle Courtyard,In Front of Zelda",00F4:"Temple of Time",00F8:"Gerudo Fortress Jail" cn Warp Song Location\Bolero of Fire cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011B965 ???? 0003:"Castle Courtyard",000B:"Dodongo's Cavern Boss",0010:"Inside The Deku Tree Boss",0014:"Shadow Temple Boss",0017:"Water Temple Boss",001C:"Ganon's Castle Tower",001F:"Ganon First Battle",0028:"Ganon's Castle Room Before Ganon",002B:"Inside Ganon's Castle Room With Pillar",002F:"Lon Lon Ranch",0033:"Mido's House",0037:"Saria's House",004B:"Bearded Man's House",0040:"Top of Ganon's Castle",0047:"Outside Saria's House",004F:"Dampe's Race",0057:"Kokiri Forest",005B:"Top of Death Mountain",005F:"Fishing Pond",0068:"Inside Ganon's Castle",007F:"Hyrule Castle Gate",00BA:"Top of Ganon's Tower",00C2:"Great Fairy Fountain",00D6:"Lost Woods Goron Entrance",00DA:"Lost Woods River Entrance",00DE:"Lost Woods Bridge Field Entrance",00E3:"Goron City Lost Woods Entrance",00F6:"Death Mountain Crater",00FD:"Ganon's Castle" cn Warp Song Location\Requiem of Spirit cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011B965 ???? 0005:"Lake Hylia,08 Zora's Domain",0018:"Gerudo Valley",001E:"Lost Woods",0028:"Gerudo Fortress",0030:"Haunted Wasteland",0034:"Ganon's Castle Inside Burning Castle",0038:"Hyrule Castle",003A:"Ganon's Castle",003D:"Death Mountain Trail",004D:"Goron City",0065:"Fire Temple",0069:"Forest Temple",006E:"Shooting Gallery",0079:"Ganon's Castle Inside Burning Castle",007E:"Kakariko Village Entrance",007B:"Zora's River Entrance",0085:"Kokiri Forest Entrance",008A:"Lake Hyrule Entrance",008E:"Gerudo Valley Entrance",0092:"Death Mountain Trail Entrance",0095:"Graveyard Entrance",009E:"Zora's Domain Entrance",00A2:"Zora's Fountain Entrance",00BA:"Goron City Entrance",00BE:"Death Mountain Trail",00C1:"Goron City",00C5:"Lakeside Laboratory",00C9:"Top of Ganon's Castle",00CD:"Hyrule Market (Child Link's)",00CF:"Hyrule Market (Adult Link's)",00F1:"Desert Colossus",00FA:"Lon Lon Ranch Entrance",00FD:"Hyrule Field" cn Max\Double Defense Power cd This gives you White Border Hearts 8011A69F 0014 cn Nayru's Love is Always cd For this to work On Or off, you have to walk through a Doorway to activate the Change. 8111B998 ???? 0000:"OFF",FFFF:"ON" cn Infinite\Timers\All Other Timers cd This cheat works on all Race Timers not the final Boss and Under Water with iron Boots etc. 8011B9A1 0032 cn Epona\Max Carrots\Lon Lon Raunch cd This is For Practicing,Racing.Warning take this off before jumping the exit fence after winning Epona 801F2208 0005 801EEC88 0005 cn Infinite\Timers\Escape From Gannons Tower cd This cheat works only on The Final Boss. 8011B9A5 00B4 cn Beta\Specific things lean cd This code will cause all items on a specific plane to lean. This is helpful for areas in which the plane causes the crash (Ex. Weird Zora's Fountain Beta Quest 01). 80025614 0001 cn Beta\Appear in Strange Places (Hold R) cd If you go to an area where Link is immobile or invisible, using the "appear in strange places" code will almost always fix it, but you'll start somewhere outside of the Arena and in air. I recommend using the infinite step Hover boots code already supplied with PJ64 so you can float back into the arena in the event that this happens. D01C84B5 0010 8111B936 0001 cn Beta\Interface always off/on cd If you go to an area where the interface is accessible, this signigfies that you're not in 'beta' mode anymore. Using the "interface always off/on" code, you can stay in 'beta' mode regardless of what happens. This may cause more crashes in SOME areas, but it's rare and is not too severe. If you need to explore a beta area with the interface, "use the interface always on" portion of the code. Don't use the codes as you start the game. If you need the interface on/off at a specific time, start the game, go to the area, activate the code, keep it on until next reset. 8011B4B9 00FF 8011B92F ???? 0000:"Off",0001:"On" cn Always Have Wallet Size 8011A672 ???? 0047:"Kid Wallet (Holds 99)",0057:"Adult Wallet (Holds 200)",0067:"Giant Wallet (Holds 500)" cn Press L+R For FMV Select cd Hold down `L+R' after the Nintendo logo is spinning to see your favourite FMV D01C84B5 0030 8111A5D2 00A0 D01C84B5 0030 8111A5DA ???? FFF0:"Triforce FMV",FFF1:"fire FMV",FFF2:"Triforce FMV",FFF3:"Ganondorf FMV",FFF4:"Planet Making FMV",FFF5:"Fire FMV",FFF6:"Ganondorf FMV",FFF7:"More Triforce FMV",FFF8:"Ending" cn Dark Link\Make Dark Link Apear In TOT 8023E80F 0020 8023E815 0033 cn Dark Link\Play As Dark Link D01C84B5 0020 811DAB60 801E D01C84B5 0020 811F2C24 801D D01C84B5 0020 811F2C26 AA30 D01C84B5 0020 811CA0E4 801E D01C84B5 0020 811CA0E6 4B60 D01C84B5 0020 811E4B60 0000 D01C84B5 0020 811E4B62 02FF D01C84B5 0020 811DAA30 0033 D01C84B5 0020 811DAA32 0901 D01C84B5 0020 811DAB62 27E0 D01C84B5 0020 811E4C90 8009 D01C84B5 0020 811E4C92 7740 D01C84B5 0020 811C8710 801E D01C84B5 0020 811C8712 4B60 crc D43DA81F-021E1E19-C:45 gn Legend of Zelda, The - Ocarina of Time (U) (V1.1) cn Infinite\Rupees cd This cheat allows you to have the max Rupees to the Wallet you currently Hold 8111BB5C 0001 cn Press R\For Old Or Young Link cd To Activate this Cheat Hold The R Button when walking through a Doorway this will change you to the option on the other side, Disable this Cheat straight away after getting to the other side, in some places you might even get Access Violations. Just press ok untill you can carry on. D01C8675 0010 8011A797 ???? 0001:"Link Young",0000:"Link Old" cn Use Any Item In Any House cd do not use under or in water 8111B9B2 0000 8111B9B4 0000 cn Have\All Equipment cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111A82C 7777 cn Have\All Quest/Status Items cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111A834 30FF 8111A836 FFFF cn Max\Heart Containers 8111A7BE 0140 cn Max\Gold Skulltulas Killed 8011A861 0064 cn Time of Day Modifier 8111A79C ???? 4000:"At Sunrise",5800:"Daylight Out",7000:"Very Bright Out",C000:"At Sunset",D000:"Fairly Dark" cn Infinite\Energy 8111A7C0 0140 cn Infinite\Magic D011A7C9 0008 8011A7CA 0001 8011A7CC 0001 8011A7C3 0060 cn Tunic & Boot Options cd This changes what you are wearing,once you have enabled the code press Start & then start again. 8011A800 ???? 0011:"Kokiri Tunic & Kokiri Boots",0012:"Goron Tunic & Kokiri Boots",0013:"Zora Tunic & Kokiri Boots",0014:"Black Tunic & Kokiri Boots",0015:"White Tunic & Kokiri Boots",0016:"Yellow Tunic & Kokiri Boots",0021:"Kokiri Tunic & Iron Boots",0022:"Goron Tunic & Iron Boots",0023:"Zora Tunic & Iron Boots",0024:"Black Tunic & Iron Boots",0025:"White Tunic & Iron Boots",0026:"Yellow Tunic & Iron Boots",0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Infinite\Deku Sticks 8011A81C 0009 cn Infinite\Deku Nuts 8011A81D 0009 cn Infinite\Bombs 8011A81E 0009 cn Infinite\Arrows 8011A81F 0009 cn Infinite\Deku Seeds 8011A822 0009 cn Infinite\Bombchu's 8011A824 0009 cn Infinite\Magic Beans 8011A82A 0009 cn Infinite\Big Keys,Small Keys,Compass,& Map 8011A838 0007 8011A839 0007 8011A83A 0007 8011A83B 0007 8011A83C 0007 8011A83D 0007 8011A83E 0007 8011A83F 0007 8011A840 0007 8011A841 0007 8011A842 0007 8011A84F 0009 8011A850 0009 8011A851 0009 8011A852 0009 8011A853 0009 8011A859 0009 8011A85C 0009 8011A857 0009 cn Have\Ocarina 8011A80B ???? 0007:"Fairy Ocarina",0008:"Ocarina Of Time" cn Have\Boomerang 8011A810 000E cn Have\Lens of Truth 8011A811 000F cn Have\Megaton Hammer 8011A813 0011 cn Have\Deku Stick 8011A804 0000 cn Have\Deku Nut 8011A805 0001 cn Have\Bombs 8011A806 0002 cn Have\Fairy Bow 8011A807 0003 cn Have\Fairy Slingshot 8011A80A 0006 cn Have\Bombchu 8011A80C 0009 cn Have\Arrows\Fire Arrow 8011A808 0004 cn Have\Arrows\Ice Arrow 8011A80E 000C cn Have\Arrows\Light Arrow 8011A814 0012 cn Have\Hookshot 8011A80D ???? 000A:"Hookshot",000B:"Longshot" cn Have\Magic Beans 8011A812 0010 cn Have\Magic\Fairie's Wind 8011A80F 000D cn Have\Magic\Nayru's Love 8011A815 0013 cn Have\Magic\Din's Fire 8011A809 0005 cn Bottles\Bottle 1 Modifier 8011A816 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 2 Modifier 8011A817 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 3 Modifier 8011A818 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 4 Modifier 8011A819 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Trading\Adult Link Item 8011A81A ???? 002D:"Pocket Egg",002E:"Pocket Cucco",002F:"Cojiro",0030:"Odd Mushroom",0031:"Odd Potion",0032:"Poacher's Saw",0033:"Goron's Sword (Broken)",0034:"Prescription",0035:"Eyeball Frog",0036:"Eye Drops",0037:"Claim Check" cn Trading\Young Link Item 8011A81B ???? 0021:"Weird Egg",0022:"Chicken",0023:"Zelda's Letter",0024:"Keaton Mask",0025:"Skull Mask",0026:"Spooky Mask",0027:"Bunny Hood",0028:"Goron Mask",0029:"Zora Mask",002A:"Gerudo Mask",002B:"Mask of Truth",002C:"SOLD OUT" cn Turn Giant's Knife Into Biggoron's Sword 8011A7CE 0001 cn Have Quiver (Holds 30) 8011A831 0001 cn Equipment Modifier 1 cd This modifies the equipment you are carrying. 8011A832 ???? 0002:"Silver Scale",0004:"Golden Scale",0006:"Giant's Knife (Broken)",0035:"Black Gauntlets",0040:"Bullet Bag (Holds 30)",0080:"Bullet Bag (Holds 40)",00C0:"Bullet Bag (Holds 50)" cn Equipment Modifier 2 cd This modifies the equipment you are carrying. 8011A833 ???? 0008:"Bomb Bag (Holds 20)",0010:"Bomb Bag (Holds 30)",0018:"Bomb Bag (Holds 40)",0020:"Goron's Bracelet",0028:"Silver Gauntlets",0030:"Golden Gauntlets" cn Press L To Levitate cd Press L To Levitate & Let go to land D01C8675 0020 811DAC50 40CB cn Press L For infinite Hover Boots cd Press L For Infinite Hover Boots & Let go to land,This Only works when you have the Boots on D01C8675 0020 811DB472 000D cn Instant Step Hoover Boots cd Take off from Anywhere & to go higher just press L Once, this will lift you higher while walking.to come back Down Keep R pressed.Once you have enabled the code press Start & then start again. D01C8675 0020 811DAC50 40CB D01C8675 0000 811DB472 000D 8011A800 ???? 0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Beta\Play Beta Quest Worlds cd Put on the code on load up,After the Nintendo logo you will be in Hyrule Field,There are no icons, energy bar etc. on the screen.When you press a C-Buttton you can use an object.Here the objects for the C-Buttons:C-left: arrows, C-down: bombs, C-right: Ocarina of Time. There is also no Navi and start menu.When you go to some places the game will freeze or you can't move. D01C8675 0000 8011BBA3 ???? 0000:"World 01",0001:"World 02",0002:"World 03",0003:"World 04",0004:"World 05",0007:"World 06",0008:"World 07",0016:"World 08" cn Warp Song Location\Minuet of Forest & Serenade of Water cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011BB25 ???? 0000:"Sacred Forest Meadow",0004:"Lake Hylia",0015:"Inside Jabu Jabu's Belly",0018:"Dodongo's Cavern",0068:"Inside The Deku Tree" cn Warp Song Location\Prelude of Light & Nocturne of Shadow cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011BB25 ???? 0003:"Kakariko Windmill",0007:"Bombchu Bowling Alley",000F:"Zelda & Impa Flee",0014:"Kakariko Village",0017:"Ganon,Final Battle",001D:"Top of Ganon's Tower",0028:"Bombchu Shop",002C:"Bazaar",0030:"Happy Mask Shop",0034:"Ganon's Tower",0038:"Ganon's Castle",004C:"Inside Spirit Door",006C:"Burning Castle",0050:"House of Skulltula",0064:"Death Mountain Trail",0068:"Graveyard",0070:"Thieves' Hideout",0074:"Royal Family's Tomb",0078:"Great Fairy Fountain 1",0084:"Forest Temple,Room With Falling Floor",0088:"Great Fairy Fountain 2",0099:"Grotto 01",009D:"Grotto 02",00A4:"Grotto 04",00A8:"Grotto 05",00B3:"Grotto 06",00B0:"Grotto 07",00B4:"Grotto 08",00B8:"Grotto 09",00C3:"Grotto 10",00C0:"Grotto 11",00C4:"Grotto 12",00FC:"Grotto 13",00D3:"Bottom of the Well",00D0:"Lon Lon Ranch Shed",00D3:"Lon Lon Ranch Outside Shed",00D8:"Ice Cavern",00E3:"Outside Cow Pen",00E0:"Lost Woods Bridge",00E4:"Lon Lon Ranch Chicken Room",00E8:"In Front of Deku Tree",00EB:"Spirit Temple Boss",00F1:"Castle Courtyard,In Front of Zelda",00F4:"Temple of Time",00F8:"Gerudo Fortress Jail" cn Warp Song Location\Bolero of Fire cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011BB25 ???? 0003:"Castle Courtyard",000B:"Dodongo's Cavern Boss",0010:"Inside The Deku Tree Boss",0014:"Shadow Temple Boss",0017:"Water Temple Boss",001C:"Ganon's Castle Tower",001F:"Ganon First Battle",0028:"Ganon's Castle Room Before Ganon",002B:"Inside Ganon's Castle Room With Pillar",002F:"Lon Lon Ranch",0033:"Mido's House",0037:"Saria's House",004B:"Bearded Man's House",0040:"Top of Ganon's Castle",0047:"Outside Saria's House",004F:"Dampe's Race",0057:"Kokiri Forest",005B:"Top of Death Mountain",005F:"Fishing Pond",0068:"Inside Ganon's Castle",007F:"Hyrule Castle Gate",00BA:"Top of Ganon's Tower",00C2:"Great Fairy Fountain",00D6:"Lost Woods Goron Entrance",00DA:"Lost Woods River Entrance",00DE:"Lost Woods Bridge Field Entrance",00E3:"Goron City Lost Woods Entrance",00F6:"Death Mountain Crater",00FD:"Ganon's Castle" cn Warp Song Location\Requiem of Spirit cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011BB25 ???? 0005:"Lake Hylia,08 Zora's Domain",0018:"Gerudo Valley",001E:"Lost Woods",0028:"Gerudo Fortress",0030:"Haunted Wasteland",0034:"Ganon's Castle Inside Burning Castle",0038:"Hyrule Castle",003A:"Ganon's Castle",003D:"Death Mountain Trail",004D:"Goron City",0065:"Fire Temple",0069:"Forest Temple",006E:"Shooting Gallery",0079:"Ganon's Castle Inside Burning Castle",007E:"Kakariko Village Entrance",007B:"Zora's River Entrance",0085:"Kokiri Forest Entrance",008A:"Lake Hyrule Entrance",008E:"Gerudo Valley Entrance",0092:"Death Mountain Trail Entrance",0095:"Graveyard Entrance",009E:"Zora's Domain Entrance",00A2:"Zora's Fountain Entrance",00BA:"Goron City Entrance",00BE:"Death Mountain Trail",00C1:"Goron City",00C5:"Lakeside Laboratory",00C9:"Top of Ganon's Castle",00CD:"Hyrule Market (Child Link's)",00CF:"Hyrule Market (Adult Link's)",00F1:"Desert Colossus",00FA:"Lon Lon Ranch Entrance",00FD:"Hyrule Field" cn Max\Double Defense Power cd This gives you White Border Hearts 8011A85F 0014 cn Nayru's Love is Always cd For this to work On Or off, you have to walk through a Doorway to activate the Change. 8111BB58 ???? 0000:"OFF",FFFF:"ON" cn Infinite\Timers\All Other Timers cd This cheat works on all Race Timers not the final Boss and Under Water with iron Boots etc. 8011BB61 0032 cn Epona\Max Carrots\Lon Lon Raunch cd This is For Practicing,Racing.Warning take this off before jumping the exit fence after winning Epona 801F3688 0005 801F3848 0005 cn Infinite\Timers\Escape From Gannons Tower cd This cheat works only on The Final Boss. 8011BB65 00B4 cn Beta\Specific things lean cd This code will cause all items on a specific plane to lean. This is helpful for areas in which the plane causes the crash (Ex. Weird Zora's Fountain Beta Quest World 01) 800257D4 0001 cn Beta\Appear in Strange Places (Hold R) cd If you go to an area where Link is immobile or invisible, using the "appear in strange places" code will almost always fix it, but you'll start somewhere outside of the Arena and in air. I recommend using the infinite step Hover boots code already supplied with PJ64 so you can float back into the arena in the event that this happens. D01C8675 0010 8111BAF6 0001 cn Beta\Interface always off/on cd If you go to an area where the interface is accessible, this signigfies that you're not in 'beta' mode anymore. Using the "interface always off/on" code, you can stay in 'beta' mode regardless of what happens. This may cause more crashes in SOME areas, but it's rare and is not too severe. If you need to explore a beta area with the interface, "use the interface always on" portion of the code. Don't use the codes as you start the game. If you need the interface on/off at a specific time, start the game, go to the area, activate the code, keep it on until next reset. 8011B679 00FF 8011BAEF ???? 0000:"Off",0001:"On" cn Always Have Wallet Size 8011A832 ???? 0047:"Kid Wallet (Holds 99)",0057:"Adult Wallet (Holds 200)",0067:"Giant Wallet (Holds 500)" cn Press L+R For FMV Select cd Hold down `L+R' after the Nintendo logo is spinning to see your favourite FMV D01C8675 0030 8011A793 00A0 D01C8675 0030 8011A79B ???? F000:"riforce FMV",F10F:"ire FMV",F200:"riforce FMV",F300:"anondorf FMV",F400:"lanet Making FMV",F50F:"ire FMV",F600:"anondorf FMV",F700:"ore Triforce FMV",F80E:"nding" cn Dark Link\Make Dark Link Apear In TOT 8023E9AF 0020 8023E9B5 0033 crc 693BA2AE-B7F14E9F-C:45 gn Legend of Zelda, The - Ocarina of Time (U) (V1.2) cn Infinite\Rupees cd This cheat allows you to have the max Rupees to the Wallet you currently Hold 8111C04C 0001 cn Press R\For Old Or Young Link cd To Activate this Cheat Hold The R Button when walking through a Doorway this will change you to the option on the other side, Disable this Cheat straight away after getting to the other side, in some places you might even get Access Violations. Just press ok untill you can carry on. D01C8D75 0010 8011AC87 ???? 0001:"Link Young",0000:"Link Old" cn Use Any Item In Any House cd do not use under or in water 8111BEA2 0000 8111BEA4 0000 cn Have\All Equipment cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111AD1C 7777 cn Have\All Quest/Status Items cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111AD24 30FF 8111AD26 FFFF cn Max\Heart Containers 8111ACAE 0140 cn Max\Gold Skulltulas Killed 8011AD51 0064 cn Time of Day Modifier 8111AC8C ???? 4000:"At Sunrise",5800:"Daylight Out",7000:"Very Bright Out",C000:"At Sunset",D000:"Fairly Dark" cn Infinite\Energy 8111ACB0 0140 cn Infinite\Magic D011ACB9 0008 8011ACBA 0001 8011ACBC 0001 8011ACB3 0060 cn Tunic & Boot Options cd This changes what you are wearing,once you have enabled the code press Start & then start again. 8011ACF0 ???? 0011:"Kokiri Tunic & Kokiri Boots",0012:"Goron Tunic & Kokiri Boots",0013:"Zora Tunic & Kokiri Boots",0014:"Black Tunic & Kokiri Boots",0015:"White Tunic & Kokiri Boots",0016:"Yellow Tunic & Kokiri Boots",0021:"Kokiri Tunic & Iron Boots",0022:"Goron Tunic & Iron Boots",0023:"Zora Tunic & Iron Boots",0024:"Black Tunic & Iron Boots",0025:"White Tunic & Iron Boots",0026:"Yellow Tunic & Iron Boots",0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Infinite\Deku Sticks 8011AD0C 0009 cn Infinite\Deku Nuts 8011AD0D 0009 cn Infinite\Bombs 8011AD0E 0009 cn Infinite\Arrows 8011AD0F 0009 cn Infinite\Deku Seeds 8011AD12 0009 cn Infinite\Bombchu's 8011AD14 0009 cn Infinite\Magic Beans 8011AD1A 0009 cn Infinite\Big Key,Small Keys,Compass,& Map 8011AD28 0007 8011AD29 0007 8011AD2A 0007 8011AD2B 0007 8011AD2C 0007 8011AD2D 0007 8011AD2E 0007 8011AD2F 0007 8011AD30 0007 8011AD31 0007 8011AD32 0007 8011AD3F 0009 8011AD40 0009 8011AD41 0009 8011AD42 0009 8011AD43 0009 8011AD49 0009 8011AD4C 0009 8011AD47 0009 cn Have\Ocarina 8011ACFB ???? 0007:"Fairy Ocarina",0008:"Ocarina Of Time" cn Have\Boomerang 8011AD00 000E cn Have\Lens of Truth 8011AD01 000F cn Have\Megaton Hammer 8011AD03 0011 cn Have\Deku Stick 8011ACF4 0000 cn Have\Deku Nut 8011ACF5 0001 cn Have\Bombs 8011ACF6 0002 cn Have\Fairy Bow 8011ACF7 0003 cn Have\Fairy Slingshot 8011ACFA 0006 cn Have\Bombchu 8011ACFC 0009 cn Have\Arrows\Fire Arrow 8011ACF8 0004 cn Have\Arrows\Ice Arrow 8011ACFE 000C cn Have\Arrows\Light Arrow 8011AD04 0012 cn Have\Hookshot 8011ACFD ???? 000A:"Hookshot",000B:"Longshot" cn Have\Magic Beans 8011AD02 0010 cn Have\Magic\Fairie's Wind 8011ACFF 000D cn Have\Magic\Nayru's Love 8011AD05 0013 cn Have\Magic\Din's Fire 8011ACF9 0005 cn Bottles\Bottle 1 Modifier 8011AD06 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 2 Modifier 8011AD07 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 3 Modifier 8011AD08 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 4 Modifier 8011AD09 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Trading\Adult Link Item 8011AD0A ???? 002D:"Pocket Egg",002E:"Pocket Cucco",002F:"Cojiro",0030:"Odd Mushroom",0031:"Odd Potion",0032:"Poacher's Saw",0033:"Goron's Sword (Broken)",0034:"Prescription",0035:"Eyeball Frog",0036:"Eye Drops",0037:"Claim Check" cn Trading\Young Link Item 8011AD0B ???? 0021:"Weird Egg",0022:"Chicken",0023:"Zelda's Letter",0024:"Keaton Mask",0025:"Skull Mask",0026:"Spooky Mask",0027:"Bunny Hood",0028:"Goron Mask",0029:"Zora Mask",002A:"Gerudo Mask",002B:"Mask of Truth",002C:"SOLD OUT" cn Turn Giant's Knife Into Biggoron's Sword 8011ACBE 0001 cn Have Quiver (Holds 30) 8011AD21 0001 cn Equipment Modifier 1 cd This modifies the equipment you are carrying. 8011AD22 ???? 0002:"Silver Scale",0004:"Golden Scale",0006:"Giant's Knife (Broken)",0035:"Black Gauntlets",0040:"Bullet Bag (Holds 30)",0080:"Bullet Bag (Holds 40)",00C0:"Bullet Bag (Holds 50)" cn Equipment Modifier 2 cd This modifies the equipment you are carrying. 8011AD23 ???? 0008:"Bomb Bag (Holds 20)",0010:"Bomb Bag (Holds 30)",0018:"Bomb Bag (Holds 40)",0020:"Goron's Bracelet",0028:"Silver Gauntlets",0030:"Golden Gauntlets" cn Press L To Levitate cd Press L To Levitate & Let go to land D01C8D75 0020 811DB350 40CB cn Press L For infinite Hover Boots cd Press L For Infinite Hover Boots & Let go to land,This Only works when you have the Boots on D01C8D75 0020 811DBB72 000D cn Instant Step Hoover Boots cd Take off from Anywhere & to go higher just press L Once, this will lift you higher while walking.to come back Down Keep R pressed.Once you have enabled the code press Start & then start again. D01C8D75 0020 811DB350 40CB D01C8D75 0000 811DBB72 000D 8011ACF0 ???? 0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Beta\Play Beta Quest Worlds cd Put on the code on load up,After the Nintendo logo you will be in Hyrule Field,There are no icons, energy bar etc. on the screen.When you press a C-Buttton you can use an object.Here the objects for the C-Buttons:C-left: arrows, C-down: bombs, C-right: Ocarina of Time. There is also no Navi and start menu.When you go to some places the game will freeze or you can't move. D01C8D75 0000 8011C093 ???? 0000:"World 01",0001:"World 02",0002:"World 03",0003:"World 04",0004:"World 05",0007:"World 06",0008:"World 07",0016:"World 08" cn Warp Song Location\Minuet of Forest & Serenade of Water cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011C015 ???? 0000:"Sacred Forest Meadow",0004:"Lake Hylia",0015:"Inside Jabu Jabu's Belly",0018:"Dodongo's Cavern",0068:"Inside The Deku Tree" cn Warp Song Location\Prelude of Light & Nocturne of Shadow cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011C015 ???? 0003:"Kakariko Windmill",0007:"Bombchu Bowling Alley",000F:"Zelda & Impa Flee",0014:"Kakariko Village",0017:"Ganon",001D:"Top of Ganon's Tower",0028:"Bombchu Shop",002C:"Bazaar",0030:"Happy Mask Shop",0034:"Ganon's Tower",0038:"Ganon's Castle",004C:"Inside Spirit Door",006C:"Burning Castle",0050:"House of Skulltula",0064:"Death Mountain Trail",0068:"Graveyard",0070:"Thieves' Hideout",0074:"Royal Family's Tomb",0078:"Great Fairy Fountain 1",0084:"Forest Temple",0088:"Great Fairy Fountain 2",0099:"Grotto 01",009D:"Grotto 02",00A4:"Grotto 04",00A8:"Grotto 05",00B3:"Grotto 06",00B0:"Grotto 07",00B4:"Grotto 08",00B8:"Grotto 09",00C3:"Grotto 10",00C0:"Grotto 11",00C4:"Grotto 12",00FC:"Grotto 13",00D3:"Bottom of the Well",00D0:"Lon Lon Ranch Shed",00D3:"Lon Lon Ranch Outside Shed",00D8:"Ice Cavern",00E3:"Outside Cow Pen",00E0:"Lost Woods Bridge",00E4:"Lon Lon Ranch Chicken Room",00E8:"In Front of Deku Tree",00EB:"Spirit Temple Boss",00F1:"Castle Courtyard",00F4:"Temple of Time",00F8:"Gerudo Fortress Jail" cn Warp Song Location\Bolero of Fire cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011C015 ???? 0003:"Castle Courtyard",000B:"Dodongo's Cavern Boss",0010:"Inside The Deku Tree Boss",0014:"Shadow Temple Boss",0017:"Water Temple Boss",001C:"Ganon's Castle Tower",001F:"Ganon First Battle",0028:"Ganon's Castle Room Before Ganon",002B:"Inside Ganon's Castle Room With Pillar",002F:"Lon Lon Ranch",0033:"Mido's House",0037:"Saria's House",004B:"Bearded Man's House",0040:"Top of Ganon's Castle",0047:"Outside Saria's House",004F:"Dampe's Race",0057:"Kokiri Forest",005B:"Top of Death Mountain",005F:"Fishing Pond",0068:"Inside Ganon's Castle",007F:"Hyrule Castle Gate",00BA:"Top of Ganon's Tower",00C2:"Great Fairy Fountain",00D6:"Lost Woods Goron Entrance",00DA:"Lost Woods River Entrance",00DE:"Lost Woods Bridge Field Entrance",00E3:"Goron City Lost Woods Entrance",00F6:"Death Mountain Crater",00FD:"Ganon's Castle" cn Warp Song Location\Requiem of Spirit cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 8011C015 ???? 0005:"Lake Hylia,08 Zora's Domain",0018:"Gerudo Valley",001E:"Lost Woods",0028:"Gerudo Fortress",0030:"Haunted Wasteland",0034:"Ganon's Castle Inside Burning Castle",0038:"Hyrule Castle",003A:"Ganon's Castle",003D:"Death Mountain Trail",004D:"Goron City",0065:"Fire Temple",0069:"Forest Temple",006E:"Shooting Gallery",0079:"Ganon's Castle Inside Burning Castle",007E:"Kakariko Village Entrance",007B:"Zora's River Entrance",0085:"Kokiri Forest Entrance",008A:"Lake Hyrule Entrance",008E:"Gerudo Valley Entrance",0092:"Death Mountain Trail Entrance",0095:"Graveyard Entrance",009E:"Zora's Domain Entrance",00A2:"Zora's Fountain Entrance",00BA:"Goron City Entrance",00BE:"Death Mountain Trail",00C1:"Goron City",00C5:"Lakeside Laboratory",00C9:"Top of Ganon's Castle",00CD:"Hyrule Market (Child Link's)",00CF:"Hyrule Market (Adult Link's)",00F1:"Desert Colossus",00FA:"Lon Lon Ranch Entrance",00FD:"Hyrule Field" cn Max\Double Defense Power cd This gives you White Border Hearts 8011AD4F 0014 cn Nayru's Love is Always cd For this to work On Or off, you have to walk through a Doorway to activate the Change. 8111C048 ???? 0000:"OFF",FFFF:"ON" cn Infinite\Timers\All Other Timers cd This cheat works on all Race Timers not the final Boss and Under Water with iron Boots etc. 8011C211 0032 cn Epona\Max Carrots\Lon Lon Raunch cd This is For Practicing,Racing.Warning take this off before jumping the exit fence after winning Epona 801F3D38 0005 801F3EF8 0005 cn Infinite\Timers\Escape From Gannons Tower cd This cheat works only on The Final Boss. 8011C215 00B4 cn Beta\Specific things lean cd This code will cause all items on a specific plane to lean. This is helpful for areas in which the plane causes the crash (Ex. Weird Zora's Fountain Beta Quest World 01) 80025CC4 0001 cn Beta\Appear in Strange Places (Hold R) cd If you go to an area where Link is immobile or invisible, using the "appear in strange places" code will almost always fix it, but you'll start somewhere outside of the Arena and in air. I recommend using the infinite step Hover boots code already supplied with PJ64 so you can float back into the arena in the event that this happens. D01C8B65 0010 8111BFE6 0001 cn Beta\Interface always off/on cd If you go to an area where the interface is accessible, this signigfies that you're not in 'beta' mode anymore. Using the "interface always off/on" code, you can stay in 'beta' mode regardless of what happens. This may cause more crashes in SOME areas, but it's rare and is not too severe. If you need to explore a beta area with the interface, "use the interface always on" portion of the code. Don't use the codes as you start the game. If you need the interface on/off at a specific time, start the game, go to the area, activate the code, keep it on until next reset, 8011BB69 00FF 8011BFDF ???? 0000:"Off",0001:"On" cn Always Have Wallet Size 8011AD22 ???? 0047:"Kid Wallet (Holds 99)",0057:"Adult Wallet (Holds 200)",0067:"Giant Wallet (Holds 500)" cn Press L+R For FMV Select cd Hold down `L+R' after the Nintendo logo is spinning to see your favourite FMV D01C8D75 0030 8011AC83 00A0 D01C8D75 0030 8011AC8B ???? F000:"riforce FMV",F10F:"ire FMV",F200:"riforce FMV",F300:"anondorf FMV",F400:"lanet Making FMV",F50F:"ire FMV",F600:"anondorf FMV",F700:"ore Triforce FMV",F80E:"nding" cn Dark Link\Make Dark Link Apear In TOT 8023EFBF 0020 8023EFC5 0033 crc 096A40EA-8ABE0A10-C:45 gn LEGO Racers (U) cn Have All Tracks and Building Pieces 812576D4 FFFF 812576D6 FFFF crc 255018DF-57D6AE3A-C:45 gn Lode Runner 3D (U) cn Infinite Lives 8015299F 0063 cn High Gold 80152AFF 0032 8015293B 0032 cn All Navigation Pieces 8015298B 0005 crc 6B700750-29D621FE-C:45 gn Mace - The Dark Ages (U) cn Infinite Time To Choose Character D01340F6 0001 811340F6 0260 cn P2/CPU Never Wins 80138B43 0000 cn Sudden Death Mode\Player 1 D1138B2A 0120 8008B1E7 0001 cn Sudden Death Mode\Player 2 D1138B2A 0120 8008AE5F 0001 cn Infinite Health\Player 1 8008B1E7 0064 cn Infinite Health\Player 2 8008AE5F 0064 cn No Health\Player 1 8008B1E7 0000 cn No Health\Player 2 8008AE5F 0000 cn Extra Characters 8007F9F8 0001 cn R Button Health Restore\Player 1 D007CD2B 0010 8008B1E7 0064 cn Z Trigger Deathblow\Player 1 D007CD2A 0020 8008AE5F 0000 cn 1 Win to Win\Player 1 D0138B47 0000 80138B47 0001 cn 1 Win to Win\Player 2 D0138B43 0000 80138B43 0001 cn Infinite Time 81138B2A 0708 crc 0CB81686-5FD85A81-C:45 gn Madden 2000 (U) cn Enable\Stadium\Dodge City 80059198 00FF cn Enable\Stadium\Xmas Rush 80059199 00FF cn Enable\Stadium\Tib Bros 8005919A 00FF cn Enable\Stadium\Tiberium 8005919B 00FF cn Enable\Stadium\Salvage Field 8005919C 00FF cn Enable\Stadium\Gridiron 8005919D 00FF cn Enable\Stadium\Alpha Blitz 8005919E 00FF cn Enable\Stadium\Nile High 8005919F 00FF cn Enable\Stadium\4th And Incas 800591A0 00FF cn Enable\Stadium\Maddenstein 800591A1 00FF cn Enable\Stadium\Cosmodome 800591A2 00FF cn Enable\Stadium\EA Sports 800591A3 00FF cn Enable\Stadium\Tiburon 800591A4 00FF cn Enable\Stadium\Tampa Bay 800591A5 00FF cn Enable\Stadium\New Orleans 800591A6 00FF cn Enable\Stadium\San Diego 800591A7 00FF cn Enable\Team\All 60's 800598CC 00FF cn Enable\Team\All 70's 800598CD 00FF cn Enable\Team\All 80's 800598CE 00FF cn Enable\Team\All 90's 800598CF 00FF cn Enable\Team\Madden 1999 800598D0 00FF cn Enable\Team\Madden Millenium 800598D1 00FF cn Enable\Team\NFL Millenium 800598D2 00FF cn Enable\Team\EA Sports 800598D3 00FF cn Enable\Team\Tiburon 800598D4 00FF cn Enable\Team\Marshalls 800598D5 00FF cn Enable\Team\Toymakers 800598D6 00FF cn Enable\Team\Clows 800598D7 00FF cn Enable\Team\Praetorians 800598D8 00FF cn Enable\Team\Junkyard Dogs 800598D9 00FF cn Enable\Team\Industrials 800598DA 00FF cn Enable\Team\Sugarbuzz 800598DB 00FF cn Enable\Team\Mummies 800598DC 00FF cn Enable\Team\Vipers 800598DD 00FF cn Enable\Team\Monsters 800598DE 00FF cn Enable\Team\Comets 800598DF 00FF cn Level 1\Recover At Least One Fumble 800707C0 0040 cn Level 1\200 Yards Of Total Offense Or More 800707C1 0040 cn Level 1\Play And Win One Game of The Tournment 800707C2 0040 cn Level 1\Have A Minimium Of Three Players ON Team Catch One Pass 800707C3 0040 cn Level 1\Intercept At Least One Pass 800707BF 0040 cn Level 1\Play a Exhibition Game In A Stadium Other Than The Default One 800707BE 0040 cn Level 1\Sack The Opposing QB 800707BD 0040 cn Level 1\QB Passes For Two TDS Or More 800707BC 0040 cn Level 1\Play A Exhibition Game In A QTR Length Other Than 5 Minutes 800707BB 0040 cn Level 1\Create A Player And use Him In A Game 800707BA 0040 cn Level 1\Defeat San Francisco In Rain At 3COM Park 800707B9 0040 cn Level 1\Defeat Green Bay In Snow At Lambeau Field 800707B8 0040 cn Level 1\3 Tackles Or More By One Player 800707B7 0040 cn Level 1\Kick A 40 Yard Punt Or Longer 800707B6 0040 cn Level 1\Kick A 40 Yard Field Goal Or Longer 800707B5 0040 cn Level 1\Throw 0 Interceptions In A Game 800707B4 0040 cn Level 1\Hold Your Oppnent to 7 Points Or Less In a Game 800707B3 0040 cn Level 1\Score 21 Points Or More With A QTR Length Of 6 Minutes Or Less 800707B2 0040 cn Level 1\Complete A 20 Yard Run Or Longer 800707B1 0040 cn Level 1\Complete A 30 Yard Pass Or Longer 800707B0 0040 cn Level 2\Score 40 Points Or More Within A Quarter Length Of 6 Minutes Or Less 800707C4 0040 cn Level 2\100 Yards Of Rushing Or Greater By One Player 800707C5 0040 cn Level 2\100 Recption Yards Or Greater By One Player 800707C6 0040 cn Level 2\QB Passes 300 Yards Or More 800707C7 0040 cn Level 2\3 Field Goals Or More By One Player 800707C8 0040 cn Level 2\QB Passes For 4 TDS Or More 800707C9 0040 cn Level 2\Play And Win One Franchise Mode Game 800707CA 0040 cn Level 2\Play And Win One Season Mode Game Without Modified Divisions 800707CB 0040 cn Level 2\Play And Win One Season Mode Game With Modified Divisions 800707CC 0040 cn Level 2\Play And Win Two Games In A Tournment With The Same Team 800707CD 0040 cn Level 2\6 Receptions Or Greater By One Player 800707CE 0040 cn Level 2\Have A RB Who Rushes For 3 TDS Or More 800707CF 0040 cn Level 2\Hold Opposing Team To 150 Yards Total Offense Or Less 800707D0 0040 cn Level 2\QB Rushes For One Rushing TD Or More 800707D1 0040 cn Level 2\Commit No Fumbles In A Game 800707D2 0040 cn Level 2\Do Not Allow Your QB To Be Sacked In A Game 800707D3 0040 cn Level 2\Complete a 60 Yard Pass Or Longer 800707D4 0040 cn Level 2\Play And Win A Pro Bowl Game As The NFC Team 800707D5 0040 cn Level 2\Play And Win A Pro Bowl Game As The AFC Team 800707D6 0040 cn Level 2\2 TDS Or More By One Receiver 800707D7 0040 cn Level 3\150 Yards Rushing Or Greater By One Player 800707D8 0040 cn Level 3\150 Reception Yards Or Greater By One Player 800707D9 0040 cn Level 3\QB Who Passes For 400 Yards Or More 800707DA 0040 cn Level 3\3 Sacks Or More By One Player 800707DB 0040 cn Level 3\2 Interceptions Or More By One Player 800707DC 0040 cn Level 3\Recover 2 Fumbles Or More 800707DD 0040 cn Level 3\5 Successful Field Goals Or More By One Player 800707DE 0040 cn Level 3\3 Knockdowns Or More By One PLayer 800707DF 0040 cn Level 3\3 Tips Or More By One Player 800707E0 0040 cn Level 3\Play And Win A Superbowl In Franchise Mode 800707E1 0040 cn Level 3\Play And Win A Superbowl In Season Mode 800707E2 0040 cn Level 3\Successfully Kick 8 Extra Points Or More 800707E3 0040 cn Level 3\Play And Win An 8 Team Tournament 800707E4 0040 cn Level 3\Complete A 50 Yard Run Or Longer 800707E5 0040 cn Level 3\Commit No Penalties In A Game 800707E6 0040 cn Level 3\Break 2 Different All-Time Records Or More In A Game 800707E7 0040 cn Level 3\Score 55 Points Or Greater 800707E8 0040 cn Level 3\8 Tackles Or More By One Player 800707E9 0040 cn Level 3\400 Yards Of Total Defense Or More 800707EA 0040 cn Level 3\Have A RB Rush For Over 100 Yards And 50 Yards Receiving 800707EB 0040 cn Level 4\200 Yards Rushing Or Greater By One Player 800707EC 0040 cn Level 4\200 Receptions Yards Or Greater By One Player 800707ED 0040 cn Level 4\QB Who Passes For 500 Yards Or More 800707EE 0040 cn Level 4\Return A Punt For A Touchdown 800707EF 0040 cn Level 4\Return An Interception For A Touchdown 800707F0 0040 cn Level 4\6 Successful Two Point Conversions Or More 800707F1 0040 cn Level 4\25 Completions Or More By One QB 800707F2 0040 cn Level 4\Go Undefeated And Win A Superbowl In One Franchise Mode Season By Playing Every Game 800707F3 0040 cn Level 4\Go Undefeated And Win A Superbowl In One Season Mode Season By Playing Every Game 800707F4 0040 cn Level 4\QB Who Rushes For 75 Yards Or More 800707F5 0040 cn Level 4\Have A Minimum Of 7 Members Of Your Team Catch At Least 1 Pass 800707F6 0040 cn Level 4\Win A 16 Team Tournament 800707F7 0040 cn Level 4\7 Sacks Or More By One Player 800707F8 0040 cn Level 4\650 Yards Of Total Offense Or More By One Team 800707F9 0040 cn Level 4\Have One Reciever With 150 RAC Yards Or Greater 800707FA 0040 cn Level 4\Rush The Ball 40 Time Or More With A QTR Length Of 6 Minutes Or Less 800707FB 0040 cn Level 4\Rush For 100 Yards Or More With 2 Different Running Backs 800707FC 0040 cn Level 4\Win By A Margin Of 50 Points Or More 800707FD 0040 cn Level 4\40 First Downs Or More 800707FE 0040 cn Level 4\Kick A Punt Of 55 Yards Or More 800707FF 0040 cn Level 5\Return A Kickoff For A Touchdown 80070800 0040 cn Level 5\Have A QB With A Pass AVG Of 30 Yards Or Greater While Throwing At Least 5 Passes 80070801 0040 cn Level 5\Shut Out Opposing Team With A QTR Length Of 5 Minutes 80070802 0040 cn Level 5\Pass For 200 Yards Or More With 2 QBS 80070803 0040 cn Level 5\Have A RB With A Rushing AVG Of 20 Yards Or Greater While Rushing At least 3 Times 80070804 0040 cn Level 5\3 Receivers With 100 Yards Or More Recieving 80070805 0040 cn Level 5\200 Punt Return Yards Or Greater By One Player 80070806 0040 cn Level 5\QB Rushes For 3 Touchdowns Or More 80070807 0040 cn Level 5\Score 80 Points Or Greater 80070808 0040 cn Level 5\200 Kick Return Yards Or Greater By One Player 80070809 0040 cn Level 5\Complete A Run Play Of 80 Yards Or More 8007080A 0040 cn Level 5\Convert 10 4th Down Conversions Or More 8007080B 0040 cn Level 5\QB With A Minimum Of 150 Yards Passing And 100 Yards Rushing 8007080C 0040 cn Level 5\Break 4 Different All-Time Records Or More In A Game 8007080D 0040 cn Level 5\Successfully Kick A FG Of 55 Yards Or More 8007080E 0040 cn Level 5\Have A QB With A 100 Passing PCT While Throwing A Minimum Of 5 Passes 8007080F 0040 cn Level 5\Play And Win A Minimum Of Four Superbowls With The Same Team In Franchise Mode 80070810 0040 cn Level 5\RB With A Minimum Of 100 Yards Receiving And 100 Yards Rushing 80070811 0040 cn Level 5\Convert To 3RD Down Conversions Or More 80070812 0040 cn Level 5\250 Yards Rushing Or Greater By One Player 80070813 0040 cn Infinite\Time-Outs Home Team 8006CE7F 0003 cn No Time-Outs\Home Team 8006EC7F 0000 cn Infinite\Time-Outs Away Team 8006FE6F 0003 cn No Time-Outs\Away Team 8006EF6F 0000 cn Press L For First Down\Player 1 D00753DD 0020 81071B18 0001 cn Press L For First Down\Player 2 D00753E5 0020 81071B18 0001 cn Press L For First Down\Player 3 D00753ED 0020 81071B18 0001 cn Press L For First Down\Player 4 D00753F5 0020 81071B18 0001 cn Press R For Fourth Down\Player 1 D00753DD 0010 81071B18 0004 cn Press R For Fourth Down\Player 2 D00753E5 0010 81071B18 0004 cn Press R For Fourth Down\Player 3 D00753ED 0010 81071B18 0004 cn Press R For Fourth Down\Player 4 D00753F5 0010 81071B18 0004 cn Home Team\Always Has The Ball 810590A8 0000 810590AA 0001 cn Away Team\Always Has The Ball 810590A8 0001 810590AA 0000 cn Have All Secret Codes In Menu 81070788 FFFF 8107078A FFFF 8107078C FFFF 8107078E FFFF cn Press GS For More Time To Choose Play 890723E6 0024 cn Players\Jagged 8005F180 0080 cn Players\Polygon 8005F183 0001 cn Players\Evil Crystal 8005F183 000F cn Uniforms\Ghetto 8005F188 001F cn Uniforms\Bare 8005F188 008F cn Players\Pixel 8005F18D 0001 cn Particle Illusions\A 8005F19B 00FE cn Particle Illusions\B 8005F199 0002 cn Uniforms\Future 8005F207 0033 cn Players\Hallow 8005F233 0047 cn Players\Generic Black & White 8005F233 0058 cn Players\Super Red 8005F43E 0002 crc 13836389-265B3C76-C:45 gn Madden Football 64 (U) cn Infinite\Time Outs Home Team 80082D97 0003 cn Infinite\Time Outs Away Team 80084EE3 0003 cn No Time-Outs\Home Team 80082D97 0000 cn No Time-Outs\Away Team 80084EE3 0000 cn Enable\All Stadiums 50000901 0000 80073510 00FF cn Enable\All Teams 50000901 0000 80073CF8 00FF cn Invisible Players 800545A0 0000 800545A0 0001 800545A0 0002 800545A0 0003 cn Background\Gray Madden 810596E0 0000 cn Background\Pink Madden 810596E0 0001 cn Background\Green & Black Madden 810596E0 0002 cn Background\Coloured Madden 810596E0 0003 cn Background\Pink & Purple Madden 810596E0 0004 cn Background\Pinker Madden 810596E0 0006 crc DEB78BBA-52F6BD9D-C:45 gn Madden NFL 99 (U) cn Infinite\Time Outs Home Team 8005CF89 0003 cn Infinite\Time Outs Away Team 8005FA49 0003 cn No Time-Outs\Home Team 8005CF89 0000 cn No Time-Outs\Away Team 8005FA49 0000 cn Home Team\Scores 50 8005CF87 0032 cn Home Team\Scores 0 8005CF87 0000 cn Away Team\Scores 50 8005FA47 0032 cn Away Team\Scores 0 8005FA47 0000 cn Enable\All Stadiums 50000801 0000 8004A7F0 00FF cn Enable\All Teams 50000E01 0000 8004ADD0 00FF cn Press L For First Down\Player 1 D0066F2D 0020 810612E0 0001 cn Press L For First Down\Player 2 D0066F35 0020 810612E0 0001 cn Press L For First Down\Player 3 D0066F3D 0020 810612E0 0001 cn Press L For First Down\Player 4 D0066F45 0020 810612E0 0001 cn Press R For Fourth Down\Player 1 D0066F2D 0010 810612E0 0004 cn Press R For Fourth Down\Player 2 D0066F35 0010 810612E0 0004 cn Press R For Fourth Down\Player 3 D0066F3D 0010 810612E0 0004 cn Press R For Fourth Down\Player 4 D0066F45 0010 810612E0 0004 cn Press L For More Time To Choose Play\Player 1 D0066F2D 0020 80061245 0028 cn Press L For More Time To Choose Play\Player 2 D0066F35 0020 80061245 0028 cn Press L For More Time To Choose Play\Player 3 D0066F3D 0020 80061245 0028 cn Press L For More Time To Choose Play\Player 4 D0066F45 0020 80061245 0028 crc EB38F792-190EA246-C:45 gn Madden NFL 2001 (U) cn Home Team\Infinite Time-Outs 80071617 0003 cn Home Team\No Time-Outs 80071617 0000 cn Away Team\Infinite Time-Outs 800738E7 0003 cn Away Team\No Time-Outs 800738E7 0000 cn Have All\Cheats 50000402 0000 81070788 FFFF cn Have 99 Tokens 8115F9F0 0063 cn Have All\Stadiums 50000802 0000 81061850 FFFF cn Have All\Teams 50001102 0000 810C1628 FFFF cn Have All\Levels Completed 50001902 0000 8115FB2C FFFF cn Have All\Cards 50007802 0000 8115F9F2 FFFF crc 75B61647-7ADABF78-C:45 gn Magical Tetris Challenge (U) cn Always Get\Magical Tetris Pieces 811D267E DB20 cn Always Get\Straight Pieces 801D25F4 0000 cn Quick Score Gain 811D26A6 FFFF crc 664BA3D4-678A80B7-C:45 gn Mario Golf (U) cn Enable All Courses 81130CEE FFFF cn No Wind 810BA9F1 0000 800BA9F3 0000 cn Unlimited\Power Hits\Player 1 801B71F8 0004 cn Unlimited\Power Hits\Player 2 801B72B0 0004 cn Unlimited\Power Hits\Player 3 801B7368 0004 cn Unlimited\Power Hits\Player 4 801B7420 0004 cn Have All Characters 50000E02 0001 810C28E4 0000 cn Max Gold Mario Badges Player 1 800C545B 0063 cn Zero Strokes Taken 801B71F3 0000 crc 3E5055B6-2E92DA52-C:45 gn Mario Kart 64 (U) cn Infinite Items\2 player Mode\Player 1 80165F5D ???? 80165F8A ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Infinite Items\2 player Mode\Player 2 8016603D ???? 8016606A ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Infinite Items\3-4 player Mode\Player 1 8016611D ???? 8016614A ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Infinite Items\3-4 player Mode\Player 2 801661FD ???? 8016622A ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Infinite Items\3-4 player Mode\Player 3 801662DD ???? 8016630A ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Infinite Items\3-4 player Mode\Player 4 801663BD ???? 801663EA ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn No Laps to Race 81164390 0000 81164392 0002 cn Always Have\46 Pts\Bowser 8018D9CF 002D cn Always Have\46 Pts\D.K. 8018D9CC 002D cn Always Have\46 Pts\Luigi 8018D9C9 002D cn Always Have\46 Pts\Mario 8018D9C8 002D cn Always Have\46 Pts\Peach 8018D9CE 002D cn Always Have\46 Pts\Toad 8018D9CB 002D cn Always Have\46 Pts\Wario 8018D9CD 002D cn Always Have\46 Pts\Yoshi 8018D9CA 002D cn Press GS\To Play 2 Players In 1 Player Game 8918EDE4 0003 8918EDE4 0007 8918EDE4 0005 8918EDE4 0001 cn All Players Can Choose The Same Character 810B3924 2400 810B3936 7FFF 810B39A4 2400 810B39B6 7FFF 810B3A38 2400 810B3A4E 7FFF cn Press GS\For Full Debug Menu cd Press GS at the Press Start Menu to access the Debug Menu 8818EDEF 0002 cn Have Bonus Mode and All Gold Cups 50000401 0000 8018ED10 ???? 0000:"Off",00FF:"On" cn Press L To Levitate\Player 1 D00F6915 0020 810F69C8 4000 cn Press L To Levitate\Player 2 D00F6925 0020 810F77A0 4000 cn Press L To Levitate\Player 3 D00F6935 0020 810F8578 4000 cn Press L To Levitate\Player 4 D00F6945 0020 810F9350 4000 crc 2829657E-A0621877-C:45 gn Mario Party (U) cn Top Left Character\Coin Options cd If you want to have full 255 Coins,1st use the 100 Option then put on 255. this will stop the numbers from changing & spoiling the result. 800F32B8 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Top Left Character\Star Options 800F32BC ???? 0000:"0 Stars",0064:"99 Stars" cn Top Right Character\Coin Options 800F32E8 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Top Right Character\Star Options 800F32EC ???? 0000:"0 Stars",0064:"99 Stars" cn Lower Left Character\Coin Options 800F3318 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Lower Left Character\Star Options 800F331C ???? 0000:"0 Stars",0064:"99 Stars" cn Lower Right Character\Coin Options 800F3348 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Lower Right Character\Star Options 800F334C ???? 0000:"0 Stars",0064:"99 Stars" cn Top Left Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800D62D3 ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Top Right Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800D6317 ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Lower Left Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800D635B ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Lower Right Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800D639F ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Mini Game\Unlimited 99 lives 800F3767 0063 cn Mini Game\Max 99 Coins 800F3770 0063 cn Board Select 800ED5C3 ???? 0000:"DK's Jungle Adventure",0001:"Peach's Birthday Cake",0002:"Yoshi's Tropical Island",0003:"Wario's Battle Canyon",0004:"Luigi's Engine Room",0005:"Mario's Rainbow Castle",0006:"Bowser's Magma Mountain",0007:"Eternal Star",0008:"Explaination Map",0009:"Mini Game Stadium" cn Mini Game Island\Press GS For 99 Lives 880F37BB 0063 cn Mini Game Island\99 Coins 800F37C4 0063 cn Mini Game Island\Always Clear Level 800F32BB 0063 cn Mini Game Island\World Level Select cd Select where you want to go then Enable the cheat. as soon as you enter turn the cheat back off so you can move on to the next level and not the same place. 810F32C4 ???? 0000:"Start Save and Return Space",0001:"1-1 Coin Block Blitz",0002:"1-2 Coin Block Bash",0003:"1-3 Coin Shower Flower",0004:"1-4 Paddle Battle",0005:"Save and Return Space 1",0006:"2-1 Memory Match",0007:"2-2 Ground Pound",0008:"2-3 Limbo Dance",0009:"2-4 Magical Mushroom",000A:"2-5 Piranha's Pursuit",0018:"3-1 Crazy Cutter",0019:"3-2 Buried Treasure",001A:"3-3 Desrt Dash",001B:"3-4 Tug O' War",001C:"3-5 Teetering Towers",001D:"Save and Return Space 2",001E:"World 4-1 to 4-3 - Entrance",0028:"World 4-4 Entrance",0029:"Save and Return Space 3",002A:"World 6-1 to 6-6 Castle Entrance",0048:"World 8-6 to 8-1 Castle Entrance 2",0049:"Save and Return Space 4",004A:"9-1 Hammer Drop",004B:"9-2 Slot Car Derby",004C:"9-3 Shell Game",004D:"9-4 Knock Block Tower",004E:"9-5 Platform Peril",004F:"Goal Space - Final Goal" crc 9EA95858-AF72B618-C:45 gn Mario Party 2 (U) cn Infinite Coins Main Menu 810F8CD2 FFFF cn Lower Right Char\Rolls 10 800DF5A9 000A cn Lower Right Char\Item On Pick-Up 800FD375 ???? 0000:"Mushroom",0001:"Skeleton Key",0002:"Plunder Chest",0003:"Bowser Bomb",0004:"Dueling Glove",0005:"Warp Block",0006:"Golden Mushroom",0007:"Boo Bell",0008:"Bowser Suit",0009:"Magic Lamp" cn Upper Left Char\Rolls 10 800DF4C5 000A cn Upper Left Char\Item On Pick-Up 800FD2D9 ???? 0000:"Mushroom",0001:"Skeleton Key",0002:"Plunder Chest",0003:"Bowser Bomb",0004:"Dueling Glove",0005:"Warp Block",0006:"Golden Mushroom",0007:"Boo Bell",0008:"Bowser Suit",0009:"Magic Lamp" cn Upper Right Char\Rolls 10 800DF511 000A cn Upper Right Char\Item On Pick-Up 800DF30D ???? 0000:"Mushroom",0001:"Skeleton Key",0002:"Plunder Chest",0003:"Bowser Bomb",0004:"Dueling Glove",0005:"Warp Block",0006:"Golden Mushroom",0007:"Boo Bell",0008:"Bowser Suit",0009:"Magic Lamp" cn Lower Left Char\Rolls 10 800DF55D 000A cn Lower Left Char\Item On Pick-Up 800FD341 ???? 0000:"Mushroom",0001:"Skeleton Key",0002:"Plunder Chest",0003:"Bowser Bomb",0004:"Dueling Glove",0005:"Warp Block",0006:"Golden Mushroom",0007:"Boo Bell",0008:"Bowser Suit",0009:"Magic Lamp" crc 7C3829D9-6E8247CE-C:45 gn Mario Party 3 (U) cn Top Left Character\Coin Options cd If you want to have full 255 Coins,1st use the 100 Option then put on 255. this will stop the numbers from changing & spoiling the result. 810D1112 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Top Left Character\Star Options 800D1116 ???? 0000:"0 Stars",0064:"99 Stars" cn Top Right Character\Coin Options 810D114A ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Top Right Character\Star Options 800D114E ???? 0000:"0 Stars",0064:"99 Stars" cn Lower Left Character\Coin Options 810D1182 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Lower Left Character\Star Options 800D1186 ???? 0000:"0 Stars",0064:"99 Stars" cn Lower Right Character\Coin Options 810D11BA ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Lower Right Character\Star Options 800D11BE ???? 0000:"0 Stars",0064:"99 Stars" cn Top Left Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800CDBD5 ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Top Right Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800CDC21 ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Lower Left Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800CDC6D ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Lower Right Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800CDCB9 ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" crc 5001CF4F-F30CB3BD-C:45 gn Mario Tennis (U) cn Have All\Characters Available 810653C8 FFFF cn Have All\Courts Available 810653CC FFFF cn Score\Player 1 8015344A ???? 0000:"0",0001:"15",0002:"30",0003:"40" cn Score\Player 2 8015344B ???? 0000:"0",0001:"15",0002:"30",0003:"40" cn Press C-Down For Easy Win Ring Shot - Game cd Do Not use with Time,Balls,Points Option D0066985 0004 8015350B 0082 cn Press C-Down Easy Win Ring Shot - Time,Balls,Points cd Do Not use with Game Option D0066985 0004 80153527 0082 D0066985 0004 80153523 0082 crc 0EC158F5-FB3E6896-C:45 gn Mega Man 64 (U) cn Rapid Fire 80204EB3 0002 cn Infinite\Health 81204A1E 0050 cn Infinite\Zenny 811BC404 E0FF 811BC406 05F5 cn Have\Normal Items 81205650 FFFF 81205652 FFFF 81205654 FFFF 81205656 FFFF cn Have\Special Items 8120564C FFFF 8120564E FFFF cn Infinite\Ammo 81204EBA 0080 81204EC2 0010 81204ECA 0708 81204ED2 0018 81204EDA 0010 81204EE2 0708 81204EEA 0020 81204EF2 0020 81204EFA 0020 81204F02 0018 81204F0A 012C 81204F12 0258 cn Have\All Special Weapons cd With this code, Roll is the one that has to equip the weapons before you can use them. 81205640 FFFF crc FA8C4571-BBE7F9C0-C:45 gn Mickey's Speedway USA (U) cn Play As 800D3081 ???? 0000:"Mickey Mouse",0001:"Daisy Duck",0002:"Goofy",0003:"Pete",0004:"Minnie Mouse",0005:"Donald Duck",0006:"Huey",0007:"Dewey",0008:"Louie",0009:"Lugwig Von Drake" cn Traffic Troubles\Indianapolis\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018E782 0063 cn Traffic Troubles\San Fransisco\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80191A52 0063 cn Traffic Troubles\New Mexico\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018FD52 0063 cn Traffic Troubles\Grand Canyon\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80193142 0063 cn Motor Way Mania\Los Angeles\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018DBE2 0063 cn Motor Way Mania\Alaska\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018E372 0063 cn Motor Way Mania\Las Vegas\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80192A02 0063 cn Motor Way Mania\Philadelphia\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80193882 0063 cn Freewayphobia\Dakota\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018D102 0063 cn Freewayphobia\Seattle\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018FCE2 0063 cn Freewayphobia\New York\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018F402 0063 cn Freewayphobia\Chicago\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80191F32 0063 cn Victory Vehicles\Yellowstone\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018D3B2 0063 cn Victory Vehicles\Washington DC\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80197552 0063 cn Victory Vehicles\Everglades\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018FB12 0063 cn Victory Vehicles\Malibu\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801915A2 0063 cn Frantic Finale\Hawaii\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80191F62 0063 cn Frantic Finale\Oregon\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018E932 0063 cn Frantic Finale\Texas\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 8018F0D2 0063 cn Frantic Finale\Colorado\Max Tokens cd Only use one Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 80191882 0063 cn Level Select 801875A9 ???? 0000:"Traffic Troubles",0001:"Motor Way Mania",0002:"Freewayphobia",0003:"Vitory Vehicles",0004:"Frantic Finale",0005:"Time Trial",0006:"Practice",0007:"Contest",0008:"Options" cn Difficulty Select 8007BF00 ???? 0000:"Amateur",0001:"Intermediate",0002:"Professional",0003:"Mirror Mode" cn Unlock Everything cd This will unlock all characters, tracks, mirror mode, all in-game cheats, postcards, pluto's collar and give you all Trophies for every track and difficulties. To have this cheat save to mempak, enable it and then go into the Options Menu and disable the cheat. Go to the Wide-Screen Settings and Change it to Wide-Screen [16.9] and then the B button to get back to Wide-Screen Settings, now go back into Wide-Screen [16.9] and change it back to Normal [4.3].and press the B button until you come back to the main Options Menu.Close the game and load it again to see everything saved to the Mempak and unlocked. 800D3128 008F 800D3129 0094 800D312A 0003 800D312C 0001 800D312F 0080 50000502 0000 800D3130 0009 50000502 0000 800D3131 0024 800D313A 0015 800D313B 007F 800D313C 0001 800D313D 00FF 800D313E 0004 800D313F 0022 cn Always 1st & final time 00:00.00 cd All Levels 50000301 0000 801CE609 0000 cn Re-name Characters\Mickey\Letter 1 801BE591 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Mickey\Letter 2 801BE592 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Mickey\Letter 3 801BE593 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Mickey\Letter 4 801BE594 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Mickey\Letter 5 801BE595 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Mickey\Letter 6 801BE596 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Minnie\Letter 1 801BE598 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Minnie\Letter 2 801BE599 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Minnie\Letter 3 801BE59A ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Minnie\Letter 4 801BE59B ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Minnie\Letter 5 801BE59C ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Minnie\Letter 6 801BE59D ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Donald\Letter 1 801BE59F ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Donald\Letter 2 801BE5A0 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Donald\Letter 3 801BE5A1 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Donald\Letter 4 801BE5A2 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Donald\Letter 5 801BE5A3 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Donald\Letter 6 801BE5A4 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Daisy\Letter 1 801BE5A6 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Daisy\Letter 2 801BE5A7 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Daisy\Letter 3 801BE5A8 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Daisy\Letter 4 801BE5A9 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Daisy\Letter 5 801BE5AA ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Goofy\Letter 1 801BE5AC ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Goofy\Letter 2 801BE5AD ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Goofy\Letter 3 801BE5AE ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Goofy\Letter 4 801BE5AF ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Goofy\Letter 5 801BE5B0 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Pete\Letter 1 801BE5B2 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Pete\Letter 2 801BE5B3 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Pete\Letter 3 801BE5B4 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Pete\Letter 4 801BE5B5 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Huey\Letter 1 801BE5B7 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Huey\Letter 2 801BE5B8 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Huey\Letter 3 801BE5B9 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Huey\Letter 4 801BE5BA ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Dewey\Letter 1 801BE5BC ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Dewey\Letter 2 801BE5BD ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Dewey\Letter 3 801BE5BE ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Dewey\Letter 4 801BE5BF ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Dewey\Letter 5 801BE5C0 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Louie\Letter 1 801BE5C2 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Louie\Letter 2 801BE5C3 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Louie\Letter 3 801BE5C4 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Louie\Letter 4 801BE5C5 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Louie\Letter 5 801BE5C6 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Ludwig\Letter 1 801BE5C8 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Ludwig\Letter 2 801BE5C9 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Ludwig\Letter 3 801BE5CA ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Ludwig\Letter 4 801BE5CB ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Ludwig\Letter 5 801BE5CC ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Ludwig\Letter 6 801BE5CD ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Traffic Troubles\Indianapolis\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8018E75B 0063 cn Traffic Troubles\San Fransisco\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 80191A2B 0063 cn Traffic Troubles\New Mexico\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8018FD2B 0063 cn Traffic Troubles\Grand Canyon\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8019311B 0063 cn Motor Way Mania\Los Angeles\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8018DBBB 0063 cn Motor Way Mania\Alaska\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8018E34B 0063 cn Motor Way Mania\Las Vegas\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801929DB 0063 cn Motor Way Mania\Philadelphia\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8019385B 0063 cn Freewayphobia\Dakota\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8018D0DB 0063 cn Freewayphobia\Seattle\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8018FCBB 0063 cn Freewayphobia\New York\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8018F3DB 0063 cn Freewayphobia\Chicago\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 80191F0B 0063 cn Victory Vehicles\Yellowstone\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8018D38B 0063 cn Victory Vehicles\Washington DC\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8019752B 0063 cn Victory Vehicles\Everglades\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8018FAEB 0063 cn Victory Vehicles\Malibu\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8019157B 0063 cn Frantic Finale\Hawaii\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 80191F3B 0063 cn Frantic Finale\Oregon\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8018E90B 0063 cn Frantic Finale\Texas\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8018F0AB 0063 cn Frantic Finale\Colorado\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 8019185B 0063 crc F1850C35-ACE07912-C:45 gn Micro Machines 64 Turbo (U) cn Always Place 1st 802083F1 0001 cn Infinite\Lives 800BAFD2 0009 cn Infinite\Specials On Pickup 80208401 0005 crc 09D53E16-3AB268B9-C:45 gn Mike Piazza's Strike Zone (U) cn Infinite\Balls 801606D0 0000 cn Almost Always Hit A Home Run 80195714 0001 cn Fast Game 80195729 0001 cn Increased Gravity 80195727 0001 cn Low Gravity 80195726 0001 cn Slow Game 8019572A 0001 cn Home Team\Score 0 cd Do not use with Home Team Scors 30 801606B7 0000 cn Home Team\Score 30 cd Do not use with Home Team Scors 0 801606B7 001E cn Away Team\Score 0 cd Do not use with Away Team Scors 30 801606B5 0000 cn Away Team\Score 30 cd Do not use with Away Team Scors 30 801606B5 001E cn Infinite\Strikes 801606D1 0000 cn Stadium Modifier 800DE7E5 ???? 0000:"Edison Into Field",0001:"The Ball Park At Arlington",0002:"The Astrodome",0003:"Bank One Ballpark",0004:"Milwaukee County Stadium",0005:"Baltimore",0006:"3com Park at Candle Stick Park",0007:"Comiskey Park",0008:"Coors Field",0009:"Olympics Stadium",000A:"Fenway Park",000B:"Jacobs Field",000C:"Proplayer Stadium",000D:"Kauffman Stadium",000E:"The Kingdom",000F:"Dodger Stadium",0010:"Oakland Alameda Country Stadium",0011:"Qualcomm Stadium at Jack Murphy Field",0012:"Cinergy Field",0013:"Shea Stadium",0014:"Skydome",0015:"Bush Stadium",0016:"3 Rivers Stadium",0017:"Tiger Stadium",0018:"Tropicane Field",0019:"Turner Field",001A:"Hubert Humphrey Metrodome",001B:"Veterans Stadium",001C:"Wrigley Field",001D:"Yankee Stadium",001E:"Devil's Thumb Stadium" crc 2E955ECD-F3000884-C:45 gn Milo's Astro Lanes (U) cn Bowl A Perfect Game 5000090C 0000 800AC9F0 000A 800ACA5E 000A crc 0B93051B-603D81F9-C:45 gn Mischief Makers (U) cn Infinite\Red Gems 81175B66 270F cn Infinite\Health 810ED0E0 03E8 crc 26035CF8-802B9135-C:45 gn Mission Impossible (U) cn Invincibility 810862B4 0101 cn Infinite\Ammo All Guns 50000610 0000 800A8EA7 00FF cn Infinite\Health 810862B2 FFFF cn Access All Levels 8008A5C6 0001 8008A5DA 0001 8008A602 0001 8008A652 0001 8008A666 0001 8008A67A 0001 8008A68E 0001 8008A6A2 0001 8008A6B6 0011 8008A6CA 0021 8008A6DE 0001 8008A706 0011 8008A71A 0041 8008A72E 0021 8008A742 0081 8008A756 0001 8008A76A 0081 8008A77E 0001 8008A7A6 0001 8008A7CE 0001 8008A7E2 0011 8008A7F6 0021 8008A846 0001 8008AB2A 0001 8008AB3E 0001 8008AB52 0001 8008AB66 0001 cn Freeze All Timers 81093D40 0063 81093D42 0063 81093D44 0063 cn Weapon Select 800A8EA5 ???? 800A8EB5 ???? 800A8EC5 ???? 0000:"9MM Hi Power",0001:"Silenced Pistol",0002:"Uzi",0003:"Fists",0032:"Gas Spray",0036:"Blow Torch",001F:"Fire Extinguisher",0024:"Spray Paint",0027:"Electrostunner",000B:"Blow Dart Gun",000C:"Dart Hand Gun",002D:"Mini Rocket Launcher" cn Walk Through Walls & Objects cd This will allow you to pass through anything & even walk on water.if you amerge somewhere in the ground just press the A button. 80093EF5 ???? 0080:"On",0000:"Off" crc 5AC383E1-D712E387-C:45 gn Monopoly (U) cn Infinite\Money\Player 1 81324B46 270F cn Infinite\Money\Player 2 81324B5A 270F cn Infinite\Money\Player 3 81324B6E 270F cn Infinite\Money\Player 4 81324B82 270F cn [Language Select] cd To use this load the game then enable this cheat and Reset (F1) you will now be on your chosen Language and Relative Local Language Board and Money. D009675F 0001 80096758 ???? 0000:"American",0001:"British",0002:"France",0003:"German" crc B19AD999-7E585118-C:45 gn Monster Truck Madness 64 (U) cn Have\Aztec Valley Track 801256BF 0001 cn Have\Alpine Challenge Track 801256DF 0001 cn Have\Death Trap Track 801256FF 0001 cn Infinite Missiles (Upon Pickup) D0164BBF 0001 801A6054 0009 crc 417DD4F4-1B482FE2-C:45 gn Mortal Kombat 4 (U) cn Big Head Mode 80048CB5 0001 cn Infinite\Health Player 1 810FE0D8 0001 810FE0DA 0000 cn Infinite\Health Player 2 81126F54 0001 81126F56 0000 cn 1 Round To Win Player 1 D01050F3 0000 801050F3 0001 cn 99 Wins Player 1 800FE27F 0063 cn Infinite\Credits 800493BF 00FF cn Infinite\Time 8010511B 0063 cn Play\As Goro Player 1 800FE293 000F cn Play\As Noob Saibot Player 1 800FE293 0011 crc C34304AC-2D79C021-C:45 gn Mortal Kombat Mythologies - Sub-Zero (U) cn Infinite Lives 8010BCFF 0009 cn Invincible 8009F742 0001 cn Level Select D009A913 0000 8009A913 ???? 0000:"Level 1 - Shaolin Temple - China",0001:"Level 2 - Wind Realm",0002:"Level 3 - Earth Realm",0003:"Level 4 - Water Realm",0004:"Level 5 - Fire Ream",0005:"Level 6 - Prison",0006:"Level 7 - Bridge",0007:"Level 8 - Fortress" cn Max Experience 8111200E FC9A crc D9F75C12-A8859B59-C:45 gn Mortal Kombat Trilogy (U) (v1.0) cn Player 1\No Energy 8016984D 0000 cn Player 2\No Energy 80169B21 0000 cn Player 2\Unlimited Energy 80169B21 00A6 cn Player 1\Unlimited Energy 8016984D 00A6 crc 2AF9B65C-85E2A2D7-C:45 gn MRC - Multi Racing Championship (U) cn Infinite Time 80094E97 0064 cn Low Course Time 8009483B 0000 cn Always Place 1st 800A960F 0000 crc 1938525C-586E9656-C:45 gn Ms. Pac-Man Maze Madness (U) cn Infinite\Health 8111D55C 003C cn Infinite\Lives 8010A3D7 0009 cn Have All Dots 8111D55E 03E7 cn Max Score 8111EF14 E0FF 8111EF16 05F5 crc FCBCCB21-72903C6B-C:45 gn Mystical Ninja - Starring Goemon (U) cn Infinite\Health 8015C5E7 0028 cn Infinite\Lives 8015C5EF 0009 cn Infinite\Money 8115C5EA 270F cn Press\L To Levitate D00C7D3B 0020 8116A044 4000 cn Press\R To Use Chargeable Weapon D00C7D3B 0010 8120C896 005D cn Max Heart Containers 8015C5E3 0027 cn Play As 8015C5DF ???? 0000:"Goemon,01 Ebisumaru,02 Sasuke,03 Yae" cn Goemon\Have\Chain Pipe 8015C6BF 0002 cn Goemon\Have\Medal of Flames 8015C6DF 0001 cn Goemon\Have\Magic Sudden Impact 8015C6EF 0001 cn Goemon\Pipe Modifier 8015C6AF ???? 0000:"Normal Pipe,01 Silver Pipe,02 Gold Pipe" cn Yae\Have\Bazooka 8015C6DB 0001 cn Yae\Have\Flute 8015C6CB 0001 cn Yae\Have\Magic Mermaid 8015C6FB 0001 cn Yae\Katana Modifier 8015C6BB ???? 0000:"Normal Katana,01 Silver Katana,02 Gold Katana" cn Ebisumaru\Automatically Complete Ebisumaru's Training 803B52F4 0008 cn Ebisumaru\Have\Windup Camera 8015C6D3 0001 cn Ebisumaru\Have\Meat Saw Hammer 8015C6C3 0001 cn Ebisumaru\Have\Magic Mini Ebisu 8015C6F3 0001 cn Ebisumaru\Saw Hammer Modifier 8015C6B3 ???? 0000:"Normal Saw Hammer",0001:"Silver Saw Hammer",0002:"Gold Saw Hammer" cn Sasuke\Have\Fire Cracker Bomb 8015C6C7 0001 cn Sasuke\Have\Kunai of Severe Cold 8015C6D7 0001 cn Sasuke\Have\Magic Flying 8015C6F7 0001 cn Sasuke\Kunai Modifier 8015C6B7 ???? 0000:"Normal Kunai,01 2 Kunai's,02 Gold Kunai" cn Have\Triton Shell 8015C6FF 0001 cn Have\Brown Item 8015C703 0001 cn Have\Silver Fortune Doll 8015C707 0001 cn Have\Brown Round Item 8015C70F 0001 cn Have\Gold Key 8015C713 0001 cn Have\Blue Sausage 8015C717 0001 cn Have\Pink Fish 8015C71B 0001 cn Have\Gold Fish 8015C71F 0001 cn Have\Blue Fish 8015C723 0001 cn Goemon\D-Pad Up To Refill Oil D0067D3A 0008 812F706A 03E7 cn Goemon\Maximum Money 812F70EA 03E7 cn Goemon\Robot Boss' Has No Health 812F7062 0000 cn Goemon\D-Pad Left To Charge Laser D00C7D3A 0002 802F706F 0064 crc 8D2BAE98-D73725BF-C:45 gn Nagano Winter Olympics '98 (U) cn Press [START] To Reset Timer 81137886 0000 cn Infinite Stamina 81138400 447A 81138404 447A crc 5129B6DA-9DEF3C8C-C:45 gn Namco Museum 64 (U) cn Dig-Dug\Infinite\Credits 800FE67E 0063 cn Dig-Dug\Infinite\Lives\Player 1 800FE709 0002 cn Dig-Dug\Score\Player 1 810FE704 9999 cn Dig-Dug\Infinite\Lives\Player 2 800FE76B 0004 cn Dig-Dug\Score\Player 2 810FE768 9999 cn Galaga\Infinite\Credits 800D76A4 0063 cn Galaga\Infinite\Lives\Both Players 800D7510 0002 cn Galaxian\Infinite\Credits 800CD3D0 0063 cn Galaxian\Infinite\Lives 800CD3AD 0003 cn Galaxian\Score\Player 1 810BCE7C 9999 cn Galaxian\Score\Player 2 810BC780 9999 cn Ms Pac-Man\Infinite\Credits 800BBE4B 0063 cn Ms Pac-Man\Infinite\Lives\Player P1 800BBE23 0004 cn Ms Pac-Man\Score Modifier\Player 1 810BC7E8 9999 cn Ms Pac-Man\Infinite\Lives\Player 2 800BBE27 0004 cn Ms Pac-Man\Score\Player 2 810BC7EC 9999 cn Ms Pac-Man\High Score Modifier 810BC1F8 9999 cn Ms Pac-Man\Eat All Ghosts All The Time 810BC100 0000 810BC102 0000 810BC12C 0000 810BC12E 0000 810BC158 0000 810BC15A 0000 810BC184 0000 810BC186 0000 cn Pac-Man\Infinite\Credits 800A8817 0063 cn Pac-Man\Infinite\Lives\Player 1 800BBE23 0004 cn Pac-Man\Score\Player 1 810A86F0 9999 cn Pac-Man\Infinite\Lives\Player 2 800BBE27 0004 cn Pac-Man\Score\Player 2 810A86F4 9999 cn Pac-Man\High Score 810A86F8 9999 cn Pac-Man\Eat All Ghosts All The Time 810A8760 0000 810A8762 0000 810A878C 0000 810A878E 0000 810A87B8 0000 810A87BA 0000 810A87E4 0000 810A87E6 0000 cn Pole Position\Infinite Time 8010A243 0063 cn Pole Position\Score 81107BF8 9999 crc 23749578-80DC58FD-C:45 gn NASCAR 99 (U) cn 1 Lap to Race 800438B3 0009 D021FBAB 0000 8021FBAB 0008 D022359B 0000 8022359B 0008 cn Total Laps to Race Modifier 800438B3 ???? 0001:"1 lap",0002:"2 lap",0003:"3 lap",0004:"4 lap",0005:"5 lap",0006:"6 lap",0007:"7 lap",0008:"8 lap",0009:"9 lap" cn Max Gear Ratios 810C9E90 7F1E 810C9E82 707F crc DF331A18-5FD4E044-C:45 gn NASCAR 2000 (U) cn Total Number Of Laps 80046553 ???? 0001:"1 lap",0002:"2 lap",0003:"3 lap",0004:"4 lap",0005:"5 lap",0006:"6 lap",0007:"7 lap",0008:"8 lap",0009:"9 lap" cn 1 Lap Race cd Do not put this on with Total Number of Laps Code 810495AE 0001 cn Infinite Fuel\Player 1 81220502 3E80 cn Infinite Fuel\Player 2 81230472 3E80 cn Maximum\Pit Distance 800C7110 0000 cn Maximum\Top Speed 800C7111 0000 cn Maximum\Acceleration 800C7113 0000 cn Beat Championship Mode Easily 80223E3B 0255 cn Race Forever 810465AE FDE8 cn Both Players Can Be Dale E 80046538 0003 cn Have CPU Control Car Player 1 D0092985 0020 8015CC5C 0001 D0092985 0010 8015CC5C 0000 crc 4E69B487-FE18E290-C:45 gn NBA Hangtime (U) cn Team 1 Scores 150 pts 800A6689 0096 cn Team 2 Scores 150 pts 800A668B 0096 crc EBEEA8DB-F2ECB23C-C:45 gn NBA JAM 2000 cn Infinite Shot Clock 801378DF 0016 cn Infinite Violation Clock 8013783B 005D cn Infinite Turbo\Team 1\Player 1 8115B512 FF00 cn Infinite Turbo\Team 1\Player 2 8115B516 FF00 cn Team 1 Score Select 80137117 ???? 0000:"00",0096:"150" cn Infinite Turbo\Team 2\Player 1 8115B50A FF00 cn Infinite Turbo\Team 2\Player 2 8115B50E FF00 cn Team 2 Score Select 80137113 ???? 0000:"00",0096:"150" crc 810729F6-E03FCFC1-C:45 gn NBA Jam 99 (U) cn Home Team\Scores 150 81160FFA 0096 cn Home Team\Scores 0 81160FFA 0000 cn Away Team\Scores 150 81160FFE 0096 cn Home Team\Scores 0 81160FFE 0000 cn Infinite\Time Outs\Home 800D5C75 0007 cn No Time Outs\Home 800D5C7F 0000 cn Infinite\Time Outs\Away 800D5C9B 0007 cn No Time Outs\Away 800D5C9B 0000 cn Away Team\Full Court Dunks 81182E4E 0004 8118305A 0004 81183266 0004 81183472 0004 8118367E 0004 cn Away Team\Giant Players 81182DF6 0032 81182DFE 003C 81183002 0032 8118300A 003C 8118320E 0032 81183216 003C 8118341A 0032 81183422 003C 81183626 0032 8118362E 003C cn Away Team\Tiny Players 81182DF6 0011 81182DFE 0014 81183002 0011 8118300A 0014 8118320E 0011 81183216 0014 8118341A 0011 81183422 0014 81183626 0011 8118362E 0014 cn Creation Points (L / R) D0061269 0020 8117E008 0200 D0061269 0010 8117E008 0000 cn Home Team\Full Court Dunks 81182412 0004 8118261E 0004 8118282A 0004 81182A36 0004 81182C42 0004 cn Home Team\Giant Players 811823BA 0032 811823C2 003C 811825C6 0032 811825CE 003C 811827D2 0032 811827DA 003C 811829DE 0032 811829E6 003C 81182BEA 0032 81182BF2 003C cn Home Team\Tiny Players 811823BA 0011 811823C2 0014 811825C6 0011 811825CE 0014 811827D2 0011 811827DA 0014 811829DE 0011 811829E6 0014 81182BEA 0011 81182BF2 0014 crc 6A121930-665CC274-C:45 gn NBA In The Zone '98 (U) cn Options\FT. Penalty Situations 80144999 ???? 0000:"2",0001:"4",0002:"6",0003:"No" cn Home Team\Scores 8013C2B1 ???? 0000:"No Points",000A:"10 Points",0014:"20 Points",0028:"40 Points",003C:"60 Points",0050:"80 Points",0064:"100 Points",00C8:"200 Points",00FA:"250 Points" cn Away Team\Scores 8013C2B3 ???? 0000:"No Points",000A:"10 Points",0014:"20 Points",0028:"40 Points",003C:"60 Points",0050:"80 Points",0064:"100 Points",00C8:"200 Points",00FA:"250 Points" cn Home Team\Infinite Time-Outs cd Do not use this with the No Time Out's Cheat 8013C2D6 0009 80140862 0009 cn Away Team\Infinite Time-Outs cd Do not use this with the No Time Out's Cheat 8013C2D7 0009 80140863 0009 cn Home Team\No Time-Outs cd Do not use this with the Infinite Time Out's Cheat 8013C2D6 0000 80140862 0000 cn Away Team\No Time-Outs cd Do not use this with the Infinite Time Out's Cheat 8013C2D7 0000 80140863 0000 cn No Shot Clock 81140E1E FFFF cn Create A Player\Max Field Goal 8013FF98 0063 cn Create A Player\Max 3 Point 8013FF99 0063 cn Create A Player\Max Free Throw 8013FF9A 0063 cn Create A Player\Max Rebound 8013FF9C 0063 cn Create A Player\Max Block 8013FF9D 0063 cn Create A Player\Max Steal 8013FF9E 0063 cn Create A Player\Max Speed 8013FF9F 0063 cn Create A Player\Max Ball Control 8013FFA1 0063 cn Create A Player\Max Power 8013FFA2 0063 cn Options\Quarter Length 8013D865 ???? 0000:"3:00",0001:"5:00",0002:"8:00",0003:"12:00" cn Options\Level 8013D864 ???? 0000:"Enjoy",0001:"Exciting",0002:"Super Challenge" cn Options\Stamina 8013D866 ???? 0000:"On",0001:"Off" cn Options\27 Time Out Limit 8013D867 ???? 0000:"Yes",0001:"No" cn Options\Replay 8013D868 ???? 0000:"Yes",0001:"No" cn Options\Player Display 8013D869 ???? 0000:"Name",0001:"Number",0002:"None" cn Options\Camera View 8013D86A ???? 0000:"1",0001:"2",0002:"3",0003:"4",0004:"5",0005:"6",0006:"7",0007:"8",0008:"9",0009:"10" cn Options\Out Of Bounds 80144990 ???? 0000:"1",0001:"2",0002:"3",0003:"4",0004:"5",0005:"6",0006:"7",0007:"8",0008:"9",0009:"10" cn Options\Shot Clock Violation 80144991 ???? 0000:"1",0001:"2",0002:"3",0003:"4",0004:"5",0005:"6",0006:"7",0007:"8",0008:"9",0009:"10" cn Options\Second Violation 80144992 ???? 0000:"1",0001:"2",0002:"3",0003:"4",0004:"5",0005:"6",0006:"7",0007:"8",0008:"9",0009:"10" cn Options\5 Second Violation 80144993 ???? 0000:"1",0001:"2",0002:"3",0003:"4",0004:"5",0005:"6",0006:"7",0007:"8",0008:"9",0009:"10" cn Options\3 Second Violation 80144994 ???? 0000:"1",0001:"2",0002:"3",0003:"4",0004:"5",0005:"6",0006:"7",0007:"8",0008:"9",0009:"10" cn Options\Foul Out 80144995 ???? 0000:"2",0001:"4",0002:"6",0003:"No" cn Options\Back Court 80144996 ???? 0000:"2",0001:"4",0002:"6",0003:"No" cn Options\Traveling 80144997 ???? 0000:"2",0001:"4",0002:"6",0003:"No" cn Options\Goal Tending 80144998 ???? 0000:"2",0001:"4",0002:"6",0003:"No" crc A292524F-3D6C2A49-C:45 gn NBA In The Zone '99 (U) cn No Shot Clock 812010C4 43FF cn Home Team\Score 81290378 ???? 0000:"o Points",0A01:"0 Points",1402:"0 Points",2804:"0 Points",3C06:"0 Points",5008:"0 Points",6401:"00 Points",C802:"00 Points",FA02:"50 Points" cn Away Team\Score 8129195C ???? 0000:"o Points",0A01:"0 Points",1402:"0 Points",2804:"0 Points",3C06:"0 Points",5008:"0 Points",6401:"00 Points",C802:"00 Points",FA02:"50 Points" cn Home Team\Time Outs Home 80290374 ???? 0000:"None",0007:"Infinite" cn Away Team\Time Outs 80291958 ???? 0000:"None",0007:"Infinite" cn Create A Player Codes\Max Shooting 802C5EFB 0063 cn Create A Player Codes\Max 3 Point 802C5EFC 0063 cn Create A Player Codes\Max Free Throw 802C5EFD 0063 cn Create A Player Codes\Max Offensive 802C5EFE 0063 cn Create A Player Codes\Max Defensive 802C5EFF 0063 cn Create A Player Codes\Max Rebound 802C5F00 0063 cn Create A Player Codes\Max Techinque 802C5F01 0063 cn Create A Player Codes\Max Capaility 802C5F02 0063 crc 5F25B0EE-6227C1DB-C:45 gn NBA Live 2000 (U) cn Home Team\Infinite Time Outs 811344D0 0700 cn Home Team\No Time Outs 811344D0 0000 cn Away Team\Infinite Time Outs 81135098 0700 cn Away Team\No Time Outs 81135098 0000 cn Infinite Shot Clock 811318F2 05A0 cn Max Inside Scoring 8017B7AC 0064 cn Jump Shooting 8017B7AD 0064 cn Max\3 Pointers 8017B7AE 0064 cn Max\Free Throws 8017B7AF 0064 cn Max\Dunking 8017B7B0 0064 cn Max\Stealing 8017B7B1 0064 cn Max\Blocking 8017B7B2 0064 cn Max\Off. Awareness 8017B7BA 0064 cn Max\Def. Awareness 8017B7B3 0064 cn Max\Quickness 8017B7B4 0064 cn Max\Off. Rebounds 8017B7B5 0064 cn Max\Def. Rebounds 8017B7B6 0064 cn Max\Jumping 8017B7B7 0064 cn Max\Strength 8017B7B8 0064 cn Max\Passing 8017B7B9 0064 cn Max\Speed 8017B7BB 0064 cn Max\Dribbling 8017B7BC 0064 cn Max\Endurance 8017B7BD 0064 cn Max\Shooting Range 8017B7BE 0064 crc 6DFDCDC3-4DE701C8-C:45 gn =NHL Breakaway 98 (U) cn Activate Cheat Menu 80053F38 0001 cn Home Team Goals 8012BBBC ???? 0000:"No Score",00FF:"Max Score" cn Away Team Goals 8012BBBD ???? 0000:"No Score",00FF:"Max Score" crc 82EFDC30-806A2461-C:45 gn NHL Blades Of Steel '99 (U) cn Away Team Scores 50 801F6407 0032 802004C0 0032 cn Home Team Scores 50 801F6406 0032 802004BF 0032 crc 36FA35EB-E85E2E36-C:45 gn NFL Blitz 2001 (U) cn Fire Team 1\Player 1 800EC0CB ???? 0001:"Always On",0000:"Never On" cn Always On Fire Team 2\Player 2 800EC0CF ???? 0001:"Always On",0000:"Never On" cn Infinite Turbo\Player 1 810EC12C 42C8 810EC12E 0000 cn Infinite Turbo\Player 2 81DEC164 42C8 81DEC166 0000 crc 28784622-FFB22985-C:45 gn NFL Quarterback Club 2001 (U) cn Infinite Player Creation Pts 8107A0F2 00C8 cn Always 1st Down 800785D2 0001 cn 1 Down Per Possession 800785D2 0004 crc BE76EDFF-20452D09-C:45 gn NFL Quarterback Club 99 (U) cn Home Team\Infinite Time Outs 8004C0B6 0003 cn Home Team\No Time Outs 8004C0B6 0000 cn Away Team\Infinite Time Outs 8004C62E 0003 cn Away Team\No Time Outs 8004C62E 0000 cn Infinite\Time to Choose Play 81080152 0028 cn Infinite\Character Creation Points 81072F30 015E cn Max\Accuracy 8106FDB8 0064 cn Max\Range 8106FDBA 0064 cn Max\Scramble 8106FDBC 0064 cn Max\Hands 8106FDBE 0064 cn Max\Speed 8106FDC0 0064 cn Max\Catch 8106FDC2 0064 cn Max\Endurance 8106FDC4 0064 crc E3AB4ED0-83040DD2-C:45 gn NFL Quarterback Club 2000 (U) cn Home Team\Infinite Time Outs 80054956 0003 cn Home Team\No Time Outs 80054956 0000 cn Away Team\Infinite Time Outs 80054ED6 0003 cn Away Team\No Time Outs 80054ED6 0000 cn Infinite\Time To Choose Play 81081448 2800 cn Max\Acc 8007526D 0064 cn Max\Cat 8007527B 0063 cn Max\Clu 80075275 0063 cn Max\End 8007527D 0063 cn Max\Hnd 80075279 0063 cn Max\Rcg 80075273 0063 cn Max\Rng 8007526F 0063 cn Max\Scr 80075271 0063 cn Max\Spd 80075277 0063 cn Infinite\Creation Points 8107B36E 03E7 crc 2153143F-992D6351-C:45 gn New Tetris, The (U) cn Press L + C-Down For Cheat Screen D01101B3 0024 8103BFE0 0000 D01101B3 0024 8103BFE2 0000 crc 2857674D-CC4337DA-C:45 gn Nightmare Creatures (U) cn Infinite\Ammo 50000D02 0000 800A4BAF 0009 cn Infinite\Spider Cards 810A4BAE 0009 cn Infinite\Proximity Mines 810A4BB0 0009 cn Infinite\Repulsive Smoke 810A4BB2 0009 cn Infinite\Freeze Spell 810A4BB4 0009 cn Infinite\Dynamite 810A4BB6 0009 cn Infinite\Flash 810A4BB8 0009 cn Infinite\Fire Bombs 810A4BBA 0009 cn Infinite\Multi-Gun 810A4BBC 0009 cn Infinite\Berzerkers 810A4BBE 0009 cn Infinite\Super Healing 810A4BC0 0009 cn Infinite\Healing 810A4BC2 0009 cn Infinite\Chaos 810A4BC4 0009 cn Infinite\Gun 810A4BC6 0009 cn Infinite\Lives 800A4B53 0009 cn Level Select D00978B1 0000 810978B0 ???? 0000:"Chelsea",0001:"Spitafields",0002:"Thames Tunnel",0003:"Sewer Snake",0004:"India Docks",0005:"Highgate Cemetery",0006:"Hampstead Heath",0007:"Queenhite Docks",0008:"City",0009:"Smithfield",000A:"Snowman",000B:"Regent's",000C:"London Zoo",000D:"St. Marilebone",000E:"Bloomsbury",000F:"Pimlico",0010:"Jose Manuel",0011:"Westminister",0012:"Westminister II",0013:"The Roofs",0014:"Map" cn Brightness Modifier 810B96EC ???? 7FFF:"Very Well Lit Up",8000:"Very Dark" cn Ignatius\Infinite Health\Chelsea Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 802EC6E6 0010 cn Ignatius\Infinite Health\Spitafields Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 803215FE 0010 cn Ignatius\Infinite Health\Thames Tunnel Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8031AB6E 0010 cn Ignatius\Infinite Health\Sewer Snake Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80255E46 0010 cn Ignatius\Infinite Health\India Docks Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80321546 0010 cn Ignatius\Infinite Health\Highgate Cemetery Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8031B2E6 0010 cn Ignatius\Infinite Health\Hampstead Heath Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 803218B6 0010 cn Ignatius\Infinite Health\Queenhite Docks Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80320C1E 0010 cn Ignatius\Infinite Health\City Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80328256 0010 cn Ignatius\Infinite Health\Smithfield Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8030B05E 0010 cn Ignatius\Infinite Health\Snowman Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80251496 0010 cn Ignatius\Infinite Health\Regent's Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80315326 0010 cn Ignatius\Infinite Health\London Zoo Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8031E00E 0010 cn Ignatius\Infinite Health\St. Marilebone Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8031CD4E 0010 cn Ignatius\Infinite Health\Bloomsbury Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8032C4F6 0010 cn Ignatius\Infinite Health\Pimlico Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8031F9CE 0010 cn Ignatius\Infinite Health\Jose Manuel Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8025F196 0010 cn Ignatius\Infinite Health\Westminister Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 802F4ECE 0010 cn Ignatius\Infinite Health\Westminister II Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 802F5DE6 0010 cn Ignatius\Infinite Health\The Roofs Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 802848FE 0010 cn Nadia\Infinite Health\Chelsea Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 802EB6D6 000C cn Nadia\Infinite Health\Spitafield Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80320116 000C cn Nadia\Infinite Health\Thames Tunnel Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80319AC6 000C cn Nadia\Infinite Health\Sewer Snake Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80254926 000C cn Nadia\Infinite Health\India Docks Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 803202CE 000C cn Nadia\Infinite Health\Highgate Cemetary Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8031A58E 000C cn Nadia\Infinite Health\Hampstead Heath Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 803203D6 000C cn Nadia\Infinite Health\Queenhite Dock's Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8031FB7E 000C cn Nadia\Infinite Health\City Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80326A36 000C cn Nadia\Infinite Health\Smithfield Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8030A0CE 000C cn Nadia\Infinite Health\Snowman Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80250036 000C cn Nadia\Infinite Health\Regent's Canal Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80313E36 000C cn Nadia\Infinite Health\London Zoo Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8031CB66 000C cn Nadia\Infinite Health\St. Marilebone Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8031B686 000C cn Nadia\Infinite Health\Bloomsbury Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8032B256 000C cn Nadia\Infinite Health\Pimlico Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8031E4B6 000C cn Nadia\Infinite Health\Jose Manuel Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 8025DA0E 000C cn Nadia\Infinite Health\Westminister Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 802F360E 000C cn Nadia\Infinite Health\Westminister II Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 802F4C76 000C cn Nadia\Infinite Health\The Roofs Level cd Only use one Infinite Health cheat at a time or the game will freeze or suffer from sever GFX Errors. 80282DB6 000C crc 4998DDBB-F7B7AEBC-C:45 gn Nuclear Strike 64 (U) cn Infinite\Lives 800A5DF0 0009 cn Play Mission\1 800A5DF1 0000 cn Play Mission\2 800A5DF1 0001 cn Play Mission\3 800A5DF1 0002 cn Play Mission\4 800A5DF1 0003 cn Play Mission\5 800A5DF1 0004 cn Play Mission\6 800A5DF1 0005 cn Invulnerability 800A9730 0001 cn Infinite\Lives 800A5DF0 0009 cn Infinite\Ammo 800A9731 0001 cn Infinite\Attempts 800A9732 0001 cn Infinite\Fuel 800A9733 0001 cn Infinite\Chaingun 800A9737 0001 cn Infinite\Rockets 800A9738 0001 cn Infinite\Missiles 800A9739 0001 cn Infinite\Wingtips 800A973A 0001 cn Wingtips Do Double Damage 800A973B 0001 cn Stealth Mode 800A9734 0001 cn Double MPG 800A9735 0001 cn Quad Damage 800A9736 0001 cn Max Armor Increased 50% 800A973C 0001 cn Agility 800A973D 0001 cn Overhead View 800A973E 0001 cn Level Skip 800A973F 0001 cn Debug Menu 800A9740 0001 cn Auto Win Scenario 800A9741 0001 crc 2655BB70-667D9925-C:45 gn O.D.T (Or Die Trying) (U) (M3) (Unreleased Final) cn Play As Select 800FCD45 ???? 0000:"Ike Hawkings (Corporal)",0001:"Sophia Hawkings (Stowaway)",0002:"Julia Chase (Cartographer)",0003:"Karma (The Ex-Deviant)",0004:"Max Havok (Chief Enginer)",0005:"Solaar (Archbishop)",0006:"Mr Bodybolt (7th Passenger)" cn Infinite Max\999 Lives 810C8B78 03E8 cn Infinite Max\Health 800C8959 0066 cn Infinite Max\Light Ammo 800C8B2B 0066 cn Infinite Max\Fire Ammo 800C8B33 0066 cn Infinite Max\Ionic Ammo 800C8B3B 0066 cn Infinite Max\Fusion Ammo 800C8B43 0066 cn Infinite Max\Mana 800C8B7F 0066 cn Have\All Magic 800CE9C8 0010 800CE9CD 0000 800CE9D7 0001 800CE9E1 0002 800CE9EB 0003 800CE9F5 0005 800CE9FF 0006 800CEA09 0008 800CEA13 0009 800CEA1D 000B 800CEA27 000E 800CEA31 000F 800CEA3B 0010 800CEA45 0011 800CEA4F 000A 800CEA59 000C 800CEA63 000D cn Have\Magic On Level 4 810C8B5D FFFF 810C8B5E FFFF 810C8B5F FFFF 810C8B60 FFFF 810C8B61 FFFF 810C8B62 FFFF cn Have\Weapons On Max Upgrade 50000408 0000 800C8B2C 0009 cn Have\Max Armour Level 800C8B80 0064 cn Have\Max Spirit Level 800C8B84 0064 cn Have\Max Weapon Level 800C8B82 0064 cn Have\Max Experience Level 800C8B7C 00FF cn Infinite Air Under Water 800C8A64 0069 cn Press A For Bionic Jump cd This will make you jump to a great height D00C8A4A 0080 810C8968 ???? 0250:"Medium Jump",0800:"Max Jump" cn Matts D00C8A4A 0080 810C8963 0100 crc 319093EC-0FC209EF-C:45 gn Off Road Challenge (U) cn 1 Player\Always Place 1st 80103C57 0000 cn Multi and 1 Player\Infinite Gent Turbos\Player 1 cd Can be used in 1 Player and Multiplayer Modes for Player 1 81103EBA 02F4 cn 1 Player\Max\Acceleration 8012C49F 000A cn 1 Player\Max\Shocks 8012C4A7 000A cn 1 Player\Max\Speed 8012C4A3 000A cn 1 Player\Max\Tires 8012C4AB 000A cn Multi and 1 Player\Max Crash Helmets\Player 1 cd Can be used in 1 Player and Multiplayer Modes for Player 1 80103EB3 0064 cn Multi and 1 Player\Infinite Gent Turbos\Player 2 cd Multiplayer Mode Only for Player 2 811041AE 02F4 cn Multi and 1 Player\Max Crash Helmets\Player 2 cd Multiplayer Mode Only for Player 2 801041A7 0064 crc E6419BC5-69011DE3-C:45 gn Ogre Battle 64 - Person of Lordly Caliber (U) cn Infinite Goth 81196A6E FFFF cn Max Goth 81196A6C 0098 81196A6E 967F cn Open All Paths 81196A80 01FF 81196A82 677F 81196A84 FCFF cn Finish All Levels 81196A86 5454 81196A88 5140 81196A8A 4555 81196A8C 9514 81196A8E 5515 cn Always Have Retreat & Elem Pedra Opened D01A1C72 0000 811A1C72 0003 cn Hour Always 00 81196A2C 0000 cn Day Always 00 811F106C 0000 cn Magnus\Level 99 80193C0B 0063 cn Magnus\Max HP 81193C0E 03E7 cn Magnus\Infinite HP 81193C10 03E7 cn Magnus\Max Str 81193C14 03E7 cn Magnus\Max Vit 81193C16 03E7 cn Magnus\Max Int 81193C18 03E7 cn Magnus\Max Mem 81193C1A 03E7 cn Magnus\Max Agi 81193C1C 03E7 cn Magnus\Max Dex 81193C1E 03E7 crc 3E198D9E-F2E1267E-C:45 gn Paperboy (U) cn Enable Level Select cd Also accesses All Bonus Levels 8006A5F7 0001 cn Invincibility 812688FE 0001 cn Infinite Newspapers 81268B12 0001 cn Big Newspapers 81268B5A 0001 cn Turbo Mode 81268B36 0001 cn Super Jump Springs 81268B3A 0001 cn Rocket Boosters 81268B3E 0001 cn 99 Total Houses 8106A56A 0063 cn Infinite Health 8006A5D2 0064 crc 65EEE53A-ED7D733C-C:45 gn Paper Mario (U) cn Lots Of Coins 8110F29C 03E7 cn Infinite\HP 8010F292 0063 8010F293 0063 cn Infinite\FP 8010F295 0063 8010F296 0063 cn Have All Spirits 8010F51E 0007 cn Max\Level 8010F299 0063 cn Max\Star Points 8010F2A0 0063 cn Max\Badge Points 8010F298 ???? 003C:"60 Badge Points",007F:"127 Badge Points" cn Max\Star Pieces 8010F29F 0063 cn Have member\Goomario 8010F2AC 0001 cn Have member\Kooper 8010F2B4 0001 cn Have member\Bombette 8010F2BC 0001 cn Have member\Parrakary 8010F2C4 0001 cn Have member\Watt 8010F2D4 0001 cn Have member\Sushie 8010F2DC 0001 cn Have member\Lakitu 8010F2E4 0001 cn Have member\Bow 8010F2EC 0001 cn Upgrade member\Level 1\Goomario cd Do not use with level 2 upgrade cheats 8010F2AD 0001 cn Upgrade member\Level 1\Kooper cd Do not use with level 2 upgrade cheats 8010F2B5 0001 cn Upgrade member\Level 1\Bombette cd Do not use with level 2 upgrade cheats 8010F2BD 0001 cn Upgrade member\Level 1\Parrakary cd Do not use with level 2 upgrade cheats 8010F2C5 0001 cn Upgrade member\Level 1\Watt cd Do not use with level 2 upgrade cheats 8010F2D5 0001 cn Upgrade member\Level 1\Sushie cd Do not use with level 2 upgrade cheats 8010F2DD 0001 cn Upgrade member\Level 1\Lakitu cd Do not use with level 2 upgrade cheats 8010F2E5 0001 cn Upgrade member\Level 1\Bow cd Do not use with level 2 upgrade cheats 8010F2ED 0001 cn Upgrade member\Level 2\Goomario cd Do not use with level 1 upgrade cheats 8010F2AD 0002 cn Upgrade member\Level 2\Kooper cd Do not use with level 1 upgrade cheats 8010F2B5 0002 cn Upgrade member\Level 2\Bombette cd Do not use with level 1 upgrade cheats 8010F2BD 0002 cn Upgrade member\Level 2\Parrakary cd Do not use with level 1 upgrade cheats 8010F2C5 0002 cn Upgrade member\Level 2\Watt cd Do not use with level 1 upgrade cheats 8010F2D5 0002 cn Upgrade member\Level 2\Sushie cd Do not use with level 1 upgrade cheats 8010F2DD 0002 cn Upgrade member\Level 2\Lakitu cd Do not use with level 1 upgrade cheats 8010F2E5 0002 cn Upgrade member\Level 2\Bow cd Do not use with level 1 upgrade cheats 8010F2ED 0002 cn Have hammer\Level 1 cd Do not use with other level hammer cheats 8010F291 0000 cn Have hammer\Level 2 cd Do not use with other level hammer cheats 8010F291 0001 cn Have hammer\Level 3 cd Do not use with other level hammer cheats 8010F291 0002 cn Have jump boots\Level 1 cd Do not use with other level jump boots cheats 8010F290 0000 cn Have jump boots\Level 2 cd Do not use with other level jump boots cheats 8010F290 0001 cn Have jump boots\Level 3 cd Do not use with other level jump boots cheats 8010F290 0002 cn No Star Points (0) cd If emulator hangs at level up, enable this cheat and don't disable it whatsoever! 8010F2A0 0000 cn Infinite\Star Power 8010F520 0007 8010F521 0007 cn Have\Attack item cd Only use One Have item Option at one time. 8110F444 ???? 0800:"Fire Flower",0081:"Snowman Doll",0082:"Thunder Rage",0083:"Shooting Star",0084:"Thunder Bolt",0085:"Pebble",0086:"Dusty Hammer" cn Have\Defense item cd Only use One Have item Option at one time. 8110F444 ???? 0088:"Stone Cap",008A:"Mushroom",008B:"Volt Shroom",0097:"Repel Gel" cn Have\Enemy Stats item cd Only use One Have item Option at one time. 8110F444 ???? 008F:"Sleep Sheep",0090:"POW Block",0092:"Stop Watch",0098:"Fright Jar",009A:"Dizzy Dial" cn Have\Recovery Items Option 1 cd Only use One Have item Option at one time. 8110F444 ???? 0094:"Apple",00B1:"Apple Pie",00C0:"Big Cookie",00BD:"Bland Meal",009E:"Blue Berry",00D8:"Boiled Egg",00A1:"Bubble Berry",00AA:"Cake Mix",00AA:"Cake Mix",00CF:"Coco Pop",00BE:"Deluxe Feast",00A8:"Dried Fruit",00A7:"Dried Pasta",008D:"Dried Shroom",005F:"Egg",00CC:"Electro Pop",00CD:"Fire Pop",00C9:"Fried Egg",00B6:"Fried Shroom",00D4:"Frozen Fries",00A5:"Goomnut",00BC:"Healthy Juice",00CB:"Honey Candy",00CA:"Honey Shroom",00C4:"Honey Super" cn Have\Recovery Items Option 2 cd Only use One Have item Option at one time. 8110F444 ???? 00A4:"Honey Syrup",00B2:"Honey Ultra",00B9:"Hot Shroom",00AF:"Iced Potato",00A2:"Jammin' Jelly",00D1:"Jelly Pop",00DA:"Jelly Shroom",00C6:"Jelly Super",00B4:"Jelly Ultra",00D3:"Kooky Cookie",00A6:"Koopa Leaf",00C3:"Koopa Tea",00B5:"KooPasta",009C:"Lemon",00D0:"Lemon Candy",0095:"Life Shroom",009D:"Lime",0C0E:"Lime Candy",00D7:"Maple Shroom",00C5:"Maple Super",00A3:"Maple Syrup",00B3:"Maple Ultra",00AD:"Melon",00C2:"Mistake",008A:"Mushroom" cn Have\Recovery Items Option 3 cd Only use One Have item Option at one time. 8110F444 ???? 00D6:"Nutty Cake",00D5:"Potato Salad",009F:"Red Berry",00B7:"Shroom Cake",00B8:"Shroom Steak",00C7:"Spaghetti",00BF:"Special Shake",00B0:"Spicy Soup",00AE:"Stinky Herb",00A9:"Strange Leaf",008C:"Super Shroom",009B:"Super Soda",00BA:"Sweet Shroom",0089:"Tasty Tonic",008E:"Ultra Shroom",0093:"Whacka's Bump",00A0:"Yellow Berry",00D9:"Yoshi Cookie",00BB:"Yummy Meal" cn Have\Special Items Options 1 cd Only use One Have item Option at one time 8110F444 ???? 0101:"Jump",010E:"Diploma",010F:"Ultra Stone",0110:"Fortress Key",0115:"Lunar Stone",0118:"Golden Jar",0119:"Kooper's Shell",0122:"Record",0125:"Mystery Note",012A:"Jade Raven",012C:"Magical Seed Purple",012D:"Magical Seed Blue",0131:"Bucket",0150:"Letter",0156:"Dolly",0157:"Water Stone",0158:"Magical Bean",0159:"Fertile Soil",015A:"Miracle Water",015B:"Volcano Vase",0053:"Artifact",0067:"Lyrics",001D:"Boo's Portrait" cn Have\Special Items Option 1 cd Only use One Have item Option at one time. 8110F444 ???? 0030:"Calculator",0029:"Cook Book",001E:"Crystal Berry",0017:"Diamond Stone",0024:"Dictonary",000E:"Diploma",0032:"Scarf",000A:"First Degree Card",000B:"Second Degree Card",000C:"Third Degree Card",000D:"Fourth Degree Card",0023:"Frying Pan",0004:"Hammer",002A:"Jade Raven",0019:"Kooper's Shell,Lunar Stone",0058:"Magical Bean",002B:"Magical Seed Red",002D:"Magical Seed Green",002E:"Magical Seed Brown-Orange",0069:"Mailbag",0031:"Bucket",0021:"Toy Train",0068:"Melody",006C:"Star Stone",005B:"Volcano Vase" crc 73ABB1FB-9CCA6093-C:45 gn Penny Racers (U) cn Super Speed cd This is Turbo fast,So to slow it down a little more keep the B button pressed down 8122AEB8 4800 cn Always 1st 8022AD06 0001 cn Class Select cd This code is useful because you can play Class AA without having to beat a level! 8021E1A7 ???? 0000:"Class C",0001:"Class B",0003:"Class AA",0004:"1 Play",0005:"2 Play",0006:"3 Play",0007:"4 Play" crc DDF460CC-3CA634C0-C:45 gn Perfect Dark (U) (v1.0) cn Have All\Weapons\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 80207F10 0007 801EEF10 0007 801D5F10 0007 cn Infinite\Ammo\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 8020769F 00FF 801EE69F 00FF 801D569F 00FF 80206EFB 00FF 801EDEFB 00FF 801D4EFB 00FF cn Infinite\Health\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 8120677C 3F80 811ED77C 3F80 811D477C 3F80 cn Infinite\Shield\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 81206790 3F80 811E4950 3F80 811CB950 3F80 cn Have All\Weapons\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 80209B80 0007 801F0B80 0007 801D7B80 0007 cn Infinite\Ammo\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 8020930F 00FF 801F030F 00FF 801D730F 00FF 80208B6B 00FF 801EFB6B 00FF 801D6B6B 00FF cn Infinite\Health\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 812083EC 3F80 811EF3EC 3F80 811D63EC 3F80 cn Infinite\Shield\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 811FF5C0 3F80 811E65C0 3F80 811CD5C0 3F80 cn The Ultimate All In One cd The Ultimate All In One activate's solo missions, give all medals on solo missions, activate cheats, activate cinemas, and who knows what else. I just don't have the time to identify these codes. I know that some of this is creditted to Zap2. I don't have the time to cut those codes out. 800884F3 0001 8008850E 0001 80088575 0001 50000302 0000 80088572 0001 8008858C 0001 8008858D 0001 800885A6 0001 800885A9 0001 800885C0 0001 800885DA 0001 800885DC 0001 800885F4 0001 800885F5 0001 8008860E 0001 80088610 0001 80088612 0001 80088628 0001 50000501 0000 80088642 0001 50000501 0000 8008865C 0001 50000501 0000 80088676 0001 50000501 0000 80088690 0001 50000501 0000 800886AA 0001 50000501 0000 800886C4 0001 50000501 0000 800886DE 0001 50000501 0000 800886F8 0001 50000501 0000 80088712 0001 50000501 0000 8008872C 0001 50000501 0000 80088746 0001 50000501 0000 80088760 0001 50000501 0000 8008877A 0001 50000501 0000 80088794 0001 50000501 0000 800887AE 0001 800A2219 0001 50003E02 0000 800A221D 0001 50000B01 0000 800ACCC9 0001 50000901 0000 800ACCD5 0001 50000401 0000 800ACCDF 0001 50000301 0000 800ACCE4 0001 800ACCE8 0001 800ACCE9 0001 800ACCEB 0001 800ACCEC 0001 50000901 0000 800ACCEE 0001 800ACCF8 0001 50002101 0000 800ACCFA 0001 800ACD12 0001 800ACD15 0001 800ACD16 0001 800ACDEA 0001 800ACD3A 0001 cn Carrington Institute\Have 999 points in Firing Range 810B1E32 03E7 cn Carrington Institute\Have Infinite time in Firing Range 810B1E2E 004D cn Carrington Institute\Have 255 targets destroyed 810B1E34 00FF cn All levels Compleate 50004002 0000 810A2218 0001 cn Single & Co-Op\Press B To Levitate\Player 1 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D009C7E4 0040 81206720 40F2 D009C7E4 0040 802066D3 0000 D009C7E4 0040 811ED720 40F2 D009C7E4 0040 801ED6D3 0000 D009C7E4 0040 811D4720 40F2 D009C7E4 0040 801D46D3 0000 cn Single & Co-Op\Press B To Levitate\Player 2 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D009C7EC 0040 81208390 40F2 D009C7EC 0040 80208343 0000 D009C7EC 0040 811EF390 40F2 D009C7EC 0040 801EF343 0000 D009C7EC 0040 811D6390 40F2 D009C7EC 0040 801D6343 0000 cn Multi\Press B To Levitate\Player 1 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D009C7E4 0040 811BB720 40F2 D009C7E4 0040 801BB6D3 0000 cn Multi\Press B To Levitate\Player 2 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D009C7EC 0040 811BD390 40F2 D009C7EC 0040 801BD343 0000 cn Multi\Press B To Levitate\Player 3 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D009C7F4 0040 811BF000 40F2 D009C7F4 0040 801BEFB3 0000 cn Multi\Press B To Levitate\Player 4 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D009C7FC 0040 811C0C70 40F2 D009C7FC 0040 801C0C23 0000 crc 41F2B98F-B458B466-C:45 gn Perfect Dark (U) (v1.1) cn Have All\Weapons\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 80207F10 0007 801EEF10 0007 801D5F10 0007 cn Infinite\Ammo\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 8020769F 00FF 801EE69F 00FF 801D569F 00FF 80206EFB 00FF 801EDEFB 00FF 801D4EFB 00FF cn Infinite\Health\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 8120677C 3F80 811ED77C 3F80 811D477C 3F80 cn Infinite\Shield\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 81206790 3F80 811E4950 3F80 811CB950 3F80 cn Have All\Weapons\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 80209B80 0007 801F0B80 0007 801D7B80 0007 cn Infinite\Ammo\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 8020930F 00FF 801F030F 00FF 801D730F 00FF 80208B6B 00FF 801EFB6B 00FF 801D6B6B 00FF cn Infinite\Health\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 812083EC 3F80 811EF3EC 3F80 811D63EC 3F80 cn Infinite\Shield\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 811FF5C0 3F80 811E65C0 3F80 811CD5C0 3F80 cn The Ultimate All In One cd The Ultimate All In One activate's solo missions, give all medals on solo missions, activate cheats, activate cinemas, and who knows what else. I just don't have the time to identify these codes. I know that some of this is creditted to Zap2. I don't have the time to cut those codes out. 800884F3 0001 8008850E 0001 80088575 0001 50000302 0000 80088572 0001 8008858C 0001 8008858D 0001 800885A6 0001 800885A9 0001 800885C0 0001 800885DA 0001 800885DC 0001 800885F4 0001 800885F5 0001 8008860E 0001 80088610 0001 80088612 0001 80088628 0001 50000501 0000 80088642 0001 50000501 0000 8008865C 0001 50000501 0000 80088676 0001 50000501 0000 80088690 0001 50000501 0000 800886AA 0001 50000501 0000 800886C4 0001 50000501 0000 800886DE 0001 50000501 0000 800886F8 0001 50000501 0000 80088712 0001 50000501 0000 8008872C 0001 50000501 0000 80088746 0001 50000501 0000 80088760 0001 50000501 0000 8008877A 0001 50000501 0000 80088794 0001 50000501 0000 800887AE 0001 800A2219 0001 50003E02 0000 800A221D 0001 50000B01 0000 800ACCC9 0001 50000901 0000 800ACCD5 0001 50000401 0000 800ACCDF 0001 50000301 0000 800ACCE4 0001 800ACCE8 0001 800ACCE9 0001 800ACCEB 0001 800ACCEC 0001 50000901 0000 800ACCEE 0001 800ACCF8 0001 50002101 0000 800ACCFA 0001 800ACD12 0001 800ACD15 0001 800ACD16 0001 800ACDEA 0001 800ACD3A 0001 cn Carrington Institute\Have 999 points in Firing Range 810B1E32 03E7 cn Carrington Institute\Have Infinite time in Firing Range 810B1E2E 004D cn Carrington Institute\Have 255 targets destroyed 810B1E34 00FF cn Single & Co-Op\Press B To Levitate\Player 1 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D009C7E4 0040 81206720 40F2 D009C7E4 0040 802066D3 0000 D009C7E4 0040 811ED720 40F2 D009C7E4 0040 801ED6D3 0000 D009C7E4 0040 811D4720 40F2 D009C7E4 0040 801D46D3 0000 cn Single & Co-Op\Press B To Levitate\Player 2 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D009C7EC 0040 81208390 40F2 D009C7EC 0040 80208343 0000 D009C7EC 0040 811EF390 40F2 D009C7EC 0040 801EF343 0000 D009C7EC 0040 811D6390 40F2 D009C7EC 0040 801D6343 0000 cn Multi\Press B To Levitate\Player 1 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D009C7E4 0040 811BB720 40F2 D009C7E4 0040 801BB6D3 0000 cn Multi\Press B To Levitate\Player 2 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D009C7EC 0040 811BD390 40F2 D009C7EC 0040 801BD343 0000 cn Multi\Press B To Levitate\Player 3 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D009C7F4 0040 811BF000 40F2 D009C7F4 0040 801BEFB3 0000 cn Multi\Press B To Levitate\Player 4 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D009C7FC 0040 811C0C70 40F2 D009C7FC 0040 801C0C23 0000 crc B54CE881-BCCB6126-C:45 gn PGA European Tour (U) cn Hole In One\Hole 01 800FF713 0000 cn Hole In One\Hole 02 800FF715 0000 cn Hole In One\Hole 03 800FF717 0000 cn Hole In One\Hole 04 800FF719 0000 cn Hole In One\Hole 05 800FF71B 0000 cn Hole In One\Hole 06 800FF71D 0000 cn Hole In One\Hole 07 800FF71F 0000 cn Hole In One\Hole 08 800FF721 0000 cn Hole In One\Hole 09 800FF723 0000 cn Hole In One\Hole 10 800FF725 0000 cn Hole In One\Hole 11 800FF727 0000 cn Hole In One\Hole 12 800FF729 0000 cn Hole In One\Hole 13 800FF72B 0000 cn Hole In One\Hole 14 800FF72D 0000 cn Hole In One\Hole 15 800FF72F 0000 cn Hole In One\Hole 16 800FF731 0000 cn Hole In One\Hole 17 800FF733 0000 cn Hole In One\Hole 18 800FF735 0000 crc C851961C-78FCAAFA-C:45 gn Pilot Wings64 (U) cn Infinite Fuel\Gyrocopter 80362821 0081 cn Infinite Fuel\Rocket Belt 80362841 0081 cn Time Always 00'00'10 cd This Cheat code is for All Events 80362750 0001 cn Choose Vehicle cd Make your Choice & then Press GS To Activate,But do not use with any other Press GS Cheat Codes. 883626A7 ???? 0000:"Hang Glider",0001:"Rocket Belt",0002:"Gyrocopter",0003:"Cannonball",0004:"Skydiving",0005:"Jumble Hopper",0006:"Birdman" cn Fly As Yellow Plane In USA Level cd Press GS To Activate,But do not use with any other Press GS Cheat Codes. 89362748 0009 813627B0 3EE0 8024CDF5 006E cn Fly As Gray Plane In USA Level cd Press GS To Activate,But do not use with any other Press GS Cheat Codes. 89362748 0008 813627B0 3F30 8024CDF5 006E cn Have Perfect Score in all Class & Level's cd With these codes, if you want them to save, you have to play a level, and lose and just choose quit after it tallies up your score. Also dont keep the code active once you save the level at 100%, turn the code off and continue with the other levels! 8036427D 0064 803642AD 0064 803642DD 0064 80364911 0064 80364A61 0064 80364941 0064 80364A91 0064 80364971 0064 80364AC1 0064 80364FA5 0064 803650F5 0064 80365245 0064 80364FD5 0064 80365125 0064 80365275 0064 80365005 0064 80365155 0064 803652A5 0064 80365639 0064 80365789 0064 803658D9 0064 80365669 0064 803657B9 0064 80365909 0064 80365699 0064 803657E9 0064 80365939 0064 8036430D 0019 8036445D 0019 803645AD 0019 803646FD 0019 8036433D 0064 8036436D 0064 803649A1 0019 80364AF1 0019 80364C41 0019 80364D91 0019 803649D1 0064 80364A01 0064 80365035 0019 80365185 0019 803652D5 0019 80365425 0019 80365065 0064 80365095 0064 crc CA12B547-71FA4EE4-C:45 gn Pokemon Snap (U) cn Press L\To Stop On Tunnel Level cd To Activated thos Cheat Code, Press L To Stop & Press Start to Continue Again. D00489E1 0020 801DDC55 0001 cn Press L\To Stop On Volcano Level cd To Activated thos Cheat Code, Press L To Stop & Press Start to Continue Again. D00489E1 0020 801FC5C5 0001 cn Press L\To Stop On River Level cd To Activated thos Cheat Code, Press L To Stop & Press Start to Continue Again. D00489E1 0020 801EF96D 0001 cn Press L\To Stop On Cave Level cd To Activated thos Cheat Code, Press L To Stop & Press Start to Continue Again. D00489E1 0020 80202225 0001 cn Press L\To Stop On Beach Level cd To Activated thos Cheat Code, Press L To Stop & Press Start to Continue Again. D00489E1 0020 802020F5 0001 cn Press L\To Stop On Valley Level cd To Activated thos Cheat Code, Press L To Stop & Press Start to Continue Again. D00489E1 0020 801D9ABD 0001 cn Have\Rapid Fire Apples and Bombs 80382CB7 0000 cn Have\Apples Bombs and Flute 803AE51F 0004 cn Have\Apple & Bomb 803AE51F 0002 cn Have\Apple 803AE51F 0001 cn [Enable All Levels] 810C2212 0006 cn Hide First Digit In Roll Of Film 80388F5A 009D cn See Entire Introduction Fully & Various In-Game Effects 81049C7E 025A crc 39119872-07722E9F-C:45 gn Pokemon Snap Station (U) cn Press L\To Stop On Tunnel Level cd To Activated thos Cheat Code, Press L To Stop & Press Start to Continue Again. D00489E1 0020 801DDC55 0001 cn Press L\To Stop On Volcano Level cd To Activated thos Cheat Code, Press L To Stop & Press Start to Continue Again. D00489E1 0020 801FC5C5 0001 cn Press L\To Stop On River Level cd To Activated thos Cheat Code, Press L To Stop & Press Start to Continue Again. D00489E1 0020 801EF96D 0001 cn Press L\To Stop On Cave Level cd To Activated thos Cheat Code, Press L To Stop & Press Start to Continue Again. D00489E1 0020 80202225 0001 cn Press L\To Stop On Beach Level cd To Activated thos Cheat Code, Press L To Stop & Press Start to Continue Again. D00489E1 0020 802020F5 0001 cn Press L\To Stop On Valley Level cd To Activated thos Cheat Code, Press L To Stop & Press Start to Continue Again. D00489E1 0020 801D9ABD 0001 cn Have\Rapid Fire Apples and Bombs 80382CB7 0000 cn Have\Apples Bombs and Flute 803AE51F 0004 cn Have\Apple & Bomb 803AE51F 0002 cn Have\Apple 803AE51F 0001 cn [Enable All Levels] cd This is needed to be able to Play all Levels of the Game 810C2212 0006 cn Hide First Digit In Roll Of Film 80388F5A 009D cn See Entire Introduction Fully & Various In-Game Effects 81049C7E 025A crc 90F5D9B3-9D0EDCF0-C:45 gn Pokemon Stadium (U) cn Pokemon\Max HP\Player 1 810AE586 03E7 810AE5DA 03E7 810AE62E 03E7 cn Pokemon\Max HP\Player 2 810AE7A2 03E7 810AE7F6 03E7 810AE84A 03E7 cn Pokemon\Inf Spells\Player 1 810AE580 FFFF 810AE582 FFFF 810AE5D4 FFFF 810AE5D6 FFFF 810AE628 FFFF 810AE62A FFFF cn Pokemon\Inf Spells\Player 2 810AE79C FFFF 810AE79E FFFF 810AE7F0 FFFF 810AE7F2 FFFF 810AE844 FFFF 810AE846 FFFF cn Have All Pikachus Magnemites 801183BC 0000 801183BD 0000 801183BE 0000 cn Inf HP\In Battle All Pokemon\Player 1 81285A18 03E7 cn Inf HP\In Battle All Pokemon\Player 2 81286438 03E7 cn Ultimate Code cd what's so ultimate about this code is it raises your Pokemon to its full potential. Even at Level 100, most Pokemon still have a way to go to raise their stats to the max. But with this code, you can instantly boost any Pokemon to its greatest potential!!! 81171F3C FF01 81171F3E FF01 81171F40 FF01 81171F42 FF01 81171F44 FF01 crc 03571182-892FD06D-C:45 gn Pokemon Stadium 2 (U) cn One Hit KO cd To Win you must get at least one hit or just return your pokemon. 8014576F 0000 801457C7 0000 8014581F 0000 cn Press R To Reset Time cd Press R To Reset Time 801CE066 0010 81183ACC 0063 cn Max Score D117F812 03E7 8117F812 03E7 cn Press R+L to KO Opponents cd Press R+L Activate D10CE066 0030 80145767 0000 D10CE066 0030 801457C7 0000 D10CE066 0030 8014576F 0000 D10CE066 0030 8014581F 0000 cn Infinite\Continues 8114738C 0009 cn Instant\Win\Topsy Turvy\Player 1 80176887 0005 cn Instant\Win\Barrier Ball\Player 1 8016EA97 0005 cn Instant\Win\Pichu's Power Plant\Player 1 8016D64F 0050 cn Infinite\Dirt Rollout Rampage\Player 1 8017DFEB 0002 cn Press Z\for Max HP\1st Pokemon cd This will give them Max HP when they are not in use. Just call a Pokemon out and he will then have Max HP. When your Pokemon faints, just press Z again and it will revive itIn Battle Only,Do not use with anyother Press Z Cheat Code. D112B554 2000 8114528E 00FF D112B554 2000 81145290 00FF cn Press Z\for Max L.\1st Pokemon\Player 1 cd Do not use with anyother Press Z Cheat Code. D112B554 2000 81145284 0063 cn Press Z\for Max HP\2nd Pokemon\Player 1 cd This will give them Max HP when they are not in use. Just call a Pokemon out and he will then have Max HP. When your Pokemon faints, just press Z again and it will revive itIn Battle Only,Do not use with anyother Press Z Cheat Code. D112B554 2000 811452E6 00FF D112B554 2000 811452E8 00FF cn Press Z\for Max L.\2nd Pokemon\Player 1 cd Do not use with anyother Press Z Cheat Code. D112B554 2000 811452DC 0063 cn Press Z\for Max HP\3rd Pokemon\Player 1 cd This will give them Max HP when they are not in use. Just call a Pokemon out and he will then have Max HP. When your Pokemon faints, just press Z again and it will revive itIn Battle Only,Do not use with anyother Press Z Cheat Code. D112B554 2000 8114533E 00FF D112B554 2000 81145340 00FF cn Press Z\for Max L.\3rd Pokemon\Player 1 cd Do not use with anyother Press Z Cheat Code. D112B554 2000 81145334 0063 crc CF8957AD-96D57EA9-C:45 gn Power Rangers - Lightspeed Rescue (U) cn Unlock All\Characters 50000C01 0000 8006252D 0001 cn Infinite\Health cd For Overhead & Driving Levels 81064DF0 42C8 cn Unlock All\Levels 50000301 0000 80062508 0001 50000801 0000 8006250C 0001 50000801 0000 80062516 0001 50000A01 0000 8006251F 0001 crc FC74D475-9A0278AB-C:45 gn Powerpuff Girls, The - Chemical X-traction (U) cn 1 Win Needed\Player 1 D00BAD0F 0000 800BAD0F 0001 cn Infinite Health\Player 1 810BACDC 42C8 cn Max Chemical X\Player 1 800BAD28 0003 cn Never Win\Player 1 800BAD0F 0000 cn No Chemical X\Player 1 800BAD28 0000 cn No Health\Player 1 810BACDC 0000 cn 1 Win Needed\Player 2 D00BB04F 0000 800BB04F 0001 cn Infinite Health\Player 2 810BB01C 42C8 cn Max Chemical X\Player 2 800BB068 0003 cn Never Win\Player 2 800BB04F 0000 cn No Chemical X\Player 2 800BB068 0000 cn No Health\Player 2 810BB01C 0000 cn Infinite Time 810E69AC 42F0 crc 9F5BF79C-D2FE08A0-C:45 gn Quake cn Infinite\Ammo 50000402 0000 80163A2D 0064 50000402 0000 81163A2C 03E7 cn Have\All Weapons 801639EB 007F cn Debug Mode 8006C4C2 0001 cn Have\All Keys 801639E9 000F cn Infinite\Armor 81163944 42C8 cn Infinite\Health 81163930 42C8 cn Infinite\Bio Suit 81163980 42C8 cn Have\Quad Damage 8116397C 42C8 cn Have\Ring of Shadows 811639E8 ???? 42C8:"On",0000:"Off" cn Rapid Fire D00CA9E0 0020 8016396D 0001 cn Multi\Infinite Health\Player 1 81166290 42C8 cn Multi\Infinite Armor\Player 1 811662A4 42C8 cn Multi\Infinite Bio Suit\Player 1 811662E0 42C8 cn Multi\Have All Weapons\Player 1 8016634B 007F cn Multi\Infinite Ammo\Player 1 50000402 0000 8116638C 03E7 cn Multi\Infinite Health\Player 2 81166560 42C8 cn Multi\Infinite Armor\Player 2 81166574 42C8 cn Multi\Infinite Bio Suit\Player 2 811665B0 42C8 cn Multi\Have All Weapons\Player 2 8016661B 007F cn Multi\Infinite Ammo\Player 2 50000402 0000 8116665C 03E7 crc BDA8F143-B1AF2D62-C:45 gn QUAKE II cn The Ultimate cd The Ultimate Gives you on Solo Play Infinite Health, Infinite Armor, All Guns, and Infinite Ammo On all Levels 8104AD2C 0800 8104AD2E 0018 81000060 8E30 81000062 0068 81000064 241B 81000066 03E7 81000068 AE1B 8100006A 0030 8100006C AC9B 8100006E 0204 81000070 A219 81000072 004B 81000074 A219 81000076 004C 81000078 1000 8100007A 0005 8100007C A219 8100007E 0050 50000604 0000 81000090 A219 50000604 0004 81000092 0054 50000504 0000 810000A8 AE1B 50000504 0004 810000AA 006C 810000BC 0801 810000BE 2B4D 810000C0 AE1B 810000C2 0080 cn Multi\Agony\Have\All Weapons\Player 1 801832B7 0001 801832BB 0001 801832BF 0001 801832C3 0001 801832C7 0001 801832CB 0001 801832CF 0001 801832D3 0001 801832D7 0001 801832DB 0001 cn Multi\Agony\Infinite\Ammo\Player 1 801832DF 0063 801832E3 0063 801832E7 0063 801832EB 0063 801832EF 0063 801832F3 0063 cn Multi\Agony\Have\All Weapons\Player 2 8018361B 0001 8018361F 0001 80183623 0001 80183627 0001 8018362B 0001 8018362F 0001 80183633 0001 80183637 0001 8018363B 0001 8018363F 0001 cn Multi\Agony\Infinite\Ammo\Player 2 80183643 0063 80183647 0063 8018364B 0063 8018364F 0063 80183653 0063 80183657 0063 cn Multi\Cold Steel\Have\All Weapons\Player 1 8017B577 0001 8017B57B 0001 8017B57F 0001 8017B583 0001 8017B587 0001 8017B58B 0001 8017B58F 0001 8017B593 0001 8017B597 0001 8017B59B 0001 cn Multi\Cold Steel\Infinite\Ammo\Player 1 8017B59F 0063 8017B5A3 0063 8017B5A7 0063 8017B5AB 0063 8017B5AF 0063 8017B5B3 0063 cn Multi\Cold Steel\Have\All Weapons\Player 2 8017B8DB 0001 8017B8DF 0001 8017B8E3 0001 8017B8E7 0001 8017B8EB 0001 8017B8EF 0001 8017B8F3 0001 8017B8F7 0001 8017B8FB 0001 8017B8FF 0001 cn Multi\Cold Steel\Infinite\Ammo\Player 2 8017B903 0063 8017B907 0063 8017B90B 0063 8017B90F 0063 8017B913 0063 8017B917 0063 cn Multi\Corridors\Have\All Weapons\Player 1 8017D1C7 0001 8017D1CB 0001 8017D1CF 0001 8017D1D3 0001 8017D1D7 0001 8017D1DB 0001 8017D1DF 0001 8017D1E3 0001 8017D1E7 0001 8017D1EB 0001 cn Multi\Corridors\Infinite\Ammo\Player 1 8017D1E7 0063 8017D1F3 0063 8017D1F7 0063 8017D1FB 0063 8017D1FF 0063 8017D203 0063 cn Multi\Corridors\Have\All Weapons\Player 2 8017D52B 0001 8017D52F 0001 8017D533 0001 8017D537 0001 8017D53B 0001 8017D53F 0001 8017D543 0001 8017D547 0001 8017D54B 0001 8017D54F 0001 cn Multi\Corridors\Infinite\Ammo\Player 2 8017D553 0063 8017D557 0063 8017D55B 0063 8017D55F 0063 8017D567 0063 cn Multi\Dying Halls\Have\All Weapons\Player 1 801BF937 0001 801BF93B 0001 801BF93F 0001 801BF943 0001 801BF947 0001 801BF94B 0001 801BF94F 0001 801BF953 0001 801BF957 0001 801BF95B 0001 cn Multi\Dying Halls\Infinite\Ammo\Player 1 801BF95F 0063 801BF963 0063 801BF967 0063 801BF96B 0063 801BF96F 0063 801BF973 0063 cn Multi\Dying Halls\Have\All Weapons\Player 2 801BFC9B 0001 801BFC9F 0001 801BFCA3 0001 801BFCA7 0001 801BFCAB 0001 801BFCAF 0001 801BFCB3 0001 801BFCB7 0001 801BFCBB 0001 801BFCBF 0001 cn Multi\Dying Halls\Infinite\Ammo\Player 2 801BFCC3 0063 801BFCC7 0063 801BFCCB 0063 801BFCCF 0063 801BFCD3 0063 801BFCD7 0063 cn Multi\Empty Space\Have\All Weapons\Player 1 80179B27 0001 80179B2B 0001 80179B2F 0001 80179B33 0001 80179B37 0001 80179B3B 0001 80179B3F 0001 80179B43 0001 80179B47 0001 80179B4B 0001 cn Multi\Empty Space\Infinite\Ammo\Player 1 80179B4F 0063 80179B53 0063 80179B57 0063 80179B5B 0063 80179B5F 0063 80179B63 0063 cn Multi\Empty Space\Have\All Weapons\Player 2 80179E8B 0001 80179E8F 0001 80179E93 0001 80179E97 0001 80179E9B 0001 80179E9F 0001 80179EA3 0001 80179EA7 0001 80179EAB 0001 80179EAF 0001 cn Multi\Empty Space\Infinite\Ammo\Player 2 80179EB3 0063 80179EB7 0063 80179EBB 0063 80179EBF 0063 80179EC3 0063 80179EC7 0063 cn Multi\Fortress\Have\All Weapons\Player 1 8017D617 0001 8017D61B 0001 8017D61F 0001 8017D623 0001 8017D627 0001 8017D62B 0001 8017D62F 0001 8017D633 0001 8017D637 0001 8017D63B 0001 cn Multi\Fortress\Infinite\Ammo\Player 1 8017D63F 0063 8017D643 0063 8017D647 0063 8017D64B 0063 8017D64F 0063 8017D653 0063 cn Multi\Fortress\Have\All Weapons\Player 2 8017D97B 0001 8017D97F 0001 8017D983 0001 8017D987 0001 8017D98B 0001 8017D98F 0001 8017D993 0001 8017D997 0001 8017D99B 0001 8017D99F 0001 cn Multi\Fortress\Infinite\Ammo\Player 2 8017D9A3 0063 8017D9A7 0063 8017D9AB 0063 8017D9AF 0063 8017D9B3 0063 8017D9B7 0063 cn Multi\Mad Dash\Have\All Weapons\Player 1 801AE9A7 0001 801AE9AB 0001 801AE9AF 0001 801AE9B3 0001 801AE9B7 0001 801AE9BB 0001 801AE9BF 0001 801AE9C3 0001 801AE9C7 0001 801AE9CB 0001 cn Multi\Mad Dash\Infinite\Ammo\Player 1 801AE9CF 0063 801AE9D3 0063 801AE9D7 0063 801AE9DB 0063 801AE9DF 0063 801AE9E3 0063 cn Multi\Mad Dash\Have\All Weapons\Player 2 801AED0B 0001 801AED0F 0001 801AED13 0001 801AED17 0001 801AED1B 0001 801AED1F 0001 801AED23 0001 801AED27 0001 801AED2B 0001 801AED2F 0001 cn Multi\Mad Dash\Infinite\Ammo\Player 2 801AED33 0063 801AED37 0063 801AED3B 0063 801AED3F 0063 801AED43 0063 801AED47 0063 cn Multi\Overflow\Have\All Weapons\Player 1 80197907 0001 8019790B 0001 8019790F 0001 80197913 0001 80197917 0001 8019791B 0001 8019791F 0001 80197923 0001 80197927 0001 8019792B 0001 cn Multi\Overflow\Infinite\Ammo\Player 1 8019792F 0063 80197933 0063 80197937 0063 8019793B 0063 8019793F 0063 80197943 0063 cn Multi\Overflow\Have\All Weapons\Player 2 80197C6B 0001 80197C6F 0001 80197C73 0001 80197C77 0001 80197C7B 0001 80197C7F 0001 80197C83 0001 80197C87 0001 80197C8B 0001 80197C8F 0001 cn Multi\Overflow\Infinite\Ammo\Player 2 80197C93 0063 80197C97 0063 80197C9B 0063 80197C9F 0063 80197CA3 0063 80197CA7 0063 cn Multi\Twists\Have\All Weapons\Player 1 801ABE47 0001 801ABE4B 0001 801ABE4F 0001 801ABE53 0001 801ABE57 0001 801ABE5B 0001 801ABE5F 0001 801ABE63 0001 801ABE67 0001 801ABE6B 0001 cn Multi\Twists\Infinite\Ammo\Player 1 801ABE6F 0063 801ABE73 0063 801ABE77 0063 801ABE7B 0063 801ABE7F 0063 801ABE83 0063 cn Multi\Twists\Have\All Weapons\Player 2 801AC1AB 0001 801AC1AF 0001 801AC1B3 0001 801AC1B7 0001 801AC1BB 0001 801AC1BF 0001 801AC1C3 0001 801AC1C7 0001 801AC1CB 0001 801AC1CF 0001 cn Multi\Twists\Infinite\Ammo\Player 2 801AC1D3 0063 801AC1D7 0063 801AC1DB 0063 801AC1DF 0063 801AC1E3 0063 801AC1E7 0063 cn Multi\War Room\Have\All Weapons\Player 1 801A2E57 0001 801A2E5B 0001 801A2E5F 0001 801A2E63 0001 801A2E67 0001 801A2E6B 0001 801A2E6F 0001 801A2E73 0001 801A2E77 0001 801A2E7B 0001 cn Multi\War Room\Infinite\Ammo\Player 1 801A2E7F 0063 801A2E83 0063 801A2E87 0063 801A2E8B 0063 801A2E8F 0063 801A2E93 0063 cn Multi\War Room\Have\All Weapons\Player 2 801A31BB 0001 801A31BF 0001 801A31C3 0001 801A31C7 0001 801A31CB 0001 801A31CF 0001 801A31D3 0001 801A31D7 0001 801A31DB 0001 801A31DF 0001 cn Multi\War Room\Infinite\Ammo\Player 2 801A31E3 0063 801A31E7 0063 801A31EB 0063 801A31EF 0063 801A31F3 0063 801A31F7 0063 crc C8BB4DD9-CC5F430B-C:45 gn Quest 64 (U) cn Have All Elements 8107BAA4 3232 8107BAA6 3232 cn Infinite Health 8107BA84 01F4 8107BA86 01F4 cn Infinite Magic Points 8107BA88 01F4 8107BA8A 01F4 cn Super Agility 8107BA8E 01F4 cn Super Defense 8107BA8C 01F4 crc 73A88E3D-3AC5C571-C:45 gn Rally Challenge 2000 (U) cn Infinite Time 81104998 49F2 cn Arcade Mode\Car Modifier 802818B3 ???? 0000:"Mitsubishi Lancer Evolution V",0001:"Subaru Impreza WRC",0002:"Toyota Corolla WRC",0003:"Nissan Almera Kit Car",0004:"Seat Cordoba WRC",0005:"Skoda Octavia",0006:"VW Golf GTI MK IV",0007:"Proton WIRA",0008:"Hyundai Coupe EVO 2" cn Easy Courses\Australia\Have 1st 80178F87 0000 cn Easy Courses\Australia\Always Low Lap Timer 81178F90 0000 81178F92 0000 cn Easy Courses\Spain\Have 1st 801870D7 0000 cn Easy Courses\Spain\Always Low Lap Timer 811870E0 0000 811870E2 0000 cn Easy Courses\Great Britian\Have 1st 801766A7 0000 cn Easy Courses\Great Britian\Always Low Lap Timer 811766B0 0000 811766B2 0000 cn Medium Courses\Italy\Have 1st 8017E4E7 0000 cn Medium Courses\Italy\Always Low Lap Timer 8117E4D0 0000 8117E4D2 0000 cn Medium Courses\Brazil\Have 1st 801748C7 0000 cn Medium Courses\Brazil\Always Low Lap Timer 811748D0 0000 811748D2 0000 cn Medium Courses\France\Have 1st 80172477 0000 cn Medium Courses\France\Always Low Lap Timer 81172480 0000 81172482 0000 cn Expert Courses\Germany\Have 1st 8017DF87 0000 cn Expert Courses\Germany\Always Low Lap Timer 8117DF90 0000 8117DF92 0000 cn Expert Courses\Canada\Have 1st 8017CF87 0000 cn Expert Courses\Canada\Always Low Lap Timer 8117CF90 0000 8117CF92 0000 cn Expert Courses\USA\Have 1st 8017EF87 0000 cn Expert Courses\USA\Always Low Lap Timer 8117EF90 0000 8117EF92 0000 cn Championship Mode\Have 255 Race Points 80101D1A 00FF cn Championship Mode\Australia\Start On 3rd Lap D0178F6F 0001 80178F6F 0003 cn Championship Mode\Australia\Infinite Damage\Front End 80178FA0 003E cn Championship Mode\Australia\Infinite Damage\Left Side 80178FA4 0040 cn Championship Mode\Australia\Infinite Damage\Right Side 80178FA8 0040 cn Championship Mode\Australia\Infinite Damage\Tires 80178FAC 0040 cn Championship Mode\Spain\Start On 3rd Lap D01870BF 0001 801870BF 0003 cn Championship Mode\Spain\Infinite Damage\Front End 801870F0 0040 cn Championship Mode\Spain\Infinite Damage\Left Side 801870F4 0040 cn Championship Mode\Spain\Infinite Damage\Right Side 801870F8 0040 cn Championship Mode\Spain\Infinite Damage\Tires 801870FC 0040 cn Championship Mode\Brazil\Start On 3rd Lap D01748AF 0001 801748AF 0003 cn Championship Mode\Brazil\Infinite Damage\Front End 801748E0 0040 cn Championship Mode\Brazil\Infinite Damage\Left Side 801748E4 0040 cn Championship Mode\Brazil\Infinite Damage\Right Side 801748E8 0040 cn Championship Mode\Brazil\Infinite Damage\Tires 801748EC 0040 cn Championship Mode\USA\Start On 3rd Lap D017EF6F 0001 8017EF6F 0003 cn Championship Mode\USA\Infinite Damage\Front End 8017EFA0 0040 cn Championship Mode\USA\Infinite Damage\Left Side 8017EFA4 0040 cn Championship Mode\USA\Infinite Damage\Right Side 8017EFA8 0040 cn Championship Mode\USA\Infinite Damage\Tires 8017EFAC 0040 cn Championship Mode\Italy\Start On 3rd Lap D017E4CF 0001 8017E4CF 0003 cn Championship Mode\Italy\Infinite Damage\Front End 8017E500 0040 cn Championship Mode\Italy\Infinite Damage\Left Side 8017E504 0040 cn Championship Mode\Italy\Infinite Damage\Right Side 8017E508 0040 cn Championship Mode\Italy\Infinite Damage\Tires 8017E50C 0040 cn Championship Mode\Germany\Start On 3rd Lap D017DF6F 0001 8017DF6F 0003 cn Championship Mode\Germany\Infinite Damage\Front End 8017DFA0 0040 cn Championship Mode\Germany\Infinite Damage\Left Side 8017DFA4 0040 cn Championship Mode\Germany\Infinite Damage\Right Side 8017DFA8 0040 cn Championship Mode\Germany\Infinite Damage\Tires 8017DFAC 0040 cn Championship Mode\Canada\Start On 3rd Lap D017CF6F 0001 8017CF6F 0003 cn Championship Mode\Canada\Infinite Damage\Front End 8017CFA0 0040 cn Championship Mode\Canada\Infinite Damage\Left Side 8017CFA4 0040 cn Championship Mode\Canada\Infinite Damage\Right Side 8017CFA8 0040 cn Championship Mode\Canada\Infinite Damage\Tires 8017CFAC 0040 cn Championship Mode\Great Britain\Start On 3rd Lap D017668F 0001 8017668F 0003 cn Championship Mode\Great Britain\Infinite Damage\Front End 801766C0 0040 cn Championship Mode\Great Britain\Infinite Damage\Left Side 801766C4 0040 cn Championship Mode\Great Britain\Infinite Damage\Right Side 801766C8 0040 cn Championship Mode\Great Britain\Infinite Damage\Tires 801766CC 0040 cn Championship Mode\France\Start On 3rd Lap D017245F 0001 8017245F 0003 cn Championship Mode\France\Infinite Damage\Front End 80172490 0040 cn Championship Mode\France\Infinite Damage\Left Side 80172494 0040 cn Championship Mode\France\Infinite Damage\Right Side 80172498 0040 cn Championship Mode\France\Infinite Damage\Tires 8017249C 0040 crc C29FF9E4-264BFE7D-C:45 gn Rampage - World Tour (U) cn Unlock Cheat Menu 810D5710 0001 cn Infinite Time to Choose A Character 8118CF9A 06CB cn Curtis\Infinite\Health 811541B8 0044 cn Curtis\1-Hit Death D01541B9 0044 811541B8 0001 cn Curtis\Infinite\Special 811541C0 0044 cn Curtis\Max Score 811541E8 000F 811541EA 423F cn Curtis\Infinite\Lives 811541B4 0063 cn Boris\Infinite\Health 811543D4 0044 cn Boris\1-Hit Death D01543D5 0044 811543D4 0001 cn Boris\Infinite\Special 811543DC 0044 cn Boris\Max Score 81154404 000F 81154406 423F cn Boris\Infinite\Lives 811543D0 0063 cn Ruby\Infinite\Health 811545F0 0044 cn Ruby\1-Hit Death D01545F1 0044 811545F0 0001 cn Ruby\Infinite\Special 811545F8 0044 cn Ruby\Max Score 81154620 000F 81154622 423F cn Ruby\Infinite\Lives 811545EC 0063 cn George\Infinite\Health 8115480C 0044 cn George\1-Hit Death D015480D 0044 8115480C 0001 cn George\Infinite\Special 81154814 0044 cn George\Max Score 8115483C 000F 8115483E 423F cn George\Infinite\Lives 81154808 0063 cn Lizzie\Infinite\Health 81154A28 0044 cn Lizzie\1-Hit Death D0154A29 0044 81154A28 0001 cn Lizzie\Infinite\Special 81154A30 0044 cn Lizzie\Max Score 81154A58 000F 81154A5A 423F cn Lizzie\Infinite\Lives 81154A24 0063 cn Ralph\Infinite\Health 81154C44 0044 cn Ralph\1-Hit Death D0154C45 0044 81154C44 0001 cn Ralph\Infinite\Special 81154C4C 0044 cn Ralph\Max Score 81154C74 000F 81154C76 423F cn Ralph\Infinite\Lives 81154C40 0063 cn Myukus Codes\Infinite\Health 81154E60 0044 cn Myukus Codes\1-Hit Death D0154E61 0044 81154E60 0001 cn Myukus Codes\Infinite\Special 81154E68 0044 cn Myukus Codes\Max Score 81154E90 000F 81154E92 423F cn Myukus Codes\Infinite\Lives 81154E5C 0063 crc 673D099B-A4C808DE-C:45 gn Rampage 2: Universal Tour (U) cn Always Full Special\Myukus 81554E68 0044 cn Always Full Special\Ralph 81154C4C 0044 cn Enable\Myukus 8118CF98 0000 cn Infinite\Health\Myukus 81154E60 0044 cn Infinite\Lives\Myukus 81154EFC 0063 cn Infinite\Lives\Ruby 811545EC 0063 cn Enable\Lizzie 8118CF94 0000 cn Enable\Ralph 8118CF96 0000 cn Infinite Health\George 8115480C 0044 cn Infinite Health\Lizzie 81154A28 0044 cn Infinite Health\Ralph 81154C44 0044 cn Infinite Lives\George 81154808 0063 cn Infinite Lives\Lizzie 81154A24 0063 cn Infinite Lives\Ralph 81154C40 0063 cn Always Full Special\Boris 811543DC 0044 cn Always Full Special\Curtis 811541C0 0044 cn Always Full Special\Ruby 811545F8 0044 cn Always Full Special\George 81154814 0044 cn Always Full Special\Lizzie 81154A30 0044 cn Enable George 8118CF92 0000 cn Infinite\Health\Boris 811543D4 0044 cn Infinite\Health\Curtis 811541B8 0044 cn Infinite\Health\Ruby 811545F0 0044 cn Infinite\Lives\Boris 811543D0 0063 cn Infinite\Lives\Curtis 811541B4 0063 crc 0304C48E-AC4001B8-C:45 gn Rat Attack (U) cn Play As/Player 1 801514F3 ???? 0000:"Hai Jinx",0001:"Sparky",0002:"Manx",0003:"Muffy Dupont",0004:"Bob Cat",0005:"Smokey",0006:"Atomicat",0007:"Pearl" cn Play As/Player 2 80151503 ???? 0000:"Hai Jinx",0001:"Sparky",0002:"Manx",0003:"Muffy Dupont",0004:"Bob Cat",0005:"Smokey",0006:"Atomicat",0007:"Pearl" cn Play As/Player 3 80151513 ???? 0000:"Hai Jinx",0001:"Sparky",0002:"Manx",0003:"Muffy Dupont",0004:"Bob Cat",0005:"Smokey",0006:"Atomicat",0007:"Pearl" cn Play As/Player 4 80151523 ???? 0000:"Hai Jinx",0001:"Sparky",0002:"Manx",0003:"Muffy Dupont",0004:"Bob Cat",0005:"Smokey",0006:"Atomicat",0007:"Pearl" cn Max Score 81158440 05F5 81158442 E0FF crc F3C5BF9B-160F33E2-C:45 gn Rayman 2 The Great Escape (U) cn Have All\Crates 810C70F8 7FFF 810C70FA FFFF 810C70FC FFFF 810C70FE FFFF 810C7100 FFFF 800C7102 00FF cn All Masks cd Press GS To Activate All Masks 891F1210 8780 cn Start with Full Health 811BC64C 001E cn Have All\Levels 811F1200 FFFF 811F1202 FFFF 811F1201 03E7 811F1203 03E7 cn Have All\Yellow Lums 50006401 0000 800C7108 00FF 50001901 0000 800C70BD 00FF 811F1182 0005 50005702 0000 811F1188 FFFF cn Have All\Pirate Cages 801F1142 0050 811F11F0 FFFF 811F11F2 FFFF 811F11F4 FFFF 811F11F6 FFFF 811F11F8 00FF 811F11FA FFFF cn Open Map 810C70F0 FFFF 810C70F2 FFFF cn Infinite\Oxygen 810F4B90 4396 crc 3918834A-15B50C29-C:45 gn Razor Freestyle Scooter (U) [!] cn Freeze Timer 800CE4EE 0077 cn Max\Wheels Collected 800CE513 ???? 0000:"0 Wheels",001E:"30 Wheels",0028:"40 Wheels" cn Zero Crash Counts 800CE49F 0000 cn Max\Tricks Landed 810CE4A6 03E7 810CE4A2 03E7 cn Max\Combos Landed 810CE4AA 03E7 810CE4AE 03E7 cn Have All Charcters & Levels Unlocked 50000740 0000 800CB951 0001 50000304 0000 800CB945 0001 50000304 0000 800CB985 0001 50000304 0000 800CB9C5 0001 50000304 0000 800CBA05 0001 50000304 0000 800CBA45 0001 50000304 0000 800CBA85 0001 crc EAB7B429-BAC92C57-C:45 gn Ready 2 Rumble Boxing (U) cn Infinite\Money 810EC932 FFFF cn Sudden Death Mode\Player 1 D00E7596 03D7 810DAF78 0000 810D9F7A 0001 cn Sudden Death Mode\Player 2 D00E7596 03D7 810DA790 0000 810DA792 0001 cn Player 1\Health 810D9F78 0000 810D9F7A ???? 0064:"Infinite",0000:"No Health" cn Player 1\Stamina 810D9F7C 0000 810D9F7E ???? 0064:"Infinite",0000:"No Stamina" cn Player 1\RUMBLE 810D9F84 0000 810D9F86 ???? 0030:"Max",0000:"Never Rumble" cn Player 2\Health 810DA790 0000 810DA792 ???? 0064:"Infinite",0000:"No Health" cn Player 2\Stamina 810DA794 0000 810DA796 ???? 0064:"Infinite",0000:"No Stamina" cn Player 2\RUMBLE 810DA7A0 0000 810DA7A2 ???? 0030:"Max",0000:"Never Rumble" cn Infinite\Time 810E7596 0E10 cn Have All Characters 5000125C 0000 810EC938 0000 5000125C 0000 810EC93A 0003 crc E9219533-13FBAFBD-C:45 gn Ready 2 Rumble Boxing: Round 2 (U) cn Infinite\Health\Player 1 cd Do not use this with No Health 810FF6B6 0064 cn No Health\Player 1 cd Do not use this with Infinite Health 810FF6B6 0000 cn Infinite\Stamina\Player 1 cd Do not use this with No Stamina 810FF6BA 0064 cn No Stamina\Player 1 cd Do not use this with Infinite Stamina 810FF6BA 0000 cn Max RUMBLE\Player 1 cd Do not use this with Never RUMBLE 810FF6C2 0090 cn Never RUMBLE\Player 1 cd Do not use this with Max RUMBLE 810FF6C2 0000 cn Infinite\Health\Player 2 cd Do not use this with No Health 81100316 0064 cn No Health\Player 2 cd Do not use this with Infinite Health 81100316 0000 cn Infinite\Stamina\Player 2 cd Do not use this with No Stamina 8110031A 0064 cn No Stamina\Player 2 cd Do not use this with Infinite Stamina 8110031A 0000 cn Max RUMBLE\Player 2 cd Do not use this with Never RUMBLE 81100322 0090 cn Never RUMBLE\Player 2 cd Do not use this with Max RUMBLE 81100322 0000 cn Infinite\Time 810FE352 0E10 cn Championship Mode\Top Rank 810F81BA 000A cn Championship Mode\Max Money 810F81C8 7FFF 810F81CA FFFF cn Championship Mode\Infinite Money 810F81CA FFFF cn Championship Mode\Max Strength 810F81CC 447A 810F81CE 0000 cn Championship Mode\Max Stamina 810F81D0 447A 810F81D2 0000 cn Championship Mode\Max Endurance 810F81D4 447A 810F81D6 0000 cn Championship Mode\Max Dexterity 810F81D8 447A 810F81DA 0000 cn Championship Mode\Max Experience 810F81DC 447A 810F81DE 0000 cn Enable Extra Characters 80101E6F 0003 80101E73 0003 80101E77 0003 80101E7B 0003 80101E7F 0003 80101E83 0003 80101E87 0003 cn Win 1 Fight to Complete Arcade Mode 80101F0B 000B crc AA18B1A5-07DB6AEB-C:45 gn Resident Evil 2 (U) cn Max Item Modifier\Slot 01 800E8EC8 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E8EC9 00FF cn Max Item Modifier\Slot 02 800E8ECC ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E8ECD 00FF cn Max Item Modifier\Slot 03 800E8ED0 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E8ED1 00FF cn Max Item Modifier\Slot 04 800E8ED4 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E8ED5 00FF cn Max Item Modifier\Slot 05 800E8ED8 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E8ED9 00FF cn Max Item Modifier\Slot 06 800E8EDC ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E8EDD 00FF cn Max Item Modifier\Slot 07 800E8EE0 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E8EE1 00FF cn Max Item Modifier\Slot 08 800E8EE4 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E8EE5 00FF cn Max Item Modifier\Slot 09 800E8EE8 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E8EE9 00FF cn Max Item Modifier\Slot 10 800E8EEC ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E8EED 00FF cn Infinite\Health 810E1322 00C8 cn Always Have Fine Condition 810E13E4 0000 cn Play As 810E1138 ???? 0080:"Leon Original",0180:"Claire Original",0280:"Leon Original",0380:"Claire Original",0480:"Leon Wounded",0580:"Claire without jacket",0680:"Leon Wounded",0780:"Claire without jacket",0880:"Leon as Stars",0980:"Claire as Biker",0A80:"Leon as Biker",0B80:"Claires body Leons outfit",0C80:"Hunk (can crash the game)",0D80:"To Fu",0E80:"Ada (can crash the game)",0F80:"Cheryl" cn Play Extra Mission 810E10EE ???? 0048:"The 4th Survior",0049:"To-Fu" cn Infinite\Time 800E8CBF 0010 crc 0F1FA987-BFC1AFA6-C:45 gn Re-Volt (U) cn Access All\Cars & Tracks 8104ACA6 0001 cn Access All\Cups 5000032C 0000 810542FA 00FF cn Always 1st 8111565E 0001 81115666 0000 8110C1EE 02F4 cn Infinite Continues 8110C1E2 0006 cn Drones Have No Weapons 8111CD7E 0000 cn Infinite Weapons\Player 1 81115648 0000 8111564A ???? 0000:"Green Missile",0001:"Orange Missile",0002:"Multi-Orange Missiles",0003:"The Bomb",0004:"Water Balloon",0005:"Blue Protector",0006:"Oil Slick",0007:"Bowling Ball Mine",0008:"Yellow Protector",0009:"Lightning Bolt",000A:"Orange Star",000B:"Beach Ball" 8111564E 0001 cn Laps To Race 8107DBCE ???? 0001:"1 Lap",0002:"2 laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" cn Number Of Drones In The Race 8110FEA6 ???? 0001:"1 Drone",0002:"2 Drones",0003:"3 Drones",0004:"4 Drones",0005:"5 Drones",0006:"6 Drones",0007:"7 Drones",0008:"8 Drones",0009:"9 Drones" cn 99 Points Player 1 8010C1EF 0063 cn Infinite Weapons\Player 2 81117B10 0000 81117B12 ???? 0000:"Green Missile",0001:"Orange Missile",0002:"Multi-Orange Missiles",0003:"The Bomb",0004:"Water Balloon",0005:"Blue Protector",0006:"Oil Slick",0007:"Bowling Ball Mine",0008:"Yellow Protector",0009:"Lightning Bolt",000A:"Orange Star",000B:"Beach Ball" 81117B16 0001 cn Infinite Weapons\Player 3 81119FD8 0000 81119FDA ???? 0000:"Green Missile",0001:"Orange Missile",0002:"Multi-Orange Missiles",0003:"The Bomb",0004:"Water Balloon",0005:"Blue Protector",0006:"Oil Slick",0007:"Bowling Ball Mine",0008:"Yellow Protector",0009:"Lightning Bolt",000A:"Orange Star",000B:"Beach Ball" 81119FDE 0001 cn Infinite Weapons\Player 4 8111C4A0 0000 8111C4A2 ???? 0000:"Green Missile",0001:"Orange Missile",0002:"Multi-Orange Missiles",0003:"The Bomb",0004:"Water Balloon",0005:"Blue Protector",0006:"Oil Slick",0007:"Bowling Ball Mine",0008:"Yellow Protector",0009:"Lightning Bolt",000A:"Orange Star",000B:"Beach Ball" 8111C4A6 0001 crc 0B6B4DDB-9671E682-C:45 gn Roadsters Trophy (U) (M3) cn Cheats Enabled Modifier 8108F840 ???? 0004:"Fast Bucks (You Get 250",0008:"Easy Money (You Get 1",0010:"Trophies (Second And Third Championships Wins)",0020:"Smurfing (High Pitched Voices)",0040:"Big Wheels (Big Foot Cars)",0080:"Skywalker (Hover Cars)",0100:"Car Radio (Remote Control Cars)",0200:"Chopper (Top Down View)",0400:"Anyway (Race Circuits Backwards)",0800:"Extra Resolution (Able To Change Resolution In Options Screen)" crc F050746C-247B820B-C:45 gn ROAD RASH 64 cn Always 1st 810D7856 0000 cn Always Have\Max Cash 810D6A7A FFFF cn Access\All Bikes & Tracks 800A77D5 0063 cn Access\Infinite & All Weapons 50000E02 0000 811B8D7A 0505 cn Infinite\Damage 801C0D17 0002 cn Infinite\Health\To Bike 811B8A38 42F0 811B8A3C 42F0 cn Infinite\Health\To Character 811BFE10 4489 811BFE12 8000 cn Always Have\Weapon 801C00B3 ???? 0001:"Fists",0002:"Spiked Club",0003:"Tiring Iron",0004:"Bat",0005:"Billie Club",0006:"Sledge Hammer",0007:"Pool Cue",0008:"Monkey Wrench",0009:"Banana",000A:"Cattle Prod",000B:"Taser",000C:"Bace",000D:"Nunchuk",000E:"Chain" crc AC8E4B32-E7B47326-C:45 gn Robotron 64 (U) cn Infinite Lives 8009B1AF 0009 cn Max Score 8009B1AA 00FF cn Level Select In Setup Menu 81076FF6 6F8C crc 0C5EE085-A167DD3E-C:45 gn Rocket: Robot On Wheels (U) cn Infinite\Max Health 8109F702 000C 8109F706 000C cn Max\Tinker Toys 810A599E 270F cn Max\Ticket Switches 810A59A2 00C8 cn Have All\Machine Parts 810A5960 FFFF cn Have All\Vechicles 810A5968 FFFF cn Activate Cheat 810A63C6 F5FF cn Whoopie World\Max Tickets 810A58F0 FFFF 810A58F2 FFFF 810A58F4 FFFF 810A58F6 FFFF 810A58F8 FFFF 810A58FA FFFF 810A58FC FFFF cn Whoopie World\Infinite Time 810A58FE FFFF cn Clowney Island\Max Tickets 810A5900 FFFF 810A5902 FFFF 810A5904 FFFF 810A5906 FFFF 810A5908 FFFF 810A590A FFFF 810A590C FFFF cn Clowney Island\Infinite Time 810A590E FFFF cn Paint Misbehaving\Max Tickets 810A5910 FFFF 810A5912 FFFF 810A5914 FFFF 810A5916 FFFF 810A5918 FFFF 810A591A FFFF 810A591C FFFF cn Paint Misbehaving\Infinite Time 810A591E FFFF cn Mine Blowing\Max Tickets 810A5920 FFFF 810A5922 FFFF 810A5924 FFFF 810A5926 FFFF 810A5928 FFFF 810A592A FFFF 810A592C FFFF cn Mine Blowing\Infinite Time 810A592E FFFF cn Arabian Flights\Max Tickets 810A5930 FFFF 810A5932 FFFF 810A5934 FFFF 810A5936 FFFF 810A5938 FFFF 810A593A FFFF 810A593C FFFF cn Arabian Flights\Infinite Time 810A593E FFFF cn Pyramid Scheme\Max Tickets 810A5940 FFFF 810A5942 FFFF 810A5944 FFFF 810A5946 FFFF 810A5948 FFFF 810A594A FFFF 810A594C FFFF cn Pyramid Scheme\Infinite Time 810A594E FFFF cn Food Fright\Max Tickets 810A5950 FFFF 810A5952 FFFF 810A5954 FFFF 810A5956 FFFF 810A5958 FFFF 810A595A FFFF 810A595C FFFF cn Food Fright\Infinite Time 810A595E FFFF crc 2500267E-2A7EC3CE-C:45 gn RR64 - Ridge Racer 64 (U) cn All Modes\Always Have 1st Place 81056444 0001 cn All Modes\Infinite Time 811269CA 0700 cn All Modes\Press R Button For Turbo D103E1EA 0010 8105641A 0800 cn Grand Prix Mode\Car Modifier 8113CF5A ???? 0000:"F/A Racing",0001:"RT Ryukyu",0002:"PAC Racing",0003:"RT Solvalou",0004:"RT Pink Mappy",0005:"RT Blue Mappy",0006:"Galaga RT Prid's",0007:"Galaga RT Carrot",0008:"RT Bosconian",0009:"RT Nebulasray",000A:"RT Xevious Red",000B:"RT Xevious Green",000C:"Dig Racing Team",000D:"Micro Mouse Mappy",000E:"13th Racing Kid",000F:"White Angel",0010:"Digipen Racing",0011:"Assoluto Infinito",0012:"Age Solo Supernova",0013:"Atomic Purple",0014:"Extreme Green",0015:"Terrazi Terrific",0016:"Lizard Nightmare",0017:"Screamin' Eagle",0018:"Ultra 64 (Full Stats)",0019:"00-Agent",001A:"Galaga' 88",001B:"Blinky",001C:"Red Shirt Rage",001D:"Crazy Canuck",001E:"Caddy Car",001F:"Pooka" cn Grand Prix Mode\Track Modifier 8113CF6A ???? 0000:"Ridge Racer Novice",0001:"Revolution Novice",0002:"Renegade Novice",0003:"Ridge Racer Intermediate",0004:"Revolution Intermediate",0005:"Renegade Intermediate",0006:"Ridge Racer Expert",0007:"Revolution Expert",0008:"Renegade Expert",0009:"Ridge Racer Extreme" cn Grand Prix Mode\Enlarge Cars 81119758 3FC0 811197AC 3FC0 81119800 3FC0 cn Grand Prix Mode\Shrink Cars 80119758 003E 801197AC 003E 80119800 003E cn Grand Prix Mode\Microscopic Cars 80119758 003D 801197AC 003D 80119800 003D cn Grand Prix Mode\2 Tier Cars 80119BB0 0039 cn Grand Prix Mode\Press GS For Overhead View 8811AB0F 0002 cn Grand Prix Mode\Unlock\All Engine Classes All Levels 50001E08 0000 8102FAB0 0004 50001E08 0000 8102FAB2 0403 cn Grand Prix Mode\Unlock\All Cars 8102F19C FFFF 8102F19E FFFF cn Grand Prix Mode\Unlock\All Tracks & Trophies 81043530 FFFF 81043532 FFFF cn Grand Prix Mode\Laps to Race 8111B32E ???? 0101:"lap",0202:"laps",0303:"laps",0404:"laps",0505:"laps",0606:"laps",0707:"laps",0808:"laps",0909:"laps" cn Grand Prix Mode\All Cars Have Perfect Stats 50008002 0000 8102F314 05DC crc 1FC21532-0B6466D4-C:45 gn Rugrats in Paris - The Movie (U) cn Red Tickets\Player 1 D00BE8C1 0000 8111F7F6 02F4 cn Gold Tickets\Player 1 D00BE8C1 0000 8111F7F8 02F4 cn Red Tickets\Player 2 D00BE8C1 0001 8111F7F6 02F4 cn Gold Tickets\Player 2 D00BE8C1 0001 8111F7F8 02F4 cn Red Tickets\Player 3 D00BE8C1 0002 8111F7F6 02F4 cn Gold Tickets\Player 3 D00BE8C1 0002 8111F7F8 02F4 cn Red Tickets\Player 4 D00BE8C1 0003 8111F7F6 02F4 cn Gold Tickets\Player 4 D00BE8C1 0003 8111F7F8 02F4 crc EDD6E031-68136013-C:45 gn Rush 2 - Extreme Racing USA (U) cn Always Place 1st 80112589 0000 cn Have\Extra Cars 50000902 0000 810C1DBC FFFF cn Have\Game Timer Off 800D9E88 0001 cn Have\Midway Track 800E7D19 0001 cn Have\Stunts All Tracks 8010C200 0001 cn Press R to Shrink Car D00D0193 0010 8010C43C 0001 cn Track Modifier 8010C3F0 ???? 0000:"Las Vegas",0001:"New York Downtown",0002:"Hawaii",0003:"New York Uptown",0004:"Alcatraz",0005:"Los Angeles",0006:"Seattle",0007:"Half Pipe",0008:"Crash",0009:"Pipe",000A:"Midway",000B:"Stunt" cn Best Points\In Stunt Mode\Player 1 8010C068 00FF cn Total Points\In Stunt Mode\Player 1 8010C075 00FF cn Best Points\In Stunt Mode\Player 2 8010C069 00FF cn Total Points\In Stunt Mode\Player 2 8010C077 00FF cn Car Select\Player 1 803CB362 ???? 0000:"Pickup",0001:"Compact",0002:"Muscle Car",0003:"Mobster",0004:"Sedan",0005:"Bandit",0006:"Coupe",0007:"Exotic",0008:"Van",0009:"Sportster",000A:"Subcompact",000B:"Concept",000C:"Stallion",000D:"Cruiser",000E:"Stallion",000F:"4x4",0010:"Taxi",0011:"Hot Rod",0012:"Formula",0013:"Prototype",0014:"Rocket",0015:"Mtn Dew" cn Car Select\Player 2 803CB363 ???? 0000:"Pickup",0001:"Compact",0002:"Muscle Car",0003:"Mobster",0004:"Sedan",0005:"Bandit",0006:"Coupe",0007:"Exotic",0008:"Van",0009:"Sportster",000A:"Subcompact",000B:"Concept",000C:"Stallion",000D:"Cruiser",000E:"Stallion",000F:"4x4",0010:"Taxi",0011:"Hot Rod",0012:"Formula",0013:"Prototype",0014:"Rocket",0015:"Mtn Dew" cn Press R For Nitrous Boost D00D0193 0010 810F58DC 44CB D00D0193 0010 810F5938 44CB cn Have\All Keys & Cans\Midway Track 810C1DD0 FFFF cn Have\All Keys & Cans\Stunt Track 810C1DD2 FFFF cn Front Pickup Tire Size\Player 1 800C0AC5 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Rear Pickup Tire Size\Player 1 800C0BCD ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Mt. Dew Front Tire Size\Player 1 800C0B19 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Mt. Dew Rear Tire Size\Player 1 800C0C21 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Rocket Front Tire Size\Player 1 800C0B15 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Rocket Rear Tire Size\Player 1 800C0C1D ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Prototype Front Tire Size\Player 1 800C0B11 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Prototype Rear Tire Size\Player 1 800C0C19 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Formula Front Tire Size\Player 1 800C0B0D ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Formula Rear Tire Size\Player 1 800C0C15 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Hot Rod Front Tire Size\Player 1 800C0B09 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Hot Rod Rear Tire Size\Player 1 800C0C11 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Cruiser Front Tire Size\Player 1 800C0AF9 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Cruiser Rear Tire Size\Player 1 800C0C01 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Van Front Tire Size\Player 1 800C0AE5 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Van Rear Tire Size\Player 1 800C0BED ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Pickup Front Tire Size\Player 2 800C0B1D ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Rear Tire Size\Player 2 800C0C25 ???? 0000:"Tiny",0001:"Medium",00FF:"Gigantic" cn Misc\Auto Abort Disable 8010C168 0001 cn Misc\Resurrect In Place 8010C210 0001 cn Misc\New York Cabs 800D9E89 0001 cn Misc\Car Collisions Off 8011249A 0001 cn Misc\Cone Mines On 8010C166 0001 cn Misc\Car Mines On 8010C167 0001 cn Misc\Super Speed 80111950 0001 cn Misc\Damage Off 8011CDB0 0001 cn Misc\Light Gravity 800E7D22 0000 cn Misc\Heavy Gravity 800E7D22 0002 cn Misc\Jovian Gravity 800E7D22 0003 cn Misc\Brakes Off 80125C64 0001 cn Misc\Heavy Mass 8010C179 0001 cn Misc\Massive Mass 8010C179 0002 cn Misc\Invincible 80119634 0001 cn Misc\Invisible Cars 8010C170 0001 cn Misc\Invisible Tracks 8010C178 0001 cn Misc\Large Frame 8010C43C 0003 cn Misc\Killer Rats On 8010C17C 0001 cn Misc\Inside-Out Car On 801174E0 0001 cn Misc\Upside Down Mode 800D0171 0001 cn Misc\Suicide Mode On 80119628 0001 cn Misc\Suicide Mode Humans On 80119628 0002 cn Misc\Levitation 8010C254 0001 cn Misc\Super Tires 8010D3A6 0002 cn Misc\Have All Cars In Pipe 810C1DCE FFFF cn Press GS Activate Cheat Menu 880C2132 0001 cn Misc\Your Car Is Invisible 801127A1 0001 cn Misc\Laps to Race 8010C0E3 ???? 0001:"1 Lap",0002:"2 Laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" cn Misc\Drones In Race 800D5761 ???? 0001:"1 Lap",0002:"2 Laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps" cn Misc\Difficulty Mod 8010C211 ???? 0000:"Very Easy",0001:"Easy",0002:"Medium",0003:"Hard",0004:"Very Hard",0005:"Extremely Hard" cn Unlock All Cheats 50000E02 0000 810C20E8 0101 cn Have All Keys Found\Las Vegas Normal 810C1DBC FFFF cn Have All Keys Found\New York-Downtown\Normal 810C1DBE FFFF cn Have All Keys Found\Hawaii\Normal 810C1DC0 FFFF cn Have All Keys Found\New York-Uptown\Normal 810C1DC2 FFFF cn Have All Keys Found\Alcatraz\Normal 810C1DC4 FFFF cn Have All Keys Found\Los Angeles\Normal 810C1DC6 FFFF cn Have All Keys Found\Seattle\Normal 810C1DC8 FFFF crc 769147F3-2033C10E-C:45 gn SCARS (U) cn Have All\Cars 50000402 0000 803DF94B 0001 cn Have All\Cups,Tracks & Challenges 50000302 0000 802CB4A9 0001 50000402 0000 803DD109 0001 cn Infinite Credits 80388C1D 0009 cn Max Score Points 8139AFB6 02F4 cn Game Speed 802C9339 ???? 0000:"Novice",0001:"Default",0002:"Advanced",0003:"Master" cn Always Have Equipped\Player 1 8039B144 ???? 8039B147 ???? 0000:"Turbo",0001:"Magnet",0003:"Stinger",0004:"Boomerang",0005:"Seeker",0006:"Stopper",0007:"Bullets",0008:"Shield" 8039B149 0009 cn Always Have Equipped\Player 2 8039B3E4 ???? 8039B3E7 ???? 0000:"Turbo",0001:"Magnet",0003:"Stinger",0004:"Boomerang",0005:"Seeker",0006:"Stopper",0007:"Bullets",0008:"Shield" 8039B3E9 0009 cn Always Have Equipped\Player 3 8039B684 ???? 8039B687 ???? 0000:"Turbo",0001:"Magnet",0003:"Stinger",0004:"Boomerang",0005:"Seeker",0006:"Stopper",0007:"Bullets",0008:"Shield" 8039B689 0009 cn Always Have Equipped\Player 4 8039B924 ???? 8039B927 ???? 0000:"Turbo",0001:"Magnet",0003:"Stinger",0004:"Boomerang",0005:"Seeker",0006:"Stopper",0007:"Bullets",0008:"Shield" 8039B929 0009 crc 2A6B1820-6ABCF466-C:45 gn San Francisco Rush - Extreme Racing (U) cn Activate\Stop Timer 800F4090 0001 cn Activate\Auto Abort Disable 800F4078 0001 cn Activate\Cones to Mines 800F3F88 0001 cn Activate\Disable Car 2 Car Control 800F4050 0001 cn Activate\Resurrect in Place 800F4080 0001 cn Activate\Upside Down Mode 800F4061 0001 cn Car D00F40A5 0020 800D9EC1 ???? 800D9F64 ???? 800DA078 ???? 800DA321 ???? 0008:"Taxi",0009:"Hot Rod",000A:"F1 Car" cn Edge Boost cd by pressing R you will get a small speed boost that pushes you ahead. D00F40A5 0010 81101331 FFFF cn Car Type cd It gets you from 0-150 in the the time it takes the F1 racer to. Don't use the F1 racer and only hold until you reach 150 or the game will freeze. 800F40B1 ???? 0000:"Normal Car",0001:"Flat Car",0002:"Fat Car",0003:"Giant Car",000A:"Invisible Car",0044:"Super-Tiny Car #2",0066:"Paper-Thin Cars",006E:"Screen-Talled Cars",00BB:"Super-Sky Car",00CD:"Invisible Car (Can See Wheels)",00DD:"Super-Sky Car #2",00FF:"Super-Tiny Car" cn Press GS For Track Select cd With this code, press GS when on the track selction screen and press A to select that track! 88100050 ???? 0000:"Track 1",0001:"Track 2",0002:"Track 3",0003:"Track 4",0004:"Track 5",0005:"Track 6",0006:"Track 7" cn Gravity 800F3D91 ???? 0000:"A Balloon & 2 Weights",0001:"Normal",0002:"1 Weight",0003:"2 Weights" cn Always Place 1st 80101339 0000 cn Have Two Special Cars cd You receive the Hotrod and Taxi with this code, but you may have to go through the cars from the "Beginning" past the "Extreme" for them to appear. 810CAC82 FFFF 810CAC98 FFFF 810CACAE FFFF 810CACC4 FFFF 810CACDA FFFF 810CACF0 FFFF crc B9A9ECA2-17AAE48E-C:45 gn San Francisco Rush 2049 (U) cn Unlock All Cheats 50000B02 0000 8111648C 0101 cn Speed Activator D0037AA4 0020 8114A298 ???? 4333:"146 mph",4350:"170 mph",4380:"210 mph",4393:"270 mph" cn Always Place 1st 80152906 0000 cn Start On Lap Modifier D014AA38 0000 8014AA38 ???? cn Track Modifier 8014978C ???? 0000:"Track 1",0001:"Track 2",0002:"Track 3",0003:"Track 4" cn Max Score\Stunt Mode 8115204E 7FFF cn Infinate Ammo\All Players In Battle 80152B9D 0050 80152F55 0050 8015330D 0050 801536C5 0050 cn Have All\Gold & Silver Coins\Track 1 8113A110 FFFF cn Have All\Gold & Silver Coins\Track 3 8113A1D0 FFFF cn Have All\Gold & Silver Coins\Track 4 8113A230 FFFF cn Have All\Gold & Silver Coins\Track 5 8113A290 FFFF cn Have All\Gold & Silver Coins\Track 6 8113A2F0 FFFF crc 0C814EC4-58FE5CA8-C:45 gn Scooby-Doo - Classic Creep Capers (U) cn Infinite Health 81086BCA 0038 800BAF97 0007 crc 036897CE-E0D4FA54-C:45 gn ShadowGate 64 - Trials of the Four Towers (U) cn Item Modifier Codes\Position 01 800EC350 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 02 800EC351 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 03 800EC352 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 04 800EC353 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 05 800EC354 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 06 800EC355 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 07 800EC356 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 08 800EC357 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 09 800EC358 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 10 800EC359 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 11 800EC35A ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 12 800EC35B ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 13 800EC35C ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 14 800EC35D ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 15 800EC35E ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 16 800EC35F ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 17 800EC360 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 18 800EC361 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 19 800EC362 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 20 800EC363 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 21 800EC364 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 22 800EC365 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 23 800EC366 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 24 800EC367 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 25 800EC368 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 26 800EC369 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 27 800EC36A ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 28 800EC36B ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 29 800EC36C ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 30 800EC36D ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 31 800EC36E ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 32 800EC36F ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 33 800EC370 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 34 800EC371 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 35 800EC372 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 36 800EC373 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 37 800EC374 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 38 800EC375 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 39 800EC376 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 40 800EC377 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 41 800EC378 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 42 800EC379 ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 43 800EC37A ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 44 800EC37B ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 45 800EC37C ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 46 800EC37D ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 47 800EC37E ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn Item Modifier Codes\Position 48 800EC37F ???? 0001:"Crest Key",0002:"Bottle of Oil",0003:"Fragments of A Crest",0004:"Dragon Tears",0005:"Pixie Flute",0006:"Treasure",0007:"Rusty Key",0008:"Ornate Key",0009:"The Ring of The Kingdom",000A:"Orb",000B:"Golden Key",000C:"Liquid Sunset",000D:"Night Elixir",000E:"Forest Nectar",000F:"Primitive Man Statue",0010:"Apeman Sculpture",0011:"Fairy Sculpture",0012:"Elf Statue",0013:"Ancient Coin",0014:"Pick Axe",0015:"The Ring of The Dead",0016:"The Blue Ring",0017:"The Green Ring",0018:"Lever",0019:"Slipper",001A:"Dirty Slipper",001B:"Pair of Slippers",001C:"Jezibel's Pendant",001D:"The Staff of Ages",001E:"Rope",001F:"Cemetery Key",0020:"Flower",0021:"Flint",0022:"Fang",0023:"Dragon Eye",0024:"Dragon Flute",0025:"Burning Candle",0026:"Chipped Violin",0027:"String-Less Violin",0028:"Broken Violin",0029:"Dungeon Key",002A:"Map",002B:"Bone",002C:"Starcrest",002D:"Iron Bar",002E:"Crow Bar",002F:"Hair of Giant",0030:"Mug",0031:"Water",0032:"Water W/Dragon Tears",0033:"Stone of Thirst",0034:"Coin",0035:"Coin",0036:"Coin",0037:"Coin",0038:"Coin",0039:"Nail",003A:"Brooch",003B:"Jewelry Box",003C:"Fruit",003D:"Gauntlet",003E:"Cup",003F:"Artwork",0040:"Poisonous Herb",0041:"Bracelet",0042:"Precious Stone",0043:"Broken Sword",0044:"Quill",0045:"Plate",0046:"Broken Lance" cn All Items 50002402 0202 810EC350 0001 50004601 0000 800EC3D1 0003 crc 3A4760B5-2D74D410-C:45 gn Shadowman (U) cn Infinite\Air 81075B1C 0000 81075B1E 2710 cn Infinite\Health 81075B18 0000 81075B1A 2710 81075B14 0000 81075B16 2710 cn All Cheats Book of Shadows 81030690 0004 81030692 030B cn Max Shadow Charge & Level 81075B20 0000 81075B22 2710 81075B24 0000 81075B26 2710 cn Max Dark Souls Collected 81075F48 0078 cn Health Meter Displayed On Screen 81075B10 0000 81075B12 00FF cn Have All\Items 81030630 0000 81030632 100B 81030650 0016 81030652 130B 81030670 0018 81030672 150B 81030690 0004 81030692 030B 810306B0 001D 810306B2 180B 810306D0 0001 810306D2 000B 810306F0 000A 810306F2 080B 81030710 0002 81030712 010B 81030730 000C 81030732 0E0B 81030750 000E 81030752 0A0B 81030770 0009 81030772 070B 81030790 000B 81030792 090B 810307B0 0007 810307B2 060B 810307D0 001A 810307D2 160B 810307F0 0015 810307F2 120B 81030810 001E 81030812 190B 810308B0 0017 810308B2 140B 81030830 0012 81030832 0F0B 81030850 0003 81030852 020B 81030870 000D 81030872 0B0B 810308F0 0006 810308F2 050B 81030950 0014 81030952 110B 810309D0 0005 810309D2 040B 80030E57 000F cn Have All\Ammo 81075B28 0000 81075B2A 2710 81075B2E 0063 81075B36 03E7 81075B32 03E7 81075B3A 03E7 810306D6 7FFF 81030736 7FFF 810307D6 7FFF 81030816 7FFF 81030876 7FFF 81030816 7FFF 810306D6 FFFF 81030736 FFFF 810307D6 FFFF 81030816 FFFF 81030876 FFFF 81030816 FFFF cn Have All\Warp Levals 800309F2 0001 80030A0E 0001 80030A2A 0001 80030A46 0001 80030A62 0001 80030A7E 0001 80030A9A 0001 80030AB6 0001 80030AD2 0001 80030AEE 0001 80030B0A 0001 80030B26 0001 80030B42 0001 80030B5E 0001 80030B7A 0001 80030B96 0001 80030BB2 0001 cn Always Play As Deadwing Character 80075F52 0001 cn Have L-Eclipser\La Lune cd If you put all Three of these Options on together, you skip straight to being Shadow Man. 80030971 0010 80030973 0D0B cn Have L-Eclipser\La Soleil cd If you put all Three of these Options on together, you skip straight to being Shadow Man. 80030991 001C 80030993 170B cn Have L-Eclipser\La Lame cd If you put all Three of these Options on together, you skip straight to being Shadow Man. 800309B1 0011 800309B3 0C0B crc DBF4EA9D-333E82C0-C:45 gn Snowboard Kids (U) cn Infinite\Tools Options 80122295 ???? 0001:"Fan",0002:"Ghost",0003:"Pan",0004:"Rock",0005:"Mouse",0006:"Board" cn Infinite\Lucky Dip cd "Lucky Dip is Infinite Usage Of What Ever You Get From Each Red Box" 80122294 0003 cn 999 Trick Game Pts 81122040 03E7 cn 1 Lap Race D0122288 0000 80122288 0009 cn Infinite\Cash 801222EA C350 cn Enable Sinobin 8110AE5E 0100 cn Access Gold Medals 50000602 0000 810ECA22 0101 crc 930C29EA-939245BF-C:45 gn Snowboard Kids 2 (U) cn All Gold Medals 50000502 0000 81259130 0101 cn Max Coins 8125A5BE 270F 8025A5BF 00C8 cn Infinite\Trick Game 300 Points 8125A7F2 012C cn Infinite\Tools Options 8025A624 ???? 0001:"Frying Pan",0002:"Ghost",0003:"Super Ghost",0004:"Fan",0005:"Rocket",0006:"Invisible",0007:"Rock",0008:"Rat Face",0009:"Super Rat Face",000A:"Wings" cn Infinite\Weapons Options 8025A622 ???? 0001:"Slap Stick",0002:"Parachute",0003:"Freeze Shot",0004:"Snowman",0005:"Bomb",0006:"Whirlwind" 8025A623 0009 cn Open Extra Characters & Snowboards cd Battle Mode Only 8125916E 0101 80259170 0001 8025915C 0001 8125915E 0101 81259160 0101 crc 7ECBE939-3C331795-C:45 gn South Park (U) cn Have all Cheats cd Go into the Cheats From the main Menu & put on the Ones you want 810CD226 01FF crc C00CA948-8E60D34B-C:45 gn South Park - Chef's Luv Shack (U) cn Max Or No Score\Player 1 81104772 ???? FFFF:"Max Score",0000:"No Score" cn Max Or No Score\Player 2 81104776 ???? FFFF:"Max Score",0000:"No Score" cn Max Or No Score\Player 3 8110477A ???? FFFF:"Max Score",0000:"No Score" cn Max Or No Score\Player 4 8110477E ???? FFFF:"Max Score",0000:"No Score" crc 07F3B276-EC8F3D39-C:45 gn South Park Rally (U) cn Unlock All Characters & Extra Cheats 81088750 FFFF 81088752 FFFF cn Have All\Races 81088756 FFFF cn Have All\Tracks 8108875A FFFF cn Infinite Credits 8008D659 0063 crc BFE23884-EF48EAAF-C:45 gn Silicon Valley (U) cn Infinite\Ability\Sheep 811DE9A0 0400 cn Infinite\Ability\Mouse 811DFCC8 0400 cn Infinite\Boost\Mouse 811DFCC4 0400 cn Infinite\Ability\Penguin 811E009C 0400 cn Infinite\Ability\Husky 811DED78 0400 cn Infinite\Ability\Rabbit 811DE5D0 0400 cn Infinite\Ability\Heli-Rabbit 811DF14C 0400 cn Infinite\Boost\Walrus 811DED74 0400 cn Infinite\Ability\Walrus 811DE5D0 0400 cn Infinite\Ability\Racing Dog 811DF14C 0400 cn Infinite\Boost\Racing Dog 811DF148 0400 cn Infinite\Ability\Ram 811DE5D0 0400 cn Infinite\Ability\Racing Fox 811DF8F4 0082 cn Infinite\Boost\Racing Fox 811DF8F0 0400 cn Infinite\Ability\Springy Thing 811DF14C 0400 cn Infinite\Ability\Fox 811DF8F4 0400 cn Infinite\Boost\Fox 811DF8F0 0400 cn Infinite\Energy\EVO (Chip) 801DE065 0082 cn Infinite\Energy\Evo\in Bonus Level 1 & Final Level 801DE439 0082 cn Infinite\Energy\Evo\In Bonus Level 4 801DEFB5 0082 cn Infinite Health\Ship\in Asteroids Level 803E4CDB 0003 cn Infinite\Energy\Mouse,Hyena 801DFB31 0082 cn Infinite\Energy\Snow Husky 811DFF04 0082 cn Infinite\Energy\Normal Rabbit 811DE438 0082 cn Infinite\Energy\Heli-Rabbit 811DEFB4 0082 cn Infinite\Energy\Sheep 811DEBE0 0082 cn Infinite\Energy\Normal Penguin 811DFF04 0082 cn Infinite\Energy\Dog 811DFF04 0082 cn Infinite\Energy\Racing Dog 811DEFB4 0082 cn Infinite\Energy\Ram 811DE438 0082 cn Infinite\Energy\Racing Fox 811DF7FC 0082 cn Infinite\Energy\Springy Thing 811DEFB4 0082 cn Infinite\Energy\Fox 811DF75C 0082 cn Have All\Secret Mini Game 803F643D 0001 cn Always\Raining 803F2D6F 0005 cn Always\Snowing 803F2D6D 0005 cn Have All\Power Cells 803F2D3D 000F cn Debug Mode 803F642F 0001 cn All Levels Open 50002001 0000 803F7DE0 0001 cn High Score 813F2D30 007F 813F2D32 FFFF crc EBFE2397-FF74DA34-C:45 gn Space Invaders (U) cn Infinite\Lives 800B51DD 0063 cn Infinite\Points 810B51E2 FFFF cn Always Have\Vertical Burst 810B51DE 0104 cn Always Have\Horizontal Right 810B51DE 0204 cn Always Have\Horizontal Left 810B51DE 0304 cn Always Have\Diagonal Burst 810B51DE 0404 cn Infinite\Shield 810B51B6 0001 crc A60ED171-3D85D06E-C:45 gn Spider-Man (U) cn Unlocked\All Costumes 810ECD7E FFFF cn Unlocked\All Levels 810ECD74 0105 810ECDB0 FFFF cn Have All Characters In Viewer 810ECD80 FFFF 810ECD82 FFFF cn Infinite\Health 800F5F26 0001 cn Infinite\Webbing 800F5F53 0001 crc 0684FBFB-5D3EA8A5-C:45 gn StarCraft 64 (U) cn Infinite\& Max Minerals 50000C04 0000 810B1D46 FFFF 50000C04 0000 810B1D44 3B9A 50000C04 0000 810B1D46 C9FF cn Infinite\& Max Vespene Gas 50000C04 0000 810B1D76 FFFF 50000D04 0000 810B1D74 3B9A 50000D04 0000 810B1D76 C9FF cn All levels complete 800D13C4 000C 800D13C5 000A 800D13C6 000A 800D13C7 000A 800D13C8 000A 800D13C9 000A crc A7D015F8-2289AA43-C:45 gn Star Fox 64 (U) cn Unlimited\Boost 81137C9C 0000 81137C9E 0000 8113AB7C 0000 8113AB7E 0000 cn Have All Medals cd For Expert & Normal Modes 50000802 0000 8116E6E0 7777 cn Infinite\Hyper Laser 8015791B 0002 cn Loads O' Hits 8015790B 00FF cn Infinite\Armor\Slippy 8016D72B 00FF cn Infinite\Energy 8013AB27 00FF 80137C47 00FF cn Infinite\Lives 80157911 0009 cn Unlimited\Smart Bombs 8016DC13 0004 cn Infinite\Armor\Falco 8016D727 00FF cn Infinite\Armor\Peppy 8016D72F 00FF cn Infinite\Dual Blue Lasers 8015791B 0002 cn Level Select D016E0A7 0000 8016E0A7 ???? 0000:"Corneria",0001:"Meteo",0002:"Sector X",0003:"Area 6",0004:"Glitch",0005:"Sector Y",0006:"Venom 1",0007:"Solar",0008:"Zoness",0009:"Venom 2",000A:"Training Mode Level",000B:"Macbeth",000C:"Titania",000D:"Aquas",000E:"Fortuna",0010:"Katina",0011:"Bolse",0012:"Sector Z",0013:"Venom With Starwolf",0014:"Corneria (Multi)" crc BA780BA0-0F21DB34-C:45 gn Star Fox 64 (U) (V1.1) cn Unlimited\Boost 8113C68C 0000 8113C68E 0000 8113F56C 0000 8113F56E 0000 cn Have All Medals cd For Expert & Normal Modes 50000802 0000 81178870 7777 cn Infinite\Dual Blue Lasers 80161AAB 0002 cn Loads O' Hits 80161A9B 00FF cn Infinite\Armor\Slippy 801778BB 00FF cn Infinite\Energy\Player 1 cd For Solo & Multi Player 8013C637 00FF 8013F517 00FF cn Infinite\Lives 80161AA1 0009 cn Unlimited\Smart Bombs 80177DA3 0004 cn Infinite\Armor\Falco 801778B7 00FF cn Infinite\Armor\Peppy 801778BF 00FF cn Level Select 80178237 ???? 0000:"Corneria",0001:"Meteo",0002:"Sector X",0003:"Area 6",0004:"Glitch",0005:"Sector Y",0006:"Venom 1",0007:"Solar",0008:"Zoness",0009:"Venom 2",000A:"Training Mode Level",000B:"Macbeth",000C:"Titania",000D:"Aquas",000E:"Fortuna",0010:"Katina",0011:"Bolse",0012:"Sector Z",0013:"Venom With Starwolf",0014:"Corneria (Multi)" cn Infinite Health\Player 2 8013CB17 00FF 8013F9F7 00FF cn Infinite Health\Player 3 8013CFF7 00FF 8013FED7 00FF cn Infinite Health\Player 4 8013D4D7 00FF 801403B7 00FF cn Infinite Smart Bombs\Player 2 80177DA7 0004 cn Infinite Smart Bombs\Player 3 80177DAB 0004 cn Infinite Smart Bombs\Player 4 80177DAF 0004 cn Infinite Dual Blue Lasers\Player 2 80161AAF 0002 cn Infinite Dual Blue Lasers\Player 3 80161AB3 0002 cn Infinite Dual Blue Lasers\Player 4 80161AB7 0002 cn Infinite Boost\Player 2 8113CB6C 0000 8113CB6E 0000 8113FA4C 0000 8113FA4E 0000 cn Infinite Boost\Player 3 8113D04C 0000 8113D04E 0000 8113FF2C 0000 8113FF2E 0000 cn Infinite Boost\Player 4 8113D52C 0000 8113D52E 0000 8114040C 0000 8114040E 0000 crc DDD93C85-DAE381E8-C:45 gn Star Soldier: Vanishing Earth (U) cn Infinite\Lives 800A3648 0003 cn Infinite\Specials 800A3649 0003 cn Extra Armor 800A362F 0001 cn Play As 800A364C ???? 0000:"Character 1",0001:"Character 2",0002:"Character 3" cn Max\Score 810A3624 03E7 cn Max\Upper Level 800A3659 0063 cn Max\Lower Level 800A3658 0003 cn Max\Combo 810A3644 7FFF cn Status Modifier 800A364A ???? 0001:"High",0002:"Mid",0003:"Low" crc 72F70398-6556A98B-C:45 gn Star Wars EP1 Pod Racer (U) cn No Damage cd If when Racing Your Pod Over heats & bursts into flames Press "R" & you will Repair the Damage. 800A52D7 0001 cn Infinite Truguts 81113E7A FFFF 81113E78 7FFF cn Always 1st 81118FEC 0001 cn Enable In-Game cheat Menu & Cheats cd Here you can Activate the IN-Built Cheats Menu. At the Front Screen Just Press C-Button Right.This will open up All Tracks & Characters In Free Play & Time Attack. Also In A Race, Press The Start/Pause button to Access the In-Cheat-Menu Option.You can also choose how many Pod's Racers are in the Race & also how many Laps are in the Race in Free Play & Time Attack 8009B7D7 0001 8109B7DA FFFF cn Unlock All Tracks & Characters cd When using Unlock All Tracks & Characters For can to pick & choose what ever you want to play As & where ;) 80113E68 00FF 80113E69 00FF 80113E6A 00FF 80113E6B 00FF 81113E68 FFFF 81113E6A FFFF 80113E74 007D 81113E76 FFFF cn Have All Tracks Completed 81113E6A FFFF 81113E6C 3FFF 81113E6E 3FFF 81113E70 3FFF 81113E72 00FF crc 264D7E5C-18874622-C:45 gn Star Wars - Shadows of the Empire (U) (V1.0) cn All Levels\Infinite\Lives 800E05CB 0064 cn All Levels\Infinite\Missiles 800E1265 00FF cn All Stages\Invincible 8107A770 2400 cn All Stages\Infinite Health 81072D0C 2400 cn All Stages\Lasers Never Overheat 81073948 2400 cn All Stages\Upper Lasers cd Don't Use With Never Overheat Code 81073944 3C06 81073946 4EFF cn All Stages\Infinite\Pulse Ammo 81074204 2400 cn All Stages\Infinite\Flame Ammo 81073720 2400 cn All Stages\Infinite\Seeker Ammo 81073A94 2400 cn All Stages\Infinite\Stunner Ammo 81073BD4 2400 cn All Stages\Infinite\Disruptor Ammo 81073F04 2400 cn All Stages\Infinite\Jet Pack 81076AAC 2400 81076C58 2400 81076B48 2400 cn All Levels\Time Always 0:00:02 810E04E8 4000 cn All Levels\No Clipping\Off 81111E67 0001 cn All Levels\No Clipping\On 81111E67 0000 cn All Levels\Visibililty\Maximum 800BA62B FFFF cn All Levels\Visibililty\Minimum 800BA66B FFFF cn All Levels\Large Mutant Enemies 800BB62B FFFF cn All Levels\Dash Becomes Shorter & Wider 800BA025 FFFF cn All Levels\See Through\Some Walls 800BC625 FFFF cn All Levels\See Through\Everything Except Specific Things 800BC665 FFFF cn Press GS For Pink Cheat Debug Screen 890D017F 0001 crc 4147B091-63251060-C:45 gn Star Wars - Shadows of the Empire (U) (V1.1) cn Press GS For Pink Cheat Debug Screen 890D01BF 0001 crc 635A2BFF-8B022326-C:45 gn SUPER MARIO 64 cn Press GS For 255 Coins 8933B218 00FF cn Have\Level Select A032D58C 0001 cn Don't Hurt Mario\Monsters A033B197 0001 cn Infinite\Lives 8033B21D 0064 cn Infinite\Energy & Breath 8033B21E 0008 cn Have\Debug Mode A032D598 ???? 0001:"On",0000:"Off" cn Mario's Cap\Off Options cd Here you can Choose Options with Mario without His Cap on,Do not use with any other Mario with/without Options,Use only one at a time 8033B177 ???? 0001:"Mario No Cap",0002:"Invisible Mario",0004:"Metal Mario",0008:"Flying Mario",000A:"Invisible Flying Mario",000D:"Metal Flying Mario",000F:"Invisible Metal Flying Mario" cn Mario's Cap\On Options cd Here you can Choose Options with Mario with His Cap on,Do not use with any other Mario with/without Options,Use only one at a time 8033B177 ???? 0012:"Invisible Mario",0015:"Metal Mario",0016:"Invisible Metal Mario",0019:"Flying Mario" cn Funny Mario Options\Mario's Cap\Off & in His Hand cd Here you can Choose Options with Mario with His Cap off & in His Hand,Do not use with any other Mario with/without Options,Use only one at a time 8033B177 ???? 0020:"Cap In Hand",0022:"Invisible Mario Cap In Hand",0024:"Metal Mario Cap In Hand",0026:"Invisible Metal Mario Cap In Hand",0028:"Flying Mario Cap In Hand" cn Funny Mario Options\Mario's Cap\On & An Extra in His Hand cd Here you can Choose Options with Mario with His Cap on & An Extra in His Hand,Do not use with any other Mario with/without Options,Use only one at a time 8033B177 ???? 0030:"Cap In Hand",0032:"Invisible Mario Cap In Hand",0034:"Metal Mario Cap In Hand",0036:"Invisible Metal Mario Cap In Hand",0038:"Flying Mario Cap In Hand" cn Don't Hurt Mario\Falling 8033B22C 00E8 8133B178 FFFF cn Press L To Levitate cd Press L to levitate & Let go to land D033AFA1 0020 8133B1BC 4220 D033AFA1 0020 8133B17C 0300 D033AFA1 0020 8133B17E 0880 cn [Slot A Codes]\Have All 120 Stars cd Have 120 Stars,once the Code is activated, you will see it as a new option in Save Slot A.This will have the Cannon open already to get upto Yoshi on the Roof. but make sure to save the game after collecting Red Coins and turn this code off before saving. you will now have it all saved to mempak 80207723 0001 8020770B 00C7 50001101 0000 8020770C 00FF cn [Slot A Codes]\Have all key doors unlocked (and mote empty) 8020770A 007E cn [Slot A Codes]\Have All Max 100 Coin Records For All Levels 50000F01 0000 80207725 0064 cn [Slot B Codes]\Have All 120 Stars cd Have 120 Stars,once the Code is activated, you will see it as a new option in Save Slot A.This will have the Cannon open already to get upto Yoshi on the Roof. but make sure to save the game after collecting Red Coins and turn this code off before saving. you will now have it all saved to mempak 80207793 0001 8020777B 00C7 50001101 0000 8020777C 00FF cn [Slot B Codes]\Have all key doors unlocked (and mote empty) 8020777A 007E cn [Slot B Codes]\Have All Max 100 Coin Records For All Levels 50000F01 0000 80207795 0064 cn [Slot C Codes]\Have All 120 Stars cd Have 120 Stars,once the Code is activated, you will see it as a new option in Save Slot A.This will have the Cannon open already to get upto Yoshi on the Roof. but make sure to save the game after collecting Red Coins and turn this code off before saving. you will now have it all saved to mempak 80207803 0001 802077EB 00C7 50001101 0000 802077EC 00FF cn [Slot C Codes]\Have all key doors unlocked (and mote empty) 802077EA 007E cn [Slot C Codes]\Have All Max 100 Coin Records For All Levels 50000F01 0000 80207805 0064 cn [Slot D Codes]\Have All 120 Stars cd Have 120 Stars,once the Code is activated, you will see it as a new option in Save Slot A.This will have the Cannon open already to get upto Yoshi on the Roof. but make sure to save the game after collecting Red Coins and turn this code off before saving. you will now have it all saved to mempak 80207873 0001 8020785B 00C7 50001101 0000 8020785C 00FF cn [Slot D Codes]\Have all key doors unlocked (and mote empty) 8020785A 007E cn [Slot D Codes]\Have All Max 100 Coin Records For All Levels 50000F01 0000 80207875 0064 cn Level Select cd Select a Level. Jump Into a Painting. Press A at the Stars Collected Screen. As Stats are fading hold L, and you'll jump to the level you've selected. D033AFA1 0020 A032DDF9 ???? 0001:"Intro",0004:"Big Boo's Haunt",0005:"Cool Cool Mountain",0006:"Mushroom Castle",0007:"Hazy Maze Cave",0008:"Shifting Sand Land",0009:"Bob omb Battlefield",000A:"Snowman's Land",000B:"Wet Dry World",000C:"Jolly Roger Bay",000D:"Tiny Huge World",000E:"Tick tock Clock",000F:"Rainbow Ride",0010:"Mushroom Castle Field",0011:"Bowser In The Dark World",0012:"Vanish Cap Under The Moat",0013:"Bowser In The Fire Sea",0014:"The Secret Aquarium",0015:"Bowser In The Sky",0016:"Lethal Lava Land",0017:"Dire Dire Docks",0018:"Whomp's Fortress",0019:"The End",001A:"Castle Courtyard",001B:"The Princess's Secret Slide",001C:"Cavern Of The Metal Cap",001D:"Tower Of The Wing Cap",001E:"Bowser In The Dark World Boss",001F:"Wing Mario Over The Rainbow",0021:"Bowser In The Fire Sea Boss",0022:"Bowser In The Sky Boss",0024:"Tall Tall Mountain" cn Have\Turbo Running Speed 8033B1C3 00FF crc 916B8B5B-780B85A4-C:45 gn SMASH BROTHERS cn Give Kirby A Wierd Blow-Up 8025E158 000A cn Story Mode\Skip Straight To Master Hand 800A4AE7 000D cn Story Mode\Infinite Time 810A4B2E 43CB cn Story Mode\Player 1\Infinite Lives 800A4B43 0004 cn Story Mode\Player 2\Infinite Lives 800A4BB7 0004 cn Story Mode\Player 3\Infinite Lives 800A4C2B 0004 cn Story Mode\Player 4\Infinite Lives 800A4C9F 0004 cn Story Mode\Player 1\Low % Health 810A4B86 0000 cn Story Mode\Player 2\Low % Health 810A4BFA 0000 cn Story Mode\Player 3\Low % Health 810A4C6E 0000 cn Story Mode\Player 4\Low % Health 810A4CE2 0000 cn Story Mode\Player 1\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code could also result freezing at the end of the Level. 800A4B3B ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 2\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A4BAF ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 3\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A4C23 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 4\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A4C97 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 1\Kirby B Button Move\Hyrule Castle 80268B0F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Yoshi's Island 80268E4F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Sector Z 802710F7 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Peach's Castle 80263D9F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Saffron City 80273A97 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Congo Jungle 80270ACF ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Kirby's Dreamland 8026DB3F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Planet Zebes 8026FFA7 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Metal Mario Stage 80263597 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Fighting Polygon Team 8026271F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Master Hand Stage 80271C4F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn VS. Mode\Infinite Time 810A4D1E 43CB cn VS. Mode\Player 1\Low % Health 810A4D76 0000 cn VS. Mode\Player 2\Low % Health 810A4DEA 0000 cn VS. Mode\Player 3\Low % Health 810A4E5E 0000 cn VS. Mode\Player 4\Low % Health 810A4ED2 0000 cn VS. Mode\Player 1\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A4D2B ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 2\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A4D9F ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 3\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A4E13 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 4\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A4E87 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 1\Kirby B Button Move\Hyrule Castle 802639EF ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn VS. Mode\Player 1\Kirby B Button Move\Yoshi's Island 8026E2B7 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn VS. Mode\Player 1\Kirby B Button Move\Sector Z 8026BF87 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn P1 Press Down On D-Pad To Make Items Appear In Random Spots D109EFA4 0400 8118D0A2 0001 cn Have All Characters 810A4938 0FF0 cn VS. Mode\Have Mushroom Kindom 800A4937 00FF cn Story Mode\Always Get Pacifist (60,000 Points) 810A4B6E 0000 cn Bonus Stage Character Modifier (Training Mode) cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 8018F1D3 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Enable Item Switch Menu (All Modes) cd Go into Vs Mode & then Vs Options & then Press Up On the D-Pad Or Analogue Stick & then click the A Button to enter the Item Switch Menu. This Cheat Works For All Modes 811348E2 0004 cn Story Mode\Player 1\Stage Select D1045188 0010 800A4AE7 ???? 0000:"Stage 1 (Vs Link)",0001:"Stage 2 (Vs Yoshi Team vs 18)",0002:"Stage 3 (Vs Fox McCloud)",0003:"Bonus Stage 1",0004:"Stage 4 (Freezes?)",0005:"Stage 5 (Vs Pikachu)",0006:"Stage 6 (Freezes?)",0007:"Bonus Stage 2",0008:"Stage 7 (Vs Kirby Team vs8)",0009:"Stage 8 (Vs Samus Aran)",000A:"Stage 9 (Vs Metal Mario)",000B:"Bonus Stage 3 (Race To The Finish)",000C:"Stage 10 (Fighting Polygon Team vs30)",000D:"Final Stage (Vs Master Hand)" crc A2E8F35B-C9DC87D9-C:45 gn Superman (U) cn Fly Through 1st & Last Ring Only To Complete Challenge 801442E9 0063 cn Infinite Freezing Breath 8122CDE8 42C8 cn Infinite Health 8122CDD4 42C8 cn Infinite Laser Eye 8122CDE4 42C8 cn Infinite Running Boosts 8122CDDC 42C8 cn Infinite X-Ray Vision 8122CDE0 42C8 crc 3C1FDABE-02A4E0BA-C:45 gn Tetrisphere (U) cn Single & VS Mode\Infinite Misses\Player 1 80112F9F 0003 cn Single & VS Mode\Infinite Misses\Player 2 80116207 0003 cn Single & VS Modes\Secret Cheat Menu 8011265F 00AD cn Single Player Stage Select 810E12DC 0001 crc 63E7391C-E6CCEA33-C:45 gn Tom and Jerry in Fists of Furry (U) cn Unlock All Characters cd This Gives you all Characters to choose from plus fixes A freeze on the Charecter Select Menu by having it on 810E44F2 00FF cn Open All Versus Arenas 810E44F4 03FF cn Infinite Health\Player 1 810E279C 42C8 cn One Hit To Kill\Player 1 810E2A74 3F80 cn One Hit To Kill\Player 2 810E2D4C 3F80 cn Always Have Weapon Options\Player 1 810E2994 ???? 0079:"Anvil",0003:"Club",0004:"Bird bath",0008:"Broom",0009:"NCube knife",000A:"NCube missiles",000B:"Chair",000C:"Champagne",000E:"Chicken",000F:"Crate",0014:"Deck chair",0016:"Egg",001A:"Fish",001D:"Gardeners Fork",001E:"Frying Pan",001F:"Wooden Chair",0029:"Bouy",002A:"Mallet",002B:"Watermelon",002D:"Milk Bottle",0039:"Plank",0041:"Rolling Pin",0046:"Spade",0047:"Stool",0048:"Tennis Racket",004E:"Spanner",0055:"Stick",0063:"Blue Swordfish",0064:"Saucepan",0065:"Wooden Spoon",006B:"Stool",006D:"Bee hive",0078:"Mooses head" cn Always Have Weapon Options\Player 2 810E2C6C ???? 0079:"Anvil",0003:"Club",0004:"Bird bath",0008:"Broom",0009:"NCube knife",000A:"NCube missiles",000B:"Chair",000C:"Champagne",000E:"Chicken",000F:"Crate",0014:"Deck chair",0016:"Egg",001A:"Fish",001D:"Gardeners Fork",001E:"Frying Pan",001F:"Wooden Chair",0029:"Bouy",002A:"Mallet",002B:"Watermelon",002D:"Milk Bottle",0039:"Plank",0041:"Rolling Pin",0046:"Spade",0047:"Stool",0048:"Tennis Racket",004E:"Spanner",0055:"Stick",0063:"Blue Swordfish",0064:"Saucepan",0065:"Wooden Spoon",006B:"Stool",006D:"Bee hive",0078:"Mooses head" cn Infinite Health\Player 2 810E2A74 42C8 cn Infinite Time 810FED4C 42F0 crc 392A0C42-B790E77D-C:45 gn RAINBOW SIX cn All Missions Unlocked 810C1F10 000B cn Infinite Health 8105518A 2400 cn Infinite Ammo 8103A180 2400 crc 204EC022-B119D185-C:45 gn Tony Hawk's Pro Skater (U) cn Officer Dick\Have All\Tapes 50000901 0000 800DDE08 00FF cn Officer Dick\Have All\Gold Medal\Burnside 800DDE0E 00FF cn Officer Dick\Have All\Gold Medal\Skate Park 800DDE0B 00FF cn Officer Dick\Have All\Gold Medal\Roswell 800DDE10 00FF cn Tony Hawk\Have All\Tapes 50000901 0000 800DDD40 00FF cn Player 1\Super Max\Balance 800D561F FFFF cn Tony Hawk\Have All\Gold Medal\Skate Park Chicago 800DDD43 00FF cn Tony Hawk\Have All\Gold Medal\Roswell 800DDD48 00FF cn Bob Burnquist\Have All\Tapes 50000901 0000 800DDD54 00FF cn Bob Burnquist\Have All\Gold Medal\Burnside Portland 800DDD5A 00FF cn Bob Burnquist\Have All\Gold Medal\Skate Park Chicago 800DDD57 00FF cn Bob Burnquist\Have All\Gold Medal\Roswell 800DDD5C 00FF cn Geoff Rowley\Have All\Tapes 50000901 0000 800DDD68 00FF cn Geoff Rowley\Have All\Gold Medal\Burnside Portland 800DDD6E 00FF cn Geoff Rowley\Have All\Gold Medal\Skate Park Chicago 800DDD6B 00FF cn Geoff Rowley\Have All\Gold Medal\Roswell 800DDD70 00FF cn Bucky Lasek\Have All\Tapes 50000901 0000 800DDD7C 00FF cn Bucky Lasek\Have All\Gold Medal\Burnside Portland 800DDD82 00FF cn Bucky Lasek\Have All\Gold Medal\Skate Park Chicago 800DDD7F 00FF cn Bucky Lasek\Have All\Gold Medal\Roswell 800DDD84 00FF cn Chad Muska\Have All\Tapes 50000901 0000 800DDD90 00FF cn Chad Muska\Have All\Gold Medal\Burnside Portland 800DDD96 00FF cn Chad Muska\Have All\Gold Medal\Skate Park Chicago 800DDD93 00FF cn Chad Muska\Have All\Gold Medal\Roswell 800DDD98 00FF cn Kareem Campbell\Have All\Tapes 50000901 0000 800DDDA4 00FF cn Kareem Campbell\Have All\Gold Medal\Burnside Portland 800DDDAA 00FF cn Kareem Campbell\Have All\Gold Medal\Skate Park Chicago 800DDDA7 00FF cn Kareem Campbell\Have All\Gold Medal\Roswell 800DDDAC 00FF cn Andrew Reynolds\Have All\Tapes 50000901 0000 800DDDB8 00FF cn Andrew Reynolds\Have All\Gold Medal\Burnside Portland 800DDDBE 00FF cn Andrew Reynolds\Have All\Gold Medal\Skate Park Chicago 800DDDBB 00FF cn Andrew Reynolds\Have All\Gold Medal\Roswell 800DDDC0 00FF cn Rune Glifberg\Have All\Tapes 50000901 0000 800DDDCC 00FF cn Rune Glifberg\Have All\Gold Medal\Burnside Portland 800DDDD2 00FF cn Rune Glifberg\Have All\Gold Medal\Skate Park Chicago 800DDDCF 00FF cn Rune Glifberg\Have All\Gold Medal\Roswell 800DDDD4 00FF cn Jamie Thomas\Have All\Tapes 50000901 0000 800DDDE0 00FF cn Jamie Thomas\Have All\Gold Medal\Burnside Portland 800DDDE6 00FF cn Jamie Thomas\Have All\Gold Medal\Skate Park Chicago 800DDDE3 00FF cn Jamie Thomas\Have All\Gold Medal\Roswell 800DDDE8 00FF cn Elissa Steamer\Have All\Tapes 50000901 0000 800DDDF4 00FF cn Elissa Steamer\Have All\Gold Medal\Burnside Portland 800DDDFA 00FF cn Elissa Steamer\Have All\Gold Medal\Skate Park Chicago 800DDDF7 00FF cn Elissa Steamer\Have All\Gold Medal\Roswell 800DDDFC 00FF cn Have All Tracks 813D6E42 FFFF 813D4FFA FFFF 813D5D62 FFFF 813D84E2 FFFF 813D4FCA FFFF 813D5F2A FFFF 813D8C52 FFFF 813D5602 FFFF 813D6D3A FFFF cn Player 1\Tony Hawk\Full Special All Levels D00C0223 0000 813D6576 02EE D00C0223 0001 813D4728 02EE D00C0223 0002 813D5496 02EE D00C0223 0003 813D7C16 02EE D00C0223 0004 813D467E 02EE D00C0223 0005 813D565E 02EE D00C0223 0006 813D8386 02EE D00C0223 0007 813D4D36 02EE D00C0223 0008 813D646E 02EE cn Player 1\Max Points\The Warehouse 813D6E42 FFFF cn Player 1\Max Points\The School 813D4FFA FFFF cn Player 1\Max Points\The Mall 813D5D62 FFFF cn Player 1\Max Points\The Skate Park 813D84E2 FFFF cn Player 1\Max Points\Downtown Chicago 813D4FCA FFFF cn Player 1\Super Max\Turning 800D5620 FFFF cn Player 2\Super Max\Ollie 800D5621 FFFF cn Player 2\Super Max\Speed 800D5622 FFFF cn Player 2\Super Max\Air 800D5623 FFFF cn Player 2\Super Max\Balance 800D5624 FFFF cn Player 2\Super Max\Turning 800D5625 FFFF cn Player 1\Play As 800D03D4 ???? 0000:"Tony Hawk",0001:"Bob Burnquist",0002:"Geoff Rowley",0003:"Bucky Lasek",0004:"Chad Muska",0005:"Kareem Campbell",0006:"Andrew Reynolds",0007:"Rune Glifberg",0008:"Jamie Thomas",0009:"Elissa Steamer",000A:"Officer Dick" cn Player 2\Play As 800D03D5 ???? 0000:"Tony Hawk",0001:"Bob Burnquist",0002:"Geoff Rowley",0003:"Bucky Lasek",0004:"Chad Muska",0005:"Kareem Campbell",0006:"Andrew Reynolds",0007:"Rune Glifberg",0008:"Jamie Thomas",0009:"Elissa Steamer",000A:"Officer Dick" cn Player 1\Have Perfect Balance 800DDB83 0001 cn Player 1\Max Trick Score\The Warehouse 813D6E42 FFFF cn Player 1\Max Trick Score\The School 813D4FFA FFFF cn Player 1\Max Trick Score\The Mall 813D5D62 FFFF cn Player 1\Max Trick Score\The Skate Park Course 813D84E2 FFFF cn Player 1\Max Trick Score\Downtown 813D4FCA FFFF cn Player 1\Max Trick Score\Downhill Jam 813D5F2A FFFF cn Player 1\Max Trick Score\Burnside 813D8C52 FFFF cn Player 1\Max Trick Score\The Streets 813D5602 FFFF cn Player 1\Max Trick Score\Roswell 813D6D3A FFFF crc 99150E18-1266E6A5-C:45 gn Tony Hawk's Pro Skater 2 (U) cn Infinte Time 810E87AA 0000 cn Unlock\Spider Man 800E9DD8 0001 800F0B9B 0001 cn Unlock\Officer Dick 800E9DDC 0001 800F087B 0001 cn 1 Million Points 8119054C 000F 8119054E 4240 cn All Gaps\Hanger 800E9CC5 00FF 810E9CC6 FFFF cn All Gaps\Marseille 810E9CDC FFFF 810E9CDE FFFF 800E9CE3 000F cn All Gaps\Philadelphia 810E9D0C FFFF 810E9D0E FFFF 810E9D12 0FFF cn All Gaps\School II 810E9CD0 FFFF 810E9CD2 FFFF 810E9CD6 0FFF cn All Gaps\Skatestreet 810E9D00 FFFF 810E9D02 FFFF 800E9D07 000F cn All Gaps\Venice Beach 810E9CF4 FFFF 810E9CF6 FFFF 810E9CFA 0FFF cn All Tricks Available\Custom Player 1 810E9454 FFFF 810E9456 FFFF 810E9458 FFFF 810E945A FFFF 810E945C FFFF 810E945E FFFF cn All Tricks Available\Custom Player 2 810E9538 FFFF 810E953A FFFF 810E953C FFFF 810E953E FFFF 810E9540 FFFF 810E9542 FFFF cn All Tricks Available\Custom Player 3 810E961C FFFF 810E961E FFFF 810E9620 FFFF 810E9622 FFFF 810E9624 FFFF 810E9626 FFFF cn All Tricks Available\Custom Player 4 810E9700 FFFF 810E9702 FFFF 810E9704 FFFF 810E9706 FFFF 810E9708 FFFF 810E970A FFFF cn Tricks Available\Bob Burnquist 810E89A4 FFFF 810E89A6 FFFF 810E89A8 FFFF 810E89AA FFFF 810E89AC FFFF 810E89AE FFFF cn Tricks Available\Chad Muska 810E8FE0 FFFF 810E8FE2 FFFF 810E8FE4 FFFF 810E8FE6 FFFF 810E8FE8 FFFF 810E8FEA FFFF cn Tricks Available\Eric Koston 810E8D34 FFFF 810E8D36 FFFF 810E8D38 FFFF 810E8D3A FFFF 810E8D3C FFFF 810E8D3E FFFF cn Tricks Available\Elissa Steamer 810E928C FFFF 810E928E FFFF 810E9290 FFFF 810E9292 FFFF 810E9294 FFFF 810E9296 FFFF cn Tricks Available\Geoff Rowley 810E91A8 FFFF 810E91AA FFFF 810E91AC FFFF 810E91AE FFFF 810E91B0 FFFF 810E91B2 FFFF cn Tricks Available\Jamie Thomas 810E9370 FFFF 810E9372 FFFF 810E9374 FFFF 810E9376 FFFF 810E9378 FFFF 810E937A FFFF cn Tricks Available\Kareem Campbell 810E8B6C FFFF 810E8B6E FFFF 810E8B70 FFFF 810E8B72 FFFF 810E8B74 FFFF 810E8B76 FFFF cn Tricks Available\Officer Dick 810E97E4 FFFF 810E97E6 FFFF 810E97E8 FFFF 810E97EA FFFF 810E97EC FFFF 810E97EE FFFF cn Tricks Available\Rune Glifberg 810E8C50 FFFF 810E8C52 FFFF 810E8C54 FFFF 810E8C56 FFFF 810E8C58 FFFF 810E8C5A FFFF cn Tricks Available\Rodney Mullen 810E8EFC FFFF 810E8EFE FFFF 810E8F00 FFFF 810E8F02 FFFF 810E8F04 FFFF 810E8F06 FFFF cn Tricks Available\Steve Caballero 810E8A88 FFFF 810E8A8A FFFF 810E8A8C FFFF 810E8A8E FFFF 810E8A90 FFFF 810E8A92 FFFF cn Tricks Available\Spider Man 810E99AC FFFF 810E99AE FFFF 810E99B0 FFFF 810E99B2 FFFF 810E99B4 FFFF 810E99B6 FFFF cn Tricks Available\Tony Hawk 810E88C0 FFFF 810E88C2 FFFF 810E88C4 FFFF 810E88C6 FFFF 810E88C8 FFFF 810E88CA FFFF cn Tricks Available\Andrew Reynolds 810E90C4 FFFF 810E90C6 FFFF 810E90C8 FFFF 810E90CA FFFF 810E90CC FFFF 810E90CE FFFF cn Max Cash\Officer Dick 810E975C 000F 810E975E 423F 810E9760 000F 810E9762 423F cn Max Cash\Andrew Reynolds 810E903C 000F 810E903E 423F 810E9040 000F 810E9042 423F cn Max Cash\Bob Burnquist 810E891C 000F 810E891E 423F 810E8920 000F 810E8922 423F cn Max Cash\Bucky Lasek 810E8D90 000F 810E8D92 423F 810E8D94 000F 810E8D96 423F cn Max Cash\Chad Muska 810E8F58 000F 810E8F5A 423F 810E8F5C 000F 810E8F5E 423F cn Max Cash\Eric Koston 810E8CAC 000F 810E8CAE 423F 810E8CB0 000F 810E8CB2 423F cn Max Cash\Elissa Steamer 810E9204 000F 810E9206 423F 810E9208 000F 810E920A 423F cn Max Cash\Geoff Rowley 810E9120 000F 810E9122 423F 810E9124 000F 810E9126 423F cn Max Cash\Jamie Thomas 810E92E8 000F 810E92EA 423F 810E92EC 000F 810E92EE 423F cn Max Cash\Kareem Campbell 810E8AE4 000F 810E8AE6 423F 810E8AE8 000F 810E8AEA 423F cn Max Cash\Rune Glifberg 810E8BC8 000F 810E8BCA 423F 810E8BCC 000F 810E8BCE 423F cn Max Cash\Rodney Mullen 810E8E74 000F 810E8E76 423F 810E8E78 000F 810E8E7A 423F cn Max Cash\Steve Caballero 810E8A00 000F 810E8A02 423F 810E8A04 000F 810E8A06 423F cn Max Cash\Custom Player 1 810E93CC 000F 810E93CE 423F 810E93D0 000F 810E93D2 423F cn Max Cash\Custom Player 2 810E94B0 000F 810E94B2 423F 810E94B4 000F 810E94B6 423F cn Max Cash\Custom Player 3 810E9594 000F 810E9596 423F 810E9598 000F 810E959A 423F cn Max Cash\Custom Player 4 810E9678 000F 810E967A 423F 810E967C 000F 810E967E 423F cn All Complete\Bob Burnquist 810E8924 FFFF 810E8926 FFFF 810E8928 FFFF 810E892A FFFF 810E892C FFFF 810E892E FFFF 810E8930 FFFF 810E8932 FFFF cn All Complete\Tony Hawk 810E8840 FFFF 810E8842 FFFF 810E8844 FFFF 810E8846 FFFF 810E8848 FFFF 810E884A FFFF 810E884C FFFF 810E884E FFFF cn Always Special On Cheat 800E9DEC 0001 cn Perfect Balance Cheat 800E9DE8 0001 cn Unlock Hoffman Factory & Skate Heaven 800EA0CB 003F cn Access In-Game Cheat Menu 50001104 0000 800E9DD8 0001 crc 1A7F70B5-00B7B9FD-C:45 gn Tony Hawk's Pro Skater 3 (U) cn Tony Hawk\All Levels Open,Gold Medals & Goals Compleated 800ED8F8 00FF 50001001 0000 800ED908 00FF cn Tony Hawk\Have all 5of5 Stat Points & All Decks 50000F04 0000 800ED934 00FF cn Steve Caballero\All Levels Open,Gold Medals & Goals Compleated 800ED9D4 00FF 50001001 0000 800ED9E4 00FF cn Steve Caballero\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EDA10 00FF cn Kareem Campbell\All Levels Open,Gold Medals & Goals Compleated 800EDAB0 00FF 50001001 0000 800EDAC0 00FF cn Kareem Campbell\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EDAEC 00FF cn Rune Glifberg\All Levels Open,Gold Medals & Goals Compleated 800EDB8C 00FF 50001001 0000 800EDB9C 00FF cn Rune Glifberg\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EDBC8 00FF cn Eric Koston\All Levels Open,Gold Medals & Goals Compleated 800EDC68 00FF 50001001 0000 800EDC78 00FF cn Eric Koston\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EDCA4 00FF cn Bucky Lasek\All Levels Open,Gold Medals & Goals Compleated 800EDD44 00FF 50001001 0000 800EDD54 00FF cn Bucky Lasek\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EDD80 00FF cn Rodney Mullen\All Levels Open,Gold Medals & Goals Compleated 800EDE20 00FF 50001001 0000 800EDE30 00FF cn Rodney Mullen\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EDE5C 00FF cn Chad Muska\All Levels Open,Gold Medals & Goals Compleated 800EDEFC 00FF 50001001 0000 800EDF0C 00FF cn Chad Muska\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EDF38 00FF cn Andrew Rynolds\All Levels Open,Gold Medals & Goals Compleated 800EDFD8 00FF 50001001 0000 800EDFE8 00FF cn Andrew Rynolds\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EE014 00FF cn Geoff Rowley\All Levels Open,Gold Medals & Goals Compleated 800EE0B4 00FF 50001001 0000 800EE0C4 00FF cn Geoff Rowley\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EE0F0 00FF cn Elissa Steamer\All Levels Open,Gold Medals & Goals Compleated 800EE190 00FF 50001001 0000 800EE1A0 00FF cn Elissa Steamer\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EE1CC 00FF cn Jamie Thomas\All Levels Open,Gold Medals & Goals Compleated 800EE26C 00FF 50001001 0000 800EE27C 00FF cn Jamie Thomas\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EE2A8 00FF cn Bam Margera\All Levels Open,Gold Medals & Goals Compleated 800EE348 00FF 50001001 0000 800EE358 00FF cn Bam Margera\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EE384 00FF cn Skater A\All Levels Open,Gold Medals & Goals Compleated 800EE424 00FF 50001001 0000 800EE434 00FF cn Skater A\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EE460 00FF cn Skater B\All Levels Open,Gold Medals & Goals Compleated 800EE500 00FF 50001001 0000 800EE510 00FF cn Skater B\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EE53C 00FF cn Skater C\All Levels Open,Gold Medals & Goals Compleated 800EE5DC 00FF 50001001 0000 800EE5EC 00FF cn Skater C\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EE618 00FF cn Officer Dick\All Levels Open,Gold Medals & Goals Compleated 800EE6B8 00FF 50001001 0000 800EE6C8 00FF cn Officer Dick\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EE6F4 00FF cn Wolverine\All Levels Open,Gold Medals & Goals Compleated 800EE794 00FF 50001001 0000 800EE7A4 00FF cn Wolverine\Have all 5of5 Stat Points & All Decks 50000F04 0000 800EE7D0 00FF cn Infinite Stat Upgrades & Deck Boards to Buy cd This allows you to ugrade you stats in Upgrades to the Max & Also to open the Boards in Decks For All Characters. 800ED8F9 00FF 800ED905 00FF 800EDD45 00FF 800EDD51 00FF 800EDFE5 00FF 800EDFD9 00FF 800ED9D5 00FF 800ED9E1 00FF 800EDAB1 00FF 800EDABD 00FF 800EDB8D 00FF 800EDB99 00FF 800EDC69 00FF 800EDC75 00FF 800EDE21 00FF 800EDE2D 00FF 800EDEFD 00FF 800EDF09 00FF 800EE0B5 00FF 800EE0C1 00FF 800EE191 00FF 800EE19D 00FF 800EE26D 00FF 800EE279 00FF 800EE349 00FF 800EE355 00FF 800EE425 00FF 800EE431 00FF 800EE501 00FF 800EE50D 00FF 800EE5DD 00FF 800EE5E9 00FF 800EE6B9 00FF 800EE6C5 00FF 800EE795 00FF 800EE7A1 00FF cn Play As 800E9D69 ???? 0000:"Tony Hawk",0001:"Steve Caballero",0002:"Kareem Campbell",0003:"Rune Glifberg",0004:"Eric Koston",0005:"Bucky Lasek",0006:"Rodney Mullen",0007:"Chad Muska",0008:"Andrew Rynolds",0009:"Geoff Rowley",000A:"Elissa Steamer",000B:"Jamie Thomas",000C:"Bam Margera",000D:"Skater A",000E:"Skater B",000F:"Skater C",0010:"Officer Dick",0011:"Wolverine" cn Timer Starts Off At 20 Mins 800E9D64 FFFF cn Play On Level cd This allows you to play on a level even if it isnt already open just choose & tick choose foundary or what ever level & play the one you selected 800ED58F ???? 0000:"Foundary",0001:"Los Angeles",0002:"Rio De Janeiro",0003:"Suburbia",0004:"Airport",0005:"Skater Island",0006:"Canada",0007:"Tokyo",0008:"Downhill",0009:"Custom" crc 8ECC02F0-7F8BDE81-C:45 gn Top Gear Hyper-Bike (U) cn Access All\Bikes 810FBCBE FFFF cn Access All\Tracks 810FBCC2 FFFF cn Infinite\Nitro 810B8E4C 42C8 cn Infinite\Nitro Always On 810BB5A4 8004 cn Laps 2 Race 8016FC88 ???? 0001:"1 Lap",0002:"2 laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" crc D741CD80-ACA9B912-C:45 gn Top Gear Overdrive (U) cn Extra Cars & Tracks 801022F0 0001 5000020A 0000 801022F1 000E 811022E8 0501 50000302 0000 811022EA 0101 cn Infinite Money 810F50C4 270F cn Infinite Nitro 810F50CE 0009 cn Laps 2 Race 801185E0 ???? 0001:"1 Lap",0002:"2 laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" cn Level Modifier (Championship & Vs Mode) 8011D0B0 ???? 0000:"Frigid Peaks - Snowy/Daytime",0001:"Fertile Canyon - Day/Lightning",0002:"Swampy Depot - Day/Rainbow",0003:"Downtown - Clear/Rainbow",0004:"Sandy Beaches - Day/Lightning",0005:"Fertile Canyon - Night" crc 62269B3D-FE11B1E8-C:45 gn Top Gear Rally (U) cn Have 1-6 Level Points 50000602 0000 8032685F 0064 cn Extra Cars & Tracks 50000201 0000 8032690C 00FF 8032690F 00FF 813243CC FFFF cn Only Race 1 Lap Championship Mode 8031EBDB 0002 cn Always Place 1st 8131C70E 0000 crc BE5973E0-89B0EDB8-C:45 gn Top Gear Rally 2 (U) cn Always 1st 810318E2 0001 cn No Damage Or Failures 81030D76 0001 cn 100.000 Sponsor Credits & 950 Championship Points In Support Van cd You Also Have Access To All Cars, Tracks & Extra Features 80030D82 00F3 cn No Cones Hit cd In ARSG Rally School 81031CEA 0000 cn No Navigator 80032677 0000 cn Max Sponsor Credits 81033816 270F cn Infinite Time & Always Place 1st cd Championship Mode Only. 810318EE 0001 cn Max Sponsor Points & Extra Cars & Tracks cd This code gives you all tracks and cars. once you activate this code, You must make an internal save (Native) in options & then load that internal save, & go to Drivers Board to pick your car, Then to Race to pick your track 81033816 270F crc A150743E-CF2522CD-C:45 gn Toy Story 2 (U) cn Have 99 coins 810BB10E 0063 cn Have all 5 collectables 801C7A72 0005 cn Infinite Lives 800BB10A 0009 cn Infinite Battery Power 810BB106 000E cn Hold jump to fly 810BB0FC 0002 crc 2F70F10D-5C4187FF-C:45 gn Turok: Dinosaur Hunter (U) (v1.0) cn Infinite\Body Armor 81128CE6 5B23 80128D27 0001 cn Infinite\Air 81129030 AAE1 811E85EA F1FF cn Have\All Level Keys 50000604 0000 80128D33 0007 80128D4B 001F 80128D6B 00FF cn Have\All Weapons 50000B04 0000 80128CF7 0001 80128D23 0001 cn Infinite\Ammo 50000404 0000 80128CB3 00FF 80128CC3 00FF 80128CCF 00FF 50000504 0000 80128CD3 00FF 80128E5B 00FF 80128E57 00FF cn Diffuculty Modifier 801195DF ???? 0000:"Easy",0001:"Normal",0002:"Hard" cn Infinite\Health 812C1584 1E61 812A24F4 1E61 cn Have\Backpack 80128CEB 0001 80128D2B 0001 cn Open All Portals cd Press L to Access Map 8114F8CA F803 50000604 0000 81128D4E 0003 81128D66 0005 cn Infinite\Lives 8005E689 0098 8105E6A0 2400 8005E6AD 0083 cn Have\Cheat Menu 81119540 FFFF 81119542 FFFF crc 2F700DCD-176CC5C9-C:45 gn Turok: Dinosaur Hunter (U) (v1.1) cn Infinite\Body Armor 81128E36 5B23 80128E77 0001 cn Infinite\Air 81129180 AAE1 811E873A F1FF cn Have\All Level Keys 50000604 0000 80128E83 0007 80128E9B 001F 80128EBB 00FF cn Have\All Weapons 50000B04 0000 80128E47 0001 80128E73 0001 cn Infinite\Ammo 50000404 0000 80128E03 00FF 80128E13 00FF 80128E1F 00FF 50000504 0000 80128E23 00FF 80128FAB 00FF 80128FA7 00FF cn Diffuculty Modifier 8011972F ???? 0000:"Easy",0001:"Normal",0002:"Hard" cn Infinite\Health 812C16D4 1E61 812A2644 1E61 cn Have\Backpack 80128E3B 0001 80128E7B 0001 cn Open All Portals cd Press L to Access Map 8114FA1A F803 81128E9E 0003 81128EA2 0003 81128EA6 0003 81128EAA 0003 81128EAE 0003 81128EB2 0003 81128EB6 0005 cn Infinite\Lives 8005E7D9 0098 8105E7F0 2400 8005E7FD 0083 cn Have\Cheat Menu 81119690 FFFF 81119692 FFFF crc ADB9498B-DAF28F55-C:45 gn Turok: Rage Wars (U) cn Player 1\Have All\Mini Game Icons 800FCB17 0024 cn Player 1\Infinite\Proximity Mines 8033653D 00FF cn Player 1\Infinite\Metal Claws 80336541 00FF cn Player 1\Infinite\Sentry Guns 8033653F 00FF cn Player 1\Infinite\Cerebral Bores 8033653B 00FF cn Player 1\Infinite\Health 81336526 6400 80692B86 0064 cn Player 1\Infinite Ammo 80336535 0063 80336537 0063 80336539 0063 80692B95 0063 80692B97 0063 80692B99 0063 80692B9B 0063 80692B9D 0063 80692B9F 0063 80692BA1 0063 cn Player 1\Play As 80140358 ???? 0000:"Turok",0001:"Mantid",0002:"Drone",0003:"Fireborn",0004:"Soldier",0005:"Adon",0006:"Lord Of The Dead",0007:"Elite Guard",0008:"Blind One",0009:"Juggernaut",000A:"Death Guard",000B:"Bastile",000C:"Syra",000D:"Symbiont",000E:"Tail Set",000F:"Pur-Lin",0010:"Symbiont",0011:"Raptor",0012:"Mites",0013:"Monkey" cn Level Select\Proving Ground-Tightrope cd Do Not use this with Level Select The Pit-Starlight. Only use One Level Select Option At A Time 8014BD9F ???? 0000:"Proving Grounds",0001:"Basic Training",0002:"Crossroads",0003:"Grim Retreat",0004:"Cathedral",0005:"Fall Out",0006:"Boxed Set",0007:"Dire Straight",0008:"Prey",0009:"Warehouse",000A:"Water Temple",000B:"Bomb Shelter",000C:"Tempered",000D:"Earth Temple",000E:"Fire Temple",000F:"Mystic",0010:"Bottleneck",0011:"Tightrope" cn Level Select\The Pit-Starlight cd Do Not use this with Level Select Proving Ground-Tightrope. Only use One Level Select Option At A Time 8014BD9F ???? 0012:"The Pit",0013:"Leap Of Faith",0014:"Wicked Dance",0015:"Bunker",0016:"Ampatheater",0017:"Fire Walker",0018:"Crypts",0019:"Breakdown",001A:"Retaliation",001B:"Hopeless",001C:"Matrix",001D:"Fathom",001E:"The Pedestal",001F:"Defcon 5",0020:"Spirit Temple",0021:"Stronghold",0022:"Courtyard",0023:"Starlight" cn Player 1\Infinite\Time 811407F4 47AF 811407F6 C4B1 cn Player 1\Have All\Medals 810FCB4A FFFF 810FCB4C FFFF 810FCB4E FFFF 800FCB50 0003 cn Player 1\Start With Weapon 803366B0 ???? 0000:"Warhammer",0001:"Boomerang",0002:"Tek Crossbow",0003:"Mag 60",0004:"Shotgun",0005:"Assault Rifle",0006:"Mini Gun",0007:"Plasma Rifle",0008:"Freeze Gun",0009:"Flaregun",000A:"Grenade Launcher",000B:"Scorpion Launcher",000C:"Napalm Gel",000D:"Emaciator",000E:"Inflator",000F:"Chest Burster",0010:"Raptor Claw",0011:"Mite Bite",0012:"Cerebral Bore",0013:"PFM Mine",0014:"Iron Claw",0015:"Sentry Turret" crc E8C95AFC-35D121DA-C:45 gn Turok 2: Seeds of Evil (U) (Kiosk) cn Infinite\Health 80305446 0064 80648FA6 0064 cn 99 Gems 80305449 0063 80648FA9 0063 cn Infinite\Ammo 50000302 0000 81305868 0063 50000304 0000 81305872 0063 5000020E 0000 81305882 0063 50000302 0000 816493C8 0063 50000304 0000 816493D2 0063 5000020E 0000 816493E2 0063 crc 49088A11-6494957E-C:45 gn Turok 2: Seeds of Evil (U) cn Player 1\Have All\Weapons D12FC912 0000 812FC912 0101 D12FC914 0000 812FC914 0101 D12FC916 0000 812FC916 0101 D12FC918 0000 812FC918 0101 D12FC91A 0000 812FC91A 0101 D12FC91C 0000 812FC91C 0101 D12FC91E 0000 812FC91E 0101 D12FC920 0000 812FC920 0101 D12FC922 0000 812FC922 0101 D12FC924 0000 812FC924 0101 D12FC926 0000 812FC926 0101 D12FC928 0000 812FC928 0101 D12FC92A 0000 812FC92A 0101 D12FC92C 0000 812FC92C 0101 D12FC92E 0000 812FC92E 0101 D12FC930 0000 812FC930 0101 D12FC932 0000 812FC932 0101 806FE742 0001 806FE743 0001 806FE744 0001 806FE745 0001 806FE746 0001 806FE747 0001 806FE748 0001 806FE749 0001 806FE74A 0001 806FE74B 0001 806FE74C 0001 806FE74D 0001 806FE74E 0001 806FE74F 0001 806FE750 0001 806FE751 0001 806FE752 0001 806FE753 0001 806FE754 0001 806FE756 0001 806FE757 0001 806FE758 0001 806FE759 0001 806FE75A 0001 806FE75B 0001 806FE75C 0001 806FE75E 0001 806FE75F 0001 806FE760 0001 806FE761 0001 806FE762 0001 806FE763 0001 806FE764 0001 cn Player 1\Infinite\Health 812FC4C6 0064 816FE2F6 6400 cn Player 1\99 Gems 812FC4C8 0063 806FE2F8 0063 cn Player 1\Infinite\Ammo 802FC499 0000 50000302 0000 812FC8D4 0063 812FC8DE 0063 812FC8E2 0063 50000A02 0000 812FC8E6 0063 50000302 0000 816FE704 0063 816FE70E 0063 816FE712 0063 50000802 0000 816FE716 0063 816FE72C 0063 816FE730 0063 cn Player 1\Have All\Keys,Nuke,Evrything 802FC602 0030 802FC60C 0030 802FC616 0030 802FC620 0030 50000601 0000 802FC634 0030 50000501 0000 802FC648 0030 50000401 0000 802FC65C 0030 50000601 0000 802FC99C 0030 802FC4E0 0033 802FC4E5 0033 802FC4EA 0033 802FC594 0033 802FC530 0033 802FC53A 0033 802FC53B 0033 802FC5B0 0033 802FC5B1 0033 802FC5B2 0033 802FC5B3 0033 806FE432 0030 806FE43C 0030 806FE446 0030 806FE450 0030 50000601 0000 806FE464 0030 50000501 0000 806FE478 0030 50000501 0000 806FE48C 0030 50000601 0000 806FE4CC 0030 806FE310 0033 806FE315 0033 806FE31A 0033 806FE360 0033 806FE36A 0033 806FE36B 0033 806FE3C4 0033 50000401 0000 806FE3E0 0033 50000601 0000 8059D61A 0001 50000D01 0000 8059D620 0001 50000401 0000 8059D62E 0001 cn Player 2\Infinite\Health 812F723E 0064 8059D1CE 0064 cn Player 2\Infinite\Ammo 50000602 0000 812F767C 0063 812F764C 013C 812F764E 013C 50000302 0000 812F7654 013C 812F7660 013C 812F7664 013C 812F766A 013C 812F766C 013C 812F7674 013C 812F7678 013C 8159D5DC 013C 8159D5DE 013C 8159D5E4 013C 8159D5E8 013C 8159D5EA 013C 8159D5F0 013C 8159D5F4 013C 8159D5FA 013C 8159D5FC 013C 8159D604 013C 8159D608 013C 50000602 0000 8159D60C 013C cn Player 2\99 Gems 812F7240 0063 crc 89A579F1-667E97EF-C:45 gn Turok 3: Shadow of Oblivion (U) cn Have PSG 8033343A 0001 cn Have Cerebral Bore 80333437 0001 cn Have All Secrets 811659C6 FFFF 811659C4 FFFF cn Have Grenade Launcher 80333434 0001 cn Infinite Life Force 813334FC 0063 cn Infinite Health 81332FDA 6400 cn Infinite Arrows 81333408 0064 cn Infinite Pistol Ammo 8133340E 0063 cn Infinite Shotgun Ammo 81333412 0064 cn Infinite Grenade Gun Ammo 8133340A 0064 cn Infinite Firestorm Cannon Ammo 81333410 0064 cn Have Pistol 8033342A 0001 cn Have Shotgun 80333430 0001 crc 033F4C13-319EE7A7-C:45 gn World is Not Enough, The (U) cn Have All\Levels Unlocked cd For Single Player Mode Only 81102EE6 0021 cn Invincibility On All levels 81112F68 0101 cn Skip Intro, D03B0E5F 0004 803B0E5F 0009 cn Level select 803B0E5F 0009 cn Infinite\Ammo On All Levels 810648DC 2400 cn Have All\Guns On All Levels cd Once you pick up a Gun You will have all weapons 8105F224 0810 8105F226 0000 8105F228 2442 8105F22A 0001 81400000 3C02 81400002 0100 81400004 2442 81400006 0063 81400008 AE82 8140000A 0288 8140000C AE82 8140000E 0298 81400010 AE82 81400012 02A0 81400014 AE82 81400016 02A8 81400018 AE82 8140001A 02B0 8140001C AE82 8140001E 02C0 81400020 AE82 81400022 02C8 81400024 AE82 81400026 02D0 81400028 AE82 8140002A 02D8 8140002C AE82 8140002E 02E8 81400030 AE82 81400032 02F0 81400034 AE82 81400036 02F8 81400038 AE82 8140003A 0300 8140003C AE82 8140003E 0308 81400040 AE82 81400042 0310 81400044 AE82 81400046 0320 81400048 AE82 8140004A 0330 8140004C AE82 8140004E 0338 81400050 AE82 81400052 0350 81400054 AE82 81400056 0358 81400058 AE82 8140005A 0360 8140005C AE82 8140005E 0370 81400060 AE82 81400062 0378 81400064 AE82 81400066 0380 81400068 AE82 8140006A 0388 8140006C AE82 8140006E 0340 81400070 AE82 81400072 0348 81400074 AE82 81400076 0350 81400078 0801 8140007A 7C8C 8140007C A077 8140007E 01FC cn Time Taken Clock At 0:00 80102F02 0000 cn Infinite\Time cd Underground Uprising 8138EE3A 19B8 cn Have All\Skins + Everyone is Evil 50005C0C 0000 800BF687 0081 cn Have All\Gadgets 80112F6D 0001 cn Go Solo In Multiplayer D00E0778 0042 801002B7 0001 cn Stop Bond From Going Downhill on Cold Reception cd Press L to Stop, & R to Go D10E0778 0020 803A8466 0001 D10E0778 0010 803A8466 0000 cn Fail Objectives To Complete Them 810315B8 2402 810315BA 0011 cn Infinite\Ammo On Clip, 810649AC 2400 cn Have Tons Of Nightvision cd For Battery Only 81064C82 1500 cn Play Crate Yard Level 80102EDF 0008 crc BBC99D32-117DAA80-C:45 gn TWISTED EDGE cn Max\50000 Stunt Points 810829B8 C350 cn Low Timer 801495FF 0000 80149601 0000 cn Have\All Characters 810829F8 07FF cn Have\All Difficulties 810829F0 0700 cn Have\All Tracks 810829FC BFFE cn Have\All Boards 81082A04 0003 81082A06 FFFF crc EA71056A-E4214847-C:45 gn Vigilante 8 (U) cn All Characters & Levels 81181572 01C0 cn Have All Cars 50000D01 0000 80191298 001F cn Level Select 80190150 ???? 0000:"Super Dreamland 64",0001:"Secret Base",0002:"Sand Factory",0003:"Oil Fields",0004:"Aircraft Graveyard",0005:"Ghost Town",0006:"Hoover Dam",0007:"Valley Farms",0008:"Casino City",0009:"Canyonlands",000A:"Ski Resorts" cn Play As\Player 1 80186AE0 ???? 0000:"Chassey Blue",0001:"Slick Clyde",0002:"Sheila",0003:"John Torque",0004:"Dave",0005:"Convoy",0006:"Loki",0007:"Houston 3",0008:"Boogie",0009:"Beezwax",000A:"Molo",000B:"Sid Burn",000C:"\"Y\" The Alien" cn Play As\Player 2 80186AE1 ???? 0000:"Chassey Blue",0001:"Slick Clyde",0002:"Sheila",0003:"John Torque",0004:"Dave",0005:"Convoy",0006:"Loki",0007:"Houston 3",0008:"Boogie",0009:"Beezwax",000A:"Molo",000B:"Sid Burn",000C:"\"Y\" The Alien" crc F5C5866D-052713D9-C:45 gn Vigilante 8 - 2nd Offense (U) cn All Quests Complete\Player 1 5000120A 0000 81197FF0 01FF cn All Characters\Have Max\Attributes\Player 1 5000120A 0000 81197FF6 6464 5000120A 0000 81197FF8 6464 cn All Characters\Have Max\Acceleration\Player 1 50000C0A 0000 80197FF6 0064 cn All Characters\Have Max\Speed\Player 1 5000120A 0000 80197FF7 0064 cn All Characters\Have Max\Armor\Player 1 5000120A 0000 80197FF8 0064 cn All Characters\Have Max\Target Avoidance\Player 1 5000120A 0000 80197FF9 0064 cn All Quests Complete\Player 2 5000120A 0000 811980A4 01FF cn All Characters\Have Max\Attributes\Player 2 5000120A 0000 811980AA 6464 5000120A 0000 811980AC 6464 cn All Characters\Have Max\Acceleration\Player 2 5000120A 0000 801980AA 0064 cn All Characters\Have Max\Speed\Player 2 5000120A 0000 801980AB 0064 cn All Characters\Have Max\Armor\Player 2 5000120A 0000 801980AC 0064 cn All Characters\Have Max\Target Avoidance\Player 2 5000120A 0000 801980AD 0064 crc 82B3248B-E73E244D-C:45 gn Virtual Chess 64 (U) cn Debug Mode 810E6290 0001 cn Time Always Counts Down\On Black Players Side 8012C67D 0001 cn Time Always Counts Down\On White Players Side 8012C67D 0000 cn Always Play On\2D Board 800E7257 0001 cn Always Play On\3D Board 800E7257 0000 cn Player 1 Controls\Both Sides In 2-Player cd This is only for Human VS. Human Game 8012C508 0000 crc 4E4A7643-A37439D7-C:45 gn Virtual Pool 64 (U) cn Always Your Turn\Player 1 802EF798 0000 cn Always Your Turn\Player 2 802EF798 0001 cn Ball\Always In Hand 802EF79C 0002 cn Max Ratings\Player 1 81062C6A FFFF cn Max Ratings\Player 2 81062CEE FFFF cn Wins Options\Player 1 812EF780 ???? 0000:"Zero Points",FFFF:"Max Points" cn Wins Options\Player 2 812EF782 ???? 0000:"Zero Points",FFFF:"Max Points" cn Foul Score Options\Player 1 812EF784 ???? 0000:"Zero Fouls",FFFF:"Max Fouls" cn Foul Score Options\Player 2 812EF786 ???? 0000:"Zero Fouls",FFFF:"Max Fouls" cn Aiming Sites Always Available 812F0922 0004 crc 3C059038-C8BF2182-C:45 gn V-Rally Edition 99 (U) cn Enable All\Cars 80140D1F 003F cn Enable All\Tracks 80140D1A 0070 cn Unlock Champ 80140D28 0001 cn Enable All\Expert Times 80140D1C 0031 cn Unlock Cheat Menu D11B1F14 0000 811B1F14 00FF 811D530A 04FF D11B1F14 00FF 811B0270 FF03 crc 8066D58A-C3DECAC1-C:45 gn Waialae Country Club - True Golf Classics (U) cn Max Power 8012A431 FFFF cn Max Technique 8012A433 FFFF cn Max Putt 8012A435 FFFF cn Max Recover 8012A437 FFFF cn Select Club 801DA496 ???? 0000:"1W",0001:"2W",0002:"3W",0003:"4W",0004:"5W",0005:"1I",0006:"2I",0007:"3I",0008:"4I",0009:"5I",000A:"6I",000B:"7I",000C:"8I",000D:"9I",000E:"PW",000F:"AW",0010:"SW",0011:"Putter" cn Always On First Shot 811DA47A 0001 cn Club Type\Woods Mods 8012A472 ???? 0000:"Titan",0001:"Metal Wood",0002:"Persimmon" cn Club Type\Irons Mods 8012A473 ???? 0000:"Cavity",0001:"Conventional" cn Club Type\Sand Wedge Mods 8012A474 ???? 0000:"58 Degrees",0001:"60 Degrees",0002:"62 Degrees" crc F7FE28F6-C3F2ACC3-C:45 gn War Gods (U) cn Cheat Menu 80336593 0001 cn Unlimited Time 8033F31B 0063 cn Infinite Credits 81336582 0005 8133658E 0004 crc 7DE11F53-74872F9D-C:45 gn Wave Race 64 (U) (v1.0) cn Misses Don't Count 801C27CF 0000 cn Infinite Time Stunt Mode 801C295E 00FF cn Super Speed 801C27C7 0005 D0154051 0010 801C27C7 0020 cn 99 Points 801CB0A3 0063 cn Infinite Course Out Time 801C2983 00FF cn Maximum Power\Player 1 801C27C7 0005 cn Maximum Power\Player 2 801C2DEA 0005 801C308A 0005 cn Only Play Glacier Coast 800DA753 0007 cn Open\Difficulty Option 801CAFE0 ???? 0001:"Hard",0002:"Expert",0003:"Hard & Expert",0010:"Dolphin",0011:"Dolphin & Hard",0012:"Dolphin & Expert",0013:"Dolphin Hard & Expert" cn Open\Level Option 800DA753 ???? 0002:"Sunset Bay",0003:"Above & Drake Lake",0004:"All Above & Marine Fortress",0005:"All Above & Port Blue",0006:"All Above & Southern Island",000D:"All Above & Twilight City",0016:"All Above & Glacier Coast" cn Open\Course Option cd This works in all modes except for Championship Mode. 801CAFEB ???? 0000:"Dolphin Park",0001:"Sunny Beach",0002:"Sunset Bay",0003:"Drake Lake",0004:"Marian Fortress",0005:"Port Blue",0006:"Twilight City",0007:"Glacier Coast",0008:"Southern Island" cn Always First Place 801C269F 0000 crc 492F4B61-04E5146A-C:45 gn Wave Race 64 (U) (v1.1) cn Misses Don't Count 801C2A6F 0000 cn Infinite Time Stunt Mode 801C2BFE 00FF cn Super Speed 801C2A67 0005 D01CE659 0010 801C2A67 0020 cn 99 Points 801CB343 0063 cn Infinite Course Out Time 801C2C03 00FF cn Maximum Power\Player 1 801C2A67 0005 8013FC91 0005 cn Maximum Power\Player 2 801C308A 0005 801C392D 0005 cn Only Play Glacier Coast 800DA9D3 0007 cn Open\Difficulty Option 801CB260 ???? 0001:"Hard",0002:"Expert",0003:"Hard & Expert",0010:"Dolphin",0011:"Dolphin & Hard",0012:"Dolphin & Expert",0013:"Dolphin Hard & Expert" cn Open\Level Option 801CB26B ???? 0002:"Sunset Bay",0003:"Above & Drake Lake",0004:"All Above & Marine Fortress",0005:"All Above & Port Blue",0006:"All Above & Southern Island",000D:"All Above & Twilight City",0016:"All Above & Glacier Coast" cn Open\Course Option cd This works in all modes except for Championship Mode. 800DA9D3 ???? 0000:"Dolphin Park",0001:"Sunny Beach",0002:"Sunset Bay",0003:"Drake Lake",0004:"Marian Fortress",0005:"Port Blue",0006:"Twilight City",0007:"Glacier Coast",0008:"Southern Island" cn Always First Place 801C293F 0000 crc 6B45223F-F00E5C56-C:45 gn Wayne Gretzky's 3D Hockey (U) cn Team 1\Score pts 800E6AB1 ???? 0000:"Zero Points",001E:"30 Points",0023:"50 Points",004B:"75 Points",0063:"99 Points" cn Team 2\Score pts 800E9F8D ???? 0000:"ero Points",1E03:"0 Points",2305:"0 Points",4B07:"5 Points",6309:"9 Points" cn Crunched Players 810EA078 3F00 cn Extra Teams 800C7205 0001 cn Get In Fights Constantly 800A442E 0020 cn Players\Height Size 810EA074 ???? 3F00:"Midgets",3F80:"Normal Size",3FC0:"Large",4080:"Giants" cn Players\Head Size 810EA070 ???? 3F00:"Very Small",3F80:"Normal Size",4080:"Very Large" crc 5A9D3859-97AAE710-C:45 gn Wayne Gretzky's 3D Hockey '98 (U) cn Team 1\Score pts 8011C061 ???? 0000:"Zero Points",001E:"30 Points",0023:"50 Points",004B:"75 Points",0063:"99 Points" cn Team 2\Score pts 8011F571 ???? 0000:"ero Points",1E03:"0 Points",2305:"0 Points",4B07:"5 Points",6309:"9 Points" cn Crunched Players 810DBA6C 3F00 cn Extra Teams 80115A0C 0001 cn Get In Fights Constantly 800CF766 0020 cn Players\Height Size 81120688 ???? 3F00:"Midgets",3F80:"Normal Size",3FC0:"Large",4080:"Giants" cn Players\Head Size 81118A2C ???? 3F00:"Very Small",3F80:"Normal Size",4080:"Very Large" crc 33BE8CD6-EC186912-C:45 gn WCW MAYHEM cn Character Creation\Max\Strength 802F16F5 0009 cn Character Creation\Max\Impact 803121B5 0009 cn Character Creation\Max\Speed 803156F5 0009 cn Character Creation\Max\Quickness 803176B5 0009 cn Character Creation\Max\Aerial 80319675 0009 cn Character Creation\Max\Mat Ability 8031B635 0009 cn Character Creation\Max\Submission 8031D5F5 0009 cn Character Creation\Max\Brawling 8031F5B5 0009 cn Character Creation\Max\Dirtiness 80321575 0009 cn Infinite Stamina\Player 1 810E3998 0478 cn Infinite Stamina\Player 2 810E3B34 03ED cn Meter Select\Player 1 800E399D ???? 0060:"Full Meter Bar",0000:"Empty Meter Bar" cn Meter Select\Player 2 800AD80D ???? 0060:"Full Meter Bar",0000:"Empty Meter Bar" cn Enable Cheat 800B115B ???? 0002:"Super Created Wrestlers",0004:"Stamina Meter",0008:"Momentum Meter",0020:"Play As Same Wrestler",0080:"All Wrestlers" cn Freeze Timer 810B3242 D300 crc CEA8B54F-7F21D503-C:45 gn Wetrix (U) cn Infinite Lakes 811BF93E 0009 cn Mega Score 801BF958 00FF 801EED04 00FF cn Always Empty Drain 801BF991 0000 811BF992 0000 811BF994 0000 cn Always Berserk Mode 801BF9AF 00FF cn Stop Level Timer 801BF9B2 00FF cn Practice Lessons Open 810B0BAA 0008 cn Always Drop\Player 1 801BF9BB ???? 0000:"Bar",0001:"T",0002:"Corner",0003:"Square",0004:"Down Square",0005:"Down Bar",0006:"Big Water",0007:"Medium Water",0008:"Small Water",0009:"Smallest Water",000A:"Bomb",000B:"Fireball" cn Always Drop\Player 2 801F013B ???? 0000:"Bar",0001:"T",0002:"Corner",0003:"Square",0004:"Down Square",0005:"Down Bar",0006:"Big Water",0007:"Medium Water",0008:"Small Water",0009:"Smallest Water",000A:"Bomb",000B:"Fireball" cn Infinite Ducks 801BF94B 0009 crc E896092B-DC244D4E-C:45 gn Wheel Of Fortune (U) cn Player 1\Max Cash 810B9990 FFFF cn Player 2\Max Cash 810B9AA4 FFFF cn Player 3\Max Cash 810B9BB8 FFFF cn Player 1\No Cash 810B9992 0000 cn Player 2\No Cash 810B9AA6 0000 cn Player 3\No Cash 810B9BB8 0000 cn Player 1\Infinite Free Spins 800B999B 0001 cn Player 2\Infinite Free Spins 800B9AAF 0001 cn Player 3\Infinite Free Spins 800B9BC3 0001 crc ED98957E-8242DCAC-C:45 gn WinBack - Covert Operations (U) cn Infinite Health 8017AABB 0064 cn Enable\Max Power Mode 8015D417 0001 cn Have All Characters 8115D412 FFFF 8115D410 0003 8015D411 0003 cn Flashlight Mod 80179448 ???? 0001:"On",0000:"Off" cn All Bosses 1 Hit Deaths 811BE482 0000 cn Have All\Weapons,Items & Infinite Ammo\Player 1 8017AA9F 001E 8017AAB3 0008 8017AAB7 0009 801587C4 0009 8015D417 0001 801587C0 000C 801587C1 0060 801587C3 0001 50000601 0000 801587C5 0001 801587CB 0004 801587CD 000C cn Start with Weapon\Player 1 8017AAA8 ???? 0000:"HandGun",0001:"Machinegun",0002:"Shotgun",0003:"Rocket Launcher",0004:"M16 With Infinite Ammo",0005:"New Cooler Handgun",0006:"Invisible Gun 1 With Infinite Ammo",0007:"Invisible Gun 2 With Infinite Ammo",0008:"Odd Inviso ShotGun With Infinite Ammo",0009:"Cool Rocket Launcher With Infinite Ammo",0014:"Silenced Handgun" cn Time is Always 00:00:00 8110DD62 0000 cn Have Trial Mode Unlocked 8110DCEE 0004 crc 132D2732-C70E9118-C:45 gn Wipeout 64 cn Infinite\Check Point Time 810CDE92 0960 cn Always Place First cd For This code doesn't record the win on the Time Trial Gold Challenge or the Weapons Gold Challenge. 8109BC68 0001 81091E06 0003 cn Open\Velocitar 80093249 0001 cn Open\Piranha II 800933C9 0001 cn Open\Super Combo Challenge 8009351D 0000 cn Activate\Infinite Random Weapons Pickup 80091C24 0001 cn Activate\Power-Up Weapons 80091C28 0001 cn Activate\Velocitar 80091C2A 0001 cn Activate\Piranha 80091C29 0001 cn Have Weapon\For Feisar 811BC4F6 ???? 0101:"Rockets",0202:"Missiles",0303:"Mines",0505:"Electro Bolt",0606:"E-Pak",0707:"AutoPilot",0808:"Shield",0909:"Turbo Boost",0C0C:"Quake Disruptor",0D0D:"Secret",0E0E:"Thunder Bomb" cn Have Weapon\For AG System 811BCE3E ???? 0101:"Rockets",0202:"Missiles",0303:"Mines",0505:"Electro Bolt",0606:"E-Pak",0707:"AutoPilot",0808:"Shield",0909:"Turbo Boost",0C0C:"Quake Disruptor",0D0D:"Secret",0E0E:"Thunder Bomb" cn Have Weapon\For Auricom 811BC1DE ???? 0101:"Rockets",0202:"Missiles",0303:"Mines",0505:"Electro Bolt",0606:"E-Pak",0707:"AutoPilot",0808:"Shield",0909:"Turbo Boost",0C0C:"Quake Disruptor",0D0D:"Secret",0E0E:"Thunder Bomb" cn Have Weapon\For Qirex 811BC80E ???? 0101:"Rockets",0202:"Missiles",0303:"Mines",0505:"Electro Bolt",0606:"E-Pak",0707:"AutoPilot",0808:"Shield",0909:"Turbo Boost",0C0C:"Quake Disruptor",0D0D:"Secret",0E0E:"Thunder Bomb" cn Have Weapon\For Piranha II 811BCB2E ???? 0101:"Rockets",0202:"Missiles",0303:"Mines",0505:"Electro Bolt",0606:"E-Pak",0707:"AutoPilot",0808:"Shield",0909:"Turbo Boost",0C0C:"Quake Disruptor",0D0D:"Secret",0E0E:"Thunder Bomb" cn Infinite Eliminations 801BC52B 00FF cn [Infinite Sheild] cd This cheat enabled fixes Av's popping up and spoiling you racing,it also gives you Infinite Sheild on all Cars,Tracks and Modes 5000030C 0000 8109BCE2 0000 8109BD12 0000 crc BD636D6A-5D1F54BA-C:45 gn World Cup 98 (U) cn Home Team scores 800478BF ???? 0000:"0 Goals",0019:"25 Goals",0032:"50 Goals",0063:"99 Goals" cn Away Team scores 800478BB ???? 0000:"0 Goals",0019:"25 Goals",0032:"50 Goals",0063:"99 Goals" cn Open Cup Classic Mode 8003CC6F 0001 crc D2BE2F14-38453788-C:45 gn WWF Attitude (U) cn Enable Everything 8112E21C F000 8112E21E 09FF 8112E220 FFFF 8112E222 FFFF cn 0% in Move List 81135620 0000 cn Infinite Creation Points 80161313 0000 cn Max\Charisma 8014E3EC 000A cn Max\Mat Skills 8014E3ED 000A cn Max\Recovery 8014E3EB 000A cn Max\Speed 8014E3EA 000A cn Max\Strength 8014E3E8 000A cn Max\Toughness 8014E3E9 000A crc 4E4B0640-1B49BCFB-C:45 gn WWF No Mercy (U) cn Infinite\Money\Championship Mode cd For Championship Mode 8109940A FFFF cn Infinite\Money\Smackdown Mall Shop cd For Smackdown Mall Shop 8114FAD6 FFFF cn Have All\Characters,Costumes, & Moves 50000B02 0000 810BEE40 FFFF cn Max Spirit\Player 1 D015A5D1 0015 8015AF5F 00FF cn Max Spirit\Player 2 D015A5D1 0015 8015B2B7 00FF cn Max Spirit\Player 3 D015A5D1 0015 8015B60F 00FF cn Max Spirit\Player 4 D015A5D1 0015 8015B967 00FF cn Always Special\Player 1 D015A5D1 0015 8015AF9E 0004 cn Always Special\Player 2 D015A5D1 0015 8015B2F6 0004 cn Always Special\Player 3 D015A5D1 0015 8015B64E 0004 cn Always Special\Player 4 D015A5D1 0015 8015B9A6 0004 cn Ultimate Code\Player 1 D015A5D1 0015 8015AF5E 0064 cn Ultimate Code\Player 2 D015A5D1 0015 8015B2B6 0064 cn Ultimate Code\Player 3 D015A5D1 0015 8015B60E 0064 cn Ultimate Code\Player 4 D015A5D1 0015 8015B964 0064 cn 2 Player Championship Mode cd This lets player 2 play with you in championship mode so if you have a friend that you want to tag team up with in tag team championship now you can. 810A755E 0002 cn CPU To Human Control\Player 1 8015AF99 ???? 0017:"Human",0018:"CPU" cn CPU To Human Control\Player 2 8015B2F1 ???? 0017:"Human",0018:"CPU" cn CPU To Human Control\Player 3 8015B649 ???? 0017:"Human",0018:"CPU" cn Can't Pin\Player 1 cd Do not use with Auto Pin 8016CE23 0004 cn Can't Pin\Player 2 cd Do not use with Auto Pin 8016CE17 0004 cn Can't Pin\Player 3 cd Do not use with Auto Pin 8016CE2F 0004 cn Can't Pin\Player 4 cd Do not use with Auto Pin 8016CE3B 0004 cn Auto-Pin\Player 1 cd Do not use with Cant Pin 8016CE23 0003 cn Auto-Pin\Player 2 cd Do not use with Cant Pin 8016CE17 0003 cn Auto-Pin\Player 3 cd Do not use with Cant Pin 8016CE2F 0003 cn Auto-Pin\Player 4 cd Do not use with Cant Pin 8016CE3B 0003 cn Play As\Player 1\Option 1 cd Do not use this with anyother Play As Player 1 Option, only use one option at a time 810AAAD0 ???? 0001:"Rock",0002:"SCSA",0003:"Undertaker",0004:"Kane",0005:"Richards",0006:"Mankind",0007:"Cactus",0008:"Mick",0009:"HBK",0101:"HHH",0102:"X-Pac",0103:"Mr. Ass",0104:"Road Dogg",0201:"Benoit",0202:"Malenko",0203:"Saturn",0204:"Guerrero",0301:"Jericho",0302:"Angle",0303:"Tazz",0304:"Test",0305:"GodFather",0306:"D`Lo",0307:"Venis",0308:"Shamrock" cn Play As\Player 1\Option 2 cd Do not use this with anyother Play As Player 1 Option, only use one option at a time 810AAAD0 ???? 0401:"Rikishi",0402:"Sexay",0403:"Scotty",0404:"Edge",0405:"Christian",0406:"Matt",0407:"Jeff",0501:"Faarooq",0502:"Bradshaw",0503:"D-Von",0504:"Buh Buh",0505:"Hardcore",0506:"Crash",0507:"Bossman",0508:"Albert",0601:"Al",0602:"Blackman",0603:"Bulldog",0604:"Henry",0605:"Viscera",0606:"Andre",0607:"Buchanan",0608:"Rios",0609:"Taka",0701:"Chyna" cn Play As\Player 1\Option 3 cd Do not use this with anyother Play As Player 1 Option, only use one option at a time 810AAAD0 ???? 0702:"Stephanie",0703:"Tori",0704:"Debra",0705:"Trish",0706:"Lita",0801:"Jacqueline",0802:"Linda",0803:"Kat",0804:"Moola",0805:"Ho",0901:"Vince",0902:"Shane",0903:"Hebner",0904:"Jim Ross" cn Play As\Player 2\Option 1 cd Do not use this with anyother Play As Player 2 Option, only use one option at a time 810AAADC ???? 0001:"Rock",0002:"SCSA",0003:"Undertaker",0004:"Kane",0005:"Richards",0006:"Mankind",0007:"Cactus",0008:"Mick",0009:"HBK",0101:"HHH",0102:"X-Pac",0103:"Mr. Ass",0104:"Road Dogg",0201:"Benoit",0202:"Malenko",0203:"Saturn",0204:"Guerrero",0301:"Jericho",0302:"Angle",0303:"Tazz",0304:"Test",0305:"GodFather",0306:"D`Lo",0307:"Venis",0308:"Shamrock" cn Play As\Player 2\Option 2 cd Do not use this with anyother Play As Player 2 Option, only use one option at a time 810AAADC ???? 0401:"Rikishi",0402:"Sexay",0403:"Scotty",0404:"Edge",0405:"Christian",0406:"Matt",0407:"Jeff",0501:"Faarooq",0502:"Bradshaw",0503:"D-Von",0504:"Buh Buh",0505:"Hardcore",0506:"Crash",0507:"Bossman",0508:"Albert",0601:"Al",0602:"Blackman",0603:"Bulldog",0604:"Henry",0605:"Viscera",0606:"Andre",0607:"Buchanan",0608:"Rios",0609:"Taka",0701:"Chyna" cn Play As\Player 2\Option 3 cd Do not use this with anyother Play As Player 2 Option, only use one option at a time 810AAADC ???? 0702:"Stephanie",0703:"Tori",0704:"Debra",0705:"Trish",0706:"Lita",0801:"Jacqueline",0802:"Linda",0803:"Kat",0804:"Moola",0805:"Ho",0901:"Vince",0902:"Shane",0903:"Hebner",0904:"Jim Ross" cn Play As\Player 3\Option 1 cd Do not use this with anyother Play As Player 3 Option, only use one option at a time 810AAAE8 ???? 0001:"Rock",0002:"SCSA",0003:"Undertaker",0004:"Kane",0005:"Richards",0006:"Mankind",0007:"Cactus",0008:"Mick",0009:"HBK",0101:"HHH",0102:"X-Pac",0103:"Mr. Ass",0104:"Road Dogg",0201:"Benoit",0202:"Malenko",0203:"Saturn",0204:"Guerrero",0301:"Jericho",0302:"Angle",0303:"Tazz",0304:"Test",0305:"GodFather",0306:"D`Lo",0307:"Venis",0308:"Shamrock" cn Play As\Player 3\Option 2 cd Do not use this with anyother Play As Player 3 Option, only use one option at a time 810AAAE8 ???? 0401:"Rikishi",0402:"Sexay",0403:"Scotty",0404:"Edge",0405:"Christian",0406:"Matt",0407:"Jeff",0501:"Faarooq",0502:"Bradshaw",0503:"D-Von",0504:"Buh Buh",0505:"Hardcore",0506:"Crash",0507:"Bossman",0508:"Albert",0601:"Al",0602:"Blackman",0603:"Bulldog",0604:"Henry",0605:"Viscera",0606:"Andre",0607:"Buchanan",0608:"Rios",0609:"Taka",0701:"Chyna" cn Play As\Player 3\Option 3 cd Do not use this with anyother Play As Player 3 Option, only use one option at a time 810AAAE8 ???? 0702:"Stephanie",0703:"Tori",0704:"Debra",0705:"Trish",0706:"Lita",0801:"Jacqueline",0802:"Linda",0803:"Kat",0804:"Moola",0805:"Ho",0901:"Vince",0902:"Shane",0903:"Hebner",0904:"Jim Ross" cn Play As\Player 4\Option 1 cd Do not use this with anyother Play As Player 4 Option, only use one option at a time 810AAAF4 ???? 0001:"Rock",0002:"SCSA",0003:"Undertaker",0004:"Kane",0005:"Richards",0006:"Mankind",0007:"Cactus",0008:"Mick",0009:"HBK",0101:"HHH",0102:"X-Pac",0103:"Mr. Ass",0104:"Road Dogg",0201:"Benoit",0202:"Malenko",0203:"Saturn",0204:"Guerrero",0301:"Jericho",0302:"Angle",0303:"Tazz",0304:"Test",0305:"GodFather",0306:"D`Lo",0307:"Venis",0308:"Shamrock" cn Play As\Player 4\Option 2 cd Do not use this with anyother Play As Player 4 Option, only use one option at a time 810AAAF4 ???? 0401:"Rikishi",0402:"Sexay",0403:"Scotty",0404:"Edge",0405:"Christian",0406:"Matt",0407:"Jeff",0501:"Faarooq",0502:"Bradshaw",0503:"D-Von",0504:"Buh Buh",0505:"Hardcore",0506:"Crash",0507:"Bossman",0508:"Albert",0601:"Al",0602:"Blackman",0603:"Bulldog",0604:"Henry",0605:"Viscera",0606:"Andre",0607:"Buchanan",0608:"Rios",0609:"Taka",0701:"Chyna" cn Play As\Player 4\Option 3 cd Do not use this with anyother Play As Player 4 Option, only use one option at a time 810AAAF4 ???? 0702:"Stephanie",0703:"Tori",0704:"Debra",0705:"Trish",0706:"Lita",0801:"Jacqueline",0802:"Linda",0803:"Kat",0804:"Moola",0805:"Ho",0901:"Vince",0902:"Shane",0903:"Hebner",0904:"Jim Ross" cn Cannot Be Grabbed\Player 1 D115AEC6 0052 8115AEC6 0001 D115AEC6 00A1 8115AEC6 00C1 cn Cannot Be Punched\Player 1 D115AEC6 002D 8115AEC6 0001 D115AEC6 0035 8115AEC6 00C1 cn Cannot Be Knocked Down\Player 1 D115AEC6 0031 8115AEC6 0001 cn Wrestler Size & Shape\Player 1\Thin wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B468 3D80 cn Wrestler Size & Shape\Player 1\Wide wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B468 3FFF cn Wrestler Size & Shape\Player 1\Short wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B47C 3E80 cn Wrestler Size & Shape\Player 1\Tall wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B47C 3FFF cn Wrestler Size & Shape\Player 1\Flat wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B490 3D80 cn Wrestler Size & Shape\Player 1\Bulgy wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B490 3FFF cn Wrestler Size & Shape\Player 1\Giant wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B4A4 3E80 cn Wrestler Size & Shape\Player 1\Small wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8106B4A4 3FFF cn Wrestler Size & Shape\Player 2\Thin wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B528 3D80 cn Wrestler Size & Shape\Player 2\Wide wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B528 3FFF cn Wrestler Size & Shape\Player 2\Short wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B53C 3E80 cn Wrestler Size & Shape\Player 2\Tall wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B53C 3FFF cn Wrestler Size & Shape\Player 2\Flat wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B510 3DFF cn Wrestler Size & Shape\Player 2\Bulgy wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B510 3FFF cn Wrestler Size & Shape\Player 2\Giant wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B564 3E80 cn Wrestler Size & Shape\Player 2\Small wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B564 3FFF cn Wrestler Size & Shape\Player 3\Thin wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B5E8 3D80 cn Wrestler Size & Shape\Player 3\Wide wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B5E8 3FFF cn Wrestler Size & Shape\Player 3\Short wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B5FC 3E80 cn Wrestler Size & Shape\Player 3\Tall wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B5FC 3FFF cn Wrestler Size & Shape\Player 3\Flat wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B610 3D80 cn Wrestler Size & Shape\Player 3\Bulgy wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B610 3FFF cn Wrestler Size & Shape\Player 3\Giant wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B624 3E80 cn Wrestler Size & Shape\Player 3\Small wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B624 3FFF cn Wrestler Size & Shape\Player 4\Thin wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6A8 3D80 cn Wrestler Size & Shape\Player 4\Wide wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6A8 3FFF cn Wrestler Size & Shape\Player 4\Short wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6BC 3E80 cn Wrestler Size & Shape\Player 4\Tall wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6BC 3FFF cn Wrestler Size & Shape\Player 4\Flat wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6D0 3D80 cn Wrestler Size & Shape\Player 4\Bulgy wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6D0 3FFF cn Wrestler Size & Shape\Player 4\Giant wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6E4 3E80 cn Wrestler Size & Shape\Player 4\Small wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8006B6E4 3FFF cn Z LADDER cd Press Z for the ladder to appear, sometimes there is an invisable ladder D1064880 2000 8116C768 0000 D1064880 2000 8116C76A 0019 D1064880 2000 8116C76C 0000 D1064880 2000 8116C76E 0019 D1064880 2000 8116C788 8104 cn Replace Raw War with\TOKYO DOME cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 810528F4 7223 810528F6 0119 81050124 0100 81050126 0100 81050128 0100 8105012A 0100 8105012C 0100 8105012E 0100 81050130 0100 81050132 0100 81050134 0100 81050136 0100 8105010E 0999 81050400 03A5 81050402 0385 81050404 0385 81050406 0385 81050408 0385 8105040A 03A5 8105040C 03A5 8105040E 043F 81050430 043F 8105042C 03A5 81050430 21A5 81050432 0100 81050434 0000 81050436 2CFB 81050438 0899 8105043C 03AF 81050440 03AF 81050442 03A5 810500E8 24C3 81050444 0100 81050190 09EF 81050192 0000 81050194 09EF 81050196 2CFD cn Replace Raw War with\BARBEDWIRE ROPES cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 81050110 04F3 81050112 04F4 81050114 04F5 81050116 04F3 81050118 04F4 8105011A 04F5 8105011C 04F3 8105011E 04F4 81050120 04F5 81050124 2CFB 81050126 2CFB 81050128 2CFB 8105012A 2CFB 8105012C 2CFB 8105012E 2CFB 81050130 2CFB 81050132 2CFB 81050134 2CFB 81079D90 3F6C 81079D94 3F48 81079DA4 3D10 81079DB8 3F71 81079E6C 3F6C 81079E80 3D10 81079E90 3F47 81079F48 3F6C 81079F4C BF4C 81079F5C 3D10 81079F70 3F71 8107A024 3F6C 8107A028 3F28 8107A038 3D10 8107A04C 3F71 8107A100 3F6C 8107A114 3D10 8107A124 3F23 8107A1DC 3F6C 8107A1E0 BF2A 8107A1F0 3D10 8107A204 3F71 8107A2B8 3F6C 8107A2BC 3F02 8107A2CC 3D10 8107A2E0 3F71 8107A394 3F6C 8107A3A8 3D10 8107A3B8 3F00 8107A470 3F6C 8107A474 BF02 8107A484 3D10 8107A498 3F71 81050144 0569 81050154 07F7 810528F4 0C01 810528F6 0555 81050140 04F4 81050150 2CFB 8107A628 3F60 8107A63C 3D10 8107A64C 3F52 8107A650 BF80 8107A8BC 3F56 8107A8C4 BA00 8107A8D0 3D10 8107A8DC 3C5A 8107A8E0 3F30 8107A8E4 BF80 8107ADE4 3F56 8107ADEC BA00 8107ADF8 3D10 8107AE04 3C5A 8107AE08 3F0E 8107AE0C BF80 8107AB7C 3F00 D115AF56 2EB2 8115AEC6 0017 D115B2AE 2EB2 8115B21E 0017 D115B606 2EB2 8115B570 0017 D115B95E 2EB2 8115B8CE 0017 81052922 FFFF 81052924 FFFF 81052926 FFFF cn Replace Raw War with\BARBEDWIRE SQUARE\Part 1 cd Both Parts must be on for this Press the C Left Button to make your opponent bleed,These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 81050110 04F3 81050112 04F4 81050114 04F5 81050116 04F3 81050118 04F4 8105011A 04F5 8105011C 04F3 8105011E 04F4 81050120 04F5 81050124 2CFB 81050126 2CFB 81050128 2CFB 8105012A 2CFB 8105012C 2CFB 8105012E 2CFB 81050130 2CFB 81050132 2CFB 81050134 2CFB 81079D90 3F6C 81079D94 3F48 81079DA4 3D10 81079DB8 3F71 81079E6C 3F6C 81079E80 3D10 81079E90 3F47 81079F48 3F6C 81079F4C BF4C 81079F5C 3D10 81079F70 3F71 8107A024 3F6C 8107A028 3F28 8107A038 3D10 8107A04C 3F71 8107A100 3F6C 8107A114 3D10 8107A124 3F23 8107A1DC 3F6C 8107A1E0 BF2A 8107A1F0 3D10 8107A204 3F71 8107A2B8 3F6C 8107A2BC 3F02 8107A2CC 3D10 8107A2E0 3F71 8107A394 3F6C 8107A3A8 3D10 8107A3B8 3F00 8107A470 3F6C 8107A474 BF02 8107A484 3D10 8107A498 3F71 81050144 0569 81050154 07F7 810528F4 0C01 810528F6 0555 81050140 04F4 81050150 2CFB 8107A628 3F60 8107A63C 3D10 8107A64C 3F52 8107A650 BF80 8107A8BC 3F56 8107A8C4 BA00 8107A8D0 3D10 8107A8DC 3C5A 8107A8E0 3F30 8107A8E4 BF80 8107ADE4 3F56 8107ADEC BA00 8107ADF8 3D10 8107AE04 3C5A 8107AE08 3F0E 8107AE0C BF80 8107AB7C 3F00 D115AF56 2EB2 8115AEC6 0017 D115B2AE 2EB2 8115B21E 0017 D115B606 2EB2 8115B570 0017 D115B95E 2EB2 8115B8CE 0017 81052922 FFFF 81052924 FFFF 81052926 FFFF 8116C330 0000 8116C332 000A 8116C334 0000 8116C336 000A 8116C378 42B4 cn Replace Raw War with\BARBEDWIRE SQUARE\Part 2 cd Both Parts must be on for this Press the C Left Button to make your opponent bleed,These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8116C382 0000 8116C38C FFFF 81052C9C 0672 81052CA4 2CFB D1064880 0002 8115B21E 002F D1064886 0002 8115AEC6 002F 8116C3E4 0000 8116C3E6 000C 8116C3E8 0000 8116C3EA 000C 8116C428 C3D4 8116C440 FFFF 81052CB2 2CC2 81052CB4 0805 81052CB6 2CFB D1064880 2000 8116C3E6 001F D1064880 2000 8116C3EA 001F D1064880 2000 81005592 3F81 D1005592 3F81 8116C3E6 001F D1064880 2000 81005592 3F81 D1005592 3F81 8116C3EA 001F D1064886 2000 8116C3E6 001F D1064886 2000 8116C3E6 001F D1064886 2000 81005592 3F81 D1005592 3F81 8116C3EA 001F 81052CF8 04F4 81052D00 2CFB 8116C3E4 0000 8116C3E6 0015 8116C3E8 0000 8116C3EA 0015 8116C428 0000 8116C42A 0000 8116C42C 43EB 8116C42E 0000 8116C430 C3A6 8116C432 0000 8116C436 0400 8116C43A 0000 8116C43E 0000 8116C440 FFFF 8116C442 0000 810855A8 3F00 81085684 3F00 81085750 3F00 8108583C 3F00 81050100 2CFB 8105010E 2CFB cn Replace Raw War with\FLAMING TURNBUCKLES cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8116C334 FFFF 8116C336 001F 8116C374 C350 8116C376 FFF3 8116C378 4377 8116C37A 2689 8116C37C C380 8116C37E 0406 8116C382 0D14 8116C386 0FCC 8116C38A 07DC 8116C38C FFFF 8116C38E FDE3 8116C3E8 FFFF 8116C3EA 001F 8116C428 C360 8116C42C 4370 8116C430 4376 8116C436 0D14 8116C43A 0FCC 8116C43E 07DC 8116C442 F9C4 8116C49C FFFF 8116C49E 001F 8116C4DC 4360 8116C4E0 4370 8116C4E4 4380 8116C4EA 0CD0 8116C4EE 0136 8116C4F2 04EE 8116C4F6 F601 8116C550 FFFF 8116C552 001F 8116C590 434F 8116C594 4370 8116C598 C36C 8116C59E 0E70 8116C5A2 0F58 8116C5A6 0814 8116C5AA F1E6 cn Replace Raw War with\REMOVE RING cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 81050150 0000 81050152 0000 81050154 0000 810500E8 0000 810855A8 3F00 81085684 3F00 81085750 3F00 8108583C 3F00 81079C08 3F00 81079C14 3F00 81079B10 3F00 cn Replace Raw War with\BACKYARD ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105010E 0F76 8105010C 0F76 810482E8 002F 81050150 2CFD 810528F4 33FF 810528F6 33FF 81050152 2DC7 81050114 04F4 81050116 04F5 8105011E 04F3 81050128 07FF 8105012A 07FF 81050132 07FF 81079F48 400C 81079F5C 3F00 81079F70 3FFF 8107A024 4010 8107A038 3F00 8107A04C 4020 8107A060 3F84 8107A394 4012 8107A3A8 3F00 8107A3BC 4030 8107A3D0 3F84 8105042C 0949 81050436 07FF 81050438 07FF 8105043A 07FF 8105043C 0000 8105043E 07FF 81050440 0949 81050442 0949 81050430 0F76 81050128 07FF 8105012A 07FF 8105012C 0000 8105012E 07FF 81050130 07FF 81050132 07FF 81050134 0000 81050136 08F9 81050196 2CFD 81050194 09EF 81050192 0000 81050190 09EF 8116C49E 0019 8116C4B8 0004 8116C4DC C2E1 8116C4E0 42B4 810500FE 2D2D 81050100 2D2D 81050102 2D2D 81050400 2DC7 81050402 2DC7 81050404 2DC7 81050406 2DC7 81050408 2DC7 8105040A 2DC7 8105040C 2DC7 8105040E 2DC7 50001002 0000 810501B8 0000 50000402 0000 810501E0 0000 50000902 0000 81050262 0000 50001402 0000 81050290 0000 50002C02 0000 810502EC 0000 8107941C 3FE0 81079428 3FFF 810500EC 06FE 810500EE 06FD 810500F8 07FF 810500FA 0997 81050110 06FC 81050112 06FB 8105011A 06FF 8105011C 06FA 81052CF0 2CC9 81052CF4 2D1B 81052CD0 2CD1 81052CD4 0963 81052C84 2CBF 81052C8A 0961 81052CB8 2CC4 81052CBC 2DD7 81052CC8 2CD1 81052CCC 2CFB 81052C78 2CBC 81052C80 2D31 81052CF8 2CC1 81052D00 2DD7 cn Replace Raw War with\BACKYARD WEAK cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 0E88 8105042E 2D0D 81050430 2D0D 81050432 2D0D 81050434 2D0D 81050436 07FD 8105043A 2CFB 8105043C 2D0D 8105043E 2D0D 81050440 2D0D 81050442 2D0D 810500E8 2D0D 8105010E 2D0D 8105010C 2D0D 81050150 2D0D 81050196 2CFB 81050124 2CFB 81050126 2CFB 81050128 2CFB 8105012A 2CFB 8105012C 2CFB 8105012E 2CFB 81050130 2CFB 81050132 2CFB 81050134 2CFB 81050136 2CFB 81050400 2D0D 81050402 2D0D 81050404 2D0D 81050406 2D0D 81050408 2D0D 8105040A 2D0D 8105040C 2D0D 8105040E 2D0D 810528F4 2D0D 810528F6 2D0D 81052CE8 2CC9 81052CEC 2D2D cn Replace Raw War with\BARBEDWIRE ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 2CFB 8105042E 2CFB 81050430 2CFB 81050432 2CFB 81050434 2CFB 81050436 2CFB 81050438 2CFB 8105043A 2CFB 8105043C 2CFB 8105043E 2CFB 81050440 2CFB 81050442 2CFB 810500E8 2CFB 8105010E 2CFB 8105010C 2CFB 81050150 2CFB 81050196 2CFB 81050124 2CFB 81050126 2CFB 81050128 2CFB 8105012A 2CFB 8105012C 2CFB 8105012E 2CFB 81050130 2CFB 81050132 2CFB 81050134 2CFB 81050136 2CFB 810528F4 DDDD 810528F6 DDDD 81052CE8 2CCA 81052CEC 2CFB 81050400 2CFB 81050402 2CFB 81050404 2CFB 81050406 2CFB 81050408 2CFB 8105040A 2CFB 8105040C 2CFB 8105040E 2CFB cn Replace Raw War with\DUDLEY ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 21A7 8105042E 2D0D 81050432 2D0D 81050436 21A7 8105043E 2D0D 81050440 0000 81050442 0000 810500E8 2D0D 8105010C 2CFD 8105010E 2CFD 81050150 2D29 81050152 2CFB 81050400 09EF 81050402 09EF 81050404 0000 81050406 0000 81050408 0000 8105040A 0000 8105040C 09EF 8105040E 09EF 81050188 04F6 8105018A 04F7 8105018C 04F8 8105018E 04F9 81050190 09EF 81050192 0000 81050194 09EF 81050196 2D0D 810528F4 6666 810528F6 6666 81052CE8 2CC2 81052CEC 2D0D 81052D1C 2CD3 81052D1E 2CD4 81052D20 2CD5 81052D22 2CD6 81052D24 2CFD 81052D26 2CFD 81052D28 2CFB 81052D2A 2CFB 81050124 2CFD 81050126 2CFD 81050128 2CFD 8105012A 2CFD 8105012C 2CFD 8105012E 2CFD 81050130 2CFD 81050132 2CFD 81050134 2CFD 81050136 2CFD 81050154 2CFB 811533F8 002E cn Replace Raw War with\FLAME ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105010E 0EFE 8105010C 0EFE 810528F4 2508 810528F6 2508 81050430 2401 81050430 2401 81050404 2401 81050406 2401 81050408 2401 81050409 2401 8105040A 2401 8105040C 2401 810500E8 2401 cn Replace Raw War with\GREENWICH STREET ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 81050430 2DC5 81050436 0000 81050438 0000 8105043A 0000 8105043E 0000 810504E8 0EFE 8105010E 2DC5 8105010C 2DC5 81050196 2CFD 81050136 0FB6 81050134 0FC6 81050132 0FB6 81050130 0FC6 8105012E 0FB6 8105012C 0FC6 8105012A 0FB6 81050128 0FC6 81050126 0FB6 81050124 0FC6 81050440 0000 81050442 0000 50002C02 0000 81050378 0000 50002C02 0000 810502EC 0000 50001402 0000 81050290 0000 50000902 0000 81050262 0000 50000402 0000 810501CE 0000 50001002 0000 810501B8 0000 50000402 0000 810501E0 0000 8105042C 2D0D 81050430 0000 81050150 24F0 cn Replace Raw War with\HHH ARNEA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105040E 24EF 8105040C 24EF 8105040A 24EF 81050408 24EF 81050406 24EF 81050404 24EF 81050402 24EF 81050400 24EF 81050436 24E9 81050440 24E9 81050442 24E9 8105043E 24EF 8105042E 24EF 8105043C 24EF 8105042C 24E9 8105010E 24E9 8105010C 24E9 81050196 24E9 8105042E 24EF 81050432 24EF 810500F8 24EF 810500FA 24EF 810500FC 24EF 810500FC 24EF 81050100 24EF 81050100 24EF 81052CE8 2CCA 81052CEC 24EF 81050150 24E9 81050152 24E9 81050154 24E9 810528F4 24E9 810528F6 24E9 cn Replace Raw War with\HOSPITAL ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 0949 8105042E 283F 81050428 0949 81050430 0949 81050430 0949 81050436 096B 81050438 0993 8105043A 096B 8105043E 283F 81050440 283F 81050442 283F 810504E8 0949 81050150 283F 81050196 283F 81050400 283F 81050402 283F 81050404 283F 81050406 283F 81050408 283F 8105040A 283F 8105040C 283F 8105040E 283F 810500F8 283F 810500FA 283F 810500FC 283F 810500FE 283F 81050100 283F 81050100 283F 81052CE8 2CCA 81052CEC 283F 8105010E 283F 8105010C 283F 81050124 0949 81050126 0949 81050128 0949 8105012A 0949 8105012C 0949 8105012E 0949 81050130 0949 81050132 0949 81050134 0949 81050136 0949 810500E8 0949 810528F4 0000 81052CE0 2CC9 cn Replace Raw War with\KANE ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 0A61 8105042E 0A61 81050428 2B6C 81050430 2B6C 81050430 2B6C 81050436 2B57 81050438 2B57 8105043A 2B57 8105043E 0A61 81050440 2B57 81050442 2B57 810500E8 1B1E 8105010E 2D37 8105010C 209F 81050194 0955 81050196 2B57 81050400 2699 81050402 2699 81050404 2699 81050406 2699 81050408 2699 8105040A 2699 8105040C 2699 8105040E 2699 cn Replace Raw War with\SHIMMER ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 1932 8105042E 1932 81050430 1932 81050434 1932 81050432 1932 81050436 1932 81050438 1932 8105043A 1932 8105043E 1932 81050440 1932 81050442 1932 81050150 1932 81050152 1932 81050154 1932 81050190 1932 81050192 1932 81050194 1932 81050196 1932 81050124 1932 81050126 1932 81050128 1932 8105012A 1932 8105012C 1932 8105012E 1932 81050130 1932 81050132 1932 81050134 1932 81050136 1932 810500E8 1932 8105010E 1932 8105010C 1932 cn Replace Raw War with\SPACE SHIP ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 094D 8105042E 0953 81050430 0953 81050432 0F0E 81050434 0953 81050436 0F0E 81050438 0899 8105043C 0953 8105043E 0899 81050440 0963 81050442 0963 81050400 0953 81050402 0953 81050404 0953 81050406 0953 81050408 0953 8105040A 0953 8105040C 0953 8105040E 0953 810500E8 0A75 810528F4 7223 810528F6 0119 81050150 0963 81050152 0963 81050190 0953 81050192 0953 81050194 0953 81050196 0963 8105010E 0F0E 8105010C 0F0E 81050124 0F10 81050126 0F10 81050128 0F10 8105012A 0F10 8105012C 0F10 8105012E 0F10 81050130 0F10 81050132 0F10 81050134 0F10 81050136 0F10 810500F8 0963 810500FA 0963 810500FC 0963 810500FE 0963 81050100 0963 81050102 0963 81052CE8 2CCA 81052CEC 0963 cn Tables\IN RING TABLE\Part 1 cd To Make the Table look broken Keep the Z Button press down, To make player stand on the Table, Stand next to it & Keep C-Right Pressed Down.Put all Parts on Together for this Cheat to work 81052CF0 06E1 81052CF4 09F1 81052CF8 06E2 81052D00 09F1 81052D0C 06E3 81052D0E 06E4 81052D10 09EF 81052D12 09EF 81052D14 06E5 81052D16 06E6 81052D18 09EF 81052D1A 09EF D1064880 0001 8115AFB0 432C D1064880 0001 8115B308 432C D1064880 2000 8115AFB0 42B4 D1064880 2000 8115B308 42B4 8116C330 0000 8116C332 0014 8116C334 0000 8116C336 0014 8116C374 4210 8116C376 C0B1 8116C378 432F 8116C37A 51DC 8116C37C 4210 8116C37E 92F1 8116C382 0800 8116C386 05A0 8116C38A 0800 8116C38C FFFF 8116C38E F3BC 8116C3E4 0000 8116C3E6 0015 8116C3E8 0000 8116C3EA 0015 8116C428 4210 8116C42A C0B1 8116C42C 432F 8116C42E 51DC 8116C430 4210 8116C432 92F1 8116C436 0800 8116C43A 05A0 8116C43E 0800 8116C440 FFFF 8116C442 F3BC D1064880 2000 8116C378 42E0 cn Tables\IN RING TABLE\Part 2 cd To Make the Table look broken Keep the Z Button press down, To make player stand on the Table, Stand next to it & Keep C-Right Pressed Down.Put all Parts on Together for this Cheat to work D1064880 2000 8116C382 07E0 D1064880 2000 8116C38A 0680 D1064880 2000 8116C42C 42E0 D1064880 2000 8116C436 0820 D1064880 2000 8116C43E 0980 8116C498 0000 8116C49A 0017 8116C49C 0000 8116C49E 0017 8116C4DC 4210 8116C4DE C0B1 8116C4E0 432A 8116C4E2 51DC 8116C4E4 4210 8116C4E6 92F1 8116C4EA 0800 8116C4EE 05A0 8116C4F2 0800 8116C4F4 FFFF 8116C4F6 F3BC 8116C54C 0000 8116C54E 0018 8116C550 0000 8116C552 0018 8116C590 4210 8116C592 C0B1 8116C594 432A 8116C596 51DC 8116C598 4210 8116C59A 92F1 8116C59E 0800 8116C5A2 05A0 8116C5A6 0800 8116C5A8 FFFF 8116C5AA F3BC D1064880 2000 8116C4E0 42E0 D1064880 2000 8116C4EA 07E0 D1064880 2000 8116C4F2 0680 D1064880 2000 8116C594 42E0 D1064880 2000 8116C59E 0820 D1064880 2000 8116C5A6 0980 cn Novalty\Truck In The Crowd 81050110 0747 81050112 0748 81050114 0749 81050116 074A 81050118 074B 81050124 0A4B 81050126 0A43 81050128 0A4B 8105012A 0A43 8105012C 0A43 8105012E 0A43 8105011A 074C 8105011C 074D 81050130 0A43 8105011E 074E 81050132 0A43 81050120 0746 81050134 0A4B 81050122 0743 81050136 0A4B D1064880 2000 8115AFB0 42EE D1064880 2000 8115B308 42EE cn CPU To Human Control\Player 4 8015B9A1 ???? 0017:"Human",0018:"CPU" cn Clock At 00:00 8115AB1E 0000 810A99F2 0000 cn Hacked Moves\Dragon Screw Stunner cd Dragon Screw 02 P1 does a Dragon Screw then picks up P2 (still holding his leg) and spins him around and gives him a Stone Cold Stunner D106B454 3749 D106B456 0094 8106B460 00E9 D106B454 3749 D106B456 0094 8106B462 B9BE D106B514 374A D106B516 0094 8106B520 00E9 D106B514 374A D106B516 0094 cn Hacked Moves\Morality Check to Back of head cd Replaces: Back Clothesline P1 is immediately backed up and does the Morality Check to P2 in the back of the head (misses by a little) D106B454 3892 D106B456 0000 8106B460 00B3 D106B454 3892 D106B456 0000 8106B462 194C cn Hacked Moves\Dragon Screw Suplex cd Replaces: Double Dragon Screw 02 P1 does a Dragon screw then picks then up (still holding their feet) and does a capture suplex. D106B454 3749 D106B456 007C 8106B460 00AD D106B454 3749 D106B456 007C 8106B462 DB2A D106B514 374A D106B516 007C 8106B520 00AD D106B514 374A D106B516 007C 8106B522 EAE0 D106B454 3749 D106B456 00A5 8115AF52 0000 D106B514 374A D106B516 00A5 8115B2AA 0000 cn Hacked Moves\Dominator into HHH Facebuster cd Replaces: Dominator D106B454 3810 D106B456 005C 8106B560 011A D106B454 3810 D106B456 005C 8106B562 A256 D106B514 3811 D106B516 005C 8106B520 011A D106B514 3811 D106B516 005C 8106B522 ACB0 D106B454 3810 D106B456 0075 8115AF52 0000 cn Hacked Moves\Capture Tazzplex cd Replaces: Capture Suplex P1 grabs P2's feet like a capture suplex, then lets go & does a Tazzplex. D106B454 3689 D106B456 0021 8106B460 00BC D106B454 3689 D106B456 0021 8106B462 A5E2 D106B514 368A D106B516 0021 8106B520 00BC D106B514 368A D106B516 0021 8106B522 B6BE cn Hacked Moves\Running Rock Bottom cd Replaces: Farooq Spinebuster P2 runs into P1 and P1 delivers a RockBottom to P2. D106B454 3A80 D106B456 0000 8106B460 00C1 D106B454 3A80 D106B456 0000 8106B462 F7A2 D106B514 3A81 D106B516 0000 8106B520 00C2 D106B514 3A81 D106B516 0000 8106B522 1210 cn Hacked Moves\Running Tazplex cd Replaces: Underhook Belly to Belly P2 runs into P1 and P1 does a Tazplex to P2. D106B454 3A7A D106B456 0000 8106B460 00BC D106B454 3A7A D106B456 0000 8106B462 A51E D106B514 3A7B D106B516 0000 8106B520 00BC D106B514 3A7B D106B516 0000 8106B522 B5FA cn Tables\MOVABLE TABLES\Part 1 cd You must use both parts for this cheat to work 81052C24 06E1 81052C26 06E3 81052C2C 09F1 81052C2E 09EF 81052C30 06E2 81052C32 06E5 81052C38 09F1 81052C3A 09EF 81052C48 06E4 81052C4A 06E6 81052C50 09EF 81052C52 09EF 8116C3E4 0000 8116C3E6 0001 8116C3E8 0000 8116C3EA 0001 8116C498 0000 8116C49A 0003 8116C49C 0000 8116C49E 0003 8116C330 0000 8116C332 0000 8116C334 0000 8116C336 0000 D116C556 0000 8116C33A 0000 D116C33A 0000 8116C3EE 0000 D116C3EE 0000 8116C4A2 0000 D116C556 0001 8116C33A 0001 D116C33A 0001 8116C3EE 0001 D116C3EE 0001 8116C4A2 0001 D116C556 0002 8116C33A 0002 D116C33A 0002 8116C3EE 0002 D116C3EE 0002 8116C4A2 0002 D116C556 0003 8116C33A 0003 D116C33A 0003 8116C3EE 0003 D116C3EE 0003 8116C4A2 0003 D116C556 FFFF 8116C33A FFFF D116C33A FFFF 8116C3EE FFFF D116C3EE FFFF 8116C4A2 FFFF D216C556 FFFF 81079B10 3F80 D1064886 2000 81079B10 3F81 D106488C 2000 81079B10 3F81 D1064892 2000 81079B10 3F81 cn Tables\MOVABLE TABLES\Part 2 cd You must use both parts for this cheat to work D116C33A FFFF 8116C382 0000 D116C382 0000 8116C386 0000 D116C386 0000 8116C38A 0000 D116C38A 0000 8116C38E 0000 D116C38E 0000 8116C436 0000 D116C436 0000 8116C43A 0000 D116C43A 0000 8116C43E 0000 D116C43E 0000 8116C442 0000 D116C442 0000 8116C4EA 0000 D116C4EA 0000 8116C4EE 0000 D116C4EE 0000 8116C4F2 0000 D116C4F2 0000 8116C4F6 0000 D116C594 42B4 D116C556 FFFF 8116C378 4335 D116C378 4335 8116C42C 4335 D116C42C 4335 8116C4E0 4335 D116C594 3DC7 D116C556 FFFF 8116C378 42B0 D116C378 42B0 8116C42C 42B0 D116C42C 42B0 8116C4E0 42B0 D1064880 2000 81079B10 3F81 D1079B10 3F81 D116C594 42B4 D116C556 FFFF 8116C378 42F0 D116C378 42F0 8116C42C 42F0 D116C42C 42F0 8116C4E0 42F0 D1079B10 3F81 8116C38A 0F00 D116C38A 0F00 8116C43E 0100 D116C594 3C93 8116C378 42B0 81052D18 0000 81052D1A 0000 D116C54C 0000 8116C54E 0018 D116C550 0000 8116C552 0018 cn Tables\Sabu Table cd Breakable/Fixable/Rebreakable/Refixable press Z to break, C-right + Cdown to fix 8116C49A 000C 8116C49E 000C 8116C4DC 43CC 8116C4E0 42E6 8116C4E4 C2C5 8116C4EE 0800 8116C602 000C 8116C606 000C 8116C648 42E6 8116C644 43CC 8116C64C C314 81052C54 06E3 81052C5C 09EF 8116C6F8 43CC 8116C6FC 42F0 8116C700 C2F1 8116C70A 0400 8116C428 43CC 8116C430 C2D0 8116C42C 42F0 8116C43A 0C00 8116C6B6 0004 8116C6BA 0004 8116C3E6 0004 8116C3EA 0004 D1064880 2000 81005592 3F81 D1005592 3F81 8116C4EA 0F00 D1005592 3F81 8116C652 0100 D1005592 3F81 8116C4E0 4240 D1005592 3F81 8116C648 4240 D1064880 0005 81005CD4 3F83 D1005CD4 3F83 8116C4EA 0000 D1005CD4 3F83 8116C652 0000 D1005CD4 3F83 8116C4E0 42E6 D1005CD4 3F83 8116C648 42E6 D1005CD4 3F83 D1064880 2000 81005CD4 0000 crc CD5BEC0F-86FD1008-C:45 gn WWF War Zone (U) cn Extra Characters 8113A488 1000 8113A48A 07FF 8113A48C 2000 8113A48E 3FFF cn Infinite Creation Points 80136245 0000 crc 90A59003-31089864-C:45 gn WWF WrestleMania 2000 (U) cn Have All Characters 8109ED5A FFFF cn Infinite Create-A-Wrestler Attribute Points 8011A81B 001E cn Timer Is Always 00:00 8016F0AF 0000 cn Max Attributes 50000502 0000 8011A811 0032 cn Weapon Select\Player 1 81167236 0300 81166D90 ???? 0000:"Broom",0101:"Shovel",0202:"Red And White Hockey Stick",0303:"Guitar",0404:"Night Stick",0505:"Head",0606:"Black Hockey Stick",0707:"Bottle",0808:"2x4",0909:"Big Purple Sheet",0A0A:"White Jug",0B0B:"Suit Case",0C0C:"Stick",0D0D:"Head",0E0E:"Big Mallot",0F0F:"Black Microphone",1010:"BaseBall Bat",1111:"Folding Chair",1212:"Board",1313:"Stairs",1414:"Trashcan",FFFF:"Nothing" 81166D92 0000 80166E50 0000 cn Weapon Select\Player 2 811676CA 0300 81166DC0 ???? 0000:"Broom",0101:"Shovel",0202:"Red And White Hockey Stick",0303:"Guitar",0404:"Night Stick",0505:"Head",0606:"Black Hockey Stick",0707:"Bottle",0808:"2x4",0909:"Big Purple Sheet",0A0A:"White Jug",0B0B:"Suit Case",0C0C:"Stick",0D0D:"Head",0E0E:"Big Mallot",0F0F:"Black Microphone",1010:"BaseBall Bat",1111:"Folding Chair",1212:"Board",1313:"Stairs",1414:"Trashcan",FFFF:"Nothing" 80166DC2 0001 80166E51 0001 cn Weapon Select\Player 3 81167B5E 0300 81166DF0 ???? 0000:"Broom",0101:"Shovel",0202:"Red And White Hockey Stick",0303:"Guitar",0404:"Night Stick",0505:"Head",0606:"Black Hockey Stick",0707:"Bottle",0808:"2x4",0909:"Big Purple Sheet",0A0A:"White Jug",0B0B:"Suit Case",0C0C:"Stick",0D0D:"Head",0E0E:"Big Mallot",0F0F:"Black Microphone",1010:"BaseBall Bat",1111:"Folding Chair",1212:"Board",1313:"Stairs",1414:"Trashcan",FFFF:"Nothing" 80166DF2 0002 80166E52 0002 cn Weapon Select\Player 4 81167FF2 0300 81166E18 ???? 0000:"Broom",0101:"Shovel",0202:"Red And White Hockey Stick",0303:"Guitar",0404:"Night Stick",0505:"Head",0606:"Black Hockey Stick",0707:"Bottle",0808:"2x4",0909:"Big Purple Sheet",0A0A:"White Jug",0B0B:"Suit Case",0C0C:"Stick",0D0D:"Head",0E0E:"Big Mallot",0F0F:"Black Microphone",1010:"BaseBall Bat",1111:"Folding Chair",1212:"Board",1313:"Stairs",1414:"Trashcan",FFFF:"Nothing" 81166E1A 0003 80166E53 0003 cn Always Special\Player 1 80167235 0004 cn Always Special\Player 2 801676C9 0004 cn Always Special\Player 3 80167B5D 0004 cn Always Special\Player 4 80167FF1 0004 cn Specials Don't Run Out 8112AD94 2400 cn Max Spirit\Player 1 801671F5 00FF cn Always Normal Spirit\Player 1 801671F5 0032 cn No Spirit\Player 1 801671F5 0000 cn Max Spirit\Player 2 80167689 00FF cn Always Normal Spirit\Player 2 80167689 0032 cn No Spirit\Player 2 80167689 0000 cn Max Spirit\Player 3 80167B1D 00FF cn Always Normal Spirit\Player 3 80167B1D 0032 cn No Spirit\Player 3 80167B1D 0000 cn Max Spirit\Player 4 80167FB1 00FF cn Always Normal Spirit\Player 4 80167FB1 0032 cn No Spirit\Player 4 80167FB1 0000 cn Ultimate Codes\Player 1 801671F4 0064 cn Ultimate Codes\Player 2 80167688 0064 cn Ultimate Codes\Player 3 80167B1C 0064 cn Ultimate Codes\Player 4 80167FB0 0064 cn Easy Pins & Longer Submissions\Player 2 80167688 0064 cn Easy Pins & Longer Submissions\Player 3 80167B1C 0064 cn Easy Pins & Longer Submissions\Player 4 80167FB0 0064 cn Easy Pins & Longer Submissions\Player 1 801671F4 0064 crc 0553AE9D-EAD8E0C1-C:45 gn Xena Warrior Princess: The Talisman of Fate (U) cn 1 Hit to Kill Opponent\Player 1 D10B6354 42C8 810B6354 4080 cn Opponent Has No Energy\Player 1 810B6354 C080 cn Player 2 Never Wins 800C0C05 0000 cn Infinite Health\Player 1 810B6170 42C8 cn Infinite Health\Player 2 810B6354 42C8 cn 1 Hit to Kill Opponent\Player 2 D10B6170 42C8 810B6170 4080 cn Opponent Has No Energy\Player 2 810B6170 C080 cn Player 1 Never Wins 800C0C03 0000 cn Unlock Titan Difficulty Level 810BF752 0001 crc 2337D8E8-6B8E7CEC-C:45 gn Yoshi's Story (U) cn Infinite\Health cd This is for All Yoshis All levels 8102B780 2400 cn Infinite\Eggs Once You Get One cd This is for All Yoshis All levels 8103E89C 2400 cn Infinite\Lives cd This is for All Yoshis All levels 800F8DF7 00FF crc 1D4136F3-AF63EEA9-C:45 gn Legend of Zelda, The - Ocarina of Time - Master Quest (E) [f1] (NTSC) cn Infinite\Rupees cd This cheat allows you to have the max Rupees to the Wallet you currently Hold 81119D04 0001 cn Max\Double Defense Power cd This gives you White Border Hearts 80118A07 0014 cn Use Any Item In Any House cd do not use under or in water 81119B5A 0000 81119B5C 0000 cn Have\All Equipment cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 811189D4 7777 cn Have\All Quest/Status Items cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 811189DC 30FF 811189DE FFFF cn Max\Heart Containers 81118966 0140 cn Max\Gold Skulltulas Killed 80118A09 0064 cn Time of Day Modifier 81118944 ???? 4000:"At Sunrise",5800:"Daylight Out",7000:"Very Bright Out",C000:"At Sunset",D000:"Fairly Dark" cn Infinite\Energy 81118968 0140 cn Infinite\Magic D0118971 0008 80118972 0001 80118974 0001 8011896B 0060 cn Tunic & Boot Options cd This changes what you are wearing,once you have enabled the code press Start & then start again. 801189A8 ???? 0011:"Kokiri Tunic & Kokiri Boots",0012:"Goron Tunic & Kokiri Boots",0013:"Zora Tunic & Kokiri Boots",0014:"Black Tunic & Kokiri Boots",0015:"White Tunic & Kokiri Boots",0016:"Yellow Tunic & Kokiri Boots",0021:"Kokiri Tunic & Iron Boots",0022:"Goron Tunic & Iron Boots",0023:"Zora Tunic & Iron Boots",0024:"Black Tunic & Iron Boots",0025:"White Tunic & Iron Boots",0026:"Yellow Tunic & Iron Boots",0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Infinite\Deku Sticks 801189C4 0009 cn Infinite\Deku Nuts 801189C5 0009 cn Infinite\Bombs 801189C6 0009 cn Infinite\Arrows 801189C7 0009 cn Infinite\Deku Seeds 801189CA 0009 cn Infinite\Bombchu's 801189CC 0009 cn Infinite\Magic Beans 801189D2 0009 cn Infinite\Big Key,Small Keys,Compass,& Map 801189E0 0007 801189E1 0007 801189E2 0007 801189E3 0007 801189E4 0007 801189E5 0007 801189E6 0007 801189E7 0007 801189E8 0007 801189E9 0007 801189EA 0007 801189F7 0009 801189F8 0009 801189F9 0009 801189FA 0009 801189FB 0009 80118A01 0009 80118A04 0009 801189FF 0009 cn Have\Ocarina 801189B3 ???? 0007:"Fairy Ocarina",0008:"Ocarina Of Time" cn Have\Boomerang 801189B8 000E cn Have\Lens of Truth 801189B9 000F cn Have\Megaton Hammer 801189BB 0011 cn Have\Deku Stick 801189AC 0000 cn Have\Deku Nut 801189AD 0001 cn Have\Bombs 801189AE 0002 cn Have\Fairy Bow 801189AF 0003 cn Have\Fairy Slingshot 801189B2 0006 cn Have\Bombchu 801189B4 0009 cn Have\Arrows\Fire Arrow 801189B0 0004 cn Have\Arrows\Ice Arrow 801189B6 000C cn Have\Arrows\Light Arrow 801189BC 0012 cn Have\Hookshot 801189B5 ???? 000A:"Hookshot",000B:"Longshot" cn Have\Magic Beans 801189BA 0010 cn Have\Magic\Fairie's Wind 801189B7 000D cn Have\Magic\Nayru's Love 801189BD 0013 cn Have\Magic\Din's Fire 801189B1 0005 cn Bottles\Bottle 1 Modifier 801189BE ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 2 Modifier 801189BF ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 3 Modifier 801189C0 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 4 Modifier 801189C1 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Trading\Adult Link Item 801189C2 ???? 002D:"Pocket Egg",002E:"Pocket Cucco",002F:"Cojiro",0030:"Odd Mushroom",0031:"Odd Potion",0032:"Poacher's Saw",0033:"Goron's Sword (Broken)",0034:"Prescription",0035:"Eyeball Frog",0036:"Eye Drops",0037:"Claim Check" cn Trading\Young Link Item 801189C3 ???? 0021:"Weird Egg",0022:"Chicken",0023:"Zelda's Letter",0024:"Keaton Mask",0025:"Skull Mask",0026:"Spooky Mask",0027:"Bunny Hood",0028:"Goron Mask",0029:"Zora Mask",002A:"Gerudo Mask",002B:"Mask of Truth",002C:"SOLD OUT" cn Turn Giant's Knife Into Biggoron's Sword 80118976 0001 cn Have Quiver (Holds 30) 801189D9 0001 cn Equipment Modifier 1 cd This modifies the equipment you are carrying. 801189DA ???? 0002:"Silver Scale",0004:"Golden Scale",0006:"Giant's Knife (Broken)",0035:"Black Gauntlets",0040:"Bullet Bag (Holds 30)",0080:"Bullet Bag (Holds 40)",00C0:"Bullet Bag (Holds 50)" cn Equipment Modifier 2 cd This modifies the equipment you are carrying. 801189DB ???? 0008:"Bomb Bag (Holds 20)",0010:"Bomb Bag (Holds 30)",0018:"Bomb Bag (Holds 40)",0020:"Goron's Bracelet",0028:"Silver Gauntlets",0030:"Golden Gauntlets" cn Warp Song Location\Minuet of Forest & Serenade of Water cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119CCD ???? 0000:"Sacred Forest Meadow",0004:"Lake Hylia",0015:"Inside Jabu Jabu's Belly",0018:"Dodongo's Cavern",0068:"Inside The Deku Tree" cn Warp Song Location\Prelude of Light & Nocturne of Shadow cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119CCD ???? 0003:"Kakariko Windmill",0007:"Bombchu Bowling Alley",000F:"Zelda & Impa Flee",0014:"Kakariko Village",0017:"Ganon,Final Battle",001D:"Top of Ganon's Tower",0028:"Bombchu Shop",002C:"Bazaar",0030:"Happy Mask Shop",0034:"Ganon's Tower",0038:"Ganon's Castle",004C:"Inside Spirit Door",006C:"Burning Castle",0050:"House of Skulltula",0064:"Death Mountain Trail",0068:"Graveyard",0070:"Thieves' Hideout",0074:"Royal Family's Tomb",0078:"Great Fairy Fountain 1",0084:"Forest Temple,Room With Falling Floor",0088:"Great Fairy Fountain 2",0099:"Grotto 01",009D:"Grotto 02",00A4:"Grotto 04",00A8:"Grotto 05",00B3:"Grotto 06",00B0:"Grotto 07",00B4:"Grotto 08",00B8:"Grotto 09",00C3:"Grotto 10",00C0:"Grotto 11",00C4:"Grotto 12",00FC:"Grotto 13",00D3:"Bottom of the Well",00D0:"Lon Lon Ranch Shed",00D3:"Lon Lon Ranch Outside Shed",00D8:"Ice Cavern",00E3:"Outside Cow Pen",00E0:"Lost Woods Bridge",00E4:"Lon Lon Ranch Chicken Room",00E8:"In Front of Deku Tree",00EB:"Spirit Temple Boss",00F1:"Castle Courtyard,In Front of Zelda",00F4:"Temple of Time",00F8:"Gerudo Fortress Jail" cn Warp Song Location\Bolero of Fire cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119CCD ???? 0003:"Castle Courtyard",000B:"Dodongo's Cavern Boss",0010:"Inside The Deku Tree Boss",0014:"Shadow Temple Boss",0017:"Water Temple Boss",001C:"Ganon's Castle Tower",001F:"Ganon First Battle",0028:"Ganon's Castle Room Before Ganon",002B:"Inside Ganon's Castle Room With Pillar",002F:"Lon Lon Ranch",0033:"Mido's House",0037:"Saria's House",004B:"Bearded Man's House",0040:"Top of Ganon's Castle",0047:"Outside Saria's House",004F:"Dampe's Race",0057:"Kokiri Forest",005B:"Top of Death Mountain",005F:"Fishing Pond",0068:"Inside Ganon's Castle",007F:"Hyrule Castle Gate",00BA:"Top of Ganon's Tower",00C2:"Great Fairy Fountain",00D6:"Lost Woods Goron Entrance",00DA:"Lost Woods River Entrance",00DE:"Lost Woods Bridge Field Entrance",00E3:"Goron City Lost Woods Entrance",00F6:"Death Mountain Crater",00FD:"Ganon's Castle" cn Warp Song Location\Requiem of Spirit cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119CCD ???? 0005:"Lake Hylia",0008:"Zora's Domain",0018:"Gerudo Valley",001E:"Lost Woods",0028:"Gerudo Fortress",0030:"Haunted Wasteland",0034:"Ganon's Castle Inside Burning Castle",0038:"Hyrule Castle",003A:"Ganon's Castle",003D:"Death Mountain Trail",004D:"Goron City",0065:"Fire Temple",0069:"Forest Temple",006E:"Shooting Gallery",0079:"Ganon's Castle Inside Burning Castle",007E:"Kakariko Village Entrance",007B:"Zora's River Entrance",0085:"Kokiri Forest Entrance",008A:"Lake Hyrule Entrance",008E:"Gerudo Valley Entrance",0092:"Death Mountain Trail Entrance",0095:"Graveyard Entrance",009E:"Zora's Domain Entrance",00A2:"Zora's Fountain Entrance",00BA:"Goron City Entrance",00BE:"Death Mountain Trail",00C1:"Goron City",00C5:"Lakeside Laboratory",00C9:"Top of Ganon's Castle",00CD:"Hyrule Market (Child Link's)",00CF:"Hyrule Market (Adult Link's)",00F1:"Desert Colossus",00FA:"Lon Lon Ranch Entrance",00FD:"Hyrule Field" cn Nayru's Love is Always cd For this to work On Or off, you have to walk through a Doorway to activate the Change. 81119D00 ???? 0000:"OFF",FFFF:"ON" cn Infinite\Timers\All Other Timers cd This cheat works on all Race Timers not the final Boss and Under Water with iron Boots etc. 8011B9A1 0032 cn Epona\Max Carrots\Lon Lon Raunch cd This is For Practicing,Racing.Warning take this off before jumping the exit fence after winning Epona 801F1A68 0005 801EE508 0005 cn Infinite\Timers\Escape From Gannons Tower cd This cheat works only on The Final Boss. 80119D0D 00B4 cn Beta\Play Beta Quest Worlds cd Put on the code on load up,& then press reset (F1) you will be in Beta Mode,There are no icons, energy bar etc. on the screen.When you press a C-Buttton you can use an object.Here the objects for the C-Buttons:C-left: arrows, C-down: bombs, C-right: Ocarina of Time. There is also no Navi and start menu.When you go to some places the game will freeze or you can't move. D011BB71 0000 80119D4B ???? 0000:"World 01",0001:"World 02",0002:"World 03",0003:"World 04",0004:"World 05",0007:"World 06",0008:"World 07",0016:"World 08" cn Level Select D01C6E35 0000 8111893A ???? 0000:"Inside the Deku Tree",0004:"Dodongo's Cavern",0008:"Gerudo Training Ground",000C:"Below The Phantom Gannon Boss",0010:"Water Temple",0027:"Inside Jabu-Jabu's Belly",002C:"Royal Family's Tomb",0036:"Shoadow Temple",0042:"Lakeside Laboratory",0052:"Temple Of Time",006C:"?" cn Language Select 80119D41 ???? 0000:"English",0001:"German",0002:"French" cn Press L\To Levitate cd Press L To Levitate & Let go to land D011BB11 0020 811D93D0 40CB cn Press L\For Infinite Hover Boots cd Press L For Infinite Hover Boots & Let go to land,This Only works when you have the Boots on D011BB11 0020 811D9BF2 000D cn Instant Step Hoover Boots cd Take off from Anywhere & to go higher just press L Once, this will lift you higher while walking.to come back Down Keep R pressed.Once you have enabled the code press Start & then start again. D011BB11 0020 811D93D0 40CB D011BB11 0000 811D9BF2 000D 801189A8 ???? 0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Beta\Specific things lean cd This code will cause all items on a specific plane to lean. This is helpful for areas in which the plane causes the crash (Ex. Weird Zora's Fountain Beta Quest World 01) 8002397C 0001 cn Beta\Appear in Strange Places (Hold R) cd If you go to an area where Link is immobile or invisible, using the "appear in strange places" code will almost always fix it, but you'll start somewhere outside of the Arena and in air. I recommend using the infinite step Hover boots code already supplied with PJ64 so you can float back into the arena in the event that this happens. D01C681D 0010 81119C9E 0001 cn Beta\Interface always off/on cd If you go to an area where the interface is accessible, this signigfies that you're not in 'beta' mode anymore. Using the "interface always off/on" code, you can stay in 'beta' mode regardless of what happens. This may cause more crashes in SOME areas, but it's rare and is not too severe. If you need to explore a beta area with the interface, "use the interface always on" portion of the code. Don't use the codes as you start the game. If you need the interface on/off at a specific time, start the game, go to the area, activate the code, keep it on until next reset. 80119821 00FF 80119C97 ???? 0000:"Off",0001:"On" cn Always Have Wallet Size 801189DA ???? 0047:"Kid Wallet (Holds 99)",0057:"Adult Wallet (Holds 200)",0067:"Giant Wallet (Holds 500)" crc 27A3831D-B505A533-C:45 gn Legend of Zelda, The - Ocarina of Time - Master Quest (E) [f2] //--------------- PAL (E) Region Cheat Codes cn Infinite\Rupees cd This cheat allows you to have the max Rupees to the Wallet you currently Hold 81119D04 0001 cn Max\Double Defense Power cd This gives you White Border Hearts 80118A07 0014 cn Use Any Item In Any House cd do not use under or in water 81119B5A 0000 81119B5C 0000 cn Have\All Equipment cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 811189D4 7777 cn Have\All Quest/Status Items cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 811189DC 30FF 811189DE FFFF cn Max\Heart Containers 81118966 0140 cn Max\Gold Skulltulas Killed 80118A09 0064 cn Time of Day Modifier 81118944 ???? 4000:"At Sunrise",5800:"Daylight Out",7000:"Very Bright Out",C000:"At Sunset",D000:"Fairly Dark" cn Infinite\Energy 81118968 0140 cn Infinite\Magic D0118971 0008 80118972 0001 80118974 0001 8011896B 0060 cn Tunic & Boot Options cd This changes what you are wearing,once you have enabled the code press Start & then start again. 801189A8 ???? 0011:"Kokiri Tunic & Kokiri Boots",0012:"Goron Tunic & Kokiri Boots",0013:"Zora Tunic & Kokiri Boots",0014:"Black Tunic & Kokiri Boots",0015:"White Tunic & Kokiri Boots",0016:"Yellow Tunic & Kokiri Boots",0021:"Kokiri Tunic & Iron Boots",0022:"Goron Tunic & Iron Boots",0023:"Zora Tunic & Iron Boots",0024:"Black Tunic & Iron Boots",0025:"White Tunic & Iron Boots",0026:"Yellow Tunic & Iron Boots",0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Infinite\Deku Sticks 801189C4 0009 cn Infinite\Deku Nuts 801189C5 0009 cn Infinite\Bombs 801189C6 0009 cn Infinite\Arrows 801189C7 0009 cn Infinite\Deku Seeds 801189CA 0009 cn Infinite\Bombchu's 801189CC 0009 cn Infinite\Magic Beans 801189D2 0009 cn Infinite\Big Key,Small Keys,Compass,& Map 801189E0 0007 801189E1 0007 801189E2 0007 801189E3 0007 801189E4 0007 801189E5 0007 801189E6 0007 801189E7 0007 801189E8 0007 801189E9 0007 801189EA 0007 801189F7 0009 801189F8 0009 801189F9 0009 801189FA 0009 801189FB 0009 80118A01 0009 80118A04 0009 801189FF 0009 cn Have\Ocarina 801189B3 ???? 0007:"Fairy Ocarina",0008:"Ocarina Of Time" cn Have\Boomerang 801189B8 000E cn Have\Lens of Truth 801189B9 000F cn Have\Megaton Hammer 801189BB 0011 cn Have\Deku Stick 801189AC 0000 cn Have\Deku Nut 801189AD 0001 cn Have\Bombs 801189AE 0002 cn Have\Fairy Bow 801189AF 0003 cn Have\Fairy Slingshot 801189B2 0006 cn Have\Bombchu 801189B4 0009 cn Have\Arrows\Fire Arrow 801189B0 0004 cn Have\Arrows\Ice Arrow 801189B6 000C cn Have\Arrows\Light Arrow 801189BC 0012 cn Have\Hookshot 801189B5 ???? 000A:"Hookshot",000B:"Longshot" cn Have\Magic Beans 801189BA 0010 cn Have\Magic\Fairie's Wind 801189B7 000D cn Have\Magic\Nayru's Love 801189BD 0013 cn Have\Magic\Din's Fire 801189B1 0005 cn Bottles\Bottle 1 Modifier 801189BE ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 2 Modifier 801189BF ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 3 Modifier 801189C0 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 4 Modifier 801189C1 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Trading\Adult Link Item 801189C2 ???? 002D:"Pocket Egg",002E:"Pocket Cucco",002F:"Cojiro",0030:"Odd Mushroom",0031:"Odd Potion",0032:"Poacher's Saw",0033:"Goron's Sword (Broken)",0034:"Prescription",0035:"Eyeball Frog",0036:"Eye Drops",0037:"Claim Check" cn Trading\Young Link Item 801189C3 ???? 0021:"Weird Egg",0022:"Chicken",0023:"Zelda's Letter",0024:"Keaton Mask",0025:"Skull Mask",0026:"Spooky Mask",0027:"Bunny Hood",0028:"Goron Mask",0029:"Zora Mask",002A:"Gerudo Mask",002B:"Mask of Truth",002C:"SOLD OUT" cn Turn Giant's Knife Into Biggoron's Sword 80118976 0001 cn Have Quiver (Holds 30) 801189D9 0001 cn Equipment Modifier 1 cd This modifies the equipment you are carrying. 801189DA ???? 0002:"Silver Scale",0004:"Golden Scale",0006:"Giant's Knife (Broken)",0035:"Black Gauntlets",0040:"Bullet Bag (Holds 30)",0080:"Bullet Bag (Holds 40)",00C0:"Bullet Bag (Holds 50)" cn Equipment Modifier 2 cd This modifies the equipment you are carrying. 801189DB ???? 0008:"Bomb Bag (Holds 20)",0010:"Bomb Bag (Holds 30)",0018:"Bomb Bag (Holds 40)",0020:"Goron's Bracelet",0028:"Silver Gauntlets",0030:"Golden Gauntlets" cn Warp Song Location\Minuet of Forest & Serenade of Water cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119CCD ???? 0000:"Sacred Forest Meadow",0004:"Lake Hylia",0015:"Inside Jabu Jabu's Belly",0018:"Dodongo's Cavern",0068:"Inside The Deku Tree" cn Warp Song Location\Prelude of Light & Nocturne of Shadow cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119CCD ???? 0003:"Kakariko Windmill",0007:"Bombchu Bowling Alley",000F:"Zelda & Impa Flee",0014:"Kakariko Village",0017:"Ganon,Final Battle",001D:"Top of Ganon's Tower",0028:"Bombchu Shop",002C:"Bazaar",0030:"Happy Mask Shop",0034:"Ganon's Tower",0038:"Ganon's Castle",004C:"Inside Spirit Door",006C:"Burning Castle",0050:"House of Skulltula",0064:"Death Mountain Trail",0068:"Graveyard",0070:"Thieves' Hideout",0074:"Royal Family's Tomb",0078:"Great Fairy Fountain 1",0084:"Forest Temple,Room With Falling Floor",0088:"Great Fairy Fountain 2",0099:"Grotto 01",009D:"Grotto 02",00A4:"Grotto 04",00A8:"Grotto 05",00B3:"Grotto 06",00B0:"Grotto 07",00B4:"Grotto 08",00B8:"Grotto 09",00C3:"Grotto 10",00C0:"Grotto 11",00C4:"Grotto 12",00FC:"Grotto 13",00D3:"Bottom of the Well",00D0:"Lon Lon Ranch Shed",00D3:"Lon Lon Ranch Outside Shed",00D8:"Ice Cavern",00E3:"Outside Cow Pen",00E0:"Lost Woods Bridge",00E4:"Lon Lon Ranch Chicken Room",00E8:"In Front of Deku Tree",00EB:"Spirit Temple Boss",00F1:"Castle Courtyard,In Front of Zelda",00F4:"Temple of Time",00F8:"Gerudo Fortress Jail" cn Warp Song Location\Bolero of Fire cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119CCD ???? 0003:"Castle Courtyard",000B:"Dodongo's Cavern Boss",0010:"Inside The Deku Tree Boss",0014:"Shadow Temple Boss",0017:"Water Temple Boss",001C:"Ganon's Castle Tower",001F:"Ganon First Battle",0028:"Ganon's Castle Room Before Ganon",002B:"Inside Ganon's Castle Room With Pillar",002F:"Lon Lon Ranch",0033:"Mido's House",0037:"Saria's House",004B:"Bearded Man's House",0040:"Top of Ganon's Castle",0047:"Outside Saria's House",004F:"Dampe's Race",0057:"Kokiri Forest",005B:"Top of Death Mountain",005F:"Fishing Pond",0068:"Inside Ganon's Castle",007F:"Hyrule Castle Gate",00BA:"Top of Ganon's Tower",00C2:"Great Fairy Fountain",00D6:"Lost Woods Goron Entrance",00DA:"Lost Woods River Entrance",00DE:"Lost Woods Bridge Field Entrance",00E3:"Goron City Lost Woods Entrance",00F6:"Death Mountain Crater",00FD:"Ganon's Castle" cn Warp Song Location\Requiem of Spirit cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119CCD ???? 0005:"Lake Hylia",0008:"Zora's Domain",0018:"Gerudo Valley",001E:"Lost Woods",0028:"Gerudo Fortress",0030:"Haunted Wasteland",0034:"Ganon's Castle Inside Burning Castle",0038:"Hyrule Castle",003A:"Ganon's Castle",003D:"Death Mountain Trail",004D:"Goron City",0065:"Fire Temple",0069:"Forest Temple",006E:"Shooting Gallery",0079:"Ganon's Castle Inside Burning Castle",007E:"Kakariko Village Entrance",007B:"Zora's River Entrance",0085:"Kokiri Forest Entrance",008A:"Lake Hyrule Entrance",008E:"Gerudo Valley Entrance",0092:"Death Mountain Trail Entrance",0095:"Graveyard Entrance",009E:"Zora's Domain Entrance",00A2:"Zora's Fountain Entrance",00BA:"Goron City Entrance",00BE:"Death Mountain Trail",00C1:"Goron City",00C5:"Lakeside Laboratory",00C9:"Top of Ganon's Castle",00CD:"Hyrule Market (Child Link's)",00CF:"Hyrule Market (Adult Link's)",00F1:"Desert Colossus",00FA:"Lon Lon Ranch Entrance",00FD:"Hyrule Field" cn Nayru's Love is Always cd For this to work On Or off, you have to walk through a Doorway to activate the Change. 81119D00 ???? 0000:"OFF",FFFF:"ON" cn Infinite\Timers\All Other Timers cd This cheat works on all Race Timers not the final Boss and Under Water with iron Boots etc. 8011B9A1 0032 cn Epona\Max Carrots\Lon Lon Raunch cd This is For Practicing,Racing.Warning take this off before jumping the exit fence after winning Epona 801F1A68 0005 801EE508 0005 cn Infinite\Timers\Escape From Gannons Tower cd This cheat works only on The Final Boss. 80119D0D 00B4 cn Beta\Play Beta Quest Worlds cd Put on the code on load up,& then press reset (F1) you will be in Beta Mode,There are no icons, energy bar etc. on the screen.When you press a C-Buttton you can use an object.Here the objects for the C-Buttons:C-left: arrows, C-down: bombs, C-right: Ocarina of Time. There is also no Navi and start menu.When you go to some places the game will freeze or you can't move. D011BB71 0000 80119D4B ???? 0000:"World 01",0001:"World 02",0002:"World 03",0003:"World 04",0004:"World 05",0007:"World 06",0008:"World 07",0016:"World 08" cn Level Select D01C6E35 0000 8111893A ???? 0000:"Inside the Deku Tree",0004:"Dodongo's Cavern",0008:"Gerudo Training Ground",000C:"Below The Phantom Gannon Boss",0010:"Water Temple",0027:"Inside Jabu-Jabu's Belly",002C:"Royal Family's Tomb",0036:"Shoadow Temple",0042:"Lakeside Laboratory",0052:"Temple Of Time",006C:"?" cn Language Select 80119D41 ???? 0000:"English",0001:"German",0002:"French" cn Press L\To Levitate cd Press L To Levitate & Let go to land D011BB11 0020 811D93D0 40CB cn Press L\For Infinite Hover Boots cd Press L For Infinite Hover Boots & Let go to land,This Only works when you have the Boots on D011BB11 0020 811D9BF2 000D cn Instant Step Hoover Boots cd Take off from Anywhere & to go higher just press L Once, this will lift you higher while walking.to come back Down Keep R pressed.Once you have enabled the code press Start & then start again. D011BB11 0020 811D93D0 40CB D011BB11 0000 811D9BF2 000D 801189A8 ???? 0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Beta\Specific things lean cd This code will cause all items on a specific plane to lean. This is helpful for areas in which the plane causes the crash (Ex. Weird Zora's Fountain Beta Quest World 01) 8002397C 0001 cn Beta\Appear in Strange Places (Hold R) cd If you go to an area where Link is immobile or invisible, using the "appear in strange places" code will almost always fix it, but you'll start somewhere outside of the Arena and in air. I recommend using the infinite step Hover boots code already supplied with PJ64 so you can float back into the arena in the event that this happens. D01C681D 0010 81119C9E 0001 cn Beta\Interface always off/on cd If you go to an area where the interface is accessible, this signigfies that you're not in 'beta' mode anymore. Using the "interface always off/on" code, you can stay in 'beta' mode regardless of what happens. This may cause more crashes in SOME areas, but it's rare and is not too severe. If you need to explore a beta area with the interface, "use the interface always on" portion of the code. Don't use the codes as you start the game. If you need the interface on/off at a specific time, start the game, go to the area, activate the code, keep it on until next reset. 80119821 00FF 80119C97 ???? 0000:"Off",0001:"On" cn Always Have Wallet Size 801189DA ???? 0047:"Kid Wallet (Holds 99)",0057:"Adult Wallet (Holds 200)",0067:"Giant Wallet (Holds 500)" crc 0414CA61-2E57B8AA-C:50 gn GOLDENEYE cn Enemies Do Nothing 80027E54 00FF cn Enemy Options cd "These Codes Are very very cool but in most places pointless ! But great fun, try then. But remember to deactivate them before coming to the end of the level, otherwise, there will be nothing/no one, to meet or do (:" 80032142 ???? 0001:"Enemies Come After You",0097:"Enemies Move Around & Check",00FF:"Enemies Check Around Themselves" cn Enable All Levels & In-Built Cheat Menu cd This code gives you all of the levels, all of the in-game cheats, and the special 007 mode!Hit the "A" button until you come to the place where you choose your level. EVERY SINGLE ONE SHOULD BE THERE. Hit "B" again and check out the Cheats. ALL 23 SHOULD BE THERE. When you pick your stage, you will see another difficulty level, "007". This is the level editor, where you can change all kinds of stuff! 8105886E FFFF 80058870 00FF 800588A5 00FF 800588A7 00FF 800588AA 00FF 800588AC 00FF 800588AF 00FF 800588B1 00FF 800588BB 00FF 800588B6 00FF 800588B9 00FF 800588BB 00FF cn All Objectives Complete 80064C9B 0001 80064C9F 0001 80064CA3 0001 80064CA7 0001 80064CAB 0001 cn Freeze Unfreeze enemies cd Press C-Up To Freeze & C-Down To Unfreeze. D00572D1 0008 80027E5C 000F D00572D1 0004 80027E5C 0000 cn Cradle in multiplayer cd Puts the cradle graphic in the levels screen where the facility normally is in the multiplayer levels screen.Warning it doesn't allow you to enter the multiplayer levels screen,it should automatically have selected cradle, which cannot be changed from the multiplayer menus 8002666D 0092 8002666F 0093 80026677 0029 80026673 0008 803230C5 0052 803230C6 0041 803230C7 0044 803230C8 004C 803230C9 0045 cn Facility Back Zone In Multiplayer\Part 1\2 players cd All parts must be on for this code to work.this cheat allows you to play the Facility Back Zone In Multiplayer 811E6554 45E4 811E6558 43D5 811E655C C5A7 811E657C 801C 811E657E 6774 811E5164 45E4 811E5168 C383 811E516C 4492 811E518C 801C 811E518E D574 811E78C0 45AD 811E78C4 C383 811E78C8 4440 811E78E8 801C 811E78EA E464 811E4D18 45D0 811E4D1C 4307 811E4D20 C4FB 811E4D40 801C 811E4D42 75EC 811E6738 45CD 811E673C C383 811E6740 43F4 811E6760 801C 811E6762 A0DC 811E5450 45C2 811E5454 4356 811E5458 C598 811E5478 801C 811E547A 6A74 811E5240 4608 811E5244 4307 811E5248 43DC 811E5268 801C 811E526A 962C 811E691C 4606 811E6920 4321 811E6924 449D 811E6944 801C 811E6946 CBEC 801ED447 008A 801ED4DB 008B 801ED56F 008C 801ED603 008D 801ED697 008E 801ED72B 008F 801ED7BF 007D 801ED853 007E 801ED443 002A 801ED4D7 002A 801ED56B 002A 801ED5FF 002A 801ED693 002A 801ED727 002A 801ED7BB 002A 801ED84F 002A 801ED449 0000 801ED4DD 0000 801ED571 0000 801ED605 0000 801ED699 0000 801ED72D 0000 801ED7C1 0000 801ED855 0000 801ED44D 0000 801ED4E1 0000 801ED575 0000 801ED609 0000 801ED69D 0000 801ED731 0000 801ED7C5 0000 801ED859 0000 801EB743 002A 801EB745 0068 811EB746 277F 811EB748 1000 811EB74A 0262 811EB7C2 0190 801EB7C5 0000 811EB7C6 0258 cn Facility Back Zone In Multiplayer\Part 2\2 players cd All parts must be on for this code to work.this cheat allows you to play the Facility Back Zone In Multiplayer 811EB7C8 0000 811EB7CC FFFF 811EB7CE FFFF 811EB7D2 0000 801EB7D5 0000 801EB7DB 0000 811EB7E2 0000 801EB7E7 0000 801EB843 002A 801EB845 0068 811EB846 2780 811EB848 1000 811EB84A 0262 811EB8C2 0190 801EB8C5 0000 811EB8C6 0258 811EB8C8 0000 811EB8CC FFFF 811EB8CE FFFF 811EB8D2 0000 801EB8D5 0000 801EB8DB 0000 811EB8E2 0000 801EB8E7 0000 801EB943 002A 801EB945 0068 811EB946 2791 811EB948 1000 811EB94A 0262 811EB9C2 0190 801EB9C5 0000 811EB9C6 0258 811EB9C8 0000 811EB9CC FFFF 811EB9CE FFFF 811EB9D2 0000 801EB9D5 0000 801EB9DB 0000 811EB9E2 0000 801EB9E7 0000 801EBA43 002A 801EBA45 0068 811EBA46 2792 811EBA48 1000 811EBA4A 0262 811EBAC2 0190 801EBAC5 0000 811EBAC6 0258 811EBAC8 0000 811EBACC FFFF 811EBACE FFFF 811EBAD2 0000 801EBAD5 0000 801EBADB 0000 811EBAE2 0000 801EBAE7 0000 801EBB45 00A0 801EBC45 00A0 801EBD45 00A0 801EBE45 00A0 801EBB47 0075 801EBC47 0076 801EBD47 0077 801EBE47 0078 801EBBE7 0001 801EBCE7 0001 801EBDE7 0001 801EBEE7 0001 801EC247 0071 801ECD47 0072 801ECE47 0074 801ECF47 006C 801ED047 0079 801ED147 0083 D01EBFC5 005A 801EBFC5 0000 D11EBFC6 0000 811EBFC6 F333 D11EBFC8 03E8 811EBFC8 0000 cn Facility Back Zone In Multiplayer\Part 3\2 players cd All parts must be on for this code to work.this cheat allows you to play the Facility Back Zone In Multiplayer D11EBFCA 0000 811EBFCA F0C4 D11EBFCE 4CCC 811EBFCE 000A D11EBFD2 4CCC 811EBFD2 000A D11EBFD4 0003 811EBFD4 0000 D11EBFD6 0000 811EBFD6 02C4 801EBFD9 0004 801EBFDB 0000 811EBFE2 0384 801EBFE7 0004 801EBF45 009E 801EBF47 0084 801EBF48 0010 801EC2D9 0000 801EC447 0085 801EC547 0086 811EA6B6 2743 811EA73E 0114 811EA7F2 0115 811EA8A6 00A3 811EA92E 009D 811EA9E2 00A4 811EAA96 00DA 811EAB1E 00DB 811EABD2 00DF 811EAC86 0130 811EAD0E 008D 811EADC2 012E 811EAE76 0111 811EAEFE 2740 811EAFB2 2741 811EB066 00A0 811EB0EE 009E 811EB1A2 009F 811EB256 274F 811EB2DE 2750 811EB392 0117 811EB446 0131 811EB4CE 008E 811EB582 0132 811EB636 00A1 811EB6BE 0119 811EA62E 00FA 801ED3DF 0000 801ED2DF 0001 D0024337 0007 80024337 001F cn All 64 Characters In Multi Player 800266E7 0040 cn Replace Cradle with Citadell hidden level 80025E47 0029 8103DB6A D9B4 8103DB70 3F44 8103DB72 BDEA 8103DB74 3F80 8103DB76 0000 8103DB78 4219 8103DB7A D89D 81058EC0 C470 cn Secret Island on Dam Level cd For the above code to work,Get to the 2nd guard tower & go down the ladder on the left hand side & to the end of the Dock, Press L & GS and you will be transfered in the water. Just keep walking straight & you will get to it. Obviously you can't actually climb ladders or anything, you will simply walkthrough anything on that Part, if you want to walk back to the Dock, when you come near it click the cheat back on & keep pressing L & GS untill you are back on it. D004C2D1 0020 800BA78D 0050 880BA78D 0000 crc 3B941695-F90A5EEB-C:50 gn 007 The World is Not Enough (E) cn Invincible 811147D8 0101 cn Access Levels & Difficulties 81103B66 0021 50000D01 0000 80118F38 0001 cn Infinite Time 81103B82 0000 cn Infinite Oxygen 800E25E4 0004 cn Multi Player\Access All Arenas 801147EB 0001 811147EC 0101 801147EE 0001 cn Multi Player\Access All Scenarios 801147EF 0001 811147F0 0101 cn Multi Player\Access All Weapon Modes 811147F2 0101 801147F4 0001 cn Multi Player\Access All Evil Skins 50005C0C 0000 800C0167 0081 cn Multi Player\Access Good Q 800C06EF 0001 cn Multi Player\Access Evil Q 800C06EF 0081 cn Multi Player\Invincible 811147D8 0101 crc 58FD3F25-D92EAA8D-C:50 gn 1080 SNOWBOARDING cn Infinite Damage All Players and Levels 803F4C01 0000 cn Prees L For Infinite Lives & Continues cd Whenever you've lost a life, Press L.Do not press L when on the main menu or during the intro Only use this feature in Match Race D00556A9 0020 8026B14B 0003 cn Enable All Levels & Boarders 80250AB9 00FF 80250ABB 0005 81250AC6 FCFF 80250AC8 0007 cn Stop Timer\Time Attack\Air Make 8031AA4A 0000 cn Stop Timer\Time Attack\Half Pipe 802F638A 0000 cn Stop Timer\Time Attack\Crystal Lake 802A582A 0000 cn Stop Timer\Time Attack\Crystal Peak 802B2BCA 0000 cn Stop Timer\Time Attack\Golden Forrest 802B135A 0000 cn Stop Timer\Time Attack\Mountain Village 802CB95A 0000 cn Stop Timer\Time Attack\Dragon Cave 802C137A 0000 cn Stop Timer\Time Attack\Deadly Fall 802CF56A 0000 cn Stop Timer\Trick Attack\Air Make 8031AABA 00C5 cn Stop Timer\Trick Attack\Half Pipe 802F63FA 00C5 cn Stop Timer\Trick Attack\Crystal Lake 8029F66A 00C5 cn Stop Timer\Trick Attack\Crystal Peak 802AC8EA 00C5 cn Stop Timer\Trick Attack\Golden Forrest 802AAF5A 00C5 cn Stop Timer\Trick Attack\Mountain Village 802C50DA 00C5 cn Stop Timer\Trick Attack\Dragon Cave 802BAD3A 00C5 cn Stop Timer\Trick Attack\Deadly Fall 802C8E0A 00C5 cn Stop Timer\Contest\Crystal Lake 8029C0DA 00C5 cn Stop Timer\Contest\Crystal Peak 802A889A 00C5 cn Stop Timer\Contest\Golden Forest 802A6D3A 00C5 cn Stop Timer\Contest\Air Make 80319BBA 00C5 cn Stop Timer\Contest\Half Pipe 802F51FA 00C5 cn Play As 8001A0E7 ???? 0000:"Dion Blaster",0001:"Kensuke Kimachi",0002:"Akari Hayami",0003:"Ricky Winterborn",0004:"Rob Haywood",0005:"Silver Boarder",0006:"Gold Boarder",0007:"Panda Boarder" crc 8F12C096-45DC17E1-C:50 gn A Bug's Life cn Infinite\Lives 801E2460 0009 cn Infinite\Health 801E2455 0004 cn Always Have\Super Jump 811E2450 0020 cn Always Have\50 pieces of corn 801E2461 0032 cn Have F-L-I-K 801E2462 000F cn Levitate cd "Press R To Levitate & Let go to land (:" D008FCE1 0010 801E23C6 0001 D008FCE1 0010 801E23D6 0001 cn Unlock All Levels 81099B70 000F cn Have All Goldberry Tokens D01E244E 0000 801E244E 0000 cn Start with Berry Weapon 801E2457 ???? 0001:"Blueberry",0002:"Homing Berry",0003:"Goldberry",0004:"Super Berry ?" cn All enemies killed 801E244E 0000 801E244F 0000 crc 62F6BE95-F102D6D6-C:50 gn AERO FIGHTERS ASSAUL cn Extra Planes 8127D69C FFFF cn Infinite\99 Lives 80355748 0063 cn 99 Bonus 80131537 0063 cn 99 Accuracy 80131530 0063 cn Gun Select 8027E9D3 ???? 0000:"Chaff",0001:"Jammings",0002:"Air Mines",0003:"Mahibishi",000A:"22mm BB Shot",000B:"22mm",000C:"Hunai Shot",000D:"Fireball",000E:"Sabre",0014:"Fire",0015:"Tomahawk",0016:"Ninja Glitch",0017:"Fire Wave",001E:"Rocket",001F:"Phoenix",0020:"Star",0021:"Fire Arrow",0028:"Ninjabeam" cn Infinite\Chaffs 8027E9C7 000A cn Infinite\Gun 8027EAC0 0001 cn Infinite\Special Weapons 8027EE82 0002 cn Infinite\Armor 8127D9A4 44A0 8127D9A8 44A0 cn Infinite\Health 8027D9A5 00C8 8027D9A9 00C8 cn Always Have\F-15J Eagle 8027D69C 0010 cn Always Have\X-29A A.T.D. 8027D69D 0020 cn Stage Select screen unlocked cd Hold L + R at the Game Mode screen and it will unlock every single level in the game; from Tokyo to Space. Do not hold L + R on any other screen, as this may cause game to freeze D0281691 0030 8027D5C0 000A D0281691 0030 8027D5DA 000A cn All Boss Attack levels unlocked cd Unlocks all planes in death match 80355701 003F cn F-15J Eagle & X-29A A.T.D. planes unlocked 8035575C ???? 0010:"F-15J Eagle",0020:"X-29A A.T.D.",003F:"Both of the above planes" crc D83045C8-F29D3A36-C:50 gn AEROGAUGE cn No Damage\Player 1 50000402 0000 8113F338 0000 cn No Damage\Player 2 50000402 0000 811413D8 0000 cn Unlock Hidden Tracks & Cars cd All of the Freeze All Lap Timers must be on. These codes will Stop the others from racing against you in Grand Prix mode. To win a race in Grand Prix you must finish at least one lap in the qualify round, then complete all laps in race for first. 8009127C 0001 cn Freeze All Timers 8013F001 0000 8013F005 0000 8013F00A 0000 cn Freeze Overall Timer cd All of the Freeze All Lap Timers must be on. These codes will Stop the others from racing against you in Grand Prix mode. To win a race in Grand Prix you must finish at least one lap in the qualify round, then complete all laps in race for first. 8013EFF5 0001 cn Laps Of Race 8013EFEF ???? 0001:"1 Lap",0002:"2 Laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"Never Ending Laps" cn Play As\Player 1 8013F2F5 ???? 0000:"N64 Control Pad",0001:"Interceptor",0002:"Hornet",0003:"Avenger",0004:"Shredder",0005:"Black Lightning",0006:"Vengeance",0007:"Prowler",0008:"Reaper",0009:"Dominator" cn Play As\Player 2 8013F2F6 ???? 0000:"N64 Control Pad",0001:"Interceptor",0002:"Hornet",0003:"Avenger",0004:"Shredder",0005:"Black Lightning",0006:"Vengeance",0007:"Prowler",0008:"Reaper",0009:"Dominator" cn Level Select cd For this cheat to work,as soon as you put the cheat on you must turn it back off,if not you wont beable to quit a Race or even finish one. 8013F2FB ???? 0000:"Canyon Rush",0001:"Bikini Island",0002:"China Town",0003:"Neo Arena",0004:"China Town Jam",0005:"Neo Speed Way" cn Always 1st 8013F040 0001 cn Music Modifier 800F715F ???? 00FF:"Music On",0000:"Music Off" cn Language Select 8008CF93 ???? 0000:"English",0001:"French",0002:"German" crc 2DC4FFCC-C8FF5A21-C:50 gn Aidyn Chronicles - The First Mage (E) cn Infinite\Max Health 80279308 001E cn Infinite\99 Health Potions cd Do Not put this cheat on until you have collected your 1st Health Potion from the 1st Cheat or you will not be able to get into the Sub menu and Continue the game. 8027876B 0063 cn Have\Max Gold 50000401 0000 80277AA5 00FF cn Have\Max Total XP 50000401 0000 8027931D 00FF cn Have\Max Total XP Remaning to Start cd This will give you 16777215 Total XP Remaning to start with and after your 1st batle will allow you to buy your Max Stats 50000401 0000 80279321 00FF crc 27C425D0-8C2D99C1-C:50 gn Airboarder 64 (E) cn Infinite Turbo\Player 1 80166019 0009 cn Infinite Turbo\Player2 80167991 0009 cn Infinite Time\Street Work & Coin 8010FA09 0028 cn Infinite Time\Attack Time Time 000000 8110FA0A 0000 cn Infinite Time\Time Attack 8010FA0B 0000 cn Access All Boards & Characters 80050071 000C cn Maxed Out Turbo Bar 811656E8 429F 80166017 0051 cn Class Score Select 8016609E ???? 0020:"Class C",0040:"Class B",0064:"Class A",00FF:"Class S" cn Coin Perfect Select cd this is for Coin Mode to get Perfect Coin Collection Score straight away when you enter the level 801660B3 ???? 0014:"Green Park Level 1",001A:"Green park Level 2",002B:"Green park Level 3",004A:"Lost Forest Level 1",0059:"Lost Forest Level 2",0080:"Lost Forest Level 3",007D:"Snow Festival 64 Levels 1 2 & 3",006F:"Sunset Island Level 1",0074:"Sunset Island Level 2",0081:"Sunset Island Level 3",006E:"Giant House Level 1",0077:"Giant House Level 2",0072:"Giant House Level 3" cn Options\Music Modifier 80050059 ???? 00FF:"BGM On",0000:"BGM Off" cn Options\Sound Effects Modifier 8105005A ???? 00FF:"SE On",0000:"SE Off" cn Options\Camera Type Modifier 81050056 ???? 0000:"Roll On Near",0001:"Roll On Mid",0002:"Roll On Far",0003:"Roll Off Near",0004:"Roll Off Mid",0005:"Roll Off Far" cn Options\DJ Function Modifier 8105005C ???? 0001:"DJ Function On",0000:"DJ Function Off" cn All Street Work Levels Unlocked 50007801 0000 80050120 ???? 0001:"Courses unlocked",0003:"Courses unlocked with C rank",0004:"Courses unlocked with B rank",0005:"Courses unlocked with A rank",0006:"Courses unlocked with S rank" crc 3CC77150-21CDB987-C:50 gn Armorines - Project S.W.A.R.M. (E) cn Enable In-Game Cheat Menu & Level Select 81115936 014F cn Infinite Ammo (All Guns) 810496D0 2400 cn Don't Take Any Damage 8104A260 2400 crc D9EDD54D-6BB8E274-C:50 gn All Star Baseball '99 (E) cn The Home Team Has Max Score 8107972A FFFF cn The Away Team Has Max Score 81080082 FFFF crc DFD784AD-AE426603-C:50 gn All Star Tennis '99 (E) cn Game Win Select\Player 1 801BAEB1 ???? 0000:"0 Games Won",0001:"1 Game Won",0002:"2 Games Won",0003:"3 Games Won",0004:"4 Games Won",0005:"5 Games Won",0006:"For Game Set & Match" cn Game Win Select\Player 2 801BAEB2 ???? 0000:"0 Games Won",0001:"1 Game Won",0002:"2 Games Won",0003:"3 Games Won",0004:"4 Games Won",0005:"5 Games Won",0006:"For Game Set & Match" cn Points Select\Player 1 801C6160 ???? 0000:"0 Points",0015:"15 Points",0030:"30 Points",0040:"40 Points" cn Points Select\Player 2 801C6161 ???? 0000:"0 Points",0015:"15 Points",0030:"30 Points",0040:"40 Points" crc B210DF19-98B58D1A-C:50 gn Army Men Sarge cn Infinite Health 8016471F 0001 cn Access\All Guns 8015E0CF 0001 cn Access\Max Ammo 801646EF 0001 cn Have Small Mode cd Do not use with Have Big Mode only use one at a time 8015E0C9 0001 cn Play As Tin Soldier cd Do not use this with any other play as option. 8015E0D3 0001 cn Invisible to most enemies 8015E0B3 0001 cn Play As cd Here you can choose who you would like to play as. But Do not use this with any other play as option.. 811653D2 ???? 0007:"The Big Green One",0008:"Vikki",0009:"Plastro" cn Have Big Mode cd Do not use with Have Small Mode only use one at a time 8016470F 0001 cn Have Debug Mode cd When this code is activated, a display of numbers will show on the screen as the players move around 8015E417 0001 crc FC7797BF-4A95E83C-C:50 gn LAMBORGHINI cn Access All Bonus Cars 50000302 0000 80098583 0001 50000302 0000 8009858B 0001 cn Max Points 810CE702 010A cn Infinite Lap Time 8109872C 0000 8109872E 0000 cn Always 1st Place 810A5F30 0001 cn Start On Lap Modifier D00A5F35 0000 810A5F34 ???? 0000:"Normal",0001:"Lap 1",0002:"Lap 2",0003:"Lap 3",0004:"Lap 4",0006:"Lap 5",0006:"Lap 6",0007:"Last Lap from Start" cn Track Direction Unlocked (All Levels) 800A4131 0003 crc 733FCCB1-444892F9-C:50 gn Banjo-Kazooie (E) cn Infinite\Lives 8038696B 0009 cn Have\Running Shoes 8137CA88 5019 cn Have\Zero Time all Levels 50000B04 0000 813869E4 3000 cn Have\Blubbers Gold 80386973 00FF cn Have\Present Option\Green 8038698F 00FF cn Have\Present Option\Blue 80386993 00FF cn Have\Present Option\Red 80386997 00FF cn Have\Nabnuts Acorns 8038699F 00FF cn Have\Eyries Caterpillars 8038699B 00FF cn Have\Chimpys Oranges 80386977 00FF cn Have\All Jinjos 8038695B 00FF cn Yumblies Counter\Mr Vile 8038697C 00FF cn Yumblies Counter\Banjo 8038697B 00FF cn Press L To Levitate cd Press L To Levitate & Let go to land D0285735 0020 8137CE8C 43E0 cn Do Anywhere Option\Take off anywhere cd Press A D0285734 0080 8037CBA1 0001 cn Infinite\Health 80386963 0008 80386965 0001 cn Infinite\8 Skulls 803869A7 0008 cn Infinite\255 Jigsaws 803869AB 00FF cn Infinite\Air 8038696E 000B cn Infinite\255 Notes 80386943 00FF cn Infinite\255 Eggs 80386947 00FF cn Infinite\255 Gold Feathers 80386953 00FF cn Infinite\255 Red Feathers 8038694F 00FF cn Access All Moves 8037CD70 0001 8037CD71 007F 8037CD72 00FF 8037CD73 00FF crc C9176D39-EA4779D1-C:50 gn BANJO TOOIE cn Infinite\Energy\Banjo and Kazooie cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 801201B9 0A0A 81120794 0A0A cn Infinite\Energy\Snowball cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 801201B9 0063 80120797 0005 cn Infinite\Energy\Bee cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 801201B9 0063 801207A3 000A 801207A4 000A cn Infinite\Energy\Washing Machine cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 801201B9 0063 811207A6 0A0A cn Infinite\Energy\Stony cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 801201B9 0063 801207A9 000A 8011B65A 000A cn Infinite\Energy\Banjo cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 801201B9 0063 801207AF 000A 801207B0 000A cn Infinite\Energy\Kazooie cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 801201B9 0063 811207B2 0A0A cn Infinite\Energy\Submarine cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 801201B9 0063 801207B5 000A 801207B6 000A cn Infinite\Energy\Mumbo cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 801201B9 0063 811207B8 0A0A cn Infinite\Energy\Detonator cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 801201B9 0063 811207BE 0A0A cn Infinite\Energy\T-Rex Baby cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 801201B9 0063 801207CF 000A 801207D0 000A cn Infinite\Air 8112FFD2 42C8 cn Play As cd To use this cheat, put the cheat on, then press L as you walk through a door to become that chosen character D008B494 0020 8012BFAC ???? 0001:"Banjo and Kazooie",0002:"Snowball",0006:"Bee",0007:"Washing machine",0008:"Stony",000A:"Banjo",000B:"Kazooie",000C:"Submarine",000D:"Mumbo",000E:"Golden Goliath",000F:"Detonator",0010:"Truck",0012:"T-rex baby",0013:"T-rex daddy" cn Instant Warp\Options\Not sure cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 00FC:"Lord woo fak fak",00F9:"Mr Patch",0121:"Inside Chuffy's wagon",0134:"Mumbo's Skull",0135:"Humba Wumba's wigwam 1",0157:"Humba Wumba's wigwam 2",019B:"Jingalings Zombified Palace",01A6:"Smuggler cavern",0141:"Inside the digger tunnel",0143:"Bottles house",0169:"Bottles house still",018A:"HAG Inside",019A:"HAG1 Final Boss" 8012C5A3 0001 cn Instant Warp\Options\Spiral Mountain cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 00AD:"Grunty's Old Lair",00AE:"Behind The Waterfall",00AF:"Top Of Castle",0173:"Banjo's house" 8012C5A3 0001 cn Instant Warp\Options\Jinjo Village cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 0142:"Jinjo Village",0144:"King Jingalings throne room",0143:"Bottles house",0145:"Green Jinjo's House",0146:"Black Jinjo's House",0147:"Yellow Jinjo's House",0148:"Blue Jinjo's House",014A:"Brown Jinjo's House",014B:"Orange Jinjo's House",014C:"Purple Jinjo's House",014D:"Red Jinjo's House",014E:"White Jinjo's House" 8012C5A3 0001 cn Instant Warp\Options\Mayahem Temple cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 00B6:"Humba's Wigwam",00B7:"Mumbo's skull",00B8:"The Temple",00B9:"Prison Compound",00BC:"Code chamber",00C4:"Jade Snake Grove",00C5:"Treasure Chamber",00C6:"Kickball Arena",0177:"Targitzan's Slighty Sacred Temple",0178:"Inside Targitzans Temple",0179:"Targitzan Temple Lobby",017A:"Targitzan's Temple Boss",017F:"Mayan Kickball Arena",0166:"Multi",0167:"Still",00C8:"Kickball Arena",00C9:"Kickball Arena" 8012C5A3 0001 cn Instant Warp\Options\Glitter Gulch Mine cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 00C7:"Mine",00CA:"Fuel depot",00CB:"Crushing shed",00CC:"Flooded caves",00CD:"Water storage",00CE:"Waterfall cavern",00CF:"Power hut basement",00D0:"Chuffy's cab",00D1:"Inside chuffy's boiler boss",00D2:"Gloomy caverns",00D3:"Generator caverns",00D4:"Power hut",00D5:"Wumba's wigwam",00D7:"Train station",00D8:"Prospectors hut",00D9:"Mumbo's hut",00DA:"Toxic gas cave",00DB:"Canary cave",00DC:"Ordnance storage",00E9:"Humba",0126:"Water supply pipe",0163:"Ordnance Storage entrance",0164:"Ordnance Storage game",0165:"Ordnance Storage game Multi",016F:"Testing",0170:"Testing",0171:"Mumbo's skull" 8012C5A3 0001 cn Instant Warp\Options\Witchy World cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 00D6:"Witcy World",00DD:"Dodgem dome lobby",00DE:"Dodgem challenge \"1 vs 1\"",00DF:"Dodgem challenge \"2 vs 1\"",00E0:"Dodgem challenge \"3 vs 1\"",00E1:"Crazy castle stockade",00E2:"Crazy castle lobby",00E3:"Crazy castle pump room",00E4:"Balloon burst game",00E5:"Hoop hurry game",00E6:"Star spinner",00E7:"The inferno",00EA:"Cave of horrors",00EB:"Haunted cavern",00EC:"Train station",0124:"Saucer of Peril",013B:"Crazy castle stockade \"sop\"",013C:"Star spinner \"sop\"",0176:"Mumbo's skull" 8012C5A3 0001 cn Instant Warp\Options\Jolly Roger's Lagoon cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 00ED:"Jolly's",00EE:"Pawno's emporium",00EF:"mumbo's skull",00F4:"Ancient Swimming Baths",00F6:"Electric Eels lair",00F7:"Seaweed Sanctum",00F8:"Inside the big fish",00FA:"temple of the fishes",01A8:"Atlantis",01A9:"Seabottom",0181:"sea bottom cavern",0182:"submarine multi",01A7:"Jolly Roger's Lagoon",00FF:"Blubber's wave race hire" 8012C5A3 0001 cn Instant Warp\Options\Terrydacty Land cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 0112:"Terrydacty Land",0113:"Terry's nest",0114:"Train station",0115:"Oogle boogles cave",0116:"Inside the mountain",0117:"River passage",0118:"Styracosaurus family cave",0119:"Unga bunga's cave",011A:"Stomping plains",011B:"Bonfire caverns",011E:"Humba's Wigwam",0123:"Inside chompa's belly",0183:"Chompa's belly multi" 8012C5A3 0001 cn Instant Warp\Options\Grunty Industries cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 0100:"Outside",0101:"Inside",0102:"Train station",0103:"Workers quarters",0104:"Trash compactor",0105:"Elevator shaft",0106:"Floor 2",0107:"Floor 2 \"electromagnet chamber\"",0108:"Floor 3",0109:"Floor 3 \"boiler plant\"",010A:"Floor 3 \"packing room\"",010B:"Floor 4",010C:"Floor 4 \"cable room\"",010D:"Floor 4 \"quality control\"",010E:"Floor 5",010F:"Basement",0110:"Basement \"repair depot",0111:"Basement \"waste disposal\"",0125:"Water supply pipe",0172:"Mumbo's skull",0162:"Floor 4 \"clinkers cavern\"",0187:"Sewer entrance" 8012C5A3 0001 cn Instant Warp\Options\Hailfire Peaks cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 0127:"Lava side",0128:"Icy side",0129:"Lava train station",012A:"Ice train station",012B:"Chilli billi",012C:"Chilly willy",012D:"Colosseum kickball stadium lobby",0131:"Boggy's igloo",0132:"Icicle grotto",0133:"Inside the volcano",0168:"Icy side still" 8012C5A3 0001 cn Instant Warp\Options\Cloud Cuckoo Land cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 0136:"Cloud Cuckoo Land 1",0137:"Inside the trashcan",0138:"Inside the cheesewedge",0139:"Zubba's nest",013A:"Central cavern",013D:"Inside the pot o gold",013E:"Mumbo's skull",013F:"Mingy jongo's skull",0140:"Humba wumba's wigwam",0161:"Cloud Cuckoo Land 2",0188:"Zubba's nest multi",0185:"Trash can mini" 8012C5A3 0001 cn Instant Warp\Options\Isle O Hags cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 014F:"Wooded Hollow",0150:"Heggy's egg shed",0151:"Jiggywiggy's temple",0152:"Plateau",0153:"Plateau \"Honey B's Hive\"",0154:"Pine Grove",0155:"Cliff top",0156:"Cliff top Mumbo's skull",015A:"wasteland",015B:"inside another digger tunnel",015C:"Quagmire" 8012C5A3 0001 cn Instant Warp\Options\Cauldron Keep cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B494 0000 8112C5A0 ???? 015D:"Cauldron Keep",015E:"The gatehouse",015F:"Tower of Tragedy Quiz",0160:"Gun chamber",016A:"Gun room still",017B:"Crazy Castle Stockade balloon burst multi",017C:"Crazy Castle Stockade Jump the hoops multi",017D:"Grunty Industries packing game",0180:"Colosseum kickball arena",0186:"Dodgems" 8012C5A3 0001 cn Beta Bottles Revenge Mode cd Bottles Revenge is a Beta mode from Banjo Tooie that the RWP team recently uncovered after an extraordinary amount of effort. Bottles the Spirit transforms into Bottles the Devil and posses enemies nearby and allows a second player hooked up to Pad 2 to play as that Posses character to try to foil Banjos Plans. As player one goes about its business, player two uses every enemy nearby to try to nab Banjo and take away some life. This mode is incredible, and you can control almost every enemy in the game: slot machines, flying creatures, uggers, zubbas...and this is just the beginning. (Congrats Rare Witch Project) 80130402 0001 8008B4D1 0002 crc B088FBB4-441E4B1D-C:50 gn Bass Hunter 64 (E) cn All Lakes Available 80119800 0001 cn Unbreakable Line 80119805 0001 cn Large Fish 80119806 0001 cn Fish Are More Active 80119807 0001 cn No Penalties During Tournamet 80119808 0001 cn No Snags While Fishing 80119809 0001 cn Extra $300 8011980B 0001 cn More fish in Lakes 8011980D 0001 cn Super Lure 8011980E 0001 cn Easy Win Current Tournament 8011980F 0001 cn Access\All Lures cd Codes To Be Used With Save Slot 1 8019A1A9 0003 8119A1AA FFFF cn Access\All Poles 2 cd Codes To Be Used With Slot 1 8019A1AC 0007 cn Access\Extra Boat 2 cd Codes To Be Used With Slot 1 8019A1AD 0001 crc 259F7F84-7C9EED26-C:50 gn Batman Beyond - Return of the Joker (E) cn Infinite\Health 801D7F3C 0064 cn Infinite\99 Lives 801D7F3D 0063 cn Infinite\Infinite 99 Dark Night Discus's 801D7F4A 0063 cn Infinite\Max Charge & Magnetic Nun Chaku 801D7F05 0064 crc 0CAD17E6-71A5B797-C:50 gn BattleTanx - Global Assault (E) cn Infinite Tank Credits 8124AB3E 02F4 cn Score Aid 8124A152 FC9A cn Inincibility 81121420 0100 cn All Weapons & Invulnerable 81121420 0101 cn Level Select 811150B8 0001 cn All Tanx & All Campaigns 50001370 0000 81120546 FFFF 50001370 0000 8112054A FFFF cn Infinite Edge Power 811A8D20 000A 8111AD08 000A 811AC1E4 000A 811ACB7E 000A 811AAEB4 000A 811AE378 000A 811AD514 000A 811AA51C 000A crc A1B64A61-D014940B-C:50 gn Beetle Adventure Racing (E) cn Access All\Cars 8002CFF7 000B cn Access All\Tracks 8002CFF3 0006 cn Access All\Difficulties 8002CFFB 0003 cn Access All\Multiplayer Levels 50000901 0000 8002D000 0001 cn Access In-Game Cheats 50001301 0000 8002D008 0001 cn Display On 81025EC6 0100 cn Map Full 81025E6A 0102 cn Speed units\Kph or Mph cd Here you can choose what you would like to be Displayed on your Speed Ometer, As in Kilometres Per Hour, Or Miles Per Hour. 81025E68 ???? 0100:"Kph",0001:"Mph" cn Max Race Points 8102CBC0 03E7 cn Flat Shading 81025CF6 0000 crc 7C64E6DB-55B924DB-C:50 gn Blast Corps (E) cn Infinite Hydraulics Sidesweeper 803EDB51 0063 cn Infinite Missiles Motor Bike 803F8AC3 0063 cn Infinite Boosts Buggy Vehicle 803EE301 0064 cn Ballista Can Drive Through Anything 803F8A68 0001 cn Found All RDUS 8036E9CC C350 cn Found All Survivors 8036E9C9 00FF cn Found All Scientists 80364AD0 003F crc AB7C101D-EC58C8B0-C:50 gn Bio F.R.E.A.K.S. (E) cn Infinite Health\Player One 811507FA 6400 cn Infinite Shields\Player One 811507FE 6400 cn Shields Always Active\Player One 8015080A 0022 cn Infinite Jet Pack\Player One 81150802 3200 cn Smoke Trail\Player One 80150804 0001 cn Player 2 Easily Defeated\Player One 81152E76 0100 81152E7A 0100 cn Infinite Health\Player Two 81152E76 6400 cn Infinite Shields\Player Two 81152E7A 6400 cn Shields Always Active\Player Two 80152E86 0022 cn Infinite Jet Pack\Player Two 81152E7E 3200 cn Smoke Trail\Player Two 80152E80 0001 cn Player 1 Easily Defeated\Player Two 811507FA 0100 811507FE 0100 crc D571C883-822D3FCF-C:50 gn Blues Brothers 2000 (E) cn Have All\Keys cd This will give you the Grey & Red,Green & Gold Keys 800BE268 00FF 800BE26D 00FF 800BE26E 00FF cn Have All\Music Notes cd This will give you all 10 Music Notes 50000A01 0000 800BE3A0 0001 cn Infinite\Lives 800BE293 0009 cn Infinite\Health 800BE2A7 0002 cn Press L to Levitate cd Press L to levitate & let go to come back down D017E975 0020 810DBD88 44CB cn Max Money 810BE296 03E7 crc 0B58B8CD-B7B291D2-C:50 gn Body Harvest (E) cn Infinite\Greece 81052B48 0098 81052B4A 967F cn Infinite\Health 8004DD1C 0002 cn No Humans Killed 8104819A 0000 cn Have Alien Artifact 8004DC8F 0001 cn Item Modifier 8004DC7F ???? 0000:"Nothing",0002:"Howitzer Shells",0040:"Crank",0080:"Windmill Cog",0100:"Heirglyph Map Piece",0400:"Hangar Key",FFFF:"All Items" cn Weapon Select\1st Position 80048168 ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\2nd Position 80048169 ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\3rd Position 8004816A ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\4th Position 8004816B ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\5th Position 8004816C ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\6th Position 8004816D ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\7th Position 8004816E ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Weapon Select\8th Position 8004816F ???? 0000:"Nothing",0001:"Fuel",0002:"Pistol",0003:"Shotgun",0004:"Rifle",0005:"Machine Gun",0006:"Rocket Launcher",0007:"TNT",0008:"Sun Shield",0009:"Grenades",000A:"Tri-Spinner",000B:"Vehicle Weapon 1",000C:"Vehicle Weapon 2",000D:"Arme 2",000E:"Waffe 2",0010:"Fragcannon",0011:"Lazer Missiles",0012:"Resonator",0013:"Plasma Bombs" cn Infinite Ammo All Weapons 50001102 0000 81048176 8000 cn Level Select 80047FC3 ???? 0001:"Greece",0002:"Java",0003:"America",0004:"Siberia",0005:"Comet" cn Press L To Wall Over Water, Climb Hills D0047609 0020 8104DD02 0808 cn Infinite\Fuel 8004E46C 0050 crc D85C4E29-88E276AF-C:50 gn Bomberman Hero (E) cn Full\Bomb Power 8016523F 0003 cn Full\Fire Power 80165240 0008 cn Infinite\Health 80165244 0004 cn Infinite\Lives 80165243 0009 cn Extra Gems D0165241 0000 80165241 004B cn Max\Bombs 8016523F 0008 cn Press L to Levitate cd Press L to levitate & let go to come back down D005A465 0020 81154178 41CB D005A465 0020 D0154154 0000 80154154 0040 cn Max\Score 80177608 FFFF cn Max\Explosion 80165240 0008 crc 5A160336-BC7B37B0-C:50 gn Bomberman 64 (E) cn Infinite\Lives 802AC617 0063 cn Infinite\Gems 802AC61F 0063 cn Infinite\Credits 802AC61B 0063 cn Infinite\Time 802AC633 0000 cn Have All Gold Cards 8008E575 00FF 8108E576 FFFF 8108E578 FFFF 8108E57A FFFF 8108E57C FFFF cn All Levels & Stages Unlocked 50001804 0000 8008E5CF 0001 cn Infinite Red Pumped-Up Bombs 802AC643 0004 crc D5B2339C-CABCCAED-C:50 gn Buck Bumble (E) cn Have All\Guns & Infinite Ammo cd Press C Left to receive all Guns 81102C0A 0001 50000B04 0000 810EBF66 03E8 cn Infinite\Health cd If you fall into Water just turn off the Infinite Health & put back on when you restrat. 810EBF58 42D8 cn Infinite\99 Lives 810EC2D2 03E7 cn Level Select Menu 801022CA 0EF0 cn Have All\Keys 810EBF60 0001 800EBF61 0001 810EBF62 0001 cn High Score 810EBF4E FFFF cn Max Bonus 810EC2CA 270F crc CEDCDE1E-513A0502-C:50 gn Bust-A-Move 2 - Arcade Edition (E) cn Infinite Credit 80120171 00FF cn Bubble Pointer Puzzle 801807CD 0001 cn Bubble Pointer 1P V CPU 8017E1FD 0001 cn Access Another World cd This is for Puzzle Mode 8116D100 0001 cn Max Points Aid 81170E4A 25C2 crc E328B4FA-004A28E1-C:50 gn Bust A Move 3 DX cn Always have guide line on 80056CCC 0082 cn Pointer always active D0056FA0 0002 80056FA0 0082 cn Play As Select\Player 1 800E3250 ???? 0000:"Bubbloon",0001:"Twinkie",0002:"Prettio",0003:"Marina",0004:"Musashi",0005:"Luna",0006:"Jack",0007:"SSB",0008:"Dragoon",0009:"Gnome",0010:"Monkey",0011:"furby? (looks like 2 balloons)",0012:"Blue Gnome",0013:"1 of the two Ballons",0014:"Water under ballons" cn Play As Select\Player 2 800E3258 ???? 0000:"Bubbloon",0001:"Twinkie",0002:"Prettio",0003:"Marina",0004:"Musashi",0005:"Luna",0006:"Jack",0007:"SSB",0008:"Dragoon",0009:"Gnome",0010:"Monkey",0011:"furby? (looks like 2 balloons)",0012:"Blue Gnome",0013:"1 of the two Ballons",0014:"Water under ballons" cn Next Bubble Select\Player 1 800ECE19 ???? 0000:"No Bubble",0001:"Red",0002:"Green",0003:"Blue",0004:"Yellow",0005:"Orange",0006:"Purple",0007:"White",0008:"Black" cn Next Bubble Select\Player 2 800ECF09 ???? 0000:"No Bubble",0001:"Red",0002:"Green",0003:"Blue",0004:"Yellow",0005:"Orange",0006:"Purple",0007:"White",0008:"Black" cn Press GS to Reset Player 2 score to 0 8809D9C0 0000 8809D9C2 0000 crc 64F1B7CA-71A23755-C:50 gn CASTLEVANIA cn Infinite\Health 81389C42 0064 cn Infinite\Throwing Weapon 81389C4C 0064 cn Throwing Weapon Modifier 81389C46 ???? 0000:"Nothing",0001:"Knives",0002:"Exploding Potions",0003:"Cross",0004:"Axes" cn Press L To Levitate D0387D7F 0020 81350810 3FCB cn Have\All Items 50000501 0000 80389C4E 0001 50000301 0000 80389C55 0001 80389C5E 0001 80389C5F 0001 80389C61 0001 50000E01 0000 80389C64 0001 cn Have\Invincibility 80342BFE 000B cn Infinite\Red Jewels 80389C4D 0064 cn Status 80389C8C ???? 0001:"Good",0008:"Vamp",0011:"Poison",0022:"Good but depressed",0066:"Sto",001F:"V+P" cn Open All Doors and Gates,No Bosses 50002A02 0000 81389BD0 FFFF cn Infinite\Energy 80389C33 0064 cn Infinite\Funds 80389C49 0001 81389C4A 869F cn Have\Exp Points 80389C4D 0063 cn Max Power Up 80389CF1 0002 cn Never Get Poisoned 81389C8C 0000 cn Level Select cd You must use this code on a saved game, because the intro to the first level will mess up the game. Now select the saved game, and hold down the GS button until the level loads. Some of the boss stages will not let you fight the boss unless you re-enter the area. Also, with the part of stage modifier, the second code modifies the part of the level that you are in, and 0000 is the level's start. 89389C94 ???? 0000:"Forest of Silence",0002:"Castle Wall",0003:"Villa",0004:"Inside Villa",0006:"Garden Maze",0007:"Tunnel",0008:"Underground Waterway",0009:"Castle Center",0010:"Tower of Execution",0011:"- Tower of Sorcery",0012:"- Tower of Science",0013:"- Duel Tower",0014:"- Fight With Death/Actrise",0015:"- Castle Keep",0016:"- Intro (Glitch)",0017:"- Clock Tower",0018:"- Final Dracula",001A:"- Fight With Maze Boss",001B:"- Room of Clocks",001C:"- ??",001D:"- ??" 89389C91 0000 cn Switch From cd This Switch From Cheat lets you switch characters on a saved game For example, if you are Reindhart and you want to be Carrie in the middle of your game save it and then enable this Cheat and press F1. when you start your saved game back up you'll be Carrie instead of Reindhart. 80389C41 ???? 0000:"Carrie to Reindhart",0001:"Reindhart to Carrie" crc A2C54BE7-6719CBB2-C:50 gn Castlevania - Legacy of Darkness (E) cn Keys Option\Have Clocktower Key B 801CC040 0001 cn Keys Option\Have Clocktower Key A 801CC03F 0001 cn Keys Option\Have Clocktower Key E 801CC03E 0001 cn Keys Option\Have Wall key 801CC03D 0001 cn Keys Option\Have Control Room Key 801CC03C 0001 cn Keys Option\Have Art Tower Key 2 801CC03B 0001 cn Keys Option\Have Art Tower Key 1 801CC03A 0001 cn Keys Option\Have Clocktower Key D 801CC039 0001 cn Keys Option\Have Clocktower Key C 801CC038 0001 cn Keys Option\Have Thorn Key 801CC037 0001 cn Keys Option\Have Rose Garden Key 801CC01A 0001 cn Keys Option\Have Deck Key 801CC035 0001 cn Keys Option\Have Execution Key 801CC034 0001 cn Keys Option\Have Chamber Key 801CC033 0001 cn Keys Option\Have Copper Key 801CC032 0001 cn Keys Option\Have Garden Key 801CC031 0001 cn Keys Option\Have Storeroom Key 801CC030 0001 cn Keys Option\Have Left Tower Key 801CC02F 0001 cn Keys Option\Have Archives Key 801CC02E 0001 cn Have Options\Rose Brooch 801CC02D 0001 cn Have Options\Crest Half B 801CC02C 0001 cn Have Options\Crest Half A 801CC02B 0001 cn Have Options\Oldreys Diary 801CC02A 0001 cn Have Options\Winch lever 801CC029 0001 cn Infinite Options\Moon Cards 801CC028 0001 cn Infinite Options\Sun Cards 801CC027 0001 cn Have Options\Mandragora 801CC026 0001 cn Have Options\Magical Nitro 801CC025 0001 cn Have Options\Contract 801CC024 0001 cn Have Options\Powerup 801CC01F 0001 cn Infinite Options\Cure Ampoule 801CC01E 0001 cn Infinite Options\Purifying 801CC01D 0001 cn Infinite Options\Healing kit 801CC01C 0001 cn Infinite Options\beef 801CC01B 0001 cn Infinite Options\chicken 801CC01A 0001 cn Have Options\Special Crystal 3 801CC019 0001 cn Have Options\Special Crystal 2 801CC018 0001 cn Have Options\Special Crystal 1 801CC017 0001 cn Infinite Options\Red Jewels 801CC015 0068 cn Infinite Options\Gold 811CC012 2710 cn Infinite Options\Health 811CC00A 2710 cn Weapon Modifier 801CC00F ???? 0000:"Nothing",0001:"Knife",0002:"Potion",0003:"Cross",0004:"Axe" cn Status Modifier 801CC054 ???? 0000:"Never Get Poisoned or Vamped",0001:"Normal",0004:"Vamp",0008:"Poison",000C:"Vamped & Poisoned",00FF:"Instant Death" cn Level Modifier 801CC349 ???? 0000:"Forest Of Silence",0001:"Left Tower",0002:"Castle Wall",0003:"Villa",0004:"Villa",0005:"Villa",0006:"Villa",001A:"Villa",0007:"Tunnel",0008:"Underground Waterway",0009:"Castle Center",000A:"Castle Center",000B:"Castle Center",000C:"Castle Center",000D:"Castle Center",000E:"Castle Center",000F:"Castle Center",0010:"Foggy Lake",0011:"Foggy Lake",0012:"Foggy Lake",0013:"Cave Of Spiderwomen",0014:"Castle Keep",0015:"Castle Keep",0016:"Falls Into Space(?)",0017:"Clock Tower",0018:"Final Battle Site",0019:"Castle Center",001B:"Room Of Clocks",001C:"Countryside Where Carrie's Mom Is Buried.(Fall Through Ground)",002B:"Countryside Where Carrie's Mom Is Buried.(Fall Through Ground)",001D:"Tower Of Sorcery",001E:"Tower Of Execution",001F:"Tower Of Execution",0020:"Tower Of Execution",0021:"Tower Of Science",0022:"Tower Of Science",0023:"Tower Of Ruins",0024:"Tower Of Ruins",0025:"Art Tower",0026:"Art Tower",0027:"Dual Tower",0028:"Clock Tower",0029:"Clock Tower",002A:"Outer Wall",002C:"Fall From Sky Ouside Of Castlevania Opening",002D:"Another Free Fall. Forest Where Girl Runs In Opening",002E:"Black Room(?)" cn Inter-Level Modifier 801CC34B ???? 0000:"Forest Of Silence",0001:"Left Tower",0002:"Castle Wall",0003:"Villa",0004:"Villa",0005:"Villa",0006:"Villa",001A:"Villa",0007:"Tunnel",0008:"Underground Waterway",0009:"Castle Center",000A:"Castle Center",000B:"Castle Center",000C:"Castle Center",000D:"Castle Center",000E:"Castle Center",000F:"Castle Center",0010:"Foggy Lake",0011:"Foggy Lake",0012:"Foggy Lake",0013:"Cave Of Spiderwomen",0014:"Castle Keep",0015:"Castle Keep",0016:"Falls Into Space(?)",0017:"Clock Tower",0018:"Final Battle Site",0019:"Castle Center",001B:"Room Of Clocks",001C:"Countryside Where Carrie's Mom Is Buried.(Fall Through Ground)",002B:"Countryside Where Carrie's Mom Is Buried.(Fall Through Ground)",001D:"Tower Of Sorcery",001E:"Tower Of Execution",001F:"Tower Of Execution",0020:"Tower Of Execution",0021:"Tower Of Science",0022:"Tower Of Science",0023:"Tower Of Ruins",0024:"Tower Of Ruins",0025:"Art Tower",0026:"Art Tower",0027:"Dual Tower",0028:"Clock Tower",0029:"Clock Tower",002A:"Outer Wall",002C:"Fall From Sky Ouside Of Castlevania Opening",002D:"Another Free Fall. Forest Where Girl Runs In Opening",002E:"Black Room(?)" cn Cut Scene Modifier 801CC363 0009 801CC35B ???? 0003:"Castle Drawbridge Lowers",0004:"Character Enters Castle",0005:"(?)",000A:"(?)",000C:"(?)",0020:"(?)",0021:"(?)",0022:"(?)",0006:"Vampire In Main Entrance Hall Of Villa",0007:"One Of The Working Gears Cut Scenes",0008:"\"I Smell Poison\" From Underground Waterway",0009:"Castle Gate Closes In Villa Upon Entering Villa",000B:"Renon Appears For First Time",000D:"Village Vampire In Upstairs Villa",000E:"Malus Appears For The First Time",000F:"Malus Leaves Garden",0010:"Character In Boat On Foggy Lake",0011:"Seal Removed From Wall In Arena",0012:"Bleeding Statue",0013:"Cosmic Lights",0014:"Explosion At Wall In Arena",0015:"Explosion At Wall In Castle That Leads To Hidden Room",0016:"Malus Appears Again In Upstairs Room Of Castle",0017:"Bull Awakens",0018:"Vincent The Vampire",0019:"One Of The Working Gears Cut Scenes",001A:"Gate Opens In Forest Of Silence",001B:"Meet Renon For The Last Time In Castle Keep.",001C:"This Cut Scene Runs Cut Scene 27 And 2E",001E:"Castle Keep Destructs",001F:"Malus On Flying Horse Outside Castle Keep",0024:"Spider People In Tunnel",0025:"Rosa In Garden",0027:"Castel Destruction",0028:"Space Warp",0029:"Castle Destruction",002A:"Malus Is Saved By Reinhardt",002B:"Malus And Reinhardt On Horse",002E:"Rosa Returns",0030:"Ada Henry And Cornell At Game End",0031:"Scrolling Text About Castle And Henry",0033:"Vampire In Basement",0034:"Vampire In Villa Basement Destroyed Woman Vampire Rises",0035:"Finds Hidden Path In Villa Basement",0037:"Lever & Gear In Castle",0038:"Harpie",0039:"Harpie Destroyed",0044:"Death(Grim Reaper)",0045:"Death Is Destroyed",0046:"Castle Drawbridge Closes And Ortega Appears",0047:"Thirsty Man",0048:"Cornell Meets Henry In Garden",0049:"Cornell And Henry Part In Garden",0051:"Monster Dracula Appears",0052:"Actrise Appears In Castle Center",0054:"Actrise Appears Again With Cousin Fernandes Before Fight With Carrie",0055:"Cousin Fernandes Is Destroyed",0056:"Actrise Appears Again Before Fight With Carrie",0057:"Actrise Defeated By Carrie" crc DCCF2134-9DD63578-C:50 gn Centre Court Tennis (E) cn Infinite Character Creation Points 8017BB17 000A cn Maximum\Serve Smash 8117BB0E 0A0A cn Maximum\Volley Lob 8117BB10 0A0A cn Maximum\Stroke Spin 8117BB12 0A0A cn Maximum\Back,Front,Left & Right Move 8117BB14 000A cn Left vs Right Side 8017BB16 0005 cn Max Score In Mini Games 81116230 05F5 81116232 E0FF cn Practice\Balls Always Zero 8011684F 0000 cn Practice\Time Always Zero 8111684A 0000 cn Scoreboard\Max sets top 80116983 0009 cn Scoreboard\Max games top 8011698B 0009 cn Scoreboard\Max sets bottom 80116987 0009 cn Scoreboard\Max games bottom 8011698F 0009 crc B9AF8CC6-DEC9F19F-C:50 gn Chameleon Twist (E) cn Access All Levels 8020860E 00FF 80208610 00FF cn Extra Crowns 80251857 0015 cn Infinite Health 80174DF3 000A cn Extended Tongue 8133185E FFFF crc 07A69D01-9A7D41A1-C:50 gn Chameleon Twist 2 (E) cn Infinite Health 8018BA7D 000F cn Max Collectable Items 80164501 0014 cn Have 6 Carrots 80164519 007E cn Have All\Levels 80164508 003F cn Have All\Costumes 8016451A 00FE cn Have All\Collectibles\Stage 1 80164510 0014 cn Have All\Collectibles\Stage 2 80164511 0014 cn Have All\Collectibles\Stage 3 80164512 0014 cn Have All\Collectibles\Stage 4 80164513 0014 cn Have All\Collectibles\Stage 5 80164514 0014 cn Have All\Collectibles\Stage 6 80164515 0014 cn Press L To levitate cd Press L To Levitate & Let go to land D018BAB5 0020 8118B9E0 4200 crc FB3C48D0-8D28F69F-C:50 gn Charlie Blast's Territory (E) cn Stop Timer From Counting Down (All Levels) 8101D4E0 2400 crc 2E359339-3FA5EDA6-C:50 gn =Chopper Attack (E) cn Max Score 81129716 FFFF cn Infinite Weapon\1st Position 8012972B 0063 cn Infinite Weapon\2nd Position 8012972F 0063 cn Infinite Weapon\3rd Position 80129733 0063 cn Infinite Weapon\4th Position 80129737 0063 cn Infinite Weapon\5th Position 8012973B 0063 cn Weapon Modifier\Gun Weapon 80129A13 ???? 0000:"No Weapon",0001:"Normal Shot",0002:"2-Way Shot",0003:"3-Way Shot",0004:"4-Way Shot" cn Gun 4-Way Shot 80129A13 0004 cn Infinite Fuel 81129A16 FFFF cn Infinite Shield 811299B8 03E8 cn Opens All 5 Item Slots 8012974B 0005 cn Weapon Modifier\1st Position cd Must to be used with the Infinite Weapon Codes & the open all 5 item slot code. 80129729 ???? 0000:"Nothing",0001:"AGM",0002:"AAM",0003:"AGAM",0004:"Dummy",0005:"Rocket",0006:"Cluster",0007:"H-Cluster",0008:"H-Plasma" cn Weapon Modifier\2nd Position cd Must to be used with the Infinite Weapon Codes & the open all 5 item slot code. 8012972D ???? 0000:"Nothing",0001:"AGM",0002:"AAM",0003:"AGAM",0004:"Dummy",0005:"Rocket",0006:"Cluster",0007:"H-Cluster",0008:"H-Plasma" cn Weapon Modifier\3rd Position cd Must to be used with the Infinite Weapon Codes & the open all 5 item slot code. 801297E1 ???? 0000:"Nothing",0001:"AGM",0002:"AAM",0003:"AGAM",0004:"Dummy",0005:"Rocket",0006:"Cluster",0007:"H-Cluster",0008:"H-Plasma" cn Weapon Modifier\4th Position cd Must to be used with the Infinite Weapon Codes & the open all 5 item slot code. 801297E5 ???? 0000:"Nothing",0001:"AGM",0002:"AAM",0003:"AGAM",0004:"Dummy",0005:"Rocket",0006:"Cluster",0007:"H-Cluster",0008:"H-Plasma" cn Weapon Modifier\5th Position cd Must to be used with the Infinite Weapon Codes & the open all 5 item slot code. 801297E9 ???? 0000:"Nothing",0001:"AGM",0002:"AAM",0003:"AGAM",0004:"Dummy",0005:"Rocket",0006:"Cluster",0007:"H-Cluster",0008:"H-Plasma" cn Score Attack Mode 81129762 0001 cn Stage Select On 81129766 0001 cn Option On 8112976A 0001 cn Clear Mission Selector 8112976C ???? 0001:"1",0002:"2",0003:"3",0004:"4",0005:"5",0006:"6",0007:"7",0008:"8" cn Texture Mode 81129774 0001 crc 8E9692B3-4264BB2A-C:50 gn Clay Fighter 63 1-3 (E) cn Extra Characters and Secret Options 801A86A1 000F cn Stage Select 801A868B ???? 0000:"Candy Factory",0001:"Claynaveral Hangar",0002:"Camp Claynaveral",0003:"Outhouse",0004:"Mudville Mansion",0005:"Ghastly Graveyard",0006:"Spooky Spire",0007:"Happy Harry's Hut",0008:"Freezing Fortress",0009:"Refuse Room",000A:"Grotto Gulch",000B:"Rubbage Room",000C:"Rubbage Reef",000D:"Kiln's Laboratory",000E:"Kiln's Hideout",000F:"Fiery Furnace",0010:"Research Room",0011:"Clayribbean Cruise",0012:"Santa's Workship",0013:"Kooky Courtyard",0014:"Santa's Toy Factory",0015:"Boogerhenge",0016:"Backwash Bay",0017:"Tureen Toilet",0018:"Tribal Tower",0019:"Aquadome" cn Play As\Player1 801A868F ???? 0000:"Bad Mr. Frosty",0001:"Blob",0002:"Bonker",0003:"Boogerman",0004:"Dr. Kiln",0005:"Earthworm Jim",0008:"Houngan",0009:"Icky Bod Clay",000A:"Kung Pow",000D:"Sumo Santa",000E:"Taffy",000F:"T-Hoppy" cn Refuse Room, Grotto Gulch, Santa's Workship Stages\Can't be Stunned\Player 1 801F766B 0000 cn Refuse Room, Grotto Gulch, Santa's Workship Stages\Infinite Energy\Player 1 801F7673 00AA cn Refuse Room, Grotto Gulch, Santa's Workship Stages\No Energy\Player 1 801F7673 0000 cn Refuse Room, Grotto Gulch, Santa's Workship Stages\Full Super Bar\Player 1 811F767A 0200 cn Tribal Tower Stage\Can't be Stunned\Player 1 801F770B 0000 cn Tribal Tower Stage\Infinite Energy\Player 1 801F7713 00AA cn Tribal Tower Stage\No Energy\Player 1 801F7713 0000 cn Tribal Tower Stage\Full Super Bar\Player 1 811F771A 0200 cn Aquadome Stage\Can't be Stunned\Player 1 801F799B 0000 cn Aquadome Stage\Infinite Energy\Player 1 801F7993 00AA cn Aquadome Stage\No Energy\Player 1 801F7993 0000 cn Aquadome Stage\Full Super Bar\Player 1 811F799A 0200 cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\Can't be Stunned\Player 1 801F7E9B 0000 cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\Infinite Energy\Player 1 801F7EA3 00AA cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\No Energy\Player 1 801F7EA3 0000 cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\Full Super Bar\Player 1 811F7EAA 0200 cn Freezing Fortress Stage\Can't be Stunned\Player 1 801F7EFB 0000 cn Freezing Fortress Stage\Infinite Energy\Player 1 801F7F03 00AA cn Freezing Fortress Stage\No Energy\Player 1 801F7F03 0000 cn Freezing Fortress Stage\Full Super Bar\Player 1 811F7F0A 0200 cn Rubbage Reef Stage\Can't be Stunned\Player 1 801F7F7B 0000 cn Rubbage Reef Stage\Infinite Energy\Player 1 801F7F83 00AA cn Rubbage Reef Stage\No Energy\Player 1 801F7F83 0000 cn Rubbage Reef Stage\Full Super Bar\Player 1 811F7F8A 0200 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\Can't be Stunned\Player 1 801F7FAB 0000 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\Infinite Energy\Player 1 801F7FB3 00AA cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\No Energy\Player 1 801F7FB3 0000 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\Full Super Bar\Player 1 811F7FBA 0200 cn Clayribbean Cruise Stage\Can't be Stunned\Player 1 801F805B 0000 cn Clayribbean Cruise Stage\Infinite Energy\Player 1 801F8063 00AA cn Clayribbean Cruise Stage\No Energy\Player 1 801F8063 0000 cn Clayribbean Cruise Stage\Full Super Bar\Player 1 811F806A 0200 cn Backwash Bay Stage\Can't be Stunned\Player 1 801F80EB 0000 cn Backwash Bay Stage\Infinite Energy\Player 1 801F80F3 00AA cn Backwash Bay Stage\No Energy\Player 1 801F80F3 0000 cn Backwash Bay Stage\Full Super Bar\Player 1 811F80FA 0200 cn Ghastly Graveyard Stage\Can't be Stunned\Player 1 801F818B 0000 cn Ghastly Graveyard Stage\Infinite Energy\Player 1 801F8193 00AA cn Ghastly Graveyard Stage\No Energy\Player 1 801F8193 0000 cn Ghastly Graveyard Stage\Full Super Bar\Player 1 811F819A 0200 cn Candy Factory Stage\Can't be Stunned\Player 1 801F826B 0000 cn Candy Factory Stage\Infinite Energy\Player 1 801F8273 00AA cn Candy Factory Stage\No Energy\Player 1 801F8273 0000 cn Candy Factory Stage\Full Super Bar\Player 1 811F827A 0200 cn Kooky Courtyard Stage\Can't be Stunned\Player 1 801F836B 0000 cn Kooky Courtyard Stage\Infinite Energy\Player 1 801F8373 00AA cn Kooky Courtyard Stage\No Energy\Player 1 801F8373 0000 cn Kooky Courtyard Stage\Full Super Bar\Player 1 811F837A 0200 cn Santa's Toy Factory Stage\Can't be Stunned\Player 1 801F879B 0000 cn Santa's Toy Factory Stage\Infinite Energy\Player 1 801F87A3 00AA cn Santa's Toy Factory Stage\No Energy\Player 1 801F87A3 0000 cn Santa's Toy Factory Stage\Full Super Bar\Player 1 811F87AA 0200 cn Boogerhenge, Tureen Toilet Stage\Can't be Stunned\Player 1 801F8B3B 0000 cn Boogerhenge, Tureen Toilet Stage\Infinite Energy\Player 1 801F8B43 00AA cn Boogerhenge, Tureen Toilet Stage\No Energy\Player 1 801F8B43 0000 cn Boogerhenge, Tureen Toilet Stage\Full Super Bar\Player 1 811F8B4A 0200 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\Can't be Stunned\Player 1 801F971B 0000 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\Infinite Energy\Player 1 801F9723 00AA cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\No Energy\Player 1 801F9723 0000 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\Full Super Bar\Player 1 811F972A 0200 cn Rubbage Room Stage\Can't be Stunned\Player 1 801FA1AB 0000 cn Rubbage Room Stage\Infinite Energy\Player 1 801FA1B3 00AA cn Rubbage Room Stage\No Energy\Player 1 801FA1B3 0000 cn Rubbage Room Stage\Full Super Bar\Player 1 811FA1BA 0200 cn Refuse Room, Grotto Gulch, Santa's Workship Stages\Can't be Stunned\Player 2 801FAB0B 0000 cn Refuse Room, Grotto Gulch, Santa's Workship Stages\Infinite Energy\Player 2 801FAB13 00AA cn Refuse Room, Grotto Gulch, Santa's Workship Stages\No Energy\Player 2 801FAB13 0000 cn Refuse Room, Grotto Gulch, Santa's Workship Stages\Full Super Bar\Player 2 811FAB1A 0200 cn Tribal Tower Stage\Can't be Stunned\Player 2 801FABAB 0000 cn Tribal Tower Stage\Infinite Energy\Player 2 801FABB3 00AA cn Tribal Tower Stage\No Energy\Player 2 801FABB3 0000 cn Tribal Tower Stage\Full Super Bar\Player 2 811FABBA 0200 cn Aquadome Stage\Can't be Stunned\Player 2 801FAE2B 0000 cn Aquadome Stage\Infinite Energy\Player 2 801FAE33 00AA cn Aquadome Stage\No Energy\Player 2 801FAE33 0000 cn Aquadome Stage\Full Super Bar\Player 2 811FAE3A 0200 cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\Can't be Stunned\Player 2 801FB33B 0000 cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\Infinite Energy\Player 2 801FB343 00AA cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\No Energy\Player 2 801FB343 0000 cn Outhouse, Claynaveral Hanger, Camp Claynaveral Stages\Full Super Bar\Player 2 811FB34A 0200 cn Freezing Fortress Stage\Can't be Stunned\Player 2 801FB39B 0000 cn Freezing Fortress Stage\Infinite Energy\Player 2 801FB3A3 00AA cn Freezing Fortress Stage\No Energy\Player 2 801FB3A3 0000 cn Freezing Fortress Stage\Full Super Bar\Player 2 811FB3AA 0200 cn Rubbage Reef Stage\Can't be Stunned\Player 2 801FB41B 0000 cn Rubbage Reef Stage\Infinite Energy\Player 2 801FB423 00AA cn Rubbage Reef Stage\No Energy\Player 2 801FB423 0000 cn Rubbage Reef Stage\Full Super Bar\Player 2 811FB42A 0200 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\Can't be Stunned\Player 2 801FB44B 0000 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\Infinite Energy\Player 2 801FB453 00AA cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\No Energy\Player 2 801FB453 0000 cn Happy Harry's Hut, Spooky Spire, Mudville Mansion Stage\Full Super Bar\Player 2 811FB45A 0200 cn Clayribbean Cruise Stage\Can't be Stunned\Player 2 801FB4FB 0000 cn Clayribbean Cruise Stage\Infinite Energy\Player 2 801FB503 00AA cn Clayribbean Cruise Stage\No Energy\Player 2 801FB503 0000 cn Clayribbean Cruise Stage\Full Super Bar\Player 2 811FB50A 0200 cn Backwash Bay Stage\Can't be Stunned\Player 2 801FB58B 0000 cn Backwash Bay Stage\Infinite Energy\Player 2 801FB593 00AA cn Backwash Bay Stage\No Energy\Player 2 801FB593 0000 cn Backwash Bay Stage\Full Super Bar\Player 2 811FB59A 0200 cn Ghastly Graveyard Stage\Can't be Stunned\Player 2 801FB62B 0000 cn Ghastly Graveyard Stage\Infinite Energy\Player 2 801FB633 00AA cn Ghastly Graveyard Stage\No Energy\Player 2 801FB633 0000 cn Ghastly Graveyard Stage\Full Super Bar\Player 2 811FB63A 0200 cn Candy Factory Stage\Can't be Stunned\Player 2 801FB70B 0000 cn Candy Factory Stage\Infinite Energy\Player 2 801FB713 00AA cn Candy Factory Stage\No Energy\Player 2 801FB713 0000 cn Candy Factory Stage\Full Super Bar\Player 2 811FB71A 0200 cn Kooky Courtyard Stage\Can't be Stunned\Player 2 801FB80B 0000 cn Kooky Courtyard Stage\Infinite Energy\Player 2 801FB813 00AA cn Kooky Courtyard Stage\No Energy\Player 2 801FB813 0000 cn Kooky Courtyard Stage\Full Super Bar\Player 2 811FB81A 0200 cn Santa's Toy Factory Stage\Can't be Stunned\Player 2 801FBC3B 0000 cn Santa's Toy Factory Stage\Infinite Energy\Player 2 801FBC43 00AA cn Santa's Toy Factory Stage\No Energy\Player 2 801FBC43 0000 cn Santa's Toy Factory Stage\Full Super Bar\Player 2 811FBC4A 0200 cn Boogerhenge, Tureen Toilet Stage\Can't be Stunned\Player 2 801FBFDB 0000 cn Boogerhenge, Tureen Toilet Stage\Infinite Energy\Player 2 801FBFE3 00AA cn Boogerhenge, Tureen Toilet Stage\No Energy\Player 2 801FBFE3 0000 cn Boogerhenge, Tureen Toilet Stage\Full Super Bar\Player 2 811FBFEA 0200 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\Can't be Stunned\Player 2 801FCBBB 0000 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\Infinite Energy\Player 2 801FCBC3 00AA cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\No Energy\Player 2 801FCBC3 0000 cn Kiln's Laboratory, Kiln's Hideout, Fiery Furnace, Research Room Stage\Full Super Bar\Player 2 811FCBCA 0200 cn Rubbage Room Stage\Can't be Stunned\Player 2 801FD64B 0000 cn Rubbage Room Stage\Infinite Energy\Player 2 801FD653 00AA cn Rubbage Room Stage\No Energy\Player 2 801FD653 0000 cn Rubbage Room Stage\Full Super Bar\Player 2 811FD65A 0200 crc AE5B9465-C54D6576-C:50 gn Command & Conquer (E) cn Infinite Options\Power GDI 810C55D6 FFFF cn Infinite Options\Power NOD 810C577E FFFF cn Infinite Options\Health Commando 810B5364 0080 cn Infinite Options\Money NOD 810C575E FFFF cn Infinite Options\Money GDI 810C55B6 FFFF cn Level Select cd Select Replay Mission, Press L To Display All Missions,And Press R To Select Your Team You can now press R+L+Up To Win A Battle 810901AA 0001 crc 373F5889-9A6CA80A-C:50 gn CONKER BFD cn Infinite\Health\Player 1 800CC8BA 0006 cn Infinite\Oxygen 800CC7A2 0001 cn Infinite\Pots of cash 810D256A FFFF cn Access All\Chapters, Scenes,& Multi-Player Characters 50002401 0000 800EA120 00FF cn Play as cd Here you can Choose Options who you want to play as,But only one Option at a time. 800D255F ???? 0001:"Wessle",0003:"Tedi",0004:"Combat Squirrel",0005:"Conker",000B:"Uga",000C:"Bald Caveman",000D:"Caveman",000E:"Mohican Caveman",0010:"Neo Conker",001B:"Villager",0021:"Zombie",0023:"Enemy Bat",0024:"Conkers Bat",0025:"Army Captain",0026:"Tedi Boss",0027:"Gregg",0028:"Gregg skeleton" cn Infinite\Lives Player 1 800D2564 0063 cn Infinite\Health\Player 2 800CCBE6 270F cn Infinite\Health\Player 3 800CCF12 270F cn Infinite\Health\Player 4 800CD23E 270F cn Infinite\Time In Multi 8109019A 7500 cn Infinite\Bags In Heist 800E1004 00FF cn Access All\Characters & Weapons In Multi Race 810EA122 ???? 00FF:"All Characters & Baseball bat",00FB:"All Characters & Frying Pan",00F3:"All Characters & Bones" cn Infinite\Bombs 802059EA 0030 cn Infinite\Max Kills Player 1 cd MULTI ONLY. Only put this code on once you are in the game 800E0F67 03E7 cn Infinite\Accuracy Count Player 1 cd MULTI ONLY. Only put this code on once you are in the game,Once you pick up a Gun a shoot once, you will 100%. 800E0F87 0001 cn Infinite\Head Shot Count Player 1 cd MULTI ONLY. Only put this code on once you are in the game 800E0F8B 0064 cn Press L To Levitate\Player 1 cd Press L Button to Levitate & Let go to come back down D0042DA5 0020 810CC710 41CB cn Press L To Levitate\Player 2 cd Press L Button to Levitate & Let go to come back down D0042DAE 0020 810CCA3C 41CB cn Press L To Levitate\Player 3 cd Press L Button to Levitate & Let go to come back down D0042DB5 0020 810CCD68 41CB cn Press L To Levitate\Player 4 cd Press L Button to Levitate & Let go to come back down D0042DBE 0020 810CD094 41CB cn Weapon Select In Multi (On Pick Up) cd Select what Weapon you would like in Multi Player and then on a Weapon Pickup you will have the weapon of your choice.to change for another just Enable the one of your choice to have that instead.(you must have a weapon already to change for the next. 80180C4B ???? 0001:"Sword",0002:"Nothing",0003:"Yellow Chain-Ssaw",0004:"Throwing Knives",0005:"Riffle",0006:"Long Pistol with Sight",0007:"Rocket Launcher",0008:"Buck Shot",000A:"High Powred Riffle With Scope",000C:"Two Automatic Machine Guns",0013:"Gas Mask" crc 503EA760-E1300E96-C:50 gn Cruis'n USA (E) (1.0) cn Always Place 1st 801502CB 0001 cn Unlimited Time 801509ED 0045 cn Access Options\All Tracks 80150602 001F 80150603 00FF cn Access Options\All Car Upgrades 50000704 0000 801505DF 0003 crc 503EA760-E1300E96-C:50 gn Cruis'n USA (E) (1.1) cn Always Place 1st 801501AB 0001 cn Unlimited Time 801508CD 0045 cn Access Options\All Tracks 801504E2 001F 801504E3 00FF cn Access Options\All Car Upgrades 50000704 0000 801504BF 0003 crc 503EA760-E1300E96-C:50 gn Cruis'n USA (E) (1.2) cn Always Place 1st 801501DB 0001 cn Unlimited Time 801508FD 0045 cn Access Options\All Tracks 80150512 001F 80150123 00FF cn Access Options\All Car Upgrades 50000704 0000 801504EF 0003 crc 83F3931E-CB72223D-C:50 gn Cruis'n World (E) cn Infinite Time 813D0C1C 4296 cn Access\Florida & Moon Tracks cd This is for Championship Mode Only 813BF2A4 0101 cn Max Power Level,& Paint Job / Two Tone 813BEDA2 0512 cn Access\All Cars & Upgrades 813BED58 1FFF 803BED22 0005 cn Unlocked Pro & Master difficulty level 803BEDD5 0003 cn Dancing Girl Always On 803BED53 0001 803C20AF 0054 cn Cannot Spin Out 803CDC73 0000 cn Disable\Left Lane Traffic cd This is for Championship Mode Only 8033C83B 0001 cn Disable\Right Lane Traffic cd This is for Championship Mode Only 8033C83F 0001 cn Max\Trick points 803BF21F 0063 cn Max\Championship Points 813BFB4E 270F cn Always 1st\Player 1 803CDF03 0001 cn Unlimited Nitro\Player 1 cd Press C-Button Down For Boost, This Code is for Championship Mode Only 803C74C7 0003 cn Stop Elapsed Time\Player 1 813C7558 3C80 cn Always 1st\Player 2 803CE3DB 0001 cn Unlimited Nitro\Player 2 cd Press C-Button Down For Boost, This Code is for Championship Mode Only 803C7703 0003 cn Stop Elapsed Time\Player 2 813C7794 3C80 cn Always 1st\Player 3 803CDA2B 0001 cn Unlimited Nitro\Player 3 cd Press C-Button Down For Boost, This Code is for Championship Mode Only 803C704F 0064 cn Always 1st\Player 4 803CD553 0001 cn Unlimited Nitro Player 4 cd Press C-Button Down For Boost, This Code is for Championship Mode Only 803C728B 0003 crc D1A78A07-52A3DD3E-C:50 gn CyberTiger (E) cn Infinite & Max Power-Ups 800B4612 00F0 50000801 0000 800B4600 00FF cn Access Secret Characters\Kimmi & Cindy 800B0DAA 0011 cn Access Secret Characters\Twfan & Eagamer 800B0DAE 0011 cn Access Secret Characters\Bengal The Tiger 800B4DB2 0011 cn Access Secret Characters\Mark 800B0DB7 0012 cn Access Secret Characters\Robert & Delvis 800B0DBA 0011 cn Access Secret Characters\Starr & Traci 800B0DBE 0011 cn Access Secret Characters\Festus 800B0DC3 0001 cn Access Secret Characters\Marvin The Alien 800B0DC7 0001 crc 7ED67CD4-B4415E6D-C:50 gn DARK RIFT cn Access Sonork Character 80049AA0 0001 cn Access Demitron Character 80049AA4 0001 cn Infinite Health\All Levels\Player 1 812716E0 0190 8127BDB8 0190 8127E478 0190 81292EE8 0190 81293768 0190 81297538 0190 812ACCC8 0190 812B1CE8 0190 812B7BE8 0190 8138AEE0 0190 cn Infinite Health\All Levels\Player 2 81271FB8 0190 8127B158 0190 8127E820 0190 81293B48 0190 81294390 0190 812980B8 0190 812AD608 0190 812B2D08 0190 812B67D8 0190 8138A898 0190 cn Press GS For 2 Rounds Won\Player 1 880B6491 0002 cn Press GS For 2 Rounds Won\Player 2 880B64A3 0002 cn Music Modifier 80081812 ???? 0000:"Music Off",002A:"Volume Low",0055:"Volume Medium",007F:"Volume Max" crc 630AA37D-896BD7DB-C:50 gn Destruction Derby 64 (E) cn Have All\Tracks 50000802 0000 81099498 0101 cn Have All\Difficulty Levels 8109B7D6 0003 cn Have All\Cars 50000602 0000 8109B7D8 0101 cn Max\Points Aid 8112A3CE 02F4 cn Max\Collisions Points 812E013A 02F4 cn Max\Checkpoint Bonus 812E013E 02F4 crc FD73F775-9724755A-C:50 gn Diddy Kong Racing cn Enable All Cheats cd Go into Options & then Magic Codes. Then Code list to turn off & on what you want. 800DFE2C 001F 50000301 0000 800DFE2D 00FF cn Have All\Trophies cd Only put this code on once you are inside the lobby to choose a gate,or it will crash the game. 80207E6E 0007 80207E6F 00FF cn Have All\Keys cd Only put this code on once you are inside the lobby to choose a gate,or it will crash the game. 80207E69 001F cn Have All\T.T. Amulets cd Only put this code on once you are inside the lobby to choose a gate,or it will crash the game. 80207E77 0004 cn Have All\50 Balloons 8020807D 0032 cn Have All\None-Adventure tracks completed 50001204 0000 80207F87 0007 50000904 0000 80207FDF 0007 80207E68 0007 80207E6A 0007 80207E6B 0007 80207E6C 000F 80207E6D 00FF cn Have All\T.T. time trial races beaten 80207E76 0004 cn Have All\Control Drumstick & Adventure Two mode unlocked 801264DC 0003 801264DF 0003 801264F2 0003 801264F3 0008 cn Have All\Trophy Adventure races unlocked 50000502 0000 8020807E 0007 crc 596E145B-F7D9879F-C:50 gn Diddy Kong Racing cn Enable All Cheats cd Go into Options & then Magic Codes. Then Code list to turn off & on what you want. 800E03AC 001F 50000301 0000 800E03AD 00FF cn Have All\Trophies cd Only put this code on once you are inside the lobby to choose a gate,or it will crash the game. 8020865E 0007 8020865F 00FF cn Have All\Keys cd Only put this code on once you are inside the lobby to choose a gate,or it will crash the game. 80208659 001F cn Have All\T.T. Amulets cd Only put this code on once you are inside the lobby to choose a gate,or it will crash the game. 80208667 0004 cn Have All\50 Balloons 8020807D 0032 cn Have All\None-Adventure tracks completed 50001204 0000 80208777 0007 50000904 0000 802087CF 0007 80208658 0007 8020865A 0007 8020865B 0007 8020865C 000F 8020865D 00FF cn Have All\T.T. time trial races beaten 80208666 0004 cn Have All\Control Drumstick & Adventure Two mode unlocked 80126CCC 0003 80126CCF 0003 80126CE2 0003 80126CE3 0008 cn Have All\Trophy Adventure races unlocked 50000502 0000 8020886E 0007 crc D614E5BF-A76DBCC1-C:50 gn Disney's Tarzan (E) cn Infinite\Health 81192300 0120 cn Have\Coins Collected 100% 800DD4B7 0064 cn Have\Level & Tokens Completed 100% 800DD48F 0000 800DD490 0001 800DD491 0000 cn Access Level Select cd On the main menu Scroll down to make CHEATS visible to go into Level Select.For in-Game Cheats,Pause gameplay. 810DD47C 8001 cn Infinite\Lives 800DD4B2 ???? 0003:"3 Lives",0063:"99 Lives" cn Have\All TARZAN Letters 800DD485 00FF cn Have\Full Portrait 800DD484 00FF cn Infinite\Red Weapon 811921D8 0063 cn Infinite\Green Weapon 811921D6 0063 cn Infinite\Purple Weapon 811921DA 0063 cn Press GS For\Sabor Attacks\Sabor 1 Hit Kill 8924A49E 0001 cn Infinite\Bonus Timer cd This is For All Timers on Bonus Levels 8017373E 0025 crc 3DF17480-193DED5A-C:50 gn Donald Duck Quack At cn Infinite\99 Lives 801D6F2E 0063 cn Infinite\99 Stars 801D6F2F 0063 cn Instant\Rage Attack (Press C-Left) D00CAFD1 0002 801CE23D 0001 cn Instant\Hyperactive State [Invincible] (Press C-Right) D00CAFD1 0001 801CE296 0001 cn Instant\Carrier Box [Moon Walk] (Press L) cd Press and hold the L Button and you will run floating of any ledge slowing drifting down. If you keep pressing the A Button while Holding L it will act as a Moon Jump. D00CAFD1 0020 801C901F 0001 cn Infinite\Time\Gladstones Time Attack 801D6F27 00FF cn Infinite\Time\Nephews Toy Hunting 801D6F23 0063 cn Have All\Levels and Bonus Stages Unlocked cd Press start in Gyro's Lab and then resume game to see all open 801D6F4C 00FF 801D6F4D 00FF 801D6F4E 00FF 801D6F4F 00FF 801D6F53 00FF cn Have All\Time Attack & Toy Hunting Comnpleated (All Levels) cd Press start in Gyro's Lab and then resume game to see all open 801D6F58 00FF 801D6F59 00FF 801D6F5A 00FF 801D6F5B 00FF 801D6F5C 00FF 801D6F5D 00FF 801D6F5E 00FF 801D6F5F 00FF crc 11936D8C-6F2C4B43-C:50 gn DONKEY KONG 64 cn Donkey Kong\Infinite Ammo 807FCB85 0096 cn Infinite\Health 817FCB8C 041F cn Donkey Kong\Infinite Musical Instrument 817FC894 0103 817FC898 00FF cn Diddy\Infinite Musical Instrument 817FC8F6 000A cn Tiny\Infinite Musical Instrument 817FC9B2 000A cn Lanky\Infinite Musical Instrument 817FC954 000A cn Chunky\Infinite Musical Instrument 817FCA10 000A cn Infinite\Camera Film 807FCB89 0005 cn Infinite\Orange Bombs 807FCB81 0096 cn Donkey Kong\Infinite Bananas\Jungle Japes 817FC89A 03E7 cn Donkey Kong\Infinite Bananas\Angry Aztec 817FC89C 03E7 cn Donkey Kong\Infinite Bananas\FactoryLevel 817FC89E 03E7 cn Donkey Kong\Infinite Bananas\Galleon Level 817FC8FE 03E7 cn Donkey Kong\Infinite Bananas\Fungi Forest 817FC8A2 03E7 cn Donkey Kong\Infinite Bananas\Creepy Castle 817FC8A6 03E7 cn Donkey Kong\Infinite Bananas\Crystal Caves 817FC8A4 03E7 cn Donkey Kong\All Golden Bananas\Jungle Japes 817FC8D2 03E7 cn Donkey Kong\All Golden Bananas\Angry Aztecs 817FC8D4 03E7 cn Donkey Kong\All Golden Bananas\Frantic Factory 817FC8D6 03E7 cn Donkey Kong\All Golden Bananas\Gloomy Galleon 817FC8D8 03E7 cn Donkey Kong\All Golden Bananas\Crystal Caves 817FC8DC 03E7 cn Donkey Kong\All Golden Bananas\Creepy Castle 817FC8DE 03E7 cn Donkey Kong\All Golden Bananas\DK Isle 817FC8E0 03E7 cn Diddy\All Golden Bananas\Jungle Japes 817FC930 0064 cn Diddy\All Golden Bananas\Angry Aztecs 817FC932 0064 cn Diddy\All Golden Bananas\Frantic Factory 817FC934 0064 cn Diddy\All Golden Bananas\Gloomy Galleon 817FC936 0064 cn Diddy\All Golden Bananas\Fungi Forest 817FC938 0064 cn Diddy\All Golden Bananas\Crystal Caves 817FC93A 0064 cn Diddy\All Golden Bananas\Creepy Castle 817FC93C 0064 cn Diddy\All Golden Bananas\DK Isle 817FC93E 0064 cn Tiny\All Golden Bananas\Jungle Japes 817FC9EC 0064 cn Tiny\All Golden Bananas\Angry Aztecs 817FC9EE 0064 cn Tiny\All Golden Bananas\Frantic Factory 817FC9F0 0064 cn Tiny\All Golden Bananas\Gloomy Galleon 817FC9F2 0064 cn Tiny\All Golden Bananas\Fungi Forest 817FC9F4 0064 cn Tiny\All Golden Bananas\Crystal Caves 817FC9F6 0064 cn Tiny\All Golden Bananas\Creepy Castle 817FC9E8 0064 cn Tiny\All Golden Bananas\DK Isle 817FC9FA 0064 cn Lanky\All Golden Bananas\Jungle Japes 817FC98E 0064 cn Lanky\All Golden Bananas\Angry Aztecs 817FC990 0064 cn Lanky\All Golden Bananas\Frantic Factory 817FC992 0064 cn Lanky\All Golden Bananas\Gloomy Galleon 817FC994 0064 cn Lanky\All Golden Bananas\Fungi Forest 817FC996 0064 cn Lanky\All Golden Bananas\Crystal Caves 817FC998 0064 cn Lanky\All Golden Bananas\Creepy Castle 817FC99A 0064 cn Lanky\All Golden Bananas\DK Isle 817FC99C 0064 cn Chunky\All Golden Bananas\Jungle Japes 817FCA4A 0064 cn Chunky\All Golden Bananas\Angry Aztecs 817FCA4C 0064 cn Chunky\All Golden Bananas\Frantic Factory 817FCA4E 0064 cn Chunky\All Golden Bananas\Gloomy Galleon 817FCA50 0064 cn Chunky\All Golden Bananas\Fungi Forest 817FCA52 0064 cn Chunky\All Golden Bananas\Crystal Caves 817FCA54 0064 cn Chunky\All Golden Bananas\Creepy Castle 817FCA56 0064 cn Chunky\All Golden Bananas\DK Isle 817FCA58 0064 cn Donkey Kong\Infinite Coins 817FC896 03E7 cn Diddy\Infinite Coins 817FC8F4 03E7 cn Tiny\Infinite Coins 817FC9B0 03E7 cn Lanky\Infinite Coins 817FC952 03E7 cn Chunky\Infinite Coins 817FCA0E 03E7 cn Infinite\Crystal Coconuts 817FCB86 03E7 cn Donkey Kong\Has Moves 817FC890 0103 cn Donkey Kong\Have Weapon 817FC892 0103 cn Free Pass (Access All Areas) cd This is exactly what it says, You can walk through Any Locked Door,Gate, Or Area. Have Fun. 8066D167 0001 8066D262 0001 crc 2C739EAC-9EF77726-C:50 gn Doom 64 (E) cn Always Have\Gun 80063373 0001 cn Always Have\Shotgun 80063377 0001 cn Always Have\Double Shotgun 8006337B 0001 cn Always Have\Chain Gun 8006337F 0001 cn Always Have\Missile Launcher 80063383 0001 cn Always Have\Chainsaw 8006336B 0001 cn Always Have\Plasma Rifle 80063387 0001 cn Always Have\BFG 8006338B 0001 cn Infinite\Armor 800634BF 00FF cn Rapid Fire 810633EA 0B94 cn Invincible 8006355B 0002 cn Turn Map Markers On 800633BB 0004 cn Invincible And Map Markers 800633BB 0006 cn Always Have\Bio Suite 80063333 ???? 00FF:"On",0000:"Off" cn Always Have\Missile Ammo 8006339F 0064 cn Always Have\Have Rocket Launcher 80063381 0001 cn Always Have\Have Laser Weapon 8006338D 0001 cn [Max Brightness] cd Enable this cheat on rom load to have Max Brightness (internal) and then put Jabo d3d8 on 160% Max for a extra brightness Boost. 8005AA18 0064 cn Have All\Keys 50000504 0000 810634DE FFFF cn Have All\Weapons 50000A04 0000 8106350A 0001 cn Infinite\Ammo All Weapons 50000404 0000 81063532 013C cn Enable Cheat Menu 8005AA23 0001 crc B6524461-ED6D04B1-C:50 gn Dual Heroes (E) cn Infinite Health\Player 1 80225E9D 00FA cn Infinite Health\Player 2 80225E9F 00FA cn Win Once To Win\Player 1 80225E95 0001 cn Win Once To Win\Player 2 80225E97 0001 cn Infinite Time 80225EA5 003C crc 57BFF74D-DE747743-C:50 gn Duke Nukem 64 (E) cn Access all In-Game cheats 50000504 0000 80101308 0001 cn Infinite\Ammo & All Guns 50000C02 0000 812A5A34 02F4 cn Access\All Items cd To access simply pause in game play & then unpause. 801012EC 0001 cn Invincibility 802AAA98 0001 cn Access\All Keys 802A5A77 000F cn Infinite\Holoduke 812A5A5C 0640 cn Infinite\Night Vision 812A5A8C 0640 cn Infinite\Scuba Gear 812A5ABC 0640 cn Crosshair On 802A5B24 0001 cn Max auto-aim On 802A5B25 0002 cn Upgraded Plasma Gun 802A5A63 0063 crc DC36626A-3F3770CB-C:50 gn DUKE NUKEM ZERO HOUR cn Cheat Menu\Cheat Menu Enabled 800CF7D8 0001 cn Cheat Menu\Have All Weapons 811CE810 FFFF cn Cheat Menu\Have All Game Type & Other 810E1A3E 0FFF cn Cheat Menu\All Weapons Enabled 801CCC59 0001 801CCCC5 0001 801CDD25 0001 801CDE21 0001 801CDEB5 0001 801CDEB7 0001 801CDEE9 0001 801CE819 0001 801CE821 0001 801CE88D 0001 801CF9D5 0001 cn Infinite Ammo (All Guns) 810A21B4 A65B cn Invincibility 800DF203 0001 cn Time Always 00:00 801A1D06 0000 cn Enable Debug Menu 800DFCD0 0001 crc 492B9DE8-C6CCC81C-C:50 gn Earthworm Jim 3D (E) cn Infinite\Health 800C876F 0064 cn Infinite\Lives 800C8773 0064 cn Infinite\Ammo\Blaster 810C6916 0064 cn Infinite\Ammo\Rocket Launcher 810C6946 0064 cn Infinite\Ammo\Banana Peel Bomb 810C6976 0064 cn Infinite\Ammo\Laser 810C698E 0064 cn Infinite\Ammo\Green Slimer 810C69A6 0064 cn Infinite\Ammo\Chickens 810C69BE 0064 cn Infinite\Ammo\Shotgun 810C69EE 0064 cn Infinite\Ammo\Music Gun 810C6906 0064 cn Infinite\Ammo\Boomerang Knives 810C691E 0064 cn Infinite\Ammo\Mushrooms 810C6936 0064 cn Infinite\Ammo\Lepricon Gun 800C8897 0064 cn Infinite\Ammo\Pistol 800C8777 0064 cn Infinite\Ammo\Sniper Chicken 800C881F 0064 cn Infinite\Ammo\Butcher Knife Gun 800C887F 0064 cn Have\231 Marbles D00EBE53 0000 800EBE53 03E7 cn Have\All Gold Udders 50002802 0000 810C80BA 0101 crc 202A8EE4-83F88B89-C:50 gn EXCITEBIKE64 cn Infinite Time 810F0E36 1770 cn Max Score Stunt Mode\Player One 810E43E8 0098 810E43EA 967F cn Max Score Stunt Mode\Player Two 810E4BC8 0098 810E4BCA 967F cn Unlock Original Excitebike cd Press L+R at track selection to Access Soccer,Hill Climb & Excite 3D D00F6605 0030 810F2420 FF07 cn Start On Lap D00E4681 0000 800E4681 ???? 0001:"Lap 1",0002:"Lap 2",0003:"Lap 3",0004:"Lap 4" cn Always Low Temp\Player Two 810E4E48 0000 810E4E4A 0000 cn Always Low Temp\Player One 810E4668 0000 810E466A 0000 cn In Game Cheat Select\1 800CDA4A ???? 0001:"Transparent riders",0002:"All stunts",0004:"Invincible mode",0008:"Developers team photo",0010:"Beat this",0020:"Small head mode" cn In Game Cheat Select\2 800CDA4B ???? 0001:"Big head mode",0002:"Mirror mode",0004:"Debug mode",0008:"Down hill mode",0010:"Stunt bonus",0020:"Invisible riders",0040:"Night mode",0080:"Odd colour mode" cn In-Game cheat modifer 810CDA4A ???? 0001:"Big head mode",0002:"Mirror mode",0004:"Debug mode",0008:"Down hill mode",0010:"Stunt bonus",0020:"Invisible riders",0040:"Night mode",0080:"Odd colour mode",0100:"Transparent riders",0200:"All stunts",0400:"Invincible mode",0800:"Developers team photo",1000:"Beat this",2000:"Small head mode" crc 8E9D834E-1E8B29A9-C:50 gn Extreme-G (E) cn Infinite Shields\Player 1 801651F5 00C8 cn Infinite Primary Weapon\Player 1 801651FD 00C8 cn Infinite Turbos\Player 1 801651CB 0003 801651CF 0003 cn Bike Modifier\Player 1 8016983F ???? 0000:"Raze",0001:"Rana",0002:"Khan",0003:"Grimace",0004:"Mooga",0005:"Jolt",0006:"Main",0007:"Apollyon",0008:"Roach",0009:"Neon" cn Infinite Shields\Player 2 80165965 00C8 cn Infinite Primary Weapon\Player 2 8016596D 00C8 cn Infinite Turbos\Player 2 8016593B 0003 8016593F 0003 cn Bike Modifier\Player 2 8016988B ???? 0000:"Raze",0001:"Rana",0002:"Khan",0003:"Grimace",0004:"Mooga",0005:"Jolt",0006:"Main",0007:"Apollyon",0008:"Roach",0009:"Neon" cn Infinite Shields\Player 3 801660D5 00C8 cn Infinite Primary Weapon\Player 3 801660DD 00C8 cn Infinite Turbos\Player 3 801660AB 0003 801660AF 0003 cn Bike Modifier\Player 3 801698D7 ???? 0000:"Raze",0001:"Rana",0002:"Khan",0003:"Grimace",0004:"Mooga",0005:"Jolt",0006:"Main",0007:"Apollyon",0008:"Roach",0009:"Neon" cn Infinite Shields\Player 4 80166845 00C8 cn Infinite Primary Weapon\Player 4 8016684D 00C8 cn Infinite Turbos\Player 4 8016681B 0003 8016681F 0003 cn Bike Modifier\Player 4 80169923 ???? 0000:"Raze",0001:"Rana",0002:"Khan",0003:"Grimace",0004:"Mooga",0005:"Jolt",0006:"Main",0007:"Apollyon",0008:"Roach",0009:"Neon" cn Extra Bikes Unlocked 80167C13 0001 80167C17 0003 cn Extra Levels Unlocked 8016980B 0001 8016980F 0001 cn All Tracks Unlocked 80095F6E 0008 50000264 0000 80169347 0001 50000264 0000 80169473 0001 50000564 0000 8016959F 0001 cn Mode Select 80097687 ???? 0001:"Boulder",0002:"Fish Eye Lens",0003:"Boulder & Fish Eye Lens",0004:"Magnify",0008:"Anti-Gravity",000A:"Anti-Gravity & Fish Eye Lens",0010:"Wireframe",0011:"Boulder & Wireframe",0020:"Stealth Mode",0040:"Ghost Mode",0080:"Ugly Mode" crc 1185EC85-4B5A7731-C:50 gn Extreme-G XG2 (E) cn Infinite Nitros\Player 1 80170BA3 0004 80170BA7 0004 cn Infinite Shield\Player 1 80170BCD 00C8 cn Infinite Lasers\Player 1 80170BD9 00C8 cn Infinite Nitros\Player 2 8017120B 0004 8017120F 0004 cn Infinite Shield\Player 2 80171235 00C8 cn Infinite Lasers\Player 2 80171241 00C8 cn Infinite Nitros\Player 3 80171873 0004 80171877 0004 cn Infinite Shield\Player 3 8017189D 00C8 cn Infinite Lasers\Player 3 801718A9 00C8 cn Infinite Nitros\Player 4 80171EDB 0004 80171EDF 0004 cn Infinite Shield\Player 4 80171F05 00C8 cn Infinite Lasers\Player 4 80171F11 00C8 cn Access\All Tracks 50000BD8 0000 80182FC7 0001 50000CD8 0000 80182EF3 0001 50000CD8 0000 80182EF7 0001 50000CD8 0000 80182EFB 0001 50000CD8 0000 80182EFF 0001 50000CD8 0000 80182F03 0001 50000CD8 0000 80182F07 0001 cn Access\All Levels & Superbikes 50000304 0000 80183A0F 0001 cn Access\All Secret Characters cd This code is Fantastic, You have 12 characters to choose from to you race without any bike, just on foot 50000C04 0000 80183A27 0001 cn [Screen Hud Clear] cd If you are using a Plugin other then Jabos 1.5 and can not see through the Thick Hud on the Screen. then Let the game load 1st before Putting this code on,Or it will give an error and Freeze 80092C6B 0004 crc 07C1866E-5775CCDE-C:50 gn F-1 World Grand Prix II (E) cn Max Driver Points 8103A8F6 03E7 cn Max Constructor Points 8103A8F8 03E7 crc 776646F6-06B9AC2B-C:50 gn F-Zero X (E) cn Time Always 00.00.00/1st Place 812C4BC0 0000 812C4BC2 0001 cn Infinite Shield 812C4B48 4326 812C4B4C 4326 cn Infinite Lives 800D8729 0005 cn Boost From Start D02C4DA0 003F 802C4925 0050 cn Unlock Everything 810C01E8 0100 crc 3CECBCB8-6126BF07-C:50 gn F1 Racing Championship (E) cn No Checkpoint time 81164E1C 0001 cn Big Score 81164E58 8181 81164E5A 8181 cn Instant 450kmh Boost cd Press Trigger Button D10A1F50 2000 8119D334 005A crc 0E31EDF0-C37249D5-C:50 gn FIFA - Road to World Cup 98 (E) cn Home Team scores 25 Goals 801AF433 0019 cn Home Team scores 0 Goals 801AF433 0000 cn Away Team scores 25 Goals 801AF437 0019 cn Away Team scores 0 Goals 801AF437 0000 crc 0198A651-FC219D84-C:50 gn FIFA 99 (E) cn Team on the right of score board has 15 goals 800375C3 000F cn Team on the left of score board has 15 goals 800375C7 000F cn Team on the right of score board has 0 goals 800375C3 0000 cn Team on the left of score board has 0 goals 800375C7 0000 crc C3F19159-65D2BC5A-C:50 gn FIFA Soccer 64 (E) cn Number Of Goals Player 1 80119043 ???? 0001:"1 Goal",0002:"2 Goals",0003:"3 Goals",0004:"4 Goals",0005:"5 Goals",0006:"6 Goals",0007:"7 Goals",0008:"8 Goals,09 9 Goals,0A 10 Goals",0014:"20 Goals",001E:"30 Goals",0028:"40 Goals",0032:"50 Goals" cn Number Of Goals Player 2 80119047 ???? 0001:"1 Goal",0002:"2 Goals",0003:"3 Goals",0004:"4 Goals",0005:"5 Goals",0006:"6 Goals",0007:"7 Goals",0008:"8 Goals,09 9 Goals,0A 10 Goals",0014:"20 Goals",001E:"30 Goals",0028:"40 Goals",0032:"50 Goals" crc 36F1C74B-F2029939-C:50 gn Fighter's Destiny (E) cn Start with Stars Modifier\Player 1 D0209757 0000 80209757 ???? 0000:"No Stars",0006:"Max Stars" cn Start with Stars Modifier\Player 2 D020B61F 0000 8020B61F ???? 0000:"No Stars",0006:"Max Stars" cn Have 1 Star\Ryuji 8030734E 0001 cn Have 1 Star\Bob 8030734F 0001 cn Have 1 Star\Pierre 80307350 0001 cn Have 1 Star\Meiling 80307351 0001 cn Have 1 Star\Leon 80307352 0001 cn Have 1 Star\Abdul 80307353 0001 cn Have 1 Star\Ninja 80307354 0001 cn Have 1 Star\Tomahawk 80307355 0001 cn Have 1 Star\Valerie 80307356 0001 cn Infinite Health\Player 1 802098A1 0000 802047C3 0000 cn Infinite Health\Player 2 802047C7 0000 8020B769 0000 cn Start on stage 100 on Survival to get Joker 802EF67B 0063 cn Stop timer for Fastest to get Robot 810ADBDC 3F80 cn Always Win Judge's Decision\Player 1 8020B777 FFFF 802098AF 0000 cn Always Win Judge's Decision\Player 2 802098AF FFFF 8020B777 0000 cn Enable Boro 80307349 0001 cn Level Select 8022A84C ???? 0000:"Fire Mountain",0001:"Desert",0002:"Highlands",0003:"Hong Kong",0004:"Coliseum",0005:"Jungle",0006:"Ninja Room",0007:"Suspension Bridge",0008:"Palace",0009:"Observation",000A:"Pasture",000B:"Joker's Room",000C:"Blue Hell Mountain",000D:"Palace" cn Play As\Player 1 802EF622 ???? 0000:"Ryuji",0001:"Bob",0002:"Pierre",0003:"Meiling",0004:"Leon",0005:"Abdul",0006:"Ninja",0007:"Tomahawk",0008:"Boro",0009:"Valerie",000A:"Ushi",000B:"Joker",000C:"The Master",000D:"No Clue" crc 66CF0FFE-AD697F9C-C:50 gn Fighting Force 64 (E) cn Infinite Lives 810CE462 03E7 cn Infinite health 810C8B0E 03E7 cn Level Select cd Scroll With C-Left & C-Right Level Select Available, At The Player Select Top Screen 810A590E 0001 cn Score Aid 810CD912 29AA crc 142A17AA-13028D96-C:50 gn Forsaken 64 (E) cn Infinite\Primery Weapons 8008EE30 0012 cn Infinite\Secondary Weapons 8008EE31 0012 cn Infinite\Weapon Energy 8008EE32 0012 cn Infinite\Lives 8008EE33 0012 cn Stealth Mode 8008EE34 0012 cn Invulnerability 8008EE35 0012 cn Wireframe Mode 8008EE36 0012 cn Gore Mode 8008EE37 0012 cn Turbo Mode 8008EE38 0012 cn Psychedelic Mode 8008EE39 0012 cn One Shot Enemies 8008EE3A 0012 cn Freeze Enemies 8008EE3B 0012 cn Infinite\Titans cd Titans are included in code 8008EE3C 0012 cn Infinite\Solaris cd Solaris are included in code 8008EE3D 0012 cn Level Select cd Accesses all Missions & Battle mode 8008EE3E 0012 crc D543BCD6-2BA5E256-C:50 gn Gauntlet Legends (E) cn Get All Stuff cd Opens Up New Levels Etc, 50001410 0000 810C5DA6 FFFF cn Infinite Use Of Items cd On Pick-Ups Only 50001310 0000 800C5EC6 FFFF cn Access Skill Level 99 cd And Get A Familiar 800FD38A FFFF cn Access All Window Shards 50000302 0000 810AE6C6 07FF cn Access All Rune Stones 50000302 0000 810AE6D6 07FF cn Always Max Turbo Attack 810FD4AE FF64 cn New Player Name 810FD36C 4249 810FD36E 5443 810FD370 4820 810FD372 3639 cn Start With Small Familiar cd Do not use this with Big Familiar Code 810FD512 0102 cn Start With Big Familiar cd Do not use this with Small Familiar Code 810FD512 0202 crc 68FCF726-49658CBC-C:50 gn G.A.S.P!!Fighters'NE cn Player 1\Character Modifier cd This Allows you to play as any Character you choose in any Mode 80105001 ???? 0000:"Azami",0001:"Serina",0002:"Miki",0003:"Kai",0004:"Sakai",0005:"Kengon",0006:"Kyeya",0007:"Kaoru",0008:"Gouriki",0009:"Reiji",000A:"Yami",000B:"Hikari",000C:"Invisible Fighter" cn Player 1\Infinite Energy 81105026 03E8 cn Player 2\Player 1 Never Wins 8009E3F4 0000 cn Player 1\Need 1 Round to Win D009E334 0000 8009E334 0001 cn Player 2\Character Modifier cd This Allows you to play as any Character you choose in any Mode 8011B399 ???? 0000:"Azami",0001:"Serina",0002:"Miki",0003:"Kai",0004:"Sakai",0005:"Kengon",0006:"Kyeya",0007:"Kaoru",0008:"Gouriki",0009:"Reiji",000A:"Yami",000B:"Hikari",000C:"Invisible Fighter" cn Player 2\Infinite Energy 8111B3BE 03E8 cn Player 1\Player 2 Has No Energy cd Press C-Button Up and Player 2 will lose All Health resulting in a Instant K.O. D0044461 0008 8111B3BE 0000 cn Player 2\Player 1 Has No Energy cd Press C-Button Up and Player 1 will lose All Health resulting in a Instant K.O. D0044467 0008 81105026 0000 cn Player 2\Need 1 Round to Win D009E335 0000 8009E335 0001 cn Player 1\Player 2 Never Wins 8009E3F5 0000 cn Have All Extras Open cd This Code opens all extra stages in VS Battles,Team Battle 1P, Team Battles VS,Tag Battle and Practice Modes. Extra Male and Female Body in Create A Fighter Character and Have Extra Characters (Gouriki & Reiji) 8009E31F 00FF cn Music Modifier 8009E21E ???? 0000:"Stereo",0001:"Monaural",0002:"Music Off" crc 99179359-2FE7EBC3-C:50 gn Gex 3 - Deep Cover Gecko (E) cn Infinite\Health 810A60C8 0005 cn Infinite\Lives 810A60C6 0064 cn Crazy Tail 8110955E 0001 cn Access All\Special Remote Controls 810A60E4 FFFF 810A60E6 FFFF cn Access All\ordinary Remote Controls 50000F01 0000 800A60A8 000F cn Access All\Bonus Coins 50000F02 0000 810A6124 0007 cn Access All\Paw Coins 50000F02 0000 810A60E8 03FF crc E68A000E-639166DD-C:50 gn Gex 64 - Enter the Gecko (E) cn Infinite Health 800C50CB 0063 cn Infinite Lives 810C50C6 0063 cn INFINITE AIR CODES\Umpire Strikes Out D00BED05 0004 8136608E 012B cn INFINITE AIR CODES\Pain In The Asteroids D00BED05 0004 8133CBEE 012B cn ACCESS ALL REMOTE CONTROLS\Red Remotes cd Opens Gate 4 And The Lions Mouth 50000E01 0000 800C513E 0007 cn All Silver & Gold Gold Remotes cd Opens Gate 3,2,1 810C5164 0FFF 810C5166 FFFF 810C5168 01E0 810C516A 007F cn Hover & Fly Mode cd Press And Hold L Button + A Button D10BED04 0020 8114ECA2 0010 D10BED04 0010 cn Fully Charged Gex cd Press L Button Once When On One Of The Specific Levels, For Circuit Central Levels Only D00AAAB9 0020 81163CDE 32FF crc F5237301-99E3EE93-C:50 gn Glover cn Infinite\Energy 8029129F 0003 cn Infinite\99 Lives 8029129B 0063 cn Have Spell\Enlarge Spell 812912B4 03E8 cn 1000 Garibs 80291297 0064 cn Have Spell\Speed Up Spell 812912B8 03E8 cn Have Spell\Death Spell 812912A8 03E8 cn Have Spell\Sticky Fingers Spell 812912B2 03E8 cn All levels unlocked cd At the main menu, where it says: Start, practice, options, & time trial, hold D-pad up, then the glove, playing-with-the-ball icon, will jump down into the lower left corner of the screen, then press the A button, and a level select screen will be available with all ordinary and boss levels, etc. available 80298CFD 00A0 cn Cheat Modifier\1 80298CFE ???? 0001:"Low gravity",0002:"Big ball",0003:"Both of the above" cn Cheat Modifier\2 80298CFF ???? 0001:"Locate caribs",0002:"Call ball",0008:"Unlimited lives",0010:"Power ball",0020:"Control ball",0040:"Infinite energy",007B:"All of the above" cn [100% Complete]\Save Slot 1 cd All green crystals collected and Bonuslevels solved. 801EBA37 0007 50000801 0000 801EBA28 00FF cn [100% Complete]\Save Slot 2 cd All green crystals collected and Bonuslevels solved. 801EBA53 0007 50000801 0000 801EBA44 00FF cn [100% Complete]\Save Slot 3 cd All green crystals collected and Bonuslevels solved. 801EBA6F 0007 50000801 0000 801EBA60 00FF cn [100% Complete]\Save Slot 4 cd All green crystals collected and Bonuslevels solved. 801EBA8B 0007 50000801 0000 801EBA7C 00FF cn [100% Complete]\Save Slot 5 cd All green crystals collected and Bonuslevels solved. 801EBAA7 0007 50000801 0000 801EBA98 00FF cn [100% Complete]\Save Slot 6 cd All green crystals collected and Bonuslevels solved. 801EBAC3 0007 50000801 0000 801EBAB4 00FF cn Super Jump D02AFA14 0080 801EE771 0013 crc EE4A0E33-8FD588C9-C:50 gn GT 64 Championship Edition (E) cn Always first position 80162A80 0001 cn Only race one lap 80161DF5 0001 cn Always have 99 points 80161EC1 0063 crc AE90DBEB-79B89123-C:50 gn Hercules - The Legendary Journeys (E) cn Infinite Health & Max Health 810CFF5E 03E7 810CFF62 03E7 cn Infinite Dinars 800B6663 00E8 800B6662 00E8 cn Infinite Magic 810B6BEA 0063 810B6BD2 0063 810B6C02 0063 810B6C1A 0063 cn Press L to Levitate cd Press L Button to Levitate & Let go to come back down D017D8F5 0020 810CFFB4 44CB crc 95B2B30B-2B6415C1-C:50 gn Hexen (E) cn Access In-Game Cheat Menu cd To Access Pause Game Play. This gives you access to In-game Cheats like God Mode,Level Select,All Items Etc 81137C56 07FF 80137D33 0005 crc 277B129D-DD3879FF-C:50 gn Holy Magic Century (E) cn Set Agility to 999-999 8107C234 03E7 cn Set Defence to 999-999 8107C236 03E7 cn Makes your MP 999-999 8107C230 03E7 8107C232 03E7 cn Makes your HP 999-999 8107C22C 03E7 8107C22E 03E7 cn Have All Elements 8107C24C 3232 8107C24E 3232 cn Earn Spirits Faster 8007C25D 0000 cn No Random Battles 8108CD1C 0000 8108CD1E 0000 crc E7D20193-C1158E93-C:50 gn Hot Wheels Turbo Racing (E) cn Allways 1st 8111B14A 0000 cn Max Tournament Points 811270B6 02F4 cn Infinite Turbos 8111B39C 0800 cn Access All Cars 811270A4 FFFF 811270A6 FFFF cn A Few Extra Cars 811270AA FFFF cn Bonus Tracks 811270AE FFFF cn Race At Night 801270CF 0080 cn Mirror Mode 801270CE 0001 crc 641D3A7F-86820466-C:50 gn HYBRID HEAVEN PAL cn Have All\Keys 50000410 0000 80181B30 0063 50000410 0000 80181B38 0063 cn Infinite\Weapons & Items 50000610 0000 80181AD0 0063 50000610 0000 80181AD8 0063 cn Infinite\Refresh Items 50000E10 0000 801819F8 0063 80181A08 0063 50000D10 0000 80181A00 0063 80181A10 0063 cn Infinite\Max Body Stats 81181638 270F 81181678 0063 50000C02 0000 81181640 270F 50000502 0000 81181670 270F 50000602 0000 81181698 270F 50000602 0000 811816A6 270F cn Infinite\Max Health 81181630 270F 81181632 270F cn Level 999 81181678 270F cn Have All\Moves 50005306 0000 8118C950 0100 50005306 0000 8118C952 00FF cn Difficulty Select Options 811C5C1C ???? 0100:"Normal",0101:"Hard",0102:"Ultimate" cn Play As 811C5CF6 ???? 0001:"The real Mr Diaz Baddie",0002:"President Weller",0003:"Alien" cn Press L To Levitate D00CCE25 0020 812558F0 3FCB cn Editor's Cheat Level and Battle Select 801D74A4 0005 crc B58988E9-B1FC4BE8-C:50 gn Hydro Thunder (E) cn Always 1st 812C4DC6 0001 cn Infinite\Time 812B49C0 42C8 cn Infinite\Boosts\Player 1 812C4DCC 4190 cn Have All\Ships 812B5DD2 0101 812B5DD4 0101 812B5DD6 0101 812B5DD8 0101 812B5DDA 0101 812B5DDC 0101 812B5DDE 0101 cn Have All\Races 812B5DC4 0101 812B5DC6 0101 812B5DC8 0101 812B5DCA 0101 812B5DCC 0101 812B5DCE 0101 812B5DD0 0101 cn Infinite\Boosts\Player 2 812C50FC 4190 crc D692CC5E-EC58D072-C:50 gn Iggy's Reckin' Balls cn Access\Lizzy cd Top Secret Character 810C642C 0001 cn Access\All Characters,Worlds & Level Select cd Pause Gameplay For Level Select 810CD092 0007 cn Infinite\Turbos 810CD090 0008 cn Infinite\Time 810D9088 44E9 cn Infinite\Credits 810BDF5C 02F4 cn Laps To Race 800C8909 ???? 0001:"1 Lap",0002:"2 Laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" cn Difficulty Level Easy 810BDF68 0001 cn Have Max\Points 810D8FE0 02F4 cn Have Max\RB Medals 810D8FF0 02F4 cn Freeze Timer 810CD67C 4000 cn Max Points 800D8FE1 0063 cn Max RB Medals 800D8FF1 0063 crc E2D37CF0-F57E4EAE-C:50 gn International Superstar Soccer 64 (E) cn Home Team Scores 80119F2B ???? 0000:"",0001:"1 Goal",0002:"2 Goals",0003:"3 Goals",0004:"4 Goals",0005:"5 Goals",0006:"6 Goals",0007:"7 Goals",0008:"8 Goals,09 9 Goals,0A 10 Goals",0014:"20 Goals",001E:"30 Goals",0028:"40 Goals",0032:"50 Goals" cn Away Team Scores 8011A9BF ???? 0000:"",0001:"1 Goal",0002:"2 Goals",0003:"3 Goals",0004:"4 Goals",0005:"5 Goals",0006:"6 Goals",0007:"7 Goals",0008:"8 Goals,09 9 Goals,0A 10 Goals",0014:"20 Goals",001E:"30 Goals",0028:"40 Goals",0032:"50 Goals" cn Infinite player creation points 801AC581 003C crc F41B6343-C10661E6-C:50 gn International Superstar Soccer '98 (E) cn Home Team Scores 801A86FD ???? 0000:"",0001:"1 Goal",0002:"2 Goals",0003:"3 Goals",0004:"4 Goals",0005:"5 Goals",0006:"6 Goals",0007:"7 Goals",0008:"8 Goals,09 9 Goals,0A 10 Goals",0014:"20 Goals",001E:"30 Goals",0028:"40 Goals",0032:"50 Goals" cn Away Team Scores 801A9579 ???? 0000:"",0001:"1 Goal",0002:"2 Goals",0003:"3 Goals",0004:"4 Goals",0005:"5 Goals",0006:"6 Goals",0007:"7 Goals",0008:"8 Goals,09 9 Goals,0A 10 Goals",0014:"20 Goals",001E:"30 Goals",0028:"40 Goals",0032:"50 Goals" cn Infinite player creation points D03E0CF2 0001 803E0CF2 0063 crc 68D7A1DE-0079834A-C:50 gn JET FORCE GEMINI cn Access\All Characters 80208910 FFFF cn Infinite Continues 800A34F1 0063 cn Juno\Full & Max Health 80208AB5 000C 80208AB2 0040 cn Juno\Access\All Keys 81208B18 FFF7 cn Juno\Access\All Objects 81208B1A FFFF cn Juno\Infinite\Mizar Tokens 81208AC4 02F4 cn Juno\Max Blue & White Heads 81208ABA 03E7 81208AB8 03E7 cn Juno\Infinite\Max Ammo All Guns 50000302 0000 81208AC6 02F4 50000802 0000 81208ACC 02F4 50000402 0000 81208ADC 02F4 cn Vela\Full & Max Health 80208A3F 000C 80208A3C 0040 cn Vela\Access\All Keys 81208AA2 FF70 cn Vela\Access\All Objects 81208AA4 FFFF cn Vela\Infinite\Mizar Tokens 81208A4E 02F4 cn Vela\Max\Blue & White Heads 81208A44 03E7 81208A42 03E7 cn Vela\Infinite\Max Ammo All Guns 50000302 0000 81208A50 02F4 50000802 0000 81208A56 02F4 50000402 0000 81208A66 02F4 cn Lupus\Full & Max Health 80208B2B 000C 80208B28 0040 cn Lupus\Access\All Keys 81208B8E FF70 cn Lupus\Access\All Objects 81208B90 FFFF cn Lupus\Infinite\Mizar Tokens 81208B3A 02F4 cn Lupus\Max\Blue & White Heads 81208B30 03E7 81208B2E 03E7 cn Lupus\Infinite\Max Ammo All Guns 50000302 0000 81208B3C 02F4 50000802 0000 81208B42 02F4 50000402 0000 81208B52 02F4 cn Access\All Floyd Awards cd only enable One character at a time when using this code 50000501 0000 80208908 0005 cn Juno\Access\All Weapons cd Do not put this code on until you collect one Extra Weapon then you will have all ready to use 80208ABC 00FF 80208ABD 00FF cn Vela\Access\All Weapons cd Do not put this code on until you collect one Extra Weapon then you will have all ready to use 80208A46 00FF 80208A47 00FF cn Lupus\Access\All Weapons cd Do not put this code on until you collect one Extra Weapon then you will have all ready to use 80208B32 00FF 80208B33 00FF cn Tribals\Have All Tribals\Gold Wood 802088E4 000F cn Tribals\No Tribals Killed\Gold Wood 802088E5 0000 cn Tribals\Have No Tribals Remaining\Gold Wood 802088E6 0000 cn [Resolution Fix] 800FE6F2 0003 800FE6DE 0003 800FEDEA 00D0 cn Vela\All Single Player Levels Unlocked 80208AA0 00FF 80208AA1 00FF cn Juno\All Single Player Levels Unlocked 80208B16 00FF 80208B17 00FF cn Lupus\All Single Player Levels Unlocked 80208B8C 00FF 80208B8D 00FF cn All Single Player Levels Unlocked cd All Charcters 80208AA0 00FF 80208AA1 00FF 80208B16 00FF 80208B17 00FF 80208B8C 00FF 80208B8D 00FF crc 0F743195-D8A6DB95-C:50 gn John Romero's Daikatana (E) cn Infinite\Health 81207B24 03E7 cn Max\Experience 81207B26 03E7 cn Infinite\Armour 81207B44 0001 81207B46 03E7 cn Max\Attributes 50000502 0000 81207B28 0007 cn Level Select 811C6B4E 0001 cn Access\All Items cd Press L Button Where Items Are available D0209D85 0020 81207B8C 007F cn Access\All Guns & Infinite Ammo 81207AB4 007F 81207AB6 FFFF 81207B84 03E7 50000A02 0000 81207B70 03E7 crc 979B263E-F8470004-C:50 gn Killer Instinct Gold (E) cn Infinite Health 801D3584 0078 cn Invincible 801D35D4 000A cn Access In-Game Cheats 801283DC 0006 cn Access Gargos Character 80127DC8 0001 cn Fast Kick & Punch 801D357E 0010 cn Max Blood 80127D5D 0003 cn No Time Limit 80127D5B 0001 crc 0D93BA11-683868A6-C:50 gn Kirby64 cn Infinite Max Health 800D718F 0006 800D7151 00C0 cn Kirkby can fly unlimited 8012EADF 00F0 cn Access all enemy info 50005101 0000 800D6F10 0002 cn Access all crystals 50000701 0000 800D6EC0 0001 50001701 0000 800D6EC8 0007 cn Access all difficulty levels cd 100 yard hop, bumper crop bump & checkerboard chase 50000301 0000 800D6E69 0003 cn All Levels completed cd You must still beat boss's to continue onto next level 50002B01 0000 800D6EE0 0002 cn All Save Slots 100% Completed\Save slot 1 800ECD18 0064 cn All Save Slots 100% Completed\Save slot 2 800ECD70 0064 cn All Save Slots 100% Completed\Save slot 3 800ECDC8 0064 cn Infinite Max Lives 800D714F 0064 crc 4A997C74-E2087F99-C:50 gn Knife Edge - Nose Gunner (E) cn Infinite Armour\Player One 8011D65F 0064 cn Infinite Bombs\Player One 8011D667 0003 cn Level 11 Vulcan Cannon\Player One 80123BAB 000A cn Infinite Armour\Player Two 8011D663 0064 cn Infinite Bombs\Player Two 8011D66B 0003 cn Level 11 Vulcan Cannon\Player Two 80123BCB 000A cn Level Select 81123E16 000C cn Extreme Mode 8111D332 0003 cn Max Score 81123B82 FC9A crc E3D6A795-2A1C5D3C-C:50 gn Knockout Kings 2000 (E) cn Infinite Health\Player 1 8106B974 42C8 8106B9DE 0000 cn Infinite Health\Player 2 8106BAE4 42C8 8106BAE6 0000 cn No Health\Player 1 8106B9DC 0000 8106B9DE 0000 cn No Health\Player 2 8106BAE4 0000 8106BAE6 0000 cn Full Punch Meter\Player 1 8106B9E8 0000 8106B9EA 0BB2 cn Full Punch Meter\Player 2 8106B9E8 0000 8106B9EA 0BB2 cn Empty Punch Meter\Player 1 8106B9E8 0000 8106B9EA 0000 cn Empty Punch Meter\Player 2 8016BAF0 0000 8016BAF2 0000 cn Infinite Boxer Creation Points 810637AA 0064 cn Have Full\Power Bar 810637AE 0064 cn Have Full\Speed Bar 810637B2 0064 cn Have Full\Stamina Bar 810637B6 0064 cn Big Options\Big Head Mode 800F407C 0001 cn Big Options\Big Gloves Mode 800F407D 0001 crc E97955C6-BC338D38-C:50 gn Legend of Zelda, The - Majora's Mask (E) (M4) (v1.0) cn Infinite\Rupees 811E6B8A 03E7 cn Infinite\Health 811E6B86 03E7 cn Infinite\Max & Double Magic Meter 801E6B89 0060 811E6B90 0101 cn Infinite\Items cd This is Infinite use of Bombs,Bombchus,Deku Sticks,Deku Nuts,Magic Beans,& Powder Kegs. But you must also put it's Have on to work. 801E6BF1 0063 801E6BF6 0063 801E6BF7 0063 801E6BF8 0063 801E6BF9 0063 801E6BFA 0063 801E6BFC 0063 801E6BFB 0063 801E6BFD 0063 cn Have\All Masks 811E6BD8 3E39 811E6BDA 4745 811E6BDC 4032 811E6BDE 3A46 811E6BE0 3842 811E6BE2 4833 811E6BE4 3C3D 811E6BE6 373F 811E6BE8 3634 811E6BEA 4341 811E6BEC 3B44 811E6BEE 4935 cn Use all C Buttons 811EAA68 0000 811EAA6A 0000 cn Event Item\Modifier 1 801E6BC5 ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Event Item\Modifier 2 801E6BCB ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Event Item\Modifier 3 801E6BD1 ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Have Item Modifier 801E6BD0 ???? 0005:"Japanese Flute?",000B:"Japanese Item?",0010:"Great Fairy's Sword",0011:"Japanese Hookshot?",0031:"Japanese Scroll?",004A:"Japanese Bow?" cn Bottles\Bottle 1 Modifier 801E6BD2 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 2 Modifier 801E6BD3 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 3 Modifier 801E6BD4 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 4 Modifier 801E6BD5 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 5 Modifier 801E6BD6 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 6 Modifier 801E6BD7 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Great Fairy's Sword 801E6BD0 0010 cn Have\QuestStatus Items 801E6C0D 0005 811E6C0E F7CF cn Have\Have Ocarina of Time 801E6BC0 0000 cn Have\Hero's Bow 801E6BC1 0001 cn Have\Fire Arrow 801E6BC2 0002 cn Have\Ice Arrow 801E6BC3 0003 cn Have\Light Arrow 801E6BC4 0004 cn Have\Bombs 801E6BC6 0006 cn Have\Bombchu 801E6BC7 0007 cn Have\Deku Sticks 801E6BC8 0008 cn Have\Deku Nuts 801E6BC9 0009 cn Have\Magic Beans 801E6BCA 000A cn Have\Powder Kegs 801E6BCC 000C cn Have\Pictograph 801E6BCD 000D cn Have\Lens of Truth 801E6BCE 000E cn Have\Hookshot 801E6BCF 000F cn All Equipment Upgrades 801E6BBD 0023 811E6C0A 201B 801E6B9C 004F cn Replace Sword With cd Only put the Deity Link's Sword on, if using The Play As Fierce Deity Link Code, if not it will turn Fierce Deity Link into a crazed slashing Machine. You have been warned. 801E6B9C ???? 004A:"Fire Arrow w/ Bow",004B:"Ice Arrow w/ Bow",004C:"Light Arrow w/ Bow",004D:"Kokiri Sword",004E:"Razor Sword",004F:"Guilded Sword",0050:"Deity Link's Sword" cn Play As 801E6B70 ???? 0000:"Fierce Deity Link",0001:"Goron Link",0002:"Zora Link",0003:"Deku Link",0004:"Normal Link" cn Infinite\Hearts Options cd If you need to clear the Infinite Max Hearts from the screen just choose the 6 or 4 Heart Options, take off the cheat & then make a save. 811E6B84 ???? 0140:"Max Hearts",0063:"6 Hearts",0043:"4 Hearts" cn Press L To Levitate cd Press L To Levitate & Let go to land D03DDFDB 0020 813F72B8 40CB cn Beta World 1 cd Put on the code on load up,After the Nintendo logo you will be in that place of Choice.you can also choose another place & then press F1 (reset) to go to that place this is for beta interest only it will not assist you in playing the game. D03DDFDB 0000 801E6B52 ???? 0000:"Mama's House",0001:"Fearful Spider House",0002:"Beneaf the Graveyard",0003:"Southern Swamp Mr Tingle Entry",0006:"Outside Tourist Information Southern Swamp",0008:"Outside Magic Hag's Potion Shop",000A:"Southern Swamp Woods Of Mystery Entry",0024:"Counter Of The Tresure Chest Shop",002E:"Woodfall Temple non Beta",0032:"Spider Hand",0035:"Statue outside Gorman Track",0036:"Statue outside Lair Of The Temples Boss",0038:"Path to Romani Ranch non Beta",004A:"outside The Royal Palace of the Deku Kingdom",004C:"Ledge in The Royal Palace of the Deku Kingdom",004E:"inside The Royal Palace of the Deku Kingdom 1",0071:"Green Blobs",0074:"Cave Portal to Last Boss Field",007F:"Waterfall Sothern Swamp",008A:"Giant Turtle In the Temple non beta",008B:"Room of Miau & Tijo Zora Great Hall",0094:"Recieving Gorans Mask non Beta",0095:"?",0096:"Hungry Goran in the Snow",00A2:"Statue in Stone Tower",00A6:"Stone Tower non Beta",00B9:"Recieving Deku Mask non Beta",00D9:"Giant Lizards in a Cave",00DA:"Cave with Steaming Water",00FF:"Vamps House In Ikana Canyon" cn Warp Modifier cd Put this code on and it will now take where you wanted to go, turn it back off or it will infinite loop entering all the time. 803DDFDA 0000 803F6835 0001 813F683A ???? 0010:"Mayors Residence",0008:"Magic Hags Potion Shop",000A:"Romani Ranch Barn",000B:"Mama's House",000E:"Honey & Darlings Shop",0015:"Final Boss Arena",001F:"Beneath the Graveyard (left entrance)",002F:"Beneath the Graveyard (right entrance)",0030:"Southern Swamp (Reg Entrance)",004F:"Southern Swamp (from tour house)",006E:"Southern Swamp (from Woodfall)",006F:"Southern Swamp (from Deku Palace)",0078:"Path to Ikana Canyon",009E:"Southern Swamp (from Deku Place 2)",009F:"Southern Swamp (From Potion Shop)",00AF:"Boat Cruise (picture taking)",00CD:"Southern Swamp (From Woods of Mystery)",00CE:"Southern Swamp (From Spider House)",00CF:"Southern Swamp (From Ikana Canyon)",00FE:"Southern Swamp (From Owl Warp)",0E00:"Curiosity Shop",0E38:"Ikana Canyon Entrance",1500:"Lens of Truth Cave (get it)",2600:"Stone Tower Temple (Upside down)",2609:"Stone Tower Temple (Boss Room Entrance)",2604:"Treasure Chest Shop",2605:"Treausre Chest Shop (counter)",260E:"Clock Tower (w/ skull kid, silent)",2610:"Stone Tower Temple (endless fall)",6214:"Romani Ranch",9214:"Zora Shop",B214:"Snowhead (Path to temple, warp in)",D214:"East Clock Down" crc 0A5D8F83-98C5371A-C:50 gn Legend of Zelda, The - Majora's Mask (E) (M4) (v1.1) cn Infinite\Rupees 811E6F2A 03E7 cn Infinite\Health 811E6F26 03E7 cn Infinite\Max & Double Magic Meter 801E6F29 0060 811E6F30 0101 cn Infinite\Items cd This is Infinite use of Bombs,Bombchus,Deku Sticks,Deku Nuts,Magic Beans,& Powder Kegs. But you must also put it's Have on to work. 801E6F91 0063 50000801 0000 801E6F96 0063 cn Have\All Masks 811E6F78 3E39 811E6F7A 4745 811E6F7C 4032 811E6F7E 3A46 811E6F80 3842 811E6F82 4833 811E6F84 3C3D 811E6F86 373F 811E6F88 3634 811E6F8A 4341 811E6F8C 3B44 811E6F8E 4935 cn Use all C Buttons 811EAE08 0000 811EAE0A 0000 cn Event Item\Modifier 1 801E6F65 ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Event Item\Modifier 2 801E6F6B ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Event Item\Modifier 3 801E6F71 ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Have Item Modifier 801E6F70 ???? 0005:"Japanese Flute?",000B:"Japanese Item?",0010:"Great Fairy's Sword",0011:"Japanese Hookshot?",0031:"Japanese Scroll?",004A:"Japanese Bow?" cn Bottles\Bottle 1 Modifier 801E6F72 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 2 Modifier 801E6F73 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 3 Modifier 801E6F74 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 4 Modifier 801E6F75 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 5 Modifier 801E6F76 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 6 Modifier 801E6F77 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Great Fairy's Sword 801E6F70 0010 cn Have\QuestStatus Items 801E6FAD 0005 811E6FAE F7CF cn Have\Have Ocarina of Time 801E6F60 0000 cn Have\Hero's Bow 801E6F61 0001 cn Have\Fire Arrow 801E6F62 0002 cn Have\Ice Arrow 801E6F63 0003 cn Have\Light Arrow 801E6F64 0004 cn Have\Bombs 801E6F66 0006 cn Have\Bombchu 801E6F67 0007 cn Have\Deku Sticks 801E6F68 0008 cn Have\Deku Nuts 801E6F69 0009 cn Have\Magic Beans 801E6F6A 000A cn Have\Powder Kegs 801E6F6C 000C cn Have\Pictograph 801E6F6D 000D cn Have\Lens of Truth 801E6F6E 000E cn Have\Hookshot 801E6F6F 000F cn All Equipment Upgrades 801E6F5D 0023 811E6FAA 201B 801E6F3C 004F cn Replace Sword With cd Only put the Deity Link's Sword on, if using The Play As Fierce Deity Link Code, if not it will turn Fierce Deity Link into a crazed slashing Machine. You have been warned. 801E6F3C ???? 004A:"Fire Arrow w/ Bow",004B:"Ice Arrow w/ Bow",004C:"Light Arrow w/ Bow",004D:"Kokiri Sword",004E:"Razor Sword",004F:"Guilded Sword",0050:"Deity Link's Sword" cn Play As 801E6F10 ???? 0000:"- Fierce Deity Link",0001:"Goron Link",0002:"Zora Link",0003:"Deku Link",0004:"Normal Link" cn Infinite\Hearts Options cd If you need to clear the Infinite Max Hearts from the screen just choose the 6 or 4 Heart Options, take off the cheat & then make a save. 811E6F24 ???? 0140:"Max Hearts",0063:"6 Hearts",0043:"4 Hearts" cn Press L To Levitate cd Press L To Levitate & Let go to land D03DE37B 0020 813F7658 40CB cn Beta World 1 cd Put on the code on load up,After the Nintendo logo you will be in that place of Choice.you can also choose another place & then press F1 (reset) to go to that place this is for beta interest only it will not assist you in playing the game. D03DE37B 0000 801E6EF2 ???? 0000:"Mama's House",0001:"Fearful Spider House",0002:"Beneaf the Graveyard",0006:"Outside Tourist Information Southern Swamp",0008:"Outside Magic Hag's Potion Shop",000A:"Southern Swamp Woods Of Mystery Entry",0024:"Counter Of The Tresure Chest Shop",0032:"Spider Hand",0035:"Statue outside Gorman Track",0036:"Statue outside Lair Of The Temples Boss",004A:"Outside The Royal Palace of the Deku Kingdom",004C:"Ledge in The Royal Palace of the Deku Kingdom",004E:"Inside The Royal Palace of the Deku Kingdom 1",0071:"Green Blobs",007F:"Waterfall Sothern Swamp",008B:"Room of Miau & Tijo Zora Great Hall",00A2:"Statue in Stone Tower",00D9:"Giant Lizards in a Cave",00DA:"Cave with Steaming Water" cn Warp Modifier cd Put this code on and it will now take where you wanted to go, turn it back off or it will infinite loop entering all the time. 803DE37A 0000 803F6BD5 0001 813F6BDA ???? 0010:"Mayors Residence",0008:"Magic Hags Potion Shop",000A:"Romani Ranch Barn",000B:"Mama's House",000E:"Honey & Darlings Shop",0015:"Final Boss Arena",001F:"Beneath the Graveyard (left entrance)",002F:"Beneath the Graveyard (right entrance)",0030:"Southern Swamp (Reg Entrance)",004F:"Southern Swamp (from tour house)",006E:"Southern Swamp (from Woodfall)",006F:"Southern Swamp (from Deku Palace)",0078:"Path to Ikana Canyon",009E:"Southern Swamp (from Deku Place 2)",009F:"Southern Swamp (From Potion Shop)",00AF:"Boat Cruise (picture taking)",00CD:"Southern Swamp (From Woods of Mystery)",00CE:"Southern Swamp (From Spider House)",00CF:"Southern Swamp (From Ikana Canyon)",00FE:"Southern Swamp (From Owl Warp)",0E00:"Curiosity Shop",0E38:"Ikana Canyon Entrance",1500:"Lens of Truth Cave (get it)",2600:"Stone Tower Temple (Upside down)",2609:"Stone Tower Temple (Boss Room Entrance)",2604:"Treasure Chest Shop",2605:"Treausre Chest Shop (counter)",260E:"Clock Tower (w/ skull kid, silent)",2610:"Stone Tower Temple (endless fall)",6214:"Romani Ranch",9214:"Zora Shop",B214:"Snowhead (Path to temple, warp in)",D214:"East Clock Down" crc 6AECEC4F-F0924814-C:50 gn The Legend of Zelda - Majora's Mask - Collector's Edition (E) (GC Version) cn Infinite\Rupees 811E54BA 03E7 cn Infinite\Health 811E54B6 03E7 cn Infinite\Max & Double Magic Meter 801E54B9 0060 811E54C0 0101 cn Infinite\Items cd This is Infinite use of Bombs,Bombchus,Deku Sticks,Deku Nuts,Magic Beans,& Powder Kegs. But you must also put it's Have on to work. 801E5521 0063 50000801 0000 801E5526 0063 cn Have\All Masks 811E5508 3E39 811E550A 4745 811E550C 4032 811E550E 3A46 811E5510 3842 811E5512 4833 811E5514 3C3D 811E5516 373F 811E5518 3634 811E551A 4341 811E551C 3B44 811E551E 4935 cn Use all C Buttons 811E9398 0000 811E939A 0000 cn Event Item\Modifier 1 801E54F5 ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Event Item\Modifier 2 801E54FB ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Event Item\Modifier 3 801E5501 ???? 0028:"Moon's Tear",0029:"Land Title Deed",002A:"Swap Title Deed",002B:"Mountain Title Deed",002C:"Ocean Title Deed",002D:"Room Key",002E:"Special Delivery To Mama",002F:"Letter To Kafei",0030:"Pendant Of Memories" cn Have Item Modifier 801E5500 ???? 0005:"Japanese Flute?",000B:"Japanese Item?",0010:"Great Fairy's Sword",0011:"Japanese Hookshot?",0031:"Japanese Scroll?",004A:"Japanese Bow?" cn Bottles\Bottle 1 Modifier 801E5502 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 2 Modifier 801E5503 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 3 Modifier 801E5504 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 4 Modifier 801E5505 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 5 Modifier 801E5506 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Bottles\Bottle 6 Modifier 801E5507 ???? 0012:"Empty Bottle",0013:"Red Potion",0014:"Green Potion",0015:"Blue Potion",0016:"Fairy",0017:"Deku Princess",0018:"Milk",0019:"Milk (1/2)",001A:"Fish",001B:"Bug",001C:"Blue Fire",001D:"Poe",001E:"Big Poe",001F:"Spring Water",0020:"Hot Spring Water",0021:"Zora Egg",0022:"Gold Dust",0023:"Magical Mushroom",0024:"Sea Horse",0025:"Chateau Romani",0026:"Japanese Bottle?",0027:"Empty Japanese Bottle?" cn Have\Great Fairy's Sword 801E5500 0010 cn Have\QuestStatus Items 801E553D 0005 811E553E F7CF cn Have\Have Ocarina of Time 801E54F0 0000 cn Have\Hero's Bow 801E54F1 0001 cn Have\Fire Arrow 801E54F2 0002 cn Have\Ice Arrow 801E54F3 0003 cn Have\Light Arrow 801E54F4 0004 cn Have\Bombs 801E54F6 0006 cn Have\Bombchu 801E54F7 0007 cn Have\Deku Sticks 801E54F8 0008 cn Have\Deku Nuts 801E54F9 0009 cn Have\Magic Beans 801E54FA 000A cn Have\Powder Kegs 801E54FC 000C cn Have\Pictograph 801E54FD 000D cn Have\Lens of Truth 801E54FE 000E cn Have\Hookshot 801E54FF 000F cn All Equipment Upgrades 801E54ED 0023 811E553A 201B 801E54CC 004F cn Replace Sword With cd Only put the Deity Link's Sword on, if using The Play As Fierce Deity Link Code, if not it will turn Fierce Deity Link into a crazed slashing Machine. You have been warned. 801E54CC ???? 004A:"Fire Arrow w/ Bow",004B:"Ice Arrow w/ Bow",004C:"Light Arrow w/ Bow",004D:"Kokiri Sword",004E:"Razor Sword",004F:"Guilded Sword",0050:"Deity Link's Sword" cn Play As 801E54A0 ???? 0000:"Fierce Deity Link",0001:"Goron Link",0002:"Zora Link",0003:"Deku Link",0004:"Normal Link" cn Infinite\Hearts Options cd If you need to clear the Infinite Max Hearts from the screen just choose the 6 or 4 Heart Options, take off the cheat & then make a save. 811E54B4 ???? 0140:"Max Hearts",0063:"6 Hearts",0043:"4 Hearts" cn Press L To Levitate cd Press L To Levitate & Let go to land D0378ECB 0020 813921A8 40CB cn Beta World 1 cd Put on the code on load up,After the Nintendo logo you will be in that place of Choice.you can also choose another place & then press F1 (reset) to go to that place this is for beta interest only it will not assist you in playing the game. D03DC90B 0000 801E5482 ???? 0000:"Mama's House non Beta",0001:"Fearful Spider House",0002:"Beneaf the Graveyard",0003:"Southern Swamp Mr Tingle Entry",0006:"Outside Tourist Information Southern Swamp",0008:"Outside Magic Hag's Potion Shop",000A:"Southern Swamp Woods Of Mystery Entry",0024:"Counter Of The Tresure Chest Shop",002E:"Woodfall Temple non Beta",0032:"Spider Hand",0035:"Statue outside Gorman Track",0036:"Statue outside Lair Of The Temples Boss",0038:"Path to Romani Ranch non Beta",004A:"outside The Royal Palace of the Deku Kingdom",004C:"Ledge in The Royal Palace of the Deku Kingdom",004E:"inside The Royal Palace of the Deku Kingdom 1",0071:"Green Blobs",0074:"Cave Portal to Last Boss Field",007F:"Waterfall Sothern Swamp",008A:"Giant Turtle In the Temple non beta",008B:"Room of Miau & Tijo Zora Great Hall",0094:"Recieving Gorans Mask non Beta",0095:"?",0096:"Hungry Goran in the Snow",00A2:"Statue in Stone Tower",00A6:"Stone Tower non Beta",00B9:"Recieving Deku Mask non Beta",00D9:"Giant Lizards in a Cave",00DA:"Cave with Steaming Water",00FF:"Vamps House In Ikana Canyon" cn Warp Modifier cd Put this code on and it will now take where you wanted to go, turn it back off or it will infinite loop entering all the time. 803DC90A 0000 803F5165 0001 813F516A ???? 0010:"Mayors Residence",0008:"Magic Hags Potion Shop",000A:"Romani Ranch Barn",000B:"Mama's House",000E:"Honey & Darlings Shop",0015:"Final Boss Arena",001F:"Beneath the Graveyard (left entrance)",002F:"Beneath the Graveyard (right entrance)",0030:"Southern Swamp (Reg Entrance)",004F:"Southern Swamp (from tour house)",006E:"Southern Swamp (from Woodfall)",006F:"Southern Swamp (from Deku Palace)",0078:"Path to Ikana Canyon",009E:"Southern Swamp (from Deku Place 2)",009F:"Southern Swamp (From Potion Shop)",00AF:"Boat Cruise (picture taking)",00CD:"Southern Swamp (From Woods of Mystery)",00CE:"Southern Swamp (From Spider House)",00CF:"Southern Swamp (From Ikana Canyon)",00FE:"Southern Swamp (From Owl Warp)",0E00:"Curiosity Shop",0E38:"Ikana Canyon Entrance",1500:"Lens of Truth Cave (get it)",2600:"Stone Tower Temple (Upside down)",2609:"Stone Tower Temple (Boss Room Entrance)",2604:"Treasure Chest Shop",2605:"Treausre Chest Shop (counter)",260E:"Clock Tower (w/ skull kid, silent)",2610:"Stone Tower Temple (endless fall)",6214:"Romani Ranch",9214:"Zora Shop",B214:"Snowhead (Path to temple, warp in)",D214:"East Clock Down" crc B044B569-373C1985-C:50 gn Legend of Zelda, The - Ocarina of Time (E) (V1.0) cn Infinite\Rupees cd This cheat allows you to have the max Rupees to the Wallet you currently Hold 8111979C 0001 cn Press R\For Old Or Young Link cd To Activate this Cheat Hold The R Button when walking through a Doorway this will change you to the option on the other side, Disable this Cheat straight away after getting to the other side, in some places you might even get Access Violations. Just press ok untill you can carry on. D01C64F5 0010 801183D7 ???? 0001:"Link Young",0000:"Link Old" cn Use Any Item In Any House cd do not use under or in water 811195F2 0000 811195F4 0000 cn Have\All Equipment cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 8111846C 7777 cn Have\All Quest/Status Items cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 81118474 30FF 81118476 FFFF cn Max\Heart Containers 811183FE 0140 cn Max\Gold Skulltulas Killed 801184A1 0064 cn Time of Day Modifier 811183DC ???? 4000:"At Sunrise",5800:"Daylight Out",7000:"Very Bright Out",C000:"At Sunset",D000:"Fairly Dark" cn Infinite\Energy 81118400 0140 cn Infinite\Magic D0118409 0008 8011840A 0001 8011840C 0001 80118403 0060 cn Tunic & Boot Options cd This changes what you are wearing,once you have enabled the code press Start & then start again. 80118440 ???? 0011:"Kokiri Tunic & Kokiri Boots",0012:"Goron Tunic & Kokiri Boots",0013:"Zora Tunic & Kokiri Boots",0014:"Black Tunic & Kokiri Boots",0015:"White Tunic & Kokiri Boots",0016:"Yellow Tunic & Kokiri Boots",0021:"Kokiri Tunic & Iron Boots",0022:"Goron Tunic & Iron Boots",0023:"Zora Tunic & Iron Boots",0024:"Black Tunic & Iron Boots",0025:"White Tunic & Iron Boots",0026:"Yellow Tunic & Iron Boots",0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Infinite\Deku Sticks 8011845C 0009 cn Infinite\Deku Nuts 8011845D 0009 cn Infinite\Bombs 8011845E 0009 cn Infinite\Arrows 8011845F 0009 cn Infinite\Deku Seeds 80118462 0009 cn Infinite\Bombchu's 80118464 0009 cn Infinite\Magic Beans 8011846A 0009 cn Infinite\Big Key,Small Keys,Compass,& Map 50000B01 0000 80118478 0007 50000501 0000 8011848F 0009 80118497 0009 80118499 0009 8011849C 0009 cn Have\Ocarina 8011844B ???? 0007:"Fairy Ocarina",0008:"Ocarina Of Time" cn Have\Boomerang 80118450 000E cn Have\Lens of Truth 80118451 000F cn Have\Megaton Hammer 80118453 0011 cn Have\Deku Stick 80118444 0000 cn Have\Deku Nut 80118445 0001 cn Have\Bombs 80118446 0002 cn Have\Fairy Bow 80118447 0003 cn Have\Fairy Slingshot 8011844A 0006 cn Have\Bombchu 8011844C 0009 cn Have\Arrows\Fire Arrow 80118448 0004 cn Have\Arrows\Ice Arrow 8011844E 000C cn Have\Arrows\Light Arrow 80118454 0012 cn Have\Hookshot 8011844D ???? 000A:"Hookshot",000B:"Longshot" cn Have\Magic Beans 80118452 0010 cn Have\Magic\Fairie's Wind 8011844F 000D cn Have\Magic\Nayru's Love 80118455 0013 cn Have\Magic\Din's Fire 80118449 0005 cn Bottles\Bottle 1 Modifier 80118456 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 2 Modifier 80118457 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 3 Modifier 80118458 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 4 Modifier 80118459 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Trading\Adult Link Item 8011845A ???? 002D:"Pocket Egg",002E:"Pocket Cucco",002F:"Cojiro",0030:"Odd Mushroom",0031:"Odd Potion",0032:"Poacher's Saw",0033:"Goron's Sword (Broken)",0034:"Prescription",0035:"Eyeball Frog",0036:"Eye Drops",0037:"Claim Check" cn Trading\Young Link Item 8011845B ???? 0021:"Weird Egg",0022:"Chicken",0023:"Zelda's Letter",0024:"Keaton Mask",0025:"Skull Mask",0026:"Spooky Mask",0027:"Bunny Hood",0028:"Goron Mask",0029:"Zora Mask",002A:"Gerudo Mask",002B:"Mask of Truth",002C:"SOLD OUT" cn Turn Giant's Knife Into Biggoron's Sword 8011840E 0001 cn Have Quiver (Holds 30) 80118471 0001 cn Equipment Modifier 1 cd This modifies the equipment you are carrying. 80118472 ???? 0002:"Silver Scale",0004:"Golden Scale",0006:"Giant's Knife (Broken)",0035:"Black Gauntlets",0040:"Bullet Bag (Holds 30)",0080:"Bullet Bag (Holds 40)",00C0:"Bullet Bag (Holds 50)" cn Equipment Modifier 2 cd This modifies the equipment you are carrying. 80118473 ???? 0008:"Bomb Bag (Holds 20)",0010:"Bomb Bag (Holds 30)",0018:"Bomb Bag (Holds 40)",0020:"Goron's Bracelet",0028:"Silver Gauntlets",0030:"Golden Gauntlets" cn Press L To Levitate cd Press L To Levitate & Let go to land D01C64F5 0020 811D8AE0 40CB cn Press L For infinite Hover Boots cd Press L For Infinite Hover Boots & Let go to land,This Only works when you have the Boots on D01C64F5 0020 811D92F2 000D cn Instant Step Hoover Boots cd Take off from Anywhere & to go higher just press L Once, this will lift you higher while walking.to come back Down Keep R pressed.Once you have enabled the code press Start & then start again. D01C64F5 0020 811D8AE0 40CB D01C64F5 0000 811D92F2 000D 80118440 ???? 0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Beta\Play Beta Quest Worlds cd Put on the code on load up,After the Nintendo logo you will be in Hyrule Field,There are no icons, energy bar etc. on the screen.When you press a C-Buttton you can use an object.Here the objects for the C-Buttons:C-left: arrows, C-down: bombs, C-right: Ocarina of Time. There is also no Navi and start menu.When you go to some places the game will freeze or you can't move. D01C64F5 0000 801197E3 ???? 0000:"World 01",0001:"World 02",0002:"World 03",0003:"World 04",0004:"World 05",0007:"World 06",0008:"World 07",0016:"World 08" cn Warp Song Location\Minuet of Forest & Serenade of Water cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119765 ???? 0000:"Sacred Forest Meadow",0004:"Lake Hylia",0015:"Inside Jabu Jabu's Belly",0018:"Dodongo's Cavern",0068:"Inside The Deku Tree" cn Warp Song Location\Prelude of Light & Nocturne of Shadow cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119765 ???? 0003:"Kakariko Windmill",0007:"Bombchu Bowling Alley",000F:"Zelda & Impa Flee",0014:"Kakariko Village",0017:"Ganon,Final Battle",001D:"Top of Ganon's Tower",0028:"Bombchu Shop",002C:"Bazaar",0030:"Happy Mask Shop",0034:"Ganon's Tower",0038:"Ganon's Castle",004C:"Inside Spirit Door",006C:"Burning Castle",0050:"House of Skulltula",0064:"Death Mountain Trail",0068:"Graveyard",0070:"Thieves' Hideout",0074:"Royal Family's Tomb",0078:"Great Fairy Fountain 1",0084:"Forest Temple,Room With Falling Floor",0088:"Great Fairy Fountain 2",0099:"Grotto 01",009D:"Grotto 02",00A4:"Grotto 04",00A8:"Grotto 05",00B3:"Grotto 06",00B0:"Grotto 07",00B4:"Grotto 08",00B8:"Grotto 09",00C3:"Grotto 10",00C0:"Grotto 11",00C4:"Grotto 12",00FC:"Grotto 13",00D3:"Bottom of the Well",00D0:"Lon Lon Ranch Shed",00D3:"Lon Lon Ranch Outside Shed",00D8:"Ice Cavern",00E3:"Outside Cow Pen",00E0:"Lost Woods Bridge",00E4:"Lon Lon Ranch Chicken Room",00E8:"In Front of Deku Tree",00EB:"Spirit Temple Boss",00F1:"Castle Courtyard,In Front of Zelda",00F4:"Temple of Time",00F8:"Gerudo Fortress Jail" cn Warp Song Location\Bolero of Fire cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119765 ???? 0003:"Castle Courtyard",000B:"Dodongo's Cavern Boss",0010:"Inside The Deku Tree Boss",0014:"Shadow Temple Boss",0017:"Water Temple Boss",001C:"Ganon's Castle Tower",001F:"Ganon First Battle",0028:"Ganon's Castle Room Before Ganon",002B:"Inside Ganon's Castle Room With Pillar",002F:"Lon Lon Ranch",0033:"Mido's House",0037:"Saria's House",004B:"Bearded Man's House",0040:"Top of Ganon's Castle",0047:"Outside Saria's House",004F:"Dampe's Race",0057:"Kokiri Forest",005B:"Top of Death Mountain",005F:"Fishing Pond",0068:"Inside Ganon's Castle",007F:"Hyrule Castle Gate",00BA:"Top of Ganon's Tower",00C2:"Great Fairy Fountain",00D6:"Lost Woods Goron Entrance",00DA:"Lost Woods River Entrance",00DE:"Lost Woods Bridge Field Entrance",00E3:"Goron City Lost Woods Entrance",00F6:"Death Mountain Crater",00FD:"Ganon's Castle" cn Warp Song Location\Requiem of Spirit cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119765 ???? 0005:"Lake Hylia,08 Zora's Domain",0018:"Gerudo Valley",001E:"Lost Woods",0028:"Gerudo Fortress",0030:"Haunted Wasteland",0034:"Ganon's Castle Inside Burning Castle",0038:"Hyrule Castle",003A:"Ganon's Castle",003D:"Death Mountain Trail",004D:"Goron City",0065:"Fire Temple",0069:"Forest Temple",006E:"Shooting Gallery",0079:"Ganon's Castle Inside Burning Castle",007E:"Kakariko Village Entrance",007B:"Zora's River Entrance",0085:"Kokiri Forest Entrance",008A:"Lake Hyrule Entrance",008E:"Gerudo Valley Entrance",0092:"Death Mountain Trail Entrance",0095:"Graveyard Entrance",009E:"Zora's Domain Entrance",00A2:"Zora's Fountain Entrance",00BA:"Goron City Entrance",00BE:"Death Mountain Trail",00C1:"Goron City",00C5:"Lakeside Laboratory",00C9:"Top of Ganon's Castle",00CD:"Hyrule Market (Child Link's)",00CF:"Hyrule Market (Adult Link's)",00F1:"Desert Colossus",00FA:"Lon Lon Ranch Entrance",00FD:"Hyrule Field" cn Max\Double Defense Power cd This gives you White Border Hearts 8011849F 0014 cn Nayru's Love is Always cd For this to work On Or off, you have to walk through a Doorway to activate the Change. 801D851B ???? 0000:"OFF",FFFF:"ON" cn Infinite\Timers\All Other Timers cd This cheat works on all Race Timers not the final Boss and Under Water with iron Boots etc. 801197A1 0032 cn Epona\Max Carrots\Lon Lon Raunch cd This is For Practicing,Racing.Warning take this off before jumping the exit fence after winning Epona 801F12C8 0005 801EDD08 0005 cn Infinite\Timers\Escape From Gannons Tower cd This cheat works only on The Final Boss. 801197A5 00B4 cn Beta\Specific things lean cd This code will cause all items on a specific plane to lean. This is helpful for areas in which the plane causes the crash (Ex. Weird Zora's Fountain Beta Quest World 01) 80023414 0001 cn Beta\Appear in Strange Places (Hold R) cd If you go to an area where Link is immobile or invisible, using the "appear in strange places" code will almost always fix it, but you'll start somewhere outside of the Arena and in air. I recommend using the infinite step Hover boots code already supplied with PJ64 so you can float back into the arena in the event that this happens. D01C64F5 0010 81119736 0001 cn Beta\Interface always off/on cd If you go to an area where the interface is accessible, this signigfies that you're not in 'beta' mode anymore. Using the "interface always off/on" code, you can stay in 'beta' mode regardless of what happens. This may cause more crashes in SOME areas, but it's rare and is not too severe. If you need to explore a beta area with the interface, "use the interface always on" portion of the code. Don't use the codes as you start the game. If you need the interface on/off at a specific time, start the game, go to the area, activate the code, keep it on until next reset. 801192B9 00FF 8011972F ???? 0000:"Off",0001:"Off" cn Always Have Wallet Size 80118472 ???? 0047:"Kid Wallet (Holds 99)",0057:"Adult Wallet (Holds 200)",0067:"Giant Wallet (Holds 500)" cn Language Select 801197D9 ???? 0000:"English",0001:"German",0002:"French" cn Dark Link\Make Dark Link Apear In TOT 8023D6DF 0020 8023D6E5 0033 crc B2055FBD-0BAB4E0C-C:50 gn Legend of Zelda, The - Ocarina of Time (E) (V1.1) cn Infinite\Rupees cd This cheat allows you to have the max Rupees to the Wallet you currently Hold 811197DC 0001 cn Press R\For Old Or Young Link cd To Activate this Cheat Hold The R Button when walking through a Doorway this will change you to the option on the other side, Disable this Cheat straight away after getting to the other side, in some places you might even get Access Violations. Just press ok untill you can carry on. D01C6535 0010 80118417 ???? 0001:"Link Young",0000:"Link Old" cn Use Any Item In Any House cd do not use under or in water 81119632 0000 81119634 0000 cn Have\All Equipment cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 811184AC 7777 cn Have\All Quest/Status Items cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 811184B4 30FF 811184B6 FFFF cn Max\Heart Containers 8111843E 0140 cn Max\Gold Skulltulas Killed 801184E1 0064 cn Time of Day Modifier 8111841C ???? 4000:"At Sunrise",5800:"Daylight Out",7000:"Very Bright Out",C000:"At Sunset",D000:"Fairly Dark" cn Infinite\Energy 81118440 0140 cn Infinite\Magic D0118449 0008 8011844A 0001 8011844C 0001 80118443 0060 cn Tunic & Boot Options cd This changes what you are wearing,once you have enabled the code press Start & then start again. 80118480 ???? 0011:"Kokiri Tunic & Kokiri Boots",0012:"Goron Tunic & Kokiri Boots",0013:"Zora Tunic & Kokiri Boots",0014:"Black Tunic & Kokiri Boots",0015:"White Tunic & Kokiri Boots",0016:"Yellow Tunic & Kokiri Boots",0021:"Kokiri Tunic & Iron Boots",0022:"Goron Tunic & Iron Boots",0023:"Zora Tunic & Iron Boots",0024:"Black Tunic & Iron Boots",0025:"White Tunic & Iron Boots",0026:"Yellow Tunic & Iron Boots",0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Infinite\Deku Sticks 8011849C 0009 cn Infinite\Deku Nuts 8011849D 0009 cn Infinite\Bombs 8011849E 0009 cn Infinite\Arrows 8011849F 0009 cn Infinite\Deku Seeds 801184A2 0009 cn Infinite\Bombchu's 801184A4 0009 cn Infinite\Magic Beans 801184AA 0009 cn Infinite\Big Key,Small Keys,Compass,& Map 50000B01 0000 801184B8 0007 50000501 0000 801184CF 0009 801184D7 0009 801184D9 0009 801184DC 0009 cn Have\Ocarina 8011848B ???? 0007:"Fairy Ocarina",0008:"Ocarina Of Time" cn Have\Boomerang 80118490 000E cn Have\Lens of Truth 80118491 000F cn Have\Megaton Hammer 80118493 0011 cn Have\Deku Stick 80118484 0000 cn Have\Deku Nut 80118485 0001 cn Have\Bombs 80118486 0002 cn Have\Fairy Bow 80118487 0003 cn Have\Fairy Slingshot 8011848A 0006 cn Have\Bombchu 8011848C 0009 cn Have\Arrows\Fire Arrow 80118488 0004 cn Have\Arrows\Ice Arrow 8011848E 000C cn Have\Arrows\Light Arrow 80118494 0012 cn Have\Hookshot 8011848D ???? 000A:"Hookshot",000B:"Longshot" cn Have\Magic Beans 80118492 0010 cn Have\Magic\Fairie's Wind 8011848F 000D cn Have\Magic\Nayru's Love 80118495 0013 cn Have\Magic\Din's Fire 80118489 0005 cn Bottles\Bottle 1 Modifier 80118496 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 2 Modifier 80118497 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 3 Modifier 80118498 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 4 Modifier 80118499 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Trading\Adult Link Item 8011849A ???? 002D:"Pocket Egg",002E:"Pocket Cucco",002F:"Cojiro",0030:"Odd Mushroom",0031:"Odd Potion",0032:"Poacher's Saw",0033:"Goron's Sword (Broken)",0034:"Prescription",0035:"Eyeball Frog",0036:"Eye Drops",0037:"Claim Check" cn Trading\Young Link Item 8011849B ???? 0021:"Weird Egg",0022:"Chicken",0023:"Zelda's Letter",0024:"Keaton Mask",0025:"Skull Mask",0026:"Spooky Mask",0027:"Bunny Hood",0028:"Goron Mask",0029:"Zora Mask",002A:"Gerudo Mask",002B:"Mask of Truth",002C:"SOLD OUT" cn Turn Giant's Knife Into Biggoron's Sword 8011844E 0001 cn Have Quiver (Holds 30) 801184B1 0001 cn Equipment Modifier 1 cd This modifies the equipment you are carrying. 801184B2 ???? 0002:"Silver Scale",0004:"Golden Scale",0006:"Giant's Knife (Broken)",0035:"Black Gauntlets",0040:"Bullet Bag (Holds 30)",0080:"Bullet Bag (Holds 40)",00C0:"Bullet Bag (Holds 50)" cn Equipment Modifier 2 cd This modifies the equipment you are carrying. 801184B3 ???? 0008:"Bomb Bag (Holds 20)",0010:"Bomb Bag (Holds 30)",0018:"Bomb Bag (Holds 40)",0020:"Goron's Bracelet",0028:"Silver Gauntlets",0030:"Golden Gauntlets" cn Press L To Levitate cd Press L To Levitate & Let go to land D01C6535 0020 811D8B20 40CB cn Press L For infinite Hover Boots cd Press L For Infinite Hover Boots & Let go to land,This Only works when you have the Boots on D01C6535 0020 811D9332 000D cn Instant Step Hoover Boots cd Take off from Anywhere & to go higher just press L Once, this will lift you higher while walking.to come back Down Keep R pressed.Once you have enabled the code press Start & then start again. D01C6535 0020 811D8B20 40CB D01C6535 0000 811D9332 000D 80118480 ???? 0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Beta\Play Beta Quest Worlds cd Put on the code on load up,After the Nintendo logo you will be in Hyrule Field,There are no icons, energy bar etc. on the screen.When you press a C-Buttton you can use an object.Here the objects for the C-Buttons:C-left: arrows, C-down: bombs, C-right: Ocarina of Time. There is also no Navi and start menu.When you go to some places the game will freeze or you can't move. D01C6535 0000 80119823 ???? 0000:"World 01",0001:"World 02",0002:"World 03",0003:"World 04",0004:"World 05",0007:"World 06",0008:"World 07",0016:"World 08" cn Warp Song Location\Minuet of Forest & Serenade of Water cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 801197A5 ???? 0000:"Sacred Forest Meadow",0004:"Lake Hylia",0015:"Inside Jabu Jabu's Belly",0018:"Dodongo's Cavern",0068:"Inside The Deku Tree" cn Warp Song Location\Prelude of Light & Nocturne of Shadow cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 801197A5 ???? 0003:"Kakariko Windmill",0007:"Bombchu Bowling Alley",000F:"Zelda & Impa Flee",0014:"Kakariko Village",0017:"Ganon,Final Battle",001D:"Top of Ganon's Tower",0028:"Bombchu Shop",002C:"Bazaar",0030:"Happy Mask Shop",0034:"Ganon's Tower",0038:"Ganon's Castle",004C:"Inside Spirit Door",006C:"Burning Castle",0050:"House of Skulltula",0064:"Death Mountain Trail",0068:"Graveyard",0070:"Thieves' Hideout",0074:"Royal Family's Tomb",0078:"Great Fairy Fountain 1",0084:"Forest Temple,Room With Falling Floor",0088:"Great Fairy Fountain 2",0099:"Grotto 01",009D:"Grotto 02",00A4:"Grotto 04",00A8:"Grotto 05",00B3:"Grotto 06",00B0:"Grotto 07",00B4:"Grotto 08",00B8:"Grotto 09",00C3:"Grotto 10",00C0:"Grotto 11",00C4:"Grotto 12",00FC:"Grotto 13",00D3:"Bottom of the Well",00D0:"Lon Lon Ranch Shed",00D3:"Lon Lon Ranch Outside Shed",00D8:"Ice Cavern",00E3:"Outside Cow Pen",00E0:"Lost Woods Bridge",00E4:"Lon Lon Ranch Chicken Room",00E8:"In Front of Deku Tree",00EB:"Spirit Temple Boss",00F1:"Castle Courtyard,In Front of Zelda",00F4:"Temple of Time",00F8:"Gerudo Fortress Jail" cn Warp Song Location\Bolero of Fire cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 801197A5 ???? 0003:"Castle Courtyard",000B:"Dodongo's Cavern Boss",0010:"Inside The Deku Tree Boss",0014:"Shadow Temple Boss",0017:"Water Temple Boss",001C:"Ganon's Castle Tower",001F:"Ganon First Battle",0028:"Ganon's Castle Room Before Ganon",002B:"Inside Ganon's Castle Room With Pillar",002F:"Lon Lon Ranch",0033:"Mido's House",0037:"Saria's House",004B:"Bearded Man's House",0040:"Top of Ganon's Castle",0047:"Outside Saria's House",004F:"Dampe's Race",0057:"Kokiri Forest",005B:"Top of Death Mountain",005F:"Fishing Pond",0068:"Inside Ganon's Castle",007F:"Hyrule Castle Gate",00BA:"Top of Ganon's Tower",00C2:"Great Fairy Fountain",00D6:"Lost Woods Goron Entrance",00DA:"Lost Woods River Entrance",00DE:"Lost Woods Bridge Field Entrance",00E3:"Goron City Lost Woods Entrance",00F6:"Death Mountain Crater",00FD:"Ganon's Castle" cn Warp Song Location\Requiem of Spirit cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 801197A5 ???? 0005:"Lake Hylia,08 Zora's Domain",0018:"Gerudo Valley",001E:"Lost Woods",0028:"Gerudo Fortress",0030:"Haunted Wasteland",0034:"Ganon's Castle Inside Burning Castle",0038:"Hyrule Castle",003A:"Ganon's Castle",003D:"Death Mountain Trail",004D:"Goron City",0065:"Fire Temple",0069:"Forest Temple",006E:"Shooting Gallery",0079:"Ganon's Castle Inside Burning Castle",007E:"Kakariko Village Entrance",007B:"Zora's River Entrance",0085:"Kokiri Forest Entrance",008A:"Lake Hyrule Entrance",008E:"Gerudo Valley Entrance",0092:"Death Mountain Trail Entrance",0095:"Graveyard Entrance",009E:"Zora's Domain Entrance",00A2:"Zora's Fountain Entrance",00BA:"Goron City Entrance",00BE:"Death Mountain Trail",00C1:"Goron City",00C5:"Lakeside Laboratory",00C9:"Top of Ganon's Castle",00CD:"Hyrule Market (Child Link's)",00CF:"Hyrule Market (Adult Link's)",00F1:"Desert Colossus",00FA:"Lon Lon Ranch Entrance",00FD:"Hyrule Field" cn Max\Double Defense Power cd This gives you White Border Hearts 801184DF 0014 cn Nayru's Love is Always cd For this to work On Or off, you have to walk through a Doorway to activate the Change. 811197D8 ???? 0000:"OFF",FFFF:"ON" cn Infinite\Timers\All Other Timers cd This cheat works on all Race Timers not the final Boss and Under Water with iron Boots etc. 801197E1 0032 cn Epona\Max Carrots\Lon Lon Raunch cd This is For Practicing,Racing.Warning take this off before jumping the exit fence after winning Epona 801F1308 0005 801EDD48 0005 cn Infinite\Timers\Escape From Gannons Tower cd This cheat works only on The Final Boss. 801197E5 00B4 cn Beta\Specific things lean cd This code will cause all items on a specific plane to lean. This is helpful for areas in which the plane causes the crash (Ex. Weird Zora's Fountain Beta Quest World 01) 80023454 0001 cn Beta\Appear in Strange Places (Hold R) cd If you go to an area where Link is immobile or invisible, using the "appear in strange places" code will almost always fix it, but you'll start somewhere outside of the Arena and in air. I recommend using the infinite step Hover boots code already supplied with PJ64 so you can float back into the arena in the event that this happens. D01C6535 0010 81119776 0001 cn Beta\Interface always off/on cd If you go to an area where the interface is accessible, this signigfies that you're not in 'beta' mode anymore. Using the "interface always off/on" code, you can stay in 'beta' mode regardless of what happens. This may cause more crashes in SOME areas, but it's rare and is not too severe. If you need to explore a beta area with the interface, "use the interface always on" portion of the code. Don't use the codes as you start the game. If you need the interface on/off at a specific time, start the game, go to the area, activate the code, keep it on until next reset. 801192F9 00FF 8011976F ???? 0000:"Off",0001:"Off" cn Always Have Wallet Size 801184B2 ???? 0047:"Kid Wallet (Holds 99)",0057:"Adult Wallet (Holds 200)",0067:"Giant Wallet (Holds 500)" cn Language Select 80119819 ???? 0000:"English",0001:"German",0002:"French" cn Dark Link\Make Dark Link Apear In TOT 8023D71F 0020 8023D725 0033 crc 09465AC3-F8CB501B-C:50 gn Legend of Zelda, The - Ocarina of Time (E) (GC Version) cn Infinite\Rupees cd This cheat allows you to have the max Rupees to the Wallet you currently Hold 81119D24 0001 cn Press R\For Old Or Young Link cd To Activate this Cheat Hold The R Button when walking through a Doorway this will change you to the option on the other side, Disable this Cheat straight away after getting to the other side, in some places you might even get Access Violations. Just press ok untill you can carry on. D01C6A7D 0010 8011895F ???? 0001:"Link Young",0000:"Link Old" cn Use Any Item In Any House cd do not use under or in water 81119B7A 0000 81119B7C 0000 cn Have\All Equipment cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 811189F4 7777 cn Have\All Quest/Status Items cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 811189FC 30FF 811189FE FFFF cn Max\Heart Containers 81118986 0140 cn Max\Gold Skulltulas Killed 80118A29 0064 cn Time of Day Modifier 81118964 ???? 4000:"At Sunrise",5800:"Daylight Out",7000:"Very Bright Out",C000:"At Sunset",D000:"Fairly Dark" cn Infinite\Energy 81118988 0140 cn Infinite\Magic D0118991 0008 80118992 0001 80118994 0001 8011898B 0060 cn Tunic & Boot Options cd This changes what you are wearing,once you have enabled the code press Start & then start again. 801189C8 ???? 0011:"Kokiri Tunic & Kokiri Boots",0012:"Goron Tunic & Kokiri Boots",0013:"Zora Tunic & Kokiri Boots",0014:"Black Tunic & Kokiri Boots",0015:"White Tunic & Kokiri Boots",0016:"Yellow Tunic & Kokiri Boots",0021:"Kokiri Tunic & Iron Boots",0022:"Goron Tunic & Iron Boots",0023:"Zora Tunic & Iron Boots",0024:"Black Tunic & Iron Boots",0025:"White Tunic & Iron Boots",0026:"Yellow Tunic & Iron Boots",0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Infinite\Deku Sticks 801189E4 0009 cn Infinite\Deku Nuts 801189E5 0009 cn Infinite\Bombs 801189E6 0009 cn Infinite\Arrows 801189E7 0009 cn Infinite\Deku Seeds 801189EA 0009 cn Infinite\Bombchu's 801189EC 0009 cn Infinite\Magic Beans 801189F2 0009 cn Infinite\Big Key,Small Keys,Compass,& Map 50000B01 0000 80118A00 0007 50000501 0000 80118A17 0009 80118A1F 0009 80118A21 0009 80118A24 0009 cn Have\Ocarina 801189D3 ???? 0007:"Fairy Ocarina",0008:"Ocarina Of Time" cn Have\Boomerang 801189D8 000E cn Have\Lens of Truth 801189D9 000F cn Have\Megaton Hammer 801189DB 0011 cn Have\Deku Stick 801189CC 0000 cn Have\Deku Nut 801189CD 0001 cn Have\Bombs 801189CE 0002 cn Have\Fairy Bow 801189CF 0003 cn Have\Fairy Slingshot 801189D2 0006 cn Have\Bombchu 801189D4 0009 cn Have\Arrows\Fire Arrow 801189D0 0004 cn Have\Arrows\Ice Arrow 801189D6 000C cn Have\Arrows\Light Arrow 801189DC 0012 cn Have\Hookshot 801189D5 ???? 000A:"Hookshot",000B:"Longshot" cn Have\Magic Beans 801189DA 0010 cn Have\Magic\Fairie's Wind 801189D7 000D cn Have\Magic\Nayru's Love 801189DD 0013 cn Have\Magic\Din's Fire 801189D1 0005 cn Bottles\Bottle 1 Modifier 801189DE ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 2 Modifier 801189DF ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 3 Modifier 801189E0 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 4 Modifier 801189E1 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Trading\Adult Link Item 801189E2 ???? 002D:"Pocket Egg",002E:"Pocket Cucco",002F:"Cojiro",0030:"Odd Mushroom",0031:"Odd Potion",0032:"Poacher's Saw",0033:"Goron's Sword (Broken)",0034:"Prescription",0035:"Eyeball Frog",0036:"Eye Drops",0037:"Claim Check" cn Trading\Young Link Item 801189E3 ???? 0021:"Weird Egg",0022:"Chicken",0023:"Zelda's Letter",0024:"Keaton Mask",0025:"Skull Mask",0026:"Spooky Mask",0027:"Bunny Hood",0028:"Goron Mask",0029:"Zora Mask",002A:"Gerudo Mask",002B:"Mask of Truth",002C:"SOLD OUT" cn Turn Giant's Knife Into Biggoron's Sword 80118996 0001 cn Have Quiver (Holds 30) 801189F9 0001 cn Equipment Modifier 1 cd This modifies the equipment you are carrying. 801189FA ???? 0002:"Silver Scale",0004:"Golden Scale",0006:"Giant's Knife (Broken)",0035:"Black Gauntlets",0040:"Bullet Bag (Holds 30)",0080:"Bullet Bag (Holds 40)",00C0:"Bullet Bag (Holds 50)" cn Equipment Modifier 2 cd This modifies the equipment you are carrying. 801189FB ???? 0008:"Bomb Bag (Holds 20)",0010:"Bomb Bag (Holds 30)",0018:"Bomb Bag (Holds 40)",0020:"Goron's Bracelet",0028:"Silver Gauntlets",0030:"Golden Gauntlets" cn Press L To Levitate cd Press L To Levitate & Let go to land D011BB37 0020 811D9410 40CB cn Press L For infinite Hover Boots cd Press L For Infinite Hover Boots & Let go to land,This Only works when you have the Boots on D011BB37 0020 811D9C32 000D cn Instant Step Hoover Boots cd Take off from Anywhere & to go higher just press L Once, this will lift you higher while walking.to come back Down Keep R pressed.Once you have enabled the code press Start & then start again. D011BB37 0020 811D9410 40CB D011BB37 0000 811D9C32 000D 801189C8 ???? 0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Beta\Play Beta Quest Worlds cd Put on the code on load up,After the Nintendo logo you will be in Hyrule Field,There are no icons, energy bar etc. on the screen.When you press a C-Buttton you can use an object.Here the objects for the C-Buttons:C-left: arrows, C-down: bombs, C-right: Ocarina of Time. There is also no Navi and start menu.When you go to some places the game will freeze or you can't move. D01C6A7D 0000 80119D6B ???? 0000:"World 01",0001:"World 02",0002:"World 03",0003:"World 04",0004:"World 05",0007:"World 06",0008:"World 07",0016:"World 08" cn Warp Song Location\Minuet of Forest & Serenade of Water cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 801197A5 ???? 0000:"Sacred Forest Meadow",0004:"Lake Hylia",0015:"Inside Jabu Jabu's Belly",0018:"Dodongo's Cavern",0068:"Inside The Deku Tree" cn Warp Song Location\Prelude of Light & Nocturne of Shadow cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 801197A5 ???? 0003:"Kakariko Windmill",0007:"Bombchu Bowling Alley",000F:"Zelda & Impa Flee",0014:"Kakariko Village",0017:"Ganon,Final Battle",001D:"Top of Ganon's Tower",0028:"Bombchu Shop",002C:"Bazaar",0030:"Happy Mask Shop",0034:"Ganon's Tower",0038:"Ganon's Castle",004C:"Inside Spirit Door",006C:"Burning Castle",0050:"House of Skulltula",0064:"Death Mountain Trail",0068:"Graveyard",0070:"Thieves' Hideout",0074:"Royal Family's Tomb",0078:"Great Fairy Fountain 1",0084:"Forest Temple,Room With Falling Floor",0088:"Great Fairy Fountain 2",0099:"Grotto 01",009D:"Grotto 02",00A4:"Grotto 04",00A8:"Grotto 05",00B3:"Grotto 06",00B0:"Grotto 07",00B4:"Grotto 08",00B8:"Grotto 09",00C3:"Grotto 10",00C0:"Grotto 11",00C4:"Grotto 12",00FC:"Grotto 13",00D3:"Bottom of the Well",00D0:"Lon Lon Ranch Shed",00D3:"Lon Lon Ranch Outside Shed",00D8:"Ice Cavern",00E3:"Outside Cow Pen",00E0:"Lost Woods Bridge",00E4:"Lon Lon Ranch Chicken Room",00E8:"In Front of Deku Tree",00EB:"Spirit Temple Boss",00F1:"Castle Courtyard,In Front of Zelda",00F4:"Temple of Time",00F8:"Gerudo Fortress Jail" cn Warp Song Location\Bolero of Fire cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 801197A5 ???? 0003:"Castle Courtyard",000B:"Dodongo's Cavern Boss",0010:"Inside The Deku Tree Boss",0014:"Shadow Temple Boss",0017:"Water Temple Boss",001C:"Ganon's Castle Tower",001F:"Ganon First Battle",0028:"Ganon's Castle Room Before Ganon",002B:"Inside Ganon's Castle Room With Pillar",002F:"Lon Lon Ranch",0033:"Mido's House",0037:"Saria's House",004B:"Bearded Man's House",0040:"Top of Ganon's Castle",0047:"Outside Saria's House",004F:"Dampe's Race",0057:"Kokiri Forest",005B:"Top of Death Mountain",005F:"Fishing Pond",0068:"Inside Ganon's Castle",007F:"Hyrule Castle Gate",00BA:"Top of Ganon's Tower",00C2:"Great Fairy Fountain",00D6:"Lost Woods Goron Entrance",00DA:"Lost Woods River Entrance",00DE:"Lost Woods Bridge Field Entrance",00E3:"Goron City Lost Woods Entrance",00F6:"Death Mountain Crater",00FD:"Ganon's Castle" cn Warp Song Location\Requiem of Spirit cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 801197A5 ???? 0005:"Lake Hylia,08 Zora's Domain",0018:"Gerudo Valley",001E:"Lost Woods",0028:"Gerudo Fortress",0030:"Haunted Wasteland",0034:"Ganon's Castle Inside Burning Castle",0038:"Hyrule Castle",003A:"Ganon's Castle",003D:"Death Mountain Trail",004D:"Goron City",0065:"Fire Temple",0069:"Forest Temple",006E:"Shooting Gallery",0079:"Ganon's Castle Inside Burning Castle",007E:"Kakariko Village Entrance",007B:"Zora's River Entrance",0085:"Kokiri Forest Entrance",008A:"Lake Hyrule Entrance",008E:"Gerudo Valley Entrance",0092:"Death Mountain Trail Entrance",0095:"Graveyard Entrance",009E:"Zora's Domain Entrance",00A2:"Zora's Fountain Entrance",00BA:"Goron City Entrance",00BE:"Death Mountain Trail",00C1:"Goron City",00C5:"Lakeside Laboratory",00C9:"Top of Ganon's Castle",00CD:"Hyrule Market (Child Link's)",00CF:"Hyrule Market (Adult Link's)",00F1:"Desert Colossus",00FA:"Lon Lon Ranch Entrance",00FD:"Hyrule Field" cn Max\Double Defense Power cd This gives you White Border Hearts 80118A27 0014 cn Nayru's Love is Always cd For this to work On Or off, you have to walk through a Doorway to activate the Change. 81119D20 ???? 0000:"OFF",FFFF:"ON" cn Infinite\Timers\All Other Timers cd This cheat works on all Race Timers not the final Boss and Under Water with iron Boots etc. 80119D29 0032 cn Epona\Max Carrots\Lon Lon Raunch cd This is For Practicing,Racing.Warning take this off before jumping the exit fence after winning Epona 801F1850 0005 801EE290 0005 cn Infinite\Timers\Escape From Gannons Tower cd This cheat works only on The Final Boss. 80119D2D 00B4 cn Beta\Specific things lean cd This code will cause all items on a specific plane to lean. This is helpful for areas in which the plane causes the crash (Ex. Weird Zora's Fountain Beta Quest World 01) 8002399C 0001 cn Beta\Appear in Strange Places (Hold R) cd If you go to an area where Link is immobile or invisible, using the "appear in strange places" code will almost always fix it, but you'll start somewhere outside of the Arena and in air. I recommend using the infinite step Hover boots code already supplied with PJ64 so you can float back into the arena in the event that this happens. D01C6A7D 0010 81119CBE 0001 cn Beta\Interface always off/on cd If you go to an area where the interface is accessible, this signigfies that you're not in 'beta' mode anymore. Using the "interface always off/on" code, you can stay in 'beta' mode regardless of what happens. This may cause more crashes in SOME areas, but it's rare and is not too severe. If you need to explore a beta area with the interface, "use the interface always on" portion of the code. Don't use the codes as you start the game. If you need the interface on/off at a specific time, start the game, go to the area, activate the code, keep it on until next reset. 80119841 00FF 80119CB7 ???? 0000:"Off",0001:"Off" cn Always Have Wallet Size 801189FA ???? 0047:"Kid Wallet (Holds 99)",0057:"Adult Wallet (Holds 200)",0067:"Giant Wallet (Holds 500)" cn Language Select 80119D61 ???? 0000:"English",0001:"German",0002:"French" crc 1D4136F3-AF63EEA9-C:50 gn Legend of Zelda, The - Ocarina of Time - Master Quest (E) cn Infinite\Rupees cd This cheat allows you to have the max Rupees to the Wallet you currently Hold 81119D04 0001 cn Max\Double Defense Power cd This gives you White Border Hearts 80118A07 0014 cn Use Any Item In Any House cd do not use under or in water 81119B5A 0000 81119B5C 0000 cn Have\All Equipment cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 811189D4 7777 cn Have\All Quest/Status Items cd This cheat causes the Goron Temple door not to open, but if you go to the very top of the mountain where the fairy is, next to her entrance is another one in to the fire temple.once inside put on the hover boots & infinite hover cheat to hover over to the ledge on the left hand side.From here you can carry on the game as normal 801189DD ???? 801189DE ???? 801189DF ???? 00FF:"On",0000:"Off" cn Max\Heart Containers 81118966 0140 cn Max\Gold Skulltulas Killed 80118A09 0064 cn Time of Day Modifier 81118944 ???? 4000:"At Sunrise",5800:"Daylight Out",7000:"Very Bright Out",C000:"At Sunset",D000:"Fairly Dark" cn Infinite\Energy 81118968 0140 cn Infinite\Magic D0118971 0008 80118972 0001 80118974 0001 8011896B 0060 cn Tunic & Boot Options cd This changes what you are wearing,once you have enabled the code press Start & then start again. 801189A8 ???? 0011:"Kokiri Tunic & Kokiri Boots",0012:"Goron Tunic & Kokiri Boots",0013:"Zora Tunic & Kokiri Boots",0014:"Black Tunic & Kokiri Boots",0015:"White Tunic & Kokiri Boots",0016:"Yellow Tunic & Kokiri Boots",0021:"Kokiri Tunic & Iron Boots",0022:"Goron Tunic & Iron Boots",0023:"Zora Tunic & Iron Boots",0024:"Black Tunic & Iron Boots",0025:"White Tunic & Iron Boots",0026:"Yellow Tunic & Iron Boots",0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Infinite\Deku Sticks 801189C4 0009 cn Infinite\Deku Nuts 801189C5 0009 cn Infinite\Bombs 801189C6 0009 cn Infinite\Arrows 801189C7 0009 cn Infinite\Deku Seeds 801189CA 0009 cn Infinite\Bombchu's 801189CC 0009 cn Infinite\Magic Beans 801189D2 0009 cn Infinite\Big Key,Small Keys,Compass,& Map 801189E0 0007 801189E1 0007 801189E2 0007 801189E3 0007 801189E4 0007 801189E5 0007 801189E6 0007 801189E7 0007 801189E8 0007 801189E9 0007 801189EA 0007 801189F7 0009 801189F8 0009 801189F9 0009 801189FA 0009 801189FB 0009 80118A01 0009 80118A04 0009 801189FF 0009 cn Have\Ocarina 801189B3 ???? 0007:"Fairy Ocarina",0008:"Ocarina Of Time" cn Have\Boomerang 801189B8 000E cn Have\Lens of Truth 801189B9 000F cn Have\Megaton Hammer 801189BB 0011 cn Have\Deku Stick 801189AC 0000 cn Have\Deku Nut 801189AD 0001 cn Have\Bombs 801189AE 0002 cn Have\Fairy Bow 801189AF 0003 cn Have\Fairy Slingshot 801189B2 0006 cn Have\Bombchu 801189B4 0009 cn Have\Arrows\Fire Arrow 801189B0 0004 cn Have\Arrows\Ice Arrow 801189B6 000C cn Have\Arrows\Light Arrow 801189BC 0012 cn Have\Hookshot 801189B5 ???? 000A:"Hookshot",000B:"Longshot" cn Have\Magic Beans 801189BA 0010 cn Have\Magic\Fairie's Wind 801189B7 000D cn Have\Magic\Nayru's Love 801189BD 0013 cn Have\Magic\Din's Fire 801189B1 0005 cn Bottles\Bottle 1 Modifier 801189BE ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 2 Modifier 801189BF ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 3 Modifier 801189C0 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Bottles\Bottle 4 Modifier 801189C1 ???? 0014:"Empty Bottle",0015:"Red Potion",0016:"Green Potion",0017:"Blue Potion",0018:"Bottled Fairy",0019:"Fish",001A:"Lon Lon Milk",001B:"Letter",001C:"Blue Fire",001D:"Bug",001E:"Big Poe",001F:"Lon Lon Milk (Half)",0020:"Poe" cn Trading\Adult Link Item 801189C2 ???? 002D:"Pocket Egg",002E:"Pocket Cucco",002F:"Cojiro",0030:"Odd Mushroom",0031:"Odd Potion",0032:"Poacher's Saw",0033:"Goron's Sword (Broken)",0034:"Prescription",0035:"Eyeball Frog",0036:"Eye Drops",0037:"Claim Check" cn Trading\Young Link Item 801189C3 ???? 0021:"Weird Egg",0022:"Chicken",0023:"Zelda's Letter",0024:"Keaton Mask",0025:"Skull Mask",0026:"Spooky Mask",0027:"Bunny Hood",0028:"Goron Mask",0029:"Zora Mask",002A:"Gerudo Mask",002B:"Mask of Truth",002C:"SOLD OUT" cn Turn Giant's Knife Into Biggoron's Sword 80118976 0001 cn Have Quiver (Holds 30) 801189D9 0001 cn Equipment Modifier 1 cd This modifies the equipment you are carrying. 801189DA ???? 0002:"Silver Scale",0004:"Golden Scale",0006:"Giant's Knife (Broken)",0035:"Black Gauntlets",0040:"Bullet Bag (Holds 30)",0080:"Bullet Bag (Holds 40)",00C0:"Bullet Bag (Holds 50)" cn Equipment Modifier 2 cd This modifies the equipment you are carrying. 801189DB ???? 0008:"Bomb Bag (Holds 20)",0010:"Bomb Bag (Holds 30)",0018:"Bomb Bag (Holds 40)",0020:"Goron's Bracelet",0028:"Silver Gauntlets",0030:"Golden Gauntlets" cn Warp Song Location\Minuet of Forest & Serenade of Water cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119CCD ???? 0000:"Sacred Forest Meadow",0004:"Lake Hylia",0015:"Inside Jabu Jabu's Belly",0018:"Dodongo's Cavern",0068:"Inside The Deku Tree" cn Warp Song Location\Prelude of Light & Nocturne of Shadow cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119CCD ???? 0003:"Kakariko Windmill",0007:"Bombchu Bowling Alley",000F:"Zelda & Impa Flee",0014:"Kakariko Village",0017:"Ganon,Final Battle",001D:"Top of Ganon's Tower",0028:"Bombchu Shop",002C:"Bazaar",0030:"Happy Mask Shop",0034:"Ganon's Tower",0038:"Ganon's Castle",004C:"Inside Spirit Door",006C:"Burning Castle",0050:"House of Skulltula",0064:"Death Mountain Trail",0068:"Graveyard",0070:"Thieves' Hideout",0074:"Royal Family's Tomb",0078:"Great Fairy Fountain 1",0084:"Forest Temple,Room With Falling Floor",0088:"Great Fairy Fountain 2",0099:"Grotto 01",009D:"Grotto 02",00A4:"Grotto 04",00A8:"Grotto 05",00B3:"Grotto 06",00B0:"Grotto 07",00B4:"Grotto 08",00B8:"Grotto 09",00C3:"Grotto 10",00C0:"Grotto 11",00C4:"Grotto 12",00FC:"Grotto 13",00D3:"Bottom of the Well",00D0:"Lon Lon Ranch Shed",00D3:"Lon Lon Ranch Outside Shed",00D8:"Ice Cavern",00E3:"Outside Cow Pen",00E0:"Lost Woods Bridge",00E4:"Lon Lon Ranch Chicken Room",00E8:"In Front of Deku Tree",00EB:"Spirit Temple Boss",00F1:"Castle Courtyard,In Front of Zelda",00F4:"Temple of Time",00F8:"Gerudo Fortress Jail" cn Warp Song Location\Bolero of Fire cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119CCD ???? 0003:"Castle Courtyard",000B:"Dodongo's Cavern Boss",0010:"Inside The Deku Tree Boss",0014:"Shadow Temple Boss",0017:"Water Temple Boss",001C:"Ganon's Castle Tower",001F:"Ganon First Battle",0028:"Ganon's Castle Room Before Ganon",002B:"Inside Ganon's Castle Room With Pillar",002F:"Lon Lon Ranch",0033:"Mido's House",0037:"Saria's House",004B:"Bearded Man's House",0040:"Top of Ganon's Castle",0047:"Outside Saria's House",004F:"Dampe's Race",0057:"Kokiri Forest",005B:"Top of Death Mountain",005F:"Fishing Pond",0068:"Inside Ganon's Castle",007F:"Hyrule Castle Gate",00BA:"Top of Ganon's Tower",00C2:"Great Fairy Fountain",00D6:"Lost Woods Goron Entrance",00DA:"Lost Woods River Entrance",00DE:"Lost Woods Bridge Field Entrance",00E3:"Goron City Lost Woods Entrance",00F6:"Death Mountain Crater",00FD:"Ganon's Castle" cn Warp Song Location\Requiem of Spirit cd For this cheat to work,You have to have the Ocarina & Songs. make your choice & Play the song of the cheat name to get where you chose. 80119CCD ???? 0005:"Lake Hylia",0008:"Zora's Domain",0018:"Gerudo Valley",001E:"Lost Woods",0028:"Gerudo Fortress",0030:"Haunted Wasteland",0034:"Ganon's Castle Inside Burning Castle",0038:"Hyrule Castle",003A:"Ganon's Castle",003D:"Death Mountain Trail",004D:"Goron City",0065:"Fire Temple",0069:"Forest Temple",006E:"Shooting Gallery",0079:"Ganon's Castle Inside Burning Castle",007E:"Kakariko Village Entrance",007B:"Zora's River Entrance",0085:"Kokiri Forest Entrance",008A:"Lake Hyrule Entrance",008E:"Gerudo Valley Entrance",0092:"Death Mountain Trail Entrance",0095:"Graveyard Entrance",009E:"Zora's Domain Entrance",00A2:"Zora's Fountain Entrance",00BA:"Goron City Entrance",00BE:"Death Mountain Trail",00C1:"Goron City",00C5:"Lakeside Laboratory",00C9:"Top of Ganon's Castle",00CD:"Hyrule Market (Child Link's)",00CF:"Hyrule Market (Adult Link's)",00F1:"Desert Colossus",00FA:"Lon Lon Ranch Entrance",00FD:"Hyrule Field" cn Nayru's Love is Always cd For this to work On Or off, you have to walk through a Doorway to activate the Change. 81119D00 ???? 0000:"OFF",FFFF:"ON" cn Infinite\Timers\All Other Timers cd This cheat works on all Race Timers not the final Boss and Under Water with iron Boots etc. 8011B9A1 0032 cn Epona\Max Carrots\Lon Lon Raunch cd This is For Practicing,Racing.Warning take this off before jumping the exit fence after winning Epona 801F1A68 0005 801EE508 0005 cn Infinite\Timers\Escape From Gannons Tower cd This cheat works only on The Final Boss. 80119D0D 00B4 cn Beta\Play Beta Quest Worlds cd Put on the code on load up,& then press reset (F1) you will be in Beta Mode,There are no icons, energy bar etc. on the screen.When you press a C-Buttton you can use an object.Here the objects for the C-Buttons:C-left: arrows, C-down: bombs, C-right: Ocarina of Time. There is also no Navi and start menu.When you go to some places the game will freeze or you can't move. D011BB71 0000 80119D4B ???? 0000:"World 01",0001:"World 02",0002:"World 03",0003:"World 04",0004:"World 05",0007:"World 06",0008:"World 07",0016:"World 08" cn Level Select D01C6E35 0000 8111893A ???? 0000:"Inside the Deku Tree",0004:"Dodongo's Cavern",0008:"Gerudo Training Ground",000C:"Below The Phantom Gannon Boss",0010:"Water Temple",0027:"Inside Jabu-Jabu's Belly",002C:"Royal Family's Tomb",0036:"Shoadow Temple",0042:"Lakeside Laboratory",0052:"Temple Of Time",006C:"?" cn Language Select 80119D41 ???? 0000:"English",0001:"German",0002:"French" cn Press L\To Levitate cd Press L To Levitate & Let go to land D011BB11 0020 811D93D0 40CB cn Press L\For Infinite Hover Boots cd Press L For Infinite Hover Boots & Let go to land,This Only works when you have the Boots on D011BB11 0020 811D9BF2 000D cn Instant Step Hoover Boots cd Take off from Anywhere & to go higher just press L Once, this will lift you higher while walking.to come back Down Keep R pressed.Once you have enabled the code press Start & then start again. D011BB11 0020 811D93D0 40CB D011BB11 0000 811D9BF2 000D 801189A8 ???? 0031:"Kokiri Tunic & Hover Boots",0032:"Goron Tunic & Hover Boots",0033:"Zora Tunic & Hover Boots",0034:"Black Tunic & Hover Boots",0035:"White Tunic & Hover Boots",0036:"Yellow Tunic & Hover Boots" cn Beta\Specific things lean cd This code will cause all items on a specific plane to lean. This is helpful for areas in which the plane causes the crash (Ex. Weird Zora's Fountain Beta Quest World 01) 8002397C 0001 cn Beta\Appear in Strange Places (Hold R) cd If you go to an area where Link is immobile or invisible, using the "appear in strange places" code will almost always fix it, but you'll start somewhere outside of the Arena and in air. I recommend using the infinite step Hover boots code already supplied with PJ64 so you can float back into the arena in the event that this happens. D01C681D 0010 81119C9E 0001 cn Beta\Interface always off/on cd If you go to an area where the interface is accessible, this signigfies that you're not in 'beta' mode anymore. Using the "interface always off/on" code, you can stay in 'beta' mode regardless of what happens. This may cause more crashes in SOME areas, but it's rare and is not too severe. If you need to explore a beta area with the interface, "use the interface always on" portion of the code. Don't use the codes as you start the game. If you need the interface on/off at a specific time, start the game, go to the area, activate the code, keep it on until next reset. 80119821 00FF 80119C97 ???? 0000:"Off",0001:"On" cn Language Select 80119D41 ???? 0000:"English",0001:"German",0002:"French" cn Have\Status Heart Containers 801189DC ???? 0030:"On",0000:"Off" crc 60460680-305F0E72-C:50 gn Lode Runner 3-D (E) cn Infinite Lives 81157EAE 0063 cn Access Secret Worlds 81152946 0064 cn Access All Navigation Cards 80157E9B 0005 cn Max & Total Gold 80157E4B 0063 80157E4F 0063 cn Access All In-Game Cheats cd Pause Gameplay To Access 81157E46 000F 81157E56 FFFF crc 0AA0055B-7637DF65-C:50 gn DAFFY DUCK STARRING cn Infinite\Lives 80026DE7 0063 cn Infinite\Health 80026DE3 0004 cn Infinite Time\Basketball Gym 8029F901 0042 cn Infinite Time\Flight Test Range 802BA3A9 0042 cn Infinite Time\Cecil's Flying Toys 802A5575 0042 cn Infinite Time\Slippery Slide 802A7E8D 0042 cn Tennis CPU Can't Score 801D7B4B 0000 cn Infinite\Atoms 80159667 00C8 cn Infinite\Quarks 80159663 00C8 crc 1145443D-11610EDB-C:50 gn Mace - The Dark Age (E) cn Infinite Health Player 1 8008B287 0064 cn Infinite Health Player 2 8008AEFF 0064 cn Extra Characters 8007FA98 0001 cn Ned The Janitor 8013C281 0001 cn Infinite\Time 8113C5BA 0B9E cn Infinite\Time To Choose Character D0137ABE 0001 81137ABE 02A2 cn Infinite\Continues 8015183B 0006 cn One Hit Death\Player 1 D008B287 0064 8008B287 0001 cn One Hit Death\Player 2 D008AEFF 0064 8008AEFF 0001 cn Play As Options\Player 1 8113C6E2 ???? 3334:"Executioner",335C:"Lord Deimos",33C4:"Ragnar",33AC:"Koyasha",33D4:"Taria",33FC:"AL-Rashid",3424:"Takeshi",344C:"Mordoskull",3474:"Xiao Lang",449C:"Namira",358C:"Dregan",353C:"Hellnight",34C4:"Big Guy with spikes and a skull staff",3514:"Monk dude with sword",3564:"Pojo The Chicken",35B4:"War Mech" cn Play As Options\Player 2 8113C6DE ???? 3334:"Executioner",335C:"Lord Deimos",33C4:"Ragnar",33AC:"Koyasha",33D4:"Taria",33FC:"AL-Rashid",3424:"Takeshi",344C:"Mordoskull",3474:"Xiao Lang",449C:"Namira",358C:"Dregan",353C:"Hellnight",34C4:"Big Guy with spikes and a skull staff",3514:"Monk dude with sword",3564:"Pojo The Chicken",35B4:"War Mech" cn Fight With Bunny Slippers On 81138914 0100 crc 62E957D0-7FC15A5D-C:50 gn MarioGolf64 cn Unlock all Characters and Birdy Badges cd Unlocks Metal Mario, Maple, Luigi, Sonny, Wario, Harry, Bowser, Yoshi, Mario and DK 50006C01 0000 801304A4 0001 50000901 0000 80130518 0001 50000901 0000 80130521 0001 cn Wind Speed Select 800BACA1 ???? 0000:"0 MPH",0014:"20 MPH" cn Weather Select 800BACAB ???? 0000:"Never Rains",0001:"Always Rains" cn All Golf Courses Unlocked 80130FED 0001 cn Always On 1st Stroke 801B74F3 0000 cn Infinite Power Shots 801B74F8 0042 crc C3B6DE9D-65D2DE76-C:50 gn Mario Kart 64 (E) (V1.0) cn Infinite Items 8016609D ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Off-Road Tires\Player 1 50000418 0000 810F6C74 0140 cn Off-Road Tires\Player 2 50000418 0000 810F7A4C 0100 cn Off-Road Tires\Player 3 50000418 0000 810F8824 0100 cn Off-Road Tires\Player 4 50000418 0000 810F9644 0100 cn Have Bonus Mode and All Gold Cups 50000402 0000 8018EE50 ???? 0000:"Off",00FF:"On" cn Press GS\For Full Debug Menu cd Press GS at the Press Start Menu to access the Debug Menu 8818EF2F 0002 cn Press L To Levitate\Player 1 D00F6A55 0020 810F6B08 4000 cn Press L To Levitate\Player 2 D00F6A65 0020 810F78E0 4000 cn Press L To Levitate\Player 3 D00F6A75 0020 810F86B8 4000 cn Press L To Levitate\Player 4 D00F6A85 0020 810F9490 4000 crc 2577C7D4-D18FAAAE-C:50 gn Mario Kart 64 (E) (V1.1) cn Infinite Items 80165FBD ???? 000D:"Double Mushroom",0009:"Fake Item Box",000B:"Ghost",000A:"Invincible Star",0008:"Lightning",0001:"Single Banana",0003:"Single Green Shell",000C:"Single Mushroom",0005:"Single Red Shell",000F:"Super Mushroom",0004:"Triple Green Shell",000E:"Triple Mushroom",0006:"Triple Red Shell",0002:"Banana Bunch",0007:"Blue Spiny Shell" cn Have Bonus Mode and All Gold Cups 50000402 0000 8018ED70 ???? 0000:"Off",00FF:"On" cn Off-Road Tires\Player 1 50000418 0000 810F6B94 0140 cn Off-Road Tires\Player 2 50000418 0000 810F796C 0100 cn Off-Road Tires\Player 3 50000418 0000 810F8744 0100 cn Off-Road Tires\Player 4 50000418 0000 810F951C 0100 cn Press GS\For Full Debug Menu cd Press GS at the Press Start Menu to access the Debug Menu 8818EE4F 0002 cn Press L To Levitate\Player 1 D00F6975 0020 810F6A28 4000 cn Press L To Levitate\Player 2 D00F6985 0020 810F7800 4000 cn Press L To Levitate\Player 3 D00F6995 0020 810F85D8 4000 cn Press L To Levitate\Player 4 D00F69A5 0020 810F93B0 4000 crc 9C663069-80F24A80-C:50 gn Mario Party (E) cn Top Left Character\Coin Options cd If you want to have full 255 Coins,1st use the 100 Option then put on 255. this will stop the numbers from changing & spoiling the result. 800FFAA9 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Top Left Character\Star Options 800FFAAC ???? 0000:"0 Stars",0064:"99 Stars" cn Top Right Character\Coin Options 800FFAD9 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Top Right Character\Star Options 800FFADC ???? 0000:"0 Stars",0064:"99 Stars" cn Lower Left Character\Coin Options 800FFB09 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Lower Left Character\Star Options 800FFB0C ???? 0000:"0 Stars",0064:"99 Stars" cn Lower Right Character\Coin Options 800FFB39 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Lower Right Character\Star Options 800FFB3C ???? 0000:"0 Stars",0064:"99 Stars" cn Top Left Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800DDC92 ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Top Right Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800DDCD6 ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Lower Left Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800DDD1A ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Lower Right Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800DDD5E ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Mini Game\Unlimited 99 lives 800FFF58 0063 cn Mini Game\Max 99 Coins 800FFF61 0063 crc C5674160-0F5F453C-C:50 gn Mario Party 3 (E) cn Top Left Character\Coin Options cd If you want to have full 255 Coins,1st use the 100 Option then put on 255. this will stop the numbers from changing & spoiling the result. 810D0F92 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Top Left Character\Star Options 800D0F96 ???? 0000:"0 Stars",0064:"99 Stars" cn Top Right Character\Coin Options 810D0FCA ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Top Right Character\Star Options 800D0FCE ???? 0000:"0 Stars",0064:"99 Stars" cn Lower Left Character\Coin Options 810D1002 ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Lower Left Character\Star Options 800D1006 ???? 0000:"0 Stars",0064:"99 Stars" cn Lower Right Character\Coin Options 810D103A ???? 0000:"0 Coins",000A:"10 Coins",0064:"100 Coins",00FF:"255 Coins" cn Lower Right Character\Star Options 800D103E ???? 0000:"0 Stars",0064:"99 Stars" cn Top Left Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800CDA55 ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Top Right Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800CDAA1 ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Lower Left Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800CDAED ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" cn Lower Right Character\Dice Always cd With this option you can calculate exactly how many you need to get on the position of your choice. 800CDB39 ???? 0000:"Rolls In Random",0001:"Rolls In 1",0002:"Rolls In 2",0003:"Rolls In 3",0004:"Rolls In 4",0005:"Rolls In 5",0006:"Rolls In 6",0007:"Rolls In 7",0008:"Rolls In 8",0009:"Rolls In 9",000A:"Rolls In 10" crc 839F3AD5-406D15FA-C:50 gn MarioTennis cn Have All\Characters Available 810657A0 FFFF cn Have All\Courts Available 810657A4 FFFF cn Score\Player 1 80152DFA ???? 0000:"0",0001:"15",0002:"30",0003:"40" cn Score\Player 2 80152DFB ???? 0000:"0",0001:"15",0002:"30",0003:"40" crc DED0DD9A-E78225A7-C:50 gn MICKEY USA PAL cn Play As 800D33D1 ???? 0000:"Mickey Mouse",0001:"Daisy Duck",0002:"Goofy",0003:"Pete",0004:"Minnie Mouse",0005:"Donald Duck",0006:"Huey",0007:"Dewey",0008:"Louie",0009:"Lugwig Von Drake" cn Traffic Troubles\Indianapolis\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B4332 0063 cn Traffic Troubles\San Fransisco\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B7602 0063 cn Traffic Troubles\New Mexico\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B5902 0063 cn Traffic Troubles\Grand Canyon\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B8CF2 0063 cn Motor Way Mania\Los Angeles\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B3792 0063 cn Motor Way Mania\Alaska\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B3F22 0063 cn Motor Way Mania\Las Vegas\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B85B2 0063 cn Motor Way Mania\Philadelphia\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B9502 0063 cn Freewayphobia\Dakota\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B2CB2 0063 cn Freewayphobia\Seattle\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B5892 0063 cn Freewayphobia\New York\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B4FB2 0063 cn Freewayphobia\Chicago\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B7AE2 0063 cn Victory Vehicles\Yellowstone\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B2F62 0063 cn Victory Vehicles\Washington DC\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801BD102 0063 cn Victory Vehicles\Everglades\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B56C2 0063 cn Victory Vehicles\Malibu\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B7152 0063 cn Frantic Finale\Hawaii\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B7B12 0063 cn Frantic Finale\Oregon\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B44E2 0063 cn Frantic Finale\Texas\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B4C82 0063 cn Frantic Finale\Colorado\Max Tokens cd Only use one One Max Token Track code of each Level at a time, if you enable all tracks Max Token on that level Or all levels and tracks it will crash. 801B7432 0063 cn Level Select 801AD159 ???? 0000:"Traffic Troubles",0001:"Motor Way Mania",0002:"Freewayphobia",0003:"Vitory Vehicles",0004:"Frantic Finale",0005:"Time Trial",0006:"Practice",0007:"Contest",0008:"Options" cn Difficulty Select 8007C1C0 ???? 0000:"Amateur",0001:"Intermediate",0002:"Professional",0003:"Mirror Mode" cn Unlock Everything cd This will unlock all characters, tracks, mirror mode, all in-game cheats, postcards, pluto's collar and give you all Trophies for every track and difficulties. To have this cheat save to mempak, enable it and then go into the Options Menu and disable the cheat. Go to the Wide-Screen Settings and Change it to Wide-Screen [16.9] and then the B button to get back to Wide-Screen Settings, now go back into Wide-Screen [16.9] and change it back to Normal [4.3].and press the B button until you come back to the main Options Menu.Close the game and load it again to see everything saved to the Mempak and unlocked. 800D3478 008F 800D3479 0094 800D347A 0003 800D347C 0001 800D347F 0080 50000502 0000 800D3480 0009 50000502 0000 800D3481 0024 800D348A 0015 800D348B 007F 800D348C 0001 800D348D 00FF 800D348E 0004 800D348F 0022 cn Always 1st & final time 00:00.00 cd All Levels 50000301 0000 801CE959 0000 cn Traffic Troubles\Indianapolis\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B430B 00FF cn Traffic Troubles\San Fransisco\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B75DB 00FF cn Traffic Troubles\New Mexico\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B58DB 00FF cn Traffic Troubles\Grand Canyon\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B8CCB 00FF cn Motor Way Mania\Los Angeles\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B207B 00FF cn Motor Way Mania\Alaska\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B280B 00FF cn Motor Way Mania\Las Vegas\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B6E9B 00FF cn Motor Way Mania\Philadelphia\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B7DEB 00FF cn Freewayphobia\Dakota\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B159B 00FF cn Freewayphobia\Seattle\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B417B 00FF cn Freewayphobia\New York\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B4A5B 00FF cn Freewayphobia\Chicago\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B758B 00FF cn Victory Vehicles\Yellowstone\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B2A0B 00FF cn Victory Vehicles\Washington DC\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801BCBAB 00FF cn Victory Vehicles\Everglades\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B516B 00FF cn Victory Vehicles\Malibu\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B6BFB 00FF cn Frantic Finale\Hawaii\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801B75BB 00FF cn Frantic Finale\Oregon\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801BABEB 00FF cn Frantic Finale\Texas\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801BB38B 00FF cn Frantic Finale\Colorado\Always Have Shield Shell cd Only use one Always Have Shield Shell code of each Level at a time, if you enable all tracks Always Have Shield Shell on that level Or all levels and tracks it will crash. 801BDB3B 00FF cn Re-name Characters\Mickey\Letter 1 801E39B9 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Mickey\Letter 2 801E39BA ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Mickey\Letter 3 801E39BB ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Mickey\Letter 4 801E39BC ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Mickey\Letter 5 801E39BD ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Mickey\Letter 6 801E39BE ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Minnie\Letter 1 801E39C0 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Minnie\Letter 2 801E39C1 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Minnie\Letter 3 801E39C2 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Minnie\Letter 4 801E39C3 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Minnie\Letter 5 801E39C4 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Minnie\Letter 6 801E39C5 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Donald\Letter 1 801E39C7 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Donald\Letter 2 801E39C8 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Donald\Letter 3 801E39C9 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Donald\Letter 4 801E39CA ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Donald\Letter 5 801E39CB ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Donald\Letter 6 801E39CC ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Daisy\Letter 1 801E39CE ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Daisy\Letter 2 801E39CF ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Daisy\Letter 3 801E39D0 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Daisy\Letter 4 801E39D1 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Daisy\Letter 5 801E39D2 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Goofy\Letter 1 801E39D4 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Goofy\Letter 2 801E39D5 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Goofy\Letter 3 801E39D6 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Goofy\Letter 4 801E39D7 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Goofy\Letter 5 801E39D8 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Pete\Letter 1 801E39DA ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Pete\Letter 2 801E39DB ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Pete\Letter 3 801E39DC ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Pete\Letter 4 801E39DD ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Huey\Letter 1 801E39DF ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Huey\Letter 2 801E39E0 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Huey\Letter 3 801E39E1 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Huey\Letter 4 801E39E2 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Dewey\Letter 1 801E39E4 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Dewey\Letter 2 801E39E5 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Dewey\Letter 3 801E39E6 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Dewey\Letter 4 801E39E7 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Dewey\Letter 5 801E39E8 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Louie\Letter 1 801E39EA ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Louie\Letter 2 801E39EB ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Louie\Letter 3 801E39EC ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Louie\Letter 4 801E39ED ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Louie\Letter 5 801E39EE ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Ludwig\Letter 1 801E39F0 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Ludwig\Letter 2 801E39F1 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Ludwig\Letter 3 801E39F2 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Ludwig\Letter 4 801E39F3 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Ludwig\Letter 5 801E39F4 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" cn Re-name Characters\Ludwig\Letter 6 801E39F5 ???? 0000:"",0020:"",0021:"!",0022:"\"",0023:"#",0024:"",0025:"%",0026:"&",0027:"'",0028:"(",0029:")",002A:"*",002B:"+",002C:"",002D:"-",002E:".",002F:"/",0030:"0",0031:"1",0032:"2",0033:"3",0034:"4",0035:"5",0036:"6",0037:"7",0038:"8",0039:"9",003A:":",003B:";",003C:"<" crc 2A49018D-D0034A02-C:50 gn Micro Machines 64 Turbo (E) cn Always 1st 810BB1F8 0100 cn One Lap To Race 810B88DE 0101 cn Infinite 255 Lives 800BB1C2 00FF cn Access All Tracks 810B88DA 0001 cn Always Win Head 2 Head 810BD590 0008 cn Always Turbo Level 1 cd In Easy Mode 810B4070 3100 810BBD30 0000 crc 418BDA98-248A0F58-C:50 gn Mischief Makers cn Marina\Infinite Health 810E1120 0BB8 cn Teran\Infinite Health 810E5DA0 03E8 cn Infinite Max Red Gems 81169C66 25C2 cn All Stages & Chapters Unlocked 80163648 003B cn All 52 Gold Gems Collected 80163640 0003 80163641 007E 80163642 00FF 80163643 00EF 80163644 00FF 80163645 007F 80163646 00FF 80163647 00FC cn Marina\Press A To Levitate D0128BF4 0080 800E1132 0091 cn Teran\Press A To Levitate D0128BF4 0080 800E5DB2 0091 cn Infinite Time to Watch Ending 800E6613 0063 crc 2256ECDA-71AB1B9C-C:50 gn MISSION IMPOSSIBLE cn Invincibility 810864C4 0101 cn Infinite\Ammo All Guns 50000610 0000 800A9097 00FF cn Infinite\Health 810864C2 FFFF cn Access All Levels 8008AA56 0001 8008AD3A 0001 8008A862 0001 8008A876 0001 8008A88A 0001 8008A89E 0001 8008A8B2 0001 8008A8C6 0011 8008A8DA 0021 8008AD4E 0001 8008A916 0011 8008A92A 0041 8008A93E 0021 8008A966 0001 8008A98E 0001 8008AD62 0001 8008A9DE 0001 8008A9F2 0011 8008AA06 0021 8008AD76 0001 8008A7D6 0001 8008A7EA 0001 8008A812 0001 cn Freeze All Timers 81093F50 0063 81093F52 0063 81093F54 0063 cn Weapon Select 800A90B5 ???? 800A90C5 ???? 800A90D5 ???? 0000:"9MM Hi Power",0001:"Silenced Pistol",0002:"Uzi",0003:"Fists",0032:"Gas Spray",0036:"Blow Torch",001F:"Fire Extinguisher",0024:"Spray Paint",0027:"Electrostunner",000B:"Blow Dart Gun",000C:"Dart Hand Gun",002D:"Mini Rocket Launcher" cn Walk Through Walls & Objects cd This will allow you to pass through anything & even walk on water.if you amerge somewhere in the ground just press the A button. 80094105 ???? 0080:"On",0000:"Off" crc 73036F3B-CE0D69E9-C:50 gn Mortal Kombat 4 (E) cn Unlimited Energy\Player 1 810FE208 0001 810FE20A 0000 cn Unlimited Energy\Player 2 81127084 0001 81127086 0000 cn Infinite Run\Player 1 811050FC 0001 811050FE 0000 cn Infinite Run\Player 2 811051B0 0001 811051B2 0000 cn Play As\Player 1 800FE3C3 ???? 0000:"Scorpion",0001:"Raiden",0002:"Sonya",0003:"Liu Kang",0004:"Sub-Zero",0005:"Fujin",0006:"Shinnok",0007:"Reiko",0008:"Quan Chi",0009:"Tanya",000A:"Reptile",000B:"Kai",000C:"Jarek",000D:"Jax",000E:"Johnny Cage",000F:"Goro",0011:"Noob Saibot" cn Play As\Player 2 80126FBF ???? 0000:"Scorpion",0001:"Raiden",0002:"Sonya",0003:"Liu Kang",0004:"Sub-Zero",0005:"Fujin",0006:"Shinnok",0007:"Reiko",0008:"Quan Chi",0009:"Tanya",000A:"Reptile",000B:"Kai",000C:"Jarek",000D:"Jax",000E:"Johnny Cage",000F:"Goro",0011:"Noob Saibot" cn Choose A Costume\Player 1 8104A612 ???? 0000:"Normal",0001:"First",0002:"Second",0003:"Third" cn Choose A Costume\Player 2 8104A616 ???? 0000:"Normal",0001:"First",0002:"Second",0003:"Third" cn Infinite Time 8110524A 0063 cn Enable Restart Match option 800494BB 0002 crc 8C3D1192-BEF172E1-C:50 gn Mortal Kombat Trilogy (E) cn Unlimited Energy\Player 1 801698AD 00A6 cn Unlimited Energy\Player 2 80169B81 00A6 cn Aggressor Energy Bar\Player 1 80169941 0030 cn Aggressor Energy Bar\Player 2 80169943 0030 cn Infinite Time 8114C2FC 000A cn Unlock Secret 80169F41 0004 cn Infinite Run\Player 1 811698B4 0030 cn Play As\Player 1 8016989D ???? 0000:"Kano",0001:"Sonya",0002:"Jax",0003:"Nightwolf",0004:"Cage",0005:"Stryker",0006:"Sindel",0007:"Sektor",0008:"Cyrax",0009:"Kung Lao",000A:"Kabal",000B:"Sheeva",000C:"Shang Tsung",000D:"Liu Kang",000E:"Smoke",000F:"Kitana",0010:"Jade",0011:"Mileena",0012:"Scorpion",0013:"Reptile",0014:"Ermac",0015:"Sub-Zero",0016:"Human Smoke",0017:"Noob Saibot",0018:"Rayden",0019:"Baraka",001A:"Rain",001B:"Khameleon" cn Infinite Run\Player 2 81169B88 0030 cn Play As\Player 2 80169B41 ???? 0000:"Kano",0001:"Sonya",0002:"Jax",0003:"Nightwolf",0004:"Cage",0005:"Stryker",0006:"Sindel",0007:"Sektor",0008:"Cyrax",0009:"Kung Lao",000A:"Kabal",000B:"Sheeva",000C:"Shang Tsung",000D:"Liu Kang",000E:"Smoke",000F:"Kitana",0010:"Jade",0011:"Mileena",0012:"Scorpion",0013:"Reptile",0014:"Ermac",0015:"Sub-Zero",0016:"Human Smoke",0017:"Noob Saibot",0018:"Rayden",0019:"Baraka",001A:"Rain",001B:"Khameleon" cn Pick Your Kombat Zone 812575A4 ???? 0000:"Subway",0001:"Street",0002:"Courtyard",0003:"Pit",0004:"Kahn's Tower",0005:"Bridge",0006:"Soul Chamber",0007:"Bell Tower",0008:"Kombat Temple",0009:"Graveyard",000A:"Pit 3",000B:"River Kombat",000C:"Scorpion's Lair",000D:"Kahn's Kave",000E:"Jade's Desert",000F:"Lost Bridge",0010:"Hidden Portal",0011:"Dead Pool",0012:"Wasteland",0013:"Rooftop",0014:"Armory",0015:"Living Forest",0016:"Tower",0017:"Portal",0018:"Lair",0019:"Tomb",001A:"Pit 2",001B:"Star Bridge",001C:"Pit Bottom" cn Max Aggressor\Player 1 cd Press L Button To Activate D02B5285 0020 811698D4 5100 D02B5285 0020 811698DC 5100 cn Max Aggressor\Player 2 cd Press L Button To Activate D02B528D 0020 811698D6 5100 D02B528D 0020 811698DE 5100 crc B8F0BD03-4479189E-C:50 gn MRC - Multi Racing Championship (E) cn Always 1st 800A9107 0000 cn Infinite Time 8009498F 003C cn Access all Gold Trophies cd Championshp & Match Mode 50000602 0000 810A9078 0000 cn Access All Tracks In Match Mode 50000602 0000 810A9080 0001 crc F5360FBE-2BF1691D-C:50 gn MYSTICAL NINJA cn Infinite\Health 8015D2E7 0028 cn Infinite\Lives 8015D2EF 000A cn Infinite\Ryo 8015D2EA 0010 cn Have\Chain Pipe 8015D3BF 0002 cn Have\Medal of Flames 8015D3DF 0001 cn Have\Ebisumaru 8015D3A3 0001 cn Have\Meat Saw Hammer 8015D3C0 0001 cn Have\Sasuke Character 8015D3A4 0001 cn Have\Fire Cracker Bomb 8015D3C4 0001 cn Have\Kunai of Severe Cold 8015D3D4 0001 cn Have\Yae Character 8015D3AB 0001 cn Have\Bazooka 8015D3CB 0001 cn Have\Flute 8015D3DB 0001 cn Have\Magic Mermaid 8015D3FB 0001 cn Have\Magic Sudden Impact 8015D3EC 0001 cn Have\Magic Mini Ebisu 8015D3F2 0001 cn Have\Magic Flying 8015D3F4 0001 cn Have\Shell 8015D3FC 0001 cn Have\Brown Item 8015D402 0001 cn Have\Brown Round Item 8015D40F 0001 cn Have\Gold Key 8015D412 0001 cn Have\Blue Sausage 8015D417 0001 cn Have\Pink Item 8015D41B 0001 cn Have\Gold Item 8015D41C 0001 cn Have\Blue Item 8015D422 0001 cn Access\Japanese Sombrero cd Use only one of these codes at a time! 8015D2F7 0001 cn Access\Metal Helmet cd Use only one of these codes at a time! 8015D2F7 0002 cn Access\Gold Helmet cd Use only one of these codes at a time! 8015D2F7 0003 cn Access\Infinite Health cd Use only one of these codes at a time! 802F706A 0999 cn Access\Infy Ryo cd Use only one of these codes at a time! 802F7667 0999 cn Access\Always have Big Laser cd Use only one of these codes at a time! 802F706F FFFF cn Access\Infinite Ryo Impact Running cd Use only one of these codes at a time! 812F70EA 270F cn Access\Infinite Ryo Impact Fighting cd Use only one of these codes at a time! 812F7066 0005 cn Access\Enemy Health Modifer attach Activator cd Use only one of these codes at a time! 812F7062 03E8 cn Access\Infinite Impact Oil cd Use only one of these codes at a time! 812F706A 0154 cn Access\Full Energy for Lazer cd Use only one of these codes at a time! 812F706E 0064 cn Access\Mystical Ninja Skating team 8120D620 4E20 8120DEF4 4E20 8116AE78 4E20 cn Access\Move Lock 8116AE6A 0000 8120D84A 0000 cn Access\Skating Team V2 8120D620 4E20 8120DEF4 4E20 8116AE78 4E20 8116AE6A 0001 8120D84A 0001 cn Keep Blue Fish 8015D303 0003 50000404 0000 8015D2F3 0003 crc 7F9345D3-841ECADE-C:50 gn Mystical Ninja 2 Starring Goemon (E) cn Play As\Player 1 80088E02 ???? 0000:"Goemon",0001:"Ebisumaru",0002:"Sasuke",0003:"Yae" cn Unlimited Gate Opener Things 80088EC6 0099 cn Unlimited Health\Player 1 80088ED4 0004 cn Unlimited Shield\Player 1 80088ED5 0004 8015D3C4 0001 cn Always Have Most Powerful Weapon 80088ED9 0003 crc AE4992C9-9253B253-C:50 gn NASCAR 99 (E) cn Laps To Race 81044B7E ???? 0001:"1 Lap",0002:"2 Laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7Laps",0008:"8 Laps",0009:"9 Laps" cn Access All Secret NASCAR Legends cd This will give you access to,Alan Kulwicki,Cale Yarborough,Bobby Allison,Davey Allison,Richard Petty,Benny Parsons 50000602 0000 810DF400 0101 crc 29CE7692-71C58579-C:50 gn NHL Breakaway 98 (E) cn Activate Cheat Menu 80053F78 0001 cn Home Team Scores 8012BC2C ???? 0000:"No Score",00FF:"Max Score" cn Away Team Score 8012BC2D ???? 0000:"No Score",00FF:"Max Score" crc 8A97A197-272DF6C1-C:50 gn Nuclear Strike 64 (E) cn Level & Scenario Select 800ACE5C 000B cn Invincibility cd Makes you also fly without any fuel 800ADB64 0001 cn Double MPG 800ADB69 0001 cn No Quad Damage 800ADB6B 0001 cn infinite Ammo For All Guns 800ADB65 0001 cn Infinite Attempts 800ADB66 0001 crc E86415A6-98395B53-C:50 gn O.D.T (Or Die Trying) (E) (M5) (Unreleased Final) cn Play As Select 800FCEC5 ???? 0000:"Ike Hawkings (Corporal)",0001:"Sophia Hawkings (Stowaway)",0002:"Julia Chase (Cartographer)",0003:"Karma (The Ex-Deviant)",0004:"Max Havok (Chief Enginer)",0005:"Solaar (Archbishop)",0006:"Mr Bodybolt (7th Passenger)" cn Infinite Max\999 Lives 810C8CF8 03E8 cn Infinite Max\Health 800C8AD9 0066 cn Infinite Max\Light Ammo 800C8CAB 0066 cn Infinite Max\Fire Ammo 800C8CB3 0066 cn Infinite Max\Ionic Ammo 800C8CBB 0066 cn Infinite Max\Fusion Ammo 800C8CC3 0066 cn Infinite Max\Mana 800C8CFF 0066 cn Have\All Magic 800CEB48 0010 800CEB4D 0000 800CEB57 0001 800CEB61 0002 800CEB6B 0003 800CEB75 0005 800CEB7F 0006 800CEB89 0008 800CEB93 0009 800CEB9D 000B 800CEBA7 000E 800CEBB1 000F 800CEBBB 0010 800CEBC5 0011 800CEBCF 000A 800CEBD9 000C 800CEBE3 000D cn Have\Magic On Level 4 810C8CDD FFFF 810C8CDE FFFF 810C8CDF FFFF 810C8CE0 FFFF 810C8CE1 FFFF 810C8CE2 FFFF cn Have\Weapons On Max Upgrade 800C8CAC 0009 800C8CB4 0009 800C8CBC 0009 800C8CC4 0009 cn Have\Max Armour Level 800C8D00 0064 cn Have\Max Spirit Level 800C8D04 0064 cn Have\Max Weapon Level 800C8D02 0064 cn Have\Max Experience Level 800C8CFC 00FF cn Infinite Air Under Water 800C8BE4 0069 cn Press A For Bionic Jump cd This will make you jump to a great height D00C8BCA 0080 810C8AE8 ???? 0250:"Medium Jump",0800:"Max Jump" crc 812289D0-C2E53296-C:50 gn Off Road Challenge (E) cn 1 Player\Always Place 1st 80103CD7 0000 cn Multi and 1 Player\Infinite Gent Turbos\Player 1 cd Can be used in 1 Player and Multiplayer Modes for Player 1 81103F3A 02F4 cn 1 Player\Max\Acceleration 8012C51F 000A cn 1 Player\Max\Shocks 8012C527 000A cn 1 Player\Max\Speed 8012C523 000A cn 1 Player\Max\Tires 8012C52B 000A cn Multi and 1 Player\Max Crash Helmets\Player 1 cd Can be used in 1 Player and Multiplayer Modes for Player 1 80103F33 0064 cn Multi and 1 Player\Infinite Gent Turbos\Player 2 cd Multiplayer Mode Only for Player 2 8110422E 02F4 cn Multi and 1 Player\Max Crash Helmets\Player 2 cd Multiplayer Mode Only for Player 2 80104227 0064 crc D5898CAF-6007B65B-C:50 gn OPERATION WINBACK cn Infinite\Health 80179F8B 0064 cn Infinite\Ammo and No Reloads 80157C9B 0078 80157C94 0078 80157C90 0063 80179F6F 001E 80157C91 0063 80179F83 0008 cn C4 Explosives cd Slot 1 80157C93 0001 cn Flash Light cd Slot 2 80157C95 0001 cn C4 Detector cd Slot 3 80157C98 0001 cn Key cd Slot 2 80157C99 0001 cn Card Key cd Slot 3 80157C9A 0001 cn Max Power Mode 8015C8E7 0001 cn All Multiplayer Characters 8015C8E1 000F 8015C8E2 00FF 8015C8E3 00FF cn Walk Through Walls/Objects cd Press Z Button And Joystick Forward Dont Stand Too Close To Wall/Object D0139BC4 0020 8117964C 43C7 cn Weapon modifier 80179F78 ???? 0000:"Handgun",0001:"Submachine gun",0002:"Shotgun",0003:"Rocket launcher",0014:"Handgun w/ silencer" cn Sudden death & trial modes unlocked 8015C8E0 00A0 cn Time is always 00:20:38 8010D342 0078 crc AC976B38-C3A9C97A-C:50 gn Paperboy 64 (E) cn Level Select cd Also accesses All Bonus Levels 8006A6A7 0001 cn Invincibility 81268D1A 0001 cn Infinite Newspapers 81268D12 0001 cn Big Newspapers 81268D5A 0001 cn Throw Newspapers Forwards 81268D46 0001 cn Throw Newspapers Backwards 81268D4A 0001 cn Turbo Mode 81268D36 0001 cn Super Jump Springs 81268D3A 0001 cn Rocket Boosters 81268D3E 0001 cn 99 Total Houses 8106A61A 0063 crc 19AB29AF-C71BCD28-C:50 gn PAPER MARIO cn Infinite & Max HP + FP cd Do not enable this code before you have made a save, when a new game is started up. 50000601 0000 8010DD91 0063 cn Access\All Star Spirits cd Disable this code as soon as you have reached level 8, or everything will be removed again 8110E01E 0007 cn Access\Max Star Energy 8010E01E 0007 cn Access\Infinite Star Spirits 8010E020 0007 cn Access\Infinite Coins 8110DD9C 03E7 cn Access\Max Star Points cd You will level up, everytime you get a Star point 8010DDA0 0063 cn Access\Max Star Pieces 8010DD9F 0063 cn Access\Max Badge Points 8010DD98 ???? 003C:"60 Badge Points",007F:"127 Badge Points" cn Access\Level 99 8010DD99 0063 cn Access\all members in your party 50000C08 0000 8010DDAC 0001 cn Access\Ultra Rank cd This will give you Goombario,Kooper,Bombette,Parakarry,Bow Watt, Sushie & Lakilester 50000C08 0000 8010DDAD 0002 50000C08 0000 8010DDED 0002 cn Press L Button For Moon Jump D0071337 0020 8010DAF4 0043 crc C83CEB83-FDC56219-C:50 gn Penny Racers (E) cn Super Speed cd This is Turbo fast,So to slow it down a little more keep the B button pressed down 81228FA8 4800 cn Always 1st 8022CC16 0001 cn Class Select cd This code is useful because you can play Class AA without having to beat a level!& then once any edit is done while the game is running 8021C297 ???? 0000:"Class C",0001:"Class B",0003:"Class AA",0004:"1 Play",0005:"2 Play",0006:"3 Play",0007:"4 Play" crc E4B08007-A602FF33-C:50 gn Perfect Dark (E) cn Have All\Weapons\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 802037F0 0007 801EA7F0 0007 801D17F0 0007 cn Infinite\Ammo\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 80202F7F 00FF 801E9F7F 00FF 801D0F7F 00FF 802027DB 00FF 801E97DB 00FF 801D07DB 00FF cn Infinite\Health\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 8120205C 3F80 811E905C 3F80 811D005C 3F80 cn Infinite\Shield\Player 1 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 81202070 3F80 811E9070 3F80 811D0070 3F80 cn Have All\Weapons\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 80205460 0007 801EC460 0007 801D3460 0007 cn Infinite\Ammo\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 80204BEF 00FF 801EBBEF 00FF 801D2BEF 00FF 8020444B 00FF 801EB44B 00FF 801D244B 00FF cn Infinite\Health\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 81203CCC 3F80 811EACCC 3F80 811D1CCC 3F80 cn Infinite\Shield\Player 2 cd This code is for all Low/High Res Solo & Multi-Player Level ;) Enjoy 81203CE0 3F80 811EACE0 3F80 811D1CE0 3F80 cn Have All\Levels Complete & All Challenges cd Have all levels Complete on Solo Missions, & Acces all Challenges & CO-OP Levels 50003C02 0000 800A27C1 0001 50001E1A 0000 80088A0D 0001 50001E1A 0000 80088A0E 0001 50001E1A 0000 80088A0F 0001 50001E1A 0000 80088A10 0001 cn Carrington Institute\Have 999 points in Firing Range 810AD712 03E7 cn Carrington Institute\Have Infinite time in Firing Range 810AD70E 004D cn Carrington Institute\Have 255 targets destroyed 810AD714 00FF cn Single & Co-Op\Press B To Levitate\Player 1 cd To activate the moon jump you must Hold B while in the air. You can get in the air by going down steps, or hills or by going off the edge of something D00980C4 0040 81202000 40F2 D00980C4 0040 80201FB3 0000 D00980C4 0040 811E9000 40F2 D00980C4 0040 801E8FB3 0000 D00980C4 0040 811D0000 40F2 D00980C4 0040 801CFFB3 0000 crc 1AA05AD5-46F52D80-C:50 gn Pilot Wings64 cn Infinite Fuel\Gyrocopter 80366989 0081 cn Infinite Fuel\Rocket Belt 803669A9 0081 cn Time Always 00'00'10 cd This Cheat code is for All Events 803668B8 0001 cn Choose Vehicle cd Make your Choice & then Press GS To Activate,But do not use with any other Press GS Cheat Codes. 88366807 ???? 0000:"Hang Glider",0001:"Rocket Belt",0002:"Gyrocopter",0003:"Cannonball",0004:"Skydiving",0005:"Jumble Hopper",0006:"Birdman" cn [Perfect Score] (All Class & Level's) cd To make these codes save to Game-Pak; just pick a level and lose, choose Next then Quit. Enable Disable Perfect Score then save and disable before using the Extra Games Perfect Score Cheat. 50000330 0000 803683ED 0064 50000330 0000 80368A81 0064 50000330 0000 80368BD1 0064 50000330 0000 80369115 0064 50000330 0000 80369265 0064 50000330 0000 803693B5 0064 50000330 0000 803697A9 0064 50000330 0000 803698F9 0064 50000330 0000 80369A49 0064 cn Infinite Photos 813545EE 0000 cn [Perfect Score] Extra Games (All Class & Level's) cd To make these codes save to Game-Pak; just pick a level and lose, choose Next then Quit. Enable Disable Perfect Score then save and disable before using the Extra Games Perfect Score Cheat. 8036847D 0019 803685CD 0019 8036871D 0019 8036886D 0019 803684AD 0064 803684DD 0064 80368B11 0019 80368C61 0019 80368DB1 0019 80368F01 0019 80368B41 0064 80368B71 0064 803691A5 0019 803692F5 0019 80369445 0019 80369595 0019 803691D5 0064 80369205 0064 cn Music Volume Select 80250FA4 ???? 0000:"No Music",003F:"Default Volume",0080:"Max Volume" crc 4FF5976F-ACF559D8-C:50 gn POKEMON SNAP cn [Enable All Levels] cd This is needed to be able to Play all Levels of the Game 810C2712 0006 crc 84077275-57315B9C-C:50 gn Pokemon Stadium (E) cn Infinite Health\Stadium\Free Battle 80287D79 0064 cn Infinite Health\Stadium\Poke Cup 80285399 0064 cn Infinite Health\Stadium\Pica Cup 80284659 0064 cn Infinite Health\Stadium\Prime Cup 80285FE9 0064 cn Infinite Health\Stadium\Petit Cup 80286C29 0064 cn Infinite Health\Stadium\Mewto 802825B9 0064 cn Gym Leader Castle\Elite Four & Rival 80286859 00A1 cn Gym Leader Castle\Brock 80287539 00A1 cn Gym Leader Castle\Misty 80287E79 00A1 cn Gym Leader Castle\Surge 80286BD9 00A1 cn Gym Leader Castle\Erika 80286BA9 00A1 cn Gym Leader Castle\Koga 80287519 00A1 cn Gym Leader Castle\Sabrina 802870A9 00A1 cn Gym Leader Castle\Blaine 80286B69 00A1 cn Gym Leader Castle\Giovani 80287169 00A1 cn Infinite Health\Player 1 810AE686 03E7 810AE6AA 03E7 810AE6DA 03E7 810AE6FE 03E7 cn All Pokemon Level 100\Player 1 50000654 0000 800AE654 0064 cn Infinite Attacks All Pokemon\Player 1 50000654 0000 810AE650 6363 50000654 0000 810AE652 6363 cn Infinite Attacks All Pokemon\Player 2 50000654 0000 810AE86C FFFF 50000654 0000 810AE86E FFFF cn Infinite Attacks All Pokemon\Player 3 50000654 0000 810AE86C FFFF 50000654 0000 810AE86E FFFF cn Infinite Attacks All Pokemon\Player 4 50000654 0000 810AEA88 FFFF 50000654 0000 810AEA8A FFFF cn Game Difficulty D312FC40 FD70 D312FC40 A528 8112FC40 ???? 0000:"Hard",0001:"Normal",0002:"Easy",000F:"Extra Hard" cn Catch\Mew on GB Tower 80171E17 0015 cn Catch\Mewtwo on GB Tower 80171E17 0083 cn Infinite coins for coin case 801723E3 0099 cn Infinite cash 81172186 9999 cn Pokemon beach stop code D00488A1 0020 80202BB5 0001 cn Clefairy Says\Infinite Health\Player 1 8118F438 0064 cn Clefairy Says\Extended Life Bar\Player 1 8118F43A 0049 cn Clefairy Says\Infinite Health\Player 2 8118F5F8 0064 cn Clefairy Says\Extended Life Bar\Player 2 8118F5FA 0049 cn Clefairy Says\Infinite Health\Player 3 8118F7B8 0064 cn Clefairy Says\Extended Life Bar\Player 3 8118F7BA 0049 cn Clefairy Says\Infinite Health\Player 4 8118F978 0064 cn Clefairy Says\Extended Life Bar\Player 4 8118F97A 0049 cn Rock Harden\Infinite Armour\Player 1 81193B78 0190 cn Rock Harden\Infinite Armour\Player 2 81193E2C 0190 cn Rock Harden\Infinite Armour\Player 3 811940E0 0190 cn Rock Harden\Infinite Armour\Player 4 81194394 0190 cn Infinite Health against Mew Two 810AE632 FFFF 812823E8 FFFF cn All Pokmon Have Max Hp 81285AE8 0096 crc 2952369C-B6E4C3A8-C:50 gn Pokemon Stadium 2 (E) cn Infinite Health Stadium & Gym Leader Castle 801DD22D 0030 cn Mini Games\Player 1\Gutsy Golbat has 99 Hearts D017711F 0001 8017711F 0063 cn Mini Games\Player 2\Gutsy Golbat has 99 hearts D017714B 0001 8017714B 0063 cn Mini Games\Player 3\Gutsy Golbat has 99 hearts D0177177 0001 80177177 0063 cn Mini Games\Player 4\Gutsy Golbat has 99 hearts D01771A3 0001 801771A3 0063 cn Mini Games\Player 1\Clear Cut Challenge gets perfect score 801744C3 0063 cn Mini Games\Player 1\Topsy Turvy cd Immediatly wins D01769E7 0001 801769E7 0005 cn Mini Games\Player 1\Egg Emergency perfect score 80191C3F 0064 cn Mini Games\Player 1\Furret Frolic Perfect Score 801E9623 0063 cn Mini Games\Player 1\Streaming Stampede Perfect Score 8018138B 0063 cn Mini Games\Player 1\Delibird Delivery Perfect Score 801AC2CC 0063 cn Mini Games\Player 1\Roll Out Rampage Always in 1st Place 80103179 0001 crc 16931D74-65DC6D34-C:50 gn Quake 64 (E) cn Infinite\Ammo 50000402 0000 8016426D 0064 50000402 0000 8116426C 03E7 cn Have\All Weapons 8016422B 007F cn Debug Mode 8006C4E3 0001 cn Have\All Keys 80164229 000F cn Infinite\Armor 81164184 42C8 cn Infinite\Health 81164170 42C8 cn Infinite\Bio Suit 811641C0 42C8 cn Have\Quad Damage 811641BC 42C8 cn Have\Ring of Shadows 81164228 ???? 42C8:"On",0000:"Off" cn Rapid Fire D00CB220 0020 801641AD 0001 cn Multi\Infinite Health\Player 1 81166AD0 42C8 cn Multi\Infinite Armor\Player 1 81166AE4 42C8 cn Multi\Infinite Bio Suit\Player 1 81166B20 42C8 cn Multi\Have All Weapons\Player 1 80166B8B 007F cn Multi\Infinite Ammo\Player 1 50000402 0000 81166BCC 03E7 cn Multi\Infinite Health\Player 2 81166DA0 42C8 cn Multi\Infinite Armor\Player 2 81166DB4 42C8 cn Multi\Infinite Bio Suit\Player 2 81166DF0 42C8 cn Multi\Have All Weapons\Player 2 80166E5B 007F cn Multi\Infinite Ammo\Player 2 50000402 0000 81166E9C 03E7 crc 7433D9D7-2C4322D0-C:50 gn QUAKE II cn Invincible 8002E618 0000 cn Status Bar Always On 8008E4CF 0001 cn Have All Weapons and Infinite Max Ammo\Level 01 50000904 0000 802A46AB 0001 50000604 0000 812A46CE 02F4 cn Have All Weapons and Infinite Max Ammo\Level 02 50000904 0000 8028A47B 0001 50000604 0000 8128A49E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 03 50000904 0000 8027223B 0001 50000604 0000 8127225E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 04 50000904 0000 8026A70B 0001 50000604 0000 8126A72E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 05 50000904 0000 8028812B 0001 50000604 0000 8128814E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 06 50000904 0000 8027DA0B 0001 50000604 0000 8127DA2E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 07 50000904 0000 802811CB 0001 50000604 0000 812811EE 02F4 cn Have All Weapons and Infinite Max Ammo\Level 08 50000904 0000 8027C45B 0001 50000604 0000 8127C47E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 09 50000904 0000 80247C7B 0001 50000604 0000 81247C9E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 10 50000904 0000 80276C4B 0001 50000604 0000 81276C6E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 11 50000904 0000 80278AFB 0001 50000604 0000 81278B1E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 12 50000904 0000 8028F69B 0001 50000604 0000 8128F6BE 02F4 cn Have All Weapons and Infinite Max Ammo\Level 13 50000904 0000 80278A4B 0001 50000604 0000 81278A6E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 14 50000904 0000 802807DB 0001 50000604 0000 812807FE 02F4 cn Have All Weapons and Infinite Max Ammo\Level 15 50000904 0000 8027636B 0001 50000604 0000 8127638E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 16 50000904 0000 8028B7FB 0001 50000604 0000 8128B81E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 17 50000904 0000 8027278B 0001 50000604 0000 812727AE 02F4 cn Have All Weapons and Infinite Max Ammo\Level 18 50000904 0000 8026594B 0001 50000604 0000 8126596E 02F4 cn Have All Weapons and Infinite Max Ammo\Level 19 50000904 0000 8024A28B 0001 50000604 0000 8124A2AE 02F4 crc 9B500E8E-E90550B3-C:50 gn Resident Evil 2 (E) cn Infinite Health 810DDE22 00C8 cn Condition Always Fine 810DDEE4 0000 cn Infinite Time 800E57BF 0010 cn Access ChestAnywhere cd Press L Button + Start D1014FA4 0020 81122598 0100 cn Access Quick Save cd Press Z Button + B Button D1014FA4 6000 810E5428 8007 D1014FA4 6000 810E542A 0E30 cn Access All Items Chest cd Disable After First Save 50003504 0100 810E59F4 2FFE cn Infinite Ammo 811224AE 03E7 cn Access Ink Ribbons cd Disable After First Save 810E59C8 1EFF cn Access Weapons\Grenadelauncher & Acid Rounds cd Disable After First Save 810E59CC 0BFF cn Access Weapons\Bow Gun cd Disable After First Save 810E59D0 0CFF cn Access Weapons\Rocket Launcher cd Disable After First Save 810E59D4 11FF cn Access Weapons\Gatling Gun cd Disable After First Save 810E59D8 12FF cn Number Of Saves Will Always Be 0 810E5650 0000 cn Have 2 Extra Slots In Inventory D10E584E 0000 810E584E 0001 cn Play As 810DDC38 ???? 0080:"Leon Original",0180:"Claire Original",0280:"Leon Original",0380:"Claire Original",0480:"Leon Wounded",0580:"Claire without jacket",0680:"Leon Wounded",0780:"Claire without jacket",0880:"Leon as Stars",0980:"Claire as Biker",0A80:"Leon as Biker",0B80:"Claires body Leons outfit",0C80:"Hunk (can crash the game)",0D80:"To Fu",0E80:"Ada (can crash the game)",0F80:"Cheryl" cn Play Extra Mission 810DDBEE ???? 0048:"The 4th Survior",0049:"To-Fu" cn Max Item Modifier\Slot 01 800E59C8 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E59C9 00FF cn Max Item Modifier\Slot 02 800E59CC ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E59CD 00FF cn Max Item Modifier\Slot 03 800E59D0 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E59D1 00FF cn Max Item Modifier\Slot 04 800E59D4 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E59D5 00FF cn Max Item Modifier\Slot 05 800E59D8 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E59D9 00FF cn Max Item Modifier\Slot 06 800E59DC ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E59DD 00FF cn Max Item Modifier\Slot 07 800E59E0 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E59E1 00FF cn Max Item Modifier\Slot 08 800E59E4 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E59E5 00FF cn Max Item Modifier\Slot 09 800E59E8 ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E59E9 00FF cn Max Item Modifier\Slot 10 800E59EC ???? 0000:"Nothing",0001:"Knife Hunk",0002:"Handgun Hunk",0003:"Handgun Different Ada",0004:"Custom Handgun Hunk",0005:"Magnum Hunk",0006:"Custom Magnum Hunk",0007:"Shotgun Hunk",0008:"Custom Shotgun Hunk",0009:"Grenade Launcher Claire",000A:"Grenade Launcher (Flame Rounds) Claire",000B:"Grenade Launcher (Acid Rounds) Claire",000C:"Bowgun Claire",000D:"Colt S.A.A. Claire",000E:"Spark Shot Claire",000F:"Sub Machine Gun Leon",0010:"Flamethrower Leon",0011:"Rocket Launcher Claire",0012:"Gatling Gun Claire",0013:"Machine Gun ???",0014:"Handgun Bullets",0015:"Shotgun Shells",0016:"Magnum Bullets",0017:"Fuel",0018:"Grenade Rounds",0019:"Flame Rounds",001A:"Acid Rounds",001B:"Machine Gun Bullets",001C:"S. Shot Bullets",001D:"Bow Gun Bolts",001E:"Ink Ribbon",001F:"Small Key",0020:"Hand Gun Parts",0021:"Magnum Parts",0022:"Shotgun Parts",0023:"First Aid Spray",0024:"Chemical FR-W09",0025:"Chemical AC-W24",0026:"Green Herb",0027:"Red Herb",0028:"Blue Herb",0029:"Mixed Herb (Green)",002A:"Mixed Herb (Red&Green)",002B:"Mixed Herb (Blue&Green)",002C:"Mixed Herb (?)",002D:"Mixed Herb (?)",002E:"Mixed Herb (?)",002F:"Lighter",0030:"Lock Pick",0031:"Picture",0032:"Valve Handle",0033:"Red Jewel",0034:"Red Card Key",0035:"Blue Card Key",0036:"Serpent Stone",0037:"Jaguar Stone",0038:"Blue Stone",0039:"Blue Stone (?)",003A:"Eagle Stone",003B:"Bishop Plug",003C:"Rook Plug",003D:"Knight Plug",003E:"King Plug",003F:"W. Box Key",0040:"Detonator",0041:"Plastic Bomb",0042:"Bomb&Detonator",0043:"Crank",0044:"Film",0045:"Film (?)",0046:"Film (?)",0047:"Unicorn Medal",0048:"Eagle Medal",0049:"Wolf Medal",004A:"G. Cogwheel",004B:"Manhole Opener",004C:"Main Fuse",004D:"Fuse Case",004E:"Vaccine",004F:"Vaccine Cart.",0050:"Film",0051:"Base Vaccine",0052:"G-Virus",0053:"Special Key",0054:"Joint S Plug",0055:"Joint N Plug",0056:"Cord",0057:"Film",0058:"Cabin Key",0059:"Precinct Key (blue)",005A:"Precinct Key (red)",005B:"Precinct Key (?)",005C:"Precinct Key (green)",005D:"C. Panel Key (red)",005E:"C. Panel Key (yellow)",005F:"P. Room Key",0060:"MO Disk",0061:"Lab Card Key",0062:"Master Key",0063:"Platform Key",0064:"No Item",0065:"No Item",0066:"No Item",0067:"No Item",0068:"Chris's Diary",0069:"Mail to Chris",006A:"Memo to Leon",006B:"Police Memorandum",006C:"Operation Report 1",006D:"Mail to the Chief",006E:"Mail to the Chief (?)",006F:"Secretary's Diary A",0070:"Secretary's Diary B",0071:"Operation Report 2",0072:"User Registration",0073:"Film A",0074:"Film B",0075:"Film C",0076:"Patrol Report",0077:"Watchman's Diary",0078:"Chief's Diary",0079:"Sewer Manager Diary",007A:"Sewer Manager Fax",007B:"Film D",007C:"Vaccine Synthesis",007D:"Lab Security Manual",007E:"P-Epsilon Report",007F:"Rookie Files",0080:"Rookie Files (?)",0081:"No Item",0082:"Spade Key",0083:"Diamond Key",0084:"Desk Key",0085:"Heart Key",0086:"Club Key",0087:"Virgin Heart",0088:"Square Crank",0089:"Down Key",008A:"Up Key",008B:"Locker Key" 800E59ED 00FF crc C3E7E29E-5D7251CC-C:50 gn Re-Volt (E) cn Access All\Cars & Tracks 8104ADF6 0001 cn Access All\Cups 5000032C 0000 8105444A 00FF cn Always 1st 811157AE 0001 811157B6 0000 8110C33E 02F4 cn Infinite Continues 8110C332 0006 cn Drones Have No Weapons 8111CECE 0000 cn Infinite Weapons\Player 1 81115798 0000 8111579A ???? 0000:"Green Missile",0001:"Orange Missile",0002:"Multi-Orange Missiles",0003:"The Bomb",0004:"Water Balloon",0005:"Blue Protector",0006:"Oil Slick",0007:"Bowling Ball Mine",0008:"Yellow Protector",0009:"Lightning Bolt",000A:"Orange Star",000B:"Beach Ball" 8111579E 0001 cn Laps To Race 8107DD1E ???? 0001:"1 Lap",0002:"2 laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" cn Number Of Drones In The Race 8110FFF6 ???? 0001:"1 Drone",0002:"2 Drones",0003:"3 Drones",0004:"4 Drones",0005:"5 Drones",0006:"6 Drones",0007:"7 Drones",0008:"8 Drones",0009:"9 Drones" cn 99 Points Player 1 8010C33F 0063 cn Infinite Weapons\Player 2 81117C60 0000 81117C62 ???? 0000:"Green Missile",0001:"Orange Missile",0002:"Multi-Orange Missiles",0003:"The Bomb",0004:"Water Balloon",0005:"Blue Protector",0006:"Oil Slick",0007:"Bowling Ball Mine",0008:"Yellow Protector",0009:"Lightning Bolt",000A:"Orange Star",000B:"Beach Ball" 81117C66 0001 cn Infinite Weapons\Player 3 8111A128 0000 8111A12A ???? 0000:"Green Missile",0001:"Orange Missile",0002:"Multi-Orange Missiles",0003:"The Bomb",0004:"Water Balloon",0005:"Blue Protector",0006:"Oil Slick",0007:"Bowling Ball Mine",0008:"Yellow Protector",0009:"Lightning Bolt",000A:"Orange Star",000B:"Beach Ball" 8111A12E 0001 cn Infinite Weapons\Player 4 8111C5F0 0000 8111C5F2 ???? 0000:"Green Missile",0001:"Orange Missile",0002:"Multi-Orange Missiles",0003:"The Bomb",0004:"Water Balloon",0005:"Blue Protector",0006:"Oil Slick",0007:"Bowling Ball Mine",0008:"Yellow Protector",0009:"Lightning Bolt",000A:"Orange Star",000B:"Beach Ball" 8111C5F6 0001 crc 02D8366A-6CABEF9C-C:50 gn Road Rash 64 (E) cn Always 1st 810D7D96 0000 cn Max Cash 810D6FBA FFFF cn Access All Bikes & Tracks 810A7D16 0063 cn Access All Weapons For All Modes 50000E02 0000 811B9EFA 0505 cn Infinite Damage 801C1257 0002 cn Infinite Health\To Bike 811B9BB8 4270 cn Infinite Health\To Character 811C0F90 4489 cn No Music In Game 810D61AE 0000 cn No Music Elsewhere 810D61AA 0000 crc 74E87A70-6293AED4-C:50 gn ROADSTERS TROPHY cn Always 1st 800C1F81 0001 cn Laps To Race 800A4649 ???? 0001:"1 Lap",0002:"2 laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" cn Access All Trophies cd Also gives you all extra features in quick race & Trophy mode 800BAA9B 0007 800BACAF 0007 cn Max Race Points 800BACBE 00FF cn Have Lots Of Seasons 810BACAA 02F4 cn Max Cash 810BACA4 3AFF 810BACA6 F3FA cn Cheats Enabled Modifier 8108F8F0 ???? 0004:"Fast Bucks (You Get 250",0008:"Easy Money (You Get 1",0010:"Trophies (Second And Third Championships Wins)",0020:"Smurfing (High Pitched Voices)",0040:"Big Wheels (Big Foot Cars)",0080:"Skywalker (Hover Cars)",0100:"Car Radio (Remote Control Cars)",0200:"Chopper (Top Down View)",0400:"Anyway (Race Circuits Backwards)",0800:"Extra Resolution (Able To Change Resolution In Options Screen)" cn Easy Win cd Right After Start,Go, Quit Race, And you Have Won 800BACAD 000A cn All Cars\Max Upgrade 5000220C 0200 810BAD56 0270 cn All Cars\Infinite Supply Of Super Tires 5000220C 0000 810BAD58 0F0F 5000220C 0000 810BAD5A 0F0F cn Special Category A Car\Mind Star 600 810BAE8E 3D70 810BAE90 0F0F 810BAE92 0F0F cn Special Category B Car\Vertige Stallion 810BAE16 2378 810BAE18 0F0F 810BAE1A 0F0F cn Special Category C Car\Mind Star 200R 810BAD86 0A78 810BAD88 0F0F 810BAD8A 0F0F cn Race Direction Options 810A4600 ???? 0000:"Normal",0001:"Reverse",0002:"Mirrored Normal",0003:"Mirrored Reverse" cn View Select cd Select your View and then at start of Race press C-Up Button D00C2171 0000 800C2171 ???? 0000:"Inside Car",0001:"Behind View",0002:"Further Behind View",000B:"Distant Behind View",00FF:"Helicopter View" cn Track Select 8008FA5D ???? 0000:"Rocket Base",0001:"Temple",0002:"Ski Resort",0003:"Lumber Mill",0004:"Area 51",0005:"Oilfields",0006:"Tudor Village",0007:"Chateau",0008:"Docklands",0009:"Titus Park" crc 9FF69D4F-195F0059-C:50 gn Robotron 64 (E) cn Infinite Lives 8109B0EE 03E7 810AD24E 03E7 cn Level select cd Set Up In Menu 81076FB6 6F74 cn Fast Run 8009B14F 0003 cn Rapid fire 8009B15F 0003 cn Easy Difficulty level 800AD243 0000 cn Speed level 1 Slow 800AD247 0000 crc 9FD375F8-45F32DC8-C:50 gn Rocket - Robot on Wheels (E) cn Infinite & Max Health 8109FB82 000C 8109FB84 000A cn Activate All In-Game Cheats cd With this code on, all rocket's abilities are now max 810A6846 F5FF cn Access All Ticket Switches & Vehicles 800A5E1F 0001 50002004 0000 810A5D70 FFFF crc 60D5E10B-8BEDED46-C:50 gn Rayman2 The Great Escape (E) cn Infinite\Max Health 811BC54C 001E cn Infinite\Oxygen 810F4A80 4396 cn Open Options\levels & Map 50000801 0000 801F1101 00FF cn Open Options\Open all cages 801F1032 0050 50000602 0000 811F10E0 FFFF cn Have All\Yellow Lums 50006401 0000 800C6FF8 00FF 50001901 0000 800C6FAD 00FF 811F1072 0005 50005702 0000 811F1078 FFFF cn Have All\Crates 810C6FE8 7FFF 50000602 0000 810C6FEA FFFF 800C6FF2 00FF cn All Masks cd Press GS To Activate All Masks 891F1110 8780 crc 8BD4A334-1E138B05-C:50 gn Ready 2 Rumble Boxing (E) cn Infinite\Health 810D8E8A ???? 810E6522 ???? 0064:"Infinite",0000:"No Health" cn Infinite\Stamina 810D8E8E ???? 810E6526 ???? 0064:"Infinite",0000:"No Stamina" cn Have Max Rumble 810D8E96 ???? 810E61B8 ???? 0030:"Max",0000:"Never Rumble" cn Infinite\Cash 810EB852 FC9A cn Infinite\Time 810E6486 0E10 crc FEE97010-4E94A9A0-C:50 gn RR64 - Ridge Racer 64 (E) cn Always 1st 810569B4 0001 cn Infinite Time 811280B2 0C00 cn Freeze Lap Timer cd Select Car Attack, And You'll Have All The Cars At Your Disposal For A Quick Spin !! 810569DE 014D cn Access All\Cars,Tracks & Golg Trophies 50000402 0000 81043AA0 FFFF cn Access All\Platinum Trophies 8102F70C FFFF 8102F70E FFFF cn Ultra 64 cd Pick any car, beat stage 8: RR Extreme Extra and the UFO car is yours to drive! 8113DDBA 0018 cn Access\Galage '88 UFO Car 810E2C20 0028 cn Easy Win 810569BA 0007 cn Easy Mode 81057B10 0001 cn Freeze Lap Timer 810569DE 014D 810569CA 00C7 810569CE 00C7 810569EA 014D 810569EE 014D 810569F2 014D cn Always Engine Class S 81043AB0 0000 cn Laps to Race cd Here you can choose how many laps are in the race, 1-9. Do not use with Option 7-9. 8111CA16 ???? 0001:"1 Lap to Race",0002:"2 Laps to Race",0003:"3 Laps to Race",0004:"4 Laps to Race",0005:"5 Laps to Race",0006:"6 Laps to Race",0007:"7 Laps to Race",0008:"8 Laps to Race",0009:"9 Laps to Race" crc 4D3ADFDA-7598FCAE-C:50 gn Rugrats - Treasure Hunt (E) cn Infinite Energy\Player 1 80254A76 001E 8025CCF6 001E cn Infinite Energy\Player 2 80257B86 001E 80260846 001E cn Infinite Energy\Player 3 8025ACA6 001E 802637A6 001E cn Infinite Energy\Player 4 8025E0E6 001E 80266B76 001E crc 0AC61D39-ABFA03A6-C:50 gn Rugrats in Paris - The Movie (E) cn Tickets\Red 8111F8C6 FFFF cn Tickets\Gold 8111F8C8 FFFF cn Access all items In Inventory 8111F8BE 1FFF crc 67D21868-C5424061-C:50 gn Rakuga Kids (E) cn Infinite Energy\Player 1 800ACB89 ???? 0000:"None",0040:"Max" cn Infinite Energy\Player 2 800ACC79 ???? 0000:"None",003F:"Max" cn Super Attacks\Player 1 800ACB8D ???? 0000:"None",0003:"3" cn Super Attacks\Player 2 800ACC7D ???? 0000:"None",0003:"3" cn Infinite Match Time 800ABC33 0000 cn Unlock Extras 800ACD55 00FF 800ACD57 00FF crc 918E2D60-F865683E-C:50 gn S.C.A.R.S. (E) cn Always 1st 813E00E8 0001 cn Access\All Cups 50000302 0000 812CB7C8 0001 cn Access\All Challenges 50000502 0000 813DD428 0001 cn Access\All Cars 50000402 0000 813DFC6A 0001 cn Infinite\Turbo's 8039B464 0000 8039B467 0000 8039B469 0009 cn Infinite\Magnet's 8039B464 0001 8039B467 0001 8039B469 0009 cn Infinite\Stinger's 8039B464 0003 8039B467 0003 8039B469 0009 cn Infinite\Boomerang's 8039B464 0004 8039B467 0004 8039B469 0009 cn Infinite\Seeker's 8039B464 0005 8039B467 0005 8039B469 0009 cn Infinite\Stopper's 8039B464 0006 8039B467 0006 8039B469 0009 cn Infinite\Bullet's 8039B464 0007 8039B467 0007 8039B469 0009 cn Infinite\Shield's 8039B464 0008 8039B467 0008 8039B469 0009 cn Laps To Race 813BBD5C ???? 0001:"1 Lap",0002:"2 laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" cn Infinite\CREDITS 80388F3D 0003 cn Psycho Weapons 8039B469 0003 802B85A3 0003 crc 61D116B0-FA24D60C-C:50 gn San Francisco Rush - Extreme Racing (E) cn Always 1st 80101409 0000 cn Max Race Points 810DACCA 02F4 cn Laps To Race 800E7411 ???? 0001:"1 Lap",0002:"2 laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" cn Gravity Modifier 800F3E61 ???? 0000:"Ballon & Two Weights",0001:"One Weight",0002:"Two Weights" cn No\Car Collisions 800F4120 0001 cn No\Auto Abort 800F4140 0001 cn Resurrect In Place 800F4150 0001 cn Stop Timer 800F4160 0001 cn Big Front Wheels 800DA02C 0002 cn Big Back Wheels 800DA03C 0002 cn Difficulty Very Easy 810D9F7A 0002 cn Automatic Transmission 800C8100 0001 cn Access The Rock Alcatraz bonus level cd Press C-right, on any level, at the track selection screen D00F4174 0002 80100120 0006 cn All\Keys & Cars 50000E16 0000 810CAD52 FFFF cn All\Keys & Cars Circuits 8105696E FFFF 8105699A FFFF 50000404 0000 81056910 FFFF crc B7CF2136-FA0AA715-C:50 gn San Francisco Rush 2 - Extreme Racing USA (E) cn Always 1st 80115499 0000 cn Max Points In Total 810E235A 03E7 cn Laps To Race 811088D0 ???? 0001:"1 Lap",0002:"2 laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" cn Number Of Drones In Race 810E1B88 ???? 0001:"1 Drone",0002:"2 Drones",0003:"3 Drones",0004:"4 Drones",0005:"5 Drones",0006:"6 Drones",0007:"7 Drones",0008:"8 Drones",0009:"9 Drones" cn Best Stunt Points cd On Track 8110B438 02F4 cn Max & Best Score cd On Stunt Track 50000502 0000 810C4702 FFFF cn All Keys,Cars & Cans 50000E02 0000 810C4574 FFFF cn Access All In-Game Cheats cd In Set-Up Menu 810C48F8 0100 cn Activate All In-Game Cheats 50000E02 0000 810C48A4 FFFF cn Access Midway Track 810C4890 02F4 cn Easy Difficulty 8010FFAA 0000 cn No\Checkpoints Extended Time 8010FF47 0000 cn No\Wind 80116E98 0000 crc 51D29418-D5B46AE3-C:50 gn San Francisco Rush 2049 (E) cn Always 1st 80177D4E 0000 cn Max Race Points 8117CE22 02F4 cn Laps To Race 81177A18 ???? 0001:"1 Lap",0002:"2 laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" cn Number Of Drones In Race 81163240 ???? 0001:"1 Drone",0002:"2 Drones",0003:"3 Drones",0004:"4 Drones",0005:"5 Drones",0006:"6 Drones",0007:"7 Drones",0008:"8 Drones",0009:"9 Drones" cn Access All In-Game Cheats 81118E9A 0001 cn Activate All In-Game Cheats 50000D02 0000 81118E82 0101 cn All Silver & Gold Coins cd Single, Practice & Circuit Mode 50000660 0000 8116375C FFFF cn All Silver & Gold Coins cd Circuit Mode - Using Controller Pack 50000660 0000 811C542C FFFF cn All Silver & Gold Coins cd Stunt Mode 50000440 0000 81163BBC FFFF cn Extended Time In Battle & Stunt Mode To 2.05 Hours 811633BA 457C 811636EE 4514 cn Stunt Wings All Modes cd Where Wings Are Available Press D-Pad Up On Wing Select D017055A 0004 50000C02 0000 811139D0 0202 cn Stunt Wings Circuit Mode cd Press D-Pad Up On Wing Select D017055A 0004 50000C02 0000 801756A1 0202 cn Easy Difficulty level 80177A3C 0000 cn Max Points Stunt Mode 81177A55 3AFF 81177A57 F3FA crc E3BD221D-3C0834D3-C:50 gn Scooby-Doo - Classic Creep Capers (E) cn Have All Items\What a night for a knight 811BA010 0101 811BA012 0101 811BA014 0101 811BA016 0101 811BA018 0101 cn Infinite Courage 810BB096 0007 F107D9B0 0000 crc 60C437E5-A2251EE3-C:50 gn Shadowman (E) cn Have All\Items cd Youll not miss out any part of the game for having all parts of LEclipsers with a new game D0059047 0001 50001D20 0000 80030613 000B cn Have All\Gads & The Poign 80030E57 000F cn Have All\Levels Unlocked 5000101C 0000 80030A0E 0001 cn Have All\Cheats: Book of Shadows 81075F4E 0FFF cn Have All\Dark Souls Collected D00590B3 0001 80075F49 007C cn Infinite\Shotgun Shells 80075B2F 0063 cn Infinite\Violator Ammo 81075B32 029A cn Infinite\Cadeaux' 81075B36 029A cn Infinite\0.9mm Ammo 81075B3A 0190 cn Infinite\Max Health/Air/Shadow Charge & Voodoo Power 50000604 0000 81075B16 2710 cn Infinite\Accumulators 800306D7 0005 cn Infinite\Retractors 800308B7 0003 cn Infinite\Prisms 80030957 0003 cn Ammo always displayed on screen 50000408 0000 80075ACD 0007 cn Press L To Levitate D0059097 0020 80075578 0041 crc 5FD7CDA0-D9BB51AD-C:50 gn Snowboard Kids (E) cn Infinite Cash 8112272A 02F4 cn Access Everything cd "Have All Characters,Cups,Courses,&Boards" 810B3160 0100 810B3164 0F00 cn 1 Lap To Race D01226C8 0000 801226C8 0009 cn Infinite Tools Options 801226D5 ???? 0001:"Fan",0002:"Ghost",0003:"Pan",0004:"Rock",0005:"Mouse",0006:"Board" cn Infinite Weapons\Lucky Dip cd "Lucky Dip is Infinite Usage Of What Ever You Get From Each Red Box" 801226D4 0003 crc C2751D1A-F8C19BFF-C:50 gn Snowboard Kids 2 (E) cn Max Coins 8120639E 270F cn Access Everything\Start New Game 50000502 0002 80204F3B 0013 50000502 0002 80204F42 0009 50000402 0002 80204F43 000A 80204F4B 000D 81204F4C 0E0F 81204F4E 0101 81204F5A 0100 cn Trick Game 300 Points 812065D2 012C cn Infinite Tools Options 80206404 ???? 0001:"Frying Pan",0002:"Ghost",0003:"Super Ghost",0004:"Fan",0005:"Rocket",0006:"Invisible",0007:"Rock",0008:"Rat Face",0009:"Super Rat Face",000A:"Wings" cn Infinite Weapons Options 80206402 ???? 0001:"Slap Stick",0002:"Parachute",0003:"Freeze Shot",0004:"Snowman",0005:"Bomb",0006:"Whirlwind" 80206403 0009 cn Max Money(Story Mode) 81204EB0 0098 81204EB2 967F cn Open Extra Characters 81204F4E 0101 80204F50 0001 cn Have All Snowboards 80204F3C 0001 81204F3E 0101 81204F40 0101 crc 20B53662-7B61899F-C:50 gn South Park (E) cn Have Cheats Menu 800D77D6 01FF cn Infinite Energy 802FD209 0064 cn Infinite Credits 802FD215 0064 cn Infinite Sponge Darts 802FD223 0064 cn Infinite Suckers 802FD222 0064 cn Infinite Balls 802FD21F 0064 cn Start with 9999 Monster Score 812FD20E 270F crc 4F8AFC3A-F7912DF2-C:50 gn South Park Rally (E) cn Infinite Credits 8008D659 0005 cn Have All Tracks 8108875A FFFF cn Have All Races 81088756 FFFF cn Unlock All Characters & Extra Cheats 81088750 FFFF 81088752 FFFF crc FC70E272-08FFE7AA-C:50 gn Silicon Valley cn Great Score 813F2E22 02F4 cn Title Screen cd Press the Pause Button to takes you to Title Screen 803F6799 0000 cn Debug Mode 803F651F 0001 cn Enable Secret Mini Game 803F652D 0001 cn High Score In Evo's Escape 813E4DDA 7FFF cn 0 Enemies To Kill In Big Celebration Parade 803E4DBB 0000 cn Infinite Health\EVO 801DE085 0080 cn Always Raining 803F2E5F 0005 cn Always Snowing 803F2E5D 0005 cn Always in 2nd Camera Angle 803F2B89 0001 cn All levels open 50002001 0000 803F7ED0 0001 cn Infinite Health\2 Mouse,Hyena cd Only Use Infinite Health Codes For Animals You Need 801DFB51 0080 cn Infinite Health\Rocket Dog cd Only Use Infinite Health Codes For Animals You Need 801DEC01 0080 cn Infinite Health\King Rat cd Only Use Infinite Health Codes For Animals You Need 801E19F1 0080 cn Infinite Health\Spit Dog, Bear, King Pen, FB EVO cd Only Use Infinite Health Codes For Animals You Need 801DE459 0080 cn Infinite Health\Fox, Pen, Husky, Tortoise Tank cd Only Use Infinite Health Codes For Animals You Need 801DFF25 0080 cn Infinite Health\Bunny, Racing Turtle cd Only Use Infinite Health Codes For Animals You Need 801DF3A9 0080 cn Infinite Health\Rocket Husky cd Only Use Infinite Health Codes For Animals You Need 801E1DC5 0080 cn Infinite Health\Cool Cod cd Only Use Infinite Health Codes For Animals You Need 801E4039 0080 cn Infinite Health\Elephant cd Only Use Infinite Health Codes For Animals You Need 801DE82D 0080 cn Infinite Health\Lion, Camel cd Only Use Infinite Health Codes For Animals You Need 801E02F9 0080 cn Infinite Health\Desert Fox cd Only Use Infinite Health Codes For Animals You Need 801E161D 0080 cn Infinite Health\A. Desert Rat, Vulture, Box, Kang cd Only Use Infinite Health Codes For Animals You Need 801DEFD5 0080 cn Infinite Skill\A\Power Mouse cd Only Use Infinite Skill A Codes For Animals You Need 801DFCE4 0004 cn Infinite Skill\A\Rocket Dog cd Only Use Infinite Skill A Codes For Animals You Need 801E3A24 0004 cn Infinite Skill\A\King Rat cd Only Use Infinite Skill A Codes For Animals You Need 801E1B84 0004 cn Infinite Skill\A\King Penguin cd Only Use Infinite Skill A Codes For Animals You Need 801DE5EC 0004 cn Infinite Skill\B\Rocket Dog cd Only Use Infinite Skill B Codes For Animals You Need 801E3A28 0004 cn Infinite Skill\B\Bear cd Only Use Infinite Skill B Codes For Animals You Need 801DE5F0 0004 cn Infinite Skill\B\Power Pen, Husky, Fox, Tort Tank cd Only Use Infinite Skill B Codes For Animals You Need 801E00BC 0004 cn Infinite Skill\B\Bunny, Racing Turtle cd Only Use Infinite Skill B Codes For Animals You Need 801DF540 0004 cn Infinite Skill\B\Rocket Husky cd Only Use Infinite Skill B Codes For Animals You Need 801E1F5C 0004 cn Infinite Skill\B\Hyena cd Only Use Infinite Skill B Codes For Animals You Need 801DF914 0004 cn Infinite Skill\B\Lion cd Only Use Infinite Skill B Codes For Animals You Need 801E0490 0004 cn Infinite Skill\B\Armed Desert Rat cd Only Use Infinite Skill B Codes For Animals You Need 801DF16C 0004 cn Infinite Skill\B\Desert Fox cd Only Use Infinite Skill B Codes For Animals You Need 801E17B4 0004 cn Infinite Skill\B\Boxing Kangeroo cd Only Use Infinite Skill B Codes For Animals You Need 801DF16C 0004 crc 42CF5EA3-9A1334DF-C:50 gn StarCraft 64 (E) cn Infinite Vespene gas,minerals & Most missions 50003202 0000 800B1D96 00FF cn All levels complete 800D1364 000C 50000501 0000 800D1365 000A crc F4CBE92C-B392ED12-C:50 gn STARFOX64 Lylat Wars (E) cn Unlimited\Boost 8113E6FC 0000 8113E6FE 0000 811415DC 0000 811415DE 0000 8013E7FD 0000 801416DD 0000 cn Have All Medals cd For Expert & Normal Modes 50000802 0000 8017A9D9 7777 cn Infinite\Hyper Laser 80163B13 0002 cn Loads O' Hits 80163B03 00FF cn Infinite\Armor\Slippy 8017418B 00FF cn Infinite\Energy 80141587 00FF 8013E6A7 00FF cn Infinite\Lives 80163B09 0063 cn Unlimited\Smart Bombs 80179E0B 0063 cn Infinite\Armor\Falco 80174187 00FF cn Infinite\Armor\Peppy 8017418F 00FF cn Infinite\Dual Blue Lasers 80163C13 0002 cn Level Select 8017A29F ???? 0000:"Corneria",0001:"Meteo",0002:"Sector X",0003:"Area 6",0004:"Glitch",0005:"Sector Y",0006:"Venom 1",0007:"Solar",0008:"Zoness",0009:"Venom 2",000A:"Training Mode Level",000B:"Macbeth",000C:"Titania",000D:"Aquas",000E:"Fortuna",0010:"Katina",0011:"Bolse",0012:"Sector Z",0013:"Venom With Starwolf",0014:"Corneria (Multi)" cn 999 Kills 80163B03 00FF crc D89E0E55-B17AA99A-C:50 gn Starshot - Space Circus Fever (E) cn Infinite Lives 801A3E83 0063 cn Infinite Shots 801A3EB7 0064 cn Infinite Flight Time 801A3F1F 0064 cn Infinite Mega Fuel 801A3EEB 0064 crc 7EE0E8BB-49E411AA-C:50 gn Star Wars - Rogue Squadron (E) cn Infinite Lives cd This Also accesses advanced Shields & Radar 81130B38 01C0 cn Invincibility cd This Also Accesses All Levels And Makes All Crafts Available 80130B2D 00FF cn Infinite Secondary Weapon 8010CA02 0063 80130B23 ???? 0001:"Ion Cannon",0002:"Missiles",0003:"Seeker Missiles",0004:"Bombs",0005:"Proton Bombs",0007:"Cluster Missiles",0008:"Seeker Torpedos",0009:"Seeker Cluster Missiles" cn Completion Time 0:00 80130B85 3FCB cn Enemies Destroyed 756 81130B64 02F4 cn Accuracy 100% 80130B5F 0063 cn Friendly Saves 756 80130B66 02F4 cn Bonus Collected 756 80130B67 02F4 cn Always Pass Mission 80130AF4 0001 cn Accesses\All Levels,Ships & Advanced Weapons 80130B3B 00FF cn Access\69 Buick Electra cd Replaces The V-Wing 81130B3A 000E cn Access AT-ST Level 81130B38 1250 crc 219191C1-33183C61-C:50 gn Star Wars - Rogue Squadron (E) (V1.1) cn Infinite\Infinite Lives 80130B10 0008 cn Extra Shields 81137E7C 4316 cn Infinite\Infinite Secondary Weapons 8010CA32 0008 cn Infinite\Infinite Health 81137E7C 4316 cn Have 99\Bonus Collected 80130B87 0063 cn Have 99\Kills 80130B85 0063 cn Have 99\Saves 80130B86 0063 cn 1-Hit Death 81137E7C 4136 cn Have Medals For\Ambush at Mos Eisley 88130B1C ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Rendezvou on Bankhesh 88130B1D ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\The Search For The Noonnah 88130B1E ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Defection At Corellia 88130B1F ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Liberation V 88130B20 ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\The Jade Moon 88130B21 ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Imperial Construction Yard 88130B22 ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Assault on Kile II 88130B23 ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Rescue on Kessel 88130B24 ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Prisons on Kessel 88130B25 ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Battle Above Taloraan 88130B26 ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Escape From Fest 88130B27 ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Blockade on Chandrila 88130B28 ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Raid on Sullust 88130B29 ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Moff Seerdon's Revenge 88130B2A ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\The Battle of Calamari 88130B2B ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Beggar's Canyon 88130B2C ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\The Death Star Trench Run 88130B2D ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" cn Have Medals For\Battle of Hoth 88130B2E ???? 0000:"None",0001:"Bronze Medal",0002:"Silver Medal",0003:"Gold Medal" crc 4D486681-AB7D9245-C:50 gn Shadow of the Empire cn Access In-Game Cheat Menu cd Pause gameplay and pink text will appear in top screen. scroll with multiple buttons and select with 'A' D10DDE2E 0001 810D3F32 0001 D10DDE14 0002 810D3F32 0001 D10E28D4 0011 810D3F32 0001 D10E28D4 0011 810D3F32 0001 cn Access Wampa Stompa cd Important To Get All Codes To Work! Select empty file "Wampa Stompa" will now be your playername. 8118D4E8 2057 8118D4EA 616D 8118D4EC 7061 8118D4EE 2020 8118D4F0 5374 8118D4F2 6F6D 8118D4F4 7061 cn Access All Levels cd Must be used with Access Wampa Stompa 810DE2EA 0004 cn Max Challenge Points 8118F370 000F cn Extra Jump Power 810E2220 3F92 cn Freeze Timer 810E2230 4018 crc EAE6ACE2-020B4384-C:50 gn Star Wars Episode I - Battle for Naboo (E) cn Level Select 8004C650 0013 cn Always Pass Mission 8105C88E 0001 cn Advanced Weapons,Shields & Extra Ships 8104C636 00FF cn 2X Secondary Weapons 8104C62A 0080 cn Infinite Lives 80067553 03E7 cn Access All Platinium Medals 50001301 0000 8004C63D 0004 cn Completion Time 0:00 8105C892 0000 cn Enemies Destroyed 756 8005C89D 02F4 cn Accuracy 100% 8105C896 0064 8105C89A 0064 cn Friendly Saves 756 8005C89E 02F4 cn Bonus Collected cd Where Bonus Are Available 8005C89F 0002 cn Lives Remaining 756 8005C8A0 02F4 crc 53ED2DC4-06258002-C:50 gn Star Wars Episode I - Racer (E) cn No Damage cd If when Racing Your Pod Over heats & bursts into flames Press "R" & you will Repair the Damage. 800AA5D7 0001 cn Infinite Truguts 8111CB1A FFFF 8111CB18 7FFF cn Always 1st 80121C8C 0001 80125489 0001 cn Enable In-Game cheat Menu & Cheats cd Here you can Activate the IN-Built Cheats Menu. At the Front Screen Just Press C-Button Right.This will open up All Tracks & Characters In Free Play & Time Attack. Also In A Race, Press The Start/Pause button to Access the In-Cheat-Menu Option.You can also choose how many Pod's Racers are in the Race & also how many Laps are in the Race in Free Play & Time Attack 810A0D27 000A 810A0D2A FFFF cn Unlock All Tracks & Characters cd When using Unlock All Tracks & Characters For can to pick & choose what ever you want to play As & where ;) 8011CB08 00FF 8011CB09 00FF 8011CB0B 00FF 8111CB08 FFFF 8111C80A FFFF 8011CB14 007D 8111CB16 FFFF cn Have All Tracks Completed 8111CB0A FFFF 8111CB0C 3FFF 8111CB0E 3FFF 8111CB10 3FFF 8111CB12 00FF crc A03CF036-BCC1C5D2-C:50 gn SUPER MARIO 64 cn Press GS For 255 Coins 893094D8 00FF cn Have\Level Select A02F973C 0001 cn Don't Hurt Mario\Monsters 80309457 0001 cn Infinite\Lives 803094DD 0064 cn Infinite\Energy & Breath 803094DE 0008 cn Have\Debug Mode A02F9748 ???? 0001:"On",0000:"Off" cn Mario's Cap\Off Options cd Here you can Choose Options with Mario without His Cap on,Do not use with any other Mario with/without Options,Use only one at a time 80309437 ???? 0001:"Mario No Cap",0002:"Invisible Mario",0004:"Metal Mario",0008:"Flying Mario",000A:"Invisible Flying Mario",000D:"Metal Flying Mario",000F:"Invisible Metal Flying Mario" cn Mario's Cap\On Options cd Here you can Choose Options with Mario with His Cap on,Do not use with any other Mario with/without Options,Use only one at a time 80309437 ???? 0012:"Invisible Mario",0015:"Metal Mario",0016:"Invisible Metal Mario",0019:"Flying Mario" cn Funny Mario Options\Mario's Cap\Off & in His Hand cd Here you can Choose Options with Mario with His Cap off & in His Hand,Do not use with any other Mario with/without Options,Use only one at a time 80309437 ???? 0020:"Cap In Hand",0022:"Invisible Mario Cap In Hand",0024:"Metal Mario Cap In Hand",0026:"Invisible Metal Mario Cap In Hand",0028:"Flying Mario Cap In Hand" cn Funny Mario Options\Mario's Cap\On & An Extra in His Hand cd Here you can Choose Options with Mario with His Cap on & An Extra in His Hand,Do not use with any other Mario with/without Options,Use only one at a time 80309437 ???? 0030:"Cap In Hand",0032:"Invisible Mario Cap In Hand",0034:"Metal Mario Cap In Hand",0036:"Invisible Metal Mario Cap In Hand",0038:"Flying Mario Cap In Hand" cn Press L To Levitate cd Press L to levitate & Let go to land D0309261 0020 8130947C 4220 D0309261 0020 8130943C 0300 D0309261 0020 8130943E 0880 cn [Slot A Codes]\Have All 120 Stars cd Have 120 Stars,once the Code is activated, you will see it as a new option in Save Slot A.This will have the Cannon open already to get upto Yoshi on the Roof. but make sure to save the game after collecting Red Coins and turn this code off before saving. you will now have it all saved to mempak 80202F23 0001 80202F0B 00C7 50001101 0000 80202F0C 00FF cn [Slot A Codes]\Have all key doors unlocked (and mote empty) 80202F0A 007E cn [Slot A Codes]\Have All Max 100 Coin Records For All Levels 50000F01 0000 80202F25 0064 cn [Slot B Codes]\Have All 120 Stars cd Have 120 Stars,once the Code is activated, you will see it as a new option in Save Slot A.This will have the Cannon open already to get upto Yoshi on the Roof. but make sure to save the game after collecting Red Coins and turn this code off before saving. you will now have it all saved to mempak 80202F93 0001 80202F7B 00C7 50001101 0000 80202F7C 00FF cn [Slot B Codes]\Have all key doors unlocked (and mote empty) 80202F7A 007E cn [Slot B Codes]\Have All Max 100 Coin Records For All Levels 50000F01 0000 80202F95 0064 cn [Slot C Codes]\Have All 120 Stars cd Have 120 Stars,once the Code is activated, you will see it as a new option in Save Slot A.This will have the Cannon open already to get upto Yoshi on the Roof. but make sure to save the game after collecting Red Coins and turn this code off before saving. you will now have it all saved to mempak 80203003 0001 80202FEB 00C7 50001101 0000 80202FEC 00FF cn [Slot C Codes]\Have all key doors unlocked (and mote empty) 80202FEA 007E cn [Slot C Codes]\Have All Max 100 Coin Records For All Levels 50000F01 0000 80203005 0064 cn [Slot D Codes]\Have All 120 Stars cd Have 120 Stars,once the Code is activated, you will see it as a new option in Save Slot A.This will have the Cannon open already to get upto Yoshi on the Roof. but make sure to save the game after collecting Red Coins and turn this code off before saving. you will now have it all saved to mempak 80203073 0001 8020305B 00C7 50001101 0000 8020305C 00FF cn [Slot D Codes]\Have all key doors unlocked (and mote empty) 8020305A 007E cn [Slot D Codes]\Have All Max 100 Coin Records For All Levels 50000F01 0000 80203075 0064 crc 93945F48-5C0F2E30-C:50 gn Super Smash Bros (E) cn Give Kirby A Wierd Blow-Up 802669B8 000A cn Story Mode\Skip Straight To Master Hand 800AD347 000D cn Story Mode\Infinite Time 810AD38E 43CB cn Story Mode\Player 1\Infinite Lives 800AD3A3 0004 cn Story Mode\Player 2\Infinite Lives 800AD417 0004 cn Story Mode\Player 3\Infinite Lives 800AD48B 0004 cn Story Mode\Player 4\Infinite Lives 800AD4FF 0004 cn Story Mode\Player 1\Low % Health 810AD3E6 0000 cn Story Mode\Player 2\Low % Health 810AD45A 0000 cn Story Mode\Player 3\Low % Health 810AD4CE 0000 cn Story Mode\Player 4\Low % Health 810AD542 0000 cn Story Mode\Player 1\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code could also result freezing at the end of the Level. 800AD39B ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 2\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800AD40F ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 3\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800AD483 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 4\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800AD4F7 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 1\Kirby B Button Move\Hyrule Castle 8027136F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Yoshi's Island 802716AF ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Sector Z 80279957 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Peach's Castle 8026C5FF ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Saffron City 8027C2F7 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Congo Jungle 8027932F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Kirby's Dreamland 8027639F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Planet Zebes 80278807 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Metal Mario Stage 8026BDF7 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Fighting Polygon Team 8026AF7F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Master Hand Stage 8027A4AF ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn VS. Mode\Infinite Time 810AD57E 43CB cn VS. Mode\Player 1\Low % Health 810AD5D6 0000 cn VS. Mode\Player 2\Low % Health 810AD64A 0000 cn VS. Mode\Player 3\Low % Health 810AD6BE 0000 cn VS. Mode\Player 4\Low % Health 810AD732 0000 cn VS. Mode\Player 1\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800AD58B ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 2\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800AD5FF ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 3\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800AD673 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 4\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800AD6E7 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 1\Kirby B Button Move\Hyrule Castle 8026C24F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn VS. Mode\Player 1\Kirby B Button Move\Yoshi's Island 80276B17 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn VS. Mode\Player 1\Kirby B Button Move\Sector Z 802747E7 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn P1 Press Down On D-Pad To Make Items Appear In Random Spots D10A7804 0400 81195902 0001 cn Have All Characters 810AD198 0FF0 cn VS. Mode\Have Mushroom Kindom 800AD197 00FF cn Story Mode\Always Get Pacifist (60,000 Points) 810AD3CE 0000 cn Bonus Stage Character Modifier (Training Mode) cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 80197A33 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Jump off to win 810AD3A2 0000 crc B44CAB74-07029A29-C:50 gn Superman (E) cn Infinite Options\Freezing Breath 8122CDE8 42C8 cn Infinite Options\Health 8122CDD4 42C8 cn Infinite Options\Laser Eye 8122CDE4 42C8 cn Infinite Options\Running Boosts 8122CDDC 42C8 cn Infinite Options\X-Ray Vision 8122CDE0 42C8 cn For More Time Press D-pad up D00EA380 0008 8115F0D2 1724 D00EA380 0008 8115F0DA 003C cn Level Select D00EA380 0020 8117A378 0013 D00EA380 0020 8117A388 000F 81144727 0063 crc E0C4F72F-769E1506-C:50 gn Tigger's Honey Hunt (E) cn Max Honey Pots 810A288A 03E7 cn Infinite Lives 810A2886 0009 cn Have Mouse Card\The Adventure Begins 800A2864 0001 cn Have Mouse Card\Night Tail 800A2865 0001 crc 2B4F4EFB-43C511FE-C:50 gn TOM AND JERRY cn [Unlock All Characters] cd This Gives you all Characters to choose from plus fixes A freeze on the Charecter Select Menu by having it on 800E4933 00FF cn Open All Versus Arenas 800E4934 00FF 800E4935 00FF cn Infinite Health 800E2BDD 00C8 cn One Hit To Kill\Player 1 cd This Will Give Player 1 A One Hit Kill Over Player 2 800E2EB4 0080 cn One Hit To Kill\Player 2 cd This Will Give Player 2 A One Hit Kill Over Player 1 800E2BDC 0080 cn Always Have Weapon Options\Player 1 810E2DD4 ???? 0079:"Anvil",0003:"Club",0004:"Bird bath",0008:"Broom",0009:"NCube knife",000A:"NCube missiles",000B:"Chair",000C:"Champagne",000E:"Chicken",000F:"Crate",0014:"Deck chair",0016:"Egg",001A:"Fish",001D:"Gardeners Fork",001E:"Frying Pan",001F:"Wooden Chair",0029:"Bouy",002A:"Mallet",002B:"Watermelon",002D:"Milk Bottle",0039:"Plank",0041:"Rolling Pin",0046:"Spade",0047:"Stool",0048:"Tennis Racket",004E:"Spanner",0055:"Stick",0063:"Blue Swordfish",0064:"Saucepan",0065:"Wooden Spoon",006B:"Stool",006D:"Bee hive",0078:"Mooses head" cn Always Have Weapon Options\Player 2 810E30AC ???? 0079:"Anvil",0003:"Club",0004:"Bird bath",0008:"Broom",0009:"NCube knife",000A:"NCube missiles",000B:"Chair",000C:"Champagne",000E:"Chicken",000F:"Crate",0014:"Deck chair",0016:"Egg",001A:"Fish",001D:"Gardeners Fork",001E:"Frying Pan",001F:"Wooden Chair",0029:"Bouy",002A:"Mallet",002B:"Watermelon",002D:"Milk Bottle",0039:"Plank",0041:"Rolling Pin",0046:"Spade",0047:"Stool",0048:"Tennis Racket",004E:"Spanner",0055:"Stick",0063:"Blue Swordfish",0064:"Saucepan",0065:"Wooden Spoon",006B:"Stool",006D:"Bee hive",0078:"Mooses head" cn Infinite time 800FF18E 00F0 cn No music 800B7718 0000 crc 9F8926A5-0587B409-C:50 gn Tony Hawk's Pro Skater 1 (E) cn Access all Levels,tapes,boards & Officer Dick 50000C14 0000 800DE9FC 001E cn Access All gold medals cd Also opens San Francisco & Downtown Minneapolis 50000C14 0000 800DEA03 00FF 50000C14 0000 800DEA06 00FF 50000C14 0000 800DEA08 00FF cn 10x Trick Multiplier 800D60FE 0001 cn Max\Balance 800D62DF 00FF cn Max\Turning 800D6220 00FF cn Max\Speed 800DE83A 0001 cn Max\Air 800D62DC 00FF crc 84EAB557-C88A190F-C:50 gn Tony Hawk's Pro Skater 2 (E) cn Access In-Game Cheat Menu 50001104 0000 800E9E98 0001 cn 10x Points Multiplier 800EAD8F 0001 cn Perfect Balance 800E9EAA 0010 cn Always Special 800E9EAC 0001 800E9EAE 0001 cn Moon Psysics 800E9ECE 0001 cn Hoffmann Factory & Skate heaven Unlocked 800EA18B 003F cn Access\Spider-Man 800E9E98 0001 800F0C5B 0001 cn Access\Officer Dick 800E9E9C 0001 800F093B 0001 cn Infinite Time 800E886A 0001 cn Max Cash cd All standard players,Officer Dick & Spider-Man 50000EE4 0000 810E88F8 000A 50000EE4 0000 810E88FA 2B1F 50000EE4 0000 810E88FC 000A 50000EE4 0000 810E88FE 2B1F cn Level Goals 100% cd All standard players,Officer Dick & Spider-Man, Use together with 50000EE4 0000 810E8900 FFFF 50000EE4 0000 810E8902 FFFF 50000EE4 0000 810E8904 FFFF 50000EE4 0000 810E8906 FFFF 50000EE4 0000 810E8908 FFFF 50000EE4 0000 810E890A FFFF 50000EE4 0000 810E890C FFFF 50000EE4 0000 810E890E FFFF 50000EE4 0000 810E8920 FFFF cn All Gaps 50000A0C 0000 810E9D84 FFFF 50000A0C 0000 810E9D86 FFFF 50000A0C 0000 810E9D8A FFFF 50000402 0000 810E9DF4 FFFF cn Max Cash For All Custom Players 500004E4 0000 810E948C 000A 500004E4 0000 810E948E 2B1F 500004E4 0000 810E9490 000A 500004E4 0000 810E9492 2B1F cn Levels Goals 100% All Custom Players 50000802 0000 810E9494 FFFF 50000802 0000 810E9578 FFFF 50000802 0000 810E965C FFFF 50000802 0000 810E9740 FFFF crc 5F3F49C6-0DC714B0-C:50 gn Top Gear Hyper-Bike (E) cn Access All\Bikes 8107F6EE FFFF cn Access All\Tracks 8107F6F0 00FF 8107F6F2 FFFF cn Infinite\Nitro 810BA540 4296 cn Infinite\Nitro Always On 810BA52C 0010 cn Laps 2 Race 800F36B8 ???? 0001:"1 Lap",0002:"2 laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" crc D09BA538-1C1A5489-C:50 gn Top Gear Overdrive (E) cn Extra Cars & Tracks 80102A71 000E 80102A68 0005 cn Infinite Money 810F5905 0FA0 cn Infinite Nitro 800F590F 000F cn Laps 2 Race 80118E20 ???? 0001:"1 Lap",0002:"2 laps",0003:"3 Laps",0004:"4 Laps",0005:"5 Laps",0006:"6 Laps",0007:"7 Laps",0008:"8 Laps",0009:"9 Laps" crc 7F43E701-536328D1-C:50 gn TOP GEAR RALLY cn Have 1-6 Level Points 8032685F 0064 80326861 0064 80326863 0064 80326865 0064 80326867 0064 80326869 0064 cn Extra Cars & Tracks 8032690F 00FF 8032690C 00FF 8032690D 00FF cn Only Race 1 Lap Championship Mode 8031EBDB 0002 cn Always Place 1st 8031EC0F 0000 crc BEBAB677-51B0B5E4-C:50 gn TOP GEAR RALLY 2 cn Always 1st 80032713 0001 cn No Damage Or Failures 80031BA7 0001 cn 100.000 Sponsor Credits & 950 Championship Points In Support Van cd You Also Have Access To All Cars, Tracks & Extra Features 80031BB3 00F3 cn No Cones Hit cd In ARSG Rally School 80032743 0000 80032B1B 0000 cn No Navigator 80032677 0000 cn Max Sponsor Credits 803D27E2 0010 803D27E4 0001 cn Infinite Cash 803D004E 4000 cn Freeze Timer 8003271F 0000 crc CCEB3858-26952D97-C:50 gn Toy Story 2 (E) cn Have 99 coins 810BB4FE 0063 cn Have all 5 collectables 801C7E62 0005 cn Infinite Lives 800BB4FA 0009 cn Infinite Battery Power 810BB4F6 000E cn Hold jump to fly 810BB4EC 0002 crc 2F7009DD-FC3BAC53-C:50 gn Turok - Dinosaur Hunter (E) (V1.0) cn Infinite\Lives 80128D7F 00FF cn Infinite\Body Armor 81128D96 5B23 80128DD7 0001 cn Infinite\Air 801290E0 0063 801E869A 0063 cn Infinite\Health 812C1634 1E61 812A25A4 1E61 cn Have\All Level Keys 50000604 0000 80128DE3 0007 80128DFB 001F 80128E1B 00FF cn Have\All Weapons 50000B04 0000 80128DB7 0001 80128D33 0001 cn Infinite\Ammo 50000404 0000 80128D63 00FF 80128D73 00FF 80128D7F 00FF 50000504 0000 80128D83 00FF 80128F0B 00FF 80128F07 00FF cn Diffuculty Modifier 801195DF ???? 0000:"Easy",0001:"Normal",0002:"Hard" cn Have\Backpack 80128CEB 0001 80128D2B 0001 cn Open All Portals cd Press L to Access Map 8114F8CA F803 81128D4E 0003 81128D52 0003 81128D56 0003 81128D5A 0003 81128D5E 0003 81128D62 0003 81128D66 0005 cn Have All\Gems 80128F07 00FF cn Have\Cheat Menu 811195F0 FFFF 811195F2 FFFF crc 2F700DCD-176CC5C9-C:50 gn Turok - Dinosaur Hunter (E) (V1.1) cn Infinite\Lives 80128E1F 00FF cn Infinite\Body Armor 81128E36 5B23 80128E77 0001 cn Infinite\Air 80129180 0063 801E873A 0063 cn Infinite\Health 812C16D4 1E61 812A2644 1E61 cn Have\All Level Keys 50000604 0000 80128E83 0007 80128E9B 001F 80128EBB 00FF cn Have\All Weapons 50000B04 0000 80128E57 0001 80128DD3 0001 cn Infinite\Ammo 50000404 0000 80128E03 00FF 80128E13 00FF 80128E1F 00FF 50000504 0000 80128E23 00FF 80128FAB 00FF 80128FA7 00FF cn Diffuculty Modifier 8011967F ???? 0000:"Easy",0001:"Normal",0002:"Hard" cn Have\Backpack 80128D8B 0001 80128DCB 0001 cn Open All Portals cd Press L to Access Map 8114F96A F803 81128DEE 0003 81128DF2 0003 81128DF6 0003 81128DFA 0003 81128DFE 0003 81128E02 0003 81128E06 0005 cn Have All\Gems 80128FA7 00FF cn Have\Cheat Menu 81119690 FFFF 81119692 FFFF crc 1EA26214-E790900F-C:50 gn Turok - Rage Wars (E) cn Have All Medals cd Unlocks the In-Game Cheat Menu.Only works with a Controller-Pak 8010EB50 0003 50000601 0000 8010EB4A 00FF cn Have All Mini Game Icons cd Only works with a Controller-Pak 8010EB17 0024 cn Infinite Lives\Player 1 8033637E 0064 cn Infinite Health\Player 1 80336527 0064 80692B86 0064 cn Infinite Ammo All Guns\Player 1 50000302 0000 80336535 0063 50000702 0000 80692B95 0063 cn All Levels Completed cd Unlocks Frag Fest & Time Trial 50000601 0000 8010EB7D 00FF cn All Characters 50000301 0000 8010EB51 00FF cn Deaths Modifier 8110EB76 ???? 000A:"10",0014:"20",001E:"30",0028:"40",0032:"50",0064:"100",00C8:"200",0190:"400",0320:"800",0640:"1600",03E7:"Infinite" cn Wins Modifier 8110EB72 ???? 000A:"10",0014:"20",001E:"30",0028:"40",0032:"50",0064:"100",00C8:"200",0190:"400",0320:"800",0640:"1600",03E7:"Infinite" cn Total Kills Modifier 8110EB6E ???? 000A:"10",0014:"20",001E:"30",0028:"40",0032:"50",0064:"100",00C8:"200",0190:"400",0320:"800",0640:"1600",03E7:"Infinite" crc E0B92B94-80E87CBD-C:50 gn Turok 2 - Seeds of Evil (E) cn Access In-Game Cheat Menu 8112167C FFFF 8112167E FFFF cn Access All Nuke Pieces 1-6 cd Enter the In-game inventory option, and press L Button D00FC701 0020 50000601 0000 802FC99C 0030 crc 6A162FF2-2093704C-C:50 gn Turok 3 - Shadow of Oblivion (E) cn Infinite\Grenade Gun Ammo 8133340A 0064 cn Have\a Grenade Launcher 80333954 0001 cn Infinite\Shotgun Ammo 81333932 0064 cn Have\Shotgun 80333950 0001 cn Infinite\Arrows 81333928 0063 cn Infinite\Life Units 813334FC 0063 cn Access\All Cheats & Level Warp 811659D4 FFFF 811659D6 FFFF crc E688A5B8-B14B3F18-C:50 gn TWISTED EDGE cn Max\50000 Stunt Points 81082AD8 C350 cn Low Timer 80082A04 0000 80182A06 0000 cn Have\All Characters 81082B18 07FF cn Have\All Difficulties 81082B10 0700 cn Have\All Tracks 81082B1C BFFE cn Have\All Boards 81082B24 0003 81082B26 FFFF crc 151F79F4-8EEDC8E5-C:50 gn Vigilante 8 (E) cn All Quests Completed 80193CA4 003F 50000C01 0000 80193C98 001F cn Max Stats All Characters 50000B24 0000 811896EC 1414 50000B24 0000 811896EE 1400 cn Access All Characters 81193CA4 3F00 50000602 0000 81193C98 1F1F crc 98F9F2D0-03D9F09C-C:50 gn Virtual Pool 64 (E) cn Foul score will stay at 0 802EF725 0000 cn Score 0 points in shark skins 802EF723 0000 cn Have 5 games won 802EF721 0005 cn Pot 1 to win Set points to 25 in straight pool 802EF71D 0019 crc 636E6B19-E57DDC5F-C:50 gn V-Rally Edition 99 (E) cn Access\All Cars 8015EC13 003F cn Access\All Tracks 8015EC0E 0070 cn Access\Championship,World,Expert 8015EC1C 0001 cn Access\Expert Times 8015EC10 0031 cn Access\In-Game Cheat Menu cd On The Title Screen, Hold Z Button & Push L Button 811CFE09 00FF 811F31FF 04FF 811CE165 FF03 crc 93053075-261E0F43-C:50 gn Waialae Country Club - True Golf Classics (E) cn All Players On 1st Shot 813013DA 0000 crc D715CC70-271CF5D6-C:50 gn WAR GODS cn Infinite Time 8033F6FB 0064 cn Enable Cheat Menu 80336973 0001 cn Skill Select\Player 2 cd Max Skill makes the player more Skillful while easier to hurt where as Weak Skill is Non Skillful yet harder to harm. 80335C20 ???? 0080:"Max Skill",0000:"Weak Skill" cn Skill Select\Player 1 cd Max Skill makes the player more Skillful while easier to hurt where as Weak Skill is Non Skillful yet harder to harm. 80335C1D ???? 0080:"Max Skill",0000:"Weak Skill" cn Difficulty Select 80336953 ???? 0000:"Very Easy",0001:"Easy",0002:"Medium",0003:"Hard",0004:"Very hard" cn Infinite Max Continues 80336963 0005 cn Easy Fatality Select 8033584F ???? 0000:"Always Off",0001:"Always On" cn Press D-Pad\Right to Play As Exor cd Press D-Pad Right at the character Select screen to Replace Maximus with Exor. Do not use with the Play As Cheat D033C263 0008 800EAF87 000B cn Press D-Pad\Left to Play As Grox cd Press D-Pad Left at the character Select screen to Replace Maximus with Grox. Do not use with the Play As Cheat D033C263 0004 800EAF87 000A cn Music Select 80336954 ???? 0000:"Off",0001:"On" cn Level Select 80335C27 ???? 0000:"Off",0001:"Pagan",0002:"Anubis",0003:"Warhead",0004:"Ahau Kin",0005:"Voodoo",0006:"Kabuki" cn Fatalities Select 8033695C ???? 0000:"Off",0001:"On" cn Play As 800EAF87 ???? 0000:"Warhead",0001:"Tak",0002:"Voodoo",0003:"Pagan",0004:"Kabuki Jo",0005:"Vallah",0006:"Ahau Kin",0007:"Anubis",0008:"CY-5",0009:"Maximus",000A:"Grox",000B:"Exor" crc 650EFA96-30DDF9A7-C:50 gn Wave Race 64 (E) cn Set\Speed Size 801C0077 ???? 0001:"Slow",000A:"Medium",000F:"Fast" cn Misses Don't Count\Player 1 801C007F 0000 cn Set\Wave Size 800E6B90 ???? 0000:"Smooth",0019:"Medium",0064:"Rough",00FF:"Oh My God" cn Infinite Time Stunt Mode 801C020E 00FF cn Maximum Power\Player 1 801C0077 0005 cn Maximum Power\Player 2 801C069A 0005 801C093A 0005 cn Only Play Glacier Coast 800D8003 0007 cn Always Place 1st\Player 1 801BFF4F 0000 cn Lap Timer Below 0'00'10\Player 1 811C00E6 0000 cn Misses Don't Count\Player 2 811C03F6 0000 cn Lap Timer Below 0'00'10\Player 2 811C045E 0000 crc 661B45F3-9ED6266D-C:50 gn Wayne Gretzky's 3D Hockey '98 (E) cn Max Score\Team 1 81120220 FFFF cn Max Score\Team 2 81123730 FFFF cn Difficulty Mod 801247F9 ???? 0000:"",0001:"",0002:"",0003:"" cn Anger metre always full 800D9B38 00FF 800D9826 00FF crc CEA8B54F-7F21D503-C:50 gn Wetrix (E) cn Always Empty Drain 801BF991 0000 811BF992 0000 811BF994 0000 cn Bezerk Mode 801BF9AF 00FF cn Stop Level Timer 801BF9B2 00FF crc 54310E7D-6B5430D8-C:50 gn Wipeout 64 cn Access\Velocitar 800927F9 0001 cn Access\Pirahna 2 80092979 0001 cn Access Pirahna 2 cd Multiplayer 80091259 0001 8109125A 0001 cn Access\Super Combo 81092ACC 0000 cn Infinite\Ammo 80091254 0001 cn Cyclone Option 80091258 ???? 0000:"Off",0001:"On" cn Always First 810A9248 0001 8109F3E6 0003 cn Freeze Checkpoint Timer 810CE1D2 BCCC cn A perfect Lap 800914B4 0001 cn Access\All Gold Challenges\Race 81092CCC 0000 cn Access\All Gold Challenges\Time Trial 8109354C 0000 cn Access\All Gold Challenges\Weapon 8109394C 0000 cn Access\All Gold Challenges\Super Combo 81093D4C 0000 cn Access\All Gold Awards 50001C2C 0000 800941BC 0003 cn [Infinite Sheild] 5000030C 0000 810A92C2 0000 810A92F2 0000 cn always 1st 810A9248 0001 crc 6D8DF08E-D008C3CF-C:50 gn WWF No Mercy (E) cn Infinite\Money\Championship Mode cd For Championship Mode 8109940A FFFF cn Infinite\Money\Smackdown Mall Shop cd For Smackdown Mall Shop 8114FAD6 FFFF cn Have All\Characters,Costumes, & Moves 50000B02 0000 810BEE40 FFFF cn Max Spirit\Player 1 D015A5D1 0015 8015AF5F 00FF cn Max Spirit\Player 2 D015A5D1 0015 8015B2B7 00FF cn Max Spirit\Player 3 D015A5D1 0015 8015B60F 00FF cn Max Spirit\Player 4 D015A5D1 0015 8015B967 00FF cn Always Special\Player 1 D015A5D1 0015 8015AF9E 0004 cn Always Special\Player 2 D015A5D1 0015 8015B2F6 0004 cn Always Special\Player 3 D015A5D1 0015 8015B64E 0004 cn Always Special\Player 4 D015A5D1 0015 8015B9A6 0004 cn Ultimate Code\Player 1 D015A5D1 0015 8015AF5E 0064 cn Ultimate Code\Player 2 D015A5D1 0015 8015B2B6 0064 cn Ultimate Code\Player 3 D015A5D1 0015 8015B60E 0064 cn Ultimate Code\Player 4 D015A5D1 0015 8015B964 0064 cn 2 Player Championship Mode cd This lets player 2 play with you in championship mode so if you have a friend that you want to tag team up with in tag team championship now you can. 810A755E 0002 cn CPU To Human Control\Player 1 8015AF99 ???? 0017:"Human",0018:"CPU" cn CPU To Human Control\Player 2 8015B2F1 ???? 0017:"Human",0018:"CPU" cn CPU To Human Control\Player 3 8015B649 ???? 0017:"Human",0018:"CPU" cn Can't Pin\Player 1 cd Do not use with Auto Pin 8016CE23 0004 cn Can't Pin\Player 2 cd Do not use with Auto Pin 8016CE17 0004 cn Can't Pin\Player 3 cd Do not use with Auto Pin 8016CE2F 0004 cn Can't Pin\Player 4 cd Do not use with Auto Pin 8016CE3B 0004 cn Auto-Pin\Player 1 cd Do not use with Cant Pin 8016CE23 0003 cn Auto-Pin\Player 2 cd Do not use with Cant Pin 8016CE17 0003 cn Auto-Pin\Player 3 cd Do not use with Cant Pin 8016CE2F 0003 cn Auto-Pin\Player 4 cd Do not use with Cant Pin 8016CE3B 0003 cn Play As\Player 1\Option 1 cd Do not use this with anyother Play As Player 1 Option, only use one option at a time 810AAAD0 ???? 0001:"Rock",0002:"SCSA",0003:"Undertaker",0004:"Kane",0005:"Richards",0006:"Mankind",0007:"Cactus",0008:"Mick",0009:"HBK",0101:"HHH",0102:"X-Pac",0103:"Mr. Ass",0104:"Road Dogg",0201:"Benoit",0202:"Malenko",0203:"Saturn",0204:"Guerrero",0301:"Jericho",0302:"Angle",0303:"Tazz",0304:"Test",0305:"GodFather",0306:"D`Lo",0307:"Venis",0308:"Shamrock" cn Play As\Player 1\Option 2 cd Do not use this with anyother Play As Player 1 Option, only use one option at a time 810AAAD0 ???? 0401:"Rikishi",0402:"Sexay",0403:"Scotty",0404:"Edge",0405:"Christian",0406:"Matt",0407:"Jeff",0501:"Faarooq",0502:"Bradshaw",0503:"D-Von",0504:"Buh Buh",0505:"Hardcore",0506:"Crash",0507:"Bossman",0508:"Albert",0601:"Al",0602:"Blackman",0603:"Bulldog",0604:"Henry",0605:"Viscera",0606:"Andre",0607:"Buchanan",0608:"Rios",0609:"Taka",0701:"Chyna" cn Play As\Player 1\Option 3 cd Do not use this with anyother Play As Player 1 Option, only use one option at a time 810AAAD0 ???? 0702:"Stephanie",0703:"Tori",0704:"Debra",0705:"Trish",0706:"Lita",0801:"Jacqueline",0802:"Linda",0803:"Kat",0804:"Moola",0805:"Ho",0901:"Vince",0902:"Shane",0903:"Hebner",0904:"Jim Ross" cn Play As\Player 2\Option 1 cd Do not use this with anyother Play As Player 2 Option, only use one option at a time 810AAADC ???? 0001:"Rock",0002:"SCSA",0003:"Undertaker",0004:"Kane",0005:"Richards",0006:"Mankind",0007:"Cactus",0008:"Mick",0009:"HBK",0101:"HHH",0102:"X-Pac",0103:"Mr. Ass",0104:"Road Dogg",0201:"Benoit",0202:"Malenko",0203:"Saturn",0204:"Guerrero",0301:"Jericho",0302:"Angle",0303:"Tazz",0304:"Test",0305:"GodFather",0306:"D`Lo",0307:"Venis",0308:"Shamrock" cn Play As\Player 2\Option 2 cd Do not use this with anyother Play As Player 2 Option, only use one option at a time 810AAADC ???? 0401:"Rikishi",0402:"Sexay",0403:"Scotty",0404:"Edge",0405:"Christian",0406:"Matt",0407:"Jeff",0501:"Faarooq",0502:"Bradshaw",0503:"D-Von",0504:"Buh Buh",0505:"Hardcore",0506:"Crash",0507:"Bossman",0508:"Albert",0601:"Al",0602:"Blackman",0603:"Bulldog",0604:"Henry",0605:"Viscera",0606:"Andre",0607:"Buchanan",0608:"Rios",0609:"Taka",0701:"Chyna" cn Play As\Player 2\Option 3 cd Do not use this with anyother Play As Player 2 Option, only use one option at a time 810AAADC ???? 0702:"Stephanie",0703:"Tori",0704:"Debra",0705:"Trish",0706:"Lita",0801:"Jacqueline",0802:"Linda",0803:"Kat",0804:"Moola",0805:"Ho",0901:"Vince",0902:"Shane",0903:"Hebner",0904:"Jim Ross" cn Play As\Player 3\Option 1 cd Do not use this with anyother Play As Player 3 Option, only use one option at a time 810AAAE8 ???? 0001:"Rock",0002:"SCSA",0003:"Undertaker",0004:"Kane",0005:"Richards",0006:"Mankind",0007:"Cactus",0008:"Mick",0009:"HBK",0101:"HHH",0102:"X-Pac",0103:"Mr. Ass",0104:"Road Dogg",0201:"Benoit",0202:"Malenko",0203:"Saturn",0204:"Guerrero",0301:"Jericho",0302:"Angle",0303:"Tazz",0304:"Test",0305:"GodFather",0306:"D`Lo",0307:"Venis",0308:"Shamrock" cn Play As\Player 3\Option 2 cd Do not use this with anyother Play As Player 3 Option, only use one option at a time 810AAAE8 ???? 0401:"Rikishi",0402:"Sexay",0403:"Scotty",0404:"Edge",0405:"Christian",0406:"Matt",0407:"Jeff",0501:"Faarooq",0502:"Bradshaw",0503:"D-Von",0504:"Buh Buh",0505:"Hardcore",0506:"Crash",0507:"Bossman",0508:"Albert",0601:"Al",0602:"Blackman",0603:"Bulldog",0604:"Henry",0605:"Viscera",0606:"Andre",0607:"Buchanan",0608:"Rios",0609:"Taka",0701:"Chyna" cn Play As\Player 3\Option 3 cd Do not use this with anyother Play As Player 3 Option, only use one option at a time 810AAAE8 ???? 0702:"Stephanie",0703:"Tori",0704:"Debra",0705:"Trish",0706:"Lita",0801:"Jacqueline",0802:"Linda",0803:"Kat",0804:"Moola",0805:"Ho",0901:"Vince",0902:"Shane",0903:"Hebner",0904:"Jim Ross" cn Play As\Player 4\Option 1 cd Do not use this with anyother Play As Player 4 Option, only use one option at a time 810AAAF4 ???? 0001:"Rock",0002:"SCSA",0003:"Undertaker",0004:"Kane",0005:"Richards",0006:"Mankind",0007:"Cactus",0008:"Mick",0009:"HBK",0101:"HHH",0102:"X-Pac",0103:"Mr. Ass",0104:"Road Dogg",0201:"Benoit",0202:"Malenko",0203:"Saturn",0204:"Guerrero",0301:"Jericho",0302:"Angle",0303:"Tazz",0304:"Test",0305:"GodFather",0306:"D`Lo",0307:"Venis",0308:"Shamrock" cn Play As\Player 4\Option 2 cd Do not use this with anyother Play As Player 4 Option, only use one option at a time 810AAAF4 ???? 0401:"Rikishi",0402:"Sexay",0403:"Scotty",0404:"Edge",0405:"Christian",0406:"Matt",0407:"Jeff",0501:"Faarooq",0502:"Bradshaw",0503:"D-Von",0504:"Buh Buh",0505:"Hardcore",0506:"Crash",0507:"Bossman",0508:"Albert",0601:"Al",0602:"Blackman",0603:"Bulldog",0604:"Henry",0605:"Viscera",0606:"Andre",0607:"Buchanan",0608:"Rios",0609:"Taka",0701:"Chyna" cn Play As\Player 4\Option 3 cd Do not use this with anyother Play As Player 4 Option, only use one option at a time 810AAAF4 ???? 0702:"Stephanie",0703:"Tori",0704:"Debra",0705:"Trish",0706:"Lita",0801:"Jacqueline",0802:"Linda",0803:"Kat",0804:"Moola",0805:"Ho",0901:"Vince",0902:"Shane",0903:"Hebner",0904:"Jim Ross" cn Cannot Be Grabbed\Player 1 D115AEC6 0052 8115AEC6 0001 D115AEC6 00A1 8115AEC6 00C1 cn Cannot Be Punched\Player 1 D115AEC6 002D 8115AEC6 0001 D115AEC6 0035 8115AEC6 00C1 cn Cannot Be Knocked Down\Player 1 D115AEC6 0031 8115AEC6 0001 cn Wrestler Size & Shape\Player 1\Thin wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B468 3D80 cn Wrestler Size & Shape\Player 1\Wide wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B468 3FFF cn Wrestler Size & Shape\Player 1\Short wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B47C 3E80 cn Wrestler Size & Shape\Player 1\Tall wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B47C 3FFF cn Wrestler Size & Shape\Player 1\Flat wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B490 3D80 cn Wrestler Size & Shape\Player 1\Bulgy wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B490 3FFF cn Wrestler Size & Shape\Player 1\Giant wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8106B4A4 3E80 cn Wrestler Size & Shape\Player 1\Small wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8106B4A4 3FFF cn Wrestler Size & Shape\Player 2\Thin wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B528 3D80 cn Wrestler Size & Shape\Player 2\Wide wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B528 3FFF cn Wrestler Size & Shape\Player 2\Short wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B53C 3E80 cn Wrestler Size & Shape\Player 2\Tall wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B53C 3FFF cn Wrestler Size & Shape\Player 2\Flat wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B510 3DFF cn Wrestler Size & Shape\Player 2\Bulgy wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B510 3FFF cn Wrestler Size & Shape\Player 2\Giant wrestler cd Do not use this with anyother Size & Shape Player 2 Option, only use one option at a time 8006B564 3E80 cn Wrestler Size & Shape\Player 2\Small wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B564 3FFF cn Wrestler Size & Shape\Player 3\Thin wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B5E8 3D80 cn Wrestler Size & Shape\Player 3\Wide wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B5E8 3FFF cn Wrestler Size & Shape\Player 3\Short wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B5FC 3E80 cn Wrestler Size & Shape\Player 3\Tall wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B5FC 3FFF cn Wrestler Size & Shape\Player 3\Flat wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B610 3D80 cn Wrestler Size & Shape\Player 3\Bulgy wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B610 3FFF cn Wrestler Size & Shape\Player 3\Giant wrestler cd Do not use this with anyother Size & Shape Player 3 Option, only use one option at a time 8006B624 3E80 cn Wrestler Size & Shape\Player 3\Small wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B624 3FFF cn Wrestler Size & Shape\Player 4\Thin wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6A8 3D80 cn Wrestler Size & Shape\Player 4\Wide wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6A8 3FFF cn Wrestler Size & Shape\Player 4\Short wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6BC 3E80 cn Wrestler Size & Shape\Player 4\Tall wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6BC 3FFF cn Wrestler Size & Shape\Player 4\Flat wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6D0 3D80 cn Wrestler Size & Shape\Player 4\Bulgy wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6D0 3FFF cn Wrestler Size & Shape\Player 4\Giant wrestler cd Do not use this with anyother Size & Shape Player 4 Option, only use one option at a time 8006B6E4 3E80 cn Wrestler Size & Shape\Player 4\Small wrestler cd Do not use this with anyother Size & Shape Player 1 Option, only use one option at a time 8006B6E4 3FFF cn Z LADDER cd Press Z for the ladder to appear, sometimes there is an invisable ladder D1064880 2000 8116C768 0000 D1064880 2000 8116C76A 0019 D1064880 2000 8116C76C 0000 D1064880 2000 8116C76E 0019 D1064880 2000 8116C788 8104 cn Replace Raw War with\TOKYO DOME cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 810528F4 7223 810528F6 0119 81050124 0100 81050126 0100 81050128 0100 8105012A 0100 8105012C 0100 8105012E 0100 81050130 0100 81050132 0100 81050134 0100 81050136 0100 8105010E 0999 81050400 03A5 81050402 0385 81050404 0385 81050406 0385 81050408 0385 8105040A 03A5 8105040C 03A5 8105040E 043F 81050430 043F 8105042C 03A5 81050430 21A5 81050432 0100 81050434 0000 81050436 2CFB 81050438 0899 8105043C 03AF 81050440 03AF 81050442 03A5 810500E8 24C3 81050444 0100 81050190 09EF 81050192 0000 81050194 09EF 81050196 2CFD cn Replace Raw War with\BARBEDWIRE ROPES cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 81050110 04F3 81050112 04F4 81050114 04F5 81050116 04F3 81050118 04F4 8105011A 04F5 8105011C 04F3 8105011E 04F4 81050120 04F5 81050124 2CFB 81050126 2CFB 81050128 2CFB 8105012A 2CFB 8105012C 2CFB 8105012E 2CFB 81050130 2CFB 81050132 2CFB 81050134 2CFB 81079D90 3F6C 81079D94 3F48 81079DA4 3D10 81079DB8 3F71 81079E6C 3F6C 81079E80 3D10 81079E90 3F47 81079F48 3F6C 81079F4C BF4C 81079F5C 3D10 81079F70 3F71 8107A024 3F6C 8107A028 3F28 8107A038 3D10 8107A04C 3F71 8107A100 3F6C 8107A114 3D10 8107A124 3F23 8107A1DC 3F6C 8107A1E0 BF2A 8107A1F0 3D10 8107A204 3F71 8107A2B8 3F6C 8107A2BC 3F02 8107A2CC 3D10 8107A2E0 3F71 8107A394 3F6C 8107A3A8 3D10 8107A3B8 3F00 8107A470 3F6C 8107A474 BF02 8107A484 3D10 8107A498 3F71 81050144 0569 81050154 07F7 810528F4 0C01 810528F6 0555 81050140 04F4 81050150 2CFB 8107A628 3F60 8107A63C 3D10 8107A64C 3F52 8107A650 BF80 8107A8BC 3F56 8107A8C4 BA00 8107A8D0 3D10 8107A8DC 3C5A 8107A8E0 3F30 8107A8E4 BF80 8107ADE4 3F56 8107ADEC BA00 8107ADF8 3D10 8107AE04 3C5A 8107AE08 3F0E 8107AE0C BF80 8107AB7C 3F00 D115AF56 2EB2 8115AEC6 0017 D115B2AE 2EB2 8115B21E 0017 D115B606 2EB2 8115B570 0017 D115B95E 2EB2 8115B8CE 0017 81052922 FFFF 81052924 FFFF 81052926 FFFF cn Replace Raw War with\BARBEDWIRE SQUARE\Part 1 cd Both Parts must be on for this Press the C Left Button to make your opponent bleed,These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 81050110 04F3 81050112 04F4 81050114 04F5 81050116 04F3 81050118 04F4 8105011A 04F5 8105011C 04F3 8105011E 04F4 81050120 04F5 81050124 2CFB 81050126 2CFB 81050128 2CFB 8105012A 2CFB 8105012C 2CFB 8105012E 2CFB 81050130 2CFB 81050132 2CFB 81050134 2CFB 81079D90 3F6C 81079D94 3F48 81079DA4 3D10 81079DB8 3F71 81079E6C 3F6C 81079E80 3D10 81079E90 3F47 81079F48 3F6C 81079F4C BF4C 81079F5C 3D10 81079F70 3F71 8107A024 3F6C 8107A028 3F28 8107A038 3D10 8107A04C 3F71 8107A100 3F6C 8107A114 3D10 8107A124 3F23 8107A1DC 3F6C 8107A1E0 BF2A 8107A1F0 3D10 8107A204 3F71 8107A2B8 3F6C 8107A2BC 3F02 8107A2CC 3D10 8107A2E0 3F71 8107A394 3F6C 8107A3A8 3D10 8107A3B8 3F00 8107A470 3F6C 8107A474 BF02 8107A484 3D10 8107A498 3F71 81050144 0569 81050154 07F7 810528F4 0C01 810528F6 0555 81050140 04F4 81050150 2CFB 8107A628 3F60 8107A63C 3D10 8107A64C 3F52 8107A650 BF80 8107A8BC 3F56 8107A8C4 BA00 8107A8D0 3D10 8107A8DC 3C5A 8107A8E0 3F30 8107A8E4 BF80 8107ADE4 3F56 8107ADEC BA00 8107ADF8 3D10 8107AE04 3C5A 8107AE08 3F0E 8107AE0C BF80 8107AB7C 3F00 D115AF56 2EB2 8115AEC6 0017 D115B2AE 2EB2 8115B21E 0017 D115B606 2EB2 8115B570 0017 D115B95E 2EB2 8115B8CE 0017 81052922 FFFF 81052924 FFFF 81052926 FFFF 8116C330 0000 8116C332 000A 8116C334 0000 8116C336 000A 8116C378 42B4 cn Replace Raw War with\BARBEDWIRE SQUARE\Part 2 cd Both Parts must be on for this Press the C Left Button to make your opponent bleed,These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8116C382 0000 8116C38C FFFF 81052C9C 0672 81052CA4 2CFB D1064880 0002 8115B21E 002F D1064886 0002 8115AEC6 002F 8116C3E4 0000 8116C3E6 000C 8116C3E8 0000 8116C3EA 000C 8116C428 C3D4 8116C440 FFFF 81052CB2 2CC2 81052CB4 0805 81052CB6 2CFB D1064880 2000 8116C3E6 001F D1064880 2000 8116C3EA 001F D1064880 2000 81005592 3F81 D1005592 3F81 8116C3E6 001F D1064880 2000 81005592 3F81 D1005592 3F81 8116C3EA 001F D1064886 2000 8116C3E6 001F D1064886 2000 8116C3E6 001F D1064886 2000 81005592 3F81 D1005592 3F81 8116C3EA 001F 81052CF8 04F4 81052D00 2CFB 8116C3E4 0000 8116C3E6 0015 8116C3E8 0000 8116C3EA 0015 8116C428 0000 8116C42A 0000 8116C42C 43EB 8116C42E 0000 8116C430 C3A6 8116C432 0000 8116C436 0400 8116C43A 0000 8116C43E 0000 8116C440 FFFF 8116C442 0000 810855A8 3F00 81085684 3F00 81085750 3F00 8108583C 3F00 81050100 2CFB 8105010E 2CFB cn Replace Raw War with\FLAMING TURNBUCKLES cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8116C334 FFFF 8116C336 001F 8116C374 C350 8116C376 FFF3 8116C378 4377 8116C37A 2689 8116C37C C380 8116C37E 0406 8116C382 0D14 8116C386 0FCC 8116C38A 07DC 8116C38C FFFF 8116C38E FDE3 8116C3E8 FFFF 8116C3EA 001F 8116C428 C360 8116C42C 4370 8116C430 4376 8116C436 0D14 8116C43A 0FCC 8116C43E 07DC 8116C442 F9C4 8116C49C FFFF 8116C49E 001F 8116C4DC 4360 8116C4E0 4370 8116C4E4 4380 8116C4EA 0CD0 8116C4EE 0136 8116C4F2 04EE 8116C4F6 F601 8116C550 FFFF 8116C552 001F 8116C590 434F 8116C594 4370 8116C598 C36C 8116C59E 0E70 8116C5A2 0F58 8116C5A6 0814 8116C5AA F1E6 cn Replace Raw War with\REMOVE RING cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 81050150 0000 81050152 0000 81050154 0000 810500E8 0000 810855A8 3F00 81085684 3F00 81085750 3F00 8108583C 3F00 81079C08 3F00 81079C14 3F00 81079B10 3F00 cn Replace Raw War with\BACKYARD ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105010E 0F76 8105010C 0F76 810482E8 002F 81050150 2CFD 810528F4 33FF 810528F6 33FF 81050152 2DC7 81050114 04F4 81050116 04F5 8105011E 04F3 81050128 07FF 8105012A 07FF 81050132 07FF 81079F48 400C 81079F5C 3F00 81079F70 3FFF 8107A024 4010 8107A038 3F00 8107A04C 4020 8107A060 3F84 8107A394 4012 8107A3A8 3F00 8107A3BC 4030 8107A3D0 3F84 8105042C 0949 81050436 07FF 81050438 07FF 8105043A 07FF 8105043C 0000 8105043E 07FF 81050440 0949 81050442 0949 81050430 0F76 81050128 07FF 8105012A 07FF 8105012C 0000 8105012E 07FF 81050130 07FF 81050132 07FF 81050134 0000 81050136 08F9 81050196 2CFD 81050194 09EF 81050192 0000 81050190 09EF 8116C49E 0019 8116C4B8 0004 8116C4DC C2E1 8116C4E0 42B4 810500FE 2D2D 81050100 2D2D 81050102 2D2D 81050400 2DC7 81050402 2DC7 81050404 2DC7 81050406 2DC7 81050408 2DC7 8105040A 2DC7 8105040C 2DC7 8105040E 2DC7 50001002 0000 810501B8 0000 50000402 0000 810501E0 0000 50000902 0000 81050262 0000 50001402 0000 81050290 0000 50002C02 0000 810502EC 0000 8107941C 3FE0 81079428 3FFF 810500EC 06FE 810500EE 06FD 810500F8 07FF 810500FA 0997 81050110 06FC 81050112 06FB 8105011A 06FF 8105011C 06FA 81052CF0 2CC9 81052CF4 2D1B 81052CD0 2CD1 81052CD4 0963 81052C84 2CBF 81052C8A 0961 81052CB8 2CC4 81052CBC 2DD7 81052CC8 2CD1 81052CCC 2CFB 81052C78 2CBC 81052C80 2D31 81052CF8 2CC1 81052D00 2DD7 cn Replace Raw War with\BACKYARD WEAK cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 0E88 8105042E 2D0D 81050430 2D0D 81050432 2D0D 81050434 2D0D 81050436 07FD 8105043A 2CFB 8105043C 2D0D 8105043E 2D0D 81050440 2D0D 81050442 2D0D 810500E8 2D0D 8105010E 2D0D 8105010C 2D0D 81050150 2D0D 81050196 2CFB 81050124 2CFB 81050126 2CFB 81050128 2CFB 8105012A 2CFB 8105012C 2CFB 8105012E 2CFB 81050130 2CFB 81050132 2CFB 81050134 2CFB 81050136 2CFB 81050400 2D0D 81050402 2D0D 81050404 2D0D 81050406 2D0D 81050408 2D0D 8105040A 2D0D 8105040C 2D0D 8105040E 2D0D 810528F4 2D0D 810528F6 2D0D 81052CE8 2CC9 81052CEC 2D2D cn Replace Raw War with\BARBEDWIRE ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 2CFB 8105042E 2CFB 81050430 2CFB 81050432 2CFB 81050434 2CFB 81050436 2CFB 81050438 2CFB 8105043A 2CFB 8105043C 2CFB 8105043E 2CFB 81050440 2CFB 81050442 2CFB 810500E8 2CFB 8105010E 2CFB 8105010C 2CFB 81050150 2CFB 81050196 2CFB 81050124 2CFB 81050126 2CFB 81050128 2CFB 8105012A 2CFB 8105012C 2CFB 8105012E 2CFB 81050130 2CFB 81050132 2CFB 81050134 2CFB 81050136 2CFB 810528F4 DDDD 810528F6 DDDD 81052CE8 2CCA 81052CEC 2CFB 81050400 2CFB 81050402 2CFB 81050404 2CFB 81050406 2CFB 81050408 2CFB 8105040A 2CFB 8105040C 2CFB 8105040E 2CFB cn Replace Raw War with\DUDLEY ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 21A7 8105042E 2D0D 81050432 2D0D 81050436 21A7 8105043E 2D0D 81050440 0000 81050442 0000 810500E8 2D0D 8105010C 2CFD 8105010E 2CFD 81050150 2D29 81050152 2CFB 81050400 09EF 81050402 09EF 81050404 0000 81050406 0000 81050408 0000 8105040A 0000 8105040C 09EF 8105040E 09EF 81050188 04F6 8105018A 04F7 8105018C 04F8 8105018E 04F9 81050190 09EF 81050192 0000 81050194 09EF 81050196 2D0D 810528F4 6666 810528F6 6666 81052CE8 2CC2 81052CEC 2D0D 81052D1C 2CD3 81052D1E 2CD4 81052D20 2CD5 81052D22 2CD6 81052D24 2CFD 81052D26 2CFD 81052D28 2CFB 81052D2A 2CFB 81050124 2CFD 81050126 2CFD 81050128 2CFD 8105012A 2CFD 8105012C 2CFD 8105012E 2CFD 81050130 2CFD 81050132 2CFD 81050134 2CFD 81050136 2CFD 81050154 2CFB 811533F8 002E cn Replace Raw War with\FLAME ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105010E 0EFE 8105010C 0EFE 810528F4 2508 810528F6 2508 81050430 2401 81050430 2401 81050404 2401 81050406 2401 81050408 2401 81050409 2401 8105040A 2401 8105040C 2401 810500E8 2401 cn Replace Raw War with\GREENWICH STREET ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 81050430 2DC5 81050436 0000 81050438 0000 8105043A 0000 8105043E 0000 810504E8 0EFE 8105010E 2DC5 8105010C 2DC5 81050196 2CFD 81050136 0FB6 81050134 0FC6 81050132 0FB6 81050130 0FC6 8105012E 0FB6 8105012C 0FC6 8105012A 0FB6 81050128 0FC6 81050126 0FB6 81050124 0FC6 81050440 0000 81050442 0000 50002C02 0000 81050378 0000 50002C02 0000 810502EC 0000 50001402 0000 81050290 0000 50000902 0000 81050262 0000 50000402 0000 810501CE 0000 50001002 0000 810501B8 0000 50000402 0000 810501E0 0000 8105042C 2D0D 81050430 0000 81050150 24F0 cn Replace Raw War with\HHH ARNEA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105040E 24EF 8105040C 24EF 8105040A 24EF 81050408 24EF 81050406 24EF 81050404 24EF 81050402 24EF 81050400 24EF 81050436 24E9 81050440 24E9 81050442 24E9 8105043E 24EF 8105042E 24EF 8105043C 24EF 8105042C 24E9 8105010E 24E9 8105010C 24E9 81050196 24E9 8105042E 24EF 81050432 24EF 810500F8 24EF 810500FA 24EF 810500FC 24EF 810500FC 24EF 81050100 24EF 81050100 24EF 81052CE8 2CCA 81052CEC 24EF 81050150 24E9 81050152 24E9 81050154 24E9 810528F4 24E9 810528F6 24E9 cn Replace Raw War with\HOSPITAL ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 0949 8105042E 283F 81050428 0949 81050430 0949 81050430 0949 81050436 096B 81050438 0993 8105043A 096B 8105043E 283F 81050440 283F 81050442 283F 810504E8 0949 81050150 283F 81050196 283F 81050400 283F 81050402 283F 81050404 283F 81050406 283F 81050408 283F 8105040A 283F 8105040C 283F 8105040E 283F 810500F8 283F 810500FA 283F 810500FC 283F 810500FE 283F 81050100 283F 81050100 283F 81052CE8 2CCA 81052CEC 283F 8105010E 283F 8105010C 283F 81050124 0949 81050126 0949 81050128 0949 8105012A 0949 8105012C 0949 8105012E 0949 81050130 0949 81050132 0949 81050134 0949 81050136 0949 810500E8 0949 810528F4 0000 81052CE0 2CC9 cn Replace Raw War with\KANE ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 0A61 8105042E 0A61 81050428 2B6C 81050430 2B6C 81050430 2B6C 81050436 2B57 81050438 2B57 8105043A 2B57 8105043E 0A61 81050440 2B57 81050442 2B57 810500E8 1B1E 8105010E 2D37 8105010C 209F 81050194 0955 81050196 2B57 81050400 2699 81050402 2699 81050404 2699 81050406 2699 81050408 2699 8105040A 2699 8105040C 2699 8105040E 2699 cn Replace Raw War with\SHIMMER ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 1932 8105042E 1932 81050430 1932 81050434 1932 81050432 1932 81050436 1932 81050438 1932 8105043A 1932 8105043E 1932 81050440 1932 81050442 1932 81050150 1932 81050152 1932 81050154 1932 81050190 1932 81050192 1932 81050194 1932 81050196 1932 81050124 1932 81050126 1932 81050128 1932 8105012A 1932 8105012C 1932 8105012E 1932 81050130 1932 81050132 1932 81050134 1932 81050136 1932 810500E8 1932 8105010E 1932 8105010C 1932 cn Replace Raw War with\SPACE SHIP ARENA cd These Replace Raw War Arena With what ever coice you make. Only use 1 option at a time. 8105042C 094D 8105042E 0953 81050430 0953 81050432 0F0E 81050434 0953 81050436 0F0E 81050438 0899 8105043C 0953 8105043E 0899 81050440 0963 81050442 0963 81050400 0953 81050402 0953 81050404 0953 81050406 0953 81050408 0953 8105040A 0953 8105040C 0953 8105040E 0953 810500E8 0A75 810528F4 7223 810528F6 0119 81050150 0963 81050152 0963 81050190 0953 81050192 0953 81050194 0953 81050196 0963 8105010E 0F0E 8105010C 0F0E 81050124 0F10 81050126 0F10 81050128 0F10 8105012A 0F10 8105012C 0F10 8105012E 0F10 81050130 0F10 81050132 0F10 81050134 0F10 81050136 0F10 810500F8 0963 810500FA 0963 810500FC 0963 810500FE 0963 81050100 0963 81050102 0963 81052CE8 2CCA 81052CEC 0963 cn Tables\IN RING TABLE\Part 1 cd To Make the Table look broken Keep the Z Button press down, To make player stand on the Table, Stand next to it & Keep C-Right Pressed Down.Put all Parts on Together for this Cheat to work 81052CF0 06E1 81052CF4 09F1 81052CF8 06E2 81052D00 09F1 81052D0C 06E3 81052D0E 06E4 81052D10 09EF 81052D12 09EF 81052D14 06E5 81052D16 06E6 81052D18 09EF 81052D1A 09EF D1064880 0001 8115AFB0 432C D1064880 0001 8115B308 432C D1064880 2000 8115AFB0 42B4 D1064880 2000 8115B308 42B4 8116C330 0000 8116C332 0014 8116C334 0000 8116C336 0014 8116C374 4210 8116C376 C0B1 8116C378 432F 8116C37A 51DC 8116C37C 4210 8116C37E 92F1 8116C382 0800 8116C386 05A0 8116C38A 0800 8116C38C FFFF 8116C38E F3BC 8116C3E4 0000 8116C3E6 0015 8116C3E8 0000 8116C3EA 0015 8116C428 4210 8116C42A C0B1 8116C42C 432F 8116C42E 51DC 8116C430 4210 8116C432 92F1 8116C436 0800 8116C43A 05A0 8116C43E 0800 8116C440 FFFF 8116C442 F3BC D1064880 2000 8116C378 42E0 cn Tables\IN RING TABLE\Part 2 cd To Make the Table look broken Keep the Z Button press down, To make player stand on the Table, Stand next to it & Keep C-Right Pressed Down.Put all Parts on Together for this Cheat to work D1064880 2000 8116C382 07E0 D1064880 2000 8116C38A 0680 D1064880 2000 8116C42C 42E0 D1064880 2000 8116C436 0820 D1064880 2000 8116C43E 0980 8116C498 0000 8116C49A 0017 8116C49C 0000 8116C49E 0017 8116C4DC 4210 8116C4DE C0B1 8116C4E0 432A 8116C4E2 51DC 8116C4E4 4210 8116C4E6 92F1 8116C4EA 0800 8116C4EE 05A0 8116C4F2 0800 8116C4F4 FFFF 8116C4F6 F3BC 8116C54C 0000 8116C54E 0018 8116C550 0000 8116C552 0018 8116C590 4210 8116C592 C0B1 8116C594 432A 8116C596 51DC 8116C598 4210 8116C59A 92F1 8116C59E 0800 8116C5A2 05A0 8116C5A6 0800 8116C5A8 FFFF 8116C5AA F3BC D1064880 2000 8116C4E0 42E0 D1064880 2000 8116C4EA 07E0 D1064880 2000 8116C4F2 0680 D1064880 2000 8116C594 42E0 D1064880 2000 8116C59E 0820 D1064880 2000 8116C5A6 0980 cn Novalty\Truck In The Crowd 81050110 0747 81050112 0748 81050114 0749 81050116 074A 81050118 074B 81050124 0A4B 81050126 0A43 81050128 0A4B 8105012A 0A43 8105012C 0A43 8105012E 0A43 8105011A 074C 8105011C 074D 81050130 0A43 8105011E 074E 81050132 0A43 81050120 0746 81050134 0A4B 81050122 0743 81050136 0A4B D1064880 2000 8115AFB0 42EE D1064880 2000 8115B308 42EE cn CPU To Human Control\Player 4 8015B9A1 ???? 0017:"Human",0018:"CPU" cn Clock At 00:00 8115AB1E 0000 810A99F2 0000 cn Hacked Moves\Dragon Screw Stunner cd Dragon Screw 02 P1 does a Dragon Screw then picks up P2 (still holding his leg) and spins him around and gives him a Stone Cold Stunner D106B454 3749 D106B456 0094 8106B460 00E9 D106B454 3749 D106B456 0094 8106B462 B9BE D106B514 374A D106B516 0094 8106B520 00E9 D106B514 374A D106B516 0094 cn Hacked Moves\Morality Check to Back of head cd Replaces: Back Clothesline P1 is immediately backed up and does the Morality Check to P2 in the back of the head (misses by a little) D106B454 3892 D106B456 0000 8106B460 00B3 D106B454 3892 D106B456 0000 8106B462 194C cn Hacked Moves\Dragon Screw Suplex cd Replaces: Double Dragon Screw 02 P1 does a Dragon screw then picks then up (still holding their feet) and does a capture suplex. D106B454 3749 D106B456 007C 8106B460 00AD D106B454 3749 D106B456 007C 8106B462 DB2A D106B514 374A D106B516 007C 8106B520 00AD D106B514 374A D106B516 007C 8106B522 EAE0 D106B454 3749 D106B456 00A5 8115AF52 0000 D106B514 374A D106B516 00A5 8115B2AA 0000 cn Hacked Moves\Dominator into HHH Facebuster cd Replaces: Dominator D106B454 3810 D106B456 005C 8106B560 011A D106B454 3810 D106B456 005C 8106B562 A256 D106B514 3811 D106B516 005C 8106B520 011A D106B514 3811 D106B516 005C 8106B522 ACB0 D106B454 3810 D106B456 0075 8115AF52 0000 cn Hacked Moves\Capture Tazzplex cd Replaces: Capture Suplex P1 grabs P2's feet like a capture suplex, then lets go & does a Tazzplex. D106B454 3689 D106B456 0021 8106B460 00BC D106B454 3689 D106B456 0021 8106B462 A5E2 D106B514 368A D106B516 0021 8106B520 00BC D106B514 368A D106B516 0021 8106B522 B6BE cn Hacked Moves\Running Rock Bottom cd Replaces: Farooq Spinebuster P2 runs into P1 and P1 delivers a RockBottom to P2. D106B454 3A80 D106B456 0000 8106B460 00C1 D106B454 3A80 D106B456 0000 8106B462 F7A2 D106B514 3A81 D106B516 0000 8106B520 00C2 D106B514 3A81 D106B516 0000 8106B522 1210 cn Hacked Moves\Running Tazplex cd Replaces: Underhook Belly to Belly P2 runs into P1 and P1 does a Tazplex to P2. D106B454 3A7A D106B456 0000 8106B460 00BC D106B454 3A7A D106B456 0000 8106B462 A51E D106B514 3A7B D106B516 0000 8106B520 00BC D106B514 3A7B D106B516 0000 8106B522 B5FA cn Tables\MOVABLE TABLES\Part 1 cd You must use both parts for this cheat to work 81052C24 06E1 81052C26 06E3 81052C2C 09F1 81052C2E 09EF 81052C30 06E2 81052C32 06E5 81052C38 09F1 81052C3A 09EF 81052C48 06E4 81052C4A 06E6 81052C50 09EF 81052C52 09EF 8116C3E4 0000 8116C3E6 0001 8116C3E8 0000 8116C3EA 0001 8116C498 0000 8116C49A 0003 8116C49C 0000 8116C49E 0003 8116C330 0000 8116C332 0000 8116C334 0000 8116C336 0000 D116C556 0000 8116C33A 0000 D116C33A 0000 8116C3EE 0000 D116C3EE 0000 8116C4A2 0000 D116C556 0001 8116C33A 0001 D116C33A 0001 8116C3EE 0001 D116C3EE 0001 8116C4A2 0001 D116C556 0002 8116C33A 0002 D116C33A 0002 8116C3EE 0002 D116C3EE 0002 8116C4A2 0002 D116C556 0003 8116C33A 0003 D116C33A 0003 8116C3EE 0003 D116C3EE 0003 8116C4A2 0003 D116C556 FFFF 8116C33A FFFF D116C33A FFFF 8116C3EE FFFF D116C3EE FFFF 8116C4A2 FFFF D216C556 FFFF 81079B10 3F80 D1064886 2000 81079B10 3F81 D106488C 2000 81079B10 3F81 D1064892 2000 81079B10 3F81 cn Tables\MOVABLE TABLES\Part 2 cd You must use both parts for this cheat to work D116C33A FFFF 8116C382 0000 D116C382 0000 8116C386 0000 D116C386 0000 8116C38A 0000 D116C38A 0000 8116C38E 0000 D116C38E 0000 8116C436 0000 D116C436 0000 8116C43A 0000 D116C43A 0000 8116C43E 0000 D116C43E 0000 8116C442 0000 D116C442 0000 8116C4EA 0000 D116C4EA 0000 8116C4EE 0000 D116C4EE 0000 8116C4F2 0000 D116C4F2 0000 8116C4F6 0000 D116C594 42B4 D116C556 FFFF 8116C378 4335 D116C378 4335 8116C42C 4335 D116C42C 4335 8116C4E0 4335 D116C594 3DC7 D116C556 FFFF 8116C378 42B0 D116C378 42B0 8116C42C 42B0 D116C42C 42B0 8116C4E0 42B0 D1064880 2000 81079B10 3F81 D1079B10 3F81 D116C594 42B4 D116C556 FFFF 8116C378 42F0 D116C378 42F0 8116C42C 42F0 D116C42C 42F0 8116C4E0 42F0 D1079B10 3F81 8116C38A 0F00 D116C38A 0F00 8116C43E 0100 D116C594 3C93 8116C378 42B0 81052D18 0000 81052D1A 0000 D116C54C 0000 8116C54E 0018 D116C550 0000 8116C552 0018 cn Tables\Sabu Table cd Breakable/Fixable/Rebreakable/Refixable press Z to break, C-right + Cdown to fix 8116C49A 000C 8116C49E 000C 8116C4DC 43CC 8116C4E0 42E6 8116C4E4 C2C5 8116C4EE 0800 8116C602 000C 8116C606 000C 8116C648 42E6 8116C644 43CC 8116C64C C314 81052C54 06E3 81052C5C 09EF 8116C6F8 43CC 8116C6FC 42F0 8116C700 C2F1 8116C70A 0400 8116C428 43CC 8116C430 C2D0 8116C42C 42F0 8116C43A 0C00 8116C6B6 0004 8116C6BA 0004 8116C3E6 0004 8116C3EA 0004 D1064880 2000 81005592 3F81 D1005592 3F81 8116C4EA 0F00 D1005592 3F81 8116C652 0100 D1005592 3F81 8116C4E0 4240 D1005592 3F81 8116C648 4240 D1064880 0005 81005CD4 3F83 D1005CD4 3F83 8116C4EA 0000 D1005CD4 3F83 8116C652 0000 D1005CD4 3F83 8116C4E0 42E6 D1005CD4 3F83 8116C648 42E6 D1005CD4 3F83 D1064880 2000 81005CD4 0000 crc C71353BE-AA09A6EE-C:50 gn WWF WrestleMania 2000 (E) cn Have All Characters 8109ED5A FFFF cn Infinite Create-A-Wrestler Attribute Points 8011A81B 001E cn Timer Is Always 00:00 8016F0AF 0000 cn Max Attributes 8011A811 0032 8011A813 0032 8011A815 0032 8011A817 0032 8011A819 0032 cn Weapon Select\Player 1 81167236 0300 81166D90 ???? 0000:"Broom",0101:"Shovel",0202:"Red And White Hockey Stick",0303:"Guitar",0404:"Night Stick",0505:"Head",0606:"Black Hockey Stick",0707:"Bottle",0808:"2x4",0909:"Big Purple Sheet",0A0A:"White Jug",0B0B:"Suit Case",0C0C:"Stick",0D0D:"Head",0E0E:"Big Mallot",0F0F:"Black Microphone",1010:"BaseBall Bat",1111:"Folding Chair",1212:"Board",1313:"Stairs",1414:"Trashcan",FFFF:"Nothing" 81166D92 0000 80166E50 0000 cn Weapon Select\Player 2 811676CA 0300 81166DC0 ???? 0000:"Broom",0101:"Shovel",0202:"Red And White Hockey Stick",0303:"Guitar",0404:"Night Stick",0505:"Head",0606:"Black Hockey Stick",0707:"Bottle",0808:"2x4",0909:"Big Purple Sheet",0A0A:"White Jug",0B0B:"Suit Case",0C0C:"Stick",0D0D:"Head",0E0E:"Big Mallot",0F0F:"Black Microphone",1010:"BaseBall Bat",1111:"Folding Chair",1212:"Board",1313:"Stairs",1414:"Trashcan",FFFF:"Nothing" 80166DC2 0001 80166E51 0001 cn Weapon Select\Player 3 81167B5E 0300 81166DF0 ???? 0000:"Broom",0101:"Shovel",0202:"Red And White Hockey Stick",0303:"Guitar",0404:"Night Stick",0505:"Head",0606:"Black Hockey Stick",0707:"Bottle",0808:"2x4",0909:"Big Purple Sheet",0A0A:"White Jug",0B0B:"Suit Case",0C0C:"Stick",0D0D:"Head",0E0E:"Big Mallot",0F0F:"Black Microphone",1010:"BaseBall Bat",1111:"Folding Chair",1212:"Board",1313:"Stairs",1414:"Trashcan",FFFF:"Nothing" 80166DF2 0002 80166E52 0002 cn Weapon Select\Player 4 81167FF2 0300 81166E18 ???? 0000:"Broom",0101:"Shovel",0202:"Red And White Hockey Stick",0303:"Guitar",0404:"Night Stick",0505:"Head",0606:"Black Hockey Stick",0707:"Bottle",0808:"2x4",0909:"Big Purple Sheet",0A0A:"White Jug",0B0B:"Suit Case",0C0C:"Stick",0D0D:"Head",0E0E:"Big Mallot",0F0F:"Black Microphone",1010:"BaseBall Bat",1111:"Folding Chair",1212:"Board",1313:"Stairs",1414:"Trashcan",FFFF:"Nothing" 81166E1A 0003 80166E53 0003 cn Always Special\Player 1 80167235 0004 cn Always Special\Player 2 801676C9 0004 cn Always Special\Player 3 80167B5D 0004 cn Always Special\Player 4 80167FF1 0004 cn Specials Don't Run Out 8112AD94 2400 cn Max Spirit\Player 1 801671F5 00FF cn Always Normal Spirit\Player 1 801671F5 0032 cn No Spirit\Player 1 801671F5 0000 cn Max Spirit\Player 2 80167689 00FF cn Always Normal Spirit\Player 2 80167689 0032 cn No Spirit\Player 2 80167689 0000 cn Max Spirit\Player 3 80167B1D 00FF cn Always Normal Spirit\Player 3 80167B1D 0032 cn No Spirit\Player 3 80167B1D 0000 cn Max Spirit\Player 4 80167FB1 00FF cn Always Normal Spirit\Player 4 80167FB1 0032 cn No Spirit\Player 4 80167FB1 0000 cn Ultimate Codes\Player 1 801671F4 0064 cn Ultimate Codes\Player 2 80167688 0064 cn Ultimate Codes\Player 3 80167B1C 0064 cn Ultimate Codes\Player 4 80167FB0 0064 cn Easy Pins & Longer Submissions\Player 2 80167688 0064 cn Easy Pins & Longer Submissions\Player 3 80167B1C 0064 cn Easy Pins & Longer Submissions\Player 4 80167FB0 0064 cn Easy Pins & Longer Submissions\Player 1 801671F4 0064 crc 0A1667C7-293346A6-C:50 gn Xena Warrior Princess - Talisman of Fate (E) cn Infinite Health\Player 1 810B5EF0 42C8 cn Invisibility\Player 1 810BF3A2 0001 cn Infinite Health\Player 2 810B60D4 42C8 cn 1 Win To Win\Player 1 D00C0983 0000 800C0983 0001 cn 1-Hit Death to Player 2\Player 1 D10B60D4 42C8 810B60D4 4080 cn Player 2 Has No Energy\Player 1 810B60D4 C080 cn P2 Never Wins\Player 1 800C0985 0000 cn Needs 1 Win To Win\Player 2 D00C0985 0000 800C0985 0001 cn 1-Hit Death to Player 1\Player 2 D10B5EF0 42C8 810B5EF0 4080 cn Player 1 Has No Energy\Player 2 810B5EF0 C080 cn P1 Never Wins\Player 2 800C0983 0000 cn Join River Team cd Select Quest Mode 810BF482 0001 cn Fight Forest Team cd Select Hardest Difficulty + Quest Mode 810BF482 0001 cn Unlock Titan Difficulty Level 810BF4D2 0001 crc D3F97D49-6924135B-C:50 gn Yoshi's Story (E) //--------------- PAL (A) Region Cheat Codes cn Infinite\Health cd This is for All Yoshis All levels 50000804 0000 800F954F 0008 cn Infinite\Lives cd This is for All Yoshis All levels 800F958F 00FF cn Infinite Eggs cd This is for All Yoshis All levels 80285078 0006 crc 155B7CDF-F0DA7325-C:55 gn BANJO TOOIE cn Infinite\Energy\Banjo and Kazooie cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011FFA9 0063 81120584 0A0A cn Infinite\Energy\Snowball cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011FFA9 0063 80120587 0005 cn Infinite\Energy\Bee cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011FFA9 0063 80120593 000A 80120594 000A cn Infinite\Energy\Washing Machine cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011FFA9 0063 81120596 0A0A cn Infinite\Energy\Stony cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011FFA9 0063 80120599 000A 8011B44A 000A cn Infinite\Energy\Banjo cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011FFA9 0063 8012059F 000A 801205A0 000A cn Infinite\Energy\Kazooie cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011FFA9 0063 811205A2 0A0A cn Infinite\Energy\Submarine cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011FFA9 0063 801205A5 000A 801205A6 000A cn Infinite\Energy\Mumbo cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011FFA9 0063 811205A8 0A0A cn Infinite\Energy\Detonator cd With Infinite Energy On Avoid Picking up the ! Or ? Stop Energy Honey Combs or you will be stuck. 8011FFA9 0063 811205AE 0A0A cn Infinite\Energy\T-Rex Baby 8011FFA9 0063 801205BF 000A 801205C0 000A cn Infinite\Air 8112FDC2 42C8 cn Instant Warp\Options\Not sure cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8012C390 ???? 00FC:"Lord woo fak fak",00F9:"Mr Patch",0121:"Inside Chuffy's wagon",0134:"Mumbo's Skull",0135:"Humba Wumba's wigwam 1",0157:"Humba Wumba's wigwam 2",019B:"Jingalings Zombified Palace",01A6:"Smuggler cavern",0141:"Inside the digger tunnel",0143:"Bottles house",0169:"Bottles house still",018A:"HAG Inside",019A:"HAG1 Final Boss" 8012C393 0001 cn Instant Warp\Options\Cauldron Keep cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8112C390 ???? 015D:"Cauldron Keep",015E:"The gatehouse",015F:"Tower of Tragedy Quiz",0160:"Gun chamber",016A:"Gun room still",017B:"Crazy Castle Stockade balloon burst multi",017C:"Crazy Castle Stockade Jump the hoops multi",017D:"Grunty Industries packing game",0180:"Colosseum kickball arena",0186:"Dodgems" 8012C393 0001 cn Instant Warp\Options\Spiral Mountain cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8112C390 ???? 00AD:"Grunty's Old Lair",00AE:"Behind The Waterfall",00AF:"Top Of Castle",0173:"Banjo's house" 8012C393 0001 cn Instant Warp\Options\Jinjo Village cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8112C390 ???? 0142:"Jinjo Village",0144:"King Jingalings throne room",0143:"Bottles house",0145:"Green Jinjo's House",0146:"Black Jinjo's House",0147:"Yellow Jinjo's House",0148:"Blue Jinjo's House",014A:"Brown Jinjo's House",014B:"Orange Jinjo's House",014C:"Purple Jinjo's House",014D:"Red Jinjo's House",014E:"White Jinjo's House" 8012C393 0001 cn Instant Warp\Options\Mayahem Temple cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8112C390 ???? 00B6:"Humba's Wigwam",00B7:"Mumbo's skull",00B8:"The Temple",00B9:"Prison Compound",00BC:"Code chamber",00C4:"Jade Snake Grove",00C5:"Treasure Chamber",00C6:"Kickball Arena",0177:"Targitzan's Slighty Sacred Temple",0178:"Inside Targitzans Temple",0179:"Targitzan Temple Lobby",017A:"Targitzan's Temple Boss",017F:"Mayan Kickball Arena",0166:"Multi",0167:"Still",00C8:"Kickball Arena",00C9:"Kickball Arena" 8012C393 0001 cn Instant Warp\Options\Glitter Gulch Mine cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8112C390 ???? 00C7:"Mine",00CA:"Fuel depot",00CB:"Crushing shed",00CC:"Flooded caves",00CD:"Water storage",00CE:"Waterfall cavern",00CF:"Power hut basement",00D0:"Chuffy's cab",00D1:"Inside chuffy's boiler boss",00D2:"Gloomy caverns",00D3:"Generator caverns",00D4:"Power hut",00D5:"Wumba's wigwam",00D7:"Train station",00D8:"Prospectors hut",00D9:"Mumbo's hut",00DA:"Toxic gas cave",00DB:"Canary cave",00DC:"Ordnance storage",00E9:"Humba",0126:"Water supply pipe",0163:"Ordnance Storage entrance",0164:"Ordnance Storage game",0165:"Ordnance Storage game Multi",016F:"Testing",0170:"Testing",0171:"Mumbo's skull" 8012C393 0001 cn Instant Warp\Options\Witchy World cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8112C390 ???? 00D6:"Witcy World",00DD:"Dodgem dome lobby",00DE:"Dodgem challenge \"1 vs 1\"",00DF:"Dodgem challenge \"2 vs 1\"",00E0:"Dodgem challenge \"3 vs 1\"",00E1:"Crazy castle stockade",00E2:"Crazy castle lobby",00E3:"Crazy castle pump room",00E4:"Balloon burst game",00E5:"Hoop hurry game",00E6:"Star spinner",00E7:"The inferno",00EA:"Cave of horrors",00EB:"Haunted cavern",00EC:"Train station",0124:"Saucer of Peril",013B:"Crazy castle stockade \"sop\"",013C:"Star spinner \"sop\"",0176:"Mumbo's skull" 8012C393 0001 cn Instant Warp\Options\Jolly Roger's Lagoon cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8112C390 ???? 00ED:"Jolly's",00EE:"Pawno's emporium",00EF:"mumbo's skull",00F4:"Ancient Swimming Baths",00F6:"Electric Eels lair",00F7:"Seaweed Sanctum",00F8:"Inside the big fish",00FA:"temple of the fishes",01A8:"Atlantis",01A9:"Seabottom",0181:"sea bottom cavern",0182:"submarine multi",01A7:"Jolly Roger's Lagoon",00FF:"Blubber's wave race hire" 8012C393 0001 cn Instant Warp\Options\Terrydacty Land cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8112C390 ???? 0112:"Terrydacty Land",0113:"Terry's nest",0114:"Train station",0115:"Oogle boogles cave",0116:"Inside the mountain",0117:"River passage",0118:"Styracosaurus family cave",0119:"Unga bunga's cave",011A:"Stomping plains",011B:"Bonfire caverns",011E:"Humba's Wigwam",0123:"Inside chompa's belly",0183:"Chompa's belly multi" 8012C393 0001 cn Instant Warp\Options\Grunty Industries cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8112C390 ???? 0100:"Outside",0101:"Inside",0102:"Train station",0103:"Workers quarters",0104:"Trash compactor",0105:"Elevator shaft",0106:"Floor 2",0107:"Floor 2 \"electromagnet chamber\"",0108:"Floor 3",0109:"Floor 3 \"boiler plant\"",010A:"Floor 3 \"packing room\"",010B:"Floor 4",010C:"Floor 4 \"cable room\"",010D:"Floor 4 \"quality control\"",010E:"Floor 5",010F:"Basement",0110:"Basement \"repair depot",0111:"Basement \"waste disposal\"",0125:"Water supply pipe",0172:"Mumbo's skull",0162:"Floor 4 \"clinkers cavern\"",0187:"Sewer entrance" 8012C393 0001 cn Instant Warp\Options\Hailfire Peaks cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8112C390 ???? 0127:"Lava side",0128:"Icy side",0129:"Lava train station",012A:"Ice train station",012B:"Chilli billi",012C:"Chilly willy",012D:"Colosseum kickball stadium lobby",0131:"Boggy's igloo",0132:"Icicle grotto",0133:"Inside the volcano",0168:"Icy side still" 8012C393 0001 cn Instant Warp\Options\Cloud Cuckoo Land cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8112C390 ???? 0136:"Cloud Cuckoo Land 1",0137:"Inside the trashcan",0138:"Inside the cheesewedge",0139:"Zubba's nest",013A:"Central cavern",013D:"Inside the pot o gold",013E:"Mumbo's skull",013F:"Mingy jongo's skull",0140:"Humba wumba's wigwam",0161:"Cloud Cuckoo Land 2",0188:"Zubba's nest multi",0185:"Trash can mini" 8012C393 0001 cn Instant Warp\Options\Isle O Hags cd Only use one Instant Warp Option At once, Make sure the other is off before putting this one on D008B284 0000 8112C390 ???? 014F:"Wooded Hollow",0150:"Heggy's egg shed",0151:"Jiggywiggy's temple",0152:"Plateau",0153:"Plateau \"Honey B's Hive\"",0154:"Pine Grove",0155:"Cliff top",0156:"Cliff top Mumbo's skull",015A:"wasteland",015B:"inside another digger tunnel",015C:"Quagmire" 8012C393 0001 cn Play As cd To use this cheat, put the cheat on, then press L as you walk through a door to become that chosen character D108B284 0000 8012BD9C ???? 0001:"Banjo and Kazooie",0002:"Snowball",0006:"Bee",0007:"Washing machine",0008:"Stony",000A:"Banjo",000B:"Kazooie",000C:"Submarine",000D:"Mumbo",000E:"Golden Goliath",000F:"Detonator",0010:"Truck",0012:"T-rex baby",0013:"T-rex daddy" cn Beta Bottles Revenge Mode cd Bottles Revenge is a Beta mode from Banjo Tooie that the RWP team recently uncovered after an extraordinary amount of effort. Bottles the Spirit transforms into Bottles the Devil and posses enemies nearby and allows a second player hooked up to Pad 2 to play as that Posses character to try to foil Banjos Plans. As player one goes about its business, player two uses every enemy nearby to try to nab Banjo and take away some life. This mode is incredible, and you can control almost every enemy in the game: slot machines, flying creatures, uggers, zubbas...and this is just the beginning. (Congrats Rare Witch Project) 80130172 0001 8008B4D1 0002 crc 7BB18D40-83138559-C:55 gn Pokemon Snap (A) cn [Enable All Levels] cd This is needed to be able to Play all Levels of the Game 810C2CD2 0006 crc 2483F22B-136E025E-C:55 gn Lylat Wars (A) cn Unlimited\Boost 8113E6FC 0000 8113E6FE 0000 811415DC 0000 811415DE 0000 8013E7FD 0000 801416DD 0000 cn Have All Medals cd For Expert & Normal Modes 50000802 0000 8017A9D9 7777 cn Infinite\Hyper Laser 80163B13 0002 cn Loads O' Hits 80163B03 00FF cn Infinite\Armor\Slippy 8017418B 00FF cn Infinite\Energy 80141587 00FF 8013E6A7 00FF cn Infinite\Lives 80163B09 0063 cn Unlimited\Smart Bombs 80179E0B 0063 cn Infinite\Armor\Falco 80174187 00FF cn Infinite\Armor\Peppy 8017418F 00FF cn Infinite\Dual Blue Lasers 80163C13 0002 cn Level Select 8017A29F ???? 0000:"Corneria",0001:"Meteo",0002:"Sector X",0003:"Area 6",0004:"Glitch",0005:"Sector Y",0006:"Venom 1",0007:"Solar",0008:"Zoness",0009:"Venom 2",000A:"Training Mode Level",000B:"Macbeth",000C:"Titania",000D:"Aquas",000E:"Fortuna",0010:"Katina",0011:"Bolse",0012:"Sector Z",0013:"Venom With Starwolf",0014:"Corneria (Multi)" cn 999 Kills 80163B03 00FF crc DD26FDA1-CB4A6BE3-C:55 gn Super Smash Bros. (A) //--------------- PAL (F) Region Cheat Codes cn Give Kirby A Wierd Blow-Up 8025E898 000A cn Story Mode\Skip Straight To Master Hand 800A5227 000D cn Story Mode\Infinite Time 810A526E 43CB cn Story Mode\Player 1\Infinite Lives 800A5283 0004 cn Story Mode\Player 2\Infinite Lives 800A52F7 0004 cn Story Mode\Player 3\Infinite Lives 800A536B 0004 cn Story Mode\Player 4\Infinite Lives 800A53DF 0004 cn Story Mode\Player 1\Low % Health 810A52C6 0000 cn Story Mode\Player 2\Low % Health 810A533A 0000 cn Story Mode\Player 3\Low % Health 810A53AE 0000 cn Story Mode\Player 4\Low % Health 810A5422 0000 cn Story Mode\Player 1\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code could also result freezing at the end of the Level. 800A527B ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 2\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A52EF ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 3\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A5363 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 4\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A53D7 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Story Mode\Player 1\Kirby B Button Move\Hyrule Castle 8026924F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Yoshi's Island 8026958F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Sector Z 80271837 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Peach's Castle 802644DF ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Saffron City 802741D7 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Congo Jungle 8027120F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Kirby's Dreamland 8026E27F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Planet Zebes 802706E7 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Metal Mario Stage 80263CD7 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Fighting Polygon Team 80262E5F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn Story Mode\Player 1\Kirby B Button Move\Master Hand Stage 8027238F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn VS. Mode\Infinite Time 810A545E 43CB cn VS. Mode\Player 1\Low % Health 810A54B6 0000 cn VS. Mode\Player 2\Low % Health 810A552A 0000 cn VS. Mode\Player 3\Low % Health 810A559E 0000 cn VS. Mode\Player 4\Low % Health 810A5612 0000 cn VS. Mode\Player 1\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A546B ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 2\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A54DF ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 3\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A5553 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 4\Character Modifier cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 800A55C7 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn VS. Mode\Player 1\Kirby B Button Move\Hyrule Castle 8026412F ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn VS. Mode\Player 1\Kirby B Button Move\Yoshi's Island 8026E9F7 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn VS. Mode\Player 1\Kirby B Button Move\Sector Z 8026C6C7 ???? 0002:"D.K. Wind-up Punch",000A:"Jigglypuff Puff Punch" cn P1 Press Down On D-Pad To Make Items Appear In Random Spots D109F6E4 0400 8118D7E2 0001 cn Have All Characters 810A5078 0FF0 cn VS. Mode\Have Mushroom Kindom 800A5077 00FF cn Story Mode\Always Get Pacifist (60,000 Points) 810A52AE 0000 cn Bonus Stage Character Modifier (Training Mode) cd Only put this on after you have alreay Chose your Character on the Main Menu,& Do not use more then 1 Character Modifier at a time.Using this Code This could also result freezing at the end of the Level. 8018F913 ???? 0000:"Mario",0001:"Fox",0002:"DK",0003:"Samus",0004:"Luigi",0005:"Link",0006:"Yoshi",0007:"C. Falcon",0008:"Kirby",0009:"Pikachu",000A:"Jigglypuff",000B:"Ness",000C:"Master Hand",000D:"Metal Mario",000E:"Polygon Mario",0010:"Polygon DK",0013:"Polygon Link",0014:"Polygon Yoshi",0015:"Polygon Samus",0018:"Polygon Kirby",001A:"Giant Donkey Kong" cn Jump off to win 810A5282 0000 crc 2B38AEC0-6350B810-C:46 gn A Bug's Life (F) cn Infinite\Lives 801E27C0 0009 cn Infinite\Health 801E27B5 0004 cn Always Have\Super Jump 811E27B0 0020 cn Always Have\50 pieces of corn 801E27C1 0032 cn Have F-L-I-K 801E27C2 000F cn Unlock All Levels 81099E90 000F cn Have All Goldberry Tokens 811E27AE 0000 cn Start with Berry Weapon 801E27B7 ???? 0001:"Blueberry",0002:"Homing Berry",0003:"Goldberry",0004:"Super Berry ?" cn No Music 801DD966 0000 cn Subtitles On 801DDBDB ???? 0000:"Off",0001:"On" cn Levitate cd "Press R To Levitate & Let go to land (:" D0090001 0010 811E2726 1000 D0090001 0010 811E2736 1000 crc 0C41F9C2-01717A0D-C:46 gn Fighter's Destiny (F) cn Start with Stars Modifier\Player 1 D0209837 0000 80209837 ???? 0000:"No Stars",0006:"Max Stars" cn Start with Stars Modifier\Player 2 D020B6FF 0000 8020B6FF ???? 0000:"No Stars",0006:"Max Stars" cn Have 1 Star\Ryuji 8030742E 0001 cn Have 1 Star\Bob 8030742F 0001 cn Have 1 Star\Pierre 80307430 0001 cn Have 1 Star\Meiling 80307431 0001 cn Have 1 Star\Leon 80307432 0001 cn Have 1 Star\Abdul 80307433 0001 cn Have 1 Star\Ninja 80307434 0001 cn Have 1 Star\Tomahawk 80307435 0001 cn Have 1 Star\Valerie 80307436 0001 cn Infinite Health\Player 1 80209981 0000 802048A3 0000 cn Infinite Health\Player 2 802048A7 0000 8020B849 0000 cn Start on stage 100 on Survival to get Joker 802EF67B 0063 cn Stop timer for Fastest to get Robot 810ADBDC 3F80 crc 1E12883D-D3B92718-C:46 gn Duke Nukem 64 (F) cn Access all In-Game cheats 50000504 0000 80100D98 0001 cn Infinite\Ammo & All Guns cd Ena\ble and then simply pause in game play & then unpause and then press left and right. 50000C02 0000 812A5F84 02F4 cn Access\All Items cd To access simply pause in game play & then unpause. 80100D7C 0001 cn Invincibility 802AAFE8 0001 cn Access\All Keys 802A5FC7 000F cn Infinite\Holoduke 812A5FAC 0640 cn Infinite\Night Vision 812A5FDC 0664 cn Infinite\Scuba Gear 812A600C 0640 cn Crosshair 802A6074 ???? 0001:"On",0000:"Off" cn Max auto-aim On 802A6075 0002 cn Upgraded Plasma Gun 802A5FB3 0063 crc B35FEBB0-7427B204-C:46 gn Holy Magic Century (F) cn Set Agility to 999-999 8107D384 03E7 cn Set Defence to 999-999 8107D386 03E7 cn Makes your MP 999-999 8107D380 03E7 8107D382 03E7 cn Makes your HP 999-999 8107D37C 03E7 8107D37E 03E7 cn Have All Elements 8107D39C 3232 8107D39E 3232 cn Earn Spirits Faster 8007D3AD 0000 cn No Random Battles 8008DE6C 0000 8008DE6E 0000 crc 29A045CE-ABA9060E-C:46 gn =Hydro Thunder (F) cn Always 1st 812C56A6 0001 cn Infinite\Time 812B52A0 42C8 cn Infinite\Boosts\Player 1 812C56AC 4190 cn Have All\Ships 50000702 0000 812B66B2 0101 cn Have All\Races 50000702 0000 812B66A4 0101 cn Infinite\Boosts\Player 2 812C59DC 4190 crc 001A3BD0-AFB3DE1A-C:46 gn Disney's Tarzan (F) cn Infinite\Health 81192320 0120 cn Have\Coins Collected 100% 800DD547 0064 cn Have\Level & Tokens Completed 100% 800DD51F 0000 800DD520 0001 800DD521 0000 cn Access Level Select cd On the main menu Scroll down to make CHEATS visible to go into Level Select.For in-Game Cheats,Pause gameplay. 810DD50C 8001 cn Infinite\Lives 800DD542 ???? 0003:"3 Lives",0063:"99 Lives" cn Have\All TARZAN Letters 800DD515 00FF cn Have\Full Portrait 800DD514 00FF cn Infinite\Red Weapon 811921F8 0063 cn Infinite\Green Weapon 811921F6 0063 cn Infinite\Purple Weapon 811921FA 0063 cn Press GS For\Sabor Attacks\Sabor 1 Hit Kill 8924A23E 0001 cn Infinite\Bonus Timer cd This is For All Timers on Bonus Levels 801736DE 0025 crc 5C1B5FBD-7E961634-C:46 gn Hexen (F) cn Access In-Game Cheat Menu cd To Access Pause Game Play. This gives you access to In-game Cheats like God Mode,Level Select,All Items Etc 81137DB6 07FF 80137E93 0005 crc CB93DB97-7F5C63D5-C:46 gn Toy Story 2 (F) cn Have 99 coins 810BBBDE 0063 cn Have all 5 collectables 801C8542 0005 cn Infinite Lives 800BBBDA 0009 cn Infinite Battery Power 810BBBD6 000E cn Hold jump to fly 810BBBCC 0002 crc EA06F8C3-07C2DEED-C:46 gn Shadow Man (F) cn Have All\Items cd Youll not miss out any part of the game for having all parts of LEclipsers with a new game D0059047 0001 50001D20 0000 80030613 000B cn Have All\Gads & The Poign 80030E57 000F cn Have All\Levels Unlocked 5000101C 0000 80030A0E 0001 cn Have All\Cheats: Book of Shadows 81075F4E 0FFF cn Have All\Dark Souls Collected D00590B3 0001 80075F49 007C cn Infinite\Shotgun Shells 80075B2F 0063 cn Infinite\Violator Ammo 81075B32 029A cn Infinite\Cadeaux' 81075B36 029A cn Infinite\0.9mm Ammo 81075B3A 0190 cn Infinite\Max Health/Air/Shadow Charge & Voodoo Power 50000604 0000 81075B16 2710 cn Infinite\Accumulators 800306D7 0005 cn Infinite\Retractors 800308B7 0003 cn Infinite\Prisms 80030957 0003 cn Ammo always displayed on screen 50000408 0000 80075ACD 0007 cn Press L To Levitate D0059097 0020 80075578 0041 cn Always Play As Deadwing Character 80075F53 0001 crc BA6C293A-9FAFA338-C:46 gn Pokemon Snap (F) //--------------- PAL (G) Region Cheat Codes cn [Enable All Levels] cd This is needed to be able to Play all Levels of the Game 810C2552 0006 crc DFF227D9-0D4D8169-C:44 gn A Bug's Life cn Infinite\Lives 801E2760 0009 cn Infinite\Health 801E2755 0004 cn Always Have\Super Jump 811E2750 0020 cn Always Have\50 pieces of corn 801E2761 0032 cn Have F-L-I-K 801E2762 000F cn Unlock All Levels 81099E30 000F cn Have All Goldberry Tokens 811E274E 0000 cn Start with Berry Weapon 801E2757 ???? 0001:"Blueberry",0002:"Homing Berry",0003:"Goldberry",0004:"Super Berry ?" cn No Music 801DD906 0000 cn Subtitles On 801DDB7B ???? 0000:"Off",0001:"On" cn Levitate cd "Press R To Levitate & Let go to land (:" D008FFA1 0010 811E26C6 1000 D008FFA1 0010 811E26D6 1000 crc FE94E570-E4873A9C-C:44 gn Fighter's Destiny (G) cn Start with Stars Modifier\Player 1 D0209737 0000 80209737 ???? 0000:"No Stars",0006:"Max Stars" cn Start with Stars Modifier\Player 2 D020B5FF 0000 8020B5FF ???? 0000:"No Stars",0006:"Max Stars" cn Have 1 Star\Ryuji 8030732E 0001 cn Have 1 Star\Bob 8030732F 0001 cn Have 1 Star\Pierre 80307330 0001 cn Have 1 Star\Meiling 80307331 0001 cn Have 1 Star\Leon 80307332 0001 cn Have 1 Star\Abdul 80307333 0001 cn Have 1 Star\Ninja 80307334 0001 cn Have 1 Star\Tomahawk 80307335 0001 cn Have 1 Star\Valerie 80307336 0001 cn Infinite Health\Player 1 80209881 0000 802047A3 0000 cn Infinite Health\Player 2 802047A7 0000 8020B749 0000 cn Start on stage 100 on Survival to get Joker 802EF57B 0063 cn Stop timer for Fastest to get Robot 810ADADC 3F80 crc C3CD76FF-9B9DCBDE-C:44 gn Forsaken 64 (G) cn Infinite\Primery Weapons 8008EE30 0012 cn Infinite\Secondary Weapons 8008EE31 0012 cn Infinite\Weapon Energy 8008EE32 0012 cn Infinite\Lives 8008EE33 0012 cn Stealth Mode 8008EE34 0012 cn Invulnerability 8008EE35 0012 cn Wireframe Mode 8008EE36 0012 cn Gore Mode 8008EE37 0012 cn Turbo Mode 8008EE38 0012 cn Psychedelic Mode 8008EE39 0012 cn One Shot Enemies 8008EE3A 0012 cn Freeze Enemies 8008EE3B 0012 cn Infinite\Titans cd Titans are included in code 8008EE3C 0012 cn Infinite\Solaris cd Solaris are included in code 8008EE3D 0012 cn Level Select cd Accesses all Missions & Battle mode 8008EE3E 0012 crc 75FA0E14-C9B3D105-C:44 gn Holy Magic Century (G) cn Set Agility to 999-999 8107D644 03E7 cn Set Defence to 999-999 8107D646 03E7 cn Makes your MP 999-999 8107D640 03E7 8107D642 03E7 cn Makes your HP 999-999 8107D63C 03E7 8107D63E 03E7 cn Have All Elements 8107D65C 3232 8107D65E 3232 cn Earn Spirits Faster 8007D66D 0000 cn No Random Battles 8008E12C 0000 8008E12E 0000 crc 93EB3F7E-81675E44-C:44 gn Mission Impossible (G) cn Invincibility 810864C4 0101 cn Infinite\Ammo All Guns 50000610 0000 800A9297 00FF cn Access All Levels 8008A9D6 0001 8008A9EA 0001 8008AA12 0001 8008AA62 0001 8008AA76 0001 8008AA8A 0001 8008AA9E 0001 8008AAB2 0001 8008AAC6 0011 8008AADA 0021 8008AAEE 0001 8008AB16 0011 8008AB2A 0041 8008AB3E 0021 8008AB52 0081 8008AB66 0001 8008AB7A 0081 8008AB8E 0001 8008ABB6 0001 8008ABDE 0001 8008ABF2 0011 8008AC06 0021 8008AC56 0001 8008AF3A 0001 8008AF4E 0001 8008AF62 0001 8008AF76 0001 cn Infinite\Health 810866C2 FFFF cn Freeze All Timers 81094150 0063 81094152 0063 81094154 0063 cn Weapon Select 800A92B5 ???? 800A92C5 ???? 800A92D5 ???? 0000:"9MM Hi Power",0001:"Silenced Pistol",0002:"Uzi",0003:"Fists",0032:"Gas Spray",0036:"Blow Torch",001F:"Fire Extinguisher",0024:"Spray Paint",0027:"Electrostunner",000B:"Blow Dart Gun",000C:"Dart Hand Gun",002D:"Mini Rocket Launcher" cn Walk Through Walls & Objects cd This will allow you to pass through anything & even walk on water.if you amerge somewhere in the ground just press the A button. 80094305 ???? 0080:"On",0000:"Off" crc 4C261323-4F295E1A-C:44 gn Disney's Tarzan (G) cn Infinite\Health 81192320 0120 cn Have\Coins Collected 100% 800DD547 0064 cn Have\Level & Tokens Completed 100% 800DD51F 0000 800DD520 0001 800DD521 0000 cn Access Level Select cd On the main menu Scroll down to make CHEATS visible to go into Level Select.For in-Game Cheats,Pause gameplay. 810DD50C 8001 cn Infinite\Lives 800DD542 ???? 0003:"3 Lives",0063:"99 Lives" cn Have\All TARZAN Letters 800DD515 00FF cn Have\Full Portrait 800DD514 00FF cn Infinite\Red Weapon 811921F8 0063 cn Infinite\Green Weapon 811921F6 0063 cn Infinite\Purple Weapon 811921FA 0063 cn Press GS For\Sabor Attacks\Sabor 1 Hit Kill 8924A23E 0001 cn Infinite\Bonus Timer cd This is For All Timers on Bonus Levels 801736DE 0025 crc 9AB3B50A-BC666105-C:44 gn Hexen (G) cn Access In-Game Cheat Menu cd To Access Pause Game Play. This gives you access to In-game Cheats like God Mode,Level Select,All Items Etc 81137CD6 07FF 80137DB3 0005 crc 84D5FD75-BBFD3CDF-C:44 gn Shadowman (G) cn Have All\Items cd Youll not miss out any part of the game for having all parts of LEclipsers with a new game D0059047 0001 50001D20 0000 80030613 000B cn Have All\Gads & The Poign 80030E57 000F cn Have All\Levels Unlocked 5000101C 0000 80030A0E 0001 cn Have All\Cheats: Book of Shadows 81075EFE 0FFF cn Have All\Dark Souls Collected D0059047 0001 80075EF9 007C cn Infinite\Shotgun Shells 80075ADF 0063 cn Infinite\Violator Ammo 81075AE2 029A cn Infinite\Cadeaux' 81075AE6 029A cn Infinite\0.9mm Ammo 81075AEA 0190 cn Infinite\Max Health,Air,Shadow Charge & Voodoo Power 50000604 0000 81075AC6 2710 cn Infinite\Accumulators 800306D7 0005 cn Infinite\Retractors 800308B7 0003 cn Infinite\Prisms 80030957 0003 cn Ammo always displayed on screen 50000408 0000 80075A7D 0007 cn Press L To Levitate D0058EE4 0020 80075528 0041 crc 91B66D42-16AC4E46-C:44 gn South Park cn Have Cheats Menu cd Go into the Cheats From the main Menu & put on the Ones you want 810CF716 01FF cn Infinite Energy 802FD209 0064 cn Infinite Credits 802FD215 0064 cn Infinite Sponge Darts 802FD223 0064 cn Infinite Suckers 802FD222 0064 cn Infinite Balls 802FD21F 0064 cn Start with 9999 Monster Score 812FD20E 270F crc 782A9075-E552631D-C:44 gn Toy Story 2 (G) cn Have 99 coins 810BBBDE 0063 cn Have all 5 collectables 801C8542 0005 cn Infinite Lives 800BBBDA 0009 cn Infinite Battery Power 810BBBD6 000E cn Hold jump to fly 810BBBCC 0002 crc 665FD963-B5CC6612-C:44 gn Turok - Dinosaur Hunter (G) cn Infinite\Lives 80128E9B 00FF cn Infinite\Body Armor 81128D26 5B23 80128D67 0001 cn Infinite\Air 80129070 0063 801E862A 0063 cn Infinite\Health 812C15C4 1E61 812A2534 1E61 cn Have\All Level Keys 50000604 0000 80128D73 0007 80128D8B 001F 80128DAB 00FF cn Have\All Weapons 50000B04 0000 80128D47 0001 80128D33 0001 cn Infinite\Ammo 50000404 0000 80128CF3 00FF 80128D03 00FF 80128D0F 00FF 50000504 0000 80128D13 00FF 80128E9B 00FF 80128E97 00FF cn Diffuculty Modifier 8011956F ???? 0000:"Easy",0001:"Normal",0002:"Hard" cn Have\Backpack 80128C7B 0001 80128CBB 0001 cn Open All Portals cd Press L to Access Map 8114F85A F803 81128CDE 0003 81128CE2 0003 81128CE6 0003 81128CEA 0003 81128CEE 0003 81128CF2 0003 81128CF6 0005 cn Have All\Gems 80128E97 00FF crc 5753720D-2A8A884D-C:44 gn Pokemon Snap (G) //--------------- PAL (I) Region Cheat Codes cn [Enable All Levels] cd This is needed to be able to Play all Levels of the Game 810C24D2 0006 crc F63B89CE-4582D57D-C:49 gn A Bug's Life (I) cn Infinite\Lives 801E2760 0009 cn Infinite\Health 801E2755 0004 cn Always Have\Super Jump 811E2750 0020 cn Always Have\50 pieces of corn 801E2761 0032 cn Have F-L-I-K 801E2762 000F cn Unlock All Levels 81099E30 000F cn Have All Goldberry Tokens 811E274E 0000 cn Start with Berry Weapon 801E2757 ???? 0001:"Blueberry",0002:"Homing Berry",0003:"Goldberry",0004:"Super Berry ?" cn No Music 801DD906 0000 cn Subtitles On 801DDB7B ???? 0000:"Off",0001:"On" cn Levitate cd "Press R To Levitate & Let go to land (:" D008FFA1 0010 811E26C6 1000 D008FFA1 0010 811E26D6 1000 crc EBA949DC-39BAECBD-C:49 gn Mission Impossible (I) cn Invincibility 810864C4 0101 cn Infinite\Ammo All Guns 50000610 0000 800A9297 00FF cn Access All Levels 8008A9D6 0001 8008A9EA 0001 8008AA12 0001 8008AA62 0001 8008AA76 0001 8008AA8A 0001 8008AA9E 0001 8008AAB2 0001 8008AAC6 0011 8008AADA 0021 8008AAEE 0001 8008AB16 0011 8008AB2A 0041 8008AB3E 0021 8008AB52 0081 8008AB66 0001 8008AB7A 0081 8008AB8E 0001 8008ABB6 0001 8008ABDE 0001 8008ABF2 0011 8008AC06 0021 8008AC56 0001 8008AF3A 0001 8008AF4E 0001 8008AF62 0001 8008AF76 0001 cn Infinite\Health 810866C2 FFFF cn Freeze All Timers 81094150 0063 81094152 0063 81094154 0063 cn Weapon Select 800A92B5 ???? 800A92C5 ???? 800A92D5 ???? 0000:"9MM Hi Power",0001:"Silenced Pistol",0002:"Uzi",0003:"Fists",0032:"Gas Spray",0036:"Blow Torch",001F:"Fire Extinguisher",0024:"Spray Paint",0027:"Electrostunner",000B:"Blow Dart Gun",000C:"Dart Hand Gun",002D:"Mini Rocket Launcher" cn Walk Through Walls & Objects cd This will allow you to pass through anything & even walk on water.if you amerge somewhere in the ground just press the A button. 80094305 ???? 0080:"On",0000:"Off" crc C0C85046-61051B05-C:49 gn Pokemon Snap (I) //--------------- PAL (S) Region Cheat Codes cn [Enable All Levels] cd This is needed to be able to Play all Levels of the Game 810C2712 0006 crc 5F6A04E2-D4FA070D-C:53 gn Mission Impossible (S) cn Invincibility 810864C4 0101 cn Infinite\Ammo All Guns 50000610 0000 800A9297 00FF cn Access All Levels 8008A9D6 0001 8008A9EA 0001 8008AA12 0001 8008AA62 0001 8008AA76 0001 8008AA8A 0001 8008AA9E 0001 8008AAB2 0001 8008AAC6 0011 8008AADA 0021 8008AAEE 0001 8008AB16 0011 8008AB2A 0041 8008AB3E 0021 8008AB52 0081 8008AB66 0001 8008AB7A 0081 8008AB8E 0001 8008ABB6 0001 8008ABDE 0001 8008ABF2 0011 8008AC06 0021 8008AC56 0001 8008AF3A 0001 8008AF4E 0001 8008AF62 0001 8008AF76 0001 cn Infinite\Health 810866C2 FFFF cn Freeze All Timers 81094150 0063 81094152 0063 81094154 0063 cn Weapon Select 800A92B5 ???? 800A92C5 ???? 800A92D5 ???? 0000:"9MM Hi Power",0001:"Silenced Pistol",0002:"Uzi",0003:"Fists",0032:"Gas Spray",0036:"Blow Torch",001F:"Fire Extinguisher",0024:"Spray Paint",0027:"Electrostunner",000B:"Blow Dart Gun",000C:"Dart Hand Gun",002D:"Mini Rocket Launcher" cn Walk Through Walls & Objects cd This will allow you to pass through anything & even walk on water.if you amerge somewhere in the ground just press the A button. 80094305 ???? 0080:"On",0000:"Off" crc 817D286A-EF417416-C:53 gn Pokemon Snap (S) //--------------- PAL (FGD) Region Cheat Codes cn [Enable All Levels] cd This is needed to be able to Play all Levels of the Game 810C2712 0006 crc 2E0E7749-B8B49D59-C:58 gn Turok 2 - Seeds of Evil (FGD) //--------------- PAL (IS) Region Cheat Codes cn Access In-Game Cheat Menu 8113568C FFFF 8113568E FFFF //--------------- Demo Cheat Codes //[3A089BBC-54AB2C06-C:0] gn Berney must die! //[A3A044B5-6DB1BF5E-C:0] gn POM-Spacer By Memir //Recent in File---------->Anything under here is still being worked on<-------------------------------- cn Infinite Health\Player 1 802E4E4A 0027 cn Collect One Item For Portal 802E4E47 ???? 0003:"Level 1",000E:"Level 2",000C:"Level 3",000D:"Level 4" cn Paly As 802E4E4C ???? 0000:"Red Helic",0001:"Green Helic",0002:"Blue Helic",0003:"Yellow Helic",0010:"Red Rocket",0011:"Green Rocket",0012:"Blue Rocket",0013:"Yellow Rocket",0020:"Red Back Bee",0021:"Green Back Bee",0022:"Blue Back Bee",0023:"Yellow Back Bee",0030:"Red Stealth",0031:"Green Stealth",0032:"Blue Stealth",0033:"Yellow Stealth" cn Freeze Timer 802E4D5F 0000 cn Infinite Health\Player 2 802E4EA2 0027 cn Infinite Health\Player 3 802E4EFA 0027 cn Infinite Health\Player 4 802E4F52 0027 crc ABA51D09-C668BAD9-C:58 gn 40 WINKS cn Infinite 99 Moons 801D2A81 0063 cn Infinite 50 Health ZZZ's 811D2A84 0032 cn Infinite 40 Cogs cd Disable when on Boss Modes as it can cause hanging! 811D2A82 0028 cn Infinite 99 Lives cd Disable when on Boss Modes as it can cause hanging! 801D2A87 0063 cn Infinite 99 Tokens cd Disable when on Boss Modes as it can cause hanging! 801D2A8D 0063 cn Infinite Max Air 811D2AA0 07C6 811DA2F6 07C1 cn Have All Dreamkeys Collected 50000802 0000 81207D70 FFFF cn Setting Options\Langauge Select 801D21AC ???? 0000:"English",0001:"Spanish",0002:"Italian" cn Setting Options\Difficulty Select 801D534F ???? 0000:"Easy",0001:"Medium",0002:"Hard" cn Setting Options\SFX Volume Select 801D5350 ???? 0000:"Off",0005:"Normal",0007:"Max" cn Setting Options\Music Volume Select 801D5351 ???? 0000:"Off",0005:"Normal",0007:"Max" cn Setting Options\Rumble Pak Strength Select 801D5353 ???? 0000:"Off (Normal)",0005:"Middle",0007:"Max" cn Setting Options\GFX Quality Select 801D5354 ???? 0000:"Normal",0001:"Medium",0002:"HighCol" cn Setting Options\Controller Select 801D5362 ???? 0000:"Preset 1 (Normal)",0001:"Preset 2",0002:"Preset 3" cn Character Select 801D535F ???? 0000:"Ruff (Boy) (Default)",0001:"Tumble (Girl)" cn Have All 40 Winks Collected cd Combined with Have All Levels Completed cheat will open the door for Have All 40 Winks 50000602 0000 81207D60 FFFF cn Have All Levels Completed 50000202 0000 81207D6C FFFF crc 04DAF07F-0D18E688-C:45 gn DUKE NUKEM ZERO HOUR cn Cheat Menu\Cheat Menu Enabled 801CE4E8 0001 cn Cheat Menu\Have All Weapons 811CE470 FFFF cn Cheat Menu\Have All Game Type & Other 810E16BE FFFF cn Cheat Menu\All Weapons Enabled 801CC8B9 0001 801CC925 0001 801CD985 0001 801CDA81 0001 801CDB15 0001 801CDB17 0001 801CDB49 0001 801CE479 0001 801CE481 0001 801CE4ED 0001 801CF635 0001 cn Infinite Ammo (All Guns) 810A1E74 A65B cn Invincibility 800DEEC3 0001 cn Time Always 00:00 801A19C6 0000 cn Enable Debug Menu 800DF990 0001 crc 32CA974B-B2C29C50-C:46 gn DUKE NUKEM ZERO HOUR (F) cn Cheat Menu\Cheat Menu Enabled 801DA748 0001 cn Cheat Menu\Have All Weapons 811DA6D0 FFFF cn Cheat Menu\Have All Game Type & Other 810E1B5E 0FFF cn Cheat Menu\All Weapons Enabled 801D8B19 0001 801D8B85 0001 801D9BE5 0001 801D9CE1 0001 801D9D75 0001 801D9D77 0001 801D9DA9 0001 801DA6D9 0001 801DA6E1 0001 801DA74D 0001 801DB895 0001 cn Infinite Ammo (All Guns) 810A21D4 A65B cn Invincibility 800DF223 0001 cn Enable Debug Menu 800DFCF0 0001 crc 22E9623F-B60E52AD-C:50 gn FLYING DRAGON cn Infinite\Health\Player 1 80209D81 00C8 cn Infinite\Special\Player 1 81209484 0190 cn 1 Win to Win\Player 1 D020A84F 0000 8020A84F 0001 cn Infinite\Health\Player 2 81209780 0190 cn Infinite\Special\Player 2 8120B1B0 0190 cn 1 Win to Win\Player 2 D020A84F 0000 8020A84F 0010 cn Infinite\Money 8121106C 2704 crc DEE596AB-AF3B7AE7-C:45 gn WCW / nWo REVENGE cn Infinite Time 800FAF87 0000 cn Extra Characters & Modes 8107F07C FFFF cn Spirit Select\Player 1 800F9D25 ???? 0064:"Have Max",0032:"Have Normal",0000:"Have None" cn Spirit Select\Player 2 800FA0D5 ???? 0064:"Have Max",0032:"Have Normal",0000:"Have None" cn Spirit Select\Player 3 800FA485 ???? 0064:"Have Max",0032:"Have Normal",0000:"Have None" cn Spirit Select\Player 4 800FA835 ???? 0064:"Have Max",0032:"Have Normal",0000:"Have None" cn Infinite Time Out Of Ring 800FACE8 0014 cn Always Special\Player 1 800F9D35 0008 cn Always Special\Player 2 800FA0E5 0008 cn Always Special\Player 3 800FA495 0008 cn Always Special\Player 4 800FA845 0008 cn Weapon Select\Player 1 cd With these codes, they do glitch a LOT! It will glitch when you hit certain people with certain weapons a certain way, but it is RANDOM somewhat too 800F9D31 0003 800F98E1 ???? 0000:"Mallot",0001:"Blue Microphone",0002:"Black Microphone",0003:"Trophy",0004:"Black Baseball Bat",0005:"Spotted Baseball Bat",0006:"Steel Chair",0007:"Table Piece",0008:"Trash Can",0009:"Suitcase",000A:"Stop Sign",00FF:"Nothing" 800F98E2 0000 800F99A0 0000 cn Weapon Select\Player 2 cd With these codes, they do glitch a LOT! It will glitch when you hit certain people with certain weapons a certain way, but it is RANDOM somewhat too 800FA0E1 0003 800F9911 ???? 0000:"Mallot",0001:"Blue Microphone",0002:"Black Microphone",0003:"Trophy",0004:"Black Baseball Bat",0005:"Spotted Baseball Bat",0006:"Steel Chair",0007:"Table Piece",0008:"Trash Can",0009:"Suitcase",000A:"Stop Sign",00FF:"Nothing" 800F9912 0001 800F99A1 0001 cn Weapon Select\Player 3 cd With these codes, they do glitch a LOT! It will glitch when you hit certain people with certain weapons a certain way, but it is RANDOM somewhat too 800FA491 0003 800F9941 ???? 0000:"Mallot",0001:"Blue Microphone",0002:"Black Microphone",0003:"Trophy",0004:"Black Baseball Bat",0005:"Spotted Baseball Bat",0006:"Steel Chair",0007:"Table Piece",0008:"Trash Can",0009:"Suitcase",000A:"Stop Sign",00FF:"Nothing" 800F9942 0002 800F99A2 0002 cn Weapon Select\Player 4 cd With these codes, they do glitch a LOT! It will glitch when you hit certain people with certain weapons a certain way, but it is RANDOM somewhat too 800FA841 0003 800F9971 ???? 0000:"Mallot",0001:"Blue Microphone",0002:"Black Microphone",0003:"Trophy",0004:"Black Baseball Bat",0005:"Spotted Baseball Bat",0006:"Steel Chair",0007:"Table Piece",0008:"Trash Can",0009:"Suitcase",000A:"Stop Sign",00FF:"Nothing" 800F9972 0003 800F99A3 0003 cn Get Title Belt In 1-Match 80038AAB 0008 cn Character Select\Player 1 cd With this code, you will need to press the GS Button to be in the ring and have full access to getting in and out of the ring. 890F9D36 0240 890F9D60 42B4 8107E8B2 ???? 0001:"Sting",0002:"Giant",0003:"Lex Luger",0004:"Diamon Dallas Page",0005:"Rick Steiner",0007:"Roddy Piper",0008:"Bret Hart",0009:"Chris Benoit",000A:"Goldberg",000B:"Booker T",000C:"Disco Inferno",0101:"Fit Finley",0105:"Meng",0106:"Barbarian",0107:"Larry Zbysko",0108:"Stevie Ray",010B:"British Bulldog",010D:"Yugi Nagata",010E:"Jim Neidhart",010F:"Alex Wright",0201:"Hollywood Hogan",0202:"Macho Man Randy Savage",0203:"Kevin Nash",0204:"Scott Hall",0205:"Buff Bagwell",0206:"Scott Stenier",0207:"Curt Hennig",0208:"Konnan",0209:"Scott Norton",020C:"Brian Adams",020D:"Eric Bishoff",0301:"Ultimo Dragon",0302:"Eddy Guerrero",0303:"Chris Jericho",0304:"Rey Mysterio Jr.",0305:"Juventud Guerrera",0306:"Dean Malenko",0307:"Chavo Guerrero Jr.",0308:"La Parka",0309:"Psychosis",0401:"Glacier",0403:"Wrath",0404:"Kanyon",0501:"Raven",0502:"Saturn",0503:"Kidman",0504:"Riggs",0505:"Van Hammer",0506:"Sick Boy",0507:"Lodi",0508:"Reese",0601:"AKI Man",0602:"Shogun",0603:"Executioner",0604:"Dr. Frank",0605:"Jekel",0606:"Maya Ineaby",0701:"Hawk Hana",0702:"Kimchee",0703:"Dakeken",0704:"Brickowski",0705:"Mingchee",0706:"Han Zomon",0801:"Eric Bischoff (Manager)",0802:"Onoo (Manager)",0803:"Jimmy Hart (Manager)",0804:"Rick Rude (Manager)",0805:"Dusty Rhodes (Manager)",0806:"Ted Debisas (Manager)",0807:"James Bandenderg (Manager)",0808:"Vincent (Manager)",0901:"Elizabeth (Manager)",0902:"Kimberly (Manager)",0903:"Jackreen (Manager)",0904:"Sister Sherri (Manager)",0905:"Woman (Manager)" cn Character Select\Player 2 cd With this code, you will need to press the GS Button to be in the ring and have full access to getting in and out of the ring. 890FA0E6 0240 890FA110 42B4 8107E8B6 ???? 0001:"Sting",0002:"Giant",0003:"Lex Luger",0004:"Diamon Dallas Page",0005:"Rick Steiner",0007:"Roddy Piper",0008:"Bret Hart",0009:"Chris Benoit",000A:"Goldberg",000B:"Booker T",000C:"Disco Inferno",0101:"Fit Finley",0105:"Meng",0106:"Barbarian",0107:"Larry Zbysko",0108:"Stevie Ray",010B:"British Bulldog",010D:"Yugi Nagata",010E:"Jim Neidhart",010F:"Alex Wright",0201:"Hollywood Hogan",0202:"Macho Man Randy Savage",0203:"Kevin Nash",0204:"Scott Hall",0205:"Buff Bagwell",0206:"Scott Stenier",0207:"Curt Hennig",0208:"Konnan",0209:"Scott Norton",020C:"Brian Adams",020D:"Eric Bishoff",0301:"Ultimo Dragon",0302:"Eddy Guerrero",0303:"Chris Jericho",0304:"Rey Mysterio Jr.",0305:"Juventud Guerrera",0306:"Dean Malenko",0307:"Chavo Guerrero Jr.",0308:"La Parka",0309:"Psychosis",0401:"Glacier",0403:"Wrath",0404:"Kanyon",0501:"Raven",0502:"Saturn",0503:"Kidman",0504:"Riggs",0505:"Van Hammer",0506:"Sick Boy",0507:"Lodi",0508:"Reese",0601:"AKI Man",0602:"Shogun",0603:"Executioner",0604:"Dr. Frank",0605:"Jekel",0606:"Maya Ineaby",0701:"Hawk Hana",0702:"Kimchee",0703:"Dakeken",0704:"Brickowski",0705:"Mingchee",0706:"Han Zomon",0801:"Eric Bischoff (Manager)",0802:"Onoo (Manager)",0803:"Jimmy Hart (Manager)",0804:"Rick Rude (Manager)",0805:"Dusty Rhodes (Manager)",0806:"Ted Debisas (Manager)",0807:"James Bandenderg (Manager)",0808:"Vincent (Manager)",0901:"Elizabeth (Manager)",0902:"Kimberly (Manager)",0903:"Jackreen (Manager)",0904:"Sister Sherri (Manager)",0905:"Woman (Manager)" cn Character Select\Player 3 cd With this code, you will need to press the GS Button to be in the ring and have full access to getting in and out of the ring. 890FA496 0240 890FA4C0 42B4 8107E8BA ???? 0001:"Sting",0002:"Giant",0003:"Lex Luger",0004:"Diamon Dallas Page",0005:"Rick Steiner",0007:"Roddy Piper",0008:"Bret Hart",0009:"Chris Benoit",000A:"Goldberg",000B:"Booker T",000C:"Disco Inferno",0101:"Fit Finley",0105:"Meng",0106:"Barbarian",0107:"Larry Zbysko",0108:"Stevie Ray",010B:"British Bulldog",010D:"Yugi Nagata",010E:"Jim Neidhart",010F:"Alex Wright",0201:"Hollywood Hogan",0202:"Macho Man Randy Savage",0203:"Kevin Nash",0204:"Scott Hall",0205:"Buff Bagwell",0206:"Scott Stenier",0207:"Curt Hennig",0208:"Konnan",0209:"Scott Norton",020C:"Brian Adams",020D:"Eric Bishoff",0301:"Ultimo Dragon",0302:"Eddy Guerrero",0303:"Chris Jericho",0304:"Rey Mysterio Jr.",0305:"Juventud Guerrera",0306:"Dean Malenko",0307:"Chavo Guerrero Jr.",0308:"La Parka",0309:"Psychosis",0401:"Glacier",0403:"Wrath",0404:"Kanyon",0501:"Raven",0502:"Saturn",0503:"Kidman",0504:"Riggs",0505:"Van Hammer",0506:"Sick Boy",0507:"Lodi",0508:"Reese",0601:"AKI Man",0602:"Shogun",0603:"Executioner",0604:"Dr. Frank",0605:"Jekel",0606:"Maya Ineaby",0701:"Hawk Hana",0702:"Kimchee",0703:"Dakeken",0704:"Brickowski",0705:"Mingchee",0706:"Han Zomon",0801:"Eric Bischoff (Manager)",0802:"Onoo (Manager)",0803:"Jimmy Hart (Manager)",0804:"Rick Rude (Manager)",0805:"Dusty Rhodes (Manager)",0806:"Ted Debisas (Manager)",0807:"James Bandenderg (Manager)",0808:"Vincent (Manager)",0901:"Elizabeth (Manager)",0902:"Kimberly (Manager)",0903:"Jackreen (Manager)",0904:"Sister Sherri (Manager)",0905:"Woman (Manager)" cn Character Select\Player 4 cd With this code, you will need to press the GS Button to be in the ring and have full access to getting in and out of the ring. 890FA846 0240 890FA870 42B4 8107E8BE ???? 0001:"Sting",0002:"Giant",0003:"Lex Luger",0004:"Diamon Dallas Page",0005:"Rick Steiner",0007:"Roddy Piper",0008:"Bret Hart",0009:"Chris Benoit",000A:"Goldberg",000B:"Booker T",000C:"Disco Inferno",0101:"Fit Finley",0105:"Meng",0106:"Barbarian",0107:"Larry Zbysko",0108:"Stevie Ray",010B:"British Bulldog",010D:"Yugi Nagata",010E:"Jim Neidhart",010F:"Alex Wright",0201:"Hollywood Hogan",0202:"Macho Man Randy Savage",0203:"Kevin Nash",0204:"Scott Hall",0205:"Buff Bagwell",0206:"Scott Stenier",0207:"Curt Hennig",0208:"Konnan",0209:"Scott Norton",020C:"Brian Adams",020D:"Eric Bishoff",0301:"Ultimo Dragon",0302:"Eddy Guerrero",0303:"Chris Jericho",0304:"Rey Mysterio Jr.",0305:"Juventud Guerrera",0306:"Dean Malenko",0307:"Chavo Guerrero Jr.",0308:"La Parka",0309:"Psychosis",0401:"Glacier",0403:"Wrath",0404:"Kanyon",0501:"Raven",0502:"Saturn",0503:"Kidman",0504:"Riggs",0505:"Van Hammer",0506:"Sick Boy",0507:"Lodi",0508:"Reese",0601:"AKI Man",0602:"Shogun",0603:"Executioner",0604:"Dr. Frank",0605:"Jekel",0606:"Maya Ineaby",0701:"Hawk Hana",0702:"Kimchee",0703:"Dakeken",0704:"Brickowski",0705:"Mingchee",0706:"Han Zomon",0801:"Eric Bischoff (Manager)",0802:"Onoo (Manager)",0803:"Jimmy Hart (Manager)",0804:"Rick Rude (Manager)",0805:"Dusty Rhodes (Manager)",0806:"Ted Debisas (Manager)",0807:"James Bandenderg (Manager)",0808:"Vincent (Manager)",0901:"Elizabeth (Manager)",0902:"Kimberly (Manager)",0903:"Jackreen (Manager)",0904:"Sister Sherri (Manager)",0905:"Woman (Manager)" cn Ultimate Code\Player 1 800F9D24 0064 cn Ultimate Code\Player 2 800FA0D4 0064 cn Ultimate Code\Player 3 800FA484 0064 cn Ultimate Code\Player 4 800FA834 0064 crc 68E8A875-0CE7A486-C:50 gn WCW / nWo REVENGE cn Infinite Time 800FAF87 0000 cn Extra Characters & Modes 8107F07C FFFF cn Spirit Select\Player 1 800F9D25 ???? 0064:"Have Max",0032:"Have Normal",0000:"Have None" cn Spirit Select\Player 2 800FA0D5 ???? 0064:"Have Max",0032:"Have Normal",0000:"Have None" cn Spirit Select\Player 3 800FA485 ???? 0064:"Have Max",0032:"Have Normal",0000:"Have None" cn Spirit Select\Player 4 800FA835 ???? 0064:"Have Max",0032:"Have Normal",0000:"Have None" cn Infinite Time Out Of Ring 800FACE8 0014 cn Always Special\Player 1 800F9D35 0008 cn Always Special\Player 2 800FA0E5 0008 cn Always Special\Player 3 800FA495 0008 cn Always Special\Player 4 800FA845 0008 cn Weapon Select\Player 1 cd With these codes, they do glitch a LOT! It will glitch when you hit certain people with certain weapons a certain way, but it is RANDOM somewhat too 800F9D31 0003 800F98E1 ???? 0000:"Mallot",0001:"Blue Microphone",0002:"Black Microphone",0003:"Trophy",0004:"Black Baseball Bat",0005:"Spotted Baseball Bat",0006:"Steel Chair",0007:"Table Piece",0008:"Trash Can",0009:"Suitcase",000A:"Stop Sign",00FF:"Nothing" 800F98E2 0000 800F99A0 0000 cn Weapon Select\Player 2 cd With these codes, they do glitch a LOT! It will glitch when you hit certain people with certain weapons a certain way, but it is RANDOM somewhat too 800FA0E1 0003 800F9911 ???? 0000:"Mallot",0001:"Blue Microphone",0002:"Black Microphone",0003:"Trophy",0004:"Black Baseball Bat",0005:"Spotted Baseball Bat",0006:"Steel Chair",0007:"Table Piece",0008:"Trash Can",0009:"Suitcase",000A:"Stop Sign",00FF:"Nothing" 800F9912 0001 800F99A1 0001 cn Weapon Select\Player 3 cd With these codes, they do glitch a LOT! It will glitch when you hit certain people with certain weapons a certain way, but it is RANDOM somewhat too 800FA491 0003 800F9941 ???? 0000:"Mallot",0001:"Blue Microphone",0002:"Black Microphone",0003:"Trophy",0004:"Black Baseball Bat",0005:"Spotted Baseball Bat",0006:"Steel Chair",0007:"Table Piece",0008:"Trash Can",0009:"Suitcase",000A:"Stop Sign",00FF:"Nothing" 800F9942 0002 800F99A2 0002 cn Weapon Select\Player 4 cd With these codes, they do glitch a LOT! It will glitch when you hit certain people with certain weapons a certain way, but it is RANDOM somewhat too 800FA841 0003 800F9971 ???? 0000:"Mallot",0001:"Blue Microphone",0002:"Black Microphone",0003:"Trophy",0004:"Black Baseball Bat",0005:"Spotted Baseball Bat",0006:"Steel Chair",0007:"Table Piece",0008:"Trash Can",0009:"Suitcase",000A:"Stop Sign",00FF:"Nothing" 800F9972 0003 800F99A3 0003 cn Get Title Belt In 1-Match 80038AAB 0008 cn Character Select\Player 1 cd With this code, you will need to press the GS Button to be in the ring and have full access to getting in and out of the ring. 890F9D36 0240 890F9D60 42B4 8107E8B2 ???? 0001:"Sting",0002:"Giant",0003:"Lex Luger",0004:"Diamon Dallas Page",0005:"Rick Steiner",0007:"Roddy Piper",0008:"Bret Hart",0009:"Chris Benoit",000A:"Goldberg",000B:"Booker T",000C:"Disco Inferno",0101:"Fit Finley",0105:"Meng",0106:"Barbarian",0107:"Larry Zbysko",0108:"Stevie Ray",010B:"British Bulldog",010D:"Yugi Nagata",010E:"Jim Neidhart",010F:"Alex Wright",0201:"Hollywood Hogan",0202:"Macho Man Randy Savage",0203:"Kevin Nash",0204:"Scott Hall",0205:"Buff Bagwell",0206:"Scott Stenier",0207:"Curt Hennig",0208:"Konnan",0209:"Scott Norton",020C:"Brian Adams",020D:"Eric Bishoff",0301:"Ultimo Dragon",0302:"Eddy Guerrero",0303:"Chris Jericho",0304:"Rey Mysterio Jr.",0305:"Juventud Guerrera",0306:"Dean Malenko",0307:"Chavo Guerrero Jr.",0308:"La Parka",0309:"Psychosis",0401:"Glacier",0403:"Wrath",0404:"Kanyon",0501:"Raven",0502:"Saturn",0503:"Kidman",0504:"Riggs",0505:"Van Hammer",0506:"Sick Boy",0507:"Lodi",0508:"Reese",0601:"AKI Man",0602:"Shogun",0603:"Executioner",0604:"Dr. Frank",0605:"Jekel",0606:"Maya Ineaby",0701:"Hawk Hana",0702:"Kimchee",0703:"Dakeken",0704:"Brickowski",0705:"Mingchee",0706:"Han Zomon",0801:"Eric Bischoff (Manager)",0802:"Onoo (Manager)",0803:"Jimmy Hart (Manager)",0804:"Rick Rude (Manager)",0805:"Dusty Rhodes (Manager)",0806:"Ted Debisas (Manager)",0807:"James Bandenderg (Manager)",0808:"Vincent (Manager)",0901:"Elizabeth (Manager)",0902:"Kimberly (Manager)",0903:"Jackreen (Manager)",0904:"Sister Sherri (Manager)",0905:"Woman (Manager)" cn Character Select\Player 2 cd With this code, you will need to press the GS Button to be in the ring and have full access to getting in and out of the ring. 890FA0E6 0240 890FA110 42B4 8107E8B6 ???? 0001:"Sting",0002:"Giant",0003:"Lex Luger",0004:"Diamon Dallas Page",0005:"Rick Steiner",0007:"Roddy Piper",0008:"Bret Hart",0009:"Chris Benoit",000A:"Goldberg",000B:"Booker T",000C:"Disco Inferno",0101:"Fit Finley",0105:"Meng",0106:"Barbarian",0107:"Larry Zbysko",0108:"Stevie Ray",010B:"British Bulldog",010D:"Yugi Nagata",010E:"Jim Neidhart",010F:"Alex Wright",0201:"Hollywood Hogan",0202:"Macho Man Randy Savage",0203:"Kevin Nash",0204:"Scott Hall",0205:"Buff Bagwell",0206:"Scott Stenier",0207:"Curt Hennig",0208:"Konnan",0209:"Scott Norton",020C:"Brian Adams",020D:"Eric Bishoff",0301:"Ultimo Dragon",0302:"Eddy Guerrero",0303:"Chris Jericho",0304:"Rey Mysterio Jr.",0305:"Juventud Guerrera",0306:"Dean Malenko",0307:"Chavo Guerrero Jr.",0308:"La Parka",0309:"Psychosis",0401:"Glacier",0403:"Wrath",0404:"Kanyon",0501:"Raven",0502:"Saturn",0503:"Kidman",0504:"Riggs",0505:"Van Hammer",0506:"Sick Boy",0507:"Lodi",0508:"Reese",0601:"AKI Man",0602:"Shogun",0603:"Executioner",0604:"Dr. Frank",0605:"Jekel",0606:"Maya Ineaby",0701:"Hawk Hana",0702:"Kimchee",0703:"Dakeken",0704:"Brickowski",0705:"Mingchee",0706:"Han Zomon",0801:"Eric Bischoff (Manager)",0802:"Onoo (Manager)",0803:"Jimmy Hart (Manager)",0804:"Rick Rude (Manager)",0805:"Dusty Rhodes (Manager)",0806:"Ted Debisas (Manager)",0807:"James Bandenderg (Manager)",0808:"Vincent (Manager)",0901:"Elizabeth (Manager)",0902:"Kimberly (Manager)",0903:"Jackreen (Manager)",0904:"Sister Sherri (Manager)",0905:"Woman (Manager)" cn Character Select\Player 3 cd With this code, you will need to press the GS Button to be in the ring and have full access to getting in and out of the ring. 890FA496 0240 890FA4C0 42B4 8107E8BA ???? 0001:"Sting",0002:"Giant",0003:"Lex Luger",0004:"Diamon Dallas Page",0005:"Rick Steiner",0007:"Roddy Piper",0008:"Bret Hart",0009:"Chris Benoit",000A:"Goldberg",000B:"Booker T",000C:"Disco Inferno",0101:"Fit Finley",0105:"Meng",0106:"Barbarian",0107:"Larry Zbysko",0108:"Stevie Ray",010B:"British Bulldog",010D:"Yugi Nagata",010E:"Jim Neidhart",010F:"Alex Wright",0201:"Hollywood Hogan",0202:"Macho Man Randy Savage",0203:"Kevin Nash",0204:"Scott Hall",0205:"Buff Bagwell",0206:"Scott Stenier",0207:"Curt Hennig",0208:"Konnan",0209:"Scott Norton",020C:"Brian Adams",020D:"Eric Bishoff",0301:"Ultimo Dragon",0302:"Eddy Guerrero",0303:"Chris Jericho",0304:"Rey Mysterio Jr.",0305:"Juventud Guerrera",0306:"Dean Malenko",0307:"Chavo Guerrero Jr.",0308:"La Parka",0309:"Psychosis",0401:"Glacier",0403:"Wrath",0404:"Kanyon",0501:"Raven",0502:"Saturn",0503:"Kidman",0504:"Riggs",0505:"Van Hammer",0506:"Sick Boy",0507:"Lodi",0508:"Reese",0601:"AKI Man",0602:"Shogun",0603:"Executioner",0604:"Dr. Frank",0605:"Jekel",0606:"Maya Ineaby",0701:"Hawk Hana",0702:"Kimchee",0703:"Dakeken",0704:"Brickowski",0705:"Mingchee",0706:"Han Zomon",0801:"Eric Bischoff (Manager)",0802:"Onoo (Manager)",0803:"Jimmy Hart (Manager)",0804:"Rick Rude (Manager)",0805:"Dusty Rhodes (Manager)",0806:"Ted Debisas (Manager)",0807:"James Bandenderg (Manager)",0808:"Vincent (Manager)",0901:"Elizabeth (Manager)",0902:"Kimberly (Manager)",0903:"Jackreen (Manager)",0904:"Sister Sherri (Manager)",0905:"Woman (Manager)" cn Character Select\Player 4 cd With this code, you will need to press the GS Button to be in the ring and have full access to getting in and out of the ring. 890FA846 0240 890FA870 42B4 8107E8BE ???? 0001:"Sting",0002:"Giant",0003:"Lex Luger",0004:"Diamon Dallas Page",0005:"Rick Steiner",0007:"Roddy Piper",0008:"Bret Hart",0009:"Chris Benoit",000A:"Goldberg",000B:"Booker T",000C:"Disco Inferno",0101:"Fit Finley",0105:"Meng",0106:"Barbarian",0107:"Larry Zbysko",0108:"Stevie Ray",010B:"British Bulldog",010D:"Yugi Nagata",010E:"Jim Neidhart",010F:"Alex Wright",0201:"Hollywood Hogan",0202:"Macho Man Randy Savage",0203:"Kevin Nash",0204:"Scott Hall",0205:"Buff Bagwell",0206:"Scott Stenier",0207:"Curt Hennig",0208:"Konnan",0209:"Scott Norton",020C:"Brian Adams",020D:"Eric Bishoff",0301:"Ultimo Dragon",0302:"Eddy Guerrero",0303:"Chris Jericho",0304:"Rey Mysterio Jr.",0305:"Juventud Guerrera",0306:"Dean Malenko",0307:"Chavo Guerrero Jr.",0308:"La Parka",0309:"Psychosis",0401:"Glacier",0403:"Wrath",0404:"Kanyon",0501:"Raven",0502:"Saturn",0503:"Kidman",0504:"Riggs",0505:"Van Hammer",0506:"Sick Boy",0507:"Lodi",0508:"Reese",0601:"AKI Man",0602:"Shogun",0603:"Executioner",0604:"Dr. Frank",0605:"Jekel",0606:"Maya Ineaby",0701:"Hawk Hana",0702:"Kimchee",0703:"Dakeken",0704:"Brickowski",0705:"Mingchee",0706:"Han Zomon",0801:"Eric Bischoff (Manager)",0802:"Onoo (Manager)",0803:"Jimmy Hart (Manager)",0804:"Rick Rude (Manager)",0805:"Dusty Rhodes (Manager)",0806:"Ted Debisas (Manager)",0807:"James Bandenderg (Manager)",0808:"Vincent (Manager)",0901:"Elizabeth (Manager)",0902:"Kimberly (Manager)",0903:"Jackreen (Manager)",0904:"Sister Sherri (Manager)",0905:"Woman (Manager)" cn Ultimate Code\Player 1 800F9D24 0064 cn Ultimate Code\Player 2 800FA0D4 0064 cn Ultimate Code\Player 3 800FA484 0064 cn Ultimate Code\Player 4 800FA834 0064 crc AA7B0658-9C96937B-C:50 gn WCW MAYHEM cn Character Creation\Max\Strength 80308D35 0009 cn Character Creation\Max\Impact 80320375 0009 cn Character Creation\Max\Speed 80322CB5 0009 cn Character Creation\Max\Quickness 80324C75 0009 cn Character Creation\Max\Aerial 80326C35 0009 cn Character Creation\Max\Mat Ability 80328BF5 0009 cn Character Creation\Max\Submission 8032ABB5 0009 cn Character Creation\Max\Brawling 8032CB75 0009 cn Character Creation\Max\Dirtiness 8032EB35 0009 cn Infinite Stamina\Player 1 810E9798 0478 cn Infinite Stamina\Player 2 810E9934 03ED cn Meter Select\Player 1 800E979D ???? 0060:"Full Meter Bar",0000:"Empty Meter Bar" cn Meter Select\Player 2 800E993D ???? 0060:"Full Meter Bar",0000:"Empty Meter Bar" cn Enable Cheat 800B6F5B ???? 0002:"Super Created Wrestlers",0004:"Stamina Meter",0008:"Momentum Meter",0020:"Play As Same Wrestler",0080:"All Wrestlers" cn Freeze Timer 800B7E02 D300 crc F82DD377-8C3FB347-C:58 gn TG RALLY 2 cn Always 1st 80031F93 0001 cn No Damage Or Failures 80031427 0001 cn 100.000 Sponsor Credits & 950 Championship Points In Support Van cd You Also Have Access To All Cars, Tracks & Extra Features 80031433 00F3 cn No Cones Hit cd In ARSG Rally School 80031FC3 0000 8003239B 0000 cn No Navigator 80031EF7 0000 cn Max Sponsor Credits 803A6702 0010 803A6704 0001 cn Infinite Cash 803A418E 4000 cn Freeze Timer 80031F9F 0000 mupen64plus-core-src-2.5/doc/000077500000000000000000000000001251723631200160445ustar00rootroot00000000000000mupen64plus-core-src-2.5/doc/emuwiki-api-doc/000077500000000000000000000000001251723631200210305ustar00rootroot00000000000000mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Home.mediawiki000066400000000000000000000003761251723631200236130ustar00rootroot00000000000000= Mupen64Plus v2.0 API = The interface between Mupen64Plus and its compatible plugins is (slightly) different from other N64 emulators. The new API is described in detail in the documentation here [[Mupen64Plus v2.0 Core API v1.0|Mupen64Plus v2.0 API]]mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Mupen64Plus-Core-Parameters.mediawiki000066400000000000000000000145601251723631200300140ustar00rootroot00000000000000[[Mupen64Plus v2.0 Core API v1.0|Mupen64Plus v2.0 API]] = Core Parameters = These are standard parameters which are used by the Mupen64Plus Core library. They are stored in a configuration section called "Core" and may be altered by the front-end in order to adjust the behaviour of the emulator. These may be adjusted at any time and the effect of the change should occur immediately. {| border="1" !Parameter Name!!Type!!Usage |- |Version |M64TYPE_FLOAT |Mupen64Plus Core config parameter set version number. Please don't change. |- |OnScreenDisplay |M64TYPE_BOOL |Draw on-screen display if True, otherwise don't draw OSD |- |R4300Emulator |M64TYPE_INT |Use Pure Interpreter if 0, Cached Interpreter if 1, or Dynamic Recompiler if 2 or more |- |NoCompiledJump |M64TYPE_BOOL |Disable compiled jump commands in dynamic recompiler (should be set to False) |- |DisableExtraMem |M64TYPE_BOOL |Disable 4MB expansion RAM pack. May be necessary for some games. |- |AutoStateSlotIncrement |M64TYPE_BOOL |Increment the save state slot after each save operation. |- |EnableDebugger |M64TYPE_BOOL |Activate the R4300 debugger when ROM execution begins, if core was built with Debugger support. |- |CurrentStateSlot |M64TYPE_INT |Save state slot (0-9) to use when saving/loading the emulator state |- |ScreenshotPath |M64TYPE_STRING |Path to directory where screenshots are saved. If this is blank, the default value of "GetConfigUserDataPath()"/screenshot will be used. |- |SaveStatePath |M64TYPE_STRING |Path to directory where emulator save states (snapshots) are saved. If this is blank, the default value of "GetConfigUserDataPath()"/save will be used. |- |SaveSRAMPath |M64TYPE_STRING |Path to directory where SRAM/EEPROM data (in-game saves) are stored. If this is blank, the default value of "GetConfigUserDataPath()"/save will be used. |- |SharedDataPath |M64TYPE_STRING |Path to a directory to search when looking for shared data files in the ConfigGetSharedDataFilepath() function. |- |CountPerOp |M64TYPE_INT |Force number of cycles per emulated instruction when set greater than 0. |- |DelaySI |M64TYPE_BOOL |Delay interrupt after DMA SI read/write. |- |} These configuration parameters are used in the Core's event loop to detect keyboard and joystick commands. They are stored in a configuration section called "CoreEvents" and may be altered by the front-end in order to adjust the behaviour of the emulator. These may be adjusted at any time and the effect of the change should occur immediately. The Keysym value stored is actually (SDLMod << 16) || SDLKey, so that keypresses with modifiers like shift, control, or alt may be used. {| border="1" !Parameter Name!!Type!!Usage |- |Kbd Mapping Stop |M64TYPE_INT |SDL keysym for stopping the emulator |- |Kbd Mapping Fullscreen |M64TYPE_INT |SDL keysym for switching between fullscreen/windowed modes |- |Kbd Mapping Save State |M64TYPE_INT |SDL keysym for saving the emulator state |- |Kbd Mapping Load State |M64TYPE_INT |SDL keysym for loading the emulator state |- |Kbd Mapping Increment Slot |M64TYPE_INT |SDL keysym for advancing the save state slot |- |Kbd Mapping Reset |M64TYPE_INT |SDL keysym for resetting the emulator |- |Kbd Mapping Speed Down |M64TYPE_INT |SDL keysym for slowing down the emulator |- |Kbd Mapping Speed Up |M64TYPE_INT |SDL keysym for speeding up the emulator |- |Kbd Mapping Screenshot |M64TYPE_INT |SDL keysym for taking a screenshot |- |Kbd Mapping Pause |M64TYPE_INT |SDL keysym for pausing the emulator |- |Kbd Mapping Mute |M64TYPE_INT |SDL keysym for muting/unmuting the sound |- |Kbd Mapping Increase Volume |M64TYPE_INT |SDL keysym for increasing the volume |- |Kbd Mapping Decrease Volume |M64TYPE_INT |SDL keysym for decreasing the volume |- |Kbd Mapping Fast Forward |M64TYPE_INT |SDL keysym for temporarily going really fast |- |Kbd Mapping Frame Advance |M64TYPE_INT |SDL keysym for advancing by one frame when paused |- |Kbd Mapping Gameshark |M64TYPE_INT |SDL keysym for pressing the game shark button |- |} These configuration parameters are used in the Core's event loop to detect joystick commands. The command strings use a simple format described here. For commands activated by pressing a joystick axis, the format is "J'''x'''A'''y'''+" or "J'''x'''A'''y'''-", where '''x''' is the SDL joystick number (must be between 0 and 9) and '''y''' is the axis number. For the last character, '''+''' represents movement in the positive direction, while '''-''' represents movement in the negative direction. For commands activated by pressing a button, the format is "J'''x'''B'''y'''", where '''x''' is the SDL joystick number (must be between 0 and 9) and '''y''' is the button number. For commands activated by pressing a ''hat'' (a directional switch) on the joystick, the format is "J'''x'''H'''y'''V'''z'''", where '''x''' is the SDL joystick number (must be between 0 and 9), '''y''' is the hat number, and '''z''' is the hat value. The hat value corresponds with the SDL_HAT_ enumerated types: Up is 1, Right is 2, Down is 4, and Left is 8. For diagonal directions, these values may be ''or''d together. {| border="1" !Parameter Name!!Type!!Usage |- |Version |M64TYPE_FLOAT |Mupen64Plus CoreEvents config parameter set version number. Please don't change. |- |Joy Mapping Stop |M64TYPE_STRING |Joystick event string for stopping the emulator |- |Joy Mapping Fullscreen |M64TYPE_STRING |Joystick event string for switching between fullscreen/windowed modes |- |Joy Mapping Save State |M64TYPE_STRING |Joystick event string for saving the emulator state |- |Joy Mapping Load State |M64TYPE_STRING |Joystick event string for loading the emulator state |- |Joy Mapping Increment Slot |M64TYPE_STRING |Joystick event string for advancing the save state slot |- |Joy Mapping Screenshot |M64TYPE_STRING |Joystick event string for taking a screenshot |- |Joy Mapping Pause |M64TYPE_STRING |Joystick event string for pausing or resuming the emulator |- |Joy Mapping Mute |M64TYPE_STRING |Joystick event string for muting/unmuting the sound |- |Joy Mapping Increase Volume |M64TYPE_STRING |Joystick event string for increasing the volume |- |Joy Mapping Decrease Volume |M64TYPE_STRING |Joystick event string for decreasing the volume |- |Joy Mapping Fast Forward |M64TYPE_STRING |Joystick event string for temporarily going really fast |- |Joy Mapping Gameshark |M64TYPE_STRING |Joystick event string for pressing the game shark button |- |} mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Mupen64Plus-Plugin-Parameters.mediawiki000066400000000000000000000333371251723631200303650ustar00rootroot00000000000000[[Mupen64Plus v2.0 Core API v1.0|Mupen64Plus v2.0 API]] = Plugin Parameters = These are standard parameters which are used by the Mupen64Plus plugins. The behavior of the plugin library when these parameters are changed while the emulator is running is not defined here. Some plugins will load the parameters when starting and store internal copies of the parameters for use during emulation. Other plugins may read the value of the parameters while running. === Audio-SDL === {| border="1" !Parameter Name!!Type!!Usage |- |Version |M64TYPE_FLOAT |Mupen64Plus Audio SDL config parameter set version number. Please don't change. |- |DEFAULT_FREQUENCY |M64TYPE_INT |Frequency which is used if rom doesn't want to change it |- |SWAP_CHANNELS |M64TYPE_BOOL |Swaps left and right channels |- |PRIMARY_BUFFER_SIZE |M64TYPE_INT |Size of primary buffer in output samples. This is where audio is loaded after it's extracted from n64's memory. |- |PRIMARY_BUFFER_TARGET |M64TYPE_INT |Fullness level target for Primary audio buffer, in equivalent output samples. |- |SECONDARY_BUFFER_SIZE |M64TYPE_INT |Size of secondary buffer in samples. This is SDL's hardware buffer. |- |RESAMPLE |M64TYPE_STRING |Audio resampling algorithm. "trivial" for fastest, lowest-quality algorithm. If compiled with SPEEX support, this can be "speex-fixed-0" to "speex-fixed-10". If compiled with libsrc support, this can be "src-sinc-best-quality", "src-sinc-medium-quality", "src-sinc-fastest", "src-zero-order-hold", or "src-linear". |- |VOLUME_CONTROL_TYPE |M64TYPE_INT |Volume control type: 1 = SDL (only affects Mupen64Plus output) 2 = OSS mixer (adjusts master PC volume) |- |VOLUME_ADJUST |M64TYPE_INT |Percentage change each time the volume is increased or decreased |- |VOLUME_DEFAULT |M64TYPE_INT |Default volume when a game is started. Only used if VOLUME_CONTROL_TYPE is 1 |- |} === Video-General === {| border="1" !Parameter Name!!Type!!Usage |- |Fullscreen |M64TYPE_BOOL |Use fullscreen mode if True, or windowed mode if False |- |ScreenWidth |M64TYPE_INT |Width of output window or fullscreen width |- |ScreenHeight |M64TYPE_INT |Height of output window or fullscreen height |- |} === Video-Rice === {| border="1" !Parameter Name!!Type!!Usage |- |FrameBufferSetting |M64TYPE_INT |Frame Buffer Emulation (0=ROM default, 1=disable) |- |FrameBufferWriteBackControl |M64TYPE_INT |Frequency to write back the frame buffer (0=every frame, 1=every other frame, etc) |- |RenderToTexture |M64TYPE_INT |Render-to-texture emulation (0=none, 1=ignore, 2=normal, 3=write back, 4=write back and reload) |- |ScreenUpdateSetting |M64TYPE_INT |Control when the screen will be updated (0=ROM default, 1=VI origin update, 2=VI origin change, 3=CI change, 4=first CI change, 5=first primitive draw, 6=before screen clear, 7=after screen drawn) |- |NormalAlphaBlender |M64TYPE_BOOL |Force to use normal alpha blender |- |FastTextureLoading |M64TYPE_BOOL |Use a faster algorithm to speed up texture loading and CRC computation (may break hi-res texture loading) |- |AccurateTextureMapping |M64TYPE_BOOL |Use different texture coordinate clamping code |- |InN64Resolution |M64TYPE_BOOL |Force emulated frame buffers to be in N64 native resolution |- |SaveVRAM |M64TYPE_BOOL |Try to reduce Video RAM usage (should never be used) |- |DoubleSizeForSmallTxtrBuf |M64TYPE_BOOL |Enable this option to have better render-to-texture quality |- |DefaultCombinerDisable |M64TYPE_BOOL |Force to use normal color combiner |- |EnableHacks |M64TYPE_BOOL |Enable game-specific settings from INI file |- |EnableFog |M64TYPE_BOOL |Enable or disable fog generation |- |WinFrameMode |M64TYPE_BOOL |If enabled, graphics will be drawn in WinFrame mode instead of solid and texture mode |- |FullTMEMEmulation |M64TYPE_BOOL |N64 Texture Memory Full Emulation (may fix some games, may break others) |- |OpenGLVertexClipper |M64TYPE_BOOL |Enable vertex clipper for fog operations |- |EnableSSE |M64TYPE_BOOL |Enable SSE optimizations for capable CPUs |- |EnableVertexShader |M64TYPE_BOOL |Use GPU vertex shader |- |SkipFrame |M64TYPE_BOOL |If this option is enabled, the plugin will skip every other frame |- |TexRectOnly |M64TYPE_BOOL |If enabled, texture enhancement will be done only for TxtRect ucode |- |SmallTextureOnly |M64TYPE_BOOL |If enabled, texture enhancement will be done only for textures width+height<=128 |- |LoadHiResTextures |M64TYPE_BOOL |Enable hi-resolution texture file loading |- |LoadHiResCRCOnly |M64TYPE_BOOL |Filter hi-resolution texture filenames based only on the CRC and ignore format+size tags (Glide64 compatibility) |- |DumpTexturesToFiles |M64TYPE_BOOL |Enable texture dumping |- |ShowFPS |M64TYPE_BOOL |Display On-screen FPS |- |FogMethod |M64TYPE_INT |Enable, Disable or Force fog generation (0=Disable, 1=Enable n64 choose, 2=Force Fog) |- |Mipmapping |M64TYPE_INT |Use Mipmapping? 0=no, 1=nearest, 2=bilinear, 3=trilinear |- |MultiSampling |M64TYPE_INT |Enable/Disable MultiSampling (0=off, 2,4,8,16=quality) |- |TextureEnhancement |M64TYPE_INT |Primary texture filter (0=None, 1=2X, 2=2XSAI, 3=HQ2X, 4=LQ2X, 5=HQ4X, 6=Sharpen, 7=Sharpen More, 8=External, 9=Mirrored) |- |TextureEnhancementControl |M64TYPE_INT |Secondary texture filter (0 = none, 1-4 = filtered) |- |ForceTextureFilter |M64TYPE_INT |Force to use texture filtering or not (0=auto: n64 choose, 1=force no filtering, 2=force filtering) |- |TextureQuality |M64TYPE_INT |Color bit depth to use for textures (0=default, 1=32 bits, 2=16 bits |- |OpenGLDepthBufferSetting |M64TYPE_INT |Z-buffer depth (only 16 or 32) |- |ColorQuality |M64TYPE_INT |Color bit depth for rendering window (0=32 bits, 1=16 bits) |- |OpenGLRenderSetting |M64TYPE_INT |OpenGL rendering level to support (0=auto, 1=OGL_1.1, 2=OGL_1.2, 3=OGL_1.3, 4=OGL_1.4, 5=OGL_1.4_V2, 6=OGL_TNT2, 7=NVIDIA_OGL, 8=OGL_FRAGMENT_PROGRAM) |- |AnisotropicFiltering |M64TYPE_INT |Enable/Disable Anisotropic Filtering for Mipmapping (0=no filtering, 2-16=quality). This is uneffective if EnableMipmapping is false. If the given value is to high to be supported by your graphic card, the value will be the highest value your graphic card can support. Better result with Trilinear filtering |- |ForcePolygonOffset |M64TYPE_BOOL |If true, use polygon offset values specified below (default=False). This can be used to eliminate stitching artifacts in textures and shadows, which are typically only a problem in mobile/embedded platforms (e.g. Android), where chipsets are inconsistent in their implementation of glPolygonOffset. |- |PolygonOffsetFactor |M64TYPE_FLOAT |Specifies a scale factor that is used to create a variable depth offset for each polygon. Ignored if ForcePolygonOffset is False, and typically only relevant for mobile/embedded platforms. This value is typically equal to PolygonOffsetUnits, and is found through trial and error. Mario's shadow in Super Mario 64 is a good test case when tuning this value. If the shadow flickers, use a larger magnitude for the float settings. Do not use a larger value than necessary to eliminate artifacts. As a guideline, typical values for mobile chipsets circa 2012-2014 are positive or negative values in the range 0.001 to 2. |- |PolygonOffsetUnits |M64TYPE_FLOAT |Is multiplied by an implementation-specific value to create a constant depth offset. Ignored if ForcePolygonOffset is False, and typically only relevant for mobile/embedded platforms. This value is typically equal to PolygonOffsetFactor, and is found through trial and error. Mario's shadow in Super Mario 64 is a good test case when tuning this value. If the shadow flickers, use a larger magnitude for the float settings. Do not use a larger value than necessary to eliminate artifacts. As a guideline, typical values for mobile chipsets circa 2012-2014 are positive or negative values in the range 0.001 to 2. |} === Input-SDL === The Mupen64Plus-Input-SDL plugin uses a separate config section for each simulated N64 controller. The sections are named: Input-SDL-Control1, Input-SDL-Control2, Input-SDL-Control3, and Input-SDL-Control4. The 4 sections all contain the same parameters. General-purpose Controller Configuration Parameters {| border="1" !Parameter Name!!Type!!Usage |- |version |M64TYPE_FLOAT |Mupen64Plus Input-SDL config parameter set version number. Please don't change. |- |mode |M64TYPE_INT |Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic |- |device |M64TYPE_INT |Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number |- |name |M64TYPE_STRING |SDL joystick name (or Keyboard) |- |plugged |M64TYPE_BOOL |Specifies whether this controller is 'plugged in' to the simulated N64 |- |plugin |M64TYPE_INT |Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 5=Rumble pak |- |mouse |M64TYPE_BOOL |If True, then mouse buttons may be used with this controller, and mouse movement will map to X/Y analog stick |- |MouseSensitivity |M64TYPE_STRING |The sensitivity coefficients for the mouse to move the N64 controller axis value from 0. For X, Y axes. Values must be positive. |- |AnalogDeadzone |M64TYPE_STRING |The minimum absolute value of the SDL analog joystick axis to move the N64 controller axis value from 0. For X, Y axes. |- |AnalogPeak |M64TYPE_STRING |An absolute value of the SDL joystick axis >= AnalogPeak will saturate the N64 controller axis value (at 80). For X, Y axes. For each axis, this must be greater than the corresponding AnalogDeadzone value |- |} Digital Controller Configuration These parameters are used to bind input events with N64 Controller button presses. There are 14 simulated buttons and 2 special buttons for switching between the Mem Pak and Rumble Pak expansion units. Each configuration parameter is a string which specifies input events which will map to the given N64 button. The configuration strings consist of zero or more input event words. A list of available input event words is given here: {| border="1" !Input Event Word!!Usage |- |key(<keysym>) |<keysym> = SDLK_* key symbol enumerated type |- |button(<num>) |<num> = SDL Joystick Button Number (0 or greater) |- |axis(<num><dir>) |<num> = SDL Joystick Axis Number, <dir> = axis direction (+ = positive, - = negative) |- |axis(<num><dir>,<deadzone>) |<num> = SDL Joystick Axis Number, <dir> = axis direction (+ = positive, - = negative), <deadzone> = minimum axis value (max 32767) to activate button; default 6000 |- |hat(<num> <dir>) |<num> = SDL Joystick Hat Number, <dir> = hat direction (Up, Down, Left, or Right) |- |mouse(<num>) |<num> = mouse button number (1 = left button, 2 = middle, 3 = right, etc) |- |}
{| border="1" !Parameter Name!!Type!!Usage |- |DPad R |M64TYPE_STRING |Input event string for mapping the Right button on the D-pad |- |DPad L |M64TYPE_STRING |Input event string for mapping the Left button on the D-pad |- |DPad D |M64TYPE_STRING |Input event string for mapping the Down button on the D-pad |- |DPad U |M64TYPE_STRING |Input event string for mapping the Up button on the D-pad |- |Start |M64TYPE_STRING |Input event string for mapping the Start button |- |Z Trig |M64TYPE_STRING |Input event string for mapping the Z trigger |- |B Button |M64TYPE_STRING |Input event string for mapping the "B" button |- |A Button |M64TYPE_STRING |Input event string for mapping the "A" button |- |C Button R |M64TYPE_STRING |Input event string for mapping the Right "C" button |- |C Button L |M64TYPE_STRING |Input event string for mapping the Left "C" button |- |C Button D |M64TYPE_STRING |Input event string for mapping the Down "C" button |- |C Button U |M64TYPE_STRING |Input event string for mapping the Up "C" button |- |R Trig |M64TYPE_STRING |Input event string for mapping the Right trigger |- |L Trig |M64TYPE_STRING |Input event string for mapping the Left trigger |- |Mempak switch |M64TYPE_STRING |Input event string for toggling the Memory Pak unit |- |Rumblepak switch |M64TYPE_STRING |Input event string for toggling the Rumble Pak unit |- |} Analog Controller Configuration These parameters are used to bind input events with N64 Controller analog stick movements. There are only 2 analog stick axes, X and Y. Each configuration parameter is a string which specifies input events which will map to the given N64 controller axis movement. The configuration strings consist of zero or more input event words. A list of available input event words is given here: {| border="1" !Input Event Word!!Usage |- |key(<key_a>,<key_b>) |<key_a> = SDLK_* key symbol for up/left movement. <key_b> = SDLK_* key symbol for down/right movement. The strength of these movements can be modulated with the Left-Shift and Left-Control keys. |- |button(<num_a>,<num_b>) |<num_a> = SDL Joystick Button Number for up/left movement. <num_b> = SDL Joystick Button Number for down/right movement. |- |axis(<num_a><dir_a>,<num_b><dir_b>) |<num_a> = SDL Joystick Axis Number for up/left movement, <dir_a> = axis direction for up/left movement (+ = positive, - = negative). <num_b> = SDL Joystick Axis Number for down/right movement, <dir_b> = axis direction for down/right movement. |- |hat(<num> <dir_a> <dir_b>) |<num> = SDL Joystick Hat Number, <dir_a> = hat direction for up/left movement (Up, Down, Left, or Right), <dir_b> = hat direction for right/down movement |- |}
{| border="1" !Parameter Name!!Type!!Usage |- |Y Axis |M64TYPE_STRING |Input event string for mapping the Y axis (up/down) of the analog stick |- |X Axis |M64TYPE_STRING |Input event string for mapping the X axis (left/right) of the analog stick |- |} mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Mupen64Plus-v2.0-API-Versioning.mediawiki000066400000000000000000000252531251723631200302410ustar00rootroot00000000000000[[Mupen64Plus v2.0 Core API v1.0|Mupen64Plus v2.0 API]] = Mupen64Plus v2.0 API Versioning = == Goal == The Mupen64Plus API versioning scheme was invented to give a more friendly and less confusing experience for users as the various components evolve over time. There are 6 basic components to the Mupen64Plus system, which may be independently built and installed: # The Front-end UI application # The Core emulator library # The Video plugin # The Audio plugin # The Input plugin # The RSP plugin These components interact with each other in several different ways. The design goal of the versioning scheme is to gracefully handle all situations in which two components support different versions of their common API (due to one component being newer than the other). In particular, each pair of components sharing a common API must discover whether or not they are compatible with each other. They must make this determination early enough in the startup process to inform the user of an incompatibility and gracefully exit the software if necessary without crashing. There are 2 different decisions that pertain to the compatibility determination: # Major API version. The various API version numbers are 32-bit. The major version number is stored in the upper 16 bits, and the minor version number is in the lower 16 bits. If two components have different major API version numbers, then they are definitely incompatible. # Minor API version. If two components with a common API have different minor version numbers, then the newer component may decide whether or not it can interact with the older component based upon the older component's version number. The newer component may optionally disable new features and still retain backwards compatibility, or it may refuse to operate with the older component. This decision is left to the component author when new features are added. == Basic Design == In mupen64plus-core/src/plugin/plugin.h, the following macros are defined: #define RSP_API_MAJOR_VERSION 0x20000 #define GFX_API_MAJOR_VERSION 0x20000 #define AUDIO_API_MAJOR_VERSION 0x20000 #define INPUT_API_MAJOR_VERSION 0x20000 In mupen64plus-core/src/main/version.h, the following macros are defined: #define FRONTEND_API_VERSION 0x020000 #define CONFIG_API_VERSION 0x020000 #define DEBUG_API_VERSION 0x020000 #define VIDEXT_API_VERSION 0x020000 # When the front-end application calls the CoreStartup() function, it passes it's Core<-->Front-end API version to the core. If the API major version numbers for the core and front-end don't match, the core will return from this function with a failure code of M64ERR_INCOMPATIBLE. # The Console-UI front-end also checks for API compatibility, during the AttachCoreLib() function call. It is not strictly necessary for a front-end application to verify the API compatibility with the core, since the core will also check during CoreStartup(). However, by doing so, an updated front-end may detect a core library using a newer (but backwards-compatible) API, and enable some extra features as a result of the expanded API. # At the time each plugin is attached to the core (during CoreAttachPlugin function call), the core checks the version number of the plugin API by calling the PluginGetVersion function. If the major version number of the plugin's reported API (APIVersion & 0xffff0000) does not match the corresponding version number for that plugin type in the core (defined in plugin.h), then the plugin is incompatible and cannot be attached to the core. Currently the plugins have no way to request the major version number required for a particular plugin type in the core library. # The emulator core exports several different API groups which may be used by the front-end and plugin modules. Currently, these groups are: Front-end, Config, Debug, and Video Extension. A front-end application or any plugin may call the CoreGetAPIVersions() function to retrieve the API version numbers for these groups. Any plugin or front-end which can use any updated (not present in the original "2.0" API) functions in one of these groups should call the core's CoreGetAPIVersions() function (during PluginStartup for a plugin or at core attach time for a front-end) to check the version # of the API supported by the core, and react accordingly. # All front-ends and plugins should verify API version compatibility for the Config API. == Handling Future Changes == === New feature added to a plugin library === If the feature is backwards-compatible with older cores, then plugin API minor version will be bumped. Otherwise, major version number will be bumped. If change is backwards-compatible, then newest core can test the plugin's API version and only enable the feature if present. === New feature added to Core<-->Front-end API === Typically this will happen when a new function or a new feature of an existing function is added to the core. If the older front-ends will still be compatible with newer cores, then the minor version number of the front-end API will be bumped. Otherwise the major version number will be bumped. A newer front-end can check the version of the API supported by the core and choose whether to retain backwards-compatibility with older cores or refuse to interoperate. === New feature added to Core Config API === If older plugins can still use the Core Config API with the new feature, then Config API minor version will be bumped. Otherwise, major version number will be bumped. Newer plugins should check the Core's Config API version and maintain backwards compatibility with older cores if possible. === New feature added to Core Debug API === If older front-ends can still use the Core Debug API with the new feature, then Debug API minor version number will be bumped. Otherwise, major version number will be bumped. Newer front-end applications should check the Core's Debug API version and maintain backwards compatibility with older cores if possible. === New feature added to Video Extension API === This is the most complicated interface, because it involves 3 components: the video plugin, the core, and the front-end application. If older video plugins can still use the newer Video Extension API with the core, *and* newer front-end applications can work with older cores, then the Video Extension API minor version number will be bumped. Otherwise, the major version number will be bumped. Newer video plugins can check the Core's Video Extension API version and maintain backwards compatibility with older cores if possible, otherwise they can refuse and give a compatibility error. Front-end applications (such as the default console-ui) which do not hook into the Video Extension do not need to check the Core's Video Extension API version. However, front-end applications which do hook into the Video Extension must check the API version. If the Core and Front-end have different API major version numbers, then they are incompatible. Also if the Core has a *newer* minor version than the front-end, then they are incompatible. This is a unique restriction, and it must be checked and verified by the front-end; the Core has no way to check this. == Changelog == * Version 2.0.0 is the base for all APIs * '''FRONTEND_API_VERSION''' version 2.0.1: ** added "m64p_command" type "M64CMD_CORE_STATE_SET", handled by CoreDoCommand() ** added "m64p_core_param" type "M64CORE_SPEED_LIMITER", handled by "M64CMD_CORE_STATE_QUERY" and "M64CMD_CORE_STATE_SET" commands * '''FRONTEND_API_VERSION''' version 2.0.2: ** added "m64p_command" types: *** M64CMD_GET_SCREEN_WIDTH *** M64CMD_GET_SCREEN_HEIGHT *** M64CMD_READ_SCREEN *** M64CMD_VOLUME_UP *** M64CMD_VOLUME_DOWN *** M64CMD_VOLUME_GET_LEVEL *** M64CMD_VOLUME_SET_LEVEL *** M64CMD_VOLUME_MUTE *** M64CMD_RESET *** M64CMD_ADVANCE_FRAME ** extend command M64CMD_STATE_SAVE to support saving uncompressed PJ64 savestate files as well as zip compressed * '''FRONTEND_API_VERSION''' version 2.1.0: ** removed "m64p_command" types: *** M64CMD_GET_SCREEN_WIDTH *** M64CMD_GET_SCREEN_HEIGHT *** M64CMD_VOLUME_UP *** M64CMD_VOLUME_DOWN *** M64CMD_VOLUME_GET_LEVEL *** M64CMD_VOLUME_SET_LEVEL *** M64CMD_VOLUME_MUTE ** added new "m64p_core_param" types: *** M64CORE_VIDEO_SIZE *** M64CORE_AUDIO_VOLUME *** M64CORE_AUDIO_MUTE *** M64CORE_INPUT_GAMESHARK *** M64CORE_STATE_LOADCOMPLETE *** M64CORE_STATE_SAVECOMPLETE * '''FRONTEND_API_VERSION''' version 2.1.1: ** Core command M64CMD_CORE_STATE_SET will now accept M64CORE_VIDEO_SIZE parameter *** will call the video plugin function ResizeVideoOutput() * '''CONFIG_API_VERSION''' version 2.1.0: ** add new function "ConfigSaveSection()" to save only a single config section to disk * '''CONFIG_API_VERSION''' version 2.2.0: ** add new function "ConfigHasUnsavedChanges()" to determine if a given Section (or all sections) of the Mupen64Plus Core configuration file has been modified since it was last saved or loaded. ** add new function "ConfigRevertChanges()" to revert changes previously made to one section of the configuration file, so that it will match with the configuration at the last time that it was loaded from or saved to disk. * '''CONFIG_API_VERSION''' version 2.3.0: ** add new function "ConfigSetParameterHelp()" sets the value of one of the emulator's configuration parameters. * '''VIDEO_API_VERSION''' version 2.1.0: ** video render callback function now takes a boolean (int) parameter, which specifies whether the video frame has been re-drawn since the last time the render callback was called. This allows us to take screenshots without the On-Screen-Display text * '''VIDEO_API_VERSION''' version 2.2.0: ** add (optional) ResizeVideoOutput function in video plugin. If this function is not present in video plugin, then resizing the output video window will not work. * '''VIDEXT_API_VERSION''' version 3.0.0: ** add VidExt_ResizeWindow() function in video extension. This function is called by the video plugin to notify the window manager (SDL if no video extension is registered by the front-end) that the OpenGL render window size should change. ** add m64p_video_flags parameter to the VidExt_SetVideoMode() function. Currently the flags are only used to notify the window manager that resizing is supported by the video plugin, and it should create a resizable window if possible. This may be extended in the future to support other features. * '''INPUT_API_VERSION''' version 2.0.1: ** add (optional) RenderCallback function to input plugin. This function is called by the core after rendering on screen text (OSD) and before the graphics plugin swaps the buffers. The purpose of this function is to enable the input plugin to draw on screen content, for example buttons in a touch input plugin. If this function is not present the core will ignore it and on screen rendering by the input plugin will be disabled. mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Mupen64Plus-v2.0-Core-API-v1.0.mediawiki000066400000000000000000000147271251723631200274740ustar00rootroot00000000000000Please note: as of January 2011, this API is a work in progress.
The core Mupen64Plus v2.0 modules are complete, but work on GUI front-end applications is ongoing. To view the design proposal which preceded this API definition, go to [[Mupen64Plus v2.0 Design Proposal 3|Design Proposal 3]]. == New Architecture == Earlier versions of Mupen64Plus (and other plugin-based N64 emulators) used a single monolithic application (containing the emulator core) and four plugins. The plugins were dynamically-loaded libraries, and the application used one plugin of each type: Video, Audio, Input, and RSP. Each plugin and the application contained its own GUI code for user interface, and each plugin and the application were individually responsible for finding their own data files and finding, loading, parsing, and storing their own configuration data files. This was an acceptable architecture for emulators which were only designed to run on a single platform (such as Windows), but causes a lot of developer and user headaches when applied to a cross-platform emulator such as Mupen64Plus. For this reason, we are re-designing the layout of the emulator to solve some of the problems caused by the old architecture. Under the new architecture, the old monolithic emulator application is split into two parts: a core emulator library and a main application, called the front-end. The front-end is primarily responsible for the user interface. All GUI code will be removed from the core and plugin libraries. The primary function of the core library is to emulate the R4300 CPU and memory system, attaching the plugins to form a full N64 system emulator. The core library also contains some utility functions which may be used by the front-end and plugins, such as a configuration parameter handler. == High-level Usage == The expected sequence of operations which will be taken by the front-end application are as follows: # Load core library (libmupen64plus.so) and set function pointers # Call CoreGetVersion, check core version and capabilities # Call CoreStartup to initialize the core library # Load front-end configuration from core config API or through own mechanism # Find plugins, open dynamic libraries, call PluginStartup for each # Enter message loop for user interaction # If user selects ROM and presses Play: #* Load and de-compress the ROM #* Use CoreDoCommand to open the ROM #* Call CoreAttachPlugin to attach selected plugins to core #* Use CoreDoCommand to start emulation #* When emulation is finished, call CoreDetachPlugin on all plugins, then close the ROM == Versioning == === API Versioning Scheme === Since the !Mupen64Plus emulator comprises 6 different software modules which can be mixed and matched (the front-end app, the core library, and 4 plugins), and the interfaces between these modules change over time, there are many hard-to-diagnose bugs which could show up due to incompatibilities between these different modules. For this reason, we use a comprehensive versioning scheme which allows any 2 components to determine whether or not they are compatible, and to support forward and backward compatibility as necessary. This scheme is described in detail in this document. Details can be found in [[Mupen64Plus v2.0 API Versioning]] == Core API == === Basic Core Functions === These two functions (PluginGetVersion and CoreErrorMessage) are utility functions and may be called at any time (even before core startup). These functions are used by both the front-end and the plugins. Details can be found in [[Mupen64Plus v2.0 Core Basic]] === Front-End Functions === There are several types of functions here, which are exported from the Core library to be used by the front-end. There are 'housekeeping' functions, for startup and shutdown, and attaching and detaching plugins. There is also a Command API which is used for many simple functions such as loading, executing, or stopping a ROM. Finally the Cheat API is here, for adding and removing cheat functions. Details can be found in [[Mupen64Plus v2.0 Core Front-End]] === Video Extension API === These functions are exported from the Core library for use by the video plugin. These functions are used for high-level video setup tasks such as enumerating available screen resolutions, setting the video mode, window caption, OpenGL attributes, and fullscreen mode. The video extension API allows for the abstraction of these functions away from the hard-coded SDL function calls currently in the video plugins, so that a front-end may override these functions and provide its own video API. Details can be found in [[Mupen64Plus v2.0 Core Video Extension]] === Debugger Functions === These are the debugger functions, which are also called only from the front-end. Most of these functions will return with an error if the core library was not compiled with the debugger enabled. A front-end may examine the Capabilities value returned by the CoreGetVersion function to determine if the core library was built with the debugger enabled. Details can be found in [[Mupen64Plus v2.0 Core Debugger]] === Configuration API === These configuration functions are exported from the core library and are used by the core and the plugins to store all of their persistent configuration parameters. The front-end application may also use these functions to store its configuration options, or it may use a different mechanism. This section also contains two Operating System Abstraction functions. These functions are used by the core, plugins, and the front-end to find full filepaths to shared data files and user-specific data files. Details can be found in [[Mupen64Plus v2.0 Core Config]] == Plugin API == === Plugin API === This section lists all of the functions which are exported by the plugins. The front-end application should only use the PluginStartup, PluginShutdown, and PluginGetVersion functions. All other functions will only be called from the core. Details can be found in [[Mupen64Plus v2.0 Plugin API]] == Configuration Parameters == === Core Parameters === This section lists the names and descriptions of all of the configuration parameters used by the Core library. Details can be found in [[Mupen64Plus Core Parameters]] === Plugin Parameters === This section lists the names and descriptions of all of the configuration parameters used by the Plugin libraries. Details can be found in [[Mupen64Plus Plugin Parameters]] mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Mupen64Plus-v2.0-Core-Basic.mediawiki000066400000000000000000000063201251723631200274100ustar00rootroot00000000000000[[Mupen64Plus v2.0 Core API v1.0|Mupen64Plus v2.0 API]] = Mupen64Plus v2.0 Basic Core API = Most libmupen64plus functions return an m64p_error return code, which is an enumerated type defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]. Front-end code should check the return value of each call to a libmupen64plus function. {| border="1" |Prototype |'''m64p_error PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities)''' |- |Input Parameters |'''PluginType''' Pointer to an enumerated type to store the plugin type. The value M64PLUGIN_CORE will always be stored.
'''PluginVersion''' Pointer to an integer to store the version number of the Mupen64Plus core. Version number 2.1.3 would be stored as 0x00020103.
'''APIVersion''' Pointer to an integer to store the version number of the Core--Front-end API used by the Mupen64plus core library.
'''PluginNamePtr''' Pointer to a const character pointer to receive the name of the core library. The const char * which is returned must point to a persistent string (ie, not stored on the stack).
'''Capabilities''' Pointer to an integer to store a logically-or'd set of flags which specify the capabilities of the core which were built into the library during compilation. These are defined in the m64p_core_caps enumerated type, defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]. |- |Usage |This function retrieves version information from the core library. This function is the same for the core library and the plugins, so that a front-end may examine all shared libraries in a directory and determine their types. Any of the input parameters may be set to NULL and this function will succeed but won't return the corresponding information. |}
{| border="1" |Prototype |'''m64p_error CoreGetAPIVersions(int *ConfigVersion, int *DebugVersion, int *VidextVersion, int *ExtraVersion)''' |- |Input Parameters |'''ConfigVersion''' Pointer to an integer to store the version number of the Config API exported by the Mupen64plus core library.
'''DebugVersion''' Pointer to an integer to store the version number of the Debug API exported by the Mupen64plus core library.
'''VidextVersion''' Pointer to an integer to store the version number of the Video Extension API exported by the Mupen64plus core library.
'''ExtraVersion''' Pointer to an integer to store an API version number for future use. Currently set to 0.
|- |Usage |This function retrieves API version information from the core library. This function may be used by either the front-end application or any plugin modules. Any of the input parameters may be set to NULL and this function will succeed but won't return the corresponding information. |}
{| border="1" |Prototype |'''const char * CoreErrorMessage(m64p_error ReturnCode)''' |- |Input Parameters |'''ReturnCode''' Enumerated type containing an error code. |- |Usage |This function returns a pointer to a NULL-terminated string giving a human-readable description of the error. |}
mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Mupen64Plus-v2.0-Core-Config.mediawiki000066400000000000000000000514761251723631200276100ustar00rootroot00000000000000[[Mupen64Plus v2.0 Core API v1.0|Mupen64Plus v2.0 API]] = Mupen64Plus v2.0 Configuration API = Most libmupen64plus functions return an m64p_error return code, which is an enumerated type defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]. Front-end code should check the return value of each call to a libmupen64plus function. == Selector Functions == These functions are used by the front-end to discover the sections in the configuration file, open a section, discover parameters within a section, and find out if a section has been changed. {| border="1" |Prototype |'''m64p_error ConfigListSections(void *context, void (*SectionListCallback)(void * context, const char * SectionName))''' |- |Input Parameters |'''context''' Void pointer to be passed to the SectionListCallback function
'''SectionListCallback''' Pointer to function in front-end for receiving the name of every section in the Mupen64Plus Core configuration data. This function will be called once for each section in the core configuration data structure, and then the ConfigListSections() function will return. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. The '''SectionListCallback''' pointer cannot be NULL. |- |Usage |This function is called to enumerate the list of Sections in the Mupen64Plus Core configuration file. It is expected that there will be a section named "Core" for core-specific configuration data, "Graphics" for common graphics options, and one section for each plugin library. |}
{| border="1" |Prototype |'''m64p_error ConfigOpenSection(const char *SectionName, m64p_handle *ConfigSectionHandle)''' |- |Input Parameters |'''SectionName''' Name of the Mupen64Plus configuration section to open. This name is case-insensitive. If no section exists with the given name, a new one will be created with no parameters. This name may consist of any ASCII characters between 32 and 127 except brackets "[]".
'''ConfigSectionHandle''' This is a handle (defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]) which is required to be used for subsequent calls to core configuration functions to list, retrieve, or set configuration parameters. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. The '''SectionName''' and '''ConfigSectionHandle''' pointers cannot be NULL. |- |Usage |This function is used to give a configuration section handle to the front-end which may be used to read or write configuration parameter values in a given section of the configuration file. |}
{| border="1" |Prototype |'''m64p_error ConfigListParameters(m64p_handle ConfigSectionHandle, void *context, void (*ParameterListCallback)(void * context, const char *ParamName, m64p_type ParamType))''' |- |Input Parameters |'''ConfigSectionHandle''' An m64p_handle given by the '''ConfigOpenSection''' function.
'''context''' Void pointer to be passed to the ParameterListCallback function
'''ParameterListCallback''' Pointer to function in front-end for receiving the name of every parameter in the given section of the Mupen64Plus Core configuration data. This function will be called once for each parameter in the section, and then the ConfigListParameters() function will return. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. The '''ConfigSectionHandle''' and '''ParameterListCallback''' pointers cannot be NULL. |- |Usage |This function is called to enumerate the list of Parameters in a given Section of the Mupen64Plus Core configuration file. |}
{| border="1" |Prototype |'''int ConfigHasUnsavedChanges(const char *SectionName)''' |- |Input Parameters |'''SectionName''' Name of the Mupen64Plus configuration section to check for unsaved changes. This name is case-insensitive. If this pointer is NULL or points to an empty string, then all sections are checked. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function.
This function was added in the Config API version 2.2.0. |- |Usage |This function is called to determine if a given Section (or all sections) of the Mupen64Plus Core configuration file has been modified since it was last saved. A return value of 0 means there are no unsaved changes, while a 1 will be returned if there are unsaved changes. |} == Modifier Functions == These functions are used for deleting parts of the configuration list or saving the configuration data to disk. {| border="1" |Prototype |'''m64p_error ConfigDeleteSection(const char *SectionName)''' |- |Input Parameters |'''SectionName''' Name of the Mupen64Plus configuration section to delete. This name is case-insensitive. This name may consist of any ASCII characters between 32 and 127 except brackets "[]".
|- |Requirements |The Mupen64Plus library must already be initialized before calling this function. |- |Usage |This function deletes a section from the Mupen64Plus configuration data. |}
{| border="1" |Prototype |'''m64p_error ConfigSaveFile(void)''' |- |Input Parameters |N/A |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. |- |Usage |This function saves the Mupen64Plus configuration file to disk. |}
{| border="1" |Prototype |'''m64p_error ConfigSaveSection(const char *SectionName)''' |- |Input Parameters |'''SectionName''' Name of the Mupen64Plus configuration section to save. This name is case-insensitive. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. The named section must exist in the current configuration.
This function was added in the Config API version 2.1.0. |- |Usage |This function saves one section of the current Mupen64Plus configuration to disk, while leaving the other sections unmodified. |}
{| border="1" |Prototype |'''m64p_error ConfigRevertChanges(const char *SectionName)''' |- |Input Parameters |'''SectionName''' Name of the Mupen64Plus configuration section to modify. This name is case-insensitive. This pointer cannot be NULL. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. The named section must exist in the current configuration.
This function was added in the Config API version 2.2.0. |- |Usage |This function reverts changes previously made to one section of the current Mupen64Plus configuration file, so that it will match with the configuration at the last time that it was loaded from or saved to disk. |} == Generic Get/Set Functions == These functions should be used for reading or writing configuration values in most cases. {| border="1" |Prototype |'''m64p_error ConfigSetParameter(m64p_handle ConfigSectionHandle, const char *ParamName, m64p_type ParamType, const void *ParamValue)''' |- |Input Parameters |'''ConfigSectionHandle''' An m64p_handle given by the '''ConfigOpenSection''' function.
'''ParamName''' NULL-terminated string containing the name of the parameter whose value is being set. This name is case-insensitive. This name may consist of any ASCII characters between 32 and 127 except the equals and hash signs, and may not end in a space.
'''ParamType''' An m64p_type value giving the type of the data object that '''ParamValue''' points to. If this is different from the native data representation used by the core, it will be converted into the type used by the core.
'''ParamValue''' Pointer to data object containing the value of the parameter to be set.
|- |Requirements |The Mupen64Plus library must already be initialized before calling this function. The '''ConfigSectionHandle''', '''ParamName''' and '''ParamValue''' pointers cannot be NULL. |- |Usage |This function sets the value of one of the emulator's configuration parameters in the section which is represented by '''ConfigSectionHandle'''. |}
|Prototype |'''m64p_error ConfigSetParameterHelp(m64p_handle ConfigSectionHandle, const char *ParamName, const char *ParamHelp)''' |- |Input Parameters |'''ConfigSectionHandle''' An m64p_handle given by the '''ConfigOpenSection''' function.
'''ParamName''' NULL-terminated string containing the name of the parameter whose help string is being set. This name is case-insensitive. This name may consist of any ASCII characters between 32 and 127 except the equals and hash signs, and may not end in a space.
'''ParamHelp''' NULL-terminated string containing some human-readable information about the usage of this parameter. Can be NULL.
|- |Requirements |The Mupen64Plus library must already be initialized before calling this function. The '''ConfigSectionHandle''' and '''ParamName''' pointers cannot be NULL. |- |Usage |This function sets the help string of one of the emulator's configuration parameters in the section which is represented by '''ConfigSectionHandle'''. |}
{| border="1" |Prototype |'''m64p_error ConfigGetParameter(m64p_handle ConfigSectionHandle, const char *ParamName, m64p_type ParamType, void *ParamValue, int MaxSize)''' |- |Input Parameters |'''ConfigSectionHandle''' An m64p_handle given by the '''ConfigOpenSection''' function.
'''ParamName''' NULL-terminated string containing the name of the parameter whose value is being retrieved. This name is case-insensitive. This name may consist of any ASCII characters between 32 and 127 except the equals and hash signs, and may not end in a space.
'''ParamType''' An m64p_type value giving the type of the data object that '''ParamValue''' points to. If this is different from the native data representation used by the core, it will be converted into the type given by '''ParamType'''.
'''ParamValue''' Pointer to data object to receive the value of the parameter being retrieved.
'''MaxSize''' Size (in bytes) of the data object that '''ParamValue''' points to. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. The '''ConfigSectionHandle''', '''ParamName''' and '''ParamValue''' pointers cannot be NULL. |- |Usage |This function retrieves the value of one of the emulator's parameters in the section which is represented by '''ConfigSectionHandle'''. |}
{| border="1" |Prototype |'''m64p_error ConfigGetParameterType(m64p_handle ConfigSectionHandle, const char *ParamName, m64p_type *ParamType)''' |- |Input Parameters |'''ConfigSectionHandle''' An m64p_handle given by the '''ConfigOpenSection''' function.
'''ParamName''' Pointer to a NULL-terminated string containing the name of the parameter whose type is being retrieved. This name is case-insensitive. This name may consist of any ASCII characters between 32 and 127 except the equals and hash signs, and may not end in a space.
'''ParamType''' Pointer to an m64p_type value to receive the type of the parameter indicated by '''ParamName'''. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. The '''ConfigSectionHandle''', '''ParamName''', and '''ParamType''' pointers cannot be NULL. |- |Usage |This function retrieves the type of one of the emulator's parameters in the section which is represented by '''ConfigSectionHandle'''. If there is no parameter with the given '''ParamName''', the error M64ERR_INPUT_NOT_FOUND will be returned. |}
{| border="1" |Prototype |'''const char * ConfigGetParameterHelp(m64p_handle ConfigSectionHandle, const char *ParamName)''' |- |Return Value |Pointer to a NULL-terminated string containing usage information for the '''ParamName''' parameter. May be NULL. |- |Input Parameters |'''ConfigSectionHandle''' An m64p_handle given by the '''ConfigOpenSection''' function.
'''ParamName''' NULL-terminated string containing the name of the parameter for which usage information is being retrieved. This name is case-insensitive. This name may consist of any ASCII characters between 32 and 127 except the equals and hash signs, and may not end in a space. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. The '''ConfigSectionHandle''', and '''ParamName''' pointers cannot be NULL. |- |Usage |This function retrieves the help information about one of the emulator's parameters in the section which is represented by '''ConfigSectionHandle'''. |} == Special Get/Set Functions == These parameterized Get/SetDefault functions are provided for simplifying the task of handling default values within a single module. Each code module using the Core's configuration API should set the default values for all configuration parameters used by that module during its Startup() function. This allows the software to set up the default values automatically rather than storing them in a separate "default config file" which has proven problematic in the past. This also solves the problem which occurs when an upgraded module contains a new config parameter not present in the previous release. The special Get functions return the configuration value directly rather than writing them through a pointer and returning an error code. For this reason, these parameterized Get functions should only be used within a module which 'owns' the configuration section and set up its default values in the Startup() function. Because these functions cannot signal an error to the caller, a front-end should not use these functions to retrieve configuration values for the core or the plugins, unless the names of the parameters have been enumerated with ConfigListParameters and are therefore guaranteed to exist.
{| border="1" |Prototype |'''m64p_error ConfigSetDefaultInt(m64p_handle ConfigSectionHandle, const char *ParamName, int ParamValue, const char *ParamHelp)'''
'''m64p_error ConfigSetDefaultFloat(m64p_handle ConfigSectionHandle, const char *ParamName, float ParamValue, const char *ParamHelp)'''
'''m64p_error ConfigSetDefaultBool(m64p_handle ConfigSectionHandle, const char *ParamName, int ParamValue, const char *ParamHelp)'''
'''m64p_error ConfigSetDefaultString(m64p_handle ConfigSectionHandle, const char *ParamName, const char * ParamValue, const char *ParamHelp)''' |- |Input Parameters |'''ConfigSectionHandle''' An m64p_handle given by the '''ConfigOpenSection''' function.
'''ParamName''' NULL-terminated string containing the name of the parameter whose value is being set. This name is case-insensitive. This name may consist of any ASCII characters between 32 and 127 except the equals and hash signs, and may not end in a space.
'''ParamValue''' Integer or null-terminated string pointer containing the value of the parameter to be set.
'''ParamHelp''' NULL-terminated string containing some human-readable information about the usage of this parameter. Can be NULL. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. The '''ConfigSectionHandle''' and '''ParamName''' pointers cannot be NULL. |- |Usage |This function is used to set the value of a configuration parameter if it is not already present in the configuration file. This may happen if a new user runs the emulator, or an upgraded module uses a new parameter, or the user deletes his or her configuration file. If a parameter named '''ParamName''' is already present in the given section of the configuration file, then no action will be taken and this function will return successfully. Otherwise, a new parameter will be created its value will be assigned to '''ParamValue'''. |}
{| border="1" |Prototype | {| |- |'''int''' || '''ConfigGetParamInt(m64p_handle ConfigSectionHandle, const char *ParamName)''' |- |'''float''' || '''ConfigGetParamFloat(m64p_handle ConfigSectionHandle, const char *ParamName)''' |- |'''int''' || '''ConfigGetParamBool(m64p_handle ConfigSectionHandle, const char *ParamName)''' |- |'''const char *''' || '''ConfigGetParamString(m64p_handle ConfigSectionHandle, const char *ParamName)''' |} |- |Input Parameters |'''ConfigSectionHandle''' An m64p_handle given by the '''ConfigOpenSection''' function.
'''ParamName''' NULL-terminated string containing the name of the parameter whose value is being retrieved. This name is case-insensitive. This name may consist of any ASCII characters between 32 and 127 except the equals and hash signs, and may not end in a space. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. The '''ConfigSectionHandle''' and '''ParamName''' pointers cannot be NULL. |- |Usage |This function retrieves the value of one of the emulator's parameters in the section which is represented by '''ConfigSectionHandle''', and returns the value directly to the calling function. If an errors occurs (such as if '''ConfigSectionHandle''' is invalid, or there is no configuration parameter named '''ParamName'''), then an error will be sent to the front-end via the DebugCallback() function, and either a 0 (zero) or an empty string will be returned. |} == OS-Abstraction Functions == {| border="1" |Prototype |'''const char * ConfigGetSharedDataFilepath(const char *filename)''' |- |Return Value |Pointer to a NULL-terminated string containing a full directory path and filename to a given shared data file, or NULL if this file was not found. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. |- |Usage |It is common for shared data files on Unix systems to be installed in different places on different systems. Therefore, this core function is provided to allow a plugin to retrieve a full pathname to a given shared data file. This type of file is intended to be shared among multiple users on a system, so it is likely to be read-only. Examples of these types of files include: the .ini files for Rice Video and Glide64, the font and Mupen64Plus.ini files for the core, and the cheat code files for the front-end. This function will first search in a directory given via the DataPath parameter to the '''CoreStartup''' function, then in a directory given by the SharedDataPath core configuration parameter, then in a directory which may be supplied at compile time through a Makefile or configure script option, and finally in some common system locations (such as /usr/share/mupen64plus and /usr/local/share/mupen64plus on Unix systems). |}
{| border="1" |Prototype |'''const char * ConfigGetUserConfigPath(void)''' |- |Return Value |Pointer to a NULL-terminated string containing the directory path to user-specific configuration files. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. |- |Usage |This function may be used by the plugins or front-end to get a path to the directory for storing user-specific configuration files. This will be the directory where the configuration file "mupen64plus.cfg" is located. |}
{| border="1" |Prototype |'''const char * ConfigGetUserDataPath(void)''' |- |Return Value |Pointer to a NULL-terminated string containing the directory path to user-specific data files. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. |- |Usage |This function may be used by the plugins or front-end to get a path to the directory for storing user-specific data files. This may be used to store files such as screenshots, saved game states, or hi-res textures. |}
{| border="1" |Prototype |'''const char * ConfigGetUserCachePath(void)''' |- |Return Value |Pointer to a NULL-terminated string containing the directory path to user-specific caching data files. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. |- |Usage |This function may be used by the plugins or front-end to get a path to the directory for storing user-specific caching data files. Files in this directory may be deleted by the user to save space, so critical information should not be stored here. This directory may be used to store files such as the ROM browser cache. |} mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Mupen64Plus-v2.0-Core-Debugger.mediawiki000066400000000000000000000336051251723631200301210ustar00rootroot00000000000000[[Mupen64Plus v2.0 Core API v1.0|Mupen64Plus v2.0 API]] = Mupen64Plus v2.0 Core Debugger API = Most libmupen64plus functions return an m64p_error return code, which is an enumerated type defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]. Front-end code should check the return value of each call to a libmupen64plus function. == General Debugger Functions == {| border="1" |Prototype |'''m64p_error DebugSetCallbacks(void (*dbg_frontend_init)(void), void (*dbg_frontend_update)(unsigned int pc), void (*dbg_frontend_vi)(void))''' |- |Input Parameters |'''dbg_frontend_init''' Pointer to function which is called when debugger is initialized.
'''dbg_frontend_update''' Pointer to function which is called after debugger hits a breakpoint or executes one instruction in stepping mode.
'''dbg_frontend_vi''' Pointer to function which is called during each vertical interrupt. |- |Requirements |The Mupen64Plus library must be built with debugger support and must be initialized before calling this function. |- |Usage |This function is called by the front-end to supply debugger callback function pointers. If debugger is enabled and then later disabled within the GUI, this function may be called with NULL pointers in order to disable the callbacks. |}
{| border="1" |Prototype |'''m64p_error DebugSetCoreCompare(void (*dbg_core_compare)(unsigned int), void (*dbg_core_data_sync)(int, void *))''' |- |Input Parameters |'''dbg_core_compare''' Pointer to function which is called after each R4300 instruction, for comparing the operation of one R4300 emulator core against another.
'''dbg_core_data_sync''' Pointer to function which is used to transfer data from the sending emulator core to the receiving core, such as controller button press or movement data. |- |Requirements |The Mupen64Plus library must be initialized before calling this function. |- |Usage |This function is called by the front-end to supply callback function pointers for the Core Comparison feature. This feature is designed to work as follows. The front-end application will set up some channel for communicating data between two separately running instances of mupen64plus. For example, the unix console front-end will use named FIFOs. The front-end will register callback functions for comparing the 2 cores' states via this DebugSetCoreCompare API call. When the dbg_core_compare callback fires, the front-end will use the DebugGetCPUDataPtr function (and DebugMemGetPointer function if desired) to transmit emulator core state data from the 'sending' instance to the 'receiving' instance. The receiving instance may then check the core state data against it's own internal state and report any discrepancies. When the dbg_core_data_sync callback fires, the front-end should transmit a block of data from the sending instance to the receiving instance. This is for the purposes of synchronizing events such as controller inputs or state loading commands, so that the 2 cores may stay synchronized. This feature does not require the M64CAPS_DEBUGGER capability to built into the core, but it does require the M64CAPS_CORE_COMPARE capability. |}
{| border="1" |Prototype |'''m64p_error DebugSetRunState(m64p_dbg_runstate runstate)''' |- |Input Parameters |'''runstate''' An m64p_dbg_runstate enumerated type specifying the debugging state of the emulator. M64P_DBG_RUNSTATE_RUNNING continues execution until a breakpoint is hit or a different state is chosen. M64P_DBG_RUNSTATE_STEPPING enters a single step running mode that sends callbacks as each step is performed. M64P_DBG_RUNSTATE_PAUSED pauses execution to allow manual stepping. |- |Requirements |The Mupen64Plus library must be built with debugger support and must be initialized before calling this function. |- |Usage |This function sets the run state of the R4300 CPU emulator. |}
{| border="1" |Prototype |'''int DebugGetState(m64p_dbg_state statenum)''' |- |Input Parameters |'''statenum''' An m64p_dbg_state enumerated type specifying which debugger state variable to read. |- |Requirements |The Mupen64Plus library must be built with debugger support and must be initialized before calling this function. |- |Usage |This function reads and returns a debugger state variable, which are enumerated in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]. |}
{| border="1" |Prototype |'''m64p_error DebugStep(void)''' |- |Requirements |The Mupen64Plus library must be built with debugger support and must be initialized, the emulator core must be executing a ROM, and the debugger must be active before calling this function. |- |Usage |This function signals the debugger to advance one instruction when in the stepping mode. |}
{| border="1" |Prototype |'''void DebugDecodeOp(unsigned int instruction, char *op, char *args, int pc)''' |- |Input Parameters |'''instruction''' 32-bit R4300 instruction opcode
'''op''' Pointer to character array to store decoded instruction mnemonic
'''args''' Pointer to character array to store instruction arguments
'''pc''' Program Counter address at which '''instruction''' is stored |- |Requirements |The Mupen64Plus library must be built with debugger support. |- |Usage |This is a helper function for the debugger front-end. This instruction takes a PC value and an R4300 instruction opcode and writes the disassembled instruction mnemonic and arguments into character buffers. This is intended to be used to display disassembled code. |} == Memory Functions == {| border="1" |Prototype |'''void * DebugMemGetRecompInfo(m64p_dbg_mem_info recomp_type, unsigned int address, int index)''' |- |Input Parameters |'''recomp_type''' Type of information to retrieve about a recompiled machine instruction. Must be a M64P_DBG_RECOMP_* type.
'''address''' Program Counter value (in N64 memory space) of R4300 instruction about which to retrieve the recompiled x86 instructions.
'''index''' Index of recompiled instruction about which to receive information. |- |Requirements |The Mupen64Plus library must be built with debugger support and must be initialized before calling this function. This function may not be available on all platforms. |- |Usage |This function is used by the front-end to retrieve disassembly information about recompiled code. For example, the dynamic recompiler may take a single R4300 instruction and compile it into 10 x86 instructions. This function may then be used to retrieve the disassembled code of the 10 x86 instructions. For '''recomp_type''' of M64P_DBG_RECOMP_OPCODE or M64P_DBG_RECOMP_ARGS, a character pointer will be returned which gives the disassembled instruction code. For '''recomp_type''' of M64P_DBG_RECOMP_ADDR, a pointer to the recompiled x86 instruction will be given. |}
{| border="1" |Prototype |'''int DebugMemGetMemInfo(m64p_dbg_mem_info mem_info_type, unsigned int address)''' |- |Input Parameters |'''mem_info_type''' Type of information to retrieve about an N64 memory location. Must be a M64P_DBG_MEM_* type.
'''address''' Memory location (in N64 memory space) about which to retrieve some information. |- |Requirements |The Mupen64Plus library must be built with debugger support and must be initialized before calling this function. |- |Usage |This function returns an integer value regarding the memory location '''address''', corresponding to the information requested by '''mem_info_type''', which is a type enumerated in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]. For example, if '''address''' contains R4300 program code, the front-end may request the number of x86 instructions emitted by the dynamic recompiler by requesting M64P_DBG_MEM_NUM_RECOMPILED. |}
{| border="1" |Prototype |'''void * DebugMemGetPointer(m64p_dbg_memptr_type mem_ptr_type)''' |- |Input Parameters |'''mem_ptr_type''' Memory type to which a pointer is requested. |- |Requirements |The Mupen64Plus library must be initialized before calling this function. |- |Usage |This function returns a memory pointer (in x86 memory space) to a block of emulated N64 memory. This may be used to retrieve a pointer to a special N64 block (such as the serial, video, or audio registers) or the RDRAM. The '''m64p_dbg_memptr_type''' type is enumerated in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]] |}
{| border="1" |Prototype | {| |- |'''unsigned long long''' || '''DebugMemRead64(unsigned int address)''' |- |'''unsigned int''' || '''DebugMemRead32(unsigned int address)''' |- |'''unsigned short''' || '''DebugMemRead16(unsigned int address)''' |- |'''unsigned char''' || '''DebugMemRead8(unsigned int address)''' |} |- |Input Parameters |'''address''' Memory location (in N64 memory space) from which to retrieve a value.
|- |Requirements |The Mupen64Plus library must be built with debugger support and must be initialized before calling this function. |- |Usage |These functions retrieve a value from the emulated N64 memory. The returned value will be correctly byte-swapped for the host architecture. |}
{| border="1" |Prototype |'''void DebugMemWrite64(unsigned int address, unsigned long long value)'''
'''void DebugMemWrite32(unsigned int address, unsigned int value)'''
'''void DebugMemWrite16(unsigned int address, unsigned short value)'''
'''void DebugMemWrite8(unsigned int address, unsigned char value)''' |- |Input Parameters |'''address''' Memory location (in N64 memory space) to which to write a value.
'''value''' Value to write into emulated memory. |- |Requirements |The Mupen64Plus library must be built with debugger support and must be initialized before calling this function. |- |Usage |These functions write a value into the emulated N64 memory. The given value will be correctly byte-swapped before storage. |} == R4300 CPU Functions == {| border="1" |Prototype |'''void *DebugGetCPUDataPtr(m64p_dbg_cpu_data cpu_data_type)''' |- |Input Parameters |'''cpu_data_type''' CPU register type to which a pointer is requested.
|- |Requirements |The Mupen64Plus library must be initialized before calling this function. |- |Usage |This function returns a memory pointer (in x86 memory space) to a specific register in the emulated R4300 CPU. The '''m64p_dbg_cpu_data''' type is enumerated in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]. It is important to note that when the R4300 CPU core is in the Cached Interpreter or Dynamic Recompiler modes, the address of the PC register is not constant; it will change after each instruction is executed. The pointers to all other registers will never change, as the other registers are global variables. |} == Breakpoint Functions == {| border="1" |Prototype |'''int DebugBreakpointLookup(unsigned int address, unsigned int size, unsigned int flags)''' |- |Input Parameters |'''address''' Starting address (in R4300 memory space) to search
'''size''' Size of address space in bytes to search
'''flags''' Breakpoint flags |- |Requirements |The Mupen64Plus library must be built with debugger support and must be initialized before calling this function. |- |Usage |This function searches through all current breakpoints in the debugger to find one that matches the given input parameters. If a matching breakpoint is found, the index number is returned. If no breakpoints are found, -1 is returned. |}
{| border="1" |Prototype |'''int DebugBreakpointCommand(m64p_dbg_bkp_command command, unsigned int index, m64p_breakpoint *bkp)''' |- |Input Parameters |'''command''' Enumerated value specifying the breakpoint command to execute
'''index''' Purpose varies by command, see table below
'''bkp''' Pointer to breakpoint for certain commands, see table below |- |Requirements |The Mupen64Plus library must be built with debugger support and must be initialized before calling this function. |- |Usage |This function is used to process common breakpoint commands, such as adding, removing, or searching the breakpoints. The meanings of the '''index''' and '''bkp''' input parameters vary by command, and are given in the table below. The '''m64p_dbg_bkp_command''' type is enumerated in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]. |}
{| border="1" !Command!!Return Value!!Function!!index Parameter!!ptr Parameter |- |M64P_BKP_CMD_ADD_ADDR |Index of new breakpoint |Add an execution breakpoint at a given R4300 address. |R4300 address |unused |- |M64P_BKP_CMD_ADD_STRUCT |Index of new breakpoint |Add a custom breakpoint specified in a breakpoint structure. |unused |Pointer to breakpoint struct of new breakpoint |- |M64P_BKP_CMD_REPLACE |unused |Replace an existing breakpoint with one specified by a breakpoint structure. |Index of breakpoint to replace |Pointer to breakpoint struct of new breakpoint |- |M64P_BKP_CMD_REMOVE_ADDR |unused |Remove an existing breakpoint |R4300 address of breakpoint to remove |unused |- |M64P_BKP_CMD_REMOVE_IDX |unused |Remove an existing breakpoint |Index of breakpoint to remove |unused |- |M64P_BKP_CMD_ENABLE |unused |Enable a specified breakpoint |Index of breakpoint to enable |unused |- |M64P_BKP_CMD_DISABLE |unused |Disable a specified breakpoint |Index of breakpoint to disable |unused |- |M64P_BKP_CMD_CHECK |Index of breakpoint if found, otherwise -1 |Search for an execution breakpoint at a given address |R4300 address at which to search |unused |} mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Mupen64Plus-v2.0-Core-Front-End.mediawiki000066400000000000000000000444441251723631200301740ustar00rootroot00000000000000[[Mupen64Plus v2.0 Core API v1.0|Mupen64Plus v2.0 API]] = Mupen64Plus v2.0 Core<-->Front-End API = Most libmupen64plus functions return an m64p_error return code, which is an enumerated type defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]. Front-end code should check the return value of each call to a libmupen64plus function. == Startup/Shutdown Functions == {| border="1" |Prototype |'''m64p_error CoreStartup(int APIVersion, const char *ConfigPath, const char *DataPath, void *Context, void (*DebugCallback)(void *Context, int level, const char *message), void *Context2, void (*StateCallback)(void *Context2, m64p_core_param ParamChanged, int NewValue))''' |- |Input Parameters |'''APIVersion''' Integer containing the version number of the Core API used by the front-end.
'''ConfigPath''' File path to folder containing Mupen64Plus.cfg. Can be NULL.
'''DataPath''' Folder to search first when looking for shared data files. Can be NULL.
'''Context''' Pointer which will be passed back to the '''DebugCallback''' function. Can be NULL.
'''DebugCallback''' Pointer to function in front-end for receiving debug information and warnings from the core. This function must be thread-safe. Can be NULL. The value of level is 1 for an error, 2 for a warning, 3 for info, and 4 for verbose info.
'''Context2''' Pointer which will be passed back to the '''StateCallback''' function. Can be NULL.
'''StateCallback''' Pointer to function in front-end for receiving core state change notifications. This function must be thread-safe. Can be NULL. |- |Requirements |This function must be called before any other libmupen64plus functions. |- |Usage |This function initializes libmupen64plus for use by allocating memory, creating data structures, and loading the configuration file. If '''ConfigPath''' is NULL, libmupen64plus will search for the configuration file in its usual place (On Linux, in ~/.config/mupen64plus/). This function may return M64ERR_INCOMPATIBLE if older front-end is used with newer core. |}
{| border="1" |Prototype |'''m64p_error CoreShutdown(void)''' |- |Input Parameters |N/A |- |Usage |This function saves the configuration file, then destroys data structures and releases memory allocated by the core library. |}
{| border="1" |Prototype |'''m64p_error CoreAttachPlugin(m64p_plugin_type PluginType, m64p_dynlib_handle PluginLibHandle)''' |- |Input Parameters |'''PluginType''' Enumerated type specifying the plugin type to attach to the core. If this type of plugin is currently attached to the core, an error will be returned.
'''PluginLibHandle''' Dynamic library handle (defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]) corresponding with the plugin object to attach. |- |Requirements |Both the core library and the plugin library must already be initialized with the CoreStartup()/PluginStartup() functions, and a ROM must be open. This function cannot be called while the emulator is running. The plugins must be attached in the following order: Video, Audio, Input, RSP. |- |Usage |This function attaches the given plugin to the emulator core. There can only be one plugin of each type attached to the core at any given time. |}
{| border="1" |Prototype |'''m64p_error CoreDetachPlugin(m64p_plugin_type PluginType)''' |- |Input Parameters |'''PluginType''' Enumerated type specifying the plugin type to detach from the core. If no plugin of this type is currently attached to the core, this function will exit with a return value of M64ERR_SUCCESS. |- |Requirements |Both the core library and the plugin library must already be initialized with the CoreStartup()/PluginStartup() functions. This function cannot be called while the emulator is running. |- |Usage |This function detaches the given plugin from the emulator core, and re-attaches the 'dummy' plugin functions. |} == Command Functions == {| border="1" |Prototype |'''m64p_error CoreDoCommand(m64p_command Command, int ParamInt, void *ParamPtr)''' |- |Input Parameters |'''Command''' Enumerated type specifying which command should be executed.
'''ParamInt''' An integer value which may be used as an input to the command.
'''ParamPtr''' A pointer which may be used as an input to the command.
|- |Requirements |The core library must already be initialized with the CoreStartup() function. Each command may have its own requirements as well. |- |Usage |This function sends a command to the emulator core. A table of all commands is given below. |}
{| border="1" !Command!!Function!!Input Parameters!!Requirements |- |M64CMD_ROM_OPEN |This will cause the core to read in a binary ROM image provided by the front-end. |'''ParamPtr''' Pointer to the uncompressed ROM image in memory.
'''ParamInt''' The size in bytes of the ROM image. |The emulator cannot be currently running. A ROM image must not be currently opened. |- |M64CMD_ROM_CLOSE |This will close any currently open ROM. The current cheat code list will also be deleted. |N/A |The emulator cannot be currently running. A ROM image must have been previously opened. There should be no plugins currently attached. |- |M64CMD_ROM_GET_HEADER |This will retrieve the header data of the currently open ROM. |'''ParamPtr''' Pointer to a rom_header struct to receive the data.
'''ParamInt''' The size in bytes of the rom_header struct. |A ROM image must be open. |- |M64CMD_ROM_GET_SETTINGS |This will retrieve the settings data of the currently open ROM. |'''ParamPtr''' Pointer to a rom_settings struct to receive the data.
'''ParamInt''' The size in bytes of the rom_settings struct. |A ROM image must be open. |- |M64CMD_EXECUTE |This command will start the emulator and begin executing the ROM image. This function call will not return until the game has been stopped. |N/A |The emulator cannot be currently running. A ROM image must have been previously opened. |- |M64CMD_STOP |This will stop the emulator, if it is currently running. |N/A |This command will execute asynchronously. |- |M64CMD_PAUSE |This command will pause the emulator if it is running. |N/A |This function will return a non-successful error code if the emulator is in the stopped state. This command may execute asynchronously. |- |M64CMD_RESUME |This command will resume execution of the emulator if it is paused. |N/A |This function will return a non-successful error code if the emulator is in the stopped state. This command may execute asynchronously. |- |M64CMD_CORE_STATE_QUERY |This command will query the emulator core for the value of a state parameter |'''ParamInt''' An m64p_core_param enumerated type specifying the desired state variable'''
ParamPtr''' Pointer to an integer to receive the value of the requested state variable. |None |- |M64CMD_CORE_STATE_SET |This command will set the value of a state parameter in the emulator core |'''ParamInt''' An m64p_core_param enumerated type specifying the desired state variable'''
ParamPtr''' Pointer to an integer to containing the value of the requested state variable. |The initial requirements vary depending upon the variable being set. Setting some variables requires the emulator to be running. |- |M64CMD_STATE_LOAD |This command will attempt to load a saved state file. If '''ParamPtr''' is not NULL, this function will load a state file from a full pathname specified by this pointer. Otherwise ('''ParamPtr''' is NULL), it will load from the current slot. |'''ParamInt''' Ignored'''
ParamPtr''' Pointer to string containing state file path and name, or NULL |The emulator must be currently running or paused. This command will execute asynchronously. |- |M64CMD_STATE_SAVE |This command will save a state file. If '''ParamPtr''' is not NULL, this function will save a state file to a full pathname specified by this pointer. Otherwise ('''ParamPtr''' is NULL), it will save to the current slot. |'''ParamInt''' This parameter will only be used if '''ParamPtr''' is not NULL. If 1, a Mupen64Plus state file will be saved. If 2, a Project64 compressed state file will be saved. If 3, a Project64 uncompressed state file will be saved. '''
ParamPtr''' Pointer to string containing state file path and name, or NULL
|The emulator must be currently running or paused. This command will execute asynchronously. |- |M64CMD_STATE_SET_SLOT |This command will set the currently selected save slot index |'''ParamInt''' Value to set for the current slot index. Must be between 0 and 9'''
ParamPtr''' Ignored
|None |- |M64CMD_SEND_SDL_KEYDOWN |This command will inject an SDL_KEYDOWN event into the emulator's core event loop. Keys not handled by the core will be passed to the input plugin. |'''ParamInt''' Key value of the keypress event to inject, with SDLMod in the upper 16 bits and SDLKey in the lower 16 bits. |The emulator must be currently running or paused. |- |M64CMD_SEND_SDL_KEYUP |This command will inject an SDL_KEYUP event into the emulator's core event loop. |'''ParamInt''' Key value of the keypress event to inject, with SDLMod in the upper 16 bits and SDLKey in the lower 16 bits. |The emulator must be currently running or paused. |- |M64CMD_SET_FRAME_CALLBACK |This command either registers or removes (if '''ParamPtr''' is NULL) a frame callback function. This function will be called after each video frame is rendered. The front-end callback function may call the video plugin's ReadScreen2() function to retrieve the frame if desired. |'''ParamPtr''' Can be either NULL or a m64p_frame_callback object. |None |- |M64CMD_TAKE_NEXT_SCREENSHOT |This will cause the core to save a screenshot at the next possible opportunity. |N/A |The emulator must be currently running or paused. This command will execute asynchronously. |- |M64CMD_READ_SCREEN |This command will copy the current contents of the video display to the buffer pointer by '''ParamPtr'''. |'''ParamInt''' 1 to copy the buffer that is currently displayed (front buffer), 0 to copy the buffer that is being drawn (back buffer).'''
ParamPtr'''A pointer to a buffer of at least width*height*3 bytes. The buffer will be filled with the current display. The format is RGB888 with the origin in the lower left corner. |The emulator must be currently running or paused. |- |M64CMD_RESET |Reset the emulated machine. |'''ParamInt''' 0 to do a soft reset, 1 to do a hard reset.'''
ParamPtr''' Ignored |The emulator must be currently running or paused. |- |M64CMD_ADVANCE_FRAME |Advance one frame (the emulator will run until the next frame, then pause). |'''ParamInt''' Ignored'''
ParamPtr''' Ignored |The emulator must be currently running or paused. |}
== Core State Parameters == These core parameters may be read and/or written using the M64CMD_CORE_STATE_QUERY and M64CMD_CORE_STATE_SET commands. The front-end application will receive a callback (via the StateCallback function pointer given to the '''CoreStartup''' function) when these parameters change value. This callback will be sent even if the function which caused the state change was called by the front-end application itself. Not all of these parameters are readable or writable. Each parameter's value is held in a single 32-bit integer. The meaning of this integer is given in the Parameter Encoding column. See the table below for details on these core parameters.
{| border="1" !Name!!Readable!!Writable!!int Parameter Encoding!!Notes |- |M64CORE_EMU_STATE |Yes |Yes |enum m64p_emu_state |1=Stopped, 2=Running, 3=Paused |- |M64CORE_VIDEO_MODE |Yes |Yes |enum m64p_video_mode |1=None (video not running), 2=Windowed, 3=Fullscreen |- |M64CORE_SAVESTATE_SLOT |Yes |Yes | |Valid values are 0 through 9. |- |M64CORE_SPEED_FACTOR |Yes |Yes |Emulator playback speed in percent |Valid values are 1 to 1000. |- |M64CORE_SPEED_LIMITER |Yes |Yes |1 to enable speed limiter, or 0 to disable speed limiter. |When speed limiter is disabled, emulator will run as fast as possible (useful for benchmarking). |- |M64CORE_VIDEO_SIZE |Yes |Yes |(ScreenWidth << 16) + ScreenHeight |This parameter can only be read or written when the emulator is running or paused. This parameter may be written by the front-end application in response to a window resizing event. Upon receiving this command, the core will pass the new width and height to the ResizeVideoOutput function in the video plugin (video API v2.2.0). If the video plugin supports resizing, it will update its viewport and then call the video extension function VidExt_ResizeWindow to update the window manager. |- |M64CORE_AUDIO_VOLUME |Yes |Yes |Volume level in percent, 0 - 100 | |- |M64CORE_AUDIO_MUTE |Yes |Yes |1 if muted, otherwise 0 | |- |M64CORE_INPUT_GAMESHARK |Yes |Yes |1 when Gameshark button pressed, 0 when button released. |Callback function will be invoked on both button press and release. |- |M64CORE_STATE_LOADCOMPLETE |No |No |1 if state loading was successful, 0 if state loading failed. |This parameter cannot be read or written. It is only used for callbacks, because the state load/save operations are asynchronous. |- |M64CORE_STATE_SAVECOMPLETE |No |No |1 if state saving was successful, 0 if state saving failed. |This parameter cannot be read or written. It is only used for callbacks, because the state load/save operations are asynchronous. |}
== ROM Handling Functions == {| border="1" |Prototype |'''m64p_error CoreGetRomSettings(m64p_rom_settings *RomSettings, int RomSettingsLength, int Crc1, int Crc2)''' |- |Input Parameters |'''RomSettings''' Pointer to m64p_rom_settings object to be filled in with data.
'''RomSettingsLength''' Size of the object pointed to by '''RomSettings''' in bytes.
'''Crc1''' A 32-bit integer value containing the first CRC (taken from the ROM header) to identify the ROM.
'''Crc2''' A 32-bit integer value containing the second CRC (taken from the ROM header) to identify the ROM. |- |Requirements |The core library must already be initialized with the CoreStartup() function. The '''RomSettings''' pointer must not be NULL. The '''RomSettingsLength''' value must be greater than or equal to the size of the m64p_rom_settings structure. This function does not require any ROM image to be currently open. |- |Usage |This function searches through the data in the Mupen64Plus.ini file to find an entry which matches the given '''Crc1''' and '''Crc2''' hashes, and if found, fills in the '''RomSettings''' structure with the data from the Mupen64Plus.ini file. |}
== Video Extension Functions == {| border="1" |Prototype |'''m64p_error CoreOverrideVidExt(m64p_video_extension_functions *VideoFunctionStruct);''' |- |Input Parameters |'''VideoFunctionStruct''' Pointer to a structure (defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]) containing pointers to the Front-end's custom Video Extension functions to override the default SDL functions |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. This function cannot be called while the emulator is running. |- |Usage |This function overrides the core's internal SDL-based OpenGL functions which are called from the video plugin to perform various basic tasks like opening the video window, toggling between windowed and fullscreen modes, and swapping frame buffers after a frame has been rendered. This override functionality allows a front-end to define its own video extension functions to be used instead of the SDL functions, such as for the purpose of embedding the emulator display window inside of a Qt GUI window. If any of the function pointers in the structure are NULL, the override function will be disabled and the core's internal SDL functions will be used. The core library with a Video Extension API v3.0 expects the Functions struct member to be equal to 11 or more. |}
== Cheat Functions == {| border="1" |Prototype |'''m64p_error CoreAddCheat(const char *CheatName, m64p_cheat_code *CodeList, int NumCodes)''' |- |Input Parameters |'''CheatName''' Pointer to NULL-terminated string containing a unique name for this Cheat Function.
'''CodeList''' Pointer to an array of m64p_cheat_code objects.
'''NumCodes''' Number of m64p_cheat_code elements in the cheat code array. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. A ROM image must be currently opened. |- |Usage |This function will add a Cheat Function to a list of currently active cheats which are applied to the open ROM, and set its state to Enabled. This function may be called before a ROM begins execution or while a ROM is currently running. Some cheat codes must be applied before the ROM begins executing, and may not work correctly if added after the ROM begins execution. A Cheat Function consists of a list of one or more m64p_cheat_code elements. If a Cheat Function with the given '''CheatName''' already exists, it will be removed and the new Cheat Function will be added in its place. |}
{| border="1" |Prototype |'''m64p_error CoreCheatEnabled(const char *CheatName, int Enabled)''' |- |Input Parameters |'''CheatName''' Pointer to NULL-terminated string containing the name of an existing Cheat Function.
'''Enabled''' Boolean value to which to set the enabled state of the specified Cheat Function. |- |Requirements |The Mupen64Plus library must already be initialized before calling this function. A ROM image must be currently opened. |- |Usage |This function enables or disables a specified Cheat Function. |} mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Mupen64Plus-v2.0-Core-Video-Extension.mediawiki000066400000000000000000000204451251723631200314130ustar00rootroot00000000000000[[Mupen64Plus v2.0 Core API v1.0|Mupen64Plus v2.0 API]] = Mupen64Plus v2.0 Video Extension API = Most libmupen64plus functions return an m64p_error return code, which is an enumerated type defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]. Plugin code should check the return value of each call to a libmupen64plus function. All of these functions should only be called from within the video plugin; they should not be called from the front-end. == Startup/Shutdown Functions == {| border="1" |Prototype |'''m64p_error VidExt_Init(void)''' |- |Input Parameters |N/A |- |Requirements |This function should be called before any other Video Extension functions. |- |Usage |This function should be called from within the RomOpen() video plugin function call. The default SDL implementation of this function simply calls SDL_InitSubSystem(SDL_INIT_VIDEO). It does not open a rendering window or switch video modes. |}
{| border="1" |Prototype |'''m64p_error VidExt_Quit(void)''' |- |Input Parameters |N/A |- |Usage |This function closes any open rendering window and shuts down the video system. The default SDL implementation of this function calls SDL_QuitSubSystem(SDL_INIT_VIDEO). This function should be called from within the RomClosed() video plugin function. |}
== Screen Handling Functions == {| border="1" |Prototype |'''m64p_error VidExt_ListFullscreenModes(m64p_2d_size *SizeArray, int *NumSizes)''' |- |Input Parameters |'''SizeArray''' Pointer to an array of m64p_2d_size objects, defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]
'''NumSizes''' Pointer to an integer which contains the size of '''SizeArray''' for input, and the number of size objects stored for output. |- |Requirements |The video extension must be initialized before calling this function. |- |Usage |This function is used to enumerate the available resolutions for fullscreen video modes. An array '''SizeArray''' is passed into the function, which is then filled (up to *'''NumSizes''' objects) with resolution sizes. The number of sizes actually written is stored in the integer which is pointed to by '''NumSizes'''. |}
{| border="1" |Prototype |'''m64p_error VidExt_SetVideoMode(int Width, int Height, int BitsPerPixel, m64p_video_mode ScreenMode, m64p_video_flags Flags)''' |- |Input Parameters |'''Width''' Horizontal resolution in pixels of desired video window
'''Height''' Vertical resolution in pixels of desired video window
'''BitsPerPixel''' Pixel color resolution of desired video window. This value must be 16, 24, or 32
'''ScreenMode''' Either M64VIDEO_WINDOWED or M64VIDEO_FULLSCREEN
'''Flags''' Logical-OR combination of flags which describes the video plugin's capabilities. |- |Requirements |The video extension must be initialized before calling this function. |- |Usage |This function creates a rendering window or switches into a fullscreen video mode. Any desired OpenGL attributes should be set before calling this function. |}
{| border="1" |Prototype |'''m64p_error VidExt_SetCaption(const char *Title)''' |- |Input Parameters |'''Title''' Pointer to a NULL-terminated string containing the desired title text of the emulator rendering window |- |Requirements |The video extension must be initialized before calling this function. |- |Usage |This function sets the caption text of the emulator rendering window. |}
{| border="1" |Prototype |'''m64p_error VidExt_ToggleFullScreen(void)''' |- |Input Parameters |N/A |- |Requirements |The video extension must be initialized before calling this function. The rendering window should already be created. |- |Usage |This function toggles between fullscreen and windowed rendering modes. |}
{| border="1" |Prototype |'''m64p_error VidExt_ResizeWindow(int Width, int Height)''' |- |Input Parameters |'''Width''' Horizontal resolution of resized window in pixels
'''Height''' Vertical resolution of resized window in pixels |- |Requirements |The video extension must be initialized before calling this function. The rendering window should already be created. |- |Usage |This function is called when the video plugin has resized its OpenGL output viewport in response to a ResizeVideoOutput() call, and requests that the window manager update the OpenGL rendering window size to match. If a front-end application does not support resizable windows and never sets the M64CORE_VIDEO_SIZE core variable with the M64CMD_CORE_STATE_SET command, then this function should not be called. |}
===Window Resizing=== The window resizing functionality is particularly complicated, so here is a high-level description of the events which make it happen: ====Without video extension:==== # In VidExt_SetVideoMode(), check if M64VIDEOFLAG_SUPPORT_RESIZING is set #* if True, create SDL window with RESIZABLE attribute # Core receives SDL_RESIZE messages in SDL event loop # If present, Core calls ResizeVideoOutput function in video plugin # Video Plugin calls ResizeWindow function in Video Extension #* Core calls SDL_SetVideoMode() # Core emits M64CORE_VIDEO_SIZE state changed callback ====With video extension:==== # in Front-end SetVideoMode() callback #* if M64VIDEOFLAG_SUPPORT_RESIZING is set, create resizable window frame # Front-end GUI gets window resize notification # Front-end calls CoreDoCommand w/ M64CMD_CORE_STATE_SET, w/ M64CORE_VIDEO_SIZE # If present, Core calls ResizeVideoOutput function in video plugin # Video Plugin calls ResizeWindow function in Video Extension # Core emits M64CORE_VIDEO_SIZE state changed callback In the Core Video Extension function ResizeWindow, the SDL function SetVideoMode() is called. This function will destroy the current OpenGL context and create a new one. For this reason, any video plugin which supports resizable windows must completely reset its OpenGL state including uploading any textures, FBOs, programs, etc after calling the VidExt_ResizeWindow function. == OpenGL Functions == {| border="1" |Prototype |'''void * VidExt_GL_GetProcAddress(const char* Proc)''' |- |Input Parameters |'''Proc''' Pointer to a NULL-terminated string containing the name of the desired OpenGL extension function. |- |Requirements |The video extension must be initialized before calling this function. |- |Usage |This function is used to get a pointer to an OpenGL extension function. This is only necessary on the Windows platform, because the OpenGL implementation shipped with Windows only supports OpenGL version 1.1. |}
{| border="1" |Prototype |'''m64p_error VidExt_GL_SetAttribute(m64p_GLattr Attr, int Value)''' |- |Input Parameters |'''Attr''' Enumerated type (defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]) specifying which OpenGL attribute to set
'''Value''' Value to set for the attribute |- |Requirements |The video extension must be initialized before calling this function. The desired attributes should be set before calling '''VidExt_SetVideoMode''' |- |Usage |This function is used to set certain OpenGL attributes which must be specified before creating the rendering window with '''VidExt_SetVideoMode'''. |}
{| border="1" |Prototype |'''m64p_error VidExt_GL_GetAttribute(m64p_GLattr Attr, int *pValue)''' |- |Input Parameters |'''Attr''' Enumerated type (defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]) specifying OpenGL attribute of which to get value
'''pValue''' Pointer to integer Value which will be set to attribute's value |- |Requirements |The video extension must be initialized before calling this function. |- |Usage |This function may be used to check that OpenGL attributes where successfully set to the rendering window after the '''VidExt_SetVideoMode''' function call. |}
{| border="1" |Prototype |'''m64p_error VidExt_GL_SwapBuffers(void)''' |- |Input Parameters |N/A |- |Requirements |The video extension must be initialized before calling this function. The rendering window should already be created. |- |Usage |This function is used to swap the front/back buffers after rendering an output video frame. |}
mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Mupen64Plus-v2.0-Design-Proposal-3.mediawiki000066400000000000000000000116371251723631200306560ustar00rootroot00000000000000== Primary Goal == The primary goal of this re-architecture is to split this large project into smaller projects which may proceed to be developed independently of each other. The advantages of the new architecture are: * The build system can be greatly simplified * Each module can use its own build system. For example, the Qt GUI might switch to cmake for better Qt integration. * Porting the emulator core to other platforms (namely Win32) will be greatly simplified by removing the most platform-specific pieces. * Making releases for each package will be simpler and faster * Mupen64Plus may be included into the Debian/Ubuntu repositories since glN64 (with its 'unknown' license) will be a separate project == Topography == This re-architecture will force us to lay boundaries with well-defined APIs between different parts of the emulator. Here are some initial suggestions for the new layout of the modules: # Mupen64plus-core #* To simplify porting to other platforms, the core needs to be as lean as possible #* For this reason, the GUI interfaces, the ROM cache, and the zip/lzma/7zip decompressors will be removed #* The core will contain the code for: #** Emulating the R4300 main CPU and memory systems #** Loading and configuring plugins #** Reading, parsing, and writing all configuration files for the core + plugins #** Parsing and returning information about ROM images #** Core user interface for keyboard and LIRC input #** Savestates and screenshots #** An on-screen display #** Cheat and debugger core functions #** 'Dummy' plugins # Mupen64plus-console, Mupen64plus-gtk, Mupen64plus-qt #* Command-line only, GTK, and Qt front-end interfaces #* Each front-end for the core library will be a separate project #* The ROM cache code will be forked and included into both GUIs #* The front-ends will be responsible for finding and loading the core library and the plugins #* The dynamic library handle of the core will be passed to all the plugins, and the dynamic library handle of the plugins will be passed to the core #* The front-ends will be responsible for loading and decompressing the ROM image, and passing a pointer to the core # Plugins (RiceVideo, glN64, glide64, Blight Input, JTTL Audio) #* The plugins will be spun off into separate projects #* The plugin API will change, and will be incompatible with the old Zilmar spec == Project Owners == Richard42 will retain ownership of the Mupen64plus-core and Mupen64plus-console modules. I will recommend that Slougi take ownership of the Qt GUI. The plugins and GTK GUI are up for grabs. == Work To Do == Tasks which have been completed will be marked with the strikethrough format. === Prior to starting on the code === # Write design document for Core API #* Front-end + debugger + cheat #* Configuration interface #* Video plugin #* Audio plugin #* Input plugin #* RSP plugin # Set up new Mercurial repository for project === Coding tasks === # First steps #* Split & fork the source files into new structure # Core #* Refactor/simplify makefiles #* Remove #include statements from header files #* Write new configuration load/parse/save functionality #* Separate event loop out of main.c into new source file #* Fix broken WM_KeyDown/WM_KeyUp commands sent to input plugin #* Remove main() function #* Remove main/winlnxdefs.h #* Add new shared library interface (Must be thread-safe and re-entrant where necessary) #** api/callbacks.c #** api/common.c #** api/config.c #** api/debugger.c #** api/frontend.c #** api/vidext.c #* Refactor core code for new debug info interface (instead of printf(), send back to front-end) #* Modify plugin-handling code to use new plugin API #* Fix 64-bit dynamic recompiler for dynamic lib #* Update translate.c file handling and translations #* Update cheat.c cheat code handling #* Remove compare_core.c, add core comparison feature to console-ui #* Generate versioned core library #* Simplify makefile / pre.mk #* Refactor install.sh #* Go through google code issue list, apply patches and close issue reports # Front-ends #* Refactor/simplify makefiles ## CLI ##* Write from scratch, based on main.c ##* Update man page ## GUI-Qt ##* Adapt from previous mupen64puls Qt GUI code, pulling code from CLI front-end (Slougi) ## GUI-GTK ##* Adapt from previous mupen64puls GTK GUI code, pulling code from CLI front-end (TBD) # Plug-ins #* For each plug-in: #** m64p-rsp-hle #** m64p-audio-sdl #** m64p-video-rice #** m64p-input-sdl #* Remove existing configuration read/write code #* Add Deadzone and Scaling parameters to Blight Input plugin #* Refactor to use new configuration interface through core library #* Refactor for changes in core plugin API #* Refactor for new debug info interface (instead of printf(), send back to front-end) mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Mupen64Plus-v2.0-Plugin-API.mediawiki000066400000000000000000000255021251723631200273510ustar00rootroot00000000000000[[Mupen64Plus v2.0 Core API v1.0|Mupen64Plus v2.0 API]] = Mupen64Plus v2.0 Plugin API = This section lists all of the functions which are exported by the plugins. The front-end application should only use the PluginStartup, PluginShutdown, and PluginGetVersion functions. All other functions will only be called from the core. == Common Plugin API == These functions are present in all of the plugins. {| border="1" |Prototype |'''m64p_error PluginStartup(m64p_dynlib_handle CoreLibHandle, void *Context, void (*DebugCallback)(void *Context, int level, const char *Message))''' |- |Input Parameters |'''CoreLibHandle''' Dynamic library handle (defined in [[Mupen64Plus v2.0 headers#m64p_types.h|m64p_types.h]]) corresponding with the core mupen64plus library.
'''Context''' Pointer which will be passed back to the '''DebugCallback''' function. Can be NULL.
'''DebugCallback''' Pointer to function in front-end for receiving debug information and warnings from the plugin. This function must be thread-safe. Can be NULL. |- |Requirements |This function must be called before any other plugin functions. The Core library must already be started before calling this function. This function must be called before attaching the plugin to the core. |- |Usage |This function initializes plugin for use by allocating memory, creating data structures, and loading the configuration data. This function may return M64ERR_INCOMPATIBLE if an older core library is used with a newer plugin. |}
{| border="1" |Prototype |'''m64p_error PluginShutdown(void)''' |- |Requirements |This plugin should be detached from the core before calling this function. |- |Usage |This function destroys data structures and releases memory allocated by the plugin library. |}
{| border="1" |Prototype |'''m64p_error PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities)''' |- |Input Parameters |'''PluginType''' Pointer to an enumerated type to store the plugin type of this plugin.
'''PluginVersion''' Pointer to an integer to store the version number of this plugin. Version number 2.1.3 would be stored as 0x00020103.
'''APIVersion''' Pointer to an integer to store the version number of the Core-Plugin API for this type of plugin used by this plugin.
'''PluginNamePtr''' Pointer to a const character pointer to receive the name of this plugin. The const char * which is returned must point to a persistent string (ie, not stored on the stack).
'''Capabilities''' Pointer to an integer to store a logically-or'd set of flags which specify the capabilities of the plugin which were built into the library during compilation. These are currently only defined for the core, so this will always return 0 for a plugin. |- |Usage |This function retrieves version information from the plugin. This function is the same for the core library and the plugins, so that a front-end may examine all shared libraries in a directory and determine their types. Any of the input parameters may be set to NULL and this function will succeed but won't return the corresponding information. |} == Video Plugin API == === Mupen64Plus v2.0 Video Plugin API === {| |void ChangeWindow(void); |Toggle Fullscreen/Windowed mode |- |BOOL InitiateGFX(GFX_INFO Gfx_Info); |Called during CoreAttachPlugin to send info about the emulator core to the graphics plugin and start up the graphics sub-system. This should create the rendering window and the OpenGL context. |- |void MoveScreen(int xpos, int ypos); |This function is called in response to the emulator receiving a WM_MOVE, passing the xpos and ypos from that message. |- |void ProcessDList(void); |Process high-level graphics D-list. (not currently used) |- |void ProcessRDPList(void); |Process low-level graphics D-list. |- |void RomClosed(void); |Called after the emulator is stopped. |- |int RomOpen(void); |Called just before the emulator begins executing a ROM. '''***changed*** - this function now returns an int (boolean)''' |- |void ShowCFB (void); |Called from the RSP plugin to signal a condition to the video plugin. |- |void UpdateScreen(void); |This function is called in response to a VSync condition if the VI bit in MI_INTR_REG is set |- |void ViStatusChanged(void); |This function is called to notify the video plugin that the ViStatus registers value has been changed. |- |void ViWidthChanged(void); |This function is called to notify the video plugin that the ViWidth registers value has been changed. |- |void ReadScreen2(void *dest, int *width, int *height, int front); |This function reads the pixels of the frame buffer that is either currently displayed (front != 0) or being drawn (front == 0) |- |void SetRenderingCallback(void (*callback)(int bScreenRedrawn)); |Allows the core to register a callback function that will be called by the graphics plugin just before the the frame buffers are swapped. '''***changed*** - as of video api v2.1.0, the callback function must take a single int (boolean) parameter, which tells the core whether or not the screen has been redrawn since the last time the callback was called. This is used to prevent screenshots from containing OSD text.''' |- |void ResizeVideoOutput(int width, int height); |'''***new*** function added in video api v2.2.0''' This function notifies the video plugin that the output video window has changed size. If resizing is supported, the video plugin should update its internal state to reflect the new window size, and then call the ResizeWindow function in the Video Extension API. |- |void FBRead(unsigned int addr) |Read data from frame buffer into emulated RAM space |- |void FBWrite(unsigned int addr, unsigned int size) |Write data from emulated RAM space into frame buffer |- |void FBGetFrameBufferInfo(void *p) |Get some information about the frame buffer |} === Remove From Older Video API === {| |- |void CaptureScreen (char * Directory); |- |void CloseDLL(void); |- |void DllAbout(HWND hParent); |- |void DllConfig(HWND hParent); |- |void DllTest(HWND hParent); |- |void DrawScreen(void); |- |void GetDllInfo(PLUGIN_INFO *PluginInfo); |- |void ReadScreen(void **dest, int *width, int *height); |- |void SetConfigDir(char *configDir); |- |
typedef struct {...} PLUGIN_INFO |} == Audio Plugin API == === Mupen64Plus v2.0 Audio Plugin API === {| |void AiDacrateChanged(int SystemType); |This function is called to notify the audio plugin that the AiDacrate register's value has been changed. |- |void AiLenChanged(void); |This function is called to notify the audio plugin that the AiLen register's value has been changed. |- |BOOL InitiateAudio(AUDIO_INFO Audio_Info); |Called during CoreAttachPlugin to send info about the emulator core to the audio plugin. |- |void ProcessAList(void); |Signal that there is an A-list to be processed. (not currently used) |- |int RomOpen(void); |Called just before the emulator begins executing a ROM. '''***changed*** - this function now returns an int (boolean)''' |- |void RomClosed(void); |Called after the emulator is stopped. |- |void SetSpeedFactor(int percent); |Called when the emulator playback speed changes. |- |void VolumeUp(void);
void VolumeDown(void); |Increase or decrease volume level |- |int VolumeGetLevel(void); |Get current volume level in percentage, between 0 and 100. '''***NEW***''' |- |void VolumeSetLevel(int level); |Set current volume level. level must be between 0 and 100. '''***NEW***''' |- |void VolumeMute(void); |Toggle between audio muted and un-muted |- |const char * VolumeGetString(void); |Return a string describing the current volume level |} === Remove From Older Audio API === {| |- |DWORD AiReadLength(void); |- |void AiUpdate(BOOL Wait); |- |void CloseDLL(void); |- |void DllAbout(HWND hParent); |- |void DllConfig(HWND hParent); |- |void DllTest(HWND hParent); |- |void GetDllInfo(PLUGIN_INFO *PluginInfo); |- |BOOL PauseAudio(BOOL Pause); |- |void SetConfigDir(char *configDir); |- |
typedef struct {...} PLUGIN_INFO |} == Input Plugin API == === Mupen64Plus v2.0 Input Plugin API === {| |void ControllerCommand(int Control, BYTE * Command); |Process the raw data that has just been sent to a specific controller. |- |void GetKeys(int Control, BUTTONS * Keys); |Get the current state of the controller's buttons |- |void InitiateControllers(CONTROL_INFO ControlInfo); |Setup controller data structures |- |void ReadController(int Control, BYTE *Command); |Process the raw data in the pif ram that is about to be read. (not currently used) |- |int RomOpen(void); |Called just before the emulator begins executing a ROM. '''***changed*** - this function now returns an int (boolean)''' |- |void RomClosed(void); |Called after the emulator is stopped. |- |void SDL_KeyDown(int keymod, int keysym); |Pass a SDL_KEYDOWN-style message to the input plugin |- |void SDL_KeyUp(int keymod, int keysym); |Pass a SDL_KEYUP-style message to the input plugin |} === Remove From Older Input API === {| |- |void CloseDLL(void); |- |void DllAbout(HWND hParent); |- |void DllConfig(HWND hParent); |- |void DllTest(HWND hParent); |- |void GetDllInfo(PLUGIN_INFO *PluginInfo); |- |void SetConfigDir(char *configDir); |- |void WM_KeyDown(WPARAM wParam, LPARAM lParam); |- |void WM_KeyUp(WPARAM wParam, LPARAM lParam); |- |
typedef struct {...} PLUGIN_INFO |} == RSP Plugin API == === Mupen64Plus v2.0 RSP Plugin API === {| |DWORD DoRspCycles(DWORD Cycles); |Process pending RSP tasks. |- |void InitiateRSP(RSP_INFO Rsp_Info, DWORD *CycleCount); |Called during CoreAttachPlugin to send info about the emulator core to the audio plugin. |- |void RomClosed(void); |Called after the emulator is stopped. |} === Remove From Older RSP API === {| |- |void CloseDLL(void); |- |void DllAbout(HWND hParent); |- |void DllConfig(HWND hParent); |- |void DllTest(HWND hParent); |- |void GetDllInfo(PLUGIN_INFO *PluginInfo); |- |void GetRspDebugInfo(RSPDEBUG_INFO * RSPDebugInfo); |- |void InitiateRSPDebugger(DEBUG_INFO DebugInfo); |- |
typedef struct {...} PLUGIN_INFO
typedef struct {...} RSPDEBUG_INFO
typedef struct {...} DEBUG_INFO |} mupen64plus-core-src-2.5/doc/emuwiki-api-doc/Mupen64Plus-v2.0-headers.mediawiki000066400000000000000000000227761251723631200271310ustar00rootroot00000000000000== m64p_types.h == /* ----------------------------------------- */ /* Platform-specific stuff */ /* ----------------------------------------- */ /* necessary headers */ #if defined(WIN32) #include #endif /* DLL handles and function declaration specifiers */ #if defined(WIN32) #define IMPORT extern "C" __declspec(dllimport) #define EXPORT __declspec(dllexport) #define CALL __cdecl typedef HMODULE m64p_dynlib_handle; #else #define IMPORT extern "C" #define EXPORT __attribute__((visibility("default"))) #define CALL typedef void * m64p_dynlib_handle; #endif /* ----------------------------------------- */ /* Structures and Types for Core library API */ /* ----------------------------------------- */ typedef void * m64p_handle; typedef void (*m64p_frame_callback)(unsigned int FrameIndex); typedef void (*m64p_input_callback)(void); typedef void (*m64p_audio_callback)(void); typedef void (*m64p_vi_callback)(void); typedef enum { M64TYPE_INT = 1, M64TYPE_FLOAT, M64TYPE_BOOL, M64TYPE_STRING } m64p_type; typedef enum { M64MSG_ERROR = 1, M64MSG_WARNING, M64MSG_INFO, M64MSG_STATUS, M64MSG_VERBOSE } m64p_msg_level; typedef enum { M64ERR_SUCCESS = 0, M64ERR_NOT_INIT, /* Function is disallowed before InitMupen64Plus() is called */ M64ERR_ALREADY_INIT, /* InitMupen64Plus() was called twice */ M64ERR_INCOMPATIBLE, /* API versions between components are incompatible */ M64ERR_INPUT_ASSERT, /* Invalid parameters for function call, such as ParamValue=NULL for GetCoreParameter() */ M64ERR_INPUT_INVALID, /* Invalid input data, such as ParamValue="maybe" for SetCoreParameter() to set a BOOL-type value */ M64ERR_INPUT_NOT_FOUND, /* The input parameter(s) specified a particular item which was not found */ M64ERR_NO_MEMORY, /* Memory allocation failed */ M64ERR_FILES, /* Error opening, creating, reading, or writing to a file */ M64ERR_INTERNAL, /* Internal error (bug) */ M64ERR_INVALID_STATE, /* Current program state does not allow operation */ M64ERR_PLUGIN_FAIL, /* A plugin function returned a fatal error */ M64ERR_SYSTEM_FAIL, /* A system function call, such as an SDL or file operation, failed */ M64ERR_UNSUPPORTED, /* Function call is not supported (ie, core not built with debugger) */ M64ERR_WRONG_TYPE /* A given input type parameter cannot be used for desired operation */ } m64p_error; typedef enum { M64CAPS_DYNAREC = 1, M64CAPS_DEBUGGER = 2, M64CAPS_CORE_COMPARE = 4 } m64p_core_caps; typedef enum { M64PLUGIN_NULL = 0, M64PLUGIN_RSP = 1, M64PLUGIN_GFX, M64PLUGIN_AUDIO, M64PLUGIN_INPUT, M64PLUGIN_CORE } m64p_plugin_type; typedef enum { M64EMU_STOPPED = 1, M64EMU_RUNNING, M64EMU_PAUSED } m64p_emu_state; typedef enum { M64VIDEO_NONE = 1, M64VIDEO_WINDOWED, M64VIDEO_FULLSCREEN } m64p_video_mode; typedef enum { M64VIDEOFLAG_SUPPORT_RESIZING = 1 } m64p_video_flags; typedef enum { M64CORE_EMU_STATE = 1, M64CORE_VIDEO_MODE, M64CORE_SAVESTATE_SLOT, M64CORE_SPEED_FACTOR, M64CORE_SPEED_LIMITER, M64CORE_VIDEO_SIZE, M64CORE_AUDIO_VOLUME, M64CORE_AUDIO_MUTE, M64CORE_INPUT_GAMESHARK, M64CORE_STATE_LOADCOMPLETE, M64CORE_STATE_SAVECOMPLETE } m64p_core_param; typedef enum { M64CMD_NOP = 0, M64CMD_ROM_OPEN, M64CMD_ROM_CLOSE, M64CMD_ROM_GET_HEADER, M64CMD_ROM_GET_SETTINGS, M64CMD_EXECUTE, M64CMD_STOP, M64CMD_PAUSE, M64CMD_RESUME, M64CMD_CORE_STATE_QUERY, M64CMD_STATE_LOAD, M64CMD_STATE_SAVE, M64CMD_STATE_SET_SLOT, M64CMD_SEND_SDL_KEYDOWN, M64CMD_SEND_SDL_KEYUP, M64CMD_SET_FRAME_CALLBACK, M64CMD_TAKE_NEXT_SCREENSHOT, M64CMD_CORE_STATE_SET, M64CMD_READ_SCREEN, M64CMD_RESET, M64CMD_ADVANCE_FRAME } m64p_command; typedef struct { unsigned int address; int value; } m64p_cheat_code; /* ----------------------------------------- */ /* Structures to hold ROM image information */ /* ----------------------------------------- */ typedef enum { SYSTEM_NTSC = 0, SYSTEM_PAL, SYSTEM_MPAL } m64p_system_type; typedef struct { unsigned char init_PI_BSB_DOM1_LAT_REG; /* 0x00 */ unsigned char init_PI_BSB_DOM1_PGS_REG; /* 0x01 */ unsigned char init_PI_BSB_DOM1_PWD_REG; /* 0x02 */ unsigned char init_PI_BSB_DOM1_PGS_REG2; /* 0x03 */ unsigned int ClockRate; /* 0x04 */ unsigned int PC; /* 0x08 */ unsigned int Release; /* 0x0C */ unsigned int CRC1; /* 0x10 */ unsigned int CRC2; /* 0x14 */ unsigned int Unknown[2]; /* 0x18 */ unsigned char Name[20]; /* 0x20 */ unsigned int unknown; /* 0x34 */ unsigned int Manufacturer_ID; /* 0x38 */ unsigned short Cartridge_ID; /* 0x3C - Game serial number */ unsigned short Country_code; /* 0x3E */ } m64p_rom_header; typedef struct { char goodname[256]; char MD5[33]; unsigned char savetype; unsigned char status; /* Rom status on a scale from 0-5. */ unsigned char players; /* Local players 0-4, 2/3/4 way Netplay indicated by 5/6/7. */ unsigned char rumble; /* 0 - No, 1 - Yes boolean for rumble support. */ } m64p_rom_settings; /* ----------------------------------------- */ /* Structures and Types for the Debugger */ /* ----------------------------------------- */ typedef enum { M64P_DBG_RUN_STATE = 1, M64P_DBG_PREVIOUS_PC, M64P_DBG_NUM_BREAKPOINTS, M64P_DBG_CPU_DYNACORE, M64P_DBG_CPU_NEXT_INTERRUPT } m64p_dbg_state; typedef enum { M64P_DBG_RUNSTATE_PAUSED = 0, M64P_DBG_RUNSTATE_STEPPING, M64P_DBG_RUNSTATE_RUNNING } m64p_dbg_runstate; typedef enum { M64P_DBG_MEM_TYPE = 1, M64P_DBG_MEM_FLAGS, M64P_DBG_MEM_HAS_RECOMPILED, M64P_DBG_MEM_NUM_RECOMPILED, M64P_DBG_RECOMP_OPCODE = 16, M64P_DBG_RECOMP_ARGS, M64P_DBG_RECOMP_ADDR } m64p_dbg_mem_info; typedef enum { M64P_MEM_NOMEM = 0, M64P_MEM_NOTHING, M64P_MEM_RDRAM, M64P_MEM_RDRAMREG, M64P_MEM_RSPMEM, M64P_MEM_RSPREG, M64P_MEM_RSP, M64P_MEM_DP, M64P_MEM_DPS, M64P_MEM_VI, M64P_MEM_AI, M64P_MEM_PI, M64P_MEM_RI, M64P_MEM_SI, M64P_MEM_FLASHRAMSTAT, M64P_MEM_ROM, M64P_MEM_PIF, M64P_MEM_MI, M64P_MEM_BREAKPOINT } m64p_dbg_mem_type; typedef enum { M64P_MEM_FLAG_READABLE = 0x01, M64P_MEM_FLAG_WRITABLE = 0x02, M64P_MEM_FLAG_READABLE_EMUONLY = 0x04, // the EMUONLY flags signify that emulated code can read/write here, but debugger cannot M64P_MEM_FLAG_WRITABLE_EMUONLY = 0x08 } m64p_dbg_mem_flags; typedef enum { M64P_DBG_PTR_RDRAM = 1, M64P_DBG_PTR_PI_REG, M64P_DBG_PTR_SI_REG, M64P_DBG_PTR_VI_REG, M64P_DBG_PTR_RI_REG, M64P_DBG_PTR_AI_REG } m64p_dbg_memptr_type; typedef enum { M64P_CPU_PC = 1, M64P_CPU_REG_REG, M64P_CPU_REG_HI, M64P_CPU_REG_LO, M64P_CPU_REG_COP0, M64P_CPU_REG_COP1_DOUBLE_PTR, M64P_CPU_REG_COP1_SIMPLE_PTR, M64P_CPU_REG_COP1_FGR_64, M64P_CPU_TLB } m64p_dbg_cpu_data; typedef enum { M64P_BKP_CMD_ADD_ADDR = 1, M64P_BKP_CMD_ADD_STRUCT, M64P_BKP_CMD_REPLACE, M64P_BKP_CMD_REMOVE_ADDR, M64P_BKP_CMD_REMOVE_IDX, M64P_BKP_CMD_ENABLE, M64P_BKP_CMD_DISABLE, M64P_BKP_CMD_CHECK } m64p_dbg_bkp_command; #define M64P_MEM_INVALID 0xFFFFFFFF // invalid memory read will return this #define BREAKPOINTS_MAX_NUMBER 128 typedef enum { M64P_BKP_FLAG_ENABLED = 0x01, M64P_BKP_FLAG_READ = 0x02, M64P_BKP_FLAG_WRITE = 0x04, M64P_BKP_FLAG_EXEC = 0x08, M64P_BKP_FLAG_LOG = 0x10 /* Log to the console when this breakpoint hits. */ } m64p_dbg_bkp_flags; #define BPT_CHECK_FLAG(a, b) ((a.flags & b) == b) #define BPT_SET_FLAG(a, b) a.flags = (a.flags | b); #define BPT_CLEAR_FLAG(a, b) a.flags = (a.flags & (~b)); #define BPT_TOGGLE_FLAG(a, b) a.flags = (a.flags ^ b); typedef struct { unsigned int address; unsigned int endaddr; unsigned int flags; } m64p_breakpoint; /* ------------------------------------------------- */ /* Structures and Types for Core Video Extension API */ /* ------------------------------------------------- */ typedef struct { unsigned int uiWidth; unsigned int uiHeight; } m64p_2d_size; typedef enum { M64P_GL_DOUBLEBUFFER = 1, M64P_GL_BUFFER_SIZE, M64P_GL_DEPTH_SIZE, M64P_GL_RED_SIZE, M64P_GL_GREEN_SIZE, M64P_GL_BLUE_SIZE, M64P_GL_ALPHA_SIZE, M64P_GL_SWAP_CONTROL, M64P_GL_MULTISAMPLEBUFFERS, M64P_GL_MULTISAMPLESAMPLES, M64P_GL_CONTEXT_MAJOR_VERSION, M64P_GL_CONTEXT_MINOR_VERSION, M64P_GL_CONTEXT_PROFILE_MASK } m64p_GLattr; typedef enum { M64P_GL_CONTEXT_PROFILE_CORE, M64P_GL_CONTEXT_PROFILE_COMPATIBILITY, M64P_GL_CONTEXT_PROFILE_ES } m64p_GLContextType; typedef struct { unsigned int Functions; m64p_error (*VidExtFuncInit)(void); m64p_error (*VidExtFuncQuit)(void); m64p_error (*VidExtFuncListModes)(m64p_2d_size *, int *); m64p_error (*VidExtFuncSetMode)(int, int, int, int, int); void * (*VidExtFuncGLGetProc)(const char*); m64p_error (*VidExtFuncGLSetAttr)(m64p_GLattr, int); m64p_error (*VidExtFuncGLGetAttr)(m64p_GLattr, int *); m64p_error (*VidExtFuncGLSwapBuf)(void); m64p_error (*VidExtFuncSetCaption)(const char *); m64p_error (*VidExtFuncToggleFS)(void); m64p_error (*VidExtFuncResizeWindow)(int, int); } m64p_video_extension_functions; mupen64plus-core-src-2.5/doc/font-license000066400000000000000000000046271251723631200203660ustar00rootroot00000000000000Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera Sans Bitstream Vera Sans - Roman Release 1.10 Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera". This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names. The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org.http://www.bitstream.com mupen64plus-core-src-2.5/doc/gpl-license000066400000000000000000000443261251723631200202020ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. mupen64plus-core-src-2.5/doc/lgpl-license000066400000000000000000000635051251723631200203560ustar00rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! mupen64plus-core-src-2.5/doc/new_dynarec.txt000066400000000000000000000645011251723631200211110ustar00rootroot00000000000000This page describes the dynamic recompiler in [[Mupen64Plus]], and the changes made for the ARM port. ==The original dynamic recompiler by Hacktarux== The dynamic recompiler used in Mupen64plus v1.5 is based on the original written by Hacktarux in 2002. It recompiles contiguous blocks of MIPS instructions. First, each instruction is decoded into a dynamically-allocated 132-byte data structure. typedef struct _precomp_instr { void (*ops)(); union { struct { long long int *rs; long long int *rt; short immediate; } i; struct { unsigned int inst_index; } j; struct { long long int *rs; long long int *rt; long long int *rd; unsigned char sa; unsigned char nrd; } r; struct { unsigned char base; unsigned char ft; short offset; } lf; struct { unsigned char ft; unsigned char fs; unsigned char fd; } cf; } f; unsigned int addr; /* word-aligned instruction address in r4300 address space */ unsigned int local_addr; /* byte offset to start of corresponding x86_64 instructions, from start of code block */ reg_cache_struct reg_cache_infos; } precomp_instr; The decoded instructions are then compiled, generating x86 instructions for each MIPS instruction. A 32K block is allocated with malloc() to hold the x86 code. If this size proves insufficient, it is incrementally resized with realloc(). MIPS registers are allocated to x86 registers with a least-recently-used replacement policy. All cached registers are written back prior to a branch, or a memory read or write. To facilitate invalidation and replacement of modified code blocks, each 4K page is compiled separately. If a sequence of instructions crosses a 4K page boundary, the current block is ended, and the next instructions will be compiled as a separate block. Branch instructions within a 4K page are compiled as branches directly to the target address. Branches which cross a 4K page go through an indirect address lookup. Compiled code blocks are invalidated on write. On an actual MIPS CPU, the instruction cache is invalidated using the CACHE instruction, however a few N64 games clear the cache using other methods. Trapping writes appears to be the most reliable method of ensuring cache coherency in the emulated system. The cache instruction is ignored. ==Problems with the original design== The most significant performance problem with this design is its excessive memory usage. The decoded instruction data is retained (132 bytes for each MIPS instruction) and occasionally referenced during execution. Memory accesses frequently miss the L2 cache, resulting in poor performance. Additionally, the register cache is relatively inefficient, since all registers are flushed before any read or write operation. ==A new approach== To reduce memory usage, the new design allocates a single large block of memory (generally 32 MiB, but the size is configurable) which is used for recompiled code. This memory is allocated using mmap with the PROT_EXEC bit set, to ensure operation on CPUs with no-execute (NX) page permissions. Contiguous blocks of MIPS instructions are compiled (that is, it does not attempt to follow branches or 'hot-paths'). The recompiler consists of eight stages, plus a linker, and a memory manager. Compiled blocks are invalidated on write, as before, however as the compiler will cross a 4K page, writes may invalidate adjacent pages as well. Currently the dynarec generates x86, x86-64, ARMv5, and ARMv7 (little-endian). Most of the code is shared between the architectures, but a different code generator is included at compile time, using different #include statements depending on the CPU type. ==Pass 1: Disassembly== When an instruction address is encountered which has not been compiled, the function new_recompile_block is called, with the (virtual) address of the target instruction as its sole parameter. If the address is invalid, the function returns a nonzero value and the caller is responsible for handling the pagefault. Instructions are decoded until an unconditional jump, usually a return, is encountered. Disassembly is ordinarilly continued past a JAL (subroutine call) instruction, however this strategy is abandoned if invalid instructions are encountered. Up to 4096 instructions (16K of MIPS code) may be disassembled at once. Surprisingly, some games do actually reach this limit. ==Pass 2: Liveness analysis== After disassembly, liveness analysis is performed on the registers. This determines when a particular register will no longer be used, and thus can be removed from the register cache. A separate analysis is done on the upper 32 bits of 64-bit registers. This can determine when only the lower 32 bits of a register are significant, thus allowing use of a 32-bit register. This enables more efficient code generation on 32-bit processors. ==Pass 3: Register allocation== The 31 MIPS registers must be mapped onto seven available registers on x86, or twelve available registers on ARM. Instructions with 64-bit results require two registers on 32-bit host processors. 32-bit instructions require only one. A flag is set for registers containing 32-bit values, and these registers will be sign-extended before they are written to the register file. Registers are made available using a least-soon-needed replacement policy. When the register cache is full, and no registers can be eliminated using the liveness analysis, a ten-instruction lookahead is used to determine which registers will not be needed soon and these registers are evicted from the cache. ==Pass 4: Free unused registers== After the initial register allocation, the allocations are reviewed to determine if any registers remain allocated longer than necessary. These are then removed from the register cache. This avoids having to write back a large number of registers just before a branch, and makes more registers available for the next pass. ==Pass 5: Pre-allocate registers== If a register will be used soon and needs to be loaded, try to load it early if the register is available. This improves execution on CPUs with a load-use penalty. ==Pass 6: Optimize clean/dirty state== If a cached register is 'dirty' and needs to be written out, try to do so as soon as the register will no longer be modified. This avoids having to write the same register on multiple code paths due to conditional branches. Additionally, try to avoid writing out dirty registers inside of loops. ==Pass 7: Identify where registers are assumed to be 32-bit== When a 64-bit register is mapped to a 32-bit register with the assumption that the value will be sign-extended before being used, it is necessary to ensure that no register contains a 64-bit value when branching to such a location. These instructions are flagged to identify them as requiring 32-bit inputs. This information is used by the linker, and the exception return (ERET) handler. ==Pass 8: Assembly== This generates and outputs the recompiled code. Following the main code block, handlers for certain exceptions as well as alternate entry points are added. If a recompiled instruction relies on a certain MIPS register being cached in a certain native register, then a short 'stub' of code is generated to load the necessary registers. When an instruction outside of this block needs to jump to that location, it will instead jump to the stub. The necessary registers will be loaded, and then it will jump into the main code sequence. On architectures which require literal pools (ARMv5) these are inserted as necessary. ==Linker== The linker fills in all unresolved branches. Branches within the block are linked to their target address. Branches which jump outside of the block are linked to their target if that address has been compiled already. These inter-block branches are recorded in the jump_out array. This information will be used to remove the links in the event that the target of the branch is invalidated. Unresolved branches point to a stub which loads the address of the branch instruction and the virtual address of its target into registers, and calls the dynamic linker. When this code is executed, the dynamic linker will compile the target if necessary, and then patch the branch instruction with the new address. ==Memory manager== The last step in new_recompile_block is to ensure that there will be sufficient memory available to compile the next block. If there is not, then the oldest blocks are purged. The dynarec cache can be described as a 32MB circular buffer divided into eight segments. Memory is allocated in order from beginning to end. When there are less than 2 empty segments, the next segment in sequence is cleared, wrapping around to the beginning of the buffer. This continues as memory is needed, wrapping around from end to beginning. ==Invalidation and restoration== Normally, code blocks are looked up via a hash table, using the virtual address of the target instruction. However, for purposes of invalidation, blocks are grouped by physical address. This can be described as a virtually-indexed, physically-tagged (VIPT) cache. References to compiled blocks are stored in one of 4096 linked lists in the jump_in array. Each list covers a 4K block of memory, and 2048 such lists are sufficient to cover the 8MB of RAM in the Nintendo 64. The remaining lists are for code in ROM, and the bootloader in SP memory. When a write hits a memory page marked as cached, all entries in the corresponding list are invalidated. If any code is found to cross a 4K boundary, the adjacent lists are invalidated also. Sometimes blocks may be invalidated even when none of the code is actually modified. This can happen if data is written to memory in the same 4K page, or if code is reloaded without actually modifying it. If blocks which were previously invalidated are subsequently found to be unmodified, those blocks are marked in the restore_candidate array. If the block remains unmodified, it will be restored as a valid block, to avoid recompiling blocks which do not need to be recompiled. This is performed by the clean_blocks function which is called periodically. The jump_in array, which lists unmodified blocks, is physically indexed, however the jump_dirty array, which lists potentially-modified blocks, is virtually indexed. This allows blocks which have changed physical addresses, but are still at the same virtual address, to be recognized as being the same as before, and not in need of recompilation. ==Dynamic linker== Branches with unresolved addresses jump to the dynamic linker. This will look through the jump_in list corresponding to the physical page containing the virtual target address. If found, the branch instruction will be patched with the address, and then it will jump to this address. If not found, the jump_dirty list will be searched for blocks which were previously compiled but may have been modified. If a potential match is found, the code will be compared against a cached copy to determine if any changes have been made. If not, then it will jump to the block. Because the memory could be modified again, branch instructions referencing these blocks are not altered, and continue to point to the dynamic linker. These blocks will continue to be verified each time they are called, until restored to the jump_in list by the clean_blocks function described above. If no compiled block is found, or the existing block was modified, the target is recompiled. ==Address lookup== When a JR (jump register) instruction is encountered, the address of the recompiled code must be looked up using the address of the MIPS code. The majority of such instructions jump to the link register (r31) to return to the location following a JAL (call) instruction. When a JAL or JALR is executed, the address of the following instruction is inserted into a small 32-entry hash table, which is checked when a JR r31 instruction is executed. This allows for a quick return from subroutine calls. If the JR instruction uses a register other than r31, or the small hash table lookup fails to find a match, a larger 131072-entry hash table is checked. This table contains 65536 bins with up to 2 addresses per bin. If this also fails to find a match (which occurs less than 1% of the time) an exhaustive search of all compiled addresses within that 4K memory page is performed. If no match is found by any of these methods, the target address is compiled, and the new address is inserted into the hash table. ==Cycle counting== Cycles are counted before each branch by adding the cycles from the preceding instructions to a specific register. The cycle count is in R10 on ARM and ESI on x86. The value in this register is normally a negative number. When this number exceeds zero, a conditional branch is taken which jumps to an interrupt handler. For example, the following x86 code adds eight cycles: add $8,%esi jns interrupt_handler The conditional branch jumps to a small bit of code located after the main compiled block, which saves the cached registers to the register file, sets the instruction pointer which will be used upon return from the interrupt, and then calls cc_interrupt. As in the original mupen64plus, the emulated clock runs at 37.5 MHz, and each instruction takes 2 clock cycles. ==Interrupt handler== When the cycle count register reaches its limit, cc_interrupt is called, which in turn calls gen_interupt [sic]. If interrupts are not enabled, cc_interrupt returns. If interrupts are enabled, and an interrupt is to be taken, the pending_exception flag will be set. In this case, cc_interrupt does not return, and instead pops the stack and causes an unconditional jump to the address in pcaddr (usually 0x80000180). There is one additional case where the interrupt handler may be called. If interrupts were disabled, and are enabled by writing to coprocessor 0 register 12, any pending interrupts are handled immediately. ==Delay slots== MIPS has 'delay slots', where the instruction after the branch is executed before the branch is taken. Instructions in delay slots are issued out-of-order in the recompiled code. [[Image:Recompiler delay slot reordering.png]] When a branch jumps into the delay slot of another branch, this case must be handled slightly differently: [[Image:Recompiler delay slot reordering 2.png]] The branch test and delay slot are executed in-order if a dependency exists, or for 'likely' branches where the delay slot is nullified when the branch condition is false. These cases are infrequent (typically less than 10% of branches). ==Constant propagation== When an instruction loads a constant into a register, the register is tagged as a constant. The constant tag will be retained if subsequent instructions modify the constant using other constants. During assembly, such a sequence of instructions is combined into a single load. For example: LUI r8,12340000 --> mov $0x12345678,%eax ORI r8,r8,5678 This optimization is not performed where a branch target intervenes, eg ... LUI r8,12340000 --> mov $0x12340000,%eax L1: ORI r8,r8,5678 --> or $0x5678,%eax ... BEQ r0,r0,L1 Registers containing constants are identified by bits in the isconst and wasconst fields of the regstat structure. The wasconst bit is set for a register if the register contained a known constant before the instruction, and the isconst bit is set for a register if the register will contain a known constant after the instruction executes. ==Translation lookaside buffer emulation== Most Nintendo 64 games do not use virtual memory, but some do. At startup, main memory is directly mapped at addresses from 0x80000000 to 0x803FFFFF, or up to 0x807FFFFF if the memory expansion is used. Normally, read or write operations are checked against this range, and if outside this range, control is passed to the appropriate I/O handler. This is done as follows: MIPS instruction: LW r1,8(r2) ARM code: add r1, r2, #8 cmp r1, #8388608 bvc handler ldr r1, [r1] If there are valid entries in the TLB, this would instead be compiled as follows: add r1, r2, #8 mov r0, #264 add r0, r0, r1, lsr #12 ldr r0, [r11, r0, lsl #2] tst r0, r0 bmi handler ldr r1, [r1, r0, lsl #2] This looks up the offset in the memory_map table (which, in this example, is located at r11+264*4). The high bit is tested to determine whether a valid mapping exists for this page. ==Page fault emulation== If a memory address references an invalid page, a conditional branch is taken to a bit of code placed after the main block. This will save any modified cached registers, and call an appropriate handler function for the address. The handler will either perform I/O, or generate an exception (pagefault). ==Mapping executable pages== If the dynamic recompiler encounters code which is not in contiguous physical memory, it will end the block at the page boundary, so that the block can be removed cleanly if the mapping is changed. There is a special case of this, where a branch and delay slot span two pages. If a branch instruction is the last instruction in a virtual memory page, it is compiled in a different manner than other branches. The branch condition is evaluated, and the target address is placed in a register (%ebp on x86, and r8 on ARM). A special form of the dynamic linker (dyna_linker_ds) is used to link the branch to its corresponding delay slot in another block. If no page fault occurs, the delay slot executes and then jumps to the address in the register. For conditional branches that are not taken, the target address is the next instruction. This code is generated by the pagespan_assemble function. == Self-modifying code detection == Pages not containing code which has been compiled or where the code may have been modified since compilation are marked in the invalid_code array. Writes are checked against this array, and if a write hits a valid (compiled and unmodified) page, invalidate_block is called: MIPS instruction: SW r1,8(r2) ARM code: ldr r3, [r11, #88] // pointer to invalid_code add r4, r2, #8 cmp r4, #8388608 bvc handler str r1, [r4] ldrb r14, [r3, r4 lsr #12] cmp r14, #1 bne invstub In TLB mode, the invalid_code array is not checked directly. Instead, pages are marked non-writable in memory_map. == Long jumps == Branch instructions are limited to a +/-32MB range on ARM. In some cases, the dynamic recompiler needs to generate calls to locations beyond this range. This is accomplished via a jump table located at the end of the code generation area, and the full address is loaded via a pointer. The jump table is generated in arch_init(). As these indirect jumps cause some delay, it is best to avoid this situation if possible, by locating this area close to the other executable code. == Compile options == === ARMv5_ONLY === If this is defined, the UXTH instruction is not used, and the dynamic recompiler will generate literal pools instead of using movw/movt. This provides compatibility with older processors, but generates somewhat less efficient code. === RAM_OFFSET === When compiling for ARM, this allocates an additional register which is used to add an offset to all pointers to memory addresses between 0x80000000 and 0x807FFFFF. This allows the N64's memory to be mapped at an alternate address. This incurs a small performance penalty, but is required for certain operating systems (eg Google Android, which places shared libraries at 0x80000000). This option is not used for x86. The x86 instruction set allows for a full 32-bit offset in the instruction encoding, making it unnecessary to allocate an additional register for this purpose. === CORTEX_A8_BRANCH_PREDICTION_HACK === If this is defined, the dynamic recompiler will avoid generating consecutive branch instructions without another instruction in between. This avoids a possible branch misprediction on the Cortex-A8 due to this processor having dual instruction decoders, but only one branch-prediction unit. See [[Assembly Code Optimization]] for details. === USE_MINI_HT === If this is defined, attempt to look up return addresses in a small hash table before checking the larger hash table. Usually improves performance. === IMM_PREFETCH === If this is defined, the x86 PREFETCH instruction is used to prefetch entries from the hash table. The increase in code size often outweighs the benefit of this. === REG_PREFETCH === Similar to the above, but loads the address into a register first, then uses the ARM PLD instruction. The increase in code size almost always outweighs the benefit of this. === R29_HACK === Assume that the stack pointer (r29) is always a valid memory address and do not check it. It is similar to the optimization described [http://strmnnrmn.blogspot.com/2007/08/interesting-dynarec-hack.html here]. This can crash the emulator and is not enabled by default. == Debugging == Debugging information can be obtained by defining the assem_debug macro as printf. This will cause the dynamic recompiler to print debugging information to stdout. For each disassembled MIPS instruction, an entry similar to the following will be printed: U: r1 r8 r11 r16 r31 UU: r29 32: r0 r9 pre: eax=-1 ecx=9 edx=-1 ebx=-1 ebp=29 esi=36 edi=-1 needs: ecx ebp esi r: r9 entry: eax=-1 ecx=9 edx=-1 ebx=-1 ebp=29 esi=36 edi=-1 dirty: ecx ebp esi 800001d8: LW r16,r29+14 eax=16 ecx=9 edx=-1 ebx=-1 ebp=29 esi=36 edi=-1 dirty: eax ecx ebp esi 32: r0 r9 r16 U: A list of MIPS registers which will not be used before they are overwritten (liveness analysis) UU: A list of MIPS registers for which the upper 32 bits will not be used before they are overwritten 32: Registers that contain 32-bit sign-extended values pre: The state of the register mapping prior to execution of this instruction. (-1 = no mapping; 36 = cycle count; The complete list of values with special meanings can be found in the source code) needs: a list of register mappings that were considered necessary and which could not be eliminated to make room for other mappings r: Registers that are known to contain 32-bit values and where optimizations rely on the assumption that the register does not contain a value outside of the range -231 to 231-1 entry: The minimum set of register mappings required to jump to this point dirty: Cached registers that have been modified and will need to be written back address: instruction - The decoded opcode, followed by the register mapping in effect after this instruction executes An asterisk (*) designates locations which are the target of a branch instruction. Constant propagation will not be performed across these points. After the complete disassembly, the recompiled native code is shown. Note that the output can be quite voluminous; 20-30 MB is typical. ==Potential improvements== ===Copy propagation/offset propagation=== A common instruction sequence is of the form: LUI r9,12340000 ADD r9,r9,r8 LW r9,5678(r9) It would be helpful to recognize this as a load from r8+12345678. The current constant propagation code does not do so. ===Constant propagation and register assignment=== Constant propagation is currently done after register assignment. Registers are assigned even if the register will always contain a known value. In certain cases, such as where the constant is used only to generate a memory address, this could be avoided and no register would need to be allocated. ===Unaligned memory access=== A small improvement could be made by combining adjacent LWL/LWR instructions. The potential gain from doing so is very limited because these instructions typically represent less than 1% of all memory accesses. ===SLT/branch merging=== A frequent occurrence in MIPS code is an SLT or SLTI instruction followed by a branch. This is generated relatively inefficiently on x86 and ARM, first doing a compare and set, then testing this value and doing a conditional branch. Doing only one comparison would save at least one instruction, and could potentially save up to three instructions if the liveness analysis reveals that the result of the SLT instruction is used nowhere else. While a potentially useful optimization, there are several problems with this approach. First, there are often additional instructions between the slt and the branch. These must be checked to make sure they do not modify the registers as that would prevent reordering the instruction stream as desired. Secondly, if the result of the slt is found to be live, but unmodified, on both paths of the branch, clean_registers will normally write this value before the branch, to avoid duplicating the writeback code on both paths of the branch. This optimization would have to be removed if the slt was combined with the branch. ===x86-64=== Currently the x86-64 backend generates only 32-bit instructions. Proper 64-bit code generation would improve performance. ===PowerPC=== It would be possible to add a PowerPC code generator to the dynamic recompiler. Currently no one is working on this. (The mupen64gc project is using a different codebase.) The following is a summary of the changes which would be necessary to add a PowerPC backend. The slt* instructions use conditional moves, which are unavailable on PowerPC. A suitable alternative (such as moves from the condition register) would need to be used. The assembler can generate as much as 256K of code in a single block, however conditional branches on PowerPC are limited to +/-64K. It will be necessary to either restrict the block size, or insert jump tables in a manner similar to the literal pools on ARM. PowerPC generally relies on early branch resolution rather than statistical branch prediction. Scheduling branch condition tests earlier may be advantageous. (For example, the address bounds check could be done in address_generation, rather than just before the load or store. Similarly it may be advantageous to test the branch condition and update the cycle count before executing the delay slot.) ===MIPS=== Recompiling MIPS into MIPS would be relatively straightforward, however the current code generator has no facility for filling delay slots. This capability would be required for efficient code generation. [[Category:Emulators]] [[Category:Optimization]] [[Category:Development]] mupen64plus-core-src-2.5/projects/000077500000000000000000000000001251723631200171305ustar00rootroot00000000000000mupen64plus-core-src-2.5/projects/VisualStudio2013/000077500000000000000000000000001251723631200220715ustar00rootroot00000000000000mupen64plus-core-src-2.5/projects/VisualStudio2013/mupen64plus-core.vcxproj000066400000000000000000001356621251723631200266530ustar00rootroot00000000000000 Debug Win32 New_Dynarec_Debug Win32 New_Dynarec_Release Win32 Release Win32 true true true true true true true true true false true false true true true true true true true true true false true false CompileAsCpp CompileAsCpp 4244 4244 true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true false true false true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true false true false Document "..\..\..\mupen64plus-win32-deps\nasm-2.11.06\nasm.exe" -o $(IntDir)linkage_x86.obj -f win32 %(FullPath) $(IntDir)linkage_x86.obj "..\..\..\mupen64plus-win32-deps\nasm-2.11.06\nasm.exe" -o $(IntDir)linkage_x86.obj -f win32 %(FullPath) $(IntDir)linkage_x86.obj {92D3FEB9-2129-41C5-8577-BCD7D961EF41} mupen64pluscore Win32Proj DynamicLibrary MultiByte true v120 DynamicLibrary MultiByte true v120 DynamicLibrary MultiByte v120 DynamicLibrary MultiByte v120 <_ProjectFileVersion>10.0.40219.1 $(SolutionDir)$(Configuration)\ $(SolutionDir)Debug\ $(Configuration)\ Debug\ true true $(SolutionDir)$(Configuration)\ $(SolutionDir)Release\ $(Configuration)\ Release\ false false AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset mupen64plus mupen64plus mupen64plus mupen64plus Disabled ..\..\src;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;DYNAREC;M64P_OSD;M64P_PARALLEL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 EditAndContinue Default shell32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\lib\zlib.lib;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\lib\libpng.lib;..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\lib\freetype.lib;%(AdditionalDependencies) $(OutDir)mupen64plus.dll true Windows MachineX86 Disabled ..\..\src;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;DYNAREC;M64P_OSD;M64P_PARALLEL;NEW_DYNAREC=1;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 EditAndContinue Default shell32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\lib\zlib.lib;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\lib\libpng.lib;..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\lib\freetype.lib;%(AdditionalDependencies) $(OutDir)mupen64plus.dll true Windows MachineX86 ..\..\src;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;DYNAREC;M64P_OSD;M64P_PARALLEL;%(PreprocessorDefinitions) MultiThreadedDLL Level3 ProgramDatabase Default shell32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\lib\zlib.lib;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\lib\libpng.lib;..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\lib\freetype.lib;%(AdditionalDependencies) $(OutDir)mupen64plus.dll true Windows true true MachineX86 ..\..\src;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;DYNAREC;M64P_OSD;M64P_PARALLEL;NEW_DYNAREC=1;%(PreprocessorDefinitions) MultiThreadedDLL Level3 ProgramDatabase Default shell32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\lib\zlib.lib;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\lib\libpng.lib;..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\lib\freetype.lib;%(AdditionalDependencies) $(OutDir)mupen64plus.dll true Windows true true MachineX86 mupen64plus-core-src-2.5/projects/VisualStudio2013/mupen64plus-core.vcxproj.filters000066400000000000000000000645201251723631200303140ustar00rootroot00000000000000 {2dbce10a-02a0-4348-8b30-3a9d8b7186cf} {9deae173-605c-40ef-a0cb-3e7536ca5490} {7f51f5eb-d111-4ea0-8e53-16af048aa72c} {ff56da04-0803-4045-b46c-e3dc66c192a6} {34995a42-e31b-454b-b4c8-968095acfbc1} {fec5e53b-4b84-4c79-af26-e473e369a269} {7dbf3f3e-a99d-49a0-8d55-b0b14ac0bde4} {3043b677-3c06-467d-b176-ef96cdf9bea4} {f8d14190-4f81-4bfa-bb8d-5a10c2292396} {9529393c-1033-4db2-9847-d99d0f2a3efc} {a84c1e57-9545-43d0-98c4-891f2a74f328} {ae9c3462-6c64-4e37-af7f-ae332906f7ee} {b6da3844-0918-46e3-b8d6-82420c5904bd} {e8322b9e-b3e5-475a-8446-47b2ad0c3c73} {c07bc3cc-5ebb-4a54-9487-ce74c52ee078} {05c49d60-e191-4e2f-85bd-c972e1cf97e2} {0a3e6535-058f-4cf8-94a1-cf33e0668572} {11f2d5a7-413e-462b-a57b-693174db54b3} {87776cb1-be61-4bae-b41a-b58247a4d566} {2ce19bee-47cf-4152-bddf-d2587d4ad1c1} {873c3262-2472-407c-8451-67cbb5f78bae} ai api api api api api api main\zip main\zip main\zip main main main main main main main main main main main main main main main memory osal osal osal osal osd osd osd pi pi pi pi plugin plugin plugin plugin plugin plugin plugin plugin plugin rdp rdp ri ri ri rsp si si si si si si si si si vi r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300\x86 r4300\x86 r4300\x86 r4300\x86 r4300\x86 r4300\x86 r4300\x86 r4300\x86 r4300\x86 r4300\x86 r4300\x86 r4300\x86 r4300\x86 r4300\x86 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\new_dynarec r4300\new_dynarec\arm r4300\new_dynarec\arm r4300\new_dynarec\x86 debugger debugger debugger debugger ai api api api api api api api api api api api api main\zip main\zip main\zip main\zip main main main main main main main main main main main main main main main main main memory osal osal osal osd osd osd pi pi pi pi plugin plugin plugin plugin plugin plugin plugin plugin plugin rdp rdp ri ri ri rsp si si si si si si si si si vi r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300\x86 r4300\x86 r4300\x86 r4300\x86 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\x86_64 r4300\new_dynarec r4300\new_dynarec\arm r4300\new_dynarec\arm r4300\new_dynarec\x86 debugger debugger debugger debugger debugger debugger r4300 r4300 r4300 r4300 r4300 r4300 r4300 r4300\new_dynarec\arm r4300\new_dynarec\x86 mupen64plus-core-src-2.5/projects/unix/000077500000000000000000000000001251723631200201135ustar00rootroot00000000000000mupen64plus-core-src-2.5/projects/unix/Makefile000077500000000000000000000514771251723631200215740ustar00rootroot00000000000000#/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * Mupen64plus - Makefile * # * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * # * Copyright (C) 2008-2009 Richard Goedeken * # * Copyright (C) 2007-2008 DarkJeztr Tillin9 * # * * # * This program is free software; you can redistribute it and/or modify * # * it under the terms of the GNU General Public License as published by * # * the Free Software Foundation; either version 2 of the License, or * # * (at your option) any later version. * # * * # * This program is distributed in the hope that it will be useful, * # * but WITHOUT ANY WARRANTY; without even the implied warranty of * # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * # * GNU General Public License for more details. * # * * # * You should have received a copy of the GNU General Public License * # * along with this program; if not, write to the * # * Free Software Foundation, Inc., * # * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ # Makefile for Mupen64Plus Core # detect operating system UNAME ?= $(shell uname -s) OS := NONE ifeq ("$(UNAME)","Linux") OS = LINUX endif ifeq ("$(UNAME)","linux") OS = LINUX endif ifneq ("$(filter GNU hurd,$(UNAME))","") OS = LINUX endif ifeq ("$(UNAME)","Darwin") OS = OSX endif ifeq ("$(UNAME)","FreeBSD") OS = FREEBSD endif ifeq ("$(UNAME)","OpenBSD") OS = FREEBSD CFLAGS += -DIOAPI_NO_64 $(warning OS type "$(UNAME)" not officially supported.') endif ifneq ("$(filter GNU/kFreeBSD kfreebsd,$(UNAME))","") OS = LINUX endif ifeq ("$(patsubst MINGW%,MINGW,$(UNAME))","MINGW") OS = MINGW PIC = 0 endif ifeq ("$(OS)","NONE") $(error OS type "$(UNAME)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues') endif # detect system architecture HOST_CPU ?= $(shell uname -m) CPU := NONE ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","") CPU := X86 ifeq ("$(BITS)", "32") ARCH_DETECTED := 64BITS_32 PIC ?= 0 else ARCH_DETECTED := 64BITS PIC ?= 1 endif endif ifneq ("$(filter pentium i%86,$(HOST_CPU))","") CPU := X86 ARCH_DETECTED := 32BITS PIC ?= 0 endif ifneq ("$(filter ppc macppc socppc powerpc,$(HOST_CPU))","") CPU := PPC ARCH_DETECTED := 32BITS BIG_ENDIAN := 1 PIC ?= 1 NO_ASM := 1 $(warning Architecture "$(HOST_CPU)" not officially supported.') endif ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","") CPU := PPC ARCH_DETECTED := 64BITS BIG_ENDIAN := 1 PIC ?= 1 NO_ASM := 1 $(warning Architecture "$(HOST_CPU)" not officially supported.') endif ifneq ("$(filter arm%,$(HOST_CPU))","") ifeq ("$(filter arm%b,$(HOST_CPU))","") CPU := ARM ARCH_DETECTED := 32BITS PIC ?= 1 NEW_DYNAREC := 1 CFLAGS += -marm ifneq ("$(filter armv5%,$(HOST_CPU))","") CFLAGS += -DARMv5_ONLY $(warning Using ARMv5_ONLY) endif ifneq ("$(filter armv6%,$(HOST_CPU))","") CFLAGS += -DARMv5_ONLY $(warning Using ARMv5_ONLY) endif ifeq ($(NEON), 1) CFLAGS += -mfpu=neon -mfloat-abi=hard else ifeq ($(VFP_HARD), 1) CFLAGS += -mfpu=vfp -mfloat-abi=hard else CFLAGS += -mfpu=vfp -mfloat-abi=softfp endif endif $(warning Architecture "$(HOST_CPU)" not officially supported.') endif endif ifneq ("$(filter mips,$(HOST_CPU))","") CPU := MIPS ARCH_DETECTED := 32BITS PIC ?= 1 NO_ASM := 1 $(warning Architecture "$(HOST_CPU)" not officially supported.') endif ifeq ("$(CPU)","NONE") $(error CPU type "$(HOST_CPU)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues') endif # base CFLAGS, LDLIBS, and LDFLAGS OPTFLAGS ?= -O3 -flto WARNFLAGS ?= -Wall -Wno-unused-function CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src -DM64P_PARALLEL CXXFLAGS += -fvisibility-inlines-hidden LDLIBS += -lm # Since we are building a shared library, we must compile with -fPIC on some architectures # On 32-bit x86 systems we do not want to use -fPIC because we don't have to and it has a big performance penalty on this arch ifeq ($(PIC), 1) CFLAGS += -fPIC else CFLAGS += -fno-PIC endif ifeq ($(BIG_ENDIAN), 1) CFLAGS += -DM64P_BIG_ENDIAN endif # tweak flags for 32-bit build on 64-bit system ifeq ($(ARCH_DETECTED), 64BITS_32) ifeq ($(OS), FREEBSD) $(error Do not use the BITS=32 option with FreeBSD, use -m32 and -m elf_i386) endif CFLAGS += -m32 LDFLAGS += -Wl,-m,elf_i386 endif # set special flags per-system ifeq ($(OS), FREEBSD) TARGET = libmupen64plus$(POSTFIX).so.2.0.0 SONAME = libmupen64plus$(POSTFIX).so.2 LDFLAGS += -Wl,-Bsymbolic -shared -Wl,-export-dynamic -Wl,-soname,$(SONAME) LDLIBS += -L${LOCALBASE}/lib -lc ASFLAGS = -f elf -d ELF_TYPE endif ifeq ($(OS), LINUX) TARGET = libmupen64plus$(POSTFIX).so.2.0.0 SONAME = libmupen64plus$(POSTFIX).so.2 LDFLAGS += -Wl,-Bsymbolic -shared -Wl,-export-dynamic -Wl,-soname,$(SONAME) LDLIBS += -ldl # only export api symbols LDFLAGS += -Wl,-version-script,$(SRCDIR)/api/api_export.ver ASFLAGS = -f elf -d ELF_TYPE endif ifeq ($(OS), OSX) #xcode-select has been around since XCode 3.0, i.e. OS X 10.5 OSX_SDK_ROOT = $(shell xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs OSX_SDK_PATH = $(OSX_SDK_ROOT)/$(shell ls $(OSX_SDK_ROOT) | tail -1) TARGET = libmupen64plus$(POSTFIX).dylib LDFLAGS += -framework CoreFoundation -bundle -read_only_relocs suppress LDLIBS += -ldl ASFLAGS = -f macho ifeq ($(CPU), X86) ifeq ($(ARCH_DETECTED), 64BITS) CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=10.5 -isysroot $(OSX_SDK_PATH) else CFLAGS += -pipe -mmmx -msse -arch i686 -mmacosx-version-min=10.5 -isysroot $(OSX_SDK_PATH) ifneq ($(PROFILE), 1) CFLAGS += -fomit-frame-pointer endif endif endif endif ifeq ($(OS), MINGW) TARGET = mupen64plus$(POSTFIX).dll LDFLAGS += -Wl,-Bsymbolic -shared -Wl,-export-all-symbols # only export api symbols LDFLAGS += -Wl,-version-script,$(SRCDIR)/api/api_export.ver LDLIBS += -lpthread ASFLAGS = -f win32 endif ifeq ($(CPU_ENDIANNESS), BIG) CFLAGS += -DM64P_BIG_ENDIAN endif # disable verbose output ifneq ($(findstring $(MAKEFLAGS),s),s) ifndef V Q_CC = @echo ' CC '$@; Q_CXX = @echo ' CXX '$@; Q_AS = @echo ' AS '$@; Q_LD = @echo ' LD '$@; endif endif # test for essential build dependencies ifeq ($(origin PKG_CONFIG), undefined) PKG_CONFIG = $(CROSS_COMPILE)pkg-config ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),) $(error $(PKG_CONFIG) not found) endif endif ifeq ($(OS), OSX) # use system zlib on OSX ZLIB_LDLIBS += -lz endif ifeq ($(origin ZLIB_CFLAGS) $(origin ZLIB_LDLIBS), undefined undefined) ifeq ($(shell $(PKG_CONFIG) --modversion zlib 2>/dev/null),) $(error No zlib development libraries found!) endif ZLIB_CFLAGS += $(shell $(PKG_CONFIG) --cflags zlib) ZLIB_LDLIBS += $(shell $(PKG_CONFIG) --libs zlib) endif CFLAGS += $(ZLIB_CFLAGS) LDLIBS += $(ZLIB_LDLIBS) ifeq ($(origin LIBPNG_CFLAGS) $(origin LIBPNG_LDLIBS), undefined undefined) ifeq ($(shell $(PKG_CONFIG) --modversion libpng 2>/dev/null),) $(error No libpng development libraries found!) endif LIBPNG_CFLAGS += $(shell $(PKG_CONFIG) --cflags libpng) LIBPNG_LDLIBS += $(shell $(PKG_CONFIG) --libs libpng) endif CFLAGS += $(LIBPNG_CFLAGS) LDLIBS += $(LIBPNG_LDLIBS) # test for presence of SDL ifeq ($(origin SDL_CFLAGS) $(origin SDL_LDLIBS), undefined undefined) SDL_CONFIG = $(CROSS_COMPILE)sdl2-config ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),) SDL_CONFIG = $(CROSS_COMPILE)sdl-config ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),) $(error No SDL development libraries found!) else $(warning Using SDL 1.2 libraries) endif endif SDL_CFLAGS += $(shell $(SDL_CONFIG) --cflags) SDL_LDLIBS += $(shell $(SDL_CONFIG) --libs) endif CFLAGS += $(SDL_CFLAGS) LDLIBS += $(SDL_LDLIBS) ifeq ($(VC), 1) CFLAGS += -DUSE_GLES -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/vmcs_host/linux LDLIBS += -L/opt/vc/lib -lGLESv2 -lEGL -lbcm_host -lvcos -lvchiq_arm # OSD uses non-ES code and breaks attribs of video plugins OSD=0 endif ifeq ($(USE_GLES), 1) CFLAGS += -DUSE_GLES LDLIBS += -lGLESv2 # OSD uses non-ES code and breaks attribs of video plugins OSD=0 endif OSD ?= 1 ifeq ($(OSD), 1) CFLAGS += -DM64P_OSD ifeq ($(origin FREETYPE2_CFLAGS) $(origin FREETYPE2_LDLIBS), undefined undefined) ifeq ($(shell $(PKG_CONFIG) --modversion freetype2 2>/dev/null),) $(error No freetype2 development libraries found!) endif FREETYPE2_CFLAGS += $(shell $(PKG_CONFIG) --cflags freetype2) FREETYPE2_LDLIBS += $(shell $(PKG_CONFIG) --libs freetype2) endif CFLAGS += $(FREETYPE2_CFLAGS) LDLIBS += $(FREETYPE2_LDLIBS) # search for OpenGL libraries ifeq ($(OS), OSX) GL_LDLIBS = -framework OpenGL GLU_LDLIBS = -framework OpenGL endif ifeq ($(OS), MINGW) GL_LDLIBS = -lopengl32 GLU_LDLIBS = -lglu32 endif ifeq ($(origin GL_CFLAGS) $(origin GL_LDLIBS), undefined undefined) ifeq ($(shell $(PKG_CONFIG) --modversion gl 2>/dev/null),) $(error No OpenGL development libraries found!) endif GL_CFLAGS += $(shell $(PKG_CONFIG) --cflags gl) GL_LDLIBS += $(shell $(PKG_CONFIG) --libs gl) endif CFLAGS += $(GL_CFLAGS) LDLIBS += $(GL_LDLIBS) ifeq ($(origin GLU_CFLAGS) $(origin GLU_LDLIBS), undefined undefined) ifeq ($(shell $(PKG_CONFIG) --modversion glu 2>/dev/null),) $(error No OpenGL utility development libraries found!) endif GLU_CFLAGS += $(shell $(PKG_CONFIG) --cflags glu) GLU_LDLIBS += $(shell $(PKG_CONFIG) --libs glu) endif CFLAGS += $(GLU_CFLAGS) LDLIBS += $(GLU_LDLIBS) endif # set base program pointers and flags CC = $(CROSS_COMPILE)gcc CXX = $(CROSS_COMPILE)g++ AS = nasm RM ?= rm -f INSTALL ?= install MKDIR ?= mkdir -p COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c COMPILE.cc = $(Q_CXX)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c COMPILE.as = $(Q_AS)$(AS) $(ASFLAGS) LINK.o = $(Q_LD)$(CXX) $(CXXFLAGS) $(LDFLAGS) $(TARGET_ARCH) ifeq ($(OS),OSX) LDCONFIG ?= true # no 'ldconfig' under OSX else ifeq ($(OS),LINUX) LDCONFIG ?= PATH="$$PATH:/sbin" ldconfig -n endif ifeq ($(OS),FREEBSD) LDCONFIG ?= PATH="$$PATH:/sbin" ldconfig -m endif endif # compiler/linker flags for various compile-time options. # 1. macro for no assembly language ifeq ($(NO_ASM), 1) CFLAGS += -DNO_ASM endif # 2. variables for profiling and adding debugging symbols ifeq ($(PROFILE), 1) CFLAGS += -pg -g INSTALL_STRIP_FLAG ?= else ifeq ($(DEBUG), 1) CFLAGS += -g INSTALL_STRIP_FLAG ?= else ifneq ($(OS),OSX) INSTALL_STRIP_FLAG ?= -s endif endif endif # 3. other options given to the makefile on the command line ifeq ($(LIRC), 1) CFLAGS += -DWITH_LIRC endif ifeq ($(DEBUGGER), 1) CFLAGS += -DDBG endif ifeq ($(DBG_COMPARE), 1) CFLAGS += -DCOMPARE_CORE endif ifeq ($(DBG_CORE), 1) CFLAGS += -DCORE_DBG endif ifeq ($(DBG_COUNT), 1) CFLAGS += -DCOUNT_INSTR endif ifeq ($(DBG_TIMING), 1) CFLAGS += -DPROFILE LDFLAGS += -lrt endif ifeq ($(DBG_PROFILE), 1) CFLAGS += -DPROFILE_R4300 endif # 4. compile-time directory paths for building into the library ifneq ($(SHAREDIR),) CFLAGS += -DSHAREDIR="$(SHAREDIR)" endif # set installation options ifeq ($(PREFIX),) PREFIX := /usr/local endif ifeq ($(SHAREDIR),) SHAREDIR := $(PREFIX)/share/mupen64plus endif ifeq ($(LIBDIR),) LIBDIR := $(PREFIX)/lib endif ifeq ($(INCDIR),) INCDIR := $(PREFIX)/include/mupen64plus endif SRCDIR = ../../src OBJDIR = _obj$(POSTFIX) # list of required source files for compilation SOURCE = \ $(SRCDIR)/ai/ai_controller.c \ $(SRCDIR)/api/callbacks.c \ $(SRCDIR)/api/common.c \ $(SRCDIR)/api/config.c \ $(SRCDIR)/api/debugger.c \ $(SRCDIR)/api/frontend.c \ $(SRCDIR)/api/vidext.c \ $(SRCDIR)/main/main.c \ $(SRCDIR)/main/util.c \ $(SRCDIR)/main/cheat.c \ $(SRCDIR)/main/eep_file.c \ $(SRCDIR)/main/eventloop.c \ $(SRCDIR)/main/fla_file.c \ $(SRCDIR)/main/md5.c \ $(SRCDIR)/main/mpk_file.c \ $(SRCDIR)/main/profile.c \ $(SRCDIR)/main/rom.c \ $(SRCDIR)/main/savestates.c \ $(SRCDIR)/main/sdl_key_converter.c \ $(SRCDIR)/main/sra_file.c \ $(SRCDIR)/main/workqueue.c \ $(SRCDIR)/memory/memory.c \ $(SRCDIR)/pi/cart_rom.c \ $(SRCDIR)/pi/flashram.c \ $(SRCDIR)/pi/pi_controller.c \ $(SRCDIR)/pi/sram.c \ $(SRCDIR)/plugin/emulate_game_controller_via_input_plugin.c \ $(SRCDIR)/plugin/emulate_speaker_via_audio_plugin.c \ $(SRCDIR)/plugin/get_time_using_C_localtime.c \ $(SRCDIR)/plugin/rumble_via_input_plugin.c \ $(SRCDIR)/plugin/plugin.c \ $(SRCDIR)/plugin/dummy_video.c \ $(SRCDIR)/plugin/dummy_audio.c \ $(SRCDIR)/plugin/dummy_input.c \ $(SRCDIR)/plugin/dummy_rsp.c \ $(SRCDIR)/r4300/r4300.c \ $(SRCDIR)/r4300/cached_interp.c \ $(SRCDIR)/r4300/cp0.c \ $(SRCDIR)/r4300/cp1.c \ $(SRCDIR)/r4300/exception.c \ $(SRCDIR)/r4300/instr_counters.c \ $(SRCDIR)/r4300/interupt.c \ $(SRCDIR)/r4300/mi_controller.c \ $(SRCDIR)/r4300/pure_interp.c \ $(SRCDIR)/r4300/r4300_core.c \ $(SRCDIR)/r4300/recomp.c \ $(SRCDIR)/r4300/reset.c \ $(SRCDIR)/r4300/tlb.c \ $(SRCDIR)/rdp/fb.c \ $(SRCDIR)/rdp/rdp_core.c \ $(SRCDIR)/ri/rdram.c \ $(SRCDIR)/ri/rdram_detection_hack.c \ $(SRCDIR)/ri/ri_controller.c \ $(SRCDIR)/rsp/rsp_core.c \ $(SRCDIR)/si/af_rtc.c \ $(SRCDIR)/si/cic.c \ $(SRCDIR)/si/eeprom.c \ $(SRCDIR)/si/game_controller.c \ $(SRCDIR)/si/mempak.c \ $(SRCDIR)/si/n64_cic_nus_6105.c \ $(SRCDIR)/si/pif.c \ $(SRCDIR)/si/rumblepak.c \ $(SRCDIR)/si/si_controller.c \ $(SRCDIR)/vi/vi_controller.c \ $(SRCDIR)/osd/screenshot.cpp ifeq ("$(OS)","MINGW") SOURCE += \ $(SRCDIR)/osal/dynamiclib_win32.c \ $(SRCDIR)/osal/files_win32.c else SOURCE += \ $(SRCDIR)/osal/dynamiclib_unix.c \ $(SRCDIR)/osal/files_unix.c endif ifeq ($(OSD), 1) SOURCE += \ $(SRCDIR)/osd/OGLFT.cpp \ $(SRCDIR)/osd/osd.cpp endif # source files for optional features ifneq ($(NO_ASM), 1) ifeq ($(CPU), X86) ifeq ($(ARCH_DETECTED), 64BITS) DYNAREC = x86_64 else DYNAREC = x86 endif endif ifeq ($(CPU), ARM) ifeq ($(ARCH_DETECTED), 32BITS) DYNAREC = arm endif endif endif ifneq ($(DYNAREC), ) CFLAGS += -DDYNAREC ifeq ($(NEW_DYNAREC), 1) ifeq ($(DYNAREC), x86) CFLAGS += -DNEW_DYNAREC=1 SOURCE += \ $(SRCDIR)/r4300/new_dynarec/x86/linkage_x86.asm else ifeq ($(DYNAREC), arm) CFLAGS += -DNEW_DYNAREC=3 SOURCE += \ $(SRCDIR)/r4300/new_dynarec/arm/linkage_arm.S \ $(SRCDIR)/r4300/new_dynarec/arm/arm_cpu_features.c else $(error NEW_DYNAREC is only supported on 32 bit x86 and 32 bit armel) endif endif SOURCE += \ $(SRCDIR)/r4300/empty_dynarec.c \ $(SRCDIR)/r4300/new_dynarec/new_dynarec.c else SOURCE += \ $(SRCDIR)/r4300/$(DYNAREC)/assemble.c \ $(SRCDIR)/r4300/$(DYNAREC)/gbc.c \ $(SRCDIR)/r4300/$(DYNAREC)/gcop0.c \ $(SRCDIR)/r4300/$(DYNAREC)/gcop1.c \ $(SRCDIR)/r4300/$(DYNAREC)/gcop1_d.c \ $(SRCDIR)/r4300/$(DYNAREC)/gcop1_l.c \ $(SRCDIR)/r4300/$(DYNAREC)/gcop1_s.c \ $(SRCDIR)/r4300/$(DYNAREC)/gcop1_w.c \ $(SRCDIR)/r4300/$(DYNAREC)/gr4300.c \ $(SRCDIR)/r4300/$(DYNAREC)/gregimm.c \ $(SRCDIR)/r4300/$(DYNAREC)/gspecial.c \ $(SRCDIR)/r4300/$(DYNAREC)/gtlb.c \ $(SRCDIR)/r4300/$(DYNAREC)/regcache.c \ $(SRCDIR)/r4300/$(DYNAREC)/rjump.c endif else SOURCE += $(SRCDIR)/r4300/empty_dynarec.c endif ifeq ($(LIRC), 1) SOURCE += $(SRCDIR)/main/lirc.c LDLIBS += -llirc_client endif ifeq ($(shell $(PKG_CONFIG) --modversion minizip 2>/dev/null),) SOURCE += \ $(SRCDIR)/main/zip/ioapi.c \ $(SRCDIR)/main/zip/zip.c \ $(SRCDIR)/main/zip/unzip.c CFLAGS += -DNOCRYPT -DNOUNCRYPT else CFLAGS += $(shell $(PKG_CONFIG) --cflags minizip) -DLIBMINIZIP LDLIBS += $(shell $(PKG_CONFIG) --libs minizip) endif ifeq ($(DEBUGGER), 1) SOURCE += \ $(SRCDIR)/debugger/dbg_debugger.c \ $(SRCDIR)/debugger/dbg_decoder.c \ $(SRCDIR)/debugger/dbg_memory.c \ $(SRCDIR)/debugger/dbg_breakpoints.c LDLIBS += -lopcodes -lbfd endif # generate a list of object files to build, make a temporary directory for them OBJECTS := $(patsubst $(SRCDIR)/%.c, $(OBJDIR)/%.o, $(filter %.c, $(SOURCE))) OBJECTS += $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(filter %.cpp, $(SOURCE))) OBJECTS += $(patsubst $(SRCDIR)/%.S, $(OBJDIR)/%.o, $(filter %.S, $(SOURCE))) OBJECTS += $(patsubst $(SRCDIR)/%.asm, $(OBJDIR)/%.o, $(filter %.asm, $(SOURCE))) OBJDIRS = $(dir $(OBJECTS)) $(shell $(MKDIR) $(OBJDIRS)) # build targets targets: @echo "Mupen64Plus-core makefile. " @echo " Targets:" @echo " all == Build Mupen64Plus core library" @echo " clean == remove object files" @echo " install == Install Mupen64Plus core library" @echo " uninstall == Uninstall Mupen64Plus core library" @echo " Build Options:" @echo " BITS=32 == build 32-bit binaries on 64-bit machine" @echo " LIRC=1 == enable LIRC support" @echo " NO_ASM=1 == build without assembly (no dynamic recompiler or MMX/SSE code)" @echo " USE_GLES=1 == build against GLESv2 instead of OpenGL" @echo " VC=1 == build against Broadcom Videocore GLESv2" @echo " NEON=1 == (ARM only) build for hard floating point environments" @echo " VFP_HARD=1 == (ARM only) full hardware floating point ABI" @echo " SHAREDIR=path == extra path to search for shared data files" @echo " OPTFLAGS=flag == compiler optimization (default: -O3 -flto)" @echo " WARNFLAGS=flag == compiler warning levels (default: -Wall)" @echo " PIC=(1|0) == Force enable/disable of position independent code" @echo " OSD=(1|0) == Enable/disable build of OpenGL On-screen display" @echo " NEW_DYNAREC=1 == Replace dynamic recompiler with Ari64's experimental dynarec" @echo " POSTFIX=name == String added to the name of the the build (default: '')" @echo " Install Options:" @echo " PREFIX=path == install/uninstall prefix (default: /usr/local/)" @echo " SHAREDIR=path == path to install shared data files (default: PREFIX/share/mupen64plus)" @echo " LIBDIR=path == path to install core library (default: PREFIX/lib)" @echo " INCDIR=path == path to install core header files (default: PREFIX/include/mupen64plus)" @echo " DESTDIR=path == path to prepend to all installation paths (only for packagers)" @echo " Debugging Options:" @echo " PROFILE=1 == build gprof instrumentation into binaries for profiling" @echo " DEBUG=1 == add debugging symbols to binaries" @echo " DEBUGGER=1 == build debugger API into core for front-ends. runs slower." @echo " DBG_CORE=1 == print debugging info in r4300 core" @echo " DBG_COUNT=1 == print R4300 instruction count totals (64-bit dynarec only)" @echo " DBG_COMPARE=1 == enable core-synchronized r4300 debugging" @echo " DBG_TIMING=1 == print timing data" @echo " DBG_PROFILE=1 == dump profiling data for r4300 dynarec to data file" @echo " V=1 == show verbose compiler output" all: $(TARGET) install: $(TARGET) $(INSTALL) -d "$(DESTDIR)$(LIBDIR)" $(INSTALL) -m 0644 $(INSTALL_STRIP_FLAG) $(TARGET) "$(DESTDIR)$(LIBDIR)" $(INSTALL) -d "$(DESTDIR)$(SHAREDIR)" $(INSTALL) -m 0644 ../../data/* "$(DESTDIR)$(SHAREDIR)" $(INSTALL) -d "$(DESTDIR)$(INCDIR)" $(INSTALL) -m 0644 ../../src/api/m64p_*.h "$(DESTDIR)$(INCDIR)" -$(LDCONFIG) "$(DESTDIR)$(LIBDIR)" if [ ! -e "$(DESTDIR)$(LIBDIR)/$(SONAME)" ]; then ln -sf "$(TARGET)" "$(DESTDIR)$(LIBDIR)/$(SONAME)"; fi uninstall: $(RM) "$(DESTDIR)$(LIBDIR)/$(TARGET)" if [ "$(SONAME)" != "" ]; then $(RM) "$(DESTDIR)$(LIBDIR)/$(SONAME)"; fi $(RM) $(DESTDIR)$(INCDIR)/m64p_*.h $(RM) "$(DESTDIR)$(SHAREDIR)/mupen64plus.ini" $(RM) "$(DESTDIR)$(SHAREDIR)/font.ttf" $(RM) "$(DESTDIR)$(SHAREDIR)/mupencheat.txt" clean: $(RM) -r $(TARGET) $(SONAME) $(OBJDIR) # build dependency files CFLAGS += -MD -MP -include $(OBJECTS:.o=.d) CXXFLAGS += $(CFLAGS) # standard build rules $(OBJDIR)/%.o: $(SRCDIR)/%.asm $(COMPILE.as) -o $@ $< $(OBJDIR)/%.o: $(SRCDIR)/%.S $(COMPILE.c) -o $@ $< $(OBJDIR)/%.o: $(SRCDIR)/%.c $(COMPILE.c) -o $@ $< $(OBJDIR)/%.o: $(SRCDIR)/%.cpp $(COMPILE.cc) -o $@ $< $(TARGET): $(OBJECTS) $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@ if [ "$(SONAME)" != "" ]; then ln -sf $@ $(SONAME); fi .PHONY: all clean install uninstall targets mupen64plus-core-src-2.5/src/000077500000000000000000000000001251723631200160665ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/ai/000077500000000000000000000000001251723631200164575ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/ai/ai_controller.c000066400000000000000000000143751251723631200214710ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - ai_controller.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "ai_controller.h" #include #include "main/rom.h" #include "memory/memory.h" #include "r4300/r4300_core.h" #include "ri/ri_controller.h" #include "vi/vi_controller.h" enum { AI_STATUS_BUSY = 0x40000000, AI_STATUS_FULL = 0x80000000 }; static uint32_t get_remaining_dma_length(struct ai_controller* ai) { unsigned int next_ai_event; unsigned int remaining_dma_duration; const uint32_t* cp0_regs; if (ai->fifo[0].duration == 0) return 0; update_count(); next_ai_event = get_event(AI_INT); if (next_ai_event == 0) return 0; cp0_regs = r4300_cp0_regs(); remaining_dma_duration = next_ai_event - cp0_regs[CP0_COUNT_REG]; if (remaining_dma_duration >= 0x80000000) return 0; return (uint64_t)remaining_dma_duration * ai->fifo[0].length / ai->fifo[0].duration; } static unsigned int get_dma_duration(struct ai_controller* ai) { unsigned int samples_per_sec = ROM_PARAMS.aidacrate / (1 + ai->regs[AI_DACRATE_REG]); return ((uint64_t)ai->regs[AI_LEN_REG]*ai->vi->delay*ROM_PARAMS.vilimit) / (4 * samples_per_sec); } static void do_dma(struct ai_controller* ai, const struct ai_dma* dma) { /* lazy initialization of sample format */ if (ai->samples_format_changed) { unsigned int frequency = (ai->regs[AI_DACRATE_REG] == 0) ? 44100 : ROM_PARAMS.aidacrate / (1 + ai->regs[AI_DACRATE_REG]); unsigned int bits = (ai->regs[AI_BITRATE_REG] == 0) ? 16 : 1 + ai->regs[AI_BITRATE_REG]; set_audio_format(ai, frequency, bits); ai->samples_format_changed = 0; } /* push audio samples to external sink */ push_audio_samples(ai, &ai->ri->rdram.dram[dma->address/4], dma->length); /* schedule end of dma event */ update_count(); add_interupt_event(AI_INT, dma->duration); } static void fifo_push(struct ai_controller* ai) { unsigned int duration = get_dma_duration(ai); if (ai->regs[AI_STATUS_REG] & AI_STATUS_BUSY) { ai->fifo[1].address = ai->regs[AI_DRAM_ADDR_REG]; ai->fifo[1].length = ai->regs[AI_LEN_REG]; ai->fifo[1].duration = duration; ai->regs[AI_STATUS_REG] |= AI_STATUS_FULL; } else { ai->fifo[0].address = ai->regs[AI_DRAM_ADDR_REG]; ai->fifo[0].length = ai->regs[AI_LEN_REG]; ai->fifo[0].duration = duration; ai->regs[AI_STATUS_REG] |= AI_STATUS_BUSY; do_dma(ai, &ai->fifo[0]); } } static void fifo_pop(struct ai_controller* ai) { if (ai->regs[AI_STATUS_REG] & AI_STATUS_FULL) { ai->fifo[0].address = ai->fifo[1].address; ai->fifo[0].length = ai->fifo[1].length; ai->fifo[0].duration = ai->fifo[1].duration; ai->regs[AI_STATUS_REG] &= ~AI_STATUS_FULL; do_dma(ai, &ai->fifo[0]); } else { ai->regs[AI_STATUS_REG] &= ~AI_STATUS_BUSY; } } void set_audio_format(struct ai_controller* ai, unsigned int frequency, unsigned int bits) { ai->set_audio_format(ai->user_data, frequency, bits); } void push_audio_samples(struct ai_controller* ai, const void* buffer, size_t size) { ai->push_audio_samples(ai->user_data, buffer, size); } void connect_ai(struct ai_controller* ai, struct r4300_core* r4300, struct ri_controller* ri, struct vi_controller* vi) { ai->r4300 = r4300; ai->ri = ri; ai->vi = vi; } void init_ai(struct ai_controller* ai) { memset(ai->regs, 0, AI_REGS_COUNT*sizeof(uint32_t)); memset(ai->fifo, 0, 2*sizeof(struct ai_dma)); ai->samples_format_changed = 0; } int read_ai_regs(void* opaque, uint32_t address, uint32_t* value) { struct ai_controller* ai = (struct ai_controller*)opaque; uint32_t reg = ai_reg(address); if (reg == AI_LEN_REG) { *value = get_remaining_dma_length(ai); } else { *value = ai->regs[reg]; } return 0; } int write_ai_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct ai_controller* ai = (struct ai_controller*)opaque; uint32_t reg = ai_reg(address); switch (reg) { case AI_LEN_REG: masked_write(&ai->regs[AI_LEN_REG], value, mask); fifo_push(ai); return 0; case AI_STATUS_REG: clear_rcp_interrupt(ai->r4300, MI_INTR_AI); return 0; case AI_BITRATE_REG: case AI_DACRATE_REG: /* lazy audio format setting */ if ((ai->regs[reg]) != (value & mask)) ai->samples_format_changed = 1; masked_write(&ai->regs[reg], value, mask); return 0; } masked_write(&ai->regs[reg], value, mask); return 0; } void ai_end_of_dma_event(struct ai_controller* ai) { fifo_pop(ai); raise_rcp_interrupt(ai->r4300, MI_INTR_AI); } mupen64plus-core-src-2.5/src/ai/ai_controller.h000066400000000000000000000057371251723631200215000ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - ai_controller.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_AI_AI_CONTROLLER_H #define M64P_AI_AI_CONTROLLER_H #include #include struct r4300_core; struct ri_controller; struct vi_controller; enum ai_registers { AI_DRAM_ADDR_REG, AI_LEN_REG, AI_CONTROL_REG, AI_STATUS_REG, AI_DACRATE_REG, AI_BITRATE_REG, AI_REGS_COUNT }; struct ai_dma { uint32_t address; uint32_t length; unsigned int duration; }; struct ai_controller { uint32_t regs[AI_REGS_COUNT]; struct ai_dma fifo[2]; unsigned int samples_format_changed; /* external speaker output */ void* user_data; void (*set_audio_format)(void*,unsigned int, unsigned int); void (*push_audio_samples)(void*,const void*,size_t); struct r4300_core* r4300; struct ri_controller* ri; struct vi_controller* vi; }; static uint32_t ai_reg(uint32_t address) { return (address & 0xffff) >> 2; } void set_audio_format(struct ai_controller* ai, unsigned int frequency, unsigned int bits); void push_audio_samples(struct ai_controller* ai, const void* buffer, size_t size); void connect_ai(struct ai_controller* ai, struct r4300_core* r4300, struct ri_controller* ri, struct vi_controller* vi); void init_ai(struct ai_controller* ai); int read_ai_regs(void* opaque, uint32_t address, uint32_t* value); int write_ai_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask); void ai_end_of_dma_event(struct ai_controller* ai); #endif mupen64plus-core-src-2.5/src/api/000077500000000000000000000000001251723631200166375ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/api/api_export.ver000066400000000000000000000025351251723631200215340ustar00rootroot00000000000000{ global: ConfigDeleteSection; ConfigGetParamBool; ConfigGetParameter; ConfigGetParameterHelp; ConfigGetParameterType; ConfigGetParamFloat; ConfigGetParamInt; ConfigGetParamString; ConfigGetSharedDataFilepath; ConfigGetUserCachePath; ConfigGetUserConfigPath; ConfigGetUserDataPath; ConfigHasUnsavedChanges; ConfigListParameters; ConfigListSections; ConfigOpenSection; ConfigRevertChanges; ConfigSaveFile; ConfigSaveSection; ConfigSetDefaultBool; ConfigSetDefaultFloat; ConfigSetDefaultInt; ConfigSetDefaultString; ConfigSetParameter; ConfigSetParameterHelp; CoreAddCheat; CoreAttachPlugin; CoreCheatEnabled; CoreDetachPlugin; CoreDoCommand; CoreErrorMessage; CoreGetAPIVersions; CoreGetRomSettings; CoreOverrideVidExt; CoreShutdown; CoreStartup; DebugBreakpointCommand; DebugBreakpointLookup; DebugDecodeOp; DebugGetCPUDataPtr; DebugGetState; DebugMemGetMemInfo; DebugMemGetPointer; DebugMemGetRecompInfo; DebugMemRead16; DebugMemRead32; DebugMemRead64; DebugMemRead8; DebugMemWrite16; DebugMemWrite32; DebugMemWrite64; DebugMemWrite8; DebugSetCallbacks; DebugSetCoreCompare; DebugSetRunState; DebugStep; PluginGetVersion; VidExt_GL_GetProcAddress; VidExt_GL_SetAttribute; VidExt_GL_GetAttribute; VidExt_GL_SwapBuffers; VidExt_Init; VidExt_ListFullscreenModes; VidExt_Quit; VidExt_SetCaption; VidExt_SetVideoMode; VidExt_ToggleFullScreen; VidExt_ResizeWindow; local: *; }; mupen64plus-core-src-2.5/src/api/callbacks.c000066400000000000000000000053141251723631200207250ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - api/callbacks.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the Core functions for handling callbacks to the * front-end application */ #include #include #include #include "api/m64p_frontend.h" #include "callbacks.h" #include "m64p_types.h" /* local variables */ static ptr_DebugCallback pDebugFunc = NULL; static ptr_StateCallback pStateFunc = NULL; static void * DebugContext = NULL; static void * StateContext = NULL; /* global Functions for use by the Core */ m64p_error SetDebugCallback(ptr_DebugCallback pFunc, void *Context) { pDebugFunc = pFunc; DebugContext = Context; return M64ERR_SUCCESS; } m64p_error SetStateCallback(ptr_StateCallback pFunc, void *Context) { pStateFunc = pFunc; StateContext = Context; return M64ERR_SUCCESS; } void DebugMessage(int level, const char *message, ...) { char msgbuf[256]; va_list args; if (pDebugFunc == NULL) return; va_start(args, message); vsprintf(msgbuf, message, args); (*pDebugFunc)(DebugContext, level, msgbuf); va_end(args); } void StateChanged(m64p_core_param param_type, int new_value) { if (pStateFunc == NULL) return; (*pStateFunc)(StateContext, param_type, new_value); } mupen64plus-core-src-2.5/src/api/callbacks.h000066400000000000000000000042011251723631200207240ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - api/callbacks.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the definitions for callback functions which will be * called from the other Core modules */ #if !defined(API_CALLBACKS_H) #define API_CALLBACKS_H #include "m64p_frontend.h" #include "m64p_types.h" /* Functions for use by the Core, to send information back to the front-end app */ extern m64p_error SetDebugCallback(ptr_DebugCallback pFunc, void *Context); extern m64p_error SetStateCallback(ptr_StateCallback pFunc, void *Context); extern void DebugMessage(int level, const char *message, ...); extern void StateChanged(m64p_core_param param_type, int new_value); #endif /* API_CALLBACKS_H */ mupen64plus-core-src-2.5/src/api/common.c000066400000000000000000000111171251723631200202740ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - api/common.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the Core common functions which will be exported * outside of the core library. */ #include #include #define M64P_CORE_PROTOTYPES 1 #include "../main/version.h" #include "m64p_common.h" #include "m64p_types.h" EXPORT m64p_error CALL PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities) { /* set version info */ if (PluginType != NULL) *PluginType = M64PLUGIN_CORE; if (PluginVersion != NULL) *PluginVersion = MUPEN_CORE_VERSION; if (APIVersion != NULL) *APIVersion = FRONTEND_API_VERSION; if (PluginNamePtr != NULL) *PluginNamePtr = MUPEN_CORE_NAME; if (Capabilities != NULL) { *Capabilities = 0; #if defined(DBG) *Capabilities |= M64CAPS_DEBUGGER; #endif #if defined(DYNAREC) *Capabilities |= M64CAPS_DYNAREC; #endif #if defined(COMPARE_CORE) *Capabilities |= M64CAPS_CORE_COMPARE; #endif } return M64ERR_SUCCESS; } EXPORT m64p_error CALL CoreGetAPIVersions(int *ConfigVersion, int *DebugVersion, int *VidextVersion, int *ExtraVersion) { /* set version info */ if (ConfigVersion != NULL) *ConfigVersion = CONFIG_API_VERSION; if (DebugVersion != NULL) *DebugVersion = DEBUG_API_VERSION; if (VidextVersion != NULL) *VidextVersion = VIDEXT_API_VERSION; if (ExtraVersion != NULL) *ExtraVersion = 0; return M64ERR_SUCCESS; } static const char *ErrorMessages[] = { "SUCCESS: No error", "NOT_INIT: A function was called before it's associated module was initialized", "ALREADY_INIT: Initialization function called twice", "INCOMPATIBLE: API versions between components are incompatible", "INPUT_ASSERT: Invalid function parameters, such as a NULL pointer", "INPUT_INVALID: An input function parameter is logically invalid", "INPUT_NOT_FOUND: The input parameter(s) specified a particular item which was not found", "NO_MEMORY: Memory allocation failed", "FILES: Error opening, creating, reading, or writing to a file", "INTERNAL: logical inconsistency in program code. Probably a bug.", "INVALID_STATE: An operation was requested which is not allowed in the current state", "PLUGIN_FAIL: A plugin function returned a fatal error", "SYSTEM_FAIL: A system function call, such as an SDL or file operation, failed", "UNSUPPORTED: Function call is not supported (ie, core not built with debugger)", "WRONG_TYPE: A given input type parameter cannot be used for desired operation" }; EXPORT const char * CALL CoreErrorMessage(m64p_error ReturnCode) { size_t i = (size_t) ReturnCode; if (i >= (sizeof(ErrorMessages) / sizeof(char *))) return "ERROR: Invalid m64p_error code given to CoreErrorMessage()"; return ErrorMessages[i]; } mupen64plus-core-src-2.5/src/api/config.c000066400000000000000000001337601251723631200202620ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - api/config.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the Core config functions which will be exported * outside of the core library. */ #include #include #include #include #define M64P_CORE_PROTOTYPES 1 #include "callbacks.h" #include "config.h" #include "m64p_config.h" #include "m64p_types.h" #include "main/util.h" #include "osal/files.h" #include "osal/preproc.h" /* local types */ #define MUPEN64PLUS_CFG_NAME "mupen64plus.cfg" #define SECTION_MAGIC 0xDBDC0580 typedef struct _config_var { char *name; m64p_type type; union { int integer; float number; char *string; } val; char *comment; struct _config_var *next; } config_var; typedef struct _config_section { unsigned int magic; char *name; struct _config_var *first_var; struct _config_section *next; } config_section; typedef config_section *config_list; /* local variables */ static int l_ConfigInit = 0; static int l_SaveConfigOnExit = 0; static char *l_DataDirOverride = NULL; static char *l_ConfigDirOverride = NULL; static config_list l_ConfigListActive = NULL; static config_list l_ConfigListSaved = NULL; /* --------------- */ /* local functions */ /* --------------- */ static int is_numeric(const char *string) { char chTemp[16]; float fTemp; int rval = sscanf(string, "%f%8s", &fTemp, chTemp); /* I want to find exactly one matched input item: a number with no garbage on the end */ /* I use sscanf() instead of a custom loop because this routine must handle locales in which the decimal separator is not '.' */ return (rval == 1); } /* This function returns a pointer to the pointer of the requested section * (i.e. a pointer the next field of the previous element, or to the first node). * * If there's no section named 'ParamName', returns the pointer to the next * field of the last element in the list (such that derefencing it is NULL). * * Useful for operations that need to modify the links, e.g. deleting a section. */ static config_section **find_section_link(config_list *list, const char *ParamName) { config_section **curr_sec_link; for (curr_sec_link = list; *curr_sec_link != NULL; curr_sec_link = &(*curr_sec_link)->next) { if (osal_insensitive_strcmp(ParamName, (*curr_sec_link)->name) == 0) break; } return curr_sec_link; } /* This function is similar to the previous function, but instead it returns a * pointer to the pointer to the next section whose name is alphabetically * greater than or equal to 'ParamName'. * * Useful for inserting a section in its alphabetical position. */ static config_section **find_alpha_section_link(config_list *list, const char *ParamName) { config_section **curr_sec_link; for (curr_sec_link = list; *curr_sec_link != NULL; curr_sec_link = &(*curr_sec_link)->next) { if (osal_insensitive_strcmp((*curr_sec_link)->name, ParamName) >= 0) break; } return curr_sec_link; } static config_section *find_section(config_list list, const char *ParamName) { return *find_section_link(&list, ParamName); } static config_var *config_var_create(const char *ParamName, const char *ParamHelp) { config_var *var; if (ParamName == NULL) return NULL; var = (config_var *) malloc(sizeof(config_var)); if (var == NULL) return NULL; memset(var, 0, sizeof(config_var)); var->name = strdup(ParamName); if (var->name == NULL) { free(var); return NULL; } var->type = M64TYPE_INT; var->val.integer = 0; if (ParamHelp != NULL) { var->comment = strdup(ParamHelp); if (var->comment == NULL) { free(var->name); free(var); return NULL; } } else var->comment = NULL; var->next = NULL; return var; } static config_var *find_section_var(config_section *section, const char *ParamName) { /* walk through the linked list of variables in the section */ config_var *curr_var; for (curr_var = section->first_var; curr_var != NULL; curr_var = curr_var->next) { if (osal_insensitive_strcmp(ParamName, curr_var->name) == 0) return curr_var; } /* couldn't find this configuration parameter */ return NULL; } static void append_var_to_section(config_section *section, config_var *var) { config_var *last_var; if (section == NULL || var == NULL || section->magic != SECTION_MAGIC) return; if (section->first_var == NULL) { section->first_var = var; return; } last_var = section->first_var; while (last_var->next != NULL) last_var = last_var->next; last_var->next = var; } static void delete_var(config_var *var) { if (var->type == M64TYPE_STRING) free(var->val.string); free(var->name); free(var->comment); free(var); } static void delete_section(config_section *pSection) { config_var *curr_var; if (pSection == NULL) return; curr_var = pSection->first_var; while (curr_var != NULL) { config_var *next_var = curr_var->next; delete_var(curr_var); curr_var = next_var; } free(pSection->name); free(pSection); } static void delete_list(config_list *pConfigList) { config_section *curr_section = *pConfigList; while (curr_section != NULL) { config_section *next_section = curr_section->next; /* delete the section itself */ delete_section(curr_section); curr_section = next_section; } *pConfigList = NULL; } static config_section *config_section_create(const char *ParamName) { config_section *sec; if (ParamName == NULL) return NULL; sec = (config_section *) malloc(sizeof(config_section)); if (sec == NULL) return NULL; sec->magic = SECTION_MAGIC; sec->name = strdup(ParamName); if (sec->name == NULL) { free(sec); return NULL; } sec->first_var = NULL; sec->next = NULL; return sec; } static config_section * section_deepcopy(config_section *orig_section) { config_section *new_section; config_var *orig_var, *last_new_var; /* Input validation */ if (orig_section == NULL) return NULL; /* create and copy section struct */ new_section = config_section_create(orig_section->name); if (new_section == NULL) return NULL; /* create and copy all section variables */ orig_var = orig_section->first_var; last_new_var = NULL; while (orig_var != NULL) { config_var *new_var = config_var_create(orig_var->name, orig_var->comment); if (new_var == NULL) { delete_section(new_section); return NULL; } new_var->type = orig_var->type; switch (orig_var->type) { case M64TYPE_INT: case M64TYPE_BOOL: new_var->val.integer = orig_var->val.integer; break; case M64TYPE_FLOAT: new_var->val.number = orig_var->val.number; break; case M64TYPE_STRING: if (orig_var->val.string != NULL) { new_var->val.string = strdup(orig_var->val.string); if (new_var->val.string == NULL) { delete_section(new_section); delete_var(new_var); return NULL; } } else new_var->val.string = NULL; break; } /* add the new variable to the new section */ if (last_new_var == NULL) new_section->first_var = new_var; else last_new_var->next = new_var; last_new_var = new_var; /* advance variable pointer in original section variable list */ orig_var = orig_var->next; } return new_section; } static void copy_configlist_active_to_saved(void) { config_section *curr_section = l_ConfigListActive; config_section *last_section = NULL; /* delete any pre-existing Saved config list */ delete_list(&l_ConfigListSaved); /* duplicate all of the config sections in the Active list, adding them to the Saved list */ while (curr_section != NULL) { config_section *new_section = section_deepcopy(curr_section); if (new_section == NULL) break; if (last_section == NULL) l_ConfigListSaved = new_section; else last_section->next = new_section; last_section = new_section; curr_section = curr_section->next; } } static m64p_error write_configlist_file(void) { config_section *curr_section; const char *configpath; char *filepath; FILE *fPtr; /* get the full pathname to the config file and try to open it */ configpath = ConfigGetUserConfigPath(); if (configpath == NULL) return M64ERR_FILES; filepath = combinepath(configpath, MUPEN64PLUS_CFG_NAME); if (filepath == NULL) return M64ERR_NO_MEMORY; fPtr = fopen(filepath, "wb"); if (fPtr == NULL) { DebugMessage(M64MSG_ERROR, "Couldn't open configuration file '%s' for writing.", filepath); free(filepath); return M64ERR_FILES; } free(filepath); /* write out header */ fprintf(fPtr, "# Mupen64Plus Configuration File\n"); fprintf(fPtr, "# This file is automatically read and written by the Mupen64Plus Core library\n"); /* write out all of the config parameters from the Saved list */ curr_section = l_ConfigListSaved; while (curr_section != NULL) { config_var *curr_var = curr_section->first_var; fprintf(fPtr, "\n[%s]\n\n", curr_section->name); while (curr_var != NULL) { if (curr_var->comment != NULL && strlen(curr_var->comment) > 0) fprintf(fPtr, "# %s\n", curr_var->comment); if (curr_var->type == M64TYPE_INT) fprintf(fPtr, "%s = %i\n", curr_var->name, curr_var->val.integer); else if (curr_var->type == M64TYPE_FLOAT) fprintf(fPtr, "%s = %f\n", curr_var->name, curr_var->val.number); else if (curr_var->type == M64TYPE_BOOL && curr_var->val.integer) fprintf(fPtr, "%s = True\n", curr_var->name); else if (curr_var->type == M64TYPE_BOOL && !curr_var->val.integer) fprintf(fPtr, "%s = False\n", curr_var->name); else if (curr_var->type == M64TYPE_STRING && curr_var->val.string != NULL) fprintf(fPtr, "%s = \"%s\"\n", curr_var->name, curr_var->val.string); curr_var = curr_var->next; } fprintf(fPtr, "\n"); curr_section = curr_section->next; } fclose(fPtr); return M64ERR_SUCCESS; } /* ----------------------------------------------------------- */ /* these functions are only to be used within the Core library */ /* ----------------------------------------------------------- */ m64p_error ConfigInit(const char *ConfigDirOverride, const char *DataDirOverride) { m64p_error rval; const char *configpath = NULL; char *filepath; long ftell_result; size_t filelen; FILE *fPtr; char *configtext; config_section *current_section = NULL; char *line, *end, *lastcomment; if (l_ConfigInit) return M64ERR_ALREADY_INIT; l_ConfigInit = 1; /* if a data directory was specified, make a copy of it */ if (DataDirOverride != NULL) { l_DataDirOverride = strdup(DataDirOverride); if (l_DataDirOverride == NULL) return M64ERR_NO_MEMORY; } /* if a config directory was specified, make a copy of it */ if (ConfigDirOverride != NULL) { l_ConfigDirOverride = strdup(ConfigDirOverride); if (l_ConfigDirOverride == NULL) return M64ERR_NO_MEMORY; } /* get the full pathname to the config file and try to open it */ configpath = ConfigGetUserConfigPath(); if (configpath == NULL) return M64ERR_FILES; filepath = combinepath(configpath, MUPEN64PLUS_CFG_NAME); if (filepath == NULL) return M64ERR_NO_MEMORY; fPtr = fopen(filepath, "rb"); if (fPtr == NULL) { DebugMessage(M64MSG_INFO, "Couldn't open configuration file '%s'. Using defaults.", filepath); free(filepath); l_SaveConfigOnExit = 1; /* auto-save the config file so that the defaults will be saved to disk */ return M64ERR_SUCCESS; } free(filepath); /* read the entire config file */ if (fseek(fPtr, 0L, SEEK_END) != 0) { fclose(fPtr); return M64ERR_FILES; } ftell_result = ftell(fPtr); if (ftell_result == -1) { fclose(fPtr); return M64ERR_FILES; } filelen = (size_t)ftell_result; if (fseek(fPtr, 0L, SEEK_SET) != 0) { fclose(fPtr); return M64ERR_FILES; } configtext = (char *) malloc(filelen + 1); if (configtext == NULL) { fclose(fPtr); return M64ERR_NO_MEMORY; } if (fread(configtext, 1, filelen, fPtr) != filelen) { free(configtext); fclose(fPtr); return M64ERR_FILES; } fclose(fPtr); /* parse the file data */ current_section = NULL; line = configtext; end = configtext + filelen; lastcomment = NULL; *end = 0; while (line < end) { ini_line l = ini_parse_line(&line); switch (l.type) { case INI_COMMENT: lastcomment = l.value; break; case INI_SECTION: rval = ConfigOpenSection(l.name, (m64p_handle *) ¤t_section); if (rval != M64ERR_SUCCESS) { free(configtext); return rval; } lastcomment = NULL; break; case INI_PROPERTY: if (l.value[0] == '"' && l.value[strlen(l.value)-1] == '"') { l.value++; l.value[strlen(l.value)-1] = 0; ConfigSetDefaultString((m64p_handle) current_section, l.name, l.value, lastcomment); } else if (osal_insensitive_strcmp(l.value, "false") == 0) { ConfigSetDefaultBool((m64p_handle) current_section, l.name, 0, lastcomment); } else if (osal_insensitive_strcmp(l.value, "true") == 0) { ConfigSetDefaultBool((m64p_handle) current_section, l.name, 1, lastcomment); } else if (is_numeric(l.value)) { int val_int = (int) strtol(l.value, NULL, 10); float val_float = (float) strtod(l.value, NULL); if ((val_float - val_int) != 0.0) ConfigSetDefaultFloat((m64p_handle) current_section, l.name, val_float, lastcomment); else ConfigSetDefaultInt((m64p_handle) current_section, l.name, val_int, lastcomment); } else { /* assume that it's a string */ ConfigSetDefaultString((m64p_handle) current_section, l.name, l.value, lastcomment); } lastcomment = NULL; break; default: break; } } /* release memory used for config file text */ free(configtext); /* duplicate the entire config data list, to store a copy of the list which represents the state of the file on disk */ copy_configlist_active_to_saved(); return M64ERR_SUCCESS; } m64p_error ConfigShutdown(void) { /* first, save the file if necessary */ if (l_SaveConfigOnExit) ConfigSaveFile(); /* reset the initialized flag */ if (!l_ConfigInit) return M64ERR_NOT_INIT; l_ConfigInit = 0; /* free any malloc'd local variables */ if (l_DataDirOverride != NULL) { free(l_DataDirOverride); l_DataDirOverride = NULL; } if (l_ConfigDirOverride != NULL) { free(l_ConfigDirOverride); l_ConfigDirOverride = NULL; } /* free all of the memory in the 2 lists */ delete_list(&l_ConfigListActive); delete_list(&l_ConfigListSaved); return M64ERR_SUCCESS; } /* ------------------------------------------------ */ /* Selector functions, exported outside of the Core */ /* ------------------------------------------------ */ EXPORT m64p_error CALL ConfigListSections(void *context, void (*SectionListCallback)(void * context, const char * SectionName)) { config_section *curr_section; if (!l_ConfigInit) return M64ERR_NOT_INIT; if (SectionListCallback == NULL) return M64ERR_INPUT_ASSERT; /* just walk through the section list, making a callback for each section name */ curr_section = l_ConfigListActive; while (curr_section != NULL) { (*SectionListCallback)(context, curr_section->name); curr_section = curr_section->next; } return M64ERR_SUCCESS; } EXPORT m64p_error CALL ConfigOpenSection(const char *SectionName, m64p_handle *ConfigSectionHandle) { config_section **curr_section; config_section *new_section; if (!l_ConfigInit) return M64ERR_NOT_INIT; if (SectionName == NULL || ConfigSectionHandle == NULL) return M64ERR_INPUT_ASSERT; /* walk through the section list, looking for a case-insensitive name match */ curr_section = find_alpha_section_link(&l_ConfigListActive, SectionName); if (*curr_section != NULL && osal_insensitive_strcmp(SectionName, (*curr_section)->name) == 0) { *ConfigSectionHandle = *curr_section; return M64ERR_SUCCESS; } /* didn't find the section, so create new one */ new_section = config_section_create(SectionName); if (new_section == NULL) return M64ERR_NO_MEMORY; /* add section to list in alphabetical order */ new_section->next = *curr_section; *curr_section = new_section; *ConfigSectionHandle = new_section; return M64ERR_SUCCESS; } EXPORT m64p_error CALL ConfigListParameters(m64p_handle ConfigSectionHandle, void *context, void (*ParameterListCallback)(void * context, const char *ParamName, m64p_type ParamType)) { config_section *section; config_var *curr_var; if (!l_ConfigInit) return M64ERR_NOT_INIT; if (ConfigSectionHandle == NULL || ParameterListCallback == NULL) return M64ERR_INPUT_ASSERT; section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) return M64ERR_INPUT_INVALID; /* walk through this section's parameter list, making a callback for each parameter */ curr_var = section->first_var; while (curr_var != NULL) { (*ParameterListCallback)(context, curr_var->name, curr_var->type); curr_var = curr_var->next; } return M64ERR_SUCCESS; } EXPORT int CALL ConfigHasUnsavedChanges(const char *SectionName) { config_section *input_section, *curr_section; config_var *active_var, *saved_var; /* check input conditions */ if (!l_ConfigInit) { DebugMessage(M64MSG_ERROR, "ConfigHasUnsavedChanges(): Core config not initialized!"); return 0; } /* if SectionName is NULL or blank, then check all sections */ if (SectionName == NULL || strlen(SectionName) < 1) { int iNumActiveSections = 0, iNumSavedSections = 0; /* first, search through all sections in Active list. Recursively call ourself and return 1 if changed */ curr_section = l_ConfigListActive; while (curr_section != NULL) { if (ConfigHasUnsavedChanges(curr_section->name)) return 1; curr_section = curr_section->next; iNumActiveSections++; } /* Next, count the number of Saved sections and see if the count matches */ curr_section = l_ConfigListSaved; while (curr_section != NULL) { curr_section = curr_section->next; iNumSavedSections++; } if (iNumActiveSections == iNumSavedSections) return 0; /* no changes */ else return 1; } /* walk through the Active section list, looking for a case-insensitive name match with input string */ input_section = find_section(l_ConfigListActive, SectionName); if (input_section == NULL) { DebugMessage(M64MSG_ERROR, "ConfigHasUnsavedChanges(): section name '%s' not found!", SectionName); return 0; } /* walk through the Saved section list, looking for a case-insensitive name match */ curr_section = find_section(l_ConfigListSaved, SectionName); if (curr_section == NULL) { /* if this section isn't present in saved list, then it has been newly created */ return 1; } /* compare all of the variables in the two sections. They are expected to be in the same order */ active_var = input_section->first_var; saved_var = curr_section->first_var; while (active_var != NULL && saved_var != NULL) { if (strcmp(active_var->name, saved_var->name) != 0) return 1; if (active_var->type != saved_var->type) return 1; switch(active_var->type) { case M64TYPE_INT: if (active_var->val.integer != saved_var->val.integer) return 1; break; case M64TYPE_FLOAT: if (active_var->val.number != saved_var->val.number) return 1; break; case M64TYPE_BOOL: if ((active_var->val.integer != 0) != (saved_var->val.integer != 0)) return 1; break; case M64TYPE_STRING: if (active_var->val.string == NULL) { DebugMessage(M64MSG_ERROR, "ConfigHasUnsavedChanges(): Variable '%s' NULL Active string pointer!", active_var->name); return 1; } if (saved_var->val.string == NULL) { DebugMessage(M64MSG_ERROR, "ConfigHasUnsavedChanges(): Variable '%s' NULL Saved string pointer!", active_var->name); return 1; } if (strcmp(active_var->val.string, saved_var->val.string) != 0) return 1; break; default: DebugMessage(M64MSG_ERROR, "ConfigHasUnsavedChanges(): Invalid variable '%s' type %i!", active_var->name, active_var->type); return 1; } if (active_var->comment != NULL && saved_var->comment != NULL && strcmp(active_var->comment, saved_var->comment) != 0) return 1; active_var = active_var->next; saved_var = saved_var->next; } /* any extra new variables on the end, or deleted variables? */ if (active_var != NULL || saved_var != NULL) return 1; /* exactly the same */ return 0; } /* ------------------------------------------------------- */ /* Modifier functions, exported outside of the Core */ /* ------------------------------------------------------- */ EXPORT m64p_error CALL ConfigDeleteSection(const char *SectionName) { config_section **curr_section_link; config_section *next_section; if (!l_ConfigInit) return M64ERR_NOT_INIT; if (l_ConfigListActive == NULL) return M64ERR_INPUT_NOT_FOUND; /* find the named section and pull it out of the list */ curr_section_link = find_section_link(&l_ConfigListActive, SectionName); if (*curr_section_link == NULL) return M64ERR_INPUT_NOT_FOUND; next_section = (*curr_section_link)->next; /* delete the named section */ delete_section(*curr_section_link); /* fix the pointer to point to the next section after the deleted one */ *curr_section_link = next_section; return M64ERR_SUCCESS; } EXPORT m64p_error CALL ConfigSaveFile(void) { if (!l_ConfigInit) return M64ERR_NOT_INIT; /* copy the active config list to the saved config list */ copy_configlist_active_to_saved(); /* write the saved config list out to a file */ return (write_configlist_file()); } EXPORT m64p_error CALL ConfigSaveSection(const char *SectionName) { config_section *curr_section, *new_section; config_section **insertion_point; if (!l_ConfigInit) return M64ERR_NOT_INIT; if (SectionName == NULL || strlen(SectionName) < 1) return M64ERR_INPUT_ASSERT; /* walk through the Active section list, looking for a case-insensitive name match */ curr_section = find_section(l_ConfigListActive, SectionName); if (curr_section == NULL) return M64ERR_INPUT_NOT_FOUND; /* duplicate this section */ new_section = section_deepcopy(curr_section); if (new_section == NULL) return M64ERR_NO_MEMORY; /* update config section that's in the Saved list with the new one */ insertion_point = find_alpha_section_link(&l_ConfigListSaved, SectionName); if (*insertion_point != NULL && osal_insensitive_strcmp((*insertion_point)->name, SectionName) == 0) { /* the section exists in the saved list and will be replaced */ new_section->next = (*insertion_point)->next; delete_section(*insertion_point); *insertion_point = new_section; } else { /* the section didn't exist in the saved list and has to be inserted */ new_section->next = *insertion_point; *insertion_point = new_section; } /* write the saved config list out to a file */ return (write_configlist_file()); } EXPORT m64p_error CALL ConfigRevertChanges(const char *SectionName) { config_section **active_section_link, *active_section, *saved_section, *new_section; /* check input conditions */ if (!l_ConfigInit) return M64ERR_NOT_INIT; if (SectionName == NULL) return M64ERR_INPUT_ASSERT; /* walk through the Active section list, looking for a case-insensitive name match with input string */ active_section_link = find_section_link(&l_ConfigListActive, SectionName); active_section = *active_section_link; if (active_section == NULL) return M64ERR_INPUT_NOT_FOUND; /* walk through the Saved section list, looking for a case-insensitive name match */ saved_section = find_section(l_ConfigListSaved, SectionName); if (saved_section == NULL) { /* if this section isn't present in saved list, then it has been newly created */ return M64ERR_INPUT_NOT_FOUND; } /* copy the section as it is on the disk */ new_section = section_deepcopy(saved_section); if (new_section == NULL) return M64ERR_NO_MEMORY; /* replace active_section with saved_section in the linked list */ *active_section_link = new_section; new_section->next = active_section->next; /* release memory associated with active_section */ delete_section(active_section); return M64ERR_SUCCESS; } /* ------------------------------------------------------- */ /* Generic Get/Set functions, exported outside of the Core */ /* ------------------------------------------------------- */ EXPORT m64p_error CALL ConfigSetParameter(m64p_handle ConfigSectionHandle, const char *ParamName, m64p_type ParamType, const void *ParamValue) { config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit) return M64ERR_NOT_INIT; if (ConfigSectionHandle == NULL || ParamName == NULL || ParamValue == NULL || (int) ParamType < 1 || (int) ParamType > 4) return M64ERR_INPUT_ASSERT; section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) return M64ERR_INPUT_INVALID; /* if this parameter doesn't already exist, then create it and add it to the section */ var = find_section_var(section, ParamName); if (var == NULL) { var = config_var_create(ParamName, NULL); if (var == NULL) return M64ERR_NO_MEMORY; append_var_to_section(section, var); } /* cleanup old values */ switch (var->type) { case M64TYPE_STRING: free(var->val.string); break; default: break; } /* set this parameter's value */ var->type = ParamType; switch(ParamType) { case M64TYPE_INT: var->val.integer = *((int *) ParamValue); break; case M64TYPE_FLOAT: var->val.number = *((float *) ParamValue); break; case M64TYPE_BOOL: var->val.integer = (*((int *) ParamValue) != 0); break; case M64TYPE_STRING: var->val.string = strdup((char *)ParamValue); if (var->val.string == NULL) return M64ERR_NO_MEMORY; break; default: /* this is logically impossible because of the ParamType check at the top of this function */ break; } return M64ERR_SUCCESS; } EXPORT m64p_error CALL ConfigSetParameterHelp(m64p_handle ConfigSectionHandle, const char *ParamName, const char *ParamHelp) { config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit) return M64ERR_NOT_INIT; if (ConfigSectionHandle == NULL || ParamName == NULL || ParamHelp == NULL) return M64ERR_INPUT_ASSERT; section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) return M64ERR_INPUT_INVALID; /* if this parameter doesn't already exist, return an error */ var = find_section_var(section, ParamName); if (var == NULL) return M64ERR_INPUT_NOT_FOUND; if (var->comment != NULL) free(var->comment); var->comment = strdup(ParamHelp); return M64ERR_SUCCESS; } EXPORT m64p_error CALL ConfigGetParameter(m64p_handle ConfigSectionHandle, const char *ParamName, m64p_type ParamType, void *ParamValue, int MaxSize) { config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit) return M64ERR_NOT_INIT; if (ConfigSectionHandle == NULL || ParamName == NULL || ParamValue == NULL || (int) ParamType < 1 || (int) ParamType > 4) return M64ERR_INPUT_ASSERT; section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) return M64ERR_INPUT_INVALID; /* if this parameter doesn't already exist, return an error */ var = find_section_var(section, ParamName); if (var == NULL) return M64ERR_INPUT_NOT_FOUND; /* call the specific Get function to translate the parameter to the desired type */ switch(ParamType) { case M64TYPE_INT: if (MaxSize < sizeof(int)) return M64ERR_INPUT_INVALID; if (var->type != M64TYPE_INT && var->type != M64TYPE_FLOAT) return M64ERR_WRONG_TYPE; *((int *) ParamValue) = ConfigGetParamInt(ConfigSectionHandle, ParamName); break; case M64TYPE_FLOAT: if (MaxSize < sizeof(float)) return M64ERR_INPUT_INVALID; if (var->type != M64TYPE_INT && var->type != M64TYPE_FLOAT) return M64ERR_WRONG_TYPE; *((float *) ParamValue) = ConfigGetParamFloat(ConfigSectionHandle, ParamName); break; case M64TYPE_BOOL: if (MaxSize < sizeof(int)) return M64ERR_INPUT_INVALID; if (var->type != M64TYPE_BOOL && var->type != M64TYPE_INT) return M64ERR_WRONG_TYPE; *((int *) ParamValue) = ConfigGetParamBool(ConfigSectionHandle, ParamName); break; case M64TYPE_STRING: { const char *string; if (MaxSize < 1) return M64ERR_INPUT_INVALID; if (var->type != M64TYPE_STRING && var->type != M64TYPE_BOOL) return M64ERR_WRONG_TYPE; string = ConfigGetParamString(ConfigSectionHandle, ParamName); strncpy((char *) ParamValue, string, MaxSize); *((char *) ParamValue + MaxSize - 1) = 0; break; } default: /* this is logically impossible because of the ParamType check at the top of this function */ break; } return M64ERR_SUCCESS; } EXPORT m64p_error CALL ConfigGetParameterType(m64p_handle ConfigSectionHandle, const char *ParamName, m64p_type *ParamType) { config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit) return M64ERR_NOT_INIT; if (ConfigSectionHandle == NULL || ParamName == NULL || ParamType == NULL) return M64ERR_INPUT_ASSERT; section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) return M64ERR_INPUT_INVALID; /* if this parameter doesn't already exist, return an error */ var = find_section_var(section, ParamName); if (var == NULL) return M64ERR_INPUT_NOT_FOUND; *ParamType = var->type; return M64ERR_SUCCESS; } EXPORT const char * CALL ConfigGetParameterHelp(m64p_handle ConfigSectionHandle, const char *ParamName) { config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit || ConfigSectionHandle == NULL || ParamName == NULL) return NULL; section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) return NULL; /* if this parameter doesn't exist, return an error */ var = find_section_var(section, ParamName); if (var == NULL) return NULL; return var->comment; } /* ------------------------------------------------------- */ /* Special Get/Set functions, exported outside of the Core */ /* ------------------------------------------------------- */ EXPORT m64p_error CALL ConfigSetDefaultInt(m64p_handle ConfigSectionHandle, const char *ParamName, int ParamValue, const char *ParamHelp) { config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit) return M64ERR_NOT_INIT; if (ConfigSectionHandle == NULL || ParamName == NULL) return M64ERR_INPUT_ASSERT; section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) return M64ERR_INPUT_INVALID; /* if this parameter already exists, then just return successfully */ var = find_section_var(section, ParamName); if (var != NULL) return M64ERR_SUCCESS; /* otherwise create a new config_var object and add it to this section */ var = config_var_create(ParamName, ParamHelp); if (var == NULL) return M64ERR_NO_MEMORY; var->type = M64TYPE_INT; var->val.integer = ParamValue; append_var_to_section(section, var); return M64ERR_SUCCESS; } EXPORT m64p_error CALL ConfigSetDefaultFloat(m64p_handle ConfigSectionHandle, const char *ParamName, float ParamValue, const char *ParamHelp) { config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit) return M64ERR_NOT_INIT; if (ConfigSectionHandle == NULL || ParamName == NULL) return M64ERR_INPUT_ASSERT; section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) return M64ERR_INPUT_INVALID; /* if this parameter already exists, then just return successfully */ var = find_section_var(section, ParamName); if (var != NULL) return M64ERR_SUCCESS; /* otherwise create a new config_var object and add it to this section */ var = config_var_create(ParamName, ParamHelp); if (var == NULL) return M64ERR_NO_MEMORY; var->type = M64TYPE_FLOAT; var->val.number = ParamValue; append_var_to_section(section, var); return M64ERR_SUCCESS; } EXPORT m64p_error CALL ConfigSetDefaultBool(m64p_handle ConfigSectionHandle, const char *ParamName, int ParamValue, const char *ParamHelp) { config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit) return M64ERR_NOT_INIT; if (ConfigSectionHandle == NULL || ParamName == NULL) return M64ERR_INPUT_ASSERT; section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) return M64ERR_INPUT_INVALID; /* if this parameter already exists, then just return successfully */ var = find_section_var(section, ParamName); if (var != NULL) return M64ERR_SUCCESS; /* otherwise create a new config_var object and add it to this section */ var = config_var_create(ParamName, ParamHelp); if (var == NULL) return M64ERR_NO_MEMORY; var->type = M64TYPE_BOOL; var->val.integer = ParamValue ? 1 : 0; append_var_to_section(section, var); return M64ERR_SUCCESS; } EXPORT m64p_error CALL ConfigSetDefaultString(m64p_handle ConfigSectionHandle, const char *ParamName, const char * ParamValue, const char *ParamHelp) { config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit) return M64ERR_NOT_INIT; if (ConfigSectionHandle == NULL || ParamName == NULL || ParamValue == NULL) return M64ERR_INPUT_ASSERT; section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) return M64ERR_INPUT_INVALID; /* if this parameter already exists, then just return successfully */ var = find_section_var(section, ParamName); if (var != NULL) return M64ERR_SUCCESS; /* otherwise create a new config_var object and add it to this section */ var = config_var_create(ParamName, ParamHelp); if (var == NULL) return M64ERR_NO_MEMORY; var->type = M64TYPE_STRING; var->val.string = strdup(ParamValue); if (var->val.string == NULL) { delete_var(var); return M64ERR_NO_MEMORY; } append_var_to_section(section, var); return M64ERR_SUCCESS; } EXPORT int CALL ConfigGetParamInt(m64p_handle ConfigSectionHandle, const char *ParamName) { config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit || ConfigSectionHandle == NULL || ParamName == NULL) { DebugMessage(M64MSG_ERROR, "ConfigGetParamInt(): Input assertion!"); return 0; } section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) { DebugMessage(M64MSG_ERROR, "ConfigGetParamInt(): ConfigSectionHandle invalid!"); return 0; } /* if this parameter doesn't already exist, return an error */ var = find_section_var(section, ParamName); if (var == NULL) { DebugMessage(M64MSG_ERROR, "ConfigGetParamInt(): Parameter '%s' not found!", ParamName); return 0; } /* translate the actual variable type to an int */ switch(var->type) { case M64TYPE_INT: return var->val.integer; case M64TYPE_FLOAT: return (int) var->val.number; case M64TYPE_BOOL: return (var->val.integer != 0); case M64TYPE_STRING: return atoi(var->val.string); default: DebugMessage(M64MSG_ERROR, "ConfigGetParamInt(): invalid internal parameter type for '%s'", ParamName); return 0; } } EXPORT float CALL ConfigGetParamFloat(m64p_handle ConfigSectionHandle, const char *ParamName) { config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit || ConfigSectionHandle == NULL || ParamName == NULL) { DebugMessage(M64MSG_ERROR, "ConfigGetParamFloat(): Input assertion!"); return 0.0; } section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) { DebugMessage(M64MSG_ERROR, "ConfigGetParamFloat(): ConfigSectionHandle invalid!"); return 0.0; } /* if this parameter doesn't already exist, return an error */ var = find_section_var(section, ParamName); if (var == NULL) { DebugMessage(M64MSG_ERROR, "ConfigGetParamFloat(): Parameter '%s' not found!", ParamName); return 0.0; } /* translate the actual variable type to an int */ switch(var->type) { case M64TYPE_INT: return (float) var->val.integer; case M64TYPE_FLOAT: return var->val.number; case M64TYPE_BOOL: return (var->val.integer != 0) ? 1.0f : 0.0f; case M64TYPE_STRING: return (float) atof(var->val.string); default: DebugMessage(M64MSG_ERROR, "ConfigGetParamFloat(): invalid internal parameter type for '%s'", ParamName); return 0.0; } } EXPORT int CALL ConfigGetParamBool(m64p_handle ConfigSectionHandle, const char *ParamName) { config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit || ConfigSectionHandle == NULL || ParamName == NULL) { DebugMessage(M64MSG_ERROR, "ConfigGetParamBool(): Input assertion!"); return 0; } section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) { DebugMessage(M64MSG_ERROR, "ConfigGetParamBool(): ConfigSectionHandle invalid!"); return 0; } /* if this parameter doesn't already exist, return an error */ var = find_section_var(section, ParamName); if (var == NULL) { DebugMessage(M64MSG_ERROR, "ConfigGetParamBool(): Parameter '%s' not found!", ParamName); return 0; } /* translate the actual variable type to an int */ switch(var->type) { case M64TYPE_INT: return (var->val.integer != 0); case M64TYPE_FLOAT: return (var->val.number != 0.0); case M64TYPE_BOOL: return var->val.integer; case M64TYPE_STRING: return (osal_insensitive_strcmp(var->val.string, "true") == 0); default: DebugMessage(M64MSG_ERROR, "ConfigGetParamBool(): invalid internal parameter type for '%s'", ParamName); return 0; } } EXPORT const char * CALL ConfigGetParamString(m64p_handle ConfigSectionHandle, const char *ParamName) { static char outstr[64]; /* warning: not thread safe */ config_section *section; config_var *var; /* check input conditions */ if (!l_ConfigInit || ConfigSectionHandle == NULL || ParamName == NULL) { DebugMessage(M64MSG_ERROR, "ConfigGetParamString(): Input assertion!"); return ""; } section = (config_section *) ConfigSectionHandle; if (section->magic != SECTION_MAGIC) { DebugMessage(M64MSG_ERROR, "ConfigGetParamString(): ConfigSectionHandle invalid!"); return ""; } /* if this parameter doesn't already exist, return an error */ var = find_section_var(section, ParamName); if (var == NULL) { DebugMessage(M64MSG_ERROR, "ConfigGetParamString(): Parameter '%s' not found!", ParamName); return ""; } /* translate the actual variable type to an int */ switch(var->type) { case M64TYPE_INT: snprintf(outstr, 63, "%i", var->val.integer); outstr[63] = 0; return outstr; case M64TYPE_FLOAT: snprintf(outstr, 63, "%f", var->val.number); outstr[63] = 0; return outstr; case M64TYPE_BOOL: return (var->val.integer ? "True" : "False"); case M64TYPE_STRING: return var->val.string; default: DebugMessage(M64MSG_ERROR, "ConfigGetParamString(): invalid internal parameter type for '%s'", ParamName); return ""; } } /* ------------------------------------------------------ */ /* OS Abstraction functions, exported outside of the Core */ /* ------------------------------------------------------ */ EXPORT const char * CALL ConfigGetSharedDataFilepath(const char *filename) { const char *configsharepath = NULL; m64p_handle CoreHandle = NULL; /* check input parameter */ if (filename == NULL) return NULL; /* try to get the SharedDataPath string variable in the Core configuration section */ if (ConfigOpenSection("Core", &CoreHandle) == M64ERR_SUCCESS) { configsharepath = ConfigGetParamString(CoreHandle, "SharedDataPath"); } return osal_get_shared_filepath(filename, l_DataDirOverride, configsharepath); } EXPORT const char * CALL ConfigGetUserConfigPath(void) { if (l_ConfigDirOverride != NULL) { osal_mkdirp(l_ConfigDirOverride, 0700); return l_ConfigDirOverride; } else return osal_get_user_configpath(); } EXPORT const char * CALL ConfigGetUserDataPath(void) { return osal_get_user_datapath(); } EXPORT const char * CALL ConfigGetUserCachePath(void) { return osal_get_user_cachepath(); } mupen64plus-core-src-2.5/src/api/config.h000066400000000000000000000034521251723631200202610ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - api/config.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the Core configuration functions */ #include "m64p_types.h" /* these functions are only to be used within the Core library */ m64p_error ConfigInit(const char *ConfigDirOverride, const char *DataDirOverride); m64p_error ConfigShutdown(void); mupen64plus-core-src-2.5/src/api/debugger.c000066400000000000000000000301401251723631200205650ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - api/debugger.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the Core debugger functions which will be exported * outside of the core library. */ #include #define M64P_CORE_PROTOTYPES 1 #include "ai/ai_controller.h" #include "callbacks.h" #include "debugger.h" #include "debugger/dbg_breakpoints.h" #include "debugger/dbg_debugger.h" #include "debugger/dbg_decoder.h" #include "debugger/dbg_memory.h" #include "debugger/dbg_types.h" #include "m64p_debugger.h" #include "m64p_types.h" #include "main/main.h" #include "memory/memory.h" #include "pi/pi_controller.h" #include "r4300/r4300_core.h" #include "ri/ri_controller.h" #include "si/si_controller.h" #include "vi/vi_controller.h" unsigned int op; /* local variables */ static void (*callback_ui_init)(void) = NULL; static void (*callback_ui_update)(unsigned int) = NULL; static void (*callback_ui_vi)(void) = NULL; static void (*callback_core_compare)(unsigned int) = NULL; static void (*callback_core_data_sync)(int, void *) = NULL; /* global Functions for use by the Core */ void DebuggerCallback(eDbgCallbackType type, unsigned int param) { if (type == DEBUG_UI_INIT) { if (callback_ui_init != NULL) (*callback_ui_init)(); } else if (type == DEBUG_UI_UPDATE) { if (callback_ui_update != NULL) (*callback_ui_update)(param); } else if (type == DEBUG_UI_VI) { if (callback_ui_vi != NULL) (*callback_ui_vi)(); } } void CoreCompareCallback(void) { if (callback_core_compare != NULL) (*callback_core_compare)(op); } void CoreCompareDataSync(int length, void *ptr) { if (callback_core_data_sync != NULL) (*callback_core_data_sync)(length, ptr); } /* exported functions for use by the front-end User Interface */ EXPORT m64p_error CALL DebugSetCoreCompare(void (*dbg_core_compare)(unsigned int), void (*dbg_core_data_sync)(int, void *)) { callback_core_compare = dbg_core_compare; callback_core_data_sync = dbg_core_data_sync; return M64ERR_SUCCESS; } EXPORT m64p_error CALL DebugSetCallbacks(void (*dbg_frontend_init)(void), void (*dbg_frontend_update)(unsigned int pc), void (*dbg_frontend_vi)(void)) { #ifdef DBG callback_ui_init = dbg_frontend_init; callback_ui_update = dbg_frontend_update; callback_ui_vi = dbg_frontend_vi; return M64ERR_SUCCESS; #else return M64ERR_UNSUPPORTED; #endif } EXPORT m64p_error CALL DebugSetRunState(m64p_dbg_runstate runstate) { #ifdef DBG g_dbg_runstate = runstate; /* in debugger/debugger.c */ return M64ERR_SUCCESS; #else return M64ERR_UNSUPPORTED; #endif } EXPORT int CALL DebugGetState(m64p_dbg_state statenum) { #ifdef DBG switch (statenum) { case M64P_DBG_RUN_STATE: return g_dbg_runstate; case M64P_DBG_PREVIOUS_PC: return previousPC; case M64P_DBG_NUM_BREAKPOINTS: return g_NumBreakpoints; case M64P_DBG_CPU_DYNACORE: return get_r4300_emumode(); case M64P_DBG_CPU_NEXT_INTERRUPT: return *r4300_next_interrupt(); default: DebugMessage(M64MSG_WARNING, "Bug: invalid m64p_dbg_state input in DebugGetState()"); return 0; } return 0; #else DebugMessage(M64MSG_ERROR, "Bug: DebugGetState() called, but Debugger not supported in Core library"); return 0; #endif } EXPORT m64p_error CALL DebugStep(void) { #ifdef DBG if (!g_DebuggerActive) return M64ERR_INVALID_STATE; debugger_step(); /* in debugger/debugger.c */ return M64ERR_SUCCESS; #else return M64ERR_UNSUPPORTED; #endif } EXPORT void CALL DebugDecodeOp(unsigned int instruction, char *op, char *args, int pc) { #ifdef DBG r4300_decode_op(instruction, op, args, pc); #else DebugMessage(M64MSG_ERROR, "Bug: DebugDecodeOp() called, but Debugger not supported in Core library"); #endif } EXPORT void * CALL DebugMemGetRecompInfo(m64p_dbg_mem_info recomp_type, unsigned int address, int index) { #ifdef DBG switch (recomp_type) { case M64P_DBG_RECOMP_OPCODE: return get_recompiled_opcode(address, index); case M64P_DBG_RECOMP_ARGS: return get_recompiled_args(address, index); case M64P_DBG_RECOMP_ADDR: return get_recompiled_addr(address, index); default: DebugMessage(M64MSG_ERROR, "Bug: DebugMemGetRecompInfo() called with invalid m64p_dbg_mem_info"); return NULL; } #else DebugMessage(M64MSG_ERROR, "Bug: DebugMemGetRecompInfo() called, but Debugger not supported in Core library"); return NULL; #endif } EXPORT int CALL DebugMemGetMemInfo(m64p_dbg_mem_info mem_info_type, unsigned int address) { #ifdef DBG switch (mem_info_type) { case M64P_DBG_MEM_TYPE: return get_memory_type(address); case M64P_DBG_MEM_FLAGS: return get_memory_flags(address); case M64P_DBG_MEM_HAS_RECOMPILED: return get_has_recompiled(address); case M64P_DBG_MEM_NUM_RECOMPILED: return get_num_recompiled(address); default: DebugMessage(M64MSG_ERROR, "Bug: DebugMemGetMemInfo() called with invalid m64p_dbg_mem_info"); return 0; } #else DebugMessage(M64MSG_ERROR, "Bug: DebugMemGetMemInfo() called, but Debugger not supported in Core library"); return 0; #endif } EXPORT void * CALL DebugMemGetPointer(m64p_dbg_memptr_type mem_ptr_type) { switch (mem_ptr_type) { case M64P_DBG_PTR_RDRAM: return g_rdram; case M64P_DBG_PTR_PI_REG: return g_pi.regs; case M64P_DBG_PTR_SI_REG: return g_si.regs; case M64P_DBG_PTR_VI_REG: return g_vi.regs; case M64P_DBG_PTR_RI_REG: return g_ri.regs; case M64P_DBG_PTR_AI_REG: return g_ai.regs; default: DebugMessage(M64MSG_ERROR, "Bug: DebugMemGetPointer() called with invalid m64p_dbg_memptr_type"); return NULL; } } EXPORT unsigned long long CALL DebugMemRead64(unsigned int address) { #ifdef DBG if ((address & 3) == 0) return read_memory_64(address); else return read_memory_64_unaligned(address); #else DebugMessage(M64MSG_ERROR, "Bug: DebugMemRead64() called, but Debugger not supported in Core library"); return 0LL; #endif } EXPORT unsigned int CALL DebugMemRead32(unsigned int address) { #ifdef DBG if ((address & 3) == 0) return read_memory_32(address); else return read_memory_32_unaligned(address); #else DebugMessage(M64MSG_ERROR, "Bug: DebugMemRead32() called, but Debugger not supported in Core library"); return 0; #endif } EXPORT unsigned short CALL DebugMemRead16(unsigned int address) { #ifdef DBG return read_memory_16(address); #else DebugMessage(M64MSG_ERROR, "Bug: DebugMemRead16() called, but Debugger not supported in Core library"); return 0; #endif } EXPORT unsigned char CALL DebugMemRead8(unsigned int address) { #ifdef DBG return read_memory_8(address); #else DebugMessage(M64MSG_ERROR, "Bug: DebugMemRead8() called, but Debugger not supported in Core library"); return 0; #endif } EXPORT void CALL DebugMemWrite64(unsigned int address, unsigned long long value) { #ifdef DBG if ((address & 3) == 0) write_memory_64(address, value); else write_memory_64_unaligned(address, value); #else DebugMessage(M64MSG_ERROR, "Bug: DebugMemWrite64() called, but Debugger not supported in Core library"); #endif } EXPORT void CALL DebugMemWrite32(unsigned int address, unsigned int value) { #ifdef DBG if ((address & 3) == 0) write_memory_32(address, value); else write_memory_32_unaligned(address, value); #else DebugMessage(M64MSG_ERROR, "Bug: DebugMemWrite32() called, but Debugger not supported in Core library"); #endif } EXPORT void CALL DebugMemWrite16(unsigned int address, unsigned short value) { #ifdef DBG write_memory_16(address, value); #else DebugMessage(M64MSG_ERROR, "Bug: DebugMemWrite16() called, but Debugger not supported in Core library"); #endif } EXPORT void CALL DebugMemWrite8(unsigned int address, unsigned char value) { #ifdef DBG write_memory_8(address, value); #else DebugMessage(M64MSG_ERROR, "Bug: DebugMemWrite8() called, but Debugger not supported in Core library"); #endif } EXPORT void * CALL DebugGetCPUDataPtr(m64p_dbg_cpu_data cpu_data_type) { switch (cpu_data_type) { case M64P_CPU_PC: return r4300_pc(); case M64P_CPU_REG_REG: return r4300_regs(); case M64P_CPU_REG_HI: return r4300_mult_hi(); case M64P_CPU_REG_LO: return r4300_mult_lo(); case M64P_CPU_REG_COP0: return r4300_cp0_regs(); case M64P_CPU_REG_COP1_DOUBLE_PTR: return r4300_cp1_regs_double(); case M64P_CPU_REG_COP1_SIMPLE_PTR: return r4300_cp1_regs_simple(); case M64P_CPU_REG_COP1_FGR_64: return r4300_cp1_regs(); case M64P_CPU_TLB: return tlb_e; default: DebugMessage(M64MSG_ERROR, "Bug: DebugGetCPUDataPtr() called with invalid input m64p_dbg_cpu_data"); return NULL; } } EXPORT int CALL DebugBreakpointLookup(unsigned int address, unsigned int size, unsigned int flags) { #ifdef DBG return lookup_breakpoint(address, size, flags); #else DebugMessage(M64MSG_ERROR, "Bug: DebugBreakpointLookup() called, but Debugger not supported in Core library"); return -1; #endif } EXPORT int CALL DebugBreakpointCommand(m64p_dbg_bkp_command command, unsigned int index, m64p_breakpoint *bkp) { #ifdef DBG switch (command) { case M64P_BKP_CMD_ADD_ADDR: return add_breakpoint(index); case M64P_BKP_CMD_ADD_STRUCT: return add_breakpoint_struct(bkp); case M64P_BKP_CMD_REPLACE: replace_breakpoint_num(index, bkp); return 0; case M64P_BKP_CMD_REMOVE_ADDR: remove_breakpoint_by_address(index); return 0; case M64P_BKP_CMD_REMOVE_IDX: remove_breakpoint_by_num(index); return 0; case M64P_BKP_CMD_ENABLE: enable_breakpoint(index); return 0; case M64P_BKP_CMD_DISABLE: disable_breakpoint(index); return 0; case M64P_BKP_CMD_CHECK: return check_breakpoints(index); default: DebugMessage(M64MSG_ERROR, "Bug: DebugBreakpointCommand() called with invalid input m64p_dbg_bkp_command"); return -1; } #else DebugMessage(M64MSG_ERROR, "Bug: DebugBreakpointCommand() called, but Debugger not supported in Core library"); return -1; #endif } mupen64plus-core-src-2.5/src/api/debugger.h000066400000000000000000000041711251723631200205770ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - api/debugger.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the definitions for debugger functions which will be * called from the other Core modules */ #if !defined(API_DEBUGGER_H) #define API_DEBUGGER_H #include "m64p_types.h" /* Debugger Definitions */ typedef enum { DEBUG_UI_INIT = 1, DEBUG_UI_UPDATE, DEBUG_UI_VI, DEBUG_CORE_COMPARE } eDbgCallbackType; /* Functions for use by the Core, to send information back to the front-end app */ extern void DebuggerCallback(eDbgCallbackType type, unsigned int param); extern void CoreCompareCallback(void); extern void CoreCompareDataSync(int length, void *ptr); #endif /* API_DEBUGGER_H */ mupen64plus-core-src-2.5/src/api/frontend.c000066400000000000000000000320141251723631200206220ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - api/frontend.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2012 CasualJames * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the Core front-end functions which will be exported * outside of the core library. */ #include #include #include #include #define M64P_CORE_PROTOTYPES 1 #include "callbacks.h" #include "config.h" #include "m64p_config.h" #include "m64p_frontend.h" #include "m64p_types.h" #include "main/cheat.h" #include "main/eventloop.h" #include "main/main.h" #include "main/md5.h" #include "main/rom.h" #include "main/savestates.h" #include "main/util.h" #include "main/version.h" #include "main/workqueue.h" #include "osd/screenshot.h" #include "plugin/plugin.h" #include "vidext.h" /* some local state variables */ static int l_CoreInit = 0; static int l_ROMOpen = 0; /* functions exported outside of libmupen64plus to front-end application */ EXPORT m64p_error CALL CoreStartup(int APIVersion, const char *ConfigPath, const char *DataPath, void *Context, void (*DebugCallback)(void *, int, const char *), void *Context2, void (*StateCallback)(void *, m64p_core_param, int)) { if (l_CoreInit) return M64ERR_ALREADY_INIT; /* very first thing is to set the callback functions for debug info and state changing*/ SetDebugCallback(DebugCallback, Context); SetStateCallback(StateCallback, Context2); /* check front-end's API version */ if ((APIVersion & 0xffff0000) != (FRONTEND_API_VERSION & 0xffff0000)) { DebugMessage(M64MSG_ERROR, "CoreStartup(): Front-end (API version %i.%i.%i) is incompatible with this core (API %i.%i.%i)", VERSION_PRINTF_SPLIT(APIVersion), VERSION_PRINTF_SPLIT(FRONTEND_API_VERSION)); return M64ERR_INCOMPATIBLE; } /* set up the default (dummy) plugins */ plugin_connect(M64PLUGIN_GFX, NULL); plugin_connect(M64PLUGIN_AUDIO, NULL); plugin_connect(M64PLUGIN_INPUT, NULL); plugin_connect(M64PLUGIN_CORE, NULL); savestates_init(); /* next, start up the configuration handling code by loading and parsing the config file */ if (ConfigInit(ConfigPath, DataPath) != M64ERR_SUCCESS) return M64ERR_INTERNAL; /* set default configuration parameter values for Core */ if (ConfigOpenSection("Core", &g_CoreConfig) != M64ERR_SUCCESS || g_CoreConfig == NULL) return M64ERR_INTERNAL; if (!main_set_core_defaults()) return M64ERR_INTERNAL; /* The ROM database contains MD5 hashes, goodnames, and some game-specific parameters */ romdatabase_open(); workqueue_init(); l_CoreInit = 1; return M64ERR_SUCCESS; } EXPORT m64p_error CALL CoreShutdown(void) { if (!l_CoreInit) return M64ERR_NOT_INIT; /* close down some core sub-systems */ romdatabase_close(); ConfigShutdown(); workqueue_shutdown(); savestates_deinit(); /* tell SDL to shut down */ SDL_Quit(); l_CoreInit = 0; return M64ERR_SUCCESS; } EXPORT m64p_error CALL CoreAttachPlugin(m64p_plugin_type PluginType, m64p_dynlib_handle PluginLibHandle) { m64p_error rval; if (!l_CoreInit) return M64ERR_NOT_INIT; if (g_EmulatorRunning || !l_ROMOpen) return M64ERR_INVALID_STATE; rval = plugin_connect(PluginType, PluginLibHandle); if (rval != M64ERR_SUCCESS) return rval; rval = plugin_start(PluginType); if (rval != M64ERR_SUCCESS) return rval; return M64ERR_SUCCESS; } EXPORT m64p_error CALL CoreDetachPlugin(m64p_plugin_type PluginType) { if (!l_CoreInit) return M64ERR_NOT_INIT; if (g_EmulatorRunning) return M64ERR_INVALID_STATE; return plugin_connect(PluginType, NULL); } EXPORT m64p_error CALL CoreDoCommand(m64p_command Command, int ParamInt, void *ParamPtr) { m64p_error rval; int keysym, keymod; if (!l_CoreInit) return M64ERR_NOT_INIT; switch(Command) { case M64CMD_NOP: return M64ERR_SUCCESS; case M64CMD_ROM_OPEN: if (g_EmulatorRunning || l_ROMOpen) return M64ERR_INVALID_STATE; if (ParamPtr == NULL || ParamInt < 4096) return M64ERR_INPUT_ASSERT; rval = open_rom((const unsigned char *) ParamPtr, ParamInt); if (rval == M64ERR_SUCCESS) { l_ROMOpen = 1; ScreenshotRomOpen(); cheat_init(); } return rval; case M64CMD_ROM_CLOSE: if (g_EmulatorRunning || !l_ROMOpen) return M64ERR_INVALID_STATE; l_ROMOpen = 0; cheat_delete_all(); cheat_uninit(); return close_rom(); case M64CMD_ROM_GET_HEADER: if (!l_ROMOpen) return M64ERR_INVALID_STATE; if (ParamPtr == NULL) return M64ERR_INPUT_ASSERT; if (sizeof(m64p_rom_header) < ParamInt) ParamInt = sizeof(m64p_rom_header); memcpy(ParamPtr, &ROM_HEADER, ParamInt); // Mupen64Plus used to keep a m64p_rom_header with a clean ROM name // Keep returning a clean ROM name for backwards compatibility if (ParamInt >= 0x20) { int size = (ParamInt >= 0x20 + 20) ? 20 : (ParamInt - 0x20); memcpy((char *)ParamPtr + 0x20, ROM_PARAMS.headername, size); } return M64ERR_SUCCESS; case M64CMD_ROM_GET_SETTINGS: if (!l_ROMOpen) return M64ERR_INVALID_STATE; if (ParamPtr == NULL) return M64ERR_INPUT_ASSERT; if (sizeof(m64p_rom_settings) < ParamInt) ParamInt = sizeof(m64p_rom_settings); memcpy(ParamPtr, &ROM_SETTINGS, ParamInt); return M64ERR_SUCCESS; case M64CMD_EXECUTE: if (g_EmulatorRunning || !l_ROMOpen) return M64ERR_INVALID_STATE; /* print out plugin-related warning messages */ plugin_check(); /* the main_run() function will not return until the player has quit the game */ rval = main_run(); return rval; case M64CMD_STOP: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; /* this stop function is asynchronous. The emulator may not terminate until later */ return main_core_state_set(M64CORE_EMU_STATE, M64EMU_STOPPED); case M64CMD_PAUSE: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; return main_core_state_set(M64CORE_EMU_STATE, M64EMU_PAUSED); case M64CMD_RESUME: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; return main_core_state_set(M64CORE_EMU_STATE, M64EMU_RUNNING); case M64CMD_CORE_STATE_QUERY: if (ParamPtr == NULL) return M64ERR_INPUT_ASSERT; return main_core_state_query((m64p_core_param) ParamInt, (int *) ParamPtr); case M64CMD_CORE_STATE_SET: if (ParamPtr == NULL) return M64ERR_INPUT_ASSERT; return main_core_state_set((m64p_core_param) ParamInt, *((int *)ParamPtr)); case M64CMD_STATE_LOAD: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; main_state_load((char *) ParamPtr); return M64ERR_SUCCESS; case M64CMD_STATE_SAVE: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; if (ParamPtr != NULL && (ParamInt < 1 || ParamInt > 3)) return M64ERR_INPUT_INVALID; main_state_save(ParamInt, (char *) ParamPtr); return M64ERR_SUCCESS; case M64CMD_STATE_SET_SLOT: if (ParamInt < 0 || ParamInt > 9) return M64ERR_INPUT_INVALID; return main_core_state_set(M64CORE_SAVESTATE_SLOT, ParamInt); case M64CMD_SEND_SDL_KEYDOWN: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; keysym = ParamInt & 0xffff; keymod = (ParamInt >> 16) & 0xffff; event_sdl_keydown(keysym, keymod); return M64ERR_SUCCESS; case M64CMD_SEND_SDL_KEYUP: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; keysym = ParamInt & 0xffff; keymod = (ParamInt >> 16) & 0xffff; event_sdl_keyup(keysym, keymod); return M64ERR_SUCCESS; case M64CMD_SET_FRAME_CALLBACK: g_FrameCallback = (m64p_frame_callback) ParamPtr; return M64ERR_SUCCESS; case M64CMD_TAKE_NEXT_SCREENSHOT: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; main_take_next_screenshot(); return M64ERR_SUCCESS; case M64CMD_READ_SCREEN: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; if (ParamPtr == NULL) return M64ERR_INPUT_ASSERT; if (ParamInt < 0 || ParamInt > 1) return M64ERR_INPUT_INVALID; return main_read_screen(ParamPtr, ParamInt); case M64CMD_RESET: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; if (ParamInt < 0 || ParamInt > 1) return M64ERR_INPUT_INVALID; return main_reset(ParamInt); case M64CMD_ADVANCE_FRAME: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; main_advance_one(); return M64ERR_SUCCESS; default: return M64ERR_INPUT_INVALID; } return M64ERR_INTERNAL; } EXPORT m64p_error CALL CoreOverrideVidExt(m64p_video_extension_functions *VideoFunctionStruct) { if (!l_CoreInit) return M64ERR_NOT_INIT; return OverrideVideoFunctions(VideoFunctionStruct); /* in vidext.c */ } EXPORT m64p_error CALL CoreAddCheat(const char *CheatName, m64p_cheat_code *CodeList, int NumCodes) { if (!l_CoreInit) return M64ERR_NOT_INIT; if (CheatName == NULL || CodeList == NULL) return M64ERR_INPUT_ASSERT; if (strlen(CheatName) < 1 || NumCodes < 1) return M64ERR_INPUT_INVALID; if (cheat_add_new(CheatName, CodeList, NumCodes)) return M64ERR_SUCCESS; return M64ERR_INPUT_INVALID; } EXPORT m64p_error CALL CoreCheatEnabled(const char *CheatName, int Enabled) { if (!l_CoreInit) return M64ERR_NOT_INIT; if (CheatName == NULL) return M64ERR_INPUT_ASSERT; if (cheat_set_enabled(CheatName, Enabled)) return M64ERR_SUCCESS; return M64ERR_INPUT_INVALID; } EXPORT m64p_error CALL CoreGetRomSettings(m64p_rom_settings *RomSettings, int RomSettingsLength, int Crc1, int Crc2) { romdatabase_entry* entry; int i; if (!l_CoreInit) return M64ERR_NOT_INIT; if (RomSettings == NULL) return M64ERR_INPUT_ASSERT; if (RomSettingsLength < sizeof(m64p_rom_settings)) return M64ERR_INPUT_INVALID; /* Look up this ROM in the .ini file and fill in goodname, etc */ entry = ini_search_by_crc(Crc1, Crc2); if (entry == NULL) return M64ERR_INPUT_NOT_FOUND; strncpy(RomSettings->goodname, entry->goodname, 255); RomSettings->goodname[255] = '\0'; for (i = 0; i < 16; i++) sprintf(RomSettings->MD5 + i*2, "%02X", entry->md5[i]); RomSettings->MD5[32] = '\0'; RomSettings->savetype = entry->savetype; RomSettings->status = entry->status; RomSettings->players = entry->players; RomSettings->rumble = entry->rumble; return M64ERR_SUCCESS; } mupen64plus-core-src-2.5/src/api/m64p_common.h000066400000000000000000000071201251723631200211460ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - m64p_common.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This header file defines typedefs for function pointers to common Core * and plugin functions, for use by the front-end and plugin modules to attach * to the dynamic libraries. */ #if !defined(M64P_COMMON_H) #define M64P_COMMON_H #include "m64p_types.h" #ifdef __cplusplus extern "C" { #endif /* PluginGetVersion() * * This function retrieves version information from a library. This * function is the same for the core library and the plugins. */ typedef m64p_error (*ptr_PluginGetVersion)(m64p_plugin_type *, int *, int *, const char **, int *); #if defined(M64P_PLUGIN_PROTOTYPES) || defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL PluginGetVersion(m64p_plugin_type *, int *, int *, const char **, int *); #endif /* CoreGetAPIVersions() * * This function retrieves API version information from the core. */ typedef m64p_error (*ptr_CoreGetAPIVersions)(int *, int *, int *, int *); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL CoreGetAPIVersions(int *, int *, int *, int *); #endif /* CoreErrorMessage() * * This function returns a pointer to a NULL-terminated string giving a * human-readable description of the error. */ typedef const char * (*ptr_CoreErrorMessage)(m64p_error); #if defined(M64P_CORE_PROTOTYPES) EXPORT const char * CALL CoreErrorMessage(m64p_error); #endif /* PluginStartup() * * This function initializes a plugin for use by allocating memory, creating * data structures, and loading the configuration data. */ typedef m64p_error (*ptr_PluginStartup)(m64p_dynlib_handle, void *, void (*)(void *, int, const char *)); #if defined(M64P_PLUGIN_PROTOTYPES) || defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL PluginStartup(m64p_dynlib_handle, void *, void (*)(void *, int, const char *)); #endif /* PluginShutdown() * * This function destroys data structures and releases memory allocated by * the plugin library. */ typedef m64p_error (*ptr_PluginShutdown)(void); #if defined(M64P_PLUGIN_PROTOTYPES) || defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL PluginShutdown(void); #endif #ifdef __cplusplus } #endif #endif /* #define M64P_COMMON_H */ mupen64plus-core-src-2.5/src/api/m64p_config.h000066400000000000000000000245401251723631200211300ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - m64p_config.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This header file defines typedefs for function pointers to the Core's * configuration handling functions. */ #if !defined(M64P_CONFIG_H) #define M64P_CONFIG_H #include "m64p_types.h" #ifdef __cplusplus extern "C" { #endif /* ConfigListSections() * * This function is called to enumerate the list of Sections in the Mupen64Plus * configuration file. It is expected that there will be a section named "Core" * for core-specific configuration data, "Graphics" for common graphics options, * and one or more sections for each plugin library. */ typedef m64p_error (*ptr_ConfigListSections)(void *, void (*)(void *, const char *)); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL ConfigListSections(void *, void (*)(void *, const char *)); #endif /* ConfigOpenSection() * * This function is used to give a configuration section handle to the front-end * which may be used to read or write configuration parameter values in a given * section of the configuration file. */ typedef m64p_error (*ptr_ConfigOpenSection)(const char *, m64p_handle *); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL ConfigOpenSection(const char *, m64p_handle *); #endif /* ConfigListParameters() * * This function is called to enumerate the list of Parameters in a given * Section of the Mupen64Plus configuration file. */ typedef m64p_error (*ptr_ConfigListParameters)(m64p_handle, void *, void (*)(void *, const char *, m64p_type)); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL ConfigListParameters(m64p_handle, void *, void (*)(void *, const char *, m64p_type)); #endif /* ConfigSaveFile() * * This function saves the entire current Mupen64Plus configuration to disk. */ typedef m64p_error (*ptr_ConfigSaveFile)(void); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL ConfigSaveFile(void); #endif /* ConfigSaveSection() * * This function saves one section of the current Mupen64Plus configuration to disk. */ typedef m64p_error (*ptr_ConfigSaveSection)(const char *); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL ConfigSaveSection(const char *); #endif /* ConfigHasUnsavedChanges() * * This function determines if a given Section (or all sections) of the Mupen64Plus Core configuration file has been modified since it was last saved or loaded. */ typedef int (*ptr_ConfigHasUnsavedChanges)(const char *); #if defined(M64P_CORE_PROTOTYPES) EXPORT int CALL ConfigHasUnsavedChanges(const char *); #endif /* ConfigDeleteSection() * * This function deletes a section from the Mupen64Plus configuration data. */ typedef m64p_error (*ptr_ConfigDeleteSection)(const char *SectionName); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL ConfigDeleteSection(const char *SectionName); #endif /* ConfigRevertChanges() * * This function reverts changes previously made to one section of the configuration file, so that it will match with the configuration at the last time that it was loaded from or saved to disk. */ typedef m64p_error (*ptr_ConfigRevertChanges)(const char *SectionName); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL ConfigRevertChanges(const char *SectionName); #endif /* ConfigSetParameter() * * This function sets the value of one of the emulator's configuration * parameters. */ typedef m64p_error (*ptr_ConfigSetParameter)(m64p_handle, const char *, m64p_type, const void *); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL ConfigSetParameter(m64p_handle, const char *, m64p_type, const void *); #endif /* ConfigSetParameterHelp() * * This function sets the help string of one of the emulator's configuration * parameters. */ typedef m64p_error (*ptr_ConfigSetParameterHelp)(m64p_handle, const char *, const char *); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL ConfigSetParameterHelp(m64p_handle, const char *, const char *); #endif /* ConfigGetParameter() * * This function retrieves the value of one of the emulator's parameters. */ typedef m64p_error (*ptr_ConfigGetParameter)(m64p_handle, const char *, m64p_type, void *, int); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL ConfigGetParameter(m64p_handle, const char *, m64p_type, void *, int); #endif /* ConfigGetParameterType() * * This function retrieves the type of one of the emulator's parameters. */ typedef m64p_error (*ptr_ConfigGetParameterType)(m64p_handle, const char *, m64p_type *); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL ConfigGetParameterType(m64p_handle, const char *, m64p_type *); #endif /* ConfigGetParameterHelp() * * This function retrieves the help information about one of the emulator's * parameters. */ typedef const char * (*ptr_ConfigGetParameterHelp)(m64p_handle, const char *); #if defined(M64P_CORE_PROTOTYPES) EXPORT const char * CALL ConfigGetParameterHelp(m64p_handle, const char *); #endif /* ConfigSetDefault***() * * These functions are used to set the value of a configuration parameter if it * is not already present in the configuration file. This may happen if a new * user runs the emulator, or an upgraded module uses a new parameter, or the * user deletes his or her configuration file. If the parameter is already * present in the given section of the configuration file, then no action will * be taken and this function will return successfully. */ typedef m64p_error (*ptr_ConfigSetDefaultInt)(m64p_handle, const char *, int, const char *); typedef m64p_error (*ptr_ConfigSetDefaultFloat)(m64p_handle, const char *, float, const char *); typedef m64p_error (*ptr_ConfigSetDefaultBool)(m64p_handle, const char *, int, const char *); typedef m64p_error (*ptr_ConfigSetDefaultString)(m64p_handle, const char *, const char *, const char *); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL ConfigSetDefaultInt(m64p_handle, const char *, int, const char *); EXPORT m64p_error CALL ConfigSetDefaultFloat(m64p_handle, const char *, float, const char *); EXPORT m64p_error CALL ConfigSetDefaultBool(m64p_handle, const char *, int, const char *); EXPORT m64p_error CALL ConfigSetDefaultString(m64p_handle, const char *, const char *, const char *); #endif /* ConfigGetParam***() * * These functions retrieve the value of one of the emulator's parameters in * the given section, and return the value directly to the calling function. If * an errors occurs (such as an invalid Section handle, or invalid * configuration parameter name), then an error will be sent to the front-end * via the DebugCallback() function, and either a 0 (zero) or an empty string * will be returned. */ typedef int (*ptr_ConfigGetParamInt)(m64p_handle, const char *); typedef float (*ptr_ConfigGetParamFloat)(m64p_handle, const char *); typedef int (*ptr_ConfigGetParamBool)(m64p_handle, const char *); typedef const char * (*ptr_ConfigGetParamString)(m64p_handle, const char *); #if defined(M64P_CORE_PROTOTYPES) EXPORT int CALL ConfigGetParamInt(m64p_handle, const char *); EXPORT float CALL ConfigGetParamFloat(m64p_handle, const char *); EXPORT int CALL ConfigGetParamBool(m64p_handle, const char *); EXPORT const char * CALL ConfigGetParamString(m64p_handle, const char *); #endif /* ConfigGetSharedDataFilepath() * * This function is provided to allow a plugin to retrieve a full pathname to a * given shared data file. This type of file is intended to be shared among * multiple users on a system, so it is likely to be read-only. */ typedef const char * (*ptr_ConfigGetSharedDataFilepath)(const char *); #if defined(M64P_CORE_PROTOTYPES) EXPORT const char * CALL ConfigGetSharedDataFilepath(const char *); #endif /* ConfigGetUserConfigPath() * * This function may be used by the plugins or front-end to get a path to the * directory for storing user-specific configuration files. This will be the * directory where "mupen64plus.cfg" is located. */ typedef const char * (*ptr_ConfigGetUserConfigPath)(void); #if defined(M64P_CORE_PROTOTYPES) EXPORT const char * CALL ConfigGetUserConfigPath(void); #endif /* ConfigGetUserDataPath() * * This function may be used by the plugins or front-end to get a path to the * directory for storing user-specific data files. This may be used to store * files such as screenshots, saved game states, or hi-res textures. */ typedef const char * (*ptr_ConfigGetUserDataPath)(void); #if defined(M64P_CORE_PROTOTYPES) EXPORT const char * CALL ConfigGetUserDataPath(void); #endif /* ConfigGetUserCachePath() * * This function may be used by the plugins or front-end to get a path to the * directory for storing cached user-specific data files. Files in this * directory may be deleted by the user to save space, so critical information * should not be stored here. This directory may be used to store files such * as the ROM browser cache. */ typedef const char * (*ptr_ConfigGetUserCachePath)(void); #if defined(M64P_CORE_PROTOTYPES) EXPORT const char * CALL ConfigGetUserCachePath(void); #endif #ifdef __cplusplus } #endif #endif /* #define M64P_CONFIG_H */ mupen64plus-core-src-2.5/src/api/m64p_debugger.h000066400000000000000000000175611251723631200214540ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - m64p_debugger.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This header file defines typedefs for function pointers to Core Debugger * functions. */ #if !defined(M64P_DEBUGGER_H) #define M64P_DEBUGGER_H #include "m64p_types.h" #ifdef __cplusplus extern "C" { #endif /* DebugSetCallbacks() * * This function is called by the front-end to supply debugger callback * function pointers. If debugger is enabled and then later disabled within the * UI, this function may be called with NULL pointers in order to disable the * callbacks. */ typedef m64p_error (*ptr_DebugSetCallbacks)(void (*)(void), void (*)(unsigned int), void (*)(void)); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL DebugSetCallbacks(void (*)(void), void (*)(unsigned int), void (*)(void)); #endif /* DebugSetCoreCompare() * * This function is called by the front-end to supply callback function pointers * for the Core Comparison feature. */ typedef m64p_error (*ptr_DebugSetCoreCompare)(void (*)(unsigned int), void (*)(int, void *)); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL DebugSetCoreCompare(void (*)(unsigned int), void (*)(int, void *)); #endif /* DebugSetRunState() * * This function sets the run state of the R4300 CPU emulator. */ typedef m64p_error (*ptr_DebugSetRunState)(m64p_dbg_runstate); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL DebugSetRunState(m64p_dbg_runstate); #endif /* DebugGetState() * * This function reads and returns a debugger state variable, which are * enumerated in m64p_types.h. */ typedef int (*ptr_DebugGetState)(m64p_dbg_state); #if defined(M64P_CORE_PROTOTYPES) EXPORT int CALL DebugGetState(m64p_dbg_state); #endif /* DebugStep() * * This function signals the debugger to advance one instruction when in the * stepping mode. */ typedef m64p_error (*ptr_DebugStep)(void); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL DebugStep(void); #endif /* DebugDecodeOp() * * This is a helper function for the debugger front-end. This instruction takes * a PC value and an R4300 instruction opcode and writes the disassembled * instruction mnemonic and arguments into character buffers. This is intended * to be used to display disassembled code. */ typedef void (*ptr_DebugDecodeOp)(unsigned int, char *, char *, int); #if defined(M64P_CORE_PROTOTYPES) EXPORT void CALL DebugDecodeOp(unsigned int, char *, char *, int); #endif /* DebugMemGetRecompInfo() * * This function is used by the front-end to retrieve disassembly information * about recompiled code. For example, the dynamic recompiler may take a single * R4300 instruction and compile it into 10 x86 instructions. This function may * then be used to retrieve the disassembled code of the 10 x86 instructions. */ typedef void * (*ptr_DebugMemGetRecompInfo)(m64p_dbg_mem_info, unsigned int, int); #if defined(M64P_CORE_PROTOTYPES) EXPORT void * CALL DebugMemGetRecompInfo(m64p_dbg_mem_info, unsigned int, int); #endif /* DebugMemGetMemInfo() * * This function returns an integer value regarding the memory location address, * corresponding to the information requested by mem_info_type, which is a type * enumerated in m64p_types.h. */ typedef int (*ptr_DebugMemGetMemInfo)(m64p_dbg_mem_info, unsigned int); #if defined(M64P_CORE_PROTOTYPES) EXPORT int CALL DebugMemGetMemInfo(m64p_dbg_mem_info, unsigned int); #endif /* DebugMemGetPointer() * * This function returns a memory pointer (in x86 memory space) to a block of * emulated N64 memory. This may be used to retrieve a pointer to a special N64 * block (such as the serial, video, or audio registers) or the RDRAM. */ typedef void * (*ptr_DebugMemGetPointer)(m64p_dbg_memptr_type); #if defined(M64P_CORE_PROTOTYPES) EXPORT void * CALL DebugMemGetPointer(m64p_dbg_memptr_type); #endif /* DebugMemRead**() * * These functions retrieve a value from the emulated N64 memory. The returned * value will be correctly byte-swapped for the host architecture. */ typedef unsigned long long (*ptr_DebugMemRead64)(unsigned int); typedef unsigned int (*ptr_DebugMemRead32)(unsigned int); typedef unsigned short (*ptr_DebugMemRead16)(unsigned int); typedef unsigned char (*ptr_DebugMemRead8)(unsigned int); #if defined(M64P_CORE_PROTOTYPES) EXPORT unsigned long long CALL DebugMemRead64(unsigned int); EXPORT unsigned int CALL DebugMemRead32(unsigned int); EXPORT unsigned short CALL DebugMemRead16(unsigned int); EXPORT unsigned char CALL DebugMemRead8(unsigned int); #endif /* DebugMemWrite**() * * These functions write a value into the emulated N64 memory. The given value * will be correctly byte-swapped before storage. */ typedef void (*ptr_DebugMemWrite64)(unsigned int, unsigned long long); typedef void (*ptr_DebugMemWrite32)(unsigned int, unsigned int); typedef void (*ptr_DebugMemWrite16)(unsigned int, unsigned short); typedef void (*ptr_DebugMemWrite8)(unsigned int, unsigned char); #if defined(M64P_CORE_PROTOTYPES) EXPORT void CALL DebugMemWrite64(unsigned int, unsigned long long); EXPORT void CALL DebugMemWrite32(unsigned int, unsigned int); EXPORT void CALL DebugMemWrite16(unsigned int, unsigned short); EXPORT void CALL DebugMemWrite8(unsigned int, unsigned char); #endif /* DebugGetCPUDataPtr() * * This function returns a memory pointer (in x86 memory space) to a specific * register in the emulated R4300 CPU. */ typedef void * (*ptr_DebugGetCPUDataPtr)(m64p_dbg_cpu_data); #if defined(M64P_CORE_PROTOTYPES) EXPORT void * CALL DebugGetCPUDataPtr(m64p_dbg_cpu_data); #endif /* DebugBreakpointLookup() * * This function searches through all current breakpoints in the debugger to * find one that matches the given input parameters. If a matching breakpoint * is found, the index number is returned. If no breakpoints are found, -1 is * returned. */ typedef int (*ptr_DebugBreakpointLookup)(unsigned int, unsigned int, unsigned int); #if defined(M64P_CORE_PROTOTYPES) EXPORT int CALL DebugBreakpointLookup(unsigned int, unsigned int, unsigned int); #endif /* DebugBreakpointCommand() * * This function is used to process common breakpoint commands, such as adding, * removing, or searching the breakpoints. The meanings of the index and ptr * input parameters vary by command. */ typedef int (*ptr_DebugBreakpointCommand)(m64p_dbg_bkp_command, unsigned int, m64p_breakpoint *); #if defined(M64P_CORE_PROTOTYPES) EXPORT int CALL DebugBreakpointCommand(m64p_dbg_bkp_command, unsigned int, m64p_breakpoint *); #endif #ifdef __cplusplus } #endif #endif /* #define M64P_DEBUGGER_H */ mupen64plus-core-src-2.5/src/api/m64p_frontend.h000066400000000000000000000127731251723631200215070ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - m64p_frontend.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This header file defines typedefs for function pointers to Core functions * designed for use by the front-end user interface. */ #if !defined(M64P_FRONTEND_H) #define M64P_FRONTEND_H #include "m64p_types.h" #ifdef __cplusplus extern "C" { #endif /* pointer types to the callback functions in the front-end application */ typedef void (*ptr_DebugCallback)(void *Context, int level, const char *message); typedef void (*ptr_StateCallback)(void *Context, m64p_core_param param_type, int new_value); #if defined(M64P_CORE_PROTOTYPES) EXPORT void CALL DebugCallback(void *Context, int level, const char *message); EXPORT void CALL StateCallback(void *Context, m64p_core_param param_type, int new_value); #endif /* CoreStartup() * * This function initializes libmupen64plus for use by allocating memory, * creating data structures, and loading the configuration file. */ typedef m64p_error (*ptr_CoreStartup)(int, const char *, const char *, void *, ptr_DebugCallback, void *, ptr_StateCallback); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL CoreStartup(int, const char *, const char *, void *, ptr_DebugCallback, void *, ptr_StateCallback); #endif /* CoreShutdown() * * This function saves the configuration file, then destroys data structures * and releases memory allocated by the core library. */ typedef m64p_error (*ptr_CoreShutdown)(void); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL CoreShutdown(void); #endif /* CoreAttachPlugin() * * This function attaches the given plugin to the emulator core. There can only * be one plugin of each type attached to the core at any given time. */ typedef m64p_error (*ptr_CoreAttachPlugin)(m64p_plugin_type, m64p_dynlib_handle); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL CoreAttachPlugin(m64p_plugin_type, m64p_dynlib_handle); #endif /* CoreDetachPlugin() * * This function detaches the given plugin from the emulator core, and re-attaches * the 'dummy' plugin functions. */ typedef m64p_error (*ptr_CoreDetachPlugin)(m64p_plugin_type); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL CoreDetachPlugin(m64p_plugin_type); #endif /* CoreDoCommand() * * This function sends a command to the emulator core. */ typedef m64p_error (*ptr_CoreDoCommand)(m64p_command, int, void *); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL CoreDoCommand(m64p_command, int, void *); #endif /* CoreOverrideVidExt() * * This function overrides the core's internal SDL-based OpenGL functions. This * override functionality allows a front-end to define its own video extension * functions to be used instead of the SDL functions. If any of the function * pointers in the structure are NULL, the override function will be disabled * and the core's internal SDL functions will be used. */ typedef m64p_error (*ptr_CoreOverrideVidExt)(m64p_video_extension_functions *); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL CoreOverrideVidExt(m64p_video_extension_functions *); #endif /* CoreAddCheat() * * This function will add a Cheat Function to a list of currently active cheats * which are applied to the open ROM. */ typedef m64p_error (*ptr_CoreAddCheat)(const char *, m64p_cheat_code *, int); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL CoreAddCheat(const char *, m64p_cheat_code *, int); #endif /* CoreCheatEnabled() * * This function will enable or disable a Cheat Function which is in the list of * currently active cheats. */ typedef m64p_error (*ptr_CoreCheatEnabled)(const char *, int); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL CoreCheatEnabled(const char *, int); #endif /* CoreGetRomSettings() * * This function will retrieve the ROM settings from the mupen64plus INI file for * the ROM image corresponding to the given CRC values. */ typedef m64p_error (*ptr_CoreGetRomSettings)(m64p_rom_settings *, int, int, int); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL CoreGetRomSettings(m64p_rom_settings *, int, int, int); #endif #ifdef __cplusplus } #endif #endif /* #define M64P_FRONTEND_H */ mupen64plus-core-src-2.5/src/api/m64p_plugin.h000066400000000000000000000227731251723631200211670ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - m64p_plugin.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if !defined(M64P_PLUGIN_H) #define M64P_PLUGIN_H #include "m64p_types.h" #ifdef __cplusplus extern "C" { #endif /*** Controller plugin's ****/ #define PLUGIN_NONE 1 #define PLUGIN_MEMPAK 2 #define PLUGIN_RUMBLE_PAK 3 /* not implemented for non raw data */ #define PLUGIN_TRANSFER_PAK 4 /* not implemented for non raw data */ #define PLUGIN_RAW 5 /* the controller plugin is passed in raw data */ /***** Structures *****/ typedef struct { unsigned char * RDRAM; unsigned char * DMEM; unsigned char * IMEM; unsigned int * MI_INTR_REG; unsigned int * SP_MEM_ADDR_REG; unsigned int * SP_DRAM_ADDR_REG; unsigned int * SP_RD_LEN_REG; unsigned int * SP_WR_LEN_REG; unsigned int * SP_STATUS_REG; unsigned int * SP_DMA_FULL_REG; unsigned int * SP_DMA_BUSY_REG; unsigned int * SP_PC_REG; unsigned int * SP_SEMAPHORE_REG; unsigned int * DPC_START_REG; unsigned int * DPC_END_REG; unsigned int * DPC_CURRENT_REG; unsigned int * DPC_STATUS_REG; unsigned int * DPC_CLOCK_REG; unsigned int * DPC_BUFBUSY_REG; unsigned int * DPC_PIPEBUSY_REG; unsigned int * DPC_TMEM_REG; void (*CheckInterrupts)(void); void (*ProcessDlistList)(void); void (*ProcessAlistList)(void); void (*ProcessRdpList)(void); void (*ShowCFB)(void); } RSP_INFO; typedef struct { unsigned char * HEADER; /* This is the rom header (first 40h bytes of the rom) */ unsigned char * RDRAM; unsigned char * DMEM; unsigned char * IMEM; unsigned int * MI_INTR_REG; unsigned int * DPC_START_REG; unsigned int * DPC_END_REG; unsigned int * DPC_CURRENT_REG; unsigned int * DPC_STATUS_REG; unsigned int * DPC_CLOCK_REG; unsigned int * DPC_BUFBUSY_REG; unsigned int * DPC_PIPEBUSY_REG; unsigned int * DPC_TMEM_REG; unsigned int * VI_STATUS_REG; unsigned int * VI_ORIGIN_REG; unsigned int * VI_WIDTH_REG; unsigned int * VI_INTR_REG; unsigned int * VI_V_CURRENT_LINE_REG; unsigned int * VI_TIMING_REG; unsigned int * VI_V_SYNC_REG; unsigned int * VI_H_SYNC_REG; unsigned int * VI_LEAP_REG; unsigned int * VI_H_START_REG; unsigned int * VI_V_START_REG; unsigned int * VI_V_BURST_REG; unsigned int * VI_X_SCALE_REG; unsigned int * VI_Y_SCALE_REG; void (*CheckInterrupts)(void); } GFX_INFO; typedef struct { unsigned char * RDRAM; unsigned char * DMEM; unsigned char * IMEM; unsigned int * MI_INTR_REG; unsigned int * AI_DRAM_ADDR_REG; unsigned int * AI_LEN_REG; unsigned int * AI_CONTROL_REG; unsigned int * AI_STATUS_REG; unsigned int * AI_DACRATE_REG; unsigned int * AI_BITRATE_REG; void (*CheckInterrupts)(void); } AUDIO_INFO; typedef struct { int Present; int RawData; int Plugin; } CONTROL; typedef union { unsigned int Value; struct { unsigned R_DPAD : 1; unsigned L_DPAD : 1; unsigned D_DPAD : 1; unsigned U_DPAD : 1; unsigned START_BUTTON : 1; unsigned Z_TRIG : 1; unsigned B_BUTTON : 1; unsigned A_BUTTON : 1; unsigned R_CBUTTON : 1; unsigned L_CBUTTON : 1; unsigned D_CBUTTON : 1; unsigned U_CBUTTON : 1; unsigned R_TRIG : 1; unsigned L_TRIG : 1; unsigned Reserved1 : 1; unsigned Reserved2 : 1; signed X_AXIS : 8; signed Y_AXIS : 8; }; } BUTTONS; typedef struct { CONTROL *Controls; /* A pointer to an array of 4 controllers .. eg: CONTROL Controls[4]; */ } CONTROL_INFO; /* common plugin function pointer types */ typedef void (*ptr_RomClosed)(void); typedef int (*ptr_RomOpen)(void); #if defined(M64P_PLUGIN_PROTOTYPES) EXPORT int CALL RomOpen(void); EXPORT void CALL RomClosed(void); #endif /* video plugin function pointer types */ typedef void (*ptr_ChangeWindow)(void); typedef int (*ptr_InitiateGFX)(GFX_INFO Gfx_Info); typedef void (*ptr_MoveScreen)(int x, int y); typedef void (*ptr_ProcessDList)(void); typedef void (*ptr_ProcessRDPList)(void); typedef void (*ptr_ShowCFB)(void); typedef void (*ptr_UpdateScreen)(void); typedef void (*ptr_ViStatusChanged)(void); typedef void (*ptr_ViWidthChanged)(void); typedef void (*ptr_ReadScreen2)(void *dest, int *width, int *height, int front); typedef void (*ptr_SetRenderingCallback)(void (*callback)(int)); typedef void (*ptr_ResizeVideoOutput)(int width, int height); #if defined(M64P_PLUGIN_PROTOTYPES) EXPORT void CALL ChangeWindow(void); EXPORT int CALL InitiateGFX(GFX_INFO Gfx_Info); EXPORT void CALL MoveScreen(int x, int y); EXPORT void CALL ProcessDList(void); EXPORT void CALL ProcessRDPList(void); EXPORT void CALL ShowCFB(void); EXPORT void CALL UpdateScreen(void); EXPORT void CALL ViStatusChanged(void); EXPORT void CALL ViWidthChanged(void); EXPORT void CALL ReadScreen2(void *dest, int *width, int *height, int front); EXPORT void CALL SetRenderingCallback(void (*callback)(int)); EXPORT void CALL ResizeVideoOutput(int width, int height); #endif /* frame buffer plugin spec extension */ typedef struct { unsigned int addr; unsigned int size; unsigned int width; unsigned int height; } FrameBufferInfo; typedef void (*ptr_FBRead)(unsigned int addr); typedef void (*ptr_FBWrite)(unsigned int addr, unsigned int size); typedef void (*ptr_FBGetFrameBufferInfo)(void *p); #if defined(M64P_PLUGIN_PROTOTYPES) EXPORT void CALL FBRead(unsigned int addr); EXPORT void CALL FBWrite(unsigned int addr, unsigned int size); EXPORT void CALL FBGetFrameBufferInfo(void *p); #endif /* audio plugin function pointers */ typedef void (*ptr_AiDacrateChanged)(int SystemType); typedef void (*ptr_AiLenChanged)(void); typedef int (*ptr_InitiateAudio)(AUDIO_INFO Audio_Info); typedef void (*ptr_ProcessAList)(void); typedef void (*ptr_SetSpeedFactor)(int percent); typedef void (*ptr_VolumeUp)(void); typedef void (*ptr_VolumeDown)(void); typedef int (*ptr_VolumeGetLevel)(void); typedef void (*ptr_VolumeSetLevel)(int level); typedef void (*ptr_VolumeMute)(void); typedef const char * (*ptr_VolumeGetString)(void); #if defined(M64P_PLUGIN_PROTOTYPES) EXPORT void CALL AiDacrateChanged(int SystemType); EXPORT void CALL AiLenChanged(void); EXPORT int CALL InitiateAudio(AUDIO_INFO Audio_Info); EXPORT void CALL ProcessAList(void); EXPORT void CALL SetSpeedFactor(int percent); EXPORT void CALL VolumeUp(void); EXPORT void CALL VolumeDown(void); EXPORT int CALL VolumeGetLevel(void); EXPORT void CALL VolumeSetLevel(int level); EXPORT void CALL VolumeMute(void); EXPORT const char * CALL VolumeGetString(void); #endif /* input plugin function pointers */ typedef void (*ptr_ControllerCommand)(int Control, unsigned char *Command); typedef void (*ptr_GetKeys)(int Control, BUTTONS *Keys); typedef void (*ptr_InitiateControllers)(CONTROL_INFO ControlInfo); typedef void (*ptr_ReadController)(int Control, unsigned char *Command); typedef void (*ptr_SDL_KeyDown)(int keymod, int keysym); typedef void (*ptr_SDL_KeyUp)(int keymod, int keysym); typedef void (*ptr_RenderCallback)(void); #if defined(M64P_PLUGIN_PROTOTYPES) EXPORT void CALL ControllerCommand(int Control, unsigned char *Command); EXPORT void CALL GetKeys(int Control, BUTTONS *Keys); EXPORT void CALL InitiateControllers(CONTROL_INFO ControlInfo); EXPORT void CALL ReadController(int Control, unsigned char *Command); EXPORT void CALL SDL_KeyDown(int keymod, int keysym); EXPORT void CALL SDL_KeyUp(int keymod, int keysym); EXPORT void CALL RenderCallback(void); #endif /* RSP plugin function pointers */ typedef unsigned int (*ptr_DoRspCycles)(unsigned int Cycles); typedef void (*ptr_InitiateRSP)(RSP_INFO Rsp_Info, unsigned int *CycleCount); #if defined(M64P_PLUGIN_PROTOTYPES) EXPORT unsigned int CALL DoRspCycles(unsigned int Cycles); EXPORT void CALL InitiateRSP(RSP_INFO Rsp_Info, unsigned int *CycleCount); #endif #ifdef __cplusplus } #endif #endif /* M64P_PLUGIN_H */ mupen64plus-core-src-2.5/src/api/m64p_types.h000066400000000000000000000254031251723631200210260ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - m64p_types.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2012 CasualJames * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if !defined(M64P_TYPES_H) #define M64P_TYPES_H /* ----------------------------------------- */ /* Platform-specific stuff */ /* ----------------------------------------- */ /* necessary headers */ #include #if defined(WIN32) #include #endif /* DLL handles and function declaration specifiers */ #if defined(WIN32) #define IMPORT extern "C" __declspec(dllimport) #define EXPORT __declspec(dllexport) #define CALL __cdecl typedef HMODULE m64p_dynlib_handle; #else #define IMPORT extern "C" #define EXPORT __attribute__((visibility("default"))) #define CALL typedef void * m64p_dynlib_handle; #endif /* ----------------------------------------- */ /* Structures and Types for Core library API */ /* ----------------------------------------- */ typedef void * m64p_handle; typedef void (*m64p_frame_callback)(unsigned int FrameIndex); typedef void (*m64p_input_callback)(void); typedef void (*m64p_audio_callback)(void); typedef void (*m64p_vi_callback)(void); typedef enum { M64TYPE_INT = 1, M64TYPE_FLOAT, M64TYPE_BOOL, M64TYPE_STRING } m64p_type; typedef enum { M64MSG_ERROR = 1, M64MSG_WARNING, M64MSG_INFO, M64MSG_STATUS, M64MSG_VERBOSE } m64p_msg_level; typedef enum { M64ERR_SUCCESS = 0, M64ERR_NOT_INIT, /* Function is disallowed before InitMupen64Plus() is called */ M64ERR_ALREADY_INIT, /* InitMupen64Plus() was called twice */ M64ERR_INCOMPATIBLE, /* API versions between components are incompatible */ M64ERR_INPUT_ASSERT, /* Invalid parameters for function call, such as ParamValue=NULL for GetCoreParameter() */ M64ERR_INPUT_INVALID, /* Invalid input data, such as ParamValue="maybe" for SetCoreParameter() to set a BOOL-type value */ M64ERR_INPUT_NOT_FOUND, /* The input parameter(s) specified a particular item which was not found */ M64ERR_NO_MEMORY, /* Memory allocation failed */ M64ERR_FILES, /* Error opening, creating, reading, or writing to a file */ M64ERR_INTERNAL, /* Internal error (bug) */ M64ERR_INVALID_STATE, /* Current program state does not allow operation */ M64ERR_PLUGIN_FAIL, /* A plugin function returned a fatal error */ M64ERR_SYSTEM_FAIL, /* A system function call, such as an SDL or file operation, failed */ M64ERR_UNSUPPORTED, /* Function call is not supported (ie, core not built with debugger) */ M64ERR_WRONG_TYPE /* A given input type parameter cannot be used for desired operation */ } m64p_error; typedef enum { M64CAPS_DYNAREC = 1, M64CAPS_DEBUGGER = 2, M64CAPS_CORE_COMPARE = 4 } m64p_core_caps; typedef enum { M64PLUGIN_NULL = 0, M64PLUGIN_RSP = 1, M64PLUGIN_GFX, M64PLUGIN_AUDIO, M64PLUGIN_INPUT, M64PLUGIN_CORE } m64p_plugin_type; typedef enum { M64EMU_STOPPED = 1, M64EMU_RUNNING, M64EMU_PAUSED } m64p_emu_state; typedef enum { M64VIDEO_NONE = 1, M64VIDEO_WINDOWED, M64VIDEO_FULLSCREEN } m64p_video_mode; typedef enum { M64VIDEOFLAG_SUPPORT_RESIZING = 1 } m64p_video_flags; typedef enum { M64CORE_EMU_STATE = 1, M64CORE_VIDEO_MODE, M64CORE_SAVESTATE_SLOT, M64CORE_SPEED_FACTOR, M64CORE_SPEED_LIMITER, M64CORE_VIDEO_SIZE, M64CORE_AUDIO_VOLUME, M64CORE_AUDIO_MUTE, M64CORE_INPUT_GAMESHARK, M64CORE_STATE_LOADCOMPLETE, M64CORE_STATE_SAVECOMPLETE } m64p_core_param; typedef enum { M64CMD_NOP = 0, M64CMD_ROM_OPEN, M64CMD_ROM_CLOSE, M64CMD_ROM_GET_HEADER, M64CMD_ROM_GET_SETTINGS, M64CMD_EXECUTE, M64CMD_STOP, M64CMD_PAUSE, M64CMD_RESUME, M64CMD_CORE_STATE_QUERY, M64CMD_STATE_LOAD, M64CMD_STATE_SAVE, M64CMD_STATE_SET_SLOT, M64CMD_SEND_SDL_KEYDOWN, M64CMD_SEND_SDL_KEYUP, M64CMD_SET_FRAME_CALLBACK, M64CMD_TAKE_NEXT_SCREENSHOT, M64CMD_CORE_STATE_SET, M64CMD_READ_SCREEN, M64CMD_RESET, M64CMD_ADVANCE_FRAME } m64p_command; typedef struct { uint32_t address; int value; } m64p_cheat_code; /* ----------------------------------------- */ /* Structures to hold ROM image information */ /* ----------------------------------------- */ typedef enum { SYSTEM_NTSC = 0, SYSTEM_PAL, SYSTEM_MPAL } m64p_system_type; typedef struct { uint8_t init_PI_BSB_DOM1_LAT_REG; /* 0x00 */ uint8_t init_PI_BSB_DOM1_PGS_REG; /* 0x01 */ uint8_t init_PI_BSB_DOM1_PWD_REG; /* 0x02 */ uint8_t init_PI_BSB_DOM1_PGS_REG2; /* 0x03 */ uint32_t ClockRate; /* 0x04 */ uint32_t PC; /* 0x08 */ uint32_t Release; /* 0x0C */ uint32_t CRC1; /* 0x10 */ uint32_t CRC2; /* 0x14 */ uint32_t Unknown[2]; /* 0x18 */ uint8_t Name[20]; /* 0x20 */ uint32_t unknown; /* 0x34 */ uint32_t Manufacturer_ID; /* 0x38 */ uint16_t Cartridge_ID; /* 0x3C - Game serial number */ uint16_t Country_code; /* 0x3E */ } m64p_rom_header; typedef struct { char goodname[256]; char MD5[33]; unsigned char savetype; unsigned char status; /* Rom status on a scale from 0-5. */ unsigned char players; /* Local players 0-4, 2/3/4 way Netplay indicated by 5/6/7. */ unsigned char rumble; /* 0 - No, 1 - Yes boolean for rumble support. */ } m64p_rom_settings; /* ----------------------------------------- */ /* Structures and Types for the Debugger */ /* ----------------------------------------- */ typedef enum { M64P_DBG_RUN_STATE = 1, M64P_DBG_PREVIOUS_PC, M64P_DBG_NUM_BREAKPOINTS, M64P_DBG_CPU_DYNACORE, M64P_DBG_CPU_NEXT_INTERRUPT } m64p_dbg_state; typedef enum { M64P_DBG_RUNSTATE_PAUSED = 0, M64P_DBG_RUNSTATE_STEPPING, M64P_DBG_RUNSTATE_RUNNING } m64p_dbg_runstate; typedef enum { M64P_DBG_MEM_TYPE = 1, M64P_DBG_MEM_FLAGS, M64P_DBG_MEM_HAS_RECOMPILED, M64P_DBG_MEM_NUM_RECOMPILED, M64P_DBG_RECOMP_OPCODE = 16, M64P_DBG_RECOMP_ARGS, M64P_DBG_RECOMP_ADDR } m64p_dbg_mem_info; typedef enum { M64P_MEM_NOMEM = 0, M64P_MEM_NOTHING, M64P_MEM_RDRAM, M64P_MEM_RDRAMREG, M64P_MEM_RSPMEM, M64P_MEM_RSPREG, M64P_MEM_RSP, M64P_MEM_DP, M64P_MEM_DPS, M64P_MEM_VI, M64P_MEM_AI, M64P_MEM_PI, M64P_MEM_RI, M64P_MEM_SI, M64P_MEM_FLASHRAMSTAT, M64P_MEM_ROM, M64P_MEM_PIF, M64P_MEM_MI, M64P_MEM_BREAKPOINT } m64p_dbg_mem_type; typedef enum { M64P_MEM_FLAG_READABLE = 0x01, M64P_MEM_FLAG_WRITABLE = 0x02, M64P_MEM_FLAG_READABLE_EMUONLY = 0x04, /* the EMUONLY flags signify that emulated code can read/write here, but debugger cannot */ M64P_MEM_FLAG_WRITABLE_EMUONLY = 0x08 } m64p_dbg_mem_flags; typedef enum { M64P_DBG_PTR_RDRAM = 1, M64P_DBG_PTR_PI_REG, M64P_DBG_PTR_SI_REG, M64P_DBG_PTR_VI_REG, M64P_DBG_PTR_RI_REG, M64P_DBG_PTR_AI_REG } m64p_dbg_memptr_type; typedef enum { M64P_CPU_PC = 1, M64P_CPU_REG_REG, M64P_CPU_REG_HI, M64P_CPU_REG_LO, M64P_CPU_REG_COP0, M64P_CPU_REG_COP1_DOUBLE_PTR, M64P_CPU_REG_COP1_SIMPLE_PTR, M64P_CPU_REG_COP1_FGR_64, M64P_CPU_TLB } m64p_dbg_cpu_data; typedef enum { M64P_BKP_CMD_ADD_ADDR = 1, M64P_BKP_CMD_ADD_STRUCT, M64P_BKP_CMD_REPLACE, M64P_BKP_CMD_REMOVE_ADDR, M64P_BKP_CMD_REMOVE_IDX, M64P_BKP_CMD_ENABLE, M64P_BKP_CMD_DISABLE, M64P_BKP_CMD_CHECK } m64p_dbg_bkp_command; #define M64P_MEM_INVALID 0xFFFFFFFF /* invalid memory read will return this */ #define BREAKPOINTS_MAX_NUMBER 128 typedef enum { M64P_BKP_FLAG_ENABLED = 0x01, M64P_BKP_FLAG_READ = 0x02, M64P_BKP_FLAG_WRITE = 0x04, M64P_BKP_FLAG_EXEC = 0x08, M64P_BKP_FLAG_LOG = 0x10 /* Log to the console when this breakpoint hits */ } m64p_dbg_bkp_flags; #define BPT_CHECK_FLAG(a, b) ((a.flags & b) == b) #define BPT_SET_FLAG(a, b) a.flags = (a.flags | b); #define BPT_CLEAR_FLAG(a, b) a.flags = (a.flags & (~b)); #define BPT_TOGGLE_FLAG(a, b) a.flags = (a.flags ^ b); typedef struct { uint32_t address; uint32_t endaddr; unsigned int flags; } m64p_breakpoint; /* ------------------------------------------------- */ /* Structures and Types for Core Video Extension API */ /* ------------------------------------------------- */ typedef struct { unsigned int uiWidth; unsigned int uiHeight; } m64p_2d_size; typedef enum { M64P_GL_DOUBLEBUFFER = 1, M64P_GL_BUFFER_SIZE, M64P_GL_DEPTH_SIZE, M64P_GL_RED_SIZE, M64P_GL_GREEN_SIZE, M64P_GL_BLUE_SIZE, M64P_GL_ALPHA_SIZE, M64P_GL_SWAP_CONTROL, M64P_GL_MULTISAMPLEBUFFERS, M64P_GL_MULTISAMPLESAMPLES, M64P_GL_CONTEXT_MAJOR_VERSION, M64P_GL_CONTEXT_MINOR_VERSION, M64P_GL_CONTEXT_PROFILE_MASK } m64p_GLattr; typedef enum { M64P_GL_CONTEXT_PROFILE_CORE, M64P_GL_CONTEXT_PROFILE_COMPATIBILITY, M64P_GL_CONTEXT_PROFILE_ES } m64p_GLContextType; typedef struct { unsigned int Functions; m64p_error (*VidExtFuncInit)(void); m64p_error (*VidExtFuncQuit)(void); m64p_error (*VidExtFuncListModes)(m64p_2d_size *, int *); m64p_error (*VidExtFuncSetMode)(int, int, int, int, int); void * (*VidExtFuncGLGetProc)(const char*); m64p_error (*VidExtFuncGLSetAttr)(m64p_GLattr, int); m64p_error (*VidExtFuncGLGetAttr)(m64p_GLattr, int *); m64p_error (*VidExtFuncGLSwapBuf)(void); m64p_error (*VidExtFuncSetCaption)(const char *); m64p_error (*VidExtFuncToggleFS)(void); m64p_error (*VidExtFuncResizeWindow)(int, int); } m64p_video_extension_functions; #endif /* define M64P_TYPES_H */ mupen64plus-core-src-2.5/src/api/m64p_vidext.h000066400000000000000000000131061251723631200211620ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - m64p_vidext.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This header file defines typedefs for function pointers to the core's * video extension functions. */ #if !defined(M64P_VIDEXT_H) #define M64P_VIDEXT_H #include "m64p_types.h" #ifdef __cplusplus extern "C" { #endif /* VidExt_Init() * * This function should be called from within the InitiateGFX() video plugin * function call. The default SDL implementation of this function simply calls * SDL_InitSubSystem(SDL_INIT_VIDEO). It does not open a rendering window or * switch video modes. */ typedef m64p_error (*ptr_VidExt_Init)(void); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL VidExt_Init(void); #endif /* VidExt_Quit() * * This function closes any open rendering window and shuts down the video * system. The default SDL implementation of this function calls * SDL_QuitSubSystem(SDL_INIT_VIDEO). This function should be called from * within the RomClose() video plugin function. */ typedef m64p_error (*ptr_VidExt_Quit)(void); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL VidExt_Quit(void); #endif /* VidExt_ListFullscreenModes() * * This function is used to enumerate the available resolutions for fullscreen * video modes. A pointer to an array is passed into the function, which is * then filled with resolution sizes. */ typedef m64p_error (*ptr_VidExt_ListFullscreenModes)(m64p_2d_size *, int *); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL VidExt_ListFullscreenModes(m64p_2d_size *, int *); #endif /* VidExt_SetVideoMode() * * This function creates a rendering window or switches into a fullscreen * video mode. Any desired OpenGL attributes should be set before calling * this function. */ typedef m64p_error (*ptr_VidExt_SetVideoMode)(int, int, int, m64p_video_mode, m64p_video_flags); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL VidExt_SetVideoMode(int, int, int, m64p_video_mode, m64p_video_flags); #endif /* VidExt_ResizeWindow() * * This function resizes the opengl rendering window to match the given size. */ typedef m64p_error (*ptr_VidExt_ResizeWindow)(int, int); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL VidExt_ResizeWindow(int, int); #endif /* VidExt_SetCaption() * * This function sets the caption text of the emulator rendering window. */ typedef m64p_error (*ptr_VidExt_SetCaption)(const char *); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL VidExt_SetCaption(const char *); #endif /* VidExt_ToggleFullScreen() * * This function toggles between fullscreen and windowed rendering modes. */ typedef m64p_error (*ptr_VidExt_ToggleFullScreen)(void); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL VidExt_ToggleFullScreen(void); #endif /* VidExt_GL_GetProcAddress() * * This function is used to get a pointer to an OpenGL extension function. This * is only necessary on the Windows platform, because the OpenGL implementation * shipped with Windows only supports OpenGL version 1.1. */ typedef void * (*ptr_VidExt_GL_GetProcAddress)(const char *); #if defined(M64P_CORE_PROTOTYPES) EXPORT void * CALL VidExt_GL_GetProcAddress(const char *); #endif /* VidExt_GL_SetAttribute() * * This function is used to set certain OpenGL attributes which must be * specified before creating the rendering window with VidExt_SetVideoMode. */ typedef m64p_error (*ptr_VidExt_GL_SetAttribute)(m64p_GLattr, int); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL VidExt_GL_SetAttribute(m64p_GLattr, int); #endif /* VidExt_GL_GetAttribute() * * This function is used to get the value of OpenGL attributes. These values may * be changed when calling VidExt_SetVideoMode. */ typedef m64p_error (*ptr_VidExt_GL_GetAttribute)(m64p_GLattr, int *); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL VidExt_GL_GetAttribute(m64p_GLattr, int *); #endif /* VidExt_GL_SwapBuffers() * * This function is used to swap the front/back buffers after rendering an * output video frame. */ typedef m64p_error (*ptr_VidExt_GL_SwapBuffers)(void); #if defined(M64P_CORE_PROTOTYPES) EXPORT m64p_error CALL VidExt_GL_SwapBuffers(void); #endif #ifdef __cplusplus } #endif #endif /* #define M64P_VIDEXT_H */ mupen64plus-core-src-2.5/src/api/vidext.c000066400000000000000000000404101251723631200203050ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - api/vidext.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the Core video extension functions which will be exported * outside of the core library. */ #include #include #include #define M64P_CORE_PROTOTYPES 1 #include "../osd/osd.h" #include "callbacks.h" #include "m64p_types.h" #include "m64p_vidext.h" #include "vidext.h" #if SDL_VERSION_ATLEAST(2,0,0) #include "vidext_sdl2_compat.h" #endif /* local variables */ static m64p_video_extension_functions l_ExternalVideoFuncTable = {11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; static int l_VideoExtensionActive = 0; static int l_VideoOutputActive = 0; static int l_Fullscreen = 0; static SDL_Surface *l_pScreen = NULL; /* global function for use by frontend.c */ m64p_error OverrideVideoFunctions(m64p_video_extension_functions *VideoFunctionStruct) { /* check input data */ if (VideoFunctionStruct == NULL) return M64ERR_INPUT_ASSERT; if (VideoFunctionStruct->Functions < 11) return M64ERR_INPUT_INVALID; /* disable video extension if any of the function pointers are NULL */ if (VideoFunctionStruct->VidExtFuncInit == NULL || VideoFunctionStruct->VidExtFuncQuit == NULL || VideoFunctionStruct->VidExtFuncListModes == NULL || VideoFunctionStruct->VidExtFuncSetMode == NULL || VideoFunctionStruct->VidExtFuncGLGetProc == NULL || VideoFunctionStruct->VidExtFuncGLSetAttr == NULL || VideoFunctionStruct->VidExtFuncGLGetAttr == NULL || VideoFunctionStruct->VidExtFuncGLSwapBuf == NULL || VideoFunctionStruct->VidExtFuncSetCaption == NULL || VideoFunctionStruct->VidExtFuncToggleFS == NULL || VideoFunctionStruct->VidExtFuncResizeWindow == NULL) { l_ExternalVideoFuncTable.Functions = 11; memset(&l_ExternalVideoFuncTable.VidExtFuncInit, 0, 11 * sizeof(void *)); l_VideoExtensionActive = 0; return M64ERR_SUCCESS; } /* otherwise copy in the override function pointers */ memcpy(&l_ExternalVideoFuncTable, VideoFunctionStruct, sizeof(m64p_video_extension_functions)); l_VideoExtensionActive = 1; return M64ERR_SUCCESS; } int VidExt_InFullscreenMode(void) { return l_Fullscreen; } int VidExt_VideoRunning(void) { return l_VideoOutputActive; } /* video extension functions to be called by the video plugin */ EXPORT m64p_error CALL VidExt_Init(void) { /* call video extension override if necessary */ if (l_VideoExtensionActive) return (*l_ExternalVideoFuncTable.VidExtFuncInit)(); if (SDL_InitSubSystem(SDL_INIT_VIDEO) == -1) { DebugMessage(M64MSG_ERROR, "SDL video subsystem init failed: %s", SDL_GetError()); return M64ERR_SYSTEM_FAIL; } return M64ERR_SUCCESS; } EXPORT m64p_error CALL VidExt_Quit(void) { /* call video extension override if necessary */ if (l_VideoExtensionActive) { m64p_error rval = (*l_ExternalVideoFuncTable.VidExtFuncQuit)(); if (rval == M64ERR_SUCCESS) { l_VideoOutputActive = 0; StateChanged(M64CORE_VIDEO_MODE, M64VIDEO_NONE); } return rval; } if (!SDL_WasInit(SDL_INIT_VIDEO)) return M64ERR_NOT_INIT; SDL_ShowCursor(SDL_ENABLE); #if SDL_VERSION_ATLEAST(2,0,0) SDL2_DestroyWindow(); #endif SDL_QuitSubSystem(SDL_INIT_VIDEO); l_pScreen = NULL; l_VideoOutputActive = 0; StateChanged(M64CORE_VIDEO_MODE, M64VIDEO_NONE); return M64ERR_SUCCESS; } EXPORT m64p_error CALL VidExt_ListFullscreenModes(m64p_2d_size *SizeArray, int *NumSizes) { const SDL_VideoInfo *videoInfo; unsigned int videoFlags; SDL_Rect **modes; int i; /* call video extension override if necessary */ if (l_VideoExtensionActive) return (*l_ExternalVideoFuncTable.VidExtFuncListModes)(SizeArray, NumSizes); if (!SDL_WasInit(SDL_INIT_VIDEO)) return M64ERR_NOT_INIT; /* get a list of SDL video modes */ videoFlags = SDL_OPENGL | SDL_FULLSCREEN; if ((videoInfo = SDL_GetVideoInfo()) == NULL) { DebugMessage(M64MSG_ERROR, "SDL_GetVideoInfo query failed: %s", SDL_GetError()); return M64ERR_SYSTEM_FAIL; } if(videoInfo->hw_available) videoFlags |= SDL_HWSURFACE; else videoFlags |= SDL_SWSURFACE; modes = SDL_ListModes(NULL, videoFlags); if (modes == (SDL_Rect **) 0 || modes == (SDL_Rect **) -1) { DebugMessage(M64MSG_WARNING, "No fullscreen SDL video modes available"); *NumSizes = 0; return M64ERR_SUCCESS; } i = 0; while (i < *NumSizes && modes[i] != NULL) { SizeArray[i].uiWidth = modes[i]->w; SizeArray[i].uiHeight = modes[i]->h; i++; } *NumSizes = i; return M64ERR_SUCCESS; } EXPORT m64p_error CALL VidExt_SetVideoMode(int Width, int Height, int BitsPerPixel, m64p_video_mode ScreenMode, m64p_video_flags Flags) { const SDL_VideoInfo *videoInfo; int videoFlags = 0; /* call video extension override if necessary */ if (l_VideoExtensionActive) { m64p_error rval = (*l_ExternalVideoFuncTable.VidExtFuncSetMode)(Width, Height, BitsPerPixel, ScreenMode, Flags); l_Fullscreen = (rval == M64ERR_SUCCESS && ScreenMode == M64VIDEO_FULLSCREEN); l_VideoOutputActive = (rval == M64ERR_SUCCESS); if (l_VideoOutputActive) { StateChanged(M64CORE_VIDEO_MODE, ScreenMode); StateChanged(M64CORE_VIDEO_SIZE, (Width << 16) | Height); } return rval; } if (!SDL_WasInit(SDL_INIT_VIDEO)) return M64ERR_NOT_INIT; /* Get SDL video flags to use */ if (ScreenMode == M64VIDEO_WINDOWED) { videoFlags = SDL_OPENGL; if (Flags & M64VIDEOFLAG_SUPPORT_RESIZING) videoFlags |= SDL_RESIZABLE; } else if (ScreenMode == M64VIDEO_FULLSCREEN) { videoFlags = SDL_OPENGL | SDL_FULLSCREEN; } else { return M64ERR_INPUT_INVALID; } if ((videoInfo = SDL_GetVideoInfo()) == NULL) { DebugMessage(M64MSG_ERROR, "SDL_GetVideoInfo query failed: %s", SDL_GetError()); return M64ERR_SYSTEM_FAIL; } if (videoInfo->hw_available) videoFlags |= SDL_HWSURFACE; else videoFlags |= SDL_SWSURFACE; /* set the mode */ if (BitsPerPixel > 0) DebugMessage(M64MSG_INFO, "Setting %i-bit video mode: %ix%i", BitsPerPixel, Width, Height); else DebugMessage(M64MSG_INFO, "Setting video mode: %ix%i", Width, Height); l_pScreen = SDL_SetVideoMode(Width, Height, BitsPerPixel, videoFlags); if (l_pScreen == NULL) { DebugMessage(M64MSG_ERROR, "SDL_SetVideoMode failed: %s", SDL_GetError()); return M64ERR_SYSTEM_FAIL; } SDL_ShowCursor(SDL_DISABLE); l_Fullscreen = (ScreenMode == M64VIDEO_FULLSCREEN); l_VideoOutputActive = 1; StateChanged(M64CORE_VIDEO_MODE, ScreenMode); StateChanged(M64CORE_VIDEO_SIZE, (Width << 16) | Height); return M64ERR_SUCCESS; } EXPORT m64p_error CALL VidExt_ResizeWindow(int Width, int Height) { const SDL_VideoInfo *videoInfo; int videoFlags = 0; /* call video extension override if necessary */ if (l_VideoExtensionActive) { m64p_error rval; // shut down the OSD osd_exit(); // re-create the OGL context rval = (*l_ExternalVideoFuncTable.VidExtFuncResizeWindow)(Width, Height); if (rval == M64ERR_SUCCESS) { StateChanged(M64CORE_VIDEO_SIZE, (Width << 16) | Height); // re-create the On-Screen Display osd_init(Width, Height); } return rval; } if (!l_VideoOutputActive || !SDL_WasInit(SDL_INIT_VIDEO)) return M64ERR_NOT_INIT; if (l_Fullscreen) { DebugMessage(M64MSG_ERROR, "VidExt_ResizeWindow() called in fullscreen mode."); return M64ERR_INVALID_STATE; } /* Get SDL video flags to use */ videoFlags = SDL_OPENGL | SDL_RESIZABLE; if ((videoInfo = SDL_GetVideoInfo()) == NULL) { DebugMessage(M64MSG_ERROR, "SDL_GetVideoInfo query failed: %s", SDL_GetError()); return M64ERR_SYSTEM_FAIL; } if (videoInfo->hw_available) videoFlags |= SDL_HWSURFACE; else videoFlags |= SDL_SWSURFACE; // destroy the On-Screen Display osd_exit(); /* set the re-sizing the screen will create a new OpenGL context */ l_pScreen = SDL_SetVideoMode(Width, Height, 0, videoFlags); if (l_pScreen == NULL) { DebugMessage(M64MSG_ERROR, "SDL_SetVideoMode failed: %s", SDL_GetError()); return M64ERR_SYSTEM_FAIL; } StateChanged(M64CORE_VIDEO_SIZE, (Width << 16) | Height); // re-create the On-Screen Display osd_init(Width, Height); return M64ERR_SUCCESS; } EXPORT m64p_error CALL VidExt_SetCaption(const char *Title) { /* call video extension override if necessary */ if (l_VideoExtensionActive) return (*l_ExternalVideoFuncTable.VidExtFuncSetCaption)(Title); if (!SDL_WasInit(SDL_INIT_VIDEO)) return M64ERR_NOT_INIT; SDL_WM_SetCaption(Title, "M64+ Video"); return M64ERR_SUCCESS; } EXPORT m64p_error CALL VidExt_ToggleFullScreen(void) { /* call video extension override if necessary */ if (l_VideoExtensionActive) { m64p_error rval = (*l_ExternalVideoFuncTable.VidExtFuncToggleFS)(); if (rval == M64ERR_SUCCESS) { l_Fullscreen = !l_Fullscreen; StateChanged(M64CORE_VIDEO_MODE, l_Fullscreen ? M64VIDEO_FULLSCREEN : M64VIDEO_WINDOWED); } return rval; } if (!SDL_WasInit(SDL_INIT_VIDEO)) return M64ERR_NOT_INIT; /* TODO: * SDL_WM_ToggleFullScreen doesn't work under Windows and others * (see http://wiki.libsdl.org/moin.cgi/FAQWindows for explanation). * Instead, we should call SDL_SetVideoMode with the SDL_FULLSCREEN flag. * (see http://sdl.beuc.net/sdl.wiki/SDL_SetVideoMode), but on Windows * this resets the OpenGL context and video plugins don't support it yet. * Uncomment the next line to test it: */ //return VidExt_SetVideoMode(l_pScreen->w, l_pScreen->h, l_pScreen->format->BitsPerPixel, l_Fullscreen ? M64VIDEO_WINDOWED : M64VIDEO_FULLSCREEN); if (SDL_WM_ToggleFullScreen(l_pScreen) == 1) { l_Fullscreen = !l_Fullscreen; StateChanged(M64CORE_VIDEO_MODE, l_Fullscreen ? M64VIDEO_FULLSCREEN : M64VIDEO_WINDOWED); return M64ERR_SUCCESS; } return M64ERR_SYSTEM_FAIL; } EXPORT void * CALL VidExt_GL_GetProcAddress(const char* Proc) { /* call video extension override if necessary */ if (l_VideoExtensionActive) return (*l_ExternalVideoFuncTable.VidExtFuncGLGetProc)(Proc); if (!SDL_WasInit(SDL_INIT_VIDEO)) return NULL; return SDL_GL_GetProcAddress(Proc); } typedef struct { m64p_GLattr m64Attr; SDL_GLattr sdlAttr; } GLAttrMapNode; static const GLAttrMapNode GLAttrMap[] = { { M64P_GL_DOUBLEBUFFER, SDL_GL_DOUBLEBUFFER }, { M64P_GL_BUFFER_SIZE, SDL_GL_BUFFER_SIZE }, { M64P_GL_DEPTH_SIZE, SDL_GL_DEPTH_SIZE }, { M64P_GL_RED_SIZE, SDL_GL_RED_SIZE }, { M64P_GL_GREEN_SIZE, SDL_GL_GREEN_SIZE }, { M64P_GL_BLUE_SIZE, SDL_GL_BLUE_SIZE }, { M64P_GL_ALPHA_SIZE, SDL_GL_ALPHA_SIZE }, #if SDL_VERSION_ATLEAST(1,3,0) { M64P_GL_SWAP_CONTROL, SDL_RENDERER_PRESENTVSYNC }, #else { M64P_GL_SWAP_CONTROL, SDL_GL_SWAP_CONTROL }, #endif { M64P_GL_MULTISAMPLEBUFFERS, SDL_GL_MULTISAMPLEBUFFERS }, { M64P_GL_MULTISAMPLESAMPLES, SDL_GL_MULTISAMPLESAMPLES } #if SDL_VERSION_ATLEAST(2,0,0) ,{ M64P_GL_CONTEXT_MAJOR_VERSION, SDL_GL_CONTEXT_MAJOR_VERSION }, { M64P_GL_CONTEXT_MINOR_VERSION, SDL_GL_CONTEXT_MINOR_VERSION }, { M64P_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_MASK } #endif }; static const int mapSize = sizeof(GLAttrMap) / sizeof(GLAttrMapNode); EXPORT m64p_error CALL VidExt_GL_SetAttribute(m64p_GLattr Attr, int Value) { int i; /* call video extension override if necessary */ if (l_VideoExtensionActive) return (*l_ExternalVideoFuncTable.VidExtFuncGLSetAttr)(Attr, Value); if (!SDL_WasInit(SDL_INIT_VIDEO)) return M64ERR_NOT_INIT; /* translate the GL context type mask if necessary */ #if SDL_VERSION_ATLEAST(2,0,0) if (Attr == M64P_GL_CONTEXT_PROFILE_MASK) { switch (Value) { case M64P_GL_CONTEXT_PROFILE_CORE: Value = SDL_GL_CONTEXT_PROFILE_CORE; break; case M64P_GL_CONTEXT_PROFILE_COMPATIBILITY: Value = SDL_GL_CONTEXT_PROFILE_COMPATIBILITY; break; case M64P_GL_CONTEXT_PROFILE_ES: Value = SDL_GL_CONTEXT_PROFILE_ES; break; default: Value = 0; } } #endif for (i = 0; i < mapSize; i++) { if (GLAttrMap[i].m64Attr == Attr) { if (SDL_GL_SetAttribute(GLAttrMap[i].sdlAttr, Value) != 0) return M64ERR_SYSTEM_FAIL; return M64ERR_SUCCESS; } } return M64ERR_INPUT_INVALID; } EXPORT m64p_error CALL VidExt_GL_GetAttribute(m64p_GLattr Attr, int *pValue) { int i; /* call video extension override if necessary */ if (l_VideoExtensionActive) return (*l_ExternalVideoFuncTable.VidExtFuncGLGetAttr)(Attr, pValue); if (!SDL_WasInit(SDL_INIT_VIDEO)) return M64ERR_NOT_INIT; for (i = 0; i < mapSize; i++) { if (GLAttrMap[i].m64Attr == Attr) { int NewValue = 0; if (SDL_GL_GetAttribute(GLAttrMap[i].sdlAttr, &NewValue) != 0) return M64ERR_SYSTEM_FAIL; /* translate the GL context type mask if necessary */ #if SDL_VERSION_ATLEAST(2,0,0) if (Attr == M64P_GL_CONTEXT_PROFILE_MASK) { switch (NewValue) { case SDL_GL_CONTEXT_PROFILE_CORE: NewValue = M64P_GL_CONTEXT_PROFILE_CORE; break; case SDL_GL_CONTEXT_PROFILE_COMPATIBILITY: NewValue = M64P_GL_CONTEXT_PROFILE_COMPATIBILITY; break; case SDL_GL_CONTEXT_PROFILE_ES: NewValue = M64P_GL_CONTEXT_PROFILE_ES; break; default: NewValue = 0; } } #endif *pValue = NewValue; return M64ERR_SUCCESS; } } return M64ERR_INPUT_INVALID; } EXPORT m64p_error CALL VidExt_GL_SwapBuffers(void) { /* call video extension override if necessary */ if (l_VideoExtensionActive) return (*l_ExternalVideoFuncTable.VidExtFuncGLSwapBuf)(); if (!SDL_WasInit(SDL_INIT_VIDEO)) return M64ERR_NOT_INIT; SDL_GL_SwapBuffers(); return M64ERR_SUCCESS; } mupen64plus-core-src-2.5/src/api/vidext.h000066400000000000000000000040151251723631200203130ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - api/vidext.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the definitions for the video extension functions which * will be called from other Core modules. */ #if !defined(API_VIDEXT_H) #define API_VIDEXT_H #include "m64p_types.h" /* global function for use by frontend.c */ extern m64p_error OverrideVideoFunctions(m64p_video_extension_functions *VideoFunctionStruct); /* these functions are only used by the core */ extern int VidExt_InFullscreenMode(void); extern int VidExt_VideoRunning(void); #endif /* API_VIDEXT_H */ mupen64plus-core-src-2.5/src/api/vidext_sdl2_compat.h000066400000000000000000000314301251723631200226030ustar00rootroot00000000000000/* Simple DirectMedia Layer Copyright (C) 1997-2012 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #include #include #ifndef USE_GLES #ifndef SDL_VIDEO_OPENGL #error SDL is not build with OpenGL support. Try USE_GLES=1 #endif #else // !USE_GLES #ifndef SDL_VIDEO_OPENGL_ES2 #error SDL is not build with OpenGL ES2 support. Try USE_GLES=0 #endif #endif // !USE_GLES typedef struct SDL_VideoInfo { Uint32 hw_available:1; Uint32 wm_available:1; Uint32 UnusedBits1:6; Uint32 UnusedBits2:1; Uint32 blit_hw:1; Uint32 blit_hw_CC:1; Uint32 blit_hw_A:1; Uint32 blit_sw:1; Uint32 blit_sw_CC:1; Uint32 blit_sw_A:1; Uint32 blit_fill:1; Uint32 UnusedBits3:16; Uint32 video_mem; SDL_PixelFormat *vfmt; int current_w; int current_h; } SDL_VideoInfo; #define SDL_FULLSCREEN 0x00800000 #define SDL_RESIZABLE 0x01000000 #define SDL_NOFRAME 0x02000000 #define SDL_OPENGL 0x04000000 #define SDL_HWSURFACE 0x08000001 /**< \note Not used */ #define SDL_BUTTON_WHEELUP 4 #define SDL_BUTTON_WHEELDOWN 5 int initialized_video = 0; static SDL_Window *SDL_VideoWindow = NULL; static SDL_Surface *SDL_VideoSurface = NULL; static SDL_Surface *SDL_PublicSurface = NULL; static SDL_Rect SDL_VideoViewport; static char *wm_title = NULL; static Uint32 SDL_VideoFlags = 0; static SDL_GLContext *SDL_VideoContext = NULL; static SDL_Surface *SDL_VideoIcon; static void SDL_WM_SetCaption(const char *title, const char *icon) { if (wm_title) { SDL_free(wm_title); } if (title) { wm_title = SDL_strdup(title); } else { wm_title = NULL; } SDL_SetWindowTitle(SDL_VideoWindow, wm_title); } static int GetVideoDisplay() { const char *variable = SDL_getenv("SDL_VIDEO_FULLSCREEN_DISPLAY"); if ( !variable ) { variable = SDL_getenv("SDL_VIDEO_FULLSCREEN_HEAD"); } if ( variable ) { return SDL_atoi(variable); } else { return 0; } } static const SDL_VideoInfo * SDL_GetVideoInfo(void) { static SDL_VideoInfo info; SDL_DisplayMode mode; /* Memory leak, compatibility code, who cares? */ if (!info.vfmt && SDL_GetDesktopDisplayMode(GetVideoDisplay(), &mode) == 0) { info.vfmt = SDL_AllocFormat(mode.format); info.current_w = mode.w; info.current_h = mode.h; } return &info; } static SDL_Rect ** SDL_ListModes(const SDL_PixelFormat * format, Uint32 flags) { int i, nmodes; SDL_Rect **modes; if (!initialized_video) { return NULL; } if (!(flags & SDL_FULLSCREEN)) { return (SDL_Rect **) (-1); } if (!format) { format = SDL_GetVideoInfo()->vfmt; } /* Memory leak, but this is a compatibility function, who cares? */ nmodes = 0; modes = NULL; for (i = 0; i < SDL_GetNumDisplayModes(GetVideoDisplay()); ++i) { SDL_DisplayMode mode; int bpp; SDL_GetDisplayMode(GetVideoDisplay(), i, &mode); if (!mode.w || !mode.h) { return (SDL_Rect **) (-1); } /* Copied from src/video/SDL_pixels.c:SDL_PixelFormatEnumToMasks */ if (SDL_BYTESPERPIXEL(mode.format) <= 2) { bpp = SDL_BITSPERPIXEL(mode.format); } else { bpp = SDL_BYTESPERPIXEL(mode.format) * 8; } if (bpp != format->BitsPerPixel) { continue; } if (nmodes > 0 && modes[nmodes - 1]->w == mode.w && modes[nmodes - 1]->h == mode.h) { continue; } modes = SDL_realloc(modes, (nmodes + 2) * sizeof(*modes)); if (!modes) { return NULL; } modes[nmodes] = (SDL_Rect *) SDL_malloc(sizeof(SDL_Rect)); if (!modes[nmodes]) { return NULL; } modes[nmodes]->x = 0; modes[nmodes]->y = 0; modes[nmodes]->w = mode.w; modes[nmodes]->h = mode.h; ++nmodes; } if (modes) { modes[nmodes] = NULL; } return modes; } static void SDL_GL_SwapBuffers(void) { SDL_GL_SwapWindow(SDL_VideoWindow); } static int SDL_WM_ToggleFullScreen(SDL_Surface * surface) { int window_w; int window_h; if (!SDL_PublicSurface) { SDL_SetError("SDL_SetVideoMode() hasn't been called"); return 0; } /* Do the physical mode switch */ if (SDL_GetWindowFlags(SDL_VideoWindow) & SDL_WINDOW_FULLSCREEN) { if (SDL_SetWindowFullscreen(SDL_VideoWindow, 0) < 0) { return 0; } SDL_PublicSurface->flags &= ~SDL_FULLSCREEN; } else { if (SDL_SetWindowFullscreen(SDL_VideoWindow, 1) < 0) { return 0; } SDL_PublicSurface->flags |= SDL_FULLSCREEN; } /* Center the public surface in the window surface */ SDL_GetWindowSize(SDL_VideoWindow, &window_w, &window_h); SDL_VideoViewport.x = 0; SDL_VideoViewport.y = 0; SDL_VideoViewport.w = window_w; SDL_VideoViewport.h = window_h; /* We're done! */ return 1; } static int SDL_ResizeVideoMode(int width, int height, int bpp, Uint32 flags) { int w, h; /* We can't resize something we don't have... */ if (!SDL_PublicSurface) { return -1; } /* We probably have to recreate the window in fullscreen mode */ if (flags & SDL_FULLSCREEN) { return -1; } /* I don't think there's any change we can gracefully make in flags */ if (flags != SDL_VideoFlags) { return -1; } if (bpp != SDL_VideoSurface->format->BitsPerPixel) { return -1; } /* Resize the window */ SDL_GetWindowSize(SDL_VideoWindow, &w, &h); if (w != width || h != height) { SDL_SetWindowSize(SDL_VideoWindow, width, height); } SDL_VideoSurface->w = width; SDL_VideoSurface->h = height; return 0; } static int SDL_CompatEventFilter(void *userdata, SDL_Event * event) { SDL_Event fake; switch (event->type) { case SDL_WINDOWEVENT: switch (event->window.event) { case SDL_WINDOWEVENT_CLOSE: fake.type = SDL_QUIT; SDL_PushEvent(&fake); break; } case SDL_TEXTINPUT: { /* FIXME: Generate an old style key repeat event if needed */ //printf("TEXTINPUT: '%s'\n", event->text.text); break; } case SDL_MOUSEMOTION: { event->motion.x -= SDL_VideoViewport.x; event->motion.y -= SDL_VideoViewport.y; break; } case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONUP: { event->button.x -= SDL_VideoViewport.x; event->button.y -= SDL_VideoViewport.y; break; } case SDL_MOUSEWHEEL: { Uint8 button; int x, y; if (event->wheel.y == 0) { break; } SDL_GetMouseState(&x, &y); if (event->wheel.y > 0) { button = SDL_BUTTON_WHEELUP; } else { button = SDL_BUTTON_WHEELDOWN; } fake.button.button = button; fake.button.x = x; fake.button.y = y; fake.button.windowID = event->wheel.windowID; fake.type = SDL_MOUSEBUTTONDOWN; fake.button.state = SDL_PRESSED; SDL_PushEvent(&fake); fake.type = SDL_MOUSEBUTTONUP; fake.button.state = SDL_RELEASED; SDL_PushEvent(&fake); break; } } return 1; } static void GetEnvironmentWindowPosition(int w, int h, int *x, int *y) { int display = GetVideoDisplay(); const char *window = SDL_getenv("SDL_VIDEO_WINDOW_POS"); const char *center = SDL_getenv("SDL_VIDEO_CENTERED"); if (window) { if (SDL_sscanf(window, "%d,%d", x, y) == 2) { return; } if (SDL_strcmp(window, "center") == 0) { center = window; } } if (center) { *x = SDL_WINDOWPOS_CENTERED_DISPLAY(display); *y = SDL_WINDOWPOS_CENTERED_DISPLAY(display); } } static void SDL2_DestroyWindow(void) { /* Destroy existing window */ SDL_PublicSurface = NULL; if (SDL_VideoSurface) { SDL_VideoSurface->flags &= ~SDL_DONTFREE; SDL_FreeSurface(SDL_VideoSurface); SDL_VideoSurface = NULL; } if (SDL_VideoContext) { /* SDL_GL_MakeCurrent(0, NULL); *//* Doesn't do anything */ SDL_GL_DeleteContext(SDL_VideoContext); SDL_VideoContext = NULL; } if (SDL_VideoWindow) { SDL_DestroyWindow(SDL_VideoWindow); SDL_VideoWindow = NULL; } } static SDL_Surface * SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) { SDL_DisplayMode desktop_mode; int display = GetVideoDisplay(); int window_x = SDL_WINDOWPOS_UNDEFINED_DISPLAY(display); int window_y = SDL_WINDOWPOS_UNDEFINED_DISPLAY(display); Uint32 window_flags; Uint32 surface_flags; if (!initialized_video) { if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0) { return NULL; } initialized_video = 1; } SDL_GetDesktopDisplayMode(display, &desktop_mode); if (width == 0) { width = desktop_mode.w; } if (height == 0) { height = desktop_mode.h; } if (bpp == 0) { bpp = SDL_BITSPERPIXEL(desktop_mode.format); } /* See if we can simply resize the existing window and surface */ if (SDL_ResizeVideoMode(width, height, bpp, flags) == 0) { return SDL_PublicSurface; } /* Destroy existing window */ if (SDL_VideoWindow) SDL_GetWindowPosition(SDL_VideoWindow, &window_x, &window_y); SDL2_DestroyWindow(); /* Set up the event filter */ if (!SDL_GetEventFilter(NULL, NULL)) { SDL_SetEventFilter(SDL_CompatEventFilter, NULL); } #ifndef USE_GLES SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY); #else // !USE_GLES SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); #endif // !USE_GLES /* Create a new window */ window_flags = SDL_WINDOW_SHOWN; if (flags & SDL_FULLSCREEN) { window_flags |= SDL_WINDOW_FULLSCREEN; } if (flags & SDL_OPENGL) { window_flags |= SDL_WINDOW_OPENGL; } if (flags & SDL_RESIZABLE) { window_flags |= SDL_WINDOW_RESIZABLE; } if (flags & SDL_NOFRAME) { window_flags |= SDL_WINDOW_BORDERLESS; } GetEnvironmentWindowPosition(width, height, &window_x, &window_y); SDL_VideoWindow = SDL_CreateWindow(wm_title, window_x, window_y, width, height, window_flags); if (!SDL_VideoWindow) { return NULL; } SDL_SetWindowIcon(SDL_VideoWindow, SDL_VideoIcon); window_flags = SDL_GetWindowFlags(SDL_VideoWindow); surface_flags = 0; if (window_flags & SDL_WINDOW_FULLSCREEN) { surface_flags |= SDL_FULLSCREEN; } if ((window_flags & SDL_WINDOW_OPENGL) && (flags & SDL_OPENGL)) { surface_flags |= SDL_OPENGL; } if (window_flags & SDL_WINDOW_RESIZABLE) { surface_flags |= SDL_RESIZABLE; } if (window_flags & SDL_WINDOW_BORDERLESS) { surface_flags |= SDL_NOFRAME; } SDL_VideoFlags = flags; /* If we're in OpenGL mode, just create a stub surface and we're done! */ if (flags & SDL_OPENGL) { SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow); if (!SDL_VideoContext) { return NULL; } if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) { return NULL; } SDL_VideoSurface = SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0); if (!SDL_VideoSurface) { return NULL; } SDL_VideoSurface->flags |= surface_flags; SDL_PublicSurface = SDL_VideoSurface; return SDL_PublicSurface; } /* We're finally done! */ return NULL; } mupen64plus-core-src-2.5/src/debugger/000077500000000000000000000000001251723631200176525ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/debugger/dbg_breakpoints.c000066400000000000000000000171721251723631200231630ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dbg_breakpoints.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 DarkJeztr HyperHacker * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "dbg_breakpoints.h" #include "dbg_debugger.h" #include "dbg_types.h" #include "memory/memory.h" #ifdef DBG int g_NumBreakpoints=0; m64p_breakpoint g_Breakpoints[BREAKPOINTS_MAX_NUMBER]; int add_breakpoint( uint32 address ) { if( g_NumBreakpoints == BREAKPOINTS_MAX_NUMBER ) { DebugMessage(M64MSG_ERROR, "BREAKPOINTS_MAX_NUMBER have been reached."); return -1; } g_Breakpoints[g_NumBreakpoints].address=address; g_Breakpoints[g_NumBreakpoints].endaddr=address; BPT_SET_FLAG(g_Breakpoints[g_NumBreakpoints], M64P_BKP_FLAG_EXEC); enable_breakpoint(g_NumBreakpoints); return g_NumBreakpoints++; } int add_breakpoint_struct(m64p_breakpoint *newbp) { if( g_NumBreakpoints == BREAKPOINTS_MAX_NUMBER ) { DebugMessage(M64MSG_ERROR, "BREAKPOINTS_MAX_NUMBER have been reached."); return -1; } memcpy(&g_Breakpoints[g_NumBreakpoints], newbp, sizeof(m64p_breakpoint)); if (BPT_CHECK_FLAG(g_Breakpoints[g_NumBreakpoints], M64P_BKP_FLAG_ENABLED)) { BPT_CLEAR_FLAG(g_Breakpoints[g_NumBreakpoints], M64P_BKP_FLAG_ENABLED); enable_breakpoint( g_NumBreakpoints ); } return g_NumBreakpoints++; } void enable_breakpoint( int bpt) { m64p_breakpoint *curBpt = g_Breakpoints + bpt; uint64 bptAddr; if (BPT_CHECK_FLAG((*curBpt), M64P_BKP_FLAG_READ)) { for (bptAddr = curBpt->address; bptAddr <= (curBpt->endaddr | 0xFFFF); bptAddr+=0x10000) if (lookup_breakpoint((uint32) bptAddr & 0xFFFF0000, 0x10000, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_READ) == -1) activate_memory_break_read((uint32) bptAddr); } if (BPT_CHECK_FLAG((*curBpt), M64P_BKP_FLAG_WRITE)) { for (bptAddr = curBpt->address; bptAddr <= (curBpt->endaddr | 0xFFFF); bptAddr+=0x10000) if (lookup_breakpoint((uint32) bptAddr & 0xFFFF0000, 0x10000, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_WRITE) == -1) activate_memory_break_write((uint32) bptAddr); } BPT_SET_FLAG(g_Breakpoints[bpt], M64P_BKP_FLAG_ENABLED); } void disable_breakpoint( int bpt ) { m64p_breakpoint *curBpt = g_Breakpoints + bpt; uint64 bptAddr; BPT_CLEAR_FLAG(g_Breakpoints[bpt], M64P_BKP_FLAG_ENABLED); if (BPT_CHECK_FLAG((*curBpt), M64P_BKP_FLAG_READ)) { for (bptAddr = curBpt->address; bptAddr <= ((unsigned long)(curBpt->endaddr | 0xFFFF)); bptAddr+=0x10000) if (lookup_breakpoint((uint32) bptAddr & 0xFFFF0000, 0x10000, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_READ) == -1) deactivate_memory_break_read((uint32) bptAddr); } if (BPT_CHECK_FLAG((*curBpt), M64P_BKP_FLAG_WRITE)) { for (bptAddr = curBpt->address; bptAddr <= ((unsigned long)(curBpt->endaddr | 0xFFFF)); bptAddr+=0x10000) if (lookup_breakpoint((uint32) bptAddr & 0xFFFF0000, 0x10000, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_WRITE) == -1) deactivate_memory_break_write((uint32) bptAddr); } BPT_CLEAR_FLAG(g_Breakpoints[bpt], M64P_BKP_FLAG_ENABLED); } void remove_breakpoint_by_num( int bpt ) { int curBpt; if (BPT_CHECK_FLAG(g_Breakpoints[bpt], M64P_BKP_FLAG_ENABLED)) disable_breakpoint( bpt ); for(curBpt=bpt+1; curBpt= g_Breakpoints[i].address) || (address <= g_Breakpoints[i].endaddr)) return i; } else // endaddr >= address { if((endaddr >= g_Breakpoints[i].address) && (address <= g_Breakpoints[i].endaddr)) return i; } } } return -1; } int check_breakpoints( uint32 address ) { return lookup_breakpoint(address, 1, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_EXEC); } int check_breakpoints_on_mem_access( uint32 pc, uint32 address, uint32 size, uint32 flags ) { //This function handles memory read/write breakpoints. size specifies the address //range to check, flags specifies the flags that all need to be set. //It automatically stops and updates the debugger on hit, so the memory access //functions only need to call it and can discard the result. int bpt; if (g_dbg_runstate == M64P_DBG_RUNSTATE_RUNNING) { bpt = lookup_breakpoint(address, size, flags); if (bpt != -1) { if (BPT_CHECK_FLAG(g_Breakpoints[bpt], M64P_BKP_FLAG_LOG)) log_breakpoint(pc, flags, address); g_dbg_runstate = M64P_DBG_RUNSTATE_PAUSED; update_debugger(pc); return bpt; } } return -1; } int log_breakpoint(uint32 PC, uint32 Flag, uint32 Access) { char msg[32]; if (Flag & M64P_BKP_FLAG_READ) sprintf(msg, "0x%08X read 0x%08X", PC, Access); else if (Flag & M64P_BKP_FLAG_WRITE) sprintf(msg, "0x%08X wrote 0x%08X", PC, Access); else sprintf(msg, "0x%08X executed", PC); DebugMessage(M64MSG_INFO, "BPT: %s", msg); return 0; } #endif mupen64plus-core-src-2.5/src/debugger/dbg_breakpoints.h000066400000000000000000000044431251723631200231650ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dbg_breakpoints.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 DarkJeztr HyperHacker * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __BREAKPOINTS_H__ #define __BREAKPOINTS_H__ #include "../api/m64p_types.h" #include "dbg_types.h" extern int g_NumBreakpoints; extern m64p_breakpoint g_Breakpoints[]; int add_breakpoint( uint32 address ); int add_breakpoint_struct(m64p_breakpoint *newbp); void remove_breakpoint_by_address( uint32 address ); void remove_breakpoint_by_num( int bpt ); void enable_breakpoint( int breakpoint ); void disable_breakpoint( int breakpoint ); int check_breakpoints( uint32 address ); int check_breakpoints_on_mem_access( uint32 pc, uint32 address, uint32 size, uint32 flags ); int lookup_breakpoint( uint32 address, uint32 size, uint32 flags ); int log_breakpoint(uint32 PC, uint32 Flag, uint32 Access); void replace_breakpoint_num( int, m64p_breakpoint * ); #endif /* __BREAKPOINTS_H__ */ mupen64plus-core-src-2.5/src/debugger/dbg_debugger.c000066400000000000000000000066441251723631200224300ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - debugger.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 DarkJeztr * * Copyright (C) 2002 davFr * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "api/debugger.h" #include "dbg_breakpoints.h" #include "dbg_debugger.h" #include "dbg_memory.h" #include "dbg_types.h" #ifdef DBG int g_DebuggerActive = 0; // whether the debugger is enabled or not m64p_dbg_runstate g_dbg_runstate; // Holds the number of pending steps the debugger needs to perform. static SDL_sem *sem_pending_steps; uint32 previousPC; //]=-=-=-=-=-=-=-=-=-=-=[ Initialisation du Debugger ]=-=-=-=-=-=-=-=-=-=-=-=[ void init_debugger() { g_DebuggerActive = 1; g_dbg_runstate = M64P_DBG_RUNSTATE_PAUSED; DebuggerCallback(DEBUG_UI_INIT, 0); /* call front-end to initialize user interface */ init_host_disassembler(); sem_pending_steps = SDL_CreateSemaphore(0); } void destroy_debugger() { SDL_DestroySemaphore(sem_pending_steps); sem_pending_steps = NULL; g_DebuggerActive = 0; } //]=-=-=-=-=-=-=-=-=-=-=-=-=[ Mise-a-Jour Debugger ]=-=-=-=-=-=-=-=-=-=-=-=-=[ void update_debugger(uint32 pc) // Update debugger state and display. // Should be called after each R4300 instruction // Checks for breakpoint hits on PC { int bpt; if (g_dbg_runstate != M64P_DBG_RUNSTATE_PAUSED) { bpt = check_breakpoints(pc); if (bpt != -1) { g_dbg_runstate = M64P_DBG_RUNSTATE_PAUSED; if (BPT_CHECK_FLAG(g_Breakpoints[bpt], M64P_BKP_FLAG_LOG)) log_breakpoint(pc, M64P_BKP_FLAG_EXEC, 0); } } if (g_dbg_runstate != M64P_DBG_RUNSTATE_RUNNING) { DebuggerCallback(DEBUG_UI_UPDATE, pc); /* call front-end to notify user interface to update */ } if (g_dbg_runstate == M64P_DBG_RUNSTATE_PAUSED) { // The emulation thread is blocked until a step call via the API. SDL_SemWait(sem_pending_steps); } previousPC = pc; } void debugger_step() { SDL_SemPost(sem_pending_steps); } #endif mupen64plus-core-src-2.5/src/debugger/dbg_debugger.h000066400000000000000000000037401251723631200224270ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dbg_debugger.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 DarkJeztr * * Copyright (C) 2002 davFr * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __DBG_DEBUGGER_H__ #define __DBG_DEBUGGER_H__ #include "api/m64p_types.h" #include "dbg_types.h" extern int g_DebuggerActive; /* True if the debugger is running */ extern m64p_dbg_runstate g_dbg_runstate; extern uint32 previousPC; void init_debugger(void); void update_debugger(uint32 pc); void destroy_debugger(void); void debugger_step(void); #endif /* __DBG_DEBUGGER_H__ */ mupen64plus-core-src-2.5/src/debugger/dbg_decoder.c000066400000000000000000000640251251723631200222460ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus -- dbg_decoder.c * * Copyright (c) 2010 Marshall B. Rogers * * http://64.vg/ * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * This is a heavily modified reentrant version of the MIPS disassembler found * in the NetBSD operating system. I chose to use this as a base due to the * small, compact, and easily manageable code. * * Original copyright/license information is contained below. */ /* $NetBSD: db_disasm.c,v 1.21 2009/12/14 00:46:06 matt Exp $ */ #include /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ralph Campbell. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * from: @(#)kadb.c 8.1 (Berkeley) 6/10/93 */ #include #include #include #include #ifndef MIPS32 #define MIPS32 #endif #include "dbg_decoder.h" #include "dbg_decoder_local.h" #include "osal/preproc.h" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Data types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ typedef uint32_t db_addr_t; /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Local variables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ static const char * const r4k_str_op_name[64] = { /* 0 */ "spec", "bcond","j", "jal", "beq", "bne", "blez", "bgtz", /* 8 */ "addi", "addiu","slti", "sltiu","andi", "ori", "xori", "lui", /*16 */ "cop0", "cop1", "cop2", "cop3", "beql", "bnel", "blezl","bgtzl", /*24 */ "daddi","daddiu","ldl", "ldr", "op34", "op35", "op36", "op37", /*32 */ "lb", "lh", "lwl", "lw", "lbu", "lhu", "lwr", "lwu", /*40 */ "sb", "sh", "swl", "sw", "sdl", "sdr", "swr", "cache", /*48 */ "ll", "lwc1", "lwc2", "lwc3", "lld", "ldc1", "ldc2", "ld", /*56 */ "sc", "swc1", "swc2", "swc3", "scd", "sdc1", "sdc2", "sd" }; static const char * const r4k_str_spec_name[64] = { /* 0 */ "sll", "spec01","srl", "sra", "sllv", "spec05","srlv","srav", /* 8 */ "jr", "jalr", "spec12","spec13","syscall","break","spec16","sync", /*16 */ "mfhi", "mthi", "mflo", "mtlo", "dsllv","spec25","dsrlv","dsrav", /*24 */ "mult", "multu","div", "divu", "dmult","dmultu","ddiv","ddivu", /*32 */ "add", "addu", "sub", "subu", "and", "or", "xor", "nor", /*40 */ "spec50","spec51","slt","sltu", "dadd","daddu","dsub","dsubu", /*48 */ "tge","tgeu","tlt","tltu","teq","spec65","tne","spec67", /*56 */ "dsll","spec71","dsrl","dsra","dsll32","spec75","dsrl32","dsra32" }; static const char * const r4k_str_spec2_name[4] = /* QED RM4650, R5000, etc. */ { /* 0 */ "mad", "madu", "mul", "spec3" }; static const char * const r4k_str_bcond_name[32] = { /* 0 */ "bltz", "bgez", "bltzl", "bgezl", "?", "?", "?", "?", /* 8 */ "tgei", "tgeiu", "tlti", "tltiu", "teqi", "?", "tnei", "?", /*16 */ "bltzal", "bgezal", "bltzall", "bgezall", "?", "?", "?", "?", /*24 */ "?", "?", "?", "?", "?", "?", "?", "?", }; static const char * const r4k_str_cop1_name[64] = { /* 0 */ "add", "sub", "mul", "div", "sqrt","abs", "mov", "neg", /* 8 */ "fop08", "trunc.l","fop0a","fop0b","fop0c","trunc.w","fop0e","fop0f", /*16 */ "fop10", "fop11","fop12","fop13","fop14","fop15","fop16","fop17", /*24 */ "fop18", "fop19","fop1a","fop1b","fop1c","fop1d","fop1e","fop1f", /*32 */ "cvt.s", "cvt.d","fop22","fop23","cvt.w","cvt.l","fop26","fop27", /*40 */ "fop28", "fop29","fop2a","fop2b","fop2c","fop2d","fop2e","fop2f", /*48 */ "c.f", "c.un","c.eq","c.ueq","c.olt","c.ult", "c.ole", "c.ule", /*56 */ "c.sf", "c.ngle","c.seq","c.ngl","c.lt","c.nge", "c.le", "c.ngt" }; static const char * const r4k_str_fmt_name[16] = { "s", "d", "e", "fmt3", "w", "l", "fmt6", "fmt7", "fmt8", "fmt9", "fmta", "fmtb", "fmtc", "fmtd", "fmte", "fmtf" }; static const char * const r4k_str_reg_name[32] = { "$zero", "$at", "$v0", "$v1", "$a0", "$a1", "$a2", "$a3", "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7", "$s0", "$s1", "$s2", "$s3", "$s4", "$s5", "$s6", "$s7", "$t8", "$t9", "$k0", "$k1", "$gp", "$sp", "$s8", "$ra" }; static const char * const r4k_str_c0_opname[64] = { "c0op00","tlbr", "tlbwi", "c0op03","c0op04","c0op05","tlbwr", "c0op07", "tlbp", "c0op11","c0op12","c0op13","c0op14","c0op15","c0op16","c0op17", "rfe", "c0op21","c0op22","c0op23","c0op24","c0op25","c0op26","c0op27", "eret", "c0op31","c0op32","c0op33","c0op34","c0op35","c0op36","c0op37", "c0op40","c0op41","c0op42","c0op43","c0op44","c0op45","c0op46","c0op47", "c0op50","c0op51","c0op52","c0op53","c0op54","c0op55","c0op56","c0op57", "c0op60","c0op61","c0op62","c0op63","c0op64","c0op65","c0op66","c0op67", "c0op70","c0op71","c0op72","c0op73","c0op74","c0op75","c0op77","c0op77", }; static const char * const r4k_str_c0_reg[32] = { "C0_INX", "C0_RAND", "C0_ENTRYLO0", "C0_ENTRYLO1", "C0_CONTEXT", "C0_PAGEMASK", "C0_WIRED", "cp0r7", "C0_BADVADDR", "C0_COUNT", "C0_ENTRYHI", "C0_COMPARE", "C0_SR", "C0_CAUSE", "C0_EPC", "C0_PRID", "C0_CONFIG", "C0_LLADDR", "C0_WATCHLO", "C0_WATCHHI", "xcontext", "cp0r21", "cp0r22", "debug", "depc", "perfcnt", "C0_ECC", "C0_CACHE_ERR", "C0_TAGLO", "C0_TAGHI", "C0_ERROR_EPC", "desave" }; /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Local functions - lookup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* Look up a symbol */ static char * lookup_sym ( struct r4k_dis_t * state, uint32_t address ) { if( state->lookup_sym ) return state->lookup_sym( address, state->lookup_sym_d ); return NULL; } /* Look up an upper 16-bits relocation */ static char * lookup_rel_hi16 ( struct r4k_dis_t * state, uint32_t address ) { if( state->lookup_rel_hi16 ) return state->lookup_rel_hi16( address, state->lookup_rel_hi16_d ); return NULL; } /* Look up a lower 16-bits relocation */ static char * lookup_rel_lo16 ( struct r4k_dis_t * state, uint32_t address ) { if( state->lookup_rel_lo16 ) return state->lookup_rel_lo16( address, state->lookup_rel_lo16_d ); return NULL; } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Local functions - disassembler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* Print text into the destination buffer */ static int db_printf ( struct r4k_dis_t * state, char * fmt, ... ) { int l; va_list ap; char buffer[1024]; /* Prepare user provided */ va_start( ap, fmt ); l = vsnprintf( buffer, sizeof(buffer), fmt, ap ); va_end( ap ); /* Add it to our string */ state->dest += sprintf( state->dest, "%s", buffer ); state->length += l; return l; } /* Print an address to a string. If there's a symbol, the name will be printed */ static int print_addr ( struct r4k_dis_t * state, uint32_t address ) { int len; char * sym; /* Try to lookup symbol */ if( (sym = lookup_sym(state, address)) ) { len = db_printf( state, "%s", sym ); } else { len = db_printf( state, "0x%08X", address ); } return len; } /* Disassemble an instruction */ static db_addr_t db_disasm_insn ( struct r4k_dis_t * state, int insn, db_addr_t loc, bool altfmt ) { char * rel; InstFmt i; i.word = insn; switch (i.JType.op) { case OP_SPECIAL: if (i.word == 0) { db_printf(state, "nop"); break; } /* XXX * "addu" is a "move" only in 32-bit mode. What's the correct * answer - never decode addu/daddu as "move"? */ if (i.RType.func == OP_ADDU && i.RType.rt == 0) { db_printf(state, "%-16s%s,%s", "move", r4k_str_reg_name[i.RType.rd], r4k_str_reg_name[i.RType.rs]); break; } db_printf(state, "%-16s", r4k_str_spec_name[i.RType.func]); switch (i.RType.func) { case OP_SLL: case OP_SRL: case OP_SRA: case OP_DSLL: case OP_DSRL: case OP_DSRA: case OP_DSLL32: case OP_DSRL32: case OP_DSRA32: db_printf(state, "%s,%s,%d", r4k_str_reg_name[i.RType.rd], r4k_str_reg_name[i.RType.rt], i.RType.shamt); break; case OP_SLLV: case OP_SRLV: case OP_SRAV: case OP_DSLLV: case OP_DSRLV: case OP_DSRAV: db_printf(state, "%s,%s,%s", r4k_str_reg_name[i.RType.rd], r4k_str_reg_name[i.RType.rt], r4k_str_reg_name[i.RType.rs]); break; case OP_MFHI: case OP_MFLO: db_printf(state, "%s", r4k_str_reg_name[i.RType.rd]); break; case OP_JR: case OP_JALR: db_printf(state, "%s", r4k_str_reg_name[i.RType.rs]); break; case OP_MTLO: case OP_MTHI: db_printf(state, "%s", r4k_str_reg_name[i.RType.rs]); break; case OP_MULT: case OP_MULTU: case OP_DMULT: case OP_DMULTU: db_printf(state, "%s,%s", r4k_str_reg_name[i.RType.rs], r4k_str_reg_name[i.RType.rt]); break; case OP_DIV: case OP_DIVU: case OP_DDIV: case OP_DDIVU: db_printf(state, "%s,%s,%s", r4k_str_reg_name[0], r4k_str_reg_name[i.RType.rs], r4k_str_reg_name[i.RType.rt]); break; case OP_SYSCALL: case OP_SYNC: break; case OP_BREAK: db_printf(state, "%d", (i.RType.rs << 5) | i.RType.rt); break; default: db_printf(state, "%s,%s,%s", r4k_str_reg_name[i.RType.rd], r4k_str_reg_name[i.RType.rs], r4k_str_reg_name[i.RType.rt]); } break; case OP_SPECIAL2: if (i.RType.func == OP_MUL) db_printf(state, "%s\t%s,%s,%s", r4k_str_spec2_name[i.RType.func & 0x3], r4k_str_reg_name[i.RType.rd], r4k_str_reg_name[i.RType.rs], r4k_str_reg_name[i.RType.rt]); else db_printf(state, "%s\t%s,%s", r4k_str_spec2_name[i.RType.func & 0x3], r4k_str_reg_name[i.RType.rs], r4k_str_reg_name[i.RType.rt]); break; case OP_BCOND: db_printf(state, "%-16s%s,", r4k_str_bcond_name[i.IType.rt], r4k_str_reg_name[i.IType.rs]); goto pr_displ; case OP_BLEZ: case OP_BLEZL: case OP_BGTZ: case OP_BGTZL: db_printf(state, "%-16s%s,", r4k_str_op_name[i.IType.op], r4k_str_reg_name[i.IType.rs]); goto pr_displ; case OP_BEQ: case OP_BEQL: if (i.IType.rs == 0 && i.IType.rt == 0) { db_printf(state, "%-16s", "b"); goto pr_displ; } /* FALLTHROUGH */ case OP_BNE: case OP_BNEL: db_printf(state, "%-16s%s,%s,", r4k_str_op_name[i.IType.op], r4k_str_reg_name[i.IType.rs], r4k_str_reg_name[i.IType.rt]); pr_displ: print_addr( state, loc + 4 + ((short)i.IType.imm << 2) ); break; case OP_COP0: switch (i.RType.rs) { case OP_BCx: case OP_BCy: db_printf(state, "bc0%c\t", "ft"[i.RType.rt & COPz_BC_TF_MASK]); goto pr_displ; case OP_MT: db_printf(state, "%-16s%s,%s", "mtc0", r4k_str_reg_name[i.RType.rt], r4k_str_c0_reg[i.RType.rd]); break; case OP_DMT: db_printf(state, "%-16s%s,%s", "dmtc0", r4k_str_reg_name[i.RType.rt], r4k_str_c0_reg[i.RType.rd]); break; case OP_MF: db_printf(state, "%-16s%s,%s", "mfc0", r4k_str_reg_name[i.RType.rt], r4k_str_c0_reg[i.RType.rd]); break; case OP_DMF: db_printf(state, "%-16s%s,%s","dmfc0", r4k_str_reg_name[i.RType.rt], r4k_str_c0_reg[i.RType.rd]); break; default: db_printf(state, "%s", r4k_str_c0_opname[i.FRType.func]); } break; case OP_COP1: switch (i.RType.rs) { case OP_BCx: case OP_BCy: db_printf(state, "bc1%c%s\t\t", "ft"[i.RType.rt & COPz_BC_TF_MASK], (insn >> 16 & 0x1F) == 2 || (insn >> 16 & 0x1F) == 3 ? "l" : ""); goto pr_displ; case OP_MT: db_printf(state, "mtc1\t\t%s,$f%d", r4k_str_reg_name[i.RType.rt], i.RType.rd); break; case OP_MF: db_printf(state, "mfc1\t\t%s,$f%d", r4k_str_reg_name[i.RType.rt], i.RType.rd); break; case OP_CT: db_printf(state, "ctc1\t\t%s,$f%d", r4k_str_reg_name[i.RType.rt], i.RType.rd); break; case OP_CF: db_printf(state, "cfc1\t\t%s,$f%d", r4k_str_reg_name[i.RType.rt], i.RType.rd); break; case OP_DMT: db_printf(state, "dmtc1\t\t%s,$f%d", r4k_str_reg_name[i.RType.rt], i.RType.rd); break; case OP_DMF: db_printf(state, "dmfc1\t\t%s,$f%d", r4k_str_reg_name[i.RType.rt], i.RType.rd); break; case OP_MTH: db_printf(state, "mthc1\t\t%s,$f%d", r4k_str_reg_name[i.RType.rt], i.RType.rd); break; case OP_MFH: db_printf(state, "mfhc1\t\t%s,$f%d", r4k_str_reg_name[i.RType.rt], i.RType.rd); break; default: if( i.FRType.func == 0x21 || i.FRType.func == 0x20 || i.FRType.func == 0x24 || i.FRType.func == 0x25 || i.FRType.func == 7 || i.FRType.func == 6 || i.FRType.func == 0xd || i.FRType.func == 4 || i.FRType.func == 5 || i.FRType.func == 9 ) {/*NEG.fmt fd, fs*/ db_printf(state, "%s.%s\t\t$f%d,$f%d", r4k_str_cop1_name[i.FRType.func], r4k_str_fmt_name[i.FRType.fmt], i.FRType.fd, i.FRType.fs); } else if( i.FRType.func != 1 && i.FRType.func != 2 && (insn & 0x3F) && !(insn >> 6 & 0x1F) ) /* C */ { db_printf(state, "%s.%s\t\t$f%d,$f%d", r4k_str_cop1_name[i.FRType.func], r4k_str_fmt_name[i.FRType.fmt], i.FRType.fs, i.FRType.ft); } else { db_printf(state, "%s.%s\t\t$f%d,$f%d,$f%d", r4k_str_cop1_name[i.FRType.func], r4k_str_fmt_name[i.FRType.fmt], i.FRType.fd, i.FRType.fs, i.FRType.ft); } } break; case OP_J: case OP_JAL: db_printf(state, "%-16s", r4k_str_op_name[i.JType.op]); print_addr(state, (loc & 0xF0000000) | (i.JType.target << 2)); break; case OP_LDC1: case OP_LWC1: case OP_SWC1: case OP_SDC1: db_printf(state, "%-16s$f%d,", r4k_str_op_name[i.IType.op], i.IType.rt); goto loadstore; case OP_LB: case OP_LH: case OP_LW: case OP_LWL: case OP_LWR: case OP_LD: case OP_LBU: case OP_LHU: case OP_LWU: case OP_SB: case OP_SH: case OP_SW: case OP_SWL: case OP_SWR: case OP_SD: db_printf(state, "%-16s%s,", r4k_str_op_name[i.IType.op], r4k_str_reg_name[i.IType.rt]); loadstore: /* Part of a relocation? */ if( (rel = lookup_rel_lo16(state, loc)) ) { /* Yes. */ db_printf(state, "%%lo(%s)(%s)", rel, r4k_str_reg_name[i.IType.rs] ); break; } db_printf(state, "%d(%s)", (short)i.IType.imm, r4k_str_reg_name[i.IType.rs]); break; case OP_ORI: case OP_XORI: if( i.IType.op == OP_ORI ) { /* Part of a relocation? */ if( (rel = lookup_rel_lo16(state, loc)) ) { /* Yes. */ db_printf(state, "%-16s%s,%s,%%lo(%s)", r4k_str_op_name[i.IType.op], r4k_str_reg_name[i.IType.rt], r4k_str_reg_name[i.IType.rs], rel ); break; } else { db_printf(state, "%-16s%s,%s,0x%x", r4k_str_op_name[i.IType.op], r4k_str_reg_name[i.IType.rt], r4k_str_reg_name[i.IType.rs], i.IType.imm); break; } } else if (i.IType.rs == 0) { db_printf(state, "%-16s%s,0x%x", "li", r4k_str_reg_name[i.IType.rt], i.IType.imm); break; } /* FALLTHROUGH */ case OP_ANDI: db_printf(state, "%-16s%s,%s,0x%x", r4k_str_op_name[i.IType.op], r4k_str_reg_name[i.IType.rt], r4k_str_reg_name[i.IType.rs], i.IType.imm); break; case OP_LUI: { /* Part of a relocation? */ if( (rel = lookup_rel_hi16(state, loc)) ) { /* Yes. */ db_printf(state, "%-16s%s,%%hi(%s)", r4k_str_op_name[i.IType.op], r4k_str_reg_name[i.IType.rt], rel ); } else { db_printf(state, "%-16s%s,0x%x", r4k_str_op_name[i.IType.op], r4k_str_reg_name[i.IType.rt], i.IType.imm); } } break; case OP_CACHE: db_printf(state, "%-16s0x%x,0x%x(%s)", r4k_str_op_name[i.IType.op], i.IType.rt, i.IType.imm, r4k_str_reg_name[i.IType.rs]); break; case OP_ADDI: case OP_DADDI: case OP_ADDIU: case OP_DADDIU: { /* Part of a relocation? */ if( (rel = lookup_rel_lo16(state, loc)) ) { /* Yes. */ db_printf(state, "%-16s%s,%s,%%lo(%s)", r4k_str_op_name[i.IType.op], r4k_str_reg_name[i.IType.rt], r4k_str_reg_name[i.IType.rs], rel ); break; } if (i.IType.rs == 0) { db_printf(state, "%-16s%s,%d", "li", r4k_str_reg_name[i.IType.rt], (short)i.IType.imm); break; } /* FALLTHROUGH */ default: db_printf(state, "%-16s%s,%s,%d", r4k_str_op_name[i.IType.op], r4k_str_reg_name[i.IType.rt], r4k_str_reg_name[i.IType.rs], (short)i.IType.imm); } } /*db_printf(state, "\n");*/ return (loc + 4); } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Global functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* Disassemble an instruction with state */ static int r4k_disassemble ( struct r4k_dis_t * state, uint32_t instruction, uint32_t location, char * dest ) { state->dest = dest; db_disasm_insn( state, instruction, location, 0 ); return state->length; } /* Disassemble an instruction but split the opcode/operands into two char *'s */ static int r4k_disassemble_split ( struct r4k_dis_t * state, uint32_t instruction, uint32_t location, char ** opcode, char ** operands ) { int v, i; char buff[128], * dupd; v = r4k_disassemble( state, instruction, location, buff ); dupd = strdup( buff ); *opcode = &dupd[0]; for( i = 0; buff[i] && buff[i] != ' ' && buff[i] != '\t'; i++ ); dupd[i] = '\0'; for( ; buff[i] && (buff[i] == ' ' || buff[i] == '\t'); i++ ); *operands = &dupd[i]; return v; } /* Disassemble an instruction with a blank state but split op/operands */ static int r4k_disassemble_split_quick ( uint32_t instruction, uint32_t location, char ** opcode, char ** operands ) { struct r4k_dis_t state; /* Init state */ memset( &state, 0, sizeof(state) ); /* Perform */ return r4k_disassemble_split( &state, instruction, location, opcode, operands ); } //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=[ DECODE_OP ]=-=-=-=-=-=-=-=-=-=-=-=-=-=-=[// void r4300_decode_op ( uint32_t instr, char * opcode, char * arguments, uint32_t counter ) { char * _op, * _args; _op = NULL; _args = NULL; r4k_disassemble_split_quick( instr, counter, &_op, &_args ); strcpy( opcode, _op ); strcpy( arguments, _args ); free( _op ); } mupen64plus-core-src-2.5/src/debugger/dbg_decoder.h000066400000000000000000000044031251723631200222450ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dbg_decoder.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2010 Marshall B. Rogers * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __DECODER_H__ #define __DECODER_H__ #include "dbg_types.h" #if defined(WIN32) typedef unsigned int uint32_t; typedef unsigned char bool; #define false 0 #define true 1 #else #include #include #endif /* Disassembler lookup handler */ typedef char * (*r4k_lookup_func)(uint32_t, void *); /* Disassembler state */ typedef struct r4k_dis_t { r4k_lookup_func lookup_sym; void * lookup_sym_d; r4k_lookup_func lookup_rel_hi16; void * lookup_rel_hi16_d; r4k_lookup_func lookup_rel_lo16; void * lookup_rel_lo16_d; /* Private */ char * dest; int length; } R4kDis; extern void r4300_decode_op ( uint32_t, char *, char *, uint32_t ); #endif /* __DECODER_H__ */ mupen64plus-core-src-2.5/src/debugger/dbg_decoder_local.h000066400000000000000000001414611251723631200234250ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dbg_debugger_local.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2010 Marshall B. Rogers * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __DECODER_LOCAL_H__ #define __DECODER_LOCAL_H__ #include /* $NetBSD: cpuregs.h,v 1.77 2009/12/14 00:46:04 matt Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ralph Campbell and Rick Macklem. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)machConst.h 8.1 (Berkeley) 6/10/93 * * machConst.h -- * * Machine dependent constants. * * Copyright (C) 1989 Digital Equipment Corporation. * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appears in all copies. * Digital Equipment Corporation makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/machConst.h, * v 9.2 89/10/21 15:55:22 jhh Exp SPRITE (DECWRL) * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/machAddrs.h, * v 1.2 89/08/15 18:28:21 rab Exp SPRITE (DECWRL) * from: Header: /sprite/src/kernel/vm/ds3100.md/RCS/vmPmaxConst.h, * v 9.1 89/09/18 17:33:00 shirriff Exp SPRITE (DECWRL) */ #ifndef _MIPS_CPUREGS_H_ #define _MIPS_CPUREGS_H_ /* * Address space. * 32-bit mips CPUS partition their 32-bit address space into four segments: * * kuseg 0x00000000 - 0x7fffffff User virtual mem, mapped * kseg0 0x80000000 - 0x9fffffff Physical memory, cached, unmapped * kseg1 0xa0000000 - 0xbfffffff Physical memory, uncached, unmapped * kseg2 0xc0000000 - 0xffffffff kernel-virtual, mapped * * mips1 physical memory is limited to 512Mbytes, which is * doubly mapped in kseg0 (cached) and kseg1 (uncached.) * Caching of mapped addresses is controlled by bits in the TLB entry. */ #ifdef _LP64 #define MIPS_XUSEG_START (0L << 62) #define MIPS_XUSEG_P(x) (((uint64_t)(x) >> 62) == 0) #define MIPS_USEG_P(x) ((uintptr_t)(x) < 0x80000000L) #define MIPS_XSSEG_START (1L << 62) #define MIPS_XSSEG_P(x) (((uint64_t)(x) >> 62) == 1) #endif /* * MIPS addresses are signed and we defining as negative so that * in LP64 kern they get sign-extended correctly. */ #ifndef _LOCORE #define MIPS_KSEG0_START (-0x7fffffffL-1) /* 0x80000000 */ #define MIPS_KSEG1_START -0x60000000L /* 0xa0000000 */ #define MIPS_KSEG2_START -0x40000000L /* 0xc0000000 */ #define MIPS_MAX_MEM_ADDR -0x42000000L /* 0xbe000000 */ #define MIPS_RESERVED_ADDR -0x40380000L /* 0xbfc80000 */ #endif #define MIPS_PHYS_MASK 0x1fffffff #define MIPS_KSEG0_TO_PHYS(x) ((uintptr_t)(x) & MIPS_PHYS_MASK) #define MIPS_PHYS_TO_KSEG0(x) ((uintptr_t)(x) | (intptr_t)MIPS_KSEG0_START) #define MIPS_KSEG1_TO_PHYS(x) ((uintptr_t)(x) & MIPS_PHYS_MASK) #define MIPS_PHYS_TO_KSEG1(x) ((uintptr_t)(x) | (intptr_t)MIPS_KSEG1_START) #define MIPS_KSEG0_P(x) (((intptr_t)(x) & ~MIPS_PHYS_MASK) == MIPS_KSEG0_START) #define MIPS_KSEG1_P(x) (((intptr_t)(x) & ~MIPS_PHYS_MASK) == MIPS_KSEG1_START) #define MIPS_KSEG2_P(x) ((uintptr_t)MIPS_KSEG2_START <= (uintptr_t)(x)) /* Map virtual address to index in mips3 r4k virtually-indexed cache */ #define MIPS3_VA_TO_CINDEX(x) \ (((intptr_t)(x) & 0xffffff) | MIPS_KSEG0_START) #ifndef _LOCORE #define MIPS_XSEG_MASK (0x3fffffffffffffffLL) #define MIPS_XKSEG_START (0x3ULL << 62) #define MIPS_XKSEG_P(x) (((uint64_t)(x) >> 62) == 3) #define MIPS_XKPHYS_START (0x2ULL << 62) #define MIPS_PHYS_TO_XKPHYS_UNCACHED(x) \ (MIPS_XKPHYS_START | ((uint64_t)(CCA_UNCACHED) << 59) | (x)) #define MIPS_PHYS_TO_XKPHYS_CACHED(x) \ (mips3_xkphys_cached | (x)) #define MIPS_PHYS_TO_XKPHYS(cca,x) \ (MIPS_XKPHYS_START | ((uint64_t)(cca) << 59) | (x)) #define MIPS_XKPHYS_TO_PHYS(x) ((uint64_t)(x) & 0x07ffffffffffffffLL) #define MIPS_XKPHYS_TO_CCA(x) (((uint64_t)(x) >> 59) & 7) #define MIPS_XKPHYS_P(x) (((uint64_t)(x) >> 62) == 2) #endif /* _LOCORE */ #define CCA_UNCACHED 2 #define CCA_CACHEABLE 3 /* cacheable non-coherent */ /* CPU dependent mtc0 hazard hook */ #define COP0_SYNC /* nothing */ #define COP0_HAZARD_FPUENABLE nop; nop; nop; nop; /* * The bits in the cause register. * * Bits common to r3000 and r4000: * * MIPS_CR_BR_DELAY Exception happened in branch delay slot. * MIPS_CR_COP_ERR Coprocessor error. * MIPS_CR_IP Interrupt pending bits defined below. * (same meaning as in CAUSE register). * MIPS_CR_EXC_CODE The exception type (see exception codes below). * * Differences: * r3k has 4 bits of execption type, r4k has 5 bits. */ #define MIPS_CR_BR_DELAY 0x80000000 #define MIPS_CR_COP_ERR 0x30000000 #define MIPS1_CR_EXC_CODE 0x0000003C /* four bits */ #define MIPS3_CR_EXC_CODE 0x0000007C /* five bits */ #define MIPS_CR_IP 0x0000FF00 #define MIPS_CR_EXC_CODE_SHIFT 2 /* * The bits in the status register. All bits are active when set to 1. * * R3000 status register fields: * MIPS_SR_COP_USABILITY Control the usability of the four coprocessors. * MIPS_SR_TS TLB shutdown. * * MIPS_SR_INT_IE Master (current) interrupt enable bit. * * Differences: * r3k has cache control is via frobbing SR register bits, whereas the * r4k cache control is via explicit instructions. * r3k has a 3-entry stack of kernel/user bits, whereas the * r4k has kernel/supervisor/user. */ #define MIPS_SR_COP_USABILITY 0xf0000000 #define MIPS_SR_COP_0_BIT 0x10000000 #define MIPS_SR_COP_1_BIT 0x20000000 /* r4k and r3k differences, see below */ #define MIPS_SR_MX 0x01000000 /* MIPS64 */ #define MIPS_SR_PX 0x00800000 /* MIPS64 */ #define MIPS_SR_BEV 0x00400000 /* Use boot exception vector */ #define MIPS_SR_TS 0x00200000 /* r4k and r3k differences, see below */ #define MIPS_SR_INT_IE 0x00000001 /*#define MIPS_SR_MBZ 0x0f8000c0*/ /* Never used, true for r3k */ /*#define MIPS_SR_INT_MASK 0x0000ff00*/ /* * The R2000/R3000-specific status register bit definitions. * all bits are active when set to 1. * * MIPS_SR_PARITY_ERR Parity error. * MIPS_SR_CACHE_MISS Most recent D-cache load resulted in a miss. * MIPS_SR_PARITY_ZERO Zero replaces outgoing parity bits. * MIPS_SR_SWAP_CACHES Swap I-cache and D-cache. * MIPS_SR_ISOL_CACHES Isolate D-cache from main memory. * Interrupt enable bits defined below. * MIPS_SR_KU_OLD Old kernel/user mode bit. 1 => user mode. * MIPS_SR_INT_ENA_OLD Old interrupt enable bit. * MIPS_SR_KU_PREV Previous kernel/user mode bit. 1 => user mode. * MIPS_SR_INT_ENA_PREV Previous interrupt enable bit. * MIPS_SR_KU_CUR Current kernel/user mode bit. 1 => user mode. */ #define MIPS1_PARITY_ERR 0x00100000 #define MIPS1_CACHE_MISS 0x00080000 #define MIPS1_PARITY_ZERO 0x00040000 #define MIPS1_SWAP_CACHES 0x00020000 #define MIPS1_ISOL_CACHES 0x00010000 #define MIPS1_SR_KU_OLD 0x00000020 /* 2nd stacked KU/IE*/ #define MIPS1_SR_INT_ENA_OLD 0x00000010 /* 2nd stacked KU/IE*/ #define MIPS1_SR_KU_PREV 0x00000008 /* 1st stacked KU/IE*/ #define MIPS1_SR_INT_ENA_PREV 0x00000004 /* 1st stacked KU/IE*/ #define MIPS1_SR_KU_CUR 0x00000002 /* current KU */ /* backwards compatibility */ #define MIPS_SR_PARITY_ERR MIPS1_PARITY_ERR #define MIPS_SR_CACHE_MISS MIPS1_CACHE_MISS #define MIPS_SR_PARITY_ZERO MIPS1_PARITY_ZERO #define MIPS_SR_SWAP_CACHES MIPS1_SWAP_CACHES #define MIPS_SR_ISOL_CACHES MIPS1_ISOL_CACHES #define MIPS_SR_KU_OLD MIPS1_SR_KU_OLD #define MIPS_SR_INT_ENA_OLD MIPS1_SR_INT_ENA_OLD #define MIPS_SR_KU_PREV MIPS1_SR_KU_PREV #define MIPS_SR_KU_CUR MIPS1_SR_KU_CUR #define MIPS_SR_INT_ENA_PREV MIPS1_SR_INT_ENA_PREV /* * R4000 status register bit definitons, * where different from r2000/r3000. */ #define MIPS3_SR_XX 0x80000000 #define MIPS3_SR_RP 0x08000000 #define MIPS3_SR_FR 0x04000000 #define MIPS3_SR_RE 0x02000000 #define MIPS3_SR_DIAG_DL 0x01000000 /* QED 52xx */ #define MIPS3_SR_DIAG_IL 0x00800000 /* QED 52xx */ #define MIPS3_SR_PX 0x00800000 /* MIPS64 */ #define MIPS3_SR_SR 0x00100000 #define MIPS3_SR_NMI 0x00080000 /* MIPS32/64 */ #define MIPS3_SR_DIAG_CH 0x00040000 #define MIPS3_SR_DIAG_CE 0x00020000 #define MIPS3_SR_DIAG_PE 0x00010000 #define MIPS3_SR_EIE 0x00010000 /* TX79/R5900 */ #define MIPS3_SR_KX 0x00000080 #define MIPS3_SR_SX 0x00000040 #define MIPS3_SR_UX 0x00000020 #define MIPS3_SR_KSU_MASK 0x00000018 #define MIPS3_SR_KSU_USER 0x00000010 #define MIPS3_SR_KSU_SUPER 0x00000008 #define MIPS3_SR_KSU_KERNEL 0x00000000 #define MIPS3_SR_ERL 0x00000004 #define MIPS3_SR_EXL 0x00000002 #ifdef MIPS3_5900 #undef MIPS_SR_INT_IE #define MIPS_SR_INT_IE 0x00010001 /* XXX */ #endif #define MIPS_SR_SOFT_RESET MIPS3_SR_SOFT_RESET #define MIPS_SR_DIAG_CH MIPS3_SR_DIAG_CH #define MIPS_SR_DIAG_CE MIPS3_SR_DIAG_CE #define MIPS_SR_DIAG_PE MIPS3_SR_DIAG_PE #define MIPS_SR_KX MIPS3_SR_KX #define MIPS_SR_SX MIPS3_SR_SX #define MIPS_SR_UX MIPS3_SR_UX #define MIPS_SR_KSU_MASK MIPS3_SR_KSU_MASK #define MIPS_SR_KSU_USER MIPS3_SR_KSU_USER #define MIPS_SR_KSU_SUPER MIPS3_SR_KSU_SUPER #define MIPS_SR_KSU_KERNEL MIPS3_SR_KSU_KERNEL #define MIPS_SR_ERL MIPS3_SR_ERL #define MIPS_SR_EXL MIPS3_SR_EXL /* * The interrupt masks. * If a bit in the mask is 1 then the interrupt is enabled (or pending). */ #define MIPS_INT_MASK 0xff00 #define MIPS_INT_MASK_5 0x8000 #define MIPS_INT_MASK_4 0x4000 #define MIPS_INT_MASK_3 0x2000 #define MIPS_INT_MASK_2 0x1000 #define MIPS_INT_MASK_1 0x0800 #define MIPS_INT_MASK_0 0x0400 #define MIPS_HARD_INT_MASK 0xfc00 #define MIPS_SOFT_INT_MASK_1 0x0200 #define MIPS_SOFT_INT_MASK_0 0x0100 /* * mips3 CPUs have on-chip timer at INT_MASK_5. Each platform can * choose to enable this interrupt. */ #if defined(MIPS3_ENABLE_CLOCK_INTR) #define MIPS3_INT_MASK MIPS_INT_MASK #define MIPS3_HARD_INT_MASK MIPS_HARD_INT_MASK #else #define MIPS3_INT_MASK (MIPS_INT_MASK & ~MIPS_INT_MASK_5) #define MIPS3_HARD_INT_MASK (MIPS_HARD_INT_MASK & ~MIPS_INT_MASK_5) #endif /* * The bits in the context register. */ #define MIPS1_CNTXT_PTE_BASE 0xFFE00000 #define MIPS1_CNTXT_BAD_VPN 0x001FFFFC #define MIPS3_CNTXT_PTE_BASE 0xFF800000 #define MIPS3_CNTXT_BAD_VPN2 0x007FFFF0 /* * The bits in the MIPS3 config register. * * bit 0..5: R/W, Bit 6..31: R/O */ /* kseg0 coherency algorithm - see MIPS3_TLB_ATTR values */ #define MIPS3_CONFIG_K0_MASK 0x00000007 /* * R/W Update on Store Conditional * 0: Store Conditional uses coherency algorithm specified by TLB * 1: Store Conditional uses cacheable coherent update on write */ #define MIPS3_CONFIG_CU 0x00000008 #define MIPS3_CONFIG_DB 0x00000010 /* Primary D-cache line size */ #define MIPS3_CONFIG_IB 0x00000020 /* Primary I-cache line size */ #define MIPS3_CONFIG_CACHE_L1_LSIZE(config, bit) \ (((config) & (bit)) ? 32 : 16) #define MIPS3_CONFIG_DC_MASK 0x000001c0 /* Primary D-cache size */ #define MIPS3_CONFIG_DC_SHIFT 6 #define MIPS3_CONFIG_IC_MASK 0x00000e00 /* Primary I-cache size */ #define MIPS3_CONFIG_IC_SHIFT 9 #define MIPS3_CONFIG_C_DEFBASE 0x1000 /* default base 2^12 */ /* Cache size mode indication: available only on Vr41xx CPUs */ #define MIPS3_CONFIG_CS 0x00001000 #define MIPS3_CONFIG_C_4100BASE 0x0400 /* base is 2^10 if CS=1 */ #define MIPS3_CONFIG_CACHE_SIZE(config, mask, base, shift) \ ((base) << (((config) & (mask)) >> (shift))) /* External cache enable: Controls L2 for R5000/Rm527x and L3 for Rm7000 */ #define MIPS3_CONFIG_SE 0x00001000 /* Block ordering: 0: sequential, 1: sub-block */ #define MIPS3_CONFIG_EB 0x00002000 /* ECC mode - 0: ECC mode, 1: parity mode */ #define MIPS3_CONFIG_EM 0x00004000 /* BigEndianMem - 0: kernel and memory are little endian, 1: big endian */ #define MIPS3_CONFIG_BE 0x00008000 /* Dirty Shared coherency state - 0: enabled, 1: disabled */ #define MIPS3_CONFIG_SM 0x00010000 /* Secondary Cache - 0: present, 1: not present */ #define MIPS3_CONFIG_SC 0x00020000 /* System Port width - 0: 64-bit, 1: 32-bit (QED RM523x), 2,3: reserved */ #define MIPS3_CONFIG_EW_MASK 0x000c0000 #define MIPS3_CONFIG_EW_SHIFT 18 /* Secondary Cache port width - 0: 128-bit data path to S-cache, 1: reserved */ #define MIPS3_CONFIG_SW 0x00100000 /* Split Secondary Cache Mode - 0: I/D mixed, 1: I/D separated by SCAddr(17) */ #define MIPS3_CONFIG_SS 0x00200000 /* Secondary Cache line size */ #define MIPS3_CONFIG_SB_MASK 0x00c00000 #define MIPS3_CONFIG_SB_SHIFT 22 #define MIPS3_CONFIG_CACHE_L2_LSIZE(config) \ (0x10 << (((config) & MIPS3_CONFIG_SB_MASK) >> MIPS3_CONFIG_SB_SHIFT)) /* Write back data rate */ #define MIPS3_CONFIG_EP_MASK 0x0f000000 #define MIPS3_CONFIG_EP_SHIFT 24 /* System clock ratio - this value is CPU dependent */ #define MIPS3_CONFIG_EC_MASK 0x70000000 #define MIPS3_CONFIG_EC_SHIFT 28 /* Master-Checker Mode - 1: enabled */ #define MIPS3_CONFIG_CM 0x80000000 /* * The bits in the MIPS4 config register. */ /* kseg0 coherency algorithm - see MIPS3_TLB_ATTR values */ #define MIPS4_CONFIG_K0_MASK MIPS3_CONFIG_K0_MASK #define MIPS4_CONFIG_DN_MASK 0x00000018 /* Device number */ #define MIPS4_CONFIG_CT 0x00000020 /* CohPrcReqTar */ #define MIPS4_CONFIG_PE 0x00000040 /* PreElmReq */ #define MIPS4_CONFIG_PM_MASK 0x00000180 /* PreReqMax */ #define MIPS4_CONFIG_EC_MASK 0x00001e00 /* SysClkDiv */ #define MIPS4_CONFIG_SB 0x00002000 /* SCBlkSize */ #define MIPS4_CONFIG_SK 0x00004000 /* SCColEn */ #define MIPS4_CONFIG_BE 0x00008000 /* MemEnd */ #define MIPS4_CONFIG_SS_MASK 0x00070000 /* SCSize */ #define MIPS4_CONFIG_SC_MASK 0x00380000 /* SCClkDiv */ #define MIPS4_CONFIG_RESERVED 0x03c00000 /* Reserved wired 0 */ #define MIPS4_CONFIG_DC_MASK 0x1c000000 /* Primary D-Cache size */ #define MIPS4_CONFIG_IC_MASK 0xe0000000 /* Primary I-Cache size */ #define MIPS4_CONFIG_DC_SHIFT 26 #define MIPS4_CONFIG_IC_SHIFT 29 #define MIPS4_CONFIG_CACHE_SIZE(config, mask, base, shift) \ ((base) << (((config) & (mask)) >> (shift))) #define MIPS4_CONFIG_CACHE_L2_LSIZE(config) \ (((config) & MIPS4_CONFIG_SB) ? 128 : 64) /* * Location of exception vectors. * * Common vectors: reset and UTLB miss. */ #define MIPS_RESET_EXC_VEC MIPS_PHYS_TO_KSEG1(0x1FC00000) #define MIPS_UTLB_MISS_EXC_VEC MIPS_PHYS_TO_KSEG0(0) /* * MIPS-1 general exception vector (everything else) */ #define MIPS1_GEN_EXC_VEC MIPS_PHYS_TO_KSEG0(0x0080) /* * MIPS-III exception vectors */ #define MIPS3_XTLB_MISS_EXC_VEC MIPS_PHYS_TO_KSEG0(0x0080) #define MIPS3_CACHE_ERR_EXC_VEC MIPS_PHYS_TO_KSEG0(0x0100) #define MIPS3_GEN_EXC_VEC MIPS_PHYS_TO_KSEG0(0x0180) /* * TX79 (R5900) exception vectors */ #define MIPS_R5900_COUNTER_EXC_VEC MIPS_PHYS_TO_KSEG0(0x0080) #define MIPS_R5900_DEBUG_EXC_VEC MIPS_PHYS_TO_KSEG0(0x0100) /* * MIPS32/MIPS64 (and some MIPS3) dedicated interrupt vector. */ #define MIPS3_INTR_EXC_VEC MIPS_PHYS_TO_KSEG0(0x0200) /* * Coprocessor 0 registers: * * v--- width for mips I,III,32,64 * (3=32bit, 6=64bit, i=impl dep) * 0 MIPS_COP_0_TLB_INDEX 3333 TLB Index. * 1 MIPS_COP_0_TLB_RANDOM 3333 TLB Random. * 2 MIPS_COP_0_TLB_LOW 3... r3k TLB entry low. * 2 MIPS_COP_0_TLB_LO0 .636 r4k TLB entry low. * 3 MIPS_COP_0_TLB_LO1 .636 r4k TLB entry low, extended. * 4 MIPS_COP_0_TLB_CONTEXT 3636 TLB Context. * 5 MIPS_COP_0_TLB_PG_MASK .333 TLB Page Mask register. * 6 MIPS_COP_0_TLB_WIRED .333 Wired TLB number. * 8 MIPS_COP_0_BAD_VADDR 3636 Bad virtual address. * 9 MIPS_COP_0_COUNT .333 Count register. * 10 MIPS_COP_0_TLB_HI 3636 TLB entry high. * 11 MIPS_COP_0_COMPARE .333 Compare (against Count). * 12 MIPS_COP_0_STATUS 3333 Status register. * 13 MIPS_COP_0_CAUSE 3333 Exception cause register. * 14 MIPS_COP_0_EXC_PC 3636 Exception PC. * 15 MIPS_COP_0_PRID 3333 Processor revision identifier. * 15/1 MIPS_COP_0_EBASE ..33 Exception Base * 16 MIPS_COP_0_CONFIG 3333 Configuration register. * 16/1 MIPS_COP_0_CONFIG1 ..33 Configuration register 1. * 16/2 MIPS_COP_0_CONFIG2 ..33 Configuration register 2. * 16/3 MIPS_COP_0_CONFIG3 ..33 Configuration register 3. * 17 MIPS_COP_0_LLADDR .336 Load Linked Address. * 18 MIPS_COP_0_WATCH_LO .336 WatchLo register. * 19 MIPS_COP_0_WATCH_HI .333 WatchHi register. * 20 MIPS_COP_0_TLB_XCONTEXT .6.6 TLB XContext register. * 23 MIPS_COP_0_DEBUG .... Debug JTAG register. * 24 MIPS_COP_0_DEPC .... DEPC JTAG register. * 25 MIPS_COP_0_PERFCNT ..36 Performance Counter register. * 26 MIPS_COP_0_ECC .3ii ECC / Error Control register. * 27 MIPS_COP_0_CACHE_ERR .3ii Cache Error register. * 28/0 MIPS_COP_0_TAG_LO .3ii Cache TagLo register (instr). * 28/1 MIPS_COP_0_DATA_LO ..ii Cache DataLo register (instr). * 28/2 MIPS_COP_0_TAG_LO ..ii Cache TagLo register (data). * 28/3 MIPS_COP_0_DATA_LO ..ii Cache DataLo register (data). * 29/0 MIPS_COP_0_TAG_HI .3ii Cache TagHi register (instr). * 29/1 MIPS_COP_0_DATA_HI ..ii Cache DataHi register (instr). * 29/2 MIPS_COP_0_TAG_HI ..ii Cache TagHi register (data). * 29/3 MIPS_COP_0_DATA_HI ..ii Cache DataHi register (data). * 30 MIPS_COP_0_ERROR_PC .636 Error EPC register. * 31 MIPS_COP_0_DESAVE .... DESAVE JTAG register. */ #ifdef _LOCORE #define _(n) __CONCAT($,n) #else #define _(n) n #endif #define MIPS_COP_0_TLB_INDEX _(0) #define MIPS_COP_0_TLB_RANDOM _(1) /* Name and meaning of TLB bits for $2 differ on r3k and r4k. */ #define MIPS_COP_0_TLB_CONTEXT _(4) /* $5 and $6 new with MIPS-III */ #define MIPS_COP_0_BAD_VADDR _(8) #define MIPS_COP_0_TLB_HI _(10) #define MIPS_COP_0_STATUS _(12) #define MIPS_COP_0_CAUSE _(13) #define MIPS_COP_0_EXC_PC _(14) #define MIPS_COP_0_PRID _(15) /* MIPS-I */ #define MIPS_COP_0_TLB_LOW _(2) /* MIPS-III */ #define MIPS_COP_0_TLB_LO0 _(2) #define MIPS_COP_0_TLB_LO1 _(3) #define MIPS_COP_0_TLB_PG_MASK _(5) #define MIPS_COP_0_TLB_WIRED _(6) #define MIPS_COP_0_COUNT _(9) #define MIPS_COP_0_COMPARE _(11) #define MIPS_COP_0_CONFIG _(16) #define MIPS_COP_0_LLADDR _(17) #define MIPS_COP_0_WATCH_LO _(18) #define MIPS_COP_0_WATCH_HI _(19) #define MIPS_COP_0_TLB_XCONTEXT _(20) #define MIPS_COP_0_ECC _(26) #define MIPS_COP_0_CACHE_ERR _(27) #define MIPS_COP_0_TAG_LO _(28) #define MIPS_COP_0_TAG_HI _(29) #define MIPS_COP_0_ERROR_PC _(30) /* MIPS32/64 */ #define MIPS_COP_0_DEBUG _(23) #define MIPS_COP_0_DEPC _(24) #define MIPS_COP_0_PERFCNT _(25) #define MIPS_COP_0_DATA_LO _(28) #define MIPS_COP_0_DATA_HI _(29) #define MIPS_COP_0_DESAVE _(31) /* * Values for the code field in a break instruction. */ #define MIPS_BREAK_INSTR 0x0000000d #define MIPS_BREAK_VAL_MASK 0x03ff0000 #define MIPS_BREAK_VAL_SHIFT 16 #define MIPS_BREAK_KDB_VAL 512 #define MIPS_BREAK_SSTEP_VAL 513 #define MIPS_BREAK_BRKPT_VAL 514 #define MIPS_BREAK_SOVER_VAL 515 #define MIPS_BREAK_KDB (MIPS_BREAK_INSTR | \ (MIPS_BREAK_KDB_VAL << MIPS_BREAK_VAL_SHIFT)) #define MIPS_BREAK_SSTEP (MIPS_BREAK_INSTR | \ (MIPS_BREAK_SSTEP_VAL << MIPS_BREAK_VAL_SHIFT)) #define MIPS_BREAK_BRKPT (MIPS_BREAK_INSTR | \ (MIPS_BREAK_BRKPT_VAL << MIPS_BREAK_VAL_SHIFT)) #define MIPS_BREAK_SOVER (MIPS_BREAK_INSTR | \ (MIPS_BREAK_SOVER_VAL << MIPS_BREAK_VAL_SHIFT)) /* * Mininum and maximum cache sizes. */ #define MIPS_MIN_CACHE_SIZE (16 * 1024) #define MIPS_MAX_CACHE_SIZE (256 * 1024) #define MIPS3_MAX_PCACHE_SIZE (32 * 1024) /* max. primary cache size */ /* * The floating point version and status registers. */ #define MIPS_FPU_ID $0 #define MIPS_FPU_CSR $31 /* * The floating point coprocessor status register bits. */ #define MIPS_FPU_ROUNDING_BITS 0x00000003 #define MIPS_FPU_ROUND_RN 0x00000000 #define MIPS_FPU_ROUND_RZ 0x00000001 #define MIPS_FPU_ROUND_RP 0x00000002 #define MIPS_FPU_ROUND_RM 0x00000003 #define MIPS_FPU_STICKY_BITS 0x0000007c #define MIPS_FPU_STICKY_INEXACT 0x00000004 #define MIPS_FPU_STICKY_UNDERFLOW 0x00000008 #define MIPS_FPU_STICKY_OVERFLOW 0x00000010 #define MIPS_FPU_STICKY_DIV0 0x00000020 #define MIPS_FPU_STICKY_INVALID 0x00000040 #define MIPS_FPU_ENABLE_BITS 0x00000f80 #define MIPS_FPU_ENABLE_INEXACT 0x00000080 #define MIPS_FPU_ENABLE_UNDERFLOW 0x00000100 #define MIPS_FPU_ENABLE_OVERFLOW 0x00000200 #define MIPS_FPU_ENABLE_DIV0 0x00000400 #define MIPS_FPU_ENABLE_INVALID 0x00000800 #define MIPS_FPU_EXCEPTION_BITS 0x0003f000 #define MIPS_FPU_EXCEPTION_INEXACT 0x00001000 #define MIPS_FPU_EXCEPTION_UNDERFLOW 0x00002000 #define MIPS_FPU_EXCEPTION_OVERFLOW 0x00004000 #define MIPS_FPU_EXCEPTION_DIV0 0x00008000 #define MIPS_FPU_EXCEPTION_INVALID 0x00010000 #define MIPS_FPU_EXCEPTION_UNIMPL 0x00020000 #define MIPS_FPU_COND_BIT 0x00800000 #define MIPS_FPU_FLUSH_BIT 0x01000000 /* r4k, MBZ on r3k */ #define MIPS1_FPC_MBZ_BITS 0xff7c0000 #define MIPS3_FPC_MBZ_BITS 0xfe7c0000 /* * Constants to determine if have a floating point instruction. */ #define MIPS_OPCODE_SHIFT 26 #define MIPS_OPCODE_C1 0x11 /* * The low part of the TLB entry. */ #define MIPS1_TLB_PFN 0xfffff000 #define MIPS1_TLB_NON_CACHEABLE_BIT 0x00000800 #define MIPS1_TLB_DIRTY_BIT 0x00000400 #define MIPS1_TLB_VALID_BIT 0x00000200 #define MIPS1_TLB_GLOBAL_BIT 0x00000100 #define MIPS3_TLB_PFN 0x3fffffc0 #define MIPS3_TLB_ATTR_MASK 0x00000038 #define MIPS3_TLB_ATTR_SHIFT 3 #define MIPS3_TLB_DIRTY_BIT 0x00000004 #define MIPS3_TLB_VALID_BIT 0x00000002 #define MIPS3_TLB_GLOBAL_BIT 0x00000001 #define MIPS1_TLB_PHYS_PAGE_SHIFT 12 #define MIPS3_TLB_PHYS_PAGE_SHIFT 6 #define MIPS1_TLB_PF_NUM MIPS1_TLB_PFN #define MIPS3_TLB_PF_NUM MIPS3_TLB_PFN #define MIPS1_TLB_MOD_BIT MIPS1_TLB_DIRTY_BIT #define MIPS3_TLB_MOD_BIT MIPS3_TLB_DIRTY_BIT /* * MIPS3_TLB_ATTR values - coherency algorithm: * 0: cacheable, noncoherent, write-through, no write allocate * 1: cacheable, noncoherent, write-through, write allocate * 2: uncached * 3: cacheable, noncoherent, write-back (noncoherent) * 4: cacheable, coherent, write-back, exclusive (exclusive) * 5: cacheable, coherent, write-back, exclusive on write (sharable) * 6: cacheable, coherent, write-back, update on write (update) * 7: uncached, accelerated (gather STORE operations) */ #define MIPS3_TLB_ATTR_WT 0 /* IDT */ #define MIPS3_TLB_ATTR_WT_WRITEALLOCATE 1 /* IDT */ #define MIPS3_TLB_ATTR_UNCACHED 2 /* R4000/R4400, IDT */ #define MIPS3_TLB_ATTR_WB_NONCOHERENT 3 /* R4000/R4400, IDT */ #define MIPS3_TLB_ATTR_WB_EXCLUSIVE 4 /* R4000/R4400 */ #define MIPS3_TLB_ATTR_WB_SHARABLE 5 /* R4000/R4400 */ #define MIPS3_TLB_ATTR_WB_UPDATE 6 /* R4000/R4400 */ #define MIPS4_TLB_ATTR_UNCACHED_ACCELERATED 7 /* R10000 */ /* * The high part of the TLB entry. */ #define MIPS1_TLB_VPN 0xfffff000 #define MIPS1_TLB_PID 0x00000fc0 #define MIPS1_TLB_PID_SHIFT 6 #define MIPS3_TLB_VPN2 0xffffe000 #define MIPS3_TLB_ASID 0x000000ff #define MIPS1_TLB_VIRT_PAGE_NUM MIPS1_TLB_VPN #define MIPS3_TLB_VIRT_PAGE_NUM MIPS3_TLB_VPN2 #define MIPS3_TLB_PID MIPS3_TLB_ASID #define MIPS_TLB_VIRT_PAGE_SHIFT 12 /* * r3000: shift count to put the index in the right spot. */ #define MIPS1_TLB_INDEX_SHIFT 8 /* * The first TLB that write random hits. */ #define MIPS1_TLB_FIRST_RAND_ENTRY 8 #define MIPS3_TLB_WIRED_UPAGES 1 /* * The number of process id entries. */ #define MIPS1_TLB_NUM_PIDS 64 #define MIPS3_TLB_NUM_ASIDS 256 /* * Patch codes to hide CPU design differences between MIPS1 and MIPS3. */ /* XXX simonb: this is before MIPS3_PLUS is defined (and is ugly!) */ #if !(defined(MIPS3) || defined(MIPS4) || defined(MIPS32) || defined(MIPS64)) \ && defined(MIPS1) /* XXX simonb must be neater! */ #define MIPS_TLB_PID_SHIFT MIPS1_TLB_PID_SHIFT #define MIPS_TLB_NUM_PIDS MIPS1_TLB_NUM_PIDS #endif #if (defined(MIPS3) || defined(MIPS4) || defined(MIPS32) || defined(MIPS64)) \ && !defined(MIPS1) /* XXX simonb must be neater! */ #define MIPS_TLB_PID_SHIFT 0 #define MIPS_TLB_NUM_PIDS MIPS3_TLB_NUM_ASIDS #endif #if !defined(MIPS_TLB_PID_SHIFT) #define MIPS_TLB_PID_SHIFT \ ((MIPS_HAS_R4K_MMU) ? 0 : MIPS1_TLB_PID_SHIFT) #define MIPS_TLB_NUM_PIDS \ ((MIPS_HAS_R4K_MMU) ? MIPS3_TLB_NUM_ASIDS : MIPS1_TLB_NUM_PIDS) #endif /* * CPU processor revision IDs for company ID == 0 (non mips32/64 chips) */ #define MIPS_R2000 0x01 /* MIPS R2000 ISA I */ #define MIPS_R3000 0x02 /* MIPS R3000 ISA I */ #define MIPS_R6000 0x03 /* MIPS R6000 ISA II */ #define MIPS_R4000 0x04 /* MIPS R4000/R4400 ISA III */ #define MIPS_R3LSI 0x05 /* LSI Logic R3000 derivative ISA I */ #define MIPS_R6000A 0x06 /* MIPS R6000A ISA II */ #define MIPS_R3IDT 0x07 /* IDT R3041 or RC36100 ISA I */ #define MIPS_R10000 0x09 /* MIPS R10000 ISA IV */ #define MIPS_R4200 0x0a /* NEC VR4200 ISA III */ #define MIPS_R4300 0x0b /* NEC VR4300 ISA III */ #define MIPS_R4100 0x0c /* NEC VR4100 ISA III */ #define MIPS_R12000 0x0e /* MIPS R12000 ISA IV */ #define MIPS_R14000 0x0f /* MIPS R14000 ISA IV */ #define MIPS_R8000 0x10 /* MIPS R8000 Blackbird/TFP ISA IV */ #define MIPS_RC32300 0x18 /* IDT RC32334,332,355 ISA 32 */ #define MIPS_R4600 0x20 /* QED R4600 Orion ISA III */ #define MIPS_R4700 0x21 /* QED R4700 Orion ISA III */ #define MIPS_R3SONY 0x21 /* Sony R3000 based ISA I */ #define MIPS_R4650 0x22 /* QED R4650 ISA III */ #define MIPS_TX3900 0x22 /* Toshiba TX39 family ISA I */ #define MIPS_R5000 0x23 /* MIPS R5000 ISA IV */ #define MIPS_R3NKK 0x23 /* NKK R3000 based ISA I */ #define MIPS_RC32364 0x26 /* IDT RC32364 ISA 32 */ #define MIPS_RM7000 0x27 /* QED RM7000 ISA IV */ #define MIPS_RM5200 0x28 /* QED RM5200s ISA IV */ #define MIPS_TX4900 0x2d /* Toshiba TX49 family ISA III */ #define MIPS_R5900 0x2e /* Toshiba R5900 (EECore) ISA --- */ #define MIPS_RC64470 0x30 /* IDT RC64474/RC64475 ISA III */ #define MIPS_TX7900 0x38 /* Toshiba TX79 ISA III+*/ #define MIPS_R5400 0x54 /* NEC VR5400 ISA IV */ #define MIPS_R5500 0x55 /* NEC VR5500 ISA IV */ #define MIPS_LOONGSON2 0x63 /* ICT Loongson-2 ISA III */ /* * CPU revision IDs for some prehistoric processors. */ /* For MIPS_R3000 */ #define MIPS_REV_R2000A 0x16 /* R2000A uses R3000 proc revision */ #define MIPS_REV_R3000 0x20 #define MIPS_REV_R3000A 0x30 /* For MIPS_TX3900 */ #define MIPS_REV_TX3912 0x10 #define MIPS_REV_TX3922 0x30 #define MIPS_REV_TX3927 0x40 /* For MIPS_R4000 */ #define MIPS_REV_R4000_A 0x00 #define MIPS_REV_R4000_B 0x22 #define MIPS_REV_R4000_C 0x30 #define MIPS_REV_R4400_A 0x40 #define MIPS_REV_R4400_B 0x50 #define MIPS_REV_R4400_C 0x60 /* For MIPS_TX4900 */ #define MIPS_REV_TX4927 0x22 /* For MIPS_LOONGSON2 */ #define MIPS_REV_LOONGSON2E 0x02 #define MIPS_REV_LOONGSON2F 0x03 /* * CPU processor revision IDs for company ID == 1 (MIPS) */ #define MIPS_4Kc 0x80 /* MIPS 4Kc ISA 32 */ #define MIPS_5Kc 0x81 /* MIPS 5Kc ISA 64 */ #define MIPS_20Kc 0x82 /* MIPS 20Kc ISA 64 */ #define MIPS_4Kmp 0x83 /* MIPS 4Km/4Kp ISA 32 */ #define MIPS_4KEc 0x84 /* MIPS 4KEc ISA 32 */ #define MIPS_4KEmp 0x85 /* MIPS 4KEm/4KEp ISA 32 */ #define MIPS_4KSc 0x86 /* MIPS 4KSc ISA 32 */ #define MIPS_M4K 0x87 /* MIPS M4K ISA 32 Rel 2 */ #define MIPS_25Kf 0x88 /* MIPS 25Kf ISA 64 */ #define MIPS_5KE 0x89 /* MIPS 5KE ISA 64 Rel 2 */ #define MIPS_4KEc_R2 0x90 /* MIPS 4KEc_R2 ISA 32 Rel 2 */ #define MIPS_4KEmp_R2 0x91 /* MIPS 4KEm/4KEp_R2 ISA 32 Rel 2 */ #define MIPS_4KSd 0x92 /* MIPS 4KSd ISA 32 Rel 2 */ #define MIPS_24K 0x93 /* MIPS 24Kc/24Kf ISA 32 Rel 2 */ #define MIPS_34K 0x95 /* MIPS 34K ISA 32 R2 MT */ #define MIPS_24KE 0x96 /* MIPS 24KEc ISA 32 Rel 2 */ #define MIPS_74K 0x97 /* MIPS 74Kc/74Kf ISA 32 Rel 2 */ /* * Alchemy (company ID 3) use the processor ID field to donote the CPU core * revision and the company options field do donate the SOC chip type. */ /* CPU processor revision IDs */ #define MIPS_AU_REV1 0x01 /* Alchemy Au1000 (Rev 1) ISA 32 */ #define MIPS_AU_REV2 0x02 /* Alchemy Au1000 (Rev 2) ISA 32 */ /* CPU company options IDs */ #define MIPS_AU1000 0x00 #define MIPS_AU1500 0x01 #define MIPS_AU1100 0x02 #define MIPS_AU1550 0x03 /* * CPU processor revision IDs for company ID == 4 (SiByte) */ #define MIPS_SB1 0x01 /* SiByte SB1 ISA 64 */ /* * CPU processor revision IDs for company ID == 5 (SandCraft) */ #define MIPS_SR7100 0x04 /* SandCraft SR7100 ISA 64 */ /* * CPU processor revision IDs for company ID == 12 (RMI) */ #define MIPS_XLR732 0x00 /* RMI XLR732-C ISA 64 */ #define MIPS_XLR716 0x02 /* RMI XLR716-C ISA 64 */ #define MIPS_XLR532 0x08 /* RMI XLR532-C ISA 64 */ #define MIPS_XLR516 0x0a /* RMI XLR516-C ISA 64 */ #define MIPS_XLR508 0x0b /* RMI XLR508-C ISA 64 */ #define MIPS_XLR308 0x0f /* RMI XLR308-C ISA 64 */ #define MIPS_XLS616 0x40 /* RMI XLS616 ISA 64 */ #define MIPS_XLS416 0x44 /* RMI XLS416 ISA 64 */ #define MIPS_XLS608 0x4A /* RMI XLS608 ISA 64 */ #define MIPS_XLS408 0x4E /* RMI XLS406 ISA 64 */ #define MIPS_XLS404 0x4F /* RMI XLS404 ISA 64 */ #define MIPS_XLS408LITE 0x88 /* RMI XLS408-Lite ISA 64 */ #define MIPS_XLS404LITE 0x8C /* RMI XLS404-Lite ISA 64 */ #define MIPS_XLS208 0x8E /* RMI XLS208 ISA 64 */ #define MIPS_XLS204 0x8F /* RMI XLS204 ISA 64 */ #define MIPS_XLS108 0xCE /* RMI XLS108 ISA 64 */ #define MIPS_XLS104 0xCF /* RMI XLS104 ISA 64 */ /* * FPU processor revision ID */ #define MIPS_SOFT 0x00 /* Software emulation ISA I */ #define MIPS_R2360 0x01 /* MIPS R2360 FPC ISA I */ #define MIPS_R2010 0x02 /* MIPS R2010 FPC ISA I */ #define MIPS_R3010 0x03 /* MIPS R3010 FPC ISA I */ #define MIPS_R6010 0x04 /* MIPS R6010 FPC ISA II */ #define MIPS_R4010 0x05 /* MIPS R4010 FPC ISA II */ #define MIPS_R31LSI 0x06 /* LSI Logic derivate ISA I */ #define MIPS_R3TOSH 0x22 /* Toshiba R3000 based FPU ISA I */ #endif /* _MIPS_CPUREGS_H_ */ /* $NetBSD: cpu.h,v 1.94 2009/12/14 00:46:04 matt Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ralph Campbell and Rick Macklem. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)cpu.h 8.4 (Berkeley) 1/4/94 */ #ifndef _CPU_H_ #define _CPU_H_ /* * bitfield defines for cpu_cp0flags */ #define MIPS_CP0FL_USE __BIT(0) /* use these flags */ #define MIPS_CP0FL_ECC __BIT(1) #define MIPS_CP0FL_CACHE_ERR __BIT(2) #define MIPS_CP0FL_EIRR __BIT(3) #define MIPS_CP0FL_EIMR __BIT(4) #define MIPS_CP0FL_EBASE __BIT(5) #define MIPS_CP0FL_CONFIG __BIT(6) #define MIPS_CP0FL_CONFIGn(n) (__BIT(7) << ((n) & 7)) /* * cpu_cidflags defines, by company */ /* * RMI company-specific cpu_cidflags */ #define MIPS_CIDFL_RMI_TYPE __BITS(0,2) #define CIDFL_RMI_TYPE_XLR 0 #define CIDFL_RMI_TYPE_XLS 1 #define CIDFL_RMI_TYPE_XLP 2 #define CPU_INFO_ITERATOR int #define CPU_INFO_FOREACH(cii, ci) \ (void)(cii), ci = &cpu_info_store; ci != NULL; ci = ci->ci_next /* * CTL_MACHDEP definitions. */ #define CPU_CONSDEV 1 /* dev_t: console terminal device */ #define CPU_BOOTED_KERNEL 2 /* string: booted kernel name */ #define CPU_ROOT_DEVICE 3 /* string: root device name */ #define CPU_LLSC 4 /* OS/CPU supports LL/SC instruction */ /* * Platform can override, but note this breaks userland compatibility * with other mips platforms. */ #ifndef CPU_MAXID #define CPU_MAXID 5 /* number of valid machdep ids */ #endif #ifdef _KERNEL #if defined(_LKM) || defined(_STANDALONE) /* Assume all CPU architectures are valid for LKM's and standlone progs */ #define MIPS1 1 #define MIPS3 1 #define MIPS4 1 #define MIPS32 1 #define MIPS64 1 #endif #if (MIPS1 + MIPS3 + MIPS4 + MIPS32 + MIPS64) == 0 #error at least one of MIPS1, MIPS3, MIPS4, MIPS32 or MIPS64 must be specified #endif /* Shortcut for MIPS3 or above defined */ #if defined(MIPS3) || defined(MIPS4) || defined(MIPS32) || defined(MIPS64) #define MIPS3_PLUS 1 #else #undef MIPS3_PLUS #endif /* * Macros to find the CPU architecture we're on at run-time, * or if possible, at compile-time. */ #define CPU_ARCH_MIPSx 0 /* XXX unknown */ #define CPU_ARCH_MIPS1 (1 << 0) #define CPU_ARCH_MIPS2 (1 << 1) #define CPU_ARCH_MIPS3 (1 << 2) #define CPU_ARCH_MIPS4 (1 << 3) #define CPU_ARCH_MIPS5 (1 << 4) #define CPU_ARCH_MIPS32 (1 << 5) #define CPU_ARCH_MIPS64 (1 << 6) /* Note: must be kept in sync with -ffixed-?? Makefile.mips. */ #define MIPS_CURLWP $23 #define MIPS_CURLWP_QUOTED "$23" #define MIPS_CURLWP_CARD 23 #define MIPS_CURLWP_FRAME(x) FRAME_S7(x) #ifndef _LOCORE #define curlwp mips_curlwp #define curcpu() (curlwp->l_cpu) #define curpcb ((struct pcb *)lwp_getpcb(curlwp)) #define fpcurlwp (curcpu()->ci_fpcurlwp) #define cpu_number() (0) #define cpu_proc_fork(p1, p2) ((void)((p2)->p_md.md_abi = (p1)->p_md.md_abi)) /* XXX simonb * Should the following be in a cpu_info type structure? * And how many of these are per-cpu vs. per-system? (Ie, * we can assume that all cpus have the same mmu-type, but * maybe not that all cpus run at the same clock speed. * Some SGI's apparently support R12k and R14k in the same * box.) */ #define CPU_MIPS_R4K_MMU 0x0001 #define CPU_MIPS_NO_LLSC 0x0002 #define CPU_MIPS_CAUSE_IV 0x0004 #define CPU_MIPS_HAVE_SPECIAL_CCA 0x0008 /* Defaults to '3' if not set. */ #define CPU_MIPS_CACHED_CCA_MASK 0x0070 #define CPU_MIPS_CACHED_CCA_SHIFT 4 #define CPU_MIPS_DOUBLE_COUNT 0x0080 /* 1 cp0 count == 2 clock cycles */ #define CPU_MIPS_USE_WAIT 0x0100 /* Use "wait"-based cpu_idle() */ #define CPU_MIPS_NO_WAIT 0x0200 /* Inverse of previous, for mips32/64 */ #define CPU_MIPS_D_CACHE_COHERENT 0x0400 /* D-cache is fully coherent */ #define CPU_MIPS_I_D_CACHE_COHERENT 0x0800 /* I-cache funcs don't need to flush the D-cache */ #define CPU_MIPS_NO_LLADDR 0x1000 #define CPU_MIPS_HAVE_MxCR 0x2000 /* have mfcr, mtcr insns */ #define MIPS_NOT_SUPP 0x8000 #endif /* !_LOCORE */ #if ((MIPS1 + MIPS3 + MIPS4 + MIPS32 + MIPS64) == 1) || defined(_LOCORE) #if defined(MIPS1) # define CPUISMIPS3 0 # define CPUIS64BITS 0 # define CPUISMIPS32 0 # define CPUISMIPS64 0 # define CPUISMIPSNN 0 # define MIPS_HAS_R4K_MMU 0 # define MIPS_HAS_CLOCK 0 # define MIPS_HAS_LLSC 0 # define MIPS_HAS_LLADDR 0 #elif defined(MIPS3) || defined(MIPS4) # define CPUISMIPS3 1 # define CPUIS64BITS 1 # define CPUISMIPS32 0 # define CPUISMIPS64 0 # define CPUISMIPSNN 0 # define MIPS_HAS_R4K_MMU 1 # define MIPS_HAS_CLOCK 1 # if defined(_LOCORE) # if !defined(MIPS3_5900) && !defined(MIPS3_4100) # define MIPS_HAS_LLSC 1 # else # define MIPS_HAS_LLSC 0 # endif # else /* _LOCORE */ # define MIPS_HAS_LLSC (mips_has_llsc) # endif /* _LOCORE */ # define MIPS_HAS_LLADDR ((mips_cpu_flags & CPU_MIPS_NO_LLADDR) == 0) #elif defined(MIPS32) # define CPUISMIPS3 1 # define CPUIS64BITS 0 # define CPUISMIPS32 1 # define CPUISMIPS64 0 # define CPUISMIPSNN 1 # define MIPS_HAS_R4K_MMU 1 # define MIPS_HAS_CLOCK 1 # define MIPS_HAS_LLSC 1 # define MIPS_HAS_LLADDR ((mips_cpu_flags & CPU_MIPS_NO_LLADDR) == 0) #elif defined(MIPS64) # define CPUISMIPS3 1 # define CPUIS64BITS 1 # define CPUISMIPS32 0 # define CPUISMIPS64 1 # define CPUISMIPSNN 1 # define MIPS_HAS_R4K_MMU 1 # define MIPS_HAS_CLOCK 1 # define MIPS_HAS_LLSC 1 # define MIPS_HAS_LLADDR ((mips_cpu_flags & CPU_MIPS_NO_LLADDR) == 0) #endif #else /* run-time test */ #ifndef _LOCORE #define MIPS_HAS_R4K_MMU (mips_has_r4k_mmu) #define MIPS_HAS_LLSC (mips_has_llsc) #define MIPS_HAS_LLADDR ((mips_cpu_flags & CPU_MIPS_NO_LLADDR) == 0) /* This test is ... rather bogus */ #define CPUISMIPS3 ((cpu_arch & \ (CPU_ARCH_MIPS3 | CPU_ARCH_MIPS4 | CPU_ARCH_MIPS32 | CPU_ARCH_MIPS64)) != 0) /* And these aren't much better while the previous test exists as is... */ #define CPUISMIPS32 ((cpu_arch & CPU_ARCH_MIPS32) != 0) #define CPUISMIPS64 ((cpu_arch & CPU_ARCH_MIPS64) != 0) #define CPUISMIPSNN ((cpu_arch & (CPU_ARCH_MIPS32 | CPU_ARCH_MIPS64)) != 0) #define CPUIS64BITS ((cpu_arch & \ (CPU_ARCH_MIPS3 | CPU_ARCH_MIPS4 | CPU_ARCH_MIPS64)) != 0) #define MIPS_HAS_CLOCK (cpu_arch >= CPU_ARCH_MIPS3) #else /* !_LOCORE */ #define MIPS_HAS_LLSC 0 #endif /* !_LOCORE */ #endif /* run-time test */ #ifndef _LOCORE /* * A port must provde CLKF_USERMODE() for use in machine-independent code. * These differ on r4000 and r3000 systems; provide them in the * port-dependent file that includes this one, using the macros below. */ /* mips1 versions */ #define MIPS1_CLKF_USERMODE(framep) ((framep)->sr & MIPS_SR_KU_PREV) /* mips3 versions */ #define MIPS3_CLKF_USERMODE(framep) ((framep)->sr & MIPS_SR_KSU_USER) #define CLKF_PC(framep) ((framep)->pc) #define CLKF_INTR(framep) (0) #if defined(MIPS3_PLUS) && !defined(MIPS1) /* XXX bogus! */ #define CLKF_USERMODE(framep) MIPS3_CLKF_USERMODE(framep) #endif #if !defined(MIPS3_PLUS) && defined(MIPS1) /* XXX bogus! */ #define CLKF_USERMODE(framep) MIPS1_CLKF_USERMODE(framep) #endif #if defined(MIPS3_PLUS) && defined(MIPS1) /* XXX bogus! */ #define CLKF_USERMODE(framep) \ ((CPUISMIPS3) ? MIPS3_CLKF_USERMODE(framep): MIPS1_CLKF_USERMODE(framep)) #endif /* * This is used during profiling to integrate system time. It can safely * assume that the process is resident. */ #define PROC_PC(p) \ (((struct frame *)(p)->p_md.md_regs)->f_regs[37]) /* XXX PC */ /* * Preempt the current process if in interrupt from user mode, * or after the current trap/syscall if in system mode. */ /* * Give a profiling tick to the current process when the user profiling * buffer pages are invalid. On the MIPS, request an ast to send us * through trap, marking the proc as needing a profiling tick. */ #define cpu_need_proftick(l) \ do { \ (l)->l_pflag |= LP_OWEUPC; \ aston(l); \ } while (/*CONSTCOND*/0) /* * Notify the current lwp (l) that it has a signal pending, * process as soon as possible. */ #define cpu_signotify(l) aston(l) #define aston(l) ((l)->l_md.md_astpending = 1) #endif /* ! _LOCORE */ #endif /* _KERNEL */ #endif /* _CPU_H_ */ /* $NetBSD: mips_opcode.h,v 1.13 2009/08/06 04:34:50 msaitoh Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ralph Campbell. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)mips_opcode.h 8.1 (Berkeley) 6/10/93 */ /* * Define the instruction formats and opcode values for the * MIPS instruction set. */ /* * Define the instruction formats. */ typedef union { unsigned word; struct { unsigned imm: 16; unsigned rt: 5; unsigned rs: 5; unsigned op: 6; } IType; struct { unsigned target: 26; unsigned op: 6; } JType; struct { unsigned func: 6; unsigned shamt: 5; unsigned rd: 5; unsigned rt: 5; unsigned rs: 5; unsigned op: 6; } RType; struct { unsigned func: 6; unsigned fd: 5; unsigned fs: 5; unsigned ft: 5; unsigned fmt: 4; unsigned : 1; /* always '1' */ unsigned op: 6; /* always '0x11' */ } FRType; } InstFmt; /* * Values for the 'op' field. */ #define OP_SPECIAL 000 #define OP_BCOND 001 #define OP_J 002 #define OP_JAL 003 #define OP_BEQ 004 #define OP_BNE 005 #define OP_BLEZ 006 #define OP_BGTZ 007 #define OP_ADDI 010 #define OP_ADDIU 011 #define OP_SLTI 012 #define OP_SLTIU 013 #define OP_ANDI 014 #define OP_ORI 015 #define OP_XORI 016 #define OP_LUI 017 #define OP_COP0 020 #define OP_COP1 021 #define OP_COP2 022 #define OP_COP3 023 #define OP_BEQL 024 /* MIPS-II, for r4000 port */ #define OP_BNEL 025 /* MIPS-II, for r4000 port */ #define OP_BLEZL 026 /* MIPS-II, for r4000 port */ #define OP_BGTZL 027 /* MIPS-II, for r4000 port */ #define OP_DADDI 030 /* MIPS-II, for r4000 port */ #define OP_DADDIU 031 /* MIPS-II, for r4000 port */ #define OP_LDL 032 /* MIPS-II, for r4000 port */ #define OP_LDR 033 /* MIPS-II, for r4000 port */ #define OP_SPECIAL2 034 /* QED opcodes */ #define OP_LB 040 #define OP_LH 041 #define OP_LWL 042 #define OP_LW 043 #define OP_LBU 044 #define OP_LHU 045 #define OP_LWR 046 #define OP_LHU 045 #define OP_LWR 046 #define OP_LWU 047 /* MIPS-II, for r4000 port */ #define OP_SB 050 #define OP_SH 051 #define OP_SWL 052 #define OP_SW 053 #define OP_SDL 054 /* MIPS-II, for r4000 port */ #define OP_SDR 055 /* MIPS-II, for r4000 port */ #define OP_SWR 056 #define OP_CACHE 057 /* MIPS-II, for r4000 port */ #define OP_LL 060 #define OP_LWC0 OP_LL /* backwards source compatibility */ #define OP_LWC1 061 #define OP_LWC2 062 #define OP_LWC3 063 #define OP_LLD 064 /* MIPS-II, for r4000 port */ #define OP_LDC1 065 #define OP_LD 067 /* MIPS-II, for r4000 port */ #define OP_SC 070 #define OP_SWC0 OP_SC /* backwards source compatibility */ #define OP_SWC1 071 #define OP_SWC2 072 #define OP_SWC3 073 #define OP_SCD 074 /* MIPS-II, for r4000 port */ #define OP_SDC1 075 #define OP_SD 077 /* MIPS-II, for r4000 port */ /* * Values for the 'func' field when 'op' == OP_SPECIAL. */ #define OP_SLL 000 #define OP_SRL 002 #define OP_SRA 003 #define OP_SLLV 004 #define OP_SRLV 006 #define OP_SRAV 007 #define OP_JR 010 #define OP_JALR 011 #define OP_SYSCALL 014 #define OP_BREAK 015 #define OP_SYNC 017 /* MIPS-II, for r4000 port */ #define OP_MFHI 020 #define OP_MTHI 021 #define OP_MFLO 022 #define OP_MTLO 023 #define OP_DSLLV 024 /* MIPS-II, for r4000 port */ #define OP_DSRLV 026 /* MIPS-II, for r4000 port */ #define OP_DSRAV 027 /* MIPS-II, for r4000 port */ #define OP_MULT 030 #define OP_MULTU 031 #define OP_DIV 032 #define OP_DIVU 033 #define OP_DMULT 034 /* MIPS-II, for r4000 port */ #define OP_DMULTU 035 /* MIPS-II, for r4000 port */ #define OP_DDIV 036 /* MIPS-II, for r4000 port */ #define OP_DDIVU 037 /* MIPS-II, for r4000 port */ #define OP_ADD 040 #define OP_ADDU 041 #define OP_SUB 042 #define OP_SUBU 043 #define OP_AND 044 #define OP_OR 045 #define OP_XOR 046 #define OP_NOR 047 #define OP_SLT 052 #define OP_SLTU 053 #define OP_DADD 054 /* MIPS-II, for r4000 port */ #define OP_DADDU 055 /* MIPS-II, for r4000 port */ #define OP_DSUB 056 /* MIPS-II, for r4000 port */ #define OP_DSUBU 057 /* MIPS-II, for r4000 port */ #define OP_TGE 060 /* MIPS-II, for r4000 port */ #define OP_TGEU 061 /* MIPS-II, for r4000 port */ #define OP_TLT 062 /* MIPS-II, for r4000 port */ #define OP_TLTU 063 /* MIPS-II, for r4000 port */ #define OP_TEQ 064 /* MIPS-II, for r4000 port */ #define OP_TNE 066 /* MIPS-II, for r4000 port */ #define OP_DSLL 070 /* MIPS-II, for r4000 port */ #define OP_DSRL 072 /* MIPS-II, for r4000 port */ #define OP_DSRA 073 /* MIPS-II, for r4000 port */ #define OP_DSLL32 074 /* MIPS-II, for r4000 port */ #define OP_DSRL32 076 /* MIPS-II, for r4000 port */ #define OP_DSRA32 077 /* MIPS-II, for r4000 port */ /* * Values for the 'func' field when 'op' == OP_SPECIAL2. */ #define OP_MAD 000 /* QED */ #define OP_MADU 001 /* QED */ #define OP_MUL 002 /* QED */ /* * Values for the 'func' field when 'op' == OP_BCOND. */ #define OP_BLTZ 000 #define OP_BGEZ 001 #define OP_BLTZL 002 /* MIPS-II, for r4000 port */ #define OP_BGEZL 003 /* MIPS-II, for r4000 port */ #define OP_TGEI 010 /* MIPS-II, for r4000 port */ #define OP_TGEIU 011 /* MIPS-II, for r4000 port */ #define OP_TLTI 012 /* MIPS-II, for r4000 port */ #define OP_TLTIU 013 /* MIPS-II, for r4000 port */ #define OP_TEQI 014 /* MIPS-II, for r4000 port */ #define OP_TNEI 016 /* MIPS-II, for r4000 port */ #define OP_BLTZAL 020 /* MIPS-II, for r4000 port */ #define OP_BGEZAL 021 #define OP_BLTZALL 022 #define OP_BGEZALL 023 /* * Values for the 'rs' field when 'op' == OP_COPz. */ #define OP_MF 000 #define OP_DMF 001 /* MIPS-II, for r4000 port */ #define OP_CF 002 #define OP_MFH 003 #define OP_MT 004 #define OP_DMT 005 /* MIPS-II, for r4000 port */ #define OP_CT 006 #define OP_MTH 007 #define OP_BCx 010 #define OP_BCy 014 /* * Values for the 'rt' field when 'op' == OP_COPz. */ #define COPz_BC_TF_MASK 0x01 #define COPz_BC_TRUE 0x01 #define COPz_BC_FALSE 0x00 #define COPz_BCL_TF_MASK 0x02 /* MIPS-II, for r4000 port */ #define COPz_BCL_TRUE 0x02 /* MIPS-II, for r4000 port */ #define COPz_BCL_FALSE 0x00 /* MIPS-II, for r4000 port */ #endif /* __DECODER_LOCAL_H__ */ mupen64plus-core-src-2.5/src/debugger/dbg_memory.c000066400000000000000000000333061251723631200221470ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dbg_memory.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 DarkJeztr * * Copyright (C) 2002 Blight * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "ai/ai_controller.h" #include "api/callbacks.h" #include "api/m64p_types.h" #include "dbg_breakpoints.h" #include "dbg_memory.h" #include "dbg_types.h" #include "main/main.h" #include "main/rom.h" #include "memory/memory.h" #include "pi/pi_controller.h" #include "r4300/cached_interp.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/r4300_core.h" #include "rdp/rdp_core.h" #include "ri/ri_controller.h" #include "rsp/rsp_core.h" #include "si/si_controller.h" #include "vi/vi_controller.h" #if !defined(NO_ASM) && (defined(__i386__) || defined(__x86_64__)) /* we must define PACKAGE so that bfd.h (which is included from dis-asm.h) doesn't throw an error */ #define PACKAGE "mupen64plus-core" #include #include static int lines_recompiled; static uint32 addr_recompiled; static int num_decoded; static char opcode_recompiled[564][MAX_DISASSEMBLY]; static char args_recompiled[564][MAX_DISASSEMBLY*4]; static void *opaddr_recompiled[564]; static disassemble_info dis_info; #define CHECK_MEM(address) \ invalidate_r4300_cached_code(address, 4); static void process_opcode_out(void *strm, const char *fmt, ...){ va_list ap; va_start(ap, fmt); char *arg; char buff[256]; if(num_decoded==0) { if(strcmp(fmt,"%s")==0) { arg = va_arg(ap, char*); strcpy(opcode_recompiled[lines_recompiled],arg); } else strcpy(opcode_recompiled[lines_recompiled],"OPCODE-X"); num_decoded++; *(args_recompiled[lines_recompiled])=0; } else { vsprintf(buff, fmt, ap); sprintf(args_recompiled[lines_recompiled],"%s%s", args_recompiled[lines_recompiled],buff); } va_end(ap); } // Callback function that will be called by libopcodes to read the // bytes to disassemble ('read_memory_func' member of 'disassemble_info'). static int read_memory_func(bfd_vma memaddr, bfd_byte *myaddr, unsigned int length, disassemble_info *info) { char* from = (char*)(long)(memaddr); char* to = (char*)myaddr; while (length-- != 0) { *to++ = *from++; } return (0); } void init_host_disassembler(void){ INIT_DISASSEMBLE_INFO(dis_info, stderr, process_opcode_out); dis_info.fprintf_func = (fprintf_ftype) process_opcode_out; dis_info.stream = stderr; dis_info.bytes_per_line=1; dis_info.endian = 1; dis_info.mach = bfd_mach_i386_i8086; dis_info.disassembler_options = (char*) "i386,suffix"; dis_info.read_memory_func = read_memory_func; } static void decode_recompiled(uint32 addr) { unsigned char *assemb, *end_addr; lines_recompiled=0; if(blocks[addr>>12] == NULL) return; if(blocks[addr>>12]->block[(addr&0xFFF)/4].ops == current_instruction_table.NOTCOMPILED) // recompile_block((int *) g_sp_mem, blocks[addr>>12], addr); { strcpy(opcode_recompiled[0],"INVLD"); strcpy(args_recompiled[0],"NOTCOMPILED"); opaddr_recompiled[0] = (void *) 0; addr_recompiled=0; lines_recompiled++; return; } assemb = (blocks[addr>>12]->code) + (blocks[addr>>12]->block[(addr&0xFFF)/4].local_addr); end_addr = blocks[addr>>12]->code; if( (addr & 0xFFF) >= 0xFFC) end_addr += blocks[addr>>12]->code_length; else end_addr += blocks[addr>>12]->block[(addr&0xFFF)/4+1].local_addr; while(assemb < end_addr) { opaddr_recompiled[lines_recompiled] = assemb; num_decoded=0; assemb += print_insn_i386((bfd_vma)(long) assemb, &dis_info); lines_recompiled++; } addr_recompiled = addr; } char* get_recompiled_opcode(uint32 addr, int index) { if(addr != addr_recompiled) decode_recompiled(addr); if(index < lines_recompiled) return opcode_recompiled[index]; else return NULL; } char* get_recompiled_args(uint32 addr, int index) { if(addr != addr_recompiled) decode_recompiled(addr); if(index < lines_recompiled) return args_recompiled[index]; else return NULL; } void * get_recompiled_addr(uint32 addr, int index) { if(addr != addr_recompiled) decode_recompiled(addr); if(index < lines_recompiled) return opaddr_recompiled[index]; else return 0; } int get_num_recompiled(uint32 addr) { if(addr != addr_recompiled) decode_recompiled(addr); return lines_recompiled; } int get_has_recompiled(uint32 addr) { unsigned char *assemb, *end_addr; if(r4300emu != CORE_DYNAREC || blocks[addr>>12] == NULL) return FALSE; assemb = (blocks[addr>>12]->code) + (blocks[addr>>12]->block[(addr&0xFFF)/4].local_addr); end_addr = blocks[addr>>12]->code; if( (addr & 0xFFF) >= 0xFFC) end_addr += blocks[addr>>12]->code_length; else end_addr += blocks[addr>>12]->block[(addr&0xFFF)/4+1].local_addr; if(assemb==end_addr) return FALSE; return TRUE; } #else #define CHECK_MEM(address) int get_num_recompiled(uint32 addr) { return 0; } char* get_recompiled_opcode(uint32 addr, int index) { return NULL; } char* get_recompiled_args(uint32 addr, int index) { return NULL; } void * get_recompiled_addr(uint32 addr, int index) { return 0; } int get_has_recompiled(uint32 addr) { return 0; } void init_host_disassembler(void) { } #endif #ifdef DBG uint64 read_memory_64(uint32 addr) { return ((uint64)read_memory_32(addr) << 32) | (uint64)read_memory_32(addr + 4); } uint64 read_memory_64_unaligned(uint32 addr) { uint64 w[2]; w[0] = read_memory_32_unaligned(addr); w[1] = read_memory_32_unaligned(addr + 4); return (w[0] << 32) | w[1]; } void write_memory_64(uint32 addr, uint64 value) { write_memory_32(addr, (uint32) (value >> 32)); write_memory_32(addr + 4, (uint32) (value & 0xFFFFFFFF)); } void write_memory_64_unaligned(uint32 addr, uint64 value) { write_memory_32_unaligned(addr, (uint32) (value >> 32)); write_memory_32_unaligned(addr + 4, (uint32) (value & 0xFFFFFFFF)); } uint32 read_memory_32(uint32 addr){ uint32_t offset; switch(get_memory_type(addr)) { case M64P_MEM_NOMEM: if(tlb_LUT_r[addr>>12]) return read_memory_32((tlb_LUT_r[addr>>12]&0xFFFFF000)|(addr&0xFFF)); return M64P_MEM_INVALID; case M64P_MEM_RDRAM: return g_rdram[rdram_dram_address(addr)]; case M64P_MEM_RSPMEM: return g_sp.mem[rsp_mem_address(addr)]; case M64P_MEM_ROM: return *((uint32 *)(g_rom + rom_address(addr))); case M64P_MEM_RDRAMREG: offset = rdram_reg(addr); if (offset < RDRAM_REGS_COUNT) return g_ri.rdram.regs[offset]; break; case M64P_MEM_RSPREG: offset = rsp_reg(addr); if (offset < SP_REGS_COUNT) return g_sp.regs[offset]; break; case M64P_MEM_RSP: offset = rsp_reg2(addr); if (offset < SP_REGS2_COUNT) return g_sp.regs2[offset]; break; case M64P_MEM_DP: offset = dpc_reg(addr); if (offset < DPC_REGS_COUNT) return g_dp.dpc_regs[offset]; break; case M64P_MEM_DPS: offset = dps_reg(addr); if (offset < DPS_REGS_COUNT) return g_dp.dps_regs[offset]; break; case M64P_MEM_VI: offset = vi_reg(addr); if (offset < VI_REGS_COUNT) return g_vi.regs[offset]; break; case M64P_MEM_AI: offset = ai_reg(addr); if (offset < AI_REGS_COUNT) return g_ai.regs[offset]; break; case M64P_MEM_PI: offset = pi_reg(addr); if (offset < PI_REGS_COUNT) return g_pi.regs[offset]; break; case M64P_MEM_RI: offset = ri_reg(addr); if (offset < RI_REGS_COUNT) return g_ri.regs[offset]; break; case M64P_MEM_SI: offset = si_reg(addr); if (offset < SI_REGS_COUNT) return g_si.regs[offset]; break; case M64P_MEM_PIF: offset = pif_ram_address(addr); if (offset < PIF_RAM_SIZE) return sl((*((uint32_t*)&g_si.pif.ram[offset]))); break; case M64P_MEM_MI: offset = mi_reg(addr); if (offset < MI_REGS_COUNT) return g_r4300.mi.regs[offset]; break; default: break; } return M64P_MEM_INVALID; } uint32 read_memory_32_unaligned(uint32 addr) { uint8 i, b[4]; for(i=0; i<4; i++) b[i] = read_memory_8(addr + i); return (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | b[3]; } void write_memory_32(uint32 addr, uint32 value){ switch(get_memory_type(addr)) { case M64P_MEM_RDRAM: g_rdram[(addr & 0xffffff) >> 2] = value; CHECK_MEM(addr) break; } } void write_memory_32_unaligned(uint32 addr, uint32 value) { write_memory_8(addr + 0, value >> 24); write_memory_8(addr + 1, (value >> 16) & 0xFF); write_memory_8(addr + 2, (value >> 8) & 0xFF); write_memory_8(addr + 3, value & 0xFF); } //read_memory_16_unaligned and write_memory_16_unaligned don't exist because //read_memory_16 and write_memory_16 work unaligned already. uint16 read_memory_16(uint32 addr) { return ((uint16)read_memory_8(addr) << 8) | (uint16)read_memory_8(addr+1); //cough cough hack hack } void write_memory_16(uint32 addr, uint16 value) { write_memory_8(addr, value >> 8); //this isn't much better write_memory_8(addr + 1, value & 0xFF); //then again, it works unaligned } uint8 read_memory_8(uint32 addr) { uint32 word; word = read_memory_32(addr & ~3); return (word >> ((3 - (addr & 3)) * 8)) & 0xFF; } void write_memory_8(uint32 addr, uint8 value) { uint32 word, mask; word = read_memory_32(addr & ~3); mask = 0xFF << ((3 - (addr & 3)) * 8); word = (word & ~mask) | (value << ((3 - (addr & 3)) * 8)); write_memory_32(addr & ~3, word); } uint32 get_memory_flags(uint32 addr) { int type=get_memory_type(addr); const uint32 addrlow = (addr & 0xFFFF); uint32 flags = 0; switch(type) { case M64P_MEM_NOMEM: if(tlb_LUT_r[addr>>12]) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_NOTHING: if (((addr >> 16) == 0x8801 || (addr >> 16 == 0xA801)) && addrlow == 0) flags = M64P_MEM_FLAG_WRITABLE_EMUONLY; // for flashram command break; case M64P_MEM_RDRAM: flags = M64P_MEM_FLAG_WRITABLE; case M64P_MEM_ROM: flags |= M64P_MEM_FLAG_READABLE; break; case M64P_MEM_RDRAMREG: if (addrlow < 0x28) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_RSPMEM: if (addrlow < 0x2000) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_RSPREG: if (addrlow < 0x20) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_RSP: if (addrlow < 0x8) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_DP: if (addrlow < 0x20) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_DPS: if (addrlow < 0x10) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_VI: if (addrlow < 0x38) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_AI: if (addrlow < 0x18) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_PI: if (addrlow < 0x34) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_RI: if (addrlow < 0x20) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_SI: if (addrlow < 0x1c) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_FLASHRAMSTAT: if (addrlow == 0) flags = M64P_MEM_FLAG_READABLE_EMUONLY; break; case M64P_MEM_PIF: if (addrlow >= 0x7C0 && addrlow <= 0x7FF) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; case M64P_MEM_MI: if (addrlow < 0x10) flags = M64P_MEM_FLAG_READABLE | M64P_MEM_FLAG_WRITABLE_EMUONLY; break; default: break; } return flags; } #endif mupen64plus-core-src-2.5/src/debugger/dbg_memory.h000066400000000000000000000050471251723631200221550ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dbg_memory.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 DarkJeztr * * Copyright (C) 2002 davFr * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __DEBUGGER_MEMORY_H__ #define __DEBUGGER_MEMORY_H__ #define MAX_DISASSEMBLY 64 void init_host_disassembler(void); char* get_recompiled_opcode( uint32 address, int index ); char* get_recompiled_args( uint32 address, int index ); void* get_recompiled_addr( uint32 address, int index ); int get_num_recompiled( uint32 address ); int get_has_recompiled( uint32 address ); uint64 read_memory_64(uint32 addr); uint64 read_memory_64_unaligned(uint32 addr); void write_memory_64(uint32 addr, uint64 value); void write_memory_64_unaligned(uint32 addr, uint64 value); uint32 read_memory_32(uint32); uint32 read_memory_32_unaligned(uint32 addr); void write_memory_32(uint32, uint32); void write_memory_32_unaligned(uint32 addr, uint32 value); uint16 read_memory_16(uint32 addr); void write_memory_16(uint32 addr, uint16 value); uint8 read_memory_8(uint32 addr); void write_memory_8(uint32 addr, uint8 value); uint32 get_memory_flags(uint32); #endif /* __DEBUGGER_MEMORY_H__ */ mupen64plus-core-src-2.5/src/debugger/dbg_types.h000066400000000000000000000033311251723631200220030ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dbg_types.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 davFr * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __TYPES_H__ #define __TYPES_H__ typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; typedef unsigned long long uint64; #endif /* __TYPES_H__ */ mupen64plus-core-src-2.5/src/main/000077500000000000000000000000001251723631200170125ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/main/cheat.c000066400000000000000000000403021251723631200202410ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cheat.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * Copyright (C) 2008 Okaygo * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ // gameshark and xploder64 reference: http://doc.kodewerx.net/hacking_n64.html #include #include #include #include #include #include #include "api/callbacks.h" #include "api/config.h" #include "api/m64p_types.h" #include "cheat.h" #include "eventloop.h" #include "list.h" #include "main.h" #include "memory/memory.h" #include "osal/preproc.h" #include "rom.h" #define __STDC_FORMAT_MACROS #include // local definitions #define CHEAT_CODE_MAGIC_VALUE 0xDEAD0000 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) typedef struct cheat_code { unsigned int address; int value; int old_value; struct list_head list; } cheat_code_t; typedef struct cheat { char *name; int enabled; int was_enabled; struct list_head cheat_codes; struct list_head list; } cheat_t; // local variables static LIST_HEAD(active_cheats); static SDL_mutex *cheat_mutex = NULL; // private functions static unsigned short read_address_16bit(unsigned int address) { return *(unsigned short *)(((unsigned char*)g_rdram + ((address & 0xFFFFFF)^S16))); } static unsigned char read_address_8bit(unsigned int address) { return *(unsigned char *)(((unsigned char*)g_rdram + ((address & 0xFFFFFF)^S8))); } static void update_address_16bit(unsigned int address, unsigned short new_value) { *(unsigned short *)(((unsigned char*)g_rdram + ((address & 0xFFFFFF)^S16))) = new_value; } static void update_address_8bit(unsigned int address, unsigned char new_value) { *(unsigned char *)(((unsigned char*)g_rdram + ((address & 0xFFFFFF)^S8))) = new_value; } static int address_equal_to_8bit(unsigned int address, unsigned char value) { unsigned char value_read; value_read = *(unsigned char *)(((unsigned char*)g_rdram + ((address & 0xFFFFFF)^S8))); return value_read == value; } static int address_equal_to_16bit(unsigned int address, unsigned short value) { unsigned short value_read; value_read = *(unsigned short *)(((unsigned char*)g_rdram + ((address & 0xFFFFFF)^S16))); return value_read == value; } // individual application - returns 0 if we are supposed to skip the next cheat // (only really used on conditional codes) static int execute_cheat(unsigned int address, unsigned short value, int *old_value) { switch (address & 0xFF000000) { case 0x80000000: case 0x88000000: case 0xA0000000: case 0xA8000000: case 0xF0000000: // if pointer to old value is valid and uninitialized, write current value to it if(old_value && (*old_value == CHEAT_CODE_MAGIC_VALUE)) *old_value = (int) read_address_8bit(address); update_address_8bit(address,(unsigned char) value); return 1; case 0x81000000: case 0x89000000: case 0xA1000000: case 0xA9000000: case 0xF1000000: // if pointer to old value is valid and uninitialized, write current value to it if(old_value && (*old_value == CHEAT_CODE_MAGIC_VALUE)) *old_value = (int) read_address_16bit(address); update_address_16bit(address,value); return 1; case 0xD0000000: case 0xD8000000: return address_equal_to_8bit(address,(unsigned char) value); case 0xD1000000: case 0xD9000000: return address_equal_to_16bit(address,value); case 0xD2000000: case 0xDB000000: return !(address_equal_to_8bit(address,(unsigned char) value)); case 0xD3000000: case 0xDA000000: return !(address_equal_to_16bit(address,value)); case 0xEE000000: // most likely, this doesnt do anything. execute_cheat(0xF1000318, 0x0040, NULL); execute_cheat(0xF100031A, 0x0000, NULL); return 1; default: return 1; } } static cheat_t *find_or_create_cheat(const char *name) { cheat_t *cheat; int found = 0; list_for_each_entry_t(cheat, &active_cheats, cheat_t, list) { if (strcmp(cheat->name, name) == 0) { found = 1; break; } } if (found) { /* delete any pre-existing cheat codes */ cheat_code_t *code, *safe; list_for_each_entry_safe_t(code, safe, &cheat->cheat_codes, cheat_code_t, list) { list_del(&code->list); free(code); } cheat->enabled = 0; cheat->was_enabled = 0; } else { cheat = malloc(sizeof(*cheat)); cheat->name = strdup(name); cheat->enabled = 0; cheat->was_enabled = 0; INIT_LIST_HEAD(&cheat->cheat_codes); list_add_tail(&cheat->list, &active_cheats); } return cheat; } // public functions void cheat_init(void) { cheat_mutex = SDL_CreateMutex(); } void cheat_uninit(void) { if (cheat_mutex != NULL) SDL_DestroyMutex(cheat_mutex); cheat_mutex = NULL; } void cheat_apply_cheats(int entry) { cheat_t *cheat; cheat_code_t *code; int cond_failed; if (list_empty(&active_cheats)) return; if (cheat_mutex == NULL || SDL_LockMutex(cheat_mutex) != 0) { DebugMessage(M64MSG_ERROR, "Internal error: failed to lock mutex in cheat_apply_cheats()"); return; } list_for_each_entry_t(cheat, &active_cheats, cheat_t, list) { if (cheat->enabled) { cheat->was_enabled = 1; switch(entry) { case ENTRY_BOOT: list_for_each_entry_t(code, &cheat->cheat_codes, cheat_code_t, list) { // code should only be written once at boot time if((code->address & 0xF0000000) == 0xF0000000) execute_cheat(code->address, code->value, &code->old_value); } break; case ENTRY_VI: /* a cheat starts without failed preconditions */ cond_failed = 0; list_for_each_entry_t(code, &cheat->cheat_codes, cheat_code_t, list) { /* conditional cheat codes */ if((code->address & 0xF0000000) == 0xD0000000) { /* if code needs GS button pressed and it's not, skip it */ if(((code->address & 0xFF000000) == 0xD8000000 || (code->address & 0xFF000000) == 0xD9000000 || (code->address & 0xFF000000) == 0xDA000000 || (code->address & 0xFF000000) == 0xDB000000) && !event_gameshark_active()) /* if condition false, skip next code non-test code */ cond_failed = 1; /* if condition false, skip next code non-test code */ if (!execute_cheat(code->address, code->value, NULL)) cond_failed = 1; } else { /* preconditions were false for this non-test code * reset the condition state and skip the cheat */ if (cond_failed) { cond_failed = 0; continue; } switch (code->address & 0xFF000000) { /* GS button triggers cheat code */ case 0x88000000: case 0x89000000: case 0xA8000000: case 0xA9000000: if(event_gameshark_active()) execute_cheat(code->address, code->value, NULL); break; /* normal cheat code */ default: /* exclude boot-time cheat codes */ if((code->address & 0xF0000000) != 0xF0000000) execute_cheat(code->address, code->value, &code->old_value); break; } } } break; default: break; } } // if cheat was enabled, but is now disabled, restore old memory values else if (cheat->was_enabled) { cheat->was_enabled = 0; switch(entry) { case ENTRY_VI: list_for_each_entry_t(code, &cheat->cheat_codes, cheat_code_t, list) { // set memory back to old value and clear saved copy of old value if(code->old_value != CHEAT_CODE_MAGIC_VALUE) { execute_cheat(code->address, code->old_value, NULL); code->old_value = CHEAT_CODE_MAGIC_VALUE; } } break; default: break; } } } SDL_UnlockMutex(cheat_mutex); } void cheat_delete_all(void) { cheat_t *cheat, *safe_cheat; cheat_code_t *code, *safe_code; if (list_empty(&active_cheats)) return; if (cheat_mutex == NULL || SDL_LockMutex(cheat_mutex) != 0) { DebugMessage(M64MSG_ERROR, "Internal error: failed to lock mutex in cheat_delete_all()"); return; } list_for_each_entry_safe_t(cheat, safe_cheat, &active_cheats, cheat_t, list) { free(cheat->name); list_for_each_entry_safe_t(code, safe_code, &cheat->cheat_codes, cheat_code_t, list) { list_del(&code->list); free(code); } list_del(&cheat->list); free(cheat); } SDL_UnlockMutex(cheat_mutex); } int cheat_set_enabled(const char *name, int enabled) { cheat_t *cheat = NULL; if (list_empty(&active_cheats)) return 0; if (cheat_mutex == NULL || SDL_LockMutex(cheat_mutex) != 0) { DebugMessage(M64MSG_ERROR, "Internal error: failed to lock mutex in cheat_set_enabled()"); return 0; } list_for_each_entry_t(cheat, &active_cheats, cheat_t, list) { if (strcmp(name, cheat->name) == 0) { cheat->enabled = enabled; SDL_UnlockMutex(cheat_mutex); return 1; } } SDL_UnlockMutex(cheat_mutex); return 0; } int cheat_add_new(const char *name, m64p_cheat_code *code_list, int num_codes) { cheat_t *cheat; int i, j; if (cheat_mutex == NULL || SDL_LockMutex(cheat_mutex) != 0) { DebugMessage(M64MSG_ERROR, "Internal error: failed to lock mutex in cheat_add_new()"); return 0; } /* create a new cheat function or erase the codes in an existing cheat function */ cheat = find_or_create_cheat(name); if (cheat == NULL) { SDL_UnlockMutex(cheat_mutex); return 0; } cheat->enabled = 1; /* default for new cheats is enabled */ for (i = 0; i < num_codes; i++) { /* if this is a 'patch' code, convert it and dump out all of the individual codes */ if ((code_list[i].address & 0xFFFF0000) == 0x50000000 && i < num_codes - 1) { int code_count = ((code_list[i].address & 0xFF00) >> 8); int incr_addr = code_list[i].address & 0xFF; int incr_value = code_list[i].value; int cur_addr = code_list[i+1].address; int cur_value = code_list[i+1].value; i += 1; for (j = 0; j < code_count; j++) { cheat_code_t *code = malloc(sizeof(*code)); code->address = cur_addr; code->value = cur_value; code->old_value = CHEAT_CODE_MAGIC_VALUE; list_add_tail(&code->list, &cheat->cheat_codes); cur_addr += incr_addr; cur_value += incr_value; } } else { /* just a normal code */ cheat_code_t *code = malloc(sizeof(*code)); code->address = code_list[i].address; code->value = code_list[i].value; code->old_value = CHEAT_CODE_MAGIC_VALUE; list_add_tail(&code->list, &cheat->cheat_codes); } } SDL_UnlockMutex(cheat_mutex); return 1; } static char *strtok_compat(char *str, const char *delim, char **saveptr) { char *p; if (str == NULL) str = *saveptr; if (str == NULL) return NULL; str += strspn(str, delim); if ((p = strpbrk(str, delim)) != NULL) { *saveptr = p + 1; *p = '\0'; } else { *saveptr = NULL; } return str; } static int cheat_parse_hacks_code(char *code, m64p_cheat_code **hack) { char *saveptr = NULL; char *input, *token; int num_codes; m64p_cheat_code *hackbuf; int ret; *hack = NULL; /* count number of possible cheatcodes */ input = code; num_codes = 0; while ((strchr(input, ','))) { input++; num_codes++; } num_codes++; /* allocate buffer */ hackbuf = malloc(sizeof(*hackbuf) * num_codes); if (!hackbuf) return 0; /* parse cheatcodes */ input = code; num_codes = 0; while ((token = strtok_compat(input, ",", &saveptr))) { input = NULL; ret = sscanf(token, "%08" SCNx32 " %04X", &hackbuf[num_codes].address, &hackbuf[num_codes].value); if (ret == 2) num_codes++; } if (num_codes == 0) free(hackbuf); else *hack = hackbuf; return num_codes; } int cheat_add_hacks(void) { char *cheat_raw = NULL; char *saveptr = NULL; char *input, *token; unsigned int i = 0; int num_codes; char cheatname[32]; m64p_cheat_code *hack; if (!ROM_PARAMS.cheats) return 0; /* copy ini entry for tokenizing */ cheat_raw = strdup(ROM_PARAMS.cheats); if (!cheat_raw) goto out; /* split into cheats for the cheat engine */ input = cheat_raw; while ((token = strtok_compat(input, ";", &saveptr))) { input = NULL; snprintf(cheatname, sizeof(cheatname), "HACK%u", i); cheatname[sizeof(cheatname) - 1] = '\0'; /* parse and add cheat */ num_codes = cheat_parse_hacks_code(token, &hack); if (num_codes <= 0) continue; cheat_add_new(cheatname, hack, num_codes); free(hack); i++; } out: free(cheat_raw); return 0; } mupen64plus-core-src-2.5/src/main/cheat.h000066400000000000000000000036351251723631200202560ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cheat.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 Okaygo * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef CHEAT_H #define CHEAT_H #include "api/m64p_types.h" #define ENTRY_BOOT 0 #define ENTRY_VI 1 void cheat_apply_cheats(int entry); void cheat_init(void); void cheat_uninit(void); int cheat_add_new(const char *name, m64p_cheat_code *code_list, int num_codes); int cheat_set_enabled(const char *name, int enabled); void cheat_delete_all(void); int cheat_add_hacks(void); #endif // #define CHEAT_H mupen64plus-core-src-2.5/src/main/eep_file.c000066400000000000000000000057171251723631200207400ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - eep_file.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "eep_file.h" #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "si/eeprom.h" #include "util.h" void open_eep_file(struct eep_file* eep, const char* filename) { /* ! Take ownership of filename ! */ eep->filename = filename; /* try to load eep file content */ switch(read_from_file(eep->filename, eep->eeprom, EEPROM_MAX_SIZE)) { case file_open_error: /* if no prior file exists, provide default eeprom content */ DebugMessage(M64MSG_VERBOSE, "couldn't open eeprom file '%s' for reading", eep->filename); format_eeprom(eep->eeprom, EEPROM_MAX_SIZE); break; case file_read_error: DebugMessage(M64MSG_WARNING, "failed to read eeprom file '%s'", eep->filename); break; default: break; } } void close_eep_file(struct eep_file* eep) { free((void*)eep->filename); } uint8_t* eep_file_ptr(struct eep_file* eep) { return eep->eeprom; } void save_eep_file(void* opaque) { /* flush eeprom to disk */ struct eep_file* eep = (struct eep_file*)opaque; switch(write_to_file(eep->filename, eep->eeprom, EEPROM_MAX_SIZE)) { case file_open_error: DebugMessage(M64MSG_WARNING, "couldn't open eeprom file '%s' for writing", eep->filename); break; case file_write_error: DebugMessage(M64MSG_WARNING, "failed to write eeprom file '%s'", eep->filename); break; default: break; } } mupen64plus-core-src-2.5/src/main/eep_file.h000066400000000000000000000037631251723631200207440ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - eep_file.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_MAIN_EEP_FILE_H #define M64P_MAIN_EEP_FILE_H #include /* Note: EEP files are all EEPROM_MAX_SIZE bytes long, * whatever the real EEPROM size is. */ enum { EEPROM_MAX_SIZE = 0x800 }; struct eep_file { uint8_t eeprom[EEPROM_MAX_SIZE]; const char* filename; }; void open_eep_file(struct eep_file* eep, const char* filename); void close_eep_file(struct eep_file* eep); uint8_t* eep_file_ptr(struct eep_file* eep); void save_eep_file(void* opaque); #endif mupen64plus-core-src-2.5/src/main/eventloop.c000066400000000000000000000602141251723631200211740ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - eventloop.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008-2009 Richard Goedeken * * Copyright (C) 2008 Ebenblues Nmn Okaygo Tillin9 * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include #include #if ! SDL_VERSION_ATLEAST(1,3,0) #define SDL_SCANCODE_ESCAPE SDLK_ESCAPE #define SDL_NUM_SCANCODES SDLK_LAST #define SDL_SCANCODE_F5 SDLK_F5 #define SDL_SCANCODE_F7 SDLK_F7 #define SDL_SCANCODE_F9 SDLK_F9 #define SDL_SCANCODE_F10 SDLK_F10 #define SDL_SCANCODE_F11 SDLK_F11 #define SDL_SCANCODE_F12 SDLK_F12 #define SDL_SCANCODE_P SDLK_p #define SDL_SCANCODE_M SDLK_m #define SDL_SCANCODE_RIGHTBRACKET SDLK_RIGHTBRACKET #define SDL_SCANCODE_LEFTBRACKET SDLK_LEFTBRACKET #define SDL_SCANCODE_F SDLK_f #define SDL_SCANCODE_SLASH SDLK_SLASH #define SDL_SCANCODE_G SDLK_g #define SDL_SCANCODE_RETURN SDLK_RETURN #define SDL_SCANCODE_0 SDLK_0 #define SDL_SCANCODE_1 SDLK_1 #define SDL_SCANCODE_2 SDLK_2 #define SDL_SCANCODE_3 SDLK_3 #define SDL_SCANCODE_4 SDLK_4 #define SDL_SCANCODE_5 SDLK_5 #define SDL_SCANCODE_6 SDLK_6 #define SDL_SCANCODE_7 SDLK_7 #define SDL_SCANCODE_8 SDLK_8 #define SDL_SCANCODE_9 SDLK_9 #define SDL_SCANCODE_UNKNOWN SDLK_UNKNOWN #define SDL_SetEventFilter(func, data) SDL_SetEventFilter(func) #define event_sdl_filter(userdata, event) event_sdl_filter(const event) #endif #define M64P_CORE_PROTOTYPES 1 #include "api/callbacks.h" #include "api/config.h" #include "api/m64p_config.h" #include "api/m64p_types.h" #include "eventloop.h" #include "main.h" #include "plugin/plugin.h" #include "r4300/reset.h" #include "sdl_key_converter.h" #include "util.h" /* version number for CoreEvents config section */ #define CONFIG_PARAM_VERSION 1.00 static m64p_handle l_CoreEventsConfig = NULL; /********************************************************************************************************* * static variables and definitions for eventloop.c */ #define kbdFullscreen "Kbd Mapping Fullscreen" #define kbdStop "Kbd Mapping Stop" #define kbdPause "Kbd Mapping Pause" #define kbdSave "Kbd Mapping Save State" #define kbdLoad "Kbd Mapping Load State" #define kbdIncrement "Kbd Mapping Increment Slot" #define kbdReset "Kbd Mapping Reset" #define kbdSpeeddown "Kbd Mapping Speed Down" #define kbdSpeedup "Kbd Mapping Speed Up" #define kbdScreenshot "Kbd Mapping Screenshot" #define kbdMute "Kbd Mapping Mute" #define kbdIncrease "Kbd Mapping Increase Volume" #define kbdDecrease "Kbd Mapping Decrease Volume" #define kbdForward "Kbd Mapping Fast Forward" #define kbdAdvance "Kbd Mapping Frame Advance" #define kbdGameshark "Kbd Mapping Gameshark" typedef enum {joyFullscreen, joyStop, joyPause, joySave, joyLoad, joyIncrement, joyScreenshot, joyMute, joyIncrease, joyDecrease, joyForward, joyGameshark } eJoyCommand; static const char *JoyCmdName[] = { "Joy Mapping Fullscreen", "Joy Mapping Stop", "Joy Mapping Pause", "Joy Mapping Save State", "Joy Mapping Load State", "Joy Mapping Increment Slot", "Joy Mapping Screenshot", "Joy Mapping Mute", "Joy Mapping Increase Volume", "Joy Mapping Decrease Volume", "Joy Mapping Fast Forward", "Joy Mapping Gameshark"}; static const int NumJoyCommands = sizeof(JoyCmdName) / sizeof(const char *); static int JoyCmdActive[16]; /* if extra joystick commands are added above, make sure there is enough room in this array */ static int GamesharkActive = 0; /********************************************************************************************************* * static functions for eventloop.c */ /** MatchJoyCommand * This function processes an SDL event and updates the JoyCmdActive array if the * event matches with the given command. * * If the event activates a joystick command which was not previously active, then * a 1 is returned. If the event de-activates an command, a -1 is returned. Otherwise * (if the event does not match the command or active status didn't change), a 0 is returned. */ static int MatchJoyCommand(const SDL_Event *event, eJoyCommand cmd) { const char *event_str = ConfigGetParamString(l_CoreEventsConfig, JoyCmdName[cmd]); int dev_number, input_number, input_value; char axis_direction; /* Empty string or non-joystick command */ if (event_str == NULL || strlen(event_str) < 4 || event_str[0] != 'J') return 0; /* Evaluate event based on type of joystick input expected by the given command */ switch (event_str[2]) { /* Axis */ case 'A': if (event->type != SDL_JOYAXISMOTION) return 0; if (sscanf(event_str, "J%dA%d%c", &dev_number, &input_number, &axis_direction) != 3) return 0; if (dev_number != event->jaxis.which || input_number != event->jaxis.axis) return 0; if (axis_direction == '+') { if (event->jaxis.value >= 15000 && JoyCmdActive[cmd] == 0) { JoyCmdActive[cmd] = 1; return 1; } else if (event->jaxis.value <= 8000 && JoyCmdActive[cmd] == 1) { JoyCmdActive[cmd] = 0; return -1; } return 0; } else if (axis_direction == '-') { if (event->jaxis.value <= -15000 && JoyCmdActive[cmd] == 0) { JoyCmdActive[cmd] = 1; return 1; } else if (event->jaxis.value >= -8000 && JoyCmdActive[cmd] == 1) { JoyCmdActive[cmd] = 0; return -1; } return 0; } else return 0; /* invalid axis direction in configuration parameter */ break; /* Hat */ case 'H': if (event->type != SDL_JOYHATMOTION) return 0; if (sscanf(event_str, "J%dH%dV%d", &dev_number, &input_number, &input_value) != 3) return 0; if (dev_number != event->jhat.which || input_number != event->jhat.hat) return 0; if ((event->jhat.value & input_value) == input_value && JoyCmdActive[cmd] == 0) { JoyCmdActive[cmd] = 1; return 1; } else if ((event->jhat.value & input_value) != input_value && JoyCmdActive[cmd] == 1) { JoyCmdActive[cmd] = 0; return -1; } return 0; break; /* Button. */ case 'B': if (event->type != SDL_JOYBUTTONDOWN && event->type != SDL_JOYBUTTONUP) return 0; if (sscanf(event_str, "J%dB%d", &dev_number, &input_number) != 2) return 0; if (dev_number != event->jbutton.which || input_number != event->jbutton.button) return 0; if (event->type == SDL_JOYBUTTONDOWN && JoyCmdActive[cmd] == 0) { JoyCmdActive[cmd] = 1; return 1; } else if (event->type == SDL_JOYBUTTONUP && JoyCmdActive[cmd] == 1) { JoyCmdActive[cmd] = 0; return -1; } return 0; break; default: /* bad configuration parameter */ return 0; } /* impossible to reach this point */ return 0; } /********************************************************************************************************* * sdl event filter */ static int SDLCALL event_sdl_filter(void *userdata, SDL_Event *event) { int cmd, action; switch(event->type) { // user clicked on window close button case SDL_QUIT: main_stop(); break; case SDL_KEYDOWN: #if SDL_VERSION_ATLEAST(1,3,0) if (event->key.repeat) return 0; event_sdl_keydown(event->key.keysym.scancode, event->key.keysym.mod); #else event_sdl_keydown(event->key.keysym.sym, event->key.keysym.mod); #endif return 0; case SDL_KEYUP: #if SDL_VERSION_ATLEAST(1,3,0) event_sdl_keyup(event->key.keysym.scancode, event->key.keysym.mod); #else event_sdl_keyup(event->key.keysym.sym, event->key.keysym.mod); #endif return 0; #if SDL_VERSION_ATLEAST(2,0,0) case SDL_WINDOWEVENT: switch (event->window.event) { case SDL_WINDOWEVENT_RESIZED: // call the video plugin. if the video plugin supports resizing, it will resize its viewport and call // VidExt_ResizeWindow to update the window manager handling our opengl output window gfx.resizeVideoOutput(event->window.data1, event->window.data2); return 0; // consumed the event break; } break; #else case SDL_VIDEORESIZE: // call the video plugin. if the video plugin supports resizing, it will resize its viewport and call // VidExt_ResizeWindow to update the window manager handling our opengl output window gfx.resizeVideoOutput(event->resize.w, event->resize.h); return 0; // consumed the event break; #endif // if joystick action is detected, check if it's mapped to a special function case SDL_JOYAXISMOTION: case SDL_JOYBUTTONDOWN: case SDL_JOYBUTTONUP: case SDL_JOYHATMOTION: for (cmd = 0; cmd < NumJoyCommands; cmd++) { action = MatchJoyCommand(event, (eJoyCommand) cmd); if (action == 1) /* command was just activated (button down, etc) */ { if (cmd == joyFullscreen) gfx.changeWindow(); else if (cmd == joyStop) main_stop(); else if (cmd == joyPause) main_toggle_pause(); else if (cmd == joySave) main_state_save(1, NULL); /* save in mupen64plus format using current slot */ else if (cmd == joyLoad) main_state_load(NULL); /* load using current slot */ else if (cmd == joyIncrement) main_state_inc_slot(); else if (cmd == joyScreenshot) main_take_next_screenshot(); else if (cmd == joyMute) main_volume_mute(); else if (cmd == joyDecrease) main_volume_down(); else if (cmd == joyIncrease) main_volume_up(); else if (cmd == joyForward) main_set_fastforward(1); else if (cmd == joyGameshark) event_set_gameshark(1); } else if (action == -1) /* command was just de-activated (button up, etc) */ { if (cmd == joyForward) main_set_fastforward(0); else if (cmd == joyGameshark) event_set_gameshark(0); } } return 0; break; } return 1; } /********************************************************************************************************* * global functions */ void event_initialize(void) { const char *event_str = NULL; int i; /* set initial state of all joystick commands to 'off' */ for (i = 0; i < NumJoyCommands; i++) JoyCmdActive[i] = 0; /* activate any joysticks which are referenced in the joystick event command strings */ for (i = 0; i < NumJoyCommands; i++) { event_str = ConfigGetParamString(l_CoreEventsConfig, JoyCmdName[i]); if (event_str != NULL && strlen(event_str) >= 4 && event_str[0] == 'J' && event_str[1] >= '0' && event_str[1] <= '9') { int device = event_str[1] - '0'; if (!SDL_WasInit(SDL_INIT_JOYSTICK)) SDL_InitSubSystem(SDL_INIT_JOYSTICK); #if SDL_VERSION_ATLEAST(2,0,0) SDL_JoystickOpen(device); #else if (!SDL_JoystickOpened(device)) SDL_JoystickOpen(device); #endif } } /* set up SDL event filter and disable key repeat */ #if !SDL_VERSION_ATLEAST(2,0,0) SDL_EnableKeyRepeat(0, 0); #endif SDL_SetEventFilter(event_sdl_filter, NULL); } int event_set_core_defaults(void) { float fConfigParamsVersion; int bSaveConfig = 0; if (ConfigOpenSection("CoreEvents", &l_CoreEventsConfig) != M64ERR_SUCCESS || l_CoreEventsConfig == NULL) { DebugMessage(M64MSG_ERROR, "Failed to open CoreEvents config section."); return 0; /* fail */ } if (ConfigGetParameter(l_CoreEventsConfig, "Version", M64TYPE_FLOAT, &fConfigParamsVersion, sizeof(float)) != M64ERR_SUCCESS) { DebugMessage(M64MSG_WARNING, "No version number in 'CoreEvents' config section. Setting defaults."); ConfigDeleteSection("CoreEvents"); ConfigOpenSection("CoreEvents", &l_CoreEventsConfig); bSaveConfig = 1; } else if (((int) fConfigParamsVersion) != ((int) CONFIG_PARAM_VERSION)) { DebugMessage(M64MSG_WARNING, "Incompatible version %.2f in 'CoreEvents' config section: current is %.2f. Setting defaults.", fConfigParamsVersion, (float) CONFIG_PARAM_VERSION); ConfigDeleteSection("CoreEvents"); ConfigOpenSection("CoreEvents", &l_CoreEventsConfig); bSaveConfig = 1; } else if ((CONFIG_PARAM_VERSION - fConfigParamsVersion) >= 0.0001f) { /* handle upgrades */ float fVersion = CONFIG_PARAM_VERSION; ConfigSetParameter(l_CoreEventsConfig, "Version", M64TYPE_FLOAT, &fVersion); DebugMessage(M64MSG_INFO, "Updating parameter set version in 'CoreEvents' config section to %.2f", fVersion); bSaveConfig = 1; } ConfigSetDefaultFloat(l_CoreEventsConfig, "Version", CONFIG_PARAM_VERSION, "Mupen64Plus CoreEvents config parameter set version number. Please don't change this version number."); /* Keyboard presses mapped to core functions */ ConfigSetDefaultInt(l_CoreEventsConfig, kbdStop, sdl_native2keysym(SDL_SCANCODE_ESCAPE), "SDL keysym for stopping the emulator"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdFullscreen, sdl_native2keysym(SDL_NUM_SCANCODES), "SDL keysym for switching between fullscreen/windowed modes"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdSave, sdl_native2keysym(SDL_SCANCODE_F5), "SDL keysym for saving the emulator state"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdLoad, sdl_native2keysym(SDL_SCANCODE_F7), "SDL keysym for loading the emulator state"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdIncrement, sdl_native2keysym(SDL_SCANCODE_UNKNOWN), "SDL keysym for advancing the save state slot"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdReset, sdl_native2keysym(SDL_SCANCODE_F9), "SDL keysym for resetting the emulator"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdSpeeddown, sdl_native2keysym(SDL_SCANCODE_F10), "SDL keysym for slowing down the emulator"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdSpeedup, sdl_native2keysym(SDL_SCANCODE_F11), "SDL keysym for speeding up the emulator"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdScreenshot, sdl_native2keysym(SDL_SCANCODE_F12), "SDL keysym for taking a screenshot"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdPause, sdl_native2keysym(SDL_SCANCODE_P), "SDL keysym for pausing the emulator"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdMute, sdl_native2keysym(SDL_SCANCODE_M), "SDL keysym for muting/unmuting the sound"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdIncrease, sdl_native2keysym(SDL_SCANCODE_RIGHTBRACKET),"SDL keysym for increasing the volume"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdDecrease, sdl_native2keysym(SDL_SCANCODE_LEFTBRACKET), "SDL keysym for decreasing the volume"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdForward, sdl_native2keysym(SDL_SCANCODE_F), "SDL keysym for temporarily going really fast"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdAdvance, sdl_native2keysym(SDL_SCANCODE_SLASH), "SDL keysym for advancing by one frame when paused"); ConfigSetDefaultInt(l_CoreEventsConfig, kbdGameshark, sdl_native2keysym(SDL_SCANCODE_G), "SDL keysym for pressing the game shark button"); /* Joystick events mapped to core functions */ ConfigSetDefaultString(l_CoreEventsConfig, JoyCmdName[joyStop], "", "Joystick event string for stopping the emulator"); ConfigSetDefaultString(l_CoreEventsConfig, JoyCmdName[joyFullscreen], "", "Joystick event string for switching between fullscreen/windowed modes"); ConfigSetDefaultString(l_CoreEventsConfig, JoyCmdName[joySave], "", "Joystick event string for saving the emulator state"); ConfigSetDefaultString(l_CoreEventsConfig, JoyCmdName[joyLoad], "", "Joystick event string for loading the emulator state"); ConfigSetDefaultString(l_CoreEventsConfig, JoyCmdName[joyIncrement], "", "Joystick event string for advancing the save state slot"); ConfigSetDefaultString(l_CoreEventsConfig, JoyCmdName[joyScreenshot], "", "Joystick event string for taking a screenshot"); ConfigSetDefaultString(l_CoreEventsConfig, JoyCmdName[joyPause], "", "Joystick event string for pausing the emulator"); ConfigSetDefaultString(l_CoreEventsConfig, JoyCmdName[joyMute], "", "Joystick event string for muting/unmuting the sound"); ConfigSetDefaultString(l_CoreEventsConfig, JoyCmdName[joyIncrease], "", "Joystick event string for increasing the volume"); ConfigSetDefaultString(l_CoreEventsConfig, JoyCmdName[joyDecrease], "", "Joystick event string for decreasing the volume"); ConfigSetDefaultString(l_CoreEventsConfig, JoyCmdName[joyForward], "", "Joystick event string for fast-forward"); ConfigSetDefaultString(l_CoreEventsConfig, JoyCmdName[joyGameshark], "", "Joystick event string for pressing the game shark button"); if (bSaveConfig) ConfigSaveSection("CoreEvents"); return 1; } static int get_saveslot_from_keysym(int keysym) { switch (keysym) { case SDL_SCANCODE_0: return 0; case SDL_SCANCODE_1: return 1; case SDL_SCANCODE_2: return 2; case SDL_SCANCODE_3: return 3; case SDL_SCANCODE_4: return 4; case SDL_SCANCODE_5: return 5; case SDL_SCANCODE_6: return 6; case SDL_SCANCODE_7: return 7; case SDL_SCANCODE_8: return 8; case SDL_SCANCODE_9: return 9; default: return -1; } } /********************************************************************************************************* * sdl keyup/keydown handlers */ void event_sdl_keydown(int keysym, int keymod) { int slot; /* check for the only 2 hard-coded key commands: Alt-enter for fullscreen and 0-9 for save state slot */ if (keysym == SDL_SCANCODE_RETURN && keymod & (KMOD_LALT | KMOD_RALT)) gfx.changeWindow(); else if ((slot = get_saveslot_from_keysym(keysym)) >= 0) main_state_set_slot(slot); /* check all of the configurable commands */ else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdStop))) main_stop(); else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdFullscreen))) gfx.changeWindow(); else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdSave))) main_state_save(0, NULL); /* save in mupen64plus format using current slot */ else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdLoad))) main_state_load(NULL); /* load using current slot */ else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdIncrement))) main_state_inc_slot(); else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdReset))) reset_soft(); else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdSpeeddown))) main_speeddown(5); else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdSpeedup))) main_speedup(5); else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdScreenshot))) main_take_next_screenshot(); /* screenshot will be taken at the end of frame rendering */ else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdPause))) main_toggle_pause(); else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdMute))) main_volume_mute(); else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdIncrease))) main_volume_up(); else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdDecrease))) main_volume_down(); else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdForward))) main_set_fastforward(1); else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdAdvance))) main_advance_one(); else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdGameshark))) event_set_gameshark(1); else { /* pass all other keypresses to the input plugin */ input.keyDown(keymod, keysym); } } void event_sdl_keyup(int keysym, int keymod) { if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdStop))) { return; } else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdForward))) { main_set_fastforward(0); } else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdGameshark))) { event_set_gameshark(0); } else input.keyUp(keymod, keysym); } int event_gameshark_active(void) { return GamesharkActive; } void event_set_gameshark(int active) { // if boolean value doesn't change then just return if (!active == !GamesharkActive) return; // set the button state GamesharkActive = (active ? 1 : 0); // notify front-end application that gameshark button state has changed StateChanged(M64CORE_INPUT_GAMESHARK, GamesharkActive); } mupen64plus-core-src-2.5/src/main/eventloop.h000066400000000000000000000035511251723631200212020ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - eventloop.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if !defined(EVENTLOOP_H) #define EVENTLOOP_H extern int event_set_core_defaults(void); extern void event_initialize(void); extern void event_sdl_keydown(int keysym, int keymod); extern void event_sdl_keyup(int keysym, int keymod); extern int event_gameshark_active(void); extern void event_set_gameshark(int active); #endif /* define(EVENTLOOP_H) */ mupen64plus-core-src-2.5/src/main/fla_file.c000066400000000000000000000057171251723631200207310ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - fla_file.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "fla_file.h" #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "pi/flashram.h" #include "util.h" void open_fla_file(struct fla_file* fla, const char* filename) { /* ! Take ownership of filename ! */ fla->filename = filename; /* try to load fla file content */ switch(read_from_file(fla->filename, fla->flashram, FLASHRAM_SIZE)) { case file_open_error: /* if no prior file exists, provide default flashram content */ DebugMessage(M64MSG_VERBOSE, "couldn't open sram file '%s' for reading", fla->filename); format_flashram(fla->flashram); break; case file_read_error: DebugMessage(M64MSG_WARNING, "failed to read flashram file '%s'", fla->filename); break; default: break; } } void close_fla_file(struct fla_file* fla) { free((void*)fla->filename); } uint8_t* fla_file_ptr(struct fla_file* fla) { return fla->flashram; } void save_fla_file(void* opaque) { /* flush flashram to disk */ struct fla_file* fla = (struct fla_file*)opaque; switch(write_to_file(fla->filename, fla->flashram, FLASHRAM_SIZE)) { case file_open_error: DebugMessage(M64MSG_WARNING, "couldn't open flashram file '%s' for writing", fla->filename); break; case file_write_error: DebugMessage(M64MSG_WARNING, "failed to write flashram file '%s'", fla->filename); break; default: break; } } mupen64plus-core-src-2.5/src/main/fla_file.h000066400000000000000000000036111251723631200207250ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - fla_file.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_MAIN_FLA_FILE_H #define M64P_MAIN_FLA_FILE_H #include #include "pi/flashram.h" struct fla_file { uint8_t flashram[FLASHRAM_SIZE]; const char* filename; }; void open_fla_file(struct fla_file* fla, const char* filename); void close_fla_file(struct fla_file* fla); uint8_t* fla_file_ptr(struct fla_file* fla); void save_fla_file(void* opaque); #endif mupen64plus-core-src-2.5/src/main/lirc.c000066400000000000000000000100261251723631200201060ustar00rootroot00000000000000/*************************************************************************** lirc.c - handle lirc input events to Mupen64Plus ------------------- begin : Friday 11 Jan 2008 copyright : (C) 2008 by DarkJezter ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ // Functions for LIRC support #ifdef WITH_LIRC #include #include #include #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "lirc.h" #include "main.h" #include "plugin/plugin.h" #include "savestates.h" static struct lirc_config *g_config; static int g_lircfd = 0; void lircStart(void) { if((g_lircfd = lirc_init("mupen64plus", 1)) != -1) { g_config = NULL; if(lirc_readconfig(NULL, &g_config, NULL) == 0) DebugMessage(M64MSG_INFO, "LIRC input system started successfully"); else DebugMessage(M64MSG_WARNING, "LIRC disabled: Error reading lircrc!"); } else DebugMessage(M64MSG_WARNING, "LIRC disabled: Error contacting daemon!"); } void lircStop(void) { if(g_lircfd!=-1) { if(g_config != NULL) { lirc_freeconfig(g_config); g_config = NULL; } lirc_deinit(); DebugMessage(M64MSG_INFO, "LIRC system shut down"); } } void lircCheckInput(void) { struct pollfd lircpoll; lircpoll.fd = g_lircfd; lircpoll.events = POLLIN; if(poll(&lircpoll, 1, 0) > 0) { char *code; char *c; int ret; if(lirc_nextcode(&code) == 0 && code != NULL) { while((ret = lirc_code2char(g_config, code, &c)) == 0 && c!=NULL) { char *c_ind = c; while(*c_ind != '\0') { *c_ind = toupper(*c_ind); c_ind++; } DebugMessage(M64MSG_VERBOSE, "LIRC Execing command \"%s\"", c); if(strcmp(c, "SAVE") == 0) main_state_save(1, NULL); /* save in mupen64plus format using current slot */ else if(strcmp(c, "LOAD") == 0) main_state_load(NULL); /* load using current slot */ else if(strcmp(c, "QUIT") == 0) main_stop(); else if(strcmp(c, "FULLSCREEN") == 0) gfx.changeWindow(); else if(strcmp(c, "MUTE") == 0) main_volume_mute(); else if(strcmp(c, "VOL+") == 0) main_volume_up(); else if(strcmp(c, "VOL-") == 0) main_volume_down(); else if(strcmp(c, "SCREENSHOT") == 0) main_take_next_screenshot(); else if(strcmp(c, "SPEED+") == 0) main_speedup(5); else if(strcmp(c, "SPEED-") == 0) main_speeddown(5); else if(strcmp(c, "ADVANCE") == 0) main_advance_one(); else if(strcmp(c, "PAUSE") == 0) main_toggle_pause(); else { int val = ((int)c[0])-((int) '0'); if (val >= 0 && val <= 9) savestates_select_slot( val ); } } free(code); } } } #endif //WITH_LIRC mupen64plus-core-src-2.5/src/main/lirc.h000066400000000000000000000021411251723631200201120ustar00rootroot00000000000000/*************************************************************************** lirc.h - description ------------------- begin : Friday 11 Jan 2008 copyright : (C) 2008 by DarkJezter ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef __LIRC_H__ #define __LIRC_H__ extern void lircStart(void); extern void lircStop(void); extern void lircCheckInput(void); #endif //__LIRC_H__ mupen64plus-core-src-2.5/src/main/list.h000066400000000000000000000077671251723631200201570ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - util.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2012 Mupen64plus development team * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __LIST_H__ #define __LIST_H__ #ifdef __cplusplus extern "C" { #endif #include #include "osal/preproc.h" struct list_head { struct list_head *prev; struct list_head *next; }; #define LIST_HEAD(list) \ struct list_head list = { &(list), &(list) } static osal_inline void INIT_LIST_HEAD(struct list_head *head) { head->next = head; head->prev = head; } static osal_inline void list_add(struct list_head *new_item, struct list_head *head) { struct list_head *next = head->next; next->prev = new_item; new_item->next = next; new_item->prev = head; head->next = new_item; } static osal_inline void list_add_tail(struct list_head *new_item, struct list_head *head) { struct list_head *prev = head->prev; prev->next = new_item; new_item->next = head; new_item->prev = prev; head->prev = new_item; } static osal_inline void list_del(struct list_head *entry) { struct list_head *next = entry->next; struct list_head *prev = entry->prev; next->prev = prev; prev->next = next; } static osal_inline void list_del_init(struct list_head *entry) { list_del(entry); INIT_LIST_HEAD(entry); } static osal_inline int list_empty(const struct list_head *head) { return (head->next == head); } #ifdef __GNUC__ #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) #else #define container_of(ptr, type, member) \ ((type *)((char *)(ptr) - offsetof(type, member))) #endif #define list_entry(ptr, type, member) container_of(ptr, type, member) #define list_first_entry(ptr, type, member) \ list_entry((ptr)->next, type, member) #define list_for_each(pos, head) \ for (pos = (head)->next; pos != (head); pos = pos->next) #define list_for_each_entry_t(pos, head, type, member) \ for (pos = list_entry((head)->next, type, member); \ &pos->member != (head); \ pos = list_entry(pos->member.next, type, member)) #define list_for_each_safe(pos, safe, head) \ for (pos = (head)->next, safe = pos->next; pos != (head); \ pos = safe, safe = pos->next) #define list_for_each_entry_safe_t(pos, safe, head, type, member) \ for (pos = list_entry((head)->next, type, member), \ safe = list_entry(pos->member.next, type, member); \ &pos->member != (head); \ pos = safe, \ safe = list_entry(safe->member.next, type, member)) #ifdef __cplusplus } #endif #endif mupen64plus-core-src-2.5/src/main/main.c000066400000000000000000001040171251723631200201050ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - main.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2012 CasualJames * * Copyright (C) 2008-2009 Richard Goedeken * * Copyright (C) 2008 Ebenblues Nmn Okaygo Tillin9 * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This is MUPEN64's main entry point. It contains code that is common * to both the gui and non-gui versions of mupen64. See * gui subdirectories for the gui-specific code. * if you want to implement an interface, you should look here */ #include #include #include #include #include #include #define M64P_CORE_PROTOTYPES 1 #include "ai/ai_controller.h" #include "api/callbacks.h" #include "api/config.h" #include "api/debugger.h" #include "api/m64p_config.h" #include "api/m64p_types.h" #include "api/m64p_vidext.h" #include "api/vidext.h" #include "cheat.h" #include "eep_file.h" #include "eventloop.h" #include "fla_file.h" #include "main.h" #include "memory/memory.h" #include "mpk_file.h" #include "osal/files.h" #include "osal/preproc.h" #include "osd/osd.h" #include "osd/screenshot.h" #include "pi/pi_controller.h" #include "plugin/emulate_game_controller_via_input_plugin.h" #include "plugin/emulate_speaker_via_audio_plugin.h" #include "plugin/get_time_using_C_localtime.h" #include "plugin/plugin.h" #include "plugin/rumble_via_input_plugin.h" #include "profile.h" #include "r4300/r4300.h" #include "r4300/r4300_core.h" #include "r4300/reset.h" #include "rdp/rdp_core.h" #include "ri/ri_controller.h" #include "rom.h" #include "rsp/rsp_core.h" #include "savestates.h" #include "si/si_controller.h" #include "sra_file.h" #include "util.h" #include "vi/vi_controller.h" #ifdef DBG #include "debugger/dbg_debugger.h" #include "debugger/dbg_types.h" #endif #ifdef WITH_LIRC #include "lirc.h" #endif //WITH_LIRC /* version number for Core config section */ #define CONFIG_PARAM_VERSION 1.01 /** globals **/ m64p_handle g_CoreConfig = NULL; m64p_frame_callback g_FrameCallback = NULL; int g_MemHasBeenBSwapped = 0; // store byte-swapped flag so we don't swap twice when re-playing game int g_EmulatorRunning = 0; // need separate boolean to tell if emulator is running, since --nogui doesn't use a thread ALIGN(16, uint32_t g_rdram[RDRAM_MAX_SIZE/4]); struct ai_controller g_ai; struct pi_controller g_pi; struct ri_controller g_ri; struct si_controller g_si; struct vi_controller g_vi; struct r4300_core g_r4300; struct rdp_core g_dp; struct rsp_core g_sp; int g_delay_si = 0; int g_gs_vi_counter = 0; /** static (local) variables **/ static int l_CurrentFrame = 0; // frame counter static int l_TakeScreenshot = 0; // Tell OSD Rendering callback to take a screenshot just before drawing the OSD static int l_SpeedFactor = 100; // percentage of nominal game speed at which emulator is running static int l_FrameAdvance = 0; // variable to check if we pause on next frame static int l_MainSpeedLimit = 1; // insert delay during vi_interrupt to keep speed at real-time static osd_message_t *l_msgVol = NULL; static osd_message_t *l_msgFF = NULL; static osd_message_t *l_msgPause = NULL; /********************************************************************************************************* * static functions */ static const char *get_savepathdefault(const char *configpath) { static char path[1024]; if (!configpath || (strlen(configpath) == 0)) { snprintf(path, 1024, "%ssave%c", ConfigGetUserDataPath(), OSAL_DIR_SEPARATORS[0]); path[1023] = 0; } else { snprintf(path, 1024, "%s%c", configpath, OSAL_DIR_SEPARATORS[0]); path[1023] = 0; } /* create directory if it doesn't exist */ osal_mkdirp(path, 0700); return path; } static char *get_mempaks_path(void) { return formatstr("%s%s.mpk", get_savesrampath(), ROM_SETTINGS.goodname); } static char *get_eeprom_path(void) { return formatstr("%s%s.eep", get_savesrampath(), ROM_SETTINGS.goodname); } static char *get_sram_path(void) { return formatstr("%s%s.sra", get_savesrampath(), ROM_SETTINGS.goodname); } static char *get_flashram_path(void) { return formatstr("%s%s.fla", get_savesrampath(), ROM_SETTINGS.goodname); } /********************************************************************************************************* * helper functions */ const char *get_savestatepath(void) { /* try to get the SaveStatePath string variable in the Core configuration section */ return get_savepathdefault(ConfigGetParamString(g_CoreConfig, "SaveStatePath")); } const char *get_savesrampath(void) { /* try to get the SaveSRAMPath string variable in the Core configuration section */ return get_savepathdefault(ConfigGetParamString(g_CoreConfig, "SaveSRAMPath")); } void main_message(m64p_msg_level level, unsigned int corner, const char *format, ...) { va_list ap; char buffer[2049]; va_start(ap, format); vsnprintf(buffer, 2047, format, ap); buffer[2048]='\0'; va_end(ap); /* send message to on-screen-display if enabled */ if (ConfigGetParamBool(g_CoreConfig, "OnScreenDisplay")) osd_new_message((enum osd_corner) corner, "%s", buffer); /* send message to front-end */ DebugMessage(level, "%s", buffer); } void main_check_inputs(void) { #ifdef WITH_LIRC lircCheckInput(); #endif SDL_PumpEvents(); } /********************************************************************************************************* * global functions, for adjusting the core emulator behavior */ int main_set_core_defaults(void) { float fConfigParamsVersion; int bSaveConfig = 0, bUpgrade = 0; if (ConfigGetParameter(g_CoreConfig, "Version", M64TYPE_FLOAT, &fConfigParamsVersion, sizeof(float)) != M64ERR_SUCCESS) { DebugMessage(M64MSG_WARNING, "No version number in 'Core' config section. Setting defaults."); ConfigDeleteSection("Core"); ConfigOpenSection("Core", &g_CoreConfig); bSaveConfig = 1; } else if (((int) fConfigParamsVersion) != ((int) CONFIG_PARAM_VERSION)) { DebugMessage(M64MSG_WARNING, "Incompatible version %.2f in 'Core' config section: current is %.2f. Setting defaults.", fConfigParamsVersion, (float) CONFIG_PARAM_VERSION); ConfigDeleteSection("Core"); ConfigOpenSection("Core", &g_CoreConfig); bSaveConfig = 1; } else if ((CONFIG_PARAM_VERSION - fConfigParamsVersion) >= 0.0001f) { float fVersion = (float) CONFIG_PARAM_VERSION; ConfigSetParameter(g_CoreConfig, "Version", M64TYPE_FLOAT, &fVersion); DebugMessage(M64MSG_INFO, "Updating parameter set version in 'Core' config section to %.2f", fVersion); bUpgrade = 1; bSaveConfig = 1; } /* parameters controlling the operation of the core */ ConfigSetDefaultFloat(g_CoreConfig, "Version", (float) CONFIG_PARAM_VERSION, "Mupen64Plus Core config parameter set version number. Please don't change this version number."); ConfigSetDefaultBool(g_CoreConfig, "OnScreenDisplay", 1, "Draw on-screen display if True, otherwise don't draw OSD"); #if defined(DYNAREC) ConfigSetDefaultInt(g_CoreConfig, "R4300Emulator", 2, "Use Pure Interpreter if 0, Cached Interpreter if 1, or Dynamic Recompiler if 2 or more"); #else ConfigSetDefaultInt(g_CoreConfig, "R4300Emulator", 1, "Use Pure Interpreter if 0, Cached Interpreter if 1, or Dynamic Recompiler if 2 or more"); #endif ConfigSetDefaultBool(g_CoreConfig, "NoCompiledJump", 0, "Disable compiled jump commands in dynamic recompiler (should be set to False) "); ConfigSetDefaultBool(g_CoreConfig, "DisableExtraMem", 0, "Disable 4MB expansion RAM pack. May be necessary for some games"); ConfigSetDefaultBool(g_CoreConfig, "AutoStateSlotIncrement", 0, "Increment the save state slot after each save operation"); ConfigSetDefaultBool(g_CoreConfig, "EnableDebugger", 0, "Activate the R4300 debugger when ROM execution begins, if core was built with Debugger support"); ConfigSetDefaultInt(g_CoreConfig, "CurrentStateSlot", 0, "Save state slot (0-9) to use when saving/loading the emulator state"); ConfigSetDefaultString(g_CoreConfig, "ScreenshotPath", "", "Path to directory where screenshots are saved. If this is blank, the default value of ${UserConfigPath}/screenshot will be used"); ConfigSetDefaultString(g_CoreConfig, "SaveStatePath", "", "Path to directory where emulator save states (snapshots) are saved. If this is blank, the default value of ${UserConfigPath}/save will be used"); ConfigSetDefaultString(g_CoreConfig, "SaveSRAMPath", "", "Path to directory where SRAM/EEPROM data (in-game saves) are stored. If this is blank, the default value of ${UserConfigPath}/save will be used"); ConfigSetDefaultString(g_CoreConfig, "SharedDataPath", "", "Path to a directory to search when looking for shared data files"); ConfigSetDefaultBool(g_CoreConfig, "DelaySI", 1, "Delay interrupt after DMA SI read/write"); ConfigSetDefaultInt(g_CoreConfig, "CountPerOp", 0, "Force number of cycles per emulated instruction"); /* handle upgrades */ if (bUpgrade) { if (fConfigParamsVersion < 1.01f) { // added separate SaveSRAMPath parameter in v1.01 const char *pccSaveStatePath = ConfigGetParamString(g_CoreConfig, "SaveStatePath"); if (pccSaveStatePath != NULL) ConfigSetParameter(g_CoreConfig, "SaveSRAMPath", M64TYPE_STRING, pccSaveStatePath); } } if (bSaveConfig) ConfigSaveSection("Core"); /* set config parameters for keyboard and joystick commands */ return event_set_core_defaults(); } void main_speeddown(int percent) { if (l_SpeedFactor - percent > 10) /* 10% minimum speed */ { l_SpeedFactor -= percent; main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "%s %d%%", "Playback speed:", l_SpeedFactor); audio.setSpeedFactor(l_SpeedFactor); StateChanged(M64CORE_SPEED_FACTOR, l_SpeedFactor); } } void main_speedup(int percent) { if (l_SpeedFactor + percent < 300) /* 300% maximum speed */ { l_SpeedFactor += percent; main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "%s %d%%", "Playback speed:", l_SpeedFactor); audio.setSpeedFactor(l_SpeedFactor); StateChanged(M64CORE_SPEED_FACTOR, l_SpeedFactor); } } static void main_speedset(int percent) { if (percent < 1 || percent > 1000) { DebugMessage(M64MSG_WARNING, "Invalid speed setting %i percent", percent); return; } // disable fast-forward if it's enabled main_set_fastforward(0); // set speed l_SpeedFactor = percent; main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "%s %d%%", "Playback speed:", l_SpeedFactor); audio.setSpeedFactor(l_SpeedFactor); StateChanged(M64CORE_SPEED_FACTOR, l_SpeedFactor); } void main_set_fastforward(int enable) { static int ff_state = 0; static int SavedSpeedFactor = 100; if (enable && !ff_state) { ff_state = 1; /* activate fast-forward */ SavedSpeedFactor = l_SpeedFactor; l_SpeedFactor = 250; audio.setSpeedFactor(l_SpeedFactor); StateChanged(M64CORE_SPEED_FACTOR, l_SpeedFactor); // set fast-forward indicator l_msgFF = osd_new_message(OSD_TOP_RIGHT, "Fast Forward"); osd_message_set_static(l_msgFF); osd_message_set_user_managed(l_msgFF); } else if (!enable && ff_state) { ff_state = 0; /* de-activate fast-forward */ l_SpeedFactor = SavedSpeedFactor; audio.setSpeedFactor(l_SpeedFactor); StateChanged(M64CORE_SPEED_FACTOR, l_SpeedFactor); // remove message osd_delete_message(l_msgFF); l_msgFF = NULL; } } static void main_set_speedlimiter(int enable) { l_MainSpeedLimit = enable ? 1 : 0; } static int main_is_paused(void) { return (g_EmulatorRunning && rompause); } void main_toggle_pause(void) { if (!g_EmulatorRunning) return; if (rompause) { DebugMessage(M64MSG_STATUS, "Emulation continued."); if(l_msgPause) { osd_delete_message(l_msgPause); l_msgPause = NULL; } StateChanged(M64CORE_EMU_STATE, M64EMU_RUNNING); } else { if(l_msgPause) osd_delete_message(l_msgPause); DebugMessage(M64MSG_STATUS, "Emulation paused."); l_msgPause = osd_new_message(OSD_MIDDLE_CENTER, "Paused"); osd_message_set_static(l_msgPause); osd_message_set_user_managed(l_msgPause); StateChanged(M64CORE_EMU_STATE, M64EMU_PAUSED); } rompause = !rompause; l_FrameAdvance = 0; } void main_advance_one(void) { l_FrameAdvance = 1; rompause = 0; StateChanged(M64CORE_EMU_STATE, M64EMU_RUNNING); } static void main_draw_volume_osd(void) { char msgString[64]; const char *volString; // this calls into the audio plugin volString = audio.volumeGetString(); if (volString == NULL) { strcpy(msgString, "Volume Not Supported."); } else { sprintf(msgString, "%s: %s", "Volume", volString); } // create a new message or update an existing one if (l_msgVol != NULL) osd_update_message(l_msgVol, "%s", msgString); else { l_msgVol = osd_new_message(OSD_MIDDLE_CENTER, "%s", msgString); osd_message_set_user_managed(l_msgVol); } } /* this function could be called as a result of a keypress, joystick/button movement, LIRC command, or 'testshots' command-line option timer */ void main_take_next_screenshot(void) { l_TakeScreenshot = l_CurrentFrame + 1; } void main_state_set_slot(int slot) { if (slot < 0 || slot > 9) { DebugMessage(M64MSG_WARNING, "Invalid savestate slot '%i' in main_state_set_slot(). Using 0", slot); slot = 0; } savestates_select_slot(slot); StateChanged(M64CORE_SAVESTATE_SLOT, slot); } void main_state_inc_slot(void) { savestates_inc_slot(); } void main_state_load(const char *filename) { rumblepak_rumble(&g_si.pif.controllers[0].rumblepak, RUMBLE_STOP); rumblepak_rumble(&g_si.pif.controllers[1].rumblepak, RUMBLE_STOP); rumblepak_rumble(&g_si.pif.controllers[2].rumblepak, RUMBLE_STOP); rumblepak_rumble(&g_si.pif.controllers[3].rumblepak, RUMBLE_STOP); if (filename == NULL) // Save to slot savestates_set_job(savestates_job_load, savestates_type_m64p, NULL); else savestates_set_job(savestates_job_load, savestates_type_unknown, filename); } void main_state_save(int format, const char *filename) { if (filename == NULL) // Save to slot savestates_set_job(savestates_job_save, savestates_type_m64p, NULL); else // Save to file savestates_set_job(savestates_job_save, (savestates_type)format, filename); } m64p_error main_core_state_query(m64p_core_param param, int *rval) { switch (param) { case M64CORE_EMU_STATE: if (!g_EmulatorRunning) *rval = M64EMU_STOPPED; else if (rompause) *rval = M64EMU_PAUSED; else *rval = M64EMU_RUNNING; break; case M64CORE_VIDEO_MODE: if (!VidExt_VideoRunning()) *rval = M64VIDEO_NONE; else if (VidExt_InFullscreenMode()) *rval = M64VIDEO_FULLSCREEN; else *rval = M64VIDEO_WINDOWED; break; case M64CORE_SAVESTATE_SLOT: *rval = savestates_get_slot(); break; case M64CORE_SPEED_FACTOR: *rval = l_SpeedFactor; break; case M64CORE_SPEED_LIMITER: *rval = l_MainSpeedLimit; break; case M64CORE_VIDEO_SIZE: { int width, height; if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; main_get_screen_size(&width, &height); *rval = (width << 16) + height; break; } case M64CORE_AUDIO_VOLUME: { if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; return main_volume_get_level(rval); } case M64CORE_AUDIO_MUTE: *rval = main_volume_get_muted(); break; case M64CORE_INPUT_GAMESHARK: *rval = event_gameshark_active(); break; // these are only used for callbacks; they cannot be queried or set case M64CORE_STATE_LOADCOMPLETE: case M64CORE_STATE_SAVECOMPLETE: return M64ERR_INPUT_INVALID; default: return M64ERR_INPUT_INVALID; } return M64ERR_SUCCESS; } m64p_error main_core_state_set(m64p_core_param param, int val) { switch (param) { case M64CORE_EMU_STATE: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; if (val == M64EMU_STOPPED) { /* this stop function is asynchronous. The emulator may not terminate until later */ main_stop(); return M64ERR_SUCCESS; } else if (val == M64EMU_RUNNING) { if (main_is_paused()) main_toggle_pause(); return M64ERR_SUCCESS; } else if (val == M64EMU_PAUSED) { if (!main_is_paused()) main_toggle_pause(); return M64ERR_SUCCESS; } return M64ERR_INPUT_INVALID; case M64CORE_VIDEO_MODE: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; if (val == M64VIDEO_WINDOWED) { if (VidExt_InFullscreenMode()) gfx.changeWindow(); return M64ERR_SUCCESS; } else if (val == M64VIDEO_FULLSCREEN) { if (!VidExt_InFullscreenMode()) gfx.changeWindow(); return M64ERR_SUCCESS; } return M64ERR_INPUT_INVALID; case M64CORE_SAVESTATE_SLOT: if (val < 0 || val > 9) return M64ERR_INPUT_INVALID; savestates_select_slot(val); return M64ERR_SUCCESS; case M64CORE_SPEED_FACTOR: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; main_speedset(val); return M64ERR_SUCCESS; case M64CORE_SPEED_LIMITER: main_set_speedlimiter(val); return M64ERR_SUCCESS; case M64CORE_VIDEO_SIZE: { // the front-end app is telling us that the user has resized the video output frame, and so // we should try to update the video plugin accordingly. First, check state int width, height; if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; width = (val >> 16) & 0xffff; height = val & 0xffff; // then call the video plugin. if the video plugin supports resizing, it will resize its viewport and call // VidExt_ResizeWindow to update the window manager handling our opengl output window gfx.resizeVideoOutput(width, height); return M64ERR_SUCCESS; } case M64CORE_AUDIO_VOLUME: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; if (val < 0 || val > 100) return M64ERR_INPUT_INVALID; return main_volume_set_level(val); case M64CORE_AUDIO_MUTE: if ((main_volume_get_muted() && !val) || (!main_volume_get_muted() && val)) return main_volume_mute(); return M64ERR_SUCCESS; case M64CORE_INPUT_GAMESHARK: if (!g_EmulatorRunning) return M64ERR_INVALID_STATE; event_set_gameshark(val); return M64ERR_SUCCESS; // these are only used for callbacks; they cannot be queried or set case M64CORE_STATE_LOADCOMPLETE: case M64CORE_STATE_SAVECOMPLETE: return M64ERR_INPUT_INVALID; default: return M64ERR_INPUT_INVALID; } } m64p_error main_get_screen_size(int *width, int *height) { gfx.readScreen(NULL, width, height, 0); return M64ERR_SUCCESS; } m64p_error main_read_screen(void *pixels, int bFront) { int width_trash, height_trash; gfx.readScreen(pixels, &width_trash, &height_trash, bFront); return M64ERR_SUCCESS; } m64p_error main_volume_up(void) { int level = 0; audio.volumeUp(); main_draw_volume_osd(); main_volume_get_level(&level); StateChanged(M64CORE_AUDIO_VOLUME, level); return M64ERR_SUCCESS; } m64p_error main_volume_down(void) { int level = 0; audio.volumeDown(); main_draw_volume_osd(); main_volume_get_level(&level); StateChanged(M64CORE_AUDIO_VOLUME, level); return M64ERR_SUCCESS; } m64p_error main_volume_get_level(int *level) { *level = audio.volumeGetLevel(); return M64ERR_SUCCESS; } m64p_error main_volume_set_level(int level) { audio.volumeSetLevel(level); main_draw_volume_osd(); level = audio.volumeGetLevel(); StateChanged(M64CORE_AUDIO_VOLUME, level); return M64ERR_SUCCESS; } m64p_error main_volume_mute(void) { audio.volumeMute(); main_draw_volume_osd(); StateChanged(M64CORE_AUDIO_MUTE, main_volume_get_muted()); return M64ERR_SUCCESS; } int main_volume_get_muted(void) { return (audio.volumeGetLevel() == 0); } m64p_error main_reset(int do_hard_reset) { if (do_hard_reset) reset_hard_job |= 1; else reset_soft(); return M64ERR_SUCCESS; } /********************************************************************************************************* * global functions, callbacks from the r4300 core or from other plugins */ static void video_plugin_render_callback(int bScreenRedrawn) { int bOSD = ConfigGetParamBool(g_CoreConfig, "OnScreenDisplay"); // if the flag is set to take a screenshot, then grab it now if (l_TakeScreenshot != 0) { // if the OSD is enabled, and the screen has not been recently redrawn, then we cannot take a screenshot now because // it contains the OSD text. Wait until the next redraw if (!bOSD || bScreenRedrawn) { TakeScreenshot(l_TakeScreenshot - 1); // current frame number +1 is in l_TakeScreenshot l_TakeScreenshot = 0; // reset flag } } // if the OSD is enabled, then draw it now if (bOSD) { osd_render(); } // if the input plugin specified a render callback, call it now if(input.renderCallback) { input.renderCallback(); } } void new_frame(void) { if (g_FrameCallback != NULL) (*g_FrameCallback)(l_CurrentFrame); /* advance the current frame */ l_CurrentFrame++; if (l_FrameAdvance) { rompause = 1; l_FrameAdvance = 0; StateChanged(M64CORE_EMU_STATE, M64EMU_PAUSED); } } static void apply_speed_limiter(void) { unsigned int CurrentFPSTime; static unsigned int LastFPSTime = 0; static int VITotalDelta; static int VIDeltas[64]; static unsigned int VIDeltasIndex; double VILimitMilliseconds = 1000.0 / ROM_PARAMS.vilimit; double AdjustedLimit = VILimitMilliseconds * 100.0 / l_SpeedFactor; // adjust for selected emulator speed int ThisFrameDelta, IntegratedDelta, TimeToWait; timed_section_start(TIMED_SECTION_IDLE); #ifdef DBG if(g_DebuggerActive) DebuggerCallback(DEBUG_UI_VI, 0); #endif // if this is the first frame, initialize our data structures if(LastFPSTime == 0) { LastFPSTime = SDL_GetTicks(); VITotalDelta = 0; memset(VIDeltas, 0, sizeof(VIDeltas)); VIDeltasIndex = 0; return; } // calculate # of milliseconds that have passed since the last video interrupt CurrentFPSTime = SDL_GetTicks(); ThisFrameDelta = CurrentFPSTime - LastFPSTime - (int) AdjustedLimit; // are we too fast? if (ThisFrameDelta < 0) { // calculate the total time error over the last 64 frames IntegratedDelta = VITotalDelta + ThisFrameDelta; // if we are still too fast, and then speed limiter is on, then we should wait if (IntegratedDelta < 0 && l_MainSpeedLimit) { TimeToWait = (IntegratedDelta > ThisFrameDelta) ? -IntegratedDelta : -ThisFrameDelta; DebugMessage(M64MSG_VERBOSE, " apply_speed_limiter(): Waiting %ims", TimeToWait); SDL_Delay(TimeToWait); // recalculate # of milliseconds that have passed since the last video interrupt, // taking into account the time we just waited CurrentFPSTime = SDL_GetTicks(); ThisFrameDelta = CurrentFPSTime - LastFPSTime - (int) AdjustedLimit; } } // update our data structures LastFPSTime = CurrentFPSTime ; VITotalDelta += ThisFrameDelta - VIDeltas[VIDeltasIndex]; VIDeltas[VIDeltasIndex] = ThisFrameDelta; VIDeltasIndex = (VIDeltasIndex + 1) & 63; timed_section_end(TIMED_SECTION_IDLE); } /* TODO: make a GameShark module and move that there */ static void gs_apply_cheats(void) { if(g_gs_vi_counter < 60) { if (g_gs_vi_counter == 0) cheat_apply_cheats(ENTRY_BOOT); g_gs_vi_counter++; } else { cheat_apply_cheats(ENTRY_VI); } } static void pause_loop(void) { if(rompause) { osd_render(); // draw Paused message in case gfx.updateScreen didn't do it VidExt_GL_SwapBuffers(); while(rompause) { SDL_Delay(10); main_check_inputs(); } } } /* called on vertical interrupt. * Allow the core to perform various things */ void new_vi(void) { gs_apply_cheats(); main_check_inputs(); timed_sections_refresh(); pause_loop(); apply_speed_limiter(); } static void connect_all( struct r4300_core* r4300, struct rdp_core* dp, struct rsp_core* sp, struct ai_controller* ai, struct pi_controller* pi, struct ri_controller* ri, struct si_controller* si, struct vi_controller* vi, uint32_t* dram, size_t dram_size, uint8_t* rom, size_t rom_size) { connect_rdp(dp, r4300, sp, ri); connect_rsp(sp, r4300, dp, ri); connect_ai(ai, r4300, ri, vi); connect_pi(pi, r4300, ri, rom, rom_size); connect_ri(ri, dram, dram_size); connect_si(si, r4300, ri); connect_vi(vi, r4300); } /********************************************************************************************************* * emulation thread - runs the core */ m64p_error main_run(void) { size_t i; unsigned int disable_extra_mem; struct eep_file eep; struct fla_file fla; struct mpk_file mpk; struct sra_file sra; static int channels[] = { 0, 1, 2, 3 }; /* take the r4300 emulator mode from the config file at this point and cache it in a global variable */ r4300emu = ConfigGetParamInt(g_CoreConfig, "R4300Emulator"); /* set some other core parameters based on the config file values */ savestates_set_autoinc_slot(ConfigGetParamBool(g_CoreConfig, "AutoStateSlotIncrement")); savestates_select_slot(ConfigGetParamInt(g_CoreConfig, "CurrentStateSlot")); no_compiled_jump = ConfigGetParamBool(g_CoreConfig, "NoCompiledJump"); g_delay_si = ConfigGetParamBool(g_CoreConfig, "DelaySI"); disable_extra_mem = ConfigGetParamInt(g_CoreConfig, "DisableExtraMem"); count_per_op = ConfigGetParamInt(g_CoreConfig, "CountPerOp"); if (count_per_op <= 0) count_per_op = ROM_PARAMS.countperop; cheat_add_hacks(); /* do byte-swapping if it's not been done yet */ if (g_MemHasBeenBSwapped == 0) { swap_buffer(g_rom, 4, g_rom_size/4); g_MemHasBeenBSwapped = 1; } connect_all(&g_r4300, &g_dp, &g_sp, &g_ai, &g_pi, &g_ri, &g_si, &g_vi, g_rdram, (disable_extra_mem == 0) ? 0x800000 : 0x400000, g_rom, g_rom_size); init_memory(); // Attach rom to plugins if (!gfx.romOpen()) { return M64ERR_PLUGIN_FAIL; } if (!audio.romOpen()) { gfx.romClosed(); return M64ERR_PLUGIN_FAIL; } if (!input.romOpen()) { audio.romClosed(); gfx.romClosed(); return M64ERR_PLUGIN_FAIL; } /* set up the SDL key repeat and event filter to catch keyboard/joystick commands for the core */ event_initialize(); /* initialize the on-screen display */ if (ConfigGetParamBool(g_CoreConfig, "OnScreenDisplay")) { // init on-screen display int width = 640, height = 480; gfx.readScreen(NULL, &width, &height, 0); // read screen to get width and height osd_init(width, height); } // setup rendering callback from video plugin to the core, for screenshots and On-Screen-Display gfx.setRenderingCallback(video_plugin_render_callback); /* connect external audio sink to AI component */ g_ai.user_data = &g_ai; g_ai.set_audio_format = set_audio_format_via_audio_plugin; g_ai.push_audio_samples = push_audio_samples_via_audio_plugin; /* connect external time source to AF_RTC component */ g_si.pif.af_rtc.user_data = NULL; g_si.pif.af_rtc.get_time = get_time_using_C_localtime; /* connect external game controllers */ for(i = 0; i < GAME_CONTROLLERS_COUNT; ++i) { g_si.pif.controllers[i].user_data = &channels[i]; g_si.pif.controllers[i].is_connected = egcvip_is_connected; g_si.pif.controllers[i].get_input = egcvip_get_input; } /* connect external rumblepaks */ for(i = 0; i < GAME_CONTROLLERS_COUNT; ++i) { g_si.pif.controllers[i].rumblepak.user_data = &channels[i]; g_si.pif.controllers[i].rumblepak.rumble = rvip_rumble; } /* open mpk file (if any) and connect it to mempaks */ open_mpk_file(&mpk, get_mempaks_path()); for(i = 0; i < GAME_CONTROLLERS_COUNT; ++i) { g_si.pif.controllers[i].mempak.user_data = &mpk; g_si.pif.controllers[i].mempak.save = save_mpk_file; g_si.pif.controllers[i].mempak.data = mpk_file_ptr(&mpk, i); } /* open eep file (if any) and connect it to eeprom */ open_eep_file(&eep, get_eeprom_path()); g_si.pif.eeprom.user_data = &eep; g_si.pif.eeprom.save = save_eep_file; g_si.pif.eeprom.data = eep_file_ptr(&eep); if (ROM_SETTINGS.savetype != EEPROM_16KB) { /* 4kbits EEPROM */ g_si.pif.eeprom.size = 0x200; g_si.pif.eeprom.id = 0x8000; } else { /* 16kbits EEPROM */ g_si.pif.eeprom.size = 0x800; g_si.pif.eeprom.id = 0xc000; } /* open fla file (if any) and connect it to flashram */ open_fla_file(&fla, get_flashram_path()); g_pi.flashram.user_data = &fla; g_pi.flashram.save = save_fla_file; g_pi.flashram.data = fla_file_ptr(&fla); /* open sra file (if any) and connect it to SRAM */ open_sra_file(&sra, get_sram_path()); g_pi.sram.user_data = &sra; g_pi.sram.save = save_sra_file; g_pi.sram.data = sra_file_ptr(&sra); #ifdef WITH_LIRC lircStart(); #endif // WITH_LIRC #ifdef DBG if (ConfigGetParamBool(g_CoreConfig, "EnableDebugger")) init_debugger(); #endif /* Startup message on the OSD */ osd_new_message(OSD_MIDDLE_CENTER, "Mupen64Plus Started..."); g_EmulatorRunning = 1; StateChanged(M64CORE_EMU_STATE, M64EMU_RUNNING); /* call r4300 CPU core and run the game */ r4300_reset_hard(); r4300_reset_soft(); r4300_execute(); /* now begin to shut down */ #ifdef WITH_LIRC lircStop(); #endif // WITH_LIRC #ifdef DBG if (g_DebuggerActive) destroy_debugger(); #endif close_sra_file(&sra); close_fla_file(&fla); close_eep_file(&eep); close_mpk_file(&mpk); if (ConfigGetParamBool(g_CoreConfig, "OnScreenDisplay")) { osd_exit(); } rsp.romClosed(); input.romClosed(); audio.romClosed(); gfx.romClosed(); // clean up g_EmulatorRunning = 0; StateChanged(M64CORE_EMU_STATE, M64EMU_STOPPED); return M64ERR_SUCCESS; } void main_stop(void) { /* note: this operation is asynchronous. It may be called from a thread other than the main emulator thread, and may return before the emulator is completely stopped */ if (!g_EmulatorRunning) return; DebugMessage(M64MSG_STATUS, "Stopping emulation."); if(l_msgPause) { osd_delete_message(l_msgPause); l_msgPause = NULL; } if(l_msgFF) { osd_delete_message(l_msgFF); l_msgFF = NULL; } if(l_msgVol) { osd_delete_message(l_msgVol); l_msgVol = NULL; } if (rompause) { rompause = 0; StateChanged(M64CORE_EMU_STATE, M64EMU_RUNNING); } stop = 1; #ifdef DBG if(g_DebuggerActive) { debugger_step(); } #endif } mupen64plus-core-src-2.5/src/main/main.h000066400000000000000000000071771251723631200201230ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - main.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2012 CasualJames * * Copyright (C) 2002 Blight * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __MAIN_H__ #define __MAIN_H__ #include #include "api/m64p_types.h" #include "osal/preproc.h" struct ai_controller; struct pi_controller; struct r4300_core; struct rdp_core; struct ri_controller; struct rsp_core; struct si_controller; struct vi_controller; enum { RDRAM_MAX_SIZE = 0x800000 }; /* globals */ extern m64p_handle g_CoreConfig; extern int g_MemHasBeenBSwapped; extern int g_EmulatorRunning; extern ALIGN(16, uint32_t g_rdram[RDRAM_MAX_SIZE/4]); extern struct ai_controller g_ai; extern struct pi_controller g_pi; extern struct ri_controller g_ri; extern struct si_controller g_si; extern struct vi_controller g_vi; extern struct r4300_core g_r4300; extern struct rdp_core g_dp; extern struct rsp_core g_sp; extern m64p_frame_callback g_FrameCallback; extern int g_delay_si; extern int g_gs_vi_counter; const char* get_savestatepath(void); const char* get_savesrampath(void); void main_check_inputs(void); void new_frame(void); void new_vi(void); int main_set_core_defaults(void); void main_message(m64p_msg_level level, unsigned int osd_corner, const char *format, ...); m64p_error main_run(void); void main_stop(void); void main_toggle_pause(void); void main_advance_one(void); void main_speedup(int percent); void main_speeddown(int percent); void main_set_fastforward(int enable); void main_take_next_screenshot(void); void main_state_set_slot(int slot); void main_state_inc_slot(void); void main_state_load(const char *filename); void main_state_save(int format, const char *filename); m64p_error main_core_state_query(m64p_core_param param, int *rval); m64p_error main_core_state_set(m64p_core_param param, int val); m64p_error main_get_screen_size(int *width, int *height); m64p_error main_read_screen(void *pixels, int bFront); m64p_error main_volume_up(void); m64p_error main_volume_down(void); m64p_error main_volume_get_level(int *level); m64p_error main_volume_set_level(int level); m64p_error main_volume_mute(void); int main_volume_get_muted(void); m64p_error main_reset(int do_hard_reset); #endif /* __MAIN_H__ */ mupen64plus-core-src-2.5/src/main/md5.c000066400000000000000000000305561251723631200176540ustar00rootroot00000000000000/* Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch ghost@aladdin.com */ /* $Id: md5.c,v 1.6 2002/04/13 19:20:28 lpd Exp $ */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321, whose text is available at http://www.ietf.org/rfc/rfc1321.txt The code is derived from the text of the RFC, including the test suite (section A.5) but excluding the rest of Appendix A. It does not include any code or documentation that is identified in the RFC as being copyrighted. The original and principal author of md5.c is L. Peter Deutsch . Other authors are noted in the change history that follows (in reverse chronological order): 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order either statically or dynamically; added missing #include in library. 2002-03-11 lpd Corrected argument list for main(), and added int return type, in test program and T value program. 2002-02-21 lpd Added missing #include in test program. 2000-07-03 lpd Patched to eliminate warnings about "constant is unsigned in ANSI C, signed in traditional"; made test program self-checking. 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). 1999-05-03 lpd Original version. */ #include "md5.h" #include #undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ #ifdef ARCH_IS_BIG_ENDIAN # define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1) #else # define BYTE_ORDER 0 #endif #define T_MASK ((md5_word_t)~0) #define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87) #define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9) #define T3 0x242070db #define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111) #define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050) #define T6 0x4787c62a #define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec) #define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe) #define T9 0x698098d8 #define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850) #define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e) #define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841) #define T13 0x6b901122 #define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c) #define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71) #define T16 0x49b40821 #define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d) #define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf) #define T19 0x265e5a51 #define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855) #define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2) #define T22 0x02441453 #define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e) #define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437) #define T25 0x21e1cde6 #define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829) #define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278) #define T28 0x455a14ed #define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa) #define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07) #define T31 0x676f02d9 #define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375) #define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd) #define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e) #define T35 0x6d9d6122 #define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3) #define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb) #define T38 0x4bdecfa9 #define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f) #define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f) #define T41 0x289b7ec6 #define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805) #define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a) #define T44 0x04881d05 #define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6) #define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a) #define T47 0x1fa27cf8 #define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a) #define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb) #define T50 0x432aff97 #define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58) #define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6) #define T53 0x655b59c3 #define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d) #define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82) #define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e) #define T57 0x6fa87e4f #define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f) #define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb) #define T60 0x4e0811a1 #define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d) #define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca) #define T63 0x2ad7d2bb #define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e) static void md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) { md5_word_t a = pms->abcd[0], b = pms->abcd[1], c = pms->abcd[2], d = pms->abcd[3]; md5_word_t t; #if BYTE_ORDER > 0 /* Define storage only for big-endian CPUs. */ md5_word_t X[16]; #else /* Define storage for little-endian or both types of CPUs. */ md5_word_t xbuf[16]; const md5_word_t *X; #endif { #if BYTE_ORDER == 0 /* * Determine dynamically whether this is a big-endian or * little-endian machine, since we can use a more efficient * algorithm on the latter. */ static const int w = 1; if (*((const md5_byte_t *)&w)) /* dynamic little-endian */ #endif #if BYTE_ORDER <= 0 /* little-endian */ { /* * On little-endian machines, we can process properly aligned * data without copying it. */ if (!((data - (const md5_byte_t *)0) & 3)) { /* data are properly aligned */ X = (const md5_word_t *)data; } else { /* not aligned */ memcpy(xbuf, data, 64); X = xbuf; } } #endif #if BYTE_ORDER == 0 else /* dynamic big-endian */ #endif #if BYTE_ORDER >= 0 /* big-endian */ { /* * On big-endian machines, we must arrange the bytes in the * right order. */ const md5_byte_t *xp = data; int i; # if BYTE_ORDER == 0 X = xbuf; /* (dynamic only) */ # else # define xbuf X /* (static only) */ # endif for (i = 0; i < 16; ++i, xp += 4) xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); } #endif } #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) /* Round 1. */ /* Let [abcd k s i] denote the operation a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ #define F(x, y, z) (((x) & (y)) | (~(x) & (z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + F(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 7, T1); SET(d, a, b, c, 1, 12, T2); SET(c, d, a, b, 2, 17, T3); SET(b, c, d, a, 3, 22, T4); SET(a, b, c, d, 4, 7, T5); SET(d, a, b, c, 5, 12, T6); SET(c, d, a, b, 6, 17, T7); SET(b, c, d, a, 7, 22, T8); SET(a, b, c, d, 8, 7, T9); SET(d, a, b, c, 9, 12, T10); SET(c, d, a, b, 10, 17, T11); SET(b, c, d, a, 11, 22, T12); SET(a, b, c, d, 12, 7, T13); SET(d, a, b, c, 13, 12, T14); SET(c, d, a, b, 14, 17, T15); SET(b, c, d, a, 15, 22, T16); #undef SET /* Round 2. */ /* Let [abcd k s i] denote the operation a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ #define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + G(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 1, 5, T17); SET(d, a, b, c, 6, 9, T18); SET(c, d, a, b, 11, 14, T19); SET(b, c, d, a, 0, 20, T20); SET(a, b, c, d, 5, 5, T21); SET(d, a, b, c, 10, 9, T22); SET(c, d, a, b, 15, 14, T23); SET(b, c, d, a, 4, 20, T24); SET(a, b, c, d, 9, 5, T25); SET(d, a, b, c, 14, 9, T26); SET(c, d, a, b, 3, 14, T27); SET(b, c, d, a, 8, 20, T28); SET(a, b, c, d, 13, 5, T29); SET(d, a, b, c, 2, 9, T30); SET(c, d, a, b, 7, 14, T31); SET(b, c, d, a, 12, 20, T32); #undef SET /* Round 3. */ /* Let [abcd k s t] denote the operation a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ #define H(x, y, z) ((x) ^ (y) ^ (z)) #define SET(a, b, c, d, k, s, Ti)\ t = a + H(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 5, 4, T33); SET(d, a, b, c, 8, 11, T34); SET(c, d, a, b, 11, 16, T35); SET(b, c, d, a, 14, 23, T36); SET(a, b, c, d, 1, 4, T37); SET(d, a, b, c, 4, 11, T38); SET(c, d, a, b, 7, 16, T39); SET(b, c, d, a, 10, 23, T40); SET(a, b, c, d, 13, 4, T41); SET(d, a, b, c, 0, 11, T42); SET(c, d, a, b, 3, 16, T43); SET(b, c, d, a, 6, 23, T44); SET(a, b, c, d, 9, 4, T45); SET(d, a, b, c, 12, 11, T46); SET(c, d, a, b, 15, 16, T47); SET(b, c, d, a, 2, 23, T48); #undef SET /* Round 4. */ /* Let [abcd k s t] denote the operation a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ #define I(x, y, z) ((y) ^ ((x) | ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + I(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 6, T49); SET(d, a, b, c, 7, 10, T50); SET(c, d, a, b, 14, 15, T51); SET(b, c, d, a, 5, 21, T52); SET(a, b, c, d, 12, 6, T53); SET(d, a, b, c, 3, 10, T54); SET(c, d, a, b, 10, 15, T55); SET(b, c, d, a, 1, 21, T56); SET(a, b, c, d, 8, 6, T57); SET(d, a, b, c, 15, 10, T58); SET(c, d, a, b, 6, 15, T59); SET(b, c, d, a, 13, 21, T60); SET(a, b, c, d, 4, 6, T61); SET(d, a, b, c, 11, 10, T62); SET(c, d, a, b, 2, 15, T63); SET(b, c, d, a, 9, 21, T64); #undef SET /* Then perform the following additions. (That is increment each of the four registers by the value it had before this block was started.) */ pms->abcd[0] += a; pms->abcd[1] += b; pms->abcd[2] += c; pms->abcd[3] += d; } void md5_init(md5_state_t *pms) { pms->count[0] = pms->count[1] = 0; pms->abcd[0] = 0x67452301; pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476; pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301; pms->abcd[3] = 0x10325476; } void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) { const md5_byte_t *p = data; int left = nbytes; int offset = (pms->count[0] >> 3) & 63; md5_word_t nbits = (md5_word_t)(nbytes << 3); if (nbytes <= 0) return; /* Update the message length. */ pms->count[1] += nbytes >> 29; pms->count[0] += nbits; if (pms->count[0] < nbits) pms->count[1]++; /* Process an initial partial block. */ if (offset) { int copy = (offset + nbytes > 64 ? 64 - offset : nbytes); memcpy(pms->buf + offset, p, copy); if (offset + copy < 64) return; p += copy; left -= copy; md5_process(pms, pms->buf); } /* Process full blocks. */ for (; left >= 64; p += 64, left -= 64) md5_process(pms, p); /* Process a final partial block. */ if (left) memcpy(pms->buf, p, left); } void md5_finish(md5_state_t *pms, md5_byte_t digest[16]) { static const md5_byte_t pad[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; md5_byte_t data[8]; int i; /* Save the length before padding. */ for (i = 0; i < 8; ++i) data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); /* Pad to 56 bytes mod 64. */ md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); /* Append the length. */ md5_append(pms, data, 8); for (i = 0; i < 16; ++i) digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); } mupen64plus-core-src-2.5/src/main/md5.h000066400000000000000000000065311251723631200176550ustar00rootroot00000000000000/* Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch ghost@aladdin.com */ /* $Id: md5.h,v 1.4 2002/04/13 19:20:28 lpd Exp $ */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321, whose text is available at http://www.ietf.org/rfc/rfc1321.txt The code is derived from the text of the RFC, including the test suite (section A.5) but excluding the rest of Appendix A. It does not include any code or documentation that is identified in the RFC as being copyrighted. The original and principal author of md5.h is L. Peter Deutsch . Other authors are noted in the change history that follows (in reverse chronological order): 2002-04-13 lpd Removed support for non-ANSI compilers; removed references to Ghostscript; clarified derivation from RFC 1321; now handles byte order either statically or dynamically. 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); added conditionalization for C++ compilation from Martin Purschke . 1999-05-03 lpd Original version. */ #ifndef md5_INCLUDED # define md5_INCLUDED /* * This package supports both compile-time and run-time determination of CPU * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is * defined as non-zero, the code will be compiled to run only on big-endian * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to * run on either big- or little-endian CPUs, but will run slightly less * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined. */ typedef unsigned char md5_byte_t; /* 8-bit byte */ typedef unsigned int md5_word_t; /* 32-bit word */ /* Define the state of the MD5 Algorithm. */ typedef struct md5_state_s { md5_word_t count[2]; /* message length in bits, lsw first */ md5_word_t abcd[4]; /* digest buffer */ md5_byte_t buf[64]; /* accumulate block */ } md5_state_t; #ifdef __cplusplus extern "C" { #endif /* Initialize the algorithm. */ void md5_init(md5_state_t *pms); /* Append a string to the message. */ void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); /* Finish the message and return the digest. */ void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); #ifdef __cplusplus } /* end extern "C" */ #endif #endif /* md5_INCLUDED */ mupen64plus-core-src-2.5/src/main/mpk_file.c000066400000000000000000000061361251723631200207520ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - mpk_file.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "mpk_file.h" #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "si/pif.h" #include "util.h" void open_mpk_file(struct mpk_file* mpk, const char* filename) { size_t i; /* ! Take ownership of filename ! */ mpk->filename = filename; /* try to load mpk file content */ switch(read_from_file(mpk->filename, mpk->mempaks, GAME_CONTROLLERS_COUNT*MEMPAK_SIZE)) { case file_open_error: /* if no prior file exists, provide default mempaks content */ DebugMessage(M64MSG_VERBOSE, "couldn't open mem pak file '%s' for reading", mpk->filename); for(i = 0; i < GAME_CONTROLLERS_COUNT; ++i) format_mempak(mpk->mempaks[i]); break; case file_read_error: DebugMessage(M64MSG_WARNING, "failed to read mem pak file '%s'", mpk->filename); break; default: break; } } void close_mpk_file(struct mpk_file* mpk) { free((void*)mpk->filename); } uint8_t* mpk_file_ptr(struct mpk_file* mpk, size_t controller_idx) { return &mpk->mempaks[controller_idx][0]; } void save_mpk_file(void* opaque) { /* flush mempak to disk */ struct mpk_file* mpk = (struct mpk_file*)opaque; switch(write_to_file(mpk->filename, mpk->mempaks, GAME_CONTROLLERS_COUNT*MEMPAK_SIZE)) { case file_open_error: DebugMessage(M64MSG_WARNING, "couldn't open mem pak file '%s' for writing", mpk->filename); break; case file_write_error: DebugMessage(M64MSG_WARNING, "failed to write mem pak file '%s'", mpk->filename); break; default: break; } } mupen64plus-core-src-2.5/src/main/mpk_file.h000066400000000000000000000037331251723631200207570ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - mpk_file.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_MAIN_MPK_FILE_H #define M64P_MAIN_MPK_FILE_H #include #include #include "si/mempak.h" #include "si/pif.h" struct mpk_file { uint8_t mempaks[GAME_CONTROLLERS_COUNT][MEMPAK_SIZE]; const char* filename; }; void open_mpk_file(struct mpk_file* mpk, const char* filename); void close_mpk_file(struct mpk_file* mpk); uint8_t* mpk_file_ptr(struct mpk_file* mpk, size_t controller_idx); void save_mpk_file(void* opaque); #endif mupen64plus-core-src-2.5/src/main/profile.c000066400000000000000000000102251251723631200206160ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - profile.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * Copyright (C) 2012 CasualJames * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifdef PROFILE #include "profile.h" #include "api/callbacks.h" #include "api/m64p_types.h" static long long int time_in_section[NUM_TIMED_SECTIONS]; static long long int last_start[NUM_TIMED_SECTIONS]; #if defined(WIN32) && !defined(__MINGW32__) // timing #include static long long int get_time(void) { LARGE_INTEGER counter; QueryPerformanceCounter(&counter); return counter.QuadPart; } static long long int time_to_nsec(long long int time) { static LARGE_INTEGER freq = { 0 }; if (freq.QuadPart == 0) QueryPerformanceFrequency(&freq); return time * 1000000000 / freq.QuadPart; } #else /* Not WIN32 */ // timing #include static long long int get_time(void) { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); return (long long int)ts.tv_sec * 1000000000 + ts.tv_nsec; } static long long int time_to_nsec(long long int time) { return time; } #endif void timed_section_start(enum timed_section section) { last_start[section] = get_time(); } void timed_section_end(enum timed_section section) { long long int end = get_time(); time_in_section[section] += end - last_start[section]; } void timed_sections_refresh() { long long int curr_time = get_time(); if(time_to_nsec(curr_time - last_start[TIMED_SECTION_ALL]) >= 2000000000) { time_in_section[TIMED_SECTION_ALL] = curr_time - last_start[TIMED_SECTION_ALL]; DebugMessage(M64MSG_INFO, "gfx=%f%% - audio=%f%% - compiler=%f%%, idle=%f%%", 100.0 * (double)time_in_section[TIMED_SECTION_GFX] / time_in_section[TIMED_SECTION_ALL], 100.0 * (double)time_in_section[TIMED_SECTION_AUDIO] / time_in_section[TIMED_SECTION_ALL], 100.0 * (double)time_in_section[TIMED_SECTION_COMPILER] / time_in_section[TIMED_SECTION_ALL], 100.0 * (double)time_in_section[TIMED_SECTION_IDLE] / time_in_section[TIMED_SECTION_ALL]); DebugMessage(M64MSG_INFO, "gfx=%llins - audio=%llins - compiler %llins - idle=%llins", time_to_nsec(time_in_section[TIMED_SECTION_GFX]), time_to_nsec(time_in_section[TIMED_SECTION_AUDIO]), time_to_nsec(time_in_section[TIMED_SECTION_COMPILER]), time_to_nsec(time_in_section[TIMED_SECTION_IDLE])); time_in_section[TIMED_SECTION_GFX] = 0; time_in_section[TIMED_SECTION_AUDIO] = 0; time_in_section[TIMED_SECTION_COMPILER] = 0; time_in_section[TIMED_SECTION_IDLE] = 0; last_start[TIMED_SECTION_ALL] = curr_time; } } #endif mupen64plus-core-src-2.5/src/main/profile.h000066400000000000000000000042121251723631200206220ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - profile.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * Copyright (C) 2012 CasualJames * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef PROFILE_H #define PROFILE_H enum timed_section { TIMED_SECTION_ALL, TIMED_SECTION_GFX, TIMED_SECTION_AUDIO, TIMED_SECTION_COMPILER, TIMED_SECTION_IDLE, NUM_TIMED_SECTIONS }; #ifdef PROFILE void timed_section_start(enum timed_section section); void timed_section_end(enum timed_section section); void timed_sections_refresh(void); #else #define timed_section_start(a) #define timed_section_end(a) #define timed_sections_refresh() #endif #endif mupen64plus-core-src-2.5/src/main/rom.c000066400000000000000000000604021251723631200177550ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rom.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 Tillin9 * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include #include #include #include #define __STDC_FORMAT_MACROS #include #define M64P_CORE_PROTOTYPES 1 #include "api/callbacks.h" #include "api/config.h" #include "api/m64p_config.h" #include "api/m64p_types.h" #include "main.h" #include "md5.h" #include "memory/memory.h" #include "osal/preproc.h" #include "osd/osd.h" #include "r4300/r4300.h" #include "rom.h" #include "util.h" #define DEFAULT 16 #define CHUNKSIZE 1024*128 /* Read files 128KB at a time. */ static romdatabase_entry* ini_search_by_md5(md5_byte_t* md5); static _romdatabase g_romdatabase; /* Global loaded rom memory space. */ unsigned char* g_rom = NULL; /* Global loaded rom size. */ int g_rom_size = 0; unsigned char isGoldeneyeRom = 0; m64p_rom_header ROM_HEADER; rom_params ROM_PARAMS; m64p_rom_settings ROM_SETTINGS; static m64p_system_type rom_country_code_to_system_type(uint16_t country_code); static int rom_system_type_to_ai_dac_rate(m64p_system_type system_type); static int rom_system_type_to_vi_limit(m64p_system_type system_type); static const uint8_t Z64_SIGNATURE[4] = { 0x80, 0x37, 0x12, 0x40 }; static const uint8_t V64_SIGNATURE[4] = { 0x37, 0x80, 0x40, 0x12 }; static const uint8_t N64_SIGNATURE[4] = { 0x40, 0x12, 0x37, 0x80 }; /* Tests if a file is a valid N64 rom by checking the first 4 bytes. */ static int is_valid_rom(const unsigned char *buffer) { if (memcmp(buffer, Z64_SIGNATURE, sizeof(Z64_SIGNATURE)) == 0 || memcmp(buffer, V64_SIGNATURE, sizeof(V64_SIGNATURE)) == 0 || memcmp(buffer, N64_SIGNATURE, sizeof(N64_SIGNATURE)) == 0) return 1; else return 0; } /* Copies the source block of memory to the destination block of memory while * switching the endianness of .v64 and .n64 images to the .z64 format, which * is native to the Nintendo 64. The data extraction routines and MD5 hashing * function may only act on the .z64 big-endian format. * * IN: src: The source block of memory. This must be a valid Nintendo 64 ROM * image of 'len' bytes. * len: The length of the source and destination, in bytes. * OUT: dst: The destination block of memory. This must be a valid buffer for * at least 'len' bytes. * imagetype: A pointer to a byte that gets updated with the value of * V64IMAGE, N64IMAGE or Z64IMAGE according to the format of * the source block. The value is undefined if 'src' does not * represent a valid Nintendo 64 ROM image. */ static void swap_copy_rom(void* dst, const void* src, size_t len, unsigned char* imagetype) { if (memcmp(src, V64_SIGNATURE, sizeof(V64_SIGNATURE)) == 0) { size_t i; const uint16_t* src16 = (const uint16_t*) src; uint16_t* dst16 = (uint16_t*) dst; *imagetype = V64IMAGE; /* .v64 images have byte-swapped half-words (16-bit). */ for (i = 0; i < len; i += 2) { *dst16++ = m64p_swap16(*src16++); } } else if (memcmp(src, N64_SIGNATURE, sizeof(N64_SIGNATURE)) == 0) { size_t i; const uint32_t* src32 = (const uint32_t*) src; uint32_t* dst32 = (uint32_t*) dst; *imagetype = N64IMAGE; /* .n64 images have byte-swapped words (32-bit). */ for (i = 0; i < len; i += 4) { *dst32++ = m64p_swap32(*src32++); } } else { *imagetype = Z64IMAGE; memcpy(dst, src, len); } } m64p_error open_rom(const unsigned char* romimage, unsigned int size) { md5_state_t state; md5_byte_t digest[16]; romdatabase_entry* entry; char buffer[256]; unsigned char imagetype; int i; /* check input requirements */ if (g_rom != NULL) { DebugMessage(M64MSG_ERROR, "open_rom(): previous ROM image was not freed"); return M64ERR_INTERNAL; } if (romimage == NULL || !is_valid_rom(romimage)) { DebugMessage(M64MSG_ERROR, "open_rom(): not a valid ROM image"); return M64ERR_INPUT_INVALID; } /* Clear Byte-swapped flag, since ROM is now deleted. */ g_MemHasBeenBSwapped = 0; /* allocate new buffer for ROM and copy into this buffer */ g_rom_size = size; g_rom = (unsigned char *) malloc(size); if (g_rom == NULL) return M64ERR_NO_MEMORY; swap_copy_rom(g_rom, romimage, size, &imagetype); memcpy(&ROM_HEADER, g_rom, sizeof(m64p_rom_header)); /* Calculate MD5 hash */ md5_init(&state); md5_append(&state, (const md5_byte_t*)g_rom, g_rom_size); md5_finish(&state, digest); for ( i = 0; i < 16; ++i ) sprintf(buffer+i*2, "%02X", digest[i]); buffer[32] = '\0'; strcpy(ROM_SETTINGS.MD5, buffer); /* add some useful properties to ROM_PARAMS */ ROM_PARAMS.systemtype = rom_country_code_to_system_type(ROM_HEADER.Country_code); ROM_PARAMS.vilimit = rom_system_type_to_vi_limit(ROM_PARAMS.systemtype); ROM_PARAMS.aidacrate = rom_system_type_to_ai_dac_rate(ROM_PARAMS.systemtype); ROM_PARAMS.countperop = COUNT_PER_OP_DEFAULT; ROM_PARAMS.cheats = NULL; memcpy(ROM_PARAMS.headername, ROM_HEADER.Name, 20); ROM_PARAMS.headername[20] = '\0'; trim(ROM_PARAMS.headername); /* Remove trailing whitespace from ROM name. */ /* Look up this ROM in the .ini file and fill in goodname, etc */ if ((entry=ini_search_by_md5(digest)) != NULL || (entry=ini_search_by_crc(sl(ROM_HEADER.CRC1),sl(ROM_HEADER.CRC2))) != NULL) { strncpy(ROM_SETTINGS.goodname, entry->goodname, 255); ROM_SETTINGS.goodname[255] = '\0'; ROM_SETTINGS.savetype = entry->savetype; ROM_SETTINGS.status = entry->status; ROM_SETTINGS.players = entry->players; ROM_SETTINGS.rumble = entry->rumble; ROM_PARAMS.countperop = entry->countperop; ROM_PARAMS.cheats = entry->cheats; } else { strcpy(ROM_SETTINGS.goodname, ROM_PARAMS.headername); strcat(ROM_SETTINGS.goodname, " (unknown rom)"); ROM_SETTINGS.savetype = NONE; ROM_SETTINGS.status = 0; ROM_SETTINGS.players = 0; ROM_SETTINGS.rumble = 0; ROM_PARAMS.countperop = COUNT_PER_OP_DEFAULT; ROM_PARAMS.cheats = NULL; } /* print out a bunch of info about the ROM */ DebugMessage(M64MSG_INFO, "Goodname: %s", ROM_SETTINGS.goodname); DebugMessage(M64MSG_INFO, "Name: %s", ROM_HEADER.Name); imagestring(imagetype, buffer); DebugMessage(M64MSG_INFO, "MD5: %s", ROM_SETTINGS.MD5); DebugMessage(M64MSG_INFO, "CRC: %" PRIX32 " %" PRIX32, sl(ROM_HEADER.CRC1), sl(ROM_HEADER.CRC2)); DebugMessage(M64MSG_INFO, "Imagetype: %s", buffer); DebugMessage(M64MSG_INFO, "Rom size: %d bytes (or %d Mb or %d Megabits)", g_rom_size, g_rom_size/1024/1024, g_rom_size/1024/1024*8); DebugMessage(M64MSG_VERBOSE, "ClockRate = %" PRIX32, sl(ROM_HEADER.ClockRate)); DebugMessage(M64MSG_INFO, "Version: %" PRIX32, sl(ROM_HEADER.Release)); if(sl(ROM_HEADER.Manufacturer_ID) == 'N') DebugMessage(M64MSG_INFO, "Manufacturer: Nintendo"); else DebugMessage(M64MSG_INFO, "Manufacturer: %" PRIX32, sl(ROM_HEADER.Manufacturer_ID)); DebugMessage(M64MSG_VERBOSE, "Cartridge_ID: %" PRIX16, ROM_HEADER.Cartridge_ID); countrycodestring(ROM_HEADER.Country_code, buffer); DebugMessage(M64MSG_INFO, "Country: %s", buffer); DebugMessage(M64MSG_VERBOSE, "PC = %" PRIX32, sl(ROM_HEADER.PC)); DebugMessage(M64MSG_VERBOSE, "Save type: %d", ROM_SETTINGS.savetype); //Prepare Hack for GOLDENEYE isGoldeneyeRom = 0; if(strcmp(ROM_PARAMS.headername, "GOLDENEYE") == 0) isGoldeneyeRom = 1; return M64ERR_SUCCESS; } m64p_error close_rom(void) { if (g_rom == NULL) return M64ERR_INVALID_STATE; free(g_rom); g_rom = NULL; /* Clear Byte-swapped flag, since ROM is now deleted. */ g_MemHasBeenBSwapped = 0; DebugMessage(M64MSG_STATUS, "Rom closed."); return M64ERR_SUCCESS; } /********************************************************************************************/ /* ROM utility functions */ // Get the system type associated to a ROM country code. static m64p_system_type rom_country_code_to_system_type(uint16_t country_code) { switch (country_code & UINT16_C(0xFF)) { // PAL codes case 0x44: case 0x46: case 0x49: case 0x50: case 0x53: case 0x55: case 0x58: case 0x59: return SYSTEM_PAL; // NTSC codes case 0x37: case 0x41: case 0x45: case 0x4a: default: // Fallback for unknown codes return SYSTEM_NTSC; } } // Get the VI (vertical interrupt) limit associated to a ROM system type. static int rom_system_type_to_vi_limit(m64p_system_type system_type) { switch (system_type) { case SYSTEM_PAL: case SYSTEM_MPAL: return 50; case SYSTEM_NTSC: default: return 60; } } static int rom_system_type_to_ai_dac_rate(m64p_system_type system_type) { switch (system_type) { case SYSTEM_PAL: return 49656530; case SYSTEM_MPAL: return 48628316; case SYSTEM_NTSC: default: return 48681812; } } static size_t romdatabase_resolve_round(void) { romdatabase_search *entry; romdatabase_entry *ref; size_t skipped = 0; /* Resolve RefMD5 references */ for (entry = g_romdatabase.list; entry; entry = entry->next_entry) { if (!entry->entry.refmd5) continue; ref = ini_search_by_md5(entry->entry.refmd5); if (!ref) { DebugMessage(M64MSG_WARNING, "ROM Database: Error solving RefMD5s"); continue; } /* entry is not yet resolved, skip for now */ if (ref->refmd5) { skipped++; continue; } if (!isset_bitmask(entry->entry.set_flags, ROMDATABASE_ENTRY_GOODNAME) && isset_bitmask(ref->set_flags, ROMDATABASE_ENTRY_GOODNAME)) { entry->entry.goodname = strdup(ref->goodname); if (entry->entry.goodname) entry->entry.set_flags |= ROMDATABASE_ENTRY_GOODNAME; } if (!isset_bitmask(entry->entry.set_flags, ROMDATABASE_ENTRY_CRC) && isset_bitmask(ref->set_flags, ROMDATABASE_ENTRY_CRC)) { entry->entry.crc1 = ref->crc1; entry->entry.crc2 = ref->crc2; entry->entry.set_flags |= ROMDATABASE_ENTRY_CRC; } if (!isset_bitmask(entry->entry.set_flags, ROMDATABASE_ENTRY_STATUS) && isset_bitmask(ref->set_flags, ROMDATABASE_ENTRY_STATUS)) { entry->entry.status = ref->status; entry->entry.set_flags |= ROMDATABASE_ENTRY_STATUS; } if (!isset_bitmask(entry->entry.set_flags, ROMDATABASE_ENTRY_SAVETYPE) && isset_bitmask(ref->set_flags, ROMDATABASE_ENTRY_SAVETYPE)) { entry->entry.savetype = ref->savetype; entry->entry.set_flags |= ROMDATABASE_ENTRY_SAVETYPE; } if (!isset_bitmask(entry->entry.set_flags, ROMDATABASE_ENTRY_PLAYERS) && isset_bitmask(ref->set_flags, ROMDATABASE_ENTRY_PLAYERS)) { entry->entry.players = ref->players; entry->entry.set_flags |= ROMDATABASE_ENTRY_PLAYERS; } if (!isset_bitmask(entry->entry.set_flags, ROMDATABASE_ENTRY_RUMBLE) && isset_bitmask(ref->set_flags, ROMDATABASE_ENTRY_RUMBLE)) { entry->entry.rumble = ref->rumble; entry->entry.set_flags |= ROMDATABASE_ENTRY_RUMBLE; } if (!isset_bitmask(entry->entry.set_flags, ROMDATABASE_ENTRY_COUNTEROP) && isset_bitmask(ref->set_flags, ROMDATABASE_ENTRY_COUNTEROP)) { entry->entry.countperop = ref->countperop; entry->entry.set_flags |= ROMDATABASE_ENTRY_COUNTEROP; } if (!isset_bitmask(entry->entry.set_flags, ROMDATABASE_ENTRY_CHEATS) && isset_bitmask(ref->set_flags, ROMDATABASE_ENTRY_CHEATS)) { if (ref->cheats) entry->entry.cheats = strdup(ref->cheats); entry->entry.set_flags |= ROMDATABASE_ENTRY_CHEATS; } free(entry->entry.refmd5); entry->entry.refmd5 = NULL; } return skipped; } static void romdatabase_resolve(void) { size_t last_skipped = (size_t)~0ULL; size_t skipped; do { skipped = romdatabase_resolve_round(); if (skipped == last_skipped) { DebugMessage(M64MSG_ERROR, "Unable to resolve rom database entries (loop)"); break; } last_skipped = skipped; } while (skipped > 0); } /********************************************************************************************/ /* INI Rom database functions */ void romdatabase_open(void) { FILE *fPtr; char buffer[256]; romdatabase_search* search = NULL; romdatabase_search** next_search; int counter, value, lineno; unsigned char index; const char *pathname = ConfigGetSharedDataFilepath("mupen64plus.ini"); if(g_romdatabase.have_database) return; /* Open romdatabase. */ if (pathname == NULL || (fPtr = fopen(pathname, "rb")) == NULL) { DebugMessage(M64MSG_ERROR, "Unable to open rom database file '%s'.", pathname); return; } g_romdatabase.have_database = 1; /* Clear premade indices. */ for(counter = 0; counter < 255; ++counter) g_romdatabase.crc_lists[counter] = NULL; for(counter = 0; counter < 255; ++counter) g_romdatabase.md5_lists[counter] = NULL; g_romdatabase.list = NULL; next_search = &g_romdatabase.list; /* Parse ROM database file */ for (lineno = 1; fgets(buffer, 255, fPtr) != NULL; lineno++) { char *line = buffer; ini_line l = ini_parse_line(&line); switch (l.type) { case INI_SECTION: { md5_byte_t md5[16]; if (!parse_hex(l.name, md5, 16)) { DebugMessage(M64MSG_WARNING, "ROM Database: Invalid MD5 on line %i", lineno); search = NULL; continue; } *next_search = (romdatabase_search*)malloc(sizeof(romdatabase_search)); search = *next_search; next_search = &search->next_entry; search->entry.goodname = NULL; memcpy(search->entry.md5, md5, 16); search->entry.refmd5 = NULL; search->entry.crc1 = 0; search->entry.crc2 = 0; search->entry.status = 0; /* Set default to 0 stars. */ search->entry.savetype = DEFAULT; search->entry.players = DEFAULT; search->entry.rumble = DEFAULT; search->entry.countperop = COUNT_PER_OP_DEFAULT; search->entry.cheats = NULL; search->entry.set_flags = ROMDATABASE_ENTRY_NONE; search->next_entry = NULL; search->next_crc = NULL; /* Index MD5s by first 8 bits. */ index = search->entry.md5[0]; search->next_md5 = g_romdatabase.md5_lists[index]; g_romdatabase.md5_lists[index] = search; break; } case INI_PROPERTY: // This happens if there's stray properties before any section, // or if some error happened on INI_SECTION (e.g. parsing). if (search == NULL) { DebugMessage(M64MSG_WARNING, "ROM Database: Ignoring property on line %i", lineno); continue; } if(!strcmp(l.name, "GoodName")) { search->entry.goodname = strdup(l.value); search->entry.set_flags |= ROMDATABASE_ENTRY_GOODNAME; } else if(!strcmp(l.name, "CRC")) { char garbage_sweeper; if (sscanf(l.value, "%X %X%c", &search->entry.crc1, &search->entry.crc2, &garbage_sweeper) == 2) { /* Index CRCs by first 8 bits. */ index = search->entry.crc1 >> 24; search->next_crc = g_romdatabase.crc_lists[index]; g_romdatabase.crc_lists[index] = search; search->entry.set_flags |= ROMDATABASE_ENTRY_CRC; } else { search->entry.crc1 = search->entry.crc2 = 0; DebugMessage(M64MSG_WARNING, "ROM Database: Invalid CRC on line %i", lineno); } } else if(!strcmp(l.name, "RefMD5")) { md5_byte_t md5[16]; if (parse_hex(l.value, md5, 16)) { search->entry.refmd5 = (md5_byte_t*)malloc(16*sizeof(md5_byte_t)); memcpy(search->entry.refmd5, md5, 16); } else DebugMessage(M64MSG_WARNING, "ROM Database: Invalid RefMD5 on line %i", lineno); } else if(!strcmp(l.name, "SaveType")) { if(!strcmp(l.value, "Eeprom 4KB")) { search->entry.savetype = EEPROM_4KB; search->entry.set_flags |= ROMDATABASE_ENTRY_SAVETYPE; } else if(!strcmp(l.value, "Eeprom 16KB")) { search->entry.savetype = EEPROM_16KB; search->entry.set_flags |= ROMDATABASE_ENTRY_SAVETYPE; } else if(!strcmp(l.value, "SRAM")) { search->entry.savetype = SRAM; search->entry.set_flags |= ROMDATABASE_ENTRY_SAVETYPE; } else if(!strcmp(l.value, "Flash RAM")) { search->entry.savetype = FLASH_RAM; search->entry.set_flags |= ROMDATABASE_ENTRY_SAVETYPE; } else if(!strcmp(l.value, "Controller Pack")) { search->entry.savetype = CONTROLLER_PACK; search->entry.set_flags |= ROMDATABASE_ENTRY_SAVETYPE; } else if(!strcmp(l.value, "None")) { search->entry.savetype = NONE; search->entry.set_flags |= ROMDATABASE_ENTRY_SAVETYPE; } else { DebugMessage(M64MSG_WARNING, "ROM Database: Invalid save type on line %i", lineno); } } else if(!strcmp(l.name, "Status")) { if (string_to_int(l.value, &value) && value >= 0 && value < 6) { search->entry.status = value; search->entry.set_flags |= ROMDATABASE_ENTRY_STATUS; } else { DebugMessage(M64MSG_WARNING, "ROM Database: Invalid status on line %i", lineno); } } else if(!strcmp(l.name, "Players")) { if (string_to_int(l.value, &value) && value >= 0 && value < 8) { search->entry.players = value; search->entry.set_flags |= ROMDATABASE_ENTRY_PLAYERS; } else { DebugMessage(M64MSG_WARNING, "ROM Database: Invalid player count on line %i", lineno); } } else if(!strcmp(l.name, "Rumble")) { if(!strcmp(l.value, "Yes")) { search->entry.rumble = 1; search->entry.set_flags |= ROMDATABASE_ENTRY_RUMBLE; } else if(!strcmp(l.value, "No")) { search->entry.rumble = 0; search->entry.set_flags |= ROMDATABASE_ENTRY_RUMBLE; } else { DebugMessage(M64MSG_WARNING, "ROM Database: Invalid rumble string on line %i", lineno); } } else if(!strcmp(l.name, "CountPerOp")) { if (string_to_int(l.value, &value) && value > 0 && value <= 4) { search->entry.countperop = value; search->entry.set_flags |= ROMDATABASE_ENTRY_COUNTEROP; } else { DebugMessage(M64MSG_WARNING, "ROM Database: Invalid CountPerOp on line %i", lineno); } } else if(!strncmp(l.name, "Cheat", 5)) { size_t len1 = 0, len2 = 0; char *newcheat; if (search->entry.cheats) len1 = strlen(search->entry.cheats); if (l.value) len2 = strlen(l.value); /* initial cheat */ if (len1 == 0 && len2 > 0) search->entry.cheats = strdup(l.value); /* append cheat */ if (len1 != 0 && len2 > 0) { newcheat = malloc(len1 + 1 + len2 + 1); if (!newcheat) { DebugMessage(M64MSG_WARNING, "ROM Database: Failed to append cheat"); } else { strcpy(newcheat, search->entry.cheats); strcat(newcheat, ";"); strcat(newcheat, l.value); free(search->entry.cheats); search->entry.cheats = newcheat; } } search->entry.set_flags |= ROMDATABASE_ENTRY_CHEATS; } else { DebugMessage(M64MSG_WARNING, "ROM Database: Unknown property on line %i", lineno); } break; default: break; } } fclose(fPtr); romdatabase_resolve(); } void romdatabase_close(void) { if (!g_romdatabase.have_database) return; while (g_romdatabase.list != NULL) { romdatabase_search* search = g_romdatabase.list->next_entry; if(g_romdatabase.list->entry.goodname) free(g_romdatabase.list->entry.goodname); if(g_romdatabase.list->entry.refmd5) free(g_romdatabase.list->entry.refmd5); free(g_romdatabase.list->entry.cheats); free(g_romdatabase.list); g_romdatabase.list = search; } } static romdatabase_entry* ini_search_by_md5(md5_byte_t* md5) { romdatabase_search* search; if(!g_romdatabase.have_database) return NULL; search = g_romdatabase.md5_lists[md5[0]]; while (search != NULL && memcmp(search->entry.md5, md5, 16) != 0) search = search->next_md5; if(search==NULL) return NULL; return &(search->entry); } romdatabase_entry* ini_search_by_crc(unsigned int crc1, unsigned int crc2) { romdatabase_search* search; if(!g_romdatabase.have_database) return NULL; search = g_romdatabase.crc_lists[((crc1 >> 24) & 0xff)]; while (search != NULL && search->entry.crc1 != crc1 && search->entry.crc2 != crc2) search = search->next_crc; if(search == NULL) return NULL; return &(search->entry); } mupen64plus-core-src-2.5/src/main/rom.h000066400000000000000000000124301251723631200177600ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rom.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 Tillin9 * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __ROM_H__ #define __ROM_H__ #include #include "api/m64p_types.h" #include "md5.h" #define BIT(bitnr) (1ULL << (bitnr)) #ifdef __GNUC__ #define isset_bitmask(x, bitmask) ({ typeof(bitmask) _bitmask = (bitmask); \ (_bitmask & (x)) == _bitmask; }) #else #define isset_bitmask(x, bitmask) ((bitmask & (x)) == bitmask) #endif /* ROM Loading and Saving functions */ m64p_error open_rom(const unsigned char* romimage, unsigned int size); m64p_error close_rom(void); extern unsigned char* g_rom; extern int g_rom_size; extern unsigned char isGoldeneyeRom; typedef struct _rom_params { char *cheats; m64p_system_type systemtype; int vilimit; int aidacrate; char headername[21]; /* ROM Name as in the header, removing trailing whitespace */ unsigned char countperop; } rom_params; extern m64p_rom_header ROM_HEADER; extern rom_params ROM_PARAMS; extern m64p_rom_settings ROM_SETTINGS; /* Supported rom compressiontypes. */ enum { UNCOMPRESSED, ZIP_COMPRESSION, GZIP_COMPRESSION, BZIP2_COMPRESSION, LZMA_COMPRESSION, SZIP_COMPRESSION }; /* Supported rom image types. */ enum { Z64IMAGE, V64IMAGE, N64IMAGE }; /* Supported CIC chips. */ enum { CIC_NUS_6101, CIC_NUS_6102, CIC_NUS_6103, CIC_NUS_6105, CIC_NUS_6106 }; /* Supported save types. */ enum { EEPROM_4KB, EEPROM_16KB, SRAM, FLASH_RAM, CONTROLLER_PACK, NONE }; /* Rom INI database structures and functions */ /* The romdatabase contains the items mupen64plus indexes for each rom. These * include the goodname (from the GoodN64 project), the current status of the rom * in mupen, the N64 savetype used in the original cartridge (often necessary for * booting the rom in mupen), the number of players (including netplay options), * and whether the rom can make use of the N64's rumble feature. Md5, crc1, and * crc2 used for rom lookup. Md5s are unique hashes of the ENTIRE rom. Crcs are not * unique and read from the rom header, meaning corrupt crcs are also a problem. * Crcs were widely used (mainly in the cheat system). Refmd5s allows for a smaller * database file and need not be used outside database loading. */ typedef struct { char* goodname; md5_byte_t md5[16]; md5_byte_t* refmd5; char *cheats; unsigned int crc1; unsigned int crc2; unsigned char status; /* Rom status on a scale from 0-5. */ unsigned char savetype; unsigned char players; /* Local players 0-4, 2/3/4 way Netplay indicated by 5/6/7. */ unsigned char rumble; /* 0 - No, 1 - Yes boolean for rumble support. */ unsigned char countperop; uint32_t set_flags; } romdatabase_entry; enum romdatabase_entry_set_flags { ROMDATABASE_ENTRY_NONE = 0, ROMDATABASE_ENTRY_GOODNAME = BIT(0), ROMDATABASE_ENTRY_CRC = BIT(1), ROMDATABASE_ENTRY_STATUS = BIT(2), ROMDATABASE_ENTRY_SAVETYPE = BIT(3), ROMDATABASE_ENTRY_PLAYERS = BIT(4), ROMDATABASE_ENTRY_RUMBLE = BIT(5), ROMDATABASE_ENTRY_COUNTEROP = BIT(6), ROMDATABASE_ENTRY_CHEATS = BIT(7) }; typedef struct _romdatabase_search { romdatabase_entry entry; struct _romdatabase_search* next_entry; struct _romdatabase_search* next_crc; struct _romdatabase_search* next_md5; } romdatabase_search; typedef struct { int have_database; romdatabase_search* crc_lists[256]; romdatabase_search* md5_lists[256]; romdatabase_search* list; } _romdatabase; void romdatabase_open(void); void romdatabase_close(void); /* Should be used by current cheat system (isn't), when cheat system is * migrated to md5s, will be fully depreciated. */ romdatabase_entry* ini_search_by_crc(unsigned int crc1, unsigned int crc2); #endif /* __ROM_H__ */ mupen64plus-core-src-2.5/src/main/savestates.c000066400000000000000000001613551251723631200213530ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - savestates.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2012 CasualJames * * Copyright (C) 2009 Olejl Tillin9 * * Copyright (C) 2008 Richard42 Tillin9 * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include #include #include #include #include #include #include #define M64P_CORE_PROTOTYPES 1 #include "ai/ai_controller.h" #include "api/callbacks.h" #include "api/config.h" #include "api/m64p_config.h" #include "api/m64p_types.h" #include "main.h" #include "main/list.h" #include "memory/memory.h" #include "osal/preproc.h" #include "osd/osd.h" #include "pi/pi_controller.h" #include "plugin/plugin.h" #include "r4300/r4300_core.h" #include "rdp/rdp_core.h" #include "ri/ri_controller.h" #include "rom.h" #include "rsp/rsp_core.h" #include "savestates.h" #include "si/si_controller.h" #include "util.h" #include "vi/vi_controller.h" #include "workqueue.h" #ifdef LIBMINIZIP #include #include #else #include "main/zip/unzip.h" #include "main/zip/zip.h" #endif static const char* savestate_magic = "M64+SAVE"; static const int savestate_latest_version = 0x00010000; /* 1.0 */ static const unsigned char pj64_magic[4] = { 0xC8, 0xA6, 0xD8, 0x23 }; static savestates_job job = savestates_job_nothing; static savestates_type type = savestates_type_unknown; static char *fname = NULL; static unsigned int slot = 0; static int autoinc_save_slot = 0; static SDL_mutex *savestates_lock; struct savestate_work { char *filepath; char *data; size_t size; struct work_struct work; }; /* Returns the malloc'd full path of the currently selected savestate. */ static char *savestates_generate_path(savestates_type type) { if(fname != NULL) /* A specific path was given. */ { return strdup(fname); } else /* Use the selected savestate slot */ { char *filename; switch (type) { case savestates_type_m64p: filename = formatstr("%s.st%d", ROM_SETTINGS.goodname, slot); break; case savestates_type_pj64_zip: filename = formatstr("%s.pj%d.zip", ROM_PARAMS.headername, slot); break; case savestates_type_pj64_unc: filename = formatstr("%s.pj%d", ROM_PARAMS.headername, slot); break; default: filename = NULL; break; } if (filename != NULL) { char *filepath = formatstr("%s%s", get_savestatepath(), filename); free(filename); return filepath; } else return NULL; } } void savestates_select_slot(unsigned int s) { if(s>9||s==slot) return; slot = s; ConfigSetParameter(g_CoreConfig, "CurrentStateSlot", M64TYPE_INT, &s); StateChanged(M64CORE_SAVESTATE_SLOT, slot); main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Selected state slot: %d", slot); } /* Returns the currently selected save slot. */ unsigned int savestates_get_slot(void) { return slot; } /* Sets save state slot autoincrement on or off. */ void savestates_set_autoinc_slot(int b) { autoinc_save_slot = b; } void savestates_inc_slot(void) { if(++slot>9) slot = 0; StateChanged(M64CORE_SAVESTATE_SLOT, slot); } savestates_job savestates_get_job(void) { return job; } void savestates_set_job(savestates_job j, savestates_type t, const char *fn) { if (fname != NULL) { free(fname); fname = NULL; } job = j; type = t; if (fn != NULL) fname = strdup(fn); } static void savestates_clear_job(void) { savestates_set_job(savestates_job_nothing, savestates_type_unknown, NULL); } #define GETARRAY(buff, type, count) \ (to_little_endian_buffer(buff, sizeof(type),count), \ buff += count*sizeof(type), \ (type *)(buff-count*sizeof(type))) #define COPYARRAY(dst, buff, type, count) \ memcpy(dst, GETARRAY(buff, type, count), sizeof(type)*count) #define GETDATA(buff, type) *GETARRAY(buff, type, 1) #define PUTARRAY(src, buff, type, count) \ memcpy(buff, src, sizeof(type)*count); \ to_little_endian_buffer(buff, sizeof(type), count); \ buff += count*sizeof(type); #define PUTDATA(buff, type, value) \ do { type x = value; PUTARRAY(&x, buff, type, 1); } while(0) static int savestates_load_m64p(char *filepath) { unsigned char header[44]; gzFile f; int version; int i; uint32_t FCR31; size_t savestateSize; unsigned char *savestateData, *curr; char queue[1024]; uint32_t* cp0_regs = r4300_cp0_regs(); SDL_LockMutex(savestates_lock); f = gzopen(filepath, "rb"); if(f==NULL) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Could not open state file: %s", filepath); SDL_UnlockMutex(savestates_lock); return 0; } /* Read and check Mupen64Plus magic number. */ if (gzread(f, header, 44) != 44) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Could not read header from state file %s", filepath); gzclose(f); SDL_UnlockMutex(savestates_lock); return 0; } curr = header; if(strncmp((char *)curr, savestate_magic, 8)!=0) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "State file: %s is not a valid Mupen64plus savestate.", filepath); gzclose(f); SDL_UnlockMutex(savestates_lock); return 0; } curr += 8; version = *curr++; version = (version << 8) | *curr++; version = (version << 8) | *curr++; version = (version << 8) | *curr++; if(version != 0x00010000) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "State version (%08x) isn't compatible. Please update Mupen64Plus.", version); gzclose(f); SDL_UnlockMutex(savestates_lock); return 0; } if(memcmp((char *)curr, ROM_SETTINGS.MD5, 32)) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "State ROM MD5 does not match current ROM."); gzclose(f); SDL_UnlockMutex(savestates_lock); return 0; } curr += 32; /* Read the rest of the savestate */ savestateSize = 16788244; savestateData = curr = (unsigned char *)malloc(savestateSize); if (savestateData == NULL) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Insufficient memory to load state."); gzclose(f); SDL_UnlockMutex(savestates_lock); return 0; } if (gzread(f, savestateData, savestateSize) != savestateSize || (gzread(f, queue, sizeof(queue)) % 4) != 0) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Could not read Mupen64Plus savestate data from %s", filepath); free(savestateData); gzclose(f); SDL_UnlockMutex(savestates_lock); return 0; } gzclose(f); SDL_UnlockMutex(savestates_lock); // Parse savestate g_ri.rdram.regs[RDRAM_CONFIG_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_DEVICE_ID_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_DELAY_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_MODE_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_REF_INTERVAL_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_REF_ROW_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_RAS_INTERVAL_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_MIN_INTERVAL_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_ADDR_SELECT_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_DEVICE_MANUF_REG] = GETDATA(curr, uint32_t); curr += 4; /* Padding from old implementation */ g_r4300.mi.regs[MI_INIT_MODE_REG] = GETDATA(curr, uint32_t); curr += 4; // Duplicate MI init mode flags from old implementation g_r4300.mi.regs[MI_VERSION_REG] = GETDATA(curr, uint32_t); g_r4300.mi.regs[MI_INTR_REG] = GETDATA(curr, uint32_t); g_r4300.mi.regs[MI_INTR_MASK_REG] = GETDATA(curr, uint32_t); curr += 4; /* Padding from old implementation */ curr += 8; // Duplicated MI intr flags and padding from old implementation g_pi.regs[PI_DRAM_ADDR_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_CART_ADDR_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_RD_LEN_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_WR_LEN_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_STATUS_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM1_LAT_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM1_PWD_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM1_PGS_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM1_RLS_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM2_LAT_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM2_PWD_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM2_PGS_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM2_RLS_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_MEM_ADDR_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_DRAM_ADDR_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_RD_LEN_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_WR_LEN_REG] = GETDATA(curr, uint32_t); curr += 4; /* Padding from old implementation */ g_sp.regs[SP_STATUS_REG] = GETDATA(curr, uint32_t); curr += 16; // Duplicated SP flags and padding from old implementation g_sp.regs[SP_DMA_FULL_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_DMA_BUSY_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_SEMAPHORE_REG] = GETDATA(curr, uint32_t); g_sp.regs2[SP_PC_REG] = GETDATA(curr, uint32_t); g_sp.regs2[SP_IBIST_REG] = GETDATA(curr, uint32_t); g_si.regs[SI_DRAM_ADDR_REG] = GETDATA(curr, uint32_t); g_si.regs[SI_PIF_ADDR_RD64B_REG] = GETDATA(curr, uint32_t); g_si.regs[SI_PIF_ADDR_WR64B_REG] = GETDATA(curr, uint32_t); g_si.regs[SI_STATUS_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_STATUS_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_ORIGIN_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_WIDTH_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_V_INTR_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_CURRENT_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_BURST_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_V_SYNC_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_H_SYNC_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_LEAP_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_H_START_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_V_START_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_V_BURST_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_X_SCALE_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_Y_SCALE_REG] = GETDATA(curr, uint32_t); g_vi.delay = GETDATA(curr, unsigned int); gfx.viStatusChanged(); gfx.viWidthChanged(); g_ri.regs[RI_MODE_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_CONFIG_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_CURRENT_LOAD_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_SELECT_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_REFRESH_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_LATENCY_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_ERROR_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_WERROR_REG] = GETDATA(curr, uint32_t); g_ai.regs[AI_DRAM_ADDR_REG] = GETDATA(curr, uint32_t); g_ai.regs[AI_LEN_REG] = GETDATA(curr, uint32_t); g_ai.regs[AI_CONTROL_REG] = GETDATA(curr, uint32_t); g_ai.regs[AI_STATUS_REG] = GETDATA(curr, uint32_t); g_ai.regs[AI_DACRATE_REG] = GETDATA(curr, uint32_t); g_ai.regs[AI_BITRATE_REG] = GETDATA(curr, uint32_t); g_ai.fifo[1].duration = GETDATA(curr, unsigned int); g_ai.fifo[1].length = GETDATA(curr, uint32_t); g_ai.fifo[0].duration = GETDATA(curr, unsigned int); g_ai.fifo[0].length = GETDATA(curr, uint32_t); /* best effort initialization of fifo addresses... * You might get a small sound "pop" because address might be wrong. * Proper initialization requires changes to savestate format */ g_ai.fifo[0].address = g_ai.regs[AI_DRAM_ADDR_REG]; g_ai.fifo[1].address = g_ai.regs[AI_DRAM_ADDR_REG]; g_ai.samples_format_changed = 1; g_dp.dpc_regs[DPC_START_REG] = GETDATA(curr, uint32_t); g_dp.dpc_regs[DPC_END_REG] = GETDATA(curr, uint32_t); g_dp.dpc_regs[DPC_CURRENT_REG] = GETDATA(curr, uint32_t); curr += 4; // Padding from old implementation g_dp.dpc_regs[DPC_STATUS_REG] = GETDATA(curr, uint32_t); curr += 12; // Duplicated DPC flags and padding from old implementation g_dp.dpc_regs[DPC_CLOCK_REG] = GETDATA(curr, uint32_t); g_dp.dpc_regs[DPC_BUFBUSY_REG] = GETDATA(curr, uint32_t); g_dp.dpc_regs[DPC_PIPEBUSY_REG] = GETDATA(curr, uint32_t); g_dp.dpc_regs[DPC_TMEM_REG] = GETDATA(curr, uint32_t); g_dp.dps_regs[DPS_TBIST_REG] = GETDATA(curr, uint32_t); g_dp.dps_regs[DPS_TEST_MODE_REG] = GETDATA(curr, uint32_t); g_dp.dps_regs[DPS_BUFTEST_ADDR_REG] = GETDATA(curr, uint32_t); g_dp.dps_regs[DPS_BUFTEST_DATA_REG] = GETDATA(curr, uint32_t); COPYARRAY(g_rdram, curr, uint32_t, RDRAM_MAX_SIZE/4); COPYARRAY(g_sp.mem, curr, uint32_t, SP_MEM_SIZE/4); COPYARRAY(g_si.pif.ram, curr, uint8_t, PIF_RAM_SIZE); g_pi.use_flashram = GETDATA(curr, int); g_pi.flashram.mode = GETDATA(curr, int); g_pi.flashram.status = GETDATA(curr, unsigned long long); g_pi.flashram.erase_offset = GETDATA(curr, unsigned int); g_pi.flashram.write_pointer = GETDATA(curr, unsigned int); COPYARRAY(tlb_LUT_r, curr, unsigned int, 0x100000); COPYARRAY(tlb_LUT_w, curr, unsigned int, 0x100000); *r4300_llbit() = GETDATA(curr, unsigned int); COPYARRAY(r4300_regs(), curr, int64_t, 32); COPYARRAY(cp0_regs, curr, uint32_t, CP0_REGS_COUNT); set_fpr_pointers(cp0_regs[CP0_STATUS_REG]); *r4300_mult_lo() = GETDATA(curr, int64_t); *r4300_mult_hi() = GETDATA(curr, int64_t); COPYARRAY(r4300_cp1_regs(), curr, int64_t, 32); if ((cp0_regs[CP0_STATUS_REG] & UINT32_C(0x04000000)) == 0) // 32-bit FPR mode requires data shuffling because 64-bit layout is always stored in savestate file shuffle_fpr_data(UINT32_C(0x04000000), 0); *r4300_cp1_fcr0() = GETDATA(curr, uint32_t); FCR31 = GETDATA(curr, uint32_t); *r4300_cp1_fcr31() = FCR31; update_x86_rounding_mode(FCR31); for (i = 0; i < 32; i++) { tlb_e[i].mask = GETDATA(curr, short); curr += 2; tlb_e[i].vpn2 = GETDATA(curr, int); tlb_e[i].g = GETDATA(curr, char); tlb_e[i].asid = GETDATA(curr, unsigned char); curr += 2; tlb_e[i].pfn_even = GETDATA(curr, int); tlb_e[i].c_even = GETDATA(curr, char); tlb_e[i].d_even = GETDATA(curr, char); tlb_e[i].v_even = GETDATA(curr, char); curr++; tlb_e[i].pfn_odd = GETDATA(curr, int); tlb_e[i].c_odd = GETDATA(curr, char); tlb_e[i].d_odd = GETDATA(curr, char); tlb_e[i].v_odd = GETDATA(curr, char); tlb_e[i].r = GETDATA(curr, char); tlb_e[i].start_even = GETDATA(curr, unsigned int); tlb_e[i].end_even = GETDATA(curr, unsigned int); tlb_e[i].phys_even = GETDATA(curr, unsigned int); tlb_e[i].start_odd = GETDATA(curr, unsigned int); tlb_e[i].end_odd = GETDATA(curr, unsigned int); tlb_e[i].phys_odd = GETDATA(curr, unsigned int); } savestates_load_set_pc(GETDATA(curr, uint32_t)); *r4300_next_interrupt() = GETDATA(curr, unsigned int); g_vi.next_vi = GETDATA(curr, unsigned int); g_vi.field = GETDATA(curr, unsigned int); // assert(savestateData+savestateSize == curr) to_little_endian_buffer(queue, 4, 256); load_eventqueue_infos(queue); *r4300_last_addr() = *r4300_pc(); free(savestateData); main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "State loaded from: %s", namefrompath(filepath)); return 1; } static int savestates_load_pj64(char *filepath, void *handle, int (*read_func)(void *, void *, size_t)) { char buffer[1024]; unsigned int vi_timer, SaveRDRAMSize; int i; uint32_t FCR31; unsigned char header[8]; unsigned char RomHeader[0x40]; size_t savestateSize; unsigned char *savestateData, *curr; uint32_t* cp0_regs = r4300_cp0_regs(); /* Read and check Project64 magic number. */ if (!read_func(handle, header, 8)) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Could not read header from Project64 savestate %s", filepath); return 0; } curr = header; if (memcmp(curr, pj64_magic, 4) != 0) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "State file: %s is not a valid Project64 savestate. Unrecognized file format.", filepath); return 0; } curr += 4; SaveRDRAMSize = GETDATA(curr, unsigned int); /* Read the rest of the savestate into memory. */ savestateSize = SaveRDRAMSize + 0x2754; savestateData = curr = (unsigned char *)malloc(savestateSize); if (savestateData == NULL) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Insufficient memory to load state."); return 0; } if (!read_func(handle, savestateData, savestateSize)) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Could not read savestate data from Project64 savestate %s", filepath); free(savestateData); return 0; } // check ROM header COPYARRAY(RomHeader, curr, unsigned int, 0x40/4); if(memcmp(RomHeader, g_rom, 0x40) != 0) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "State ROM header does not match current ROM."); free(savestateData); return 0; } // vi_timer vi_timer = GETDATA(curr, unsigned int); // Program Counter *r4300_last_addr() = GETDATA(curr, uint32_t); // GPR COPYARRAY(r4300_regs(), curr, int64_t, 32); // FPR COPYARRAY(r4300_cp1_regs(), curr, int64_t, 32); // CP0 COPYARRAY(cp0_regs, curr, uint32_t, CP0_REGS_COUNT); set_fpr_pointers(cp0_regs[CP0_STATUS_REG]); if ((cp0_regs[CP0_STATUS_REG] & UINT32_C(0x04000000)) == 0) // TODO not sure how pj64 handles this shuffle_fpr_data(UINT32_C(0x04000000), 0); // Initialze the interupts vi_timer += cp0_regs[CP0_COUNT_REG]; *r4300_next_interrupt() = (cp0_regs[CP0_COMPARE_REG] < vi_timer) ? cp0_regs[CP0_COMPARE_REG] : vi_timer; g_vi.next_vi = vi_timer; g_vi.field = 0; *((unsigned int*)&buffer[0]) = VI_INT; *((unsigned int*)&buffer[4]) = vi_timer; *((unsigned int*)&buffer[8]) = COMPARE_INT; *((unsigned int*)&buffer[12]) = cp0_regs[CP0_COMPARE_REG]; *((unsigned int*)&buffer[16]) = 0xFFFFFFFF; load_eventqueue_infos(buffer); // FPCR *r4300_cp1_fcr0() = GETDATA(curr, uint32_t); curr += 30 * 4; // FCR1...FCR30 not supported FCR31 = GETDATA(curr, uint32_t); *r4300_cp1_fcr31() = FCR31; update_x86_rounding_mode(FCR31); // hi / lo *r4300_mult_hi() = GETDATA(curr, int64_t); *r4300_mult_lo() = GETDATA(curr, int64_t); // rdram register g_ri.rdram.regs[RDRAM_CONFIG_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_DEVICE_ID_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_DELAY_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_MODE_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_REF_INTERVAL_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_REF_ROW_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_RAS_INTERVAL_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_MIN_INTERVAL_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_ADDR_SELECT_REG] = GETDATA(curr, uint32_t); g_ri.rdram.regs[RDRAM_DEVICE_MANUF_REG] = GETDATA(curr, uint32_t); // sp_register g_sp.regs[SP_MEM_ADDR_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_DRAM_ADDR_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_RD_LEN_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_WR_LEN_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_STATUS_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_DMA_FULL_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_DMA_BUSY_REG] = GETDATA(curr, uint32_t); g_sp.regs[SP_SEMAPHORE_REG] = GETDATA(curr, uint32_t); g_sp.regs2[SP_PC_REG] = GETDATA(curr, uint32_t); g_sp.regs2[SP_IBIST_REG] = GETDATA(curr, uint32_t); // dpc_register g_dp.dpc_regs[DPC_START_REG] = GETDATA(curr, uint32_t); g_dp.dpc_regs[DPC_END_REG] = GETDATA(curr, uint32_t); g_dp.dpc_regs[DPC_CURRENT_REG] = GETDATA(curr, uint32_t); g_dp.dpc_regs[DPC_STATUS_REG] = GETDATA(curr, uint32_t); g_dp.dpc_regs[DPC_CLOCK_REG] = GETDATA(curr, uint32_t); g_dp.dpc_regs[DPC_BUFBUSY_REG] = GETDATA(curr, uint32_t); g_dp.dpc_regs[DPC_PIPEBUSY_REG] = GETDATA(curr, uint32_t); g_dp.dpc_regs[DPC_TMEM_REG] = GETDATA(curr, uint32_t); (void)GETDATA(curr, unsigned int); // Dummy read (void)GETDATA(curr, unsigned int); // Dummy read // mi_register g_r4300.mi.regs[MI_INIT_MODE_REG] = GETDATA(curr, uint32_t); g_r4300.mi.regs[MI_VERSION_REG] = GETDATA(curr, uint32_t); g_r4300.mi.regs[MI_INTR_REG] = GETDATA(curr, uint32_t); g_r4300.mi.regs[MI_INTR_MASK_REG] = GETDATA(curr, uint32_t); // vi_register g_vi.regs[VI_STATUS_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_ORIGIN_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_WIDTH_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_V_INTR_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_CURRENT_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_BURST_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_V_SYNC_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_H_SYNC_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_LEAP_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_H_START_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_V_START_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_V_BURST_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_X_SCALE_REG] = GETDATA(curr, uint32_t); g_vi.regs[VI_Y_SCALE_REG] = GETDATA(curr, uint32_t); // TODO vi delay? gfx.viStatusChanged(); gfx.viWidthChanged(); // ai_register g_ai.regs[AI_DRAM_ADDR_REG] = GETDATA(curr, uint32_t); g_ai.regs[AI_LEN_REG] = GETDATA(curr, uint32_t); g_ai.regs[AI_CONTROL_REG] = GETDATA(curr, uint32_t); g_ai.regs[AI_STATUS_REG] = GETDATA(curr, uint32_t); g_ai.regs[AI_DACRATE_REG] = GETDATA(curr, uint32_t); g_ai.regs[AI_BITRATE_REG] = GETDATA(curr, uint32_t); g_ai.samples_format_changed = 1; // pi_register g_pi.regs[PI_DRAM_ADDR_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_CART_ADDR_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_RD_LEN_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_WR_LEN_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_STATUS_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM1_LAT_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM1_PWD_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM1_PGS_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM1_RLS_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM2_LAT_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM2_PWD_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM2_PGS_REG] = GETDATA(curr, uint32_t); g_pi.regs[PI_BSD_DOM2_RLS_REG] = GETDATA(curr, uint32_t); read_func(handle, g_pi.regs, PI_REGS_COUNT*sizeof(g_pi.regs[0])); // ri_register g_ri.regs[RI_MODE_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_CONFIG_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_CURRENT_LOAD_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_SELECT_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_REFRESH_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_LATENCY_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_ERROR_REG] = GETDATA(curr, uint32_t); g_ri.regs[RI_WERROR_REG] = GETDATA(curr, uint32_t); // si_register g_si.regs[SI_DRAM_ADDR_REG] = GETDATA(curr, uint32_t); g_si.regs[SI_PIF_ADDR_RD64B_REG] = GETDATA(curr, uint32_t); g_si.regs[SI_PIF_ADDR_WR64B_REG] = GETDATA(curr, uint32_t); g_si.regs[SI_STATUS_REG] = GETDATA(curr, uint32_t); // tlb memset(tlb_LUT_r, 0, 0x400000); memset(tlb_LUT_w, 0, 0x400000); for (i=0; i < 32; i++) { unsigned int MyPageMask, MyEntryHi, MyEntryLo0, MyEntryLo1; (void)GETDATA(curr, unsigned int); // Dummy read - EntryDefined MyPageMask = GETDATA(curr, unsigned int); MyEntryHi = GETDATA(curr, unsigned int); MyEntryLo0 = GETDATA(curr, unsigned int); MyEntryLo1 = GETDATA(curr, unsigned int); // This is copied from TLBWI instruction tlb_e[i].g = (MyEntryLo0 & MyEntryLo1 & 1); tlb_e[i].pfn_even = (MyEntryLo0 & 0x3FFFFFC0) >> 6; tlb_e[i].pfn_odd = (MyEntryLo1 & 0x3FFFFFC0) >> 6; tlb_e[i].c_even = (MyEntryLo0 & 0x38) >> 3; tlb_e[i].c_odd = (MyEntryLo1 & 0x38) >> 3; tlb_e[i].d_even = (MyEntryLo0 & 0x4) >> 2; tlb_e[i].d_odd = (MyEntryLo1 & 0x4) >> 2; tlb_e[i].v_even = (MyEntryLo0 & 0x2) >> 1; tlb_e[i].v_odd = (MyEntryLo1 & 0x2) >> 1; tlb_e[i].asid = (MyEntryHi & 0xFF); tlb_e[i].vpn2 = (MyEntryHi & 0xFFFFE000) >> 13; //tlb_e[i].r = (MyEntryHi & 0xC000000000000000LL) >> 62; tlb_e[i].mask = (MyPageMask & 0x1FFE000) >> 13; tlb_e[i].start_even = tlb_e[i].vpn2 << 13; tlb_e[i].end_even = tlb_e[i].start_even+ (tlb_e[i].mask << 12) + 0xFFF; tlb_e[i].phys_even = tlb_e[i].pfn_even << 12; tlb_e[i].start_odd = tlb_e[i].end_even+1; tlb_e[i].end_odd = tlb_e[i].start_odd+ (tlb_e[i].mask << 12) + 0xFFF; tlb_e[i].phys_odd = tlb_e[i].pfn_odd << 12; tlb_map(&tlb_e[i]); } // pif ram COPYARRAY(g_si.pif.ram, curr, uint8_t, PIF_RAM_SIZE); // RDRAM memset(g_rdram, 0, RDRAM_MAX_SIZE); COPYARRAY(g_rdram, curr, uint32_t, SaveRDRAMSize/4); // DMEM + IMEM COPYARRAY(g_sp.mem, curr, uint32_t, SP_MEM_SIZE/4); // The following values should not matter because we don't have any AI interrupt // g_ai.fifo[1].delay = 0; g_ai.fifo[1].length = 0; // g_ai.fifo[0].delay = 0; g_ai.fifo[0].length = 0; // The following is not available in PJ64 savestate. Keep the values as is. // g_dp.dps_regs[DPS_TBIST_REG] = 0; g_dp.dps_regs[DPS_TEST_MODE_REG] = 0; // g_dp.dps_regs[DPS_BUFTEST_ADDR_REG] = 0; g_dp.dps_regs[DPS_BUFTEST_DATA_REG] = 0; *r4300_llbit() = 0; // No flashram info in pj64 savestate. init_flashram(&g_pi.flashram); savestates_load_set_pc(*r4300_last_addr()); // assert(savestateData+savestateSize == curr) free(savestateData); return 1; } static int read_data_from_zip(void *zip, void *buffer, size_t length) { return unzReadCurrentFile((unzFile)zip, buffer, (unsigned)length) == length; } static int savestates_load_pj64_zip(char *filepath) { char szFileName[256], szExtraField[256], szComment[256]; unzFile zipstatefile = NULL; unz_file_info fileinfo; int ret = 0; /* Open the .zip file. */ zipstatefile = unzOpen(filepath); if (zipstatefile == NULL || unzGoToFirstFile(zipstatefile) != UNZ_OK || unzGetCurrentFileInfo(zipstatefile, &fileinfo, szFileName, 255, szExtraField, 255, szComment, 255) != UNZ_OK || unzOpenCurrentFile(zipstatefile) != UNZ_OK) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Zip error. Could not open state file: %s", filepath); goto clean_and_exit; } if (!savestates_load_pj64(filepath, zipstatefile, read_data_from_zip)) goto clean_and_exit; main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "State loaded from: %s", namefrompath(filepath)); ret = 1; clean_and_exit: if (zipstatefile != NULL) unzClose(zipstatefile); return ret; } static int read_data_from_file(void *file, void *buffer, size_t length) { return fread(buffer, 1, length, file) == length; } static int savestates_load_pj64_unc(char *filepath) { FILE *f; /* Open the file. */ f = fopen(filepath, "rb"); if (f == NULL) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Could not open state file: %s", filepath); return 0; } if (!savestates_load_pj64(filepath, f, read_data_from_file)) { fclose(f); return 0; } main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "State loaded from: %s", namefrompath(filepath)); fclose(f); return 1; } static savestates_type savestates_detect_type(char *filepath) { unsigned char magic[4]; FILE *f = fopen(filepath, "rb"); if (f == NULL) { DebugMessage(M64MSG_STATUS, "Could not open state file %s\n", filepath); return savestates_type_unknown; } if (fread(magic, 1, 4, f) != 4) { fclose(f); DebugMessage(M64MSG_STATUS, "Could not read from state file %s\n", filepath); return savestates_type_unknown; } fclose(f); if (magic[0] == 0x1f && magic[1] == 0x8b) // GZIP header return savestates_type_m64p; else if (memcmp(magic, "PK\x03\x04", 4) == 0) // ZIP header return savestates_type_pj64_zip; else if (memcmp(magic, pj64_magic, 4) == 0) // PJ64 header return savestates_type_pj64_unc; else { DebugMessage(M64MSG_STATUS, "Unknown state file type %s\n", filepath); return savestates_type_unknown; } } int savestates_load(void) { FILE *fPtr = NULL; char *filepath = NULL; int ret = 0; if (fname == NULL) // For slots, autodetect the savestate type { // try M64P type first type = savestates_type_m64p; filepath = savestates_generate_path(type); fPtr = fopen(filepath, "rb"); // can I open this? if (fPtr == NULL) { free(filepath); // try PJ64 zipped type second type = savestates_type_pj64_zip; filepath = savestates_generate_path(type); fPtr = fopen(filepath, "rb"); // can I open this? if (fPtr == NULL) { free(filepath); // finally, try PJ64 uncompressed type = savestates_type_pj64_unc; filepath = savestates_generate_path(type); fPtr = fopen(filepath, "rb"); // can I open this? if (fPtr == NULL) { free(filepath); filepath = NULL; main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "No Mupen64Plus/PJ64 state file found for slot %i", slot); type = savestates_type_unknown; } } } } else // filename of state file to load was set explicitly in 'fname' { // detect type if unknown if (type == savestates_type_unknown) { type = savestates_detect_type(fname); } filepath = savestates_generate_path(type); if (filepath != NULL) fPtr = fopen(filepath, "rb"); // can I open this? if (fPtr == NULL) { if (filepath != NULL) free(filepath); filepath = NULL; main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Failed to open savestate file %s", filepath); } } if (fPtr != NULL) fclose(fPtr); if (filepath != NULL) { switch (type) { case savestates_type_m64p: ret = savestates_load_m64p(filepath); break; case savestates_type_pj64_zip: ret = savestates_load_pj64_zip(filepath); break; case savestates_type_pj64_unc: ret = savestates_load_pj64_unc(filepath); break; default: ret = 0; break; } free(filepath); filepath = NULL; } // deliver callback to indicate completion of state loading operation StateChanged(M64CORE_STATE_LOADCOMPLETE, ret); savestates_clear_job(); return ret; } static void savestates_save_m64p_work(struct work_struct *work) { gzFile f; struct savestate_work *save = container_of(work, struct savestate_work, work); SDL_LockMutex(savestates_lock); // Write the state to a GZIP file f = gzopen(save->filepath, "wb"); if (f==NULL) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Could not open state file: %s", save->filepath); free(save->data); return; } if (gzwrite(f, save->data, save->size) != save->size) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Could not write data to state file: %s", save->filepath); gzclose(f); free(save->data); return; } gzclose(f); main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Saved state to: %s", namefrompath(save->filepath)); free(save->data); free(save->filepath); free(save); SDL_UnlockMutex(savestates_lock); } static int savestates_save_m64p(char *filepath) { unsigned char outbuf[4]; int i; char queue[1024]; int queuelength; struct savestate_work *save; char *curr; uint32_t* cp0_regs = r4300_cp0_regs(); save = malloc(sizeof(*save)); if (!save) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Insufficient memory to save state."); return 0; } save->filepath = strdup(filepath); if(autoinc_save_slot) savestates_inc_slot(); queuelength = save_eventqueue_infos(queue); // Allocate memory for the save state data save->size = 16788288 + queuelength; save->data = curr = malloc(save->size); if (save->data == NULL) { free(save->filepath); free(save); main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Insufficient memory to save state."); return 0; } // Write the save state data to memory PUTARRAY(savestate_magic, curr, unsigned char, 8); outbuf[0] = (savestate_latest_version >> 24) & 0xff; outbuf[1] = (savestate_latest_version >> 16) & 0xff; outbuf[2] = (savestate_latest_version >> 8) & 0xff; outbuf[3] = (savestate_latest_version >> 0) & 0xff; PUTARRAY(outbuf, curr, unsigned char, 4); PUTARRAY(ROM_SETTINGS.MD5, curr, char, 32); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_CONFIG_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_DEVICE_ID_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_DELAY_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_MODE_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_REF_INTERVAL_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_REF_ROW_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_RAS_INTERVAL_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_MIN_INTERVAL_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_ADDR_SELECT_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_DEVICE_MANUF_REG]); PUTDATA(curr, uint32_t, 0); // Padding from old implementation PUTDATA(curr, uint32_t, g_r4300.mi.regs[MI_INIT_MODE_REG]); PUTDATA(curr, uint8_t, g_r4300.mi.regs[MI_INIT_MODE_REG] & 0x7F); PUTDATA(curr, uint8_t, (g_r4300.mi.regs[MI_INIT_MODE_REG] & 0x80) != 0); PUTDATA(curr, uint8_t, (g_r4300.mi.regs[MI_INIT_MODE_REG] & 0x100) != 0); PUTDATA(curr, uint8_t, (g_r4300.mi.regs[MI_INIT_MODE_REG] & 0x200) != 0); PUTDATA(curr, uint32_t, g_r4300.mi.regs[MI_VERSION_REG]); PUTDATA(curr, uint32_t, g_r4300.mi.regs[MI_INTR_REG]); PUTDATA(curr, uint32_t, g_r4300.mi.regs[MI_INTR_MASK_REG]); PUTDATA(curr, uint32_t, 0); //Padding from old implementation PUTDATA(curr, uint8_t, (g_r4300.mi.regs[MI_INTR_MASK_REG] & 0x1) != 0); PUTDATA(curr, uint8_t, (g_r4300.mi.regs[MI_INTR_MASK_REG] & 0x2) != 0); PUTDATA(curr, uint8_t, (g_r4300.mi.regs[MI_INTR_MASK_REG] & 0x4) != 0); PUTDATA(curr, uint8_t, (g_r4300.mi.regs[MI_INTR_MASK_REG] & 0x8) != 0); PUTDATA(curr, uint8_t, (g_r4300.mi.regs[MI_INTR_MASK_REG] & 0x10) != 0); PUTDATA(curr, uint8_t, (g_r4300.mi.regs[MI_INTR_MASK_REG] & 0x20) != 0); PUTDATA(curr, uint16_t, 0); // Padding from old implementation PUTDATA(curr, uint32_t, g_pi.regs[PI_DRAM_ADDR_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_CART_ADDR_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_RD_LEN_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_WR_LEN_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_STATUS_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM1_LAT_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM1_PWD_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM1_PGS_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM1_RLS_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM2_LAT_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM2_PWD_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM2_PGS_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM2_RLS_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_MEM_ADDR_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_DRAM_ADDR_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_RD_LEN_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_WR_LEN_REG]); PUTDATA(curr, uint32_t, 0); /* Padding from old implementation */ PUTDATA(curr, uint32_t, g_sp.regs[SP_STATUS_REG]); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x1) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x2) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x4) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x8) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x10) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x20) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x40) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x80) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x100) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x200) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x400) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x800) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x1000) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x2000) != 0); PUTDATA(curr, uint8_t, (g_sp.regs[SP_STATUS_REG] & 0x4000) != 0); PUTDATA(curr, uint8_t, 0); PUTDATA(curr, uint32_t, g_sp.regs[SP_DMA_FULL_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_DMA_BUSY_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_SEMAPHORE_REG]); PUTDATA(curr, uint32_t, g_sp.regs2[SP_PC_REG]); PUTDATA(curr, uint32_t, g_sp.regs2[SP_IBIST_REG]); PUTDATA(curr, uint32_t, g_si.regs[SI_DRAM_ADDR_REG]); PUTDATA(curr, uint32_t, g_si.regs[SI_PIF_ADDR_RD64B_REG]); PUTDATA(curr, uint32_t, g_si.regs[SI_PIF_ADDR_WR64B_REG]); PUTDATA(curr, uint32_t, g_si.regs[SI_STATUS_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_STATUS_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_ORIGIN_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_WIDTH_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_V_INTR_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_CURRENT_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_BURST_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_V_SYNC_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_H_SYNC_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_LEAP_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_H_START_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_V_START_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_V_BURST_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_X_SCALE_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_Y_SCALE_REG]); PUTDATA(curr, unsigned int, g_vi.delay); PUTDATA(curr, uint32_t, g_ri.regs[RI_MODE_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_CONFIG_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_CURRENT_LOAD_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_SELECT_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_REFRESH_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_LATENCY_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_ERROR_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_WERROR_REG]); PUTDATA(curr, uint32_t, g_ai.regs[AI_DRAM_ADDR_REG]); PUTDATA(curr, uint32_t, g_ai.regs[AI_LEN_REG]); PUTDATA(curr, uint32_t, g_ai.regs[AI_CONTROL_REG]); PUTDATA(curr, uint32_t, g_ai.regs[AI_STATUS_REG]); PUTDATA(curr, uint32_t, g_ai.regs[AI_DACRATE_REG]); PUTDATA(curr, uint32_t, g_ai.regs[AI_BITRATE_REG]); PUTDATA(curr, unsigned int, g_ai.fifo[1].duration); PUTDATA(curr, uint32_t , g_ai.fifo[1].length); PUTDATA(curr, unsigned int, g_ai.fifo[0].duration); PUTDATA(curr, uint32_t , g_ai.fifo[0].length); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_START_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_END_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_CURRENT_REG]); PUTDATA(curr, uint32_t, 0); /* Padding from old implementation */ PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_STATUS_REG]); PUTDATA(curr, uint8_t, (g_dp.dpc_regs[DPC_STATUS_REG] & 0x1) != 0); PUTDATA(curr, uint8_t, (g_dp.dpc_regs[DPC_STATUS_REG] & 0x2) != 0); PUTDATA(curr, uint8_t, (g_dp.dpc_regs[DPC_STATUS_REG] & 0x4) != 0); PUTDATA(curr, uint8_t, (g_dp.dpc_regs[DPC_STATUS_REG] & 0x8) != 0); PUTDATA(curr, uint8_t, (g_dp.dpc_regs[DPC_STATUS_REG] & 0x10) != 0); PUTDATA(curr, uint8_t, (g_dp.dpc_regs[DPC_STATUS_REG] & 0x20) != 0); PUTDATA(curr, uint8_t, (g_dp.dpc_regs[DPC_STATUS_REG] & 0x40) != 0); PUTDATA(curr, uint8_t, (g_dp.dpc_regs[DPC_STATUS_REG] & 0x80) != 0); PUTDATA(curr, uint8_t, (g_dp.dpc_regs[DPC_STATUS_REG] & 0x100) != 0); PUTDATA(curr, uint8_t, (g_dp.dpc_regs[DPC_STATUS_REG] & 0x200) != 0); PUTDATA(curr, uint8_t, (g_dp.dpc_regs[DPC_STATUS_REG] & 0x400) != 0); PUTDATA(curr, uint8_t, 0); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_CLOCK_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_BUFBUSY_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_PIPEBUSY_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_TMEM_REG]); PUTDATA(curr, uint32_t, g_dp.dps_regs[DPS_TBIST_REG]); PUTDATA(curr, uint32_t, g_dp.dps_regs[DPS_TEST_MODE_REG]); PUTDATA(curr, uint32_t, g_dp.dps_regs[DPS_BUFTEST_ADDR_REG]); PUTDATA(curr, uint32_t, g_dp.dps_regs[DPS_BUFTEST_DATA_REG]); PUTARRAY(g_rdram, curr, uint32_t, RDRAM_MAX_SIZE/4); PUTARRAY(g_sp.mem, curr, uint32_t, SP_MEM_SIZE/4); PUTARRAY(g_si.pif.ram, curr, uint8_t, PIF_RAM_SIZE); PUTDATA(curr, int, g_pi.use_flashram); PUTDATA(curr, int, g_pi.flashram.mode); PUTDATA(curr, unsigned long long, g_pi.flashram.status); PUTDATA(curr, unsigned int, g_pi.flashram.erase_offset); PUTDATA(curr, unsigned int, g_pi.flashram.write_pointer); PUTARRAY(tlb_LUT_r, curr, unsigned int, 0x100000); PUTARRAY(tlb_LUT_w, curr, unsigned int, 0x100000); PUTDATA(curr, unsigned int, *r4300_llbit()); PUTARRAY(r4300_regs(), curr, int64_t, 32); PUTARRAY(cp0_regs, curr, uint32_t, CP0_REGS_COUNT); PUTDATA(curr, int64_t, *r4300_mult_lo()); PUTDATA(curr, int64_t, *r4300_mult_hi()); if ((cp0_regs[CP0_STATUS_REG] & UINT32_C(0x04000000)) == 0) // FR bit == 0 means 32-bit (MIPS I) FGR mode shuffle_fpr_data(0, UINT32_C(0x04000000)); // shuffle data into 64-bit register format for storage PUTARRAY(r4300_cp1_regs(), curr, int64_t, 32); if ((cp0_regs[CP0_STATUS_REG] & UINT32_C(0x04000000)) == 0) shuffle_fpr_data(UINT32_C(0x04000000), 0); // put it back in 32-bit mode PUTDATA(curr, uint32_t, *r4300_cp1_fcr0()); PUTDATA(curr, uint32_t, *r4300_cp1_fcr31()); for (i = 0; i < 32; i++) { PUTDATA(curr, short, tlb_e[i].mask); PUTDATA(curr, short, 0); PUTDATA(curr, int, tlb_e[i].vpn2); PUTDATA(curr, char, tlb_e[i].g); PUTDATA(curr, unsigned char, tlb_e[i].asid); PUTDATA(curr, short, 0); PUTDATA(curr, int, tlb_e[i].pfn_even); PUTDATA(curr, char, tlb_e[i].c_even); PUTDATA(curr, char, tlb_e[i].d_even); PUTDATA(curr, char, tlb_e[i].v_even); PUTDATA(curr, char, 0); PUTDATA(curr, int, tlb_e[i].pfn_odd); PUTDATA(curr, char, tlb_e[i].c_odd); PUTDATA(curr, char, tlb_e[i].d_odd); PUTDATA(curr, char, tlb_e[i].v_odd); PUTDATA(curr, char, tlb_e[i].r); PUTDATA(curr, unsigned int, tlb_e[i].start_even); PUTDATA(curr, unsigned int, tlb_e[i].end_even); PUTDATA(curr, unsigned int, tlb_e[i].phys_even); PUTDATA(curr, unsigned int, tlb_e[i].start_odd); PUTDATA(curr, unsigned int, tlb_e[i].end_odd); PUTDATA(curr, unsigned int, tlb_e[i].phys_odd); } PUTDATA(curr, uint32_t, *r4300_pc()); PUTDATA(curr, unsigned int, *r4300_next_interrupt()); PUTDATA(curr, unsigned int, g_vi.next_vi); PUTDATA(curr, unsigned int, g_vi.field); to_little_endian_buffer(queue, 4, queuelength/4); PUTARRAY(queue, curr, char, queuelength); // assert(curr == save->data + save->size) init_work(&save->work, savestates_save_m64p_work); queue_work(&save->work); return 1; } static int savestates_save_pj64(char *filepath, void *handle, int (*write_func)(void *, const void *, size_t)) { unsigned int i; unsigned int SaveRDRAMSize = RDRAM_MAX_SIZE; size_t savestateSize; unsigned char *savestateData, *curr; uint32_t* cp0_regs = r4300_cp0_regs(); // Allocate memory for the save state data savestateSize = 8 + SaveRDRAMSize + 0x2754; savestateData = curr = (unsigned char *)malloc(savestateSize); if (savestateData == NULL) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Insufficient memory to save state."); return 0; } // Write the save state data in memory PUTARRAY(pj64_magic, curr, unsigned char, 4); PUTDATA(curr, unsigned int, SaveRDRAMSize); PUTARRAY(g_rom, curr, unsigned int, 0x40/4); PUTDATA(curr, uint32_t, get_event(VI_INT) - cp0_regs[CP0_COUNT_REG]); // vi_timer PUTDATA(curr, uint32_t, *r4300_pc()); PUTARRAY(r4300_regs(), curr, int64_t, 32); if ((cp0_regs[CP0_STATUS_REG] & UINT32_C(0x04000000)) == 0) // TODO not sure how pj64 handles this shuffle_fpr_data(UINT32_C(0x04000000), 0); PUTARRAY(r4300_cp1_regs(), curr, int64_t, 32); if ((cp0_regs[CP0_STATUS_REG] & UINT32_C(0x04000000)) == 0) // TODO not sure how pj64 handles this shuffle_fpr_data(UINT32_C(0x04000000), 0); PUTARRAY(cp0_regs, curr, uint32_t, CP0_REGS_COUNT); PUTDATA(curr, uint32_t, *r4300_cp1_fcr0()); for (i = 0; i < 30; i++) PUTDATA(curr, int, 0); // FCR1-30 not implemented PUTDATA(curr, uint32_t, *r4300_cp1_fcr31()); PUTDATA(curr, int64_t, *r4300_mult_hi()); PUTDATA(curr, int64_t, *r4300_mult_lo()); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_CONFIG_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_DEVICE_ID_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_DELAY_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_MODE_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_REF_INTERVAL_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_REF_ROW_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_RAS_INTERVAL_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_MIN_INTERVAL_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_ADDR_SELECT_REG]); PUTDATA(curr, uint32_t, g_ri.rdram.regs[RDRAM_DEVICE_MANUF_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_MEM_ADDR_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_DRAM_ADDR_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_RD_LEN_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_WR_LEN_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_STATUS_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_DMA_FULL_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_DMA_BUSY_REG]); PUTDATA(curr, uint32_t, g_sp.regs[SP_SEMAPHORE_REG]); PUTDATA(curr, uint32_t, g_sp.regs2[SP_PC_REG]); PUTDATA(curr, uint32_t, g_sp.regs2[SP_IBIST_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_START_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_END_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_CURRENT_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_STATUS_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_CLOCK_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_BUFBUSY_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_PIPEBUSY_REG]); PUTDATA(curr, uint32_t, g_dp.dpc_regs[DPC_TMEM_REG]); PUTDATA(curr, unsigned int, 0); // ? PUTDATA(curr, unsigned int, 0); // ? PUTDATA(curr, uint32_t, g_r4300.mi.regs[MI_INIT_MODE_REG]); //TODO Secial handling in pj64 PUTDATA(curr, uint32_t, g_r4300.mi.regs[MI_VERSION_REG]); PUTDATA(curr, uint32_t, g_r4300.mi.regs[MI_INTR_REG]); PUTDATA(curr, uint32_t, g_r4300.mi.regs[MI_INTR_MASK_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_STATUS_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_ORIGIN_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_WIDTH_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_V_INTR_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_CURRENT_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_BURST_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_V_SYNC_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_H_SYNC_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_LEAP_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_H_START_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_V_START_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_V_BURST_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_X_SCALE_REG]); PUTDATA(curr, uint32_t, g_vi.regs[VI_Y_SCALE_REG]); PUTDATA(curr, uint32_t, g_ai.regs[AI_DRAM_ADDR_REG]); PUTDATA(curr, uint32_t, g_ai.regs[AI_LEN_REG]); PUTDATA(curr, uint32_t, g_ai.regs[AI_CONTROL_REG]); PUTDATA(curr, uint32_t, g_ai.regs[AI_STATUS_REG]); PUTDATA(curr, uint32_t, g_ai.regs[AI_DACRATE_REG]); PUTDATA(curr, uint32_t, g_ai.regs[AI_BITRATE_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_DRAM_ADDR_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_CART_ADDR_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_RD_LEN_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_WR_LEN_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_STATUS_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM1_LAT_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM1_PWD_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM1_PGS_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM1_RLS_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM2_LAT_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM2_PWD_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM2_PGS_REG]); PUTDATA(curr, uint32_t, g_pi.regs[PI_BSD_DOM2_RLS_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_MODE_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_CONFIG_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_CURRENT_LOAD_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_SELECT_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_REFRESH_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_LATENCY_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_ERROR_REG]); PUTDATA(curr, uint32_t, g_ri.regs[RI_WERROR_REG]); PUTDATA(curr, uint32_t, g_si.regs[SI_DRAM_ADDR_REG]); PUTDATA(curr, uint32_t, g_si.regs[SI_PIF_ADDR_RD64B_REG]); PUTDATA(curr, uint32_t, g_si.regs[SI_PIF_ADDR_WR64B_REG]); PUTDATA(curr, uint32_t, g_si.regs[SI_STATUS_REG]); for (i=0; i < 32;i++) { // From TLBR unsigned int EntryDefined, MyPageMask, MyEntryHi, MyEntryLo0, MyEntryLo1; EntryDefined = tlb_e[i].v_even || tlb_e[i].v_odd; MyPageMask = tlb_e[i].mask << 13; MyEntryHi = ((tlb_e[i].vpn2 << 13) | tlb_e[i].asid); MyEntryLo0 = (tlb_e[i].pfn_even << 6) | (tlb_e[i].c_even << 3) | (tlb_e[i].d_even << 2) | (tlb_e[i].v_even << 1) | tlb_e[i].g; MyEntryLo1 = (tlb_e[i].pfn_odd << 6) | (tlb_e[i].c_odd << 3) | (tlb_e[i].d_odd << 2) | (tlb_e[i].v_odd << 1) | tlb_e[i].g; PUTDATA(curr, unsigned int, EntryDefined); PUTDATA(curr, unsigned int, MyPageMask); PUTDATA(curr, unsigned int, MyEntryHi); PUTDATA(curr, unsigned int, MyEntryLo0); PUTDATA(curr, unsigned int, MyEntryLo1); } PUTARRAY(g_si.pif.ram, curr, uint8_t, PIF_RAM_SIZE); PUTARRAY(g_rdram, curr, uint32_t, SaveRDRAMSize/4); PUTARRAY(g_sp.mem, curr, uint32_t, SP_MEM_SIZE/4); // Write the save state data to the output if (!write_func(handle, savestateData, savestateSize)) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Couldn't write data to Project64 state file %s.", filepath); free(savestateData); return 0; } // assert(savestateData+savestateSize == curr) free(savestateData); return 1; } static int write_data_to_zip(void *zip, const void *buffer, size_t length) { return zipWriteInFileInZip((zipFile)zip, buffer, (unsigned)length) == ZIP_OK; } static int savestates_save_pj64_zip(char *filepath) { int retval; zipFile zipfile = NULL; zipfile = zipOpen(filepath, APPEND_STATUS_CREATE); if(zipfile == NULL) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Could not create PJ64 state file: %s", filepath); goto clean_and_exit; } retval = zipOpenNewFileInZip(zipfile, namefrompath(filepath), NULL, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_DEFAULT_COMPRESSION); if(retval != ZIP_OK) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Zip error. Could not create state file: %s", filepath); goto clean_and_exit; } if (!savestates_save_pj64(filepath, zipfile, write_data_to_zip)) goto clean_and_exit; main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Saved state to: %s", namefrompath(filepath)); clean_and_exit: if (zipfile != NULL) { zipCloseFileInZip(zipfile); // This may fail, but we don't care zipClose(zipfile, ""); } return 1; } static int write_data_to_file(void *file, const void *buffer, size_t length) { return fwrite(buffer, 1, length, (FILE *)file) == length; } static int savestates_save_pj64_unc(char *filepath) { FILE *f; f = fopen(filepath, "wb"); if (f == NULL) { main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Could not create PJ64 state file: %s", filepath); return 0; } if (!savestates_save_pj64(filepath, f, write_data_to_file)) { fclose(f); return 0; } main_message(M64MSG_STATUS, OSD_BOTTOM_LEFT, "Saved state to: %s", namefrompath(filepath)); fclose(f); return 1; } int savestates_save(void) { char *filepath; int ret = 0; /* Can only save PJ64 savestates on VI / COMPARE interrupt. Otherwise try again in a little while. */ if ((type == savestates_type_pj64_zip || type == savestates_type_pj64_unc) && get_next_event_type() > COMPARE_INT) return 0; if (fname != NULL && type == savestates_type_unknown) type = savestates_type_m64p; else if (fname == NULL) // Always save slots in M64P format type = savestates_type_m64p; filepath = savestates_generate_path(type); if (filepath != NULL) { switch (type) { case savestates_type_m64p: ret = savestates_save_m64p(filepath); break; case savestates_type_pj64_zip: ret = savestates_save_pj64_zip(filepath); break; case savestates_type_pj64_unc: ret = savestates_save_pj64_unc(filepath); break; default: ret = 0; break; } free(filepath); } // deliver callback to indicate completion of state saving operation StateChanged(M64CORE_STATE_SAVECOMPLETE, ret); savestates_clear_job(); return ret; } void savestates_init(void) { savestates_lock = SDL_CreateMutex(); if (!savestates_lock) { DebugMessage(M64MSG_ERROR, "Could not create savestates list lock"); return; } } void savestates_deinit(void) { SDL_DestroyMutex(savestates_lock); savestates_clear_job(); } mupen64plus-core-src-2.5/src/main/savestates.h000066400000000000000000000047541251723631200213570ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - savestates.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2012 CasualJames * * Copyright (C) 2009 Olejl Tillin9 * * Copyright (C) 2008 Richard42 Tillin9 * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __SAVESTAVES_H__ #define __SAVESTAVES_H__ typedef enum _savestates_job { savestates_job_nothing, savestates_job_load, savestates_job_save } savestates_job; typedef enum _savestates_type { savestates_type_unknown, savestates_type_m64p, savestates_type_pj64_zip, savestates_type_pj64_unc } savestates_type; savestates_job savestates_get_job(void); void savestates_set_job(savestates_job j, savestates_type t, const char *fn); void savestates_init(void); void savestates_deinit(void); int savestates_load(void); int savestates_save(void); void savestates_select_slot(unsigned int s); unsigned int savestates_get_slot(void); void savestates_set_autoinc_slot(int b); void savestates_inc_slot(void); #endif /* __SAVESTAVES_H__ */ mupen64plus-core-src-2.5/src/main/sdl_key_converter.c000066400000000000000000001075741251723631200227150ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - sdl_key_converter.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2013 Mupen64plus development team * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "sdl_key_converter.h" #include #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) uint16_t sdl_keysym2scancode(uint16_t keysym) { static const uint16_t keysym2scancode[323] = { 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x002au, /* SDLK_BACKSPACE -> SDL_SCANCODE_BACKSPACE */ 0x002bu, /* SDLK_TAB -> SDL_SCANCODE_TAB */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x009cu, /* SDLK_CLEAR -> SDL_SCANCODE_CLEAR */ 0x0028u, /* SDLK_RETURN -> SDL_SCANCODE_RETURN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0048u, /* SDLK_PAUSE -> SDL_SCANCODE_PAUSE */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0029u, /* SDLK_ESCAPE -> SDL_SCANCODE_ESCAPE */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x002cu, /* SDLK_SPACE -> SDL_SCANCODE_SPACE */ 0x0000u, /* SDLK_EXCLAIM -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_QUOTEDBL -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_HASH -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_DOLLAR -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_AMPERSAND -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_QUOTE -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_LEFTPAREN -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_RIGHTPAREN -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_ASTERISK -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_PLUS -> SDL_SCANCODE_UNKNOWN */ 0x0036u, /* SDLK_COMMA -> SDL_SCANCODE_COMMA */ 0x002du, /* SDLK_MINUS -> SDL_SCANCODE_MINUS */ 0x0037u, /* SDLK_PERIOD -> SDL_SCANCODE_PERIOD */ 0x0038u, /* SDLK_SLASH -> SDL_SCANCODE_SLASH */ 0x0027u, /* SDLK_0 -> SDL_SCANCODE_0 */ 0x001eu, /* SDLK_1 -> SDL_SCANCODE_1 */ 0x001fu, /* SDLK_2 -> SDL_SCANCODE_2 */ 0x0020u, /* SDLK_3 -> SDL_SCANCODE_3 */ 0x0021u, /* SDLK_4 -> SDL_SCANCODE_4 */ 0x0022u, /* SDLK_5 -> SDL_SCANCODE_5 */ 0x0023u, /* SDLK_6 -> SDL_SCANCODE_6 */ 0x0024u, /* SDLK_7 -> SDL_SCANCODE_7 */ 0x0025u, /* SDLK_8 -> SDL_SCANCODE_8 */ 0x0026u, /* SDLK_9 -> SDL_SCANCODE_9 */ 0x0000u, /* SDLK_COLON -> SDL_SCANCODE_UNKNOWN */ 0x0033u, /* SDLK_SEMICOLON -> SDL_SCANCODE_SEMICOLON */ 0x0000u, /* SDLK_LESS -> SDL_SCANCODE_UNKNOWN */ 0x002eu, /* SDLK_EQUALS -> SDL_SCANCODE_EQUALS */ 0x0000u, /* SDLK_GREATER -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_QUESTION -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_AT -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x002fu, /* SDLK_LEFTBRACKET -> SDL_SCANCODE_LEFTBRACKET */ 0x0031u, /* SDLK_BACKSLASH -> SDL_SCANCODE_BACKSLASH */ 0x0030u, /* SDLK_RIGHTBRACKET -> SDL_SCANCODE_RIGHTBRACKET */ 0x0000u, /* SDLK_CARET -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_UNDERSCORE -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_BACKQUOTE -> SDL_SCANCODE_UNKNOWN */ 0x0004u, /* SDLK_a -> SDL_SCANCODE_A */ 0x0005u, /* SDLK_b -> SDL_SCANCODE_B */ 0x0006u, /* SDLK_c -> SDL_SCANCODE_C */ 0x0007u, /* SDLK_d -> SDL_SCANCODE_D */ 0x0008u, /* SDLK_e -> SDL_SCANCODE_E */ 0x0009u, /* SDLK_f -> SDL_SCANCODE_F */ 0x000au, /* SDLK_g -> SDL_SCANCODE_G */ 0x000bu, /* SDLK_h -> SDL_SCANCODE_H */ 0x000cu, /* SDLK_i -> SDL_SCANCODE_I */ 0x000du, /* SDLK_j -> SDL_SCANCODE_J */ 0x000eu, /* SDLK_k -> SDL_SCANCODE_K */ 0x000fu, /* SDLK_l -> SDL_SCANCODE_L */ 0x0010u, /* SDLK_m -> SDL_SCANCODE_M */ 0x0011u, /* SDLK_n -> SDL_SCANCODE_N */ 0x0012u, /* SDLK_o -> SDL_SCANCODE_O */ 0x0013u, /* SDLK_p -> SDL_SCANCODE_P */ 0x0014u, /* SDLK_q -> SDL_SCANCODE_Q */ 0x0015u, /* SDLK_r -> SDL_SCANCODE_R */ 0x0016u, /* SDLK_s -> SDL_SCANCODE_S */ 0x0017u, /* SDLK_t -> SDL_SCANCODE_T */ 0x0018u, /* SDLK_u -> SDL_SCANCODE_U */ 0x0019u, /* SDLK_v -> SDL_SCANCODE_V */ 0x001au, /* SDLK_w -> SDL_SCANCODE_W */ 0x001bu, /* SDLK_x -> SDL_SCANCODE_X */ 0x001cu, /* SDLK_y -> SDL_SCANCODE_Y */ 0x001du, /* SDLK_z -> SDL_SCANCODE_Z */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x004cu, /* SDLK_DELETE -> SDL_SCANCODE_DELETE */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_0 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_1 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_2 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_3 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_4 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_5 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_6 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_7 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_8 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_9 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_10 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_11 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_12 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_13 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_14 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_15 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_16 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_17 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_18 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_19 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_20 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_21 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_22 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_23 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_24 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_25 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_26 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_27 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_28 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_29 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_30 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_31 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_32 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_33 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_34 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_35 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_36 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_37 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_38 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_39 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_40 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_41 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_42 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_43 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_44 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_45 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_46 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_47 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_48 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_49 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_50 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_51 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_52 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_53 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_54 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_55 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_56 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_57 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_58 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_59 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_60 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_61 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_62 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_63 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_64 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_65 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_66 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_67 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_68 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_69 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_70 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_71 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_72 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_73 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_74 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_75 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_76 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_77 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_78 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_79 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_80 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_81 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_82 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_83 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_84 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_85 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_86 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_87 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_88 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_89 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_90 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_91 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_92 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_93 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_94 -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_WORLD_95 -> SDL_SCANCODE_UNKNOWN */ 0x0062u, /* SDLK_KP0 -> SDL_SCANCODE_KP_0 */ 0x0059u, /* SDLK_KP1 -> SDL_SCANCODE_KP_1 */ 0x005au, /* SDLK_KP2 -> SDL_SCANCODE_KP_2 */ 0x005bu, /* SDLK_KP3 -> SDL_SCANCODE_KP_3 */ 0x005cu, /* SDLK_KP4 -> SDL_SCANCODE_KP_4 */ 0x005du, /* SDLK_KP5 -> SDL_SCANCODE_KP_5 */ 0x005eu, /* SDLK_KP6 -> SDL_SCANCODE_KP_6 */ 0x005fu, /* SDLK_KP7 -> SDL_SCANCODE_KP_7 */ 0x0060u, /* SDLK_KP8 -> SDL_SCANCODE_KP_8 */ 0x0061u, /* SDLK_KP9 -> SDL_SCANCODE_KP_9 */ 0x0063u, /* SDLK_KP_PERIOD -> SDL_SCANCODE_KP_PERIOD */ 0x0054u, /* SDLK_KP_DIVIDE -> SDL_SCANCODE_KP_DIVIDE */ 0x0055u, /* SDLK_KP_MULTIPLY -> SDL_SCANCODE_KP_MULTIPLY */ 0x0056u, /* SDLK_KP_MINUS -> SDL_SCANCODE_KP_MINUS */ 0x0057u, /* SDLK_KP_PLUS -> SDL_SCANCODE_KP_PLUS */ 0x0058u, /* SDLK_KP_ENTER -> SDL_SCANCODE_KP_ENTER */ 0x0067u, /* SDLK_KP_EQUALS -> SDL_SCANCODE_KP_EQUALS */ 0x0052u, /* SDLK_UP -> SDL_SCANCODE_UP */ 0x0051u, /* SDLK_DOWN -> SDL_SCANCODE_DOWN */ 0x004fu, /* SDLK_RIGHT -> SDL_SCANCODE_RIGHT */ 0x0050u, /* SDLK_LEFT -> SDL_SCANCODE_LEFT */ 0x0049u, /* SDLK_INSERT -> SDL_SCANCODE_INSERT */ 0x004au, /* SDLK_HOME -> SDL_SCANCODE_HOME */ 0x004du, /* SDLK_END -> SDL_SCANCODE_END */ 0x004bu, /* SDLK_PAGEUP -> SDL_SCANCODE_PAGEUP */ 0x004eu, /* SDLK_PAGEDOWN -> SDL_SCANCODE_PAGEDOWN */ 0x003au, /* SDLK_F1 -> SDL_SCANCODE_F1 */ 0x003bu, /* SDLK_F2 -> SDL_SCANCODE_F2 */ 0x003cu, /* SDLK_F3 -> SDL_SCANCODE_F3 */ 0x003du, /* SDLK_F4 -> SDL_SCANCODE_F4 */ 0x003eu, /* SDLK_F5 -> SDL_SCANCODE_F5 */ 0x003fu, /* SDLK_F6 -> SDL_SCANCODE_F6 */ 0x0040u, /* SDLK_F7 -> SDL_SCANCODE_F7 */ 0x0041u, /* SDLK_F8 -> SDL_SCANCODE_F8 */ 0x0042u, /* SDLK_F9 -> SDL_SCANCODE_F9 */ 0x0043u, /* SDLK_F10 -> SDL_SCANCODE_F10 */ 0x0044u, /* SDLK_F11 -> SDL_SCANCODE_F11 */ 0x0045u, /* SDLK_F12 -> SDL_SCANCODE_F12 */ 0x0068u, /* SDLK_F13 -> SDL_SCANCODE_F13 */ 0x0069u, /* SDLK_F14 -> SDL_SCANCODE_F14 */ 0x006au, /* SDLK_F15 -> SDL_SCANCODE_F15 */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* unassigned -> SDL_SCANCODE_UNKNOWN */ 0x0053u, /* SDLK_NUMLOCK -> SDL_SCANCODE_NUMLOCKCLEAR */ 0x0039u, /* SDLK_CAPSLOCK -> SDL_SCANCODE_CAPSLOCK */ 0x0000u, /* SDLK_SCROLLOCK -> SDL_SCANCODE_UNKNOWN */ 0x00e5u, /* SDLK_RSHIFT -> SDL_SCANCODE_RSHIFT */ 0x00e1u, /* SDLK_LSHIFT -> SDL_SCANCODE_LSHIFT */ 0x00e4u, /* SDLK_RCTRL -> SDL_SCANCODE_RCTRL */ 0x00e0u, /* SDLK_LCTRL -> SDL_SCANCODE_LCTRL */ 0x00e6u, /* SDLK_RALT -> SDL_SCANCODE_RALT */ 0x00e2u, /* SDLK_LALT -> SDL_SCANCODE_LALT */ 0x0000u, /* SDLK_RMETA -> SDL_SCANCODE_UNKNOWN */ 0x0000u, /* SDLK_LMETA -> SDL_SCANCODE_UNKNOWN */ 0x00e3u, /* SDLK_LSUPER -> SDL_SCANCODE_LGUI */ 0x00e7u, /* SDLK_RSUPER -> SDL_SCANCODE_RGUI */ 0x0101u, /* SDLK_MODE -> SDL_SCANCODE_MODE */ 0x0000u, /* SDLK_COMPOSE -> SDL_SCANCODE_UNKNOWN */ 0x0075u, /* SDLK_HELP -> SDL_SCANCODE_HELP */ 0x0000u, /* SDLK_PRINT -> SDL_SCANCODE_UNKNOWN */ 0x009au, /* SDLK_SYSREQ -> SDL_SCANCODE_SYSREQ */ 0x0000u, /* SDLK_BREAK -> SDL_SCANCODE_UNKNOWN */ 0x0076u, /* SDLK_MENU -> SDL_SCANCODE_MENU */ 0x0066u, /* SDLK_POWER -> SDL_SCANCODE_POWER */ 0x0000u, /* SDLK_EURO -> SDL_SCANCODE_UNKNOWN */ 0x007au, /* SDLK_UNDO -> SDL_SCANCODE_UNDO */ }; if (keysym >= ARRAY_SIZE(keysym2scancode)) return 0; return keysym2scancode[keysym]; } uint16_t sdl_scancode2keysym(uint16_t scancode) { static const uint16_t scancode2keysym[285] = { 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0061u, /* SDL_SCANCODE_A -> SDLK_a */ 0x0062u, /* SDL_SCANCODE_B -> SDLK_b */ 0x0063u, /* SDL_SCANCODE_C -> SDLK_c */ 0x0064u, /* SDL_SCANCODE_D -> SDLK_d */ 0x0065u, /* SDL_SCANCODE_E -> SDLK_e */ 0x0066u, /* SDL_SCANCODE_F -> SDLK_f */ 0x0067u, /* SDL_SCANCODE_G -> SDLK_g */ 0x0068u, /* SDL_SCANCODE_H -> SDLK_h */ 0x0069u, /* SDL_SCANCODE_I -> SDLK_i */ 0x006au, /* SDL_SCANCODE_J -> SDLK_j */ 0x006bu, /* SDL_SCANCODE_K -> SDLK_k */ 0x006cu, /* SDL_SCANCODE_L -> SDLK_l */ 0x006du, /* SDL_SCANCODE_M -> SDLK_m */ 0x006eu, /* SDL_SCANCODE_N -> SDLK_n */ 0x006fu, /* SDL_SCANCODE_O -> SDLK_o */ 0x0070u, /* SDL_SCANCODE_P -> SDLK_p */ 0x0071u, /* SDL_SCANCODE_Q -> SDLK_q */ 0x0072u, /* SDL_SCANCODE_R -> SDLK_r */ 0x0073u, /* SDL_SCANCODE_S -> SDLK_s */ 0x0074u, /* SDL_SCANCODE_T -> SDLK_t */ 0x0075u, /* SDL_SCANCODE_U -> SDLK_u */ 0x0076u, /* SDL_SCANCODE_V -> SDLK_v */ 0x0077u, /* SDL_SCANCODE_W -> SDLK_w */ 0x0078u, /* SDL_SCANCODE_X -> SDLK_x */ 0x0079u, /* SDL_SCANCODE_Y -> SDLK_y */ 0x007au, /* SDL_SCANCODE_Z -> SDLK_z */ 0x0031u, /* SDL_SCANCODE_1 -> SDLK_1 */ 0x0032u, /* SDL_SCANCODE_2 -> SDLK_2 */ 0x0033u, /* SDL_SCANCODE_3 -> SDLK_3 */ 0x0034u, /* SDL_SCANCODE_4 -> SDLK_4 */ 0x0035u, /* SDL_SCANCODE_5 -> SDLK_5 */ 0x0036u, /* SDL_SCANCODE_6 -> SDLK_6 */ 0x0037u, /* SDL_SCANCODE_7 -> SDLK_7 */ 0x0038u, /* SDL_SCANCODE_8 -> SDLK_8 */ 0x0039u, /* SDL_SCANCODE_9 -> SDLK_9 */ 0x0030u, /* SDL_SCANCODE_0 -> SDLK_0 */ 0x000du, /* SDL_SCANCODE_RETURN -> SDLK_RETURN */ 0x001bu, /* SDL_SCANCODE_ESCAPE -> SDLK_ESCAPE */ 0x0008u, /* SDL_SCANCODE_BACKSPACE -> SDLK_BACKSPACE */ 0x0009u, /* SDL_SCANCODE_TAB -> SDLK_TAB */ 0x0020u, /* SDL_SCANCODE_SPACE -> SDLK_SPACE */ 0x002du, /* SDL_SCANCODE_MINUS -> SDLK_MINUS */ 0x003du, /* SDL_SCANCODE_EQUALS -> SDLK_EQUALS */ 0x005bu, /* SDL_SCANCODE_LEFTBRACKET -> SDLK_LEFTBRACKET */ 0x005du, /* SDL_SCANCODE_RIGHTBRACKET -> SDLK_RIGHTBRACKET */ 0x005cu, /* SDL_SCANCODE_BACKSLASH -> SDLK_BACKSLASH */ 0x0000u, /* SDL_SCANCODE_NONUSHASH -> SDLK_UNKNOWN */ 0x003bu, /* SDL_SCANCODE_SEMICOLON -> SDLK_SEMICOLON */ 0x0000u, /* SDL_SCANCODE_APOSTROPHE -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_GRAVE -> SDLK_UNKNOWN */ 0x002cu, /* SDL_SCANCODE_COMMA -> SDLK_COMMA */ 0x002eu, /* SDL_SCANCODE_PERIOD -> SDLK_PERIOD */ 0x002fu, /* SDL_SCANCODE_SLASH -> SDLK_SLASH */ 0x012du, /* SDL_SCANCODE_CAPSLOCK -> SDLK_CAPSLOCK */ 0x011au, /* SDL_SCANCODE_F1 -> SDLK_F1 */ 0x011bu, /* SDL_SCANCODE_F2 -> SDLK_F2 */ 0x011cu, /* SDL_SCANCODE_F3 -> SDLK_F3 */ 0x011du, /* SDL_SCANCODE_F4 -> SDLK_F4 */ 0x011eu, /* SDL_SCANCODE_F5 -> SDLK_F5 */ 0x011fu, /* SDL_SCANCODE_F6 -> SDLK_F6 */ 0x0120u, /* SDL_SCANCODE_F7 -> SDLK_F7 */ 0x0121u, /* SDL_SCANCODE_F8 -> SDLK_F8 */ 0x0122u, /* SDL_SCANCODE_F9 -> SDLK_F9 */ 0x0123u, /* SDL_SCANCODE_F10 -> SDLK_F10 */ 0x0124u, /* SDL_SCANCODE_F11 -> SDLK_F11 */ 0x0125u, /* SDL_SCANCODE_F12 -> SDLK_F12 */ 0x0000u, /* SDL_SCANCODE_PRINTSCREEN -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_SCROLLLOCK -> SDLK_UNKNOWN */ 0x0013u, /* SDL_SCANCODE_PAUSE -> SDLK_PAUSE */ 0x0115u, /* SDL_SCANCODE_INSERT -> SDLK_INSERT */ 0x0116u, /* SDL_SCANCODE_HOME -> SDLK_HOME */ 0x0118u, /* SDL_SCANCODE_PAGEUP -> SDLK_PAGEUP */ 0x007fu, /* SDL_SCANCODE_DELETE -> SDLK_DELETE */ 0x0117u, /* SDL_SCANCODE_END -> SDLK_END */ 0x0119u, /* SDL_SCANCODE_PAGEDOWN -> SDLK_PAGEDOWN */ 0x0113u, /* SDL_SCANCODE_RIGHT -> SDLK_RIGHT */ 0x0114u, /* SDL_SCANCODE_LEFT -> SDLK_LEFT */ 0x0112u, /* SDL_SCANCODE_DOWN -> SDLK_DOWN */ 0x0111u, /* SDL_SCANCODE_UP -> SDLK_UP */ 0x012cu, /* SDL_SCANCODE_NUMLOCKCLEAR -> SDLK_NUMLOCK */ 0x010bu, /* SDL_SCANCODE_KP_DIVIDE -> SDLK_KP_DIVIDE */ 0x010cu, /* SDL_SCANCODE_KP_MULTIPLY -> SDLK_KP_MULTIPLY */ 0x010du, /* SDL_SCANCODE_KP_MINUS -> SDLK_KP_MINUS */ 0x010eu, /* SDL_SCANCODE_KP_PLUS -> SDLK_KP_PLUS */ 0x010fu, /* SDL_SCANCODE_KP_ENTER -> SDLK_KP_ENTER */ 0x0101u, /* SDL_SCANCODE_KP_1 -> SDLK_KP1 */ 0x0102u, /* SDL_SCANCODE_KP_2 -> SDLK_KP2 */ 0x0103u, /* SDL_SCANCODE_KP_3 -> SDLK_KP3 */ 0x0104u, /* SDL_SCANCODE_KP_4 -> SDLK_KP4 */ 0x0105u, /* SDL_SCANCODE_KP_5 -> SDLK_KP5 */ 0x0106u, /* SDL_SCANCODE_KP_6 -> SDLK_KP6 */ 0x0107u, /* SDL_SCANCODE_KP_7 -> SDLK_KP7 */ 0x0108u, /* SDL_SCANCODE_KP_8 -> SDLK_KP8 */ 0x0109u, /* SDL_SCANCODE_KP_9 -> SDLK_KP9 */ 0x0100u, /* SDL_SCANCODE_KP_0 -> SDLK_KP0 */ 0x010au, /* SDL_SCANCODE_KP_PERIOD -> SDLK_KP_PERIOD */ 0x0000u, /* SDL_SCANCODE_NONUSBACKSLASH -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_APPLICATION -> SDLK_UNKNOWN */ 0x0140u, /* SDL_SCANCODE_POWER -> SDLK_POWER */ 0x0110u, /* SDL_SCANCODE_KP_EQUALS -> SDLK_KP_EQUALS */ 0x0126u, /* SDL_SCANCODE_F13 -> SDLK_F13 */ 0x0127u, /* SDL_SCANCODE_F14 -> SDLK_F14 */ 0x0128u, /* SDL_SCANCODE_F15 -> SDLK_F15 */ 0x0000u, /* SDL_SCANCODE_F16 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_F17 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_F18 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_F19 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_F20 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_F21 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_F22 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_F23 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_F24 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_EXECUTE -> SDLK_UNKNOWN */ 0x013bu, /* SDL_SCANCODE_HELP -> SDLK_HELP */ 0x013fu, /* SDL_SCANCODE_MENU -> SDLK_MENU */ 0x0000u, /* SDL_SCANCODE_SELECT -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_STOP -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_AGAIN -> SDLK_UNKNOWN */ 0x0142u, /* SDL_SCANCODE_UNDO -> SDLK_UNDO */ 0x0000u, /* SDL_SCANCODE_CUT -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_COPY -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_PASTE -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_FIND -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_MUTE -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_VOLUMEUP -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_VOLUMEDOWN -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_COMMA -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_EQUALSAS400 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_INTERNATIONAL1 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_INTERNATIONAL2 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_INTERNATIONAL3 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_INTERNATIONAL4 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_INTERNATIONAL5 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_INTERNATIONAL6 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_INTERNATIONAL7 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_INTERNATIONAL8 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_INTERNATIONAL9 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_LANG1 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_LANG2 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_LANG3 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_LANG4 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_LANG5 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_LANG6 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_LANG7 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_LANG8 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_LANG9 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_ALTERASE -> SDLK_UNKNOWN */ 0x013du, /* SDL_SCANCODE_SYSREQ -> SDLK_SYSREQ */ 0x0000u, /* SDL_SCANCODE_CANCEL -> SDLK_UNKNOWN */ 0x000cu, /* SDL_SCANCODE_CLEAR -> SDLK_CLEAR */ 0x0000u, /* SDL_SCANCODE_PRIOR -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_RETURN2 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_SEPARATOR -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_OUT -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_OPER -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_CLEARAGAIN -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_CRSEL -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_EXSEL -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_00 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_000 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_THOUSANDSSEPARATOR -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_DECIMALSEPARATOR -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_CURRENCYUNIT -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_CURRENCYSUBUNIT -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_LEFTPAREN -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_RIGHTPAREN -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_LEFTBRACE -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_RIGHTBRACE -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_TAB -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_BACKSPACE -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_A -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_B -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_C -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_D -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_E -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_F -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_XOR -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_POWER -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_PERCENT -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_LESS -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_GREATER -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_AMPERSAND -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_DBLAMPERSAND -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_VERTICALBAR -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_DBLVERTICALBAR -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_COLON -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_HASH -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_SPACE -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_AT -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_EXCLAM -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_MEMSTORE -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_MEMRECALL -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_MEMCLEAR -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_MEMADD -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_MEMSUBTRACT -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_MEMMULTIPLY -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_MEMDIVIDE -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_PLUSMINUS -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_CLEAR -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_CLEARENTRY -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_BINARY -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_OCTAL -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_DECIMAL -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KP_HEXADECIMAL -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0132u, /* SDL_SCANCODE_LCTRL -> SDLK_LCTRL */ 0x0130u, /* SDL_SCANCODE_LSHIFT -> SDLK_LSHIFT */ 0x0134u, /* SDL_SCANCODE_LALT -> SDLK_LALT */ 0x0137u, /* SDL_SCANCODE_LGUI -> SDLK_LSUPER */ 0x0131u, /* SDL_SCANCODE_RCTRL -> SDLK_RCTRL */ 0x012fu, /* SDL_SCANCODE_RSHIFT -> SDLK_RSHIFT */ 0x0133u, /* SDL_SCANCODE_RALT -> SDLK_RALT */ 0x0138u, /* SDL_SCANCODE_RGUI -> SDLK_RSUPER */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0000u, /* unassigned -> SDLK_UNKNOWN */ 0x0139u, /* SDL_SCANCODE_MODE -> SDLK_MODE */ 0x0000u, /* SDL_SCANCODE_AUDIONEXT -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_AUDIOPREV -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_AUDIOSTOP -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_AUDIOPLAY -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_AUDIOMUTE -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_MEDIASELECT -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_WWW -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_MAIL -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_CALCULATOR -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_COMPUTER -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_AC_SEARCH -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_AC_HOME -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_AC_BACK -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_AC_FORWARD -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_AC_STOP -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_AC_REFRESH -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_AC_BOOKMARKS -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_BRIGHTNESSDOWN -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_BRIGHTNESSUP -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_DISPLAYSWITCH -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KBDILLUMTOGGLE -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KBDILLUMDOWN -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_KBDILLUMUP -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_EJECT -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_SLEEP -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_APP1 -> SDLK_UNKNOWN */ 0x0000u, /* SDL_SCANCODE_APP2 -> SDLK_UNKNOWN */ }; if (scancode >= ARRAY_SIZE(scancode2keysym)) return 0; return scancode2keysym[scancode]; } mupen64plus-core-src-2.5/src/main/sdl_key_converter.h000066400000000000000000000041341251723631200227060ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - sdl_key_converter.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2013 Mupen64plus development team * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include "osal/preproc.h" uint16_t sdl_keysym2scancode(uint16_t keysym); uint16_t sdl_scancode2keysym(uint16_t scancode); #if SDL_VERSION_ATLEAST(1,3,0) static osal_inline uint16_t sdl_keysym2native(uint16_t keysym) { return sdl_keysym2scancode(keysym); } static osal_inline uint16_t sdl_native2keysym(uint16_t native) { return sdl_scancode2keysym(native); } #else static osal_inline uint16_t sdl_keysym2native(uint16_t keysym) { return keysym; } static osal_inline uint16_t sdl_native2keysym(uint16_t native) { return native; } #endif mupen64plus-core-src-2.5/src/main/sra_file.c000066400000000000000000000056321251723631200207500ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - sra_file.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "sra_file.h" #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "pi/sram.h" #include "util.h" void open_sra_file(struct sra_file* sra, const char* filename) { /* ! Take ownership of filename ! */ sra->filename = filename; /* try to load sra file content */ switch(read_from_file(sra->filename, sra->sram, SRAM_SIZE)) { case file_open_error: /* if no prior file exists, provide default sram content */ DebugMessage(M64MSG_VERBOSE, "couldn't open sram file '%s' for reading", sra->filename); format_sram(sra->sram); break; case file_read_error: DebugMessage(M64MSG_WARNING, "failed to read sram file '%s'", sra->filename); break; default: break; } } void close_sra_file(struct sra_file* sra) { free((void*)sra->filename); } uint8_t* sra_file_ptr(struct sra_file* sra) { return sra->sram; } void save_sra_file(void* opaque) { /* flush sram to disk */ struct sra_file* sra = (struct sra_file*)opaque; switch(write_to_file(sra->filename, sra->sram, SRAM_SIZE)) { case file_open_error: DebugMessage(M64MSG_WARNING, "couldn't open sram file '%s' for writing", sra->filename); break; case file_write_error: DebugMessage(M64MSG_WARNING, "failed to write sram file '%s'", sra->filename); break; default: break; } } mupen64plus-core-src-2.5/src/main/sra_file.h000066400000000000000000000035751251723631200207610ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - sra_file.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_MAIN_SRA_FILE_H #define M64P_MAIN_SRA_FILE_H #include #include "pi/sram.h" struct sra_file { uint8_t sram[SRAM_SIZE]; const char* filename; }; void open_sra_file(struct sra_file* sra, const char* filename); void close_sra_file(struct sra_file* sra); uint8_t* sra_file_ptr(struct sra_file* sra); void save_sra_file(void* opaque); #endif mupen64plus-core-src-2.5/src/main/util.c000066400000000000000000000235621251723631200201430ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - util.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2012 CasualJames * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Provides common utilities to the rest of the code: * -String functions */ #include #include #include #include #include #include #include #include #define __STDC_FORMAT_MACROS #include #include "osal/files.h" #include "osal/preproc.h" #include "rom.h" #include "util.h" /********************** File utilities **********************/ file_status_t read_from_file(const char *filename, void *data, size_t size) { FILE *f = fopen(filename, "rb"); if (f == NULL) { return file_open_error; } if (fread(data, 1, size, f) != size) { fclose(f); return file_read_error; } fclose(f); return file_ok; } file_status_t write_to_file(const char *filename, const void *data, size_t size) { FILE *f = fopen(filename, "wb"); if (f == NULL) { return file_open_error; } if (fwrite(data, 1, size, f) != size) { fclose(f); return file_read_error; } fclose(f); return file_ok; } /********************** Byte swap utilities **********************/ void swap_buffer(void *buffer, size_t length, size_t count) { size_t i; if (length == 2) { uint16_t *pun = (uint16_t *) buffer; for (i = 0; i < count; i++) pun[i] = m64p_swap16(pun[i]); } else if (length == 4) { uint32_t *pun = (uint32_t *) buffer; for (i = 0; i < count; i++) pun[i] = m64p_swap32(pun[i]); } else if (length == 8) { uint64_t *pun = (uint64_t *) buffer; for (i = 0; i < count; i++) pun[i] = m64p_swap64(pun[i]); } } void to_little_endian_buffer(void *buffer, size_t length, size_t count) { #ifdef M64P_BIG_ENDIAN swap_buffer(buffer, length, count); #endif } void to_big_endian_buffer(void *buffer, size_t length, size_t count) { #ifndef M64P_BIG_ENDIAN swap_buffer(buffer, length, count); #endif } /********************** GUI utilities **********************/ void countrycodestring(uint16_t countrycode, char *string) { switch (countrycode) { case 0: /* Demo */ strcpy(string, "Demo"); break; case '7': /* Beta */ strcpy(string, "Beta"); break; case 0x41: /* Japan / USA */ strcpy(string, "USA/Japan"); break; case 0x44: /* Germany */ strcpy(string, "Germany"); break; case 0x45: /* USA */ strcpy(string, "USA"); break; case 0x46: /* France */ strcpy(string, "France"); break; case 'I': /* Italy */ strcpy(string, "Italy"); break; case 0x4A: /* Japan */ strcpy(string, "Japan"); break; case 'S': /* Spain */ strcpy(string, "Spain"); break; case 0x55: case 0x59: /* Australia */ sprintf(string, "Australia (0x%02" PRIX16 ")", countrycode); break; case 0x50: case 0x58: case 0x20: case 0x21: case 0x38: case 0x70: sprintf(string, "Europe (0x%02" PRIX16 ")", countrycode); break; default: sprintf(string, "Unknown (0x%02" PRIX16 ")", countrycode); break; } } void imagestring(unsigned char imagetype, char *string) { switch (imagetype) { case Z64IMAGE: strcpy(string, ".z64 (native)"); break; case V64IMAGE: strcpy(string, ".v64 (byteswapped)"); break; case N64IMAGE: strcpy(string, ".n64 (wordswapped)"); break; default: string[0] = '\0'; } } /********************** Path utilities **********************/ /* Looks for an instance of ANY of the characters in 'needles' in 'haystack', * starting from the end of 'haystack'. Returns a pointer to the last position * of some character on 'needles' on 'haystack'. If not found, returns NULL. */ static const char* strpbrk_reverse(const char* needles, const char* haystack) { size_t stringlength = strlen(haystack), counter; for (counter = stringlength; counter > 0; --counter) { if (strchr(needles, haystack[counter-1])) break; } if (counter == 0) return NULL; return haystack + counter - 1; } const char* namefrompath(const char* path) { const char* last_separator_ptr = strpbrk_reverse(OSAL_DIR_SEPARATORS, path); if (last_separator_ptr != NULL) return last_separator_ptr + 1; else return path; } static int is_path_separator(char c) { return strchr(OSAL_DIR_SEPARATORS, c) != NULL; } char* combinepath(const char* first, const char *second) { size_t len_first, off_second = 0; if (first == NULL || second == NULL) return NULL; len_first = strlen(first); while (is_path_separator(first[len_first-1])) len_first--; while (is_path_separator(second[off_second])) off_second++; return formatstr("%.*s%c%s", (int) len_first, first, OSAL_DIR_SEPARATORS[0], second + off_second); } /********************** String utilities **********************/ char *trim(char *str) { char *start = str, *end = str + strlen(str); while (start < end && isspace(*start)) start++; while (end > start && isspace(*(end-1))) end--; memmove(str, start, end - start); str[end - start] = '\0'; return str; } int string_to_int(const char *str, int *result) { char *endptr; long int n; if (*str == '\0' || isspace(*str)) return 0; errno = 0; n = strtol(str, &endptr, 10); if (*endptr != '\0' || errno != 0 || n < INT_MIN || n > INT_MAX) return 0; *result = (int)n; return 1; } static unsigned char char2hex(char c) { c = tolower(c); if(c >= '0' && c <= '9') return c - '0'; else if(c >= 'a' && c <= 'f') return c - 'a' + 10; else return 0xFF; } int parse_hex(const char *str, unsigned char *output, size_t output_size) { size_t i, j; for (i = 0; i < output_size; i++) { output[i] = 0; for (j = 0; j < 2; j++) { unsigned char h = char2hex(*str++); if (h == 0xFF) return 0; output[i] = (output[i] << 4) | h; } } if (*str != '\0') return 0; return 1; } char *formatstr(const char *fmt, ...) { int size = 128, ret; char *str = (char *)malloc(size), *newstr; va_list args; /* There are two implementations of vsnprintf we have to deal with: * C99 version: Returns the number of characters which would have been written * if the buffer had been large enough, and -1 on failure. * Windows version: Returns the number of characters actually written, * and -1 on failure or truncation. * NOTE: An implementation equivalent to the Windows one appears in glibc <2.1. */ while (str != NULL) { va_start(args, fmt); ret = vsnprintf(str, size, fmt, args); va_end(args); // Successful result? if (ret >= 0 && ret < size) return str; // Increment the capacity of the buffer if (ret >= size) size = ret + 1; // C99 version: We got the needed buffer size else size *= 2; // Windows version: Keep guessing newstr = (char *)realloc(str, size); if (newstr == NULL) free(str); str = newstr; } return NULL; } ini_line ini_parse_line(char **lineptr) { char *line = *lineptr, *endline = strchr(*lineptr, '\n'), *equal; ini_line l; // Null terminate the current line and point to the next line if (endline != NULL) *endline = '\0'; *lineptr = line + strlen(line) + 1; // Parse the line contents trim(line); if (line[0] == '#' || line[0] == ';') { line++; l.type = INI_COMMENT; l.name = NULL; l.value = trim(line); } else if (line[0] == '[' && line[strlen(line)-1] == ']') { line[strlen(line)-1] = '\0'; line++; l.type = INI_SECTION; l.name = trim(line); l.value = NULL; } else if ((equal = strchr(line, '=')) != NULL) { char *name = line, *value = equal + 1; *equal = '\0'; l.type = INI_PROPERTY; l.name = trim(name); l.value = trim(value); } else { l.type = (*line == '\0') ? INI_BLANK : INI_TRASH; l.name = NULL; l.value = NULL; } return l; } mupen64plus-core-src-2.5/src/main/util.h000066400000000000000000000160241251723631200201430ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - util.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2012 CasualJames * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __UTIL_H__ #define __UTIL_H__ #ifdef __cplusplus extern "C" { #endif #include #include #include #include "osal/preproc.h" /********************** File utilities **********************/ typedef enum _file_status { file_ok, file_open_error, file_read_error, file_write_error } file_status_t; /** read_from_file * opens a file and reads the specified number of bytes. * returns zero on success, nonzero on failure */ file_status_t read_from_file(const char *filename, void *data, size_t size); /** write_to_file * opens a file and writes the specified number of bytes. * returns zero on sucess, nonzero on failure */ file_status_t write_to_file(const char *filename, const void *data, size_t size); /********************** Byte swap utilities **********************/ #ifdef _MSC_VER #include #endif /* GCC has also byte swap intrinsics (__builtin_bswap32, etc.), but they were * added in relatively recent versions. In addition, GCC can detect the byte * swap code and optimize it with a high enough optimization level. */ static osal_inline unsigned short m64p_swap16(unsigned short x) { #ifdef _MSC_VER return _byteswap_ushort(x); #else return ((x & 0x00FF) << 8) | ((x & 0xFF00) >> 8); #endif } static osal_inline unsigned int m64p_swap32(unsigned int x) { #ifdef _MSC_VER return _byteswap_ulong(x); // long is always 32-bit in Windows #else return ((x & 0x000000FF) << 24) | ((x & 0x0000FF00) << 8) | ((x & 0x00FF0000) >> 8) | ((x & 0xFF000000) >> 24); #endif } static osal_inline unsigned long long int m64p_swap64(unsigned long long int x) { #ifdef _MSC_VER return _byteswap_uint64(x); #else return ((x & 0x00000000000000FFULL) << 56) | ((x & 0x000000000000FF00ULL) << 40) | ((x & 0x0000000000FF0000ULL) << 24) | ((x & 0x00000000FF000000ULL) << 8) | ((x & 0x000000FF00000000ULL) >> 8) | ((x & 0x0000FF0000000000ULL) >> 24) | ((x & 0x00FF000000000000ULL) >> 40) | ((x & 0xFF00000000000000ULL) >> 56); #endif } #ifdef M64P_BIG_ENDIAN #define big16(x) (x) #define big32(x) (x) #define big64(x) (x) #define little16(x) m64p_swap16(x) #define little32(x) m64p_swap32(x) #define little64(x) m64p_swap64(x) #else #define big16(x) m64p_swap16(x) #define big32(x) m64p_swap32(x) #define big64(x) m64p_swap64(x) #define little16(x) (x) #define little32(x) (x) #define little64(x) (x) #endif /* Byte swaps, converts to little endian or converts to big endian a buffer, * containing 'count' elements, each of size 'length'. */ void swap_buffer(void *buffer, size_t length, size_t count); void to_little_endian_buffer(void *buffer, size_t length, size_t count); void to_big_endian_buffer(void *buffer, size_t length, size_t count); /********************** GUI utilities **********************/ void countrycodestring(uint16_t countrycode, char *string); void imagestring(unsigned char imagetype, char *string); /********************** Path utilities **********************/ /* Extracts the full file name (with extension) from a path string. * Returns the same string, advanced until the file name. */ const char* namefrompath(const char* path); /* Creates a path string by joining two path strings. * The given path strings may or may not start or end with a path separator. * Returns a malloc'd string with the resulting path. */ char* combinepath(const char* first, const char *second); /********************** String utilities **********************/ /** trim * Removes leading and trailing whitespace from str. Function modifies str * and also returns modified string. */ char *trim(char *str); /* Converts an string to an integer. * Returns 1 on success, 0 on failure. 'result' is undefined on failure. * * The following conditions cause this function to fail: * - Empty string * - Leading characters (including whitespace) * - Trailing characters (including whitespace) * - Overflow or underflow. */ int string_to_int(const char *str, int *result); /* Converts an string of hexadecimal characters to a byte array. * 'output_size' is the number of bytes (hex digraphs) to convert. * Returns 1 on success, 0 on failure. 'output' is undefined on failure. */ int parse_hex(const char *str, unsigned char *output, size_t output_size); /* Formats an string, using the same syntax as printf. * Returns the result in a malloc'd string. */ char* formatstr(const char* fmt, ...); typedef enum _ini_line_type { INI_BLANK, INI_COMMENT, INI_SECTION, INI_PROPERTY, INI_TRASH } ini_line_type; typedef struct _ini_line { ini_line_type type; char *name; char *value; } ini_line; /* Parses the INI file line pointer by 'lineptr'. * The first line pointed by 'lineptr' may be modifed. * 'lineptr' will point to the next line after this function runs. * * Returns a ini_line structure with information about the line. * For INI_COMMENT, the value field contains the comment. * For INI_SECTION, the name field contains the section name. * For INI_PROPERTY, the name and value fields contain the property parameters. * The line type is INI_BLANK if the line is blank or invalid. * * The name and value fields (if any) of ini_line point to 'lineptr' * (so their lifetime is associated to that of 'lineptr'). */ ini_line ini_parse_line(char **lineptr); #ifdef __cplusplus } #endif #endif // __UTIL_H__ mupen64plus-core-src-2.5/src/main/version.h000066400000000000000000000036741251723631200206620ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - version.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008-2012 Richard42 DarkJeztr Tillin9 * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Version macros automatically replaced by Makefiles. */ #ifndef __VERSION_H__ #define __VERSION_H__ #define MUPEN_CORE_NAME "Mupen64Plus Core" #define MUPEN_CORE_VERSION 0x020500 #define FRONTEND_API_VERSION 0x020101 #define CONFIG_API_VERSION 0x020300 #define DEBUG_API_VERSION 0x020000 #define VIDEXT_API_VERSION 0x030000 #define VERSION_PRINTF_SPLIT(x) (((x) >> 16) & 0xffff), (((x) >> 8) & 0xff), ((x) & 0xff) #endif /* __VERSION_H__ */ mupen64plus-core-src-2.5/src/main/workqueue.c000066400000000000000000000137671251723631200212230ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - util.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2012 Mupen64plus development team * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "workqueue.h" #include #include #include #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "main/list.h" #define WORKQUEUE_THREADS 1 struct workqueue_mgmt_globals { struct list_head work_queue; struct list_head thread_queue; struct list_head thread_list; SDL_mutex *lock; }; struct workqueue_thread { SDL_Thread *thread; SDL_cond *work_avail; struct list_head list; struct list_head list_mgmt; }; static struct workqueue_mgmt_globals workqueue_mgmt; static void workqueue_dismiss(struct work_struct *work) { } static struct work_struct *workqueue_get_work(struct workqueue_thread *thread) { int found = 0; struct work_struct *work; while (1) { SDL_LockMutex(workqueue_mgmt.lock); list_del_init(&thread->list); if (!list_empty(&workqueue_mgmt.work_queue)) { found = 1; work = list_first_entry(&workqueue_mgmt.work_queue, struct work_struct, list); list_del_init(&work->list); } else { list_add(&thread->list, &workqueue_mgmt.thread_queue); SDL_CondWait(thread->work_avail, workqueue_mgmt.lock); } SDL_UnlockMutex(workqueue_mgmt.lock); if (found) break; } return work; } static int workqueue_thread_handler(void *data) { struct workqueue_thread *thread = data; struct work_struct *work; while (1) { work = workqueue_get_work(thread); if (work->func == workqueue_dismiss) { free(work); break; } work->func(work); } return 0; } int workqueue_init(void) { size_t i; struct workqueue_thread *thread; memset(&workqueue_mgmt, 0, sizeof(workqueue_mgmt)); INIT_LIST_HEAD(&workqueue_mgmt.work_queue); INIT_LIST_HEAD(&workqueue_mgmt.thread_queue); INIT_LIST_HEAD(&workqueue_mgmt.thread_list); workqueue_mgmt.lock = SDL_CreateMutex(); if (!workqueue_mgmt.lock) { DebugMessage(M64MSG_ERROR, "Could not create workqueue management"); return -1; } SDL_LockMutex(workqueue_mgmt.lock); for (i = 0; i < WORKQUEUE_THREADS; i++) { thread = malloc(sizeof(*thread)); if (!thread) { DebugMessage(M64MSG_ERROR, "Could not create workqueue thread management data"); SDL_UnlockMutex(workqueue_mgmt.lock); return -1; } memset(thread, 0, sizeof(*thread)); list_add(&thread->list_mgmt, &workqueue_mgmt.thread_list); INIT_LIST_HEAD(&thread->list); thread->work_avail = SDL_CreateCond(); if (!thread->work_avail) { DebugMessage(M64MSG_ERROR, "Could not create workqueue thread work_avail condition"); SDL_UnlockMutex(workqueue_mgmt.lock); return -1; } #if SDL_VERSION_ATLEAST(2,0,0) thread->thread = SDL_CreateThread(workqueue_thread_handler, "m64pwq", thread); #else thread->thread = SDL_CreateThread(workqueue_thread_handler, thread); #endif if (!thread->thread) { DebugMessage(M64MSG_ERROR, "Could not create workqueue thread handler"); SDL_UnlockMutex(workqueue_mgmt.lock); return -1; } } SDL_UnlockMutex(workqueue_mgmt.lock); return 0; } void workqueue_shutdown(void) { size_t i; int status; struct work_struct *work; struct workqueue_thread *thread, *safe; for (i = 0; i < WORKQUEUE_THREADS; i++) { work = malloc(sizeof(*work)); init_work(work, workqueue_dismiss); queue_work(work); } list_for_each_entry_safe_t(thread, safe, &workqueue_mgmt.thread_list, struct workqueue_thread, list_mgmt) { list_del(&thread->list_mgmt); SDL_WaitThread(thread->thread, &status); SDL_DestroyCond(thread->work_avail); free(thread); } if (!list_empty(&workqueue_mgmt.work_queue)) DebugMessage(M64MSG_WARNING, "Stopped workqueue with work still pending"); SDL_DestroyMutex(workqueue_mgmt.lock); } int queue_work(struct work_struct *work) { struct workqueue_thread *thread; SDL_LockMutex(workqueue_mgmt.lock); list_add_tail(&work->list, &workqueue_mgmt.work_queue); if (!list_empty(&workqueue_mgmt.thread_queue)) { thread = list_first_entry(&workqueue_mgmt.thread_queue, struct workqueue_thread, list); list_del_init(&thread->list); SDL_CondSignal(thread->work_avail); } SDL_UnlockMutex(workqueue_mgmt.lock); return 0; } mupen64plus-core-src-2.5/src/main/workqueue.h000066400000000000000000000044111251723631200212120ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - util.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2012 Mupen64plus development team * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __WORKQUEUE_H__ #define __WORKQUEUE_H__ #include "list.h" #include "osal/preproc.h" struct work_struct; struct work_struct *work; typedef void (*work_func_t)(struct work_struct *work); struct work_struct { work_func_t func; struct list_head list; }; static osal_inline void init_work(struct work_struct *work, work_func_t func) { INIT_LIST_HEAD(&work->list); work->func = func; } #ifdef M64P_PARALLEL int workqueue_init(void); void workqueue_shutdown(void); int queue_work(struct work_struct *work); #else static osal_inline int workqueue_init(void) { return 0; } static osal_inline void workqueue_shutdown(void) { } static osal_inline int queue_work(struct work_struct *work) { work->func(work); return 0; } #endif #endif mupen64plus-core-src-2.5/src/main/zip/000077500000000000000000000000001251723631200176145ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/main/zip/crypt.h000066400000000000000000000112271251723631200211310ustar00rootroot00000000000000/* crypt.h -- base code for crypt/uncrypt ZIPfile Version 1.01e, February 12th, 2005 Copyright (C) 1998-2005 Gilles Vollant This code is a modified version of crypting code in Infozip distribution The encryption/decryption parts of this source code (as opposed to the non-echoing password parts) were originally written in Europe. The whole source package can be freely distributed, including from the USA. (Prior to January 2000, re-export from the US was a violation of US law.) This encryption code is a direct transcription of the algorithm from Roger Schlafly, described by Phil Katz in the file appnote.txt. This file (appnote.txt) is distributed with the PKZIP program (even in the version without encryption capabilities). If you don't need crypting in your application, just define symbols NOCRYPT and NOUNCRYPT. This code support the "Traditional PKWARE Encryption". The new AES encryption added on Zip format by Winzip (see the page http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong Encryption is not supported. */ #define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) /*********************************************************************** * Return the next byte in the pseudo-random sequence */ static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) { unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an * unpredictable manner on 16-bit systems; not a problem * with any known compiler so far, though */ temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2; return (int)(((temp * (temp ^ 1)) >> 8) & 0xff); } /*********************************************************************** * Update the encryption keys with the next byte of plain text */ static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c) { (*(pkeys+0)) = CRC32((*(pkeys+0)), c); (*(pkeys+1)) += (*(pkeys+0)) & 0xff; (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; { register int keyshift = (int)((*(pkeys+1)) >> 24); (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift); } return c; } /*********************************************************************** * Initialize the encryption keys and the random header according to * the given password. */ static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab) { *(pkeys+0) = 305419896L; *(pkeys+1) = 591751049L; *(pkeys+2) = 878082192L; while (*passwd != '\0') { update_keys(pkeys,pcrc_32_tab,(int)*passwd); passwd++; } } #define zdecode(pkeys,pcrc_32_tab,c) \ (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab))) #define zencode(pkeys,pcrc_32_tab,c,t) \ (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c)) #ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED #define RAND_HEAD_LEN 12 /* "last resort" source for second part of crypt seed pattern */ # ifndef ZCR_SEED2 # define ZCR_SEED2 3141592654UL /* use PI as default pattern */ # endif static int crypthead(const char* passwd, /* password string */ unsigned char* buf, /* where to write header */ int bufSize, unsigned long* pkeys, const unsigned long* pcrc_32_tab, unsigned long crcForCrypting) { int n; /* index in random header */ int t; /* temporary */ int c; /* random byte */ unsigned char header[RAND_HEAD_LEN-2]; /* random header */ static unsigned calls = 0; /* ensure different random header each time */ if (bufSize> 7) & 0xff; header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t); } /* Encrypt random header (last two bytes is high word of crc) */ init_keys(passwd, pkeys, pcrc_32_tab); for (n = 0; n < RAND_HEAD_LEN-2; n++) { buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t); } buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t); buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t); return n; } #endif mupen64plus-core-src-2.5/src/main/zip/ioapi.c000066400000000000000000000200411251723631200210560ustar00rootroot00000000000000/* ioapi.h -- IO base function header for compress/uncompress .zip part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) For more info read MiniZip_info.txt */ #if defined(_WIN32) && (!(defined(_CRT_SECURE_NO_WARNINGS))) #define _CRT_SECURE_NO_WARNINGS #endif #if defined(__APPLE__) || defined(IOAPI_NO_64) // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions #define FOPEN_FUNC(filename, mode) fopen(filename, mode) #define FTELLO_FUNC(stream) ftello(stream) #define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) #else #define FOPEN_FUNC(filename, mode) fopen64(filename, mode) #define FTELLO_FUNC(stream) ftello64(stream) #define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) #endif #include "ioapi.h" voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode) { if (pfilefunc->zfile_func64.zopen64_file != NULL) return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode); else { return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode); } } long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin) { if (pfilefunc->zfile_func64.zseek64_file != NULL) return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin); else { uLong offsetTruncated = (uLong)offset; if (offsetTruncated != offset) return -1; else return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin); } } ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream) { if (pfilefunc->zfile_func64.zseek64_file != NULL) return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream); else { uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream); if ((tell_uLong) == MAXU32) return (ZPOS64_T)-1; else return tell_uLong; } } void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32) { p_filefunc64_32->zfile_func64.zopen64_file = NULL; p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file; p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file; p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file; p_filefunc64_32->zfile_func64.ztell64_file = NULL; p_filefunc64_32->zfile_func64.zseek64_file = NULL; p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file; p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; p_filefunc64_32->zfile_func64.opaque = p_filefunc32->opaque; p_filefunc64_32->zseek32_file = p_filefunc32->zseek_file; p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file; } static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode)); static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size)); static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size)); static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream)); static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream)); static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream)); static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode) { FILE* file = NULL; const char* mode_fopen = NULL; if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) mode_fopen = "rb"; else if (mode & ZLIB_FILEFUNC_MODE_EXISTING) mode_fopen = "r+b"; else if (mode & ZLIB_FILEFUNC_MODE_CREATE) mode_fopen = "wb"; if ((filename!=NULL) && (mode_fopen != NULL)) file = fopen(filename, mode_fopen); return file; } static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode) { FILE* file = NULL; const char* mode_fopen = NULL; if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) mode_fopen = "rb"; else if (mode & ZLIB_FILEFUNC_MODE_EXISTING) mode_fopen = "r+b"; else if (mode & ZLIB_FILEFUNC_MODE_CREATE) mode_fopen = "wb"; if ((filename!=NULL) && (mode_fopen != NULL)) file = FOPEN_FUNC((const char*)filename, mode_fopen); return file; } static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size) { uLong ret; ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); return ret; } static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size) { uLong ret; ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); return ret; } static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream) { long ret; ret = ftell((FILE *)stream); return ret; } static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream) { ZPOS64_T ret; ret = FTELLO_FUNC((FILE *)stream); return ret; } static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin) { int fseek_origin=0; long ret; switch (origin) { case ZLIB_FILEFUNC_SEEK_CUR : fseek_origin = SEEK_CUR; break; case ZLIB_FILEFUNC_SEEK_END : fseek_origin = SEEK_END; break; case ZLIB_FILEFUNC_SEEK_SET : fseek_origin = SEEK_SET; break; default: return -1; } ret = 0; if (fseek((FILE *)stream, offset, fseek_origin) != 0) ret = -1; return ret; } static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) { int fseek_origin=0; long ret; switch (origin) { case ZLIB_FILEFUNC_SEEK_CUR : fseek_origin = SEEK_CUR; break; case ZLIB_FILEFUNC_SEEK_END : fseek_origin = SEEK_END; break; case ZLIB_FILEFUNC_SEEK_SET : fseek_origin = SEEK_SET; break; default: return -1; } ret = 0; if(FSEEKO_FUNC((FILE *)stream, offset, fseek_origin) != 0) ret = -1; return ret; } static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream) { int ret; ret = fclose((FILE *)stream); return ret; } static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream) { int ret; ret = ferror((FILE *)stream); return ret; } void fill_fopen_filefunc (pzlib_filefunc_def) zlib_filefunc_def* pzlib_filefunc_def; { pzlib_filefunc_def->zopen_file = fopen_file_func; pzlib_filefunc_def->zread_file = fread_file_func; pzlib_filefunc_def->zwrite_file = fwrite_file_func; pzlib_filefunc_def->ztell_file = ftell_file_func; pzlib_filefunc_def->zseek_file = fseek_file_func; pzlib_filefunc_def->zclose_file = fclose_file_func; pzlib_filefunc_def->zerror_file = ferror_file_func; pzlib_filefunc_def->opaque = NULL; } void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def) { pzlib_filefunc_def->zopen64_file = fopen64_file_func; pzlib_filefunc_def->zread_file = fread_file_func; pzlib_filefunc_def->zwrite_file = fwrite_file_func; pzlib_filefunc_def->ztell64_file = ftell64_file_func; pzlib_filefunc_def->zseek64_file = fseek64_file_func; pzlib_filefunc_def->zclose_file = fclose_file_func; pzlib_filefunc_def->zerror_file = ferror_file_func; pzlib_filefunc_def->opaque = NULL; } mupen64plus-core-src-2.5/src/main/zip/ioapi.h000066400000000000000000000156611251723631200210770ustar00rootroot00000000000000/* ioapi.h -- IO base function header for compress/uncompress .zip part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) For more info read MiniZip_info.txt Changes Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this) Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux. More if/def section may be needed to support other platforms Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows. (but you should use iowin32.c for windows instead) */ #ifndef _ZLIBIOAPI64_H #define _ZLIBIOAPI64_H #if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__)) // Linux needs this to support file operation on files larger then 4+GB // But might need better if/def to select just the platforms that needs them. #ifndef __USE_FILE_OFFSET64 #define __USE_FILE_OFFSET64 #endif #ifndef __USE_LARGEFILE64 #define __USE_LARGEFILE64 #endif #ifndef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE #endif #ifndef _FILE_OFFSET_BIT #define _FILE_OFFSET_BIT 64 #endif #endif #include #include #include "zlib.h" #ifndef OF #define OF _Z_OF #endif #if defined(USE_FILE32API) #define fopen64 fopen #define ftello64 ftell #define fseeko64 fseek #else #ifdef __FreeBSD__ #define fopen64 fopen #define ftello64 ftello #define fseeko64 fseeko #endif #ifdef _MSC_VER #define fopen64 fopen #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) #define ftello64 _ftelli64 #define fseeko64 _fseeki64 #else // old MSC #define ftello64 ftell #define fseeko64 fseek #endif #endif #endif /* #ifndef ZPOS64_T #ifdef _WIN32 #define ZPOS64_T fpos_t #else #include #define ZPOS64_T uint64_t #endif #endif */ #ifdef HAVE_MINIZIP64_CONF_H #include "mz64conf.h" #endif /* a type choosen by DEFINE */ #ifdef HAVE_64BIT_INT_CUSTOM typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T; #else #ifdef HAS_STDINT_H #include "stdint.h" typedef uint64_t ZPOS64_T; #else /* Maximum unsigned 32-bit value used as placeholder for zip64 */ #define MAXU32 0xffffffff #if defined(_MSC_VER) || defined(__BORLANDC__) typedef unsigned __int64 ZPOS64_T; #else typedef unsigned long long int ZPOS64_T; #endif #endif #endif #ifdef __cplusplus extern "C" { #endif #define ZLIB_FILEFUNC_SEEK_CUR (1) #define ZLIB_FILEFUNC_SEEK_END (2) #define ZLIB_FILEFUNC_SEEK_SET (0) #define ZLIB_FILEFUNC_MODE_READ (1) #define ZLIB_FILEFUNC_MODE_WRITE (2) #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) #define ZLIB_FILEFUNC_MODE_EXISTING (4) #define ZLIB_FILEFUNC_MODE_CREATE (8) #ifndef ZCALLBACK #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) #define ZCALLBACK CALLBACK #else #define ZCALLBACK #endif #endif typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); /* here is the "old" 32 bits structure structure */ typedef struct zlib_filefunc_def_s { open_file_func zopen_file; read_file_func zread_file; write_file_func zwrite_file; tell_file_func ztell_file; seek_file_func zseek_file; close_file_func zclose_file; testerror_file_func zerror_file; voidpf opaque; } zlib_filefunc_def; typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream)); typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode)); typedef struct zlib_filefunc64_def_s { open64_file_func zopen64_file; read_file_func zread_file; write_file_func zwrite_file; tell64_file_func ztell64_file; seek64_file_func zseek64_file; close_file_func zclose_file; testerror_file_func zerror_file; voidpf opaque; } zlib_filefunc64_def; void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def)); void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); /* now internal definition, only for zip.c and unzip.h */ typedef struct zlib_filefunc64_32_def_s { zlib_filefunc64_def zfile_func64; open_file_func zopen32_file; tell_file_func ztell32_file; seek_file_func zseek32_file; } zlib_filefunc64_32_def; #define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) #define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) //#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) //#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode)) #define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) #define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream)) voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)); long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)); ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)); void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32); #define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode))) #define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream))) #define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode))) #ifdef __cplusplus } #endif #endif mupen64plus-core-src-2.5/src/main/zip/unzip.c000066400000000000000000002126401251723631200211320ustar00rootroot00000000000000/* unzip.c -- IO for uncompress .zip files using zlib Version 1.1, February 14h, 2010 part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) Modifications of Unzip for Zip64 Copyright (C) 2007-2008 Even Rouault Modifications for Zip64 support on both zip and unzip Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) For more info read MiniZip_info.txt ------------------------------------------------------------------------------------ Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of compatibility with older software. The following is from the original crypt.c. Code woven in by Terry Thorsen 1/2003. Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h] The encryption/decryption parts of this source code (as opposed to the non-echoing password parts) were originally written in Europe. The whole source package can be freely distributed, including from the USA. (Prior to January 2000, re-export from the US was a violation of US law.) This encryption code is a direct transcription of the algorithm from Roger Schlafly, described by Phil Katz in the file appnote.txt. This file (appnote.txt) is distributed with the PKZIP program (even in the version without encryption capabilities). ------------------------------------------------------------------------------------ Changes in unzip.c 2007-2008 - Even Rouault - Addition of cpl_unzGetCurrentFileZStreamPos 2007-2008 - Even Rouault - Decoration of symbol names unz* -> cpl_unz* 2007-2008 - Even Rouault - Remove old C style function prototypes 2007-2008 - Even Rouault - Add unzip support for ZIP64 Copyright (C) 2007-2008 Even Rouault Oct-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again). Oct-2009 - Mathias Svensson - Fixed problem if uncompressed size was > 4G and compressed size was <4G should only read the compressed/uncompressed size from the Zip64 format if the size from normal header was 0xFFFFFFFF Oct-2009 - Mathias Svensson - Applied some bug fixes from paches recived from Gilles Vollant Oct-2009 - Mathias Svensson - Applied support to unzip files with compression mathod BZIP2 (bzip2 lib is required) Patch created by Daniel Borca Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer Copyright (C) 1998 - 2010 Gilles Vollant, Even Rouault, Mathias Svensson */ #include #include #include #ifndef NOUNCRYPT #define NOUNCRYPT #endif #include "unzip.h" #include "zlib.h" #ifdef STDC # include # include # include #endif #ifdef NO_ERRNO_H extern int errno; #else # include #endif #ifndef local # define local static #endif /* compile with -Dlocal if your debugger can't find static symbols */ #ifndef CASESENSITIVITYDEFAULT_NO # if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) # define CASESENSITIVITYDEFAULT_NO # endif #endif #ifndef UNZ_BUFSIZE #define UNZ_BUFSIZE (16384) #endif #ifndef UNZ_MAXFILENAMEINZIP #define UNZ_MAXFILENAMEINZIP (256) #endif #ifndef ALLOC # define ALLOC(size) (malloc(size)) #endif #ifndef TRYFREE # define TRYFREE(p) {if (p) free(p);} #endif #define SIZECENTRALDIRITEM (0x2e) #define SIZEZIPLOCALHEADER (0x1e) const char unz_copyright[] = " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; /* unz_file_info_interntal contain internal info about a file in zipfile*/ typedef struct unz_file_info64_internal_s { ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */ } unz_file_info64_internal; /* file_in_zip_read_info_s contain internal information about a file in zipfile, when reading and decompress it */ typedef struct { char *read_buffer; /* internal buffer for compressed data */ z_stream stream; /* zLib stream structure for inflate */ #ifdef HAVE_BZIP2 bz_stream bstream; /* bzLib stream structure for bziped */ #endif ZPOS64_T pos_in_zipfile; /* position in byte on the zipfile, for fseek*/ uLong stream_initialised; /* flag set if stream structure is initialised*/ ZPOS64_T offset_local_extrafield;/* offset of the local extra field */ uInt size_local_extrafield;/* size of the local extra field */ ZPOS64_T pos_local_extrafield; /* position in the local extra field in read*/ ZPOS64_T total_out_64; uLong crc32; /* crc32 of all data uncompressed */ uLong crc32_wait; /* crc32 we must obtain after decompress all */ ZPOS64_T rest_read_compressed; /* number of byte to be decompressed */ ZPOS64_T rest_read_uncompressed;/*number of byte to be obtained after decomp*/ zlib_filefunc64_32_def z_filefunc; voidpf filestream; /* io structore of the zipfile */ uLong compression_method; /* compression method (0==store) */ ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ int raw; } file_in_zip64_read_info_s; /* unz64_s contain internal information about the zipfile */ typedef struct { zlib_filefunc64_32_def z_filefunc; int is64bitOpenFunction; voidpf filestream; /* io structore of the zipfile */ unz_global_info64 gi; /* public global information */ ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ ZPOS64_T num_file; /* number of the current file in the zipfile*/ ZPOS64_T pos_in_central_dir; /* pos of the current file in the central dir*/ ZPOS64_T current_file_ok; /* flag about the usability of the current file*/ ZPOS64_T central_pos; /* position of the beginning of the central dir*/ ZPOS64_T size_central_dir; /* size of the central directory */ ZPOS64_T offset_central_dir; /* offset of start of central directory with respect to the starting disk number */ unz_file_info64 cur_file_info; /* public info about the current file in zip*/ unz_file_info64_internal cur_file_info_internal; /* private info about it*/ file_in_zip64_read_info_s* pfile_in_zip_read; /* structure about the current file if we are decompressing it */ int encrypted; int isZip64; # ifndef NOUNCRYPT unsigned long keys[3]; /* keys defining the pseudo-random sequence */ const unsigned long* pcrc_32_tab; # endif } unz64_s; #ifndef NOUNCRYPT #include "crypt.h" #endif /* =========================================================================== Read a byte from a gz_stream; update next_in and avail_in. Return EOF for end of file. IN assertion: the stream s has been sucessfully opened for reading. */ local int unz64local_getByte OF(( const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi)); local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi) { unsigned char c; int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); if (err==1) { *pi = (int)c; return UNZ_OK; } else { if (ZERROR64(*pzlib_filefunc_def,filestream)) return UNZ_ERRNO; else return UNZ_EOF; } } /* =========================================================================== Reads a long in LSB order from the given gz_stream. Sets */ local int unz64local_getShort OF(( const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); local int unz64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX) { uLong x ; int i = 0; int err; err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==UNZ_OK) err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x |= ((uLong)i)<<8; if (err==UNZ_OK) *pX = x; else *pX = 0; return err; } local int unz64local_getLong OF(( const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); local int unz64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX) { uLong x ; int i = 0; int err; err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==UNZ_OK) err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x |= ((uLong)i)<<8; if (err==UNZ_OK) err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x |= ((uLong)i)<<16; if (err==UNZ_OK) err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<24; if (err==UNZ_OK) *pX = x; else *pX = 0; return err; } local int unz64local_getLong64 OF(( const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)); local int unz64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX) { ZPOS64_T x ; int i = 0; int err; err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x = (ZPOS64_T)i; if (err==UNZ_OK) err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x |= ((ZPOS64_T)i)<<8; if (err==UNZ_OK) err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x |= ((ZPOS64_T)i)<<16; if (err==UNZ_OK) err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x |= ((ZPOS64_T)i)<<24; if (err==UNZ_OK) err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x |= ((ZPOS64_T)i)<<32; if (err==UNZ_OK) err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x |= ((ZPOS64_T)i)<<40; if (err==UNZ_OK) err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x |= ((ZPOS64_T)i)<<48; if (err==UNZ_OK) err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x |= ((ZPOS64_T)i)<<56; if (err==UNZ_OK) *pX = x; else *pX = 0; return err; } /* My own strcmpi / strcasecmp */ local int strcmpcasenosensitive_internal (const char* fileName1, const char* fileName2) { for (;;) { char c1=*(fileName1++); char c2=*(fileName2++); if ((c1>='a') && (c1<='z')) c1 -= 0x20; if ((c2>='a') && (c2<='z')) c2 -= 0x20; if (c1=='\0') return ((c2=='\0') ? 0 : -1); if (c2=='\0') return 1; if (c1c2) return 1; } } #ifdef CASESENSITIVITYDEFAULT_NO #define CASESENSITIVITYDEFAULTVALUE 2 #else #define CASESENSITIVITYDEFAULTVALUE 1 #endif #ifndef STRCMPCASENOSENTIVEFUNCTION #define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal #endif /* Compare two filename (fileName1,fileName2). If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi or strcasecmp) If iCaseSenisivity = 0, case sensitivity is defaut of your operating system (like 1 on Unix, 2 on Windows) */ extern int ZEXPORT unzStringFileNameCompare (const char* fileName1, const char* fileName2, int iCaseSensitivity) { if (iCaseSensitivity==0) iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE; if (iCaseSensitivity==1) return strcmp(fileName1,fileName2); return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2); } #ifndef BUFREADCOMMENT #define BUFREADCOMMENT (0x400) #endif /* Locate the Central directory of a zipfile (at the end, just before the global comment) */ local ZPOS64_T unz64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) { unsigned char* buf; ZPOS64_T uSizeFile; ZPOS64_T uBackRead; ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ ZPOS64_T uPosFound=0; if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) return 0; uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); if (uMaxBack>uSizeFile) uMaxBack = uSizeFile; buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); if (buf==NULL) return 0; uBackRead = 4; while (uBackReaduMaxBack) uBackRead = uMaxBack; else uBackRead+=BUFREADCOMMENT; uReadPos = uSizeFile-uBackRead ; uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) break; if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) break; for (i=(int)uReadSize-3; (i--)>0;) if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) { uPosFound = uReadPos+i; break; } if (uPosFound!=0) break; } TRYFREE(buf); return uPosFound; } /* Locate the Central directory 64 of a zipfile (at the end, just before the global comment) */ local ZPOS64_T unz64local_SearchCentralDir64 OF(( const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) { unsigned char* buf; ZPOS64_T uSizeFile; ZPOS64_T uBackRead; ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ ZPOS64_T uPosFound=0; uLong uL; ZPOS64_T relativeOffset; if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) return 0; uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); if (uMaxBack>uSizeFile) uMaxBack = uSizeFile; buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); if (buf==NULL) return 0; uBackRead = 4; while (uBackReaduMaxBack) uBackRead = uMaxBack; else uBackRead+=BUFREADCOMMENT; uReadPos = uSizeFile-uBackRead ; uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) break; if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) break; for (i=(int)uReadSize-3; (i--)>0;) if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) { uPosFound = uReadPos+i; break; } if (uPosFound!=0) break; } TRYFREE(buf); if (uPosFound == 0) return 0; /* Zip64 end of central directory locator */ if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0) return 0; /* the signature, already checked */ if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) return 0; /* number of the disk with the start of the zip64 end of central directory */ if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) return 0; if (uL != 0) return 0; /* relative offset of the zip64 end of central directory record */ if (unz64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=UNZ_OK) return 0; /* total number of disks */ if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) return 0; if (uL != 1) return 0; /* Goto end of central directory record */ if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0) return 0; /* the signature */ if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) return 0; if (uL != 0x06064b50) return 0; return relativeOffset; } /* Open a Zip file. path contain the full pathname (by example, on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer "zlib/zlib114.zip". If the zipfile cannot be opened (file doesn't exist or in not valid), the return value is NULL. Else, the return value is a unzFile Handle, usable with other function of this unzip package. */ local unzFile unzOpenInternal (const void *path, zlib_filefunc64_32_def* pzlib_filefunc64_32_def, int is64bitOpenFunction) { unz64_s us; unz64_s *s; ZPOS64_T central_pos; uLong uL; uLong number_disk; /* number of the current dist, used for spaning ZIP, unsupported, always 0*/ uLong number_disk_with_CD; /* number the the disk with central dir, used for spaning ZIP, unsupported, always 0*/ ZPOS64_T number_entry_CD; /* total number of entries in the central dir (same than number_entry on nospan) */ int err=UNZ_OK; if (unz_copyright[0]!=' ') return NULL; us.z_filefunc.zseek32_file = NULL; us.z_filefunc.ztell32_file = NULL; if (pzlib_filefunc64_32_def==NULL) fill_fopen64_filefunc(&us.z_filefunc.zfile_func64); else us.z_filefunc = *pzlib_filefunc64_32_def; us.is64bitOpenFunction = is64bitOpenFunction; us.filestream = ZOPEN64(us.z_filefunc, path, ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_EXISTING); if (us.filestream==NULL) return NULL; central_pos = unz64local_SearchCentralDir64(&us.z_filefunc,us.filestream); if (central_pos) { uLong uS; ZPOS64_T uL64; us.isZip64 = 1; if (ZSEEK64(us.z_filefunc, us.filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) err=UNZ_ERRNO; /* the signature, already checked */ if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) err=UNZ_ERRNO; /* size of zip64 end of central directory record */ if (unz64local_getLong64(&us.z_filefunc, us.filestream,&uL64)!=UNZ_OK) err=UNZ_ERRNO; /* version made by */ if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK) err=UNZ_ERRNO; /* version needed to extract */ if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK) err=UNZ_ERRNO; /* number of this disk */ if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) err=UNZ_ERRNO; /* number of the disk with the start of the central directory */ if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) err=UNZ_ERRNO; /* total number of entries in the central directory on this disk */ if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK) err=UNZ_ERRNO; /* total number of entries in the central directory */ if (unz64local_getLong64(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK) err=UNZ_ERRNO; if ((number_entry_CD!=us.gi.number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) err=UNZ_BADZIPFILE; /* size of the central directory */ if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK) err=UNZ_ERRNO; /* offset of start of central directory with respect to the starting disk number */ if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK) err=UNZ_ERRNO; us.gi.size_comment = 0; } else { central_pos = unz64local_SearchCentralDir(&us.z_filefunc,us.filestream); if (central_pos==0) err=UNZ_ERRNO; us.isZip64 = 0; if (ZSEEK64(us.z_filefunc, us.filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) err=UNZ_ERRNO; /* the signature, already checked */ if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) err=UNZ_ERRNO; /* number of this disk */ if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) err=UNZ_ERRNO; /* number of the disk with the start of the central directory */ if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) err=UNZ_ERRNO; /* total number of entries in the central dir on this disk */ if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) err=UNZ_ERRNO; us.gi.number_entry = uL; /* total number of entries in the central dir */ if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) err=UNZ_ERRNO; number_entry_CD = uL; if ((number_entry_CD!=us.gi.number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) err=UNZ_BADZIPFILE; /* size of the central directory */ if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) err=UNZ_ERRNO; us.size_central_dir = uL; /* offset of start of central directory with respect to the starting disk number */ if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) err=UNZ_ERRNO; us.offset_central_dir = uL; /* zipfile comment length */ if (unz64local_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK) err=UNZ_ERRNO; } if ((central_pospfile_in_zip_read!=NULL) unzCloseCurrentFile(file); ZCLOSE64(s->z_filefunc, s->filestream); TRYFREE(s); return UNZ_OK; } /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */ extern int ZEXPORT unzGetGlobalInfo64 (unzFile file, unz_global_info64* pglobal_info) { unz64_s* s; if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; *pglobal_info=s->gi; return UNZ_OK; } extern int ZEXPORT unzGetGlobalInfo (unzFile file, unz_global_info* pglobal_info32) { unz64_s* s; if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; /* to do : check if number_entry is not truncated */ pglobal_info32->number_entry = (uLong)s->gi.number_entry; pglobal_info32->size_comment = s->gi.size_comment; return UNZ_OK; } /* Translate date/time from Dos format to tm_unz (readable more easilty) */ local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm) { ZPOS64_T uDate; uDate = (ZPOS64_T)(ulDosDate>>16); ptm->tm_mday = (uInt)(uDate&0x1f) ; ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800); ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ; ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ; } /* Get Info about the current file in the zipfile, with internal only info */ local int unz64local_GetCurrentFileInfoInternal OF((unzFile file, unz_file_info64 *pfile_info, unz_file_info64_internal *pfile_info_internal, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)); local int unz64local_GetCurrentFileInfoInternal (unzFile file, unz_file_info64 *pfile_info, unz_file_info64_internal *pfile_info_internal, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize) { unz64_s* s; unz_file_info64 file_info; unz_file_info64_internal file_info_internal; int err=UNZ_OK; uLong uMagic; long lSeek=0; uLong uL; if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; if (ZSEEK64(s->z_filefunc, s->filestream, s->pos_in_central_dir+s->byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET)!=0) err=UNZ_ERRNO; /* we check the magic */ if (err==UNZ_OK) { if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) err=UNZ_ERRNO; else if (uMagic!=0x02014b50) err=UNZ_BADZIPFILE; } if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) err=UNZ_ERRNO; if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK) err=UNZ_ERRNO; if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK) err=UNZ_ERRNO; if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK) err=UNZ_ERRNO; if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK) err=UNZ_ERRNO; unz64local_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK) err=UNZ_ERRNO; if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) err=UNZ_ERRNO; file_info.compressed_size = uL; if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) err=UNZ_ERRNO; file_info.uncompressed_size = uL; if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK) err=UNZ_ERRNO; if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK) err=UNZ_ERRNO; if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK) err=UNZ_ERRNO; if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) err=UNZ_ERRNO; if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK) err=UNZ_ERRNO; if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK) err=UNZ_ERRNO; // relative offset of local header if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) err=UNZ_ERRNO; file_info_internal.offset_curfile = uL; lSeek+=file_info.size_filename; if ((err==UNZ_OK) && (szFileName!=NULL)) { uLong uSizeRead ; if (file_info.size_filename0) && (fileNameBufferSize>0)) if (ZREAD64(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead) err=UNZ_ERRNO; lSeek -= uSizeRead; } // Read extrafield if ((err==UNZ_OK) && (extraField!=NULL)) { ZPOS64_T uSizeRead ; if (file_info.size_file_extraz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; } if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) if (ZREAD64(s->z_filefunc, s->filestream,extraField,(uLong)uSizeRead)!=uSizeRead) err=UNZ_ERRNO; lSeek += file_info.size_file_extra - (uLong)uSizeRead; } else lSeek += file_info.size_file_extra; if ((err==UNZ_OK) && (file_info.size_file_extra != 0)) { uLong acc = 0; // since lSeek now points to after the extra field we need to move back lSeek -= file_info.size_file_extra; if (lSeek!=0) { if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; } while(acc < file_info.size_file_extra) { uLong headerId; uLong dataSize; if (unz64local_getShort(&s->z_filefunc, s->filestream,&headerId) != UNZ_OK) err=UNZ_ERRNO; if (unz64local_getShort(&s->z_filefunc, s->filestream,&dataSize) != UNZ_OK) err=UNZ_ERRNO; /* ZIP64 extra fields */ if (headerId == 0x0001) { uLong uL; if(file_info.uncompressed_size == MAXU32) { if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) err=UNZ_ERRNO; } if(file_info.compressed_size == MAXU32) { if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) err=UNZ_ERRNO; } if(file_info_internal.offset_curfile == MAXU32) { /* Relative Header offset */ if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) err=UNZ_ERRNO; } if(file_info.disk_num_start == MAXU32) { /* Disk Start Number */ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) err=UNZ_ERRNO; } } else { if (ZSEEK64(s->z_filefunc, s->filestream,dataSize,ZLIB_FILEFUNC_SEEK_CUR)!=0) err=UNZ_ERRNO; } acc += 2 + 2 + dataSize; } } if ((err==UNZ_OK) && (szComment!=NULL)) { uLong uSizeRead ; if (file_info.size_file_commentz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; } if ((file_info.size_file_comment>0) && (commentBufferSize>0)) if (ZREAD64(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) err=UNZ_ERRNO; lSeek+=file_info.size_file_comment - uSizeRead; } else lSeek+=file_info.size_file_comment; if ((err==UNZ_OK) && (pfile_info!=NULL)) *pfile_info=file_info; if ((err==UNZ_OK) && (pfile_info_internal!=NULL)) *pfile_info_internal=file_info_internal; return err; } /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */ extern int ZEXPORT unzGetCurrentFileInfo64 (unzFile file, unz_file_info64 * pfile_info, char * szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char* szComment, uLong commentBufferSize) { return unz64local_GetCurrentFileInfoInternal(file,pfile_info,NULL, szFileName,fileNameBufferSize, extraField,extraFieldBufferSize, szComment,commentBufferSize); } extern int ZEXPORT unzGetCurrentFileInfo (unzFile file, unz_file_info * pfile_info, char * szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char* szComment, uLong commentBufferSize) { int err; unz_file_info64 file_info64; err = unz64local_GetCurrentFileInfoInternal(file,&file_info64,NULL, szFileName,fileNameBufferSize, extraField,extraFieldBufferSize, szComment,commentBufferSize); if ((err==UNZ_OK) && (pfile_info != NULL)) { pfile_info->version = file_info64.version; pfile_info->version_needed = file_info64.version_needed; pfile_info->flag = file_info64.flag; pfile_info->compression_method = file_info64.compression_method; pfile_info->dosDate = file_info64.dosDate; pfile_info->crc = file_info64.crc; pfile_info->size_filename = file_info64.size_filename; pfile_info->size_file_extra = file_info64.size_file_extra; pfile_info->size_file_comment = file_info64.size_file_comment; pfile_info->disk_num_start = file_info64.disk_num_start; pfile_info->internal_fa = file_info64.internal_fa; pfile_info->external_fa = file_info64.external_fa; pfile_info->tmu_date = file_info64.tmu_date, pfile_info->compressed_size = (uLong)file_info64.compressed_size; pfile_info->uncompressed_size = (uLong)file_info64.uncompressed_size; } return err; } /* Set the current file of the zipfile to the first file. return UNZ_OK if there is no problem */ extern int ZEXPORT unzGoToFirstFile (unzFile file) { int err=UNZ_OK; unz64_s* s; if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; s->pos_in_central_dir=s->offset_central_dir; s->num_file=0; err=unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, NULL,0,NULL,0,NULL,0); s->current_file_ok = (err == UNZ_OK); return err; } /* Set the current file of the zipfile to the next file. return UNZ_OK if there is no problem return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. */ extern int ZEXPORT unzGoToNextFile (unzFile file) { unz64_s* s; int err; if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE; if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */ if (s->num_file+1==s->gi.number_entry) return UNZ_END_OF_LIST_OF_FILE; s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; s->num_file++; err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, NULL,0,NULL,0,NULL,0); s->current_file_ok = (err == UNZ_OK); return err; } /* Try locate the file szFileName in the zipfile. For the iCaseSensitivity signification, see unzipStringFileNameCompare return value : UNZ_OK if the file is found. It becomes the current file. UNZ_END_OF_LIST_OF_FILE if the file is not found */ extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity) { unz64_s* s; int err; /* We remember the 'current' position in the file so that we can jump * back there if we fail. */ unz_file_info64 cur_file_infoSaved; unz_file_info64_internal cur_file_info_internalSaved; ZPOS64_T num_fileSaved; ZPOS64_T pos_in_central_dirSaved; if (file==NULL) return UNZ_PARAMERROR; if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) return UNZ_PARAMERROR; s=(unz64_s*)file; if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE; /* Save the current state */ num_fileSaved = s->num_file; pos_in_central_dirSaved = s->pos_in_central_dir; cur_file_infoSaved = s->cur_file_info; cur_file_info_internalSaved = s->cur_file_info_internal; err = unzGoToFirstFile(file); while (err == UNZ_OK) { char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; err = unzGetCurrentFileInfo64(file,NULL, szCurrentFileName,sizeof(szCurrentFileName)-1, NULL,0,NULL,0); if (err == UNZ_OK) { if (unzStringFileNameCompare(szCurrentFileName, szFileName,iCaseSensitivity)==0) return UNZ_OK; err = unzGoToNextFile(file); } } /* We failed, so restore the state of the 'current file' to where we * were. */ s->num_file = num_fileSaved ; s->pos_in_central_dir = pos_in_central_dirSaved ; s->cur_file_info = cur_file_infoSaved; s->cur_file_info_internal = cur_file_info_internalSaved; return err; } /* /////////////////////////////////////////// // Contributed by Ryan Haksi (mailto://cryogen@infoserve.net) // I need random access // // Further optimization could be realized by adding an ability // to cache the directory in memory. The goal being a single // comprehensive file read to put the file I need in a memory. */ /* typedef struct unz_file_pos_s { ZPOS64_T pos_in_zip_directory; // offset in file ZPOS64_T num_of_file; // # of file } unz_file_pos; */ extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_pos) { unz64_s* s; if (file==NULL || file_pos==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE; file_pos->pos_in_zip_directory = s->pos_in_central_dir; file_pos->num_of_file = s->num_file; return UNZ_OK; } extern int ZEXPORT unzGetFilePos( unzFile file, unz_file_pos* file_pos) { unz64_file_pos file_pos64; int err = unzGetFilePos64(file,&file_pos64); if (err==UNZ_OK) { file_pos->pos_in_zip_directory = (uLong)file_pos64.pos_in_zip_directory; file_pos->num_of_file = (uLong)file_pos64.num_of_file; } return err; } extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos) { unz64_s* s; int err; if (file==NULL || file_pos==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; /* jump to the right spot */ s->pos_in_central_dir = file_pos->pos_in_zip_directory; s->num_file = file_pos->num_of_file; /* set the current file */ err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, NULL,0,NULL,0,NULL,0); /* return results */ s->current_file_ok = (err == UNZ_OK); return err; } extern int ZEXPORT unzGoToFilePos( unzFile file, unz_file_pos* file_pos) { unz64_file_pos file_pos64; if (file_pos == NULL) return UNZ_PARAMERROR; file_pos64.pos_in_zip_directory = file_pos->pos_in_zip_directory; file_pos64.num_of_file = file_pos->num_of_file; return unzGoToFilePos64(file,&file_pos64); } /* // Unzip Helper Functions - should be here? /////////////////////////////////////////// */ /* Read the local header of the current zipfile Check the coherency of the local header and info in the end of central directory about this file store in *piSizeVar the size of extra info in local header (filename and size of extra field data) */ local int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVar, ZPOS64_T * poffset_local_extrafield, uInt * psize_local_extrafield) { uLong uMagic,uData,uFlags; uLong size_filename; uLong size_extra_field; int err=UNZ_OK; *piSizeVar = 0; *poffset_local_extrafield = 0; *psize_local_extrafield = 0; if (ZSEEK64(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile + s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (err==UNZ_OK) { if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) err=UNZ_ERRNO; else if (uMagic!=0x04034b50) err=UNZ_BADZIPFILE; } if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) err=UNZ_ERRNO; /* else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion)) err=UNZ_BADZIPFILE; */ if (unz64local_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK) err=UNZ_ERRNO; if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) err=UNZ_ERRNO; else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) err=UNZ_BADZIPFILE; if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && /* #ifdef HAVE_BZIP2 */ (s->cur_file_info.compression_method!=Z_BZIP2ED) && /* #endif */ (s->cur_file_info.compression_method!=Z_DEFLATED)) err=UNZ_BADZIPFILE; if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */ err=UNZ_ERRNO; if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */ err=UNZ_ERRNO; else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && ((uFlags & 8)==0)) err=UNZ_BADZIPFILE; if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */ err=UNZ_ERRNO; else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && ((uFlags & 8)==0)) err=UNZ_BADZIPFILE; if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */ err=UNZ_ERRNO; else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && ((uFlags & 8)==0)) err=UNZ_BADZIPFILE; if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK) err=UNZ_ERRNO; else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename)) err=UNZ_BADZIPFILE; *piSizeVar += (uInt)size_filename; if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK) err=UNZ_ERRNO; *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + size_filename; *psize_local_extrafield = (uInt)size_extra_field; *piSizeVar += (uInt)size_extra_field; return err; } /* Open for reading data the current file in the zipfile. If there is no error and the file is opened, the return value is UNZ_OK. */ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method, int* level, int raw, const char* password) { int err=UNZ_OK; uInt iSizeVar; unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; ZPOS64_T offset_local_extrafield; /* offset of the local extra field */ uInt size_local_extrafield; /* size of the local extra field */ # ifndef NOUNCRYPT char source[12]; # else if (password != NULL) return UNZ_PARAMERROR; # endif if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; if (!s->current_file_ok) return UNZ_PARAMERROR; if (s->pfile_in_zip_read != NULL) unzCloseCurrentFile(file); if (unz64local_CheckCurrentFileCoherencyHeader(s,&iSizeVar, &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) return UNZ_BADZIPFILE; pfile_in_zip_read_info = (file_in_zip64_read_info_s*)ALLOC(sizeof(file_in_zip64_read_info_s)); if (pfile_in_zip_read_info==NULL) return UNZ_INTERNALERROR; pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE); pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield; pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield; pfile_in_zip_read_info->pos_local_extrafield=0; pfile_in_zip_read_info->raw=raw; if (pfile_in_zip_read_info->read_buffer==NULL) { TRYFREE(pfile_in_zip_read_info); return UNZ_INTERNALERROR; } pfile_in_zip_read_info->stream_initialised=0; if (method!=NULL) *method = (int)s->cur_file_info.compression_method; if (level!=NULL) { *level = 6; switch (s->cur_file_info.flag & 0x06) { case 6 : *level = 1; break; case 4 : *level = 2; break; case 2 : *level = 9; break; } } if ((s->cur_file_info.compression_method!=0) && /* #ifdef HAVE_BZIP2 */ (s->cur_file_info.compression_method!=Z_BZIP2ED) && /* #endif */ (s->cur_file_info.compression_method!=Z_DEFLATED)) err=UNZ_BADZIPFILE; pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc; pfile_in_zip_read_info->crc32=0; pfile_in_zip_read_info->total_out_64=0; pfile_in_zip_read_info->compression_method = s->cur_file_info.compression_method; pfile_in_zip_read_info->filestream=s->filestream; pfile_in_zip_read_info->z_filefunc=s->z_filefunc; pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile; pfile_in_zip_read_info->stream.total_out = 0; if ((s->cur_file_info.compression_method==Z_BZIP2ED) && (!raw)) { #ifdef HAVE_BZIP2 pfile_in_zip_read_info->bstream.bzalloc = (void *(*) (void *, int, int))0; pfile_in_zip_read_info->bstream.bzfree = (free_func)0; pfile_in_zip_read_info->bstream.opaque = (voidpf)0; pfile_in_zip_read_info->bstream.state = (voidpf)0; pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; pfile_in_zip_read_info->stream.zfree = (free_func)0; pfile_in_zip_read_info->stream.opaque = (voidpf)0; pfile_in_zip_read_info->stream.next_in = (voidpf)0; pfile_in_zip_read_info->stream.avail_in = 0; err=BZ2_bzDecompressInit(&pfile_in_zip_read_info->bstream, 0, 0); if (err == Z_OK) pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED; else { TRYFREE(pfile_in_zip_read_info); return err; } #else pfile_in_zip_read_info->raw=1; #endif } else if ((s->cur_file_info.compression_method==Z_DEFLATED) && (!raw)) { pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; pfile_in_zip_read_info->stream.zfree = (free_func)0; pfile_in_zip_read_info->stream.opaque = (voidpf)0; pfile_in_zip_read_info->stream.next_in = 0; pfile_in_zip_read_info->stream.avail_in = 0; err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS); if (err == Z_OK) pfile_in_zip_read_info->stream_initialised=Z_DEFLATED; else { TRYFREE(pfile_in_zip_read_info); return err; } /* windowBits is passed < 0 to tell that there is no zlib header. * Note that in this case inflate *requires* an extra "dummy" byte * after the compressed stream in order to complete decompression and * return Z_STREAM_END. * In unzip, i don't wait absolutely Z_STREAM_END because I known the * size of both compressed and uncompressed data */ } pfile_in_zip_read_info->rest_read_compressed = s->cur_file_info.compressed_size ; pfile_in_zip_read_info->rest_read_uncompressed = s->cur_file_info.uncompressed_size ; pfile_in_zip_read_info->pos_in_zipfile = s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + iSizeVar; pfile_in_zip_read_info->stream.avail_in = (uInt)0; s->pfile_in_zip_read = pfile_in_zip_read_info; s->encrypted = 0; # ifndef NOUNCRYPT if (password != NULL) { int i; s->pcrc_32_tab = get_crc_table(); init_keys(password,s->keys,s->pcrc_32_tab); if (ZSEEK64(s->z_filefunc, s->filestream, s->pfile_in_zip_read->pos_in_zipfile + s->pfile_in_zip_read->byte_before_the_zipfile, SEEK_SET)!=0) return UNZ_INTERNALERROR; if(ZREAD64(s->z_filefunc, s->filestream,source, 12)<12) return UNZ_INTERNALERROR; for (i = 0; i<12; i++) zdecode(s->keys,s->pcrc_32_tab,source[i]); s->pfile_in_zip_read->pos_in_zipfile+=12; s->encrypted=1; } # endif return UNZ_OK; } extern int ZEXPORT unzOpenCurrentFile (unzFile file) { return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL); } extern int ZEXPORT unzOpenCurrentFilePassword (unzFile file, const char* password) { return unzOpenCurrentFile3(file, NULL, NULL, 0, password); } extern int ZEXPORT unzOpenCurrentFile2 (unzFile file, int* method, int* level, int raw) { return unzOpenCurrentFile3(file, method, level, raw, NULL); } /** Addition for GDAL : START */ extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64( unzFile file) { unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; s=(unz64_s*)file; if (file==NULL) return 0; //UNZ_PARAMERROR; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return 0; //UNZ_PARAMERROR; return pfile_in_zip_read_info->pos_in_zipfile + pfile_in_zip_read_info->byte_before_the_zipfile; } /** Addition for GDAL : END */ /* Read bytes from the current file. buf contain buffer where data must be copied len the size of buf. return the number of byte copied if somes bytes are copied return 0 if the end of file was reached return <0 with error code if there is an error (UNZ_ERRNO for IO error, or zLib error for uncompress error) */ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) { int err=UNZ_OK; uInt iRead = 0; unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; if (pfile_in_zip_read_info->read_buffer == NULL) return UNZ_END_OF_LIST_OF_FILE; if (len==0) return 0; pfile_in_zip_read_info->stream.next_out = (Bytef*)buf; pfile_in_zip_read_info->stream.avail_out = (uInt)len; if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && (!(pfile_in_zip_read_info->raw))) pfile_in_zip_read_info->stream.avail_out = (uInt)pfile_in_zip_read_info->rest_read_uncompressed; if ((len>pfile_in_zip_read_info->rest_read_compressed+ pfile_in_zip_read_info->stream.avail_in) && (pfile_in_zip_read_info->raw)) pfile_in_zip_read_info->stream.avail_out = (uInt)pfile_in_zip_read_info->rest_read_compressed+ pfile_in_zip_read_info->stream.avail_in; while (pfile_in_zip_read_info->stream.avail_out>0) { if ((pfile_in_zip_read_info->stream.avail_in==0) && (pfile_in_zip_read_info->rest_read_compressed>0)) { uInt uReadThis = UNZ_BUFSIZE; if (pfile_in_zip_read_info->rest_read_compressedrest_read_compressed; if (uReadThis == 0) return UNZ_EOF; if (ZSEEK64(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->pos_in_zipfile + pfile_in_zip_read_info->byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (ZREAD64(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->read_buffer, uReadThis)!=uReadThis) return UNZ_ERRNO; # ifndef NOUNCRYPT if(s->encrypted) { uInt i; for(i=0;iread_buffer[i] = zdecode(s->keys,s->pcrc_32_tab, pfile_in_zip_read_info->read_buffer[i]); } # endif pfile_in_zip_read_info->pos_in_zipfile += uReadThis; pfile_in_zip_read_info->rest_read_compressed-=uReadThis; pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->read_buffer; pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis; } if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw)) { uInt uDoCopy,i ; if ((pfile_in_zip_read_info->stream.avail_in == 0) && (pfile_in_zip_read_info->rest_read_compressed == 0)) return (iRead==0) ? UNZ_EOF : iRead; if (pfile_in_zip_read_info->stream.avail_out < pfile_in_zip_read_info->stream.avail_in) uDoCopy = pfile_in_zip_read_info->stream.avail_out ; else uDoCopy = pfile_in_zip_read_info->stream.avail_in ; for (i=0;istream.next_out+i) = *(pfile_in_zip_read_info->stream.next_in+i); pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uDoCopy; pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32, pfile_in_zip_read_info->stream.next_out, uDoCopy); pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy; pfile_in_zip_read_info->stream.avail_in -= uDoCopy; pfile_in_zip_read_info->stream.avail_out -= uDoCopy; pfile_in_zip_read_info->stream.next_out += uDoCopy; pfile_in_zip_read_info->stream.next_in += uDoCopy; pfile_in_zip_read_info->stream.total_out += uDoCopy; iRead += uDoCopy; } else if (pfile_in_zip_read_info->compression_method==Z_BZIP2ED) { #ifdef HAVE_BZIP2 uLong uTotalOutBefore,uTotalOutAfter; const Bytef *bufBefore; uLong uOutThis; pfile_in_zip_read_info->bstream.next_in = (char*)pfile_in_zip_read_info->stream.next_in; pfile_in_zip_read_info->bstream.avail_in = pfile_in_zip_read_info->stream.avail_in; pfile_in_zip_read_info->bstream.total_in_lo32 = pfile_in_zip_read_info->stream.total_in; pfile_in_zip_read_info->bstream.total_in_hi32 = 0; pfile_in_zip_read_info->bstream.next_out = (char*)pfile_in_zip_read_info->stream.next_out; pfile_in_zip_read_info->bstream.avail_out = pfile_in_zip_read_info->stream.avail_out; pfile_in_zip_read_info->bstream.total_out_lo32 = pfile_in_zip_read_info->stream.total_out; pfile_in_zip_read_info->bstream.total_out_hi32 = 0; uTotalOutBefore = pfile_in_zip_read_info->bstream.total_out_lo32; bufBefore = (const Bytef *)pfile_in_zip_read_info->bstream.next_out; err=BZ2_bzDecompress(&pfile_in_zip_read_info->bstream); uTotalOutAfter = pfile_in_zip_read_info->bstream.total_out_lo32; uOutThis = uTotalOutAfter-uTotalOutBefore; pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis; pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis)); pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis; iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->bstream.next_in; pfile_in_zip_read_info->stream.avail_in = pfile_in_zip_read_info->bstream.avail_in; pfile_in_zip_read_info->stream.total_in = pfile_in_zip_read_info->bstream.total_in_lo32; pfile_in_zip_read_info->stream.next_out = (Bytef*)pfile_in_zip_read_info->bstream.next_out; pfile_in_zip_read_info->stream.avail_out = pfile_in_zip_read_info->bstream.avail_out; pfile_in_zip_read_info->stream.total_out = pfile_in_zip_read_info->bstream.total_out_lo32; if (err==BZ_STREAM_END) return (iRead==0) ? UNZ_EOF : iRead; if (err!=BZ_OK) break; #endif } // end Z_BZIP2ED else { ZPOS64_T uTotalOutBefore,uTotalOutAfter; const Bytef *bufBefore; ZPOS64_T uOutThis; int flush=Z_SYNC_FLUSH; uTotalOutBefore = pfile_in_zip_read_info->stream.total_out; bufBefore = pfile_in_zip_read_info->stream.next_out; /* if ((pfile_in_zip_read_info->rest_read_uncompressed == pfile_in_zip_read_info->stream.avail_out) && (pfile_in_zip_read_info->rest_read_compressed == 0)) flush = Z_FINISH; */ err=inflate(&pfile_in_zip_read_info->stream,flush); if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL)) err = Z_DATA_ERROR; uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; uOutThis = uTotalOutAfter-uTotalOutBefore; pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis; pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis)); pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis; iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); if (err==Z_STREAM_END) return (iRead==0) ? UNZ_EOF : iRead; if (err!=Z_OK) break; } } if (err==Z_OK) return iRead; return err; } /* Give the current position in uncompressed data */ extern z_off_t ZEXPORT unztell (unzFile file) { unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; return (z_off_t)pfile_in_zip_read_info->stream.total_out; } extern ZPOS64_T ZEXPORT unztell64 (unzFile file) { unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; if (file==NULL) return (ZPOS64_T)-1; s=(unz64_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return (ZPOS64_T)-1; return pfile_in_zip_read_info->total_out_64; } /* return 1 if the end of file was reached, 0 elsewhere */ extern int ZEXPORT unzeof (unzFile file) { unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; if (pfile_in_zip_read_info->rest_read_uncompressed == 0) return 1; else return 0; } /* Read extra field from the current file (opened by unzOpenCurrentFile) This is the local-header version of the extra field (sometimes, there is more info in the local-header version than in the central-header) if buf==NULL, it return the size of the local extra field that can be read if buf!=NULL, len is the size of the buffer, the extra header is copied in buf. the return value is the number of bytes copied in buf, or (if <0) the error code */ extern int ZEXPORT unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len) { unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; uInt read_now; ZPOS64_T size_to_read; if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; size_to_read = (pfile_in_zip_read_info->size_local_extrafield - pfile_in_zip_read_info->pos_local_extrafield); if (buf==NULL) return (int)size_to_read; if (len>size_to_read) read_now = (uInt)size_to_read; else read_now = (uInt)len ; if (read_now==0) return 0; if (ZSEEK64(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->offset_local_extrafield + pfile_in_zip_read_info->pos_local_extrafield, ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (ZREAD64(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, buf,read_now)!=read_now) return UNZ_ERRNO; return (int)read_now; } /* Close the file in zip opened with unzipOpenCurrentFile Return UNZ_CRCERROR if all the file was read but the CRC is not good */ extern int ZEXPORT unzCloseCurrentFile (unzFile file) { int err=UNZ_OK; unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) && (!pfile_in_zip_read_info->raw)) { if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait) err=UNZ_CRCERROR; } TRYFREE(pfile_in_zip_read_info->read_buffer); pfile_in_zip_read_info->read_buffer = NULL; if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED) inflateEnd(&pfile_in_zip_read_info->stream); #ifdef HAVE_BZIP2 else if (pfile_in_zip_read_info->stream_initialised == Z_BZIP2ED) BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream); #endif pfile_in_zip_read_info->stream_initialised = 0; TRYFREE(pfile_in_zip_read_info); s->pfile_in_zip_read=NULL; return err; } /* Get the global comment string of the ZipFile, in the szComment buffer. uSizeBuf is the size of the szComment buffer. return the number of byte copied or an error code <0 */ extern int ZEXPORT unzGetGlobalComment (unzFile file, char * szComment, uLong uSizeBuf) { unz64_s* s; uLong uReadThis ; if (file==NULL) return (int)UNZ_PARAMERROR; s=(unz64_s*)file; uReadThis = uSizeBuf; if (uReadThis>s->gi.size_comment) uReadThis = s->gi.size_comment; if (ZSEEK64(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (uReadThis>0) { *szComment='\0'; if (ZREAD64(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis) return UNZ_ERRNO; } if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment)) *(szComment+s->gi.size_comment)='\0'; return (int)uReadThis; } /* Additions by RX '2004 */ extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file) { unz64_s* s; if (file==NULL) return 0; //UNZ_PARAMERROR; s=(unz64_s*)file; if (!s->current_file_ok) return 0; if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff) if (s->num_file==s->gi.number_entry) return 0; return s->pos_in_central_dir; } extern uLong ZEXPORT unzGetOffset (unzFile file) { ZPOS64_T offset64; if (file==NULL) return 0; //UNZ_PARAMERROR; offset64 = unzGetOffset64(file); return (uLong)offset64; } extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos) { unz64_s* s; int err; if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; s->pos_in_central_dir = pos; s->num_file = s->gi.number_entry; /* hack */ err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, NULL,0,NULL,0,NULL,0); s->current_file_ok = (err == UNZ_OK); return err; } extern int ZEXPORT unzSetOffset (unzFile file, uLong pos) { return unzSetOffset64(file,pos); } mupen64plus-core-src-2.5/src/main/zip/unzip.h000066400000000000000000000377461251723631200211530ustar00rootroot00000000000000/* unzip.h -- IO for uncompress .zip files using zlib Version 1.1, February 14h, 2010 part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) Modifications of Unzip for Zip64 Copyright (C) 2007-2008 Even Rouault Modifications for Zip64 support on both zip and unzip Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) For more info read MiniZip_info.txt --------------------------------------------------------------------------------- Condition of use and distribution are the same than zlib : This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. --------------------------------------------------------------------------------- Changes See header of unzip64.c */ #ifndef _unz64_H #define _unz64_H #ifdef __cplusplus extern "C" { #endif #ifndef _ZLIB_H #include "zlib.h" #endif #ifndef _ZLIBIOAPI_H #include "ioapi.h" #endif #ifdef HAVE_BZIP2 #include "bzlib.h" #endif #define Z_BZIP2ED 12 #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) /* like the STRICT of WIN32, we define a pointer that cannot be converted from (void*) without cast */ typedef struct TagunzFile__ { int unused; } unzFile__; typedef unzFile__ *unzFile; #else typedef voidp unzFile; #endif #define UNZ_OK (0) #define UNZ_END_OF_LIST_OF_FILE (-100) #define UNZ_ERRNO (Z_ERRNO) #define UNZ_EOF (0) #define UNZ_PARAMERROR (-102) #define UNZ_BADZIPFILE (-103) #define UNZ_INTERNALERROR (-104) #define UNZ_CRCERROR (-105) /* tm_unz contain date/time info */ typedef struct tm_unz_s { uInt tm_sec; /* seconds after the minute - [0,59] */ uInt tm_min; /* minutes after the hour - [0,59] */ uInt tm_hour; /* hours since midnight - [0,23] */ uInt tm_mday; /* day of the month - [1,31] */ uInt tm_mon; /* months since January - [0,11] */ uInt tm_year; /* years - [1980..2044] */ } tm_unz; /* unz_global_info structure contain global data about the ZIPfile These data comes from the end of central dir */ typedef struct unz_global_info64_s { ZPOS64_T number_entry; /* total number of entries in the central dir on this disk */ uLong size_comment; /* size of the global comment of the zipfile */ } unz_global_info64; typedef struct unz_global_info_s { uLong number_entry; /* total number of entries in the central dir on this disk */ uLong size_comment; /* size of the global comment of the zipfile */ } unz_global_info; /* unz_file_info contain information about a file in the zipfile */ typedef struct unz_file_info64_s { uLong version; /* version made by 2 bytes */ uLong version_needed; /* version needed to extract 2 bytes */ uLong flag; /* general purpose bit flag 2 bytes */ uLong compression_method; /* compression method 2 bytes */ uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ uLong crc; /* crc-32 4 bytes */ ZPOS64_T compressed_size; /* compressed size 8 bytes */ ZPOS64_T uncompressed_size; /* uncompressed size 8 bytes */ uLong size_filename; /* filename length 2 bytes */ uLong size_file_extra; /* extra field length 2 bytes */ uLong size_file_comment; /* file comment length 2 bytes */ uLong disk_num_start; /* disk number start 2 bytes */ uLong internal_fa; /* internal file attributes 2 bytes */ uLong external_fa; /* external file attributes 4 bytes */ tm_unz tmu_date; } unz_file_info64; typedef struct unz_file_info_s { uLong version; /* version made by 2 bytes */ uLong version_needed; /* version needed to extract 2 bytes */ uLong flag; /* general purpose bit flag 2 bytes */ uLong compression_method; /* compression method 2 bytes */ uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ uLong crc; /* crc-32 4 bytes */ uLong compressed_size; /* compressed size 4 bytes */ uLong uncompressed_size; /* uncompressed size 4 bytes */ uLong size_filename; /* filename length 2 bytes */ uLong size_file_extra; /* extra field length 2 bytes */ uLong size_file_comment; /* file comment length 2 bytes */ uLong disk_num_start; /* disk number start 2 bytes */ uLong internal_fa; /* internal file attributes 2 bytes */ uLong external_fa; /* external file attributes 4 bytes */ tm_unz tmu_date; } unz_file_info; extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, const char* fileName2, int iCaseSensitivity)); /* Compare two filename (fileName1,fileName2). If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi or strcasecmp) If iCaseSenisivity = 0, case sensitivity is defaut of your operating system (like 1 on Unix, 2 on Windows) */ extern unzFile ZEXPORT unzOpen OF((const char *path)); extern unzFile ZEXPORT unzOpen64 OF((const void *path)); /* Open a Zip file. path contain the full pathname (by example, on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer "zlib/zlib113.zip". If the zipfile cannot be opened (file don't exist or in not valid), the return value is NULL. Else, the return value is a unzFile Handle, usable with other function of this unzip package. the "64" function take a const void* pointer, because the path is just the value passed to the open64_file_func callback. Under Windows, if UNICODE is defined, using fill_fopen64_filefunc, the path is a pointer to a wide unicode string (LPCTSTR is LPCWSTR), so const char* does not describe the reality */ extern unzFile ZEXPORT unzOpen2 OF((const char *path, zlib_filefunc_def* pzlib_filefunc_def)); /* Open a Zip file, like unzOpen, but provide a set of file low level API for read/write the zip file (see ioapi.h) */ extern unzFile ZEXPORT unzOpen2_64 OF((const void *path, zlib_filefunc64_def* pzlib_filefunc_def)); /* Open a Zip file, like unz64Open, but provide a set of file low level API for read/write the zip file (see ioapi.h) */ extern int ZEXPORT unzClose OF((unzFile file)); /* Close a ZipFile opened with unzipOpen. If there is files inside the .Zip opened with unzOpenCurrentFile (see later), these files MUST be closed with unzipCloseCurrentFile before call unzipClose. return UNZ_OK if there is no problem. */ extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, unz_global_info *pglobal_info)); extern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file, unz_global_info64 *pglobal_info)); /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */ extern int ZEXPORT unzGetGlobalComment OF((unzFile file, char *szComment, uLong uSizeBuf)); /* Get the global comment string of the ZipFile, in the szComment buffer. uSizeBuf is the size of the szComment buffer. return the number of byte copied or an error code <0 */ /***************************************************************************/ /* Unzip package allow you browse the directory of the zipfile */ extern int ZEXPORT unzGoToFirstFile OF((unzFile file)); /* Set the current file of the zipfile to the first file. return UNZ_OK if there is no problem */ extern int ZEXPORT unzGoToNextFile OF((unzFile file)); /* Set the current file of the zipfile to the next file. return UNZ_OK if there is no problem return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. */ extern int ZEXPORT unzLocateFile OF((unzFile file, const char *szFileName, int iCaseSensitivity)); /* Try locate the file szFileName in the zipfile. For the iCaseSensitivity signification, see unzStringFileNameCompare return value : UNZ_OK if the file is found. It becomes the current file. UNZ_END_OF_LIST_OF_FILE if the file is not found */ /* ****************************************** */ /* Ryan supplied functions */ /* unz_file_info contain information about a file in the zipfile */ typedef struct unz_file_pos_s { uLong pos_in_zip_directory; /* offset in zip file directory */ uLong num_of_file; /* # of file */ } unz_file_pos; extern int ZEXPORT unzGetFilePos( unzFile file, unz_file_pos* file_pos); extern int ZEXPORT unzGoToFilePos( unzFile file, unz_file_pos* file_pos); typedef struct unz64_file_pos_s { ZPOS64_T pos_in_zip_directory; /* offset in zip file directory */ ZPOS64_T num_of_file; /* # of file */ } unz64_file_pos; extern int ZEXPORT unzGetFilePos64( unzFile file, unz64_file_pos* file_pos); extern int ZEXPORT unzGoToFilePos64( unzFile file, const unz64_file_pos* file_pos); /* ****************************************** */ extern int ZEXPORT unzGetCurrentFileInfo64 OF((unzFile file, unz_file_info64 *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)); extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, unz_file_info *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)); /* Get Info about the current file if pfile_info!=NULL, the *pfile_info structure will contain somes info about the current file if szFileName!=NULL, the filemane string will be copied in szFileName (fileNameBufferSize is the size of the buffer) if extraField!=NULL, the extra field information will be copied in extraField (extraFieldBufferSize is the size of the buffer). This is the Central-header version of the extra field if szComment!=NULL, the comment string of the file will be copied in szComment (commentBufferSize is the size of the buffer) */ /** Addition for GDAL : START */ extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file)); /** Addition for GDAL : END */ /***************************************************************************/ /* for reading the content of the current zipfile, you can open it, read data from it, and close it (you can close it before reading all the file) */ extern int ZEXPORT unzOpenCurrentFile OF((unzFile file)); /* Open for reading data the current file in the zipfile. If there is no error, the return value is UNZ_OK. */ extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file, const char* password)); /* Open for reading data the current file in the zipfile. password is a crypting password If there is no error, the return value is UNZ_OK. */ extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file, int* method, int* level, int raw)); /* Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) if raw==1 *method will receive method of compression, *level will receive level of compression note : you can set level parameter as NULL (if you did not want known level, but you CANNOT set method parameter as NULL */ extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file, int* method, int* level, int raw, const char* password)); /* Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) if raw==1 *method will receive method of compression, *level will receive level of compression note : you can set level parameter as NULL (if you did not want known level, but you CANNOT set method parameter as NULL */ extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); /* Close the file in zip opened with unzOpenCurrentFile Return UNZ_CRCERROR if all the file was read but the CRC is not good */ extern int ZEXPORT unzReadCurrentFile OF((unzFile file, voidp buf, unsigned len)); /* Read bytes from the current file (opened by unzOpenCurrentFile) buf contain buffer where data must be copied len the size of buf. return the number of byte copied if somes bytes are copied return 0 if the end of file was reached return <0 with error code if there is an error (UNZ_ERRNO for IO error, or zLib error for uncompress error) */ extern z_off_t ZEXPORT unztell OF((unzFile file)); extern ZPOS64_T ZEXPORT unztell64 OF((unzFile file)); /* Give the current position in uncompressed data */ extern int ZEXPORT unzeof OF((unzFile file)); /* return 1 if the end of file was reached, 0 elsewhere */ extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, voidp buf, unsigned len)); /* Read extra field from the current file (opened by unzOpenCurrentFile) This is the local-header version of the extra field (sometimes, there is more info in the local-header version than in the central-header) if buf==NULL, it return the size of the local extra field if buf!=NULL, len is the size of the buffer, the extra header is copied in buf. the return value is the number of bytes copied in buf, or (if <0) the error code */ /***************************************************************************/ /* Get the current file offset */ extern ZPOS64_T ZEXPORT unzGetOffset64 (unzFile file); extern uLong ZEXPORT unzGetOffset (unzFile file); /* Set the current file offset */ extern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos); extern int ZEXPORT unzSetOffset (unzFile file, uLong pos); #ifdef __cplusplus } #endif #endif /* _unz64_H */ mupen64plus-core-src-2.5/src/main/zip/zip.c000066400000000000000000002004531251723631200205660ustar00rootroot00000000000000/* zip.c -- IO on .zip files using zlib Version 1.1, February 14h, 2010 part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) For more info read MiniZip_info.txt Changes Oct-2009 - Mathias Svensson - Remove old C style function prototypes Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file archives Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get better overview of some functions. Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra field data from its ZIP64 data It is used when recreting zip archive with RAW when deleting items from a zip. ZIP64 data is automaticly added to items that needs it, and existing ZIP64 data need to be removed. Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bzip2 lib is required) Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer */ #include #include #include #include #include "zip.h" #include "zlib.h" #ifdef STDC # include # include # include #endif #ifdef NO_ERRNO_H extern int errno; #else # include #endif #ifndef local # define local static #endif /* compile with -Dlocal if your debugger can't find static symbols */ #ifndef VERSIONMADEBY # define VERSIONMADEBY (0x0) /* platform depedent */ #endif #ifndef Z_BUFSIZE #define Z_BUFSIZE (64*1024) //(16384) #endif #ifndef Z_MAXFILENAMEINZIP #define Z_MAXFILENAMEINZIP (256) #endif #ifndef ALLOC # define ALLOC(size) (malloc(size)) #endif #ifndef TRYFREE # define TRYFREE(p) {if (p) free(p);} #endif /* #define SIZECENTRALDIRITEM (0x2e) #define SIZEZIPLOCALHEADER (0x1e) */ /* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ // NOT sure that this work on ALL platform #define MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32)) #ifndef SEEK_CUR #define SEEK_CUR 1 #endif #ifndef SEEK_END #define SEEK_END 2 #endif #ifndef SEEK_SET #define SEEK_SET 0 #endif #ifndef DEF_MEM_LEVEL #if MAX_MEM_LEVEL >= 8 # define DEF_MEM_LEVEL 8 #else # define DEF_MEM_LEVEL MAX_MEM_LEVEL #endif #endif const char zip_copyright[] =" zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; #define SIZEDATA_INDATABLOCK (4096-(4*4)) #define LOCALHEADERMAGIC (0x04034b50) #define CENTRALHEADERMAGIC (0x02014b50) #define ENDHEADERMAGIC (0x06054b50) #define ZIP64ENDHEADERMAGIC (0x6064b50) #define ZIP64ENDLOCHEADERMAGIC (0x7064b50) #define FLAG_LOCALHEADER_OFFSET (0x06) #define CRC_LOCALHEADER_OFFSET (0x0e) #define SIZECENTRALHEADER (0x2e) /* 46 */ typedef struct linkedlist_datablock_internal_s { struct linkedlist_datablock_internal_s* next_datablock; uLong avail_in_this_block; uLong filled_in_this_block; uLong unused; /* for future use and alignement */ unsigned char data[SIZEDATA_INDATABLOCK]; } linkedlist_datablock_internal; typedef struct linkedlist_data_s { linkedlist_datablock_internal* first_block; linkedlist_datablock_internal* last_block; } linkedlist_data; typedef struct { z_stream stream; /* zLib stream structure for inflate */ #ifdef HAVE_BZIP2 bz_stream bstream; /* bzLib stream structure for bziped */ #endif int stream_initialised; /* 1 is stream is initialised */ uInt pos_in_buffered_data; /* last written byte in buffered_data */ ZPOS64_T pos_local_header; /* offset of the local header of the file currenty writing */ char* central_header; /* central header data for the current file */ uLong size_centralExtra; uLong size_centralheader; /* size of the central header for cur file */ uLong size_centralExtraFree; /* Extra bytes allocated to the centralheader but that are not used */ uLong flag; /* flag of the file currently writing */ int method; /* compression method of file currenty wr.*/ int raw; /* 1 for directly writing raw data */ Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/ uLong dosDate; uLong crc32; int encrypt; int zip64; /* Add ZIP64 extened information in the extra field */ ZPOS64_T pos_zip64extrainfo; ZPOS64_T totalCompressedData; ZPOS64_T totalUncompressedData; #ifndef NOCRYPT unsigned long keys[3]; /* keys defining the pseudo-random sequence */ const unsigned long* pcrc_32_tab; int crypt_header_size; #endif } curfile64_info; typedef struct { zlib_filefunc64_32_def z_filefunc; voidpf filestream; /* io structore of the zipfile */ linkedlist_data central_dir;/* datablock with central dir in construction*/ int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/ curfile64_info ci; /* info on the file curretly writing */ ZPOS64_T begin_pos; /* position of the beginning of the zipfile */ ZPOS64_T add_position_when_writting_offset; ZPOS64_T number_entry; #ifndef NO_ADDFILEINEXISTINGZIP char *globalcomment; #endif } zip64_internal; #ifndef NOCRYPT #define INCLUDECRYPTINGCODE_IFCRYPTALLOWED #include "crypt.h" #endif local linkedlist_datablock_internal* allocate_new_datablock() { linkedlist_datablock_internal* ldi; ldi = (linkedlist_datablock_internal*) ALLOC(sizeof(linkedlist_datablock_internal)); if (ldi!=NULL) { ldi->next_datablock = NULL ; ldi->filled_in_this_block = 0 ; ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ; } return ldi; } local void free_datablock(linkedlist_datablock_internal* ldi) { while (ldi!=NULL) { linkedlist_datablock_internal* ldinext = ldi->next_datablock; TRYFREE(ldi); ldi = ldinext; } } local void init_linkedlist(linkedlist_data* ll) { ll->first_block = ll->last_block = NULL; } local void free_linkedlist(linkedlist_data* ll) { free_datablock(ll->first_block); ll->first_block = ll->last_block = NULL; } local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len) { linkedlist_datablock_internal* ldi; const unsigned char* from_copy; if (ll==NULL) return ZIP_INTERNALERROR; if (ll->last_block == NULL) { ll->first_block = ll->last_block = allocate_new_datablock(); if (ll->first_block == NULL) return ZIP_INTERNALERROR; } ldi = ll->last_block; from_copy = (unsigned char*)buf; while (len>0) { uInt copy_this; uInt i; unsigned char* to_copy; if (ldi->avail_in_this_block==0) { ldi->next_datablock = allocate_new_datablock(); if (ldi->next_datablock == NULL) return ZIP_INTERNALERROR; ldi = ldi->next_datablock ; ll->last_block = ldi; } if (ldi->avail_in_this_block < len) copy_this = (uInt)ldi->avail_in_this_block; else copy_this = (uInt)len; to_copy = &(ldi->data[ldi->filled_in_this_block]); for (i=0;ifilled_in_this_block += copy_this; ldi->avail_in_this_block -= copy_this; from_copy += copy_this ; len -= copy_this; } return ZIP_OK; } /****************************************************************************/ #ifndef NO_ADDFILEINEXISTINGZIP /* =========================================================================== Inputs a long in LSB order to the given file nbByte == 1, 2 ,4 or 8 (byte, short or long, ZPOS64_T) */ local int zip64local_putValue OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte)); local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte) { unsigned char buf[8]; int n; for (n = 0; n < nbByte; n++) { buf[n] = (unsigned char)(x & 0xff); x >>= 8; } if (x != 0) { /* data overflow - hack for ZIP64 (X Roche) */ for (n = 0; n < nbByte; n++) { buf[n] = 0xff; } } if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte) return ZIP_ERRNO; else return ZIP_OK; } local void zip64local_putValue_inmemory OF((void* dest, ZPOS64_T x, int nbByte)); local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte) { unsigned char* buf=(unsigned char*)dest; int n; for (n = 0; n < nbByte; n++) { buf[n] = (unsigned char)(x & 0xff); x >>= 8; } if (x != 0) { /* data overflow - hack for ZIP64 */ for (n = 0; n < nbByte; n++) { buf[n] = 0xff; } } } /****************************************************************************/ local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm) { uLong year = (uLong)ptm->tm_year; if (year>=1980) year-=1980; else if (year>=80) year-=80; return (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) | ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour)); } /****************************************************************************/ local int zip64local_getByte OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi)); local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,voidpf filestream,int* pi) { unsigned char c; int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); if (err==1) { *pi = (int)c; return ZIP_OK; } else { if (ZERROR64(*pzlib_filefunc_def,filestream)) return ZIP_ERRNO; else return ZIP_EOF; } } /* =========================================================================== Reads a long in LSB order from the given gz_stream. Sets */ local int zip64local_getShort OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); local int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) { uLong x ; int i = 0; int err; err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==ZIP_OK) err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<8; if (err==ZIP_OK) *pX = x; else *pX = 0; return err; } local int zip64local_getLong OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); local int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) { uLong x ; int i = 0; int err; err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==ZIP_OK) err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<8; if (err==ZIP_OK) err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<16; if (err==ZIP_OK) err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<24; if (err==ZIP_OK) *pX = x; else *pX = 0; return err; } local int zip64local_getLong64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)); local int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX) { ZPOS64_T x; int i = 0; int err; err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x = (ZPOS64_T)i; if (err==ZIP_OK) err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((ZPOS64_T)i)<<8; if (err==ZIP_OK) err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((ZPOS64_T)i)<<16; if (err==ZIP_OK) err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((ZPOS64_T)i)<<24; if (err==ZIP_OK) err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((ZPOS64_T)i)<<32; if (err==ZIP_OK) err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((ZPOS64_T)i)<<40; if (err==ZIP_OK) err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((ZPOS64_T)i)<<48; if (err==ZIP_OK) err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((ZPOS64_T)i)<<56; if (err==ZIP_OK) *pX = x; else *pX = 0; return err; } #ifndef BUFREADCOMMENT #define BUFREADCOMMENT (0x400) #endif /* Locate the Central directory of a zipfile (at the end, just before the global comment) */ local ZPOS64_T zip64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) { unsigned char* buf; ZPOS64_T uSizeFile; ZPOS64_T uBackRead; ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ ZPOS64_T uPosFound=0; if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) return 0; uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); if (uMaxBack>uSizeFile) uMaxBack = uSizeFile; buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); if (buf==NULL) return 0; uBackRead = 4; while (uBackReaduMaxBack) uBackRead = uMaxBack; else uBackRead+=BUFREADCOMMENT; uReadPos = uSizeFile-uBackRead ; uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) break; if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) break; for (i=(int)uReadSize-3; (i--)>0;) if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) { uPosFound = uReadPos+i; break; } if (uPosFound!=0) break; } TRYFREE(buf); return uPosFound; } /* Locate the End of Zip64 Central directory locator and from there find the CD of a zipfile (at the end, just before the global comment) */ local ZPOS64_T zip64local_SearchCentralDir64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) { unsigned char* buf; ZPOS64_T uSizeFile; ZPOS64_T uBackRead; ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ ZPOS64_T uPosFound=0; uLong uL; ZPOS64_T relativeOffset; if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) return 0; uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); if (uMaxBack>uSizeFile) uMaxBack = uSizeFile; buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); if (buf==NULL) return 0; uBackRead = 4; while (uBackReaduMaxBack) uBackRead = uMaxBack; else uBackRead+=BUFREADCOMMENT; uReadPos = uSizeFile-uBackRead ; uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) break; if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) break; for (i=(int)uReadSize-3; (i--)>0;) { // Signature "0x07064b50" Zip64 end of central directory locater if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) { uPosFound = uReadPos+i; break; } } if (uPosFound!=0) break; } TRYFREE(buf); if (uPosFound == 0) return 0; /* Zip64 end of central directory locator */ if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0) return 0; /* the signature, already checked */ if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) return 0; /* number of the disk with the start of the zip64 end of central directory */ if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) return 0; if (uL != 0) return 0; /* relative offset of the zip64 end of central directory record */ if (zip64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=ZIP_OK) return 0; /* total number of disks */ if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) return 0; if (uL != 1) return 0; /* Goto Zip64 end of central directory record */ if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0) return 0; /* the signature */ if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) return 0; if (uL != 0x06064b50) // signature of 'Zip64 end of central directory' return 0; return relativeOffset; } int LoadCentralDirectoryRecord(zip64_internal* pziinit) { int err=ZIP_OK; ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ ZPOS64_T size_central_dir; /* size of the central directory */ ZPOS64_T offset_central_dir; /* offset of start of central directory */ ZPOS64_T central_pos; uLong uL; uLong number_disk; /* number of the current dist, used for spaning ZIP, unsupported, always 0*/ uLong number_disk_with_CD; /* number the the disk with central dir, used for spaning ZIP, unsupported, always 0*/ ZPOS64_T number_entry; ZPOS64_T number_entry_CD; /* total number of entries in the central dir (same than number_entry on nospan) */ uLong VersionMadeBy; uLong VersionNeeded; uLong size_comment; int hasZIP64Record = 0; // check first if we find a ZIP64 record central_pos = zip64local_SearchCentralDir64(&pziinit->z_filefunc,pziinit->filestream); if(central_pos > 0) { hasZIP64Record = 1; } else if(central_pos == 0) { central_pos = zip64local_SearchCentralDir(&pziinit->z_filefunc,pziinit->filestream); } /* disable to allow appending to empty ZIP archive if (central_pos==0) err=ZIP_ERRNO; */ if(hasZIP64Record) { ZPOS64_T sizeEndOfCentralDirectory; if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0) err=ZIP_ERRNO; /* the signature, already checked */ if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK) err=ZIP_ERRNO; /* size of zip64 end of central directory record */ if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &sizeEndOfCentralDirectory)!=ZIP_OK) err=ZIP_ERRNO; /* version made by */ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionMadeBy)!=ZIP_OK) err=ZIP_ERRNO; /* version needed to extract */ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionNeeded)!=ZIP_OK) err=ZIP_ERRNO; /* number of this disk */ if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK) err=ZIP_ERRNO; /* number of the disk with the start of the central directory */ if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK) err=ZIP_ERRNO; /* total number of entries in the central directory on this disk */ if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &number_entry)!=ZIP_OK) err=ZIP_ERRNO; /* total number of entries in the central directory */ if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&number_entry_CD)!=ZIP_OK) err=ZIP_ERRNO; if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) err=ZIP_BADZIPFILE; /* size of the central directory */ if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&size_central_dir)!=ZIP_OK) err=ZIP_ERRNO; /* offset of start of central directory with respect to the starting disk number */ if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&offset_central_dir)!=ZIP_OK) err=ZIP_ERRNO; // TODO.. // read the comment from the standard central header. size_comment = 0; } else { // Read End of central Directory info if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) err=ZIP_ERRNO; /* the signature, already checked */ if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK) err=ZIP_ERRNO; /* number of this disk */ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK) err=ZIP_ERRNO; /* number of the disk with the start of the central directory */ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK) err=ZIP_ERRNO; /* total number of entries in the central dir on this disk */ number_entry = 0; if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) err=ZIP_ERRNO; else number_entry = uL; /* total number of entries in the central dir */ number_entry_CD = 0; if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) err=ZIP_ERRNO; else number_entry_CD = uL; if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) err=ZIP_BADZIPFILE; /* size of the central directory */ size_central_dir = 0; if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) err=ZIP_ERRNO; else size_central_dir = uL; /* offset of start of central directory with respect to the starting disk number */ offset_central_dir = 0; if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) err=ZIP_ERRNO; else offset_central_dir = uL; /* zipfile global comment length */ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &size_comment)!=ZIP_OK) err=ZIP_ERRNO; } if ((central_posz_filefunc, pziinit->filestream); return ZIP_ERRNO; } if (size_comment>0) { pziinit->globalcomment = (char*)ALLOC(size_comment+1); if (pziinit->globalcomment) { size_comment = ZREAD64(pziinit->z_filefunc, pziinit->filestream, pziinit->globalcomment,size_comment); pziinit->globalcomment[size_comment]=0; } } byte_before_the_zipfile = central_pos - (offset_central_dir+size_central_dir); pziinit->add_position_when_writting_offset = byte_before_the_zipfile; { ZPOS64_T size_central_dir_to_read = size_central_dir; size_t buf_size = SIZEDATA_INDATABLOCK; void* buf_read = (void*)ALLOC(buf_size); if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir + byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET) != 0) err=ZIP_ERRNO; while ((size_central_dir_to_read>0) && (err==ZIP_OK)) { ZPOS64_T read_this = SIZEDATA_INDATABLOCK; if (read_this > size_central_dir_to_read) read_this = size_central_dir_to_read; if (ZREAD64(pziinit->z_filefunc, pziinit->filestream,buf_read,(uLong)read_this) != read_this) err=ZIP_ERRNO; if (err==ZIP_OK) err = add_data_in_datablock(&pziinit->central_dir,buf_read, (uLong)read_this); size_central_dir_to_read-=read_this; } TRYFREE(buf_read); } pziinit->begin_pos = byte_before_the_zipfile; pziinit->number_entry = number_entry_CD; if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET) != 0) err=ZIP_ERRNO; return err; } #endif /* !NO_ADDFILEINEXISTINGZIP*/ /************************************************************/ extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def) { zip64_internal ziinit; zip64_internal* zi; int err=ZIP_OK; ziinit.z_filefunc.zseek32_file = NULL; ziinit.z_filefunc.ztell32_file = NULL; if (pzlib_filefunc64_32_def==NULL) fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64); else ziinit.z_filefunc = *pzlib_filefunc64_32_def; ziinit.filestream = ZOPEN64(ziinit.z_filefunc, pathname, (append == APPEND_STATUS_CREATE) ? (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) : (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING)); if (ziinit.filestream == NULL) return NULL; if (append == APPEND_STATUS_CREATEAFTER) ZSEEK64(ziinit.z_filefunc,ziinit.filestream,0,SEEK_END); ziinit.begin_pos = ZTELL64(ziinit.z_filefunc,ziinit.filestream); ziinit.in_opened_file_inzip = 0; ziinit.ci.stream_initialised = 0; ziinit.number_entry = 0; ziinit.add_position_when_writting_offset = 0; init_linkedlist(&(ziinit.central_dir)); zi = (zip64_internal*)ALLOC(sizeof(zip64_internal)); if (zi==NULL) { ZCLOSE64(ziinit.z_filefunc,ziinit.filestream); return NULL; } /* now we add file in a zipfile */ # ifndef NO_ADDFILEINEXISTINGZIP ziinit.globalcomment = NULL; if (append == APPEND_STATUS_ADDINZIP) { // Read and Cache Central Directory Records err = LoadCentralDirectoryRecord(&ziinit); } if (globalcomment) { *globalcomment = ziinit.globalcomment; } # endif /* !NO_ADDFILEINEXISTINGZIP*/ if (err != ZIP_OK) { # ifndef NO_ADDFILEINEXISTINGZIP TRYFREE(ziinit.globalcomment); # endif /* !NO_ADDFILEINEXISTINGZIP*/ TRYFREE(zi); return NULL; } else { *zi = ziinit; return (zipFile)zi; } } extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def) { if (pzlib_filefunc32_def != NULL) { zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def); return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill); } else return zipOpen3(pathname, append, globalcomment, NULL); } extern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def) { if (pzlib_filefunc_def != NULL) { zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def; zlib_filefunc64_32_def_fill.ztell32_file = NULL; zlib_filefunc64_32_def_fill.zseek32_file = NULL; return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill); } else return zipOpen3(pathname, append, globalcomment, NULL); } extern zipFile ZEXPORT zipOpen (const char* pathname, int append) { return zipOpen3((const void*)pathname,append,NULL,NULL); } extern zipFile ZEXPORT zipOpen64 (const void* pathname, int append) { return zipOpen3(pathname,append,NULL,NULL); } int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local) { /* write the local header */ int err; uInt size_filename = (uInt)strlen(filename); uInt size_extrafield = size_extrafield_local; err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC, 4); if (err==ZIP_OK) { if(zi->ci.zip64) err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);/* version needed to extract */ else err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */ } if (err==ZIP_OK) err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2); if (err==ZIP_OK) err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2); if (err==ZIP_OK) err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4); // CRC / Compressed size / Uncompressed size will be filled in later and rewritten later if (err==ZIP_OK) err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */ if (err==ZIP_OK) { if(zi->ci.zip64) err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* compressed size, unknown */ else err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */ } if (err==ZIP_OK) { if(zi->ci.zip64) err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* uncompressed size, unknown */ else err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */ } if (err==ZIP_OK) err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2); if(zi->ci.zip64) { size_extrafield += 20; } if (err==ZIP_OK) err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield,2); if ((err==ZIP_OK) && (size_filename > 0)) { if (ZWRITE64(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename) err = ZIP_ERRNO; } if ((err==ZIP_OK) && (size_extrafield_local > 0)) { if (ZWRITE64(zi->z_filefunc, zi->filestream, extrafield_local, size_extrafield_local) != size_extrafield_local) err = ZIP_ERRNO; } if ((err==ZIP_OK) && (zi->ci.zip64)) { // write the Zip64 extended info short HeaderID = 1; short DataSize = 16; ZPOS64_T CompressedSize = 0; ZPOS64_T UncompressedSize = 0; // Remember position of Zip64 extended info for the local file header. (needed when we update size after done with file) zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream); err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)HeaderID,2); err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2); err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8); err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8); } return err; } /* NOTE. When writing RAW the ZIP64 extended information in extrafield_local and extrafield_global needs to be stripped before calling this function it can be done with zipRemoveExtraInfoBlock It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize unnecessary allocations. */ extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits,int memLevel, int strategy, const char* password, uLong crcForCrypting, uLong versionMadeBy, uLong flagBase, int zip64) { zip64_internal* zi; uInt size_filename; uInt size_comment; uInt i; int err = ZIP_OK; # ifdef NOCRYPT if (password != NULL) return ZIP_PARAMERROR; # endif if (file == NULL) return ZIP_PARAMERROR; #ifdef HAVE_BZIP2 if ((method!=0) && (method!=Z_DEFLATED) && (method!=Z_BZIP2ED)) return ZIP_PARAMERROR; #else if ((method!=0) && (method!=Z_DEFLATED)) return ZIP_PARAMERROR; #endif zi = (zip64_internal*)file; if (zi->in_opened_file_inzip == 1) { err = zipCloseFileInZip (file); if (err != ZIP_OK) return err; } if (filename==NULL) filename="-"; if (comment==NULL) size_comment = 0; else size_comment = (uInt)strlen(comment); size_filename = (uInt)strlen(filename); if (zipfi == NULL) zi->ci.dosDate = 0; else { if (zipfi->dosDate != 0) zi->ci.dosDate = zipfi->dosDate; else zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date); } zi->ci.flag = flagBase; if ((level==8) || (level==9)) zi->ci.flag |= 2; if (level==2) zi->ci.flag |= 4; if (level==1) zi->ci.flag |= 6; if (password != NULL) zi->ci.flag |= 1; zi->ci.crc32 = 0; zi->ci.method = method; zi->ci.encrypt = 0; zi->ci.stream_initialised = 0; zi->ci.pos_in_buffered_data = 0; zi->ci.raw = raw; zi->ci.pos_local_header = ZTELL64(zi->z_filefunc,zi->filestream); zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comment; zi->ci.size_centralExtraFree = 32; // Extra space we have reserved in case we need to add ZIP64 extra info data zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader + zi->ci.size_centralExtraFree); zi->ci.size_centralExtra = size_extrafield_global; zip64local_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); /* version info */ zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)versionMadeBy,2); zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); zip64local_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); zip64local_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); zip64local_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); zip64local_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ zip64local_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ zip64local_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ zip64local_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); zip64local_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); zip64local_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ if (zipfi==NULL) zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); else zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); if (zipfi==NULL) zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); else zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); if(zi->ci.pos_local_header >= 0xffffffff) zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)0xffffffff,4); else zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header - zi->add_position_when_writting_offset,4); for (i=0;ici.central_header+SIZECENTRALHEADER+i) = *(filename+i); for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+i) = *(((const char*)extrafield_global)+i); for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+ size_extrafield_global+i) = *(comment+i); if (zi->ci.central_header == NULL) return ZIP_INTERNALERROR; zi->ci.zip64 = zip64; zi->ci.totalCompressedData = 0; zi->ci.totalUncompressedData = 0; zi->ci.pos_zip64extrainfo = 0; err = Write_LocalFileHeader(zi, filename, size_extrafield_local, extrafield_local); #ifdef HAVE_BZIP2 zi->ci.bstream.avail_in = (uInt)0; zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; zi->ci.bstream.total_in_hi32 = 0; zi->ci.bstream.total_in_lo32 = 0; zi->ci.bstream.total_out_hi32 = 0; zi->ci.bstream.total_out_lo32 = 0; #endif zi->ci.stream.avail_in = (uInt)0; zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; zi->ci.stream.next_out = zi->ci.buffered_data; zi->ci.stream.total_in = 0; zi->ci.stream.total_out = 0; zi->ci.stream.data_type = Z_BINARY; #ifdef HAVE_BZIP2 if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED || zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) #else if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) #endif { if(zi->ci.method == Z_DEFLATED) { zi->ci.stream.zalloc = (alloc_func)0; zi->ci.stream.zfree = (free_func)0; zi->ci.stream.opaque = (voidpf)0; if (windowBits>0) windowBits = -windowBits; err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy); if (err==Z_OK) zi->ci.stream_initialised = Z_DEFLATED; } else if(zi->ci.method == Z_BZIP2ED) { #ifdef HAVE_BZIP2 // Init BZip stuff here zi->ci.bstream.bzalloc = 0; zi->ci.bstream.bzfree = 0; zi->ci.bstream.opaque = (voidpf)0; err = BZ2_bzCompressInit(&zi->ci.bstream, level, 0,35); if(err == BZ_OK) zi->ci.stream_initialised = Z_BZIP2ED; #endif } } # ifndef NOCRYPT zi->ci.crypt_header_size = 0; if ((err==Z_OK) && (password != NULL)) { unsigned char bufHead[RAND_HEAD_LEN]; unsigned int sizeHead; zi->ci.encrypt = 1; zi->ci.pcrc_32_tab = get_crc_table(); /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/ sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); zi->ci.crypt_header_size = sizeHead; if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) err = ZIP_ERRNO; } # endif if (err==Z_OK) zi->in_opened_file_inzip = 1; return err; } extern int ZEXPORT zipOpenNewFileInZip4 (zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits,int memLevel, int strategy, const char* password, uLong crcForCrypting, uLong versionMadeBy, uLong flagBase) { return zipOpenNewFileInZip4_64 (file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw, windowBits, memLevel, strategy, password, crcForCrypting, versionMadeBy, flagBase, 0); } extern int ZEXPORT zipOpenNewFileInZip3 (zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits,int memLevel, int strategy, const char* password, uLong crcForCrypting) { return zipOpenNewFileInZip4_64 (file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw, windowBits, memLevel, strategy, password, crcForCrypting, VERSIONMADEBY, 0, 0); } extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits,int memLevel, int strategy, const char* password, uLong crcForCrypting, int zip64) { return zipOpenNewFileInZip4_64 (file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw, windowBits, memLevel, strategy, password, crcForCrypting, VERSIONMADEBY, 0, zip64); } extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw) { return zipOpenNewFileInZip4_64 (file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, NULL, 0, VERSIONMADEBY, 0, 0); } extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw, int zip64) { return zipOpenNewFileInZip4_64 (file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, NULL, 0, VERSIONMADEBY, 0, zip64); } extern int ZEXPORT zipOpenNewFileInZip64 (zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void*extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int zip64) { return zipOpenNewFileInZip4_64 (file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, 0, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, NULL, 0, VERSIONMADEBY, 0, zip64); } extern int ZEXPORT zipOpenNewFileInZip (zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void*extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level) { return zipOpenNewFileInZip4_64 (file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, 0, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, NULL, 0, VERSIONMADEBY, 0, 0); } local int zip64FlushWriteBuffer(zip64_internal* zi) { int err=ZIP_OK; if (zi->ci.encrypt != 0) { #ifndef NOCRYPT uInt i; int t; for (i=0;ici.pos_in_buffered_data;i++) zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t); #endif } if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi->ci.pos_in_buffered_data) err = ZIP_ERRNO; zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data; #ifdef HAVE_BZIP2 if(zi->ci.method == Z_BZIP2ED) { zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32; zi->ci.bstream.total_in_lo32 = 0; zi->ci.bstream.total_in_hi32 = 0; } else #endif { zi->ci.totalUncompressedData += zi->ci.stream.total_in; zi->ci.stream.total_in = 0; } zi->ci.pos_in_buffered_data = 0; return err; } extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned int len) { zip64_internal* zi; int err=ZIP_OK; if (file == NULL) return ZIP_PARAMERROR; zi = (zip64_internal*)file; if (zi->in_opened_file_inzip == 0) return ZIP_PARAMERROR; zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len); #ifdef HAVE_BZIP2 if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw)) { zi->ci.bstream.next_in = (void*)buf; zi->ci.bstream.avail_in = len; err = BZ_RUN_OK; while ((err==BZ_RUN_OK) && (zi->ci.bstream.avail_in>0)) { if (zi->ci.bstream.avail_out == 0) { if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) err = ZIP_ERRNO; zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; } if(err != BZ_RUN_OK) break; if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) { uLong uTotalOutBefore_lo = zi->ci.bstream.total_out_lo32; // uLong uTotalOutBefore_hi = zi->ci.bstream.total_out_hi32; err=BZ2_bzCompress(&zi->ci.bstream, BZ_RUN); zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore_lo) ; } } if(err == BZ_RUN_OK) err = ZIP_OK; } else #endif { zi->ci.stream.next_in = (Bytef*)buf; zi->ci.stream.avail_in = len; while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) { if (zi->ci.stream.avail_out == 0) { if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) err = ZIP_ERRNO; zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; zi->ci.stream.next_out = zi->ci.buffered_data; } if(err != ZIP_OK) break; if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) { uLong uTotalOutBefore = zi->ci.stream.total_out; err=deflate(&zi->ci.stream, Z_NO_FLUSH); if(uTotalOutBefore > zi->ci.stream.total_out) { int bBreak = 0; bBreak++; } zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; } else { uInt copy_this,i; if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) copy_this = zi->ci.stream.avail_in; else copy_this = zi->ci.stream.avail_out; for (i = 0; i < copy_this; i++) *(((char*)zi->ci.stream.next_out)+i) = *(((const char*)zi->ci.stream.next_in)+i); { zi->ci.stream.avail_in -= copy_this; zi->ci.stream.avail_out-= copy_this; zi->ci.stream.next_in+= copy_this; zi->ci.stream.next_out+= copy_this; zi->ci.stream.total_in+= copy_this; zi->ci.stream.total_out+= copy_this; zi->ci.pos_in_buffered_data += copy_this; } } }// while(...) } return err; } extern int ZEXPORT zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32) { return zipCloseFileInZipRaw64 (file, uncompressed_size, crc32); } extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_size, uLong crc32) { zip64_internal* zi; ZPOS64_T compressed_size; uLong invalidValue = 0xffffffff; short datasize = 0; int err=ZIP_OK; if (file == NULL) return ZIP_PARAMERROR; zi = (zip64_internal*)file; if (zi->in_opened_file_inzip == 0) return ZIP_PARAMERROR; zi->ci.stream.avail_in = 0; if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) { while (err==ZIP_OK) { uLong uTotalOutBefore; if (zi->ci.stream.avail_out == 0) { if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) err = ZIP_ERRNO; zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; zi->ci.stream.next_out = zi->ci.buffered_data; } uTotalOutBefore = zi->ci.stream.total_out; err=deflate(&zi->ci.stream, Z_FINISH); zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; } } else if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) { #ifdef HAVE_BZIP2 err = BZ_FINISH_OK; while (err==BZ_FINISH_OK) { uLong uTotalOutBefore; if (zi->ci.bstream.avail_out == 0) { if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) err = ZIP_ERRNO; zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; } uTotalOutBefore = zi->ci.bstream.total_out_lo32; err=BZ2_bzCompress(&zi->ci.bstream, BZ_FINISH); if(err == BZ_STREAM_END) err = Z_STREAM_END; zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore); } if(err == BZ_FINISH_OK) err = ZIP_OK; #endif } if (err==Z_STREAM_END) err=ZIP_OK; /* this is normal */ if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK)) { if (zip64FlushWriteBuffer(zi)==ZIP_ERRNO) err = ZIP_ERRNO; } if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) { int tmp_err = deflateEnd(&zi->ci.stream); if (err == ZIP_OK) err = tmp_err; zi->ci.stream_initialised = 0; } #ifdef HAVE_BZIP2 else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) { int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream); if (err==ZIP_OK) err = tmperr; zi->ci.stream_initialised = 0; } #endif if (!zi->ci.raw) { crc32 = (uLong)zi->ci.crc32; uncompressed_size = zi->ci.totalUncompressedData; } compressed_size = zi->ci.totalCompressedData; # ifndef NOCRYPT compressed_size += zi->ci.crypt_header_size; # endif // update Current Item crc and sizes, if(compressed_size >= 0xffffffff || uncompressed_size >= 0xffffffff || zi->ci.pos_local_header >= 0xffffffff) { /*version Made by*/ zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)45,2); /*version needed*/ zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)45,2); } zip64local_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ if(compressed_size >= 0xffffffff) zip64local_putValue_inmemory(zi->ci.central_header+20, invalidValue,4); /*compr size*/ else zip64local_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/ /// set internal file attributes field if (zi->ci.stream.data_type == Z_ASCII) zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); if(uncompressed_size >= 0xffffffff) zip64local_putValue_inmemory(zi->ci.central_header+24, invalidValue,4); /*uncompr size*/ else zip64local_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/ // Add ZIP64 extra info field for uncompressed size if(uncompressed_size >= 0xffffffff) datasize += 8; // Add ZIP64 extra info field for compressed size if(compressed_size >= 0xffffffff) datasize += 8; // Add ZIP64 extra info field for relative offset to local file header of current file if(zi->ci.pos_local_header >= 0xffffffff) datasize += 8; if(datasize > 0) { char* p = NULL; if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree) { // we can not write more data to the buffer that we have room for. return ZIP_BADZIPFILE; } p = zi->ci.central_header + zi->ci.size_centralheader; // Add Extra Information Header for 'ZIP64 information' zip64local_putValue_inmemory(p, 0x0001, 2); // HeaderID p += 2; zip64local_putValue_inmemory(p, datasize, 2); // DataSize p += 2; if(uncompressed_size >= 0xffffffff) { zip64local_putValue_inmemory(p, uncompressed_size, 8); p += 8; } if(compressed_size >= 0xffffffff) { zip64local_putValue_inmemory(p, compressed_size, 8); p += 8; } if(zi->ci.pos_local_header >= 0xffffffff) { zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8); p += 8; } // Update how much extra free space we got in the memory buffer // and increase the centralheader size so the new ZIP64 fields are included // ( 4 below is the size of HeaderID and DataSize field ) zi->ci.size_centralExtraFree -= datasize + 4; zi->ci.size_centralheader += datasize + 4; // Update the extra info size field zi->ci.size_centralExtra += datasize + 4; zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2); } if (err==ZIP_OK) err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralheader); free(zi->ci.central_header); if (err==ZIP_OK) { // Update the LocalFileHeader with the new values. ZPOS64_T cur_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream); if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) err = ZIP_ERRNO; if (err==ZIP_OK) err = zip64local_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */ if(uncompressed_size >= 0xffffffff || compressed_size >= 0xffffffff ) { if(zi->ci.pos_zip64extrainfo > 0) { // Update the size in the ZIP64 extended field. if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_zip64extrainfo + 4,ZLIB_FILEFUNC_SEEK_SET)!=0) err = ZIP_ERRNO; if (err==ZIP_OK) /* compressed size, unknown */ err = zip64local_putValue(&zi->z_filefunc, zi->filestream, uncompressed_size, 8); if (err==ZIP_OK) /* uncompressed size, unknown */ err = zip64local_putValue(&zi->z_filefunc, zi->filestream, compressed_size, 8); } else err = ZIP_BADZIPFILE; // Caller passed zip64 = 0, so no room for zip64 info -> fatal } else { if (err==ZIP_OK) /* compressed size, unknown */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4); if (err==ZIP_OK) /* uncompressed size, unknown */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4); } if (ZSEEK64(zi->z_filefunc,zi->filestream, cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0) err = ZIP_ERRNO; } zi->number_entry ++; zi->in_opened_file_inzip = 0; return err; } extern int ZEXPORT zipCloseFileInZip (zipFile file) { return zipCloseFileInZipRaw (file,0,0); } int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip) { int err = ZIP_OK; ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writting_offset; err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDLOCHEADERMAGIC,4); /*num disks*/ if (err==ZIP_OK) /* number of the disk with the start of the central directory */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /*relative offset*/ if (err==ZIP_OK) /* Relative offset to the Zip64EndOfCentralDirectory */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream, pos,8); /*total disks*/ /* Do not support spawning of disk so always say 1 here*/ if (err==ZIP_OK) /* number of the disk with the start of the central directory */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)1,4); return err; } int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) { int err = ZIP_OK; uLong Zip64DataSize = 44; err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDHEADERMAGIC,4); if (err==ZIP_OK) /* size of this 'zip64 end of central directory' */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)Zip64DataSize,8); // why ZPOS64_T of this ? if (err==ZIP_OK) /* version made by */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); if (err==ZIP_OK) /* version needed */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); if (err==ZIP_OK) /* number of this disk */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); if (err==ZIP_OK) /* number of the disk with the start of the central directory */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); if (err==ZIP_OK) /* total number of entries in the central dir */ err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); if (err==ZIP_OK) /* size of the central directory */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)size_centraldir,8); if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ { ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset; err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (ZPOS64_T)pos,8); } return err; } int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) { int err = ZIP_OK; /*signature*/ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4); if (err==ZIP_OK) /* number of this disk */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); if (err==ZIP_OK) /* number of the disk with the start of the central directory */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ { { if(zi->number_entry >= 0xFFFF) err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record else err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); } } if (err==ZIP_OK) /* total number of entries in the central dir */ { if(zi->number_entry >= 0xFFFF) err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record else err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); } if (err==ZIP_OK) /* size of the central directory */ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4); if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ { ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset; if(pos >= 0xffffffff) { err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)0xffffffff,4); } else err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4); } return err; } int Write_GlobalComment(zip64_internal* zi, const char* global_comment) { int err = ZIP_OK; uInt size_global_comment = 0; if(global_comment != NULL) size_global_comment = (uInt)strlen(global_comment); err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2); if (err == ZIP_OK && size_global_comment > 0) { if (ZWRITE64(zi->z_filefunc,zi->filestream, global_comment, size_global_comment) != size_global_comment) err = ZIP_ERRNO; } return err; } extern int ZEXPORT zipClose (zipFile file, const char* global_comment) { zip64_internal* zi; int err = 0; uLong size_centraldir = 0; ZPOS64_T centraldir_pos_inzip; ZPOS64_T pos; if (file == NULL) return ZIP_PARAMERROR; zi = (zip64_internal*)file; if (zi->in_opened_file_inzip == 1) { err = zipCloseFileInZip (file); } #ifndef NO_ADDFILEINEXISTINGZIP if (global_comment==NULL) global_comment = zi->globalcomment; #endif centraldir_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream); if (err==ZIP_OK) { linkedlist_datablock_internal* ldi = zi->central_dir.first_block; while (ldi!=NULL) { if ((err==ZIP_OK) && (ldi->filled_in_this_block>0)) { if (ZWRITE64(zi->z_filefunc,zi->filestream, ldi->data, ldi->filled_in_this_block) != ldi->filled_in_this_block) err = ZIP_ERRNO; } size_centraldir += ldi->filled_in_this_block; ldi = ldi->next_datablock; } } free_linkedlist(&(zi->central_dir)); pos = centraldir_pos_inzip - zi->add_position_when_writting_offset; if(pos >= 0xffffffff || zi->number_entry > 0xFFFF) { ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream); Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); Write_Zip64EndOfCentralDirectoryLocator(zi, Zip64EOCDpos); } if (err==ZIP_OK) err = Write_EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); if(err == ZIP_OK) err = Write_GlobalComment(zi, global_comment); if (ZCLOSE64(zi->z_filefunc,zi->filestream) != 0) if (err == ZIP_OK) err = ZIP_ERRNO; #ifndef NO_ADDFILEINEXISTINGZIP TRYFREE(zi->globalcomment); #endif TRYFREE(zi); return err; } extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHeader) { char* p = pData; int size = 0; char* pNewHeader; char* pTmp; short header; short dataSize; int retVal = ZIP_OK; if(pData == NULL || *dataLen < 4) return ZIP_PARAMERROR; pNewHeader = (char*)ALLOC(*dataLen); pTmp = pNewHeader; while(p < (pData + *dataLen)) { header = *(short*)p; dataSize = *(((short*)p)+1); if( header == sHeader ) // Header found. { p += dataSize + 4; // skip it. do not copy to temp buffer } else { // Extra Info block should not be removed, So copy it to the temp buffer. memcpy(pTmp, p, dataSize + 4); p += dataSize + 4; size += dataSize + 4; } } if(size < *dataLen) { // clean old extra info block. memset(pData,0, *dataLen); // copy the new extra info block over the old if(size > 0) memcpy(pData, pNewHeader, size); // set the new extra info size *dataLen = size; retVal = ZIP_OK; } else retVal = ZIP_ERRNO; TRYFREE(pNewHeader); return retVal; } mupen64plus-core-src-2.5/src/main/zip/zip.h000066400000000000000000000360061251723631200205740ustar00rootroot00000000000000/* zip.h -- IO on .zip files using zlib Version 1.1, February 14h, 2010 part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) For more info read MiniZip_info.txt --------------------------------------------------------------------------- Condition of use and distribution are the same than zlib : This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. --------------------------------------------------------------------------- Changes See header of zip.h */ #ifndef _zip12_H #define _zip12_H #ifdef __cplusplus extern "C" { #endif //#define HAVE_BZIP2 #ifndef _ZLIB_H #include "zlib.h" #endif #ifndef _ZLIBIOAPI_H #include "ioapi.h" #endif #ifdef HAVE_BZIP2 #include "bzlib.h" #endif #define Z_BZIP2ED 12 #if defined(STRICTZIP) || defined(STRICTZIPUNZIP) /* like the STRICT of WIN32, we define a pointer that cannot be converted from (void*) without cast */ typedef struct TagzipFile__ { int unused; } zipFile__; typedef zipFile__ *zipFile; #else typedef voidp zipFile; #endif #define ZIP_OK (0) #define ZIP_EOF (0) #define ZIP_ERRNO (Z_ERRNO) #define ZIP_PARAMERROR (-102) #define ZIP_BADZIPFILE (-103) #define ZIP_INTERNALERROR (-104) #ifndef DEF_MEM_LEVEL # if MAX_MEM_LEVEL >= 8 # define DEF_MEM_LEVEL 8 # else # define DEF_MEM_LEVEL MAX_MEM_LEVEL # endif #endif /* default memLevel */ /* tm_zip contain date/time info */ typedef struct tm_zip_s { uInt tm_sec; /* seconds after the minute - [0,59] */ uInt tm_min; /* minutes after the hour - [0,59] */ uInt tm_hour; /* hours since midnight - [0,23] */ uInt tm_mday; /* day of the month - [1,31] */ uInt tm_mon; /* months since January - [0,11] */ uInt tm_year; /* years - [1980..2044] */ } tm_zip; typedef struct { tm_zip tmz_date; /* date in understandable format */ uLong dosDate; /* if dos_date == 0, tmu_date is used */ /* uLong flag; */ /* general purpose bit flag 2 bytes */ uLong internal_fa; /* internal file attributes 2 bytes */ uLong external_fa; /* external file attributes 4 bytes */ } zip_fileinfo; typedef const char* zipcharpc; #define APPEND_STATUS_CREATE (0) #define APPEND_STATUS_CREATEAFTER (1) #define APPEND_STATUS_ADDINZIP (2) extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append)); /* Create a zipfile. pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on an Unix computer "zlib/zlib113.zip". if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip will be created at the end of the file. (useful if the file contain a self extractor code) if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will add files in existing zip (be sure you don't add file that doesn't exist) If the zipfile cannot be opened, the return value is NULL. Else, the return value is a zipFile Handle, usable with other function of this zip package. */ /* Note : there is no delete function into a zipfile. If you want delete file into a zipfile, you must open a zipfile, and create another Of couse, you can use RAW reading and writing to copy the file you did not want delte */ extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc_def)); extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def)); extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level)); extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int zip64)); /* Open a file in the ZIP for writing. filename : the filename in zip (if NULL, '-' without quote will be used *zipfi contain supplemental information if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local contains the extrafield data the the local header if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global contains the extrafield data the the local header if comment != NULL, comment contain the comment string method contain the compression method (0 for store, Z_DEFLATED for deflate) level contain the level of compression (can be Z_DEFAULT_COMPRESSION) zip64 is set to 1 if a zip64 extended information block should be added to the local file header. this MUST be '1' if the uncompressed size is >= 0xffffffff. */ extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw)); extern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw, int zip64)); /* Same than zipOpenNewFileInZip, except if raw=1, we write raw file */ extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits, int memLevel, int strategy, const char* password, uLong crcForCrypting)); extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits, int memLevel, int strategy, const char* password, uLong crcForCrypting, int zip64 )); /* Same than zipOpenNewFileInZip2, except windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 password : crypting password (NULL for no crypting) crcForCrypting : crc of file to compress (needed for crypting) */ extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits, int memLevel, int strategy, const char* password, uLong crcForCrypting, uLong versionMadeBy, uLong flagBase )); extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits, int memLevel, int strategy, const char* password, uLong crcForCrypting, uLong versionMadeBy, uLong flagBase, int zip64 )); /* Same than zipOpenNewFileInZip4, except versionMadeBy : value for Version made by field flag : value for flag field (compression level info will be added) */ extern int ZEXPORT zipWriteInFileInZip OF((zipFile file, const void* buf, unsigned len)); /* Write data in the zipfile */ extern int ZEXPORT zipCloseFileInZip OF((zipFile file)); /* Close the current file in the zipfile */ extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file, uLong uncompressed_size, uLong crc32)); extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file, ZPOS64_T uncompressed_size, uLong crc32)); /* Close the current file in the zipfile, for file opened with parameter raw=1 in zipOpenNewFileInZip2 uncompressed_size and crc32 are value for the uncompressed size */ extern int ZEXPORT zipClose OF((zipFile file, const char* global_comment)); /* Close the zipfile */ extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader)); /* zipRemoveExtraInfoBlock - Added by Mathias Svensson Remove extra information block from a extra information data for the local file header or central directory header It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode. 0x0001 is the signature header for the ZIP64 extra information blocks usage. Remove ZIP64 Extra information from a central director extra field data zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001); Remove ZIP64 Extra information from a Local File Header extra field data zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001); */ #ifdef __cplusplus } #endif #endif /* _zip64_H */ mupen64plus-core-src-2.5/src/memory/000077500000000000000000000000001251723631200173765ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/memory/memory.c000066400000000000000000001006041251723631200210530ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - memory.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "memory.h" #include "ai/ai_controller.h" #include "api/callbacks.h" #include "api/m64p_types.h" #include "main/main.h" #include "main/rom.h" #include "pi/pi_controller.h" #include "r4300/new_dynarec/new_dynarec.h" #include "r4300/r4300_core.h" #include "rdp/rdp_core.h" #include "ri/ri_controller.h" #include "rsp/rsp_core.h" #include "si/si_controller.h" #include "vi/vi_controller.h" #ifdef DBG #include #include "debugger/dbg_breakpoints.h" #include "debugger/dbg_memory.h" #include "debugger/dbg_types.h" #endif #include #include extern int fast_memory; #if NEW_DYNAREC != NEW_DYNAREC_ARM // address : address of the read/write operation being done uint32_t address = 0; #endif // values that are being written are stored in these variables #if NEW_DYNAREC != NEW_DYNAREC_ARM uint32_t cpu_word; uint8_t cpu_byte; uint16_t cpu_hword; uint64_t cpu_dword; #endif // addresse where the read value will be stored uint64_t* rdword; // hash tables of read functions void (*readmem[0x10000])(void); void (*readmemb[0x10000])(void); void (*readmemh[0x10000])(void); void (*readmemd[0x10000])(void); // hash tables of write functions void (*writemem[0x10000])(void); void (*writememb[0x10000])(void); void (*writememd[0x10000])(void); void (*writememh[0x10000])(void); typedef int (*readfn)(void*,uint32_t,uint32_t*); typedef int (*writefn)(void*,uint32_t,uint32_t,uint32_t); static unsigned int bshift(uint32_t address) { return ((address & 3) ^ 3) << 3; } static unsigned int hshift(uint32_t address) { return ((address & 2) ^ 2) << 3; } static int readb(readfn read_word, void* opaque, uint32_t address, uint64_t* value) { uint32_t w; unsigned shift = bshift(address); int result = read_word(opaque, address, &w); *value = (w >> shift) & 0xff; return result; } static int readh(readfn read_word, void* opaque, uint32_t address, uint64_t* value) { uint32_t w; unsigned shift = hshift(address); int result = read_word(opaque, address, &w); *value = (w >> shift) & 0xffff; return result; } static int readw(readfn read_word, void* opaque, uint32_t address, uint64_t* value) { uint32_t w; int result = read_word(opaque, address, &w); *value = w; return result; } static int readd(readfn read_word, void* opaque, uint32_t address, uint64_t* value) { uint32_t w[2]; int result = read_word(opaque, address , &w[0]); read_word(opaque, address + 4, &w[1]); *value = ((uint64_t)w[0] << 32) | w[1]; return result; } static int writeb(writefn write_word, void* opaque, uint32_t address, uint8_t value) { unsigned int shift = bshift(address); uint32_t w = (uint32_t)value << shift; uint32_t mask = (uint32_t)0xff << shift; return write_word(opaque, address, w, mask); } static int writeh(writefn write_word, void* opaque, uint32_t address, uint16_t value) { unsigned int shift = hshift(address); uint32_t w = (uint32_t)value << shift; uint32_t mask = (uint32_t)0xffff << shift; return write_word(opaque, address, w, mask); } static int writew(writefn write_word, void* opaque, uint32_t address, uint32_t value) { return write_word(opaque, address, value, ~0U); } static int writed(writefn write_word, void* opaque, uint32_t address, uint64_t value) { int result = write_word(opaque, address , (uint32_t) (value >> 32), ~0U); write_word(opaque, address + 4, (uint32_t) (value ), ~0U); return result; } static void read_nothing(void) { *rdword = 0; } static void read_nothingb(void) { *rdword = 0; } static void read_nothingh(void) { *rdword = 0; } static void read_nothingd(void) { *rdword = 0; } static void write_nothing(void) { } static void write_nothingb(void) { } static void write_nothingh(void) { } static void write_nothingd(void) { } static void read_nomem(void) { address = virtual_to_physical_address(address,0); if (address == 0x00000000) return; read_word_in_memory(); } static void read_nomemb(void) { address = virtual_to_physical_address(address,0); if (address == 0x00000000) return; read_byte_in_memory(); } static void read_nomemh(void) { address = virtual_to_physical_address(address,0); if (address == 0x00000000) return; read_hword_in_memory(); } static void read_nomemd(void) { address = virtual_to_physical_address(address,0); if (address == 0x00000000) return; read_dword_in_memory(); } static void write_nomem(void) { invalidate_r4300_cached_code(address, 4); address = virtual_to_physical_address(address,1); if (address == 0x00000000) return; write_word_in_memory(); } static void write_nomemb(void) { invalidate_r4300_cached_code(address, 1); address = virtual_to_physical_address(address,1); if (address == 0x00000000) return; write_byte_in_memory(); } static void write_nomemh(void) { invalidate_r4300_cached_code(address, 2); address = virtual_to_physical_address(address,1); if (address == 0x00000000) return; write_hword_in_memory(); } static void write_nomemd(void) { invalidate_r4300_cached_code(address, 8); address = virtual_to_physical_address(address,1); if (address == 0x00000000) return; write_dword_in_memory(); } void read_rdram(void) { readw(read_rdram_dram, &g_ri, address, rdword); } void read_rdramb(void) { readb(read_rdram_dram, &g_ri, address, rdword); } void read_rdramh(void) { readh(read_rdram_dram, &g_ri, address, rdword); } void read_rdramd(void) { readd(read_rdram_dram, &g_ri, address, rdword); } void write_rdram(void) { writew(write_rdram_dram, &g_ri, address, cpu_word); } void write_rdramb(void) { writeb(write_rdram_dram, &g_ri, address, cpu_byte); } void write_rdramh(void) { writeh(write_rdram_dram, &g_ri, address, cpu_hword); } void write_rdramd(void) { writed(write_rdram_dram, &g_ri, address, cpu_dword); } void read_rdramFB(void) { readw(read_rdram_fb, &g_dp, address, rdword); } void read_rdramFBb(void) { readb(read_rdram_fb, &g_dp, address, rdword); } void read_rdramFBh(void) { readh(read_rdram_fb, &g_dp, address, rdword); } void read_rdramFBd(void) { readd(read_rdram_fb, &g_dp, address, rdword); } void write_rdramFB(void) { writew(write_rdram_fb, &g_dp, address, cpu_word); } void write_rdramFBb(void) { writeb(write_rdram_fb, &g_dp, address, cpu_byte); } void write_rdramFBh(void) { writeh(write_rdram_fb, &g_dp, address, cpu_hword); } void write_rdramFBd(void) { writed(write_rdram_fb, &g_dp, address, cpu_dword); } static void read_rdramreg(void) { readw(read_rdram_regs, &g_ri, address, rdword); } static void read_rdramregb(void) { readb(read_rdram_regs, &g_ri, address, rdword); } static void read_rdramregh(void) { readh(read_rdram_regs, &g_ri, address, rdword); } static void read_rdramregd(void) { readd(read_rdram_regs, &g_ri, address, rdword); } static void write_rdramreg(void) { writew(write_rdram_regs, &g_ri, address, cpu_word); } static void write_rdramregb(void) { writeb(write_rdram_regs, &g_ri, address, cpu_byte); } static void write_rdramregh(void) { writeh(write_rdram_regs, &g_ri, address, cpu_hword); } static void write_rdramregd(void) { writed(write_rdram_regs, &g_ri, address, cpu_dword); } static void read_rspmem(void) { readw(read_rsp_mem, &g_sp, address, rdword); } static void read_rspmemb(void) { readb(read_rsp_mem, &g_sp, address, rdword); } static void read_rspmemh(void) { readh(read_rsp_mem, &g_sp, address, rdword); } static void read_rspmemd(void) { readd(read_rsp_mem, &g_sp, address, rdword); } static void write_rspmem(void) { writew(write_rsp_mem, &g_sp, address, cpu_word); } static void write_rspmemb(void) { writeb(write_rsp_mem, &g_sp, address, cpu_byte); } static void write_rspmemh(void) { writeh(write_rsp_mem, &g_sp, address, cpu_hword); } static void write_rspmemd(void) { writed(write_rsp_mem, &g_sp, address, cpu_dword); } static void read_rspreg(void) { readw(read_rsp_regs, &g_sp, address, rdword); } static void read_rspregb(void) { readb(read_rsp_regs, &g_sp, address, rdword); } static void read_rspregh(void) { readh(read_rsp_regs, &g_sp, address, rdword); } static void read_rspregd(void) { readd(read_rsp_regs, &g_sp, address, rdword); } static void write_rspreg(void) { writew(write_rsp_regs, &g_sp, address, cpu_word); } static void write_rspregb(void) { writeb(write_rsp_regs, &g_sp, address, cpu_byte); } static void write_rspregh(void) { writeh(write_rsp_regs, &g_sp, address, cpu_hword); } static void write_rspregd(void) { writed(write_rsp_regs, &g_sp, address, cpu_dword); } static void read_rspreg2(void) { readw(read_rsp_regs2, &g_sp, address, rdword); } static void read_rspreg2b(void) { readb(read_rsp_regs2, &g_sp, address, rdword); } static void read_rspreg2h(void) { readh(read_rsp_regs2, &g_sp, address, rdword); } static void read_rspreg2d(void) { readd(read_rsp_regs2, &g_sp, address, rdword); } static void write_rspreg2(void) { writew(write_rsp_regs2, &g_sp, address, cpu_word); } static void write_rspreg2b(void) { writeb(write_rsp_regs2, &g_sp, address, cpu_byte); } static void write_rspreg2h(void) { writeh(write_rsp_regs2, &g_sp, address, cpu_hword); } static void write_rspreg2d(void) { writed(write_rsp_regs2, &g_sp, address, cpu_dword); } static void read_dp(void) { readw(read_dpc_regs, &g_dp, address, rdword); } static void read_dpb(void) { readb(read_dpc_regs, &g_dp, address, rdword); } static void read_dph(void) { readh(read_dpc_regs, &g_dp, address, rdword); } static void read_dpd(void) { readd(read_dpc_regs, &g_dp, address, rdword); } static void write_dp(void) { writew(write_dpc_regs, &g_dp, address, cpu_word); } static void write_dpb(void) { writeb(write_dpc_regs, &g_dp, address, cpu_byte); } static void write_dph(void) { writeh(write_dpc_regs, &g_dp, address, cpu_hword); } static void write_dpd(void) { writed(write_dpc_regs, &g_dp, address, cpu_dword); } static void read_dps(void) { readw(read_dps_regs, &g_dp, address, rdword); } static void read_dpsb(void) { readb(read_dps_regs, &g_dp, address, rdword); } static void read_dpsh(void) { readh(read_dps_regs, &g_dp, address, rdword); } static void read_dpsd(void) { readd(read_dps_regs, &g_dp, address, rdword); } static void write_dps(void) { writew(write_dps_regs, &g_dp, address, cpu_word); } static void write_dpsb(void) { writeb(write_dps_regs, &g_dp, address, cpu_byte); } static void write_dpsh(void) { writeh(write_dps_regs, &g_dp, address, cpu_hword); } static void write_dpsd(void) { writed(write_dps_regs, &g_dp, address, cpu_dword); } static void read_mi(void) { readw(read_mi_regs, &g_r4300, address, rdword); } static void read_mib(void) { readb(read_mi_regs, &g_r4300, address, rdword); } static void read_mih(void) { readh(read_mi_regs, &g_r4300, address, rdword); } static void read_mid(void) { readd(read_mi_regs, &g_r4300, address, rdword); } static void write_mi(void) { writew(write_mi_regs, &g_r4300, address, cpu_word); } static void write_mib(void) { writeb(write_mi_regs, &g_r4300, address, cpu_byte); } static void write_mih(void) { writeh(write_mi_regs, &g_r4300, address, cpu_hword); } static void write_mid(void) { writed(write_mi_regs, &g_r4300, address, cpu_dword); } static void read_vi(void) { readw(read_vi_regs, &g_vi, address, rdword); } static void read_vib(void) { readb(read_vi_regs, &g_vi, address, rdword); } static void read_vih(void) { readh(read_vi_regs, &g_vi, address, rdword); } static void read_vid(void) { readd(read_vi_regs, &g_vi, address, rdword); } static void write_vi(void) { writew(write_vi_regs, &g_vi, address, cpu_word); } static void write_vib(void) { writeb(write_vi_regs, &g_vi, address, cpu_byte); } static void write_vih(void) { writeh(write_vi_regs, &g_vi, address, cpu_hword); } static void write_vid(void) { writed(write_vi_regs, &g_vi, address, cpu_dword); } static void read_ai(void) { readw(read_ai_regs, &g_ai, address, rdword); } static void read_aib(void) { readb(read_ai_regs, &g_ai, address, rdword); } static void read_aih(void) { readh(read_ai_regs, &g_ai, address, rdword); } static void read_aid(void) { readd(read_ai_regs, &g_ai, address, rdword); } static void write_ai(void) { writew(write_ai_regs, &g_ai, address, cpu_word); } static void write_aib(void) { writeb(write_ai_regs, &g_ai, address, cpu_byte); } static void write_aih(void) { writeh(write_ai_regs, &g_ai, address, cpu_hword); } static void write_aid(void) { writed(write_ai_regs, &g_ai, address, cpu_dword); } static void read_pi(void) { readw(read_pi_regs, &g_pi, address, rdword); } static void read_pib(void) { readb(read_pi_regs, &g_pi, address, rdword); } static void read_pih(void) { readh(read_pi_regs, &g_pi, address, rdword); } static void read_pid(void) { readd(read_pi_regs, &g_pi, address, rdword); } static void write_pi(void) { writew(write_pi_regs, &g_pi, address, cpu_word); } static void write_pib(void) { writeb(write_pi_regs, &g_pi, address, cpu_byte); } static void write_pih(void) { writeh(write_pi_regs, &g_pi, address, cpu_hword); } static void write_pid(void) { writed(write_pi_regs, &g_pi, address, cpu_dword); } static void read_ri(void) { readw(read_ri_regs, &g_ri, address, rdword); } static void read_rib(void) { readb(read_ri_regs, &g_ri, address, rdword); } static void read_rih(void) { readh(read_ri_regs, &g_ri, address, rdword); } static void read_rid(void) { readd(read_ri_regs, &g_ri, address, rdword); } static void write_ri(void) { writew(write_ri_regs, &g_ri, address, cpu_word); } static void write_rib(void) { writeb(write_ri_regs, &g_ri, address, cpu_byte); } static void write_rih(void) { writeh(write_ri_regs, &g_ri, address, cpu_hword); } static void write_rid(void) { writed(write_ri_regs, &g_ri, address, cpu_dword); } static void read_si(void) { readw(read_si_regs, &g_si, address, rdword); } static void read_sib(void) { readb(read_si_regs, &g_si, address, rdword); } static void read_sih(void) { readh(read_si_regs, &g_si, address, rdword); } static void read_sid(void) { readd(read_si_regs, &g_si, address, rdword); } static void write_si(void) { writew(write_si_regs, &g_si, address, cpu_word); } static void write_sib(void) { writeb(write_si_regs, &g_si, address, cpu_byte); } static void write_sih(void) { writeh(write_si_regs, &g_si, address, cpu_hword); } static void write_sid(void) { writed(write_si_regs, &g_si, address, cpu_dword); } static void read_pi_flashram_status(void) { readw(read_flashram_status, &g_pi, address, rdword); } static void read_pi_flashram_statusb(void) { readb(read_flashram_status, &g_pi, address, rdword); } static void read_pi_flashram_statush(void) { readh(read_flashram_status, &g_pi, address, rdword); } static void read_pi_flashram_statusd(void) { readd(read_flashram_status, &g_pi, address, rdword); } static void write_pi_flashram_command(void) { writew(write_flashram_command, &g_pi, address, cpu_word); } static void write_pi_flashram_commandb(void) { writeb(write_flashram_command, &g_pi, address, cpu_byte); } static void write_pi_flashram_commandh(void) { writeh(write_flashram_command, &g_pi, address, cpu_hword); } static void write_pi_flashram_commandd(void) { writed(write_flashram_command, &g_pi, address, cpu_dword); } static void read_rom(void) { readw(read_cart_rom, &g_pi, address, rdword); } static void read_romb(void) { readb(read_cart_rom, &g_pi, address, rdword); } static void read_romh(void) { readh(read_cart_rom, &g_pi, address, rdword); } static void read_romd(void) { readd(read_cart_rom, &g_pi, address, rdword); } static void write_rom(void) { writew(write_cart_rom, &g_pi, address, cpu_word); } static void read_pif(void) { readw(read_pif_ram, &g_si, address, rdword); } static void read_pifb(void) { readb(read_pif_ram, &g_si, address, rdword); } static void read_pifh(void) { readh(read_pif_ram, &g_si, address, rdword); } static void read_pifd(void) { readd(read_pif_ram, &g_si, address, rdword); } static void write_pif(void) { writew(write_pif_ram, &g_si, address, cpu_word); } static void write_pifb(void) { writeb(write_pif_ram, &g_si, address, cpu_byte); } static void write_pifh(void) { writeh(write_pif_ram, &g_si, address, cpu_hword); } static void write_pifd(void) { writed(write_pif_ram, &g_si, address, cpu_dword); } /* HACK: just to get F-Zero to boot * TODO: implement a real DD module */ static int read_dd_regs(void* opaque, uint32_t address, uint32_t* value) { *value = (address == 0xa5000508) ? 0xffffffff : 0x00000000; return 0; } static int write_dd_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { return 0; } static void read_dd(void) { readw(read_dd_regs, NULL, address, rdword); } static void read_ddb(void) { readb(read_dd_regs, NULL, address, rdword); } static void read_ddh(void) { readh(read_dd_regs, NULL, address, rdword); } static void read_ddd(void) { readd(read_dd_regs, NULL, address, rdword); } static void write_dd(void) { writew(write_dd_regs, NULL, address, cpu_word); } static void write_ddb(void) { writeb(write_dd_regs, NULL, address, cpu_byte); } static void write_ddh(void) { writeh(write_dd_regs, NULL, address, cpu_hword); } static void write_ddd(void) { writed(write_dd_regs, NULL, address, cpu_dword); } #ifdef DBG static int memtype[0x10000]; static void (*saved_readmemb[0x10000])(void); static void (*saved_readmemh[0x10000])(void); static void (*saved_readmem [0x10000])(void); static void (*saved_readmemd[0x10000])(void); static void (*saved_writememb[0x10000])(void); static void (*saved_writememh[0x10000])(void); static void (*saved_writemem [0x10000])(void); static void (*saved_writememd[0x10000])(void); static void readmemb_with_bp_checks(void) { check_breakpoints_on_mem_access(*r4300_pc()-0x4, address, 1, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_READ); saved_readmemb[address>>16](); } static void readmemh_with_bp_checks(void) { check_breakpoints_on_mem_access(*r4300_pc()-0x4, address, 2, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_READ); saved_readmemh[address>>16](); } static void readmem_with_bp_checks(void) { check_breakpoints_on_mem_access(*r4300_pc()-0x4, address, 4, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_READ); saved_readmem[address>>16](); } static void readmemd_with_bp_checks(void) { check_breakpoints_on_mem_access(*r4300_pc()-0x4, address, 8, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_READ); saved_readmemd[address>>16](); } static void writememb_with_bp_checks(void) { check_breakpoints_on_mem_access(*r4300_pc()-0x4, address, 1, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_WRITE); return saved_writememb[address>>16](); } static void writememh_with_bp_checks(void) { check_breakpoints_on_mem_access(*r4300_pc()-0x4, address, 2, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_WRITE); return saved_writememh[address>>16](); } static void writemem_with_bp_checks(void) { check_breakpoints_on_mem_access(*r4300_pc()-0x4, address, 4, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_WRITE); return saved_writemem[address>>16](); } static void writememd_with_bp_checks(void) { check_breakpoints_on_mem_access(*r4300_pc()-0x4, address, 8, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_WRITE); return saved_writememd[address>>16](); } void activate_memory_break_read(uint32_t address) { uint16_t region = address >> 16; if (saved_readmem[region] == NULL) { saved_readmemb[region] = readmemb[region]; saved_readmemh[region] = readmemh[region]; saved_readmem [region] = readmem [region]; saved_readmemd[region] = readmemd[region]; readmemb[region] = readmemb_with_bp_checks; readmemh[region] = readmemh_with_bp_checks; readmem [region] = readmem_with_bp_checks; readmemd[region] = readmemd_with_bp_checks; } } void deactivate_memory_break_read(uint32_t address) { uint16_t region = address >> 16; if (saved_readmem[region] != NULL) { readmemb[region] = saved_readmemb[region]; readmemh[region] = saved_readmemh[region]; readmem [region] = saved_readmem [region]; readmemd[region] = saved_readmemd[region]; saved_readmemb[region] = NULL; saved_readmemh[region] = NULL; saved_readmem [region] = NULL; saved_readmemd[region] = NULL; } } void activate_memory_break_write(uint32_t address) { uint16_t region = address >> 16; if (saved_writemem[region] == NULL) { saved_writememb[region] = writememb[region]; saved_writememh[region] = writememh[region]; saved_writemem [region] = writemem [region]; saved_writememd[region] = writememd[region]; writememb[region] = writememb_with_bp_checks; writememh[region] = writememh_with_bp_checks; writemem [region] = writemem_with_bp_checks; writememd[region] = writememd_with_bp_checks; } } void deactivate_memory_break_write(uint32_t address) { uint16_t region = address >> 16; if (saved_writemem[region] != NULL) { writememb[region] = saved_writememb[region]; writememh[region] = saved_writememh[region]; writemem [region] = saved_writemem [region]; writememd[region] = saved_writememd[region]; saved_writememb[region] = NULL; saved_writememh[region] = NULL; saved_writemem [region] = NULL; saved_writememd[region] = NULL; } } int get_memory_type(uint32_t address) { return memtype[address >> 16]; } #endif #define R(x) read_ ## x ## b, read_ ## x ## h, read_ ## x, read_ ## x ## d #define W(x) write_ ## x ## b, write_ ## x ## h, write_ ## x, write_ ## x ## d #define RW(x) R(x), W(x) int init_memory(void) { int i; #ifdef DBG memset(saved_readmem, 0, 0x10000*sizeof(saved_readmem[0])); memset(saved_writemem, 0, 0x10000*sizeof(saved_writemem[0])); #endif /* clear mappings */ for(i = 0; i < 0x10000; ++i) { map_region(i, M64P_MEM_NOMEM, RW(nomem)); } /* map RDRAM */ for(i = 0; i < /*0x40*/0x80; ++i) { map_region(0x8000+i, M64P_MEM_RDRAM, RW(rdram)); map_region(0xa000+i, M64P_MEM_RDRAM, RW(rdram)); } for(i = /*0x40*/0x80; i < 0x3f0; ++i) { map_region(0x8000+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa000+i, M64P_MEM_NOTHING, RW(nothing)); } /* map RDRAM registers */ map_region(0x83f0, M64P_MEM_RDRAMREG, RW(rdramreg)); map_region(0xa3f0, M64P_MEM_RDRAMREG, RW(rdramreg)); for(i = 1; i < 0x10; ++i) { map_region(0x83f0+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa3f0+i, M64P_MEM_NOTHING, RW(nothing)); } /* map RSP memory */ map_region(0x8400, M64P_MEM_RSPMEM, RW(rspmem)); map_region(0xa400, M64P_MEM_RSPMEM, RW(rspmem)); for(i = 1; i < 0x4; ++i) { map_region(0x8400+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa400+i, M64P_MEM_NOTHING, RW(nothing)); } /* map RSP registers (1) */ map_region(0x8404, M64P_MEM_RSPREG, RW(rspreg)); map_region(0xa404, M64P_MEM_RSPREG, RW(rspreg)); for(i = 0x5; i < 0x8; ++i) { map_region(0x8400+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa400+i, M64P_MEM_NOTHING, RW(nothing)); } /* map RSP registers (2) */ map_region(0x8408, M64P_MEM_RSP, RW(rspreg2)); map_region(0xa408, M64P_MEM_RSP, RW(rspreg2)); for(i = 0x9; i < 0x10; ++i) { map_region(0x8400+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa400+i, M64P_MEM_NOTHING, RW(nothing)); } /* map DPC registers */ map_region(0x8410, M64P_MEM_DP, RW(dp)); map_region(0xa410, M64P_MEM_DP, RW(dp)); for(i = 1; i < 0x10; ++i) { map_region(0x8410+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa410+i, M64P_MEM_NOTHING, RW(nothing)); } /* map DPS registers */ map_region(0x8420, M64P_MEM_DPS, RW(dps)); map_region(0xa420, M64P_MEM_DPS, RW(dps)); for(i = 1; i < 0x10; ++i) { map_region(0x8420+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa420+i, M64P_MEM_NOTHING, RW(nothing)); } /* map MI registers */ map_region(0x8430, M64P_MEM_MI, RW(mi)); map_region(0xa430, M64P_MEM_MI, RW(mi)); for(i = 1; i < 0x10; ++i) { map_region(0x8430+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa430+i, M64P_MEM_NOTHING, RW(nothing)); } /* map VI registers */ map_region(0x8440, M64P_MEM_VI, RW(vi)); map_region(0xa440, M64P_MEM_VI, RW(vi)); for(i = 1; i < 0x10; ++i) { map_region(0x8440+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa440+i, M64P_MEM_NOTHING, RW(nothing)); } /* map AI registers */ map_region(0x8450, M64P_MEM_AI, RW(ai)); map_region(0xa450, M64P_MEM_AI, RW(ai)); for(i = 1; i < 0x10; ++i) { map_region(0x8450+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa450+i, M64P_MEM_NOTHING, RW(nothing)); } /* map PI registers */ map_region(0x8460, M64P_MEM_PI, RW(pi)); map_region(0xa460, M64P_MEM_PI, RW(pi)); for(i = 1; i < 0x10; ++i) { map_region(0x8460+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa460+i, M64P_MEM_NOTHING, RW(nothing)); } /* map RI registers */ map_region(0x8470, M64P_MEM_RI, RW(ri)); map_region(0xa470, M64P_MEM_RI, RW(ri)); for(i = 1; i < 0x10; ++i) { map_region(0x8470+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa470+i, M64P_MEM_NOTHING, RW(nothing)); } /* map SI registers */ map_region(0x8480, M64P_MEM_SI, RW(si)); map_region(0xa480, M64P_MEM_SI, RW(si)); for(i = 0x481; i < 0x500; ++i) { map_region(0x8000+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa000+i, M64P_MEM_NOTHING, RW(nothing)); } /* map DD regsiters */ map_region(0x8500, M64P_MEM_NOTHING, RW(dd)); map_region(0xa500, M64P_MEM_NOTHING, RW(dd)); for(i = 0x501; i < 0x800; ++i) { map_region(0x8000+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa000+i, M64P_MEM_NOTHING, RW(nothing)); } /* map flashram/sram */ map_region(0x8800, M64P_MEM_FLASHRAMSTAT, R(pi_flashram_status), W(nothing)); map_region(0xa800, M64P_MEM_FLASHRAMSTAT, R(pi_flashram_status), W(nothing)); map_region(0x8801, M64P_MEM_NOTHING, R(nothing), W(pi_flashram_command)); map_region(0xa801, M64P_MEM_NOTHING, R(nothing), W(pi_flashram_command)); for(i = 0x802; i < 0x1000; ++i) { map_region(0x8000+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xa000+i, M64P_MEM_NOTHING, RW(nothing)); } /* map cart ROM */ for(i = 0; i < (g_rom_size >> 16); ++i) { map_region(0x9000+i, M64P_MEM_ROM, R(rom), W(nothing)); map_region(0xb000+i, M64P_MEM_ROM, R(rom), write_nothingb, write_nothingh, write_rom, write_nothingd); } for(i = (g_rom_size >> 16); i < 0xfc0; ++i) { map_region(0x9000+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xb000+i, M64P_MEM_NOTHING, RW(nothing)); } /* map PIF RAM */ map_region(0x9fc0, M64P_MEM_PIF, RW(pif)); map_region(0xbfc0, M64P_MEM_PIF, RW(pif)); for(i = 0xfc1; i < 0x1000; ++i) { map_region(0x9000+i, M64P_MEM_NOTHING, RW(nothing)); map_region(0xb000+i, M64P_MEM_NOTHING, RW(nothing)); } fast_memory = 1; init_cic_using_ipl3(&g_si.pif.cic, g_rom + 0x40); init_r4300(&g_r4300); init_rdp(&g_dp); init_rsp(&g_sp); init_ai(&g_ai); init_pi(&g_pi); init_ri(&g_ri); init_si(&g_si); init_vi(&g_vi); DebugMessage(M64MSG_VERBOSE, "Memory initialized"); return 0; } static void map_region_t(uint16_t region, int type) { #ifdef DBG memtype[region] = type; #else (void)region; (void)type; #endif } static void map_region_r(uint16_t region, void (*read8)(void), void (*read16)(void), void (*read32)(void), void (*read64)(void)) { #ifdef DBG if (lookup_breakpoint(((uint32_t)region << 16), 0x10000, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_READ) != -1) { saved_readmemb[region] = read8; saved_readmemh[region] = read16; saved_readmem [region] = read32; saved_readmemd[region] = read64; readmemb[region] = readmemb_with_bp_checks; readmemh[region] = readmemh_with_bp_checks; readmem [region] = readmem_with_bp_checks; readmemd[region] = readmemd_with_bp_checks; } else #endif { readmemb[region] = read8; readmemh[region] = read16; readmem [region] = read32; readmemd[region] = read64; } } static void map_region_w(uint16_t region, void (*write8)(void), void (*write16)(void), void (*write32)(void), void (*write64)(void)) { #ifdef DBG if (lookup_breakpoint(((uint32_t)region << 16), 0x10000, M64P_BKP_FLAG_ENABLED | M64P_BKP_FLAG_WRITE) != -1) { saved_writememb[region] = write8; saved_writememh[region] = write16; saved_writemem [region] = write32; saved_writememd[region] = write64; writememb[region] = writememb_with_bp_checks; writememh[region] = writememh_with_bp_checks; writemem [region] = writemem_with_bp_checks; writememd[region] = writememd_with_bp_checks; } else #endif { writememb[region] = write8; writememh[region] = write16; writemem [region] = write32; writememd[region] = write64; } } void map_region(uint16_t region, int type, void (*read8)(void), void (*read16)(void), void (*read32)(void), void (*read64)(void), void (*write8)(void), void (*write16)(void), void (*write32)(void), void (*write64)(void)) { map_region_t(region, type); map_region_r(region, read8, read16, read32, read64); map_region_w(region, write8, write16, write32, write64); } uint32_t *fast_mem_access(uint32_t address) { /* This code is performance critical, specially on pure interpreter mode. * Removing error checking saves some time, but the emulator may crash. */ if ((address & UINT32_C(0xc0000000)) != UINT32_C(0x80000000)) address = virtual_to_physical_address(address, 2); address &= UINT32_C(0x1ffffffc); if (address < RDRAM_MAX_SIZE) return (uint32_t*) ((uint8_t*) g_rdram + address); else if (address >= UINT32_C(0x10000000)) return (uint32_t*) ((uint8_t*) g_rom + (address - UINT32_C(0x10000000))); else if ((address & UINT32_C(0xffffe000)) == UINT32_C(0x04000000)) return (uint32_t*) ((uint8_t*) g_sp.mem + (address & UINT32_C(0x1ffc))); else return NULL; } mupen64plus-core-src-2.5/src/memory/memory.h000066400000000000000000000105161251723631200210620ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - memory.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_MEMORY_MEMORY_H #define M64P_MEMORY_MEMORY_H #include #define read_word_in_memory() readmem[address>>16]() #define read_byte_in_memory() readmemb[address>>16]() #define read_hword_in_memory() readmemh[address>>16]() #define read_dword_in_memory() readmemd[address>>16]() #define write_word_in_memory() writemem[address>>16]() #define write_byte_in_memory() writememb[address >>16]() #define write_hword_in_memory() writememh[address >>16]() #define write_dword_in_memory() writememd[address >>16]() extern uint32_t address, cpu_word; extern uint8_t cpu_byte; extern uint16_t cpu_hword; extern uint64_t cpu_dword, *rdword; extern void (*readmem[0x10000])(void); extern void (*readmemb[0x10000])(void); extern void (*readmemh[0x10000])(void); extern void (*readmemd[0x10000])(void); extern void (*writemem[0x10000])(void); extern void (*writememb[0x10000])(void); extern void (*writememh[0x10000])(void); extern void (*writememd[0x10000])(void); #ifndef M64P_BIG_ENDIAN #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) #define sl(x) __builtin_bswap32(x) #else #define sl(mot) \ ( \ ((mot & 0x000000FF) << 24) | \ ((mot & 0x0000FF00) << 8) | \ ((mot & 0x00FF0000) >> 8) | \ ((mot & 0xFF000000) >> 24) \ ) #endif #define S8 3 #define S16 2 #define Sh16 1 #else #define sl(mot) mot #define S8 0 #define S16 0 #define Sh16 0 #endif static void masked_write(uint32_t* dst, uint32_t value, uint32_t mask) { *dst = (*dst & ~mask) | (value & mask); } int init_memory(void); void map_region(uint16_t region, int type, void (*read8)(void), void (*read16)(void), void (*read32)(void), void (*read64)(void), void (*write8)(void), void (*write16)(void), void (*write32)(void), void (*write64)(void)); /* XXX: cannot make them static because of dynarec + rdp fb */ void read_rdram(void); void read_rdramb(void); void read_rdramh(void); void read_rdramd(void); void write_rdram(void); void write_rdramb(void); void write_rdramh(void); void write_rdramd(void); void read_rdramFB(void); void read_rdramFBb(void); void read_rdramFBh(void); void read_rdramFBd(void); void write_rdramFB(void); void write_rdramFBb(void); void write_rdramFBh(void); void write_rdramFBd(void); /* Returns a pointer to a block of contiguous memory * Can access RDRAM, SP_DMEM, SP_IMEM and ROM, using TLB if necessary * Useful for getting fast access to a zone with executable code. */ uint32_t *fast_mem_access(uint32_t address); #ifdef DBG void activate_memory_break_read(uint32_t address); void deactivate_memory_break_read(uint32_t address); void activate_memory_break_write(uint32_t address); void deactivate_memory_break_write(uint32_t address); int get_memory_type(uint32_t address); #endif #endif mupen64plus-core-src-2.5/src/osal/000077500000000000000000000000001251723631200170245ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/osal/dynamiclib.h000066400000000000000000000033431251723631200213130ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - osal/dynamiclib.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if !defined(OSAL_DYNAMICLIB_H) #define OSAL_DYNAMICLIB_H #include "api/m64p_types.h" void * osal_dynlib_getproc(m64p_dynlib_handle LibHandle, const char *pccProcedureName); #endif /* #define OSAL_DYNAMICLIB_H */ mupen64plus-core-src-2.5/src/osal/dynamiclib_unix.c000066400000000000000000000035001251723631200223440ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - osal/dynamiclib_unix.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "dynamiclib.h" void * osal_dynlib_getproc(m64p_dynlib_handle LibHandle, const char *pccProcedureName) { if (pccProcedureName == NULL) return NULL; return dlsym(LibHandle, pccProcedureName); } mupen64plus-core-src-2.5/src/osal/dynamiclib_win32.c000066400000000000000000000035031251723631200223260ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-ui-console - osal_dynamiclib_win32.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include #include "api/m64p_types.h" #include "dynamiclib.h" void * osal_dynlib_getproc(m64p_dynlib_handle LibHandle, const char *pccProcedureName) { if (pccProcedureName == NULL) return NULL; return GetProcAddress(LibHandle, pccProcedureName); } mupen64plus-core-src-2.5/src/osal/files.h000066400000000000000000000052411251723631200203010ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - osal/files.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the declarations for OS-dependent file handling * functions */ #if !defined (OSAL_FILES_H) #define OSAL_FILES_H /* some file-related preprocessor definitions */ #if defined(WIN32) && !defined(__MINGW32__) #include // For _unlink() #define unlink _unlink #define OSAL_DIR_SEPARATORS "\\/" #define PATH_MAX _MAX_PATH #else /* Not WIN32 */ #include // for PATH_MAX #include // for unlink() #define OSAL_DIR_SEPARATORS "/" /* PATH_MAX only may be defined by limits.h */ #ifndef PATH_MAX #define PATH_MAX 4096 #endif #endif /* Create a directory path recursively. * Returns zero on success, nonzero on failure. * Note that, unlike mkdir(), this function succeeds if the path already exists. */ extern int osal_mkdirp(const char *dirpath, int mode); extern const char * osal_get_shared_filepath(const char *filename, const char *firstsearch, const char *secondsearch); extern const char * osal_get_user_configpath(void); extern const char * osal_get_user_datapath(void); extern const char * osal_get_user_cachepath(void); #endif /* OSAL_FILES_H */ mupen64plus-core-src-2.5/src/osal/files_unix.c000066400000000000000000000220051251723631200213340ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - osal/files_unix.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the definitions for the unix-specific file handling * functions */ #include #include #include #include #include #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "files.h" #ifdef __APPLE__ /* OS X code for app bundle handling */ #include // dynamic data path detection onmac bool macSetBundlePath(char* buffer) { // the following code will enable mupen to find its data when placed in an app bundle on mac OS X. // returns true if path is set, returns false if path was not set char path[1024]; CFBundleRef main_bundle = CFBundleGetMainBundle(); assert(main_bundle); CFURLRef main_bundle_URL = CFBundleCopyBundleURL(main_bundle); assert(main_bundle_URL); CFStringRef cf_string_ref = CFURLCopyFileSystemPath( main_bundle_URL, kCFURLPOSIXPathStyle); assert(cf_string_ref); CFStringGetCString(cf_string_ref, path, 1024, kCFStringEncodingASCII); CFRelease(main_bundle_URL); CFRelease(cf_string_ref); if (strstr( path, ".app" ) != 0) { DebugMessage(M64MSG_VERBOSE, "checking whether we are using an app bundle: yes"); // executable is inside an app bundle, use app bundle-relative paths sprintf(buffer, "%s/Contents/Resources/", path); return true; } else { DebugMessage(M64MSG_VERBOSE, "checking whether we are using an app bundle: no"); return false; } } #endif /* definitions for system directories to search when looking for shared data files */ #if defined(SHAREDIR) #define XSTR(S) STR(S) /* this wacky preprocessor thing is necessary to generate a quote-enclosed */ #define STR(S) #S /* copy of the SHAREDIR macro, which is defined by the makefile via gcc -DSHAREDIR="..." */ static const int datasearchdirs = 4; static const char *datasearchpath[4] = { XSTR(SHAREDIR), "/usr/local/share/mupen64plus", "/usr/share/mupen64plus", "./" }; #undef STR #undef XSTR #else static const int datasearchdirs = 3; static const char *datasearchpath[3] = { "/usr/local/share/mupen64plus", "/usr/share/mupen64plus", "./" }; #endif /* local functions */ static int get_xdg_dir(char *destpath, const char *envvar, const char *subdir) { struct stat fileinfo; const char *envpath = getenv(envvar); /* error if this environment variable doesn't return a good string */ if (envpath == NULL || strlen(envpath) < 1) return 1; /* error if path returned by the environemnt variable isn't a valid path to a directory */ if (stat(envpath, &fileinfo) != 0 || !S_ISDIR(fileinfo.st_mode)) return 2; /* append the given sub-directory to the path given by the environment variable */ strcpy(destpath, envpath); if (destpath[strlen(destpath)-1] != '/') strcat(destpath, "/"); strcat(destpath, subdir); /* try to create the resulting directory tree, or return successfully if it already exists */ if (osal_mkdirp(destpath, 0700) != 0) { DebugMessage(M64MSG_ERROR, "Couldn't create directory: %s", destpath); return 3; } /* Success */ return 0; } static int search_dir_file(char *destpath, const char *path, const char *filename) { struct stat fileinfo; /* sanity check to start */ if (destpath == NULL || path == NULL || filename == NULL) return 1; /* build the full filepath */ strcpy(destpath, path); /* if the path is empty, don't add / between it and the file name */ if (destpath[0] != '\0' && destpath[strlen(destpath)-1] != '/') strcat(destpath, "/"); strcat(destpath, filename); /* test for a valid file */ if (stat(destpath, &fileinfo) != 0) return 2; if (!S_ISREG(fileinfo.st_mode)) return 3; /* success - file exists and is a regular file */ return 0; } /* global functions */ int osal_mkdirp(const char *dirpath, int mode) { char *mypath, *currpath; struct stat fileinfo; // Terminate quickly if the path already exists if (stat(dirpath, &fileinfo) == 0 && S_ISDIR(fileinfo.st_mode)) return 0; // Create partial paths mypath = currpath = strdup(dirpath); if (mypath == NULL) return 1; while ((currpath = strpbrk(currpath + 1, OSAL_DIR_SEPARATORS)) != NULL) { *currpath = '\0'; if (stat(mypath, &fileinfo) != 0) { if (mkdir(mypath, mode) != 0) break; } else { if (!S_ISDIR(fileinfo.st_mode)) break; } *currpath = OSAL_DIR_SEPARATORS[0]; } free(mypath); if (currpath != NULL) return 1; // Create full path if (stat(dirpath, &fileinfo) != 0 && mkdir(dirpath, mode) != 0) return 1; return 0; } const char * osal_get_shared_filepath(const char *filename, const char *firstsearch, const char *secondsearch) { static char retpath[PATH_MAX]; int i; /* if caller gave us any directories to search, then look there first */ if (firstsearch != NULL && search_dir_file(retpath, firstsearch, filename) == 0) return retpath; if (secondsearch != NULL && search_dir_file(retpath, secondsearch, filename) == 0) return retpath; #ifdef __APPLE__ /* Special case : OS X bundles */ static char buf[1024]; if (macSetBundlePath(buf)) { sprintf(retpath, "%s%s", buf, filename); return retpath; } #endif /* otherwise check our standard paths */ for (i = 0; i < datasearchdirs; i++) { if (search_dir_file(retpath, datasearchpath[i], filename) == 0) return retpath; } /* we couldn't find the file */ return NULL; } const char * osal_get_user_configpath(void) { static char retpath[PATH_MAX]; int rval; /* first, try the XDG_CONFIG_HOME environment variable */ rval = get_xdg_dir(retpath, "XDG_CONFIG_HOME", "mupen64plus/"); if (rval == 0) return retpath; /* then try the HOME environment variable */ rval = get_xdg_dir(retpath, "HOME", ".config/mupen64plus/"); if (rval == 0) return retpath; /* otherwise we are in trouble */ if (rval < 3) DebugMessage(M64MSG_ERROR, "Failed to get configuration directory; $HOME is undefined or invalid."); return NULL; } const char * osal_get_user_datapath(void) { static char retpath[PATH_MAX]; int rval; /* first, try the XDG_DATA_HOME environment variable */ rval = get_xdg_dir(retpath, "XDG_DATA_HOME", "mupen64plus/"); if (rval == 0) return retpath; /* then try the HOME environment variable */ rval = get_xdg_dir(retpath, "HOME", ".local/share/mupen64plus/"); if (rval == 0) return retpath; /* otherwise we are in trouble */ if (rval < 3) DebugMessage(M64MSG_ERROR, "Failed to get data directory; $HOME is undefined or invalid."); return NULL; } const char * osal_get_user_cachepath(void) { static char retpath[PATH_MAX]; int rval; /* first, try the XDG_CACHE_HOME environment variable */ rval = get_xdg_dir(retpath, "XDG_CACHE_HOME", "mupen64plus/"); if (rval == 0) return retpath; /* then try the HOME environment variable */ rval = get_xdg_dir(retpath, "HOME", ".cache/mupen64plus/"); if (rval == 0) return retpath; /* otherwise we are in trouble */ if (rval < 3) DebugMessage(M64MSG_ERROR, "Failed to get cache directory; $HOME is undefined or invalid."); return NULL; } mupen64plus-core-src-2.5/src/osal/files_win32.c000066400000000000000000000152341251723631200213210ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - osal/files_win32.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file contains the definitions for the unix-specific file handling * functions */ #include #include #include #include #include #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "files.h" /* definitions for system directories to search when looking for shared data files */ #if defined(SHAREDIR) #define XSTR(S) STR(S) /* this wacky preprocessor thing is necessary to generate a quote-enclosed */ #define STR(S) #S /* copy of the SHAREDIR macro, which is defined by the makefile via gcc -DSHAREDIR="..." */ static const int datasearchdirs = 2; static const char *datasearchpath[2] = { XSTR(SHAREDIR), ".\\" }; #undef STR #undef XSTR #else static const int datasearchdirs = 1; static const char *datasearchpath[1] = { ".\\" }; #endif /* local functions */ static int search_dir_file(char *destpath, const char *path, const char *filename) { struct _stat fileinfo; /* sanity check to start */ if (destpath == NULL || path == NULL || filename == NULL) return 1; /* build the full filepath */ strcpy(destpath, path); /* if the path is empty, don't add \ between it and the file name */ if (destpath[0] != '\0' && destpath[strlen(destpath)-1] != '\\') strcat(destpath, "\\"); strcat(destpath, filename); /* test for a valid file */ if (_stat(destpath, &fileinfo) != 0) return 2; if ((fileinfo.st_mode & _S_IFREG) == 0) return 3; /* success - file exists and is a regular file */ return 0; } /* global functions */ int osal_mkdirp(const char *dirpath, int mode) { char *mypath, *currpath, *lastchar; struct _stat fileinfo; // Create a copy of the path, so we can modify it mypath = currpath = _strdup(dirpath); if (mypath == NULL) return 1; // if the directory path ends with a separator, remove it lastchar = mypath + strlen(mypath) - 1; if (strchr(OSAL_DIR_SEPARATORS, *lastchar) != NULL) *lastchar = 0; // Terminate quickly if the path already exists if (_stat(mypath, &fileinfo) == 0 && (fileinfo.st_mode & _S_IFDIR)) goto goodexit; while ((currpath = strpbrk(currpath + 1, OSAL_DIR_SEPARATORS)) != NULL) { // if slash is right after colon, then we are looking at drive name prefix (C:\) and should // just skip it, because _stat and _mkdir will both fail for "C:" if (currpath > mypath && currpath[-1] == ':') continue; *currpath = '\0'; if (_stat(mypath, &fileinfo) != 0) { if (_mkdir(mypath) != 0) goto errorexit; } else if (!(fileinfo.st_mode & _S_IFDIR)) { goto errorexit; } *currpath = OSAL_DIR_SEPARATORS[0]; } // Create full path if (_mkdir(mypath) != 0) goto errorexit; goodexit: free(mypath); return 0; errorexit: free(mypath); return 1; } const char * osal_get_shared_filepath(const char *filename, const char *firstsearch, const char *secondsearch) { static char retpath[_MAX_PATH]; int i; /* if caller gave us any directories to search, then look there first */ if (firstsearch != NULL && search_dir_file(retpath, firstsearch, filename) == 0) return retpath; if (secondsearch != NULL && search_dir_file(retpath, secondsearch, filename) == 0) return retpath; /* otherwise check our standard paths */ if (search_dir_file(retpath, osal_get_user_configpath(), filename) == 0) return retpath; for (i = 0; i < datasearchdirs; i++) { if (search_dir_file(retpath, datasearchpath[i], filename) == 0) return retpath; } /* we couldn't find the file */ return NULL; } const char * osal_get_user_configpath(void) { static char chHomePath[MAX_PATH]; LPITEMIDLIST pidl; LPMALLOC pMalloc; struct _stat fileinfo; // Get item ID list for the path of user's personal directory HRESULT hr = SHGetSpecialFolderLocation(NULL, CSIDL_APPDATA, &pidl); // get the path in a char string SHGetPathFromIDList(pidl, chHomePath); // do a bunch of crap just to free some memory hr = SHGetMalloc(&pMalloc); pMalloc->lpVtbl->Free(pMalloc, pidl); pMalloc->lpVtbl->Release(pMalloc); // tack on 'mupen64plus' if (chHomePath[strlen(chHomePath)-1] != '\\') strcat(chHomePath, "\\"); strcat(chHomePath, "Mupen64Plus"); // if this directory doesn't exist, then make it if (_stat(chHomePath, &fileinfo) == 0) { strcat(chHomePath, "\\"); return chHomePath; } else { osal_mkdirp(chHomePath, 0); if (_stat(chHomePath, &fileinfo) == 0) { strcat(chHomePath, "\\"); return chHomePath; } } /* otherwise we are in trouble */ DebugMessage(M64MSG_ERROR, "Failed to open configuration directory '%s'.", chHomePath); return NULL; } const char * osal_get_user_datapath(void) { // in windows, these are all the same return osal_get_user_configpath(); } const char * osal_get_user_cachepath(void) { // in windows, these are all the same return osal_get_user_configpath(); } mupen64plus-core-src-2.5/src/osal/preproc.h000066400000000000000000000045621251723631200206560ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus-core - osal/preproc.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* this header file is for system-dependent #defines, #includes, and typedefs */ #if !defined (OSAL_PREPROC_H) #define OSAL_PREPROC_H #if defined(WIN32) && !defined(__MINGW32__) /* macros */ #define OSAL_BREAKPOINT_INTERRUPT __asm{ int 3 }; #define ALIGN(BYTES,DATA) __declspec(align(BYTES)) DATA #define osal_inline __inline /* string functions */ #define osal_insensitive_strcmp(x, y) _stricmp(x, y) #define snprintf _snprintf #define strdup _strdup /* for isnan() */ #include #define isnan _isnan #else /* Not WIN32 */ /* macros */ #define OSAL_BREAKPOINT_INTERRUPT __asm__(" int $3; "); #define ALIGN(BYTES,DATA) DATA __attribute__((aligned(BYTES))) #define osal_inline inline /* string functions */ #define osal_insensitive_strcmp(x, y) strcasecmp(x, y) #endif #endif /* OSAL_PREPROC_H */ mupen64plus-core-src-2.5/src/osd/000077500000000000000000000000001251723631200166535ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/osd/OGLFT.cpp000066400000000000000000001154421251723631200202410ustar00rootroot00000000000000/* * OGLFT: A library for drawing text with OpenGL using the FreeType library * Copyright (C) 2002 lignum Computing, Inc. * $Id: OGLFT.cpp,v 1.11 2003/10/01 14:21:18 allen Exp $ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include "OGLFT.h" int wstrlen(const wchar_t * s) { int r = 0; while (*s++) r++; return r; } namespace OGLFT { FT_Library ft_library; bool Init_FT(void) { FT_Error error = FT_Init_FreeType(&ft_library); if(error != 0) std::cerr << "[OGLFT] Could not initialize the FreeType library." << std::endl; return (error == 0); } bool Uninit_FT(void) { FT_Error error = FT_Done_FreeType(ft_library); if(error != 0) std::cerr << "[OGLFT] Could not terminate the FreeType library." << std::endl; return (error == 0); } // Load a new face Face::Face (const char* filename, float point_size, FT_UInt resolution) : point_size_(point_size), resolution_(resolution) { valid_ = true; FT_Face ft_face; FT_Error error = FT_New_Face(ft_library, filename, 0, &ft_face); if(error != 0) { valid_ = false; return; } // As of FreeType 2.1: only a UNICODE charmap is automatically activated. // If no charmap is activated automatically, just use the first one. if(ft_face->charmap == 0 && ft_face->num_charmaps > 0) FT_Select_Charmap(ft_face, ft_face->charmaps[0]->encoding); faces_.push_back(FaceData(ft_face)); init(); } // Go with a face that the user has already opened. Face::Face (FT_Face face, float point_size, FT_UInt resolution) : point_size_(point_size), resolution_(resolution) { valid_ = true; // As of FreeType 2.1: only a UNICODE charmap is automatically activated. // If no charmap is activated automatically, just use the first one. if(face->charmap == 0 && face->num_charmaps > 0) FT_Select_Charmap(face, face->charmaps[0]->encoding); faces_.push_back(FaceData(face, false)); init(); } // Standard initialization behavior once the font file is opened. void Face::init (void) { // By default, each glyph is compiled into a display list the first // time it is encountered compile_mode_ = COMPILE; // By default, all drawing is wrapped with push/pop matrix so that the // MODELVIEW matrix is not modified. If advance_ is set, then subsequent // drawings follow from the advance of the last glyph rendered. advance_ = false; // Initialize the default colors foreground_color_[R] = 0.; foreground_color_[G] = 0.; foreground_color_[B] = 0.; foreground_color_[A] = 1.; background_color_[R] = 1.; background_color_[G] = 1.; background_color_[B] = 1.; background_color_[A] = 0.; // The default positioning of the text is at the origin of the first glyph horizontal_justification_ = ORIGIN; vertical_justification_ = BASELINE; // By default, strings are rendered in their nominal direction string_rotation_ = 0; // setCharacterRotationReference calls the virtual function clearCaches() // so it is up to a subclass to set the real default rotation_reference_glyph_ = 0; rotation_reference_face_ = 0; rotation_offset_y_ = 0.; } Face::~Face (void) { for(unsigned int i=0; iglyph, &glyph); if(error != 0) continue; FT_BBox ft_bbox; FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_unscaled, &ft_bbox); FT_Done_Glyph(glyph); char_bbox = ft_bbox; char_bbox.advance_ = faces_[f].face_->glyph->advance; bbox += char_bbox; } return bbox; } BBox Face::measure (const wchar_t* s) { BBox bbox; int i; if(wstrlen(s) > 0) { bbox = measure(s[0]); for(i = 1; i < wstrlen(s); i++) { BBox char_bbox = measure(s[i]); bbox += char_bbox; } } // make sure the origin is at 0,0 if (bbox.x_min_ != 0) { bbox.x_max_ -= bbox.x_min_; bbox.x_min_ = 0; } if (bbox.y_min_ != 0) { bbox.y_max_ -= bbox.y_min_; bbox.y_min_ = 0; } return bbox; } BBox Face::measure (const wchar_t* format, double number) { return measure(format, number); } BBox Face::measureRaw (const wchar_t* s) { BBox bbox; int i; for(i = 0; i < wstrlen(s); i++) { BBox char_bbox; unsigned int f; FT_UInt glyph_index = 0; for(f=0; fglyph, &glyph); if(error != 0) continue; FT_BBox ft_bbox; FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_unscaled, &ft_bbox); FT_Done_Glyph(glyph); char_bbox = ft_bbox; char_bbox.advance_ = faces_[f].face_->glyph->advance; bbox += char_bbox; } return bbox; } // Measure the bounding box as if the (latin1) string were not rotated BBox Face::measure_nominal (const char* s) { if(string_rotation_ == 0.) return measure(s); for(unsigned int f=0; fsecond; unsigned int f; FT_UInt glyph_index = 0; for(f=0; fsecond; unsigned int f; FT_UInt glyph_index = 0; for(f=0; fsecond); return; } unsigned int f; FT_UInt glyph_index = 0; for(f=0; fsecond); return; } unsigned int f; FT_UInt glyph_index = 0; for(f=0; fheight > 0) return faces_[0].face_->height / 64.; else return faces_[0].face_->size->metrics.y_ppem; } BBox Raster::measure (unsigned char c) { BBox bbox; // For starters, just get the unscaled glyph bounding box unsigned int f; FT_UInt glyph_index = 0; for(f=0; fglyph, &glyph); if(error != 0) return bbox; FT_BBox ft_bbox; FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_unscaled, &ft_bbox); FT_Done_Glyph(glyph); bbox = ft_bbox; bbox.advance_ = faces_[f].face_->glyph->advance; // In order to be accurate regarding the placement of text not // aligned at the glyph's origin (CENTER/MIDDLE), the bounding box // of the raster format has to be projected back into the // view's coordinates GLint viewport[4]; GLdouble modelview[16], projection[16]; glGetIntegerv(GL_VIEWPORT, viewport); glGetDoublev(GL_MODELVIEW_MATRIX, modelview); glGetDoublev(GL_PROJECTION_MATRIX, projection); // Well, first we have to get the Origin, since that is the basis // of the bounding box GLdouble x0, y0, z0; gluUnProject(0., 0., 0., modelview, projection, viewport, &x0, &y0, &z0); GLdouble x, y, z; gluUnProject(bbox.x_min_, bbox.y_min_, 0., modelview, projection, viewport, &x, &y, &z); bbox.x_min_ = (float) (x - x0); bbox.y_min_ = (float) (y - y0); gluUnProject(bbox.x_max_, bbox.y_max_, 0., modelview, projection, viewport, &x, &y, &z); bbox.x_max_ = (float) (x - x0); bbox.y_max_ = (float) (y - y0); gluUnProject(bbox.advance_.dx_, bbox.advance_.dy_, 0., modelview, projection, viewport, &x, &y, &z); bbox.advance_.dx_ = (float) (x - x0); bbox.advance_.dy_ = (float) (y - y0); return bbox; } BBox Raster::measure (wchar_t c) { BBox bbox; // For starters, just get the unscaled glyph bounding box unsigned int f; FT_UInt glyph_index = 0; for(f=0; fglyph, &glyph); if(error != 0) return bbox; FT_BBox ft_bbox; FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_unscaled, &ft_bbox); FT_Done_Glyph(glyph); bbox = ft_bbox; bbox.advance_ = faces_[f].face_->glyph->advance; // In order to be accurate regarding the placement of text not // aligned at the glyph's origin (CENTER/MIDDLE), the bounding box // of the raster format has to be projected back into the // view's coordinates GLint viewport[4]; GLdouble modelview[16], projection[16]; glGetIntegerv(GL_VIEWPORT, viewport); glGetDoublev(GL_MODELVIEW_MATRIX, modelview); glGetDoublev(GL_PROJECTION_MATRIX, projection); // Well, first we have to get the Origin, since that is the basis // of the bounding box GLdouble x0, y0, z0; gluUnProject(0., 0., 0., modelview, projection, viewport, &x0, &y0, &z0); GLdouble x, y, z; gluUnProject(bbox.x_min_, bbox.y_min_, 0., modelview, projection, viewport, &x, &y, &z); bbox.x_min_ = (float) (x - x0); bbox.y_min_ = (float) (y - y0); gluUnProject(bbox.x_max_, bbox.y_max_, 0., modelview, projection, viewport, &x, &y, &z); bbox.x_max_ = (float) (x - x0); bbox.y_max_ = (float) (y - y0); gluUnProject(bbox.advance_.dx_, bbox.advance_.dy_, 0., modelview, projection, viewport, &x, &y, &z); bbox.advance_.dx_ = (float) (x - x0); bbox.advance_.dy_ = (float) (y - y0); return bbox; } GLuint Raster::compileGlyph (FT_Face face, FT_UInt glyph_index) { GLuint dlist = glGenLists(1); glNewList(dlist, GL_COMPILE); renderGlyph(face, glyph_index); glEndList(); return dlist; } void Raster::setCharSize (void) { FT_Error error; for(unsigned int i=0; iglyph->bitmap.rows / 2.0f; } void Raster::clearCaches (void) { GDLI fgi = glyph_dlists_.begin(); for(; fgi != glyph_dlists_.end(); ++fgi) { glDeleteLists(fgi->second, 1); } glyph_dlists_.clear(); } Monochrome::Monochrome (const char* filename, float point_size, FT_UInt resolution) : Raster(filename, point_size, resolution) { return; } Monochrome::Monochrome (FT_Face face, float point_size, FT_UInt resolution) : Raster(face, point_size, resolution) { return; } Monochrome::~Monochrome (void) { return; } GLubyte* Monochrome::invertBitmap (const FT_Bitmap& bitmap) { // In FreeType 2.0.9, the pitch of bitmaps was rounded up to an // even number. In general, this disagrees with what we had been // using for OpenGL. int width = bitmap.width / 8 + ((bitmap.width & 7)> 0 ? 1 : 0); GLubyte* inverse = new GLubyte[ bitmap.rows * width ]; GLubyte* inverse_ptr = inverse; for(unsigned int r=0; rglyph, &original_glyph); if(error != 0) return; error = FT_Glyph_Copy(original_glyph, &glyph); FT_Done_Glyph(original_glyph); if(error != 0) return; // If the individual characters are rotated (as distinct from string // rotation), then apply that extra rotation here. This is equivalent // to the sequence // glTranslate(x_center,y_center); // glRotate(angle); // glTranslate(-x_center,-y_center); // which is used for the polygonal styles. The deal with the raster // styles is that you must retain the advance from the string rotation // so that the glyphs are laid out properly. So, we make a copy of // the string rotated glyph, and then rotate that and add back an // additional offset to (in effect) restore the proper origin and // advance of the glyph. if(character_rotation_z_ != 0.) { FT_Matrix rotation_matrix; FT_Vector sinus; FT_Vector_Unit(&sinus, (FT_Angle)(character_rotation_z_ * 0x10000L)); rotation_matrix.xx = sinus.x; rotation_matrix.xy = -sinus.y; rotation_matrix.yx = sinus.y; rotation_matrix.yy = sinus.x; FT_Vector original_offset, rotation_offset; original_offset.x = (face->glyph->metrics.width / 2 + face->glyph->metrics.horiBearingX)/ 64 * 0x10000L; original_offset.y = (FT_Pos)(rotation_offset_y_ * 0x10000L); rotation_offset = original_offset; FT_Vector_Rotate(&rotation_offset, (FT_Angle)(character_rotation_z_ * 0x10000L)); rotation_offset.x = original_offset.x - rotation_offset.x; rotation_offset.y = original_offset.y - rotation_offset.y; rotation_offset.x /= 1024; rotation_offset.y /= 1024; error = FT_Glyph_Transform(glyph, &rotation_matrix, &rotation_offset); } error = FT_Glyph_To_Bitmap(&glyph, FT_RENDER_MODE_MONO, 0, 1); if(error != 0) { FT_Done_Glyph(glyph); return; } FT_BitmapGlyph bitmap_glyph = (FT_BitmapGlyph) glyph; // Evidently, in FreeType2, you can only get "upside-down" bitmaps and // OpenGL won't invert a bitmap with PixelZoom, so we have to invert the // glyph's bitmap ourselves. GLubyte* inverted_bitmap = invertBitmap(bitmap_glyph->bitmap); glBitmap(bitmap_glyph->bitmap.width, bitmap_glyph->bitmap.rows, (GLfloat) -bitmap_glyph->left, (GLfloat) (bitmap_glyph->bitmap.rows - bitmap_glyph->top), face->glyph->advance.x / 64.0f, face->glyph->advance.y / 64.0f, inverted_bitmap); FT_Done_Glyph(glyph); delete[] inverted_bitmap; } } // close OGLFT namespace mupen64plus-core-src-2.5/src/osd/OGLFT.h000066400000000000000000000274641251723631200177140ustar00rootroot00000000000000// -*- c++ -*- /* * OGLFT: A library for drawing text with OpenGL using the FreeType library * Copyright (C) 2002 lignum Computing, Inc. * $Id: OGLFT.h,v 1.15 2003/10/01 14:41:09 allen Exp $ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef OGLFT_H #define OGLFT_H #include #include #include #include #include #define GL_GLEXT_PROTOTYPES #include #if defined(__MACOSX__) #include #elif defined(__MACOS__) #include #else #include #endif #include #include FT_FREETYPE_H #include FT_GLYPH_H #include FT_OUTLINE_H #include FT_TRIGONOMETRY_H namespace OGLFT { enum Coordinates { X, Y, Z, W }; enum ColorSpace { R, G, B, A }; // global library functions bool Init_FT(void); bool Uninit_FT(void); struct Advance { float dx_; float dy_; Advance ( float dx = 0, float dy = 0 ) : dx_( dx ), dy_( dy ) { return; } Advance ( FT_Vector v ) { dx_ = (float) (v.x / 64.); dy_ = (float) (v.y / 64.); } Advance& operator+= ( const FT_Vector v ) { dx_ += (float) (v.x / 64.); dy_ += (float) (v.y / 64.); return *this; } }; struct BBox { float x_min_; float y_min_; float x_max_; float y_max_; Advance advance_; BBox () : x_min_( 0 ), y_min_( 0 ), x_max_( 0 ), y_max_( 0 ) { return; } BBox ( FT_BBox ft_bbox ) { x_min_ = (float) (ft_bbox.xMin / 64.); y_min_ = (float) (ft_bbox.yMin / 64.); x_max_ = (float) (ft_bbox.xMax / 64.); y_max_ = (float) (ft_bbox.yMax / 64.); } BBox& operator*= ( double k ) { x_min_ *= (float) k; y_min_ *= (float) k; x_max_ *= (float) k; y_max_ *= (float) k; advance_.dx_ *= (float) k; advance_.dy_ *= (float) k; return *this; } BBox& operator+= ( const BBox& b ) { float new_value; new_value = b.x_min_ + advance_.dx_; if ( new_value < x_min_ ) x_min_ = new_value; new_value = b.y_min_ + advance_.dy_; if ( new_value < y_min_ ) y_min_ = new_value; new_value = b.x_max_ + advance_.dx_; if ( new_value > x_max_ ) x_max_ = new_value; new_value = b.y_max_ + advance_.dy_; if ( new_value > y_max_ ) y_max_ = new_value; advance_.dx_ += b.advance_.dx_; advance_.dy_ += b.advance_.dy_; return *this; } }; typedef std::vector DisplayLists; typedef DisplayLists::const_iterator DLCI; typedef DisplayLists::iterator DLI; class Face { public: enum HorizontalJustification { LEFT, ORIGIN, CENTER, RIGHT }; enum VerticalJustification { BOTTOM, BASELINE, MIDDLE, TOP }; enum GlyphCompileMode { COMPILE, IMMEDIATE }; private: struct FaceData { FT_Face face_; bool free_on_exit_; FaceData ( FT_Face face, bool free_on_exit = true ) : face_( face ), free_on_exit_( free_on_exit ) { return; } }; protected: std::vector< FaceData > faces_; bool valid_; enum GlyphCompileMode compile_mode_; float point_size_; FT_UInt resolution_; bool advance_; GLfloat foreground_color_[4]; GLfloat background_color_[4]; enum HorizontalJustification horizontal_justification_; enum VerticalJustification vertical_justification_; GLfloat string_rotation_; FT_UInt rotation_reference_glyph_; FT_Face rotation_reference_face_; GLfloat rotation_offset_y_; typedef std::map< FT_UInt, GLuint > GlyphDLists; typedef GlyphDLists::const_iterator GDLCI; typedef GlyphDLists::iterator GDLI; GlyphDLists glyph_dlists_; DisplayLists character_display_lists_; public: Face ( const char* filename, float point_size = 12, FT_UInt resolution = 100 ); Face ( FT_Face face, float point_size = 12, FT_UInt resolution = 100 ); virtual ~Face ( void ); bool isValid ( void ) const { return valid_; } bool addAuxiliaryFace ( const char* filename ); bool addAuxiliaryFace ( FT_Face face ); void setCompileMode ( enum GlyphCompileMode compile_mode ) { compile_mode_ = compile_mode; } enum GlyphCompileMode compileMode ( void ) const { return compile_mode_; } void setPointSize ( float point_size ); float pointSize ( void ) { return point_size_; } void setResolution ( FT_UInt resolution ); FT_UInt resolution ( void ) { return resolution_; } void setAdvance ( bool advance ) { advance_ = advance; } bool advance ( void ) const { return advance_; } void setForegroundColor ( GLfloat red = 0.0, GLfloat green = 0.0, GLfloat blue = 0.0, GLfloat alpha = 1.0 ); void setForegroundColor ( const GLfloat foreground_color[4] ); GLfloat foregroundRed ( void ) const { return foreground_color_[R]; } GLfloat foregroundGreen ( void ) const { return foreground_color_[G]; } GLfloat foregroundBlue ( void ) const { return foreground_color_[B]; } GLfloat foregroundAlpha ( void ) const { return foreground_color_[A]; } void setBackgroundColor ( GLfloat red = 1.0, GLfloat green = 1.0, GLfloat blue = 1.0, GLfloat alpha = 0.0 ); void setBackgroundColor ( const GLfloat background_color[4] ); GLfloat backgroundRed ( void ) const { return background_color_[R]; } GLfloat backgroundGreen ( void ) const { return background_color_[G]; } GLfloat backgroundBlue ( void ) const { return background_color_[B]; } GLfloat backgroundAlpha ( void ) const { return background_color_[A]; } virtual void setCharacterRotationZ ( GLfloat character_rotation_z ) = 0; virtual GLfloat characterRotationZ ( void ) const = 0; void setCharacterRotationReference ( unsigned char c ); void setStringRotation ( GLfloat string_rotation ); GLfloat stringRotation ( void ) const { return string_rotation_; } void setHorizontalJustification ( enum HorizontalJustification horizontal_justification ) { horizontal_justification_ = horizontal_justification; } enum HorizontalJustification horizontalJustification ( void ) const { return horizontal_justification_; } void setVerticalJustification ( enum VerticalJustification vertical_justification ) { vertical_justification_ = vertical_justification; } enum VerticalJustification verticaljustification ( void ) const { return vertical_justification_; } void setCharacterDisplayLists ( const DisplayLists& character_display_lists ) { character_display_lists_ = character_display_lists; } DisplayLists& characterDisplayLists ( void ) { return character_display_lists_; } virtual double height ( void ) const = 0; virtual BBox measure ( unsigned char c ) = 0; virtual BBox measure ( wchar_t c ) = 0; virtual BBox measure ( const char* s ); virtual BBox measureRaw ( const char* s ); virtual BBox measure ( const wchar_t* s ); virtual BBox measure ( const wchar_t* format, double number ); virtual BBox measureRaw ( const wchar_t* s ); GLuint compile ( unsigned char c ); GLuint compile ( const wchar_t c ); void draw ( const char* s ); void draw ( const wchar_t* s ); void draw ( unsigned char c ); void draw ( const wchar_t c ); void draw ( GLfloat x, GLfloat y, unsigned char c ); void draw ( GLfloat x, GLfloat y, GLfloat z, unsigned char c ); void draw ( GLfloat x, GLfloat y, wchar_t c ); void draw ( GLfloat x, GLfloat y, GLfloat z, wchar_t c ); void draw ( GLfloat x, GLfloat y, const char* s, float *sizebox ); void draw ( GLfloat x, GLfloat y, GLfloat z, const char* s ); void draw ( GLfloat x, GLfloat y, const wchar_t* s ); void draw ( GLfloat x, GLfloat y, GLfloat z, const wchar_t* s ); int ascender ( void ) { return faces_.front().face_->ascender; } int descender ( void ) { return faces_.front().face_->descender; } BBox measure_nominal ( const char* s ); BBox measure_nominal ( const wchar_t* s ); protected: virtual GLuint compileGlyph ( FT_Face face, FT_UInt glyph_index ) = 0; virtual void renderGlyph ( FT_Face face, FT_UInt glyph_index ) = 0; virtual void setCharSize ( void ) = 0; virtual void clearCaches ( void ) = 0; virtual void setRotationOffset ( void ) = 0; private: void init ( void ); }; class Raster : public Face { protected: GLfloat character_rotation_z_; public: Raster ( const char* filename, float point_size = 12, FT_UInt resolution = 100 ); Raster ( FT_Face face, float point_size = 12, FT_UInt resolution = 100 ); virtual ~Raster ( void ); void setCharacterRotationZ ( GLfloat character_rotation_z ); GLfloat characterRotationZ ( void ) const { return character_rotation_z_; } double height ( void ) const; BBox measure ( unsigned char c ); BBox measure ( wchar_t c ); BBox measure ( const char* s ) { return Face::measure( s ); } BBox measure ( const wchar_t* format, double number ) { return Face::measure( format, number ); } private: void init ( void ); GLuint compileGlyph ( FT_Face face, FT_UInt glyph_index ); void setCharSize ( void ); void setRotationOffset ( void ); void clearCaches ( void ); }; class Monochrome : public Raster { public: Monochrome ( const char* filename, float point_size = 12, FT_UInt resolution = 100 ); Monochrome ( FT_Face face, float point_size = 12, FT_UInt resolution = 100 ); ~Monochrome ( void ); private: GLubyte* invertBitmap ( const FT_Bitmap& bitmap ); void renderGlyph ( FT_Face face, FT_UInt glyph_index ); }; } #endif /* OGLFT_H */ mupen64plus-core-src-2.5/src/osd/osd.cpp000066400000000000000000000427501251723631200201540ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - osd.cpp * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 Nmn Ebenblues * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include // On-screen Display #include #include #include #include #include #include #include "OGLFT.h" #include "api/m64p_types.h" #include "osd.h" extern "C" { #define M64P_CORE_PROTOTYPES 1 #include "api/callbacks.h" #include "api/config.h" #include "api/m64p_config.h" #include "api/m64p_vidext.h" #include "api/vidext.h" #include "main/list.h" #include "main/main.h" #include "osal/files.h" #include "osal/preproc.h" #include "plugin/plugin.h" } #define FONT_FILENAME "font.ttf" typedef void (APIENTRYP PTRGLACTIVETEXTURE)(GLenum texture); static PTRGLACTIVETEXTURE pglActiveTexture = NULL; // static variables for OSD static int l_OsdInitialized = 0; static LIST_HEAD(l_messageQueue); static OGLFT::Monochrome *l_font; static float l_fLineHeight = -1.0; static void animation_none(osd_message_t *); static void animation_fade(osd_message_t *); static void osd_remove_message(osd_message_t *msg); static osd_message_t * osd_message_valid(osd_message_t *testmsg); static float fCornerScroll[OSD_NUM_CORNERS]; static SDL_mutex *osd_list_lock; // animation handlers static void (*l_animations[OSD_NUM_ANIM_TYPES])(osd_message_t *) = { animation_none, // animation handler for OSD_NONE animation_fade // animation handler for OSD_FADE }; // private functions // draw message on screen static void draw_message(osd_message_t *msg, int width, int height) { float x = 0., y = 0.; if(!l_font || !l_font->isValid()) return; // set color. alpha is hard coded to 1. animation can change this l_font->setForegroundColor(msg->color[R], msg->color[G], msg->color[B], 1.0); l_font->setBackgroundColor(0.0, 0.0, 0.0, 0.0); // set justification based on corner switch(msg->corner) { case OSD_TOP_LEFT: l_font->setVerticalJustification(OGLFT::Face::TOP); l_font->setHorizontalJustification(OGLFT::Face::LEFT); x = 0.; y = (float)height; break; case OSD_TOP_CENTER: l_font->setVerticalJustification(OGLFT::Face::TOP); l_font->setHorizontalJustification(OGLFT::Face::CENTER); x = ((float)width)/2.0f; y = (float)height; break; case OSD_TOP_RIGHT: l_font->setVerticalJustification(OGLFT::Face::TOP); l_font->setHorizontalJustification(OGLFT::Face::RIGHT); x = (float)width; y = (float)height; break; case OSD_MIDDLE_LEFT: l_font->setVerticalJustification(OGLFT::Face::MIDDLE); l_font->setHorizontalJustification(OGLFT::Face::LEFT); x = 0.; y = ((float)height)/2.0f; break; case OSD_MIDDLE_CENTER: l_font->setVerticalJustification(OGLFT::Face::MIDDLE); l_font->setHorizontalJustification(OGLFT::Face::CENTER); x = ((float)width)/2.0f; y = ((float)height)/2.0f; break; case OSD_MIDDLE_RIGHT: l_font->setVerticalJustification(OGLFT::Face::MIDDLE); l_font->setHorizontalJustification(OGLFT::Face::RIGHT); x = (float)width; y = ((float)height)/2.0f; break; case OSD_BOTTOM_LEFT: l_font->setVerticalJustification(OGLFT::Face::BOTTOM); l_font->setHorizontalJustification(OGLFT::Face::LEFT); x = 0.; y = 0.; break; case OSD_BOTTOM_CENTER: l_font->setVerticalJustification(OGLFT::Face::BOTTOM); l_font->setHorizontalJustification(OGLFT::Face::CENTER); x = ((float)width)/2.0f; y = 0.; break; case OSD_BOTTOM_RIGHT: l_font->setVerticalJustification(OGLFT::Face::BOTTOM); l_font->setHorizontalJustification(OGLFT::Face::RIGHT); x = (float)width; y = 0.; break; default: l_font->setVerticalJustification(OGLFT::Face::BOTTOM); l_font->setHorizontalJustification(OGLFT::Face::LEFT); x = 0.; y = 0.; break; } // apply animation for current message state (*l_animations[msg->animation[msg->state]])(msg); // xoffset moves message left x -= msg->xoffset; // yoffset moves message up y += msg->yoffset; // get the bounding box if invalid if (msg->sizebox[0] == 0 && msg->sizebox[2] == 0) // xmin and xmax { OGLFT::BBox bbox = l_font->measure_nominal(msg->text); msg->sizebox[0] = bbox.x_min_; msg->sizebox[1] = bbox.y_min_; msg->sizebox[2] = bbox.x_max_; msg->sizebox[3] = bbox.y_max_; } // draw the text line l_font->draw(x, y, msg->text, msg->sizebox); } // null animation handler static void animation_none(osd_message_t *msg) { } // fade in/out animation handler static void animation_fade(osd_message_t *msg) { float alpha = 1.; float elapsed_frames; float total_frames = (float)msg->timeout[msg->state]; switch(msg->state) { case OSD_DISAPPEAR: elapsed_frames = (float)(total_frames - msg->frames); break; case OSD_APPEAR: default: elapsed_frames = (float)msg->frames; break; } if(total_frames != 0.) alpha = elapsed_frames / total_frames; l_font->setForegroundColor(msg->color[R], msg->color[G], msg->color[B], alpha); } // sets message Y offset depending on where they are in the message queue static float get_message_offset(osd_message_t *msg, float fLinePos) { float offset = (float) (l_font->height() * fLinePos); switch(msg->corner) { case OSD_TOP_LEFT: case OSD_TOP_CENTER: case OSD_TOP_RIGHT: return -offset; break; default: return offset; break; } } // public functions extern "C" void osd_init(int width, int height) { const char *fontpath; osd_list_lock = SDL_CreateMutex(); if (!osd_list_lock) { DebugMessage(M64MSG_ERROR, "Could not create osd list lock"); return; } if (!OGLFT::Init_FT()) { DebugMessage(M64MSG_ERROR, "Could not initialize freetype library."); return; } fontpath = ConfigGetSharedDataFilepath(FONT_FILENAME); l_font = new OGLFT::Monochrome(fontpath, (float) height / 35.0f); // make font size proportional to screen height if(!l_font || !l_font->isValid()) { DebugMessage(M64MSG_ERROR, "Could not construct face from %s", fontpath); return; } // clear statics for (int i = 0; i < OSD_NUM_CORNERS; i++) fCornerScroll[i] = 0.0; glPixelStorei(GL_UNPACK_ALIGNMENT, 1); #if defined(GL_RASTER_POSITION_UNCLIPPED_IBM) glEnable(GL_RASTER_POSITION_UNCLIPPED_IBM); #endif pglActiveTexture = (PTRGLACTIVETEXTURE) VidExt_GL_GetProcAddress("glActiveTexture"); if (pglActiveTexture == NULL) { DebugMessage(M64MSG_WARNING, "OpenGL function glActiveTexture() not supported. OSD deactivated."); return; } // set initialized flag l_OsdInitialized = 1; } extern "C" void osd_exit(void) { osd_message_t *msg, *safe; // delete font renderer if (l_font) { delete l_font; l_font = NULL; } // delete message queue SDL_LockMutex(osd_list_lock); list_for_each_entry_safe_t(msg, safe, &l_messageQueue, osd_message_t, list) { osd_remove_message(msg); if (!msg->user_managed) free(msg); } SDL_UnlockMutex(osd_list_lock); // shut down the Freetype library OGLFT::Uninit_FT(); SDL_DestroyMutex(osd_list_lock); // reset initialized flag l_OsdInitialized = 0; } // renders the current osd message queue to the screen extern "C" void osd_render() { osd_message_t *msg, *safe; int i; // if we're not initialized or list is empty, then just skip it all if (!l_OsdInitialized || list_empty(&l_messageQueue)) return; // get the viewport dimensions GLint viewport[4]; glGetIntegerv(GL_VIEWPORT, viewport); // save all the attributes glPushAttrib(GL_ALL_ATTRIB_BITS); bool bFragmentProg = glIsEnabled(GL_FRAGMENT_PROGRAM_ARB) != 0; bool bColorArray = glIsEnabled(GL_COLOR_ARRAY) != 0; bool bTexCoordArray = glIsEnabled(GL_TEXTURE_COORD_ARRAY) != 0; bool bSecColorArray = glIsEnabled(GL_SECONDARY_COLOR_ARRAY) != 0; // deactivate all the texturing units GLint iActiveTex; bool bTexture2D[8]; glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &iActiveTex); for (i = 0; i < 8; i++) { pglActiveTexture(GL_TEXTURE0_ARB + i); bTexture2D[i] = glIsEnabled(GL_TEXTURE_2D) != 0; glDisable(GL_TEXTURE_2D); } // save the matrices and set up new ones glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); gluOrtho2D(viewport[0],viewport[2],viewport[1],viewport[3]); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); // setup for drawing text glDisable(GL_FOG); glDisable(GL_LIGHTING); glDisable(GL_ALPHA_TEST); glDisable(GL_DEPTH_TEST); glDisable(GL_CULL_FACE); glDisable(GL_SCISSOR_TEST); glDisable(GL_STENCIL_TEST); glDisable(GL_FRAGMENT_PROGRAM_ARB); glDisable(GL_COLOR_MATERIAL); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDisableClientState(GL_COLOR_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_SECONDARY_COLOR_ARRAY); glShadeModel(GL_FLAT); // get line height if invalid if (l_fLineHeight < 0.0) { OGLFT::BBox bbox = l_font->measure("01abjZpqRGB"); l_fLineHeight = (bbox.y_max_ - bbox.y_min_) / 30.0f; } // keeps track of next message position for each corner float fCornerPos[OSD_NUM_CORNERS]; for (i = 0; i < OSD_NUM_CORNERS; i++) fCornerPos[i] = 0.5f * l_fLineHeight; SDL_LockMutex(osd_list_lock); list_for_each_entry_safe_t(msg, safe, &l_messageQueue, osd_message_t, list) { // update message state if(msg->timeout[msg->state] != OSD_INFINITE_TIMEOUT && ++msg->frames >= msg->timeout[msg->state]) { // if message is in last state, mark it for deletion and continue to the next message if(msg->state >= OSD_NUM_STATES - 1) { if (msg->user_managed) { osd_remove_message(msg); } else { osd_remove_message(msg); free(msg); } continue; } // go to next state and reset frame count msg->state++; msg->frames = 0; } // offset y depending on how many other messages are in the same corner float fStartOffset; if (msg->corner >= OSD_MIDDLE_LEFT && msg->corner <= OSD_MIDDLE_RIGHT) // don't scroll the middle messages fStartOffset = fCornerPos[msg->corner]; else fStartOffset = fCornerPos[msg->corner] + (fCornerScroll[msg->corner] * l_fLineHeight); msg->yoffset += get_message_offset(msg, fStartOffset); draw_message(msg, viewport[2], viewport[3]); msg->yoffset -= get_message_offset(msg, fStartOffset); fCornerPos[msg->corner] += l_fLineHeight; } SDL_UnlockMutex(osd_list_lock); // do the scrolling for (int i = 0; i < OSD_NUM_CORNERS; i++) { fCornerScroll[i] += 0.1f; if (fCornerScroll[i] >= 0.0) fCornerScroll[i] = 0.0; } // restore the matrices glMatrixMode(GL_MODELVIEW); glPopMatrix(); glMatrixMode(GL_PROJECTION); glPopMatrix(); // restore the attributes for (int i = 0; i < 8; i++) { pglActiveTexture(GL_TEXTURE0_ARB + i); if (bTexture2D[i]) glEnable(GL_TEXTURE_2D); else glDisable(GL_TEXTURE_2D); } pglActiveTexture(iActiveTex); glPopAttrib(); if (bFragmentProg) glEnable(GL_FRAGMENT_PROGRAM_ARB); if (bColorArray) glEnableClientState(GL_COLOR_ARRAY); if (bTexCoordArray) glEnableClientState(GL_TEXTURE_COORD_ARRAY); if (bSecColorArray) glEnableClientState(GL_SECONDARY_COLOR_ARRAY); glFinish(); } // creates a new osd_message_t, adds it to the message queue and returns it in case // the user wants to modify its parameters. Note, if the message can't be created, // NULL is returned. extern "C" osd_message_t * osd_new_message(enum osd_corner eCorner, const char *fmt, ...) { va_list ap; char buf[1024]; if (!l_OsdInitialized) return NULL; osd_message_t *msg = (osd_message_t *)malloc(sizeof(*msg)); if (!msg) return NULL; va_start(ap, fmt); vsnprintf(buf, 1024, fmt, ap); buf[1023] = 0; va_end(ap); // set default values memset(msg, 0, sizeof(osd_message_t)); msg->text = strdup(buf); msg->user_managed = 0; // default to white msg->color[R] = 1.; msg->color[G] = 1.; msg->color[B] = 1.; msg->sizebox[0] = 0.0; // set a null bounding box msg->sizebox[1] = 0.0; msg->sizebox[2] = 0.0; msg->sizebox[3] = 0.0; msg->corner = eCorner; msg->state = OSD_APPEAR; fCornerScroll[eCorner] -= 1.0; // start this one before the beginning of the list and scroll it in msg->animation[OSD_APPEAR] = OSD_FADE; msg->animation[OSD_DISPLAY] = OSD_NONE; msg->animation[OSD_DISAPPEAR] = OSD_FADE; if (eCorner >= OSD_MIDDLE_LEFT && eCorner <= OSD_MIDDLE_RIGHT) { msg->timeout[OSD_APPEAR] = 20; msg->timeout[OSD_DISPLAY] = 60; msg->timeout[OSD_DISAPPEAR] = 20; } else { msg->timeout[OSD_APPEAR] = 20; msg->timeout[OSD_DISPLAY] = 180; msg->timeout[OSD_DISAPPEAR] = 40; } // add to message queue SDL_LockMutex(osd_list_lock); list_add(&msg->list, &l_messageQueue); SDL_UnlockMutex(osd_list_lock); return msg; } // update message string extern "C" void osd_update_message(osd_message_t *msg, const char *fmt, ...) { va_list ap; char buf[1024]; if (!l_OsdInitialized || !msg) return; va_start(ap, fmt); vsnprintf(buf, 1024, fmt, ap); buf[1023] = 0; va_end(ap); free(msg->text); msg->text = strdup(buf); // reset bounding box msg->sizebox[0] = 0.0; msg->sizebox[1] = 0.0; msg->sizebox[2] = 0.0; msg->sizebox[3] = 0.0; // reset display time counter if (msg->state >= OSD_DISPLAY) { msg->state = OSD_DISPLAY; msg->frames = 0; } SDL_LockMutex(osd_list_lock); if (!osd_message_valid(msg)) list_add(&msg->list, &l_messageQueue); SDL_UnlockMutex(osd_list_lock); } // remove message from message queue static void osd_remove_message(osd_message_t *msg) { if (!l_OsdInitialized || !msg) return; free(msg->text); msg->text = NULL; list_del(&msg->list); } // remove message from message queue and free it extern "C" void osd_delete_message(osd_message_t *msg) { if (!l_OsdInitialized || !msg) return; SDL_LockMutex(osd_list_lock); osd_remove_message(msg); free(msg); SDL_UnlockMutex(osd_list_lock); } // set message so it doesn't automatically expire in a certain number of frames. extern "C" void osd_message_set_static(osd_message_t *msg) { if (!l_OsdInitialized || !msg) return; msg->timeout[OSD_DISPLAY] = OSD_INFINITE_TIMEOUT; msg->state = OSD_DISPLAY; msg->frames = 0; } // set message so it doesn't automatically get freed when finished transition. extern "C" void osd_message_set_user_managed(osd_message_t *msg) { if (!l_OsdInitialized || !msg) return; msg->user_managed = 1; } // return message pointer if valid (in the OSD list), otherwise return NULL static osd_message_t * osd_message_valid(osd_message_t *testmsg) { osd_message_t *msg; if (!l_OsdInitialized || !testmsg) return NULL; list_for_each_entry_t(msg, &l_messageQueue, osd_message_t, list) { if (msg == testmsg) return testmsg; } return NULL; } mupen64plus-core-src-2.5/src/osd/osd.h000066400000000000000000000111741251723631200176150ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - osd.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 Nmn, Ebenblues * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __OSD_H__ #define __OSD_H__ #include "main/list.h" #include "osal/preproc.h" /****************************************************************** osd_corner 0 1 2 | \ __|__/ | Offset always effects the same: | | | +X = Leftward +Y = Upward 3-| 4 |-5 | With no offset, the text will touch the border. |_____| | / | \ | 6 7 8 | *******************************************************************/ enum osd_corner { OSD_TOP_LEFT, // 0 in the picture above OSD_TOP_CENTER, // 1 in the picture above OSD_TOP_RIGHT, // 2 in the picture above OSD_MIDDLE_LEFT, // 3 in the picture above OSD_MIDDLE_CENTER, // 4 in the picture above OSD_MIDDLE_RIGHT, // 5 in the picture above OSD_BOTTOM_LEFT, // 6 in the picture above OSD_BOTTOM_CENTER, // 7 in the picture above OSD_BOTTOM_RIGHT, // 8 in the picture above OSD_NUM_CORNERS }; enum osd_message_state { OSD_APPEAR, // OSD message is appearing on the screen OSD_DISPLAY, // OSD message is being displayed on the screen OSD_DISAPPEAR, // OSD message is disappearing from the screen OSD_NUM_STATES }; enum osd_animation_type { OSD_NONE, OSD_FADE, OSD_NUM_ANIM_TYPES }; typedef struct { char *text; // Text that this object will have when displayed enum osd_corner corner; // One of the 9 corners float xoffset; // Relative X position float yoffset; // Relative Y position float color[3]; // Red, Green, Blue values float sizebox[4]; // bounding box (xmin, ymin, xmax, ymax) int state; // display state of current message enum osd_animation_type animation[OSD_NUM_STATES]; // animations for each display state unsigned int timeout[OSD_NUM_STATES]; // timeouts for each display state #define OSD_INFINITE_TIMEOUT 0xffffffff unsigned int frames; // number of frames in this state int user_managed; // structure managed by caller and not to be freed by us struct list_head list; } osd_message_t; enum { R, G, B }; // for referencing color array #ifdef __cplusplus extern "C" { #endif #ifdef M64P_OSD void osd_init(int width, int height); void osd_exit(void); void osd_render(void); osd_message_t * osd_new_message(enum osd_corner, const char *, ...); void osd_update_message(osd_message_t *, const char *, ...); void osd_delete_message(osd_message_t *); void osd_message_set_static(osd_message_t *); void osd_message_set_user_managed(osd_message_t *); #else static osal_inline void osd_init(int width, int height) { } static osal_inline void osd_exit(void) { } static osal_inline void osd_render(void) { } static osal_inline osd_message_t * osd_new_message(enum osd_corner eCorner, const char *fmt, ...) { return NULL; } static osal_inline void osd_update_message(osd_message_t *msg, const char *fmt, ...) { } static osal_inline void osd_delete_message(osd_message_t *msg) { } static osal_inline void osd_message_set_static(osd_message_t *msg) { } static osal_inline void osd_message_set_user_managed(osd_message_t *msg) { } #endif #ifdef __cplusplus } #endif #endif // __OSD_H__ mupen64plus-core-src-2.5/src/osd/screenshot.cpp000066400000000000000000000177271251723631200215520ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - screenshot.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 Richard42 * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include #include #include #include #include #include "osd.h" extern "C" { #define M64P_CORE_PROTOTYPES 1 #include "api/callbacks.h" #include "api/config.h" #include "api/m64p_config.h" #include "api/m64p_types.h" #include "main/main.h" #include "main/rom.h" #include "main/util.h" #include "osal/files.h" #include "osal/preproc.h" #include "plugin/plugin.h" } /********************************************************************************************************* * PNG support functions for writing screenshot files */ static void mupen_png_error(png_structp png_write, const char *message) { DebugMessage(M64MSG_ERROR, "PNG Error: %s", message); } static void mupen_png_warn(png_structp png_write, const char *message) { DebugMessage(M64MSG_WARNING, "PNG Warning: %s", message); } static void user_write_data(png_structp png_write, png_bytep data, png_size_t length) { FILE *fPtr = (FILE *) png_get_io_ptr(png_write); if (fwrite(data, 1, length, fPtr) != length) DebugMessage(M64MSG_ERROR, "Failed to write %zi bytes to screenshot file.", length); } static void user_flush_data(png_structp png_write) { FILE *fPtr = (FILE *) png_get_io_ptr(png_write); fflush(fPtr); } /********************************************************************************************************* * Other Local (static) functions */ static int SaveRGBBufferToFile(const char *filename, const unsigned char *buf, int width, int height, int pitch) { int i; // allocate PNG structures png_structp png_write = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, mupen_png_error, mupen_png_warn); if (!png_write) { DebugMessage(M64MSG_ERROR, "Error creating PNG write struct."); return 1; } png_infop png_info = png_create_info_struct(png_write); if (!png_info) { png_destroy_write_struct(&png_write, (png_infopp)NULL); DebugMessage(M64MSG_ERROR, "Error creating PNG info struct."); return 2; } // Set the jumpback if (setjmp(png_jmpbuf(png_write))) { png_destroy_write_struct(&png_write, &png_info); DebugMessage(M64MSG_ERROR, "Error calling setjmp()"); return 3; } // open the file to write FILE *savefile = fopen(filename, "wb"); if (savefile == NULL) { DebugMessage(M64MSG_ERROR, "Error opening '%s' to save screenshot.", filename); return 4; } // set function pointers in the PNG library, for write callbacks png_set_write_fn(png_write, (png_voidp) savefile, user_write_data, user_flush_data); // set the info png_set_IHDR(png_write, png_info, width, height, 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); // allocate row pointers and scale each row to 24-bit color png_byte **row_pointers; row_pointers = (png_byte **) malloc(height * sizeof(png_bytep)); for (i = 0; i < height; i++) { row_pointers[i] = (png_byte *) (buf + (height - 1 - i) * pitch); } // set the row pointers png_set_rows(png_write, png_info, row_pointers); // write the picture to disk png_write_png(png_write, png_info, 0, NULL); // free memory free(row_pointers); png_destroy_write_struct(&png_write, &png_info); // close file fclose(savefile); // all done return 0; } static int CurrentShotIndex; static char *GetNextScreenshotPath(void) { char *ScreenshotPath; char ScreenshotFileName[20 + 8 + 1]; // generate the base name of the screenshot // add the ROM name, convert to lowercase, convert spaces to underscores strcpy(ScreenshotFileName, ROM_PARAMS.headername); for (char *pch = ScreenshotFileName; *pch != '\0'; pch++) *pch = (*pch == ' ') ? '_' : tolower(*pch); strcat(ScreenshotFileName, "-###.png"); // add the base path to the screenshot file name const char *SshotDir = ConfigGetParamString(g_CoreConfig, "ScreenshotPath"); if (SshotDir == NULL || *SshotDir == '\0') { // note the trick to avoid an allocation. we add a NUL character // instead of the separator, call mkdir, then add the separator ScreenshotPath = formatstr("%sscreenshot%c%s", ConfigGetUserDataPath(), '\0', ScreenshotFileName); if (ScreenshotPath == NULL) return NULL; osal_mkdirp(ScreenshotPath, 0700); ScreenshotPath[strlen(ScreenshotPath)] = OSAL_DIR_SEPARATORS[0]; } else { ScreenshotPath = combinepath(SshotDir, ScreenshotFileName); if (ScreenshotPath == NULL) return NULL; } // patch the number part of the name (the '###' part) until we find a free spot char *NumberPtr = ScreenshotPath + strlen(ScreenshotPath) - 7; for (; CurrentShotIndex < 1000; CurrentShotIndex++) { sprintf(NumberPtr, "%03i.png", CurrentShotIndex); FILE *pFile = fopen(ScreenshotPath, "r"); if (pFile == NULL) break; fclose(pFile); } if (CurrentShotIndex >= 1000) { DebugMessage(M64MSG_ERROR, "Can't save screenshot; folder already contains 1000 screenshots for this ROM"); free(ScreenshotPath); return NULL; } CurrentShotIndex++; return ScreenshotPath; } /********************************************************************************************************* * Global screenshot functions */ extern "C" void ScreenshotRomOpen(void) { CurrentShotIndex = 0; } extern "C" void TakeScreenshot(int iFrameNumber) { char *filename; // look for an unused screenshot filename filename = GetNextScreenshotPath(); if (filename == NULL) return; // get the width and height int width = 640; int height = 480; gfx.readScreen(NULL, &width, &height, 0); // allocate memory for the image unsigned char *pucFrame = (unsigned char *) malloc(width * height * 3); if (pucFrame == NULL) { free(filename); return; } // grab the back image from OpenGL by calling the video plugin gfx.readScreen(pucFrame, &width, &height, 0); // write the image to a PNG SaveRGBBufferToFile(filename, pucFrame, width, height, width * 3); // free the memory free(pucFrame); free(filename); // print message -- this allows developers to capture frames and use them in the regression test main_message(M64MSG_INFO, OSD_BOTTOM_LEFT, "Captured screenshot for frame %i.", iFrameNumber); } mupen64plus-core-src-2.5/src/osd/screenshot.h000066400000000000000000000032211251723631200211770ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - screenshot.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 Richard42 * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifdef __cplusplus extern "C" { #endif void ScreenshotRomOpen(void); void TakeScreenshot(int iFrameNumber); #ifdef __cplusplus } #endif mupen64plus-core-src-2.5/src/pi/000077500000000000000000000000001251723631200164765ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/pi/cart_rom.c000066400000000000000000000046201251723631200204520ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cart_rom.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "cart_rom.h" #include "pi_controller.h" void connect_cart_rom(struct cart_rom* cart_rom, uint8_t* rom, size_t rom_size) { cart_rom->rom = rom; cart_rom->rom_size = rom_size; } void init_cart_rom(struct cart_rom* cart_rom) { cart_rom->last_write = 0; } int read_cart_rom(void* opaque, uint32_t address, uint32_t* value) { struct pi_controller* pi = (struct pi_controller*)opaque; uint32_t addr = rom_address(address); if (pi->cart_rom.last_write != 0) { *value = pi->cart_rom.last_write; pi->cart_rom.last_write = 0; } else { *value = *(uint32_t*)(pi->cart_rom.rom + addr); } return 0; } int write_cart_rom(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct pi_controller* pi = (struct pi_controller*)opaque; pi->cart_rom.last_write = value & mask; return 0; } mupen64plus-core-src-2.5/src/pi/cart_rom.h000066400000000000000000000041121251723631200204530ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cart_rom.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_PI_CART_ROM_H #define M64P_PI_CART_ROM_H #include #include struct cart_rom { uint8_t* rom; size_t rom_size; uint32_t last_write; }; static uint32_t rom_address(uint32_t address) { return (address & 0x03fffffc); } void connect_cart_rom(struct cart_rom* cart_rom, uint8_t* rom, size_t rom_size); void init_cart_rom(struct cart_rom* cart_rom); int read_cart_rom(void* opaque, uint32_t address, uint32_t* value); int write_cart_rom(void* opaque, uint32_t address, uint32_t value, uint32_t mask); #endif mupen64plus-core-src-2.5/src/pi/flashram.c000066400000000000000000000142261251723631200204440ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - flashram.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "flashram.h" #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "memory/memory.h" #include "pi_controller.h" #include "ri/ri_controller.h" #define __STDC_FORMAT_MACROS #include static void flashram_command(struct pi_controller* pi, uint32_t command) { unsigned int i; struct flashram* flashram = &pi->flashram; uint8_t* dram = (uint8_t*)pi->ri->rdram.dram; switch (command & 0xff000000) { case 0x4b000000: flashram->erase_offset = (command & 0xffff) * 128; break; case 0x78000000: flashram->mode = FLASHRAM_MODE_ERASE; flashram->status = 0x1111800800c20000LL; break; case 0xa5000000: flashram->erase_offset = (command & 0xffff) * 128; flashram->status = 0x1111800400c20000LL; break; case 0xb4000000: flashram->mode = FLASHRAM_MODE_WRITE; break; case 0xd2000000: // execute switch (flashram->mode) { case FLASHRAM_MODE_NOPES: case FLASHRAM_MODE_READ: break; case FLASHRAM_MODE_ERASE: { for (i=flashram->erase_offset; i<(flashram->erase_offset+128); ++i) flashram->data[i^S8] = 0xff; flashram_save(flashram); } break; case FLASHRAM_MODE_WRITE: { for(i = 0; i < 128; ++i) flashram->data[(flashram->erase_offset+i)^S8]= dram[(flashram->write_pointer+i)^S8]; flashram_save(flashram); } break; case FLASHRAM_MODE_STATUS: break; default: DebugMessage(M64MSG_WARNING, "unknown flashram command with mode:%x", flashram->mode); break; } flashram->mode = FLASHRAM_MODE_NOPES; break; case 0xe1000000: flashram->mode = FLASHRAM_MODE_STATUS; flashram->status = 0x1111800100c20000LL; break; case 0xf0000000: flashram->mode = FLASHRAM_MODE_READ; flashram->status = 0x11118004f0000000LL; break; default: DebugMessage(M64MSG_WARNING, "unknown flashram command: %" PRIX32, command); break; } } void init_flashram(struct flashram* flashram) { flashram->mode = FLASHRAM_MODE_NOPES; flashram->status = 0; flashram->erase_offset = 0; flashram->write_pointer = 0; } void flashram_save(struct flashram* flashram) { flashram->save(flashram->user_data); } void format_flashram(uint8_t* flash) { memset(flash, 0xff, FLASHRAM_SIZE); } int read_flashram_status(void* opaque, uint32_t address, uint32_t* value) { struct pi_controller* pi = (struct pi_controller*)opaque; if ((pi->use_flashram == -1) || ((address & 0xffff) != 0)) { DebugMessage(M64MSG_ERROR, "unknown read in read_flashram_status()"); return -1; } pi->use_flashram = 1; *value = pi->flashram.status >> 32; return 0; } int write_flashram_command(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct pi_controller* pi = (struct pi_controller*)opaque; if ((pi->use_flashram == -1) || ((address & 0xffff) != 0)) { DebugMessage(M64MSG_ERROR, "unknown write in write_flashram_command()"); return -1; } pi->use_flashram = 1; flashram_command(pi, value & mask); return 0; } void dma_read_flashram(struct pi_controller* pi) { unsigned int i, length; struct flashram* flashram = &pi->flashram; uint32_t* dram = pi->ri->rdram.dram; uint8_t* mem = flashram->data; unsigned int dram_addr, cart_addr; switch (flashram->mode) { case FLASHRAM_MODE_STATUS: dram[pi->regs[PI_DRAM_ADDR_REG]/4] = (uint32_t)(flashram->status >> 32); dram[pi->regs[PI_DRAM_ADDR_REG]/4+1] = (uint32_t)(flashram->status); break; case FLASHRAM_MODE_READ: length = (pi->regs[PI_WR_LEN_REG] & 0xffffff) + 1; dram_addr = pi->regs[PI_DRAM_ADDR_REG]; cart_addr = ((pi->regs[PI_CART_ADDR_REG]-0x08000000)&0xffff)*2; for(i = 0; i < length; ++i) ((uint8_t*)dram)[(dram_addr+i)^S8] = mem[(cart_addr+i)^S8]; break; default: DebugMessage(M64MSG_WARNING, "unknown dma_read_flashram: %x", flashram->mode); break; } } void dma_write_flashram(struct pi_controller* pi) { struct flashram* flashram = &pi->flashram; switch (flashram->mode) { case FLASHRAM_MODE_WRITE: flashram->write_pointer = pi->regs[PI_DRAM_ADDR_REG]; break; default: DebugMessage(M64MSG_ERROR, "unknown dma_write_flashram: %x", flashram->mode); break; } } mupen64plus-core-src-2.5/src/pi/flashram.h000066400000000000000000000047661251723631200204610ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - flashram.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_PI_FLASHRAM_H #define M64P_PI_FLASHRAM_H #include struct pi_controller; enum { FLASHRAM_SIZE = 0x20000 }; enum flashram_mode { FLASHRAM_MODE_NOPES = 0, FLASHRAM_MODE_ERASE, FLASHRAM_MODE_WRITE, FLASHRAM_MODE_READ, FLASHRAM_MODE_STATUS }; struct flashram { /* external sram storage */ void* user_data; void (*save)(void*); uint8_t* data; enum flashram_mode mode; uint64_t status; unsigned int erase_offset; unsigned int write_pointer; }; void init_flashram(struct flashram* flashram); void flashram_save(struct flashram* flashram); void format_flashram(uint8_t* flash); int read_flashram_status(void* opaque, uint32_t address, uint32_t* value); int write_flashram_command(void* opaque, uint32_t address, uint32_t value, uint32_t mask); void dma_read_flashram(struct pi_controller* pi); void dma_write_flashram(struct pi_controller* pi); #endif mupen64plus-core-src-2.5/src/pi/pi_controller.c000066400000000000000000000151721251723631200215230ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - pi_controller.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "pi_controller.h" #define M64P_CORE_PROTOTYPES 1 #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "memory/memory.h" #include "r4300/r4300_core.h" #include "ri/rdram_detection_hack.h" #include "ri/ri_controller.h" #define __STDC_FORMAT_MACROS #include static void dma_pi_read(struct pi_controller* pi) { if (pi->regs[PI_CART_ADDR_REG] >= 0x08000000 && pi->regs[PI_CART_ADDR_REG] < 0x08010000) { if (pi->use_flashram != 1) { dma_write_sram(pi); pi->use_flashram = -1; } else { dma_write_flashram(pi); } } else { DebugMessage(M64MSG_WARNING, "Unknown dma read in dma_pi_read()"); } pi->regs[PI_STATUS_REG] |= 1; update_count(); add_interupt_event(PI_INT, 0x1000/*pi->regs[PI_RD_LEN_REG]*/); } static void dma_pi_write(struct pi_controller* pi) { unsigned int longueur, i; uint32_t dram_address; uint32_t rom_address; uint8_t* dram; const uint8_t* rom; if (pi->regs[PI_CART_ADDR_REG] < 0x10000000) { if (pi->regs[PI_CART_ADDR_REG] >= 0x08000000 && pi->regs[PI_CART_ADDR_REG] < 0x08010000) { if (pi->use_flashram != 1) { dma_read_sram(pi); pi->use_flashram = -1; } else { dma_read_flashram(pi); } } else if (pi->regs[PI_CART_ADDR_REG] >= 0x06000000 && pi->regs[PI_CART_ADDR_REG] < 0x08000000) { } else { DebugMessage(M64MSG_WARNING, "Unknown dma write 0x%" PRIX32 " in dma_pi_write()", pi->regs[PI_CART_ADDR_REG]); } pi->regs[PI_STATUS_REG] |= 1; update_count(); add_interupt_event(PI_INT, /*pi->regs[PI_WR_LEN_REG]*/0x1000); return; } if (pi->regs[PI_CART_ADDR_REG] >= 0x1fc00000) // for paper mario { pi->regs[PI_STATUS_REG] |= 1; update_count(); add_interupt_event(PI_INT, 0x1000); return; } longueur = (pi->regs[PI_WR_LEN_REG] & 0xFFFFFF)+1; i = (pi->regs[PI_CART_ADDR_REG]-0x10000000)&0x3FFFFFF; longueur = (i + longueur) > pi->cart_rom.rom_size ? (pi->cart_rom.rom_size - i) : longueur; longueur = (pi->regs[PI_DRAM_ADDR_REG] + longueur) > 0x7FFFFF ? (0x7FFFFF - pi->regs[PI_DRAM_ADDR_REG]) : longueur; if (i > pi->cart_rom.rom_size || pi->regs[PI_DRAM_ADDR_REG] > 0x7FFFFF) { pi->regs[PI_STATUS_REG] |= 3; update_count(); add_interupt_event(PI_INT, longueur/8); return; } dram_address = pi->regs[PI_DRAM_ADDR_REG]; rom_address = (pi->regs[PI_CART_ADDR_REG] - 0x10000000) & 0x3ffffff; dram = (uint8_t*)pi->ri->rdram.dram; rom = pi->cart_rom.rom; for(i = 0; i < longueur; ++i) { dram[(dram_address+i)^S8] = rom[(rom_address+i)^S8]; } invalidate_r4300_cached_code(0x80000000 + dram_address, longueur); invalidate_r4300_cached_code(0xa0000000 + dram_address, longueur); /* HACK: monitor PI DMA to trigger RDRAM size detection * hack just before initial cart ROM loading. */ if (pi->regs[PI_CART_ADDR_REG] == 0x10001000) { force_detected_rdram_size_hack(); } pi->regs[PI_STATUS_REG] |= 3; update_count(); add_interupt_event(PI_INT, longueur/8); return; } void connect_pi(struct pi_controller* pi, struct r4300_core* r4300, struct ri_controller* ri, uint8_t* rom, size_t rom_size) { connect_cart_rom(&pi->cart_rom, rom, rom_size); pi->r4300 = r4300; pi->ri = ri; } void init_pi(struct pi_controller* pi) { memset(pi->regs, 0, PI_REGS_COUNT*sizeof(uint32_t)); init_flashram(&pi->flashram); pi->use_flashram = 0; } int read_pi_regs(void* opaque, uint32_t address, uint32_t* value) { struct pi_controller* pi = (struct pi_controller*)opaque; uint32_t reg = pi_reg(address); *value = pi->regs[reg]; return 0; } int write_pi_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct pi_controller* pi = (struct pi_controller*)opaque; uint32_t reg = pi_reg(address); switch (reg) { case PI_RD_LEN_REG: masked_write(&pi->regs[PI_RD_LEN_REG], value, mask); dma_pi_read(pi); return 0; case PI_WR_LEN_REG: masked_write(&pi->regs[PI_WR_LEN_REG], value, mask); dma_pi_write(pi); return 0; case PI_STATUS_REG: if (value & mask & 2) clear_rcp_interrupt(pi->r4300, MI_INTR_PI); return 0; case PI_BSD_DOM1_LAT_REG: case PI_BSD_DOM1_PWD_REG: case PI_BSD_DOM1_PGS_REG: case PI_BSD_DOM1_RLS_REG: case PI_BSD_DOM2_LAT_REG: case PI_BSD_DOM2_PWD_REG: case PI_BSD_DOM2_PGS_REG: case PI_BSD_DOM2_RLS_REG: masked_write(&pi->regs[reg], value & 0xff, mask); return 0; } masked_write(&pi->regs[reg], value, mask); return 0; } void pi_end_of_dma_event(struct pi_controller* pi) { pi->regs[PI_STATUS_REG] &= ~3; raise_rcp_interrupt(pi->r4300, MI_INTR_PI); } mupen64plus-core-src-2.5/src/pi/pi_controller.h000066400000000000000000000054211251723631200215240ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - pi_controller.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_PI_PI_CONTROLLER_H #define M64P_PI_PI_CONTROLLER_H #include #include #include "cart_rom.h" #include "flashram.h" #include "sram.h" struct r4300_core; struct ri_controller; enum pi_registers { PI_DRAM_ADDR_REG, PI_CART_ADDR_REG, PI_RD_LEN_REG, PI_WR_LEN_REG, PI_STATUS_REG, PI_BSD_DOM1_LAT_REG, PI_BSD_DOM1_PWD_REG, PI_BSD_DOM1_PGS_REG, PI_BSD_DOM1_RLS_REG, PI_BSD_DOM2_LAT_REG, PI_BSD_DOM2_PWD_REG, PI_BSD_DOM2_PGS_REG, PI_BSD_DOM2_RLS_REG, PI_REGS_COUNT }; struct pi_controller { uint32_t regs[PI_REGS_COUNT]; struct cart_rom cart_rom; struct flashram flashram; struct sram sram; int use_flashram; struct r4300_core* r4300; struct ri_controller* ri; }; static uint32_t pi_reg(uint32_t address) { return (address & 0xffff) >> 2; } void connect_pi(struct pi_controller* pi, struct r4300_core* r4300, struct ri_controller* ri, uint8_t* rom, size_t rom_size); void init_pi(struct pi_controller* pi); int read_pi_regs(void* opaque, uint32_t address, uint32_t* value); int write_pi_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask); void pi_end_of_dma_event(struct pi_controller* pi); #endif mupen64plus-core-src-2.5/src/pi/sram.c000066400000000000000000000052531251723631200176110ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - sram.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "sram.h" #include #include #include #include "memory/memory.h" #include "pi_controller.h" #include "ri/ri_controller.h" void sram_save(struct sram* sram) { sram->save(sram->user_data); } void format_sram(uint8_t* sram) { memset(sram, 0, SRAM_SIZE); } void dma_write_sram(struct pi_controller* pi) { size_t i; size_t length = (pi->regs[PI_RD_LEN_REG] & 0xffffff) + 1; uint8_t* sram = pi->sram.data; uint8_t* dram = (uint8_t*)pi->ri->rdram.dram; uint32_t cart_addr = pi->regs[PI_CART_ADDR_REG] - 0x08000000; uint32_t dram_addr = pi->regs[PI_DRAM_ADDR_REG]; for(i = 0; i < length; ++i) sram[(cart_addr+i)^S8] = dram[(dram_addr+i)^S8]; sram_save(&pi->sram); } void dma_read_sram(struct pi_controller* pi) { size_t i; size_t length = (pi->regs[PI_WR_LEN_REG] & 0xffffff) + 1; uint8_t* sram = pi->sram.data; uint8_t* dram = (uint8_t*)pi->ri->rdram.dram; uint32_t cart_addr = (pi->regs[PI_CART_ADDR_REG] - 0x08000000) & 0xffff; uint32_t dram_addr = pi->regs[PI_DRAM_ADDR_REG]; for(i = 0; i < length; ++i) dram[(dram_addr+i)^S8] = sram[(cart_addr+i)^S8]; } mupen64plus-core-src-2.5/src/pi/sram.h000066400000000000000000000036351251723631200176200ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - sram.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_PI_SRAM_H #define M64P_PI_SRAM_H #include struct pi_controller; enum { SRAM_SIZE = 0x8000 }; struct sram { /* external sram storage */ void* user_data; void (*save)(void*); uint8_t* data; }; void sram_save(struct sram* sram); void format_sram(uint8_t* sram); void dma_write_sram(struct pi_controller* pi); void dma_read_sram(struct pi_controller* pi); #endif mupen64plus-core-src-2.5/src/plugin/000077500000000000000000000000001251723631200173645ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/plugin/dummy_audio.c000066400000000000000000000055731251723631200220560ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dummy_audio.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008-2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "api/m64p_types.h" #include "dummy_audio.h" #include "plugin.h" m64p_error dummyaudio_PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities) { if (PluginType != NULL) *PluginType = M64PLUGIN_AUDIO; if (PluginVersion != NULL) *PluginVersion = 0x00010000; if (APIVersion != NULL) *APIVersion = AUDIO_API_VERSION; if (PluginNamePtr != NULL) *PluginNamePtr = "Mupen64Plus-NoAudio"; if (Capabilities != NULL) *Capabilities = 0; return M64ERR_SUCCESS; } void dummyaudio_AiDacrateChanged(int SystemType) { return; } void dummyaudio_AiLenChanged(void) { return; } int dummyaudio_InitiateAudio(AUDIO_INFO Audio_Info) { return 1; } int dummyaudio_RomOpen(void) { return 1; } void dummyaudio_RomClosed(void) { return; } void dummyaudio_ProcessAList(void) { return; } void dummyaudio_SetSpeedFactor(int percent) { return; } void dummyaudio_VolumeUp(void) { return; } void dummyaudio_VolumeDown(void) { return; } int dummyaudio_VolumeGetLevel(void) { return 0; } void dummyaudio_VolumeSetLevel(int level) { return; } void dummyaudio_VolumeMute(void) { return; } const char *dummyaudio_VolumeGetString(void) { return "disabled"; } mupen64plus-core-src-2.5/src/plugin/dummy_audio.h000066400000000000000000000046731251723631200220630ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dummy_audio.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008-2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if !defined(DUMMY_AUDIO_H) #define DUMMY_AUDIO_H #include "api/m64p_plugin.h" #include "api/m64p_types.h" extern m64p_error dummyaudio_PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities); extern void dummyaudio_AiDacrateChanged(int SystemType); extern void dummyaudio_AiLenChanged(void); extern int dummyaudio_InitiateAudio(AUDIO_INFO Audio_Info); extern void dummyaudio_ProcessAList(void); extern int dummyaudio_RomOpen(void); extern void dummyaudio_RomClosed(void); extern void dummyaudio_SetSpeedFactor(int percent); extern void dummyaudio_VolumeUp(void); extern void dummyaudio_VolumeDown(void); extern int dummyaudio_VolumeGetLevel(void); extern void dummyaudio_VolumeSetLevel(int level); extern void dummyaudio_VolumeMute(void); extern const char * dummyaudio_VolumeGetString(void); #endif /* DUMMY_AUDIO_H */ mupen64plus-core-src-2.5/src/plugin/dummy_input.c000066400000000000000000000054101251723631200221020ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dummy_input.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 Scott Gorman (okaygo) * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "api/m64p_types.h" #include "dummy_input.h" #include "plugin.h" m64p_error dummyinput_PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities) { if (PluginType != NULL) *PluginType = M64PLUGIN_INPUT; if (PluginVersion != NULL) *PluginVersion = 0x00010000; if (APIVersion != NULL) *APIVersion = INPUT_API_VERSION; if (PluginNamePtr != NULL) *PluginNamePtr = "Mupen64Plus-NoInput"; if (Capabilities != NULL) *Capabilities = 0; return M64ERR_SUCCESS; } void dummyinput_InitiateControllers (CONTROL_INFO ControlInfo) { ControlInfo.Controls[0].Present = 1; } void dummyinput_GetKeys(int Control, BUTTONS * Keys ) { Keys->Value = 0x0000; } void dummyinput_ControllerCommand(int Control, unsigned char *Command) { } void dummyinput_ReadController(int Control, unsigned char *Command) { } int dummyinput_RomOpen(void) { return 1; } void dummyinput_RomClosed(void) { } void dummyinput_SDL_KeyDown(int keymod, int keysym) { } void dummyinput_SDL_KeyUp(int keymod, int keysym) { } mupen64plus-core-src-2.5/src/plugin/dummy_input.h000066400000000000000000000047071251723631200221170ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dummy_input.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if !defined(DUMMY_INPUT_H) #define DUMMY_INPUT_H #include "api/m64p_plugin.h" #include "api/m64p_types.h" extern m64p_error dummyinput_PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities); extern void dummyinput_InitiateControllers (CONTROL_INFO ControlInfo); extern void dummyinput_GetKeys(int Control, BUTTONS * Keys ); extern void dummyinput_ControllerCommand(int Control, unsigned char *Command); extern void dummyinput_GetKeys(int Control, BUTTONS * Keys); extern void dummyinput_InitiateControllers(CONTROL_INFO ControlInfo); extern void dummyinput_ReadController(int Control, unsigned char *Command); extern int dummyinput_RomOpen(void); extern void dummyinput_RomClosed(void); extern void dummyinput_SDL_KeyDown(int keymod, int keysym); extern void dummyinput_SDL_KeyUp(int keymod, int keysym); #endif /* DUMMY_INPUT_H */ mupen64plus-core-src-2.5/src/plugin/dummy_rsp.c000066400000000000000000000045211251723631200215510ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dummy_rsp.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "api/m64p_types.h" #include "dummy_rsp.h" #include "plugin.h" m64p_error dummyrsp_PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities) { if (PluginType != NULL) *PluginType = M64PLUGIN_RSP; if (PluginVersion != NULL) *PluginVersion = 0x00010000; if (APIVersion != NULL) *APIVersion = RSP_API_VERSION; if (PluginNamePtr != NULL) *PluginNamePtr = "Mupen64Plus-NoRSP"; if (Capabilities != NULL) *Capabilities = 0; return M64ERR_SUCCESS; } unsigned int dummyrsp_DoRspCycles(unsigned int Cycles) { return Cycles; } void dummyrsp_InitiateRSP(RSP_INFO Rsp_Info, unsigned int * CycleCount) { } void dummyrsp_RomClosed(void) { } mupen64plus-core-src-2.5/src/plugin/dummy_rsp.h000066400000000000000000000040121251723631200215510ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dummy_rsp.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard42 * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if !defined(DUMMY_RSP_H) #define DUMMY_RSP_H #include "api/m64p_plugin.h" #include "api/m64p_types.h" extern m64p_error dummyrsp_PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities); extern unsigned int dummyrsp_DoRspCycles(unsigned int Cycles); extern void dummyrsp_InitiateRSP(RSP_INFO Rsp_Info, unsigned int *CycleCount); extern void dummyrsp_RomClosed(void); #endif /* DUMMY_RSP_H */ mupen64plus-core-src-2.5/src/plugin/dummy_video.c000066400000000000000000000061251251723631200220550ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dummy_video.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 John Chadwick (NMN) * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "api/m64p_types.h" #include "dummy_video.h" #include "plugin.h" m64p_error dummyvideo_PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities) { if (PluginType != NULL) *PluginType = M64PLUGIN_GFX; if (PluginVersion != NULL) *PluginVersion = 0x00010000; if (APIVersion != NULL) *APIVersion = GFX_API_VERSION; if (PluginNamePtr != NULL) *PluginNamePtr = "Mupen64Plus-NoVideo"; if (Capabilities != NULL) *Capabilities = 0; return M64ERR_SUCCESS; } void dummyvideo_ChangeWindow (void) { } int dummyvideo_InitiateGFX (GFX_INFO Gfx_Info) { return 1; } void dummyvideo_MoveScreen (int xpos, int ypos) { } void dummyvideo_ProcessDList(void) { } void dummyvideo_ProcessRDPList(void) { } void dummyvideo_RomClosed (void) { } int dummyvideo_RomOpen (void) { return 1; } void dummyvideo_ShowCFB (void) { } void dummyvideo_UpdateScreen (void) { } void dummyvideo_ViStatusChanged (void) { } void dummyvideo_ViWidthChanged (void) { } void dummyvideo_ReadScreen2 (void *dest, int *width, int *height, int front) { } void dummyvideo_SetRenderingCallback(void (*callback)(int)) { } void dummyvideo_FBRead(unsigned int addr) { } void dummyvideo_FBWrite(unsigned int addr, unsigned int size) { } void dummyvideo_FBGetFrameBufferInfo(void *p) { } void dummyvideo_ResizeVideoOutput(int width, int height) { } mupen64plus-core-src-2.5/src/plugin/dummy_video.h000066400000000000000000000053221251723631200220600ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - dummy_video.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if !defined(DUMMY_VIDEO_H) #define DUMMY_VIDEO_H #include "api/m64p_plugin.h" #include "api/m64p_types.h" extern m64p_error dummyvideo_PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities); extern void dummyvideo_ChangeWindow(void); extern int dummyvideo_InitiateGFX(GFX_INFO Gfx_Info); extern void dummyvideo_MoveScreen(int xpos, int ypos); extern void dummyvideo_ProcessDList(void); extern void dummyvideo_ProcessRDPList(void); extern void dummyvideo_RomClosed(void); extern int dummyvideo_RomOpen(void); extern void dummyvideo_ShowCFB(void); extern void dummyvideo_UpdateScreen(void); extern void dummyvideo_ViStatusChanged(void); extern void dummyvideo_ViWidthChanged(void); extern void dummyvideo_ReadScreen2(void *dest, int *width, int *height, int front); extern void dummyvideo_SetRenderingCallback(void (*callback)(int)); extern void dummyvideo_ResizeVideoOutput(int width, int height); extern void dummyvideo_FBRead(unsigned int addr); extern void dummyvideo_FBWrite(unsigned int addr, unsigned int size); extern void dummyvideo_FBGetFrameBufferInfo(void *p); #endif /* DUMMY_VIDEO_H */ mupen64plus-core-src-2.5/src/plugin/emulate_game_controller_via_input_plugin.c000066400000000000000000000046321251723631200300610ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - emulate_game_controller_via_input_plugin.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "emulate_game_controller_via_input_plugin.h" #include "api/m64p_plugin.h" #include "plugin.h" #include "si/game_controller.h" int egcvip_is_connected(void* opaque, enum pak_type* pak) { int channel = *(int*)opaque; CONTROL* c = &Controls[channel]; switch(c->Plugin) { case PLUGIN_NONE: *pak = PAK_NONE; break; case PLUGIN_MEMPAK: *pak = PAK_MEM; break; case PLUGIN_RUMBLE_PAK: *pak = PAK_RUMBLE; break; case PLUGIN_TRANSFER_PAK: *pak = PAK_TRANSFER; break; case PLUGIN_RAW: /* historically PLUGIN_RAW has been mostly (exclusively ?) used for rumble, * so we just reproduce that behavior */ *pak = PAK_RUMBLE; break; } return c->Present; } uint32_t egcvip_get_input(void* opaque) { BUTTONS keys = { 0 }; int channel = *(int*)opaque; if (input.getKeys) input.getKeys(channel, &keys); return keys.Value; } mupen64plus-core-src-2.5/src/plugin/emulate_game_controller_via_input_plugin.h000066400000000000000000000034271251723631200300670ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - emulate_game_controller_via_input_plugin.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_PLUGIN_EMULATE_GAME_CONTROLLER_VIA_INPUT_PLUGIN_H #define M64P_PLUGIN_EMULATE_GAME_CONTROLLER_VIA_INPUT_PLUGIN_H #include enum pak_type; int egcvip_is_connected(void* opaque, enum pak_type* pak); uint32_t egcvip_get_input(void* opaque); #endif mupen64plus-core-src-2.5/src/plugin/emulate_speaker_via_audio_plugin.c000066400000000000000000000055251251723631200263030ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - emulate_speaker_via_audio_plugin.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "emulate_speaker_via_audio_plugin.h" #include #include "ai/ai_controller.h" #include "main/rom.h" #include "plugin/plugin.h" #include "ri/ri_controller.h" void set_audio_format_via_audio_plugin(void* user_data, unsigned int frequency, unsigned int bits) { /* not really implementable with just the zilmar spec. * Try a best effort approach */ struct ai_controller* ai = (struct ai_controller*)user_data; uint32_t saved_ai_dacrate = ai->regs[AI_DACRATE_REG]; ai->regs[AI_DACRATE_REG] = ROM_PARAMS.aidacrate / frequency - 1; audio.aiDacrateChanged(ROM_PARAMS.systemtype); ai->regs[AI_DACRATE_REG] = saved_ai_dacrate; } void push_audio_samples_via_audio_plugin(void* user_data, const void* buffer, size_t size) { /* abuse core & audio plugin implementation to approximate desired effect */ struct ai_controller* ai = (struct ai_controller*)user_data; uint32_t saved_ai_length = ai->regs[AI_LEN_REG]; uint32_t saved_ai_dram = ai->regs[AI_DRAM_ADDR_REG]; /* exploit the fact that buffer points in g_rdram to retreive dram_addr_reg value */ ai->regs[AI_DRAM_ADDR_REG] = (uint8_t*)buffer - (uint8_t*)ai->ri->rdram.dram; ai->regs[AI_LEN_REG] = size; audio.aiLenChanged(); ai->regs[AI_LEN_REG] = saved_ai_length; ai->regs[AI_DRAM_ADDR_REG] = saved_ai_dram; } mupen64plus-core-src-2.5/src/plugin/emulate_speaker_via_audio_plugin.h000066400000000000000000000035221251723631200263030ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - emulate_speaker_via_audio_plugin.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_PLUGIN_EMULATE_SPEAKER_VIA_AUDIO_PLUGIN_H #define M64P_PLUGIN_EMULATE_SPEAKER_VIA_AUDIO_PLUGIN_H #include void set_audio_format_via_audio_plugin(void* user_data, unsigned int frequency, unsigned int bits); void push_audio_samples_via_audio_plugin(void* user_data, const void* buffer, size_t size); #endif mupen64plus-core-src-2.5/src/plugin/get_time_using_C_localtime.c000066400000000000000000000033351251723631200250310ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - get_time_using_C_localtime.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "get_time_using_C_localtime.h" #include const struct tm* get_time_using_C_localtime(void* user_data) { time_t current_time; time(¤t_time); return localtime(¤t_time); } mupen64plus-core-src-2.5/src/plugin/get_time_using_C_localtime.h000066400000000000000000000032731251723631200250370ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - get_time_using_C_localtime.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_PLUGIN_GET_TIME_USING_C_LOCALTIME_H #define M64P_PLUGIN_GET_TIME_USING_C_LOCALTIME_H struct tm; const struct tm* get_time_using_C_localtime(void* user_data); #endif mupen64plus-core-src-2.5/src/plugin/plugin.c000066400000000000000000000520711251723631200210330ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - plugin.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include "ai/ai_controller.h" #include "api/callbacks.h" #include "api/m64p_common.h" #include "api/m64p_plugin.h" #include "api/m64p_types.h" #include "dummy_audio.h" #include "dummy_input.h" #include "dummy_rsp.h" #include "dummy_video.h" #include "main/main.h" #include "main/rom.h" #include "main/version.h" #include "memory/memory.h" #include "osal/dynamiclib.h" #include "plugin.h" #include "r4300/r4300_core.h" #include "rdp/rdp_core.h" #include "rsp/rsp_core.h" #include "vi/vi_controller.h" CONTROL Controls[4]; /* global function pointers - initialized on core startup */ gfx_plugin_functions gfx; audio_plugin_functions audio; input_plugin_functions input; rsp_plugin_functions rsp; /* local data structures and functions */ static const gfx_plugin_functions dummy_gfx = { dummyvideo_PluginGetVersion, dummyvideo_ChangeWindow, dummyvideo_InitiateGFX, dummyvideo_MoveScreen, dummyvideo_ProcessDList, dummyvideo_ProcessRDPList, dummyvideo_RomClosed, dummyvideo_RomOpen, dummyvideo_ShowCFB, dummyvideo_UpdateScreen, dummyvideo_ViStatusChanged, dummyvideo_ViWidthChanged, dummyvideo_ReadScreen2, dummyvideo_SetRenderingCallback, dummyvideo_ResizeVideoOutput, dummyvideo_FBRead, dummyvideo_FBWrite, dummyvideo_FBGetFrameBufferInfo }; static const audio_plugin_functions dummy_audio = { dummyaudio_PluginGetVersion, dummyaudio_AiDacrateChanged, dummyaudio_AiLenChanged, dummyaudio_InitiateAudio, dummyaudio_ProcessAList, dummyaudio_RomClosed, dummyaudio_RomOpen, dummyaudio_SetSpeedFactor, dummyaudio_VolumeUp, dummyaudio_VolumeDown, dummyaudio_VolumeGetLevel, dummyaudio_VolumeSetLevel, dummyaudio_VolumeMute, dummyaudio_VolumeGetString }; static const input_plugin_functions dummy_input = { dummyinput_PluginGetVersion, dummyinput_ControllerCommand, dummyinput_GetKeys, dummyinput_InitiateControllers, dummyinput_ReadController, dummyinput_RomClosed, dummyinput_RomOpen, dummyinput_SDL_KeyDown, dummyinput_SDL_KeyUp }; static const rsp_plugin_functions dummy_rsp = { dummyrsp_PluginGetVersion, dummyrsp_DoRspCycles, dummyrsp_InitiateRSP, dummyrsp_RomClosed }; static GFX_INFO gfx_info; static AUDIO_INFO audio_info; static CONTROL_INFO control_info; static RSP_INFO rsp_info; static int l_RspAttached = 0; static int l_InputAttached = 0; static int l_AudioAttached = 0; static int l_GfxAttached = 0; static unsigned int dummy; /* local functions */ static void EmptyFunc(void) { } // Handy macro to avoid code bloat when loading symbols #define GET_FUNC(type, field, name) \ ((field = (type)osal_dynlib_getproc(plugin_handle, name)) != NULL) // code to handle backwards-compatibility to video plugins with API_VERSION < 02.1.0. This API version introduced a boolean // flag in the rendering callback, which told the core whether or not the current screen has been freshly redrawn since the // last time the callback was called. static void (*l_mainRenderCallback)(int) = NULL; static ptr_SetRenderingCallback l_old1SetRenderingCallback = NULL; static void backcompat_videoRenderCallback(int unused) // this function will be called by the video plugin as the render callback { if (l_mainRenderCallback != NULL) l_mainRenderCallback(1); // assume screen is always freshly redrawn (otherwise screenshots won't work w/ OSD enabled) } static void backcompat_setRenderCallbackIntercept(void (*callback)(int)) { l_mainRenderCallback = callback; } static void plugin_disconnect_gfx(void) { gfx = dummy_gfx; l_GfxAttached = 0; l_mainRenderCallback = NULL; } static m64p_error plugin_connect_gfx(m64p_dynlib_handle plugin_handle) { /* attach the Video plugin function pointers */ if (plugin_handle != NULL) { m64p_plugin_type PluginType; int PluginVersion, APIVersion; if (l_GfxAttached) return M64ERR_INVALID_STATE; /* set function pointers for required functions */ if (!GET_FUNC(ptr_PluginGetVersion, gfx.getVersion, "PluginGetVersion") || !GET_FUNC(ptr_ChangeWindow, gfx.changeWindow, "ChangeWindow") || !GET_FUNC(ptr_InitiateGFX, gfx.initiateGFX, "InitiateGFX") || !GET_FUNC(ptr_MoveScreen, gfx.moveScreen, "MoveScreen") || !GET_FUNC(ptr_ProcessDList, gfx.processDList, "ProcessDList") || !GET_FUNC(ptr_ProcessRDPList, gfx.processRDPList, "ProcessRDPList") || !GET_FUNC(ptr_RomClosed, gfx.romClosed, "RomClosed") || !GET_FUNC(ptr_RomOpen, gfx.romOpen, "RomOpen") || !GET_FUNC(ptr_ShowCFB, gfx.showCFB, "ShowCFB") || !GET_FUNC(ptr_UpdateScreen, gfx.updateScreen, "UpdateScreen") || !GET_FUNC(ptr_ViStatusChanged, gfx.viStatusChanged, "ViStatusChanged") || !GET_FUNC(ptr_ViWidthChanged, gfx.viWidthChanged, "ViWidthChanged") || !GET_FUNC(ptr_ReadScreen2, gfx.readScreen, "ReadScreen2") || !GET_FUNC(ptr_SetRenderingCallback, gfx.setRenderingCallback, "SetRenderingCallback") || !GET_FUNC(ptr_FBRead, gfx.fBRead, "FBRead") || !GET_FUNC(ptr_FBWrite, gfx.fBWrite, "FBWrite") || !GET_FUNC(ptr_FBGetFrameBufferInfo, gfx.fBGetFrameBufferInfo, "FBGetFrameBufferInfo")) { DebugMessage(M64MSG_ERROR, "broken Video plugin; function(s) not found."); plugin_disconnect_gfx(); return M64ERR_INPUT_INVALID; } /* set function pointers for optional functions */ gfx.resizeVideoOutput = (ptr_ResizeVideoOutput) osal_dynlib_getproc(plugin_handle, "ResizeVideoOutput"); /* check the version info */ (*gfx.getVersion)(&PluginType, &PluginVersion, &APIVersion, NULL, NULL); if (PluginType != M64PLUGIN_GFX || (APIVersion & 0xffff0000) != (GFX_API_VERSION & 0xffff0000)) { DebugMessage(M64MSG_ERROR, "incompatible Video plugin"); plugin_disconnect_gfx(); return M64ERR_INCOMPATIBLE; } /* handle backwards-compatibility */ if (APIVersion < 0x020100) { DebugMessage(M64MSG_WARNING, "Fallback for Video plugin API (%02i.%02i.%02i) < 2.1.0. Screenshots may contain On Screen Display text", VERSION_PRINTF_SPLIT(APIVersion)); // tell the video plugin to make its rendering callback to me (it's old, and doesn't have the bScreenRedrawn flag) gfx.setRenderingCallback(backcompat_videoRenderCallback); l_old1SetRenderingCallback = gfx.setRenderingCallback; // save this just for future use gfx.setRenderingCallback = (ptr_SetRenderingCallback) backcompat_setRenderCallbackIntercept; } if (APIVersion < 0x20200 || gfx.resizeVideoOutput == NULL) { DebugMessage(M64MSG_WARNING, "Fallback for Video plugin API (%02i.%02i.%02i) < 2.2.0. Resizable video will not work", VERSION_PRINTF_SPLIT(APIVersion)); gfx.resizeVideoOutput = dummyvideo_ResizeVideoOutput; } l_GfxAttached = 1; } else plugin_disconnect_gfx(); return M64ERR_SUCCESS; } static m64p_error plugin_start_gfx(void) { /* fill in the GFX_INFO data structure */ gfx_info.HEADER = (unsigned char *) g_rom; gfx_info.RDRAM = (unsigned char *) g_rdram; gfx_info.DMEM = (unsigned char *) g_sp.mem; gfx_info.IMEM = (unsigned char *) g_sp.mem + 0x1000; gfx_info.MI_INTR_REG = &(g_r4300.mi.regs[MI_INTR_REG]); gfx_info.DPC_START_REG = &(g_dp.dpc_regs[DPC_START_REG]); gfx_info.DPC_END_REG = &(g_dp.dpc_regs[DPC_END_REG]); gfx_info.DPC_CURRENT_REG = &(g_dp.dpc_regs[DPC_CURRENT_REG]); gfx_info.DPC_STATUS_REG = &(g_dp.dpc_regs[DPC_STATUS_REG]); gfx_info.DPC_CLOCK_REG = &(g_dp.dpc_regs[DPC_CLOCK_REG]); gfx_info.DPC_BUFBUSY_REG = &(g_dp.dpc_regs[DPC_BUFBUSY_REG]); gfx_info.DPC_PIPEBUSY_REG = &(g_dp.dpc_regs[DPC_PIPEBUSY_REG]); gfx_info.DPC_TMEM_REG = &(g_dp.dpc_regs[DPC_TMEM_REG]); gfx_info.VI_STATUS_REG = &(g_vi.regs[VI_STATUS_REG]); gfx_info.VI_ORIGIN_REG = &(g_vi.regs[VI_ORIGIN_REG]); gfx_info.VI_WIDTH_REG = &(g_vi.regs[VI_WIDTH_REG]); gfx_info.VI_INTR_REG = &(g_vi.regs[VI_V_INTR_REG]); gfx_info.VI_V_CURRENT_LINE_REG = &(g_vi.regs[VI_CURRENT_REG]); gfx_info.VI_TIMING_REG = &(g_vi.regs[VI_BURST_REG]); gfx_info.VI_V_SYNC_REG = &(g_vi.regs[VI_V_SYNC_REG]); gfx_info.VI_H_SYNC_REG = &(g_vi.regs[VI_H_SYNC_REG]); gfx_info.VI_LEAP_REG = &(g_vi.regs[VI_LEAP_REG]); gfx_info.VI_H_START_REG = &(g_vi.regs[VI_H_START_REG]); gfx_info.VI_V_START_REG = &(g_vi.regs[VI_V_START_REG]); gfx_info.VI_V_BURST_REG = &(g_vi.regs[VI_V_BURST_REG]); gfx_info.VI_X_SCALE_REG = &(g_vi.regs[VI_X_SCALE_REG]); gfx_info.VI_Y_SCALE_REG = &(g_vi.regs[VI_Y_SCALE_REG]); gfx_info.CheckInterrupts = EmptyFunc; /* call the audio plugin */ if (!gfx.initiateGFX(gfx_info)) return M64ERR_PLUGIN_FAIL; return M64ERR_SUCCESS; } static void plugin_disconnect_audio(void) { audio = dummy_audio; l_AudioAttached = 0; } static m64p_error plugin_connect_audio(m64p_dynlib_handle plugin_handle) { /* attach the Audio plugin function pointers */ if (plugin_handle != NULL) { m64p_plugin_type PluginType; int PluginVersion, APIVersion; if (l_AudioAttached) return M64ERR_INVALID_STATE; if (!GET_FUNC(ptr_PluginGetVersion, audio.getVersion, "PluginGetVersion") || !GET_FUNC(ptr_AiDacrateChanged, audio.aiDacrateChanged, "AiDacrateChanged") || !GET_FUNC(ptr_AiLenChanged, audio.aiLenChanged, "AiLenChanged") || !GET_FUNC(ptr_InitiateAudio, audio.initiateAudio, "InitiateAudio") || !GET_FUNC(ptr_ProcessAList, audio.processAList, "ProcessAList") || !GET_FUNC(ptr_RomOpen, audio.romOpen, "RomOpen") || !GET_FUNC(ptr_RomClosed, audio.romClosed, "RomClosed") || !GET_FUNC(ptr_SetSpeedFactor, audio.setSpeedFactor, "SetSpeedFactor") || !GET_FUNC(ptr_VolumeUp, audio.volumeUp, "VolumeUp") || !GET_FUNC(ptr_VolumeDown, audio.volumeDown, "VolumeDown") || !GET_FUNC(ptr_VolumeGetLevel, audio.volumeGetLevel, "VolumeGetLevel") || !GET_FUNC(ptr_VolumeSetLevel, audio.volumeSetLevel, "VolumeSetLevel") || !GET_FUNC(ptr_VolumeMute, audio.volumeMute, "VolumeMute") || !GET_FUNC(ptr_VolumeGetString, audio.volumeGetString, "VolumeGetString")) { DebugMessage(M64MSG_ERROR, "broken Audio plugin; function(s) not found."); plugin_disconnect_audio(); return M64ERR_INPUT_INVALID; } /* check the version info */ (*audio.getVersion)(&PluginType, &PluginVersion, &APIVersion, NULL, NULL); if (PluginType != M64PLUGIN_AUDIO || (APIVersion & 0xffff0000) != (AUDIO_API_VERSION & 0xffff0000)) { DebugMessage(M64MSG_ERROR, "incompatible Audio plugin"); plugin_disconnect_audio(); return M64ERR_INCOMPATIBLE; } l_AudioAttached = 1; } else plugin_disconnect_audio(); return M64ERR_SUCCESS; } static m64p_error plugin_start_audio(void) { /* fill in the AUDIO_INFO data structure */ audio_info.RDRAM = (unsigned char *) g_rdram; audio_info.DMEM = (unsigned char *) g_sp.mem; audio_info.IMEM = (unsigned char *) g_sp.mem + 0x1000; audio_info.MI_INTR_REG = &(g_r4300.mi.regs[MI_INTR_REG]); audio_info.AI_DRAM_ADDR_REG = &(g_ai.regs[AI_DRAM_ADDR_REG]); audio_info.AI_LEN_REG = &(g_ai.regs[AI_LEN_REG]); audio_info.AI_CONTROL_REG = &(g_ai.regs[AI_CONTROL_REG]); audio_info.AI_STATUS_REG = &dummy; audio_info.AI_DACRATE_REG = &(g_ai.regs[AI_DACRATE_REG]); audio_info.AI_BITRATE_REG = &(g_ai.regs[AI_BITRATE_REG]); audio_info.CheckInterrupts = EmptyFunc; /* call the audio plugin */ if (!audio.initiateAudio(audio_info)) return M64ERR_PLUGIN_FAIL; return M64ERR_SUCCESS; } static void plugin_disconnect_input(void) { input = dummy_input; l_InputAttached = 0; } static m64p_error plugin_connect_input(m64p_dynlib_handle plugin_handle) { /* attach the Input plugin function pointers */ if (plugin_handle != NULL) { m64p_plugin_type PluginType; int PluginVersion, APIVersion; if (l_InputAttached) return M64ERR_INVALID_STATE; if (!GET_FUNC(ptr_PluginGetVersion, input.getVersion, "PluginGetVersion") || !GET_FUNC(ptr_ControllerCommand, input.controllerCommand, "ControllerCommand") || !GET_FUNC(ptr_GetKeys, input.getKeys, "GetKeys") || !GET_FUNC(ptr_InitiateControllers, input.initiateControllers, "InitiateControllers") || !GET_FUNC(ptr_ReadController, input.readController, "ReadController") || !GET_FUNC(ptr_RomOpen, input.romOpen, "RomOpen") || !GET_FUNC(ptr_RomClosed, input.romClosed, "RomClosed") || !GET_FUNC(ptr_SDL_KeyDown, input.keyDown, "SDL_KeyDown") || !GET_FUNC(ptr_SDL_KeyUp, input.keyUp, "SDL_KeyUp")) { DebugMessage(M64MSG_ERROR, "broken Input plugin; function(s) not found."); plugin_disconnect_input(); return M64ERR_INPUT_INVALID; } /* check the version info */ (*input.getVersion)(&PluginType, &PluginVersion, &APIVersion, NULL, NULL); if (PluginType != M64PLUGIN_INPUT || (APIVersion & 0xffff0000) != (INPUT_API_VERSION & 0xffff0000)) { DebugMessage(M64MSG_ERROR, "incompatible Input plugin"); plugin_disconnect_input(); return M64ERR_INCOMPATIBLE; } if (APIVersion < 0x020001) { input.renderCallback = NULL; // not supported in earlier input plugins } else { if (!GET_FUNC(ptr_RenderCallback, input.renderCallback, "RenderCallback")) { DebugMessage(M64MSG_INFO, "input plugin did not specify a render callback; there will be no on screen display by the input plugin."); } } l_InputAttached = 1; } else plugin_disconnect_input(); return M64ERR_SUCCESS; } static m64p_error plugin_start_input(void) { int i; /* fill in the CONTROL_INFO data structure */ control_info.Controls = Controls; for (i=0; i<4; i++) { Controls[i].Present = 0; Controls[i].RawData = 0; Controls[i].Plugin = PLUGIN_NONE; } /* call the input plugin */ input.initiateControllers(control_info); return M64ERR_SUCCESS; } static void plugin_disconnect_rsp(void) { rsp = dummy_rsp; l_RspAttached = 0; } static m64p_error plugin_connect_rsp(m64p_dynlib_handle plugin_handle) { /* attach the RSP plugin function pointers */ if (plugin_handle != NULL) { m64p_plugin_type PluginType; int PluginVersion, APIVersion; if (l_RspAttached) return M64ERR_INVALID_STATE; if (!GET_FUNC(ptr_PluginGetVersion, rsp.getVersion, "PluginGetVersion") || !GET_FUNC(ptr_DoRspCycles, rsp.doRspCycles, "DoRspCycles") || !GET_FUNC(ptr_InitiateRSP, rsp.initiateRSP, "InitiateRSP") || !GET_FUNC(ptr_RomClosed, rsp.romClosed, "RomClosed")) { DebugMessage(M64MSG_ERROR, "broken RSP plugin; function(s) not found."); plugin_disconnect_rsp(); return M64ERR_INPUT_INVALID; } /* check the version info */ (*rsp.getVersion)(&PluginType, &PluginVersion, &APIVersion, NULL, NULL); if (PluginType != M64PLUGIN_RSP || (APIVersion & 0xffff0000) != (RSP_API_VERSION & 0xffff0000)) { DebugMessage(M64MSG_ERROR, "incompatible RSP plugin"); plugin_disconnect_rsp(); return M64ERR_INCOMPATIBLE; } l_RspAttached = 1; } else plugin_disconnect_rsp(); return M64ERR_SUCCESS; } static m64p_error plugin_start_rsp(void) { /* fill in the RSP_INFO data structure */ rsp_info.RDRAM = (unsigned char *) g_rdram; rsp_info.DMEM = (unsigned char *) g_sp.mem; rsp_info.IMEM = (unsigned char *) g_sp.mem + 0x1000; rsp_info.MI_INTR_REG = &g_r4300.mi.regs[MI_INTR_REG]; rsp_info.SP_MEM_ADDR_REG = &g_sp.regs[SP_MEM_ADDR_REG]; rsp_info.SP_DRAM_ADDR_REG = &g_sp.regs[SP_DRAM_ADDR_REG]; rsp_info.SP_RD_LEN_REG = &g_sp.regs[SP_RD_LEN_REG]; rsp_info.SP_WR_LEN_REG = &g_sp.regs[SP_WR_LEN_REG]; rsp_info.SP_STATUS_REG = &g_sp.regs[SP_STATUS_REG]; rsp_info.SP_DMA_FULL_REG = &g_sp.regs[SP_DMA_FULL_REG]; rsp_info.SP_DMA_BUSY_REG = &g_sp.regs[SP_DMA_BUSY_REG]; rsp_info.SP_PC_REG = &g_sp.regs2[SP_PC_REG]; rsp_info.SP_SEMAPHORE_REG = &g_sp.regs[SP_SEMAPHORE_REG]; rsp_info.DPC_START_REG = &g_dp.dpc_regs[DPC_START_REG]; rsp_info.DPC_END_REG = &g_dp.dpc_regs[DPC_END_REG]; rsp_info.DPC_CURRENT_REG = &g_dp.dpc_regs[DPC_CURRENT_REG]; rsp_info.DPC_STATUS_REG = &g_dp.dpc_regs[DPC_STATUS_REG]; rsp_info.DPC_CLOCK_REG = &g_dp.dpc_regs[DPC_CLOCK_REG]; rsp_info.DPC_BUFBUSY_REG = &g_dp.dpc_regs[DPC_BUFBUSY_REG]; rsp_info.DPC_PIPEBUSY_REG = &g_dp.dpc_regs[DPC_PIPEBUSY_REG]; rsp_info.DPC_TMEM_REG = &g_dp.dpc_regs[DPC_TMEM_REG]; rsp_info.CheckInterrupts = EmptyFunc; rsp_info.ProcessDlistList = gfx.processDList; rsp_info.ProcessAlistList = audio.processAList; rsp_info.ProcessRdpList = gfx.processRDPList; rsp_info.ShowCFB = gfx.showCFB; /* call the RSP plugin */ rsp.initiateRSP(rsp_info, NULL); return M64ERR_SUCCESS; } /* global functions */ m64p_error plugin_connect(m64p_plugin_type type, m64p_dynlib_handle plugin_handle) { switch(type) { case M64PLUGIN_GFX: if (plugin_handle != NULL && (l_AudioAttached || l_InputAttached || l_RspAttached)) DebugMessage(M64MSG_WARNING, "Front-end bug: plugins are attached in wrong order."); return plugin_connect_gfx(plugin_handle); case M64PLUGIN_AUDIO: if (plugin_handle != NULL && (l_InputAttached || l_RspAttached)) DebugMessage(M64MSG_WARNING, "Front-end bug: plugins are attached in wrong order."); return plugin_connect_audio(plugin_handle); case M64PLUGIN_INPUT: if (plugin_handle != NULL && (l_RspAttached)) DebugMessage(M64MSG_WARNING, "Front-end bug: plugins are attached in wrong order."); return plugin_connect_input(plugin_handle); case M64PLUGIN_RSP: return plugin_connect_rsp(plugin_handle); default: return M64ERR_INPUT_INVALID; } return M64ERR_INTERNAL; } m64p_error plugin_start(m64p_plugin_type type) { switch(type) { case M64PLUGIN_RSP: return plugin_start_rsp(); case M64PLUGIN_GFX: return plugin_start_gfx(); case M64PLUGIN_AUDIO: return plugin_start_audio(); case M64PLUGIN_INPUT: return plugin_start_input(); default: return M64ERR_INPUT_INVALID; } return M64ERR_INTERNAL; } m64p_error plugin_check(void) { if (!l_GfxAttached) DebugMessage(M64MSG_WARNING, "No video plugin attached. There will be no video output."); if (!l_RspAttached) DebugMessage(M64MSG_WARNING, "No RSP plugin attached. The video output will be corrupted."); if (!l_AudioAttached) DebugMessage(M64MSG_WARNING, "No audio plugin attached. There will be no sound output."); if (!l_InputAttached) DebugMessage(M64MSG_WARNING, "No input plugin attached. You won't be able to control the game."); return M64ERR_SUCCESS; } mupen64plus-core-src-2.5/src/plugin/plugin.h000066400000000000000000000105151251723631200210350ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - plugin.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * Copyright (C) 2009 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef PLUGIN_H #define PLUGIN_H #include "api/m64p_common.h" #include "api/m64p_plugin.h" #include "api/m64p_types.h" extern m64p_error plugin_connect(m64p_plugin_type, m64p_dynlib_handle plugin_handle); extern m64p_error plugin_start(m64p_plugin_type); extern m64p_error plugin_check(void); extern CONTROL Controls[4]; /*** Version requirement information ***/ #define RSP_API_VERSION 0x20000 #define GFX_API_VERSION 0x20200 #define AUDIO_API_VERSION 0x20000 #define INPUT_API_VERSION 0x20001 /* video plugin function pointers */ typedef struct _gfx_plugin_functions { ptr_PluginGetVersion getVersion; ptr_ChangeWindow changeWindow; ptr_InitiateGFX initiateGFX; ptr_MoveScreen moveScreen; ptr_ProcessDList processDList; ptr_ProcessRDPList processRDPList; ptr_RomClosed romClosed; ptr_RomOpen romOpen; ptr_ShowCFB showCFB; ptr_UpdateScreen updateScreen; ptr_ViStatusChanged viStatusChanged; ptr_ViWidthChanged viWidthChanged; ptr_ReadScreen2 readScreen; ptr_SetRenderingCallback setRenderingCallback; ptr_ResizeVideoOutput resizeVideoOutput; /* frame buffer plugin spec extension */ ptr_FBRead fBRead; ptr_FBWrite fBWrite; ptr_FBGetFrameBufferInfo fBGetFrameBufferInfo; } gfx_plugin_functions; extern gfx_plugin_functions gfx; /* audio plugin function pointers */ typedef struct _audio_plugin_functions { ptr_PluginGetVersion getVersion; ptr_AiDacrateChanged aiDacrateChanged; ptr_AiLenChanged aiLenChanged; ptr_InitiateAudio initiateAudio; ptr_ProcessAList processAList; ptr_RomClosed romClosed; ptr_RomOpen romOpen; ptr_SetSpeedFactor setSpeedFactor; ptr_VolumeUp volumeUp; ptr_VolumeDown volumeDown; ptr_VolumeGetLevel volumeGetLevel; ptr_VolumeSetLevel volumeSetLevel; ptr_VolumeMute volumeMute; ptr_VolumeGetString volumeGetString; } audio_plugin_functions; extern audio_plugin_functions audio; /* input plugin function pointers */ typedef struct _input_plugin_functions { ptr_PluginGetVersion getVersion; ptr_ControllerCommand controllerCommand; ptr_GetKeys getKeys; ptr_InitiateControllers initiateControllers; ptr_ReadController readController; ptr_RomClosed romClosed; ptr_RomOpen romOpen; ptr_SDL_KeyDown keyDown; ptr_SDL_KeyUp keyUp; ptr_RenderCallback renderCallback; } input_plugin_functions; extern input_plugin_functions input; /* RSP plugin function pointers */ typedef struct _rsp_plugin_functions { ptr_PluginGetVersion getVersion; ptr_DoRspCycles doRspCycles; ptr_InitiateRSP initiateRSP; ptr_RomClosed romClosed; } rsp_plugin_functions; extern rsp_plugin_functions rsp; #endif mupen64plus-core-src-2.5/src/plugin/rumble_via_input_plugin.c000066400000000000000000000043751251723631200244630ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rumble_via_input_plugin.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "rumble_via_input_plugin.h" #include #include #include "plugin.h" #include "si/rumblepak.h" void rvip_rumble(void* opaque, enum rumble_action action) { int channel = *(int*)opaque; static const uint8_t rumble_cmd_header[] = { 0x23, 0x01, /* T=0x23, R=0x01 */ 0x03, /* PIF_CMD_PAK_WRITE */ 0xc0, 0x1b, /* address=0xc000 | crc=0x1b */ }; uint8_t cmd[0x26]; uint8_t rumble_data = (action == RUMBLE_START) ? 0x01 : 0x00; /* build rumble command */ memcpy(cmd, rumble_cmd_header, 5); memset(cmd + 5, rumble_data, 0x20); cmd[0x25] = 0; /* dummy data CRC */ if (input.controllerCommand) input.controllerCommand(channel, cmd); } mupen64plus-core-src-2.5/src/plugin/rumble_via_input_plugin.h000066400000000000000000000032731251723631200244640ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rumble_via_input_plugin.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_PLUGIN_RUMBLE_VIA_INPUT_PLUGIN_H #define M64P_PLUGIN_RUMBLE_VIA_INPUT_PLUGIN_H enum rumble_action; void rvip_rumble(void* opaque, enum rumble_action action); #endif mupen64plus-core-src-2.5/src/r4300/000077500000000000000000000000001251723631200166365ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/r4300/cached_interp.c000066400000000000000000000312121251723631200215710ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cached_interp.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #define __STDC_FORMAT_MACROS #include #include #include "api/callbacks.h" #include "api/debugger.h" #include "api/m64p_types.h" #include "cached_interp.h" #include "cp0_private.h" #include "cp1_private.h" #include "exception.h" #include "interupt.h" #include "macros.h" #include "main/main.h" #include "memory/memory.h" #include "ops.h" #include "r4300.h" #include "recomp.h" #include "tlb.h" #ifdef DBG #include "debugger/dbg_debugger.h" #include "debugger/dbg_types.h" #endif /* global variables */ char invalid_code[0x100000]; precomp_block *blocks[0x100000]; precomp_block *actual; unsigned int jump_to_address; // ----------------------------------------------------------- // Cached interpreter functions (and fallback for dynarec). // ----------------------------------------------------------- #ifdef DBG #define UPDATE_DEBUGGER() if (g_DebuggerActive) update_debugger(PC->addr) #else #define UPDATE_DEBUGGER() do { } while(0) #endif #define PCADDR PC->addr #define ADD_TO_PC(x) PC += x; #define DECLARE_INSTRUCTION(name) static void name(void) #define DECLARE_JUMP(name, destination, condition, link, likely, cop1) \ static void name(void) \ { \ const int take_jump = (condition); \ const uint32_t jump_target = (destination); \ int64_t *link_register = (link); \ if (cop1 && check_cop1_unusable()) return; \ if (link_register != ®[0]) \ { \ *link_register = SE32(PC->addr + 8); \ } \ if (!likely || take_jump) \ { \ PC++; \ delay_slot=1; \ UPDATE_DEBUGGER(); \ PC->ops(); \ update_count(); \ delay_slot=0; \ if (take_jump && !skip_jump) \ { \ PC=actual->block+((jump_target-actual->start)>>2); \ } \ } \ else \ { \ PC += 2; \ update_count(); \ } \ last_addr = PC->addr; \ if (next_interupt <= g_cp0_regs[CP0_COUNT_REG]) gen_interupt(); \ } \ static void name##_OUT(void) \ { \ const int take_jump = (condition); \ const uint32_t jump_target = (destination); \ int64_t *link_register = (link); \ if (cop1 && check_cop1_unusable()) return; \ if (link_register != ®[0]) \ { \ *link_register = SE32(PC->addr + 8); \ } \ if (!likely || take_jump) \ { \ PC++; \ delay_slot=1; \ UPDATE_DEBUGGER(); \ PC->ops(); \ update_count(); \ delay_slot=0; \ if (take_jump && !skip_jump) \ { \ jump_to(jump_target); \ } \ } \ else \ { \ PC += 2; \ update_count(); \ } \ last_addr = PC->addr; \ if (next_interupt <= g_cp0_regs[CP0_COUNT_REG]) gen_interupt(); \ } \ static void name##_IDLE(void) \ { \ const int take_jump = (condition); \ int skip; \ if (cop1 && check_cop1_unusable()) return; \ if (take_jump) \ { \ update_count(); \ skip = next_interupt - g_cp0_regs[CP0_COUNT_REG]; \ if (skip > 3) g_cp0_regs[CP0_COUNT_REG] += (skip & UINT32_C(0xFFFFFFFC)); \ else name(); \ } \ else name(); \ } #define CHECK_MEMORY() \ if (!invalid_code[address>>12]) \ if (blocks[address>>12]->block[(address&0xFFF)/4].ops != \ current_instruction_table.NOTCOMPILED) \ invalid_code[address>>12] = 1; // two functions are defined from the macros above but never used // these prototype declarations will prevent a warning #if defined(__GNUC__) static void JR_IDLE(void) __attribute__((used)); static void JALR_IDLE(void) __attribute__((used)); #endif #include "interpreter.def" // ----------------------------------------------------------- // Flow control 'fake' instructions // ----------------------------------------------------------- static void FIN_BLOCK(void) { if (!delay_slot) { jump_to((PC-1)->addr+4); /*#ifdef DBG if (g_DebuggerActive) update_debugger(PC->addr); #endif Used by dynarec only, check should be unnecessary */ PC->ops(); if (r4300emu == CORE_DYNAREC) dyna_jump(); } else { precomp_block *blk = actual; precomp_instr *inst = PC; jump_to((PC-1)->addr+4); /*#ifdef DBG if (g_DebuggerActive) update_debugger(PC->addr); #endif Used by dynarec only, check should be unnecessary */ if (!skip_jump) { PC->ops(); actual = blk; PC = inst+1; } else PC->ops(); if (r4300emu == CORE_DYNAREC) dyna_jump(); } } static void NOTCOMPILED(void) { uint32_t *mem = fast_mem_access(blocks[PC->addr>>12]->start); #ifdef CORE_DBG DebugMessage(M64MSG_INFO, "NOTCOMPILED: addr = %x ops = %lx", PC->addr, (long) PC->ops); #endif if (mem != NULL) recompile_block(mem, blocks[PC->addr >> 12], PC->addr); else DebugMessage(M64MSG_ERROR, "not compiled exception"); /*#ifdef DBG if (g_DebuggerActive) update_debugger(PC->addr); #endif The preceeding update_debugger SHOULD be unnecessary since it should have been called before NOTCOMPILED would have been executed */ PC->ops(); if (r4300emu == CORE_DYNAREC) dyna_jump(); } static void NOTCOMPILED2(void) { NOTCOMPILED(); } // ----------------------------------------------------------- // Cached interpreter instruction table // ----------------------------------------------------------- const cpu_instruction_table cached_interpreter_table = { LB, LBU, LH, LHU, LW, LWL, LWR, SB, SH, SW, SWL, SWR, LD, LDL, LDR, LL, LWU, SC, SD, SDL, SDR, SYNC, ADDI, ADDIU, SLTI, SLTIU, ANDI, ORI, XORI, LUI, DADDI, DADDIU, ADD, ADDU, SUB, SUBU, SLT, SLTU, AND, OR, XOR, NOR, DADD, DADDU, DSUB, DSUBU, MULT, MULTU, DIV, DIVU, MFHI, MTHI, MFLO, MTLO, DMULT, DMULTU, DDIV, DDIVU, J, J_OUT, J_IDLE, JAL, JAL_OUT, JAL_IDLE, // Use the _OUT versions of JR and JALR, since we don't know // until runtime if they're going to jump inside or outside the block JR_OUT, JALR_OUT, BEQ, BEQ_OUT, BEQ_IDLE, BNE, BNE_OUT, BNE_IDLE, BLEZ, BLEZ_OUT, BLEZ_IDLE, BGTZ, BGTZ_OUT, BGTZ_IDLE, BLTZ, BLTZ_OUT, BLTZ_IDLE, BGEZ, BGEZ_OUT, BGEZ_IDLE, BLTZAL, BLTZAL_OUT, BLTZAL_IDLE, BGEZAL, BGEZAL_OUT, BGEZAL_IDLE, BEQL, BEQL_OUT, BEQL_IDLE, BNEL, BNEL_OUT, BNEL_IDLE, BLEZL, BLEZL_OUT, BLEZL_IDLE, BGTZL, BGTZL_OUT, BGTZL_IDLE, BLTZL, BLTZL_OUT, BLTZL_IDLE, BGEZL, BGEZL_OUT, BGEZL_IDLE, BLTZALL, BLTZALL_OUT, BLTZALL_IDLE, BGEZALL, BGEZALL_OUT, BGEZALL_IDLE, BC1TL, BC1TL_OUT, BC1TL_IDLE, BC1FL, BC1FL_OUT, BC1FL_IDLE, SLL, SRL, SRA, SLLV, SRLV, SRAV, DSLL, DSRL, DSRA, DSLLV, DSRLV, DSRAV, DSLL32, DSRL32, DSRA32, MTC0, MFC0, TLBR, TLBWI, TLBWR, TLBP, CACHE, ERET, LWC1, SWC1, MTC1, MFC1, CTC1, CFC1, BC1T, BC1T_OUT, BC1T_IDLE, BC1F, BC1F_OUT, BC1F_IDLE, DMFC1, DMTC1, LDC1, SDC1, CVT_S_D, CVT_S_W, CVT_S_L, CVT_D_S, CVT_D_W, CVT_D_L, CVT_W_S, CVT_W_D, CVT_L_S, CVT_L_D, ROUND_W_S, ROUND_W_D, ROUND_L_S, ROUND_L_D, TRUNC_W_S, TRUNC_W_D, TRUNC_L_S, TRUNC_L_D, CEIL_W_S, CEIL_W_D, CEIL_L_S, CEIL_L_D, FLOOR_W_S, FLOOR_W_D, FLOOR_L_S, FLOOR_L_D, ADD_S, ADD_D, SUB_S, SUB_D, MUL_S, MUL_D, DIV_S, DIV_D, ABS_S, ABS_D, MOV_S, MOV_D, NEG_S, NEG_D, SQRT_S, SQRT_D, C_F_S, C_F_D, C_UN_S, C_UN_D, C_EQ_S, C_EQ_D, C_UEQ_S, C_UEQ_D, C_OLT_S, C_OLT_D, C_ULT_S, C_ULT_D, C_OLE_S, C_OLE_D, C_ULE_S, C_ULE_D, C_SF_S, C_SF_D, C_NGLE_S, C_NGLE_D, C_SEQ_S, C_SEQ_D, C_NGL_S, C_NGL_D, C_LT_S, C_LT_D, C_NGE_S, C_NGE_D, C_LE_S, C_LE_D, C_NGT_S, C_NGT_D, SYSCALL, TEQ, NOP, RESERVED, NI, FIN_BLOCK, NOTCOMPILED, NOTCOMPILED2 }; static unsigned int update_invalid_addr(unsigned int addr) { if (addr >= 0x80000000 && addr < 0xc0000000) { if (invalid_code[addr>>12]) invalid_code[(addr^0x20000000)>>12] = 1; if (invalid_code[(addr^0x20000000)>>12]) invalid_code[addr>>12] = 1; return addr; } else { unsigned int paddr = virtual_to_physical_address(addr, 2); if (paddr) { unsigned int beg_paddr = paddr - (addr - (addr&~0xFFF)); update_invalid_addr(paddr); if (invalid_code[(beg_paddr+0x000)>>12]) invalid_code[addr>>12] = 1; if (invalid_code[(beg_paddr+0xFFC)>>12]) invalid_code[addr>>12] = 1; if (invalid_code[addr>>12]) invalid_code[(beg_paddr+0x000)>>12] = 1; if (invalid_code[addr>>12]) invalid_code[(beg_paddr+0xFFC)>>12] = 1; } return paddr; } } #define addr jump_to_address void jump_to_func(void) { unsigned int paddr; if (skip_jump) return; paddr = update_invalid_addr(addr); if (!paddr) return; actual = blocks[addr>>12]; if (invalid_code[addr>>12]) { if (!blocks[addr>>12]) { blocks[addr>>12] = (precomp_block *) malloc(sizeof(precomp_block)); actual = blocks[addr>>12]; blocks[addr>>12]->code = NULL; blocks[addr>>12]->block = NULL; blocks[addr>>12]->jumps_table = NULL; blocks[addr>>12]->riprel_table = NULL; } blocks[addr>>12]->start = addr & ~0xFFF; blocks[addr>>12]->end = (addr & ~0xFFF) + 0x1000; init_block(blocks[addr>>12]); } PC=actual->block+((addr-actual->start)>>2); if (r4300emu == CORE_DYNAREC) dyna_jump(); } #undef addr void init_blocks(void) { int i; for (i=0; i<0x100000; i++) { invalid_code[i] = 1; blocks[i] = NULL; } } void free_blocks(void) { int i; for (i=0; i<0x100000; i++) { if (blocks[i]) { free_block(blocks[i]); free(blocks[i]); blocks[i] = NULL; } } } void invalidate_cached_code_hacktarux(uint32_t address, size_t size) { size_t i; uint32_t addr; uint32_t addr_max; if (size == 0) { /* invalidate everthing */ memset(invalid_code, 1, 0x100000); } else { /* invalidate blocks (if necessary) */ addr_max = address+size; for(addr = address; addr < addr_max; addr += 4) { i = (addr >> 12); if (invalid_code[i] == 0) { if (blocks[i] == NULL || blocks[i]->block[(addr & 0xfff) / 4].ops != current_instruction_table.NOTCOMPILED) { invalid_code[i] = 1; /* go directly to next i */ addr &= ~0xfff; addr |= 0xffc; } } else { /* go directly to next i */ addr &= ~0xfff; addr |= 0xffc; } } } } mupen64plus-core-src-2.5/src/r4300/cached_interp.h000066400000000000000000000043421251723631200216020ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cached_interp.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_CACHED_INTERP_H #define M64P_R4300_CACHED_INTERP_H #include #include #include "ops.h" /* FIXME: use forward declaration for precomp_block */ #include "recomp.h" extern char invalid_code[0x100000]; extern precomp_block *blocks[0x100000]; extern precomp_block *actual; extern uint32_t jump_to_address; extern const cpu_instruction_table cached_interpreter_table; void init_blocks(void); void free_blocks(void); void jump_to_func(void); void invalidate_cached_code_hacktarux(uint32_t address, size_t size); /* Jumps to the given address. This is for the cached interpreter / dynarec. */ #define jump_to(a) { jump_to_address = a; jump_to_func(); } #endif /* M64P_R4300_CACHED_INTERP_H */ mupen64plus-core-src-2.5/src/r4300/cp0.c000066400000000000000000000053051251723631200174670ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cp0.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "cp0_private.h" #include "exception.h" #include "new_dynarec/new_dynarec.h" #include "r4300.h" #include "recomp.h" #ifdef COMPARE_CORE #include "api/debugger.h" #endif #ifdef DBG #include "debugger/dbg_debugger.h" #include "debugger/dbg_types.h" #endif /* global variable */ #if NEW_DYNAREC != NEW_DYNAREC_ARM /* ARM backend requires a different memory layout * and therefore manually allocate that variable */ uint32_t g_cp0_regs[CP0_REGS_COUNT]; #endif /* global functions */ uint32_t* r4300_cp0_regs(void) { return g_cp0_regs; } int check_cop1_unusable(void) { if (!(g_cp0_regs[CP0_STATUS_REG] & UINT32_C(0x20000000))) { g_cp0_regs[CP0_CAUSE_REG] = (UINT32_C(11) << 2) | UINT32_C(0x10000000); exception_general(); return 1; } return 0; } void update_count(void) { #ifdef NEW_DYNAREC if (r4300emu != CORE_DYNAREC) { #endif g_cp0_regs[CP0_COUNT_REG] += ((PC->addr - last_addr) >> 2) * count_per_op; last_addr = PC->addr; #ifdef NEW_DYNAREC } #endif #ifdef COMPARE_CORE if (delay_slot) CoreCompareCallback(); #endif /*#ifdef DBG if (g_DebuggerActive && !delay_slot) update_debugger(PC->addr); #endif */ } mupen64plus-core-src-2.5/src/r4300/cp0.h000066400000000000000000000044061251723631200174750ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cp0.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_CP0_H #define M64P_R4300_CP0_H #include enum r4300_cp0_registers { CP0_INDEX_REG, CP0_RANDOM_REG, CP0_ENTRYLO0_REG, CP0_ENTRYLO1_REG, CP0_CONTEXT_REG, CP0_PAGEMASK_REG, CP0_WIRED_REG, /* 7 is unused */ CP0_BADVADDR_REG = 8, CP0_COUNT_REG, CP0_ENTRYHI_REG, CP0_COMPARE_REG, CP0_STATUS_REG, CP0_CAUSE_REG, CP0_EPC_REG, CP0_PREVID_REG, CP0_CONFIG_REG, CP0_LLADDR_REG, CP0_WATCHLO_REG, CP0_WATCHHI_REG, CP0_XCONTEXT_REG, /* 21 - 27 are unused */ CP0_TAGLO_REG = 28, CP0_TAGHI_REG, CP0_ERROREPC_REG, /* 31 is unused */ CP0_REGS_COUNT = 32 }; uint32_t* r4300_cp0_regs(void); void update_count(void); #endif /* M64P_R4300_CP0_H */ mupen64plus-core-src-2.5/src/r4300/cp0_private.h000066400000000000000000000033231251723631200212240ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cp0_private.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_CP0_PRIVATE_H #define M64P_R4300_CP0_PRIVATE_H #include "cp0.h" extern unsigned int g_cp0_regs[CP0_REGS_COUNT]; int check_cop1_unusable(void); #endif /* M64P_R4300_CP0_PRIVATE_H */ mupen64plus-core-src-2.5/src/r4300/cp1.c000066400000000000000000000141601251723631200174670ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cp1.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "new_dynarec/new_dynarec.h" #if NEW_DYNAREC != NEW_DYNAREC_ARM float *reg_cop1_simple[32]; double *reg_cop1_double[32]; uint32_t FCR0, FCR31; #else /* ARM backend requires a different memory layout * and therefore manually allocates these variables */ extern float *reg_cop1_simple[32]; extern double *reg_cop1_double[32]; extern uint32_t FCR0, FCR31; #endif int64_t reg_cop1_fgr_64[32]; /* This is the x86 version of the rounding mode contained in FCR31. * It should not really be here. Its size should also really be uint16_t, * because FLDCW (Floating-point LoaD Control Word) loads 16-bit control * words. However, x86/gcop1.c and x86-64/gcop1.c update this variable * using 32-bit stores. */ uint32_t rounding_mode = UINT32_C(0x33F); int64_t* r4300_cp1_regs(void) { return reg_cop1_fgr_64; } float** r4300_cp1_regs_simple(void) { return reg_cop1_simple; } double** r4300_cp1_regs_double(void) { return reg_cop1_double; } uint32_t* r4300_cp1_fcr0(void) { return &FCR0; } uint32_t* r4300_cp1_fcr31(void) { return &FCR31; } /* Refer to Figure 6-2 on page 155 and explanation on page B-11 of MIPS R4000 Microprocessor User's Manual (Second Edition) by Joe Heinrich. */ void shuffle_fpr_data(uint32_t oldStatus, uint32_t newStatus) { #if defined(M64P_BIG_ENDIAN) const int isBigEndian = 1; #else const int isBigEndian = 0; #endif if ((newStatus & UINT32_C(0x04000000)) != (oldStatus & UINT32_C(0x04000000))) { int i; int32_t temp_fgr_32[32]; // pack or unpack the FGR register data if (newStatus & UINT32_C(0x04000000)) { // switching into 64-bit mode // retrieve 32 FPR values from packed 32-bit FGR registers for (i = 0; i < 32; i++) { temp_fgr_32[i] = *((int32_t *) ®_cop1_fgr_64[i>>1] + ((i & 1) ^ isBigEndian)); } // unpack them into 32 64-bit registers, taking the high 32-bits from their temporary place in the upper 16 FGRs for (i = 0; i < 32; i++) { int32_t high32 = *((int32_t *) ®_cop1_fgr_64[(i>>1)+16] + (i & 1)); *((int32_t *) ®_cop1_fgr_64[i] + isBigEndian) = temp_fgr_32[i]; *((int32_t *) ®_cop1_fgr_64[i] + (isBigEndian^1)) = high32; } } else { // switching into 32-bit mode // retrieve the high 32 bits from each 64-bit FGR register and store in temp array for (i = 0; i < 32; i++) { temp_fgr_32[i] = *((int32_t *) ®_cop1_fgr_64[i] + (isBigEndian^1)); } // take the low 32 bits from each register and pack them together into 64-bit pairs for (i = 0; i < 16; i++) { uint32_t least32 = *((uint32_t *) ®_cop1_fgr_64[i*2] + isBigEndian); uint32_t most32 = *((uint32_t *) ®_cop1_fgr_64[i*2+1] + isBigEndian); reg_cop1_fgr_64[i] = ((uint64_t) most32 << 32) | (uint64_t) least32; } // store the high bits in the upper 16 FGRs, which wont be accessible in 32-bit mode for (i = 0; i < 32; i++) { *((int32_t *) ®_cop1_fgr_64[(i>>1)+16] + (i & 1)) = temp_fgr_32[i]; } } } } void set_fpr_pointers(uint32_t newStatus) { int i; #if defined(M64P_BIG_ENDIAN) const int isBigEndian = 1; #else const int isBigEndian = 0; #endif // update the FPR register pointers if (newStatus & UINT32_C(0x04000000)) { for (i = 0; i < 32; i++) { reg_cop1_double[i] = (double*) ®_cop1_fgr_64[i]; reg_cop1_simple[i] = ((float*) ®_cop1_fgr_64[i]) + isBigEndian; } } else { for (i = 0; i < 32; i++) { reg_cop1_double[i] = (double*) ®_cop1_fgr_64[i>>1]; reg_cop1_simple[i] = ((float*) ®_cop1_fgr_64[i>>1]) + ((i & 1) ^ isBigEndian); } } } /* XXX: This shouldn't really be here, but rounding_mode is used by the * Hacktarux JIT and updated by CTC1 and saved states. Figure out a better * place for this. */ void update_x86_rounding_mode(uint32_t FCR31) { switch (FCR31 & 3) { case 0: /* Round to nearest, or to even if equidistant */ rounding_mode = UINT32_C(0x33F); break; case 1: /* Truncate (toward 0) */ rounding_mode = UINT32_C(0xF3F); break; case 2: /* Round up (toward +Inf) */ rounding_mode = UINT32_C(0xB3F); break; case 3: /* Round down (toward -Inf) */ rounding_mode = UINT32_C(0x73F); break; } } mupen64plus-core-src-2.5/src/r4300/cp1.h000066400000000000000000000036651251723631200175040ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cp1.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_CP1_H #define M64P_R4300_CP1_H #include int64_t* r4300_cp1_regs(void); float** r4300_cp1_regs_simple(void); double** r4300_cp1_regs_double(void); uint32_t* r4300_cp1_fcr0(void); uint32_t* r4300_cp1_fcr31(void); void shuffle_fpr_data(uint32_t oldStatus, uint32_t newStatus); void set_fpr_pointers(uint32_t newStatus); void update_x86_rounding_mode(uint32_t FCR31); #endif /* M64P_R4300_CP1_H */ mupen64plus-core-src-2.5/src/r4300/cp1_private.h000066400000000000000000000035001251723631200212220ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cp1_private.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_CP1_PRIVATE_H #define M64P_R4300_CP1_PRIVATE_H #include #include "cp1.h" extern float *reg_cop1_simple[32]; extern double *reg_cop1_double[32]; extern uint32_t FCR0, FCR31; extern int64_t reg_cop1_fgr_64[32]; extern uint32_t rounding_mode; #endif /* M64P_R4300_CP1_PRIVATE_H */ mupen64plus-core-src-2.5/src/r4300/empty_dynarec.c000066400000000000000000000170201251723631200216450ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - empty_dynarec.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Richard42, Nmn * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "recomp.h" /* From assemble.c */ void init_assembler(void *block_jumps_table, int block_jumps_number, void *block_riprel_table, int block_riprel_number) { } void free_assembler(void **block_jumps_table, int *block_jumps_number, void **block_riprel_table, int *block_riprel_number) { } void passe2(precomp_instr *dest, int start, int end, precomp_block *block) { } /* From gbc.c */ void genbc1f() { } void genbc1f_out() { } void genbc1f_idle() { } void genbc1t() { } void genbc1t_out() { } void genbc1t_idle() { } void genbc1fl() { } void genbc1fl_out() { } void genbc1fl_idle() { } void genbc1tl() { } void genbc1tl_out() { } void genbc1tl_idle() { } /* From gcop0.c */ void genmfc0() { } void genmtc0() { } /* From gcop1.c */ void genmfc1() { } void gendmfc1() { } void gencfc1() { } void genmtc1() { } void gendmtc1() { } void genctc1() { } /* From gcop1_d.c */ void genadd_d() { } void gensub_d() { } void genmul_d() { } void gendiv_d() { } void gensqrt_d() { } void genabs_d() { } void genmov_d() { } void genneg_d() { } void genround_l_d() { } void gentrunc_l_d() { } void genceil_l_d() { } void genfloor_l_d() { } void genround_w_d() { } void gentrunc_w_d() { } void genceil_w_d() { } void genfloor_w_d() { } void gencvt_s_d() { } void gencvt_w_d() { } void gencvt_l_d() { } void genc_f_d() { } void genc_un_d() { } void genc_eq_d() { } void genc_ueq_d() { } void genc_olt_d() { } void genc_ult_d() { } void genc_ole_d() { } void genc_ule_d() { } void genc_sf_d() { } void genc_ngle_d() { } void genc_seq_d() { } void genc_ngl_d() { } void genc_lt_d() { } void genc_nge_d() { } void genc_le_d() { } void genc_ngt_d() { } /* From gcop1_l.c */ void gencvt_s_l() { } void gencvt_d_l() { } /* From gcop1_s.c */ void genadd_s() { } void gensub_s() { } void genmul_s() { } void gendiv_s() { } void gensqrt_s() { } void genabs_s() { } void genmov_s() { } void genneg_s() { } void genround_l_s() { } void gentrunc_l_s() { } void genceil_l_s() { } void genfloor_l_s() { } void genround_w_s() { } void gentrunc_w_s() { } void genceil_w_s() { } void genfloor_w_s() { } void gencvt_d_s() { } void gencvt_w_s() { } void gencvt_l_s() { } void genc_f_s() { } void genc_un_s() { } void genc_eq_s() { } void genc_ueq_s() { } void genc_olt_s() { } void genc_ult_s() { } void genc_ole_s() { } void genc_ule_s() { } void genc_sf_s() { } void genc_ngle_s() { } void genc_seq_s() { } void genc_ngl_s() { } void genc_lt_s() { } void genc_nge_s() { } void genc_le_s() { } void genc_ngt_s() { } /* From gcop1_w.c */ void gencvt_s_w() { } void gencvt_d_w() { } /* From gr4300.c */ void gennotcompiled() { } void genlink_subblock() { } #ifdef COMPARE_CORE void gendebug() { } #endif void genni() { } void genreserved() { } void genfin_block() { } void gennop() { } void genj() { } void genj_out() { } void genj_idle() { } void genjal() { } void genjal_out() { } void genjal_idle() { } void genbne() { } void genbne_out() { } void genbne_idle() { } void genblez() { } void genblez_idle() { } void genbgtz() { } void genbgtz_out() { } void genbgtz_idle() { } void genaddi() { } void genaddiu() { } void genslti() { } void gensltiu() { } void genandi() { } void genori() { } void genxori() { } void genlui() { } void genbeql() { } void genbeql_out() { } void genbeql_idle() { } void genbeq() { } void genbeq_out() { } void genbeq_idle() { } void genbnel() { } void genbnel_out() { } void genbnel_idle() { } void genblezl() { } void genblezl_out() { } void genblezl_idle() { } void genbgtzl() { } void genbgtzl_out() { } void genbgtzl_idle() { } void gendaddi() { } void gendaddiu() { } void genldl() { } void genldr() { } void genlb() { } void genlh() { } void genlwl() { } void genlw() { } void genlbu() { } void genlhu() { } void genlwr() { } void genlwu() { } void gensb() { } void gensh() { } void genswl() { } void gensw() { } void gensdl() { } void gensdr() { } void genswr() { } void genlwc1() { } void genldc1() { } void gencache() { } void genld() { } void genswc1() { } void gensdc1() { } void gensd() { } void genll() { } void gensc() { } void genblez_out() { } /* From gregimm.c */ void genbltz() { } void genbltz_out() { } void genbltz_idle() { } void genbgez() { } void genbgez_out() { } void genbgez_idle() { } void genbltzl() { } void genbltzl_out() { } void genbltzl_idle() { } void genbgezl() { } void genbgezl_out() { } void genbgezl_idle() { } void genbltzal() { } void genbltzal_out() { } void genbltzal_idle() { } void genbgezal() { } void genbgezal_out() { } void genbgezal_idle() { } void genbltzall() { } void genbltzall_out() { } void genbltzall_idle() { } void genbgezall() { } void genbgezall_out() { } void genbgezall_idle() { } /* From gspecial.c */ void gensll() { } void gensrl() { } void gensra() { } void gensllv() { } void gensrlv() { } void gensrav() { } void genjr() { } void genjalr() { } void gensyscall() { } void gensync() { } void genmfhi() { } void genmthi() { } void genmflo() { } void genmtlo() { } void gendsllv() { } void gendsrlv() { } void gendsrav() { } void genmult() { } void genmultu() { } void gendiv() { } void gendivu() { } void gendmult() { } void gendmultu() { } void genddiv() { } void genddivu() { } void genadd() { } void genaddu() { } void gensub() { } void gensubu() { } void genand() { } void genor() { } void genxor() { } void gennor() { } void genslt() { } void gensltu() { } void gendadd() { } void gendaddu() { } void gendsub() { } void gendsubu() { } void genteq() { } void gendsll() { } void gendsrl() { } void gendsra() { } void gendsll32() { } void gendsrl32() { } void gendsra32() { } /* From gtlb.c */ void gentlbwi() { } void gentlbp() { } void gentlbr() { } void generet() { } void gentlbwr() { } /* From regcache.c */ void init_cache(precomp_instr* start) { } void free_all_registers() { } /* From rjump.c */ void dyna_jump() { } void dyna_stop() { } mupen64plus-core-src-2.5/src/r4300/exception.c000066400000000000000000000112541251723631200210030ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - exception.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "api/callbacks.h" #include "api/m64p_types.h" #include "cp0_private.h" #include "exception.h" #include "memory/memory.h" #include "r4300.h" #include "r4300_core.h" #include "recomp.h" #include "recomph.h" #include "tlb.h" void TLB_refill_exception(uint32_t address, int w) { int usual_handler = 0, i; if (r4300emu != CORE_DYNAREC && w != 2) update_count(); if (w == 1) g_cp0_regs[CP0_CAUSE_REG] = (UINT32_C(3) << 2); else g_cp0_regs[CP0_CAUSE_REG] = (UINT32_C(2) << 2); g_cp0_regs[CP0_BADVADDR_REG] = address; g_cp0_regs[CP0_CONTEXT_REG] = (g_cp0_regs[CP0_CONTEXT_REG] & UINT32_C(0xFF80000F)) | ((address >> 9) & UINT32_C(0x007FFFF0)); g_cp0_regs[CP0_ENTRYHI_REG] = address & UINT32_C(0xFFFFE000); if (g_cp0_regs[CP0_STATUS_REG] & UINT32_C(0x2)) // Test de EXL { generic_jump_to(UINT32_C(0x80000180)); if(delay_slot==1 || delay_slot==3) g_cp0_regs[CP0_CAUSE_REG] |= UINT32_C(0x80000000); else g_cp0_regs[CP0_CAUSE_REG] &= UINT32_C(0x7FFFFFFF); } else { if (r4300emu != CORE_PURE_INTERPRETER) { if (w!=2) g_cp0_regs[CP0_EPC_REG] = PC->addr; else g_cp0_regs[CP0_EPC_REG] = address; } else g_cp0_regs[CP0_EPC_REG] = PC->addr; g_cp0_regs[CP0_CAUSE_REG] &= ~UINT32_C(0x80000000); g_cp0_regs[CP0_STATUS_REG] |= UINT32_C(0x2); //EXL=1 if (address >= UINT32_C(0x80000000) && address < UINT32_C(0xc0000000)) usual_handler = 1; for (i=0; i<32; i++) { if (/*tlb_e[i].v_even &&*/ address >= tlb_e[i].start_even && address <= tlb_e[i].end_even) usual_handler = 1; if (/*tlb_e[i].v_odd &&*/ address >= tlb_e[i].start_odd && address <= tlb_e[i].end_odd) usual_handler = 1; } if (usual_handler) { generic_jump_to(UINT32_C(0x80000180)); } else { generic_jump_to(UINT32_C(0x80000000)); } } if(delay_slot==1 || delay_slot==3) { g_cp0_regs[CP0_CAUSE_REG] |= UINT32_C(0x80000000); g_cp0_regs[CP0_EPC_REG]-=4; } else { g_cp0_regs[CP0_CAUSE_REG] &= UINT32_C(0x7FFFFFFF); } if(w != 2) g_cp0_regs[CP0_EPC_REG]-=4; last_addr = PC->addr; if (r4300emu == CORE_DYNAREC) { dyna_jump(); if (!dyna_interp) delay_slot = 0; } if (r4300emu != CORE_DYNAREC || dyna_interp) { dyna_interp = 0; if (delay_slot) { skip_jump = PC->addr; next_interupt = 0; } } } void exception_general(void) { update_count(); g_cp0_regs[CP0_STATUS_REG] |= 2; g_cp0_regs[CP0_EPC_REG] = PC->addr; if(delay_slot==1 || delay_slot==3) { g_cp0_regs[CP0_CAUSE_REG] |= UINT32_C(0x80000000); g_cp0_regs[CP0_EPC_REG]-=4; } else { g_cp0_regs[CP0_CAUSE_REG] &= UINT32_C(0x7FFFFFFF); } generic_jump_to(UINT32_C(0x80000180)); last_addr = PC->addr; if (r4300emu == CORE_DYNAREC) { dyna_jump(); if (!dyna_interp) delay_slot = 0; } if (r4300emu != CORE_DYNAREC || dyna_interp) { dyna_interp = 0; if (delay_slot) { skip_jump = PC->addr; next_interupt = 0; } } } mupen64plus-core-src-2.5/src/r4300/exception.h000066400000000000000000000033231251723631200210060ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - exception.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_EXCEPTION_H #define M64P_R4300_EXCEPTION_H #include void TLB_refill_exception(uint32_t addresse, int w); void exception_general(void); #endif /* M64P_R4300_EXCEPTION_H */ mupen64plus-core-src-2.5/src/r4300/fpu.h000066400000000000000000000343411251723631200176060ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - fpu.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2010 Ari64 * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_FPU_H #define M64P_R4300_FPU_H #include #include #include "cp1_private.h" #include "r4300.h" #ifdef _MSC_VER #define M64P_FPU_INLINE static __inline #include typedef enum { FE_TONEAREST = 0, FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD } eRoundType; static void fesetround(eRoundType RoundType) { static const unsigned int msRound[4] = { _RC_NEAR, _RC_CHOP, _RC_UP, _RC_DOWN }; unsigned int oldX87, oldSSE2; __control87_2(msRound[RoundType], _MCW_RC, &oldX87, &oldSSE2); } static __inline double round(double x) { return floor(x + 0.5); } static __inline float roundf(float x) { return (float) floor(x + 0.5); } static __inline double trunc(double x) { return (double) (int) x; } static __inline float truncf(float x) { return (float) (int) x; } #define isnan _isnan #else #define M64P_FPU_INLINE static inline #include #endif #define FCR31_CMP_BIT UINT32_C(0x800000) M64P_FPU_INLINE void set_rounding(void) { switch(FCR31 & 3) { case 0: /* Round to nearest, or to even if equidistant */ fesetround(FE_TONEAREST); break; case 1: /* Truncate (toward 0) */ fesetround(FE_TOWARDZERO); break; case 2: /* Round up (toward +Inf) */ fesetround(FE_UPWARD); break; case 3: /* Round down (toward -Inf) */ fesetround(FE_DOWNWARD); break; } } M64P_FPU_INLINE void cvt_s_w(const int32_t *source,float *dest) { set_rounding(); *dest = (float) *source; } M64P_FPU_INLINE void cvt_d_w(const int32_t *source,double *dest) { *dest = (double) *source; } M64P_FPU_INLINE void cvt_s_l(const int64_t *source,float *dest) { set_rounding(); *dest = (float) *source; } M64P_FPU_INLINE void cvt_d_l(const int64_t *source,double *dest) { set_rounding(); *dest = (double) *source; } M64P_FPU_INLINE void cvt_d_s(const float *source,double *dest) { *dest = (double) *source; } M64P_FPU_INLINE void cvt_s_d(const double *source,float *dest) { set_rounding(); *dest = (float) *source; } M64P_FPU_INLINE void round_l_s(const float *source,int64_t *dest) { *dest = (int64_t) roundf(*source); } M64P_FPU_INLINE void round_w_s(const float *source,int32_t *dest) { *dest = (int32_t) roundf(*source); } M64P_FPU_INLINE void trunc_l_s(const float *source,int64_t *dest) { *dest = (int64_t) truncf(*source); } M64P_FPU_INLINE void trunc_w_s(const float *source,int32_t *dest) { *dest = (int32_t) truncf(*source); } M64P_FPU_INLINE void ceil_l_s(const float *source,int64_t *dest) { *dest = (int64_t) ceilf(*source); } M64P_FPU_INLINE void ceil_w_s(const float *source,int32_t *dest) { *dest = (int32_t) ceilf(*source); } M64P_FPU_INLINE void floor_l_s(const float *source,int64_t *dest) { *dest = (int64_t) floorf(*source); } M64P_FPU_INLINE void floor_w_s(const float *source,int32_t *dest) { *dest = (int32_t) floorf(*source); } M64P_FPU_INLINE void round_l_d(const double *source,int64_t *dest) { *dest = (int64_t) round(*source); } M64P_FPU_INLINE void round_w_d(const double *source,int32_t *dest) { *dest = (int32_t) round(*source); } M64P_FPU_INLINE void trunc_l_d(const double *source,int64_t *dest) { *dest = (int64_t) trunc(*source); } M64P_FPU_INLINE void trunc_w_d(const double *source,int32_t *dest) { *dest = (int32_t) trunc(*source); } M64P_FPU_INLINE void ceil_l_d(const double *source,int64_t *dest) { *dest = (int64_t) ceil(*source); } M64P_FPU_INLINE void ceil_w_d(const double *source,int32_t *dest) { *dest = (int32_t) ceil(*source); } M64P_FPU_INLINE void floor_l_d(const double *source,int64_t *dest) { *dest = (int64_t) floor(*source); } M64P_FPU_INLINE void floor_w_d(const double *source,int32_t *dest) { *dest = (int32_t) floor(*source); } M64P_FPU_INLINE void cvt_w_s(const float *source,int32_t *dest) { switch(FCR31&3) { case 0: round_w_s(source,dest);return; case 1: trunc_w_s(source,dest);return; case 2: ceil_w_s(source,dest);return; case 3: floor_w_s(source,dest);return; } } M64P_FPU_INLINE void cvt_w_d(const double *source,int32_t *dest) { switch(FCR31&3) { case 0: round_w_d(source,dest);return; case 1: trunc_w_d(source,dest);return; case 2: ceil_w_d(source,dest);return; case 3: floor_w_d(source,dest);return; } } M64P_FPU_INLINE void cvt_l_s(const float *source,int64_t *dest) { switch(FCR31&3) { case 0: round_l_s(source,dest);return; case 1: trunc_l_s(source,dest);return; case 2: ceil_l_s(source,dest);return; case 3: floor_l_s(source,dest);return; } } M64P_FPU_INLINE void cvt_l_d(const double *source,int64_t *dest) { switch(FCR31&3) { case 0: round_l_d(source,dest);return; case 1: trunc_l_d(source,dest);return; case 2: ceil_l_d(source,dest);return; case 3: floor_l_d(source,dest);return; } } M64P_FPU_INLINE void c_f_s() { FCR31 &= ~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_un_s(const float *source,const float *target) { FCR31=(isnan(*source) || isnan(*target)) ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_eq_s(const float *source,const float *target) { if (isnan(*source) || isnan(*target)) {FCR31&=~FCR31_CMP_BIT;return;} FCR31 = *source==*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ueq_s(const float *source,const float *target) { if (isnan(*source) || isnan(*target)) {FCR31|=FCR31_CMP_BIT;return;} FCR31 = *source==*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_olt_s(const float *source,const float *target) { if (isnan(*source) || isnan(*target)) {FCR31&=~FCR31_CMP_BIT;return;} FCR31 = *source<*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ult_s(const float *source,const float *target) { if (isnan(*source) || isnan(*target)) {FCR31|=FCR31_CMP_BIT;return;} FCR31 = *source<*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ole_s(const float *source,const float *target) { if (isnan(*source) || isnan(*target)) {FCR31&=~FCR31_CMP_BIT;return;} FCR31 = *source<=*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ule_s(const float *source,const float *target) { if (isnan(*source) || isnan(*target)) {FCR31|=FCR31_CMP_BIT;return;} FCR31 = *source<=*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_sf_s(const float *source,const float *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31&=~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ngle_s(const float *source,const float *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31&=~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_seq_s(const float *source,const float *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31 = *source==*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ngl_s(const float *source,const float *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31 = *source==*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_lt_s(const float *source,const float *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31 = *source<*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_nge_s(const float *source,const float *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31 = *source<*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_le_s(const float *source,const float *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31 = *source<=*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ngt_s(const float *source,const float *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31 = *source<=*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_f_d() { FCR31 &= ~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_un_d(const double *source,const double *target) { FCR31=(isnan(*source) || isnan(*target)) ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_eq_d(const double *source,const double *target) { if (isnan(*source) || isnan(*target)) {FCR31&=~FCR31_CMP_BIT;return;} FCR31 = *source==*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ueq_d(const double *source,const double *target) { if (isnan(*source) || isnan(*target)) {FCR31|=FCR31_CMP_BIT;return;} FCR31 = *source==*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_olt_d(const double *source,const double *target) { if (isnan(*source) || isnan(*target)) {FCR31&=~FCR31_CMP_BIT;return;} FCR31 = *source<*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ult_d(const double *source,const double *target) { if (isnan(*source) || isnan(*target)) {FCR31|=FCR31_CMP_BIT;return;} FCR31 = *source<*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ole_d(const double *source,const double *target) { if (isnan(*source) || isnan(*target)) {FCR31&=~FCR31_CMP_BIT;return;} FCR31 = *source<=*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ule_d(const double *source,const double *target) { if (isnan(*source) || isnan(*target)) {FCR31|=FCR31_CMP_BIT;return;} FCR31 = *source<=*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_sf_d(const double *source,const double *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31&=~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ngle_d(const double *source,const double *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31&=~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_seq_d(const double *source,const double *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31 = *source==*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ngl_d(const double *source,const double *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31 = *source==*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_lt_d(const double *source,const double *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31 = *source<*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_nge_d(const double *source,const double *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31 = *source<*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_le_d(const double *source,const double *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31 = *source<=*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void c_ngt_d(const double *source,const double *target) { //if (isnan(*source) || isnan(*target)) // FIXME - exception FCR31 = *source<=*target ? FCR31|FCR31_CMP_BIT : FCR31&~FCR31_CMP_BIT; } M64P_FPU_INLINE void add_s(const float *source1,const float *source2,float *target) { set_rounding(); *target=(*source1)+(*source2); } M64P_FPU_INLINE void sub_s(const float *source1,const float *source2,float *target) { set_rounding(); *target=(*source1)-(*source2); } M64P_FPU_INLINE void mul_s(const float *source1,const float *source2,float *target) { set_rounding(); *target=(*source1)*(*source2); } M64P_FPU_INLINE void div_s(const float *source1,const float *source2,float *target) { set_rounding(); *target=(*source1)/(*source2); } M64P_FPU_INLINE void sqrt_s(const float *source,float *target) { set_rounding(); *target=sqrtf(*source); } M64P_FPU_INLINE void abs_s(const float *source,float *target) { *target=fabsf(*source); } M64P_FPU_INLINE void mov_s(const float *source,float *target) { *target=*source; } M64P_FPU_INLINE void neg_s(const float *source,float *target) { *target=-(*source); } M64P_FPU_INLINE void add_d(const double *source1,const double *source2,double *target) { set_rounding(); *target=(*source1)+(*source2); } M64P_FPU_INLINE void sub_d(const double *source1,const double *source2,double *target) { set_rounding(); *target=(*source1)-(*source2); } M64P_FPU_INLINE void mul_d(const double *source1,const double *source2,double *target) { set_rounding(); *target=(*source1)*(*source2); } M64P_FPU_INLINE void div_d(const double *source1,const double *source2,double *target) { set_rounding(); *target=(*source1)/(*source2); } M64P_FPU_INLINE void sqrt_d(const double *source,double *target) { set_rounding(); *target=sqrt(*source); } M64P_FPU_INLINE void abs_d(const double *source,double *target) { *target=fabs(*source); } M64P_FPU_INLINE void mov_d(const double *source,double *target) { *target=*source; } M64P_FPU_INLINE void neg_d(const double *source,double *target) { *target=-(*source); } #endif /* M64P_R4300_FPU_H */ mupen64plus-core-src-2.5/src/r4300/instr_counters.c000066400000000000000000000114351251723631200220670ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - instr_counters.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if defined(COUNT_INSTR) #include #include #include "api/callbacks.h" #include "api/m64p_types.h" /* various constants */ static char instr_name[][10] = { "reserved", "NI", "J", "JAL", "BEQ", "BNE", "BLEZ", "BGTZ", "ADDI", "ADDIU", "SLTI", "SLTIU", "ANDI", "ORI", "XORI", "LUI", "BEQL", "BNEL", "BLEZL", "BGTZL", "DADDI", "DADDIU", "LDL", "LDR", "LB", "LH", "LW", "LWL", "LBU", "LHU", "LWU", "LWR", "SB", "SH", "SW", "SWL", "SWR", "SDL", "SDR", "LWC1", "LDC1", "LD", "LL", "SWC1", "SDC1", "SD", "SC", "BLTZ", "BGEZ", "BLTZL", "BGEZL", "BLTZAL", "BGEZAL", "BLTZALL", "BGEZALL", "SLL", "SRL", "SRA", "SLLV", "SRLV", "SRAV", "JR", "JALR", "SYSCALL", "MFHI", "MTHI", "MFLO", "MTLO", "DSLLV", "DSRLV", "DSRAV", "MULT", "MULTU", "DIV", "DIVU", "DMULT", "DMULTU", "DDIV", "DDIVU", "ADD", "ADDU", "SUB", "SUBU", "AND", "OR", "XOR", "NOR", "SLT", "SLTU", "DADD", "DADDU", "DSUB", "DSUBU", "DSLL", "DSRL", "DSRA", "TEQ", "DSLL32", "DSRL32", "DSRA32", "BC1F", "BC1T", "BC1FL", "BC1TL", "TLBWI", "TLBP", "TLBR", "TLBWR", "ERET", "MFC0", "MTC0", "MFC1", "DMFC1", "CFC1", "MTC1", "DMTC1", "CTC1", "f.CVT", "f.CMP", "f.ADD", "f.SUB", "f.MUL", "f.DIV", "f.SQRT", "f.ABS", "f.MOV", "f.NEG", "f.ROUND", "f.TRUNC", "f.CEIL", "f.FLOOR" }; static unsigned int instr_type[131] = { 9, 10, 6, 6, 7, 7, 7, 7, 3, 3, 4, 4, 3, 4, 4, 0, 7, 7, 7, 7, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 7, 7, 3, 3, 3, 3, 3, 3, 6, 6, 10, 2, 2, 2, 2, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 4, 4, 4, 7, 7, 7, 7, 10, 10, 10, 10, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 2, 5, 5, 5, 5, 5 }; static char instr_typename[][20] = { "Load", "Store", "Data move/convert", "32-bit math", "64-bit math", "Float Math", "Jump", "Branch", "Exceptions", "Reserved", "Other" }; /* global variable */ unsigned int instr_count[132]; /* global function */ void instr_counters_print(void) { size_t i; unsigned int iTypeCount[11] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; unsigned int iTotal = 0; char line[128], param[24]; DebugMessage(M64MSG_INFO, "Instruction counters:"); line[0] = 0; for (i = 0; i < 131; i++) { sprintf(param, "%8s: %08i ", instr_name[i], instr_count[i]); strcat(line, param); if (i % 5 == 4) { DebugMessage(M64MSG_INFO, "%s", line); line[0] = 0; } iTypeCount[instr_type[i]] += instr_count[i]; iTotal += instr_count[i]; } DebugMessage(M64MSG_INFO, "Instruction type summary (total instructions = %i)", iTotal); for (i = 0; i < 11; i++) { DebugMessage(M64MSG_INFO, "%20s: %04.1f%% (%i)", instr_typename[i], (float) iTypeCount[i] * 100.0 / iTotal, iTypeCount[i]); } } #endif /* COUNT_INSTR */ mupen64plus-core-src-2.5/src/r4300/instr_counters.h000066400000000000000000000033631251723631200220750ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - instr_counters.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_INSTR_COUNTERS_H #define M64P_R4300_INSTR_COUNTERS_H #if defined(COUNT_INSTR) extern unsigned int instr_count[132]; void instr_counters_print(void); #endif /* COUNT_INSTR */ #endif /* M64P_R4300_INSTR_COUNTERS_H */ mupen64plus-core-src-2.5/src/r4300/interpreter.def000066400000000000000000000065231251723631200216670ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - interpreter.def * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Before #including this file, and must be included, * and the following macros must be defined: * * PCADDR: Program counter (memory address of the current instruction). * * ADD_TO_PC(x): Increment the program counter in 'x' instructions. * This is only used for small changes to PC, so the new program counter * is guaranteed to fall in the current cached interpreter or dynarec block. * * DECLARE_INSTRUCTION(name) * Declares an instruction function which is not a jump. * Followed by a block of code. * * DECLARE_JUMP(name, destination, condition, link, likely, cop1) * name is the name of the jump or branch instruction. * destination is the destination memory address of the jump. * If condition is nonzero, the jump is taken. * link is a pointer to a variable where (PC+8) is written unconditionally. * To avoid linking, pass ®[0] * If likely is nonzero, the delay slot is only executed if the jump is taken. * If cop1 is nonzero, a COP1 unusable check will be done. * * CHECK_MEMORY(): A snippet to be run after a store instruction, * to check if the store affected executable blocks. * The memory address of the store is in the 'address' global. */ DECLARE_INSTRUCTION(NI) { DebugMessage(M64MSG_ERROR, "NI() @ 0x%" PRIX32, PCADDR); DebugMessage(M64MSG_ERROR, "opcode not implemented: %" PRIX32 ":%" PRIX32, PCADDR, *fast_mem_access(PCADDR)); stop=1; } DECLARE_INSTRUCTION(RESERVED) { DebugMessage(M64MSG_ERROR, "reserved opcode: %" PRIX32 ":%" PRIX32, PCADDR, *fast_mem_access(PCADDR)); stop=1; } // R4300 #include "interpreter_r4300.def" // COP0 #include "interpreter_cop0.def" // COP1 #include "interpreter_cop1.def" // regimm #include "interpreter_regimm.def" // special #include "interpreter_special.def" // TLB #include "interpreter_tlb.def" mupen64plus-core-src-2.5/src/r4300/interpreter_cop0.def000066400000000000000000000116321251723631200226050ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - interpreter_cop0.def * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ DECLARE_INSTRUCTION(MFC0) { switch(rfs) { case CP0_RANDOM_REG: DebugMessage(M64MSG_ERROR, "MFC0 instruction reading un-implemented Random register"); stop=1; break; case CP0_COUNT_REG: update_count(); /* fall through */ default: rrt = SE32(g_cp0_regs[rfs]); } ADD_TO_PC(1); } DECLARE_INSTRUCTION(MTC0) { switch(rfs) { case CP0_INDEX_REG: g_cp0_regs[CP0_INDEX_REG] = rrt32 & UINT32_C(0x8000003F); if ((g_cp0_regs[CP0_INDEX_REG] & UINT32_C(0x3F)) > UINT32_C(31)) { DebugMessage(M64MSG_ERROR, "MTC0 instruction writing Index register with TLB index > 31"); stop=1; } break; case CP0_RANDOM_REG: break; case CP0_ENTRYLO0_REG: g_cp0_regs[CP0_ENTRYLO0_REG] = rrt32 & UINT32_C(0x3FFFFFFF); break; case CP0_ENTRYLO1_REG: g_cp0_regs[CP0_ENTRYLO1_REG] = rrt32 & UINT32_C(0x3FFFFFFF); break; case CP0_CONTEXT_REG: g_cp0_regs[CP0_CONTEXT_REG] = (rrt32 & UINT32_C(0xFF800000)) | (g_cp0_regs[CP0_CONTEXT_REG] & UINT32_C(0x007FFFF0)); break; case CP0_PAGEMASK_REG: g_cp0_regs[CP0_PAGEMASK_REG] = rrt32 & UINT32_C(0x01FFE000); break; case CP0_WIRED_REG: g_cp0_regs[CP0_WIRED_REG] = rrt32; g_cp0_regs[CP0_RANDOM_REG] = UINT32_C(31); break; case CP0_BADVADDR_REG: break; case CP0_COUNT_REG: update_count(); interupt_unsafe_state = 1; if (next_interupt <= g_cp0_regs[CP0_COUNT_REG]) gen_interupt(); interupt_unsafe_state = 0; translate_event_queue(rrt32); g_cp0_regs[CP0_COUNT_REG] = rrt32; break; case CP0_ENTRYHI_REG: g_cp0_regs[CP0_ENTRYHI_REG] = rrt32 & UINT32_C(0xFFFFE0FF); break; case CP0_COMPARE_REG: update_count(); remove_event(COMPARE_INT); add_interupt_event_count(COMPARE_INT, rrt32); g_cp0_regs[CP0_COMPARE_REG] = rrt32; g_cp0_regs[CP0_CAUSE_REG] &= UINT32_C(0xFFFF7FFF); //Timer interupt is clear break; case CP0_STATUS_REG: if((rrt32 & UINT32_C(0x04000000)) != (g_cp0_regs[CP0_STATUS_REG] & UINT32_C(0x04000000))) { shuffle_fpr_data(g_cp0_regs[CP0_STATUS_REG], rrt32); set_fpr_pointers(rrt32); } g_cp0_regs[CP0_STATUS_REG] = rrt32; update_count(); ADD_TO_PC(1); check_interupt(); interupt_unsafe_state = 1; if (next_interupt <= g_cp0_regs[CP0_COUNT_REG]) gen_interupt(); interupt_unsafe_state = 0; ADD_TO_PC(-1); break; case CP0_CAUSE_REG: if (rrt32!=0) { DebugMessage(M64MSG_ERROR, "MTC0 instruction trying to write Cause register with non-0 value"); stop = 1; } else g_cp0_regs[CP0_CAUSE_REG] = rrt32; break; case CP0_EPC_REG: g_cp0_regs[CP0_EPC_REG] = rrt32; break; case CP0_PREVID_REG: break; case CP0_CONFIG_REG: g_cp0_regs[CP0_CONFIG_REG] = rrt32; break; case CP0_WATCHLO_REG: g_cp0_regs[CP0_WATCHLO_REG] = rrt32; break; case CP0_WATCHHI_REG: g_cp0_regs[CP0_WATCHHI_REG] = rrt32; break; case CP0_TAGLO_REG: g_cp0_regs[CP0_TAGLO_REG] = rrt32 & UINT32_C(0x0FFFFFC0); break; case CP0_TAGHI_REG: g_cp0_regs[CP0_TAGHI_REG] = 0; break; default: DebugMessage(M64MSG_ERROR, "Unknown MTC0 write: %d", rfs); stop=1; } ADD_TO_PC(1); } mupen64plus-core-src-2.5/src/r4300/interpreter_cop1.def000066400000000000000000000413411251723631200226060ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - interpreter_cop1.def * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "fpu.h" DECLARE_JUMP(BC1F, PCADDR + (iimmediate+1)*4, (FCR31 & FCR31_CMP_BIT)==0, ®[0], 0, 1) DECLARE_JUMP(BC1T, PCADDR + (iimmediate+1)*4, (FCR31 & FCR31_CMP_BIT)!=0, ®[0], 0, 1) DECLARE_JUMP(BC1FL, PCADDR + (iimmediate+1)*4, (FCR31 & FCR31_CMP_BIT)==0, ®[0], 1, 1) DECLARE_JUMP(BC1TL, PCADDR + (iimmediate+1)*4, (FCR31 & FCR31_CMP_BIT)!=0, ®[0], 1, 1) DECLARE_INSTRUCTION(MFC1) { if (check_cop1_unusable()) return; rrt = SE32(*((int32_t*) reg_cop1_simple[rfs])); ADD_TO_PC(1); } DECLARE_INSTRUCTION(DMFC1) { if (check_cop1_unusable()) return; rrt = *((int64_t*) reg_cop1_double[rfs]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CFC1) { if (check_cop1_unusable()) return; if (rfs==31) { rrt32 = SE32(FCR31); } if (rfs==0) { rrt32 = SE32(FCR0); } ADD_TO_PC(1); } DECLARE_INSTRUCTION(MTC1) { if (check_cop1_unusable()) return; *((int32_t*) reg_cop1_simple[rfs]) = rrt32; ADD_TO_PC(1); } DECLARE_INSTRUCTION(DMTC1) { if (check_cop1_unusable()) return; *((int64_t*) reg_cop1_double[rfs]) = rrt; ADD_TO_PC(1); } DECLARE_INSTRUCTION(CTC1) { if (check_cop1_unusable()) return; if (rfs==31) { FCR31 = rrt32; update_x86_rounding_mode(rrt32); } //if ((FCR31 >> 7) & 0x1F) printf("FPU Exception enabled : %x\n", // (int)((FCR31 >> 7) & 0x1F)); ADD_TO_PC(1); } // COP1_D DECLARE_INSTRUCTION(ADD_D) { if (check_cop1_unusable()) return; add_d(reg_cop1_double[cffs], reg_cop1_double[cfft], reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SUB_D) { if (check_cop1_unusable()) return; sub_d(reg_cop1_double[cffs], reg_cop1_double[cfft], reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(MUL_D) { if (check_cop1_unusable()) return; mul_d(reg_cop1_double[cffs], reg_cop1_double[cfft], reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(DIV_D) { if (check_cop1_unusable()) return; if((FCR31 & UINT32_C(0x400)) && *reg_cop1_double[cfft] == 0) { //FCR31 |= 0x8020; /*FCR31 |= 0x8000; Cause = 15 << 2; exception_general();*/ DebugMessage(M64MSG_ERROR, "DIV_D by 0"); //return; } div_d(reg_cop1_double[cffs], reg_cop1_double[cfft], reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SQRT_D) { if (check_cop1_unusable()) return; sqrt_d(reg_cop1_double[cffs], reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(ABS_D) { if (check_cop1_unusable()) return; abs_d(reg_cop1_double[cffs], reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(MOV_D) { if (check_cop1_unusable()) return; mov_d(reg_cop1_double[cffs], reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(NEG_D) { if (check_cop1_unusable()) return; neg_d(reg_cop1_double[cffs], reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(ROUND_L_D) { if (check_cop1_unusable()) return; round_l_d(reg_cop1_double[cffs], (int64_t*) reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(TRUNC_L_D) { if (check_cop1_unusable()) return; trunc_l_d(reg_cop1_double[cffs], (int64_t*) reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CEIL_L_D) { if (check_cop1_unusable()) return; ceil_l_d(reg_cop1_double[cffs], (int64_t*) reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(FLOOR_L_D) { if (check_cop1_unusable()) return; floor_l_d(reg_cop1_double[cffs], (int64_t*) reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(ROUND_W_D) { if (check_cop1_unusable()) return; round_w_d(reg_cop1_double[cffs], (int32_t*) reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(TRUNC_W_D) { if (check_cop1_unusable()) return; trunc_w_d(reg_cop1_double[cffs], (int32_t*) reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CEIL_W_D) { if (check_cop1_unusable()) return; ceil_w_d(reg_cop1_double[cffs], (int32_t*) reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(FLOOR_W_D) { if (check_cop1_unusable()) return; floor_w_d(reg_cop1_double[cffs], (int32_t*) reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CVT_S_D) { if (check_cop1_unusable()) return; cvt_s_d(reg_cop1_double[cffs], reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CVT_W_D) { if (check_cop1_unusable()) return; cvt_w_d(reg_cop1_double[cffs], (int32_t*) reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CVT_L_D) { if (check_cop1_unusable()) return; cvt_l_d(reg_cop1_double[cffs], (int64_t*) reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_F_D) { if (check_cop1_unusable()) return; c_f_d(); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_UN_D) { if (check_cop1_unusable()) return; c_un_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_EQ_D) { if (check_cop1_unusable()) return; c_eq_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_UEQ_D) { if (check_cop1_unusable()) return; c_ueq_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_OLT_D) { if (check_cop1_unusable()) return; c_olt_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_ULT_D) { if (check_cop1_unusable()) return; c_ult_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_OLE_D) { if (check_cop1_unusable()) return; c_ole_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_ULE_D) { if (check_cop1_unusable()) return; c_ule_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_SF_D) { if (isnan(*reg_cop1_double[cffs]) || isnan(*reg_cop1_double[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_sf_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_NGLE_D) { if (isnan(*reg_cop1_double[cffs]) || isnan(*reg_cop1_double[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_ngle_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_SEQ_D) { if (isnan(*reg_cop1_double[cffs]) || isnan(*reg_cop1_double[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_seq_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_NGL_D) { if (isnan(*reg_cop1_double[cffs]) || isnan(*reg_cop1_double[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_ngl_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_LT_D) { if (check_cop1_unusable()) return; if (isnan(*reg_cop1_double[cffs]) || isnan(*reg_cop1_double[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_lt_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_NGE_D) { if (check_cop1_unusable()) return; if (isnan(*reg_cop1_double[cffs]) || isnan(*reg_cop1_double[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_nge_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_LE_D) { if (check_cop1_unusable()) return; if (isnan(*reg_cop1_double[cffs]) || isnan(*reg_cop1_double[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_le_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_NGT_D) { if (check_cop1_unusable()) return; if (isnan(*reg_cop1_double[cffs]) || isnan(*reg_cop1_double[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_ngt_d(reg_cop1_double[cffs], reg_cop1_double[cfft]); ADD_TO_PC(1); } // COP1_L DECLARE_INSTRUCTION(CVT_S_L) { if (check_cop1_unusable()) return; cvt_s_l((int64_t*) reg_cop1_double[cffs], reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CVT_D_L) { if (check_cop1_unusable()) return; cvt_d_l((int64_t*) reg_cop1_double[cffs], reg_cop1_double[cffd]); ADD_TO_PC(1); } // COP1_S DECLARE_INSTRUCTION(ADD_S) { if (check_cop1_unusable()) return; add_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft], reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SUB_S) { if (check_cop1_unusable()) return; sub_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft], reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(MUL_S) { if (check_cop1_unusable()) return; mul_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft], reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(DIV_S) { if (check_cop1_unusable()) return; if((FCR31 & UINT32_C(0x400)) && *reg_cop1_simple[cfft] == 0) { DebugMessage(M64MSG_ERROR, "DIV_S by 0"); } div_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft], reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SQRT_S) { if (check_cop1_unusable()) return; sqrt_s(reg_cop1_simple[cffs], reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(ABS_S) { if (check_cop1_unusable()) return; abs_s(reg_cop1_simple[cffs], reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(MOV_S) { if (check_cop1_unusable()) return; mov_s(reg_cop1_simple[cffs], reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(NEG_S) { if (check_cop1_unusable()) return; neg_s(reg_cop1_simple[cffs], reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(ROUND_L_S) { if (check_cop1_unusable()) return; round_l_s(reg_cop1_simple[cffs], (int64_t*) reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(TRUNC_L_S) { if (check_cop1_unusable()) return; trunc_l_s(reg_cop1_simple[cffs], (int64_t*) reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CEIL_L_S) { if (check_cop1_unusable()) return; ceil_l_s(reg_cop1_simple[cffs], (int64_t*) reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(FLOOR_L_S) { if (check_cop1_unusable()) return; floor_l_s(reg_cop1_simple[cffs], (int64_t*) reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(ROUND_W_S) { if (check_cop1_unusable()) return; round_w_s(reg_cop1_simple[cffs], (int32_t*) reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(TRUNC_W_S) { if (check_cop1_unusable()) return; trunc_w_s(reg_cop1_simple[cffs], (int32_t*) reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CEIL_W_S) { if (check_cop1_unusable()) return; ceil_w_s(reg_cop1_simple[cffs], (int32_t*) reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(FLOOR_W_S) { if (check_cop1_unusable()) return; floor_w_s(reg_cop1_simple[cffs], (int32_t*) reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CVT_D_S) { if (check_cop1_unusable()) return; cvt_d_s(reg_cop1_simple[cffs], reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CVT_W_S) { if (check_cop1_unusable()) return; cvt_w_s(reg_cop1_simple[cffs], (int32_t*) reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CVT_L_S) { if (check_cop1_unusable()) return; cvt_l_s(reg_cop1_simple[cffs], (int64_t*) reg_cop1_double[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_F_S) { if (check_cop1_unusable()) return; c_f_s(); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_UN_S) { if (check_cop1_unusable()) return; c_un_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_EQ_S) { if (check_cop1_unusable()) return; c_eq_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_UEQ_S) { if (check_cop1_unusable()) return; c_ueq_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_OLT_S) { if (check_cop1_unusable()) return; c_olt_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_ULT_S) { if (check_cop1_unusable()) return; c_ult_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_OLE_S) { if (check_cop1_unusable()) return; c_ole_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_ULE_S) { if (check_cop1_unusable()) return; c_ule_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_SF_S) { if (check_cop1_unusable()) return; if (isnan(*reg_cop1_simple[cffs]) || isnan(*reg_cop1_simple[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_sf_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_NGLE_S) { if (check_cop1_unusable()) return; if (isnan(*reg_cop1_simple[cffs]) || isnan(*reg_cop1_simple[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_ngle_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_SEQ_S) { if (check_cop1_unusable()) return; if (isnan(*reg_cop1_simple[cffs]) || isnan(*reg_cop1_simple[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_seq_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_NGL_S) { if (check_cop1_unusable()) return; if (isnan(*reg_cop1_simple[cffs]) || isnan(*reg_cop1_simple[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_ngl_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_LT_S) { if (check_cop1_unusable()) return; if (isnan(*reg_cop1_simple[cffs]) || isnan(*reg_cop1_simple[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_lt_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_NGE_S) { if (check_cop1_unusable()) return; if (isnan(*reg_cop1_simple[cffs]) || isnan(*reg_cop1_simple[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_nge_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_LE_S) { if (check_cop1_unusable()) return; if (isnan(*reg_cop1_simple[cffs]) || isnan(*reg_cop1_simple[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_le_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(C_NGT_S) { if (check_cop1_unusable()) return; if (isnan(*reg_cop1_simple[cffs]) || isnan(*reg_cop1_simple[cfft])) { DebugMessage(M64MSG_ERROR, "Invalid operation exception in C opcode"); stop=1; } c_ngt_s(reg_cop1_simple[cffs], reg_cop1_simple[cfft]); ADD_TO_PC(1); } // COP1_W DECLARE_INSTRUCTION(CVT_S_W) { if (check_cop1_unusable()) return; cvt_s_w((int32_t*) reg_cop1_simple[cffs], reg_cop1_simple[cffd]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(CVT_D_W) { if (check_cop1_unusable()) return; cvt_d_w((int32_t*) reg_cop1_simple[cffs], reg_cop1_double[cffd]); ADD_TO_PC(1); } mupen64plus-core-src-2.5/src/r4300/interpreter_r4300.def000066400000000000000000000352511251723631200225170ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - interpreter_r4300.def * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ DECLARE_JUMP(J, (jinst_index<<2) | ((PCADDR+4) & UINT32_C(0xF0000000)), 1, ®[0], 0, 0) DECLARE_JUMP(JAL, (jinst_index<<2) | ((PCADDR+4) & UINT32_C(0xF0000000)), 1, ®[31], 0, 0) DECLARE_JUMP(BEQ, PCADDR + (iimmediate+1)*4, irs == irt, ®[0], 0, 0) DECLARE_JUMP(BNE, PCADDR + (iimmediate+1)*4, irs != irt, ®[0], 0, 0) DECLARE_JUMP(BLEZ, PCADDR + (iimmediate+1)*4, irs <= 0, ®[0], 0, 0) DECLARE_JUMP(BGTZ, PCADDR + (iimmediate+1)*4, irs > 0, ®[0], 0, 0) DECLARE_INSTRUCTION(ADDI) { irt = SE32(irs32 + iimmediate); ADD_TO_PC(1); } DECLARE_INSTRUCTION(ADDIU) { irt = SE32(irs32 + iimmediate); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SLTI) { if (irs < iimmediate) irt = 1; else irt = 0; ADD_TO_PC(1); } DECLARE_INSTRUCTION(SLTIU) { if ((uint64_t) irs < (uint64_t) ((int64_t) iimmediate)) irt = 1; else irt = 0; ADD_TO_PC(1); } DECLARE_INSTRUCTION(ANDI) { irt = irs & (uint16_t) iimmediate; ADD_TO_PC(1); } DECLARE_INSTRUCTION(ORI) { irt = irs | (uint16_t) iimmediate; ADD_TO_PC(1); } DECLARE_INSTRUCTION(XORI) { irt = irs ^ (uint16_t) iimmediate; ADD_TO_PC(1); } DECLARE_INSTRUCTION(LUI) { irt = SE32(iimmediate << 16); ADD_TO_PC(1); } DECLARE_JUMP(BEQL, PCADDR + (iimmediate+1)*4, irs == irt, ®[0], 1, 0) DECLARE_JUMP(BNEL, PCADDR + (iimmediate+1)*4, irs != irt, ®[0], 1, 0) DECLARE_JUMP(BLEZL, PCADDR + (iimmediate+1)*4, irs <= 0, ®[0], 1, 0) DECLARE_JUMP(BGTZL, PCADDR + (iimmediate+1)*4, irs > 0, ®[0], 1, 0) DECLARE_INSTRUCTION(DADDI) { irt = irs + iimmediate; ADD_TO_PC(1); } DECLARE_INSTRUCTION(DADDIU) { irt = irs + iimmediate; ADD_TO_PC(1); } /* Assists unaligned memory accessors with making masks to preserve or apply * bits in registers and memory. * * BITS_BELOW_MASK32 and BITS_BELOW_MASK64 make masks where bits 0 to (x - 1) * are set. * * BITS_ABOVE_MASK32 makes masks where bits x to 31 are set. * BITS_ABOVE_MASK64 makes masks where bits x to 63 are set. * * e.g. x = 8 * 0000 0000 0000 0000 0000 0000 1111 1111 <- BITS_BELOW_MASK32(8) * 1111 1111 1111 1111 1111 1111 0000 0000 <- BITS_ABOVE_MASK32(8) * * Giving a negative value or one that is >= the bit count of the mask results * in undefined behavior. */ #define BITS_BELOW_MASK32(x) ((UINT32_C(1) << (x)) - 1) #define BITS_ABOVE_MASK32(x) (~((UINT32_C(1) << (x)) - 1)) #define BITS_BELOW_MASK64(x) ((UINT64_C(1) << (x)) - 1) #define BITS_ABOVE_MASK64(x) (~((UINT64_C(1) << (x)) - 1)) DECLARE_INSTRUCTION(LDL) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; uint64_t word = 0; ADD_TO_PC(1); if ((lsaddr & 7) == 0) { address = lsaddr; rdword = (uint64_t*) lsrtp; read_dword_in_memory(); } else { address = lsaddr & UINT32_C(0xFFFFFFF8); rdword = &word; read_dword_in_memory(); if (address) { /* How many low bits do we want to preserve from the old value? */ uint64_t old_mask = BITS_BELOW_MASK64((lsaddr & 7) * 8); /* How many bits up do we want to add the low bits of the new value in? */ int new_shift = (lsaddr & 7) * 8; *lsrtp = (*lsrtp & old_mask) | (word << new_shift); } } } DECLARE_INSTRUCTION(LDR) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; uint64_t word = 0; ADD_TO_PC(1); address = lsaddr & UINT32_C(0xFFFFFFF8); if ((lsaddr & 7) == 7) { rdword = (uint64_t*) lsrtp; read_dword_in_memory(); } else { rdword = &word; read_dword_in_memory(); if (address) { /* How many high bits do we want to preserve from the old value? */ uint64_t old_mask = BITS_ABOVE_MASK64(((lsaddr & 7) + 1) * 8); /* How many bits down do we want to add the high bits of the new value in? */ int new_shift = (7 - (lsaddr & 7)) * 8; *lsrtp = (*lsrtp & old_mask) | (word >> new_shift); } } } DECLARE_INSTRUCTION(LB) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); address = lsaddr; rdword = (uint64_t*) lsrtp; read_byte_in_memory(); if (address) *lsrtp = SE8(*lsrtp); } DECLARE_INSTRUCTION(LH) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); address = lsaddr; rdword = (uint64_t*) lsrtp; read_hword_in_memory(); if (address) *lsrtp = SE16(*lsrtp); } DECLARE_INSTRUCTION(LWL) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; uint64_t word = 0; ADD_TO_PC(1); if ((lsaddr & 3) == 0) { address = lsaddr; rdword = (uint64_t*) lsrtp; read_word_in_memory(); if (address) *lsrtp = SE32(*lsrtp); } else { address = lsaddr & UINT32_C(0xFFFFFFFC); rdword = &word; read_word_in_memory(); if (address) { /* How many low bits do we want to preserve from the old value? */ uint32_t old_mask = BITS_BELOW_MASK32((lsaddr & 3) * 8); /* How many bits up do we want to add the low bits of the new value in? */ int new_shift = (lsaddr & 3) * 8; *lsrtp = SE32(((uint32_t) *lsrtp & old_mask) | ((uint32_t) word << new_shift)); } } } DECLARE_INSTRUCTION(LW) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); address = lsaddr; rdword = (uint64_t*) lsrtp; read_word_in_memory(); if (address) *lsrtp = SE32(*lsrtp); } DECLARE_INSTRUCTION(LBU) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); address = lsaddr; rdword = (uint64_t*) lsrtp; read_byte_in_memory(); } DECLARE_INSTRUCTION(LHU) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); address = lsaddr; rdword = (uint64_t*) lsrtp; read_hword_in_memory(); } DECLARE_INSTRUCTION(LWR) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; uint64_t word = 0; ADD_TO_PC(1); address = lsaddr & UINT32_C(0xFFFFFFFC); if ((lsaddr & 3) == 3) { rdword = (uint64_t*) lsrtp; read_word_in_memory(); if (address) *lsrtp = SE32(*lsrtp); } else { rdword = &word; read_word_in_memory(); if (address) { /* How many high bits do we want to preserve from the old value? */ uint32_t old_mask = BITS_ABOVE_MASK32(((lsaddr & 3) + 1) * 8); /* How many bits down do we want to add the new value in? */ int new_shift = (3 - (lsaddr & 3)) * 8; *lsrtp = SE32(((uint32_t) *lsrtp & old_mask) | ((uint32_t) word >> new_shift)); } } } DECLARE_INSTRUCTION(LWU) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); address = lsaddr; rdword = (uint64_t*) lsrtp; read_word_in_memory(); } DECLARE_INSTRUCTION(SB) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); address = lsaddr; cpu_byte = (uint8_t) *lsrtp; write_byte_in_memory(); CHECK_MEMORY(); } DECLARE_INSTRUCTION(SH) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); address = lsaddr; cpu_hword = (uint16_t) *lsrtp; write_hword_in_memory(); CHECK_MEMORY(); } DECLARE_INSTRUCTION(SWL) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; uint64_t old_word = 0; ADD_TO_PC(1); if ((lsaddr & 3) == 0) { address = lsaddr; cpu_word = (uint32_t) *lsrtp; write_word_in_memory(); CHECK_MEMORY(); } else { address = lsaddr & UINT32_C(0xFFFFFFFC); rdword = &old_word; read_word_in_memory(); if (address) { /* How many high bits do we want to preserve from what was in memory * before? */ uint32_t old_mask = BITS_ABOVE_MASK32((4 - (lsaddr & 3)) * 8); /* How many bits down do we need to shift the register to store some * of its high bits into the low bits of the memory word? */ int new_shift = (lsaddr & 3) * 8; cpu_word = ((uint32_t) old_word & old_mask) | ((uint32_t) *lsrtp >> new_shift); write_word_in_memory(); CHECK_MEMORY(); } } } DECLARE_INSTRUCTION(SW) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); address = lsaddr; cpu_word = (uint32_t) *lsrtp; write_word_in_memory(); CHECK_MEMORY(); } DECLARE_INSTRUCTION(SDL) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; uint64_t old_word = 0; ADD_TO_PC(1); if ((lsaddr & 7) == 0) { address = lsaddr; cpu_dword = *lsrtp; write_dword_in_memory(); CHECK_MEMORY(); } else { address = lsaddr & UINT32_C(0xFFFFFFF8); rdword = &old_word; read_dword_in_memory(); if (address) { /* How many high bits do we want to preserve from what was in memory * before? */ uint64_t old_mask = BITS_ABOVE_MASK64((8 - (lsaddr & 7)) * 8); /* How many bits down do we need to shift the register to store some * of its high bits into the low bits of the memory word? */ int new_shift = (lsaddr & 7) * 8; cpu_dword = (old_word & old_mask) | ((uint64_t) *lsrtp >> new_shift); write_dword_in_memory(); CHECK_MEMORY(); } } } DECLARE_INSTRUCTION(SDR) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; uint64_t old_word = 0; ADD_TO_PC(1); address = lsaddr & UINT32_C(0xFFFFFFF8); if ((lsaddr & 7) == 7) { cpu_dword = *lsrtp; write_dword_in_memory(); CHECK_MEMORY(); } else { rdword = &old_word; read_dword_in_memory(); if (address) { /* How many low bits do we want to preserve from what was in memory * before? */ uint64_t old_mask = BITS_BELOW_MASK64((7 - (lsaddr & 7)) * 8); /* How many bits up do we need to shift the register to store some * of its low bits into the high bits of the memory word? */ int new_shift = (7 - (lsaddr & 7)) * 8; cpu_dword = (old_word & old_mask) | (*lsrtp << new_shift); write_dword_in_memory(); CHECK_MEMORY(); } } } DECLARE_INSTRUCTION(SWR) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; uint64_t old_word = 0; ADD_TO_PC(1); address = lsaddr & UINT32_C(0xFFFFFFFC); if ((lsaddr & 3) == 3) { cpu_word = (uint32_t) *lsrtp; write_word_in_memory(); CHECK_MEMORY(); } else { rdword = &old_word; read_word_in_memory(); if (address) { /* How many low bits do we want to preserve from what was in memory * before? */ int32_t old_mask = BITS_BELOW_MASK32((3 - (lsaddr & 3)) * 8); /* How many bits up do we need to shift the register to store some * of its low bits into the high bits of the memory word? */ int new_shift = (3 - (lsaddr & 3)) * 8; cpu_word = ((uint32_t) old_word & old_mask) | ((uint32_t) *lsrtp << new_shift); write_word_in_memory(); CHECK_MEMORY(); } } } DECLARE_INSTRUCTION(CACHE) { ADD_TO_PC(1); } DECLARE_INSTRUCTION(LL) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); address = lsaddr; rdword = (uint64_t*) lsrtp; read_word_in_memory(); if (address) { *lsrtp = SE32(*lsrtp); llbit = 1; } } DECLARE_INSTRUCTION(LWC1) { const unsigned char lslfft = lfft; const uint32_t lslfaddr = (uint32_t) reg[lfbase] + lfoffset; uint64_t temp; if (check_cop1_unusable()) return; ADD_TO_PC(1); address = lslfaddr; rdword = &temp; read_word_in_memory(); if (address) *((uint32_t*) reg_cop1_simple[lslfft]) = (uint32_t) *rdword; } DECLARE_INSTRUCTION(LDC1) { const unsigned char lslfft = lfft; const uint32_t lslfaddr = (uint32_t) reg[lfbase] + lfoffset; if (check_cop1_unusable()) return; ADD_TO_PC(1); address = lslfaddr; rdword = (uint64_t*) reg_cop1_double[lslfft]; read_dword_in_memory(); } DECLARE_INSTRUCTION(LD) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); address = lsaddr; rdword = (uint64_t*) lsrtp; read_dword_in_memory(); } DECLARE_INSTRUCTION(SC) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); if(llbit) { address = lsaddr; cpu_word = (uint32_t) *lsrtp; write_word_in_memory(); CHECK_MEMORY(); llbit = 0; *lsrtp = 1; } else { *lsrtp = 0; } } DECLARE_INSTRUCTION(SWC1) { const unsigned char lslfft = lfft; const uint32_t lslfaddr = (uint32_t) reg[lfbase] + lfoffset; if (check_cop1_unusable()) return; ADD_TO_PC(1); address = lslfaddr; cpu_word = *((uint32_t*) reg_cop1_simple[lslfft]); write_word_in_memory(); CHECK_MEMORY(); } DECLARE_INSTRUCTION(SDC1) { const unsigned char lslfft = lfft; const uint32_t lslfaddr = (uint32_t) reg[lfbase] + lfoffset; if (check_cop1_unusable()) return; ADD_TO_PC(1); address = lslfaddr; cpu_dword = *((uint64_t*) reg_cop1_double[lslfft]); write_dword_in_memory(); CHECK_MEMORY(); } DECLARE_INSTRUCTION(SD) { const uint32_t lsaddr = irs32 + iimmediate; int64_t *lsrtp = &irt; ADD_TO_PC(1); address = lsaddr; cpu_dword = *lsrtp; write_dword_in_memory(); CHECK_MEMORY(); } mupen64plus-core-src-2.5/src/r4300/interpreter_regimm.def000066400000000000000000000041561251723631200232270ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - interpreter_regimm.def * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ DECLARE_JUMP(BLTZ, PCADDR + (iimmediate+1)*4, irs < 0, ®[0], 0, 0) DECLARE_JUMP(BGEZ, PCADDR + (iimmediate+1)*4, irs >= 0, ®[0], 0, 0) DECLARE_JUMP(BLTZL, PCADDR + (iimmediate+1)*4, irs < 0, ®[0], 1, 0) DECLARE_JUMP(BGEZL, PCADDR + (iimmediate+1)*4, irs >= 0, ®[0], 1, 0) DECLARE_JUMP(BLTZAL, PCADDR + (iimmediate+1)*4, irs < 0, ®[31], 0, 0) DECLARE_JUMP(BGEZAL, PCADDR + (iimmediate+1)*4, irs >= 0, ®[31], 0, 0) DECLARE_JUMP(BLTZALL, PCADDR + (iimmediate+1)*4, irs < 0, ®[31], 1, 0) DECLARE_JUMP(BGEZALL, PCADDR + (iimmediate+1)*4, irs >= 0, ®[31], 1, 0) mupen64plus-core-src-2.5/src/r4300/interpreter_special.def000066400000000000000000000164001251723631200233620ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - interpreter_special.def * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ DECLARE_INSTRUCTION(NOP) { ADD_TO_PC(1); } DECLARE_INSTRUCTION(SLL) { rrd = SE32((uint32_t) rrt32 << rsa); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SRL) { rrd = SE32((uint32_t) rrt32 >> rsa); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SRA) { rrd = SE32((int32_t) rrt32 >> rsa); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SLLV) { rrd = SE32((uint32_t) rrt32 << (rrs32 & 0x1F)); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SRLV) { rrd = SE32((uint32_t) rrt32 >> (rrs32 & 0x1F)); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SRAV) { rrd = SE32((int32_t) rrt32 >> (rrs32 & 0x1F)); ADD_TO_PC(1); } DECLARE_JUMP(JR, irs32, 1, ®[0], 0, 0) DECLARE_JUMP(JALR, irs32, 1, &rrd, 0, 0) DECLARE_INSTRUCTION(SYSCALL) { g_cp0_regs[CP0_CAUSE_REG] = UINT32_C(8) << 2; exception_general(); } DECLARE_INSTRUCTION(SYNC) { ADD_TO_PC(1); } DECLARE_INSTRUCTION(MFHI) { rrd = hi; ADD_TO_PC(1); } DECLARE_INSTRUCTION(MTHI) { hi = rrs; ADD_TO_PC(1); } DECLARE_INSTRUCTION(MFLO) { rrd = lo; ADD_TO_PC(1); } DECLARE_INSTRUCTION(MTLO) { lo = rrs; ADD_TO_PC(1); } DECLARE_INSTRUCTION(DSLLV) { rrd = rrt << (rrs32 & 0x3F); ADD_TO_PC(1); } DECLARE_INSTRUCTION(DSRLV) { rrd = (uint64_t) rrt >> (rrs32 & 0x3F); ADD_TO_PC(1); } DECLARE_INSTRUCTION(DSRAV) { rrd = (int64_t) rrt >> (rrs32 & 0x3F); ADD_TO_PC(1); } DECLARE_INSTRUCTION(MULT) { int64_t temp; temp = rrs * rrt; hi = temp >> 32; lo = SE32(temp); ADD_TO_PC(1); } DECLARE_INSTRUCTION(MULTU) { uint64_t temp; temp = (uint32_t) rrs * (uint64_t) ((uint32_t) rrt); hi = (int64_t) temp >> 32; lo = SE32(temp); ADD_TO_PC(1); } DECLARE_INSTRUCTION(DIV) { if (rrt32) { lo = SE32(rrs32 / rrt32); hi = SE32(rrs32 % rrt32); } else DebugMessage(M64MSG_ERROR, "DIV: divide by 0"); ADD_TO_PC(1); } DECLARE_INSTRUCTION(DIVU) { if (rrt32) { lo = SE32((uint32_t) rrs32 / (uint32_t) rrt32); hi = SE32((uint32_t) rrs32 % (uint32_t) rrt32); } else DebugMessage(M64MSG_ERROR, "DIVU: divide by 0"); ADD_TO_PC(1); } DECLARE_INSTRUCTION(DMULT) { uint64_t op1, op2, op3, op4; uint64_t result1, result2, result3, result4; uint64_t temp1, temp2, temp3, temp4; int sign = 0; if (rrs < 0) { op2 = -rrs; sign = 1 - sign; } else op2 = rrs; if (rrt < 0) { op4 = -rrt; sign = 1 - sign; } else op4 = rrt; op1 = op2 & UINT64_C(0xFFFFFFFF); op2 = (op2 >> 32) & UINT64_C(0xFFFFFFFF); op3 = op4 & UINT64_C(0xFFFFFFFF); op4 = (op4 >> 32) & UINT64_C(0xFFFFFFFF); temp1 = op1 * op3; temp2 = (temp1 >> 32) + op1 * op4; temp3 = op2 * op3; temp4 = (temp3 >> 32) + op2 * op4; result1 = temp1 & UINT64_C(0xFFFFFFFF); result2 = temp2 + (temp3 & UINT64_C(0xFFFFFFFF)); result3 = (result2 >> 32) + temp4; result4 = (result3 >> 32); lo = result1 | (result2 << 32); hi = (result3 & UINT64_C(0xFFFFFFFF)) | (result4 << 32); if (sign) { hi = ~hi; if (!lo) hi++; else lo = ~lo + 1; } ADD_TO_PC(1); } DECLARE_INSTRUCTION(DMULTU) { uint64_t op1, op2, op3, op4; uint64_t result1, result2, result3, result4; uint64_t temp1, temp2, temp3, temp4; op1 = rrs & UINT64_C(0xFFFFFFFF); op2 = (rrs >> 32) & UINT64_C(0xFFFFFFFF); op3 = rrt & UINT64_C(0xFFFFFFFF); op4 = (rrt >> 32) & UINT64_C(0xFFFFFFFF); temp1 = op1 * op3; temp2 = (temp1 >> 32) + op1 * op4; temp3 = op2 * op3; temp4 = (temp3 >> 32) + op2 * op4; result1 = temp1 & UINT64_C(0xFFFFFFFF); result2 = temp2 + (temp3 & UINT64_C(0xFFFFFFFF)); result3 = (result2 >> 32) + temp4; result4 = (result3 >> 32); lo = result1 | (result2 << 32); hi = (result3 & UINT64_C(0xFFFFFFFF)) | (result4 << 32); ADD_TO_PC(1); } DECLARE_INSTRUCTION(DDIV) { if (rrt) { lo = rrs / rrt; hi = rrs % rrt; } else DebugMessage(M64MSG_ERROR, "DDIV: divide by 0"); ADD_TO_PC(1); } DECLARE_INSTRUCTION(DDIVU) { if (rrt) { lo = (uint64_t) rrs / (uint64_t) rrt; hi = (uint64_t) rrs % (uint64_t) rrt; } else DebugMessage(M64MSG_ERROR, "DDIVU: divide by 0"); ADD_TO_PC(1); } DECLARE_INSTRUCTION(ADD) { rrd = SE32(rrs32 + rrt32); ADD_TO_PC(1); } DECLARE_INSTRUCTION(ADDU) { rrd = SE32(rrs32 + rrt32); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SUB) { rrd = SE32(rrs32 - rrt32); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SUBU) { rrd = SE32(rrs32 - rrt32); ADD_TO_PC(1); } DECLARE_INSTRUCTION(AND) { rrd = rrs & rrt; ADD_TO_PC(1); } DECLARE_INSTRUCTION(OR) { rrd = rrs | rrt; ADD_TO_PC(1); } DECLARE_INSTRUCTION(XOR) { rrd = rrs ^ rrt; ADD_TO_PC(1); } DECLARE_INSTRUCTION(NOR) { rrd = ~(rrs | rrt); ADD_TO_PC(1); } DECLARE_INSTRUCTION(SLT) { if (rrs < rrt) rrd = 1; else rrd = 0; ADD_TO_PC(1); } DECLARE_INSTRUCTION(SLTU) { if ((uint64_t) rrs < (uint64_t) rrt) rrd = 1; else rrd = 0; ADD_TO_PC(1); } DECLARE_INSTRUCTION(DADD) { rrd = rrs + rrt; ADD_TO_PC(1); } DECLARE_INSTRUCTION(DADDU) { rrd = rrs + rrt; ADD_TO_PC(1); } DECLARE_INSTRUCTION(DSUB) { rrd = rrs - rrt; ADD_TO_PC(1); } DECLARE_INSTRUCTION(DSUBU) { rrd = rrs - rrt; ADD_TO_PC(1); } DECLARE_INSTRUCTION(TEQ) { if (rrs == rrt) { DebugMessage(M64MSG_ERROR, "trap exception in TEQ"); stop=1; } ADD_TO_PC(1); } DECLARE_INSTRUCTION(DSLL) { rrd = rrt << rsa; ADD_TO_PC(1); } DECLARE_INSTRUCTION(DSRL) { rrd = (uint64_t) rrt >> rsa; ADD_TO_PC(1); } DECLARE_INSTRUCTION(DSRA) { rrd = rrt >> rsa; ADD_TO_PC(1); } DECLARE_INSTRUCTION(DSLL32) { rrd = rrt << (32 + rsa); ADD_TO_PC(1); } DECLARE_INSTRUCTION(DSRL32) { rrd = (uint64_t) rrt >> (32 + rsa); ADD_TO_PC(1); } DECLARE_INSTRUCTION(DSRA32) { rrd = (int64_t) rrt >> (32 + rsa); ADD_TO_PC(1); } mupen64plus-core-src-2.5/src/r4300/interpreter_tlb.def000066400000000000000000000223461251723631200225310ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - interpreter_tlb.def * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include // For adler32() DECLARE_INSTRUCTION(TLBR) { int index; index = g_cp0_regs[CP0_INDEX_REG] & UINT32_C(0x1F); g_cp0_regs[CP0_PAGEMASK_REG] = tlb_e[index].mask << 13; g_cp0_regs[CP0_ENTRYHI_REG] = ((tlb_e[index].vpn2 << 13) | tlb_e[index].asid); g_cp0_regs[CP0_ENTRYLO0_REG] = (tlb_e[index].pfn_even << 6) | (tlb_e[index].c_even << 3) | (tlb_e[index].d_even << 2) | (tlb_e[index].v_even << 1) | tlb_e[index].g; g_cp0_regs[CP0_ENTRYLO1_REG] = (tlb_e[index].pfn_odd << 6) | (tlb_e[index].c_odd << 3) | (tlb_e[index].d_odd << 2) | (tlb_e[index].v_odd << 1) | tlb_e[index].g; ADD_TO_PC(1); } static void TLBWrite(unsigned int idx) { if (r4300emu != CORE_PURE_INTERPRETER) { unsigned int i; if (tlb_e[idx].v_even) { for (i=tlb_e[idx].start_even>>12; i<=tlb_e[idx].end_even>>12; i++) { if(!invalid_code[i] &&(invalid_code[tlb_LUT_r[i]>>12] || invalid_code[(tlb_LUT_r[i]>>12)+0x20000])) invalid_code[i] = 1; if (!invalid_code[i]) { /*int j; md5_state_t state; md5_byte_t digest[16]; md5_init(&state); md5_append(&state, (const md5_byte_t*)&g_rdram[(tlb_LUT_r[i]&0x7FF000)/4], 0x1000); md5_finish(&state, digest); for (j=0; j<16; j++) blocks[i]->md5[j] = digest[j];*/ blocks[i]->adler32 = adler32(0, (const unsigned char *)&g_rdram[(tlb_LUT_r[i]&0x7FF000)/4], 0x1000); invalid_code[i] = 1; } else if (blocks[i]) { /*int j; for (j=0; j<16; j++) blocks[i]->md5[j] = 0;*/ blocks[i]->adler32 = 0; } } } if (tlb_e[idx].v_odd) { for (i=tlb_e[idx].start_odd>>12; i<=tlb_e[idx].end_odd>>12; i++) { if(!invalid_code[i] &&(invalid_code[tlb_LUT_r[i]>>12] || invalid_code[(tlb_LUT_r[i]>>12)+0x20000])) invalid_code[i] = 1; if (!invalid_code[i]) { /*int j; md5_state_t state; md5_byte_t digest[16]; md5_init(&state); md5_append(&state, (const md5_byte_t*)&g_rdram[(tlb_LUT_r[i]&0x7FF000)/4], 0x1000); md5_finish(&state, digest); for (j=0; j<16; j++) blocks[i]->md5[j] = digest[j];*/ blocks[i]->adler32 = adler32(0, (const unsigned char *)&g_rdram[(tlb_LUT_r[i]&0x7FF000)/4], 0x1000); invalid_code[i] = 1; } else if (blocks[i]) { /*int j; for (j=0; j<16; j++) blocks[i]->md5[j] = 0;*/ blocks[i]->adler32 = 0; } } } } tlb_unmap(&tlb_e[idx]); tlb_e[idx].g = (g_cp0_regs[CP0_ENTRYLO0_REG] & g_cp0_regs[CP0_ENTRYLO1_REG] & 1); tlb_e[idx].pfn_even = (g_cp0_regs[CP0_ENTRYLO0_REG] & UINT32_C(0x3FFFFFC0)) >> 6; tlb_e[idx].pfn_odd = (g_cp0_regs[CP0_ENTRYLO1_REG] & UINT32_C(0x3FFFFFC0)) >> 6; tlb_e[idx].c_even = (g_cp0_regs[CP0_ENTRYLO0_REG] & UINT32_C(0x38)) >> 3; tlb_e[idx].c_odd = (g_cp0_regs[CP0_ENTRYLO1_REG] & UINT32_C(0x38)) >> 3; tlb_e[idx].d_even = (g_cp0_regs[CP0_ENTRYLO0_REG] & UINT32_C(0x4)) >> 2; tlb_e[idx].d_odd = (g_cp0_regs[CP0_ENTRYLO1_REG] & UINT32_C(0x4)) >> 2; tlb_e[idx].v_even = (g_cp0_regs[CP0_ENTRYLO0_REG] & UINT32_C(0x2)) >> 1; tlb_e[idx].v_odd = (g_cp0_regs[CP0_ENTRYLO1_REG] & UINT32_C(0x2)) >> 1; tlb_e[idx].asid = (g_cp0_regs[CP0_ENTRYHI_REG] & UINT32_C(0xFF)); tlb_e[idx].vpn2 = (g_cp0_regs[CP0_ENTRYHI_REG] & UINT32_C(0xFFFFE000)) >> 13; //tlb_e[idx].r = (g_cp0_regs[CP0_ENTRYHI_REG] & 0xC000000000000000LL) >> 62; tlb_e[idx].mask = (g_cp0_regs[CP0_PAGEMASK_REG] & UINT32_C(0x1FFE000)) >> 13; tlb_e[idx].start_even = tlb_e[idx].vpn2 << 13; tlb_e[idx].end_even = tlb_e[idx].start_even+ (tlb_e[idx].mask << 12) + UINT32_C(0xFFF); tlb_e[idx].phys_even = tlb_e[idx].pfn_even << 12; tlb_e[idx].start_odd = tlb_e[idx].end_even+1; tlb_e[idx].end_odd = tlb_e[idx].start_odd+ (tlb_e[idx].mask << 12) + UINT32_C(0xFFF); tlb_e[idx].phys_odd = tlb_e[idx].pfn_odd << 12; tlb_map(&tlb_e[idx]); if (r4300emu != CORE_PURE_INTERPRETER) { unsigned int i; if (tlb_e[idx].v_even) { for (i=tlb_e[idx].start_even>>12; i<=tlb_e[idx].end_even>>12; i++) { /*if (blocks[i] && (blocks[i]->md5[0] || blocks[i]->md5[1] || blocks[i]->md5[2] || blocks[i]->md5[3])) { int j; int equal = 1; md5_state_t state; md5_byte_t digest[16]; md5_init(&state); md5_append(&state, (const md5_byte_t*)&g_rdram[(tlb_LUT_r[i]&0x7FF000)/4], 0x1000); md5_finish(&state, digest); for (j=0; j<16; j++) if (digest[j] != blocks[i]->md5[j]) equal = 0; if (equal) invalid_code[i] = 0; }*/ if(blocks[i] && blocks[i]->adler32) { if(blocks[i]->adler32 == adler32(0,(const unsigned char *)&g_rdram[(tlb_LUT_r[i]&0x7FF000)/4],0x1000)) invalid_code[i] = 0; } } } if (tlb_e[idx].v_odd) { for (i=tlb_e[idx].start_odd>>12; i<=tlb_e[idx].end_odd>>12; i++) { /*if (blocks[i] && (blocks[i]->md5[0] || blocks[i]->md5[1] || blocks[i]->md5[2] || blocks[i]->md5[3])) { int j; int equal = 1; md5_state_t state; md5_byte_t digest[16]; md5_init(&state); md5_append(&state, (const md5_byte_t*)&g_rdram[(tlb_LUT_r[i]&0x7FF000)/4], 0x1000); md5_finish(&state, digest); for (j=0; j<16; j++) if (digest[j] != blocks[i]->md5[j]) equal = 0; if (equal) invalid_code[i] = 0; }*/ if(blocks[i] && blocks[i]->adler32) { if(blocks[i]->adler32 == adler32(0,(const unsigned char *)&g_rdram[(tlb_LUT_r[i]&0x7FF000)/4],0x1000)) invalid_code[i] = 0; } } } } } DECLARE_INSTRUCTION(TLBWI) { TLBWrite(g_cp0_regs[CP0_INDEX_REG] & UINT32_C(0x3F)); ADD_TO_PC(1); } DECLARE_INSTRUCTION(TLBWR) { update_count(); g_cp0_regs[CP0_RANDOM_REG] = (g_cp0_regs[CP0_COUNT_REG]/2 % (32 - g_cp0_regs[CP0_WIRED_REG])) + g_cp0_regs[CP0_WIRED_REG]; TLBWrite(g_cp0_regs[CP0_RANDOM_REG]); ADD_TO_PC(1); } DECLARE_INSTRUCTION(TLBP) { int i; g_cp0_regs[CP0_INDEX_REG] |= UINT32_C(0x80000000); for (i=0; i<32; i++) { if (((tlb_e[i].vpn2 & (~tlb_e[i].mask)) == (((g_cp0_regs[CP0_ENTRYHI_REG] & UINT32_C(0xFFFFE000)) >> 13) & (~tlb_e[i].mask))) && ((tlb_e[i].g) || (tlb_e[i].asid == (g_cp0_regs[CP0_ENTRYHI_REG] & UINT32_C(0xFF))))) { g_cp0_regs[CP0_INDEX_REG] = i; break; } } ADD_TO_PC(1); } DECLARE_INSTRUCTION(ERET) { update_count(); if (g_cp0_regs[CP0_STATUS_REG] & UINT32_C(0x4)) { DebugMessage(M64MSG_ERROR, "error in ERET"); stop=1; } else { g_cp0_regs[CP0_STATUS_REG] &= ~UINT32_C(0x2); generic_jump_to(g_cp0_regs[CP0_EPC_REG]); } llbit = 0; check_interupt(); last_addr = PCADDR; if (next_interupt <= g_cp0_regs[CP0_COUNT_REG]) gen_interupt(); } mupen64plus-core-src-2.5/src/r4300/interupt.c000066400000000000000000000360351251723631200206630ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - interupt.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #define M64P_CORE_PROTOTYPES 1 #include "interupt.h" #include #include #include #include #include "ai/ai_controller.h" #include "api/callbacks.h" #include "api/m64p_types.h" #include "cached_interp.h" #include "cp0_private.h" #include "exception.h" #include "main/main.h" #include "main/savestates.h" #include "mi_controller.h" #include "new_dynarec/new_dynarec.h" #include "pi/pi_controller.h" #include "r4300.h" #include "r4300_core.h" #include "rdp/rdp_core.h" #include "recomp.h" #include "reset.h" #include "rsp/rsp_core.h" #include "si/si_controller.h" #include "vi/vi_controller.h" int interupt_unsafe_state = 0; struct interrupt_event { int type; unsigned int count; }; /*************************************************************************** * Pool of Single Linked List Nodes **************************************************************************/ #define POOL_CAPACITY 16 struct node { struct interrupt_event data; struct node *next; }; struct pool { struct node nodes[POOL_CAPACITY]; struct node* stack[POOL_CAPACITY]; size_t index; }; static struct node* alloc_node(struct pool* p); static void free_node(struct pool* p, struct node* node); static void clear_pool(struct pool* p); /* node allocation/deallocation on a given pool */ static struct node* alloc_node(struct pool* p) { /* return NULL if pool is too small */ if (p->index >= POOL_CAPACITY) return NULL; return p->stack[p->index++]; } static void free_node(struct pool* p, struct node* node) { if (p->index == 0 || node == NULL) return; p->stack[--p->index] = node; } /* release all nodes */ static void clear_pool(struct pool* p) { size_t i; for(i = 0; i < POOL_CAPACITY; ++i) p->stack[i] = &p->nodes[i]; p->index = 0; } /*************************************************************************** * Interrupt Queue **************************************************************************/ struct interrupt_queue { struct pool pool; struct node* first; }; static struct interrupt_queue q; static void clear_queue(void) { q.first = NULL; clear_pool(&q.pool); } static int SPECIAL_done = 0; static int before_event(unsigned int evt1, unsigned int evt2, int type2) { if(evt1 - g_cp0_regs[CP0_COUNT_REG] < UINT32_C(0x80000000)) { if(evt2 - g_cp0_regs[CP0_COUNT_REG] < UINT32_C(0x80000000)) { if((evt1 - g_cp0_regs[CP0_COUNT_REG]) < (evt2 - g_cp0_regs[CP0_COUNT_REG])) return 1; else return 0; } else { if((g_cp0_regs[CP0_COUNT_REG] - evt2) < UINT32_C(0x10000000)) { switch(type2) { case SPECIAL_INT: if(SPECIAL_done) return 1; else return 0; break; default: return 0; } } else return 1; } } else return 0; } void add_interupt_event(int type, unsigned int delay) { add_interupt_event_count(type, g_cp0_regs[CP0_COUNT_REG] + delay); } void add_interupt_event_count(int type, unsigned int count) { struct node* event; struct node* e; int special; special = (type == SPECIAL_INT); if(g_cp0_regs[CP0_COUNT_REG] > UINT32_C(0x80000000)) SPECIAL_done = 0; if (get_event(type)) { DebugMessage(M64MSG_WARNING, "two events of type 0x%x in interrupt queue", type); /* FIXME: hack-fix for freezing in Perfect Dark * http://code.google.com/p/mupen64plus/issues/detail?id=553 * https://github.com/mupen64plus-ae/mupen64plus-ae/commit/802d8f81d46705d64694d7a34010dc5f35787c7d */ return; } event = alloc_node(&q.pool); if (event == NULL) { DebugMessage(M64MSG_ERROR, "Failed to allocate node for new interrupt event"); return; } event->data.count = count; event->data.type = type; if (q.first == NULL) { q.first = event; event->next = NULL; next_interupt = q.first->data.count; } else if (before_event(count, q.first->data.count, q.first->data.type) && !special) { event->next = q.first; q.first = event; next_interupt = q.first->data.count; } else { for(e = q.first; e->next != NULL && (!before_event(count, e->next->data.count, e->next->data.type) || special); e = e->next); if (e->next == NULL) { e->next = event; event->next = NULL; } else { if (!special) for(; e->next != NULL && e->next->data.count == count; e = e->next); event->next = e->next; e->next = event; } } } static void remove_interupt_event(void) { struct node* e; e = q.first; q.first = e->next; free_node(&q.pool, e); next_interupt = (q.first != NULL && (q.first->data.count > g_cp0_regs[CP0_COUNT_REG] || (g_cp0_regs[CP0_COUNT_REG] - q.first->data.count) < UINT32_C(0x80000000))) ? q.first->data.count : 0; } unsigned int get_event(int type) { struct node* e = q.first; if (e == NULL) return 0; if (e->data.type == type) return e->data.count; for(; e->next != NULL && e->next->data.type != type; e = e->next); return (e->next != NULL) ? e->next->data.count : 0; } int get_next_event_type(void) { return (q.first == NULL) ? 0 : q.first->data.type; } void remove_event(int type) { struct node* to_del; struct node* e = q.first; if (e == NULL) return; if (e->data.type == type) { q.first = e->next; free_node(&q.pool, e); } else { for(; e->next != NULL && e->next->data.type != type; e = e->next); if (e->next != NULL) { to_del = e->next; e->next = to_del->next; free_node(&q.pool, to_del); } } } void translate_event_queue(unsigned int base) { struct node* e; remove_event(COMPARE_INT); remove_event(SPECIAL_INT); for(e = q.first; e != NULL; e = e->next) { e->data.count = (e->data.count - g_cp0_regs[CP0_COUNT_REG]) + base; } add_interupt_event_count(COMPARE_INT, g_cp0_regs[CP0_COMPARE_REG]); add_interupt_event_count(SPECIAL_INT, 0); } int save_eventqueue_infos(char *buf) { int len; struct node* e; len = 0; for(e = q.first; e != NULL; e = e->next) { memcpy(buf + len , &e->data.type , 4); memcpy(buf + len + 4, &e->data.count, 4); len += 8; } *((unsigned int*)&buf[len]) = 0xFFFFFFFF; return len+4; } void load_eventqueue_infos(char *buf) { int len = 0; clear_queue(); while (*((unsigned int*)&buf[len]) != 0xFFFFFFFF) { int type = *((unsigned int*)&buf[len]); unsigned int count = *((unsigned int*)&buf[len+4]); add_interupt_event_count(type, count); len += 8; } } void init_interupt(void) { SPECIAL_done = 1; g_vi.delay = g_vi.next_vi = 5000; clear_queue(); add_interupt_event_count(VI_INT, g_vi.next_vi); add_interupt_event_count(SPECIAL_INT, 0); } void check_interupt(void) { struct node* event; if (g_r4300.mi.regs[MI_INTR_REG] & g_r4300.mi.regs[MI_INTR_MASK_REG]) g_cp0_regs[CP0_CAUSE_REG] = (g_cp0_regs[CP0_CAUSE_REG] | UINT32_C(0x400)) & UINT32_C(0xFFFFFF83); else g_cp0_regs[CP0_CAUSE_REG] &= ~UINT32_C(0x400); if ((g_cp0_regs[CP0_STATUS_REG] & UINT32_C(7)) != 1) return; if (g_cp0_regs[CP0_STATUS_REG] & g_cp0_regs[CP0_CAUSE_REG] & UINT32_C(0xFF00)) { event = alloc_node(&q.pool); if (event == NULL) { DebugMessage(M64MSG_ERROR, "Failed to allocate node for new interrupt event"); return; } event->data.count = next_interupt = g_cp0_regs[CP0_COUNT_REG]; event->data.type = CHECK_INT; if (q.first == NULL) { q.first = event; event->next = NULL; } else { event->next = q.first; q.first = event; } } } static void wrapped_exception_general(void) { #ifdef NEW_DYNAREC if (r4300emu == CORE_DYNAREC) { g_cp0_regs[CP0_EPC_REG] = pcaddr; pcaddr = 0x80000180; g_cp0_regs[CP0_STATUS_REG] |= UINT32_C(2); g_cp0_regs[CP0_CAUSE_REG] &= UINT32_C(0x7FFFFFFF); pending_exception=1; } else { exception_general(); } #else exception_general(); #endif } void raise_maskable_interrupt(uint32_t cause) { g_cp0_regs[CP0_CAUSE_REG] = (g_cp0_regs[CP0_CAUSE_REG] | cause) & UINT32_C(0xffffff83); if (!(g_cp0_regs[CP0_STATUS_REG] & g_cp0_regs[CP0_CAUSE_REG] & UINT32_C(0xff00))) return; if ((g_cp0_regs[CP0_STATUS_REG] & UINT32_C(7)) != UINT32_C(1)) return; wrapped_exception_general(); } static void special_int_handler(void) { if (g_cp0_regs[CP0_COUNT_REG] > UINT32_C(0x10000000)) return; SPECIAL_done = 1; remove_interupt_event(); add_interupt_event_count(SPECIAL_INT, 0); } static void compare_int_handler(void) { remove_interupt_event(); g_cp0_regs[CP0_COUNT_REG]+=count_per_op; add_interupt_event_count(COMPARE_INT, g_cp0_regs[CP0_COMPARE_REG]); g_cp0_regs[CP0_COUNT_REG]-=count_per_op; raise_maskable_interrupt(UINT32_C(0x8000)); } static void hw2_int_handler(void) { // Hardware Interrupt 2 -- remove interrupt event from queue remove_interupt_event(); g_cp0_regs[CP0_STATUS_REG] = (g_cp0_regs[CP0_STATUS_REG] & ~UINT32_C(0x00380000)) | UINT32_C(0x1000); g_cp0_regs[CP0_CAUSE_REG] = (g_cp0_regs[CP0_CAUSE_REG] | UINT32_C(0x1000)) & UINT32_C(0xffffff83); wrapped_exception_general(); } static void nmi_int_handler(void) { // Non Maskable Interrupt -- remove interrupt event from queue remove_interupt_event(); // setup r4300 Status flags: reset TS and SR, set BEV, ERL, and SR g_cp0_regs[CP0_STATUS_REG] = (g_cp0_regs[CP0_STATUS_REG] & ~UINT32_C(0x00380000)) | UINT32_C(0x00500004); g_cp0_regs[CP0_CAUSE_REG] = 0x00000000; // simulate the soft reset code which would run from the PIF ROM r4300_reset_soft(); // clear all interrupts, reset interrupt counters back to 0 g_cp0_regs[CP0_COUNT_REG] = 0; g_gs_vi_counter = 0; init_interupt(); // clear the audio status register so that subsequent write_ai() calls will work properly g_ai.regs[AI_STATUS_REG] = 0; // set ErrorEPC with the last instruction address g_cp0_regs[CP0_ERROREPC_REG] = PC->addr; // reset the r4300 internal state if (r4300emu != CORE_PURE_INTERPRETER) { // clear all the compiled instruction blocks and re-initialize free_blocks(); init_blocks(); } // adjust ErrorEPC if we were in a delay slot, and clear the delay_slot and dyna_interp flags if(delay_slot==1 || delay_slot==3) { g_cp0_regs[CP0_ERROREPC_REG]-=4; } delay_slot = 0; dyna_interp = 0; // set next instruction address to reset vector last_addr = UINT32_C(0xa4000040); generic_jump_to(UINT32_C(0xa4000040)); } void gen_interupt(void) { if (stop == 1) { g_gs_vi_counter = 0; // debug dyna_stop(); } if (!interupt_unsafe_state) { if (savestates_get_job() == savestates_job_load) { savestates_load(); return; } if (reset_hard_job) { reset_hard(); reset_hard_job = 0; return; } } if (skip_jump) { uint32_t dest = skip_jump; skip_jump = 0; next_interupt = (q.first->data.count > g_cp0_regs[CP0_COUNT_REG] || (g_cp0_regs[CP0_COUNT_REG] - q.first->data.count) < UINT32_C(0x80000000)) ? q.first->data.count : 0; last_addr = dest; generic_jump_to(dest); return; } switch(q.first->data.type) { case SPECIAL_INT: special_int_handler(); break; case VI_INT: remove_interupt_event(); vi_vertical_interrupt_event(&g_vi); break; case COMPARE_INT: compare_int_handler(); break; case CHECK_INT: remove_interupt_event(); wrapped_exception_general(); break; case SI_INT: remove_interupt_event(); si_end_of_dma_event(&g_si); break; case PI_INT: remove_interupt_event(); pi_end_of_dma_event(&g_pi); break; case AI_INT: remove_interupt_event(); ai_end_of_dma_event(&g_ai); break; case SP_INT: remove_interupt_event(); rsp_interrupt_event(&g_sp); break; case DP_INT: remove_interupt_event(); rdp_interrupt_event(&g_dp); break; case HW2_INT: hw2_int_handler(); break; case NMI_INT: nmi_int_handler(); break; default: DebugMessage(M64MSG_ERROR, "Unknown interrupt queue event type %.8X.", q.first->data.type); remove_interupt_event(); wrapped_exception_general(); break; } if (!interupt_unsafe_state) { if (savestates_get_job() == savestates_job_save) { savestates_save(); return; } } } mupen64plus-core-src-2.5/src/r4300/interupt.h000066400000000000000000000047651251723631200206750ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - interupt.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_INTERUPT_H #define M64P_R4300_INTERUPT_H #include void init_interupt(void); // set to avoid savestates/reset if state may be inconsistent // (e.g. in the middle of an instruction) extern int interupt_unsafe_state; void raise_maskable_interrupt(uint32_t cause); void gen_interupt(void); void check_interupt(void); void translate_event_queue(unsigned int base); void remove_event(int type); void add_interupt_event_count(int type, unsigned int count); void add_interupt_event(int type, unsigned int delay); unsigned int get_event(int type); int get_next_event_type(void); int save_eventqueue_infos(char *buf); void load_eventqueue_infos(char *buf); #define VI_INT 0x001 #define COMPARE_INT 0x002 #define CHECK_INT 0x004 #define SI_INT 0x008 #define PI_INT 0x010 #define SPECIAL_INT 0x020 #define AI_INT 0x040 #define SP_INT 0x080 #define DP_INT 0x100 #define HW2_INT 0x200 #define NMI_INT 0x400 #endif /* M64P_R4300_INTERUPT_H */ mupen64plus-core-src-2.5/src/r4300/macros.h000066400000000000000000000052101251723631200202710ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - macros.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_MACROS_H #define M64P_R4300_MACROS_H #define SE8(a) ((int64_t) ((int8_t) (a))) #define SE16(a) ((int64_t) ((int16_t) (a))) #define SE32(a) ((int64_t) ((int32_t) (a))) #define rrt *PC->f.r.rt #define rrd *PC->f.r.rd #define rfs PC->f.r.nrd #define rrs *PC->f.r.rs #define rsa PC->f.r.sa #define irt *PC->f.i.rt #define ioffset PC->f.i.immediate #define iimmediate PC->f.i.immediate #define irs *PC->f.i.rs #define ibase *PC->f.i.rs #define jinst_index PC->f.j.inst_index #define lfbase PC->f.lf.base #define lfft PC->f.lf.ft #define lfoffset PC->f.lf.offset #define cfft PC->f.cf.ft #define cffs PC->f.cf.fs #define cffd PC->f.cf.fd // 32 bits macros #ifndef M64P_BIG_ENDIAN #define rrt32 *((int32_t*) PC->f.r.rt) #define rrd32 *((int32_t*) PC->f.r.rd) #define rrs32 *((int32_t*) PC->f.r.rs) #define irs32 *((int32_t*) PC->f.i.rs) #define irt32 *((int32_t*) PC->f.i.rt) #else #define rrt32 *((int32_t*) PC->f.r.rt + 1) #define rrd32 *((int32_t*) PC->f.r.rd + 1) #define rrs32 *((int32_t*) PC->f.r.rs + 1) #define irs32 *((int32_t*) PC->f.i.rs + 1) #define irt32 *((int32_t*) PC->f.i.rt + 1) #endif #endif /* M64P_R4300_MACROS_H */ mupen64plus-core-src-2.5/src/r4300/mi_controller.c000066400000000000000000000112451251723631200216550ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - mi_controller.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "mi_controller.h" #include #include "cp0.h" #include "interupt.h" #include "r4300.h" #include "r4300_core.h" static int update_mi_init_mode(uint32_t* mi_init_mode, uint32_t w) { int clear_dp = 0; /* set init_length */ *mi_init_mode &= ~0x7f; *mi_init_mode |= w & 0x7f; /* clear / set init_mode */ if (w & 0x80) *mi_init_mode &= ~0x80; if (w & 0x100) *mi_init_mode |= 0x80; /* clear / set ebus test_mode */ if (w & 0x200) *mi_init_mode &= ~0x100; if (w & 0x400) *mi_init_mode |= 0x100; /* clear DP interrupt */ if (w & 0x800) clear_dp = 1; /* clear / set RDRAM reg_mode */ if (w & 0x1000) *mi_init_mode &= ~0x200; if (w & 0x2000) *mi_init_mode |= 0x200; return clear_dp; } static void update_mi_intr_mask(uint32_t* mi_intr_mask, uint32_t w) { if (w & 0x1) *mi_intr_mask &= ~0x1; // clear SP mask if (w & 0x2) *mi_intr_mask |= 0x1; // set SP mask if (w & 0x4) *mi_intr_mask &= ~0x2; // clear SI mask if (w & 0x8) *mi_intr_mask |= 0x2; // set SI mask if (w & 0x10) *mi_intr_mask &= ~0x4; // clear AI mask if (w & 0x20) *mi_intr_mask |= 0x4; // set AI mask if (w & 0x40) *mi_intr_mask &= ~0x8; // clear VI mask if (w & 0x80) *mi_intr_mask |= 0x8; // set VI mask if (w & 0x100) *mi_intr_mask &= ~0x10; // clear PI mask if (w & 0x200) *mi_intr_mask |= 0x10; // set PI mask if (w & 0x400) *mi_intr_mask &= ~0x20; // clear DP mask if (w & 0x800) *mi_intr_mask |= 0x20; // set DP mask } void init_mi(struct mi_controller* mi) { memset(mi->regs, 0, MI_REGS_COUNT*sizeof(uint32_t)); mi->regs[MI_VERSION_REG] = 0x02020102; } int read_mi_regs(void* opaque, uint32_t address, uint32_t* value) { struct r4300_core* r4300 = (struct r4300_core*)opaque; uint32_t reg = mi_reg(address); *value = r4300->mi.regs[reg]; return 0; } int write_mi_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct r4300_core* r4300 = (struct r4300_core*)opaque; uint32_t reg = mi_reg(address); const uint32_t* cp0_regs = r4300_cp0_regs(); switch(reg) { case MI_INIT_MODE_REG: if (update_mi_init_mode(&r4300->mi.regs[MI_INIT_MODE_REG], value & mask) != 0) { clear_rcp_interrupt(r4300, MI_INTR_DP); } break; case MI_INTR_MASK_REG: update_mi_intr_mask(&r4300->mi.regs[MI_INTR_MASK_REG], value & mask); check_interupt(); update_count(); if (next_interupt <= cp0_regs[CP0_COUNT_REG]) gen_interupt(); break; } return 0; } /* interrupt execution is immediate (if not masked) */ void raise_rcp_interrupt(struct r4300_core* r4300, uint32_t mi_intr) { r4300->mi.regs[MI_INTR_REG] |= mi_intr; if (r4300->mi.regs[MI_INTR_REG] & r4300->mi.regs[MI_INTR_MASK_REG]) raise_maskable_interrupt(0x400); } /* interrupt execution is scheduled (if not masked) */ void signal_rcp_interrupt(struct r4300_core* r4300, uint32_t mi_intr) { r4300->mi.regs[MI_INTR_REG] |= mi_intr; check_interupt(); } void clear_rcp_interrupt(struct r4300_core* r4300, uint32_t mi_intr) { r4300->mi.regs[MI_INTR_REG] &= ~mi_intr; check_interupt(); } mupen64plus-core-src-2.5/src/r4300/mi_controller.h000066400000000000000000000046671251723631200216740ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - mi_controller.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_MI_CONTROLLER_H #define M64P_R4300_MI_CONTROLLER_H #include struct r4300_core; enum mi_registers { MI_INIT_MODE_REG, MI_VERSION_REG, MI_INTR_REG, MI_INTR_MASK_REG, MI_REGS_COUNT }; enum mi_intr { MI_INTR_SP = 0x01, MI_INTR_SI = 0x02, MI_INTR_AI = 0x04, MI_INTR_VI = 0x08, MI_INTR_PI = 0x10, MI_INTR_DP = 0x20 }; struct mi_controller { uint32_t regs[MI_REGS_COUNT]; }; static uint32_t mi_reg(uint32_t address) { return (address & 0xffff) >> 2; } void init_mi(struct mi_controller* mi); int read_mi_regs(void* opaque, uint32_t address, uint32_t* value); int write_mi_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask); void raise_rcp_interrupt(struct r4300_core* r4300, uint32_t mi_intr); void signal_rcp_interrupt(struct r4300_core* r4300, uint32_t mi_intr); void clear_rcp_interrupt(struct r4300_core* r4300, uint32_t mi_intr); #endif mupen64plus-core-src-2.5/src/r4300/new_dynarec/000077500000000000000000000000001251723631200211345ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/r4300/new_dynarec/arm/000077500000000000000000000000001251723631200217135ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/r4300/new_dynarec/arm/arm_cpu_features.c000066400000000000000000000122761251723631200254130ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - arm_cpu_features.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2015 Gilles Siberlin * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include #include "api/callbacks.h" #include "arm_cpu_features.h" arm_cpu_features_t arm_cpu_features; const char procfile[] = "/proc/cpuinfo"; static unsigned char check_arm_cpu_feature(const char* feature) { unsigned char status = 0; FILE *pFile = fopen(procfile, "r"); if (pFile != NULL) { char line[1024]; while (fgets(line , sizeof(line) , pFile) != NULL) { if (strncmp(line, "Features\t: ", 11)) continue; if (strstr(line + 11, feature) != NULL) status = 1; break; } fclose(pFile); } return status; } static unsigned char get_arm_cpu_implementer(void) { int implementer = 0; FILE *pFile = fopen(procfile, "r"); if (pFile != NULL) { char line[1024]; while (fgets(line , sizeof(line) , pFile) != NULL) { if (strncmp(line, "CPU implementer\t: ", 18)) continue; sscanf(line+18, "0x%02hhx", &implementer); break; } fclose(pFile); } return (unsigned char)implementer; } static unsigned short get_arm_cpu_part(void) { int part = 0; FILE *pFile = fopen(procfile, "r"); if (pFile != NULL) { char line[1024]; while (fgets(line , sizeof(line) , pFile) != NULL) { if (strncmp(line, "CPU part\t: ", 11)) continue; sscanf(line+11, "0x%03hx", &part); break; } fclose(pFile); } return (unsigned short)part; } void detect_arm_cpu_features(void) { arm_cpu_features.SWP = check_arm_cpu_feature("swp"); arm_cpu_features.Half = check_arm_cpu_feature("half"); arm_cpu_features.Thumb = check_arm_cpu_feature("thumb"); arm_cpu_features.FastMult = check_arm_cpu_feature("fastmult"); arm_cpu_features.VFP = check_arm_cpu_feature("vfp"); arm_cpu_features.EDSP = check_arm_cpu_feature("edsp"); arm_cpu_features.ThumbEE = check_arm_cpu_feature("thumbee"); arm_cpu_features.NEON = check_arm_cpu_feature("neon"); arm_cpu_features.VFPv3 = check_arm_cpu_feature("vfpv3"); arm_cpu_features.TLS = check_arm_cpu_feature("tls"); arm_cpu_features.VFPv4 = check_arm_cpu_feature("vfpv4"); arm_cpu_features.IDIVa = check_arm_cpu_feature("idiva"); arm_cpu_features.IDIVt = check_arm_cpu_feature("idivt"); // Qualcomm Krait supports IDIVa but it doesn't report it. Check for krait. if (get_arm_cpu_implementer() == 0x51 && get_arm_cpu_part() == 0x6F) arm_cpu_features.IDIVa = arm_cpu_features.IDIVt = 1; } void print_arm_cpu_features(void) { char buffer[1024]; strcpy(buffer, "ARM CPU Features:"); if (arm_cpu_features.SWP) strcat(buffer, " SWP"); if (arm_cpu_features.Half) strcat(buffer, ", Half"); if (arm_cpu_features.Thumb) strcat(buffer, ", Thumb"); if (arm_cpu_features.FastMult) strcat(buffer, ", FastMult"); if (arm_cpu_features.VFP) strcat(buffer, ", VFP"); if (arm_cpu_features.EDSP) strcat(buffer, ", ESDP"); if (arm_cpu_features.ThumbEE) strcat(buffer, ", ThumbEE"); if (arm_cpu_features.NEON) strcat(buffer, ", NEON"); if (arm_cpu_features.VFPv3) strcat(buffer, ", VFPv3"); if (arm_cpu_features.TLS) strcat(buffer, ", TLS"); if (arm_cpu_features.VFPv4) strcat(buffer, ", VFPv4"); if (arm_cpu_features.IDIVa) strcat(buffer, ", IDIVa"); if (arm_cpu_features.IDIVt) strcat(buffer, ", IDIVt"); DebugMessage(M64MSG_INFO, "%s", buffer); } mupen64plus-core-src-2.5/src/r4300/new_dynarec/arm/arm_cpu_features.h000066400000000000000000000040711251723631200254120ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - arm_cpu_features.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2015 Gilles Siberlin * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef ARM_CPU_FEATURES_H #define ARM_CPU_FEATURES_H typedef struct { unsigned char SWP; unsigned char Half; unsigned char Thumb; unsigned char FastMult; unsigned char VFP; unsigned char EDSP; unsigned char ThumbEE; unsigned char NEON; unsigned char VFPv3; unsigned char TLS; unsigned char VFPv4; unsigned char IDIVa; unsigned char IDIVt; }arm_cpu_features_t; extern arm_cpu_features_t arm_cpu_features; void detect_arm_cpu_features(void); void print_arm_cpu_features(void); #endif /* ARM_CPU_FEATURES_H */ mupen64plus-core-src-2.5/src/r4300/new_dynarec/arm/assem_arm.c000066400000000000000000004251151251723631200240360ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - assem_arm.c * * Copyright (C) 2009-2011 Ari64 * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "../../cp0_private.h" #include "main/main.h" extern int cycle_count; extern int last_count; extern int pcaddr; extern int pending_exception; extern int branch_target; extern int ram_offset; extern uint64_t readmem_dword; extern precomp_instr fake_pc; extern void *dynarec_local; extern u_int memory_map[1048576]; extern u_int mini_ht[32][2]; extern u_int rounding_modes[4]; static u_int literals[1024][2]; void indirect_jump_indexed(); void indirect_jump(); void do_interrupt(); void jump_vaddr(); void jump_vaddr_r0(); void jump_vaddr_r1(); void jump_vaddr_r2(); void jump_vaddr_r3(); void jump_vaddr_r4(); void jump_vaddr_r5(); void jump_vaddr_r6(); void jump_vaddr_r7(); void jump_vaddr_r8(); void jump_vaddr_r9(); void jump_vaddr_r10(); void jump_vaddr_r12(); const u_int jump_vaddr_reg[16] = { (int)jump_vaddr_r0, (int)jump_vaddr_r1, (int)jump_vaddr_r2, (int)jump_vaddr_r3, (int)jump_vaddr_r4, (int)jump_vaddr_r5, (int)jump_vaddr_r6, (int)jump_vaddr_r7, (int)jump_vaddr_r8, (int)jump_vaddr_r9, (int)jump_vaddr_r10, 0, (int)jump_vaddr_r12, 0, 0, 0}; void invalidate_addr_r0(); void invalidate_addr_r1(); void invalidate_addr_r2(); void invalidate_addr_r3(); void invalidate_addr_r4(); void invalidate_addr_r5(); void invalidate_addr_r6(); void invalidate_addr_r7(); void invalidate_addr_r8(); void invalidate_addr_r9(); void invalidate_addr_r10(); void invalidate_addr_r12(); const u_int invalidate_addr_reg[16] = { (int)invalidate_addr_r0, (int)invalidate_addr_r1, (int)invalidate_addr_r2, (int)invalidate_addr_r3, (int)invalidate_addr_r4, (int)invalidate_addr_r5, (int)invalidate_addr_r6, (int)invalidate_addr_r7, (int)invalidate_addr_r8, (int)invalidate_addr_r9, (int)invalidate_addr_r10, 0, (int)invalidate_addr_r12, 0, 0, 0}; #include "../../fpu.h" static u_int jump_table_symbols[] = { (int)invalidate_addr, (int)jump_vaddr, (int)dyna_linker, (int)dyna_linker_ds, (int)verify_code, (int)verify_code_vm, (int)verify_code_ds, (int)cc_interrupt, (int)fp_exception, (int)fp_exception_ds, (int)jump_syscall, (int)jump_eret, (int)indirect_jump_indexed, (int)indirect_jump, (int)do_interrupt, (int)NULL /*MFC0*/, (int)NULL /*MTC0*/, (int)NULL /*TLBR*/, (int)NULL /*TLBP*/, (int)TLBWI_new, (int)TLBWR_new, (int)jump_vaddr_r0, (int)jump_vaddr_r1, (int)jump_vaddr_r2, (int)jump_vaddr_r3, (int)jump_vaddr_r4, (int)jump_vaddr_r5, (int)jump_vaddr_r6, (int)jump_vaddr_r7, (int)jump_vaddr_r8, (int)jump_vaddr_r9, (int)jump_vaddr_r10, (int)jump_vaddr_r12, (int)invalidate_addr_r0, (int)invalidate_addr_r1, (int)invalidate_addr_r2, (int)invalidate_addr_r3, (int)invalidate_addr_r4, (int)invalidate_addr_r5, (int)invalidate_addr_r6, (int)invalidate_addr_r7, (int)invalidate_addr_r8, (int)invalidate_addr_r9, (int)invalidate_addr_r10, (int)invalidate_addr_r12, (int)mult64, (int)multu64, (int)div64, (int)divu64, (int)cvt_s_w, (int)cvt_d_w, (int)cvt_s_l, (int)cvt_d_l, (int)cvt_w_s, (int)cvt_w_d, (int)cvt_l_s, (int)cvt_l_d, (int)cvt_d_s, (int)cvt_s_d, (int)round_l_s, (int)round_w_s, (int)trunc_l_s, (int)trunc_w_s, (int)ceil_l_s, (int)ceil_w_s, (int)floor_l_s, (int)floor_w_s, (int)round_l_d, (int)round_w_d, (int)trunc_l_d, (int)trunc_w_d, (int)ceil_l_d, (int)ceil_w_d, (int)floor_l_d, (int)floor_w_d, (int)c_f_s, (int)c_un_s, (int)c_eq_s, (int)c_ueq_s, (int)c_olt_s, (int)c_ult_s, (int)c_ole_s, (int)c_ule_s, (int)c_sf_s, (int)c_ngle_s, (int)c_seq_s, (int)c_ngl_s, (int)c_lt_s, (int)c_nge_s, (int)c_le_s, (int)c_ngt_s, (int)c_f_d, (int)c_un_d, (int)c_eq_d, (int)c_ueq_d, (int)c_olt_d, (int)c_ult_d, (int)c_ole_d, (int)c_ule_d, (int)c_sf_d, (int)c_ngle_d, (int)c_seq_d, (int)c_ngl_d, (int)c_lt_d, (int)c_nge_d, (int)c_le_d, (int)c_ngt_d, (int)add_s, (int)sub_s, (int)mul_s, (int)div_s, (int)sqrt_s, (int)abs_s, (int)mov_s, (int)neg_s, (int)add_d, (int)sub_d, (int)mul_d, (int)div_d, (int)sqrt_d, (int)abs_d, (int)mov_d, (int)neg_d }; static unsigned int needs_clear_cache[1<<(TARGET_SIZE_2-17)]; #define JUMP_TABLE_SIZE (sizeof(jump_table_symbols)*2) /* Linker */ static void set_jump_target(int addr,u_int target) { u_char *ptr=(u_char *)addr; u_int *ptr2=(u_int *)ptr; if(ptr[3]==0xe2) { assert((target-(u_int)ptr2-8)<1024); assert((addr&3)==0); assert((target&3)==0); *ptr2=(*ptr2&0xFFFFF000)|((target-(u_int)ptr2-8)>>2)|0xF00; //DebugMessage(M64MSG_VERBOSE, "target=%x addr=%x insn=%x",target,addr,*ptr2); } else if(ptr[3]==0x72) { // generated by emit_jno_unlikely if((target-(u_int)ptr2-8)<1024) { assert((addr&3)==0); assert((target&3)==0); *ptr2=(*ptr2&0xFFFFF000)|((target-(u_int)ptr2-8)>>2)|0xF00; } else if((target-(u_int)ptr2-8)<4096&&!((target-(u_int)ptr2-8)&15)) { assert((addr&3)==0); assert((target&3)==0); *ptr2=(*ptr2&0xFFFFF000)|((target-(u_int)ptr2-8)>>4)|0xE00; } else *ptr2=(0x7A000000)|(((target-(u_int)ptr2-8)<<6)>>8); } else { assert((ptr[3]&0x0e)==0xa); *ptr2=(*ptr2&0xFF000000)|(((target-(u_int)ptr2-8)<<6)>>8); } } // This optionally copies the instruction from the target of the branch into // the space before the branch. Works, but the difference in speed is // usually insignificant. /* static void set_jump_target_fillslot(int addr,u_int target,int copy) { u_char *ptr=(u_char *)addr; u_int *ptr2=(u_int *)ptr; assert(!copy||ptr2[-1]==0xe28dd000); if(ptr[3]==0xe2) { assert(!copy); assert((target-(u_int)ptr2-8)<4096); *ptr2=(*ptr2&0xFFFFF000)|(target-(u_int)ptr2-8); } else { assert((ptr[3]&0x0e)==0xa); u_int target_insn=*(u_int *)target; if((target_insn&0x0e100000)==0) { // ALU, no immediate, no flags copy=0; } if((target_insn&0x0c100000)==0x04100000) { // Load copy=0; } if(target_insn&0x08000000) { copy=0; } if(copy) { ptr2[-1]=target_insn; target+=4; } *ptr2=(*ptr2&0xFF000000)|(((target-(u_int)ptr2-8)<<6)>>8); } } */ /* Literal pool */ static void add_literal(int addr,int val) { literals[literalcount][0]=addr; literals[literalcount][1]=val; literalcount++; } static void *kill_pointer(void *stub) { int *ptr=(int *)(stub+4); assert((*ptr&0x0ff00000)==0x05900000); u_int offset=*ptr&0xfff; int **l_ptr=(void *)ptr+offset+8; int *i_ptr=*l_ptr; set_jump_target((int)i_ptr,(int)stub); return i_ptr; } static int get_pointer(void *stub) { //DebugMessage(M64MSG_VERBOSE, "get_pointer(%x)",(int)stub); int *ptr=(int *)(stub+4); assert((*ptr&0x0ff00000)==0x05900000); u_int offset=*ptr&0xfff; int **l_ptr=(void *)ptr+offset+8; int *i_ptr=*l_ptr; assert((*i_ptr&0x0f000000)==0x0a000000); return (int)i_ptr+((*i_ptr<<8)>>6)+8; } // Find the "clean" entry point from a "dirty" entry point // by skipping past the call to verify_code static u_int get_clean_addr(int addr) { int *ptr=(int *)addr; #ifdef ARMv5_ONLY ptr+=4; #else ptr+=6; #endif if((*ptr&0xFF000000)!=0xeb000000) ptr++; assert((*ptr&0xFF000000)==0xeb000000); // bl instruction ptr++; if((*ptr&0xFF000000)==0xea000000) { return (int)ptr+((*ptr<<8)>>6)+8; // follow jump } return (u_int)ptr; } static int verify_dirty(void *addr) { u_int *ptr=(u_int *)addr; #ifdef ARMv5_ONLY // get from literal pool assert((*ptr&0xFFF00000)==0xe5900000); u_int offset=*ptr&0xfff; u_int *l_ptr=(void *)ptr+offset+8; u_int source=l_ptr[0]; u_int copy=l_ptr[1]; u_int len=l_ptr[2]; ptr+=4; #else // ARMv7 movw/movt assert((*ptr&0xFFF00000)==0xe3000000); u_int source=(ptr[0]&0xFFF)+((ptr[0]>>4)&0xF000)+((ptr[2]<<16)&0xFFF0000)+((ptr[2]<<12)&0xF0000000); u_int copy=(ptr[1]&0xFFF)+((ptr[1]>>4)&0xF000)+((ptr[3]<<16)&0xFFF0000)+((ptr[3]<<12)&0xF0000000); u_int len=(ptr[4]&0xFFF)+((ptr[4]>>4)&0xF000); ptr+=6; #endif if((*ptr&0xFF000000)!=0xeb000000) ptr++; assert((*ptr&0xFF000000)==0xeb000000); // bl instruction u_int verifier=(int)ptr+((signed int)(*ptr<<8)>>6)+8; // get target of bl if(verifier==(u_int)verify_code_vm||verifier==(u_int)verify_code_ds) { unsigned int page=source>>12; unsigned int map_value=memory_map[page]; if(map_value>=0x80000000) return 0; while(page<((source+len-1)>>12)) { if((memory_map[++page]<<2)!=(map_value<<2)) return 0; } source = source+(map_value<<2); } //DebugMessage(M64MSG_VERBOSE, "verify_dirty: %x %x %x",source,copy,len); return !memcmp((void *)source,(void *)copy,len); } // This doesn't necessarily find all clean entry points, just // guarantees that it's not dirty static int isclean(int addr) { #ifdef ARMv5_ONLY int *ptr=((u_int *)addr)+4; #else int *ptr=((u_int *)addr)+6; #endif if((*ptr&0xFF000000)!=0xeb000000) ptr++; if((*ptr&0xFF000000)!=0xeb000000) return 1; // bl instruction if((int)ptr+((*ptr<<8)>>6)+8==(int)verify_code) return 0; if((int)ptr+((*ptr<<8)>>6)+8==(int)verify_code_vm) return 0; if((int)ptr+((*ptr<<8)>>6)+8==(int)verify_code_ds) return 0; return 1; } static void get_bounds(int addr,u_int *start,u_int *end) { u_int *ptr=(u_int *)addr; #ifdef ARMv5_ONLY // get from literal pool assert((*ptr&0xFFF00000)==0xe5900000); u_int offset=*ptr&0xfff; u_int *l_ptr=(void *)ptr+offset+8; u_int source=l_ptr[0]; //u_int copy=l_ptr[1]; u_int len=l_ptr[2]; ptr+=4; #else // ARMv7 movw/movt assert((*ptr&0xFFF00000)==0xe3000000); u_int source=(ptr[0]&0xFFF)+((ptr[0]>>4)&0xF000)+((ptr[2]<<16)&0xFFF0000)+((ptr[2]<<12)&0xF0000000); //u_int copy=(ptr[1]&0xFFF)+((ptr[1]>>4)&0xF000)+((ptr[3]<<16)&0xFFF0000)+((ptr[3]<<12)&0xF0000000); u_int len=(ptr[4]&0xFFF)+((ptr[4]>>4)&0xF000); ptr+=6; #endif if((*ptr&0xFF000000)!=0xeb000000) ptr++; assert((*ptr&0xFF000000)==0xeb000000); // bl instruction u_int verifier=(int)ptr+((signed int)(*ptr<<8)>>6)+8; // get target of bl if(verifier==(u_int)verify_code_vm||verifier==(u_int)verify_code_ds) { if(memory_map[source>>12]>=0x80000000) source = 0; else source = source+(memory_map[source>>12]<<2); } *start=source; *end=source+len; } /* Register allocation */ // Note: registers are allocated clean (unmodified state) // if you intend to modify the register, you must call dirty_reg(). static void alloc_reg(struct regstat *cur,int i,signed char reg) { int r,hr; int preferred_reg = (reg&7); if(reg==CCREG) preferred_reg=HOST_CCREG; if(reg==PTEMP||reg==FTEMP) preferred_reg=12; // Don't allocate unused registers if((cur->u>>reg)&1) return; // see if it's already allocated for(hr=0;hrregmap[hr]==reg) return; } // Keep the same mapping if the register was already allocated in a loop preferred_reg = loop_reg(i,reg,preferred_reg); // Try to allocate the preferred register if(cur->regmap[preferred_reg]==-1) { cur->regmap[preferred_reg]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[preferred_reg]; if(r<64&&((cur->u>>r)&1)) { cur->regmap[preferred_reg]=reg; cur->dirty&=~(1<isconst&=~(1<=64&&((cur->uu>>(r&63))&1)) { cur->regmap[preferred_reg]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[hr]; if(r>=0) { if(r<64) { if((cur->u>>r)&1) {cur->regmap[hr]=-1;break;} } else { if((cur->uu>>(r&63))&1) {cur->regmap[hr]=-1;break;} } } } // Try to allocate any available register, but prefer // registers that have not been used recently. if(i>0) { for(hr=0;hrregmap[hr]==-1) { if(regs[i-1].regmap[hr]!=rs1[i-1]&®s[i-1].regmap[hr]!=rs2[i-1]&®s[i-1].regmap[hr]!=rt1[i-1]&®s[i-1].regmap[hr]!=rt2[i-1]) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==-1) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[0],cur->regmap[1],cur->regmap[2],cur->regmap[3],cur->regmap[5],cur->regmap[6],cur->regmap[7]); //DebugMessage(M64MSG_VERBOSE, "hsn(%x): %d %d %d %d %d %d %d",start+i*4,hsn[cur->regmap[0]&63],hsn[cur->regmap[1]&63],hsn[cur->regmap[2]&63],hsn[cur->regmap[3]&63],hsn[cur->regmap[5]&63],hsn[cur->regmap[6]&63],hsn[cur->regmap[7]&63]); if(i>0) { // Don't evict the cycle count at entry points, otherwise the entry // stub will have to write it. if(bt[i]&&hsn[CCREG]>2) hsn[CCREG]=2; if(i>1&&hsn[CCREG]>2&&(itype[i-2]==RJUMP||itype[i-2]==UJUMP||itype[i-2]==CJUMP||itype[i-2]==SJUMP||itype[i-2]==FJUMP)) hsn[CCREG]=2; for(j=10;j>=3;j--) { // Alloc preferred register if available if(hsn[r=cur->regmap[preferred_reg]&63]==j) { for(hr=0;hrregmap[hr]&63)==r) { cur->regmap[hr]=-1; cur->dirty&=~(1<isconst&=~(1<regmap[preferred_reg]=reg; return; } for(r=1;r<=MAXREG;r++) { if(hsn[r]==j&&r!=rs1[i-1]&&r!=rs2[i-1]&&r!=rt1[i-1]&&r!=rt2[i-1]) { for(hr=0;hrregmap[hr]==r+64) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==r) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<=0;j--) { for(r=1;r<=MAXREG;r++) { if(hsn[r]==j) { for(hr=0;hrregmap[hr]==r+64) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==r) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<uu>>reg)&1) return; // see if the upper half is already allocated for(hr=0;hrregmap[hr]==reg+64) return; } // Keep the same mapping if the register was already allocated in a loop preferred_reg = loop_reg(i,reg,preferred_reg); // Try to allocate the preferred register if(cur->regmap[preferred_reg]==-1) { cur->regmap[preferred_reg]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[preferred_reg]; if(r<64&&((cur->u>>r)&1)) { cur->regmap[preferred_reg]=reg|64; cur->dirty&=~(1<isconst&=~(1<=64&&((cur->uu>>(r&63))&1)) { cur->regmap[preferred_reg]=reg|64; cur->dirty&=~(1<isconst&=~(1<=0;hr--) { r=cur->regmap[hr]; if(r>=0) { if(r<64) { if((cur->u>>r)&1) {cur->regmap[hr]=-1;break;} } else { if((cur->uu>>(r&63))&1) {cur->regmap[hr]=-1;break;} } } } // Try to allocate any available register, but prefer // registers that have not been used recently. if(i>0) { for(hr=0;hrregmap[hr]==-1) { if(regs[i-1].regmap[hr]!=rs1[i-1]&®s[i-1].regmap[hr]!=rs2[i-1]&®s[i-1].regmap[hr]!=rt1[i-1]&®s[i-1].regmap[hr]!=rt2[i-1]) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==-1) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[0],cur->regmap[1],cur->regmap[2],cur->regmap[3],cur->regmap[5],cur->regmap[6],cur->regmap[7]); //DebugMessage(M64MSG_VERBOSE, "hsn(%x): %d %d %d %d %d %d %d",start+i*4,hsn[cur->regmap[0]&63],hsn[cur->regmap[1]&63],hsn[cur->regmap[2]&63],hsn[cur->regmap[3]&63],hsn[cur->regmap[5]&63],hsn[cur->regmap[6]&63],hsn[cur->regmap[7]&63]); if(i>0) { // Don't evict the cycle count at entry points, otherwise the entry // stub will have to write it. if(bt[i]&&hsn[CCREG]>2) hsn[CCREG]=2; if(i>1&&hsn[CCREG]>2&&(itype[i-2]==RJUMP||itype[i-2]==UJUMP||itype[i-2]==CJUMP||itype[i-2]==SJUMP||itype[i-2]==FJUMP)) hsn[CCREG]=2; for(j=10;j>=3;j--) { // Alloc preferred register if available if(hsn[r=cur->regmap[preferred_reg]&63]==j) { for(hr=0;hrregmap[hr]&63)==r) { cur->regmap[hr]=-1; cur->dirty&=~(1<isconst&=~(1<regmap[preferred_reg]=reg|64; return; } for(r=1;r<=MAXREG;r++) { if(hsn[r]==j&&r!=rs1[i-1]&&r!=rs2[i-1]&&r!=rt1[i-1]&&r!=rt2[i-1]) { for(hr=0;hrregmap[hr]==r+64) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==r) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<=0;j--) { for(r=1;r<=MAXREG;r++) { if(hsn[r]==j) { for(hr=0;hrregmap[hr]==r+64) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==r) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==reg) return; } // Try to allocate any available register for(hr=HOST_REGS-1;hr>=0;hr--) { if(hr!=EXCLUDE_REG&&cur->regmap[hr]==-1) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<=0;hr--) { r=cur->regmap[hr]; if(r>=0) { if(r<64) { if((cur->u>>r)&1) { if(i==0||((unneeded_reg[i-1]>>r)&1)) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<uu>>(r&63))&1) { if(i==0||((unneeded_reg_upper[i-1]>>(r&63))&1)) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[0]&63],hsn[cur->regmap[1]&63],hsn[cur->regmap[2]&63],hsn[cur->regmap[3]&63],hsn[cur->regmap[5]&63],hsn[cur->regmap[6]&63],hsn[cur->regmap[7]&63]); if(i>0) { // Don't evict the cycle count at entry points, otherwise the entry // stub will have to write it. if(bt[i]&&hsn[CCREG]>2) hsn[CCREG]=2; if(i>1&&hsn[CCREG]>2&&(itype[i-2]==RJUMP||itype[i-2]==UJUMP||itype[i-2]==CJUMP||itype[i-2]==SJUMP||itype[i-2]==FJUMP)) hsn[CCREG]=2; for(j=10;j>=3;j--) { for(r=1;r<=MAXREG;r++) { if(hsn[r]==j&&r!=rs1[i-1]&&r!=rs2[i-1]&&r!=rt1[i-1]&&r!=rt2[i-1]) { for(hr=0;hr2) { if(cur->regmap[hr]==r+64) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<2) { if(cur->regmap[hr]==r) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<=0;j--) { for(r=1;r<=MAXREG;r++) { if(hsn[r]==j) { for(hr=0;hrregmap[hr]==r+64) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==r) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[n]==reg) { dirty=(cur->dirty>>n)&1; cur->regmap[n]=-1; } } cur->regmap[hr]=reg; cur->dirty&=~(1<dirty|=dirty<isconst&=~(1<0) { if(imm<256) { *encoded=((i&30)<<7)|imm; return 1; } imm=(imm>>2)|(imm<<30);i-=2; } return 0; } static u_int genjmp(u_int addr) { if(addr<4) return 0; int offset=addr-(int)out-8; if(offset<-33554432||offset>=33554432) { int n; for (n=0;n=-33554432&&offset<33554432); return ((u_int)offset>>2)&0xffffff; } static void emit_mov(int rs,int rt) { assem_debug("mov %s,%s",regname[rt],regname[rs]); output_w32(0xe1a00000|rd_rn_rm(rt,0,rs)); } static void emit_movs(int rs,int rt) { assem_debug("movs %s,%s",regname[rt],regname[rs]); output_w32(0xe1b00000|rd_rn_rm(rt,0,rs)); } static void emit_add(int rs1,int rs2,int rt) { assem_debug("add %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe0800000|rd_rn_rm(rt,rs1,rs2)); } static void emit_addne(int rs1,int rs2,int rt) { assem_debug("addne %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0x12800000|rd_rn_rm(rt,rs1,rs2)); } static void emit_addsarimm(int rs1,int rs2,int rt,int imm) { assert(imm>0); assert(imm<32); assem_debug("add %s,%s,%s,ASR#%d",regname[rt],regname[rs1],regname[rs2],imm); output_w32(0xe0a00000|rd_rn_rm(rt,rs1,rs2)|0x40|(imm<<7)); } static void emit_adds(int rs1,int rs2,int rt) { assem_debug("adds %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe0900000|rd_rn_rm(rt,rs1,rs2)); } static void emit_adc(int rs1,int rs2,int rt) { assem_debug("adc %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe0a00000|rd_rn_rm(rt,rs1,rs2)); } static void emit_adcs(int rs1,int rs2,int rt) { assem_debug("adcs %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe0b00000|rd_rn_rm(rt,rs1,rs2)); } static void emit_sbc(int rs1,int rs2,int rt) { assem_debug("sbc %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe0c00000|rd_rn_rm(rt,rs1,rs2)); } static void emit_sbcs(int rs1,int rs2,int rt) { assem_debug("sbcs %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe0d00000|rd_rn_rm(rt,rs1,rs2)); } static void emit_neg(int rs, int rt) { assem_debug("rsb %s,%s,#0",regname[rt],regname[rs]); output_w32(0xe2600000|rd_rn_rm(rt,rs,0)); } static void emit_negs(int rs, int rt) { assem_debug("rsbs %s,%s,#0",regname[rt],regname[rs]); output_w32(0xe2700000|rd_rn_rm(rt,rs,0)); } static void emit_sub(int rs1,int rs2,int rt) { assem_debug("sub %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe0400000|rd_rn_rm(rt,rs1,rs2)); } static void emit_subs(int rs1,int rs2,int rt) { assem_debug("subs %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe0500000|rd_rn_rm(rt,rs1,rs2)); } static void emit_zeroreg(int rt) { assem_debug("mov %s,#0",regname[rt]); output_w32(0xe3a00000|rd_rn_rm(rt,0,0)); } static void emit_loadlp(u_int imm,u_int rt) { add_literal((int)out,imm); assem_debug("ldr %s,pc+? [=%x]",regname[rt],imm); output_w32(0xe5900000|rd_rn_rm(rt,15,0)); } static void emit_movw(u_int imm,u_int rt) { assert(imm<65536); assem_debug("movw %s,#%d (0x%x)",regname[rt],imm,imm); output_w32(0xe3000000|rd_rn_rm(rt,0,0)|(imm&0xfff)|((imm<<4)&0xf0000)); } static void emit_movt(u_int imm,u_int rt) { assem_debug("movt %s,#%d (0x%x)",regname[rt],imm&0xffff0000,imm&0xffff0000); output_w32(0xe3400000|rd_rn_rm(rt,0,0)|((imm>>16)&0xfff)|((imm>>12)&0xf0000)); } static void emit_movimm(u_int imm,u_int rt) { u_int armval; if(genimm(imm,&armval)) { assem_debug("mov %s,#%d",regname[rt],imm); output_w32(0xe3a00000|rd_rn_rm(rt,0,0)|armval); }else if(genimm(~imm,&armval)) { assem_debug("mvn %s,#%d",regname[rt],imm); output_w32(0xe3e00000|rd_rn_rm(rt,0,0)|armval); }else if(imm<65536) { #ifdef ARMv5_ONLY assem_debug("mov %s,#%d",regname[rt],imm&0xFF00); output_w32(0xe3a00000|rd_rn_imm_shift(rt,0,imm>>8,8)); assem_debug("add %s,%s,#%d",regname[rt],regname[rt],imm&0xFF); output_w32(0xe2800000|rd_rn_imm_shift(rt,rt,imm&0xff,0)); #else emit_movw(imm,rt); #endif }else{ #ifdef ARMv5_ONLY emit_loadlp(imm,rt); #else emit_movw(imm&0x0000FFFF,rt); emit_movt(imm&0xFFFF0000,rt); #endif } } static void emit_pcreladdr(u_int rt) { assem_debug("add %s,pc,#?",regname[rt]); output_w32(0xe2800000|rd_rn_rm(rt,15,0)); } static void emit_loadreg(int r, int hr) { if((r&63)==0) emit_zeroreg(hr); else if(r==MMREG) emit_movimm(((int)memory_map-(int)&dynarec_local)>>2,hr); else { int addr=((int)reg)+((r&63)<<3)+((r&64)>>4); if((r&63)==HIREG) addr=(int)&hi+((r&64)>>4); if((r&63)==LOREG) addr=(int)&lo+((r&64)>>4); if(r==CCREG) addr=(int)&cycle_count; if(r==CSREG) addr=(int)&g_cp0_regs[CP0_STATUS_REG]; if(r==FSREG) addr=(int)&FCR31; if(r==INVCP) addr=(int)&invc_ptr; if(r==ROREG) addr=(int)&ram_offset; u_int offset = addr-(u_int)&dynarec_local; assert(offset<4096); assem_debug("ldr %s,fp+%d",regname[hr],offset); output_w32(0xe5900000|rd_rn_rm(hr,FP,0)|offset); } } static void emit_storereg(int r, int hr) { int addr=((int)reg)+((r&63)<<3)+((r&64)>>4); if((r&63)==HIREG) addr=(int)&hi+((r&64)>>4); if((r&63)==LOREG) addr=(int)&lo+((r&64)>>4); if(r==CCREG) addr=(int)&cycle_count; if(r==FSREG) addr=(int)&FCR31; u_int offset = addr-(u_int)&dynarec_local; assert(offset<4096); assem_debug("str %s,fp+%d",regname[hr],offset); output_w32(0xe5800000|rd_rn_rm(hr,FP,0)|offset); } static void emit_test(int rs, int rt) { assem_debug("tst %s,%s",regname[rs],regname[rt]); output_w32(0xe1100000|rd_rn_rm(0,rs,rt)); } static void emit_testimm(int rs,int imm) { u_int armval, ret; assem_debug("tst %s,#%d",regname[rs],imm); ret = genimm(imm,&armval); assert(ret); output_w32(0xe3100000|rd_rn_rm(0,rs,0)|armval); } static void emit_not(int rs,int rt) { assem_debug("mvn %s,%s",regname[rt],regname[rs]); output_w32(0xe1e00000|rd_rn_rm(rt,0,rs)); } static void emit_and(u_int rs1,u_int rs2,u_int rt) { assem_debug("and %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe0000000|rd_rn_rm(rt,rs1,rs2)); } static void emit_or(u_int rs1,u_int rs2,u_int rt) { assem_debug("orr %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe1800000|rd_rn_rm(rt,rs1,rs2)); } static void emit_or_and_set_flags(int rs1,int rs2,int rt) { assem_debug("orrs %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe1900000|rd_rn_rm(rt,rs1,rs2)); } static void emit_xor(u_int rs1,u_int rs2,u_int rt) { assem_debug("eor %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe0200000|rd_rn_rm(rt,rs1,rs2)); } static void emit_addimm(u_int rs,int imm,u_int rt) { assert(rs<16); assert(rt<16); if(imm!=0) { assert(imm>-65536&&imm<65536); u_int armval; if(genimm(imm,&armval)) { assem_debug("add %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe2800000|rd_rn_rm(rt,rs,0)|armval); }else if(genimm(-imm,&armval)) { assem_debug("sub %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe2400000|rd_rn_rm(rt,rs,0)|armval); }else if(imm<0) { assem_debug("sub %s,%s,#%d",regname[rt],regname[rs],(-imm)&0xFF00); assem_debug("sub %s,%s,#%d",regname[rt],regname[rt],(-imm)&0xFF); output_w32(0xe2400000|rd_rn_imm_shift(rt,rs,(-imm)>>8,8)); output_w32(0xe2400000|rd_rn_imm_shift(rt,rt,(-imm)&0xff,0)); }else{ assem_debug("add %s,%s,#%d",regname[rt],regname[rs],imm&0xFF00); assem_debug("add %s,%s,#%d",regname[rt],regname[rt],imm&0xFF); output_w32(0xe2800000|rd_rn_imm_shift(rt,rs,imm>>8,8)); output_w32(0xe2800000|rd_rn_imm_shift(rt,rt,imm&0xff,0)); } } else if(rs!=rt) emit_mov(rs,rt); } static void emit_addimm_and_set_flags(int imm,int rt) { assert(imm>-65536&&imm<65536); u_int armval; if(genimm(imm,&armval)) { assem_debug("adds %s,%s,#%d",regname[rt],regname[rt],imm); output_w32(0xe2900000|rd_rn_rm(rt,rt,0)|armval); }else if(genimm(-imm,&armval)) { assem_debug("subs %s,%s,#%d",regname[rt],regname[rt],imm); output_w32(0xe2500000|rd_rn_rm(rt,rt,0)|armval); }else if(imm<0) { assem_debug("sub %s,%s,#%d",regname[rt],regname[rt],(-imm)&0xFF00); assem_debug("subs %s,%s,#%d",regname[rt],regname[rt],(-imm)&0xFF); output_w32(0xe2400000|rd_rn_imm_shift(rt,rt,(-imm)>>8,8)); output_w32(0xe2500000|rd_rn_imm_shift(rt,rt,(-imm)&0xff,0)); }else{ assem_debug("add %s,%s,#%d",regname[rt],regname[rt],imm&0xFF00); assem_debug("adds %s,%s,#%d",regname[rt],regname[rt],imm&0xFF); output_w32(0xe2800000|rd_rn_imm_shift(rt,rt,imm>>8,8)); output_w32(0xe2900000|rd_rn_imm_shift(rt,rt,imm&0xff,0)); } } #ifndef RAM_OFFSET static void emit_addimm_no_flags(u_int imm,u_int rt) { emit_addimm(rt,imm,rt); } #endif static void emit_addnop(u_int r) { assert(r<16); assem_debug("add %s,%s,#0 (nop)",regname[r],regname[r]); output_w32(0xe2800000|rd_rn_rm(r,r,0)); } static void emit_adcimm(u_int rs,int imm,u_int rt) { u_int armval, ret; ret = genimm(imm,&armval); assert(ret); assem_debug("adc %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe2a00000|rd_rn_rm(rt,rs,0)|armval); } /*static void emit_sbcimm(int imm,u_int rt) { u_int armval, ret; ret = genimm(imm,&armval); assert(ret); assem_debug("sbc %s,%s,#%d",regname[rt],regname[rt],imm); output_w32(0xe2c00000|rd_rn_rm(rt,rt,0)|armval); }*/ static void emit_rscimm(int rs,int imm,u_int rt) { u_int armval, ret; ret = genimm(imm,&armval); assert(ret); assem_debug("rsc %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe2e00000|rd_rn_rm(rt,rs,0)|armval); } static void emit_addimm64_32(int rsh,int rsl,int imm,int rth,int rtl) { // TODO: if(genimm(imm,&armval)) ... // else emit_movimm(imm,HOST_TEMPREG); emit_adds(HOST_TEMPREG,rsl,rtl); emit_adcimm(rsh,0,rth); } #ifdef INVERTED_CARRY static void emit_sbb(int rs1,int rs2) { assem_debug("sbb %%%s,%%%s",regname[rs2],regname[rs1]); output_byte(0x19); output_modrm(3,rs1,rs2); } #endif static void emit_andimm(int rs,int imm,int rt) { u_int armval; if(imm==0) { emit_zeroreg(rt); }else if(genimm(imm,&armval)) { assem_debug("and %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe2000000|rd_rn_rm(rt,rs,0)|armval); }else if(genimm(~imm,&armval)) { assem_debug("bic %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe3c00000|rd_rn_rm(rt,rs,0)|armval); }else if(imm==65535) { #ifdef ARMv5_ONLY assem_debug("bic %s,%s,#FF000000",regname[rt],regname[rs]); output_w32(0xe3c00000|rd_rn_rm(rt,rs,0)|0x4FF); assem_debug("bic %s,%s,#00FF0000",regname[rt],regname[rt]); output_w32(0xe3c00000|rd_rn_rm(rt,rt,0)|0x8FF); #else assem_debug("uxth %s,%s",regname[rt],regname[rs]); output_w32(0xe6ff0070|rd_rn_rm(rt,0,rs)); #endif }else{ assert(imm>0&&imm<65535); #ifdef ARMv5_ONLY assem_debug("mov r14,#%d",imm&0xFF00); output_w32(0xe3a00000|rd_rn_imm_shift(HOST_TEMPREG,0,imm>>8,8)); assem_debug("add r14,r14,#%d",imm&0xFF); output_w32(0xe2800000|rd_rn_imm_shift(HOST_TEMPREG,HOST_TEMPREG,imm&0xff,0)); #else emit_movw(imm,HOST_TEMPREG); #endif assem_debug("and %s,%s,r14",regname[rt],regname[rs]); output_w32(0xe0000000|rd_rn_rm(rt,rs,HOST_TEMPREG)); } } static void emit_orimm(int rs,int imm,int rt) { u_int armval; if(imm==0) { if(rs!=rt) emit_mov(rs,rt); }else if(genimm(imm,&armval)) { assem_debug("orr %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe3800000|rd_rn_rm(rt,rs,0)|armval); }else{ assert(imm>0&&imm<65536); assem_debug("orr %s,%s,#%d",regname[rt],regname[rs],imm&0xFF00); assem_debug("orr %s,%s,#%d",regname[rt],regname[rs],imm&0xFF); output_w32(0xe3800000|rd_rn_imm_shift(rt,rs,imm>>8,8)); output_w32(0xe3800000|rd_rn_imm_shift(rt,rt,imm&0xff,0)); } } static void emit_xorimm(int rs,int imm,int rt) { u_int armval; if(imm==0) { if(rs!=rt) emit_mov(rs,rt); }else if(genimm(imm,&armval)) { assem_debug("eor %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe2200000|rd_rn_rm(rt,rs,0)|armval); }else{ assert(imm>0&&imm<65536); assem_debug("eor %s,%s,#%d",regname[rt],regname[rs],imm&0xFF00); assem_debug("eor %s,%s,#%d",regname[rt],regname[rs],imm&0xFF); output_w32(0xe2200000|rd_rn_imm_shift(rt,rs,imm>>8,8)); output_w32(0xe2200000|rd_rn_imm_shift(rt,rt,imm&0xff,0)); } } static void emit_shlimm(int rs,u_int imm,int rt) { assert(imm>0); assert(imm<32); //if(imm==1) ... assem_debug("lsl %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe1a00000|rd_rn_rm(rt,0,rs)|(imm<<7)); } static void emit_shrimm(int rs,u_int imm,int rt) { assert(imm>0); assert(imm<32); assem_debug("lsr %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe1a00000|rd_rn_rm(rt,0,rs)|0x20|(imm<<7)); } static void emit_sarimm(int rs,u_int imm,int rt) { assert(imm>0); assert(imm<32); assem_debug("asr %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe1a00000|rd_rn_rm(rt,0,rs)|0x40|(imm<<7)); } static void emit_rorimm(int rs,u_int imm,int rt) { assert(imm>0); assert(imm<32); assem_debug("ror %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe1a00000|rd_rn_rm(rt,0,rs)|0x60|(imm<<7)); } static void emit_shldimm(int rs,int rs2,u_int imm,int rt) { assem_debug("shld %%%s,%%%s,%d",regname[rt],regname[rs2],imm); assert(imm>0); assert(imm<32); //if(imm==1) ... assem_debug("lsl %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe1a00000|rd_rn_rm(rt,0,rs)|(imm<<7)); assem_debug("orr %s,%s,%s,lsr #%d",regname[rt],regname[rt],regname[rs2],32-imm); output_w32(0xe1800020|rd_rn_rm(rt,rt,rs2)|((32-imm)<<7)); } static void emit_shrdimm(int rs,int rs2,u_int imm,int rt) { assem_debug("shrd %%%s,%%%s,%d",regname[rt],regname[rs2],imm); assert(imm>0); assert(imm<32); //if(imm==1) ... assem_debug("lsr %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe1a00020|rd_rn_rm(rt,0,rs)|(imm<<7)); assem_debug("orr %s,%s,%s,lsl #%d",regname[rt],regname[rt],regname[rs2],32-imm); output_w32(0xe1800000|rd_rn_rm(rt,rt,rs2)|((32-imm)<<7)); } static void emit_shl(u_int rs,u_int shift,u_int rt) { assert(rs<16); assert(rt<16); assert(shift<16); //if(imm==1) ... assem_debug("lsl %s,%s,%s",regname[rt],regname[rs],regname[shift]); output_w32(0xe1a00000|rd_rn_rm(rt,0,rs)|0x10|(shift<<8)); } static void emit_shr(u_int rs,u_int shift,u_int rt) { assert(rs<16); assert(rt<16); assert(shift<16); assem_debug("lsr %s,%s,%s",regname[rt],regname[rs],regname[shift]); output_w32(0xe1a00000|rd_rn_rm(rt,0,rs)|0x30|(shift<<8)); } static void emit_sar(u_int rs,u_int shift,u_int rt) { assert(rs<16); assert(rt<16); assert(shift<16); assem_debug("asr %s,%s,%s",regname[rt],regname[rs],regname[shift]); output_w32(0xe1a00000|rd_rn_rm(rt,0,rs)|0x50|(shift<<8)); } static void emit_orrshl(u_int rs,u_int shift,u_int rt) { assert(rs<16); assert(rt<16); assert(shift<16); assem_debug("orr %s,%s,%s,lsl %s",regname[rt],regname[rt],regname[rs],regname[shift]); output_w32(0xe1800000|rd_rn_rm(rt,rt,rs)|0x10|(shift<<8)); } static void emit_orrshr(u_int rs,u_int shift,u_int rt) { assert(rs<16); assert(rt<16); assert(shift<16); assem_debug("orr %s,%s,%s,lsr %s",regname[rt],regname[rt],regname[rs],regname[shift]); output_w32(0xe1800000|rd_rn_rm(rt,rt,rs)|0x30|(shift<<8)); } static void emit_cmpimm(int rs,int imm) { u_int armval; if(genimm(imm,&armval)) { assem_debug("cmp %s,#%d",regname[rs],imm); output_w32(0xe3500000|rd_rn_rm(0,rs,0)|armval); }else if(genimm(-imm,&armval)) { assem_debug("cmn %s,#%d",regname[rs],imm); output_w32(0xe3700000|rd_rn_rm(0,rs,0)|armval); }else if(imm>0) { assert(imm<65536); #ifdef ARMv5_ONLY emit_movimm(imm,HOST_TEMPREG); #else emit_movw(imm,HOST_TEMPREG); #endif assem_debug("cmp %s,r14",regname[rs]); output_w32(0xe1500000|rd_rn_rm(0,rs,HOST_TEMPREG)); }else{ assert(imm>-65536); #ifdef ARMv5_ONLY emit_movimm(-imm,HOST_TEMPREG); #else emit_movw(-imm,HOST_TEMPREG); #endif assem_debug("cmn %s,r14",regname[rs]); output_w32(0xe1700000|rd_rn_rm(0,rs,HOST_TEMPREG)); } } static void emit_cmovne_imm(int imm,int rt) { assem_debug("movne %s,#%d",regname[rt],imm); u_int armval, ret; ret = genimm(imm,&armval); assert(ret); output_w32(0x13a00000|rd_rn_rm(rt,0,0)|armval); } static void emit_cmovl_imm(int imm,int rt) { assem_debug("movlt %s,#%d",regname[rt],imm); u_int armval, ret; ret = genimm(imm,&armval); assert(ret); output_w32(0xb3a00000|rd_rn_rm(rt,0,0)|armval); } static void emit_cmovb_imm(int imm,int rt) { assem_debug("movcc %s,#%d",regname[rt],imm); u_int armval, ret; ret = genimm(imm,&armval); assert(ret); output_w32(0x33a00000|rd_rn_rm(rt,0,0)|armval); } static void emit_cmovs_imm(int imm,int rt) { assem_debug("movmi %s,#%d",regname[rt],imm); u_int armval, ret; ret = genimm(imm,&armval); assert(ret); output_w32(0x43a00000|rd_rn_rm(rt,0,0)|armval); } static void emit_cmove_reg(int rs,int rt) { assem_debug("moveq %s,%s",regname[rt],regname[rs]); output_w32(0x01a00000|rd_rn_rm(rt,0,rs)); } static void emit_cmovne_reg(int rs,int rt) { assem_debug("movne %s,%s",regname[rt],regname[rs]); output_w32(0x11a00000|rd_rn_rm(rt,0,rs)); } static void emit_cmovl_reg(int rs,int rt) { assem_debug("movlt %s,%s",regname[rt],regname[rs]); output_w32(0xb1a00000|rd_rn_rm(rt,0,rs)); } static void emit_cmovs_reg(int rs,int rt) { assem_debug("movmi %s,%s",regname[rt],regname[rs]); output_w32(0x41a00000|rd_rn_rm(rt,0,rs)); } static void emit_slti32(int rs,int imm,int rt) { if(rs!=rt) emit_zeroreg(rt); emit_cmpimm(rs,imm); if(rs==rt) emit_movimm(0,rt); emit_cmovl_imm(1,rt); } static void emit_sltiu32(int rs,int imm,int rt) { if(rs!=rt) emit_zeroreg(rt); emit_cmpimm(rs,imm); if(rs==rt) emit_movimm(0,rt); emit_cmovb_imm(1,rt); } static void emit_slti64_32(int rsh,int rsl,int imm,int rt) { assert(rsh!=rt); emit_slti32(rsl,imm,rt); if(imm>=0) { emit_test(rsh,rsh); emit_cmovne_imm(0,rt); emit_cmovs_imm(1,rt); } else { emit_cmpimm(rsh,-1); emit_cmovne_imm(0,rt); emit_cmovl_imm(1,rt); } } static void emit_sltiu64_32(int rsh,int rsl,int imm,int rt) { assert(rsh!=rt); emit_sltiu32(rsl,imm,rt); if(imm>=0) { emit_test(rsh,rsh); emit_cmovne_imm(0,rt); } else { emit_cmpimm(rsh,-1); emit_cmovne_imm(1,rt); } } static void emit_cmp(int rs,int rt) { assem_debug("cmp %s,%s",regname[rs],regname[rt]); output_w32(0xe1500000|rd_rn_rm(0,rs,rt)); } static void emit_set_gz32(int rs, int rt) { //assem_debug("set_gz32"); emit_cmpimm(rs,1); emit_movimm(1,rt); emit_cmovl_imm(0,rt); } static void emit_set_nz32(int rs, int rt) { //assem_debug("set_nz32"); if(rs!=rt) emit_movs(rs,rt); else emit_test(rs,rs); emit_cmovne_imm(1,rt); } static void emit_set_gz64_32(int rsh, int rsl, int rt) { //assem_debug("set_gz64"); emit_set_gz32(rsl,rt); emit_test(rsh,rsh); emit_cmovne_imm(1,rt); emit_cmovs_imm(0,rt); } static void emit_set_nz64_32(int rsh, int rsl, int rt) { //assem_debug("set_nz64"); emit_or_and_set_flags(rsh,rsl,rt); emit_cmovne_imm(1,rt); } static void emit_set_if_less32(int rs1, int rs2, int rt) { //assem_debug("set if less (%%%s,%%%s),%%%s",regname[rs1],regname[rs2],regname[rt]); if(rs1!=rt&&rs2!=rt) emit_zeroreg(rt); emit_cmp(rs1,rs2); if(rs1==rt||rs2==rt) emit_movimm(0,rt); emit_cmovl_imm(1,rt); } static void emit_set_if_carry32(int rs1, int rs2, int rt) { //assem_debug("set if carry (%%%s,%%%s),%%%s",regname[rs1],regname[rs2],regname[rt]); if(rs1!=rt&&rs2!=rt) emit_zeroreg(rt); emit_cmp(rs1,rs2); if(rs1==rt||rs2==rt) emit_movimm(0,rt); emit_cmovb_imm(1,rt); } static void emit_set_if_less64_32(int u1, int l1, int u2, int l2, int rt) { //assem_debug("set if less64 (%%%s,%%%s,%%%s,%%%s),%%%s",regname[u1],regname[l1],regname[u2],regname[l2],regname[rt]); assert(u1!=rt); assert(u2!=rt); emit_cmp(l1,l2); emit_movimm(0,rt); emit_sbcs(u1,u2,HOST_TEMPREG); emit_cmovl_imm(1,rt); } static void emit_set_if_carry64_32(int u1, int l1, int u2, int l2, int rt) { //assem_debug("set if carry64 (%%%s,%%%s,%%%s,%%%s),%%%s",regname[u1],regname[l1],regname[u2],regname[l2],regname[rt]); assert(u1!=rt); assert(u2!=rt); emit_cmp(l1,l2); emit_movimm(0,rt); emit_sbcs(u1,u2,HOST_TEMPREG); emit_cmovb_imm(1,rt); } static void emit_call(int a) { assem_debug("bl %x (%x+%x)",a,(int)out,a-(int)out-8); u_int offset=genjmp(a); output_w32(0xeb000000|offset); } static void emit_jmp(int a) { assem_debug("b %x (%x+%x)",a,(int)out,a-(int)out-8); u_int offset=genjmp(a); output_w32(0xea000000|offset); } static void emit_jne(int a) { assem_debug("bne %x",a); u_int offset=genjmp(a); output_w32(0x1a000000|offset); } static void emit_jeq(int a) { assem_debug("beq %x",a); u_int offset=genjmp(a); output_w32(0x0a000000|offset); } static void emit_js(int a) { assem_debug("bmi %x",a); u_int offset=genjmp(a); output_w32(0x4a000000|offset); } static void emit_jns(int a) { assem_debug("bpl %x",a); u_int offset=genjmp(a); output_w32(0x5a000000|offset); } static void emit_jl(int a) { assem_debug("blt %x",a); u_int offset=genjmp(a); output_w32(0xba000000|offset); } static void emit_jge(int a) { assem_debug("bge %x",a); u_int offset=genjmp(a); output_w32(0xaa000000|offset); } static void emit_jno(int a) { assem_debug("bvc %x",a); u_int offset=genjmp(a); output_w32(0x7a000000|offset); } static void emit_jcc(int a) { assem_debug("bcc %x",a); u_int offset=genjmp(a); output_w32(0x3a000000|offset); } static void emit_jae(int a) { assem_debug("bcs %x",a); u_int offset=genjmp(a); output_w32(0x2a000000|offset); } static void emit_jb(int a) { assem_debug("bcc %x",a); u_int offset=genjmp(a); output_w32(0x3a000000|offset); } static void emit_pushreg(u_int r) { assem_debug("push %%%s",regname[r]); assert(0); } static void emit_popreg(u_int r) { assem_debug("pop %%%s",regname[r]); assert(0); } /* static void emit_callreg(u_int r) { assem_debug("call *%%%s",regname[r]); assert(0); } static void emit_jmpreg(u_int r) { assem_debug("mov pc,%s",regname[r]); output_w32(0xe1a00000|rd_rn_rm(15,0,r)); } */ static void emit_readword_indexed(int offset, int rs, int rt) { assert(offset>-4096&&offset<4096); assem_debug("ldr %s,%s+%d",regname[rt],regname[rs],offset); if(offset>=0) { output_w32(0xe5900000|rd_rn_rm(rt,rs,0)|offset); }else{ output_w32(0xe5100000|rd_rn_rm(rt,rs,0)|(-offset)); } } static void emit_readword_dualindexedx4(int rs1, int rs2, int rt) { assem_debug("ldr %s,%s,%s lsl #2",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe7900000|rd_rn_rm(rt,rs1,rs2)|0x100); } static void emit_readword_indexed_tlb(int addr, int rs, int map, int rt) { if(map<0) emit_readword_indexed(addr, rs, rt); else { assert(addr==0); emit_readword_dualindexedx4(rs, map, rt); } } static void emit_readdword_indexed_tlb(int addr, int rs, int map, int rh, int rl) { if(map<0) { if(rh>=0) emit_readword_indexed(addr, rs, rh); emit_readword_indexed(addr+4, rs, rl); }else{ assert(rh!=rs); if(rh>=0) emit_readword_indexed_tlb(addr, rs, map, rh); emit_addimm(map,1,HOST_TEMPREG); emit_readword_indexed_tlb(addr, rs, HOST_TEMPREG, rl); } } static void emit_movsbl_indexed(int offset, int rs, int rt) { assert(offset>-256&&offset<256); assem_debug("ldrsb %s,%s+%d",regname[rt],regname[rs],offset); if(offset>=0) { output_w32(0xe1d000d0|rd_rn_rm(rt,rs,0)|((offset<<4)&0xf00)|(offset&0xf)); }else{ output_w32(0xe15000d0|rd_rn_rm(rt,rs,0)|(((-offset)<<4)&0xf00)|((-offset)&0xf)); } } static void emit_movsbl_indexed_tlb(int addr, int rs, int map, int rt) { if(map<0) emit_movsbl_indexed(addr, rs, rt); else { if(addr==0) { emit_shlimm(map,2,HOST_TEMPREG); assem_debug("ldrsb %s,%s+%s",regname[rt],regname[rs],regname[HOST_TEMPREG]); output_w32(0xe19000d0|rd_rn_rm(rt,rs,HOST_TEMPREG)); }else{ assert(addr>-256&&addr<256); assem_debug("add %s,%s,%s,lsl #2",regname[rt],regname[rs],regname[map]); output_w32(0xe0800000|rd_rn_rm(rt,rs,map)|(2<<7)); emit_movsbl_indexed(addr, rt, rt); } } } static void emit_movswl_indexed(int offset, int rs, int rt) { assert(offset>-256&&offset<256); assem_debug("ldrsh %s,%s+%d",regname[rt],regname[rs],offset); if(offset>=0) { output_w32(0xe1d000f0|rd_rn_rm(rt,rs,0)|((offset<<4)&0xf00)|(offset&0xf)); }else{ output_w32(0xe15000f0|rd_rn_rm(rt,rs,0)|(((-offset)<<4)&0xf00)|((-offset)&0xf)); } } static void emit_movzbl_indexed(int offset, int rs, int rt) { assert(offset>-4096&&offset<4096); assem_debug("ldrb %s,%s+%d",regname[rt],regname[rs],offset); if(offset>=0) { output_w32(0xe5d00000|rd_rn_rm(rt,rs,0)|offset); }else{ output_w32(0xe5500000|rd_rn_rm(rt,rs,0)|(-offset)); } } static void emit_movzbl_dualindexedx4(int rs1, int rs2, int rt) { assem_debug("ldrb %s,%s,%s lsl #2",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe7d00000|rd_rn_rm(rt,rs1,rs2)|0x100); } static void emit_movzbl_indexed_tlb(int addr, int rs, int map, int rt) { if(map<0) emit_movzbl_indexed(addr, rs, rt); else { if(addr==0) { emit_movzbl_dualindexedx4(rs, map, rt); }else{ emit_addimm(rs,addr,rt); emit_movzbl_dualindexedx4(rt, map, rt); } } } static void emit_movzwl_indexed(int offset, int rs, int rt) { assert(offset>-256&&offset<256); assem_debug("ldrh %s,%s+%d",regname[rt],regname[rs],offset); if(offset>=0) { output_w32(0xe1d000b0|rd_rn_rm(rt,rs,0)|((offset<<4)&0xf00)|(offset&0xf)); }else{ output_w32(0xe15000b0|rd_rn_rm(rt,rs,0)|(((-offset)<<4)&0xf00)|((-offset)&0xf)); } } static void emit_readword(int addr, int rt) { u_int offset = addr-(u_int)&dynarec_local; assert(offset<4096); assem_debug("ldr %s,fp+%d",regname[rt],offset); output_w32(0xe5900000|rd_rn_rm(rt,FP,0)|offset); } static void emit_movsbl(int addr, int rt) { u_int offset = addr-(u_int)&dynarec_local; assert(offset<256); assem_debug("ldrsb %s,fp+%d",regname[rt],offset); output_w32(0xe1d000d0|rd_rn_rm(rt,FP,0)|((offset<<4)&0xf00)|(offset&0xf)); } static void emit_movswl(int addr, int rt) { u_int offset = addr-(u_int)&dynarec_local; assert(offset<256); assem_debug("ldrsh %s,fp+%d",regname[rt],offset); output_w32(0xe1d000f0|rd_rn_rm(rt,FP,0)|((offset<<4)&0xf00)|(offset&0xf)); } static void emit_movzbl(int addr, int rt) { u_int offset = addr-(u_int)&dynarec_local; assert(offset<4096); assem_debug("ldrb %s,fp+%d",regname[rt],offset); output_w32(0xe5d00000|rd_rn_rm(rt,FP,0)|offset); } static void emit_movzwl(int addr, int rt) { u_int offset = addr-(u_int)&dynarec_local; assert(offset<256); assem_debug("ldrh %s,fp+%d",regname[rt],offset); output_w32(0xe1d000b0|rd_rn_rm(rt,FP,0)|((offset<<4)&0xf00)|(offset&0xf)); } /* static void emit_movzwl_reg(int rs, int rt) { assem_debug("movzwl %%%s,%%%s",regname[rs]+1,regname[rt]); assert(0); } */ static void emit_writeword_indexed(int rt, int offset, int rs) { assert(offset>-4096&&offset<4096); assem_debug("str %s,%s+%d",regname[rt],regname[rs],offset); if(offset>=0) { output_w32(0xe5800000|rd_rn_rm(rt,rs,0)|offset); }else{ output_w32(0xe5000000|rd_rn_rm(rt,rs,0)|(-offset)); } } static void emit_writeword_dualindexedx4(int rt, int rs1, int rs2) { assem_debug("str %s,%s,%s lsl #2",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe7800000|rd_rn_rm(rt,rs1,rs2)|0x100); } static void emit_writeword_indexed_tlb(int rt, int addr, int rs, int map, int temp) { if(map<0) emit_writeword_indexed(rt, addr, rs); else { assert(addr==0); emit_writeword_dualindexedx4(rt, rs, map); } } static void emit_writedword_indexed_tlb(int rh, int rl, int addr, int rs, int map, int temp) { if(map<0) { if(rh>=0) emit_writeword_indexed(rh, addr, rs); emit_writeword_indexed(rl, addr+4, rs); }else{ assert(rh>=0); if(temp!=rs) emit_addimm(map,1,temp); emit_writeword_indexed_tlb(rh, addr, rs, map, temp); if(temp!=rs) emit_writeword_indexed_tlb(rl, addr, rs, temp, temp); else { emit_addimm(rs,4,rs); emit_writeword_indexed_tlb(rl, addr, rs, map, temp); } } } static void emit_writehword_indexed(int rt, int offset, int rs) { assert(offset>-256&&offset<256); assem_debug("strh %s,%s+%d",regname[rt],regname[rs],offset); if(offset>=0) { output_w32(0xe1c000b0|rd_rn_rm(rt,rs,0)|((offset<<4)&0xf00)|(offset&0xf)); }else{ output_w32(0xe14000b0|rd_rn_rm(rt,rs,0)|(((-offset)<<4)&0xf00)|((-offset)&0xf)); } } static void emit_writebyte_indexed(int rt, int offset, int rs) { assert(offset>-4096&&offset<4096); assem_debug("strb %s,%s+%d",regname[rt],regname[rs],offset); if(offset>=0) { output_w32(0xe5c00000|rd_rn_rm(rt,rs,0)|offset); }else{ output_w32(0xe5400000|rd_rn_rm(rt,rs,0)|(-offset)); } } static void emit_writebyte_dualindexedx4(int rt, int rs1, int rs2) { assem_debug("strb %s,%s,%s lsl #2",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe7c00000|rd_rn_rm(rt,rs1,rs2)|0x100); } static void emit_writebyte_indexed_tlb(int rt, int addr, int rs, int map, int temp) { if(map<0) emit_writebyte_indexed(rt, addr, rs); else { if(addr==0) { emit_writebyte_dualindexedx4(rt, rs, map); }else{ emit_addimm(rs,addr,temp); emit_writebyte_dualindexedx4(rt, temp, map); } } } static void emit_writeword(int rt, int addr) { u_int offset = addr-(u_int)&dynarec_local; assert(offset<4096); assem_debug("str %s,fp+%d",regname[rt],offset); output_w32(0xe5800000|rd_rn_rm(rt,FP,0)|offset); } static void emit_writehword(int rt, int addr) { u_int offset = addr-(u_int)&dynarec_local; assert(offset<256); assem_debug("strh %s,fp+%d",regname[rt],offset); output_w32(0xe1c000b0|rd_rn_rm(rt,FP,0)|((offset<<4)&0xf00)|(offset&0xf)); } static void emit_writebyte(int rt, int addr) { u_int offset = addr-(u_int)&dynarec_local; assert(offset<4096); assem_debug("strb %s,fp+%d",regname[rt],offset); output_w32(0xe5c00000|rd_rn_rm(rt,FP,0)|offset); } static void emit_mul(u_int rs1,u_int rs2,u_int rt) { assem_debug("mul %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe0000090|(rt<<16)|(rs2<<8)|rs1); } static void emit_umull(u_int rs1, u_int rs2, u_int hi, u_int lo) { assem_debug("umull %s, %s, %s, %s",regname[lo],regname[hi],regname[rs1],regname[rs2]); assert(rs1<16); assert(rs2<16); assert(hi<16); assert(lo<16); output_w32(0xe0800090|(hi<<16)|(lo<<12)|(rs2<<8)|rs1); } static void emit_umlal(u_int rs1, u_int rs2, u_int hi, u_int lo) { assem_debug("umlal %s, %s, %s, %s",regname[lo],regname[hi],regname[rs1],regname[rs2]); assert(rs1<16); assert(rs2<16); assert(hi<16); assert(lo<16); output_w32(0xe0a00090|(hi<<16)|(lo<<12)|(rs2<<8)|rs1); } static void emit_smull(u_int rs1, u_int rs2, u_int hi, u_int lo) { assem_debug("smull %s, %s, %s, %s",regname[lo],regname[hi],regname[rs1],regname[rs2]); assert(rs1<16); assert(rs2<16); assert(hi<16); assert(lo<16); output_w32(0xe0c00090|(hi<<16)|(lo<<12)|(rs2<<8)|rs1); } static void emit_smlal(u_int rs1, u_int rs2, u_int hi, u_int lo) { assem_debug("smlal %s, %s, %s, %s",regname[lo],regname[hi],regname[rs1],regname[rs2]); assert(rs1<16); assert(rs2<16); assert(hi<16); assert(lo<16); output_w32(0xe0e00090|(hi<<16)|(lo<<12)|(rs2<<8)|rs1); } static void emit_sdiv(u_int rs1,u_int rs2,u_int rt) { assert(arm_cpu_features.IDIVa); assem_debug("sdiv %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe710f010|(rt<<16)|(rs2<<8)|rs1); } static void emit_udiv(u_int rs1,u_int rs2,u_int rt) { assert(arm_cpu_features.IDIVa); assem_debug("udiv %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe730f010|(rt<<16)|(rs2<<8)|rs1); } static void emit_clz(int rs,int rt) { assem_debug("clz %s,%s",regname[rt],regname[rs]); output_w32(0xe16f0f10|rd_rn_rm(rt,0,rs)); } static void emit_subcs(int rs1,int rs2,int rt) { assem_debug("subcs %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0x20400000|rd_rn_rm(rt,rs1,rs2)); } static void emit_shrcc_imm(int rs,u_int imm,int rt) { assert(imm>0); assert(imm<32); assem_debug("lsrcc %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0x31a00000|rd_rn_rm(rt,0,rs)|0x20|(imm<<7)); } static void emit_negmi(int rs, int rt) { assem_debug("rsbmi %s,%s,#0",regname[rt],regname[rs]); output_w32(0x42600000|rd_rn_rm(rt,rs,0)); } static void emit_orreq(u_int rs1,u_int rs2,u_int rt) { assem_debug("orreq %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0x01800000|rd_rn_rm(rt,rs1,rs2)); } static void emit_orrne(u_int rs1,u_int rs2,u_int rt) { assem_debug("orrne %s,%s,%s",regname[rt],regname[rs1],regname[rs2]); output_w32(0x11800000|rd_rn_rm(rt,rs1,rs2)); } static void emit_bic_lsl(u_int rs1,u_int rs2,u_int shift,u_int rt) { assem_debug("bic %s,%s,%s lsl %s",regname[rt],regname[rs1],regname[rs2],regname[shift]); output_w32(0xe1C00000|rd_rn_rm(rt,rs1,rs2)|0x10|(shift<<8)); } static void emit_biceq_lsl(u_int rs1,u_int rs2,u_int shift,u_int rt) { assem_debug("biceq %s,%s,%s lsl %s",regname[rt],regname[rs1],regname[rs2],regname[shift]); output_w32(0x01C00000|rd_rn_rm(rt,rs1,rs2)|0x10|(shift<<8)); } static void emit_bicne_lsl(u_int rs1,u_int rs2,u_int shift,u_int rt) { assem_debug("bicne %s,%s,%s lsl %s",regname[rt],regname[rs1],regname[rs2],regname[shift]); output_w32(0x11C00000|rd_rn_rm(rt,rs1,rs2)|0x10|(shift<<8)); } static void emit_bic_lsr(u_int rs1,u_int rs2,u_int shift,u_int rt) { assem_debug("bic %s,%s,%s lsr %s",regname[rt],regname[rs1],regname[rs2],regname[shift]); output_w32(0xe1C00000|rd_rn_rm(rt,rs1,rs2)|0x30|(shift<<8)); } static void emit_biceq_lsr(u_int rs1,u_int rs2,u_int shift,u_int rt) { assem_debug("biceq %s,%s,%s lsr %s",regname[rt],regname[rs1],regname[rs2],regname[shift]); output_w32(0x01C00000|rd_rn_rm(rt,rs1,rs2)|0x30|(shift<<8)); } static void emit_bicne_lsr(u_int rs1,u_int rs2,u_int shift,u_int rt) { assem_debug("bicne %s,%s,%s lsr %s",regname[rt],regname[rs1],regname[rs2],regname[shift]); output_w32(0x11C00000|rd_rn_rm(rt,rs1,rs2)|0x30|(shift<<8)); } static void emit_teq(int rs, int rt) { assem_debug("teq %s,%s",regname[rs],regname[rt]); output_w32(0xe1300000|rd_rn_rm(0,rs,rt)); } static void emit_rsbimm(int rs, int imm, int rt) { u_int armval, ret; ret = genimm(imm,&armval); assert(ret); assem_debug("rsb %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0xe2600000|rd_rn_rm(rt,rs,0)|armval); } // Load 2 immediates optimizing for small code size static void emit_mov2imm_compact(int imm1,u_int rt1,int imm2,u_int rt2) { emit_movimm(imm1,rt1); u_int armval; if(genimm(imm2-imm1,&armval)) { assem_debug("add %s,%s,#%d",regname[rt2],regname[rt1],imm2-imm1); output_w32(0xe2800000|rd_rn_rm(rt2,rt1,0)|armval); }else if(genimm(imm1-imm2,&armval)) { assem_debug("sub %s,%s,#%d",regname[rt2],regname[rt1],imm1-imm2); output_w32(0xe2400000|rd_rn_rm(rt2,rt1,0)|armval); } else emit_movimm(imm2,rt2); } // Conditionally select one of two immediates, optimizing for small code size // This will only be called if HAVE_CMOV_IMM is defined static void emit_cmov2imm_e_ne_compact(int imm1,int imm2,u_int rt) { u_int armval; if(genimm(imm2-imm1,&armval)) { emit_movimm(imm1,rt); assem_debug("addne %s,%s,#%d",regname[rt],regname[rt],imm2-imm1); output_w32(0x12800000|rd_rn_rm(rt,rt,0)|armval); }else if(genimm(imm1-imm2,&armval)) { emit_movimm(imm1,rt); assem_debug("subne %s,%s,#%d",regname[rt],regname[rt],imm1-imm2); output_w32(0x12400000|rd_rn_rm(rt,rt,0)|armval); } else { #ifdef ARMv5_ONLY emit_movimm(imm1,rt); add_literal((int)out,imm2); assem_debug("ldrne %s,pc+? [=%x]",regname[rt],imm2); output_w32(0x15900000|rd_rn_rm(rt,15,0)); #else emit_movw(imm1&0x0000FFFF,rt); if((imm1&0xFFFF)!=(imm2&0xFFFF)) { assem_debug("movwne %s,#%d (0x%x)",regname[rt],imm2&0xFFFF,imm2&0xFFFF); output_w32(0x13000000|rd_rn_rm(rt,0,0)|(imm2&0xfff)|((imm2<<4)&0xf0000)); } emit_movt(imm1&0xFFFF0000,rt); if((imm1&0xFFFF0000)!=(imm2&0xFFFF0000)) { assem_debug("movtne %s,#%d (0x%x)",regname[rt],imm2&0xffff0000,imm2&0xffff0000); output_w32(0x13400000|rd_rn_rm(rt,0,0)|((imm2>>16)&0xfff)|((imm2>>12)&0xf0000)); } #endif } } #if !defined(HOST_IMM8) // special case for checking invalid_code static void emit_cmpmem_indexedsr12_imm(int addr,int r,int imm) { assert(0); } #endif // special case for checking invalid_code static void emit_cmpmem_indexedsr12_reg(int base,int r,int imm) { assert(imm<128&&imm>=0); assert(r>=0&&r<16); assem_debug("ldrb lr,%s,%s lsr #12",regname[base],regname[r]); output_w32(0xe7d00000|rd_rn_rm(HOST_TEMPREG,base,r)|0x620); emit_cmpimm(HOST_TEMPREG,imm); } // special case for tlb mapping static void emit_addsr12(int rs1,int rs2,int rt) { assem_debug("add %s,%s,%s lsr #12",regname[rt],regname[rs1],regname[rs2]); output_w32(0xe0800620|rd_rn_rm(rt,rs1,rs2)); } static void emit_callne(int a) { assem_debug("blne %x",a); u_int offset=genjmp(a); output_w32(0x1b000000|offset); } #ifdef IMM_PREFETCH // Used to preload hash table entries static void emit_prefetch(void *addr) { assem_debug("prefetch %x",(int)addr); output_byte(0x0F); output_byte(0x18); output_modrm(0,5,1); output_w32((int)addr); } #endif #ifdef REG_PREFETCH static void emit_prefetchreg(int r) { assem_debug("pld %s",regname[r]); output_w32(0xf5d0f000|rd_rn_rm(0,r,0)); } #endif // Special case for mini_ht static void emit_ldreq_indexed(int rs, u_int offset, int rt) { assert(offset<4096); assem_debug("ldreq %s,[%s, #%d]",regname[rt],regname[rs],offset); output_w32(0x05900000|rd_rn_rm(rt,rs,0)|offset); } static void emit_flds(int r,int sr) { assem_debug("flds s%d,[%s]",sr,regname[r]); output_w32(0xed900a00|((sr&14)<<11)|((sr&1)<<22)|(r<<16)); } static void emit_vldr(int r,int vr) { assem_debug("vldr d%d,[%s]",vr,regname[r]); output_w32(0xed900b00|(vr<<12)|(r<<16)); } static void emit_fsts(int sr,int r) { assem_debug("fsts s%d,[%s]",sr,regname[r]); output_w32(0xed800a00|((sr&14)<<11)|((sr&1)<<22)|(r<<16)); } static void emit_vstr(int vr,int r) { assem_debug("vstr d%d,[%s]",vr,regname[r]); output_w32(0xed800b00|(vr<<12)|(r<<16)); } static void emit_ftosizs(int s,int d) { assem_debug("ftosizs s%d,s%d",d,s); output_w32(0xeebd0ac0|((d&14)<<11)|((d&1)<<22)|((s&14)>>1)|((s&1)<<5)); } static void emit_ftosizd(int s,int d) { assem_debug("ftosizd s%d,d%d",d,s); output_w32(0xeebd0bc0|((d&14)<<11)|((d&1)<<22)|(s&7)); } static void emit_fsitos(int s,int d) { assem_debug("fsitos s%d,s%d",d,s); output_w32(0xeeb80ac0|((d&14)<<11)|((d&1)<<22)|((s&14)>>1)|((s&1)<<5)); } static void emit_fsitod(int s,int d) { assem_debug("fsitod d%d,s%d",d,s); output_w32(0xeeb80bc0|((d&7)<<12)|((s&14)>>1)|((s&1)<<5)); } static void emit_fcvtds(int s,int d) { assem_debug("fcvtds d%d,s%d",d,s); output_w32(0xeeb70ac0|((d&7)<<12)|((s&14)>>1)|((s&1)<<5)); } static void emit_fcvtsd(int s,int d) { assem_debug("fcvtsd s%d,d%d",d,s); output_w32(0xeeb70bc0|((d&14)<<11)|((d&1)<<22)|(s&7)); } static void emit_fsqrts(int s,int d) { assem_debug("fsqrts d%d,s%d",d,s); output_w32(0xeeb10ac0|((d&14)<<11)|((d&1)<<22)|((s&14)>>1)|((s&1)<<5)); } static void emit_fsqrtd(int s,int d) { assem_debug("fsqrtd s%d,d%d",d,s); output_w32(0xeeb10bc0|((d&7)<<12)|(s&7)); } static void emit_fabss(int s,int d) { assem_debug("fabss d%d,s%d",d,s); output_w32(0xeeb00ac0|((d&14)<<11)|((d&1)<<22)|((s&14)>>1)|((s&1)<<5)); } static void emit_fabsd(int s,int d) { assem_debug("fabsd s%d,d%d",d,s); output_w32(0xeeb00bc0|((d&7)<<12)|(s&7)); } static void emit_fnegs(int s,int d) { assem_debug("fnegs d%d,s%d",d,s); output_w32(0xeeb10a40|((d&14)<<11)|((d&1)<<22)|((s&14)>>1)|((s&1)<<5)); } static void emit_fnegd(int s,int d) { assem_debug("fnegd s%d,d%d",d,s); output_w32(0xeeb10b40|((d&7)<<12)|(s&7)); } static void emit_fadds(int s1,int s2,int d) { assem_debug("fadds s%d,s%d,s%d",d,s1,s2); output_w32(0xee300a00|((d&14)<<11)|((d&1)<<22)|((s1&14)<<15)|((s1&1)<<7)|((s2&14)>>1)|((s2&1)<<5)); } static void emit_faddd(int s1,int s2,int d) { assem_debug("faddd d%d,d%d,d%d",d,s1,s2); output_w32(0xee300b00|((d&7)<<12)|((s1&7)<<16)|(s2&7)); } static void emit_fsubs(int s1,int s2,int d) { assem_debug("fsubs s%d,s%d,s%d",d,s1,s2); output_w32(0xee300a40|((d&14)<<11)|((d&1)<<22)|((s1&14)<<15)|((s1&1)<<7)|((s2&14)>>1)|((s2&1)<<5)); } static void emit_fsubd(int s1,int s2,int d) { assem_debug("fsubd d%d,d%d,d%d",d,s1,s2); output_w32(0xee300b40|((d&7)<<12)|((s1&7)<<16)|(s2&7)); } static void emit_fmuls(int s1,int s2,int d) { assem_debug("fmuls s%d,s%d,s%d",d,s1,s2); output_w32(0xee200a00|((d&14)<<11)|((d&1)<<22)|((s1&14)<<15)|((s1&1)<<7)|((s2&14)>>1)|((s2&1)<<5)); } static void emit_fmuld(int s1,int s2,int d) { assem_debug("fmuld d%d,d%d,d%d",d,s1,s2); output_w32(0xee200b00|((d&7)<<12)|((s1&7)<<16)|(s2&7)); } static void emit_fdivs(int s1,int s2,int d) { assem_debug("fdivs s%d,s%d,s%d",d,s1,s2); output_w32(0xee800a00|((d&14)<<11)|((d&1)<<22)|((s1&14)<<15)|((s1&1)<<7)|((s2&14)>>1)|((s2&1)<<5)); } static void emit_fdivd(int s1,int s2,int d) { assem_debug("fdivd d%d,d%d,d%d",d,s1,s2); output_w32(0xee800b00|((d&7)<<12)|((s1&7)<<16)|(s2&7)); } static void emit_fcmps(int x,int y) { assem_debug("fcmps s14, s15"); output_w32(0xeeb47a67); } static void emit_fcmpd(int x,int y) { assem_debug("fcmpd d6, d7"); output_w32(0xeeb46b47); } static void emit_fmstat() { assem_debug("fmstat"); output_w32(0xeef1fa10); } static void emit_bicne_imm(int rs,int imm,int rt) { u_int armval, ret; ret = genimm(imm,&armval); assert(ret); assem_debug("bicne %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0x13c00000|rd_rn_rm(rt,rs,0)|armval); } static void emit_biccs_imm(int rs,int imm,int rt) { u_int armval, ret; ret = genimm(imm,&armval); assert(ret); assem_debug("biccs %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0x23c00000|rd_rn_rm(rt,rs,0)|armval); } static void emit_bicvc_imm(int rs,int imm,int rt) { u_int armval, ret; ret = genimm(imm,&armval); assert(ret); assem_debug("bicvc %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0x73c00000|rd_rn_rm(rt,rs,0)|armval); } static void emit_bichi_imm(int rs,int imm,int rt) { u_int armval, ret; ret = genimm(imm,&armval); assert(ret); assem_debug("bichi %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0x83c00000|rd_rn_rm(rt,rs,0)|armval); } static void emit_orrvs_imm(int rs,int imm,int rt) { u_int armval, ret; ret = genimm(imm,&armval); assert(ret); assem_debug("orrvs %s,%s,#%d",regname[rt],regname[rs],imm); output_w32(0x63800000|rd_rn_rm(rt,rs,0)|armval); } static void emit_jno_unlikely(int a) { //emit_jno(a); assem_debug("addvc pc,pc,#? (%x)",/*a-(int)out-8,*/a); output_w32(0x72800000|rd_rn_rm(15,15,0)); } // Save registers before function call static void save_regs(u_int reglist) { reglist&=0x100f; // only save the caller-save registers, r0-r3, r12 if(!reglist) return; assem_debug("stmia fp,{"); if(reglist&1) assem_debug("r0, "); if(reglist&2) assem_debug("r1, "); if(reglist&4) assem_debug("r2, "); if(reglist&8) assem_debug("r3, "); if(reglist&0x1000) assem_debug("r12"); assem_debug("}"); output_w32(0xe88b0000|reglist); } // Restore registers after function call static void restore_regs(u_int reglist) { reglist&=0x100f; // only restore the caller-save registers, r0-r3, r12 if(!reglist) return; assem_debug("ldmia fp,{"); if(reglist&1) assem_debug("r0, "); if(reglist&2) assem_debug("r1, "); if(reglist&4) assem_debug("r2, "); if(reglist&8) assem_debug("r3, "); if(reglist&0x1000) assem_debug("r12"); assem_debug("}"); output_w32(0xe89b0000|reglist); } // Write back consts using r14 so we don't disturb the other registers static void wb_consts(signed char i_regmap[],uint64_t i_is32,u_int i_dirty,int i) { int hr; for(hr=0;hr=0&&((i_dirty>>hr)&1)) { if(((regs[i].isconst>>hr)&1)&&i_regmap[hr]>0) { if(i_regmap[hr]<64 || !((i_is32>>(i_regmap[hr]&63))&1) ) { int value=constmap[i][hr]; if(value==0) { emit_zeroreg(HOST_TEMPREG); } else { emit_movimm(value,HOST_TEMPREG); } emit_storereg(i_regmap[hr],HOST_TEMPREG); if((i_is32>>i_regmap[hr])&1) { if(value!=-1&&value!=0) emit_sarimm(HOST_TEMPREG,31,HOST_TEMPREG); emit_storereg(i_regmap[hr]|64,HOST_TEMPREG); } } } } } } /* Stubs/epilogue */ static void literal_pool(int n) { if(!literalcount) return; if(n) { if((int)out-literals[0][0]<4096-n) return; } u_int *ptr; int i; for(i=0;i=0x7000000&&addr<0x7FFFFFF); //assert((target>=0x80000000&&target<0x80800000)||(target>0xA4000000&&target<0xA4001000)); //DEBUG > #ifdef DEBUG_CYCLE_COUNT emit_readword((int)&last_count,ECX); emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_readword((int)&next_interupt,ECX); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); emit_sub(HOST_CCREG,ECX,HOST_CCREG); emit_writeword(ECX,(int)&last_count); #endif //DEBUG < emit_jmp(linker); } static void emit_extjump(int addr, int target) { emit_extjump2(addr, target, (int)dyna_linker); } static void emit_extjump_ds(int addr, int target) { emit_extjump2(addr, target, (int)dyna_linker_ds); } static void do_readstub(int n) { assem_debug("do_readstub %x",start+stubs[n][3]*4); literal_pool(256); set_jump_target(stubs[n][1],(int)out); int type=stubs[n][0]; int i=stubs[n][3]; int rs=stubs[n][4]; struct regstat *i_regs=(struct regstat *)stubs[n][5]; u_int reglist=stubs[n][7]; signed char *i_regmap=i_regs->regmap; int addr=get_reg(i_regmap,AGEN1+(i&1)); int rth,rt; int ds; if(itype[i]==C1LS||itype[i]==LOADLR) { rth=get_reg(i_regmap,FTEMP|64); rt=get_reg(i_regmap,FTEMP); }else{ rth=get_reg(i_regmap,rt1[i]|64); rt=get_reg(i_regmap,rt1[i]); } assert(rs>=0); if(addr<0) addr=rt; if(addr<0&&itype[i]!=C1LS&&itype[i]!=LOADLR) addr=get_reg(i_regmap,-1); assert(addr>=0); int ftable=0; if(type==LOADB_STUB||type==LOADBU_STUB) ftable=(int)readmemb; if(type==LOADH_STUB||type==LOADHU_STUB) ftable=(int)readmemh; if(type==LOADW_STUB) ftable=(int)readmem; if(type==LOADD_STUB) ftable=(int)readmemd; emit_writeword(rs,(int)&address); //emit_pusha(); save_regs(reglist); ds=i_regs!=®s[i]; int real_rs=(itype[i]==LOADLR)?-1:get_reg(i_regmap,rs1[i]); u_int cmask=ds?-1:(0x100f|~i_regs->wasconst); if(!ds) load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty&~(1<regmap_entry,i_regs->was32,i_regs->wasdirty&cmask&~(1<>rs1[i])&1)<<1)+ds,3); //emit_readword((int)&last_count,temp); //emit_add(cc,temp,cc); //emit_writeword(cc,(int)&g_cp0_regs[CP0_COUNT_REG]); //emit_mov(15,14); emit_call((int)&indirect_jump_indexed); //emit_callreg(rs); //emit_readword_dualindexedx4(rs,HOST_TEMPREG,15); // We really shouldn't need to update the count here, // but not doing so causes random crashes... emit_readword((int)&g_cp0_regs[CP0_COUNT_REG],HOST_TEMPREG); emit_readword((int)&next_interupt,2); emit_addimm(HOST_TEMPREG,-2*stubs[n][6]-2,HOST_TEMPREG); emit_writeword(2,(int)&last_count); emit_sub(HOST_TEMPREG,2,cc<0?HOST_TEMPREG:cc); if(cc<0) { emit_storereg(CCREG,HOST_TEMPREG); } //emit_popa(); restore_regs(reglist); //if((cc=get_reg(regmap,CCREG))>=0) { // emit_loadreg(CCREG,cc); //} if(rt>=0) { if(type==LOADB_STUB) emit_movsbl((int)&readmem_dword,rt); if(type==LOADBU_STUB) emit_movzbl((int)&readmem_dword,rt); if(type==LOADH_STUB) emit_movswl((int)&readmem_dword,rt); if(type==LOADHU_STUB) emit_movzwl((int)&readmem_dword,rt); if(type==LOADW_STUB) emit_readword((int)&readmem_dword,rt); if(type==LOADD_STUB) { emit_readword((int)&readmem_dword,rt); if(rth>=0) emit_readword(((int)&readmem_dword)+4,rth); } } emit_jmp(stubs[n][2]); // return address } static void inline_readstub(int type, int i, u_int addr, signed char regmap[], int target, int adj, u_int reglist) { int rs=get_reg(regmap,target); int rth=get_reg(regmap,target|64); int rt=get_reg(regmap,target); if(rs<0) rs=get_reg(regmap,-1); assert(rs>=0); int ftable=0; if(type==LOADB_STUB||type==LOADBU_STUB) ftable=(int)readmemb; if(type==LOADH_STUB||type==LOADHU_STUB) ftable=(int)readmemh; if(type==LOADW_STUB) ftable=(int)readmem; if(type==LOADD_STUB) ftable=(int)readmemd; emit_writeword(rs,(int)&address); //emit_pusha(); save_regs(reglist); if((signed int)addr>=(signed int)0xC0000000) { // Theoretically we can have a pagefault here, if the TLB has never // been enabled and the address is outside the range 80000000..BFFFFFFF // Write out the registers so the pagefault can be handled. This is // a very rare case and likely represents a bug. int ds=regmap!=regs[i].regmap; if(!ds) load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty,i); if(!ds) wb_dirtys(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty); else wb_dirtys(branch_regs[i-1].regmap_entry,branch_regs[i-1].was32,branch_regs[i-1].wasdirty); } //emit_shrimm(rs,16,1); int cc=get_reg(regmap,CCREG); if(cc<0) { emit_loadreg(CCREG,2); } //emit_movimm(ftable,0); emit_movimm(((u_int *)ftable)[addr>>16],0); //emit_readword((int)&last_count,12); emit_addimm(cc<0?2:cc,CLOCK_DIVIDER*(adj+1),2); if((signed int)addr>=(signed int)0xC0000000) { // Pagefault address int ds=regmap!=regs[i].regmap; emit_movimm(start+i*4+(((regs[i].was32>>rs1[i])&1)<<1)+ds,3); } //emit_add(12,2,2); //emit_writeword(2,(int)&g_cp0_regs[CP0_COUNT_REG]); //emit_call(((u_int *)ftable)[addr>>16]); emit_call((int)&indirect_jump); // We really shouldn't need to update the count here, // but not doing so causes random crashes... emit_readword((int)&g_cp0_regs[CP0_COUNT_REG],HOST_TEMPREG); emit_readword((int)&next_interupt,2); emit_addimm(HOST_TEMPREG,-CLOCK_DIVIDER*(adj+1),HOST_TEMPREG); emit_writeword(2,(int)&last_count); emit_sub(HOST_TEMPREG,2,cc<0?HOST_TEMPREG:cc); if(cc<0) { emit_storereg(CCREG,HOST_TEMPREG); } //emit_popa(); restore_regs(reglist); if(rt>=0) { if(type==LOADB_STUB) emit_movsbl((int)&readmem_dword,rt); if(type==LOADBU_STUB) emit_movzbl((int)&readmem_dword,rt); if(type==LOADH_STUB) emit_movswl((int)&readmem_dword,rt); if(type==LOADHU_STUB) emit_movzwl((int)&readmem_dword,rt); if(type==LOADW_STUB) emit_readword((int)&readmem_dword,rt); if(type==LOADD_STUB) { emit_readword((int)&readmem_dword,rt); if(rth>=0) emit_readword(((int)&readmem_dword)+4,rth); } } } static void do_writestub(int n) { assem_debug("do_writestub %x",start+stubs[n][3]*4); literal_pool(256); set_jump_target(stubs[n][1],(int)out); int type=stubs[n][0]; int i=stubs[n][3]; int rs=stubs[n][4]; struct regstat *i_regs=(struct regstat *)stubs[n][5]; u_int reglist=stubs[n][7]; signed char *i_regmap=i_regs->regmap; int addr=get_reg(i_regmap,AGEN1+(i&1)); int rth,rt,r; int ds; if(itype[i]==C1LS) { rth=get_reg(i_regmap,FTEMP|64); rt=get_reg(i_regmap,r=FTEMP); }else{ rth=get_reg(i_regmap,rs2[i]|64); rt=get_reg(i_regmap,r=rs2[i]); } assert(rs>=0); assert(rt>=0); if(addr<0) addr=get_reg(i_regmap,-1); assert(addr>=0); int ftable=0; if(type==STOREB_STUB) ftable=(int)writememb; if(type==STOREH_STUB) ftable=(int)writememh; if(type==STOREW_STUB) ftable=(int)writemem; if(type==STORED_STUB) ftable=(int)writememd; emit_writeword(rs,(int)&address); //emit_shrimm(rs,16,rs); //emit_movmem_indexedx4(ftable,rs,rs); if(type==STOREB_STUB) emit_writebyte(rt,(int)&cpu_byte); if(type==STOREH_STUB) emit_writehword(rt,(int)&cpu_hword); if(type==STOREW_STUB) emit_writeword(rt,(int)&cpu_word); if(type==STORED_STUB) { emit_writeword(rt,(int)&cpu_dword); emit_writeword(r?rth:rt,(int)&cpu_dword+4); } //emit_pusha(); save_regs(reglist); ds=i_regs!=®s[i]; int real_rs=get_reg(i_regmap,rs1[i]); u_int cmask=ds?-1:(0x100f|~i_regs->wasconst); if(!ds) load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty&~(1<regmap_entry,i_regs->was32,i_regs->wasdirty&cmask&~(1<>rs1[i])&1)<<1)+ds,3); //emit_readword((int)&last_count,temp); //emit_addimm(cc,2*stubs[n][5]+2,cc); //emit_add(cc,temp,cc); //emit_writeword(cc,(int)&g_cp0_regs[CP0_COUNT_REG]); emit_call((int)&indirect_jump_indexed); //emit_callreg(rs); emit_readword((int)&g_cp0_regs[CP0_COUNT_REG],HOST_TEMPREG); emit_readword((int)&next_interupt,2); emit_addimm(HOST_TEMPREG,-2*stubs[n][6]-2,HOST_TEMPREG); emit_writeword(2,(int)&last_count); emit_sub(HOST_TEMPREG,2,cc<0?HOST_TEMPREG:cc); if(cc<0) { emit_storereg(CCREG,HOST_TEMPREG); } //emit_popa(); restore_regs(reglist); //if((cc=get_reg(regmap,CCREG))>=0) { // emit_loadreg(CCREG,cc); //} emit_jmp(stubs[n][2]); // return address } static void inline_writestub(int type, int i, u_int addr, signed char regmap[], int target, int adj, u_int reglist) { int rs=get_reg(regmap,-1); int rth=get_reg(regmap,target|64); int rt=get_reg(regmap,target); assert(rs>=0); assert(rt>=0); int ftable=0; if(type==STOREB_STUB) ftable=(int)writememb; if(type==STOREH_STUB) ftable=(int)writememh; if(type==STOREW_STUB) ftable=(int)writemem; if(type==STORED_STUB) ftable=(int)writememd; emit_writeword(rs,(int)&address); //emit_shrimm(rs,16,rs); //emit_movmem_indexedx4(ftable,rs,rs); if(type==STOREB_STUB) emit_writebyte(rt,(int)&cpu_byte); if(type==STOREH_STUB) emit_writehword(rt,(int)&cpu_hword); if(type==STOREW_STUB) emit_writeword(rt,(int)&cpu_word); if(type==STORED_STUB) { emit_writeword(rt,(int)&cpu_dword); emit_writeword(target?rth:rt,(int)&cpu_dword+4); } //emit_pusha(); save_regs(reglist); if((signed int)addr>=(signed int)0xC0000000) { // Theoretically we can have a pagefault here, if the TLB has never // been enabled and the address is outside the range 80000000..BFFFFFFF // Write out the registers so the pagefault can be handled. This is // a very rare case and likely represents a bug. int ds=regmap!=regs[i].regmap; if(!ds) load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty,i); if(!ds) wb_dirtys(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty); else wb_dirtys(branch_regs[i-1].regmap_entry,branch_regs[i-1].was32,branch_regs[i-1].wasdirty); } //emit_shrimm(rs,16,1); int cc=get_reg(regmap,CCREG); if(cc<0) { emit_loadreg(CCREG,2); } //emit_movimm(ftable,0); emit_movimm(((u_int *)ftable)[addr>>16],0); //emit_readword((int)&last_count,12); emit_addimm(cc<0?2:cc,CLOCK_DIVIDER*(adj+1),2); if((signed int)addr>=(signed int)0xC0000000) { // Pagefault address int ds=regmap!=regs[i].regmap; emit_movimm(start+i*4+(((regs[i].was32>>rs1[i])&1)<<1)+ds,3); } //emit_add(12,2,2); //emit_writeword(2,(int)&g_cp0_regs[CP0_COUNT_REG]); //emit_call(((u_int *)ftable)[addr>>16]); emit_call((int)&indirect_jump); emit_readword((int)&g_cp0_regs[CP0_COUNT_REG],HOST_TEMPREG); emit_readword((int)&next_interupt,2); emit_addimm(HOST_TEMPREG,-CLOCK_DIVIDER*(adj+1),HOST_TEMPREG); emit_writeword(2,(int)&last_count); emit_sub(HOST_TEMPREG,2,cc<0?HOST_TEMPREG:cc); if(cc<0) { emit_storereg(CCREG,HOST_TEMPREG); } //emit_popa(); restore_regs(reglist); } static void do_unalignedwritestub(int n) { set_jump_target(stubs[n][1],(int)out); output_w32(0xef000000); emit_jmp(stubs[n][2]); // return address } void printregs(int edi,int esi,int ebp,int esp,int b,int d,int c,int a) { DebugMessage(M64MSG_VERBOSE, "regs: %x %x %x %x %x %x %x (%x)",a,b,c,d,ebp,esi,edi,(&edi)[-1]); } static void do_invstub(int n) { literal_pool(20); u_int reglist=stubs[n][3]; set_jump_target(stubs[n][1],(int)out); save_regs(reglist); if(stubs[n][4]!=0) emit_mov(stubs[n][4],0); emit_call((int)&invalidate_addr); restore_regs(reglist); emit_jmp(stubs[n][2]); // return address } static int do_dirty_stub(int i) { assem_debug("do_dirty_stub %x",start+i*4); // Careful about the code output here, verify_dirty needs to parse it. #ifdef ARMv5_ONLY emit_loadlp((int)start<(int)0xC0000000?(int)source:(int)start,1); emit_loadlp((int)copy,2); emit_loadlp(slen*4,3); #else emit_movw(((int)start<(int)0xC0000000?(u_int)source:(u_int)start)&0x0000FFFF,1); emit_movw(((u_int)copy)&0x0000FFFF,2); emit_movt(((int)start<(int)0xC0000000?(u_int)source:(u_int)start)&0xFFFF0000,1); emit_movt(((u_int)copy)&0xFFFF0000,2); emit_movw(slen*4,3); #endif emit_movimm(start+i*4,0); emit_call((int)start<(int)0xC0000000?(int)&verify_code:(int)&verify_code_vm); int entry=(int)out; load_regs_entry(i); if(entry==(int)out) entry=instr_addr[i]; emit_jmp(instr_addr[i]); return entry; } static void do_dirty_stub_ds() { // Careful about the code output here, verify_dirty needs to parse it. #ifdef ARMv5_ONLY emit_loadlp((int)start<(int)0xC0000000?(int)source:(int)start,1); emit_loadlp((int)copy,2); emit_loadlp(slen*4,3); #else emit_movw(((int)start<(int)0xC0000000?(u_int)source:(u_int)start)&0x0000FFFF,1); emit_movw(((u_int)copy)&0x0000FFFF,2); emit_movt(((int)start<(int)0xC0000000?(u_int)source:(u_int)start)&0xFFFF0000,1); emit_movt(((u_int)copy)&0xFFFF0000,2); emit_movw(slen*4,3); #endif emit_movimm(start+1,0); emit_call((int)&verify_code_ds); } static void do_cop1stub(int n) { literal_pool(256); assem_debug("do_cop1stub %x",start+stubs[n][3]*4); set_jump_target(stubs[n][1],(int)out); int i=stubs[n][3]; int rs=stubs[n][4]; struct regstat *i_regs=(struct regstat *)stubs[n][5]; int ds=stubs[n][6]; if(!ds) { load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty,i); //if(i_regs!=®s[i]) DebugMessage(M64MSG_VERBOSE, "oops: regs[i]=%x i_regs=%x",(int)®s[i],(int)i_regs); } //else {DebugMessage(M64MSG_ERROR, "fp exception in delay slot");} wb_dirtys(i_regs->regmap_entry,i_regs->was32,i_regs->wasdirty); if(regs[i].regmap_entry[HOST_CCREG]!=CCREG) emit_loadreg(CCREG,HOST_CCREG); emit_movimm(start+(i-ds)*4,EAX); // Get PC emit_addimm(HOST_CCREG,CLOCK_DIVIDER*ccadj[i],HOST_CCREG); // CHECK: is this right? There should probably be an extra cycle... emit_jmp(ds?(int)fp_exception_ds:(int)fp_exception); } /* TLB */ static int do_tlb_r(int s,int ar,int map,int cache,int x,int a,int shift,int c,u_int addr) { if(c) { if((signed int)addr>=(signed int)0xC0000000) { // address_generation already loaded the const emit_readword_dualindexedx4(FP,map,map); } else return -1; // No mapping } else { assert(s!=map); if(cache>=0) { // Use cached offset to memory map emit_addsr12(cache,s,map); }else{ emit_movimm(((int)memory_map-(int)&dynarec_local)>>2,map); emit_addsr12(map,s,map); } // Schedule this while we wait on the load //if(x) emit_xorimm(s,x,ar); if(shift>=0) emit_shlimm(s,3,shift); if(~a) emit_andimm(s,a,ar); emit_readword_dualindexedx4(FP,map,map); } return map; } static int do_tlb_r_branch(int map, int c, u_int addr, int *jaddr) { if(!c||(signed int)addr>=(signed int)0xC0000000) { emit_test(map,map); *jaddr=(int)out; emit_js(0); } return map; } static void gen_tlb_addr_r(int ar, int map) { if(map>=0) { assem_debug("add %s,%s,%s lsl #2",regname[ar],regname[ar],regname[map]); output_w32(0xe0800100|rd_rn_rm(ar,ar,map)); } } static int do_tlb_w(int s,int ar,int map,int cache,int x,int c,u_int addr) { if(c) { if(addr<0x80800000||addr>=0xC0000000) { // address_generation already loaded the const emit_readword_dualindexedx4(FP,map,map); } else return -1; // No mapping } else { assert(s!=map); if(cache>=0) { // Use cached offset to memory map emit_addsr12(cache,s,map); }else{ emit_movimm(((int)memory_map-(int)&dynarec_local)>>2,map); emit_addsr12(map,s,map); } // Schedule this while we wait on the load //if(x) emit_xorimm(s,x,ar); emit_readword_dualindexedx4(FP,map,map); } return map; } static void do_tlb_w_branch(int map, int c, u_int addr, int *jaddr) { if(!c||addr<0x80800000||addr>=0xC0000000) { emit_testimm(map,0x40000000); *jaddr=(int)out; emit_jne(0); } } static void gen_tlb_addr_w(int ar, int map) { if(map>=0) { assem_debug("add %s,%s,%s lsl #2",regname[ar],regname[ar],regname[map]); output_w32(0xe0800100|rd_rn_rm(ar,ar,map)); } } // This reverses the above operation static void gen_orig_addr_w(int ar, int map) { if(map>=0) { assem_debug("sub %s,%s,%s lsl #2",regname[ar],regname[ar],regname[map]); output_w32(0xe0400100|rd_rn_rm(ar,ar,map)); } } // Generate the address of the memory_map entry, relative to dynarec_local static void generate_map_const(u_int addr,int reg) { //DebugMessage(M64MSG_VERBOSE, "generate_map_const(%x,%s)",addr,regname[reg]); emit_movimm((addr>>12)+(((u_int)memory_map-(u_int)&dynarec_local)>>2),reg); } /* Special assem */ static void shift_assemble_arm(int i,struct regstat *i_regs) { if(rt1[i]) { if(opcode2[i]<=0x07) // SLLV/SRLV/SRAV { signed char s,t,shift; t=get_reg(i_regs->regmap,rt1[i]); s=get_reg(i_regs->regmap,rs1[i]); shift=get_reg(i_regs->regmap,rs2[i]); if(t>=0){ if(rs1[i]==0) { emit_zeroreg(t); } else if(rs2[i]==0) { assert(s>=0); if(s!=t) emit_mov(s,t); } else { emit_andimm(shift,31,HOST_TEMPREG); if(opcode2[i]==4) // SLLV { emit_shl(s,HOST_TEMPREG,t); } if(opcode2[i]==6) // SRLV { emit_shr(s,HOST_TEMPREG,t); } if(opcode2[i]==7) // SRAV { emit_sar(s,HOST_TEMPREG,t); } } } } else { // DSLLV/DSRLV/DSRAV signed char sh,sl,th,tl,shift; th=get_reg(i_regs->regmap,rt1[i]|64); tl=get_reg(i_regs->regmap,rt1[i]); sh=get_reg(i_regs->regmap,rs1[i]|64); sl=get_reg(i_regs->regmap,rs1[i]); shift=get_reg(i_regs->regmap,rs2[i]); if(tl>=0){ if(rs1[i]==0) { emit_zeroreg(tl); if(th>=0) emit_zeroreg(th); } else if(rs2[i]==0) { assert(sl>=0); if(sl!=tl) emit_mov(sl,tl); if(th>=0&&sh!=th) emit_mov(sh,th); } else { // FIXME: What if shift==tl ? assert(shift!=tl); int temp=get_reg(i_regs->regmap,-1); int real_th=th; if(th<0&&opcode2[i]!=0x14) {th=temp;} // DSLLV doesn't need a temporary register assert(sl>=0); assert(sh>=0); emit_andimm(shift,31,HOST_TEMPREG); if(opcode2[i]==0x14) // DSLLV { if(th>=0) emit_shl(sh,HOST_TEMPREG,th); emit_rsbimm(HOST_TEMPREG,32,HOST_TEMPREG); emit_orrshr(sl,HOST_TEMPREG,th); emit_andimm(shift,31,HOST_TEMPREG); emit_testimm(shift,32); emit_shl(sl,HOST_TEMPREG,tl); if(th>=0) emit_cmovne_reg(tl,th); emit_cmovne_imm(0,tl); } if(opcode2[i]==0x16) // DSRLV { assert(th>=0); emit_shr(sl,HOST_TEMPREG,tl); emit_rsbimm(HOST_TEMPREG,32,HOST_TEMPREG); emit_orrshl(sh,HOST_TEMPREG,tl); emit_andimm(shift,31,HOST_TEMPREG); emit_testimm(shift,32); emit_shr(sh,HOST_TEMPREG,th); emit_cmovne_reg(th,tl); if(real_th>=0) emit_cmovne_imm(0,th); } if(opcode2[i]==0x17) // DSRAV { assert(th>=0); emit_shr(sl,HOST_TEMPREG,tl); emit_rsbimm(HOST_TEMPREG,32,HOST_TEMPREG); if(real_th>=0) { assert(temp>=0); emit_sarimm(th,31,temp); } emit_orrshl(sh,HOST_TEMPREG,tl); emit_andimm(shift,31,HOST_TEMPREG); emit_testimm(shift,32); emit_sar(sh,HOST_TEMPREG,th); emit_cmovne_reg(th,tl); if(real_th>=0) emit_cmovne_reg(temp,th); } } } } } } #define shift_assemble shift_assemble_arm static void loadlr_assemble_arm(int i,struct regstat *i_regs) { int s,th,tl,temp,temp2,addr,map=-1,cache=-1; int offset; int jaddr=0; int memtarget,c=0; u_int hr,reglist=0; th=get_reg(i_regs->regmap,rt1[i]|64); tl=get_reg(i_regs->regmap,rt1[i]); s=get_reg(i_regs->regmap,rs1[i]); temp=get_reg(i_regs->regmap,-1); temp2=get_reg(i_regs->regmap,FTEMP); addr=get_reg(i_regs->regmap,AGEN1+(i&1)); assert(addr<0); offset=imm[i]; for(hr=0;hrregmap[hr]>=0) reglist|=1<=0) { c=(i_regs->wasconst>>s)&1; memtarget=((signed int)(constmap[i][s]+offset))<(signed int)0x80800000; if(using_tlb&&((signed int)(constmap[i][s]+offset))>=(signed int)0xC0000000) memtarget=1; } if(!using_tlb) { if(!c) { #ifdef RAM_OFFSET map=get_reg(i_regs->regmap,ROREG); if(map<0) emit_loadreg(ROREG,map=HOST_TEMPREG); #endif emit_shlimm(addr,3,temp); if (opcode[i]==0x22||opcode[i]==0x26) { emit_andimm(addr,0xFFFFFFFC,temp2); // LWL/LWR }else{ emit_andimm(addr,0xFFFFFFF8,temp2); // LDL/LDR } emit_cmpimm(addr,0x800000); jaddr=(int)out; emit_jno(0); } else { if (opcode[i]==0x22||opcode[i]==0x26) { emit_movimm(((constmap[i][s]+offset)<<3)&24,temp); // LWL/LWR }else{ emit_movimm(((constmap[i][s]+offset)<<3)&56,temp); // LDL/LDR } } }else{ // using tlb int a; if(c) { a=-1; }else if (opcode[i]==0x22||opcode[i]==0x26) { a=0xFFFFFFFC; // LWL/LWR }else{ a=0xFFFFFFF8; // LDL/LDR } map=get_reg(i_regs->regmap,TLREG); cache=get_reg(i_regs->regmap,MMREG); // Get cached offset to memory_map assert(map>=0); reglist&=~(1<regmap,FTEMP,ccadj[i],reglist); if(rt1[i]) { assert(tl>=0); emit_andimm(temp,24,temp); if (opcode[i]==0x26) emit_xorimm(temp,24,temp); // LWR emit_movimm(-1,HOST_TEMPREG); if (opcode[i]==0x26) { emit_shr(temp2,temp,temp2); emit_bic_lsr(tl,HOST_TEMPREG,temp,tl); }else{ emit_shl(temp2,temp,temp2); emit_bic_lsl(tl,HOST_TEMPREG,temp,tl); } emit_or(temp2,tl,tl); } //emit_storereg(rt1[i],tl); // DEBUG } if (opcode[i]==0x1A||opcode[i]==0x1B) { // LDL/LDR int temp2h=get_reg(i_regs->regmap,FTEMP|64); if(!c||memtarget) { //if(th>=0) emit_readword_indexed((int)g_rdram-0x80000000,temp2,temp2h); //emit_readword_indexed((int)g_rdram-0x7FFFFFFC,temp2,temp2); emit_readdword_indexed_tlb(0,temp2,map,temp2h,temp2); if(jaddr) add_stub(LOADD_STUB,jaddr,(int)out,i,temp2,(int)i_regs,ccadj[i],reglist); } else inline_readstub(LOADD_STUB,i,(constmap[i][s]+offset)&0xFFFFFFF8,i_regs->regmap,FTEMP,ccadj[i],reglist); if(rt1[i]) { assert(th>=0); assert(tl>=0); emit_testimm(temp,32); emit_andimm(temp,24,temp); if (opcode[i]==0x1A) { // LDL emit_rsbimm(temp,32,HOST_TEMPREG); emit_shl(temp2h,temp,temp2h); emit_orrshr(temp2,HOST_TEMPREG,temp2h); emit_movimm(-1,HOST_TEMPREG); emit_shl(temp2,temp,temp2); emit_cmove_reg(temp2h,th); emit_biceq_lsl(tl,HOST_TEMPREG,temp,tl); emit_bicne_lsl(th,HOST_TEMPREG,temp,th); emit_orreq(temp2,tl,tl); emit_orrne(temp2,th,th); } if (opcode[i]==0x1B) { // LDR emit_xorimm(temp,24,temp); emit_rsbimm(temp,32,HOST_TEMPREG); emit_shr(temp2,temp,temp2); emit_orrshl(temp2h,HOST_TEMPREG,temp2); emit_movimm(-1,HOST_TEMPREG); emit_shr(temp2h,temp,temp2h); emit_cmovne_reg(temp2,tl); emit_bicne_lsr(th,HOST_TEMPREG,temp,th); emit_biceq_lsr(tl,HOST_TEMPREG,temp,tl); emit_orrne(temp2h,th,th); emit_orreq(temp2h,tl,tl); } } } } #define loadlr_assemble loadlr_assemble_arm static void cop0_assemble(int i,struct regstat *i_regs) { if(opcode2[i]==0) // MFC0 { if(rt1[i]) { signed char t=get_reg(i_regs->regmap,rt1[i]); char copr=(source[i]>>11)&0x1f; if(t>=0) { emit_addimm(FP,(int)&fake_pc-(int)&dynarec_local,0); emit_movimm((source[i]>>11)&0x1f,1); emit_writeword(0,(int)&PC); emit_writebyte(1,(int)&(fake_pc.f.r.nrd)); if(copr==9) { emit_readword((int)&last_count,ECX); emit_loadreg(CCREG,HOST_CCREG); // TODO: do proper reg alloc emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_addimm(HOST_CCREG,CLOCK_DIVIDER*ccadj[i],HOST_CCREG); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); } emit_call((int)cached_interpreter_table.MFC0); emit_readword((int)&readmem_dword,t); } } } else if(opcode2[i]==4) // MTC0 { signed char s=get_reg(i_regs->regmap,rs1[i]); char copr=(source[i]>>11)&0x1f; assert(s>=0); emit_writeword(s,(int)&readmem_dword); wb_register(rs1[i],i_regs->regmap,i_regs->dirty,i_regs->is32); emit_addimm(FP,(int)&fake_pc-(int)&dynarec_local,0); emit_movimm((source[i]>>11)&0x1f,1); emit_writeword(0,(int)&PC); emit_writebyte(1,(int)&(fake_pc.f.r.nrd)); if(copr==9||copr==11||copr==12) { emit_readword((int)&last_count,ECX); emit_loadreg(CCREG,HOST_CCREG); // TODO: do proper reg alloc emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_addimm(HOST_CCREG,CLOCK_DIVIDER*ccadj[i],HOST_CCREG); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); } // What a mess. The status register (12) can enable interrupts, // so needs a special case to handle a pending interrupt. // The interrupt must be taken immediately, because a subsequent // instruction might disable interrupts again. if(copr==12&&!is_delayslot) { emit_movimm(start+i*4+4,0); emit_movimm(0,1); emit_writeword(0,(int)&pcaddr); emit_writeword(1,(int)&pending_exception); } //else if(copr==12&&is_delayslot) emit_call((int)MTC0_R12); //else emit_call((int)cached_interpreter_table.MTC0); if(copr==9||copr==11||copr==12) { emit_readword((int)&g_cp0_regs[CP0_COUNT_REG],HOST_CCREG); emit_readword((int)&next_interupt,ECX); emit_addimm(HOST_CCREG,-CLOCK_DIVIDER*ccadj[i],HOST_CCREG); emit_sub(HOST_CCREG,ECX,HOST_CCREG); emit_writeword(ECX,(int)&last_count); emit_storereg(CCREG,HOST_CCREG); } if(copr==12) { assert(!is_delayslot); emit_readword((int)&pending_exception,14); } emit_loadreg(rs1[i],s); if(get_reg(i_regs->regmap,rs1[i]|64)>=0) emit_loadreg(rs1[i]|64,get_reg(i_regs->regmap,rs1[i]|64)); if(copr==12) { emit_test(14,14); emit_jne((int)&do_interrupt); } cop1_usable=0; } else { assert(opcode2[i]==0x10); if((source[i]&0x3f)==0x01) // TLBR emit_call((int)cached_interpreter_table.TLBR); if((source[i]&0x3f)==0x02) // TLBWI emit_call((int)TLBWI_new); if((source[i]&0x3f)==0x06) { // TLBWR // The TLB entry written by TLBWR is dependent on the count, // so update the cycle count emit_readword((int)&last_count,ECX); if(i_regs->regmap[HOST_CCREG]!=CCREG) emit_loadreg(CCREG,HOST_CCREG); emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_addimm(HOST_CCREG,CLOCK_DIVIDER*ccadj[i],HOST_CCREG); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); emit_call((int)TLBWR_new); } if((source[i]&0x3f)==0x08) // TLBP emit_call((int)cached_interpreter_table.TLBP); if((source[i]&0x3f)==0x18) // ERET { int count=ccadj[i]; if(i_regs->regmap[HOST_CCREG]!=CCREG) emit_loadreg(CCREG,HOST_CCREG); emit_addimm(HOST_CCREG,CLOCK_DIVIDER*count,HOST_CCREG); // TODO: Should there be an extra cycle here? emit_jmp((int)jump_eret); } } } static void cop1_assemble(int i,struct regstat *i_regs) { // Check cop1 unusable if(!cop1_usable) { signed char rs=get_reg(i_regs->regmap,CSREG); assert(rs>=0); emit_testimm(rs,0x20000000); int jaddr=(int)out; emit_jeq(0); add_stub(FP_STUB,jaddr,(int)out,i,rs,(int)i_regs,is_delayslot,0); cop1_usable=1; } if (opcode2[i]==0) { // MFC1 signed char tl=get_reg(i_regs->regmap,rt1[i]); if(tl>=0) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],tl); emit_readword_indexed(0,tl,tl); } } else if (opcode2[i]==1) { // DMFC1 signed char tl=get_reg(i_regs->regmap,rt1[i]); signed char th=get_reg(i_regs->regmap,rt1[i]|64); if(tl>=0) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],tl); if(th>=0) emit_readword_indexed(4,tl,th); emit_readword_indexed(0,tl,tl); } } else if (opcode2[i]==4) { // MTC1 signed char sl=get_reg(i_regs->regmap,rs1[i]); signed char temp=get_reg(i_regs->regmap,-1); emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_writeword_indexed(sl,0,temp); } else if (opcode2[i]==5) { // DMTC1 signed char sl=get_reg(i_regs->regmap,rs1[i]); signed char sh=rs1[i]>0?get_reg(i_regs->regmap,rs1[i]|64):sl; signed char temp=get_reg(i_regs->regmap,-1); emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_writeword_indexed(sh,4,temp); emit_writeword_indexed(sl,0,temp); } else if (opcode2[i]==2) // CFC1 { signed char tl=get_reg(i_regs->regmap,rt1[i]); if(tl>=0) { u_int copr=(source[i]>>11)&0x1f; if(copr==0) emit_readword((int)&FCR0,tl); if(copr==31) emit_readword((int)&FCR31,tl); } } else if (opcode2[i]==6) // CTC1 { signed char sl=get_reg(i_regs->regmap,rs1[i]); u_int copr=(source[i]>>11)&0x1f; assert(sl>=0); if(copr==31) { emit_writeword(sl,(int)&FCR31); // Set the rounding mode //FIXME //char temp=get_reg(i_regs->regmap,-1); //emit_andimm(sl,3,temp); //emit_fldcw_indexed((int)&rounding_modes,temp); } } } static void fconv_assemble_arm(int i,struct regstat *i_regs) { signed char temp=get_reg(i_regs->regmap,-1); assert(temp>=0); // Check cop1 unusable if(!cop1_usable) { signed char rs=get_reg(i_regs->regmap,CSREG); assert(rs>=0); emit_testimm(rs,0x20000000); int jaddr=(int)out; emit_jeq(0); add_stub(FP_STUB,jaddr,(int)out,i,rs,(int)i_regs,is_delayslot,0); cop1_usable=1; } #if (defined(__VFP_FP__) && !defined(__SOFTFP__)) if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0d) { // trunc_w_s emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_flds(temp,15); emit_ftosizs(15,15); // float->int, truncate if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); emit_fsts(15,temp); return; } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0d) { // trunc_w_d emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_vldr(temp,7); emit_ftosizd(7,13); // double->int, truncate emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); emit_fsts(13,temp); return; } if(opcode2[i]==0x14&&(source[i]&0x3f)==0x20) { // cvt_s_w emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_flds(temp,13); if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); emit_fsitos(13,15); emit_fsts(15,temp); return; } if(opcode2[i]==0x14&&(source[i]&0x3f)==0x21) { // cvt_d_w emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_flds(temp,13); emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],temp); emit_fsitod(13,7); emit_vstr(7,temp); return; } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x21) { // cvt_d_s emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_flds(temp,13); emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],temp); emit_fcvtds(13,7); emit_vstr(7,temp); return; } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x20) { // cvt_s_d emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_vldr(temp,7); emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); emit_fcvtsd(7,13); emit_fsts(13,temp); return; } #endif // C emulation code u_int hr,reglist=0; for(hr=0;hrregmap[hr]>=0) reglist|=1<>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)cvt_s_w); } if(opcode2[i]==0x14&&(source[i]&0x3f)==0x21) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)cvt_d_w); } if(opcode2[i]==0x15&&(source[i]&0x3f)==0x20) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)cvt_s_l); } if(opcode2[i]==0x15&&(source[i]&0x3f)==0x21) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)cvt_d_l); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x21) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)cvt_d_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x24) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)cvt_w_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x25) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)cvt_l_s); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x20) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)cvt_s_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x24) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)cvt_w_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x25) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)cvt_l_d); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x08) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)round_l_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x09) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)trunc_l_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0a) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)ceil_l_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0b) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)floor_l_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0c) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)round_w_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0d) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)trunc_w_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0e) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)ceil_w_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0f) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)floor_w_s); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x08) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)round_l_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x09) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)trunc_l_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0a) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)ceil_l_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0b) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)floor_l_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0c) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)round_w_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0d) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)trunc_w_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0e) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)ceil_w_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0f) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); emit_call((int)floor_w_d); } restore_regs(reglist); } #define fconv_assemble fconv_assemble_arm static void fcomp_assemble(int i,struct regstat *i_regs) { signed char fs=get_reg(i_regs->regmap,FSREG); signed char temp=get_reg(i_regs->regmap,-1); assert(temp>=0); // Check cop1 unusable if(!cop1_usable) { signed char cs=get_reg(i_regs->regmap,CSREG); assert(cs>=0); emit_testimm(cs,0x20000000); int jaddr=(int)out; emit_jeq(0); add_stub(FP_STUB,jaddr,(int)out,i,cs,(int)i_regs,is_delayslot,0); cop1_usable=1; } if((source[i]&0x3f)==0x30) { emit_andimm(fs,~0x800000,fs); return; } if((source[i]&0x3e)==0x38) { // sf/ngle - these should throw exceptions for NaNs emit_andimm(fs,~0x800000,fs); return; } #if (defined(__VFP_FP__) && !defined(__SOFTFP__)) if(opcode2[i]==0x10) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_readword((int)®_cop1_simple[(source[i]>>16)&0x1f],HOST_TEMPREG); emit_orimm(fs,0x800000,fs); emit_flds(temp,14); emit_flds(HOST_TEMPREG,15); emit_fcmps(14,15); emit_fmstat(); if((source[i]&0x3f)==0x31) emit_bicvc_imm(fs,0x800000,fs); // c_un_s if((source[i]&0x3f)==0x32) emit_bicne_imm(fs,0x800000,fs); // c_eq_s if((source[i]&0x3f)==0x33) {emit_bicne_imm(fs,0x800000,fs);emit_orrvs_imm(fs,0x800000,fs);} // c_ueq_s if((source[i]&0x3f)==0x34) emit_biccs_imm(fs,0x800000,fs); // c_olt_s if((source[i]&0x3f)==0x35) {emit_biccs_imm(fs,0x800000,fs);emit_orrvs_imm(fs,0x800000,fs);} // c_ult_s if((source[i]&0x3f)==0x36) emit_bichi_imm(fs,0x800000,fs); // c_ole_s if((source[i]&0x3f)==0x37) {emit_bichi_imm(fs,0x800000,fs);emit_orrvs_imm(fs,0x800000,fs);} // c_ule_s if((source[i]&0x3f)==0x3a) emit_bicne_imm(fs,0x800000,fs); // c_seq_s if((source[i]&0x3f)==0x3b) emit_bicne_imm(fs,0x800000,fs); // c_ngl_s if((source[i]&0x3f)==0x3c) emit_biccs_imm(fs,0x800000,fs); // c_lt_s if((source[i]&0x3f)==0x3d) emit_biccs_imm(fs,0x800000,fs); // c_nge_s if((source[i]&0x3f)==0x3e) emit_bichi_imm(fs,0x800000,fs); // c_le_s if((source[i]&0x3f)==0x3f) emit_bichi_imm(fs,0x800000,fs); // c_ngt_s return; } if(opcode2[i]==0x11) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_readword((int)®_cop1_double[(source[i]>>16)&0x1f],HOST_TEMPREG); emit_orimm(fs,0x800000,fs); emit_vldr(temp,6); emit_vldr(HOST_TEMPREG,7); emit_fcmpd(6,7); emit_fmstat(); if((source[i]&0x3f)==0x31) emit_bicvc_imm(fs,0x800000,fs); // c_un_d if((source[i]&0x3f)==0x32) emit_bicne_imm(fs,0x800000,fs); // c_eq_d if((source[i]&0x3f)==0x33) {emit_bicne_imm(fs,0x800000,fs);emit_orrvs_imm(fs,0x800000,fs);} // c_ueq_d if((source[i]&0x3f)==0x34) emit_biccs_imm(fs,0x800000,fs); // c_olt_d if((source[i]&0x3f)==0x35) {emit_biccs_imm(fs,0x800000,fs);emit_orrvs_imm(fs,0x800000,fs);} // c_ult_d if((source[i]&0x3f)==0x36) emit_bichi_imm(fs,0x800000,fs); // c_ole_d if((source[i]&0x3f)==0x37) {emit_bichi_imm(fs,0x800000,fs);emit_orrvs_imm(fs,0x800000,fs);} // c_ule_d if((source[i]&0x3f)==0x3a) emit_bicne_imm(fs,0x800000,fs); // c_seq_d if((source[i]&0x3f)==0x3b) emit_bicne_imm(fs,0x800000,fs); // c_ngl_d if((source[i]&0x3f)==0x3c) emit_biccs_imm(fs,0x800000,fs); // c_lt_d if((source[i]&0x3f)==0x3d) emit_biccs_imm(fs,0x800000,fs); // c_nge_d if((source[i]&0x3f)==0x3e) emit_bichi_imm(fs,0x800000,fs); // c_le_d if((source[i]&0x3f)==0x3f) emit_bichi_imm(fs,0x800000,fs); // c_ngt_d return; } #endif // C only u_int hr,reglist=0; for(hr=0;hrregmap[hr]>=0) reglist|=1<>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_simple[(source[i]>>16)&0x1f],ARG2_REG); if((source[i]&0x3f)==0x30) emit_call((int)c_f_s); if((source[i]&0x3f)==0x31) emit_call((int)c_un_s); if((source[i]&0x3f)==0x32) emit_call((int)c_eq_s); if((source[i]&0x3f)==0x33) emit_call((int)c_ueq_s); if((source[i]&0x3f)==0x34) emit_call((int)c_olt_s); if((source[i]&0x3f)==0x35) emit_call((int)c_ult_s); if((source[i]&0x3f)==0x36) emit_call((int)c_ole_s); if((source[i]&0x3f)==0x37) emit_call((int)c_ule_s); if((source[i]&0x3f)==0x38) emit_call((int)c_sf_s); if((source[i]&0x3f)==0x39) emit_call((int)c_ngle_s); if((source[i]&0x3f)==0x3a) emit_call((int)c_seq_s); if((source[i]&0x3f)==0x3b) emit_call((int)c_ngl_s); if((source[i]&0x3f)==0x3c) emit_call((int)c_lt_s); if((source[i]&0x3f)==0x3d) emit_call((int)c_nge_s); if((source[i]&0x3f)==0x3e) emit_call((int)c_le_s); if((source[i]&0x3f)==0x3f) emit_call((int)c_ngt_s); } if(opcode2[i]==0x11) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); emit_readword((int)®_cop1_double[(source[i]>>16)&0x1f],ARG2_REG); if((source[i]&0x3f)==0x30) emit_call((int)c_f_d); if((source[i]&0x3f)==0x31) emit_call((int)c_un_d); if((source[i]&0x3f)==0x32) emit_call((int)c_eq_d); if((source[i]&0x3f)==0x33) emit_call((int)c_ueq_d); if((source[i]&0x3f)==0x34) emit_call((int)c_olt_d); if((source[i]&0x3f)==0x35) emit_call((int)c_ult_d); if((source[i]&0x3f)==0x36) emit_call((int)c_ole_d); if((source[i]&0x3f)==0x37) emit_call((int)c_ule_d); if((source[i]&0x3f)==0x38) emit_call((int)c_sf_d); if((source[i]&0x3f)==0x39) emit_call((int)c_ngle_d); if((source[i]&0x3f)==0x3a) emit_call((int)c_seq_d); if((source[i]&0x3f)==0x3b) emit_call((int)c_ngl_d); if((source[i]&0x3f)==0x3c) emit_call((int)c_lt_d); if((source[i]&0x3f)==0x3d) emit_call((int)c_nge_d); if((source[i]&0x3f)==0x3e) emit_call((int)c_le_d); if((source[i]&0x3f)==0x3f) emit_call((int)c_ngt_d); } restore_regs(reglist); emit_loadreg(FSREG,fs); } static void float_assemble(int i,struct regstat *i_regs) { signed char temp=get_reg(i_regs->regmap,-1); assert(temp>=0); // Check cop1 unusable if(!cop1_usable) { signed char cs=get_reg(i_regs->regmap,CSREG); assert(cs>=0); emit_testimm(cs,0x20000000); int jaddr=(int)out; emit_jeq(0); add_stub(FP_STUB,jaddr,(int)out,i,cs,(int)i_regs,is_delayslot,0); cop1_usable=1; } #if (defined(__VFP_FP__) && !defined(__SOFTFP__)) if((source[i]&0x3f)==6) // mov { if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) { if(opcode2[i]==0x10) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],HOST_TEMPREG); emit_readword_indexed(0,temp,temp); emit_writeword_indexed(temp,0,HOST_TEMPREG); } if(opcode2[i]==0x11) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],HOST_TEMPREG); emit_vldr(temp,7); emit_vstr(7,HOST_TEMPREG); } } return; } if((source[i]&0x3f)>3) { if(opcode2[i]==0x10) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_flds(temp,15); if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) { emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); } if((source[i]&0x3f)==4) // sqrt emit_fsqrts(15,15); if((source[i]&0x3f)==5) // abs emit_fabss(15,15); if((source[i]&0x3f)==7) // neg emit_fnegs(15,15); emit_fsts(15,temp); } if(opcode2[i]==0x11) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_vldr(temp,7); if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) { emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],temp); } if((source[i]&0x3f)==4) // sqrt emit_fsqrtd(7,7); if((source[i]&0x3f)==5) // abs emit_fabsd(7,7); if((source[i]&0x3f)==7) // neg emit_fnegd(7,7); emit_vstr(7,temp); } return; } if((source[i]&0x3f)<4) { if(opcode2[i]==0x10) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); } if(opcode2[i]==0x11) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); } if(((source[i]>>11)&0x1f)!=((source[i]>>16)&0x1f)) { if(opcode2[i]==0x10) { emit_readword((int)®_cop1_simple[(source[i]>>16)&0x1f],HOST_TEMPREG); emit_flds(temp,15); emit_flds(HOST_TEMPREG,13); if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) { if(((source[i]>>16)&0x1f)!=((source[i]>>6)&0x1f)) { emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); } } if((source[i]&0x3f)==0) emit_fadds(15,13,15); if((source[i]&0x3f)==1) emit_fsubs(15,13,15); if((source[i]&0x3f)==2) emit_fmuls(15,13,15); if((source[i]&0x3f)==3) emit_fdivs(15,13,15); if(((source[i]>>16)&0x1f)==((source[i]>>6)&0x1f)) { emit_fsts(15,HOST_TEMPREG); }else{ emit_fsts(15,temp); } } else if(opcode2[i]==0x11) { emit_readword((int)®_cop1_double[(source[i]>>16)&0x1f],HOST_TEMPREG); emit_vldr(temp,7); emit_vldr(HOST_TEMPREG,6); if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) { if(((source[i]>>16)&0x1f)!=((source[i]>>6)&0x1f)) { emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],temp); } } if((source[i]&0x3f)==0) emit_faddd(7,6,7); if((source[i]&0x3f)==1) emit_fsubd(7,6,7); if((source[i]&0x3f)==2) emit_fmuld(7,6,7); if((source[i]&0x3f)==3) emit_fdivd(7,6,7); if(((source[i]>>16)&0x1f)==((source[i]>>6)&0x1f)) { emit_vstr(7,HOST_TEMPREG); }else{ emit_vstr(7,temp); } } } else { if(opcode2[i]==0x10) { emit_flds(temp,15); if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) { emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); } if((source[i]&0x3f)==0) emit_fadds(15,15,15); if((source[i]&0x3f)==1) emit_fsubs(15,15,15); if((source[i]&0x3f)==2) emit_fmuls(15,15,15); if((source[i]&0x3f)==3) emit_fdivs(15,15,15); emit_fsts(15,temp); } else if(opcode2[i]==0x11) { emit_vldr(temp,7); if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) { emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],temp); } if((source[i]&0x3f)==0) emit_faddd(7,7,7); if((source[i]&0x3f)==1) emit_fsubd(7,7,7); if((source[i]&0x3f)==2) emit_fmuld(7,7,7); if((source[i]&0x3f)==3) emit_fdivd(7,7,7); emit_vstr(7,temp); } } return; } #endif u_int hr,reglist=0; for(hr=0;hrregmap[hr]>=0) reglist|=1<>11)&0x1f],ARG1_REG); if((source[i]&0x3f)<4) { emit_readword((int)®_cop1_simple[(source[i]>>16)&0x1f],ARG2_REG); emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG3_REG); }else{ emit_readword((int)®_cop1_simple[(source[i]>> 6)&0x1f],ARG2_REG); } switch(source[i]&0x3f) { case 0x00: emit_call((int)add_s);break; case 0x01: emit_call((int)sub_s);break; case 0x02: emit_call((int)mul_s);break; case 0x03: emit_call((int)div_s);break; case 0x04: emit_call((int)sqrt_s);break; case 0x05: emit_call((int)abs_s);break; case 0x06: emit_call((int)mov_s);break; case 0x07: emit_call((int)neg_s);break; } restore_regs(reglist); } if(opcode2[i]==0x11) { // Double precision save_regs(reglist); emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],ARG1_REG); if((source[i]&0x3f)<4) { emit_readword((int)®_cop1_double[(source[i]>>16)&0x1f],ARG2_REG); emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG3_REG); }else{ emit_readword((int)®_cop1_double[(source[i]>> 6)&0x1f],ARG2_REG); } switch(source[i]&0x3f) { case 0x00: emit_call((int)add_d);break; case 0x01: emit_call((int)sub_d);break; case 0x02: emit_call((int)mul_d);break; case 0x03: emit_call((int)div_d);break; case 0x04: emit_call((int)sqrt_d);break; case 0x05: emit_call((int)abs_d);break; case 0x06: emit_call((int)mov_d);break; case 0x07: emit_call((int)neg_d);break; } restore_regs(reglist); } } static void multdiv_assemble_arm(int i,struct regstat *i_regs) { // case 0x18: MULT // case 0x19: MULTU // case 0x1A: DIV // case 0x1B: DIVU // case 0x1C: DMULT // case 0x1D: DMULTU // case 0x1E: DDIV // case 0x1F: DDIVU if(rs1[i]&&rs2[i]) { if((opcode2[i]&4)==0) // 32-bit { if(opcode2[i]==0x18) // MULT { signed char m1=get_reg(i_regs->regmap,rs1[i]); signed char m2=get_reg(i_regs->regmap,rs2[i]); signed char hi=get_reg(i_regs->regmap,HIREG); signed char lo=get_reg(i_regs->regmap,LOREG); assert(m1>=0); assert(m2>=0); assert(hi>=0); assert(lo>=0); emit_smull(m1,m2,hi,lo); } if(opcode2[i]==0x19) // MULTU { signed char m1=get_reg(i_regs->regmap,rs1[i]); signed char m2=get_reg(i_regs->regmap,rs2[i]); signed char hi=get_reg(i_regs->regmap,HIREG); signed char lo=get_reg(i_regs->regmap,LOREG); assert(m1>=0); assert(m2>=0); assert(hi>=0); assert(lo>=0); emit_umull(m1,m2,hi,lo); } if(opcode2[i]==0x1A) // DIV { signed char d1=get_reg(i_regs->regmap,rs1[i]); // dividend signed char d2=get_reg(i_regs->regmap,rs2[i]); // divisor assert(d1>=0); assert(d2>=0); signed char quotient=get_reg(i_regs->regmap,LOREG); signed char remainder=get_reg(i_regs->regmap,HIREG); assert(quotient>=0); assert(remainder>=0); if(arm_cpu_features.IDIVa) { emit_test(d2,d2); emit_jeq((int)out+16); // Division by zero emit_sdiv(d1,d2,quotient); emit_mul(quotient,d2,remainder); emit_sub(d1,remainder,remainder); } else { emit_movs(d1,remainder); emit_negmi(remainder,remainder); emit_movs(d2,HOST_TEMPREG); emit_jeq((int)out+52); // Division by zero emit_negmi(HOST_TEMPREG,HOST_TEMPREG); emit_clz(HOST_TEMPREG,quotient); emit_shl(HOST_TEMPREG,quotient,HOST_TEMPREG); emit_orimm(quotient,1<<31,quotient); emit_shr(quotient,quotient,quotient); emit_cmp(remainder,HOST_TEMPREG); emit_subcs(remainder,HOST_TEMPREG,remainder); emit_adcs(quotient,quotient,quotient); emit_shrimm(HOST_TEMPREG,1,HOST_TEMPREG); emit_jcc((int)out-16); // -4 emit_teq(d1,d2); emit_negmi(quotient,quotient); emit_test(d1,d1); emit_negmi(remainder,remainder); } } if(opcode2[i]==0x1B) // DIVU { signed char d1=get_reg(i_regs->regmap,rs1[i]); // dividend signed char d2=get_reg(i_regs->regmap,rs2[i]); // divisor assert(d1>=0); assert(d2>=0); signed char quotient=get_reg(i_regs->regmap,LOREG); signed char remainder=get_reg(i_regs->regmap,HIREG); assert(quotient>=0); assert(remainder>=0); emit_test(d2,d2); if(arm_cpu_features.IDIVa) { emit_jeq((int)out+16); // Division by zero emit_udiv(d1,d2,quotient); emit_mul(quotient,d2,remainder); emit_sub(d1,remainder,remainder); } else { emit_jeq((int)out+44); // Division by zero emit_clz(d2,HOST_TEMPREG); emit_movimm(1<<31,quotient); emit_shl(d2,HOST_TEMPREG,d2); emit_mov(d1,remainder); emit_shr(quotient,HOST_TEMPREG,quotient); emit_cmp(remainder,d2); emit_subcs(remainder,d2,remainder); emit_adcs(quotient,quotient,quotient); emit_shrcc_imm(d2,1,d2); emit_jcc((int)out-16); // -4 } } } else // 64-bit { if(opcode2[i]==0x1C) // DMULT { signed char m1h=get_reg(i_regs->regmap,rs1[i]|64); signed char m1l=get_reg(i_regs->regmap,rs1[i]); signed char m2h=get_reg(i_regs->regmap,rs2[i]|64); signed char m2l=get_reg(i_regs->regmap,rs2[i]); assert(m1h>=0); assert(m2h>=0); assert(m1l>=0); assert(m2l>=0); signed char rh=get_reg(i_regs->regmap,HIREG|64); signed char rl=get_reg(i_regs->regmap,HIREG); assert(rh>=0); assert(rl>=0); emit_umull(m1l,m2l,rh,rl); emit_storereg(LOREG,rl); emit_mov(rh,rl); emit_zeroreg(rh); emit_smlal(m1l,m2h,rh,rl); emit_mov(rh,HOST_TEMPREG); emit_testimm(m1l,0x80000000); emit_addne(HOST_TEMPREG,m2h,HOST_TEMPREG); emit_zeroreg(rh); emit_smlal(m1h,m2l,rh,rl); emit_testimm(m2l,0x80000000); emit_addne(rh,m1h,rh); emit_storereg(LOREG|64,rl); emit_sarimm(HOST_TEMPREG,31,rl); emit_adds(HOST_TEMPREG,rh,HOST_TEMPREG); emit_addsarimm(rl,rh,rh,31); emit_mov(HOST_TEMPREG,rl); emit_smlal(m1h,m2h,rh,rl); } if(opcode2[i]==0x1D) // DMULTU { signed char m1h=get_reg(i_regs->regmap,rs1[i]|64); signed char m1l=get_reg(i_regs->regmap,rs1[i]); signed char m2h=get_reg(i_regs->regmap,rs2[i]|64); signed char m2l=get_reg(i_regs->regmap,rs2[i]); assert(m1h>=0); assert(m2h>=0); assert(m1l>=0); assert(m2l>=0); signed char rh=get_reg(i_regs->regmap,HIREG|64); signed char rl=get_reg(i_regs->regmap,HIREG); assert(rh>=0); assert(rl>=0); emit_umull(m1l,m2l,rh,rl); emit_storereg(LOREG,rl); emit_mov(rh,rl); emit_zeroreg(rh); emit_umlal(m1l,m2h,rh,rl); emit_mov(rh,HOST_TEMPREG); emit_zeroreg(rh); emit_umlal(m1h,m2l,rh,rl); emit_storereg(LOREG|64,rl); emit_zeroreg(rl); emit_adds(HOST_TEMPREG,rh,HOST_TEMPREG); emit_adcimm(rl,0,rh); emit_mov(HOST_TEMPREG,rl); emit_umlal(m1h,m2h,rh,rl); } if(opcode2[i]==0x1E) // DDIV { signed char d1h=get_reg(i_regs->regmap,rs1[i]|64); signed char d1l=get_reg(i_regs->regmap,rs1[i]); signed char d2h=get_reg(i_regs->regmap,rs2[i]|64); signed char d2l=get_reg(i_regs->regmap,rs2[i]); assert(d1h>=0); assert(d2h>=0); assert(d1l>=0); assert(d2l>=0); save_regs(0x100f); if(d1l!=0) emit_mov(d1l,0); if(d1h==0) emit_readword((int)&dynarec_local,1); else if(d1h>1) emit_mov(d1h,1); if(d2l<2) emit_readword((int)&dynarec_local+d2l*4,2); else if(d2l>2) emit_mov(d2l,2); if(d2h<3) emit_readword((int)&dynarec_local+d2h*4,3); else if(d2h>3) emit_mov(d2h,3); emit_call((int)&div64); restore_regs(0x100f); signed char hih=get_reg(i_regs->regmap,HIREG|64); signed char hil=get_reg(i_regs->regmap,HIREG); signed char loh=get_reg(i_regs->regmap,LOREG|64); signed char lol=get_reg(i_regs->regmap,LOREG); if(hih>=0) emit_loadreg(HIREG|64,hih); if(hil>=0) emit_loadreg(HIREG,hil); if(loh>=0) emit_loadreg(LOREG|64,loh); if(lol>=0) emit_loadreg(LOREG,lol); } if(opcode2[i]==0x1F) // DDIVU { //u_int hr,reglist=0; //for(hr=0;hrregmap[hr]>=0 && (i_regs->regmap[hr]&62)!=HIREG) reglist|=1<regmap,rs1[i]|64); signed char d1l=get_reg(i_regs->regmap,rs1[i]); signed char d2h=get_reg(i_regs->regmap,rs2[i]|64); signed char d2l=get_reg(i_regs->regmap,rs2[i]); assert(d1h>=0); assert(d2h>=0); assert(d1l>=0); assert(d2l>=0); save_regs(0x100f); if(d1l!=0) emit_mov(d1l,0); if(d1h==0) emit_readword((int)&dynarec_local,1); else if(d1h>1) emit_mov(d1h,1); if(d2l<2) emit_readword((int)&dynarec_local+d2l*4,2); else if(d2l>2) emit_mov(d2l,2); if(d2h<3) emit_readword((int)&dynarec_local+d2h*4,3); else if(d2h>3) emit_mov(d2h,3); emit_call((int)&divu64); restore_regs(0x100f); signed char hih=get_reg(i_regs->regmap,HIREG|64); signed char hil=get_reg(i_regs->regmap,HIREG); signed char loh=get_reg(i_regs->regmap,LOREG|64); signed char lol=get_reg(i_regs->regmap,LOREG); if(hih>=0) emit_loadreg(HIREG|64,hih); if(hil>=0) emit_loadreg(HIREG,hil); if(loh>=0) emit_loadreg(LOREG|64,loh); if(lol>=0) emit_loadreg(LOREG,lol); } } } else { // Multiply by zero is zero. // MIPS does not have a divide by zero exception. // The result is undefined, we return zero. signed char hr=get_reg(i_regs->regmap,HIREG); signed char lr=get_reg(i_regs->regmap,LOREG); if(hr>=0) emit_zeroreg(hr); if(lr>=0) emit_zeroreg(lr); } } #define multdiv_assemble multdiv_assemble_arm static void do_preload_rhash(int r) { // Don't need this for ARM. On x86, this puts the value 0xf8 into the // register. On ARM the hash can be done with a single instruction (below) } static void do_preload_rhtbl(int ht) { emit_addimm(FP,(int)&mini_ht-(int)&dynarec_local,ht); } static void do_rhash(int rs,int rh) { emit_andimm(rs,0xf8,rh); } static void do_miniht_load(int ht,int rh) { assem_debug("ldr %s,[%s,%s]!",regname[rh],regname[ht],regname[rh]); output_w32(0xe7b00000|rd_rn_rm(rh,ht,rh)); } static void do_miniht_jump(int rs,int rh,int ht) { emit_cmp(rh,rs); emit_ldreq_indexed(ht,4,15); #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK emit_mov(rs,7); emit_jmp(jump_vaddr_reg[7]); #else emit_jmp(jump_vaddr_reg[rs]); #endif } static void do_miniht_insert(u_int return_address,int rt,int temp) { #ifdef ARMv5_ONLY emit_movimm(return_address,rt); // PC into link register add_to_linker((int)out,return_address,1); emit_pcreladdr(temp); emit_writeword(rt,(int)&mini_ht[(return_address&0xFF)>>3][0]); emit_writeword(temp,(int)&mini_ht[(return_address&0xFF)>>3][1]); #else emit_movw(return_address&0x0000FFFF,rt); add_to_linker((int)out,return_address,1); emit_pcreladdr(temp); emit_writeword(temp,(int)&mini_ht[(return_address&0xFF)>>3][1]); emit_movt(return_address&0xFFFF0000,rt); emit_writeword(rt,(int)&mini_ht[(return_address&0xFF)>>3][0]); #endif } // Sign-extend to 64 bits and write out upper half of a register // This is useful where we have a 32-bit value in a register, and want to // keep it in a 32-bit register, but can't guarantee that it won't be read // as a 64-bit value later. static void wb_sx(signed char pre[],signed char entry[],uint64_t dirty,uint64_t is32_pre,uint64_t is32,uint64_t u,uint64_t uu) { if(is32_pre==is32) return; int hr,reg; for(hr=0;hr=0) { if((dirty>>hr)&1) { if( ((is32_pre&~is32&~uu)>>reg)&1 ) { emit_sarimm(hr,31,HOST_TEMPREG); emit_storereg(reg|64,HOST_TEMPREG); } } } //} } } } static void wb_valid(signed char pre[],signed char entry[],u_int dirty_pre,u_int dirty,uint64_t is32_pre,uint64_t u,uint64_t uu) { //if(dirty_pre==dirty) return; int hr,reg,new_hr; for(hr=0;hr>(reg&63))&1) { if(reg>0) { if(((dirty_pre&~dirty)>>hr)&1) { if(reg>0&®<36) { emit_storereg(reg,hr); if( ((is32_pre&~uu)>>reg)&1 ) { emit_sarimm(hr,31,HOST_TEMPREG); emit_storereg(reg|64,HOST_TEMPREG); } } else if(reg>=64) { emit_storereg(reg,hr); } } } } } } } /* using strd could possibly help but you'd have to allocate registers in pairs static void wb_invalidate_arm(signed char pre[],signed char entry[],uint64_t dirty,uint64_t is32,uint64_t u,uint64_t uu) { int hr; int wrote=-1; for(hr=HOST_REGS-1;hr>=0;hr--) { if(hr!=EXCLUDE_REG) { if(pre[hr]!=entry[hr]) { if(pre[hr]>=0) { if((dirty>>hr)&1) { if(get_reg(entry,pre[hr])<0) { if(pre[hr]<64) { if(!((u>>pre[hr])&1)) { if(hr<10&&(~hr&1)&&(pre[hr+1]<0||wrote==hr+1)) { if( ((is32>>pre[hr])&1) && !((uu>>pre[hr])&1) ) { emit_sarimm(hr,31,hr+1); emit_strdreg(pre[hr],hr); } else emit_storereg(pre[hr],hr); }else{ emit_storereg(pre[hr],hr); if( ((is32>>pre[hr])&1) && !((uu>>pre[hr])&1) ) { emit_sarimm(hr,31,hr); emit_storereg(pre[hr]|64,hr); } } } }else{ if(!((uu>>(pre[hr]&63))&1) && !((is32>>(pre[hr]&63))&1)) { emit_storereg(pre[hr],hr); } } wrote=hr; } } } } } } for(hr=0;hr=0) { int nr; if((nr=get_reg(entry,pre[hr]))>=0) { emit_mov(hr,nr); } } } } } } #define wb_invalidate wb_invalidate_arm */ // Clearing the cache is rather slow on ARM Linux, so mark the areas // that need to be cleared, and then only clear these areas once. static void do_clear_cache() { int i,j; for (i=0;i<(1<<(TARGET_SIZE_2-17));i++) { u_int bitmap=needs_clear_cache[i]; if(bitmap) { u_int start,end; for(j=0;j<32;j++) { if(bitmap&(1<>2; #endif // Trampolines for jumps >32M int *ptr,*ptr2; ptr=(int *)jump_table_symbols; ptr2=(int *)((void *)BASE_ADDR+(1<=-33554432&&offset<33554432) { *ptr2=0xea000000|((offset>>2)&0xffffff); // direct branch }else{ *ptr2=0xe51ff004; // ldr pc,[pc,#-4] } ptr2++; *ptr2=*ptr; ptr++; ptr2++; } // Jumping thru the trampolines created above slows things down by about 1%. // If part of the cache is beyond the 32M limit, avoid using this area // initially. It will be used later if the cache gets full. if((u_int)dyna_linker-33554432>(u_int)BASE_ADDR) { if((u_int)dyna_linker-33554432<(u_int)BASE_ADDR+(1<<(TARGET_SIZE_2-1))) { out=(u_char *)(((u_int)dyna_linker-33554432)&~4095); expirep=((((int)out-BASE_ADDR)>>(TARGET_SIZE_2-16))+16384)&65535; } } } mupen64plus-core-src-2.5/src/r4300/new_dynarec/arm/assem_arm.h000066400000000000000000000021371251723631200240360ustar00rootroot00000000000000#ifndef M64P_R4300_ASSEM_ARM_H #define M64P_R4300_ASSEM_ARM_H #define HOST_REGS 13 #define HOST_CCREG 10 #define HOST_BTREG 8 #define EXCLUDE_REG 11 #define HOST_IMM8 1 #define HAVE_CMOV_IMM 1 #define CORTEX_A8_BRANCH_PREDICTION_HACK 1 #define USE_MINI_HT 1 //#define REG_PREFETCH 1 #define HAVE_CONDITIONAL_CALL 1 #define RAM_OFFSET 1 /* ARM calling convention: r0-r3, r12: caller-save r4-r11: callee-save */ #define ARG1_REG 0 #define ARG2_REG 1 #define ARG3_REG 2 #define ARG4_REG 3 /* GCC register naming convention: r10 = sl (base) r11 = fp (frame pointer) r12 = ip (scratch) r13 = sp (stack pointer) r14 = lr (link register) r15 = pc (program counter) */ #define FP 11 #define LR 14 #define HOST_TEMPREG 14 // Note: FP is set to &dynarec_local when executing generated code. // Thus the local variables are actually global and not on the stack. extern char *invc_ptr; extern char extra_memory[33554432]; #define BASE_ADDR ((int)(&extra_memory)) //#define TARGET_SIZE_2 24 // 2^24 = 16 megabytes #define TARGET_SIZE_2 25 // 2^25 = 32 megabytes #endif /* M64P_R4300_ASSEM_ARM_H */ mupen64plus-core-src-2.5/src/r4300/new_dynarec/arm/linkage_arm.S000066400000000000000000000715571251723631200243270ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - linkage_arm.s * * Copyright (C) 2009-2011 Ari64 * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ .cpu arm9tdmi #ifndef __ARM_NEON__ #if (defined(__VFP_FP__) && !defined(__SOFTFP__) && defined(__ARM_PCS_VFP)) .fpu vfp #else .fpu softvfp #endif #else .fpu neon #endif .eabi_attribute 20, 1 .eabi_attribute 21, 1 #ifndef __ARM_NEON__ .eabi_attribute 23, 3 #endif .eabi_attribute 24, 1 .eabi_attribute 25, 1 .eabi_attribute 26, 2 #ifndef __ARM_NEON__ #if (defined(__VFP_FP__) && !defined(__SOFTFP__) && defined(__ARM_PCS_VFP)) .eabi_attribute 28, 1 #endif #endif .eabi_attribute 30, 6 .eabi_attribute 18, 4 .file "linkage_arm.S" .global extra_memory .hidden extra_memory .global dynarec_local .hidden dynarec_local .global reg .hidden reg .global hi .hidden hi .global lo .hidden lo .global reg_cop1_simple .hidden reg_cop1_simple .global reg_cop1_double .hidden reg_cop1_double .global g_cp0_regs .hidden g_cp0_regs .global FCR0 .hidden FCR0 .global FCR31 .hidden FCR31 .global rounding_modes .hidden rounding_modes .global next_interupt .hidden next_interupt .global cycle_count .hidden cycle_count .global last_count .hidden last_count .global pending_exception .hidden pending_exception .global pcaddr .hidden pcaddr .global stop .hidden stop .global invc_ptr .hidden invc_ptr .global address .hidden address .global readmem_dword .hidden readmem_dword .global cpu_dword .hidden cpu_dword .global cpu_word .hidden cpu_word .global cpu_hword .hidden cpu_hword .global cpu_byte .hidden cpu_byte .global branch_target .hidden branch_target .global PC .hidden PC .global fake_pc .hidden fake_pc .global mini_ht .hidden mini_ht .global restore_candidate .hidden restore_candidate .global ram_offset .hidden ram_offset .global memory_map .hidden memory_map .bss .align 12 .type extra_memory, %object .size extra_memory, 33554432 extra_memory: .space 33554432+64+16+16+8+8+8+8+256+8+8+128+128+128+16+8+132+4+256+512+4194304 dynarec_local = extra_memory + 33554432 .type dynarec_local, %object .size dynarec_local, 64 next_interupt = dynarec_local + 64 .type next_interupt, %object .size next_interupt, 4 cycle_count = next_interupt + 4 .type cycle_count, %object .size cycle_count, 4 last_count = cycle_count + 4 .type last_count, %object .size last_count, 4 pending_exception = last_count + 4 .type pending_exception, %object .size pending_exception, 4 pcaddr = pending_exception + 4 .type pcaddr, %object .size pcaddr, 4 stop = pcaddr + 4 .type stop, %object .size stop, 4 invc_ptr = stop + 4 .type invc_ptr, %object .size invc_ptr, 4 address = invc_ptr + 4 .type address, %object .size address, 4 readmem_dword = address + 4 .type readmem_dword, %object .size readmem_dword, 8 cpu_dword = readmem_dword + 8 .type cpu_dword, %object .size cpu_dword, 8 cpu_word = cpu_dword + 8 .type cpu_word, %object .size cpu_word, 4 cpu_hword = cpu_word + 4 .type cpu_hword, %object .size cpu_hword, 2 cpu_byte = cpu_hword + 2 .type cpu_byte, %object .size cpu_byte, 1 /* 1 byte free */ FCR0 = cpu_hword + 4 .type FCR0, %object .size FCR0, 4 FCR31 = FCR0 + 4 .type FCR31, %object .size FCR31, 4 reg = FCR31 + 4 .type reg, %object .size reg, 256 hi = reg + 256 .type hi, %object .size hi, 8 lo = hi + 8 .type lo, %object .size lo, 8 g_cp0_regs = lo + 8 .type g_cp0_regs, %object .size g_cp0_regs, 128 reg_cop1_simple = g_cp0_regs + 128 .type reg_cop1_simple, %object .size reg_cop1_simple, 128 reg_cop1_double = reg_cop1_simple + 128 .type reg_cop1_double, %object .size reg_cop1_double, 128 rounding_modes = reg_cop1_double + 128 .type rounding_modes, %object .size rounding_modes, 16 branch_target = rounding_modes + 16 .type branch_target, %object .size branch_target, 4 PC = branch_target + 4 .type PC, %object .size PC, 4 fake_pc = PC + 4 .type fake_pc, %object .size fake_pc, 132 ram_offset = fake_pc + 132 .type ram_offset, %object .size ram_offset, 4 mini_ht = ram_offset + 4 .type mini_ht, %object .size mini_ht, 256 restore_candidate = mini_ht + 256 .type restore_candidate, %object .size restore_candidate, 512 memory_map = restore_candidate + 512 .type memory_map, %object .size memory_map, 4194304 .text .align 2 .global dyna_linker .hidden dyna_linker .type dyna_linker, %function dyna_linker: /* r0 = virtual target address */ /* r1 = instruction to patch */ ldr r4, .tlbptr lsr r5, r0, #12 mov r12, r0 cmp r0, #0xC0000000 mov r6, #4096 ldrge r12, [r4, r5, lsl #2] mov r2, #0x80000 ldr r3, .jiptr tst r12, r12 sub r6, r6, #1 moveq r12, r0 ldr r7, [r1] eor r2, r2, r12, lsr #12 and r6, r6, r12, lsr #12 cmp r2, #2048 add r12, r7, #2 orrcs r2, r6, #2048 ldr r5, [r3, r2, lsl #2] lsl r12, r12, #8 /* jump_in lookup */ .A1: movs r4, r5 beq .A3 ldr r3, [r5] ldr r5, [r4, #12] teq r3, r0 bne .A1 ldr r3, [r4, #4] ldr r4, [r4, #8] tst r3, r3 bne .A1 .A2: mov r5, r1 add r1, r1, r12, asr #6 teq r1, r4 moveq pc, r4 /* Stale i-cache */ bl add_link sub r2, r4, r5 and r1, r7, #0xff000000 lsl r2, r2, #6 sub r1, r1, #2 add r1, r1, r2, lsr #8 str r1, [r5] mov pc, r4 .A3: /* hash_table lookup */ cmp r2, #2048 ldr r3, .jdptr eor r4, r0, r0, lsl #16 lslcc r2, r0, #9 ldr r6, .htptr lsr r4, r4, #12 lsrcc r2, r2, #21 bic r4, r4, #15 ldr r5, [r3, r2, lsl #2] ldr r7, [r6, r4]! teq r7, r0 ldreq pc, [r6, #4] ldr r7, [r6, #8] teq r7, r0 ldreq pc, [r6, #12] /* jump_dirty lookup */ .A6: movs r4, r5 beq .A8 ldr r3, [r5] ldr r5, [r4, #12] teq r3, r0 bne .A6 .A7: ldr r1, [r4, #8] /* hash_table insert */ ldr r2, [r6] ldr r3, [r6, #4] str r0, [r6] str r1, [r6, #4] str r2, [r6, #8] str r3, [r6, #12] mov pc, r1 .A8: mov r4, r0 mov r5, r1 bl new_recompile_block tst r0, r0 mov r0, r4 mov r1, r5 beq dyna_linker /* pagefault */ mov r1, r0 mov r2, #8 .size dyna_linker, .-dyna_linker .type exec_pagefault, %function exec_pagefault: /* r0 = instruction pointer */ /* r1 = fault address */ /* r2 = cause */ ldr r3, [fp, #g_cp0_regs+48-dynarec_local] /* Status */ mvn r6, #0xF000000F ldr r4, [fp, #g_cp0_regs+16-dynarec_local] /* Context */ bic r6, r6, #0x0F800000 str r0, [fp, #g_cp0_regs+56-dynarec_local] /* EPC */ orr r3, r3, #2 str r1, [fp, #g_cp0_regs+32-dynarec_local] /* BadVAddr */ bic r4, r4, r6 str r3, [fp, #g_cp0_regs+48-dynarec_local] /* Status */ and r5, r6, r1, lsr #9 str r2, [fp, #g_cp0_regs+52-dynarec_local] /* Cause */ and r1, r1, r6, lsl #9 str r1, [fp, #g_cp0_regs+40-dynarec_local] /* EntryHi */ orr r4, r4, r5 str r4, [fp, #g_cp0_regs+16-dynarec_local] /* Context */ mov r0, #0x80000000 bl get_addr_ht mov pc, r0 .size exec_pagefault, .-exec_pagefault /* Special dynamic linker for the case where a page fault may occur in a branch delay slot */ .global dyna_linker_ds .hidden dyna_linker_ds .type dyna_linker_ds, %function dyna_linker_ds: /* r0 = virtual target address */ /* r1 = instruction to patch */ ldr r4, .tlbptr lsr r5, r0, #12 mov r12, r0 cmp r0, #0xC0000000 mov r6, #4096 ldrge r12, [r4, r5, lsl #2] mov r2, #0x80000 ldr r3, .jiptr tst r12, r12 sub r6, r6, #1 moveq r12, r0 ldr r7, [r1] eor r2, r2, r12, lsr #12 and r6, r6, r12, lsr #12 cmp r2, #2048 add r12, r7, #2 orrcs r2, r6, #2048 ldr r5, [r3, r2, lsl #2] lsl r12, r12, #8 /* jump_in lookup */ .B1: movs r4, r5 beq .B3 ldr r3, [r5] ldr r5, [r4, #12] teq r3, r0 bne .B1 ldr r3, [r4, #4] ldr r4, [r4, #8] tst r3, r3 bne .B1 .B2: mov r5, r1 add r1, r1, r12, asr #6 teq r1, r4 moveq pc, r4 /* Stale i-cache */ bl add_link sub r2, r4, r5 and r1, r7, #0xff000000 lsl r2, r2, #6 sub r1, r1, #2 add r1, r1, r2, lsr #8 str r1, [r5] mov pc, r4 .B3: /* hash_table lookup */ cmp r2, #2048 ldr r3, .jdptr eor r4, r0, r0, lsl #16 lslcc r2, r0, #9 ldr r6, .htptr lsr r4, r4, #12 lsrcc r2, r2, #21 bic r4, r4, #15 ldr r5, [r3, r2, lsl #2] ldr r7, [r6, r4]! teq r7, r0 ldreq pc, [r6, #4] ldr r7, [r6, #8] teq r7, r0 ldreq pc, [r6, #12] /* jump_dirty lookup */ .B6: movs r4, r5 beq .B8 ldr r3, [r5] ldr r5, [r4, #12] teq r3, r0 bne .B6 .B7: ldr r1, [r4, #8] /* hash_table insert */ ldr r2, [r6] ldr r3, [r6, #4] str r0, [r6] str r1, [r6, #4] str r2, [r6, #8] str r3, [r6, #12] mov pc, r1 .B8: mov r4, r0 bic r0, r0, #7 mov r5, r1 orr r0, r0, #1 bl new_recompile_block tst r0, r0 mov r0, r4 mov r1, r5 beq dyna_linker_ds /* pagefault */ bic r1, r0, #7 mov r2, #0x80000008 /* High bit set indicates pagefault in delay slot */ sub r0, r1, #4 b exec_pagefault .size dyna_linker_ds, .-dyna_linker_ds .jiptr: .word jump_in .jdptr: .word jump_dirty .tlbptr: .word tlb_LUT_r .htptr: .word hash_table .align 2 .global jump_vaddr_r0 .hidden jump_vaddr_r0 .type jump_vaddr_r0, %function jump_vaddr_r0: eor r2, r0, r0, lsl #16 b jump_vaddr .size jump_vaddr_r0, .-jump_vaddr_r0 .global jump_vaddr_r1 .hidden jump_vaddr_r1 .type jump_vaddr_r1, %function jump_vaddr_r1: eor r2, r1, r1, lsl #16 mov r0, r1 b jump_vaddr .size jump_vaddr_r1, .-jump_vaddr_r1 .global jump_vaddr_r2 .hidden jump_vaddr_r2 .type jump_vaddr_r2, %function jump_vaddr_r2: mov r0, r2 eor r2, r2, r2, lsl #16 b jump_vaddr .size jump_vaddr_r2, .-jump_vaddr_r2 .global jump_vaddr_r3 .hidden jump_vaddr_r3 .type jump_vaddr_r3, %function jump_vaddr_r3: eor r2, r3, r3, lsl #16 mov r0, r3 b jump_vaddr .size jump_vaddr_r3, .-jump_vaddr_r3 .global jump_vaddr_r4 .hidden jump_vaddr_r4 .type jump_vaddr_r4, %function jump_vaddr_r4: eor r2, r4, r4, lsl #16 mov r0, r4 b jump_vaddr .size jump_vaddr_r4, .-jump_vaddr_r4 .global jump_vaddr_r5 .hidden jump_vaddr_r5 .type jump_vaddr_r5, %function jump_vaddr_r5: eor r2, r5, r5, lsl #16 mov r0, r5 b jump_vaddr .size jump_vaddr_r5, .-jump_vaddr_r5 .global jump_vaddr_r6 .hidden jump_vaddr_r6 .type jump_vaddr_r6, %function jump_vaddr_r6: eor r2, r6, r6, lsl #16 mov r0, r6 b jump_vaddr .size jump_vaddr_r6, .-jump_vaddr_r6 .global jump_vaddr_r8 .hidden jump_vaddr_r8 .type jump_vaddr_r8, %function jump_vaddr_r8: eor r2, r8, r8, lsl #16 mov r0, r8 b jump_vaddr .size jump_vaddr_r8, .-jump_vaddr_r8 .global jump_vaddr_r9 .hidden jump_vaddr_r9 .type jump_vaddr_r9, %function jump_vaddr_r9: eor r2, r9, r9, lsl #16 mov r0, r9 b jump_vaddr .size jump_vaddr_r9, .-jump_vaddr_r9 .global jump_vaddr_r10 .hidden jump_vaddr_r10 .type jump_vaddr_r10, %function jump_vaddr_r10: eor r2, r10, r10, lsl #16 mov r0, r10 b jump_vaddr .size jump_vaddr_r10, .-jump_vaddr_r10 .global jump_vaddr_r12 .hidden jump_vaddr_r12 .type jump_vaddr_r12, %function jump_vaddr_r12: eor r2, r12, r12, lsl #16 mov r0, r12 b jump_vaddr .size jump_vaddr_r12, .-jump_vaddr_r12 .global jump_vaddr_r7 .hidden jump_vaddr_r7 .type jump_vaddr_r7, %function jump_vaddr_r7: eor r2, r7, r7, lsl #16 add r0, r7, #0 .size jump_vaddr_r7, .-jump_vaddr_r7 .global jump_vaddr .hidden jump_vaddr .type jump_vaddr, %function jump_vaddr: ldr r1, .htptr mvn r3, #15 and r2, r3, r2, lsr #12 ldr r2, [r1, r2]! teq r2, r0 ldreq pc, [r1, #4] ldr r2, [r1, #8] teq r2, r0 ldreq pc, [r1, #12] str r10, [fp, #cycle_count-dynarec_local] bl get_addr ldr r10, [fp, #cycle_count-dynarec_local] mov pc, r0 .size jump_vaddr, .-jump_vaddr .align 2 .global verify_code_ds .hidden verify_code_ds .type verify_code_ds, %function verify_code_ds: str r8, [fp, #branch_target-dynarec_local] .size verify_code_ds, .-verify_code_ds .global verify_code_vm .hidden verify_code_vm .type verify_code_vm, %function verify_code_vm: /* r0 = instruction pointer (virtual address) */ /* r1 = source (virtual address) */ /* r2 = target */ /* r3 = length */ cmp r1, #0xC0000000 blt verify_code add r12, fp, #memory_map-dynarec_local lsr r4, r1, #12 add r5, r1, r3 sub r5, #1 ldr r6, [r12, r4, lsl #2] lsr r5, r5, #12 movs r7, r6 bmi .D5 add r1, r1, r6, lsl #2 lsl r6, r6, #2 .D1: add r4, r4, #1 teq r6, r7, lsl #2 bne .D5 ldr r7, [r12, r4, lsl #2] cmp r4, r5 bls .D1 .size verify_code_vm, .-verify_code_vm .global verify_code .hidden verify_code .type verify_code, %function verify_code: /* r1 = source */ /* r2 = target */ /* r3 = length */ tst r3, #4 mov r4, #0 add r3, r1, r3 mov r5, #0 ldrne r4, [r1], #4 mov r12, #0 ldrne r5, [r2], #4 teq r1, r3 beq .D3 .D2: ldr r7, [r1], #4 eor r9, r4, r5 ldr r8, [r2], #4 orrs r9, r9, r12 bne .D4 ldr r4, [r1], #4 eor r12, r7, r8 ldr r5, [r2], #4 cmp r1, r3 bcc .D2 teq r7, r8 .D3: teqeq r4, r5 .D4: ldr r8, [fp, #branch_target-dynarec_local] moveq pc, lr .D5: bl get_addr mov pc, r0 .size verify_code, .-verify_code .align 2 .global cc_interrupt .hidden cc_interrupt .type cc_interrupt, %function cc_interrupt: ldr r0, [fp, #last_count-dynarec_local] mov r1, #0 mov r2, #0x1fc add r10, r0, r10 str r1, [fp, #pending_exception-dynarec_local] and r2, r2, r10, lsr #19 add r3, fp, #restore_candidate-dynarec_local str r10, [fp, #g_cp0_regs+36-dynarec_local] /* Count */ ldr r4, [r2, r3] mov r10, lr tst r4, r4 bne .E4 .E1: bl gen_interupt mov lr, r10 ldr r10, [fp, #g_cp0_regs+36-dynarec_local] /* Count */ ldr r0, [fp, #next_interupt-dynarec_local] ldr r1, [fp, #pending_exception-dynarec_local] ldr r2, [fp, #stop-dynarec_local] str r0, [fp, #last_count-dynarec_local] sub r10, r10, r0 tst r2, r2 bne .E3 tst r1, r1 moveq pc, lr .E2: ldr r0, [fp, #pcaddr-dynarec_local] bl get_addr_ht mov pc, r0 .E3: add r12, fp, #28 ldmia r12, {r4, r5, r6, r7, r8, r9, sl, fp, pc} .E4: /* Move 'dirty' blocks to the 'clean' list */ lsl r5, r2, #3 str r1, [r2, r3] mov r6, #0 .E5: lsrs r4, r4, #1 add r0, r5, r6 blcs clean_blocks add r6, r6, #1 tst r6, #31 bne .E5 b .E1 .size cc_interrupt, .-cc_interrupt .align 2 .global do_interrupt .hidden do_interrupt .type do_interrupt, %function do_interrupt: ldr r0, [fp, #pcaddr-dynarec_local] bl get_addr_ht ldr r1, [fp, #next_interupt-dynarec_local] ldr r10, [fp, #g_cp0_regs+36-dynarec_local] /* Count */ str r1, [fp, #last_count-dynarec_local] sub r10, r10, r1 add r10, r10, #2 mov pc, r0 .size do_interrupt, .-do_interrupt .align 2 .global fp_exception .hidden fp_exception .type fp_exception, %function fp_exception: mov r2, #0x10000000 .E7: ldr r1, [fp, #g_cp0_regs+48-dynarec_local] /* Status */ mov r3, #0x80000000 str r0, [fp, #g_cp0_regs+56-dynarec_local] /* EPC */ orr r1, #2 add r2, r2, #0x2c str r1, [fp, #g_cp0_regs+48-dynarec_local] /* Status */ str r2, [fp, #g_cp0_regs+52-dynarec_local] /* Cause */ add r0, r3, #0x180 bl get_addr_ht mov pc, r0 .size fp_exception, .-fp_exception .align 2 .global fp_exception_ds .hidden fp_exception_ds .type fp_exception_ds, %function fp_exception_ds: mov r2, #0x90000000 /* Set high bit if delay slot */ b .E7 .size fp_exception_ds, .-fp_exception_ds .align 2 .global jump_syscall .hidden jump_syscall .type jump_syscall, %function jump_syscall: ldr r1, [fp, #g_cp0_regs+48-dynarec_local] /* Status */ mov r3, #0x80000000 str r0, [fp, #g_cp0_regs+56-dynarec_local] /* EPC */ orr r1, #2 mov r2, #0x20 str r1, [fp, #g_cp0_regs+48-dynarec_local] /* Status */ str r2, [fp, #g_cp0_regs+52-dynarec_local] /* Cause */ add r0, r3, #0x180 bl get_addr_ht mov pc, r0 .size jump_syscall, .-jump_syscall .align 2 .global indirect_jump_indexed .hidden indirect_jump_indexed .type indirect_jump_indexed, %function indirect_jump_indexed: ldr r0, [r0, r1, lsl #2] .size indirect_jump_indexed, .-indirect_jump_indexed .align 2 .global indirect_jump .hidden indirect_jump .type indirect_jump, %function indirect_jump: ldr r12, [fp, #last_count-dynarec_local] add r2, r2, r12 str r2, [fp, #g_cp0_regs+36-dynarec_local] /* Count */ mov pc, r0 .size indirect_jump, .-indirect_jump .align 2 .global jump_eret .hidden jump_eret .type jump_eret, %function jump_eret: ldr r1, [fp, #g_cp0_regs+48-dynarec_local] /* Status */ ldr r0, [fp, #last_count-dynarec_local] bic r1, r1, #2 add r10, r0, r10 str r1, [fp, #g_cp0_regs+48-dynarec_local] /* Status */ str r10, [fp, #g_cp0_regs+36-dynarec_local] /* Count */ bl check_interupt ldr r1, [fp, #next_interupt-dynarec_local] ldr r0, [fp, #g_cp0_regs+56-dynarec_local] /* EPC */ str r1, [fp, #last_count-dynarec_local] subs r10, r10, r1 bpl .E11 .E8: add r6, fp, #reg+256-dynarec_local mov r5, #248 mov r1, #0 .E9: ldr r2, [r6, #-8]! ldr r3, [r6, #4] eor r3, r3, r2, asr #31 subs r3, r3, #1 adc r1, r1, r1 subs r5, r5, #8 bne .E9 ldr r2, [fp, #hi-dynarec_local] ldr r3, [fp, #hi+4-dynarec_local] eors r3, r3, r2, asr #31 ldr r2, [fp, #lo-dynarec_local] ldreq r3, [fp, #lo+4-dynarec_local] eoreq r3, r3, r2, asr #31 subs r3, r3, #1 adc r1, r1, r1 bl get_addr_32 mov pc, r0 .E11: str r0, [fp, #pcaddr-dynarec_local] bl cc_interrupt ldr r0, [fp, #pcaddr-dynarec_local] b .E8 .size jump_eret, .-jump_eret .align 2 .global new_dyna_start .hidden new_dyna_start .type new_dyna_start, %function new_dyna_start: ldr r12, .dlptr ldr r1, .tgtptr mov r0, #0xa4000000 stmia r12, {r4, r5, r6, r7, r8, r9, sl, fp, lr} sub fp, r12, #28 ldr r4, [r1] add r0, r0, #0x40 bl new_recompile_block ldr r0, [fp, #next_interupt-dynarec_local] ldr r10, [fp, #g_cp0_regs+36-dynarec_local] /* Count */ str r0, [fp, #last_count-dynarec_local] sub r10, r10, r0 mov pc, r4 .dlptr: .word dynarec_local+28 .tgtptr: .word out .size new_dyna_start, .-new_dyna_start .align 2 .global invalidate_addr_r0 .hidden invalidate_addr_r0 .type invalidate_addr_r0, %function invalidate_addr_r0: stmia fp, {r0, r1, r2, r3, r12, lr} lsr r0, r0, #12 b invalidate_addr_call .size invalidate_addr_r0, .-invalidate_addr_r0 .align 2 .global invalidate_addr_r1 .hidden invalidate_addr_r1 .type invalidate_addr_r1, %function invalidate_addr_r1: stmia fp, {r0, r1, r2, r3, r12, lr} lsr r0, r1, #12 b invalidate_addr_call .size invalidate_addr_r1, .-invalidate_addr_r1 .align 2 .global invalidate_addr_r2 .hidden invalidate_addr_r2 .type invalidate_addr_r2, %function invalidate_addr_r2: stmia fp, {r0, r1, r2, r3, r12, lr} lsr r0, r2, #12 b invalidate_addr_call .size invalidate_addr_r2, .-invalidate_addr_r2 .align 2 .global invalidate_addr_r3 .hidden invalidate_addr_r3 .type invalidate_addr_r3, %function invalidate_addr_r3: stmia fp, {r0, r1, r2, r3, r12, lr} lsr r0, r3, #12 b invalidate_addr_call .size invalidate_addr_r3, .-invalidate_addr_r3 .align 2 .global invalidate_addr_r4 .hidden invalidate_addr_r4 .type invalidate_addr_r4, %function invalidate_addr_r4: stmia fp, {r0, r1, r2, r3, r12, lr} lsr r0, r4, #12 b invalidate_addr_call .size invalidate_addr_r4, .-invalidate_addr_r4 .align 2 .global invalidate_addr_r5 .hidden invalidate_addr_r5 .type invalidate_addr_r5, %function invalidate_addr_r5: stmia fp, {r0, r1, r2, r3, r12, lr} lsr r0, r5, #12 b invalidate_addr_call .size invalidate_addr_r5, .-invalidate_addr_r5 .align 2 .global invalidate_addr_r6 .hidden invalidate_addr_r6 .type invalidate_addr_r6, %function invalidate_addr_r6: stmia fp, {r0, r1, r2, r3, r12, lr} lsr r0, r6, #12 b invalidate_addr_call .size invalidate_addr_r6, .-invalidate_addr_r6 .align 2 .global invalidate_addr_r7 .hidden invalidate_addr_r7 .type invalidate_addr_r7, %function invalidate_addr_r7: stmia fp, {r0, r1, r2, r3, r12, lr} lsr r0, r7, #12 b invalidate_addr_call .size invalidate_addr_r7, .-invalidate_addr_r7 .align 2 .global invalidate_addr_r8 .hidden invalidate_addr_r8 .type invalidate_addr_r8, %function invalidate_addr_r8: stmia fp, {r0, r1, r2, r3, r12, lr} lsr r0, r8, #12 b invalidate_addr_call .size invalidate_addr_r8, .-invalidate_addr_r8 .align 2 .global invalidate_addr_r9 .hidden invalidate_addr_r9 .type invalidate_addr_r9, %function invalidate_addr_r9: stmia fp, {r0, r1, r2, r3, r12, lr} lsr r0, r9, #12 b invalidate_addr_call .size invalidate_addr_r9, .-invalidate_addr_r9 .align 2 .global invalidate_addr_r10 .hidden invalidate_addr_r10 .type invalidate_addr_r10, %function invalidate_addr_r10: stmia fp, {r0, r1, r2, r3, r12, lr} lsr r0, r10, #12 b invalidate_addr_call .size invalidate_addr_r10, .-invalidate_addr_r10 .align 2 .global invalidate_addr_r12 .hidden invalidate_addr_r12 .type invalidate_addr_r12, %function invalidate_addr_r12: stmia fp, {r0, r1, r2, r3, r12, lr} lsr r0, r12, #12 .size invalidate_addr_r12, .-invalidate_addr_r12 .align 2 .type invalidate_addr_call, %function invalidate_addr_call: bl invalidate_block ldmia fp, {r0, r1, r2, r3, r12, pc} .size invalidate_addr_call, .-invalidate_addr_call .align 2 .global write_rdram_new .hidden write_rdram_new .type write_rdram_new, %function write_rdram_new: ldr r3, [fp, #ram_offset-dynarec_local] ldr r2, [fp, #address-dynarec_local] ldr r0, [fp, #cpu_word-dynarec_local] str r0, [r2, r3, lsl #2] b .E12 .size write_rdram_new, .-write_rdram_new .align 2 .global write_rdramb_new .hidden write_rdramb_new .type write_rdramb_new, %function write_rdramb_new: ldr r3, [fp, #ram_offset-dynarec_local] ldr r2, [fp, #address-dynarec_local] ldrb r0, [fp, #cpu_byte-dynarec_local] eor r2, r2, #3 strb r0, [r2, r3, lsl #2] b .E12 .size write_rdramb_new, .-write_rdramb_new .align 2 .global write_rdramh_new .hidden write_rdramh_new .type write_rdramh_new, %function write_rdramh_new: ldr r3, [fp, #ram_offset-dynarec_local] ldr r2, [fp, #address-dynarec_local] ldrh r0, [fp, #cpu_hword-dynarec_local] eor r2, r2, #2 lsl r3, r3, #2 strh r0, [r2, r3] b .E12 .size write_rdramh_new, .-write_rdramh_new .align 2 .global write_rdramd_new .hidden write_rdramd_new .type write_rdramd_new, %function write_rdramd_new: ldr r3, [fp, #ram_offset-dynarec_local] ldr r2, [fp, #address-dynarec_local] /* ldrd r0, [fp, #cpu_dword-dynarec_local]*/ ldr r0, [fp, #cpu_dword-dynarec_local] ldr r1, [fp, #cpu_dword+4-dynarec_local] add r3, r2, r3, lsl #2 str r0, [r3, #4] str r1, [r3] b .E12 .size write_rdramd_new, .-write_rdramd_new .align 2 .type do_invalidate, %function do_invalidate: ldr r2, [fp, #address-dynarec_local] .E12: ldr r1, [fp, #invc_ptr-dynarec_local] lsr r0, r2, #12 ldrb r2, [r1, r0] tst r2, r2 beq invalidate_block mov pc, lr .size do_invalidate, .-do_invalidate .align 2 .global read_nomem_new .hidden read_nomem_new .type read_nomem_new, %function read_nomem_new: ldr r2, [fp, #address-dynarec_local] add r12, fp, #memory_map-dynarec_local lsr r0, r2, #12 ldr r12, [r12, r0, lsl #2] mov r1, #8 tst r12, r12 bmi tlb_exception ldr r0, [r2, r12, lsl #2] str r0, [fp, #readmem_dword-dynarec_local] mov pc, lr .size read_nomem_new, .-read_nomem_new .align 2 .global read_nomemb_new .hidden read_nomemb_new .type read_nomemb_new, %function read_nomemb_new: ldr r2, [fp, #address-dynarec_local] add r12, fp, #memory_map-dynarec_local lsr r0, r2, #12 ldr r12, [r12, r0, lsl #2] mov r1, #8 tst r12, r12 bmi tlb_exception eor r2, r2, #3 ldrb r0, [r2, r12, lsl #2] str r0, [fp, #readmem_dword-dynarec_local] mov pc, lr .size read_nomemb_new, .-read_nomemb_new .align 2 .global read_nomemh_new .hidden read_nomemh_new .type read_nomemh_new, %function read_nomemh_new: ldr r2, [fp, #address-dynarec_local] add r12, fp, #memory_map-dynarec_local lsr r0, r2, #12 ldr r12, [r12, r0, lsl #2] mov r1, #8 tst r12, r12 bmi tlb_exception lsl r12, r12, #2 eor r2, r2, #2 ldrh r0, [r2, r12] str r0, [fp, #readmem_dword-dynarec_local] mov pc, lr .size read_nomemh_new, .-read_nomemh_new .align 2 .global read_nomemd_new .hidden read_nomemd_new .type read_nomemd_new, %function read_nomemd_new: ldr r2, [fp, #address-dynarec_local] add r12, fp, #memory_map-dynarec_local lsr r0, r2, #12 ldr r12, [r12, r0, lsl #2] mov r1, #8 tst r12, r12 bmi tlb_exception lsl r12, r12, #2 /* ldrd r0, [r2, r12]*/ add r3, r2, #4 ldr r0, [r2, r12] ldr r1, [r3, r12] str r0, [fp, #readmem_dword+4-dynarec_local] str r1, [fp, #readmem_dword-dynarec_local] mov pc, lr .size read_nomemd_new, .-read_nomemd_new .align 2 .global write_nomem_new .hidden write_nomem_new .type write_nomem_new, %function write_nomem_new: str r3, [fp, #24] str lr, [fp, #28] bl do_invalidate ldr r2, [fp, #address-dynarec_local] add r12, fp, #memory_map-dynarec_local ldr lr, [fp, #28] lsr r0, r2, #12 ldr r3, [fp, #24] ldr r12, [r12, r0, lsl #2] mov r1, #0xc tst r12, #0x40000000 bne tlb_exception ldr r0, [fp, #cpu_word-dynarec_local] str r0, [r2, r12, lsl #2] mov pc, lr .size write_nomem_new, .-write_nomem_new .align 2 .global write_nomemb_new .hidden write_nomemb_new .type write_nomemb_new, %function write_nomemb_new: str r3, [fp, #24] str lr, [fp, #28] bl do_invalidate ldr r2, [fp, #address-dynarec_local] add r12, fp, #memory_map-dynarec_local ldr lr, [fp, #28] lsr r0, r2, #12 ldr r3, [fp, #24] ldr r12, [r12, r0, lsl #2] mov r1, #0xc tst r12, #0x40000000 bne tlb_exception eor r2, r2, #3 ldrb r0, [fp, #cpu_byte-dynarec_local] strb r0, [r2, r12, lsl #2] mov pc, lr .size write_nomemb_new, .-write_nomemb_new .align 2 .global write_nomemh_new .hidden write_nomemh_new .type write_nomemh_new, %function write_nomemh_new: str r3, [fp, #24] str lr, [fp, #28] bl do_invalidate ldr r2, [fp, #address-dynarec_local] add r12, fp, #memory_map-dynarec_local ldr lr, [fp, #28] lsr r0, r2, #12 ldr r3, [fp, #24] ldr r12, [r12, r0, lsl #2] mov r1, #0xc lsls r12, #2 bcs tlb_exception eor r2, r2, #2 ldrh r0, [fp, #cpu_hword-dynarec_local] strh r0, [r2, r12] mov pc, lr .size write_nomemh_new, .-write_nomemh_new .align 2 .global write_nomemd_new .hidden write_nomemd_new .type write_nomemd_new, %function write_nomemd_new: str r3, [fp, #24] str lr, [fp, #28] bl do_invalidate ldr r2, [fp, #address-dynarec_local] add r12, fp, #memory_map-dynarec_local ldr lr, [fp, #28] lsr r0, r2, #12 ldr r3, [fp, #24] ldr r12, [r12, r0, lsl #2] mov r1, #0xc lsls r12, #2 bcs tlb_exception add r3, r2, #4 ldr r0, [fp, #cpu_dword+4-dynarec_local] ldr r1, [fp, #cpu_dword-dynarec_local] /* strd r0, [r2, r12]*/ str r0, [r2, r12] str r1, [r3, r12] mov pc, lr .size write_nomemd_new, .-write_nomemd_new .align 2 .type tlb_exception, %function tlb_exception: /* r1 = cause */ /* r2 = address */ /* r3 = instr addr/flags */ ldr r4, [fp, #g_cp0_regs+48-dynarec_local] /* Status */ add r5, fp, #memory_map-dynarec_local lsr r6, r3, #12 orr r1, r1, r3, lsl #31 orr r4, r4, #2 ldr r7, [r5, r6, lsl #2] bic r8, r3, #3 str r4, [fp, #g_cp0_regs+48-dynarec_local] /* Status */ mov r6, #0x6000000 str r1, [fp, #g_cp0_regs+52-dynarec_local] /* Cause */ orr r6, r6, #0x22 ldr r0, [r8, r7, lsl #2] add r4, r8, r1, asr #29 add r5, fp, #reg-dynarec_local str r4, [fp, #g_cp0_regs+56-dynarec_local] /* EPC */ mov r7, #0xf8 ldr r8, [fp, #g_cp0_regs+16-dynarec_local] /* Context */ lsl r1, r0, #16 lsr r4, r0, #26 and r7, r7, r0, lsr #18 mvn r9, #0xF000000F sub r2, r2, r1, asr #16 bic r9, r9, #0x0F800000 rors r6, r6, r4 mov r0, #0x80000000 ldrcs r2, [r5, r7] bic r8, r8, r9 tst r3, #2 str r2, [r5, r7] add r4, r2, r1, asr #16 add r6, fp, #reg+4-dynarec_local asr r3, r2, #31 str r4, [fp, #g_cp0_regs+32-dynarec_local] /* BadVAddr */ add r0, r0, #0x180 and r4, r9, r4, lsr #9 strne r3, [r6, r7] orr r8, r8, r4 str r8, [fp, #g_cp0_regs+16-dynarec_local] /* Context */ bl get_addr_ht ldr r1, [fp, #next_interupt-dynarec_local] ldr r10, [fp, #g_cp0_regs+36-dynarec_local] /* Count */ str r1, [fp, #last_count-dynarec_local] sub r10, r10, r1 mov pc, r0 .size tlb_exception, .-tlb_exception .align 2 .global breakpoint .hidden breakpoint .type breakpoint, %function breakpoint: /* Set breakpoint here for debugging */ mov pc, lr .size breakpoint, .-breakpoint /* The following bug-fix implements __clear_cache (missing in Android) */ .align 2 .global __clear_cache_bugfix .hidden __clear_cache_bugfix .type __clear_cache_bugfix, %function __clear_cache_bugfix: push {r7, lr} mov r2, #0 mov r7, #0x2 add r7, r7, #0xf0000 svc 0x00000000 pop {r7, pc} .size __clear_cache_bugfix, .-__clear_cache_bugfix /* End of bug-fix */ .section .note.GNU-stack,"",%progbits mupen64plus-core-src-2.5/src/r4300/new_dynarec/new_dynarec.c000066400000000000000000013561731251723631200236160ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - new_dynarec.c * * Copyright (C) 2009-2011 Ari64 * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include //include for uint64_t #include #include #include #if defined(__APPLE__) #include // needed for u_int, u_char, etc #define MAP_ANONYMOUS MAP_ANON #endif #ifdef __cplusplus extern "C" { #endif #include "../../main/main.h" #include "../../main/rom.h" #include "../../memory/memory.h" #include "../../rsp/rsp_core.h" #include "../cached_interp.h" #include "../cp0_private.h" #include "../cp1_private.h" #include "../interupt.h" #include "../ops.h" #include "../r4300.h" #include "../recomp.h" #include "../recomph.h" //include for function prototypes #include "../tlb.h" #include "new_dynarec.h" #ifdef __cplusplus } #endif #if !defined(_MSC_VER) #include #endif #if NEW_DYNAREC == NEW_DYNAREC_X86 #include "x86/assem_x86.h" #elif NEW_DYNAREC == NEW_DYNAREC_ARM #include "arm/arm_cpu_features.h" #include "arm/assem_arm.h" #else #error Unsupported dynarec architecture #endif #define MAXBLOCK 4096 #define MAX_OUTPUT_BLOCK_SIZE 262144 #define CLOCK_DIVIDER count_per_op void *base_addr; struct regstat { signed char regmap_entry[HOST_REGS]; signed char regmap[HOST_REGS]; uint64_t was32; uint64_t is32; uint64_t wasdirty; uint64_t dirty; uint64_t u; uint64_t uu; u_int wasconst; u_int isconst; uint64_t constmap[HOST_REGS]; }; struct ll_entry { u_int vaddr; u_int reg32; void *addr; struct ll_entry *next; }; #ifdef __cplusplus extern "C" { #endif extern u_char restore_candidate[512]; extern int cycle_count; extern int last_count; extern int branch_target; extern uint64_t readmem_dword; extern struct ll_entry *jump_in[4096]; extern struct ll_entry *jump_dirty[4096]; extern ALIGN(16, u_int hash_table[65536][4]); #ifdef __cplusplus } #endif static u_int start; static u_int *source; static u_int pagelimit; static char insn[MAXBLOCK][10]; static u_char itype[MAXBLOCK]; static u_char opcode[MAXBLOCK]; static u_char opcode2[MAXBLOCK]; static u_char bt[MAXBLOCK]; static u_char rs1[MAXBLOCK]; static u_char rs2[MAXBLOCK]; static u_char rt1[MAXBLOCK]; static u_char rt2[MAXBLOCK]; static u_char us1[MAXBLOCK]; static u_char us2[MAXBLOCK]; static u_char dep1[MAXBLOCK]; static u_char dep2[MAXBLOCK]; static u_char lt1[MAXBLOCK]; static int imm[MAXBLOCK]; static u_int ba[MAXBLOCK]; static char likely[MAXBLOCK]; static char is_ds[MAXBLOCK]; static char ooo[MAXBLOCK]; static uint64_t unneeded_reg[MAXBLOCK]; static uint64_t unneeded_reg_upper[MAXBLOCK]; static uint64_t branch_unneeded_reg[MAXBLOCK]; static uint64_t branch_unneeded_reg_upper[MAXBLOCK]; static uint64_t p32[MAXBLOCK]; static uint64_t pr32[MAXBLOCK]; static signed char regmap_pre[MAXBLOCK][HOST_REGS]; #ifdef ASSEM_DEBUG static signed char regmap[MAXBLOCK][HOST_REGS]; static signed char regmap_entry[MAXBLOCK][HOST_REGS]; #endif static uint64_t constmap[MAXBLOCK][HOST_REGS]; static struct regstat regs[MAXBLOCK]; static struct regstat branch_regs[MAXBLOCK]; static signed char minimum_free_regs[MAXBLOCK]; static u_int needed_reg[MAXBLOCK]; static uint64_t requires_32bit[MAXBLOCK]; static u_int wont_dirty[MAXBLOCK]; static u_int will_dirty[MAXBLOCK]; static int ccadj[MAXBLOCK]; static int slen; static u_int instr_addr[MAXBLOCK]; static u_int link_addr[MAXBLOCK][3]; static int linkcount; static u_int stubs[MAXBLOCK*3][8]; static int stubcount; static int literalcount; static int is_delayslot; static int cop1_usable; u_char *out; struct ll_entry *jump_in[4096]; static struct ll_entry *jump_out[4096]; struct ll_entry *jump_dirty[4096]; ALIGN(16, u_int hash_table[65536][4]); ALIGN(16, static char shadow[2097152]); static char *copy; static int expirep; u_int using_tlb; static u_int stop_after_jal; /* registers that may be allocated */ /* 1-31 gpr */ #define HIREG 32 // hi #define LOREG 33 // lo #define FSREG 34 // FPU status (FCSR) #define CSREG 35 // Coprocessor status #define CCREG 36 // Cycle count #define INVCP 37 // Pointer to invalid_code #define MMREG 38 // Pointer to memory_map #define ROREG 39 // ram offset (if rdram!=0x80000000) #define TEMPREG 40 #define FTEMP 40 // FPU temporary register #define PTEMP 41 // Prefetch temporary register #define TLREG 42 // TLB mapping offset #define RHASH 43 // Return address hash #define RHTBL 44 // Return address hash table address #define RTEMP 45 // JR/JALR address register #define MAXREG 45 #define AGEN1 46 // Address generation temporary register #define AGEN2 47 // Address generation temporary register #define MGEN1 48 // Maptable address generation temporary register #define MGEN2 49 // Maptable address generation temporary register #define BTREG 50 // Branch target temporary register /* instruction types */ #define NOP 0 // No operation #define LOAD 1 // Load #define STORE 2 // Store #define LOADLR 3 // Unaligned load #define STORELR 4 // Unaligned store #define MOV 5 // Move #define ALU 6 // Arithmetic/logic #define MULTDIV 7 // Multiply/divide #define SHIFT 8 // Shift by register #define SHIFTIMM 9// Shift by immediate #define IMM16 10 // 16-bit immediate #define RJUMP 11 // Unconditional jump to register #define UJUMP 12 // Unconditional jump #define CJUMP 13 // Conditional branch (BEQ/BNE/BGTZ/BLEZ) #define SJUMP 14 // Conditional branch (regimm format) #define COP0 15 // Coprocessor 0 #define COP1 16 // Coprocessor 1 #define C1LS 17 // Coprocessor 1 load/store #define FJUMP 18 // Conditional branch (floating point) #define FLOAT 19 // Floating point unit #define FCONV 20 // Convert integer to float #define FCOMP 21 // Floating point compare (sets FSREG) #define SYSCALL 22// SYSCALL #define OTHER 23 // Other #define SPAN 24 // Branch/delay slot spans 2 pages #define NI 25 // Not implemented /* stubs */ #define CC_STUB 1 #define FP_STUB 2 #define LOADB_STUB 3 #define LOADH_STUB 4 #define LOADW_STUB 5 #define LOADD_STUB 6 #define LOADBU_STUB 7 #define LOADHU_STUB 8 #define STOREB_STUB 9 #define STOREH_STUB 10 #define STOREW_STUB 11 #define STORED_STUB 12 #define STORELR_STUB 13 #define INVCODE_STUB 14 /* branch codes */ #define TAKEN 1 #define NOTTAKEN 2 #define NULLDS 3 /* bug-fix to implement __clear_cache (missing in Android; http://code.google.com/p/android/issues/detail?id=1803) */ void __clear_cache_bugfix(char* begin, char *end); #ifdef ANDROID #define __clear_cache __clear_cache_bugfix #endif // asm linkage #ifdef __cplusplus extern "C" { #endif int new_recompile_block(int addr); void *get_addr_ht(u_int vaddr); void *get_addr(u_int vaddr); void *get_addr_32(u_int vaddr,u_int flags); void add_link(u_int vaddr,void *src); void clean_blocks(u_int page); void dyna_linker(); void dyna_linker_ds(); void verify_code(); void verify_code_vm(); void verify_code_ds(); void cc_interrupt(); void fp_exception(); void fp_exception_ds(); void jump_syscall(); void jump_eret(); #ifdef __cplusplus } #endif static void remove_hash(int vaddr); #if NEW_DYNAREC == NEW_DYNAREC_ARM static void invalidate_addr(u_int addr); #endif // TLB void TLBWI_new(); void TLBWR_new(); #ifdef __cplusplus extern "C" { #endif void read_nomem_new(void); void read_nomemb_new(void); void read_nomemh_new(void); void read_nomemd_new(void); void write_nomem_new(void); void write_nomemb_new(void); void write_nomemh_new(void); void write_nomemd_new(void); void write_rdram_new(void); void write_rdramb_new(void); void write_rdramh_new(void); void write_rdramd_new(void); extern u_int memory_map[1048576]; #ifdef __cplusplus } #endif // Needed by assembler static void wb_register(signed char r,signed char regmap[],uint64_t dirty,uint64_t is32); static void wb_dirtys(signed char i_regmap[],uint64_t i_is32,uint64_t i_dirty); static void wb_needed_dirtys(signed char i_regmap[],uint64_t i_is32,uint64_t i_dirty,int addr); static void load_all_regs(signed char i_regmap[]); static void load_needed_regs(signed char i_regmap[],signed char next_regmap[]); static void load_regs_entry(int t); static void load_all_consts(signed char regmap[],int is32,u_int dirty,int i); static void add_stub(int type,int addr,int retaddr,int a,int b,int c,int d,int e); static void add_to_linker(int addr,int target,int ext); static int verify_dirty(void *addr); //static int tracedebug=0; //#define DEBUG_CYCLE_COUNT 1 // Uncomment these two lines to generate debug output: //#define ASSEM_DEBUG 1 //#define INV_DEBUG 1 // Uncomment this line to output the number of NOTCOMPILED blocks as they occur: //#define COUNT_NOTCOMPILEDS 1 #if defined (COUNT_NOTCOMPILEDS ) int notcompiledCount = 0; #endif #ifdef __cplusplus static void nullf(...) {} #else static void nullf() {} #endif #if defined( ASSEM_DEBUG ) #define assem_debug(...) DebugMessage(M64MSG_VERBOSE, __VA_ARGS__) #else #define assem_debug nullf #endif #if defined( INV_DEBUG ) #define inv_debug(...) DebugMessage(M64MSG_VERBOSE, __VA_ARGS__) #else #define inv_debug nullf #endif #define log_message(...) DebugMessage(M64MSG_VERBOSE, __VA_ARGS__) static void tlb_hacks() { // Goldeneye hack if (strncmp((char *) ROM_HEADER.Name, "GOLDENEYE",9) == 0) { u_int addr; int n; switch (ROM_HEADER.Country_code&0xFF) { case 0x45: // U addr=0x34b30; break; case 0x4A: // J addr=0x34b70; break; case 0x50: // E addr=0x329f0; break; default: // Unknown country code addr=0; break; } u_int rom_addr=(u_int)g_rom; #ifdef ROM_COPY // Since memory_map is 32-bit, on 64-bit systems the rom needs to be // in the lower 4G of memory to use this hack. Copy it if necessary. if((void *)g_rom>(void *)0xffffffff) { munmap(ROM_COPY, 67108864); if(mmap(ROM_COPY, 12582912, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0) <= 0) {DebugMessage(M64MSG_ERROR, "mmap() failed");} memcpy(ROM_COPY,g_rom,12582912); rom_addr=(u_int)ROM_COPY; } #endif if(addr) { for(n=0x7F000;n<0x80000;n++) { memory_map[n]=(((u_int)(rom_addr+addr-0x7F000000))>>2)|0x40000000; } } } } // Get address from virtual address // This is called from the recompiled JR/JALR instructions void *get_addr(u_int vaddr) { u_int page=(vaddr^0x80000000)>>12; u_int vpage=page; if(page>262143&&tlb_LUT_r[vaddr>>12]) page=(tlb_LUT_r[vaddr>>12]^0x80000000)>>12; if(page>2048) page=2048+(page&2047); if(vpage>262143&&tlb_LUT_r[vaddr>>12]) vpage&=2047; // jump_dirty uses a hash of the virtual address instead if(vpage>2048) vpage=2048+(vpage&2047); struct ll_entry *head; //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (get_addr %x,page %d)",g_cp0_regs[CP0_COUNT_REG],next_interupt,vaddr,page); head=jump_in[page]; while(head!=NULL) { if(head->vaddr==vaddr&&head->reg32==0) { //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (get_addr match %x: %x)",g_cp0_regs[CP0_COUNT_REG],next_interupt,vaddr,(int)head->addr); u_int *ht_bin=hash_table[((vaddr>>16)^vaddr)&0xFFFF]; ht_bin[3]=ht_bin[1]; ht_bin[2]=ht_bin[0]; ht_bin[1]=(int)head->addr; ht_bin[0]=vaddr; return head->addr; } head=head->next; } head=jump_dirty[vpage]; while(head!=NULL) { if(head->vaddr==vaddr&&head->reg32==0) { //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (get_addr match dirty %x: %x)",g_cp0_regs[CP0_COUNT_REG],next_interupt,vaddr,(int)head->addr); // Don't restore blocks which are about to expire from the cache if((((u_int)head->addr-(u_int)out)<<(32-TARGET_SIZE_2))>0x60000000+(MAX_OUTPUT_BLOCK_SIZE<<(32-TARGET_SIZE_2))) if(verify_dirty(head->addr)) { //DebugMessage(M64MSG_VERBOSE, "restore candidate: %x (%d) d=%d",vaddr,page,invalid_code[vaddr>>12]); invalid_code[vaddr>>12]=0; memory_map[vaddr>>12]|=0x40000000; if(vpage<2048) { if(tlb_LUT_r[vaddr>>12]) { invalid_code[tlb_LUT_r[vaddr>>12]>>12]=0; memory_map[tlb_LUT_r[vaddr>>12]>>12]|=0x40000000; } restore_candidate[vpage>>3]|=1<<(vpage&7); } else restore_candidate[page>>3]|=1<<(page&7); u_int *ht_bin=hash_table[((vaddr>>16)^vaddr)&0xFFFF]; if(ht_bin[0]==vaddr) { ht_bin[1]=(int)head->addr; // Replace existing entry } else { ht_bin[3]=ht_bin[1]; ht_bin[2]=ht_bin[0]; ht_bin[1]=(int)head->addr; ht_bin[0]=vaddr; } return head->addr; } } head=head->next; } //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (get_addr no-match %x)",g_cp0_regs[CP0_COUNT_REG],next_interupt,vaddr); int r=new_recompile_block(vaddr); if(r==0) return get_addr(vaddr); // Execute in unmapped page, generate pagefault execption g_cp0_regs[CP0_STATUS_REG]|=2; g_cp0_regs[CP0_CAUSE_REG]=(vaddr<<31)|0x8; g_cp0_regs[CP0_EPC_REG]=(vaddr&1)?vaddr-5:vaddr; g_cp0_regs[CP0_BADVADDR_REG]=(vaddr&~1); g_cp0_regs[CP0_CONTEXT_REG]=(g_cp0_regs[CP0_CONTEXT_REG]&0xFF80000F)|((g_cp0_regs[CP0_BADVADDR_REG]>>9)&0x007FFFF0); g_cp0_regs[CP0_ENTRYHI_REG]=g_cp0_regs[CP0_BADVADDR_REG]&0xFFFFE000; return get_addr_ht(0x80000000); } // Look up address in hash table first void *get_addr_ht(u_int vaddr) { //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (get_addr_ht %x)",g_cp0_regs[CP0_COUNT_REG],next_interupt,vaddr); u_int *ht_bin=hash_table[((vaddr>>16)^vaddr)&0xFFFF]; if(ht_bin[0]==vaddr) return (void *)ht_bin[1]; if(ht_bin[2]==vaddr) return (void *)ht_bin[3]; return get_addr(vaddr); } void *get_addr_32(u_int vaddr,u_int flags) { //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (get_addr_32 %x,flags %x)",g_cp0_regs[CP0_COUNT_REG],next_interupt,vaddr,flags); u_int *ht_bin=hash_table[((vaddr>>16)^vaddr)&0xFFFF]; if(ht_bin[0]==vaddr) return (void *)ht_bin[1]; if(ht_bin[2]==vaddr) return (void *)ht_bin[3]; u_int page=(vaddr^0x80000000)>>12; u_int vpage=page; if(page>262143&&tlb_LUT_r[vaddr>>12]) page=(tlb_LUT_r[vaddr>>12]^0x80000000)>>12; if(page>2048) page=2048+(page&2047); if(vpage>262143&&tlb_LUT_r[vaddr>>12]) vpage&=2047; // jump_dirty uses a hash of the virtual address instead if(vpage>2048) vpage=2048+(vpage&2047); struct ll_entry *head; head=jump_in[page]; while(head!=NULL) { if(head->vaddr==vaddr&&(head->reg32&flags)==0) { //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (get_addr_32 match %x: %x)",g_cp0_regs[CP0_COUNT_REG],next_interupt,vaddr,(int)head->addr); if(head->reg32==0) { u_int *ht_bin=hash_table[((vaddr>>16)^vaddr)&0xFFFF]; if(ht_bin[0]==-1) { ht_bin[1]=(int)head->addr; ht_bin[0]=vaddr; }else if(ht_bin[2]==-1) { ht_bin[3]=(int)head->addr; ht_bin[2]=vaddr; } //ht_bin[3]=ht_bin[1]; //ht_bin[2]=ht_bin[0]; //ht_bin[1]=(int)head->addr; //ht_bin[0]=vaddr; } return head->addr; } head=head->next; } head=jump_dirty[vpage]; while(head!=NULL) { if(head->vaddr==vaddr&&(head->reg32&flags)==0) { //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (get_addr_32 match dirty %x: %x)",g_cp0_regs[CP0_COUNT_REG],next_interupt,vaddr,(int)head->addr); // Don't restore blocks which are about to expire from the cache if((((u_int)head->addr-(u_int)out)<<(32-TARGET_SIZE_2))>0x60000000+(MAX_OUTPUT_BLOCK_SIZE<<(32-TARGET_SIZE_2))) if(verify_dirty(head->addr)) { //DebugMessage(M64MSG_VERBOSE, "restore candidate: %x (%d) d=%d",vaddr,page,invalid_code[vaddr>>12]); invalid_code[vaddr>>12]=0; memory_map[vaddr>>12]|=0x40000000; if(vpage<2048) { if(tlb_LUT_r[vaddr>>12]) { invalid_code[tlb_LUT_r[vaddr>>12]>>12]=0; memory_map[tlb_LUT_r[vaddr>>12]>>12]|=0x40000000; } restore_candidate[vpage>>3]|=1<<(vpage&7); } else restore_candidate[page>>3]|=1<<(page&7); if(head->reg32==0) { u_int *ht_bin=hash_table[((vaddr>>16)^vaddr)&0xFFFF]; if(ht_bin[0]==-1) { ht_bin[1]=(int)head->addr; ht_bin[0]=vaddr; }else if(ht_bin[2]==-1) { ht_bin[3]=(int)head->addr; ht_bin[2]=vaddr; } //ht_bin[3]=ht_bin[1]; //ht_bin[2]=ht_bin[0]; //ht_bin[1]=(int)head->addr; //ht_bin[0]=vaddr; } return head->addr; } } head=head->next; } //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (get_addr_32 no-match %x,flags %x)",g_cp0_regs[CP0_COUNT_REG],next_interupt,vaddr,flags); int r=new_recompile_block(vaddr); if(r==0) return get_addr(vaddr); // Execute in unmapped page, generate pagefault execption g_cp0_regs[CP0_STATUS_REG]|=2; g_cp0_regs[CP0_CAUSE_REG]=(vaddr<<31)|0x8; g_cp0_regs[CP0_EPC_REG]=(vaddr&1)?vaddr-5:vaddr; g_cp0_regs[CP0_BADVADDR_REG]=(vaddr&~1); g_cp0_regs[CP0_CONTEXT_REG]=(g_cp0_regs[CP0_CONTEXT_REG]&0xFF80000F)|((g_cp0_regs[CP0_BADVADDR_REG]>>9)&0x007FFFF0); g_cp0_regs[CP0_ENTRYHI_REG]=g_cp0_regs[CP0_BADVADDR_REG]&0xFFFFE000; return get_addr_ht(0x80000000); } static void clear_all_regs(signed char regmap[]) { int hr; for (hr=0;hrregmap[hr]&63)==reg) { cur->dirty|=(uint64_t)1<dirty>>hr)&1) { reg=cur->regmap[hr]; if(reg>=64) if((cur->is32>>(reg&63))&1) cur->regmap[hr]=-1; } } } static void set_const(struct regstat *cur,signed char reg,uint64_t value) { int hr; if(!reg) return; for (hr=0;hrregmap[hr]==reg) { cur->isconst|=1<constmap[hr]=value; } else if((cur->regmap[hr]^64)==reg) { cur->isconst|=1<constmap[hr]=value>>32; } } } static void clear_const(struct regstat *cur,signed char reg) { int hr; if(!reg) return; for (hr=0;hrregmap[hr]&63)==reg) { cur->isconst&=~(1<regmap[hr]&63)==reg) { return (cur->isconst>>hr)&1; } } return 0; } static uint64_t get_const(struct regstat *cur,signed char reg) { int hr; if(!reg) return 0; for (hr=0;hrregmap[hr]==reg) { return cur->constmap[hr]; } } DebugMessage(M64MSG_ERROR, "Unknown constant in r%d",reg); exit(1); } // Least soon needed registers // Look at the next ten instructions and see which registers // will be used. Try not to reallocate these. static void lsn(u_char hsn[], int i, int *preferred_reg) { int j; int b=-1; for(j=0;j<9;j++) { if(i+j>=slen) { j=slen-i-1; break; } if(itype[i+j]==UJUMP||itype[i+j]==RJUMP||(source[i+j]>>16)==0x1000) { // Don't go past an unconditonal jump j++; break; } } for(;j>=0;j--) { if(rs1[i+j]) hsn[rs1[i+j]]=j; if(rs2[i+j]) hsn[rs2[i+j]]=j; if(rt1[i+j]) hsn[rt1[i+j]]=j; if(rt2[i+j]) hsn[rt2[i+j]]=j; if(itype[i+j]==STORE || itype[i+j]==STORELR) { // Stores can allocate zero hsn[rs1[i+j]]=j; hsn[rs2[i+j]]=j; } // On some architectures stores need invc_ptr #if defined(HOST_IMM8) if(itype[i+j]==STORE || itype[i+j]==STORELR || (opcode[i+j]&0x3b)==0x39) { hsn[INVCP]=j; } #endif if(i+j>=0&&(itype[i+j]==UJUMP||itype[i+j]==CJUMP||itype[i+j]==SJUMP||itype[i+j]==FJUMP)) { hsn[CCREG]=j; b=j; } } if(b>=0) { if(ba[i+b]>=start && ba[i+b]<(start+slen*4)) { // Follow first branch int t=(ba[i+b]-start)>>2; j=7-b;if(t+j>=slen) j=slen-t-1; for(;j>=0;j--) { if(rs1[t+j]) if(hsn[rs1[t+j]]>j+b+2) hsn[rs1[t+j]]=j+b+2; if(rs2[t+j]) if(hsn[rs2[t+j]]>j+b+2) hsn[rs2[t+j]]=j+b+2; //if(rt1[t+j]) if(hsn[rt1[t+j]]>j+b+2) hsn[rt1[t+j]]=j+b+2; //if(rt2[t+j]) if(hsn[rt2[t+j]]>j+b+2) hsn[rt2[t+j]]=j+b+2; } } // TODO: preferred register based on backward branch } // Delay slot should preferably not overwrite branch conditions or cycle count if(i>0&&(itype[i-1]==RJUMP||itype[i-1]==UJUMP||itype[i-1]==CJUMP||itype[i-1]==SJUMP||itype[i-1]==FJUMP)) { if(rs1[i-1]) if(hsn[rs1[i-1]]>1) hsn[rs1[i-1]]=1; if(rs2[i-1]) if(hsn[rs2[i-1]]>1) hsn[rs2[i-1]]=1; hsn[CCREG]=1; // ...or hash tables hsn[RHASH]=1; hsn[RHTBL]=1; } // Coprocessor load/store needs FTEMP, even if not declared if(itype[i]==C1LS) { hsn[FTEMP]=0; } // Load L/R also uses FTEMP as a temporary register if(itype[i]==LOADLR) { hsn[FTEMP]=0; } // Also 64-bit SDL/SDR if(opcode[i]==0x2c||opcode[i]==0x2d) { hsn[FTEMP]=0; } // Don't remove the TLB registers either if(itype[i]==LOAD || itype[i]==LOADLR || itype[i]==STORE || itype[i]==STORELR || itype[i]==C1LS ) { hsn[TLREG]=0; } // Don't remove the miniht registers if(itype[i]==UJUMP||itype[i]==RJUMP) { hsn[RHASH]=0; hsn[RHTBL]=0; } } // We only want to allocate registers if we're going to use them again soon static int needed_again(int r, int i) { int j; /*int b=-1;*/ int rn=10; if(i>0&&(itype[i-1]==UJUMP||itype[i-1]==RJUMP||(source[i-1]>>16)==0x1000)) { if(ba[i-1]start+slen*4-4) return 0; // Don't need any registers if exiting the block } for(j=0;j<9;j++) { if(i+j>=slen) { j=slen-i-1; break; } if(itype[i+j]==UJUMP||itype[i+j]==RJUMP||(source[i+j]>>16)==0x1000) { // Don't go past an unconditonal jump j++; break; } if(itype[i+j]==SYSCALL||((source[i+j]&0xfc00003f)==0x0d)) { break; } } for(;j>=1;j--) { if(rs1[i+j]==r) rn=j; if(rs2[i+j]==r) rn=j; if((unneeded_reg[i+j]>>r)&1) rn=10; if(i+j>=0&&(itype[i+j]==UJUMP||itype[i+j]==CJUMP||itype[i+j]==SJUMP||itype[i+j]==FJUMP)) { /*b=j;*/ } } /* if(b>=0) { if(ba[i+b]>=start && ba[i+b]<(start+slen*4)) { // Follow first branch int o=rn; int t=(ba[i+b]-start)>>2; j=7-b;if(t+j>=slen) j=slen-t-1; for(;j>=0;j--) { if(!((unneeded_reg[t+j]>>r)&1)) { if(rs1[t+j]==r) if(rn>j+b+2) rn=j+b+2; if(rs2[t+j]==r) if(rn>j+b+2) rn=j+b+2; } else rn=o; } } }*/ if(rn<10) return 1; return 0; } // Try to match register allocations at the end of a loop with those // at the beginning static int loop_reg(int i, int r, int hr) { int j,k; for(j=0;j<9;j++) { if(i+j>=slen) { j=slen-i-1; break; } if(itype[i+j]==UJUMP||itype[i+j]==RJUMP||(source[i+j]>>16)==0x1000) { // Don't go past an unconditonal jump j++; break; } } k=0; if(i>0){ if(itype[i-1]==UJUMP||itype[i-1]==CJUMP||itype[i-1]==SJUMP||itype[i-1]==FJUMP) k--; } for(;k>r)&1)) return hr; if(r>64&&((unneeded_reg_upper[i+k]>>r)&1)) return hr; if(i+k>=0&&(itype[i+k]==UJUMP||itype[i+k]==CJUMP||itype[i+k]==SJUMP||itype[i+k]==FJUMP)) { if(ba[i+k]>=start && ba[i+k]<(start+i*4)) { int t=(ba[i+k]-start)>>2; int reg=get_reg(regs[t].regmap_entry,r); if(reg>=0) return reg; //reg=get_reg(regs[t+1].regmap_entry,r); //if(reg>=0) return reg; } } } return hr; } // Allocate every register, preserving source/target regs static void alloc_all(struct regstat *cur,int i) { int hr; for(hr=0;hrregmap[hr]&63)!=rs1[i])&&((cur->regmap[hr]&63)!=rs2[i])&& ((cur->regmap[hr]&63)!=rt1[i])&&((cur->regmap[hr]&63)!=rt2[i])) { cur->regmap[hr]=-1; cur->dirty&=~(1<regmap[hr]&63)==0) { cur->regmap[hr]=-1; cur->dirty&=~(1<>32) // ,(int)reg[LOREG],(int)(reg[LOREG]>>32)); } static void divu64(uint64_t dividend,uint64_t divisor) { lo=dividend/divisor; hi=dividend%divisor; //DebugMessage(M64MSG_VERBOSE, "TRACE: ddivu %8x%8x %8x%8x",(int)reg[HIREG],(int)(reg[HIREG]>>32) // ,(int)reg[LOREG],(int)(reg[LOREG]>>32)); } static void mult64(int64_t m1,int64_t m2) { unsigned long long int op1, op2, op3, op4; unsigned long long int result1, result2, result3, result4; unsigned long long int temp1, temp2, temp3, temp4; int sign = 0; if (m1 < 0) { op2 = -m1; sign = 1 - sign; } else op2 = m1; if (m2 < 0) { op4 = -m2; sign = 1 - sign; } else op4 = m2; op1 = op2 & 0xFFFFFFFF; op2 = (op2 >> 32) & 0xFFFFFFFF; op3 = op4 & 0xFFFFFFFF; op4 = (op4 >> 32) & 0xFFFFFFFF; temp1 = op1 * op3; temp2 = (temp1 >> 32) + op1 * op4; temp3 = op2 * op3; temp4 = (temp3 >> 32) + op2 * op4; result1 = temp1 & 0xFFFFFFFF; result2 = temp2 + (temp3 & 0xFFFFFFFF); result3 = (result2 >> 32) + temp4; result4 = (result3 >> 32); lo = result1 | (result2 << 32); hi = (result3 & 0xFFFFFFFF) | (result4 << 32); if (sign) { hi = ~hi; if (!lo) hi++; else lo = ~lo + 1; } } #if NEW_DYNAREC == NEW_DYNAREC_ARM static void multu64(uint64_t m1,uint64_t m2) { unsigned long long int op1, op2, op3, op4; unsigned long long int result1, result2, result3, result4; unsigned long long int temp1, temp2, temp3, temp4; op1 = m1 & 0xFFFFFFFF; op2 = (m1 >> 32) & 0xFFFFFFFF; op3 = m2 & 0xFFFFFFFF; op4 = (m2 >> 32) & 0xFFFFFFFF; temp1 = op1 * op3; temp2 = (temp1 >> 32) + op1 * op4; temp3 = op2 * op3; temp4 = (temp3 >> 32) + op2 * op4; result1 = temp1 & 0xFFFFFFFF; result2 = temp2 + (temp3 & 0xFFFFFFFF); result3 = (result2 >> 32) + temp4; result4 = (result3 >> 32); lo = result1 | (result2 << 32); hi = (result3 & 0xFFFFFFFF) | (result4 << 32); //DebugMessage(M64MSG_VERBOSE, "TRACE: dmultu %8x%8x %8x%8x",(int)reg[HIREG],(int)(reg[HIREG]>>32) // ,(int)reg[LOREG],(int)(reg[LOREG]>>32)); } #endif static uint64_t ldl_merge(uint64_t original,uint64_t loaded,u_int bits) { if(bits) { original<<=64-bits; original>>=64-bits; loaded<<=bits; original|=loaded; } else original=loaded; return original; } static uint64_t ldr_merge(uint64_t original,uint64_t loaded,u_int bits) { if(bits^56) { original>>=64-(bits^56); original<<=64-(bits^56); loaded>>=bits^56; original|=loaded; } else original=loaded; return original; } #if NEW_DYNAREC == NEW_DYNAREC_X86 #include "x86/assem_x86.c" #elif NEW_DYNAREC == NEW_DYNAREC_ARM #include "arm/assem_arm.c" #else #error Unsupported dynarec architecture #endif // Add virtual address mapping to linked list static void ll_add(struct ll_entry **head,int vaddr,void *addr) { struct ll_entry *new_entry; new_entry=(struct ll_entry *)malloc(sizeof(struct ll_entry)); assert(new_entry!=NULL); new_entry->vaddr=vaddr; new_entry->reg32=0; new_entry->addr=addr; new_entry->next=*head; *head=new_entry; } // Add virtual address mapping for 32-bit compiled block static void ll_add_32(struct ll_entry **head,int vaddr,u_int reg32,void *addr) { struct ll_entry *new_entry; new_entry=(struct ll_entry *)malloc(sizeof(struct ll_entry)); assert(new_entry!=NULL); new_entry->vaddr=vaddr; new_entry->reg32=reg32; new_entry->addr=addr; new_entry->next=*head; *head=new_entry; } // Check if an address is already compiled // but don't return addresses which are about to expire from the cache static void *check_addr(u_int vaddr) { u_int *ht_bin=hash_table[((vaddr>>16)^vaddr)&0xFFFF]; if(ht_bin[0]==vaddr) { if(((ht_bin[1]-MAX_OUTPUT_BLOCK_SIZE-(u_int)out)<<(32-TARGET_SIZE_2))>0x60000000+(MAX_OUTPUT_BLOCK_SIZE<<(32-TARGET_SIZE_2))) if(isclean(ht_bin[1])) return (void *)ht_bin[1]; } if(ht_bin[2]==vaddr) { if(((ht_bin[3]-MAX_OUTPUT_BLOCK_SIZE-(u_int)out)<<(32-TARGET_SIZE_2))>0x60000000+(MAX_OUTPUT_BLOCK_SIZE<<(32-TARGET_SIZE_2))) if(isclean(ht_bin[3])) return (void *)ht_bin[3]; } u_int page=(vaddr^0x80000000)>>12; if(page>262143&&tlb_LUT_r[vaddr>>12]) page=(tlb_LUT_r[vaddr>>12]^0x80000000)>>12; if(page>2048) page=2048+(page&2047); struct ll_entry *head; head=jump_in[page]; while(head!=NULL) { if(head->vaddr==vaddr&&head->reg32==0) { if((((u_int)head->addr-(u_int)out)<<(32-TARGET_SIZE_2))>0x60000000+(MAX_OUTPUT_BLOCK_SIZE<<(32-TARGET_SIZE_2))) { // Update existing entry with current address if(ht_bin[0]==vaddr) { ht_bin[1]=(int)head->addr; return head->addr; } if(ht_bin[2]==vaddr) { ht_bin[3]=(int)head->addr; return head->addr; } // Insert into hash table with low priority. // Don't evict existing entries, as they are probably // addresses that are being accessed frequently. if(ht_bin[0]==-1) { ht_bin[1]=(int)head->addr; ht_bin[0]=vaddr; }else if(ht_bin[2]==-1) { ht_bin[3]=(int)head->addr; ht_bin[2]=vaddr; } return head->addr; } } head=head->next; } return 0; } static void remove_hash(int vaddr) { //DebugMessage(M64MSG_VERBOSE, "remove hash: %x",vaddr); u_int *ht_bin=hash_table[(((vaddr)>>16)^vaddr)&0xFFFF]; if(ht_bin[2]==vaddr) { ht_bin[2]=ht_bin[3]=-1; } if(ht_bin[0]==vaddr) { ht_bin[0]=ht_bin[2]; ht_bin[1]=ht_bin[3]; ht_bin[2]=ht_bin[3]=-1; } } static void ll_remove_matching_addrs(struct ll_entry **head,int addr,int shift) { struct ll_entry *next; while(*head) { if((((u_int)((*head)->addr)-(u_int)base_addr)>>shift)==((addr-(u_int)base_addr)>>shift) || (((u_int)((*head)->addr)-(u_int)base_addr-MAX_OUTPUT_BLOCK_SIZE)>>shift)==((addr-(u_int)base_addr)>>shift)) { inv_debug("EXP: Remove pointer to %x (%x)\n",(int)(*head)->addr,(*head)->vaddr); remove_hash((*head)->vaddr); next=(*head)->next; free(*head); *head=next; } else { head=&((*head)->next); } } } // Remove all entries from linked list static void ll_clear(struct ll_entry **head) { struct ll_entry *cur; struct ll_entry *next; if((cur=*head)) { *head=0; while(cur) { next=cur->next; free(cur); cur=next; } } } // Dereference the pointers and remove if it matches static void ll_kill_pointers(struct ll_entry *head,int addr,int shift) { while(head) { u_int ptr=get_pointer(head->addr); inv_debug("EXP: Lookup pointer to %x at %x (%x)\n",(int)ptr,(int)head->addr,head->vaddr); if((((ptr-(u_int)base_addr)>>shift)==((addr-(u_int)base_addr)>>shift)) || (((ptr-(u_int)base_addr-MAX_OUTPUT_BLOCK_SIZE)>>shift)==((addr-(u_int)base_addr)>>shift))) { inv_debug("EXP: Kill pointer at %x (%x)\n",(int)head->addr,head->vaddr); u_int host_addr=(int)kill_pointer(head->addr); #if NEW_DYNAREC == NEW_DYNAREC_ARM needs_clear_cache[(host_addr-(u_int)base_addr)>>17]|=1<<(((host_addr-(u_int)base_addr)>>12)&31); #else /* avoid unused variable warning */ (void)host_addr; #endif } head=head->next; } } // This is called when we write to a compiled block (see do_invstub) static void invalidate_page(u_int page) { struct ll_entry *head; struct ll_entry *next; head=jump_in[page]; jump_in[page]=0; while(head!=NULL) { inv_debug("INVALIDATE: %x\n",head->vaddr); remove_hash(head->vaddr); next=head->next; free(head); head=next; } head=jump_out[page]; jump_out[page]=0; while(head!=NULL) { inv_debug("INVALIDATE: kill pointer to %x (%x)\n",head->vaddr,(int)head->addr); u_int host_addr=(int)kill_pointer(head->addr); #if NEW_DYNAREC == NEW_DYNAREC_ARM needs_clear_cache[(host_addr-(u_int)base_addr)>>17]|=1<<(((host_addr-(u_int)base_addr)>>12)&31); #else /* avoid unused variable warning */ (void)host_addr; #endif next=head->next; free(head); head=next; } } void invalidate_block(u_int block) { u_int page,vpage; page=vpage=block^0x80000; if(page>262143&&tlb_LUT_r[block]) page=(tlb_LUT_r[block]^0x80000000)>>12; if(page>2048) page=2048+(page&2047); if(vpage>262143&&tlb_LUT_r[block]) vpage&=2047; // jump_dirty uses a hash of the virtual address instead if(vpage>2048) vpage=2048+(vpage&2047); inv_debug("INVALIDATE: %x (%d)\n",block<<12,page); //inv_debug("invalid_code[block]=%d\n",invalid_code[block]); u_int first,last; first=last=page; struct ll_entry *head; head=jump_dirty[vpage]; //DebugMessage(M64MSG_VERBOSE, "page=%d vpage=%d",page,vpage); while(head!=NULL) { u_int start,end; if(vpage>2047||(head->vaddr>>12)==block) { // Ignore vaddr hash collision get_bounds((int)head->addr,&start,&end); //DebugMessage(M64MSG_VERBOSE, "start: %x end: %x",start,end); if(page<2048&&start>=0x80000000&&end<0x80800000) { if(((start-(u_int)g_rdram)>>12)<=page&&((end-1-(u_int)g_rdram)>>12)>=page) { if((((start-(u_int)g_rdram)>>12)&2047)>12)&2047; if((((end-1-(u_int)g_rdram)>>12)&2047)>last) last=((end-1-(u_int)g_rdram)>>12)&2047; } } if(page<2048&&(signed int)start>=(signed int)0xC0000000&&(signed int)end>=(signed int)0xC0000000) { if(((start+memory_map[start>>12]-(u_int)g_rdram)>>12)<=page&&((end-1+memory_map[(end-1)>>12]-(u_int)g_rdram)>>12)>=page) { if((((start+memory_map[start>>12]-(u_int)g_rdram)>>12)&2047)>12]-(u_int)g_rdram)>>12)&2047; if((((end-1+memory_map[(end-1)>>12]-(u_int)g_rdram)>>12)&2047)>last) last=((end-1+memory_map[(end-1)>>12]-(u_int)g_rdram)>>12)&2047; } } } head=head->next; } //DebugMessage(M64MSG_VERBOSE, "first=%d last=%d",first,last); invalidate_page(page); assert(first+5>page); // NB: this assumes MAXBLOCK<=4096 (4 pages) assert(last>2; u_int real_block=tlb_LUT_w[block]>>12; invalid_code[real_block]=1; if(real_block>=0x80000&&real_block<0x80800) memory_map[real_block]=((u_int)g_rdram-0x80000000)>>2; } else if(block>=0x80000&&block<0x80800) memory_map[block]=((u_int)g_rdram-0x80000000)>>2; #ifdef USE_MINI_HT memset(mini_ht,-1,sizeof(mini_ht)); #endif } void invalidate_cached_code_new_dynarec(uint32_t address, size_t size) { size_t i; size_t begin; size_t end; if (size == 0) { begin = 0; end = 0xfffff; } else { begin = address >> 12; end = (address+size-1) >> 12; } for(i = begin; i <= end; ++i) invalidate_block(i); } #if NEW_DYNAREC == NEW_DYNAREC_ARM static void invalidate_addr(u_int addr) { invalidate_block(addr>>12); } #endif // This is called when loading a save state. // Anything could have changed, so invalidate everything. void invalidate_all_pages() { u_int page; for(page=0;page<4096;page++) invalidate_page(page); for(page=0;page<1048576;page++) if(!invalid_code[page]) { restore_candidate[(page&2047)>>3]|=1<<(page&7); restore_candidate[((page&2047)>>3)+256]|=1<<(page&7); } #if NEW_DYNAREC == NEW_DYNAREC_ARM __clear_cache((void *)base_addr,(void *)base_addr+(1<>2; if(!tlb_LUT_w[page]||!invalid_code[page]) memory_map[page]|=0x40000000; // Write protect } else memory_map[page]=-1; if(page==0x80000) page=0xC0000; } tlb_hacks(); } // Add an entry to jump_out after making a link void add_link(u_int vaddr,void *src) { u_int page=(vaddr^0x80000000)>>12; if(page>262143&&tlb_LUT_r[vaddr>>12]) page=(tlb_LUT_r[vaddr>>12]^0x80000000)>>12; if(page>4095) page=2048+(page&2047); inv_debug("add_link: %x -> %x (%d)\n",(int)src,vaddr,page); ll_add(jump_out+page,vaddr,src); //int ptr=get_pointer(src); //inv_debug("add_link: Pointer is to %x\n",(int)ptr); } // If a code block was found to be unmodified (bit was set in // restore_candidate) and it remains unmodified (bit is clear // in invalid_code) then move the entries for that 4K page from // the dirty list to the clean list. void clean_blocks(u_int page) { struct ll_entry *head; inv_debug("INV: clean_blocks page=%d\n",page); head=jump_dirty[page]; while(head!=NULL) { if(!invalid_code[head->vaddr>>12]) { // Don't restore blocks which are about to expire from the cache if((((u_int)head->addr-(u_int)out)<<(32-TARGET_SIZE_2))>0x60000000+(MAX_OUTPUT_BLOCK_SIZE<<(32-TARGET_SIZE_2))) { u_int start,end; if(verify_dirty(head->addr)) { //DebugMessage(M64MSG_VERBOSE, "Possibly Restore %x (%x)",head->vaddr, (int)head->addr); u_int i; u_int inv=0; get_bounds((int)head->addr,&start,&end); if(start-(u_int)g_rdram<0x800000) { for(i=(start-(u_int)g_rdram+0x80000000)>>12;i<=(end-1-(u_int)g_rdram+0x80000000)>>12;i++) { inv|=invalid_code[i]; } } if((signed int)head->vaddr>=(signed int)0xC0000000) { u_int addr = (head->vaddr+(memory_map[head->vaddr>>12]<<2)); //DebugMessage(M64MSG_VERBOSE, "addr=%x start=%x end=%x",addr,start,end); if(addr=end) inv=1; } else if((signed int)head->vaddr>=(signed int)0x80800000) { inv=1; } if(!inv) { void * clean_addr=(void *)get_clean_addr((int)head->addr); if((((u_int)clean_addr-(u_int)out)<<(32-TARGET_SIZE_2))>0x60000000+(MAX_OUTPUT_BLOCK_SIZE<<(32-TARGET_SIZE_2))) { u_int ppage=page; if(page<2048&&tlb_LUT_r[head->vaddr>>12]) ppage=(tlb_LUT_r[head->vaddr>>12]^0x80000000)>>12; inv_debug("INV: Restored %x (%x/%x)\n",head->vaddr, (int)head->addr, (int)clean_addr); //DebugMessage(M64MSG_VERBOSE, "page=%x, addr=%x",page,head->vaddr); //assert(head->vaddr>>12==(page|0x80000)); ll_add_32(jump_in+ppage,head->vaddr,head->reg32,clean_addr); u_int *ht_bin=hash_table[((head->vaddr>>16)^head->vaddr)&0xFFFF]; if(!head->reg32) { if(ht_bin[0]==head->vaddr) { ht_bin[1]=(int)clean_addr; // Replace existing entry } if(ht_bin[2]==head->vaddr) { ht_bin[3]=(int)clean_addr; // Replace existing entry } } } } } } } head=head->next; } } static void mov_alloc(struct regstat *current,int i) { // Note: Don't need to actually alloc the source registers if((~current->is32>>rs1[i])&1) { //alloc_reg64(current,i,rs1[i]); alloc_reg64(current,i,rt1[i]); current->is32&=~(1LL<is32|=(1LL<is32|=1LL<=0x38&&opcode2[i]<=0x3b) // DSLL/DSRL/DSRA { if(rt1[i]) { if(rs1[i]) alloc_reg64(current,i,rs1[i]); alloc_reg64(current,i,rt1[i]); current->is32&=~(1LL<is32&=~(1LL<is32&=~(1LL<is32|=1LL<is32|=1LL<is32|=1LL<is32&=~(1LL<=0x20&&opcode2[i]<=0x23) { // ADD/ADDU/SUB/SUBU if(rt1[i]) { if(rs1[i]&&rs2[i]) { alloc_reg(current,i,rs1[i]); alloc_reg(current,i,rs2[i]); } else { if(rs1[i]&&needed_again(rs1[i],i)) alloc_reg(current,i,rs1[i]); if(rs2[i]&&needed_again(rs2[i],i)) alloc_reg(current,i,rs2[i]); } alloc_reg(current,i,rt1[i]); } current->is32|=1LL<is32>>rs1[i])&(current->is32>>rs2[i])&1)) { alloc_reg64(current,i,rs1[i]); alloc_reg64(current,i,rs2[i]); alloc_reg(current,i,rt1[i]); } else { alloc_reg(current,i,rs1[i]); alloc_reg(current,i,rs2[i]); alloc_reg(current,i,rt1[i]); } } current->is32|=1LL<=0x24&&opcode2[i]<=0x27) { // AND/OR/XOR/NOR if(rt1[i]) { if(rs1[i]&&rs2[i]) { alloc_reg(current,i,rs1[i]); alloc_reg(current,i,rs2[i]); } else { if(rs1[i]&&needed_again(rs1[i],i)) alloc_reg(current,i,rs1[i]); if(rs2[i]&&needed_again(rs2[i],i)) alloc_reg(current,i,rs2[i]); } alloc_reg(current,i,rt1[i]); if(!((current->is32>>rs1[i])&(current->is32>>rs2[i])&1)) { if(!((current->uu>>rt1[i])&1)) { alloc_reg64(current,i,rt1[i]); } if(get_reg(current->regmap,rt1[i]|64)>=0) { if(rs1[i]&&rs2[i]) { alloc_reg64(current,i,rs1[i]); alloc_reg64(current,i,rs2[i]); } else { // Is is really worth it to keep 64-bit values in registers? #ifdef NATIVE_64BIT if(rs1[i]&&needed_again(rs1[i],i)) alloc_reg64(current,i,rs1[i]); if(rs2[i]&&needed_again(rs2[i],i)) alloc_reg64(current,i,rs2[i]); #endif } } current->is32&=~(1LL<is32|=1LL<=0x2c&&opcode2[i]<=0x2f) { // DADD/DADDU/DSUB/DSUBU if(rt1[i]) { if(rs1[i]&&rs2[i]) { if(!((current->uu>>rt1[i])&1)||get_reg(current->regmap,rt1[i]|64)>=0) { alloc_reg64(current,i,rs1[i]); alloc_reg64(current,i,rs2[i]); alloc_reg64(current,i,rt1[i]); } else { alloc_reg(current,i,rs1[i]); alloc_reg(current,i,rs2[i]); alloc_reg(current,i,rt1[i]); } } else { alloc_reg(current,i,rt1[i]); if(!((current->uu>>rt1[i])&1)||get_reg(current->regmap,rt1[i]|64)>=0) { // DADD used as move, or zeroing // If we have a 64-bit source, then make the target 64 bits too if(rs1[i]&&!((current->is32>>rs1[i])&1)) { if(get_reg(current->regmap,rs1[i])>=0) alloc_reg64(current,i,rs1[i]); alloc_reg64(current,i,rt1[i]); } else if(rs2[i]&&!((current->is32>>rs2[i])&1)) { if(get_reg(current->regmap,rs2[i])>=0) alloc_reg64(current,i,rs2[i]); alloc_reg64(current,i,rt1[i]); } if(opcode2[i]>=0x2e&&rs2[i]) { // DSUB used as negation - 64-bit result // If we have a 32-bit register, extend it to 64 bits if(get_reg(current->regmap,rs2[i])>=0) alloc_reg64(current,i,rs2[i]); alloc_reg64(current,i,rt1[i]); } } } if(rs1[i]&&rs2[i]) { current->is32&=~(1LL<is32&=~(1LL<is32>>rs1[i])&1) current->is32|=1LL<is32&=~(1LL<is32>>rs2[i])&1) current->is32|=1LL<is32|=1LL<is32&=~(1LL<uu>>rt1[i])&1)||get_reg(current->regmap,rt1[i]|64)>=0) { // TODO: Could preserve the 32-bit flag if the immediate is zero alloc_reg64(current,i,rt1[i]); alloc_reg64(current,i,rs1[i]); } clear_const(current,rs1[i]); clear_const(current,rt1[i]); } else if(opcode[i]==0x0a||opcode[i]==0x0b) { // SLTI/SLTIU if((~current->is32>>rs1[i])&1) alloc_reg64(current,i,rs1[i]); current->is32|=1LL<=0x0c&&opcode[i]<=0x0e) { // ANDI/ORI/XORI if(((~current->is32>>rs1[i])&1)&&opcode[i]>0x0c) { if(rs1[i]!=rt1[i]) { if(needed_again(rs1[i],i)) alloc_reg64(current,i,rs1[i]); alloc_reg64(current,i,rt1[i]); current->is32&=~(1LL<is32|=1LL<is32|=1LL<is32|=1LL<u&=~1LL; // Allow allocating r0 if it's the source register if(needed_again(rs1[i],i)) alloc_reg(current,i,rs1[i]); if(rt1[i]&&!((current->u>>rt1[i])&1)) { alloc_reg(current,i,rt1[i]); assert(get_reg(current->regmap,rt1[i])>=0); if(opcode[i]==0x27||opcode[i]==0x37) // LWU/LD { current->is32&=~(1LL<is32&=~(1LL<is32|=1LL<u&=~1LL; // Allow allocating r0 if necessary if(needed_again(rs1[i],i)) alloc_reg(current,i,rs1[i]); alloc_reg(current,i,rs2[i]); if(opcode[i]==0x2c||opcode[i]==0x2d||opcode[i]==0x3f) { // 64-bit SDL/SDR/SD alloc_reg64(current,i,rs2[i]); if(rs2[i]) alloc_reg(current,i,FTEMP); } // If using TLB, need a register for pointer to the mapping table if(using_tlb) alloc_reg(current,i,TLREG); #if defined(HOST_IMM8) // On CPUs without 32-bit immediates we need a pointer to invalid_code else alloc_reg(current,i,INVCP); #endif if(opcode[i]==0x2c||opcode[i]==0x2d) { // 64-bit SDL/SDR alloc_reg(current,i,FTEMP); } // We need a temporary register for address generation alloc_reg_temp(current,i,-1); minimum_free_regs[i]=1; } static void c1ls_alloc(struct regstat *current,int i) { //clear_const(current,rs1[i]); // FIXME clear_const(current,rt1[i]); if(needed_again(rs1[i],i)) alloc_reg(current,i,rs1[i]); alloc_reg(current,i,CSREG); // Status alloc_reg(current,i,FTEMP); if(opcode[i]==0x35||opcode[i]==0x3d) { // 64-bit LDC1/SDC1 alloc_reg64(current,i,FTEMP); } // If using TLB, need a register for pointer to the mapping table if(using_tlb) alloc_reg(current,i,TLREG); #if defined(HOST_IMM8) // On CPUs without 32-bit immediates we need a pointer to invalid_code else if((opcode[i]&0x3b)==0x39) // SWC1/SDC1 alloc_reg(current,i,INVCP); #endif // We need a temporary register for address generation alloc_reg_temp(current,i,-1); minimum_free_regs[i]=1; } #ifndef multdiv_alloc void multdiv_alloc(struct regstat *current,int i) { // case 0x18: MULT // case 0x19: MULTU // case 0x1A: DIV // case 0x1B: DIVU // case 0x1C: DMULT // case 0x1D: DMULTU // case 0x1E: DDIV // case 0x1F: DDIVU clear_const(current,rs1[i]); clear_const(current,rs2[i]); if(rs1[i]&&rs2[i]) { if((opcode2[i]&4)==0) // 32-bit { current->u&=~(1LL<u&=~(1LL<is32|=1LL<is32|=1LL<u&=~(1LL<u&=~(1LL<uu&=~(1LL<uu&=~(1LL<10) alloc_reg64(current,i,LOREG); alloc_reg64(current,i,rs1[i]); alloc_reg64(current,i,rs2[i]); alloc_all(current,i); current->is32&=~(1LL<is32&=~(1LL<is32|=1LL<is32|=1LL<is32|=1LL<u&=~1LL; alloc_reg(current,i,0); } } else { // TLBR/TLBWI/TLBWR/TLBP/ERET assert(opcode2[i]==0x10); alloc_all(current,i); } minimum_free_regs[i]=HOST_REGS; } static void cop1_alloc(struct regstat *current,int i) { alloc_reg(current,i,CSREG); // Load status if(opcode2[i]<3) // MFC1/DMFC1/CFC1 { assert(rt1[i]); clear_const(current,rt1[i]); if(opcode2[i]==1) { alloc_reg64(current,i,rt1[i]); // DMFC1 current->is32&=~(1LL<is32|=1LL<3) // MTC1/DMTC1/CTC1 { if(rs1[i]){ clear_const(current,rs1[i]); if(opcode2[i]==5) alloc_reg64(current,i,rs1[i]); // DMTC1 else alloc_reg(current,i,rs1[i]); // MTC1/CTC1 alloc_reg_temp(current,i,-1); } else { current->u&=~1LL; alloc_reg(current,i,0); alloc_reg_temp(current,i,-1); } } minimum_free_regs[i]=1; } static void fconv_alloc(struct regstat *current,int i) { alloc_reg(current,i,CSREG); // Load status alloc_reg_temp(current,i,-1); minimum_free_regs[i]=1; } static void float_alloc(struct regstat *current,int i) { alloc_reg(current,i,CSREG); // Load status alloc_reg_temp(current,i,-1); minimum_free_regs[i]=1; } static void fcomp_alloc(struct regstat *current,int i) { alloc_reg(current,i,CSREG); // Load status alloc_reg(current,i,FSREG); // Load flags dirty_reg(current,FSREG); // Flag will be modified alloc_reg_temp(current,i,-1); minimum_free_regs[i]=1; } static void syscall_alloc(struct regstat *current,int i) { alloc_cc(current,i); dirty_reg(current,CCREG); alloc_all(current,i); minimum_free_regs[i]=HOST_REGS; current->isconst=0; } static void delayslot_alloc(struct regstat *current,int i) { switch(itype[i]) { case UJUMP: case CJUMP: case SJUMP: case RJUMP: case FJUMP: case SYSCALL: case SPAN: assem_debug("jump in the delay slot. this shouldn't happen.");//exit(1); DebugMessage(M64MSG_VERBOSE, "Disabled speculative precompilation"); stop_after_jal=1; break; case IMM16: imm16_alloc(current,i); break; case LOAD: case LOADLR: load_alloc(current,i); break; case STORE: case STORELR: store_alloc(current,i); break; case ALU: alu_alloc(current,i); break; case SHIFT: shift_alloc(current,i); break; case MULTDIV: multdiv_alloc(current,i); break; case SHIFTIMM: shiftimm_alloc(current,i); break; case MOV: mov_alloc(current,i); break; case COP0: cop0_alloc(current,i); break; case COP1: cop1_alloc(current,i); break; case C1LS: c1ls_alloc(current,i); break; case FCONV: fconv_alloc(current,i); break; case FLOAT: float_alloc(current,i); break; case FCOMP: fcomp_alloc(current,i); break; } } // Special case where a branch and delay slot span two pages in virtual memory static void pagespan_alloc(struct regstat *current,int i) { current->isconst=0; current->wasconst=0; regs[i].wasconst=0; minimum_free_regs[i]=HOST_REGS; alloc_all(current,i); alloc_cc(current,i); dirty_reg(current,CCREG); if(opcode[i]==3) // JAL { alloc_reg(current,i,31); dirty_reg(current,31); } if(opcode[i]==0&&(opcode2[i]&0x3E)==8) // JR/JALR { alloc_reg(current,i,rs1[i]); if (rt1[i]!=0) { alloc_reg(current,i,rt1[i]); dirty_reg(current,rt1[i]); } } if((opcode[i]&0x2E)==4) // BEQ/BNE/BEQL/BNEL { if(rs1[i]) alloc_reg(current,i,rs1[i]); if(rs2[i]) alloc_reg(current,i,rs2[i]); if(!((current->is32>>rs1[i])&(current->is32>>rs2[i])&1)) { if(rs1[i]) alloc_reg64(current,i,rs1[i]); if(rs2[i]) alloc_reg64(current,i,rs2[i]); } } else if((opcode[i]&0x2E)==6) // BLEZ/BGTZ/BLEZL/BGTZL { if(rs1[i]) alloc_reg(current,i,rs1[i]); if(!((current->is32>>rs1[i])&1)) { if(rs1[i]) alloc_reg64(current,i,rs1[i]); } } else if(opcode[i]==0x11) // BC1 { alloc_reg(current,i,FSREG); alloc_reg(current,i,CSREG); } //else ... } static void add_stub(int type,int addr,int retaddr,int a,int b,int c,int d,int e) { stubs[stubcount][0]=type; stubs[stubcount][1]=addr; stubs[stubcount][2]=retaddr; stubs[stubcount][3]=a; stubs[stubcount][4]=b; stubs[stubcount][5]=c; stubs[stubcount][6]=d; stubs[stubcount][7]=e; stubcount++; } // Write out a single register static void wb_register(signed char r,signed char regmap[],uint64_t dirty,uint64_t is32) { int hr; for(hr=0;hr>hr)&1) { if(regmap[hr]<64) { emit_storereg(r,hr); if((is32>>regmap[hr])&1) { emit_sarimm(hr,31,hr); emit_storereg(r|64,hr); } }else{ emit_storereg(r|64,hr); } } } } } } #if 0 static int mchecksum() { //if(!tracedebug) return 0; int i; int sum=0; for(i=0;i<2097152;i++) { unsigned int temp=sum; sum<<=1; sum|=(~temp)>>31; sum^=((u_int *)g_rdram)[i]; } return sum; } static int rchecksum() { int i; int sum=0; for(i=0;i<64;i++) sum^=((u_int *)reg)[i]; return sum; } static void rlist() { int i; DebugMessage(M64MSG_VERBOSE, "TRACE: "); for(i=0;i<32;i++) DebugMessage(M64MSG_VERBOSE, "r%d:%8x%8x ",i,((int *)(reg+i))[1],((int *)(reg+i))[0]); DebugMessage(M64MSG_VERBOSE, "TRACE: "); for(i=0;i<32;i++) DebugMessage(M64MSG_VERBOSE, "f%d:%8x%8x ",i,((int*)reg_cop1_simple[i])[1],*((int*)reg_cop1_simple[i])); } static void enabletrace() { tracedebug=1; } static void memdebug(int i) { //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (checksum %x) lo=%8x%8x",g_cp0_regs[CP0_COUNT_REG],next_interupt,mchecksum(),(int)(reg[LOREG]>>32),(int)reg[LOREG]); //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (rchecksum %x)",g_cp0_regs[CP0_COUNT_REG],next_interupt,rchecksum()); //rlist(); //if(tracedebug) { //if(g_cp0_regs[CP0_COUNT_REG]>=-2084597794) { if((signed int)g_cp0_regs[CP0_COUNT_REG]>=-2084597794&&(signed int)g_cp0_regs[CP0_COUNT_REG]<0) { //if(0) { DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (checksum %x)",g_cp0_regs[CP0_COUNT_REG],next_interupt,mchecksum()); //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (checksum %x) Status=%x",g_cp0_regs[CP0_COUNT_REG],next_interupt,mchecksum(),g_cp0_regs[CP0_STATUS_REG]); //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (checksum %x) hi=%8x%8x",g_cp0_regs[CP0_COUNT_REG],next_interupt,mchecksum(),(int)(reg[HIREG]>>32),(int)reg[HIREG]); rlist(); #if NEW_DYNAREC == NEW_DYNAREC_X86 DebugMessage(M64MSG_VERBOSE, "TRACE: %x",(&i)[-1]); #endif #if NEW_DYNAREC == NEW_DYNAREC_ARM int j; DebugMessage(M64MSG_VERBOSE, "TRACE: %x ",(&j)[10]); DebugMessage(M64MSG_VERBOSE, "TRACE: %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x",(&j)[1],(&j)[2],(&j)[3],(&j)[4],(&j)[5],(&j)[6],(&j)[7],(&j)[8],(&j)[9],(&j)[10],(&j)[11],(&j)[12],(&j)[13],(&j)[14],(&j)[15],(&j)[16],(&j)[17],(&j)[18],(&j)[19],(&j)[20]); #endif //fflush(stdout); } //DebugMessage(M64MSG_VERBOSE, "TRACE: %x",(&i)[-1]); } #endif /* Debug: static void tlb_debug(u_int cause, u_int addr, u_int iaddr) { DebugMessage(M64MSG_VERBOSE, "TLB Exception: instruction=%x addr=%x cause=%x",iaddr, addr, cause); } end debug */ static void alu_assemble(int i,struct regstat *i_regs) { if(opcode2[i]>=0x20&&opcode2[i]<=0x23) { // ADD/ADDU/SUB/SUBU if(rt1[i]) { signed char s1,s2,t; t=get_reg(i_regs->regmap,rt1[i]); if(t>=0) { s1=get_reg(i_regs->regmap,rs1[i]); s2=get_reg(i_regs->regmap,rs2[i]); if(rs1[i]&&rs2[i]) { assert(s1>=0); assert(s2>=0); if(opcode2[i]&2) emit_sub(s1,s2,t); else emit_add(s1,s2,t); } else if(rs1[i]) { if(s1>=0) emit_mov(s1,t); else emit_loadreg(rs1[i],t); } else if(rs2[i]) { if(s2>=0) { if(opcode2[i]&2) emit_neg(s2,t); else emit_mov(s2,t); } else { emit_loadreg(rs2[i],t); if(opcode2[i]&2) emit_neg(t,t); } } else emit_zeroreg(t); } } } if(opcode2[i]>=0x2c&&opcode2[i]<=0x2f) { // DADD/DADDU/DSUB/DSUBU if(rt1[i]) { signed char s1l,s2l,s1h,s2h,tl,th; tl=get_reg(i_regs->regmap,rt1[i]); th=get_reg(i_regs->regmap,rt1[i]|64); if(tl>=0) { s1l=get_reg(i_regs->regmap,rs1[i]); s2l=get_reg(i_regs->regmap,rs2[i]); s1h=get_reg(i_regs->regmap,rs1[i]|64); s2h=get_reg(i_regs->regmap,rs2[i]|64); if(rs1[i]&&rs2[i]) { assert(s1l>=0); assert(s2l>=0); if(th>=0) { #ifdef INVERTED_CARRY if(opcode2[i]&2) emit_sub64_32(s1l,s1h,s2l,s2h,tl,th); #else if(opcode2[i]&2) { emit_subs(s1l,s2l,tl); emit_sbc(s1h,s2h,th); } #endif else { emit_adds(s1l,s2l,tl); emit_adc(s1h,s2h,th); } } else { if(opcode2[i]&2) emit_subs(s1l,s2l,tl); else emit_adds(s1l,s2l,tl); } } else if(rs1[i]) { if(s1l>=0) emit_mov(s1l,tl); else emit_loadreg(rs1[i],tl); if(th>=0) { if(s1h>=0) emit_mov(s1h,th); else emit_loadreg(rs1[i]|64,th); } } else if(rs2[i]) { if(s2l>=0) { if(opcode2[i]&2) emit_negs(s2l,tl); else emit_mov(s2l,tl); } else { emit_loadreg(rs2[i],tl); if(opcode2[i]&2) emit_negs(tl,tl); } if(th>=0) { #ifdef INVERTED_CARRY if(s2h>=0) emit_mov(s2h,th); else emit_loadreg(rs2[i]|64,th); if(opcode2[i]&2) { emit_adcimm(-1,th); // x86 has inverted carry flag emit_not(th,th); } #else if(opcode2[i]&2) { if(s2h>=0) emit_rscimm(s2h,0,th); else { emit_loadreg(rs2[i]|64,th); emit_rscimm(th,0,th); } }else{ if(s2h>=0) emit_mov(s2h,th); else emit_loadreg(rs2[i]|64,th); } #endif } } else { emit_zeroreg(tl); if(th>=0) emit_zeroreg(th); } } } } if(opcode2[i]==0x2a||opcode2[i]==0x2b) { // SLT/SLTU if(rt1[i]) { signed char s1l,s1h,s2l,s2h,t; if(!((i_regs->was32>>rs1[i])&(i_regs->was32>>rs2[i])&1)) { t=get_reg(i_regs->regmap,rt1[i]); //assert(t>=0); if(t>=0) { s1l=get_reg(i_regs->regmap,rs1[i]); s1h=get_reg(i_regs->regmap,rs1[i]|64); s2l=get_reg(i_regs->regmap,rs2[i]); s2h=get_reg(i_regs->regmap,rs2[i]|64); if(rs2[i]==0) // rx=0); if(opcode2[i]==0x2a) // SLT emit_shrimm(s1h,31,t); else // SLTU (unsigned can not be less than zero) emit_zeroreg(t); } else if(rs1[i]==0) // r0=0); if(opcode2[i]==0x2a) // SLT emit_set_gz64_32(s2h,s2l,t); else // SLTU (set if not zero) emit_set_nz64_32(s2h,s2l,t); } else { assert(s1l>=0);assert(s1h>=0); assert(s2l>=0);assert(s2h>=0); if(opcode2[i]==0x2a) // SLT emit_set_if_less64_32(s1h,s1l,s2h,s2l,t); else // SLTU emit_set_if_carry64_32(s1h,s1l,s2h,s2l,t); } } } else { t=get_reg(i_regs->regmap,rt1[i]); //assert(t>=0); if(t>=0) { s1l=get_reg(i_regs->regmap,rs1[i]); s2l=get_reg(i_regs->regmap,rs2[i]); if(rs2[i]==0) // rx=0); if(opcode2[i]==0x2a) // SLT emit_shrimm(s1l,31,t); else // SLTU (unsigned can not be less than zero) emit_zeroreg(t); } else if(rs1[i]==0) // r0=0); if(opcode2[i]==0x2a) // SLT emit_set_gz32(s2l,t); else // SLTU (set if not zero) emit_set_nz32(s2l,t); } else{ assert(s1l>=0);assert(s2l>=0); if(opcode2[i]==0x2a) // SLT emit_set_if_less32(s1l,s2l,t); else // SLTU emit_set_if_carry32(s1l,s2l,t); } } } } } if(opcode2[i]>=0x24&&opcode2[i]<=0x27) { // AND/OR/XOR/NOR if(rt1[i]) { signed char s1l,s1h,s2l,s2h,th,tl; tl=get_reg(i_regs->regmap,rt1[i]); th=get_reg(i_regs->regmap,rt1[i]|64); if(!((i_regs->was32>>rs1[i])&(i_regs->was32>>rs2[i])&1)&&th>=0) { assert(tl>=0); if(tl>=0) { s1l=get_reg(i_regs->regmap,rs1[i]); s1h=get_reg(i_regs->regmap,rs1[i]|64); s2l=get_reg(i_regs->regmap,rs2[i]); s2h=get_reg(i_regs->regmap,rs2[i]|64); if(rs1[i]&&rs2[i]) { assert(s1l>=0);assert(s1h>=0); assert(s2l>=0);assert(s2h>=0); if(opcode2[i]==0x24) { // AND emit_and(s1l,s2l,tl); emit_and(s1h,s2h,th); } else if(opcode2[i]==0x25) { // OR emit_or(s1l,s2l,tl); emit_or(s1h,s2h,th); } else if(opcode2[i]==0x26) { // XOR emit_xor(s1l,s2l,tl); emit_xor(s1h,s2h,th); } else if(opcode2[i]==0x27) { // NOR emit_or(s1l,s2l,tl); emit_or(s1h,s2h,th); emit_not(tl,tl); emit_not(th,th); } } else { if(opcode2[i]==0x24) { // AND emit_zeroreg(tl); emit_zeroreg(th); } else if(opcode2[i]==0x25||opcode2[i]==0x26) { // OR/XOR if(rs1[i]){ if(s1l>=0) emit_mov(s1l,tl); else emit_loadreg(rs1[i],tl); if(s1h>=0) emit_mov(s1h,th); else emit_loadreg(rs1[i]|64,th); } else if(rs2[i]){ if(s2l>=0) emit_mov(s2l,tl); else emit_loadreg(rs2[i],tl); if(s2h>=0) emit_mov(s2h,th); else emit_loadreg(rs2[i]|64,th); } else{ emit_zeroreg(tl); emit_zeroreg(th); } } else if(opcode2[i]==0x27) { // NOR if(rs1[i]){ if(s1l>=0) emit_not(s1l,tl); else{ emit_loadreg(rs1[i],tl); emit_not(tl,tl); } if(s1h>=0) emit_not(s1h,th); else{ emit_loadreg(rs1[i]|64,th); emit_not(th,th); } } else if(rs2[i]){ if(s2l>=0) emit_not(s2l,tl); else{ emit_loadreg(rs2[i],tl); emit_not(tl,tl); } if(s2h>=0) emit_not(s2h,th); else{ emit_loadreg(rs2[i]|64,th); emit_not(th,th); } } else { emit_movimm(-1,tl); emit_movimm(-1,th); } } } } } else { // 32 bit if(tl>=0) { s1l=get_reg(i_regs->regmap,rs1[i]); s2l=get_reg(i_regs->regmap,rs2[i]); if(rs1[i]&&rs2[i]) { assert(s1l>=0); assert(s2l>=0); if(opcode2[i]==0x24) { // AND emit_and(s1l,s2l,tl); } else if(opcode2[i]==0x25) { // OR emit_or(s1l,s2l,tl); } else if(opcode2[i]==0x26) { // XOR emit_xor(s1l,s2l,tl); } else if(opcode2[i]==0x27) { // NOR emit_or(s1l,s2l,tl); emit_not(tl,tl); } } else { if(opcode2[i]==0x24) { // AND emit_zeroreg(tl); } else if(opcode2[i]==0x25||opcode2[i]==0x26) { // OR/XOR if(rs1[i]){ if(s1l>=0) emit_mov(s1l,tl); else emit_loadreg(rs1[i],tl); // CHECK: regmap_entry? } else if(rs2[i]){ if(s2l>=0) emit_mov(s2l,tl); else emit_loadreg(rs2[i],tl); // CHECK: regmap_entry? } else emit_zeroreg(tl); } else if(opcode2[i]==0x27) { // NOR if(rs1[i]){ if(s1l>=0) emit_not(s1l,tl); else { emit_loadreg(rs1[i],tl); emit_not(tl,tl); } } else if(rs2[i]){ if(s2l>=0) emit_not(s2l,tl); else { emit_loadreg(rs2[i],tl); emit_not(tl,tl); } } else emit_movimm(-1,tl); } } } } } } } static void imm16_assemble(int i,struct regstat *i_regs) { if (opcode[i]==0x0f) { // LUI if(rt1[i]) { signed char t; t=get_reg(i_regs->regmap,rt1[i]); //assert(t>=0); if(t>=0) { if(!((i_regs->isconst>>t)&1)) emit_movimm(imm[i]<<16,t); } } } if(opcode[i]==0x08||opcode[i]==0x09) { // ADDI/ADDIU if(rt1[i]) { signed char s,t; t=get_reg(i_regs->regmap,rt1[i]); s=get_reg(i_regs->regmap,rs1[i]); if(rs1[i]) { //assert(t>=0); //assert(s>=0); if(t>=0) { if(!((i_regs->isconst>>t)&1)) { if(s<0) { if(i_regs->regmap_entry[t]!=rs1[i]) emit_loadreg(rs1[i],t); emit_addimm(t,imm[i],t); }else{ if(!((i_regs->wasconst>>s)&1)) emit_addimm(s,imm[i],t); else emit_movimm(constmap[i][s]+imm[i],t); } } } } else { if(t>=0) { if(!((i_regs->isconst>>t)&1)) emit_movimm(imm[i],t); } } } } if(opcode[i]==0x18||opcode[i]==0x19) { // DADDI/DADDIU if(rt1[i]) { signed char sh,sl,th,tl; th=get_reg(i_regs->regmap,rt1[i]|64); tl=get_reg(i_regs->regmap,rt1[i]); sh=get_reg(i_regs->regmap,rs1[i]|64); sl=get_reg(i_regs->regmap,rs1[i]); if(tl>=0) { if(rs1[i]) { assert(sh>=0); assert(sl>=0); if(th>=0) { emit_addimm64_32(sh,sl,imm[i],th,tl); } else { emit_addimm(sl,imm[i],tl); } } else { emit_movimm(imm[i],tl); if(th>=0) emit_movimm(((signed int)imm[i])>>31,th); } } } } else if(opcode[i]==0x0a||opcode[i]==0x0b) { // SLTI/SLTIU if(rt1[i]) { //assert(rs1[i]!=0); // r0 might be valid, but it's probably a bug signed char sh,sl,t; t=get_reg(i_regs->regmap,rt1[i]); sh=get_reg(i_regs->regmap,rs1[i]|64); sl=get_reg(i_regs->regmap,rs1[i]); //assert(t>=0); if(t>=0) { if(rs1[i]>0) { if(sh<0) assert((i_regs->was32>>rs1[i])&1); if(sh<0||((i_regs->was32>>rs1[i])&1)) { if(opcode[i]==0x0a) { // SLTI if(sl<0) { if(i_regs->regmap_entry[t]!=rs1[i]) emit_loadreg(rs1[i],t); emit_slti32(t,imm[i],t); }else{ emit_slti32(sl,imm[i],t); } } else { // SLTIU if(sl<0) { if(i_regs->regmap_entry[t]!=rs1[i]) emit_loadreg(rs1[i],t); emit_sltiu32(t,imm[i],t); }else{ emit_sltiu32(sl,imm[i],t); } } }else{ // 64-bit assert(sl>=0); if(opcode[i]==0x0a) // SLTI emit_slti64_32(sh,sl,imm[i],t); else // SLTIU emit_sltiu64_32(sh,sl,imm[i],t); } }else{ // SLTI(U) with r0 is just stupid, // nonetheless examples can be found if(opcode[i]==0x0a) // SLTI if(0=0x0c&&opcode[i]<=0x0e) { // ANDI/ORI/XORI if(rt1[i]) { signed char sh,sl,th,tl; th=get_reg(i_regs->regmap,rt1[i]|64); tl=get_reg(i_regs->regmap,rt1[i]); sh=get_reg(i_regs->regmap,rs1[i]|64); sl=get_reg(i_regs->regmap,rs1[i]); if(tl>=0 && !((i_regs->isconst>>tl)&1)) { if(opcode[i]==0x0c) //ANDI { if(rs1[i]) { if(sl<0) { if(i_regs->regmap_entry[tl]!=rs1[i]) emit_loadreg(rs1[i],tl); emit_andimm(tl,imm[i],tl); }else{ if(!((i_regs->wasconst>>sl)&1)) emit_andimm(sl,imm[i],tl); else emit_movimm(constmap[i][sl]&imm[i],tl); } } else emit_zeroreg(tl); if(th>=0) emit_zeroreg(th); } else { if(rs1[i]) { if(sl<0) { if(i_regs->regmap_entry[tl]!=rs1[i]) emit_loadreg(rs1[i],tl); } if(th>=0) { if(sh<0) { emit_loadreg(rs1[i]|64,th); }else{ emit_mov(sh,th); } } if(opcode[i]==0x0d) { //ORI if(sl<0) { emit_orimm(tl,imm[i],tl); }else{ if(!((i_regs->wasconst>>sl)&1)) emit_orimm(sl,imm[i],tl); else emit_movimm(constmap[i][sl]|imm[i],tl); } } if(opcode[i]==0x0e) { //XORI if(sl<0) { emit_xorimm(tl,imm[i],tl); }else{ if(!((i_regs->wasconst>>sl)&1)) emit_xorimm(sl,imm[i],tl); else emit_movimm(constmap[i][sl]^imm[i],tl); } } } else { emit_movimm(imm[i],tl); if(th>=0) emit_zeroreg(th); } } } } } } static void shiftimm_assemble(int i,struct regstat *i_regs) { if(opcode2[i]<=0x3) // SLL/SRL/SRA { if(rt1[i]) { signed char s,t; t=get_reg(i_regs->regmap,rt1[i]); s=get_reg(i_regs->regmap,rs1[i]); //assert(t>=0); if(t>=0){ if(rs1[i]==0) { emit_zeroreg(t); } else { if(s<0&&i_regs->regmap_entry[t]!=rs1[i]) emit_loadreg(rs1[i],t); if(imm[i]) { if(opcode2[i]==0) // SLL { emit_shlimm(s<0?t:s,imm[i],t); } if(opcode2[i]==2) // SRL { emit_shrimm(s<0?t:s,imm[i],t); } if(opcode2[i]==3) // SRA { emit_sarimm(s<0?t:s,imm[i],t); } }else{ // Shift by zero if(s>=0 && s!=t) emit_mov(s,t); } } } //emit_storereg(rt1[i],t); //DEBUG } } if(opcode2[i]>=0x38&&opcode2[i]<=0x3b) // DSLL/DSRL/DSRA { if(rt1[i]) { signed char sh,sl,th,tl; th=get_reg(i_regs->regmap,rt1[i]|64); tl=get_reg(i_regs->regmap,rt1[i]); sh=get_reg(i_regs->regmap,rs1[i]|64); sl=get_reg(i_regs->regmap,rs1[i]); if(tl>=0) { if(rs1[i]==0) { emit_zeroreg(tl); if(th>=0) emit_zeroreg(th); } else { assert(sl>=0); assert(sh>=0); if(imm[i]) { if(opcode2[i]==0x38) // DSLL { if(th>=0) emit_shldimm(sh,sl,imm[i],th); emit_shlimm(sl,imm[i],tl); } if(opcode2[i]==0x3a) // DSRL { emit_shrdimm(sl,sh,imm[i],tl); if(th>=0) emit_shrimm(sh,imm[i],th); } if(opcode2[i]==0x3b) // DSRA { emit_shrdimm(sl,sh,imm[i],tl); if(th>=0) emit_sarimm(sh,imm[i],th); } }else{ // Shift by zero if(sl!=tl) emit_mov(sl,tl); if(th>=0&&sh!=th) emit_mov(sh,th); } } } } } if(opcode2[i]==0x3c) // DSLL32 { if(rt1[i]) { signed char sl,tl,th; tl=get_reg(i_regs->regmap,rt1[i]); th=get_reg(i_regs->regmap,rt1[i]|64); sl=get_reg(i_regs->regmap,rs1[i]); if(th>=0||tl>=0){ assert(tl>=0); assert(th>=0); assert(sl>=0); emit_mov(sl,th); emit_zeroreg(tl); if(imm[i]>32) { emit_shlimm(th,imm[i]&31,th); } } } } if(opcode2[i]==0x3e) // DSRL32 { if(rt1[i]) { signed char sh,tl,th; tl=get_reg(i_regs->regmap,rt1[i]); th=get_reg(i_regs->regmap,rt1[i]|64); sh=get_reg(i_regs->regmap,rs1[i]|64); if(tl>=0){ assert(sh>=0); emit_mov(sh,tl); if(th>=0) emit_zeroreg(th); if(imm[i]>32) { emit_shrimm(tl,imm[i]&31,tl); } } } } if(opcode2[i]==0x3f) // DSRA32 { if(rt1[i]) { signed char sh,tl; tl=get_reg(i_regs->regmap,rt1[i]); sh=get_reg(i_regs->regmap,rs1[i]|64); if(tl>=0){ assert(sh>=0); emit_mov(sh,tl); if(imm[i]>32) { emit_sarimm(tl,imm[i]&31,tl); } } } } } #ifndef shift_assemble void shift_assemble(int i,struct regstat *i_regs) { DebugMessage(M64MSG_ERROR, "Need shift_assemble for this architecture."); exit(1); } #endif static void load_assemble(int i,struct regstat *i_regs) { int s,th,tl,addr,map=-1,cache=-1; int offset; int jaddr=0; int memtarget,c=0; u_int hr,reglist=0; th=get_reg(i_regs->regmap,rt1[i]|64); tl=get_reg(i_regs->regmap,rt1[i]); s=get_reg(i_regs->regmap,rs1[i]); offset=imm[i]; for(hr=0;hrregmap[hr]>=0) reglist|=1<regmap[HOST_CCREG]==CCREG) reglist&=~(1<=0) { c=(i_regs->wasconst>>s)&1; memtarget=((signed int)(constmap[i][s]+offset))<(signed int)0x80800000; if(using_tlb&&((signed int)(constmap[i][s]+offset))>=(signed int)0xC0000000) memtarget=1; } if(tl<0) tl=get_reg(i_regs->regmap,-1); if(offset||s<0||c) addr=tl; else addr=s; //DebugMessage(M64MSG_VERBOSE, "load_assemble: c=%d",c); //if(c) DebugMessage(M64MSG_VERBOSE, "load_assemble: const=%x",(int)constmap[i][s]+offset); assert(tl>=0); // Even if the load is a NOP, we must check for pagefaults and I/O reglist&=~(1<=0) reglist&=~(1<regmap,ROREG); if(map<0) emit_loadreg(ROREG,map=HOST_TEMPREG); #endif //#define R29_HACK 1 #ifdef R29_HACK // Strmnnrmn's speed hack if(rs1[i]!=29||start<0x80001000||start>=0x80800000) #endif { emit_cmpimm(addr,0x800000); jaddr=(int)out; #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK // Hint to branch predictor that the branch is unlikely to be taken if(rs1[i]>=28) emit_jno_unlikely(0); else #endif emit_jno(0); } } }else{ // using tlb int x=0; if (opcode[i]==0x20||opcode[i]==0x24) x=3; // LB/LBU if (opcode[i]==0x21||opcode[i]==0x25) x=2; // LH/LHU map=get_reg(i_regs->regmap,TLREG); cache=get_reg(i_regs->regmap,MMREG); assert(map>=0); reglist&=~(1<regmap,rt1[i])); // ignore loads to r0 and unneeded reg if (opcode[i]==0x20) { // LB if(!c||memtarget) { if(!dummy) { #ifdef HOST_IMM_ADDR32 if(c) emit_movsbl_tlb((constmap[i][s]+offset)^3,map,tl); else #endif { //emit_xorimm(addr,3,tl); //gen_tlb_addr_r(tl,map); //emit_movsbl_indexed((int)g_rdram-0x80000000,tl,tl); int x=0; if(!c) emit_xorimm(addr,3,tl); else x=((constmap[i][s]+offset)^3)-(constmap[i][s]+offset); emit_movsbl_indexed_tlb(x,tl,map,tl); } } if(jaddr) add_stub(LOADB_STUB,jaddr,(int)out,i,addr,(int)i_regs,ccadj[i],reglist); } else inline_readstub(LOADB_STUB,i,constmap[i][s]+offset,i_regs->regmap,rt1[i],ccadj[i],reglist); } if (opcode[i]==0x21) { // LH if(!c||memtarget) { if(!dummy) { #ifdef HOST_IMM_ADDR32 if(c) emit_movswl_tlb((constmap[i][s]+offset)^2,map,tl); else #endif { int x=0; if(!c) emit_xorimm(addr,2,tl); else x=((constmap[i][s]+offset)^2)-(constmap[i][s]+offset); //#ifdef //emit_movswl_indexed_tlb(x,tl,map,tl); //else if(map>=0) { gen_tlb_addr_r(tl,map); emit_movswl_indexed(x,tl,tl); }else{ #ifdef RAM_OFFSET emit_movswl_indexed(x,tl,tl); #else emit_movswl_indexed((int)g_rdram-0x80000000+x,tl,tl); #endif } } } if(jaddr) add_stub(LOADH_STUB,jaddr,(int)out,i,addr,(int)i_regs,ccadj[i],reglist); } else inline_readstub(LOADH_STUB,i,constmap[i][s]+offset,i_regs->regmap,rt1[i],ccadj[i],reglist); } if (opcode[i]==0x23) { // LW if(!c||memtarget) { if(!dummy) { //emit_readword_indexed((int)g_rdram-0x80000000,addr,tl); #ifdef HOST_IMM_ADDR32 if(c) emit_readword_tlb(constmap[i][s]+offset,map,tl); else #endif emit_readword_indexed_tlb(0,addr,map,tl); } if(jaddr) add_stub(LOADW_STUB,jaddr,(int)out,i,addr,(int)i_regs,ccadj[i],reglist); } else inline_readstub(LOADW_STUB,i,constmap[i][s]+offset,i_regs->regmap,rt1[i],ccadj[i],reglist); } if (opcode[i]==0x24) { // LBU if(!c||memtarget) { if(!dummy) { #ifdef HOST_IMM_ADDR32 if(c) emit_movzbl_tlb((constmap[i][s]+offset)^3,map,tl); else #endif { //emit_xorimm(addr,3,tl); //gen_tlb_addr_r(tl,map); //emit_movzbl_indexed((int)g_rdram-0x80000000,tl,tl); int x=0; if(!c) emit_xorimm(addr,3,tl); else x=((constmap[i][s]+offset)^3)-(constmap[i][s]+offset); emit_movzbl_indexed_tlb(x,tl,map,tl); } } if(jaddr) add_stub(LOADBU_STUB,jaddr,(int)out,i,addr,(int)i_regs,ccadj[i],reglist); } else inline_readstub(LOADBU_STUB,i,constmap[i][s]+offset,i_regs->regmap,rt1[i],ccadj[i],reglist); } if (opcode[i]==0x25) { // LHU if(!c||memtarget) { if(!dummy) { #ifdef HOST_IMM_ADDR32 if(c) emit_movzwl_tlb((constmap[i][s]+offset)^2,map,tl); else #endif { int x=0; if(!c) emit_xorimm(addr,2,tl); else x=((constmap[i][s]+offset)^2)-(constmap[i][s]+offset); //#ifdef //emit_movzwl_indexed_tlb(x,tl,map,tl); //#else if(map>=0) { gen_tlb_addr_r(tl,map); emit_movzwl_indexed(x,tl,tl); }else{ #ifdef RAM_OFFSET emit_movzwl_indexed(x,tl,tl); #else emit_movzwl_indexed((int)g_rdram-0x80000000+x,tl,tl); #endif } } } if(jaddr) add_stub(LOADHU_STUB,jaddr,(int)out,i,addr,(int)i_regs,ccadj[i],reglist); } else inline_readstub(LOADHU_STUB,i,constmap[i][s]+offset,i_regs->regmap,rt1[i],ccadj[i],reglist); } if (opcode[i]==0x27) { // LWU assert(th>=0); if(!c||memtarget) { if(!dummy) { //emit_readword_indexed((int)g_rdram-0x80000000,addr,tl); #ifdef HOST_IMM_ADDR32 if(c) emit_readword_tlb(constmap[i][s]+offset,map,tl); else #endif emit_readword_indexed_tlb(0,addr,map,tl); } if(jaddr) add_stub(LOADW_STUB,jaddr,(int)out,i,addr,(int)i_regs,ccadj[i],reglist); } else { inline_readstub(LOADW_STUB,i,constmap[i][s]+offset,i_regs->regmap,rt1[i],ccadj[i],reglist); } emit_zeroreg(th); } if (opcode[i]==0x37) { // LD if(!c||memtarget) { if(!dummy) { //gen_tlb_addr_r(tl,map); //if(th>=0) emit_readword_indexed((int)g_rdram-0x80000000,addr,th); //emit_readword_indexed((int)g_rdram-0x7FFFFFFC,addr,tl); #ifdef HOST_IMM_ADDR32 if(c) emit_readdword_tlb(constmap[i][s]+offset,map,th,tl); else #endif emit_readdword_indexed_tlb(0,addr,map,th,tl); } if(jaddr) add_stub(LOADD_STUB,jaddr,(int)out,i,addr,(int)i_regs,ccadj[i],reglist); } else inline_readstub(LOADD_STUB,i,constmap[i][s]+offset,i_regs->regmap,rt1[i],ccadj[i],reglist); } //emit_storereg(rt1[i],tl); // DEBUG //if(opcode[i]==0x23) //if(opcode[i]==0x24) //if(opcode[i]==0x23||opcode[i]==0x24) /*if(opcode[i]==0x21||opcode[i]==0x23||opcode[i]==0x24) { //emit_pusha(); save_regs(0x100f); emit_readword((int)&last_count,ECX); #if NEW_DYNAREC == NEW_DYNAREC_X86 if(get_reg(i_regs->regmap,CCREG)<0) emit_loadreg(CCREG,HOST_CCREG); emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_addimm(HOST_CCREG,2*ccadj[i],HOST_CCREG); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); #endif #if NEW_DYNAREC == NEW_DYNAREC_ARM if(get_reg(i_regs->regmap,CCREG)<0) emit_loadreg(CCREG,0); else emit_mov(HOST_CCREG,0); emit_add(0,ECX,0); emit_addimm(0,2*ccadj[i],0); emit_writeword(0,(int)&g_cp0_regs[CP0_COUNT_REG]); #endif emit_call((int)memdebug); //emit_popa(); restore_regs(0x100f); }*/ } #ifndef loadlr_assemble static void loadlr_assemble(int i,struct regstat *i_regs) { DebugMessage(M64MSG_ERROR, "Need loadlr_assemble for this architecture."); exit(1); } #endif static void store_assemble(int i,struct regstat *i_regs) { int s,th,tl,map=-1,cache=-1; int addr,temp; int offset; int jaddr=0,jaddr2,type; int memtarget,c=0; int agr=AGEN1+(i&1); u_int hr,reglist=0; th=get_reg(i_regs->regmap,rs2[i]|64); tl=get_reg(i_regs->regmap,rs2[i]); s=get_reg(i_regs->regmap,rs1[i]); temp=get_reg(i_regs->regmap,agr); if(temp<0) temp=get_reg(i_regs->regmap,-1); offset=imm[i]; if(s>=0) { c=(i_regs->wasconst>>s)&1; memtarget=((signed int)(constmap[i][s]+offset))<(signed int)0x80800000; if(using_tlb&&((signed int)(constmap[i][s]+offset))>=(signed int)0xC0000000) memtarget=1; } assert(tl>=0); assert(temp>=0); for(hr=0;hrregmap[hr]>=0) reglist|=1<regmap[HOST_CCREG]==CCREG) reglist&=~(1<regmap,ROREG); if(map<0) emit_loadreg(ROREG,map=HOST_TEMPREG); #endif if(!c) { #ifdef R29_HACK // Strmnnrmn's speed hack memtarget=1; if(rs1[i]!=29||start<0x80001000||start>=0x80800000) #endif emit_cmpimm(addr,0x800000); #ifdef DESTRUCTIVE_SHIFT if(s==addr) emit_mov(s,temp); #endif #ifdef R29_HACK if(rs1[i]!=29||start<0x80001000||start>=0x80800000) #endif { jaddr=(int)out; #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK // Hint to branch predictor that the branch is unlikely to be taken if(rs1[i]>=28) emit_jno_unlikely(0); else #endif emit_jno(0); } } }else{ // using tlb int x=0; if (opcode[i]==0x28) x=3; // SB if (opcode[i]==0x29) x=2; // SH map=get_reg(i_regs->regmap,TLREG); cache=get_reg(i_regs->regmap,MMREG); assert(map>=0); reglist&=~(1<=0) { gen_tlb_addr_w(temp,map); emit_writehword_indexed(tl,x,temp); }else emit_writehword_indexed(tl,(int)g_rdram-0x80000000+x,temp); } type=STOREH_STUB; } if (opcode[i]==0x2B) { // SW if(!c||memtarget) //emit_writeword_indexed(tl,(int)g_rdram-0x80000000,addr); emit_writeword_indexed_tlb(tl,0,addr,map,temp); type=STOREW_STUB; } if (opcode[i]==0x3F) { // SD if(!c||memtarget) { if(rs2[i]) { assert(th>=0); //emit_writeword_indexed(th,(int)g_rdram-0x80000000,addr); //emit_writeword_indexed(tl,(int)g_rdram-0x7FFFFFFC,addr); emit_writedword_indexed_tlb(th,tl,0,addr,map,temp); }else{ // Store zero //emit_writeword_indexed(tl,(int)g_rdram-0x80000000,temp); //emit_writeword_indexed(tl,(int)g_rdram-0x7FFFFFFC,temp); emit_writedword_indexed_tlb(tl,tl,0,addr,map,temp); } } type=STORED_STUB; } if(!using_tlb) { if(!c||memtarget) { #ifdef DESTRUCTIVE_SHIFT // The x86 shift operation is 'destructive'; it overwrites the // source register, so we need to make a copy first and use that. addr=temp; #endif #if defined(HOST_IMM8) int ir=get_reg(i_regs->regmap,INVCP); assert(ir>=0); emit_cmpmem_indexedsr12_reg(ir,addr,1); #else emit_cmpmem_indexedsr12_imm((int)invalid_code,addr,1); #endif #if defined(HAVE_CONDITIONAL_CALL) && !defined(DESTRUCTIVE_SHIFT) emit_callne(invalidate_addr_reg[addr]); #else jaddr2=(int)out; emit_jne(0); add_stub(INVCODE_STUB,jaddr2,(int)out,reglist|(1<regmap,rs2[i],ccadj[i],reglist); } //if(opcode[i]==0x2B || opcode[i]==0x3F) //if(opcode[i]==0x2B || opcode[i]==0x28) //if(opcode[i]==0x2B || opcode[i]==0x29) //if(opcode[i]==0x2B) // Uncomment for extra debug output: /* if(opcode[i]==0x2B || opcode[i]==0x28 || opcode[i]==0x29 || opcode[i]==0x3F) { #if NEW_DYNAREC == NEW_DYNAREC_X86 emit_pusha(); #endif #if NEW_DYNAREC == NEW_DYNAREC_ARM save_regs(0x100f); #endif emit_readword((int)&last_count,ECX); #if NEW_DYNAREC == NEW_DYNAREC_X86 if(get_reg(i_regs->regmap,CCREG)<0) emit_loadreg(CCREG,HOST_CCREG); emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_addimm(HOST_CCREG,2*ccadj[i],HOST_CCREG); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); #endif #if NEW_DYNAREC == NEW_DYNAREC_ARM if(get_reg(i_regs->regmap,CCREG)<0) emit_loadreg(CCREG,0); else emit_mov(HOST_CCREG,0); emit_add(0,ECX,0); emit_addimm(0,2*ccadj[i],0); emit_writeword(0,(int)&g_cp0_regs[CP0_COUNT_REG]); #endif emit_call((int)memdebug); #if NEW_DYNAREC == NEW_DYNAREC_X86 emit_popa(); #endif #if NEW_DYNAREC == NEW_DYNAREC_ARM restore_regs(0x100f); #endif } */ } static void storelr_assemble(int i,struct regstat *i_regs) { int s,th,tl; int temp; int temp2; int offset; int jaddr=0,jaddr2; int case1,case2,case3; int done0,done1,done2; int memtarget,c=0; int agr=AGEN1+(i&1); u_int hr,reglist=0; th=get_reg(i_regs->regmap,rs2[i]|64); tl=get_reg(i_regs->regmap,rs2[i]); s=get_reg(i_regs->regmap,rs1[i]); temp=get_reg(i_regs->regmap,agr); if(temp<0) temp=get_reg(i_regs->regmap,-1); offset=imm[i]; if(s>=0) { c=(i_regs->isconst>>s)&1; memtarget=((signed int)(constmap[i][s]+offset))<(signed int)0x80800000; if(using_tlb&&((signed int)(constmap[i][s]+offset))>=(signed int)0xC0000000) memtarget=1; } assert(tl>=0); for(hr=0;hrregmap[hr]>=0) reglist|=1<=0); if(!using_tlb) { if(!c) { emit_cmpimm(s<0||offset?temp:s,0x800000); if(!offset&&s!=temp) emit_mov(s,temp); jaddr=(int)out; emit_jno(0); } else { if(!memtarget||!rs1[i]) { jaddr=(int)out; emit_jmp(0); } } #ifdef RAM_OFFSET int map=get_reg(i_regs->regmap,ROREG); if(map<0) emit_loadreg(ROREG,map=HOST_TEMPREG); gen_tlb_addr_w(temp,map); #else if((u_int)g_rdram!=0x80000000) emit_addimm_no_flags((u_int)g_rdram-(u_int)0x80000000,temp); #endif }else{ // using tlb int map=get_reg(i_regs->regmap,TLREG); int cache=get_reg(i_regs->regmap,MMREG); assert(map>=0); reglist&=~(1<=0) emit_mov(s,temp); do_tlb_w_branch(map,c,constmap[i][s]+offset,&jaddr); if(!jaddr&&!memtarget) { jaddr=(int)out; emit_jmp(0); } gen_tlb_addr_w(temp,map); } if (opcode[i]==0x2C||opcode[i]==0x2D) { // SDL/SDR temp2=get_reg(i_regs->regmap,FTEMP); if(!rs2[i]) temp2=th=tl; } emit_testimm(temp,2); case2=(int)out; emit_jne(0); emit_testimm(temp,1); case1=(int)out; emit_jne(0); // 0 if (opcode[i]==0x2A) { // SWL emit_writeword_indexed(tl,0,temp); } if (opcode[i]==0x2E) { // SWR emit_writebyte_indexed(tl,3,temp); } if (opcode[i]==0x2C) { // SDL emit_writeword_indexed(th,0,temp); if(rs2[i]) emit_mov(tl,temp2); } if (opcode[i]==0x2D) { // SDR emit_writebyte_indexed(tl,3,temp); if(rs2[i]) emit_shldimm(th,tl,24,temp2); } done0=(int)out; emit_jmp(0); // 1 set_jump_target(case1,(int)out); if (opcode[i]==0x2A) { // SWL // Write 3 msb into three least significant bytes if(rs2[i]) emit_rorimm(tl,8,tl); emit_writehword_indexed(tl,-1,temp); if(rs2[i]) emit_rorimm(tl,16,tl); emit_writebyte_indexed(tl,1,temp); if(rs2[i]) emit_rorimm(tl,8,tl); } if (opcode[i]==0x2E) { // SWR // Write two lsb into two most significant bytes emit_writehword_indexed(tl,1,temp); } if (opcode[i]==0x2C) { // SDL if(rs2[i]) emit_shrdimm(tl,th,8,temp2); // Write 3 msb into three least significant bytes if(rs2[i]) emit_rorimm(th,8,th); emit_writehword_indexed(th,-1,temp); if(rs2[i]) emit_rorimm(th,16,th); emit_writebyte_indexed(th,1,temp); if(rs2[i]) emit_rorimm(th,8,th); } if (opcode[i]==0x2D) { // SDR if(rs2[i]) emit_shldimm(th,tl,16,temp2); // Write two lsb into two most significant bytes emit_writehword_indexed(tl,1,temp); } done1=(int)out; emit_jmp(0); // 2 set_jump_target(case2,(int)out); emit_testimm(temp,1); case3=(int)out; emit_jne(0); if (opcode[i]==0x2A) { // SWL // Write two msb into two least significant bytes if(rs2[i]) emit_rorimm(tl,16,tl); emit_writehword_indexed(tl,-2,temp); if(rs2[i]) emit_rorimm(tl,16,tl); } if (opcode[i]==0x2E) { // SWR // Write 3 lsb into three most significant bytes emit_writebyte_indexed(tl,-1,temp); if(rs2[i]) emit_rorimm(tl,8,tl); emit_writehword_indexed(tl,0,temp); if(rs2[i]) emit_rorimm(tl,24,tl); } if (opcode[i]==0x2C) { // SDL if(rs2[i]) emit_shrdimm(tl,th,16,temp2); // Write two msb into two least significant bytes if(rs2[i]) emit_rorimm(th,16,th); emit_writehword_indexed(th,-2,temp); if(rs2[i]) emit_rorimm(th,16,th); } if (opcode[i]==0x2D) { // SDR if(rs2[i]) emit_shldimm(th,tl,8,temp2); // Write 3 lsb into three most significant bytes emit_writebyte_indexed(tl,-1,temp); if(rs2[i]) emit_rorimm(tl,8,tl); emit_writehword_indexed(tl,0,temp); if(rs2[i]) emit_rorimm(tl,24,tl); } done2=(int)out; emit_jmp(0); // 3 set_jump_target(case3,(int)out); if (opcode[i]==0x2A) { // SWL // Write msb into least significant byte if(rs2[i]) emit_rorimm(tl,24,tl); emit_writebyte_indexed(tl,-3,temp); if(rs2[i]) emit_rorimm(tl,8,tl); } if (opcode[i]==0x2E) { // SWR // Write entire word emit_writeword_indexed(tl,-3,temp); } if (opcode[i]==0x2C) { // SDL if(rs2[i]) emit_shrdimm(tl,th,24,temp2); // Write msb into least significant byte if(rs2[i]) emit_rorimm(th,24,th); emit_writebyte_indexed(th,-3,temp); if(rs2[i]) emit_rorimm(th,8,th); } if (opcode[i]==0x2D) { // SDR if(rs2[i]) emit_mov(th,temp2); // Write entire word emit_writeword_indexed(tl,-3,temp); } set_jump_target(done0,(int)out); set_jump_target(done1,(int)out); set_jump_target(done2,(int)out); if (opcode[i]==0x2C) { // SDL emit_testimm(temp,4); done0=(int)out; emit_jne(0); emit_andimm(temp,~3,temp); emit_writeword_indexed(temp2,4,temp); set_jump_target(done0,(int)out); } if (opcode[i]==0x2D) { // SDR emit_testimm(temp,4); done0=(int)out; emit_jeq(0); emit_andimm(temp,~3,temp); emit_writeword_indexed(temp2,-4,temp); set_jump_target(done0,(int)out); } if(!c||!memtarget) add_stub(STORELR_STUB,jaddr,(int)out,0,(int)i_regs,rs2[i],ccadj[i],reglist); if(!using_tlb) { #ifdef RAM_OFFSET int map=get_reg(i_regs->regmap,ROREG); if(map<0) map=HOST_TEMPREG; gen_orig_addr_w(temp,map); #else emit_addimm_no_flags((u_int)0x80000000-(u_int)g_rdram,temp); #endif #if defined(HOST_IMM8) int ir=get_reg(i_regs->regmap,INVCP); assert(ir>=0); emit_cmpmem_indexedsr12_reg(ir,temp,1); #else emit_cmpmem_indexedsr12_imm((int)invalid_code,temp,1); #endif #if defined(HAVE_CONDITIONAL_CALL) && !defined(DESTRUCTIVE_SHIFT) emit_callne(invalidate_addr_reg[temp]); #else jaddr2=(int)out; emit_jne(0); add_stub(INVCODE_STUB,jaddr2,(int)out,reglist|(1<regmap,CCREG)<0) emit_loadreg(CCREG,HOST_CCREG); emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_addimm(HOST_CCREG,2*ccadj[i],HOST_CCREG); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); emit_call((int)memdebug); emit_popa(); //restore_regs(0x100f); */ } static void c1ls_assemble(int i,struct regstat *i_regs) { int s,th,tl; int temp,ar; int map=-1; int offset; int c=0; int jaddr,jaddr2=0,jaddr3,type; int agr=AGEN1+(i&1); u_int hr,reglist=0; th=get_reg(i_regs->regmap,FTEMP|64); tl=get_reg(i_regs->regmap,FTEMP); s=get_reg(i_regs->regmap,rs1[i]); temp=get_reg(i_regs->regmap,agr); if(temp<0) temp=get_reg(i_regs->regmap,-1); offset=imm[i]; assert(tl>=0); assert(rs1[i]>0); assert(temp>=0); for(hr=0;hrregmap[hr]>=0) reglist|=1<regmap[HOST_CCREG]==CCREG) reglist&=~(1<wasconst>>s)&1; if(s>=0) c=(i_regs->wasconst>>s)&1; // Check cop1 unusable if(!cop1_usable) { signed char rs=get_reg(i_regs->regmap,CSREG); assert(rs>=0); emit_testimm(rs,0x20000000); jaddr=(int)out; emit_jeq(0); add_stub(FP_STUB,jaddr,(int)out,i,rs,(int)i_regs,is_delayslot,0); cop1_usable=1; } if (opcode[i]==0x39) { // SWC1 (get float address) emit_readword((int)®_cop1_simple[(source[i]>>16)&0x1f],tl); } if (opcode[i]==0x3D) { // SDC1 (get double address) emit_readword((int)®_cop1_double[(source[i]>>16)&0x1f],tl); } // Generate address + offset if(!using_tlb) { #ifdef RAM_OFFSET if (!c||opcode[i]==0x39||opcode[i]==0x3D) // SWC1/SDC1 { map=get_reg(i_regs->regmap,ROREG); if(map<0) emit_loadreg(ROREG,map=HOST_TEMPREG); } #endif if(!c) emit_cmpimm(offset||c||s<0?ar:s,0x800000); } else { map=get_reg(i_regs->regmap,TLREG); int cache=get_reg(i_regs->regmap,MMREG); assert(map>=0); reglist&=~(1<>16)&0x1f],temp); } if (opcode[i]==0x35) { // LDC1 (get target address) emit_readword((int)®_cop1_double[(source[i]>>16)&0x1f],temp); } if(!using_tlb) { if(!c) { jaddr2=(int)out; emit_jno(0); } else if(((signed int)(constmap[i][s]+offset))>=(signed int)0x80800000) { jaddr2=(int)out; emit_jmp(0); // inline_readstub/inline_writestub? Very rare case } #ifdef DESTRUCTIVE_SHIFT if (opcode[i]==0x39||opcode[i]==0x3D) { // SWC1/SDC1 if(!offset&&!c&&s>=0) emit_mov(s,ar); } #endif }else{ if (opcode[i]==0x31||opcode[i]==0x35) { // LWC1/LDC1 do_tlb_r_branch(map,c,constmap[i][s]+offset,&jaddr2); } if (opcode[i]==0x39||opcode[i]==0x3D) { // SWC1/SDC1 do_tlb_w_branch(map,c,constmap[i][s]+offset,&jaddr2); } } if (opcode[i]==0x31) { // LWC1 //if(s>=0&&!c&&!offset) emit_mov(s,tl); //gen_tlb_addr_r(ar,map); //emit_readword_indexed((int)g_rdram-0x80000000,tl,tl); #ifdef HOST_IMM_ADDR32 if(c) emit_readword_tlb(constmap[i][s]+offset,map,tl); else #endif emit_readword_indexed_tlb(0,offset||c||s<0?tl:s,map,tl); type=LOADW_STUB; } if (opcode[i]==0x35) { // LDC1 assert(th>=0); //if(s>=0&&!c&&!offset) emit_mov(s,tl); //gen_tlb_addr_r(ar,map); //emit_readword_indexed((int)g_rdram-0x80000000,tl,th); //emit_readword_indexed((int)g_rdram-0x7FFFFFFC,tl,tl); #ifdef HOST_IMM_ADDR32 if(c) emit_readdword_tlb(constmap[i][s]+offset,map,th,tl); else #endif emit_readdword_indexed_tlb(0,offset||c||s<0?tl:s,map,th,tl); type=LOADD_STUB; } if (opcode[i]==0x39) { // SWC1 //emit_writeword_indexed(tl,(int)g_rdram-0x80000000,temp); emit_writeword_indexed_tlb(tl,0,offset||c||s<0?temp:s,map,temp); type=STOREW_STUB; } if (opcode[i]==0x3D) { // SDC1 assert(th>=0); //emit_writeword_indexed(th,(int)g_rdram-0x80000000,temp); //emit_writeword_indexed(tl,(int)g_rdram-0x7FFFFFFC,temp); emit_writedword_indexed_tlb(th,tl,0,offset||c||s<0?temp:s,map,temp); type=STORED_STUB; } if(!using_tlb) { if (opcode[i]==0x39||opcode[i]==0x3D) { // SWC1/SDC1 #ifndef DESTRUCTIVE_SHIFT temp=offset||c||s<0?ar:s; #endif #if defined(HOST_IMM8) int ir=get_reg(i_regs->regmap,INVCP); assert(ir>=0); emit_cmpmem_indexedsr12_reg(ir,temp,1); #else emit_cmpmem_indexedsr12_imm((int)invalid_code,temp,1); #endif #if defined(HAVE_CONDITIONAL_CALL) && !defined(DESTRUCTIVE_SHIFT) emit_callne(invalidate_addr_reg[temp]); #else jaddr3=(int)out; emit_jne(0); add_stub(INVCODE_STUB,jaddr3,(int)out,reglist|(1<regmap,CCREG)<0) emit_loadreg(CCREG,HOST_CCREG); emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_addimm(HOST_CCREG,2*ccadj[i],HOST_CCREG); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); emit_call((int)memdebug); emit_popa(); }*/ } #ifndef multdiv_assemble void multdiv_assemble(int i,struct regstat *i_regs) { DebugMessage(M64MSG_ERROR, "Need multdiv_assemble for this architecture."); exit(1); } #endif static void mov_assemble(int i,struct regstat *i_regs) { //if(opcode2[i]==0x10||opcode2[i]==0x12) { // MFHI/MFLO //if(opcode2[i]==0x11||opcode2[i]==0x13) { // MTHI/MTLO if(rt1[i]) { signed char sh,sl,th,tl; th=get_reg(i_regs->regmap,rt1[i]|64); tl=get_reg(i_regs->regmap,rt1[i]); //assert(tl>=0); if(tl>=0) { sh=get_reg(i_regs->regmap,rs1[i]|64); sl=get_reg(i_regs->regmap,rs1[i]); if(sl>=0) emit_mov(sl,tl); else emit_loadreg(rs1[i],tl); if(th>=0) { if(sh>=0) emit_mov(sh,th); else emit_loadreg(rs1[i]|64,th); } } } } #ifndef fconv_assemble void fconv_assemble(int i,struct regstat *i_regs) { DebugMessage(M64MSG_ERROR, "Need fconv_assemble for this architecture."); exit(1); } #endif #if 0 static void float_assemble(int i,struct regstat *i_regs) { DebugMessage(M64MSG_ERROR, "Need float_assemble for this architecture."); exit(1); } #endif static void syscall_assemble(int i,struct regstat *i_regs) { signed char ccreg=get_reg(i_regs->regmap,CCREG); assert(ccreg==HOST_CCREG); assert(!is_delayslot); emit_movimm(start+i*4,EAX); // Get PC emit_addimm(HOST_CCREG,CLOCK_DIVIDER*ccadj[i],HOST_CCREG); // CHECK: is this right? There should probably be an extra cycle... emit_jmp((int)jump_syscall); } static void ds_assemble(int i,struct regstat *i_regs) { is_delayslot=1; switch(itype[i]) { case ALU: alu_assemble(i,i_regs);break; case IMM16: imm16_assemble(i,i_regs);break; case SHIFT: shift_assemble(i,i_regs);break; case SHIFTIMM: shiftimm_assemble(i,i_regs);break; case LOAD: load_assemble(i,i_regs);break; case LOADLR: loadlr_assemble(i,i_regs);break; case STORE: store_assemble(i,i_regs);break; case STORELR: storelr_assemble(i,i_regs);break; case COP0: cop0_assemble(i,i_regs);break; case COP1: cop1_assemble(i,i_regs);break; case C1LS: c1ls_assemble(i,i_regs);break; case FCONV: fconv_assemble(i,i_regs);break; case FLOAT: float_assemble(i,i_regs);break; case FCOMP: fcomp_assemble(i,i_regs);break; case MULTDIV: multdiv_assemble(i,i_regs);break; case MOV: mov_assemble(i,i_regs);break; case SYSCALL: case SPAN: case UJUMP: case RJUMP: case CJUMP: case SJUMP: case FJUMP: DebugMessage(M64MSG_VERBOSE, "Jump in the delay slot. This is probably a bug."); } is_delayslot=0; } // Is the branch target a valid internal jump? static int internal_branch(uint64_t i_is32,int addr) { if(addr&1) return 0; // Indirect (register) jump if((u_int)addr>=start && (u_int)addr>2; // Delay slots are not valid branch targets //if(t>0&&(itype[t-1]==RJUMP||itype[t-1]==UJUMP||itype[t-1]==CJUMP||itype[t-1]==SJUMP||itype[t-1]==FJUMP)) return 0; // 64 -> 32 bit transition requires a recompile /*if(is32[t]&~unneeded_reg_upper[t]&~i_is32) { if(requires_32bit[t]&~i_is32) DebugMessage(M64MSG_VERBOSE, "optimizable: no"); else DebugMessage(M64MSG_VERBOSE, "optimizable: yes"); }*/ //if(is32[t]&~unneeded_reg_upper[t]&~i_is32) return 0; if(requires_32bit[t]&~i_is32) return 0; else return 1; } return 0; } #ifndef wb_invalidate static void wb_invalidate(signed char pre[],signed char entry[],uint64_t dirty,uint64_t is32, uint64_t u,uint64_t uu) { int hr; for(hr=0;hr=0) { if((dirty>>hr)&1) { if(get_reg(entry,pre[hr])<0) { if(pre[hr]<64) { if(!((u>>pre[hr])&1)) { emit_storereg(pre[hr],hr); if( ((is32>>pre[hr])&1) && !((uu>>pre[hr])&1) ) { emit_sarimm(hr,31,hr); emit_storereg(pre[hr]|64,hr); } } }else{ if(!((uu>>(pre[hr]&63))&1) && !((is32>>(pre[hr]&63))&1)) { emit_storereg(pre[hr],hr); } } } } } } } } // Move from one register to another (no writeback) for(hr=0;hr=0&&(pre[hr]&63)=0) { emit_mov(hr,nr); } } } } } } #endif // Load the specified registers // This only loads the registers given as arguments because // we don't want to load things that will be overwritten static void load_regs(signed char entry[],signed char regmap[],int is32,int rs1,int rs2) { int hr; // Load 32-bit regs for(hr=0;hr=0) { if(entry[hr]!=regmap[hr]) { if(regmap[hr]==rs1||regmap[hr]==rs2) { if(regmap[hr]==0) { emit_zeroreg(hr); } else { emit_loadreg(regmap[hr],hr); } } } } } //Load 64-bit regs for(hr=0;hr=0) { if(entry[hr]!=regmap[hr]) { if(regmap[hr]-64==rs1||regmap[hr]-64==rs2) { assert(regmap[hr]!=64); if((is32>>(regmap[hr]&63))&1) { int lr=get_reg(regmap,regmap[hr]-64); if(lr>=0) emit_sarimm(lr,31,hr); else emit_loadreg(regmap[hr],hr); } else { emit_loadreg(regmap[hr],hr); } } } } } } // Load registers prior to the start of a loop // so that they are not loaded within the loop static void loop_preload(signed char pre[],signed char entry[]) { int hr; for(hr=0;hr=0) { if(get_reg(pre,entry[hr])<0) { assem_debug("loop preload:"); //DebugMessage(M64MSG_VERBOSE, "loop preload: %d",hr); if(entry[hr]==0) { emit_zeroreg(hr); } else if(entry[hr]regmap,rt1[i]); if(ra<0) ra=get_reg(i_regs->regmap,-1); assert(ra>=0); } if(itype[i]==LOADLR) { ra=get_reg(i_regs->regmap,FTEMP); } if(itype[i]==STORE||itype[i]==STORELR) { ra=get_reg(i_regs->regmap,agr); if(ra<0) ra=get_reg(i_regs->regmap,-1); } if(itype[i]==C1LS) { if (opcode[i]==0x31||opcode[i]==0x35) // LWC1/LDC1 ra=get_reg(i_regs->regmap,FTEMP); else { // SWC1/SDC1 ra=get_reg(i_regs->regmap,agr); if(ra<0) ra=get_reg(i_regs->regmap,-1); } } int rs=get_reg(i_regs->regmap,rs1[i]); int rm=get_reg(i_regs->regmap,TLREG); if(ra>=0) { int offset=imm[i]; int c=(i_regs->wasconst>>rs)&1; if(rs1[i]==0) { // Using r0 as a base address /*if(rm>=0) { if(!entry||entry[rm]!=mgr) { generate_map_const(offset,rm); } // else did it in the previous cycle }*/ if(!entry||entry[ra]!=agr) { if (opcode[i]==0x22||opcode[i]==0x26) { emit_movimm(offset&0xFFFFFFFC,ra); // LWL/LWR }else if (opcode[i]==0x1a||opcode[i]==0x1b) { emit_movimm(offset&0xFFFFFFF8,ra); // LDL/LDR }else{ emit_movimm(offset,ra); } } // else did it in the previous cycle } else if(rs<0) { if(!entry||entry[ra]!=rs1[i]) emit_loadreg(rs1[i],ra); //if(!entry||entry[ra]!=rs1[i]) // DebugMessage(M64MSG_VERBOSE, "poor load scheduling!"); } else if(c) { if(rm>=0) { if(!entry||entry[rm]!=mgr) { if(itype[i]==STORE||itype[i]==STORELR||opcode[i]==0x39||opcode[i]==0x3D) { // Stores to memory go thru the mapper to detect self-modifying // code, loads don't. if((unsigned int)(constmap[i][rs]+offset)>=0xC0000000 || (unsigned int)(constmap[i][rs]+offset)<0x80800000 ) generate_map_const(constmap[i][rs]+offset,rm); }else{ if((signed int)(constmap[i][rs]+offset)>=(signed int)0xC0000000) generate_map_const(constmap[i][rs]+offset,rm); } } } if(rs1[i]!=rt1[i]||itype[i]!=LOAD) { if(!entry||entry[ra]!=agr) { if (opcode[i]==0x22||opcode[i]==0x26) { // LWL/LWR #ifdef RAM_OFFSET if((signed int)constmap[i][rs]+offset<(signed int)0x80800000) emit_movimm(((constmap[i][rs]+offset)&0xFFFFFFFC)+(int)g_rdram-0x80000000,ra); else #endif emit_movimm((constmap[i][rs]+offset)&0xFFFFFFFC,ra); }else if (opcode[i]==0x1a||opcode[i]==0x1b) { // LDL/LDR #ifdef RAM_OFFSET if((signed int)constmap[i][rs]+offset<(signed int)0x80800000) emit_movimm(((constmap[i][rs]+offset)&0xFFFFFFF8)+(int)g_rdram-0x80000000,ra); else #endif emit_movimm((constmap[i][rs]+offset)&0xFFFFFFF8,ra); }else{ #ifdef HOST_IMM_ADDR32 if((itype[i]!=LOAD&&opcode[i]!=0x31&&opcode[i]!=0x35) || (using_tlb&&((signed int)constmap[i][rs]+offset)>=(signed int)0xC0000000)) #endif #ifdef RAM_OFFSET if((itype[i]==LOAD||opcode[i]==0x31||opcode[i]==0x35)&&(signed int)constmap[i][rs]+offset<(signed int)0x80800000) emit_movimm(constmap[i][rs]+offset+(int)g_rdram-0x80000000,ra); else #endif emit_movimm(constmap[i][rs]+offset,ra); } } // else did it in the previous cycle } // else load_consts already did it } if(offset&&!c&&rs1[i]) { if(rs>=0) { emit_addimm(rs,offset,ra); }else{ emit_addimm(ra,offset,ra); } } } } // Preload constants for next instruction if(itype[i+1]==LOAD||itype[i+1]==LOADLR||itype[i+1]==STORE||itype[i+1]==STORELR||itype[i+1]==C1LS) { int agr,ra; #ifndef HOST_IMM_ADDR32 // Mapper entry agr=MGEN1+((i+1)&1); ra=get_reg(i_regs->regmap,agr); if(ra>=0) { int rs=get_reg(regs[i+1].regmap,rs1[i+1]); int offset=imm[i+1]; int c=(regs[i+1].wasconst>>rs)&1; if(c) { if(itype[i+1]==STORE||itype[i+1]==STORELR||opcode[i+1]==0x39||opcode[i+1]==0x3D) { // Stores to memory go thru the mapper to detect self-modifying // code, loads don't. if((unsigned int)(constmap[i+1][rs]+offset)>=0xC0000000 || (unsigned int)(constmap[i+1][rs]+offset)<0x80800000 ) generate_map_const(constmap[i+1][rs]+offset,ra); }else{ if((signed int)(constmap[i+1][rs]+offset)>=(signed int)0xC0000000) generate_map_const(constmap[i+1][rs]+offset,ra); } } /*else if(rs1[i]==0) { generate_map_const(offset,ra); }*/ } #endif // Actual address agr=AGEN1+((i+1)&1); ra=get_reg(i_regs->regmap,agr); if(ra>=0) { int rs=get_reg(regs[i+1].regmap,rs1[i+1]); int offset=imm[i+1]; int c=(regs[i+1].wasconst>>rs)&1; if(c&&(rs1[i+1]!=rt1[i+1]||itype[i+1]!=LOAD)) { if (opcode[i+1]==0x22||opcode[i+1]==0x26) { // LWL/LWR #ifdef RAM_OFFSET if((signed int)constmap[i+1][rs]+offset<(signed int)0x80800000) emit_movimm(((constmap[i+1][rs]+offset)&0xFFFFFFFC)+(int)g_rdram-0x80000000,ra); else #endif emit_movimm((constmap[i+1][rs]+offset)&0xFFFFFFFC,ra); }else if (opcode[i+1]==0x1a||opcode[i+1]==0x1b) { // LDL/LDR #ifdef RAM_OFFSET if((signed int)constmap[i+1][rs]+offset<(signed int)0x80800000) emit_movimm(((constmap[i+1][rs]+offset)&0xFFFFFFF8)+(int)g_rdram-0x80000000,ra); else #endif emit_movimm((constmap[i+1][rs]+offset)&0xFFFFFFF8,ra); }else{ #ifdef HOST_IMM_ADDR32 if((itype[i+1]!=LOAD&&opcode[i+1]!=0x31&&opcode[i+1]!=0x35) || (using_tlb&&((signed int)constmap[i+1][rs]+offset)>=(signed int)0xC0000000)) #endif #ifdef RAM_OFFSET if((itype[i+1]==LOAD||opcode[i+1]==0x31||opcode[i+1]==0x35)&&(signed int)constmap[i+1][rs]+offset<(signed int)0x80800000) emit_movimm(constmap[i+1][rs]+offset+(int)g_rdram-0x80000000,ra); else #endif emit_movimm(constmap[i+1][rs]+offset,ra); } } else if(rs1[i+1]==0) { // Using r0 as a base address if (opcode[i+1]==0x22||opcode[i+1]==0x26) { emit_movimm(offset&0xFFFFFFFC,ra); // LWL/LWR }else if (opcode[i+1]==0x1a||opcode[i+1]==0x1b) { emit_movimm(offset&0xFFFFFFF8,ra); // LDL/LDR }else{ emit_movimm(offset,ra); } } } } } static int get_final_value(int hr, int i, int *value) { int reg=regs[i].regmap[hr]; while(i>hr)&1)) break; if(bt[i+1]) break; i++; } if(i>hr)&1)) { #ifdef HOST_IMM_ADDR32 if(!using_tlb||((signed int)constmap[i][hr]+imm[i+2])<(signed int)0xC0000000) return 0; #endif #ifdef RAM_OFFSET if((signed int)constmap[i][hr]+imm[i+2]<(signed int)0x80800000) *value=constmap[i][hr]+imm[i+2]+(int)g_rdram-0x80000000; else #endif // Precompute load address *value=constmap[i][hr]+imm[i+2]; return 1; } } if(itype[i+1]==LOAD&&rs1[i+1]==reg&&rt1[i+1]==reg) { #ifdef HOST_IMM_ADDR32 if(!using_tlb||((signed int)constmap[i][hr]+imm[i+1])<(signed int)0xC0000000) return 0; #endif #ifdef RAM_OFFSET if((signed int)constmap[i][hr]+imm[i+1]<(signed int)0x80800000) *value=constmap[i][hr]+imm[i+1]+(int)g_rdram-0x80000000; else #endif // Precompute load address *value=constmap[i][hr]+imm[i+1]; //DebugMessage(M64MSG_VERBOSE, "c=%x imm=%x",(int)constmap[i][hr],imm[i+1]); return 1; } } } *value=constmap[i][hr]; //DebugMessage(M64MSG_VERBOSE, "c=%x",(int)constmap[i][hr]); if(i==slen-1) return 1; if(reg<64) { return !((unneeded_reg[i+1]>>reg)&1); }else{ return !((unneeded_reg_upper[i+1]>>reg)&1); } } // Load registers with known constants static void load_consts(signed char pre[],signed char regmap[],int is32,int i) { int hr; // Load 32-bit regs for(hr=0;hr=0) { //if(entry[hr]!=regmap[hr]) { if(i==0||!((regs[i-1].isconst>>hr)&1)||pre[hr]!=regmap[hr]||bt[i]) { if(((regs[i].isconst>>hr)&1)&®map[hr]<64&®map[hr]>0) { int value; if(get_final_value(hr,i,&value)) { if(value==0) { emit_zeroreg(hr); } else { emit_movimm(value,hr); } } } } } } // Load 64-bit regs for(hr=0;hr=0) { //if(entry[hr]!=regmap[hr]) { if(i==0||!((regs[i-1].isconst>>hr)&1)||pre[hr]!=regmap[hr]||bt[i]) { if(((regs[i].isconst>>hr)&1)&®map[hr]>64) { if((is32>>(regmap[hr]&63))&1) { int lr=get_reg(regmap,regmap[hr]-64); assert(lr>=0); emit_sarimm(lr,31,hr); } else { int value; if(get_final_value(hr,i,&value)) { if(value==0) { emit_zeroreg(hr); } else { emit_movimm(value,hr); } } } } } } } } static void load_all_consts(signed char regmap[],int is32,u_int dirty,int i) { int hr; // Load 32-bit regs for(hr=0;hr=0&&((dirty>>hr)&1)) { if(((regs[i].isconst>>hr)&1)&®map[hr]<64&®map[hr]>0) { int value=constmap[i][hr]; if(value==0) { emit_zeroreg(hr); } else { emit_movimm(value,hr); } } } } // Load 64-bit regs for(hr=0;hr=0&&((dirty>>hr)&1)) { if(((regs[i].isconst>>hr)&1)&®map[hr]>64) { if((is32>>(regmap[hr]&63))&1) { int lr=get_reg(regmap,regmap[hr]-64); assert(lr>=0); emit_sarimm(lr,31,hr); } else { int value=constmap[i][hr]; if(value==0) { emit_zeroreg(hr); } else { emit_movimm(value,hr); } } } } } } // Write out all dirty registers (except cycle count) static void wb_dirtys(signed char i_regmap[],uint64_t i_is32,uint64_t i_dirty) { int hr; for(hr=0;hr0) { if(i_regmap[hr]!=CCREG) { if((i_dirty>>hr)&1) { if(i_regmap[hr]<64) { emit_storereg(i_regmap[hr],hr); if( ((i_is32>>i_regmap[hr])&1) ) { #ifdef DESTRUCTIVE_WRITEBACK emit_sarimm(hr,31,hr); emit_storereg(i_regmap[hr]|64,hr); #else emit_sarimm(hr,31,HOST_TEMPREG); emit_storereg(i_regmap[hr]|64,HOST_TEMPREG); #endif } }else{ if( !((i_is32>>(i_regmap[hr]&63))&1) ) { emit_storereg(i_regmap[hr],hr); } } } } } } } } // Write out dirty registers that we need to reload (pair with load_needed_regs) // This writes the registers not written by store_regs_bt static void wb_needed_dirtys(signed char i_regmap[],uint64_t i_is32,uint64_t i_dirty,int addr) { int hr; int t=(addr-start)>>2; for(hr=0;hr0) { if(i_regmap[hr]!=CCREG) { if(i_regmap[hr]==regs[t].regmap_entry[hr] && ((regs[t].dirty>>hr)&1) && !(((i_is32&~regs[t].was32&~unneeded_reg_upper[t])>>(i_regmap[hr]&63))&1)) { if((i_dirty>>hr)&1) { if(i_regmap[hr]<64) { emit_storereg(i_regmap[hr],hr); if( ((i_is32>>i_regmap[hr])&1) ) { #ifdef DESTRUCTIVE_WRITEBACK emit_sarimm(hr,31,hr); emit_storereg(i_regmap[hr]|64,hr); #else emit_sarimm(hr,31,HOST_TEMPREG); emit_storereg(i_regmap[hr]|64,HOST_TEMPREG); #endif } }else{ if( !((i_is32>>(i_regmap[hr]&63))&1) ) { emit_storereg(i_regmap[hr],hr); } } } } } } } } } // Load all registers (except cycle count) static void load_all_regs(signed char i_regmap[]) { int hr; for(hr=0;hr0 && (i_regmap[hr]&63)=0) { if(i_regmap[hr]==0) { emit_zeroreg(hr); } else if(i_regmap[hr]>0 && (i_regmap[hr]&63)=0&®s[t].regmap_entry[hr]=64&®s[t].regmap_entry[hr]>(regs[t].regmap_entry[hr]&63))&1) { int lr=get_reg(regs[t].regmap_entry,regs[t].regmap_entry[hr]-64); if(lr<0) { emit_loadreg(regs[t].regmap_entry[hr],hr); } else { emit_sarimm(lr,31,hr); } } else { emit_loadreg(regs[t].regmap_entry[hr],hr); } } } } // Store dirty registers prior to branch static void store_regs_bt(signed char i_regmap[],uint64_t i_is32,uint64_t i_dirty,int addr) { if(internal_branch(i_is32,addr)) { int t=(addr-start)>>2; int hr; for(hr=0;hr0 && i_regmap[hr]!=CCREG) { if(i_regmap[hr]!=regs[t].regmap_entry[hr] || !((regs[t].dirty>>hr)&1) || (((i_is32&~regs[t].was32&~unneeded_reg_upper[t])>>(i_regmap[hr]&63))&1)) { if((i_dirty>>hr)&1) { if(i_regmap[hr]<64) { if(!((unneeded_reg[t]>>i_regmap[hr])&1)) { emit_storereg(i_regmap[hr],hr); if( ((i_is32>>i_regmap[hr])&1) && !((unneeded_reg_upper[t]>>i_regmap[hr])&1) ) { #ifdef DESTRUCTIVE_WRITEBACK emit_sarimm(hr,31,hr); emit_storereg(i_regmap[hr]|64,hr); #else emit_sarimm(hr,31,HOST_TEMPREG); emit_storereg(i_regmap[hr]|64,HOST_TEMPREG); #endif } } }else{ if( !((i_is32>>(i_regmap[hr]&63))&1) && !((unneeded_reg_upper[t]>>(i_regmap[hr]&63))&1) ) { emit_storereg(i_regmap[hr],hr); } } } } } } } } else { // Branch out of this block, write out all dirty regs wb_dirtys(i_regmap,i_is32,i_dirty); } } // Load all needed registers for branch target static void load_regs_bt(signed char i_regmap[],uint64_t i_is32,uint64_t i_dirty,int addr) { //if(addr>=start && addr<(start+slen*4)) if(internal_branch(i_is32,addr)) { int t=(addr-start)>>2; int hr; // Store the cycle count before loading something else if(i_regmap[HOST_CCREG]!=CCREG) { assert(i_regmap[HOST_CCREG]==-1); } if(regs[t].regmap_entry[HOST_CCREG]!=CCREG) { emit_storereg(CCREG,HOST_CCREG); } // Load 32-bit regs for(hr=0;hr=0&®s[t].regmap_entry[hr]>hr)&1) && ((i_dirty>>hr)&1) && (((i_is32&~unneeded_reg_upper[t])>>i_regmap[hr])&1) ) || (((i_is32&~regs[t].was32&~unneeded_reg_upper[t])>>(i_regmap[hr]&63))&1)) { #else if(i_regmap[hr]!=regs[t].regmap_entry[hr] ) { #endif if(regs[t].regmap_entry[hr]==0) { emit_zeroreg(hr); } else if(regs[t].regmap_entry[hr]!=CCREG) { emit_loadreg(regs[t].regmap_entry[hr],hr); } } } } //Load 64-bit regs for(hr=0;hr=64&®s[t].regmap_entry[hr]>(regs[t].regmap_entry[hr]&63))&1) { int lr=get_reg(regs[t].regmap_entry,regs[t].regmap_entry[hr]-64); if(lr<0) { emit_loadreg(regs[t].regmap_entry[hr],hr); } else { emit_sarimm(lr,31,hr); } } else { emit_loadreg(regs[t].regmap_entry[hr],hr); } } else if((i_is32>>(regs[t].regmap_entry[hr]&63))&1) { int lr=get_reg(regs[t].regmap_entry,regs[t].regmap_entry[hr]-64); if(lr<0) { emit_loadreg(regs[t].regmap_entry[hr],hr); } else { emit_sarimm(lr,31,hr); } } } } } } static int match_bt(signed char i_regmap[],uint64_t i_is32,uint64_t i_dirty,int addr) { if((u_int)addr>=start && (u_int)addr>2; int hr; if(regs[t].regmap_entry[HOST_CCREG]!=CCREG) return 0; for(hr=0;hr=0&&(regs[t].regmap_entry[hr]|64)>hr)&1) { if(i_regmap[hr]>i_regmap[hr])&1)) return 0; } else if(i_regmap[hr]>=64&&i_regmap[hr]>(i_regmap[hr]&63))&1)) return 0; } } } else // Same register but is it 32-bit or dirty? if(i_regmap[hr]>=0) { if(!((regs[t].dirty>>hr)&1)) { if((i_dirty>>hr)&1) { if(!((unneeded_reg[t]>>i_regmap[hr])&1)) { //DebugMessage(M64MSG_VERBOSE, "%x: dirty no match",addr); return 0; } } } if((((regs[t].was32^i_is32)&~unneeded_reg_upper[t])>>(i_regmap[hr]&63))&1) { //DebugMessage(M64MSG_VERBOSE, "%x: is32 no match",addr); return 0; } } } } //if(is32[t]&~unneeded_reg_upper[t]&~i_is32) return 0; if(requires_32bit[t]&~i_is32) return 0; // Delay slots are not valid branch targets //if(t>0&&(itype[t-1]==RJUMP||itype[t-1]==UJUMP||itype[t-1]==CJUMP||itype[t-1]==SJUMP||itype[t-1]==FJUMP)) return 0; // Delay slots require additional processing, so do not match if(is_ds[t]) return 0; } else { int hr; for(hr=0;hr=0) { if(hr!=HOST_CCREG||i_regmap[hr]!=CCREG) { if((i_dirty>>hr)&1) { return 0; } } } } } } return 1; } // Used when a branch jumps into the delay slot of another branch static void ds_assemble_entry(int i) { int t=(ba[i]-start)>>2; if(!instr_addr[t]) instr_addr[t]=(u_int)out; assem_debug("Assemble delay slot at %x",ba[i]); assem_debug("<->"); if(regs[t].regmap_entry[HOST_CCREG]==CCREG&®s[t].regmap[HOST_CCREG]!=CCREG) wb_register(CCREG,regs[t].regmap_entry,regs[t].wasdirty,regs[t].was32); load_regs(regs[t].regmap_entry,regs[t].regmap,regs[t].was32,rs1[t],rs2[t]); address_generation(t,®s[t],regs[t].regmap_entry); if(itype[t]==LOAD||itype[t]==LOADLR||itype[t]==STORE||itype[t]==STORELR||itype[t]==C1LS) load_regs(regs[t].regmap_entry,regs[t].regmap,regs[t].was32,MMREG,ROREG); if(itype[t]==STORE||itype[t]==STORELR||(opcode[t]&0x3b)==0x39) load_regs(regs[t].regmap_entry,regs[t].regmap,regs[t].was32,INVCP,INVCP); cop1_usable=0; is_delayslot=0; switch(itype[t]) { case ALU: alu_assemble(t,®s[t]);break; case IMM16: imm16_assemble(t,®s[t]);break; case SHIFT: shift_assemble(t,®s[t]);break; case SHIFTIMM: shiftimm_assemble(t,®s[t]);break; case LOAD: load_assemble(t,®s[t]);break; case LOADLR: loadlr_assemble(t,®s[t]);break; case STORE: store_assemble(t,®s[t]);break; case STORELR: storelr_assemble(t,®s[t]);break; case COP0: cop0_assemble(t,®s[t]);break; case COP1: cop1_assemble(t,®s[t]);break; case C1LS: c1ls_assemble(t,®s[t]);break; case FCONV: fconv_assemble(t,®s[t]);break; case FLOAT: float_assemble(t,®s[t]);break; case FCOMP: fcomp_assemble(t,®s[t]);break; case MULTDIV: multdiv_assemble(t,®s[t]);break; case MOV: mov_assemble(t,®s[t]);break; case SYSCALL: case SPAN: case UJUMP: case RJUMP: case CJUMP: case SJUMP: case FJUMP: DebugMessage(M64MSG_VERBOSE, "Jump in the delay slot. This is probably a bug."); } store_regs_bt(regs[t].regmap,regs[t].is32,regs[t].dirty,ba[i]+4); load_regs_bt(regs[t].regmap,regs[t].is32,regs[t].dirty,ba[i]+4); if(internal_branch(regs[t].is32,ba[i]+4)) assem_debug("branch: internal"); else assem_debug("branch: external"); assert(internal_branch(regs[t].is32,ba[i]+4)); add_to_linker((int)out,ba[i]+4,internal_branch(regs[t].is32,ba[i]+4)); emit_jmp(0); } static void do_cc(int i,signed char i_regmap[],int *adj,int addr,int taken,int invert) { int count; int jaddr; int idle=0; if(itype[i]==RJUMP) { *adj=0; } //if(ba[i]>=start && ba[i]<(start+slen*4)) if(internal_branch(branch_regs[i].is32,ba[i])) { int t=(ba[i]-start)>>2; if(is_ds[t]) *adj=-1; // Branch into delay slot adds an extra cycle else *adj=ccadj[t]; } else { *adj=0; } count=ccadj[i]; if(taken==TAKEN && i==(ba[i]-start)>>2 && source[i+1]==0) { // Idle loop if(count&1) emit_addimm_and_set_flags(2*(count+2),HOST_CCREG); idle=(int)out; //emit_subfrommem(&idlecount,HOST_CCREG); // Count idle cycles emit_andimm(HOST_CCREG,3,HOST_CCREG); jaddr=(int)out; emit_jmp(0); } else if(*adj==0||invert) { emit_addimm_and_set_flags(CLOCK_DIVIDER*(count+2),HOST_CCREG); jaddr=(int)out; emit_jns(0); } else { emit_cmpimm(HOST_CCREG,-(int)CLOCK_DIVIDER*(count+2)); jaddr=(int)out; emit_jns(0); } add_stub(CC_STUB,jaddr,idle?idle:(int)out,(*adj==0||invert||idle)?0:(count+2),i,addr,taken,0); } static void do_ccstub(int n) { literal_pool(256); assem_debug("do_ccstub %x",start+stubs[n][4]*4); set_jump_target(stubs[n][1],(int)out); int i=stubs[n][4]; if(stubs[n][6]==NULLDS) { // Delay slot instruction is nullified ("likely" branch) wb_dirtys(regs[i].regmap,regs[i].is32,regs[i].dirty); } else if(stubs[n][6]!=TAKEN) { wb_dirtys(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty); } else { if(internal_branch(branch_regs[i].is32,ba[i])) wb_needed_dirtys(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); } if(stubs[n][5]!=-1) { // Save PC as return address emit_movimm(stubs[n][5],EAX); emit_writeword(EAX,(int)&pcaddr); } else { // Return address depends on which way the branch goes if(itype[i]==CJUMP||itype[i]==SJUMP||itype[i]==FJUMP) { int s1l=get_reg(branch_regs[i].regmap,rs1[i]); int s1h=get_reg(branch_regs[i].regmap,rs1[i]|64); int s2l=get_reg(branch_regs[i].regmap,rs2[i]); int s2h=get_reg(branch_regs[i].regmap,rs2[i]|64); if(rs1[i]==0) { s1l=s2l;s1h=s2h; s2l=s2h=-1; } else if(rs2[i]==0) { s2l=s2h=-1; } if((branch_regs[i].is32>>rs1[i])&(branch_regs[i].is32>>rs2[i])&1) { s1h=s2h=-1; } assert(s1l>=0); #ifdef DESTRUCTIVE_WRITEBACK if(rs1[i]) { if((branch_regs[i].dirty>>s1l)&(branch_regs[i].is32>>rs1[i])&1) emit_loadreg(rs1[i],s1l); } else { if((branch_regs[i].dirty>>s1l)&(branch_regs[i].is32>>rs2[i])&1) emit_loadreg(rs2[i],s1l); } if(s2l>=0) if((branch_regs[i].dirty>>s2l)&(branch_regs[i].is32>>rs2[i])&1) emit_loadreg(rs2[i],s2l); #endif int hr=0; int addr,alt,ntaddr; while(hr=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); emit_cmov2imm_e_ne_compact(ba[i],start+i*4+8,addr); } else #endif { emit_mov2imm_compact(ba[i],addr,start+i*4+8,alt); if(s1h>=0) { if(s2h>=0) emit_cmp(s1h,s2h); else emit_test(s1h,s1h); emit_cmovne_reg(alt,addr); } if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); emit_cmovne_reg(alt,addr); } } if((opcode[i]&0x2f)==5) // BNE { #ifdef HAVE_CMOV_IMM if(s1h<0) { if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); emit_cmov2imm_e_ne_compact(start+i*4+8,ba[i],addr); } else #endif { emit_mov2imm_compact(start+i*4+8,addr,ba[i],alt); if(s1h>=0) { if(s2h>=0) emit_cmp(s1h,s2h); else emit_test(s1h,s1h); emit_cmovne_reg(alt,addr); } if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); emit_cmovne_reg(alt,addr); } } if((opcode[i]&0x2f)==6) // BLEZ { //emit_movimm(ba[i],alt); //emit_movimm(start+i*4+8,addr); emit_mov2imm_compact(ba[i],alt,start+i*4+8,addr); emit_cmpimm(s1l,1); if(s1h>=0) emit_mov(addr,ntaddr); emit_cmovl_reg(alt,addr); if(s1h>=0) { emit_test(s1h,s1h); emit_cmovne_reg(ntaddr,addr); emit_cmovs_reg(alt,addr); } } if((opcode[i]&0x2f)==7) // BGTZ { //emit_movimm(ba[i],addr); //emit_movimm(start+i*4+8,ntaddr); emit_mov2imm_compact(ba[i],addr,start+i*4+8,ntaddr); emit_cmpimm(s1l,1); if(s1h>=0) emit_mov(addr,alt); emit_cmovl_reg(ntaddr,addr); if(s1h>=0) { emit_test(s1h,s1h); emit_cmovne_reg(alt,addr); emit_cmovs_reg(ntaddr,addr); } } if((opcode[i]==1)&&(opcode2[i]&0x2D)==0) // BLTZ { //emit_movimm(ba[i],alt); //emit_movimm(start+i*4+8,addr); emit_mov2imm_compact(ba[i],alt,start+i*4+8,addr); if(s1h>=0) emit_test(s1h,s1h); else emit_test(s1l,s1l); emit_cmovs_reg(alt,addr); } if((opcode[i]==1)&&(opcode2[i]&0x2D)==1) // BGEZ { //emit_movimm(ba[i],addr); //emit_movimm(start+i*4+8,alt); emit_mov2imm_compact(ba[i],addr,start+i*4+8,alt); if(s1h>=0) emit_test(s1h,s1h); else emit_test(s1l,s1l); emit_cmovs_reg(alt,addr); } if(opcode[i]==0x11 && opcode2[i]==0x08 ) { if(source[i]&0x10000) // BC1T { //emit_movimm(ba[i],alt); //emit_movimm(start+i*4+8,addr); emit_mov2imm_compact(ba[i],alt,start+i*4+8,addr); emit_testimm(s1l,0x800000); emit_cmovne_reg(alt,addr); } else // BC1F { //emit_movimm(ba[i],addr); //emit_movimm(start+i*4+8,alt); emit_mov2imm_compact(ba[i],addr,start+i*4+8,alt); emit_testimm(s1l,0x800000); emit_cmovne_reg(alt,addr); } } emit_writeword(addr,(int)&pcaddr); } else if(itype[i]==RJUMP) { int r=get_reg(branch_regs[i].regmap,rs1[i]); if(rs1[i]==rt1[i+1]||rs1[i]==rt2[i+1]) { r=get_reg(branch_regs[i].regmap,RTEMP); } emit_writeword(r,(int)&pcaddr); } else {DebugMessage(M64MSG_ERROR, "Unknown branch type in do_ccstub");exit(1);} } // Update cycle count assert(branch_regs[i].regmap[HOST_CCREG]==CCREG||branch_regs[i].regmap[HOST_CCREG]==-1); if(stubs[n][3]) emit_addimm(HOST_CCREG,CLOCK_DIVIDER*stubs[n][3],HOST_CCREG); emit_call((int)cc_interrupt); if(stubs[n][3]) emit_addimm(HOST_CCREG,-(int)CLOCK_DIVIDER*stubs[n][3],HOST_CCREG); if(stubs[n][6]==TAKEN) { if(internal_branch(branch_regs[i].is32,ba[i])) load_needed_regs(branch_regs[i].regmap,regs[(ba[i]-start)>>2].regmap_entry); else if(itype[i]==RJUMP) { if(get_reg(branch_regs[i].regmap,RTEMP)>=0) emit_readword((int)&pcaddr,get_reg(branch_regs[i].regmap,RTEMP)); else emit_loadreg(rs1[i],get_reg(branch_regs[i].regmap,rs1[i])); } }else if(stubs[n][6]==NOTTAKEN) { if(iregmap; #endif if(i==(ba[i]-start)>>2) assem_debug("idle loop"); address_generation(i+1,i_regs,regs[i].regmap_entry); #ifdef REG_PREFETCH int temp=get_reg(branch_regs[i].regmap,PTEMP); if(rt1[i]==31&&temp>=0) { int return_address=start+i*4+8; if(get_reg(branch_regs[i].regmap,31)>0) if(i_regmap[temp]==PTEMP) emit_movimm((int)hash_table[((return_address>>16)^return_address)&0xFFFF],temp); } #endif ds_assemble(i+1,i_regs); uint64_t bc_unneeded=branch_regs[i].u; uint64_t bc_unneeded_upper=branch_regs[i].uu; bc_unneeded|=1|(1LL<=0); return_address=start+i*4+8; if(rt>=0) { #ifdef USE_MINI_HT if(internal_branch(branch_regs[i].is32,return_address)) { int temp=rt+1; if(temp==EXCLUDE_REG||temp>=HOST_REGS|| branch_regs[i].regmap[temp]>=0) { temp=get_reg(branch_regs[i].regmap,-1); } #ifdef HOST_TEMPREG if(temp<0) temp=HOST_TEMPREG; #endif if(temp>=0) do_miniht_insert(return_address,rt,temp); else emit_movimm(return_address,rt); } else #endif { #ifdef REG_PREFETCH if(temp>=0) { if(i_regmap[temp]!=PTEMP) emit_movimm((int)hash_table[((return_address>>16)^return_address)&0xFFFF],temp); } #endif emit_movimm(return_address,rt); // PC into link register #ifdef IMM_PREFETCH emit_prefetch(hash_table[((return_address>>16)^return_address)&0xFFFF]); #endif } } } int cc,adj; cc=get_reg(branch_regs[i].regmap,CCREG); assert(cc==HOST_CCREG); store_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); #ifdef REG_PREFETCH if(rt1[i]==31&&temp>=0) emit_prefetchreg(temp); #endif do_cc(i,branch_regs[i].regmap,&adj,ba[i],TAKEN,0); if(adj) emit_addimm(cc,CLOCK_DIVIDER*(ccadj[i]+2-adj),cc); load_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); if(internal_branch(branch_regs[i].is32,ba[i])) assem_debug("branch: internal"); else assem_debug("branch: external"); if(internal_branch(branch_regs[i].is32,ba[i])&&is_ds[(ba[i]-start)>>2]) { ds_assemble_entry(i); } else { add_to_linker((int)out,ba[i],internal_branch(branch_regs[i].is32,ba[i])); emit_jmp(0); } } static void rjump_assemble(int i,struct regstat *i_regs) { #ifdef REG_PREFETCH signed char *i_regmap=i_regs->regmap; #endif int temp; int rs,cc; rs=get_reg(branch_regs[i].regmap,rs1[i]); assert(rs>=0); if(rs1[i]==rt1[i+1]||rs1[i]==rt2[i+1]) { // Delay slot abuse, make a copy of the branch address register temp=get_reg(branch_regs[i].regmap,RTEMP); assert(temp>=0); assert(regs[i].regmap[temp]==RTEMP); emit_mov(rs,temp); rs=temp; } address_generation(i+1,i_regs,regs[i].regmap_entry); #ifdef REG_PREFETCH if(rt1[i]==31) { if((temp=get_reg(branch_regs[i].regmap,PTEMP))>=0) { int return_address=start+i*4+8; if(i_regmap[temp]==PTEMP) emit_movimm((int)hash_table[((return_address>>16)^return_address)&0xFFFF],temp); } } #endif #ifdef USE_MINI_HT if(rs1[i]==31) { int rh=get_reg(regs[i].regmap,RHASH); if(rh>=0) do_preload_rhash(rh); } #endif ds_assemble(i+1,i_regs); uint64_t bc_unneeded=branch_regs[i].u; uint64_t bc_unneeded_upper=branch_regs[i].uu; bc_unneeded|=1|(1LL<=0); return_address=start+i*4+8; #ifdef REG_PREFETCH if(temp>=0) { if(i_regmap[temp]!=PTEMP) emit_movimm((int)hash_table[((return_address>>16)^return_address)&0xFFFF],temp); } #endif emit_movimm(return_address,rt); // PC into link register #ifdef IMM_PREFETCH emit_prefetch(hash_table[((return_address>>16)^return_address)&0xFFFF]); #endif } cc=get_reg(branch_regs[i].regmap,CCREG); assert(cc==HOST_CCREG); #ifdef USE_MINI_HT int rh=get_reg(branch_regs[i].regmap,RHASH); int ht=get_reg(branch_regs[i].regmap,RHTBL); if(rs1[i]==31) { if(regs[i].regmap[rh]!=RHASH) do_preload_rhash(rh); do_preload_rhtbl(ht); do_rhash(rs,rh); } #endif store_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,-1); #ifdef DESTRUCTIVE_WRITEBACK if((branch_regs[i].dirty>>rs)&(branch_regs[i].is32>>rs1[i])&1) { if(rs1[i]!=rt1[i+1]&&rs1[i]!=rt2[i+1]) { emit_loadreg(rs1[i],rs); } } #endif #ifdef REG_PREFETCH if(rt1[i]==31&&temp>=0) emit_prefetchreg(temp); #endif #ifdef USE_MINI_HT if(rs1[i]==31) { do_miniht_load(ht,rh); } #endif //do_cc(i,branch_regs[i].regmap,&adj,-1,TAKEN); //if(adj) emit_addimm(cc,2*(ccadj[i]+2-adj),cc); // ??? - Shouldn't happen //assert(adj==0); emit_addimm_and_set_flags(CLOCK_DIVIDER*(ccadj[i]+2),HOST_CCREG); add_stub(CC_STUB,(int)out,jump_vaddr_reg[rs],0,i,-1,TAKEN,0); emit_jns(0); //load_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,-1); #ifdef USE_MINI_HT if(rs1[i]==31) { do_miniht_jump(rs,rh,ht); } else #endif { //if(rs!=EAX) emit_mov(rs,EAX); //emit_jmp((int)jump_vaddr_eax); emit_jmp(jump_vaddr_reg[rs]); } /* Check hash table temp=!rs; emit_mov(rs,temp); emit_shrimm(rs,16,rs); emit_xor(temp,rs,rs); emit_movzwl_reg(rs,rs); emit_shlimm(rs,4,rs); emit_cmpmem_indexed((int)hash_table,rs,temp); emit_jne((int)out+14); emit_readword_indexed((int)hash_table+4,rs,rs); emit_jmpreg(rs); emit_cmpmem_indexed((int)hash_table+8,rs,temp); emit_addimm_no_flags(8,rs); emit_jeq((int)out-17); // No hit on hash table, call compiler emit_pushreg(temp); //DEBUG > #ifdef DEBUG_CYCLE_COUNT emit_readword((int)&last_count,ECX); emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_readword((int)&next_interupt,ECX); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); emit_sub(HOST_CCREG,ECX,HOST_CCREG); emit_writeword(ECX,(int)&last_count); #endif //DEBUG < emit_storereg(CCREG,HOST_CCREG); emit_call((int)get_addr); emit_loadreg(CCREG,HOST_CCREG); emit_addimm(ESP,4,ESP); emit_jmpreg(EAX);*/ #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK if(rt1[i]!=31&&iregmap; int cc; int match; match=match_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); assem_debug("match=%d",match); int s1h,s1l,s2h,s2l; int prev_cop1_usable=cop1_usable; int unconditional=0,nop=0; int only32=0; int invert=0; int branch_internal=internal_branch(branch_regs[i].is32,ba[i]); if(i==(ba[i]-start)>>2) assem_debug("idle loop"); if(!match) invert=1; #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK if(i>(ba[i]-start)>>2) invert=1; #endif if(ooo[i]) { s1l=get_reg(branch_regs[i].regmap,rs1[i]); s1h=get_reg(branch_regs[i].regmap,rs1[i]|64); s2l=get_reg(branch_regs[i].regmap,rs2[i]); s2h=get_reg(branch_regs[i].regmap,rs2[i]|64); } else { s1l=get_reg(i_regmap,rs1[i]); s1h=get_reg(i_regmap,rs1[i]|64); s2l=get_reg(i_regmap,rs2[i]); s2h=get_reg(i_regmap,rs2[i]|64); } if(rs1[i]==0&&rs2[i]==0) { if(opcode[i]&1) nop=1; else unconditional=1; //assert(opcode[i]!=5); //assert(opcode[i]!=7); //assert(opcode[i]!=0x15); //assert(opcode[i]!=0x17); } else if(rs1[i]==0) { s1l=s2l;s1h=s2h; s2l=s2h=-1; only32=(regs[i].was32>>rs2[i])&1; } else if(rs2[i]==0) { s2l=s2h=-1; only32=(regs[i].was32>>rs1[i])&1; } else { only32=(regs[i].was32>>rs1[i])&(regs[i].was32>>rs2[i])&1; } if(ooo[i]) { // Out of order execution (delay slot first) //DebugMessage(M64MSG_VERBOSE, "OOOE"); address_generation(i+1,i_regs,regs[i].regmap_entry); ds_assemble(i+1,i_regs); int adj; uint64_t bc_unneeded=branch_regs[i].u; uint64_t bc_unneeded_upper=branch_regs[i].uu; bc_unneeded&=~((1LL<>2 || source[i+1]!=0) { if(adj) emit_addimm(cc,CLOCK_DIVIDER*(ccadj[i]+2-adj),cc); load_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); if(branch_internal) assem_debug("branch: internal"); else assem_debug("branch: external"); if(branch_internal&&is_ds[(ba[i]-start)>>2]) { ds_assemble_entry(i); } else { add_to_linker((int)out,ba[i],branch_internal); emit_jmp(0); } #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK if(((u_int)out)&7) emit_addnop(0); #endif } } else if(nop) { emit_addimm_and_set_flags(CLOCK_DIVIDER*(ccadj[i]+2),cc); int jaddr=(int)out; emit_jns(0); add_stub(CC_STUB,jaddr,(int)out,0,i,start+i*4+8,NOTTAKEN,0); } else { int taken=0,nottaken=0,nottaken1=0; do_cc(i,branch_regs[i].regmap,&adj,-1,0,invert); if(adj&&!invert) emit_addimm(cc,CLOCK_DIVIDER*(ccadj[i]+2-adj),cc); if(!only32) { assert(s1h>=0); if(opcode[i]==4) // BEQ { if(s2h>=0) emit_cmp(s1h,s2h); else emit_test(s1h,s1h); nottaken1=(int)out; emit_jne(1); } if(opcode[i]==5) // BNE { if(s2h>=0) emit_cmp(s1h,s2h); else emit_test(s1h,s1h); if(invert) taken=(int)out; else add_to_linker((int)out,ba[i],branch_internal); emit_jne(0); } if(opcode[i]==6) // BLEZ { emit_test(s1h,s1h); if(invert) taken=(int)out; else add_to_linker((int)out,ba[i],branch_internal); emit_js(0); nottaken1=(int)out; emit_jne(1); } if(opcode[i]==7) // BGTZ { emit_test(s1h,s1h); nottaken1=(int)out; emit_js(1); if(invert) taken=(int)out; else add_to_linker((int)out,ba[i],branch_internal); emit_jne(0); } } // if(!only32) //DebugMessage(M64MSG_VERBOSE, "branch(%d): eax=%d ecx=%d edx=%d ebx=%d ebp=%d esi=%d edi=%d",i,branch_regs[i].regmap[0],branch_regs[i].regmap[1],branch_regs[i].regmap[2],branch_regs[i].regmap[3],branch_regs[i].regmap[5],branch_regs[i].regmap[6],branch_regs[i].regmap[7]); assert(s1l>=0); if(opcode[i]==4) // BEQ { if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); if(invert){ nottaken=(int)out; emit_jne(1); }else{ add_to_linker((int)out,ba[i],branch_internal); emit_jeq(0); } } if(opcode[i]==5) // BNE { if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); if(invert){ nottaken=(int)out; emit_jeq(1); }else{ add_to_linker((int)out,ba[i],branch_internal); emit_jne(0); } } if(opcode[i]==6) // BLEZ { emit_cmpimm(s1l,1); if(invert){ nottaken=(int)out; if(only32) emit_jge(1); else emit_jae(1); }else{ add_to_linker((int)out,ba[i],branch_internal); if(only32) emit_jl(0); else emit_jb(0); } } if(opcode[i]==7) // BGTZ { emit_cmpimm(s1l,1); if(invert){ nottaken=(int)out; if(only32) emit_jl(1); else emit_jb(1); }else{ add_to_linker((int)out,ba[i],branch_internal); if(only32) emit_jge(0); else emit_jae(0); } } if(invert) { if(taken) set_jump_target(taken,(int)out); #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK if(match&&(!branch_internal||!is_ds[(ba[i]-start)>>2])) { if(adj) { emit_addimm(cc,-CLOCK_DIVIDER*adj,cc); add_to_linker((int)out,ba[i],branch_internal); }else{ emit_addnop(13); add_to_linker((int)out,ba[i],branch_internal*2); } emit_jmp(0); }else #endif { if(adj) emit_addimm(cc,-(int)CLOCK_DIVIDER*adj,cc); store_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); load_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); if(branch_internal) assem_debug("branch: internal"); else assem_debug("branch: external"); if(branch_internal&&is_ds[(ba[i]-start)>>2]) { ds_assemble_entry(i); } else { add_to_linker((int)out,ba[i],branch_internal); emit_jmp(0); } } set_jump_target(nottaken,(int)out); } if(nottaken1) set_jump_target(nottaken1,(int)out); if(adj) { if(!invert) emit_addimm(cc,CLOCK_DIVIDER*adj,cc); } } // (!unconditional) } // if(ooo) else { // In-order execution (branch first) //if(likely[i]) DebugMessage(M64MSG_VERBOSE, "IOL"); //else //DebugMessage(M64MSG_VERBOSE, "IOE"); int taken=0,nottaken=0,nottaken1=0; if(!unconditional&&!nop) { if(!only32) { assert(s1h>=0); if((opcode[i]&0x2f)==4) // BEQ { if(s2h>=0) emit_cmp(s1h,s2h); else emit_test(s1h,s1h); nottaken1=(int)out; emit_jne(2); } if((opcode[i]&0x2f)==5) // BNE { if(s2h>=0) emit_cmp(s1h,s2h); else emit_test(s1h,s1h); taken=(int)out; emit_jne(1); } if((opcode[i]&0x2f)==6) // BLEZ { emit_test(s1h,s1h); taken=(int)out; emit_js(1); nottaken1=(int)out; emit_jne(2); } if((opcode[i]&0x2f)==7) // BGTZ { emit_test(s1h,s1h); nottaken1=(int)out; emit_js(2); taken=(int)out; emit_jne(1); } } // if(!only32) //DebugMessage(M64MSG_VERBOSE, "branch(%d): eax=%d ecx=%d edx=%d ebx=%d ebp=%d esi=%d edi=%d",i,branch_regs[i].regmap[0],branch_regs[i].regmap[1],branch_regs[i].regmap[2],branch_regs[i].regmap[3],branch_regs[i].regmap[5],branch_regs[i].regmap[6],branch_regs[i].regmap[7]); assert(s1l>=0); if((opcode[i]&0x2f)==4) // BEQ { if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); nottaken=(int)out; emit_jne(2); } if((opcode[i]&0x2f)==5) // BNE { if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); nottaken=(int)out; emit_jeq(2); } if((opcode[i]&0x2f)==6) // BLEZ { emit_cmpimm(s1l,1); nottaken=(int)out; if(only32) emit_jge(2); else emit_jae(2); } if((opcode[i]&0x2f)==7) // BGTZ { emit_cmpimm(s1l,1); nottaken=(int)out; if(only32) emit_jl(2); else emit_jb(2); } } // if(!unconditional) int adj; uint64_t ds_unneeded=branch_regs[i].u; uint64_t ds_unneeded_upper=branch_regs[i].uu; ds_unneeded&=~((1LL<>rt1[i+1])&1) ds_unneeded_upper&=~((1LL<>2]) { ds_assemble_entry(i); } else { add_to_linker((int)out,ba[i],branch_internal); emit_jmp(0); } } // branch not taken cop1_usable=prev_cop1_usable; if(!unconditional) { if(nottaken1) set_jump_target(nottaken1,(int)out); set_jump_target(nottaken,(int)out); assem_debug("2:"); if(!likely[i]) { wb_invalidate(regs[i].regmap,branch_regs[i].regmap,regs[i].dirty,regs[i].is32, ds_unneeded,ds_unneeded_upper); load_regs(regs[i].regmap,branch_regs[i].regmap,regs[i].was32,rs1[i+1],rs2[i+1]); address_generation(i+1,&branch_regs[i],0); load_regs(regs[i].regmap,branch_regs[i].regmap,regs[i].was32,CCREG,CCREG); ds_assemble(i+1,&branch_regs[i]); } cc=get_reg(branch_regs[i].regmap,CCREG); if(cc==-1&&!likely[i]) { // Cycle count isn't in a register, temporarily load it then write it out emit_loadreg(CCREG,HOST_CCREG); emit_addimm_and_set_flags(CLOCK_DIVIDER*(ccadj[i]+2),HOST_CCREG); int jaddr=(int)out; emit_jns(0); add_stub(CC_STUB,jaddr,(int)out,0,i,start+i*4+8,NOTTAKEN,0); emit_storereg(CCREG,HOST_CCREG); } else{ cc=get_reg(i_regmap,CCREG); assert(cc==HOST_CCREG); emit_addimm_and_set_flags(CLOCK_DIVIDER*(ccadj[i]+2),cc); int jaddr=(int)out; emit_jns(0); add_stub(CC_STUB,jaddr,(int)out,0,i,start+i*4+8,likely[i]?NULLDS:NOTTAKEN,0); } } } } static void sjump_assemble(int i,struct regstat *i_regs) { signed char *i_regmap=i_regs->regmap; int cc; int match; match=match_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); assem_debug("smatch=%d",match); int s1h,s1l; int prev_cop1_usable=cop1_usable; int unconditional=0,nevertaken=0; int only32=0; int invert=0; int branch_internal=internal_branch(branch_regs[i].is32,ba[i]); if(i==(ba[i]-start)>>2) assem_debug("idle loop"); if(!match) invert=1; #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK if(i>(ba[i]-start)>>2) invert=1; #endif //if(opcode2[i]>=0x10) return; // FIXME (BxxZAL) assert(opcode2[i]<0x10||rs1[i]==0); // FIXME (BxxZAL) if(ooo[i]) { s1l=get_reg(branch_regs[i].regmap,rs1[i]); s1h=get_reg(branch_regs[i].regmap,rs1[i]|64); } else { s1l=get_reg(i_regmap,rs1[i]); s1h=get_reg(i_regmap,rs1[i]|64); } if(rs1[i]==0) { if(opcode2[i]&1) unconditional=1; else nevertaken=1; // These are never taken (r0 is never less than zero) //assert(opcode2[i]!=0); //assert(opcode2[i]!=2); //assert(opcode2[i]!=0x10); //assert(opcode2[i]!=0x12); } else { only32=(regs[i].was32>>rs1[i])&1; } if(ooo[i]) { // Out of order execution (delay slot first) //DebugMessage(M64MSG_VERBOSE, "OOOE"); address_generation(i+1,i_regs,regs[i].regmap_entry); ds_assemble(i+1,i_regs); int adj; uint64_t bc_unneeded=branch_regs[i].u; uint64_t bc_unneeded_upper=branch_regs[i].uu; bc_unneeded&=~((1LL<=0) { // Save the PC even if the branch is not taken return_address=start+i*4+8; emit_movimm(return_address,rt); // PC into link register #ifdef IMM_PREFETCH if(!nevertaken) emit_prefetch(hash_table[((return_address>>16)^return_address)&0xFFFF]); #endif } } cc=get_reg(branch_regs[i].regmap,CCREG); assert(cc==HOST_CCREG); if(unconditional) store_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); //do_cc(i,branch_regs[i].regmap,&adj,unconditional?ba[i]:-1,unconditional); assem_debug("cycle count (adj)"); if(unconditional) { do_cc(i,branch_regs[i].regmap,&adj,ba[i],TAKEN,0); if(i!=(ba[i]-start)>>2 || source[i+1]!=0) { if(adj) emit_addimm(cc,CLOCK_DIVIDER*(ccadj[i]+2-adj),cc); load_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); if(branch_internal) assem_debug("branch: internal"); else assem_debug("branch: external"); if(branch_internal&&is_ds[(ba[i]-start)>>2]) { ds_assemble_entry(i); } else { add_to_linker((int)out,ba[i],branch_internal); emit_jmp(0); } #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK if(((u_int)out)&7) emit_addnop(0); #endif } } else if(nevertaken) { emit_addimm_and_set_flags(CLOCK_DIVIDER*(ccadj[i]+2),cc); int jaddr=(int)out; emit_jns(0); add_stub(CC_STUB,jaddr,(int)out,0,i,start+i*4+8,NOTTAKEN,0); } else { int nottaken=0; do_cc(i,branch_regs[i].regmap,&adj,-1,0,invert); if(adj&&!invert) emit_addimm(cc,CLOCK_DIVIDER*(ccadj[i]+2-adj),cc); if(!only32) { assert(s1h>=0); if(opcode2[i]==0) // BLTZ { emit_test(s1h,s1h); if(invert){ nottaken=(int)out; emit_jns(1); }else{ add_to_linker((int)out,ba[i],branch_internal); emit_js(0); } } if(opcode2[i]==1) // BGEZ { emit_test(s1h,s1h); if(invert){ nottaken=(int)out; emit_js(1); }else{ add_to_linker((int)out,ba[i],branch_internal); emit_jns(0); } } } // if(!only32) else { assert(s1l>=0); if(opcode2[i]==0) // BLTZ { emit_test(s1l,s1l); if(invert){ nottaken=(int)out; emit_jns(1); }else{ add_to_linker((int)out,ba[i],branch_internal); emit_js(0); } } if(opcode2[i]==1) // BGEZ { emit_test(s1l,s1l); if(invert){ nottaken=(int)out; emit_js(1); }else{ add_to_linker((int)out,ba[i],branch_internal); emit_jns(0); } } } // if(!only32) if(invert) { #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK if(match&&(!branch_internal||!is_ds[(ba[i]-start)>>2])) { if(adj) { emit_addimm(cc,-CLOCK_DIVIDER*adj,cc); add_to_linker((int)out,ba[i],branch_internal); }else{ emit_addnop(13); add_to_linker((int)out,ba[i],branch_internal*2); } emit_jmp(0); }else #endif { if(adj) emit_addimm(cc,-(int)CLOCK_DIVIDER*adj,cc); store_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); load_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); if(branch_internal) assem_debug("branch: internal"); else assem_debug("branch: external"); if(branch_internal&&is_ds[(ba[i]-start)>>2]) { ds_assemble_entry(i); } else { add_to_linker((int)out,ba[i],branch_internal); emit_jmp(0); } } set_jump_target(nottaken,(int)out); } if(adj) { if(!invert) emit_addimm(cc,CLOCK_DIVIDER*adj,cc); } } // (!unconditional) } // if(ooo) else { // In-order execution (branch first) //DebugMessage(M64MSG_VERBOSE, "IOE"); int nottaken=0; if(!unconditional) { //DebugMessage(M64MSG_VERBOSE, "branch(%d): eax=%d ecx=%d edx=%d ebx=%d ebp=%d esi=%d edi=%d",i,branch_regs[i].regmap[0],branch_regs[i].regmap[1],branch_regs[i].regmap[2],branch_regs[i].regmap[3],branch_regs[i].regmap[5],branch_regs[i].regmap[6],branch_regs[i].regmap[7]); if(!only32) { assert(s1h>=0); if((opcode2[i]&0x1d)==0) // BLTZ/BLTZL { emit_test(s1h,s1h); nottaken=(int)out; emit_jns(1); } if((opcode2[i]&0x1d)==1) // BGEZ/BGEZL { emit_test(s1h,s1h); nottaken=(int)out; emit_js(1); } } // if(!only32) else { assert(s1l>=0); if((opcode2[i]&0x1d)==0) // BLTZ/BLTZL { emit_test(s1l,s1l); nottaken=(int)out; emit_jns(1); } if((opcode2[i]&0x1d)==1) // BGEZ/BGEZL { emit_test(s1l,s1l); nottaken=(int)out; emit_js(1); } } } // if(!unconditional) int adj; uint64_t ds_unneeded=branch_regs[i].u; uint64_t ds_unneeded_upper=branch_regs[i].uu; ds_unneeded&=~((1LL<>rt1[i+1])&1) ds_unneeded_upper&=~((1LL<>2]) { ds_assemble_entry(i); } else { add_to_linker((int)out,ba[i],branch_internal); emit_jmp(0); } } // branch not taken cop1_usable=prev_cop1_usable; if(!unconditional) { set_jump_target(nottaken,(int)out); assem_debug("1:"); if(!likely[i]) { wb_invalidate(regs[i].regmap,branch_regs[i].regmap,regs[i].dirty,regs[i].is32, ds_unneeded,ds_unneeded_upper); load_regs(regs[i].regmap,branch_regs[i].regmap,regs[i].was32,rs1[i+1],rs2[i+1]); address_generation(i+1,&branch_regs[i],0); load_regs(regs[i].regmap,branch_regs[i].regmap,regs[i].was32,CCREG,CCREG); ds_assemble(i+1,&branch_regs[i]); } cc=get_reg(branch_regs[i].regmap,CCREG); if(cc==-1&&!likely[i]) { // Cycle count isn't in a register, temporarily load it then write it out emit_loadreg(CCREG,HOST_CCREG); emit_addimm_and_set_flags(CLOCK_DIVIDER*(ccadj[i]+2),HOST_CCREG); int jaddr=(int)out; emit_jns(0); add_stub(CC_STUB,jaddr,(int)out,0,i,start+i*4+8,NOTTAKEN,0); emit_storereg(CCREG,HOST_CCREG); } else{ cc=get_reg(i_regmap,CCREG); assert(cc==HOST_CCREG); emit_addimm_and_set_flags(CLOCK_DIVIDER*(ccadj[i]+2),cc); int jaddr=(int)out; emit_jns(0); add_stub(CC_STUB,jaddr,(int)out,0,i,start+i*4+8,likely[i]?NULLDS:NOTTAKEN,0); } } } } static void fjump_assemble(int i,struct regstat *i_regs) { signed char *i_regmap=i_regs->regmap; int cc; int match; match=match_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); assem_debug("fmatch=%d",match); int fs,cs; int eaddr; int invert=0; int branch_internal=internal_branch(branch_regs[i].is32,ba[i]); if(i==(ba[i]-start)>>2) assem_debug("idle loop"); if(!match) invert=1; #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK if(i>(ba[i]-start)>>2) invert=1; #endif if(ooo[i]) { fs=get_reg(branch_regs[i].regmap,FSREG); address_generation(i+1,i_regs,regs[i].regmap_entry); // Is this okay? } else { fs=get_reg(i_regmap,FSREG); } // Check cop1 unusable if(!cop1_usable) { cs=get_reg(i_regmap,CSREG); assert(cs>=0); emit_testimm(cs,0x20000000); eaddr=(int)out; emit_jeq(0); add_stub(FP_STUB,eaddr,(int)out,i,cs,(int)i_regs,0,0); cop1_usable=1; } if(ooo[i]) { // Out of order execution (delay slot first) //DebugMessage(M64MSG_VERBOSE, "OOOE"); ds_assemble(i+1,i_regs); int adj; uint64_t bc_unneeded=branch_regs[i].u; uint64_t bc_unneeded_upper=branch_regs[i].uu; bc_unneeded&=~((1LL<=0); emit_testimm(fs,0x800000); if(source[i]&0x10000) // BC1T { if(invert){ nottaken=(int)out; emit_jeq(1); }else{ add_to_linker((int)out,ba[i],branch_internal); emit_jne(0); } } else // BC1F if(invert){ nottaken=(int)out; emit_jne(1); }else{ add_to_linker((int)out,ba[i],branch_internal); emit_jeq(0); } { } } // if(!only32) if(invert) { if(adj) emit_addimm(cc,-(int)CLOCK_DIVIDER*adj,cc); #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK else if(match) emit_addnop(13); #endif store_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); load_regs_bt(branch_regs[i].regmap,branch_regs[i].is32,branch_regs[i].dirty,ba[i]); if(branch_internal) assem_debug("branch: internal"); else assem_debug("branch: external"); if(branch_internal&&is_ds[(ba[i]-start)>>2]) { ds_assemble_entry(i); } else { add_to_linker((int)out,ba[i],branch_internal); emit_jmp(0); } set_jump_target(nottaken,(int)out); } if(adj) { if(!invert) emit_addimm(cc,CLOCK_DIVIDER*adj,cc); } } // (!unconditional) } // if(ooo) else { // In-order execution (branch first) //DebugMessage(M64MSG_VERBOSE, "IOE"); int nottaken=0; if(1) { //DebugMessage(M64MSG_VERBOSE, "branch(%d): eax=%d ecx=%d edx=%d ebx=%d ebp=%d esi=%d edi=%d",i,branch_regs[i].regmap[0],branch_regs[i].regmap[1],branch_regs[i].regmap[2],branch_regs[i].regmap[3],branch_regs[i].regmap[5],branch_regs[i].regmap[6],branch_regs[i].regmap[7]); if(1) { assert(fs>=0); emit_testimm(fs,0x800000); if(source[i]&0x10000) // BC1T { nottaken=(int)out; emit_jeq(1); } else // BC1F { nottaken=(int)out; emit_jne(1); } } } // if(!unconditional) int adj; uint64_t ds_unneeded=branch_regs[i].u; uint64_t ds_unneeded_upper=branch_regs[i].uu; ds_unneeded&=~((1LL<>rt1[i+1])&1) ds_unneeded_upper&=~((1LL<>2]) { ds_assemble_entry(i); } else { add_to_linker((int)out,ba[i],branch_internal); emit_jmp(0); } // branch not taken if(1) { // <- FIXME (don't need this) set_jump_target(nottaken,(int)out); assem_debug("1:"); if(!likely[i]) { wb_invalidate(regs[i].regmap,branch_regs[i].regmap,regs[i].dirty,regs[i].is32, ds_unneeded,ds_unneeded_upper); load_regs(regs[i].regmap,branch_regs[i].regmap,regs[i].was32,rs1[i+1],rs2[i+1]); address_generation(i+1,&branch_regs[i],0); load_regs(regs[i].regmap,branch_regs[i].regmap,regs[i].was32,CCREG,CCREG); ds_assemble(i+1,&branch_regs[i]); } cc=get_reg(branch_regs[i].regmap,CCREG); if(cc==-1&&!likely[i]) { // Cycle count isn't in a register, temporarily load it then write it out emit_loadreg(CCREG,HOST_CCREG); emit_addimm_and_set_flags(CLOCK_DIVIDER*(ccadj[i]+2),HOST_CCREG); int jaddr=(int)out; emit_jns(0); add_stub(CC_STUB,jaddr,(int)out,0,i,start+i*4+8,NOTTAKEN,0); emit_storereg(CCREG,HOST_CCREG); } else{ cc=get_reg(i_regmap,CCREG); assert(cc==HOST_CCREG); emit_addimm_and_set_flags(CLOCK_DIVIDER*(ccadj[i]+2),cc); int jaddr=(int)out; emit_jns(0); add_stub(CC_STUB,jaddr,(int)out,0,i,start+i*4+8,likely[i]?NULLDS:NOTTAKEN,0); } } } } static void pagespan_assemble(int i,struct regstat *i_regs) { int s1l=get_reg(i_regs->regmap,rs1[i]); int s1h=get_reg(i_regs->regmap,rs1[i]|64); int s2l=get_reg(i_regs->regmap,rs2[i]); int s2h=get_reg(i_regs->regmap,rs2[i]|64); int taken=0; int nottaken=0; int unconditional=0; if(rs1[i]==0) { s1l=s2l;s1h=s2h; s2l=s2h=-1; } else if(rs2[i]==0) { s2l=s2h=-1; } if((i_regs->is32>>rs1[i])&(i_regs->is32>>rs2[i])&1) { s1h=s2h=-1; } int hr=0; int addr,alt,ntaddr; if(i_regs->regmap[HOST_BTREG]<0) {addr=HOST_BTREG;} else { while(hrregmap[hr]&63)!=rs1[i] && (i_regs->regmap[hr]&63)!=rs2[i] ) { addr=hr++;break; } hr++; } } while(hrregmap[hr]&63)!=rs1[i] && (i_regs->regmap[hr]&63)!=rs2[i] ) { alt=hr++;break; } hr++; } if((opcode[i]&0x2E)==6) // BLEZ/BGTZ needs another register { while(hrregmap[hr]&63)!=rs1[i] && (i_regs->regmap[hr]&63)!=rs2[i] ) { ntaddr=hr;break; } hr++; } } assert(hrregmap,31); emit_movimm(start+i*4+8,rt); unconditional=1; } if(opcode[i]==0&&(opcode2[i]&0x3E)==8) // JR/JALR { emit_mov(s1l,addr); if(opcode2[i]==9) // JALR { int rt=get_reg(i_regs->regmap,rt1[i]); emit_movimm(start+i*4+8,rt); } } if((opcode[i]&0x3f)==4) // BEQ { if(rs1[i]==rs2[i]) { unconditional=1; } else #ifdef HAVE_CMOV_IMM if(s1h<0) { if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); emit_cmov2imm_e_ne_compact(ba[i],start+i*4+8,addr); } else #endif { assert(s1l>=0); emit_mov2imm_compact(ba[i],addr,start+i*4+8,alt); if(s1h>=0) { if(s2h>=0) emit_cmp(s1h,s2h); else emit_test(s1h,s1h); emit_cmovne_reg(alt,addr); } if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); emit_cmovne_reg(alt,addr); } } if((opcode[i]&0x3f)==5) // BNE { #ifdef HAVE_CMOV_IMM if(s1h<0) { if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); emit_cmov2imm_e_ne_compact(start+i*4+8,ba[i],addr); } else #endif { assert(s1l>=0); emit_mov2imm_compact(start+i*4+8,addr,ba[i],alt); if(s1h>=0) { if(s2h>=0) emit_cmp(s1h,s2h); else emit_test(s1h,s1h); emit_cmovne_reg(alt,addr); } if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); emit_cmovne_reg(alt,addr); } } if((opcode[i]&0x3f)==0x14) // BEQL { if(s1h>=0) { if(s2h>=0) emit_cmp(s1h,s2h); else emit_test(s1h,s1h); nottaken=(int)out; emit_jne(0); } if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); if(nottaken) set_jump_target(nottaken,(int)out); nottaken=(int)out; emit_jne(0); } if((opcode[i]&0x3f)==0x15) // BNEL { if(s1h>=0) { if(s2h>=0) emit_cmp(s1h,s2h); else emit_test(s1h,s1h); taken=(int)out; emit_jne(0); } if(s2l>=0) emit_cmp(s1l,s2l); else emit_test(s1l,s1l); nottaken=(int)out; emit_jeq(0); if(taken) set_jump_target(taken,(int)out); } if((opcode[i]&0x3f)==6) // BLEZ { emit_mov2imm_compact(ba[i],alt,start+i*4+8,addr); emit_cmpimm(s1l,1); if(s1h>=0) emit_mov(addr,ntaddr); emit_cmovl_reg(alt,addr); if(s1h>=0) { emit_test(s1h,s1h); emit_cmovne_reg(ntaddr,addr); emit_cmovs_reg(alt,addr); } } if((opcode[i]&0x3f)==7) // BGTZ { emit_mov2imm_compact(ba[i],addr,start+i*4+8,ntaddr); emit_cmpimm(s1l,1); if(s1h>=0) emit_mov(addr,alt); emit_cmovl_reg(ntaddr,addr); if(s1h>=0) { emit_test(s1h,s1h); emit_cmovne_reg(alt,addr); emit_cmovs_reg(ntaddr,addr); } } if((opcode[i]&0x3f)==0x16) // BLEZL { assert((opcode[i]&0x3f)!=0x16); } if((opcode[i]&0x3f)==0x17) // BGTZL { assert((opcode[i]&0x3f)!=0x17); } assert(opcode[i]!=1); // BLTZ/BGEZ //FIXME: Check CSREG if(opcode[i]==0x11 && opcode2[i]==0x08 ) { if((source[i]&0x30000)==0) // BC1F { emit_mov2imm_compact(ba[i],addr,start+i*4+8,alt); emit_testimm(s1l,0x800000); emit_cmovne_reg(alt,addr); } if((source[i]&0x30000)==0x10000) // BC1T { emit_mov2imm_compact(ba[i],alt,start+i*4+8,addr); emit_testimm(s1l,0x800000); emit_cmovne_reg(alt,addr); } if((source[i]&0x30000)==0x20000) // BC1FL { emit_testimm(s1l,0x800000); nottaken=(int)out; emit_jne(0); } if((source[i]&0x30000)==0x30000) // BC1TL { emit_testimm(s1l,0x800000); nottaken=(int)out; emit_jeq(0); } } assert(i_regs->regmap[HOST_CCREG]==CCREG); wb_dirtys(regs[i].regmap,regs[i].is32,regs[i].dirty); if(likely[i]||unconditional) { emit_movimm(ba[i],HOST_BTREG); } else if(addr!=HOST_BTREG) { emit_mov(addr,HOST_BTREG); } void *branch_addr=out; emit_jmp(0); int target_addr=start+i*4+5; void *stub=out; void *compiled_target_addr=check_addr(target_addr); emit_extjump_ds((int)branch_addr,target_addr); if(compiled_target_addr) { set_jump_target((int)branch_addr,(int)compiled_target_addr); add_link(target_addr,stub); } else set_jump_target((int)branch_addr,(int)stub); if(likely[i]) { // Not-taken path set_jump_target((int)nottaken,(int)out); wb_dirtys(regs[i].regmap,regs[i].is32,regs[i].dirty); void *branch_addr=out; emit_jmp(0); int target_addr=start+i*4+8; void *stub=out; void *compiled_target_addr=check_addr(target_addr); emit_extjump_ds((int)branch_addr,target_addr); if(compiled_target_addr) { set_jump_target((int)branch_addr,(int)compiled_target_addr); add_link(target_addr,stub); } else set_jump_target((int)branch_addr,(int)stub); } } // Assemble the delay slot for the above static void pagespan_ds() { assem_debug("initial delay slot:"); u_int vaddr=start+1; u_int page=(0x80000000^vaddr)>>12; u_int vpage=page; if(page>262143&&tlb_LUT_r[vaddr>>12]) page=(tlb_LUT_r[page^0x80000]^0x80000000)>>12; if(page>2048) page=2048+(page&2047); if(vpage>262143&&tlb_LUT_r[vaddr>>12]) vpage&=2047; // jump_dirty uses a hash of the virtual address instead if(vpage>2048) vpage=2048+(vpage&2047); ll_add(jump_dirty+vpage,vaddr,(void *)out); do_dirty_stub_ds(); ll_add(jump_in+page,vaddr,(void *)out); assert(regs[0].regmap_entry[HOST_CCREG]==CCREG); if(regs[0].regmap[HOST_CCREG]!=CCREG) wb_register(CCREG,regs[0].regmap_entry,regs[0].wasdirty,regs[0].was32); if(regs[0].regmap[HOST_BTREG]!=BTREG) emit_writeword(HOST_BTREG,(int)&branch_target); load_regs(regs[0].regmap_entry,regs[0].regmap,regs[0].was32,rs1[0],rs2[0]); address_generation(0,®s[0],regs[0].regmap_entry); if(itype[0]==LOAD||itype[0]==LOADLR||itype[0]==STORE||itype[0]==STORELR||itype[0]==C1LS) load_regs(regs[0].regmap_entry,regs[0].regmap,regs[0].was32,MMREG,ROREG); if(itype[0]==STORE||itype[0]==STORELR||(opcode[0]&0x3b)==0x39) load_regs(regs[0].regmap_entry,regs[0].regmap,regs[0].was32,INVCP,INVCP); cop1_usable=0; is_delayslot=0; switch(itype[0]) { case ALU: alu_assemble(0,®s[0]);break; case IMM16: imm16_assemble(0,®s[0]);break; case SHIFT: shift_assemble(0,®s[0]);break; case SHIFTIMM: shiftimm_assemble(0,®s[0]);break; case LOAD: load_assemble(0,®s[0]);break; case LOADLR: loadlr_assemble(0,®s[0]);break; case STORE: store_assemble(0,®s[0]);break; case STORELR: storelr_assemble(0,®s[0]);break; case COP0: cop0_assemble(0,®s[0]);break; case COP1: cop1_assemble(0,®s[0]);break; case C1LS: c1ls_assemble(0,®s[0]);break; case FCONV: fconv_assemble(0,®s[0]);break; case FLOAT: float_assemble(0,®s[0]);break; case FCOMP: fcomp_assemble(0,®s[0]);break; case MULTDIV: multdiv_assemble(0,®s[0]);break; case MOV: mov_assemble(0,®s[0]);break; case SYSCALL: case SPAN: case UJUMP: case RJUMP: case CJUMP: case SJUMP: case FJUMP: DebugMessage(M64MSG_VERBOSE, "Jump in the delay slot. This is probably a bug."); } int btaddr=get_reg(regs[0].regmap,BTREG); if(btaddr<0) { btaddr=get_reg(regs[0].regmap,-1); emit_readword((int)&branch_target,btaddr); } assert(btaddr!=HOST_CCREG); if(regs[0].regmap[HOST_CCREG]!=CCREG) emit_loadreg(CCREG,HOST_CCREG); #ifdef HOST_IMM8 emit_movimm(start+4,HOST_TEMPREG); emit_cmp(btaddr,HOST_TEMPREG); #else emit_cmpimm(btaddr,start+4); #endif int branch=(int)out; emit_jeq(0); store_regs_bt(regs[0].regmap,regs[0].is32,regs[0].dirty,-1); emit_jmp(jump_vaddr_reg[btaddr]); set_jump_target(branch,(int)out); store_regs_bt(regs[0].regmap,regs[0].is32,regs[0].dirty,start+4); load_regs_bt(regs[0].regmap,regs[0].is32,regs[0].dirty,start+4); } // Basic liveness analysis for MIPS registers static void unneeded_registers(int istart,int iend,int r) { int i; uint64_t u,uu,b,bu; uint64_t temp_u,temp_uu; uint64_t tdep; if(iend==slen-1) { u=1;uu=1; }else{ u=unneeded_reg[iend+1]; uu=unneeded_reg_upper[iend+1]; u=1;uu=1; } for (i=iend;i>=istart;i--) { //DebugMessage(M64MSG_VERBOSE, "unneeded registers i=%d (%d,%d) r=%d",i,istart,iend,r); if(itype[i]==RJUMP||itype[i]==UJUMP||itype[i]==CJUMP||itype[i]==SJUMP||itype[i]==FJUMP) { // If subroutine call, flag return address as a possible branch target if(rt1[i]==31 && i=(start+slen*4)) { // Branch out of this block, flush all regs u=1; uu=1; /* Hexagon hack if(itype[i]==UJUMP&&rt1[i]==31) { uu=u=0x300C00F; // Discard at, v0-v1, t6-t9 } if(itype[i]==RJUMP&&rs1[i]==31) { uu=u=0x300C0F3; // Discard at, a0-a3, t6-t9 } if(start>0x80000400&&start<0x80800000) { if(itype[i]==UJUMP&&rt1[i]==31) { //uu=u=0x30300FF0FLL; // Discard at, v0-v1, t0-t9, lo, hi uu=u=0x300FF0F; // Discard at, v0-v1, t0-t9 } if(itype[i]==RJUMP&&rs1[i]==31) { //uu=u=0x30300FFF3LL; // Discard at, a0-a3, t0-t9, lo, hi uu=u=0x300FFF3; // Discard at, a0-a3, t0-t9 } }*/ branch_unneeded_reg[i]=u; branch_unneeded_reg_upper[i]=uu; // Merge in delay slot tdep=(~uu>>rt1[i+1])&1; u|=(1LL<>2]=1; if(ba[i]<=start+i*4) { // Backward branch if(itype[i]==RJUMP||itype[i]==UJUMP||(source[i]>>16)==0x1000) { // Unconditional branch temp_u=1;temp_uu=1; } else { // Conditional branch (not taken case) temp_u=unneeded_reg[i+2]; temp_uu=unneeded_reg_upper[i+2]; } // Merge in delay slot tdep=(~temp_uu>>rt1[i+1])&1; temp_u|=(1LL<>rt1[i])&1; temp_u|=(1LL<>2,i-1,r+1); }else{ unneeded_reg[(ba[i]-start)>>2]=1; unneeded_reg_upper[(ba[i]-start)>>2]=1; } } /*else*/ if(1) { if(itype[i]==RJUMP||itype[i]==UJUMP||(source[i]>>16)==0x1000) { // Unconditional branch u=unneeded_reg[(ba[i]-start)>>2]; uu=unneeded_reg_upper[(ba[i]-start)>>2]; branch_unneeded_reg[i]=u; branch_unneeded_reg_upper[i]=uu; //u=1; //uu=1; //branch_unneeded_reg[i]=u; //branch_unneeded_reg_upper[i]=uu; // Merge in delay slot tdep=(~uu>>rt1[i+1])&1; u|=(1LL<>2]; bu=unneeded_reg_upper[(ba[i]-start)>>2]; branch_unneeded_reg[i]=b; branch_unneeded_reg_upper[i]=bu; //b=1; //bu=1; //branch_unneeded_reg[i]=b; //branch_unneeded_reg_upper[i]=bu; // Branch delay slot tdep=(~uu>>rt1[i+1])&1; b|=(1LL<>rt1[i])&1; // Written registers are unneeded u|=1LL<>r)&1) { if(r==HIREG) DebugMessage(M64MSG_VERBOSE, " HI"); else if(r==LOREG) DebugMessage(M64MSG_VERBOSE, " LO"); else DebugMessage(M64MSG_VERBOSE, " r%d",r); } } DebugMessage(M64MSG_VERBOSE, " UU:"); for(r=1;r<=CCREG;r++) { if(((unneeded_reg_upper[i]&~unneeded_reg[i])>>r)&1) { if(r==HIREG) DebugMessage(M64MSG_VERBOSE, " HI"); else if(r==LOREG) DebugMessage(M64MSG_VERBOSE, " LO"); else DebugMessage(M64MSG_VERBOSE, " r%d",r); } }*/ } } // Identify registers which are likely to contain 32-bit values // This is used to predict whether any branches will jump to a // location with 64-bit values in registers. static void provisional_32bit() { int i,j; uint64_t is32=1; uint64_t lastbranch=1; for(i=0;i0) { if(itype[i-1]==CJUMP||itype[i-1]==SJUMP||itype[i-1]==FJUMP) { if(i>1) is32=lastbranch; else is32=1; } } if(i>1) { if(itype[i-2]==CJUMP||itype[i-2]==SJUMP||itype[i-2]==FJUMP) { if(likely[i-2]) { if(i>2) is32=lastbranch; else is32=1; } } if((opcode[i-2]&0x2f)==0x05) // BNE/BNEL { if(rs1[i-2]==0||rs2[i-2]==0) { if(rs1[i-2]) { is32|=1LL<=0;j--) { if(ba[j]==start+i*4) //temp_is32&=branch_regs[j].is32; temp_is32&=p32[j]; } for(j=i;j>s1)&1LL)<>s1)&1LL); is32&=~(1LL<=0x20&&op2<=0x23) { // ADD/ADDU/SUB/SUBU is32|=1LL<=0x24&&op2<=0x27) { // AND/OR/XOR/NOR uint64_t sr=((is32>>s1)&(is32>>s2)&1LL); is32&=~(1LL<=0x2c&&op2<=0x2d) { // DADD/DADDU if(s1==0&&s2==0) { is32|=1LL<>s1)&1LL); is32&=~(1LL<>s2)&1LL); is32&=~(1LL<=0x2e&&op2<=0x2f) { // DSUB/DSUBU if(s1==0&&s2==0) { is32|=1LL<>s1)&1LL); is32&=~(1LL<=0x1c&&op2<=0x1f) { // DMULT/DMULTU/DDIV/DDIVU is32&=~((1LL<>s1)&1LL); is32&=~(1LL<=0x14&&op2<=0x17) is32&=~(1LL<=0x38&&op2<0x3f) is32&=~(1LL<0) { if(itype[i-1]==UJUMP||itype[i-1]==RJUMP||(source[i-1]>>16)==0x1000) { if(rt1[i-1]==31) // JAL/JALR { // Subroutine call will return here, don't alloc any registers is32=1; } else if(i+1=0;i--) { int hr; if(itype[i]==RJUMP||itype[i]==UJUMP||itype[i]==CJUMP||itype[i]==SJUMP||itype[i]==FJUMP) { if(ba[i]=(start+slen*4)) { // Branch out of this block, don't need anything r32=0; } else { // Internal branch // Need whatever matches the target // (and doesn't get overwritten by the delay slot instruction) r32=0; int t=(ba[i]-start)>>2; if(ba[i]>start+i*4) { // Forward branch //if(!(requires_32bit[t]&~regs[i].was32)) // r32|=requires_32bit[t]&(~(1LL<>16)!=0x1000) { if(i0) { if((regs[i].was32>>us1[i+1])&1) r32|=1LL<0) { if((regs[i].was32>>us2[i+1])&1) r32|=1LL<>dep1[i+1])&1)) { if((regs[i].was32>>dep1[i+1])&1) r32|=1LL<>dep2[i+1])&1)) { if((regs[i].was32>>dep2[i+1])&1) r32|=1LL<0) { if((regs[i].was32>>us1[i])&1) r32|=1LL<0) { if((regs[i].was32>>us2[i])&1) r32|=1LL<>dep1[i])&1)) { if((regs[i].was32>>dep1[i])&1) r32|=1LL<>dep2[i])&1)) { if((regs[i].was32>>dep2[i])&1) r32|=1LL<0&®s[i].regmap_entry[hr]<64) { if((regs[i].was32>>regs[i].regmap_entry[hr])&(regs[i].wasdirty>>hr)&1) { if(!((unneeded_reg_upper[i]>>regs[i].regmap_entry[hr])&1)) pr32[i]|=1LL<=istart;i--) { if(itype[i]==RJUMP||itype[i]==UJUMP||itype[i]==CJUMP||itype[i]==SJUMP||itype[i]==FJUMP) { if(ba[i]=(start+slen*4)) { // Branch out of this block, flush all regs if(itype[i]==RJUMP||itype[i]==UJUMP||(source[i]>>16)==0x1000) { // Unconditional branch will_dirty_i=0; wont_dirty_i=0; // Merge in delay slot (will dirty) for(r=0;r33) will_dirty_i&=~(1<33) will_dirty_i&=~(1<33) will_dirty_i&=~(1<33) will_dirty_i&=~(1<>16)==0x1000) { // Unconditional branch temp_will_dirty=0; temp_wont_dirty=0; // Merge in delay slot (will dirty) for(r=0;r33) temp_will_dirty&=~(1<33) temp_will_dirty&=~(1<33) temp_will_dirty&=~(1<33) temp_will_dirty&=~(1<0 && (regmap_pre[i][r]&63)<34) { temp_will_dirty|=((unneeded_reg[i]>>(regmap_pre[i][r]&63))&1)<>(regmap_pre[i][r]&63))&1)<>2,i-1,0); }else{ // Limit recursion. It can take an excessive amount // of time if there are a lot of nested loops. will_dirty[(ba[i]-start)>>2]=0; wont_dirty[(ba[i]-start)>>2]=-1; } } /*else*/ if(1) { if(itype[i]==RJUMP||itype[i]==UJUMP||(source[i]>>16)==0x1000) { // Unconditional branch will_dirty_i=0; wont_dirty_i=0; //if(ba[i]>start+i*4) { // Disable recursion (for debugging) for(r=0;r>2].regmap_entry[r]) { will_dirty_i|=will_dirty[(ba[i]-start)>>2]&(1<>2]&(1<=0) { will_dirty_i|=((unneeded_reg[(ba[i]-start)>>2]>>(branch_regs[i].regmap[r]&63))&1)<>2]>>(branch_regs[i].regmap[r]&63))&1)<33) will_dirty_i&=~(1<33) will_dirty_i&=~(1<start+i*4) { // Disable recursion (for debugging) for(r=0;r>2].regmap_entry[r]) { will_dirty_i&=will_dirty[(ba[i]-start)>>2]&(1<>2]&(1<=0) { will_dirty_i&=((unneeded_reg[(ba[i]-start)>>2]>>(target_reg&63))&1)<>2]>>(target_reg&63))&1)<>2].regmap_entry[r]) { will_dirty[i+1]&=will_dirty[(ba[i]-start)>>2]&(1<>2]&(1<33) will_dirty_i&=~(1<33) will_dirty_i&=~(1<33) will_dirty_i&=~(1<istart) { if(itype[i]!=RJUMP&&itype[i]!=UJUMP&&itype[i]!=CJUMP&&itype[i]!=SJUMP&&itype[i]!=FJUMP) { // Don't store a register immediately after writing it, // may prevent dual-issue. if((regs[i].regmap[r]&63)==rt1[i-1]) wont_dirty_i|=1<>r)&1) { DebugMessage(M64MSG_VERBOSE, " r%d",r); } }*/ //if(i==istart||(itype[i-1]!=RJUMP&&itype[i-1]!=UJUMP&&itype[i-1]!=CJUMP&&itype[i-1]!=SJUMP&&itype[i-1]!=FJUMP)) { regs[i].dirty|=will_dirty_i; #ifndef DESTRUCTIVE_WRITEBACK regs[i].dirty&=wont_dirty_i; if(itype[i]==RJUMP||itype[i]==UJUMP||itype[i]==CJUMP||itype[i]==SJUMP||itype[i]==FJUMP) { if(i>16)!=0x1000) { for(r=0;r>r)&1));*/} } } } } else { if(i>r)&1));*/} } } } } #endif //} } // Deal with changed mappings temp_will_dirty=will_dirty_i; temp_wont_dirty=wont_dirty_i; for(r=0;r=0) { // Register moved to a different register will_dirty_i&=~(1<>nr)&1)<>nr)&1)<0 && (regmap_pre[i][r]&63)<34) { will_dirty_i|=((unneeded_reg[i]>>(regmap_pre[i][r]&63))&1)<>(regmap_pre[i][r]&63))&1)<>r)&1));*/ } } } } } } #ifdef ASSEM_DEBUG /* disassembly */ static void disassemble_inst(int i) { if (bt[i]) DebugMessage(M64MSG_VERBOSE, "*"); else DebugMessage(M64MSG_VERBOSE, " "); switch(itype[i]) { case UJUMP: printf (" %x: %s %8x",start+i*4,insn[i],ba[i]);break; case CJUMP: printf (" %x: %s r%d,r%d,%8x",start+i*4,insn[i],rs1[i],rs2[i],i?start+i*4+4+((signed int)((unsigned int)source[i]<<16)>>14):*ba);break; case SJUMP: printf (" %x: %s r%d,%8x",start+i*4,insn[i],rs1[i],start+i*4+4+((signed int)((unsigned int)source[i]<<16)>>14));break; case FJUMP: printf (" %x: %s %8x",start+i*4,insn[i],ba[i]);break; case RJUMP: if ((opcode2[i]&1)&&rt1[i]!=31) printf (" %x: %s r%d,r%d",start+i*4,insn[i],rt1[i],rs1[i]); else printf (" %x: %s r%d",start+i*4,insn[i],rs1[i]); break; case SPAN: printf (" %x: %s (pagespan) r%d,r%d,%8x",start+i*4,insn[i],rs1[i],rs2[i],ba[i]);break; case IMM16: if(opcode[i]==0xf) //LUI printf (" %x: %s r%d,%4x0000",start+i*4,insn[i],rt1[i],imm[i]&0xffff); else printf (" %x: %s r%d,r%d,%d",start+i*4,insn[i],rt1[i],rs1[i],imm[i]); break; case LOAD: case LOADLR: printf (" %x: %s r%d,r%d+%x",start+i*4,insn[i],rt1[i],rs1[i],imm[i]); break; case STORE: case STORELR: printf (" %x: %s r%d,r%d+%x",start+i*4,insn[i],rs2[i],rs1[i],imm[i]); break; case ALU: case SHIFT: printf (" %x: %s r%d,r%d,r%d",start+i*4,insn[i],rt1[i],rs1[i],rs2[i]); break; case MULTDIV: printf (" %x: %s r%d,r%d",start+i*4,insn[i],rs1[i],rs2[i]); break; case SHIFTIMM: printf (" %x: %s r%d,r%d,%d",start+i*4,insn[i],rt1[i],rs1[i],imm[i]); break; case MOV: if((opcode2[i]&0x1d)==0x10) printf (" %x: %s r%d",start+i*4,insn[i],rt1[i]); else if((opcode2[i]&0x1d)==0x11) printf (" %x: %s r%d",start+i*4,insn[i],rs1[i]); else printf (" %x: %s",start+i*4,insn[i]); break; case COP0: if(opcode2[i]==0) printf (" %x: %s r%d,cpr0[%d]",start+i*4,insn[i],rt1[i],(source[i]>>11)&0x1f); // MFC0 else if(opcode2[i]==4) printf (" %x: %s r%d,cpr0[%d]",start+i*4,insn[i],rs1[i],(source[i]>>11)&0x1f); // MTC0 else printf (" %x: %s",start+i*4,insn[i]); break; case COP1: if(opcode2[i]<3) printf (" %x: %s r%d,cpr1[%d]",start+i*4,insn[i],rt1[i],(source[i]>>11)&0x1f); // MFC1 else if(opcode2[i]>3) printf (" %x: %s r%d,cpr1[%d]",start+i*4,insn[i],rs1[i],(source[i]>>11)&0x1f); // MTC1 else printf (" %x: %s",start+i*4,insn[i]); break; case C1LS: printf (" %x: %s cpr1[%d],r%d+%x",start+i*4,insn[i],(source[i]>>16)&0x1f,rs1[i],imm[i]); break; default: //printf (" %s %8x",insn[i],source[i]); printf (" %x: %s",start+i*4,insn[i]); } } #endif void new_dynarec_init() { DebugMessage(M64MSG_INFO, "Init new dynarec"); #if NEW_DYNAREC == NEW_DYNAREC_ARM if ((base_addr = mmap ((u_char *)BASE_ADDR, 1<>2; for(n=526336;n<1048576;n++) // 0x80800000 .. 0xFFFFFFFF memory_map[n]=-1; for(n=0;n<0x8000;n++) { // 0 .. 0x7FFFFFFF writemem[n] = write_nomem_new; writememb[n] = write_nomemb_new; writememh[n] = write_nomemh_new; writememd[n] = write_nomemd_new; readmem[n] = read_nomem_new; readmemb[n] = read_nomemb_new; readmemh[n] = read_nomemh_new; readmemd[n] = read_nomemd_new; } for(n=0x8000;n<0x8080;n++) { // 0x80000000 .. 0x807FFFFF writemem[n] = write_rdram_new; writememb[n] = write_rdramb_new; writememh[n] = write_rdramh_new; writememd[n] = write_rdramd_new; } for(n=0xC000;n<0x10000;n++) { // 0xC0000000 .. 0xFFFFFFFF writemem[n] = write_nomem_new; writememb[n] = write_nomemb_new; writememh[n] = write_nomemh_new; writememd[n] = write_nomemd_new; readmem[n] = read_nomem_new; readmemb[n] = read_nomemb_new; readmemh[n] = read_nomemh_new; readmemd[n] = read_nomemd_new; } tlb_hacks(); arch_init(); } void new_dynarec_cleanup() { int n; #if defined(_MSC_VER) VirtualFree(base_addr, 0, MEM_RELEASE); #else if (munmap (base_addr, 1< %x", (int)addr, (int)out); #if defined (COUNT_NOTCOMPILEDS ) notcompiledCount++; log_message( "notcompiledCount=%i", notcompiledCount ); #endif //DebugMessage(M64MSG_VERBOSE, "NOTCOMPILED: addr = %x -> %x", (int)addr, (int)out); //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (compile %x)",g_cp0_regs[CP0_COUNT_REG],next_interupt,addr); //if(debug) //DebugMessage(M64MSG_VERBOSE, "TRACE: count=%d next=%d (checksum %x)",g_cp0_regs[CP0_COUNT_REG],next_interupt,mchecksum()); //DebugMessage(M64MSG_VERBOSE, "fpu mapping=%x enabled=%x",(g_cp0_regs[CP0_STATUS_REG] & 0x04000000)>>26,(g_cp0_regs[CP0_STATUS_REG] & 0x20000000)>>29); /*if(g_cp0_regs[CP0_COUNT_REG]>=312978186) { rlist(); }*/ //rlist(); start = (u_int)addr&~3; //assert(((u_int)addr&1)==0); if ((int)addr >= 0xa4000000 && (int)addr < 0xa4001000) { source = (u_int *)((u_int)g_sp.mem+start-0xa4000000); pagelimit = 0xa4001000; } else if ((int)addr >= 0x80000000 && (int)addr < 0x80800000) { source = (u_int *)((u_int)g_rdram+start-0x80000000); pagelimit = 0x80800000; } else if ((signed int)addr >= (signed int)0xC0000000) { //DebugMessage(M64MSG_VERBOSE, "addr=%x mm=%x",(u_int)addr,(memory_map[start>>12]<<2)); //if(tlb_LUT_r[start>>12]) //source = (u_int *)(((int)g_rdram)+(tlb_LUT_r[start>>12]&0xFFFFF000)+(((int)addr)&0xFFF)-0x80000000); if((signed int)memory_map[start>>12]>=0) { source = (u_int *)((u_int)(start+(memory_map[start>>12]<<2))); pagelimit=(start+4096)&0xFFFFF000; int map=memory_map[start>>12]; int i; for(i=0;i<5;i++) { //DebugMessage(M64MSG_VERBOSE, "start: %x next: %x",map,memory_map[pagelimit>>12]); if((map&0xBFFFFFFF)==(memory_map[pagelimit>>12]&0xBFFFFFFF)) pagelimit+=4096; } assem_debug("pagelimit=%x",pagelimit); assem_debug("mapping=%x (%x)",memory_map[start>>12],(memory_map[start>>12]<<2)+start); } else { assem_debug("Compile at unmapped memory address: %x ", (int)addr); //assem_debug("start: %x next: %x",memory_map[start>>12],memory_map[(start+4096)>>12]); return 1; // Caller will invoke exception handler } //DebugMessage(M64MSG_VERBOSE, "source= %x",(int)source); } else { //DebugMessage(M64MSG_VERBOSE, "Compile at bogus memory address: %x ", (int)addr); log_message("Compile at bogus memory address: %x", (int)addr); exit(1); } /* Pass 1: disassemble */ /* Pass 2: register dependencies, branch targets */ /* Pass 3: register allocation */ /* Pass 4: branch dependencies */ /* Pass 5: pre-alloc */ /* Pass 6: optimize clean/dirty state */ /* Pass 7: flag 32-bit registers */ /* Pass 8: assembly */ /* Pass 9: linker */ /* Pass 10: garbage collection / free memory */ int i,j; int done=0; unsigned int type,op,op2; //DebugMessage(M64MSG_VERBOSE, "addr = %x source = %x %x", addr,source,source[0]); /* Pass 1 disassembly */ for(i=0;!done;i++) { bt[i]=0;likely[i]=0;ooo[i]=0;op2=0; minimum_free_regs[i]=0; opcode[i]=op=source[i]>>26; switch(op) { case 0x00: strcpy(insn[i],"special"); type=NI; op2=source[i]&0x3f; switch(op2) { case 0x00: strcpy(insn[i],"SLL"); type=SHIFTIMM; break; case 0x02: strcpy(insn[i],"SRL"); type=SHIFTIMM; break; case 0x03: strcpy(insn[i],"SRA"); type=SHIFTIMM; break; case 0x04: strcpy(insn[i],"SLLV"); type=SHIFT; break; case 0x06: strcpy(insn[i],"SRLV"); type=SHIFT; break; case 0x07: strcpy(insn[i],"SRAV"); type=SHIFT; break; case 0x08: strcpy(insn[i],"JR"); type=RJUMP; break; case 0x09: strcpy(insn[i],"JALR"); type=RJUMP; break; case 0x0C: strcpy(insn[i],"SYSCALL"); type=SYSCALL; break; case 0x0D: strcpy(insn[i],"BREAK"); type=OTHER; break; case 0x0F: strcpy(insn[i],"SYNC"); type=OTHER; break; case 0x10: strcpy(insn[i],"MFHI"); type=MOV; break; case 0x11: strcpy(insn[i],"MTHI"); type=MOV; break; case 0x12: strcpy(insn[i],"MFLO"); type=MOV; break; case 0x13: strcpy(insn[i],"MTLO"); type=MOV; break; case 0x14: strcpy(insn[i],"DSLLV"); type=SHIFT; break; case 0x16: strcpy(insn[i],"DSRLV"); type=SHIFT; break; case 0x17: strcpy(insn[i],"DSRAV"); type=SHIFT; break; case 0x18: strcpy(insn[i],"MULT"); type=MULTDIV; break; case 0x19: strcpy(insn[i],"MULTU"); type=MULTDIV; break; case 0x1A: strcpy(insn[i],"DIV"); type=MULTDIV; break; case 0x1B: strcpy(insn[i],"DIVU"); type=MULTDIV; break; case 0x1C: strcpy(insn[i],"DMULT"); type=MULTDIV; break; case 0x1D: strcpy(insn[i],"DMULTU"); type=MULTDIV; break; case 0x1E: strcpy(insn[i],"DDIV"); type=MULTDIV; break; case 0x1F: strcpy(insn[i],"DDIVU"); type=MULTDIV; break; case 0x20: strcpy(insn[i],"ADD"); type=ALU; break; case 0x21: strcpy(insn[i],"ADDU"); type=ALU; break; case 0x22: strcpy(insn[i],"SUB"); type=ALU; break; case 0x23: strcpy(insn[i],"SUBU"); type=ALU; break; case 0x24: strcpy(insn[i],"AND"); type=ALU; break; case 0x25: strcpy(insn[i],"OR"); type=ALU; break; case 0x26: strcpy(insn[i],"XOR"); type=ALU; break; case 0x27: strcpy(insn[i],"NOR"); type=ALU; break; case 0x2A: strcpy(insn[i],"SLT"); type=ALU; break; case 0x2B: strcpy(insn[i],"SLTU"); type=ALU; break; case 0x2C: strcpy(insn[i],"DADD"); type=ALU; break; case 0x2D: strcpy(insn[i],"DADDU"); type=ALU; break; case 0x2E: strcpy(insn[i],"DSUB"); type=ALU; break; case 0x2F: strcpy(insn[i],"DSUBU"); type=ALU; break; case 0x30: strcpy(insn[i],"TGE"); type=NI; break; case 0x31: strcpy(insn[i],"TGEU"); type=NI; break; case 0x32: strcpy(insn[i],"TLT"); type=NI; break; case 0x33: strcpy(insn[i],"TLTU"); type=NI; break; case 0x34: strcpy(insn[i],"TEQ"); type=NI; break; case 0x36: strcpy(insn[i],"TNE"); type=NI; break; case 0x38: strcpy(insn[i],"DSLL"); type=SHIFTIMM; break; case 0x3A: strcpy(insn[i],"DSRL"); type=SHIFTIMM; break; case 0x3B: strcpy(insn[i],"DSRA"); type=SHIFTIMM; break; case 0x3C: strcpy(insn[i],"DSLL32"); type=SHIFTIMM; break; case 0x3E: strcpy(insn[i],"DSRL32"); type=SHIFTIMM; break; case 0x3F: strcpy(insn[i],"DSRA32"); type=SHIFTIMM; break; } break; case 0x01: strcpy(insn[i],"regimm"); type=NI; op2=(source[i]>>16)&0x1f; switch(op2) { case 0x00: strcpy(insn[i],"BLTZ"); type=SJUMP; break; case 0x01: strcpy(insn[i],"BGEZ"); type=SJUMP; break; case 0x02: strcpy(insn[i],"BLTZL"); type=SJUMP; break; case 0x03: strcpy(insn[i],"BGEZL"); type=SJUMP; break; case 0x08: strcpy(insn[i],"TGEI"); type=NI; break; case 0x09: strcpy(insn[i],"TGEIU"); type=NI; break; case 0x0A: strcpy(insn[i],"TLTI"); type=NI; break; case 0x0B: strcpy(insn[i],"TLTIU"); type=NI; break; case 0x0C: strcpy(insn[i],"TEQI"); type=NI; break; case 0x0E: strcpy(insn[i],"TNEI"); type=NI; break; case 0x10: strcpy(insn[i],"BLTZAL"); type=SJUMP; break; case 0x11: strcpy(insn[i],"BGEZAL"); type=SJUMP; break; case 0x12: strcpy(insn[i],"BLTZALL"); type=SJUMP; break; case 0x13: strcpy(insn[i],"BGEZALL"); type=SJUMP; break; } break; case 0x02: strcpy(insn[i],"J"); type=UJUMP; break; case 0x03: strcpy(insn[i],"JAL"); type=UJUMP; break; case 0x04: strcpy(insn[i],"BEQ"); type=CJUMP; break; case 0x05: strcpy(insn[i],"BNE"); type=CJUMP; break; case 0x06: strcpy(insn[i],"BLEZ"); type=CJUMP; break; case 0x07: strcpy(insn[i],"BGTZ"); type=CJUMP; break; case 0x08: strcpy(insn[i],"ADDI"); type=IMM16; break; case 0x09: strcpy(insn[i],"ADDIU"); type=IMM16; break; case 0x0A: strcpy(insn[i],"SLTI"); type=IMM16; break; case 0x0B: strcpy(insn[i],"SLTIU"); type=IMM16; break; case 0x0C: strcpy(insn[i],"ANDI"); type=IMM16; break; case 0x0D: strcpy(insn[i],"ORI"); type=IMM16; break; case 0x0E: strcpy(insn[i],"XORI"); type=IMM16; break; case 0x0F: strcpy(insn[i],"LUI"); type=IMM16; break; case 0x10: strcpy(insn[i],"cop0"); type=NI; op2=(source[i]>>21)&0x1f; switch(op2) { case 0x00: strcpy(insn[i],"MFC0"); type=COP0; break; case 0x04: strcpy(insn[i],"MTC0"); type=COP0; break; case 0x10: strcpy(insn[i],"tlb"); type=NI; switch(source[i]&0x3f) { case 0x01: strcpy(insn[i],"TLBR"); type=COP0; break; case 0x02: strcpy(insn[i],"TLBWI"); type=COP0; break; case 0x06: strcpy(insn[i],"TLBWR"); type=COP0; break; case 0x08: strcpy(insn[i],"TLBP"); type=COP0; break; case 0x18: strcpy(insn[i],"ERET"); type=COP0; break; } } break; case 0x11: strcpy(insn[i],"cop1"); type=NI; op2=(source[i]>>21)&0x1f; switch(op2) { case 0x00: strcpy(insn[i],"MFC1"); type=COP1; break; case 0x01: strcpy(insn[i],"DMFC1"); type=COP1; break; case 0x02: strcpy(insn[i],"CFC1"); type=COP1; break; case 0x04: strcpy(insn[i],"MTC1"); type=COP1; break; case 0x05: strcpy(insn[i],"DMTC1"); type=COP1; break; case 0x06: strcpy(insn[i],"CTC1"); type=COP1; break; case 0x08: strcpy(insn[i],"BC1"); type=FJUMP; switch((source[i]>>16)&0x3) { case 0x00: strcpy(insn[i],"BC1F"); break; case 0x01: strcpy(insn[i],"BC1T"); break; case 0x02: strcpy(insn[i],"BC1FL"); break; case 0x03: strcpy(insn[i],"BC1TL"); break; } break; case 0x10: strcpy(insn[i],"C1.S"); type=NI; switch(source[i]&0x3f) { case 0x00: strcpy(insn[i],"ADD.S"); type=FLOAT; break; case 0x01: strcpy(insn[i],"SUB.S"); type=FLOAT; break; case 0x02: strcpy(insn[i],"MUL.S"); type=FLOAT; break; case 0x03: strcpy(insn[i],"DIV.S"); type=FLOAT; break; case 0x04: strcpy(insn[i],"SQRT.S"); type=FLOAT; break; case 0x05: strcpy(insn[i],"ABS.S"); type=FLOAT; break; case 0x06: strcpy(insn[i],"MOV.S"); type=FLOAT; break; case 0x07: strcpy(insn[i],"NEG.S"); type=FLOAT; break; case 0x08: strcpy(insn[i],"ROUND.L.S"); type=FCONV; break; case 0x09: strcpy(insn[i],"TRUNC.L.S"); type=FCONV; break; case 0x0A: strcpy(insn[i],"CEIL.L.S"); type=FCONV; break; case 0x0B: strcpy(insn[i],"FLOOR.L.S"); type=FCONV; break; case 0x0C: strcpy(insn[i],"ROUND.W.S"); type=FCONV; break; case 0x0D: strcpy(insn[i],"TRUNC.W.S"); type=FCONV; break; case 0x0E: strcpy(insn[i],"CEIL.W.S"); type=FCONV; break; case 0x0F: strcpy(insn[i],"FLOOR.W.S"); type=FCONV; break; case 0x21: strcpy(insn[i],"CVT.D.S"); type=FCONV; break; case 0x24: strcpy(insn[i],"CVT.W.S"); type=FCONV; break; case 0x25: strcpy(insn[i],"CVT.L.S"); type=FCONV; break; case 0x30: strcpy(insn[i],"C.F.S"); type=FCOMP; break; case 0x31: strcpy(insn[i],"C.UN.S"); type=FCOMP; break; case 0x32: strcpy(insn[i],"C.EQ.S"); type=FCOMP; break; case 0x33: strcpy(insn[i],"C.UEQ.S"); type=FCOMP; break; case 0x34: strcpy(insn[i],"C.OLT.S"); type=FCOMP; break; case 0x35: strcpy(insn[i],"C.ULT.S"); type=FCOMP; break; case 0x36: strcpy(insn[i],"C.OLE.S"); type=FCOMP; break; case 0x37: strcpy(insn[i],"C.ULE.S"); type=FCOMP; break; case 0x38: strcpy(insn[i],"C.SF.S"); type=FCOMP; break; case 0x39: strcpy(insn[i],"C.NGLE.S"); type=FCOMP; break; case 0x3A: strcpy(insn[i],"C.SEQ.S"); type=FCOMP; break; case 0x3B: strcpy(insn[i],"C.NGL.S"); type=FCOMP; break; case 0x3C: strcpy(insn[i],"C.LT.S"); type=FCOMP; break; case 0x3D: strcpy(insn[i],"C.NGE.S"); type=FCOMP; break; case 0x3E: strcpy(insn[i],"C.LE.S"); type=FCOMP; break; case 0x3F: strcpy(insn[i],"C.NGT.S"); type=FCOMP; break; } break; case 0x11: strcpy(insn[i],"C1.D"); type=NI; switch(source[i]&0x3f) { case 0x00: strcpy(insn[i],"ADD.D"); type=FLOAT; break; case 0x01: strcpy(insn[i],"SUB.D"); type=FLOAT; break; case 0x02: strcpy(insn[i],"MUL.D"); type=FLOAT; break; case 0x03: strcpy(insn[i],"DIV.D"); type=FLOAT; break; case 0x04: strcpy(insn[i],"SQRT.D"); type=FLOAT; break; case 0x05: strcpy(insn[i],"ABS.D"); type=FLOAT; break; case 0x06: strcpy(insn[i],"MOV.D"); type=FLOAT; break; case 0x07: strcpy(insn[i],"NEG.D"); type=FLOAT; break; case 0x08: strcpy(insn[i],"ROUND.L.D"); type=FCONV; break; case 0x09: strcpy(insn[i],"TRUNC.L.D"); type=FCONV; break; case 0x0A: strcpy(insn[i],"CEIL.L.D"); type=FCONV; break; case 0x0B: strcpy(insn[i],"FLOOR.L.D"); type=FCONV; break; case 0x0C: strcpy(insn[i],"ROUND.W.D"); type=FCONV; break; case 0x0D: strcpy(insn[i],"TRUNC.W.D"); type=FCONV; break; case 0x0E: strcpy(insn[i],"CEIL.W.D"); type=FCONV; break; case 0x0F: strcpy(insn[i],"FLOOR.W.D"); type=FCONV; break; case 0x20: strcpy(insn[i],"CVT.S.D"); type=FCONV; break; case 0x24: strcpy(insn[i],"CVT.W.D"); type=FCONV; break; case 0x25: strcpy(insn[i],"CVT.L.D"); type=FCONV; break; case 0x30: strcpy(insn[i],"C.F.D"); type=FCOMP; break; case 0x31: strcpy(insn[i],"C.UN.D"); type=FCOMP; break; case 0x32: strcpy(insn[i],"C.EQ.D"); type=FCOMP; break; case 0x33: strcpy(insn[i],"C.UEQ.D"); type=FCOMP; break; case 0x34: strcpy(insn[i],"C.OLT.D"); type=FCOMP; break; case 0x35: strcpy(insn[i],"C.ULT.D"); type=FCOMP; break; case 0x36: strcpy(insn[i],"C.OLE.D"); type=FCOMP; break; case 0x37: strcpy(insn[i],"C.ULE.D"); type=FCOMP; break; case 0x38: strcpy(insn[i],"C.SF.D"); type=FCOMP; break; case 0x39: strcpy(insn[i],"C.NGLE.D"); type=FCOMP; break; case 0x3A: strcpy(insn[i],"C.SEQ.D"); type=FCOMP; break; case 0x3B: strcpy(insn[i],"C.NGL.D"); type=FCOMP; break; case 0x3C: strcpy(insn[i],"C.LT.D"); type=FCOMP; break; case 0x3D: strcpy(insn[i],"C.NGE.D"); type=FCOMP; break; case 0x3E: strcpy(insn[i],"C.LE.D"); type=FCOMP; break; case 0x3F: strcpy(insn[i],"C.NGT.D"); type=FCOMP; break; } break; case 0x14: strcpy(insn[i],"C1.W"); type=NI; switch(source[i]&0x3f) { case 0x20: strcpy(insn[i],"CVT.S.W"); type=FCONV; break; case 0x21: strcpy(insn[i],"CVT.D.W"); type=FCONV; break; } break; case 0x15: strcpy(insn[i],"C1.L"); type=NI; switch(source[i]&0x3f) { case 0x20: strcpy(insn[i],"CVT.S.L"); type=FCONV; break; case 0x21: strcpy(insn[i],"CVT.D.L"); type=FCONV; break; } break; } break; case 0x14: strcpy(insn[i],"BEQL"); type=CJUMP; break; case 0x15: strcpy(insn[i],"BNEL"); type=CJUMP; break; case 0x16: strcpy(insn[i],"BLEZL"); type=CJUMP; break; case 0x17: strcpy(insn[i],"BGTZL"); type=CJUMP; break; case 0x18: strcpy(insn[i],"DADDI"); type=IMM16; break; case 0x19: strcpy(insn[i],"DADDIU"); type=IMM16; break; case 0x1A: strcpy(insn[i],"LDL"); type=LOADLR; break; case 0x1B: strcpy(insn[i],"LDR"); type=LOADLR; break; case 0x20: strcpy(insn[i],"LB"); type=LOAD; break; case 0x21: strcpy(insn[i],"LH"); type=LOAD; break; case 0x22: strcpy(insn[i],"LWL"); type=LOADLR; break; case 0x23: strcpy(insn[i],"LW"); type=LOAD; break; case 0x24: strcpy(insn[i],"LBU"); type=LOAD; break; case 0x25: strcpy(insn[i],"LHU"); type=LOAD; break; case 0x26: strcpy(insn[i],"LWR"); type=LOADLR; break; case 0x27: strcpy(insn[i],"LWU"); type=LOAD; break; case 0x28: strcpy(insn[i],"SB"); type=STORE; break; case 0x29: strcpy(insn[i],"SH"); type=STORE; break; case 0x2A: strcpy(insn[i],"SWL"); type=STORELR; break; case 0x2B: strcpy(insn[i],"SW"); type=STORE; break; case 0x2C: strcpy(insn[i],"SDL"); type=STORELR; break; case 0x2D: strcpy(insn[i],"SDR"); type=STORELR; break; case 0x2E: strcpy(insn[i],"SWR"); type=STORELR; break; case 0x2F: strcpy(insn[i],"CACHE"); type=NOP; break; case 0x30: strcpy(insn[i],"LL"); type=NI; break; case 0x31: strcpy(insn[i],"LWC1"); type=C1LS; break; case 0x34: strcpy(insn[i],"LLD"); type=NI; break; case 0x35: strcpy(insn[i],"LDC1"); type=C1LS; break; case 0x37: strcpy(insn[i],"LD"); type=LOAD; break; case 0x38: strcpy(insn[i],"SC"); type=NI; break; case 0x39: strcpy(insn[i],"SWC1"); type=C1LS; break; case 0x3C: strcpy(insn[i],"SCD"); type=NI; break; case 0x3D: strcpy(insn[i],"SDC1"); type=C1LS; break; case 0x3F: strcpy(insn[i],"SD"); type=STORE; break; default: strcpy(insn[i],"???"); type=NI; break; } itype[i]=type; opcode2[i]=op2; /* Get registers/immediates */ lt1[i]=0; us1[i]=0; us2[i]=0; dep1[i]=0; dep2[i]=0; switch(type) { case LOAD: rs1[i]=(source[i]>>21)&0x1f; rs2[i]=0; rt1[i]=(source[i]>>16)&0x1f; rt2[i]=0; imm[i]=(short)source[i]; break; case STORE: case STORELR: rs1[i]=(source[i]>>21)&0x1f; rs2[i]=(source[i]>>16)&0x1f; rt1[i]=0; rt2[i]=0; imm[i]=(short)source[i]; if(op==0x2c||op==0x2d||op==0x3f) us1[i]=rs2[i]; // 64-bit SDL/SDR/SD break; case LOADLR: // LWL/LWR only load part of the register, // therefore the target register must be treated as a source too rs1[i]=(source[i]>>21)&0x1f; rs2[i]=(source[i]>>16)&0x1f; rt1[i]=(source[i]>>16)&0x1f; rt2[i]=0; imm[i]=(short)source[i]; if(op==0x1a||op==0x1b) us1[i]=rs2[i]; // LDR/LDL if(op==0x26) dep1[i]=rt1[i]; // LWR break; case IMM16: if (op==0x0f) rs1[i]=0; // LUI instruction has no source register else rs1[i]=(source[i]>>21)&0x1f; rs2[i]=0; rt1[i]=(source[i]>>16)&0x1f; rt2[i]=0; if(op>=0x0c&&op<=0x0e) { // ANDI/ORI/XORI imm[i]=(unsigned short)source[i]; }else{ imm[i]=(short)source[i]; } if(op==0x18||op==0x19) us1[i]=rs1[i]; // DADDI/DADDIU if(op==0x0a||op==0x0b) us1[i]=rs1[i]; // SLTI/SLTIU if(op==0x0d||op==0x0e) dep1[i]=rs1[i]; // ORI/XORI break; case UJUMP: rs1[i]=0; rs2[i]=0; rt1[i]=0; rt2[i]=0; // The JAL instruction writes to r31. if (op&1) { rt1[i]=31; } rs2[i]=CCREG; break; case RJUMP: rs1[i]=(source[i]>>21)&0x1f; rs2[i]=0; rt1[i]=0; rt2[i]=0; // The JALR instruction writes to rd. if (op2&1) { rt1[i]=(source[i]>>11)&0x1f; } rs2[i]=CCREG; break; case CJUMP: rs1[i]=(source[i]>>21)&0x1f; rs2[i]=(source[i]>>16)&0x1f; rt1[i]=0; rt2[i]=0; if(op&2) { // BGTZ/BLEZ rs2[i]=0; } us1[i]=rs1[i]; us2[i]=rs2[i]; likely[i]=op>>4; break; case SJUMP: rs1[i]=(source[i]>>21)&0x1f; rs2[i]=CCREG; rt1[i]=0; rt2[i]=0; us1[i]=rs1[i]; if(op2&0x10) { // BxxAL rt1[i]=31; // NOTE: If the branch is not taken, r31 is still overwritten } likely[i]=(op2&2)>>1; break; case FJUMP: rs1[i]=FSREG; rs2[i]=CSREG; rt1[i]=0; rt2[i]=0; likely[i]=((source[i])>>17)&1; break; case ALU: rs1[i]=(source[i]>>21)&0x1f; // source rs2[i]=(source[i]>>16)&0x1f; // subtract amount rt1[i]=(source[i]>>11)&0x1f; // destination rt2[i]=0; if(op2==0x2a||op2==0x2b) { // SLT/SLTU us1[i]=rs1[i];us2[i]=rs2[i]; } else if(op2>=0x24&&op2<=0x27) { // AND/OR/XOR/NOR dep1[i]=rs1[i];dep2[i]=rs2[i]; } else if(op2>=0x2c&&op2<=0x2f) { // DADD/DSUB dep1[i]=rs1[i];dep2[i]=rs2[i]; } break; case MULTDIV: rs1[i]=(source[i]>>21)&0x1f; // source rs2[i]=(source[i]>>16)&0x1f; // divisor rt1[i]=HIREG; rt2[i]=LOREG; if (op2>=0x1c&&op2<=0x1f) { // DMULT/DMULTU/DDIV/DDIVU us1[i]=rs1[i];us2[i]=rs2[i]; } break; case MOV: rs1[i]=0; rs2[i]=0; rt1[i]=0; rt2[i]=0; if(op2==0x10) rs1[i]=HIREG; // MFHI if(op2==0x11) rt1[i]=HIREG; // MTHI if(op2==0x12) rs1[i]=LOREG; // MFLO if(op2==0x13) rt1[i]=LOREG; // MTLO if((op2&0x1d)==0x10) rt1[i]=(source[i]>>11)&0x1f; // MFxx if((op2&0x1d)==0x11) rs1[i]=(source[i]>>21)&0x1f; // MTxx dep1[i]=rs1[i]; break; case SHIFT: rs1[i]=(source[i]>>16)&0x1f; // target of shift rs2[i]=(source[i]>>21)&0x1f; // shift amount rt1[i]=(source[i]>>11)&0x1f; // destination rt2[i]=0; // DSLLV/DSRLV/DSRAV are 64-bit if(op2>=0x14&&op2<=0x17) us1[i]=rs1[i]; break; case SHIFTIMM: rs1[i]=(source[i]>>16)&0x1f; rs2[i]=0; rt1[i]=(source[i]>>11)&0x1f; rt2[i]=0; imm[i]=(source[i]>>6)&0x1f; // DSxx32 instructions if(op2>=0x3c) imm[i]|=0x20; // DSLL/DSRL/DSRA/DSRA32/DSRL32 but not DSLL32 require 64-bit source if(op2>=0x38&&op2!=0x3c) us1[i]=rs1[i]; break; case COP0: rs1[i]=0; rs2[i]=0; rt1[i]=0; rt2[i]=0; if(op2==0) rt1[i]=(source[i]>>16)&0x1F; // MFC0 if(op2==4) rs1[i]=(source[i]>>16)&0x1F; // MTC0 if(op2==4&&((source[i]>>11)&0x1f)==12) rt2[i]=CSREG; // Status if(op2==16) if((source[i]&0x3f)==0x18) rs2[i]=CCREG; // ERET break; case COP1: rs1[i]=0; rs2[i]=0; rt1[i]=0; rt2[i]=0; if(op2<3) rt1[i]=(source[i]>>16)&0x1F; // MFC1/DMFC1/CFC1 if(op2>3) rs1[i]=(source[i]>>16)&0x1F; // MTC1/DMTC1/CTC1 if(op2==5) us1[i]=rs1[i]; // DMTC1 rs2[i]=CSREG; break; case C1LS: rs1[i]=(source[i]>>21)&0x1F; rs2[i]=CSREG; rt1[i]=0; rt2[i]=0; imm[i]=(short)source[i]; break; case FLOAT: case FCONV: rs1[i]=0; rs2[i]=CSREG; rt1[i]=0; rt2[i]=0; break; case FCOMP: rs1[i]=FSREG; rs2[i]=CSREG; rt1[i]=FSREG; rt2[i]=0; break; case SYSCALL: rs1[i]=CCREG; rs2[i]=0; rt1[i]=0; rt2[i]=0; break; default: rs1[i]=0; rs2[i]=0; rt1[i]=0; rt2[i]=0; } /* Calculate branch target addresses */ if(type==UJUMP) ba[i]=((start+i*4+4)&0xF0000000)|(((unsigned int)source[i]<<6)>>4); else if(type==CJUMP&&rs1[i]==rs2[i]&&(op&1)) ba[i]=start+i*4+8; // Ignore never taken branch else if(type==SJUMP&&rs1[i]==0&&!(op2&1)) ba[i]=start+i*4+8; // Ignore never taken branch else if(type==CJUMP||type==SJUMP||type==FJUMP) ba[i]=start+i*4+4+((signed int)((unsigned int)source[i]<<16)>>14); else ba[i]=-1; /* Is this the end of the block? */ if(i>0&&(itype[i-1]==UJUMP||itype[i-1]==RJUMP||(source[i-1]>>16)==0x1000)) { if(rt1[i-1]==0) { // Continue past subroutine call (JAL) done=1; // Does the block continue due to a branch? for(j=i-1;j>=0;j--) { if(ba[j]==start+i*4) done=j=0; // Branch into delay slot if(ba[j]==start+i*4+4) done=j=0; if(ba[j]==start+i*4+8) done=j=0; } } else { if(stop_after_jal) done=1; // Stop on BREAK if((source[i+1]&0xfc00003f)==0x0d) done=1; } // Don't recompile stuff that's already compiled if(check_addr(start+i*4+4)) done=1; // Don't get too close to the limit if(i>MAXBLOCK/2) done=1; } if(i>0&&itype[i-1]==SYSCALL&&stop_after_jal) done=1; assert(i0); /* Pass 2 - Register dependencies and branch targets */ unneeded_registers(0,slen-1,0); /* Pass 3 - Register allocation */ struct regstat current; // Current register allocations/status current.is32=1; current.dirty=0; current.u=unneeded_reg[0]; current.uu=unneeded_reg_upper[0]; clear_all_regs(current.regmap); alloc_reg(¤t,0,CCREG); dirty_reg(¤t,CCREG); current.isconst=0; current.wasconst=0; int ds=0; int cc=0; int hr; provisional_32bit(); if((u_int)addr&1) { // First instruction is delay slot cc=-1; bt[1]=1; ds=1; unneeded_reg[0]=1; unneeded_reg_upper[0]=1; current.regmap[HOST_BTREG]=BTREG; } for(i=0;i1) { if((opcode[i-2]&0x2f)==0x05) // BNE/BNEL { if(rs1[i-2]==0||rs2[i-2]==0) { if(rs1[i-2]) { current.is32|=1LL<=0) current.regmap[hr]=-1; } if(rs2[i-2]) { current.is32|=1LL<=0) current.regmap[hr]=-1; } } } } // If something jumps here with 64-bit values // then promote those registers to 64 bits if(bt[i]) { uint64_t temp_is32=current.is32; for(j=i-1;j>=0;j--) { if(ba[j]==start+i*4) temp_is32&=branch_regs[j].is32; } for(j=i;j0&&r<64) { if((current.dirty>>hr)&((current.is32&~temp_is32)>>r)&1) { temp_is32|=1LL<=0;j--) { if(ba[j]==start+i*4+4) temp_is32&=branch_regs[j].is32; } for(j=i;j0) { if((current.dirty>>hr)&((current.is32&~temp_is32)>>(r&63))&1) { if(itype[i]!=UJUMP&&itype[i]!=CJUMP&&itype[i]!=SJUMP&&itype[i]!=RJUMP&&itype[i]!=FJUMP) { if(rs1[i]!=(r&63)&&rs2[i]!=(r&63)) { //DebugMessage(M64MSG_VERBOSE, "dump %d/r%d",hr,r); current.regmap[hr]=-1; if(get_reg(current.regmap,r|64)>=0) current.regmap[get_reg(current.regmap,r|64)]=-1; } } } } } } } else if(i>16)!=0x1000&&(itype[i]==CJUMP||itype[i]==SJUMP||itype[i]==FJUMP)) { uint64_t temp_is32=current.is32; for(j=i-1;j>=0;j--) { if(ba[j]==start+i*4+8) temp_is32&=branch_regs[j].is32; } for(j=i;j0) { if((current.dirty>>hr)&((current.is32&~temp_is32)>>(r&63))&1) { if(rs1[i]!=(r&63)&&rs2[i]!=(r&63)&&rs1[i+1]!=(r&63)&&rs2[i+1]!=(r&63)) { //DebugMessage(M64MSG_VERBOSE, "dump %d/r%d",hr,r); current.regmap[hr]=-1; if(get_reg(current.regmap,r|64)>=0) current.regmap[get_reg(current.regmap,r|64)]=-1; } } } } } } #endif if(itype[i]!=UJUMP&&itype[i]!=CJUMP&&itype[i]!=SJUMP&&itype[i]!=RJUMP&&itype[i]!=FJUMP) { if(i+1>rt1[i])&1) current.uu&=~((1LL<>rt1[i+1])&1) current.uu&=~((1LL<>rt1[i])&1) current.uu&=~((1LL<=0) { if(r!=regmap_pre[i][hr]) { regs[i].regmap_entry[hr]=-1; } else { if(r<64){ if((current.u>>r)&1) { regs[i].regmap_entry[hr]=-1; regs[i].regmap[hr]=-1; //Don't clear regs in the delay slot as the branch might need them //current.regmap[hr]=-1; }else regs[i].regmap_entry[hr]=r; } else { if((current.uu>>(r&63))&1) { regs[i].regmap_entry[hr]=-1; regs[i].regmap[hr]=-1; //Don't clear regs in the delay slot as the branch might need them //current.regmap[hr]=-1; }else regs[i].regmap_entry[hr]=r; } } } else { // First instruction expects CCREG to be allocated if(i==0&&hr==HOST_CCREG) regs[i].regmap_entry[hr]=CCREG; else regs[i].regmap_entry[hr]=-1; } } } else { // Not delay slot switch(itype[i]) { case UJUMP: //current.isconst=0; // DEBUG //current.wasconst=0; // DEBUG //regs[i].wasconst=0; // DEBUG clear_const(¤t,rt1[i]); alloc_cc(¤t,i); dirty_reg(¤t,CCREG); if (rt1[i]==31) { alloc_reg(¤t,i,31); dirty_reg(¤t,31); assert(rs1[i+1]!=31&&rs2[i+1]!=31); #ifdef REG_PREFETCH alloc_reg(¤t,i,PTEMP); #endif //current.is32|=1LL<>rs1[i])&(current.is32>>rs2[i])&1)) { if(rs1[i]) alloc_reg64(¤t,i,rs1[i]); if(rs2[i]) alloc_reg64(¤t,i,rs2[i]); } if((rs1[i]&&(rs1[i]==rt1[i+1]||rs1[i]==rt2[i+1]))|| (rs2[i]&&(rs2[i]==rt1[i+1]||rs2[i]==rt2[i+1]))) { // The delay slot overwrites one of our conditions. // Allocate the branch condition registers instead. current.isconst=0; current.wasconst=0; regs[i].wasconst=0; if(rs1[i]) alloc_reg(¤t,i,rs1[i]); if(rs2[i]) alloc_reg(¤t,i,rs2[i]); if(!((current.is32>>rs1[i])&(current.is32>>rs2[i])&1)) { if(rs1[i]) alloc_reg64(¤t,i,rs1[i]); if(rs2[i]) alloc_reg64(¤t,i,rs2[i]); } } else { ooo[i]=1; delayslot_alloc(¤t,i+1); } } else if((opcode[i]&0x3E)==6) // BLEZ/BGTZ { alloc_cc(¤t,i); dirty_reg(¤t,CCREG); alloc_reg(¤t,i,rs1[i]); if(!(current.is32>>rs1[i]&1)) { alloc_reg64(¤t,i,rs1[i]); } if(rs1[i]&&(rs1[i]==rt1[i+1]||rs1[i]==rt2[i+1])) { // The delay slot overwrites one of our conditions. // Allocate the branch condition registers instead. current.isconst=0; current.wasconst=0; regs[i].wasconst=0; if(rs1[i]) alloc_reg(¤t,i,rs1[i]); if(!((current.is32>>rs1[i])&1)) { if(rs1[i]) alloc_reg64(¤t,i,rs1[i]); } } else { ooo[i]=1; delayslot_alloc(¤t,i+1); } } else // Don't alloc the delay slot yet because we might not execute it if((opcode[i]&0x3E)==0x14) // BEQL/BNEL { current.isconst=0; current.wasconst=0; regs[i].wasconst=0; alloc_cc(¤t,i); dirty_reg(¤t,CCREG); alloc_reg(¤t,i,rs1[i]); alloc_reg(¤t,i,rs2[i]); if(!((current.is32>>rs1[i])&(current.is32>>rs2[i])&1)) { alloc_reg64(¤t,i,rs1[i]); alloc_reg64(¤t,i,rs2[i]); } } else if((opcode[i]&0x3E)==0x16) // BLEZL/BGTZL { current.isconst=0; current.wasconst=0; regs[i].wasconst=0; alloc_cc(¤t,i); dirty_reg(¤t,CCREG); alloc_reg(¤t,i,rs1[i]); if(!(current.is32>>rs1[i]&1)) { alloc_reg64(¤t,i,rs1[i]); } } ds=1; //current.isconst=0; break; case SJUMP: //current.isconst=0; //current.wasconst=0; //regs[i].wasconst=0; clear_const(¤t,rs1[i]); clear_const(¤t,rt1[i]); //if((opcode2[i]&0x1E)==0x0) // BLTZ/BGEZ if((opcode2[i]&0x0E)==0x0) // BLTZ/BGEZ { alloc_cc(¤t,i); dirty_reg(¤t,CCREG); alloc_reg(¤t,i,rs1[i]); if(!(current.is32>>rs1[i]&1)) { alloc_reg64(¤t,i,rs1[i]); } if (rt1[i]==31) { // BLTZAL/BGEZAL alloc_reg(¤t,i,31); dirty_reg(¤t,31); assert(rs1[i+1]!=31&&rs2[i+1]!=31); //#ifdef REG_PREFETCH //alloc_reg(¤t,i,PTEMP); //#endif //current.is32|=1LL<>rs1[i])&1)) { if(rs1[i]) alloc_reg64(¤t,i,rs1[i]); } } else { ooo[i]=1; delayslot_alloc(¤t,i+1); } } else // Don't alloc the delay slot yet because we might not execute it if((opcode2[i]&0x1E)==0x2) // BLTZL/BGEZL { current.isconst=0; current.wasconst=0; regs[i].wasconst=0; alloc_cc(¤t,i); dirty_reg(¤t,CCREG); alloc_reg(¤t,i,rs1[i]); if(!(current.is32>>rs1[i]&1)) { alloc_reg64(¤t,i,rs1[i]); } } ds=1; //current.isconst=0; break; case FJUMP: current.isconst=0; current.wasconst=0; regs[i].wasconst=0; if(likely[i]==0) // BC1F/BC1T { // TODO: Theoretically we can run out of registers here on x86. // The delay slot can allocate up to six, and we need to check // CSREG before executing the delay slot. Possibly we can drop // the cycle count and then reload it after checking that the // FPU is in a usable state, or don't do out-of-order execution. alloc_cc(¤t,i); dirty_reg(¤t,CCREG); alloc_reg(¤t,i,FSREG); alloc_reg(¤t,i,CSREG); if(itype[i+1]==FCOMP) { // The delay slot overwrites the branch condition. // Allocate the branch condition registers instead. alloc_cc(¤t,i); dirty_reg(¤t,CCREG); alloc_reg(¤t,i,CSREG); alloc_reg(¤t,i,FSREG); } else { ooo[i]=1; delayslot_alloc(¤t,i+1); alloc_reg(¤t,i+1,CSREG); } } else // Don't alloc the delay slot yet because we might not execute it if(likely[i]) // BC1FL/BC1TL { alloc_cc(¤t,i); dirty_reg(¤t,CCREG); alloc_reg(¤t,i,CSREG); alloc_reg(¤t,i,FSREG); } ds=1; current.isconst=0; break; case IMM16: imm16_alloc(¤t,i); break; case LOAD: case LOADLR: load_alloc(¤t,i); break; case STORE: case STORELR: store_alloc(¤t,i); break; case ALU: alu_alloc(¤t,i); break; case SHIFT: shift_alloc(¤t,i); break; case MULTDIV: multdiv_alloc(¤t,i); break; case SHIFTIMM: shiftimm_alloc(¤t,i); break; case MOV: mov_alloc(¤t,i); break; case COP0: cop0_alloc(¤t,i); break; case COP1: cop1_alloc(¤t,i); break; case C1LS: c1ls_alloc(¤t,i); break; case FCONV: fconv_alloc(¤t,i); break; case FLOAT: float_alloc(¤t,i); break; case FCOMP: fcomp_alloc(¤t,i); break; case SYSCALL: syscall_alloc(¤t,i); break; case SPAN: pagespan_alloc(¤t,i); break; } // Drop the upper half of registers that have become 32-bit current.uu|=current.is32&((1LL<>rt1[i])&1) current.uu&=~((1LL<>rt1[i+1])&1) current.uu&=~((1LL<=0) { if(r!=regmap_pre[i][hr]) { // TODO: delay slot (?) or=get_reg(regmap_pre[i],r); // Get old mapping for this register if(or<0||(r&63)>=TEMPREG){ regs[i].regmap_entry[hr]=-1; } else { // Just move it to a different register regs[i].regmap_entry[hr]=r; // If it was dirty before, it's still dirty if((regs[i].wasdirty>>or)&1) dirty_reg(¤t,r&63); } } else { // Unneeded if(r==0){ regs[i].regmap_entry[hr]=0; } else if(r<64){ if((current.u>>r)&1) { regs[i].regmap_entry[hr]=-1; //regs[i].regmap[hr]=-1; current.regmap[hr]=-1; }else regs[i].regmap_entry[hr]=r; } else { if((current.uu>>(r&63))&1) { regs[i].regmap_entry[hr]=-1; //regs[i].regmap[hr]=-1; current.regmap[hr]=-1; }else regs[i].regmap_entry[hr]=r; } } } else { // Branches expect CCREG to be allocated at the target if(regmap_pre[i][hr]==CCREG) regs[i].regmap_entry[hr]=CCREG; else regs[i].regmap_entry[hr]=-1; } } memcpy(regs[i].regmap,current.regmap,sizeof(current.regmap)); } /* Branch post-alloc */ if(i>0) { current.was32=current.is32; current.wasdirty=current.dirty; switch(itype[i-1]) { case UJUMP: memcpy(&branch_regs[i-1],¤t,sizeof(current)); branch_regs[i-1].isconst=0; branch_regs[i-1].wasconst=0; branch_regs[i-1].u=branch_unneeded_reg[i-1]&~((1LL<>rt1[i])&1) current.uu&=~((1LL<>rs1[i-1])&(current.is32>>rs2[i-1])&1)) { if(rs1[i-1]) alloc_reg64(¤t,i-1,rs1[i-1]); if(rs2[i-1]) alloc_reg64(¤t,i-1,rs2[i-1]); } } memcpy(&branch_regs[i-1],¤t,sizeof(current)); branch_regs[i-1].isconst=0; branch_regs[i-1].wasconst=0; memcpy(&branch_regs[i-1].regmap_entry,¤t.regmap,sizeof(current.regmap)); memcpy(constmap[i],constmap[i-1],sizeof(current.constmap)); } else if((opcode[i-1]&0x3E)==6) // BLEZ/BGTZ { alloc_cc(¤t,i-1); dirty_reg(¤t,CCREG); if(rs1[i-1]==rt1[i]||rs1[i-1]==rt2[i]) { // The delay slot overwrote the branch condition // Delay slot goes after the test (in order) current.u=branch_unneeded_reg[i-1]&~((1LL<>rt1[i])&1) current.uu&=~((1LL<>rs1[i-1]&1)) { alloc_reg64(¤t,i-1,rs1[i-1]); } } memcpy(&branch_regs[i-1],¤t,sizeof(current)); branch_regs[i-1].isconst=0; branch_regs[i-1].wasconst=0; memcpy(&branch_regs[i-1].regmap_entry,¤t.regmap,sizeof(current.regmap)); memcpy(constmap[i],constmap[i-1],sizeof(current.constmap)); } else // Alloc the delay slot in case the branch is taken if((opcode[i-1]&0x3E)==0x14) // BEQL/BNEL { memcpy(&branch_regs[i-1],¤t,sizeof(current)); branch_regs[i-1].u=(branch_unneeded_reg[i-1]&~((1LL<>rt1[i])&1) branch_regs[i-1].uu&=~((1LL<>rt1[i])&1) branch_regs[i-1].uu&=~((1LL<>rt1[i])&1) current.uu&=~((1LL<>rs1[i-1]&1)) { alloc_reg64(¤t,i-1,rs1[i-1]); } } memcpy(&branch_regs[i-1],¤t,sizeof(current)); branch_regs[i-1].isconst=0; branch_regs[i-1].wasconst=0; memcpy(&branch_regs[i-1].regmap_entry,¤t.regmap,sizeof(current.regmap)); memcpy(constmap[i],constmap[i-1],sizeof(current.constmap)); } else // Alloc the delay slot in case the branch is taken if((opcode2[i-1]&0x1E)==2) // BLTZL/BGEZL { memcpy(&branch_regs[i-1],¤t,sizeof(current)); branch_regs[i-1].u=(branch_unneeded_reg[i-1]&~((1LL<>rt1[i])&1) branch_regs[i-1].uu&=~((1LL<>rt1[i])&1) branch_regs[i-1].uu&=~((1LL<>16)==0x1000) { if(rt1[i-1]==31) // JAL/JALR { // Subroutine call will return here, don't alloc any registers current.is32=1; current.dirty=0; clear_all_regs(current.regmap); alloc_reg(¤t,i,CCREG); dirty_reg(¤t,CCREG); } else if(i+1=0;j--) { if(ba[j]==start+i*4+4) { memcpy(current.regmap,branch_regs[j].regmap,sizeof(current.regmap)); current.is32=branch_regs[j].is32; current.dirty=branch_regs[j].dirty; break; } } while(j>=0) { if(ba[j]==start+i*4+4) { for(hr=0;hr0&&(itype[i-1]==RJUMP||itype[i-1]==UJUMP||itype[i-1]==CJUMP||itype[i-1]==SJUMP||itype[i-1]==FJUMP||itype[i]==SYSCALL)) { cc=0; } else { cc++; } flush_dirty_uppers(¤t); if(!is_ds[i]) { regs[i].is32=current.is32; regs[i].dirty=current.dirty; regs[i].isconst=current.isconst; memcpy(constmap[i],current.constmap,sizeof(current.constmap)); } for(hr=0;hr=0) { if(regmap_pre[i][hr]!=regs[i].regmap[hr]) { regs[i].wasconst&=~(1<=0;i--) { int hr=0; if(itype[i]==RJUMP||itype[i]==UJUMP||itype[i]==CJUMP||itype[i]==SJUMP||itype[i]==FJUMP) { if(ba[i]=(start+slen*4)) { // Branch out of this block, don't need anything nr=0; } else { // Internal branch // Need whatever matches the target nr=0; int t=(ba[i]-start)>>2; for(hr=0;hr=0) { if(regs[i].regmap_entry[hr]==regs[t].regmap_entry[hr]) nr|=(uint64_t)1<>16)!=0x1000) { if(i=0&&get_reg(regs[i+2].regmap_entry,regmap_pre[i+2][hr])<0) nr&=~(1<=0) if(!((nr>>hr)&1)) DebugMessage(M64MSG_VERBOSE, "%x-bogus(%d=%d)",start+i*4,hr,regmap_entry[i+2][hr]); } } } // Don't need stuff which is overwritten if(regs[i].regmap[hr]!=regmap_pre[i][hr]) nr&=~(1<>dep1[i+1])&1)) { if(dep1[i+1]==(regmap_pre[i][hr]&63)) nr|=(uint64_t)1<>dep2[i+1])&1)) { if(dep1[i+1]==(regs[i].regmap_entry[hr]&63)) nr|=(uint64_t)1<=0&&get_reg(regs[i+1].regmap_entry,regmap_pre[i+1][hr])<0) nr&=~(1<>dep1[i])&1)) { if(dep1[i]==(regmap_pre[i][hr]&63)) nr|=(uint64_t)1<>dep2[i])&1)) { if(dep2[i]==(regmap_pre[i][hr]&63)) nr|=(uint64_t)1<0&&!bt[i]&&((regs[i].wasdirty>>hr)&1)) { if((regmap_pre[i][hr]>0&®map_pre[i][hr]<64&&!((unneeded_reg[i]>>regmap_pre[i][hr])&1)) || (regmap_pre[i][hr]>64&&!((unneeded_reg_upper[i]>>(regmap_pre[i][hr]&63))&1)) ) { if(rt1[i-1]==(regmap_pre[i][hr]&63)) nr|=(uint64_t)1<0&®s[i].regmap_entry[hr]<64&&!((unneeded_reg[i]>>regs[i].regmap_entry[hr])&1)) || (regs[i].regmap_entry[hr]>64&&!((unneeded_reg_upper[i]>>(regs[i].regmap_entry[hr]&63))&1)) ) { if(rt1[i-1]==(regs[i].regmap_entry[hr]&63)) nr|=(uint64_t)1<>hr)&1)) { if(regs[i].regmap_entry[hr]!=CCREG) regs[i].regmap_entry[hr]=-1; if((regs[i].regmap[hr]&63)!=rs1[i] && (regs[i].regmap[hr]&63)!=rs2[i] && (regs[i].regmap[hr]&63)!=rt1[i] && (regs[i].regmap[hr]&63)!=rt2[i] && (regs[i].regmap[hr]&63)!=PTEMP && (regs[i].regmap[hr]&63)!=CCREG) { if(itype[i]!=RJUMP&&itype[i]!=UJUMP&&(source[i]>>16)!=0x1000) { if(likely[i]) { regs[i].regmap[hr]=-1; regs[i].isconst&=~(1<=0||get_reg(branch_regs[i].regmap,rt1[i+1]|64)>=0) { d1=dep1[i+1]; d2=dep2[i+1]; } if(using_tlb) { if(itype[i+1]==LOAD || itype[i+1]==LOADLR || itype[i+1]==STORE || itype[i+1]==STORELR || itype[i+1]==C1LS ) map=TLREG; } else if(itype[i+1]==STORE || itype[i+1]==STORELR || (opcode[i+1]&0x3b)==0x39) { map=INVCP; } if(itype[i+1]==LOADLR || itype[i+1]==STORELR || itype[i+1]==C1LS ) temp=FTEMP; if((regs[i].regmap[hr]&63)!=rs1[i] && (regs[i].regmap[hr]&63)!=rs2[i] && (regs[i].regmap[hr]&63)!=rt1[i] && (regs[i].regmap[hr]&63)!=rt2[i] && (regs[i].regmap[hr]&63)!=rt1[i+1] && (regs[i].regmap[hr]&63)!=rt2[i+1] && (regs[i].regmap[hr]^64)!=us1[i+1] && (regs[i].regmap[hr]^64)!=us2[i+1] && (regs[i].regmap[hr]^64)!=d1 && (regs[i].regmap[hr]^64)!=d2 && regs[i].regmap[hr]!=rs1[i+1] && regs[i].regmap[hr]!=rs2[i+1] && (regs[i].regmap[hr]&63)!=temp && regs[i].regmap[hr]!=PTEMP && regs[i].regmap[hr]!=RHASH && regs[i].regmap[hr]!=RHTBL && regs[i].regmap[hr]!=RTEMP && regs[i].regmap[hr]!=CCREG && regs[i].regmap[hr]!=map ) { regs[i].regmap[hr]=-1; regs[i].isconst&=~(1<>16)!=0x1000) { if(!likely[i]&&i0) { int d1=0,d2=0,map=-1,temp=-1; if(get_reg(regs[i].regmap,rt1[i]|64)>=0) { d1=dep1[i]; d2=dep2[i]; } if(using_tlb) { if(itype[i]==LOAD || itype[i]==LOADLR || itype[i]==STORE || itype[i]==STORELR || itype[i]==C1LS ) map=TLREG; } else if(itype[i]==STORE || itype[i]==STORELR || (opcode[i]&0x3b)==0x39) { map=INVCP; } if(itype[i]==LOADLR || itype[i]==STORELR || itype[i]==C1LS ) temp=FTEMP; if((regs[i].regmap[hr]&63)!=rt1[i] && (regs[i].regmap[hr]&63)!=rt2[i] && (regs[i].regmap[hr]^64)!=us1[i] && (regs[i].regmap[hr]^64)!=us2[i] && (regs[i].regmap[hr]^64)!=d1 && (regs[i].regmap[hr]^64)!=d2 && regs[i].regmap[hr]!=rs1[i] && regs[i].regmap[hr]!=rs2[i] && (regs[i].regmap[hr]&63)!=temp && regs[i].regmap[hr]!=map && (itype[i]!=SPAN||regs[i].regmap[hr]!=CCREG)) { if(i>(regs[i].regmap[hr]&63))&1)) { DebugMessage(M64MSG_VERBOSE, "fail: %x (%d %d!=%d)",start+i*4,hr,regmap_pre[i+1][hr],regs[i].regmap[hr]); assert(regmap_pre[i+1][hr]==regs[i].regmap[hr]); } regmap_pre[i+1][hr]=-1; if(regs[i+1].regmap_entry[hr]==CCREG) regs[i+1].regmap_entry[hr]=-1; regs[i+1].wasconst&=~(1<=start && ba[i]<(start+i*4)) if(itype[i+1]==NOP||itype[i+1]==MOV||itype[i+1]==ALU ||itype[i+1]==SHIFTIMM||itype[i+1]==IMM16||itype[i+1]==LOAD ||itype[i+1]==STORE||itype[i+1]==STORELR||itype[i+1]==C1LS ||itype[i+1]==SHIFT||itype[i+1]==COP1||itype[i+1]==FLOAT ||itype[i+1]==FCOMP||itype[i+1]==FCONV) { int t=(ba[i]-start)>>2; if(t>0&&(itype[t-1]!=UJUMP&&itype[t-1]!=RJUMP&&itype[t-1]!=CJUMP&&itype[t-1]!=SJUMP&&itype[t-1]!=FJUMP)) // loop_preload can't handle jumps into delay slots if(t<2||(itype[t-2]!=UJUMP&&itype[t-2]!=RJUMP)||rt1[t-2]!=31) // call/ret assumes no registers allocated for(hr=0;hr64) { if(!((regs[i].dirty>>hr)&1)) f_regmap[hr]=regs[i].regmap[hr]; else f_regmap[hr]=-1; } else if(regs[i].regmap[hr]>=0) { if(f_regmap[hr]!=regs[i].regmap[hr]) { // dealloc old register int n; for(n=0;n64) { if(!((branch_regs[i].dirty>>hr)&1)) f_regmap[hr]=branch_regs[i].regmap[hr]; else f_regmap[hr]=-1; } else if(branch_regs[i].regmap[hr]>=0) { if(f_regmap[hr]!=branch_regs[i].regmap[hr]) { // dealloc old register int n; for(n=0;nclean transition #ifdef DESTRUCTIVE_WRITEBACK if(t>0) if(get_reg(regmap_pre[t],f_regmap[hr])>=0) if((regs[t].wasdirty>>get_reg(regmap_pre[t],f_regmap[hr]))&1) f_regmap[hr]=-1; #endif // This check is only strictly required in the DESTRUCTIVE_WRITEBACK // case above, however it's always a good idea. We can't hoist the // load if the register was already allocated, so there's no point // wasting time analyzing most of these cases. It only "succeeds" // when the mapping was different and the load can be replaced with // a mov, which is of negligible benefit. So such cases are // skipped below. if(f_regmap[hr]>0) { if(regs[t].regmap[hr]==f_regmap[hr]||(regs[t].regmap_entry[hr]<0&&get_reg(regmap_pre[t],f_regmap[hr])<0)) { int r=f_regmap[hr]; for(j=t;j<=i;j++) { //DebugMessage(M64MSG_VERBOSE, "Test %x -> %x, %x %d/%d",start+i*4,ba[i],start+j*4,hr,r); if(r<34&&((unneeded_reg[j]>>r)&1)) break; if(r>63&&((unneeded_reg_upper[j]>>(r&63))&1)) break; if(r>63) { // NB This can exclude the case where the upper-half // register is lower numbered than the lower-half // register. Not sure if it's worth fixing... if(get_reg(regs[j].regmap,r&63)<0) break; if(get_reg(regs[j].regmap_entry,r&63)<0) break; if(regs[j].is32&(1LL<<(r&63))) break; } if(regs[j].regmap[hr]==f_regmap[hr]&&(f_regmap[hr]&63) %x, %x %d/%d",start+i*4,ba[i],start+j*4,hr,r); int k; if(regs[i].regmap[hr]==-1&&branch_regs[i].regmap[hr]==-1) { if(get_reg(regs[i+2].regmap,f_regmap[hr])>=0) break; if(r>63) { if(get_reg(regs[i].regmap,r&63)<0) break; if(get_reg(branch_regs[i].regmap,r&63)<0) break; } k=i; while(k>1&®s[k-1].regmap[hr]==-1) { if(count_free_regs(regs[k-1].regmap)<=minimum_free_regs[k-1]) { //DebugMessage(M64MSG_VERBOSE, "no free regs for store %x",start+(k-1)*4); break; } if(get_reg(regs[k-1].regmap,f_regmap[hr])>=0) { //DebugMessage(M64MSG_VERBOSE, "no-match due to different register"); break; } if(itype[k-2]==UJUMP||itype[k-2]==RJUMP||itype[k-2]==CJUMP||itype[k-2]==SJUMP||itype[k-2]==FJUMP) { //DebugMessage(M64MSG_VERBOSE, "no-match due to branch"); break; } // call/ret fast path assumes no registers allocated if(k>2&&(itype[k-3]==UJUMP||itype[k-3]==RJUMP)&&rt1[k-3]==31) { break; } if(r>63) { // NB This can exclude the case where the upper-half // register is lower numbered than the lower-half // register. Not sure if it's worth fixing... if(get_reg(regs[k-1].regmap,r&63)<0) break; if(regs[k-1].is32&(1LL<<(r&63))) break; } k--; } if(i",hr,start+k*4); while(k",hr,start+k*4); break; } assert(regs[i-1].regmap[hr]==f_regmap[hr]); if(regs[i-1].regmap[hr]==f_regmap[hr]&®map_pre[i][hr]==f_regmap[hr]) { //DebugMessage(M64MSG_VERBOSE, "OK fill %x (r%d)",start+i*4,hr); regs[i].regmap_entry[hr]=f_regmap[hr]; regs[i].regmap[hr]=f_regmap[hr]; regs[i].wasdirty&=~(1<>16)!=0x1000) { regmap_pre[i+2][hr]=f_regmap[hr]; regs[i+2].wasdirty&=~(1<>16)!=0x1000) { regmap_pre[k+2][hr]=f_regmap[hr]; regs[k+2].wasdirty&=~(1<=0) break; if(get_reg(regs[j].regmap,f_regmap[hr])>=0) { //DebugMessage(M64MSG_VERBOSE, "no-match due to different register"); break; } if((regs[j+1].is32&(1LL<>16)==0x1000) { // Stop on unconditional branch break; } if(itype[j]==CJUMP||itype[j]==SJUMP||itype[j]==FJUMP) { if(ooo[j]) { if(count_free_regs(regs[j].regmap)<=minimum_free_regs[j+1]) break; }else{ if(count_free_regs(branch_regs[j].regmap)<=minimum_free_regs[j+1]) break; } if(get_reg(branch_regs[j].regmap,f_regmap[hr])>=0) { //DebugMessage(M64MSG_VERBOSE, "no-match due to different register (branch)"); break; } } if(count_free_regs(regs[j].regmap)<=minimum_free_regs[j]) { //DebugMessage(M64MSG_VERBOSE, "No free regs for store %x",start+j*4); break; } if(f_regmap[hr]>=64) { if(regs[j].is32&(1LL<<(f_regmap[hr]&63))) { break; } else { if(get_reg(regs[j].regmap,f_regmap[hr]&63)<0) { break; } } } } } } } } }else{ // Non branch or undetermined branch target for(hr=0;hr64) { if(!((regs[i].dirty>>hr)&1)) f_regmap[hr]=regs[i].regmap[hr]; } else if(regs[i].regmap[hr]>=0) { if(f_regmap[hr]!=regs[i].regmap[hr]) { // dealloc old register int n; for(n=0;n %x",start+k*4,start+j*4); while(ki&&f_regmap[HOST_CCREG]==CCREG) { //DebugMessage(M64MSG_VERBOSE, "Extend backwards"); int k; k=i; while(regs[k-1].regmap[HOST_CCREG]==-1) { if(count_free_regs(regs[k-1].regmap)<=minimum_free_regs[k-1]) { //DebugMessage(M64MSG_VERBOSE, "no free regs for store %x",start+(k-1)*4); break; } k--; } if(regs[k-1].regmap[HOST_CCREG]==CCREG) { //DebugMessage(M64MSG_VERBOSE, "Extend CC, %x ->",start+k*4); while(k<=i) { regs[k].regmap_entry[HOST_CCREG]=CCREG; regs[k].regmap[HOST_CCREG]=CCREG; regmap_pre[k+1][HOST_CCREG]=CCREG; regs[k+1].wasdirty|=1<",start+k*4); } } } if(itype[i]!=STORE&&itype[i]!=STORELR&&itype[i]!=C1LS&&itype[i]!=SHIFT&& itype[i]!=NOP&&itype[i]!=MOV&&itype[i]!=ALU&&itype[i]!=SHIFTIMM&& itype[i]!=IMM16&&itype[i]!=LOAD&&itype[i]!=COP1&&itype[i]!=FLOAT&& itype[i]!=FCONV&&itype[i]!=FCOMP) { memcpy(f_regmap,regs[i].regmap,sizeof(f_regmap)); } } } // Cache memory offset or tlb map pointer if a register is available #ifndef HOST_IMM_ADDR32 #ifndef RAM_OFFSET if(using_tlb) #endif { int earliest_available[HOST_REGS]; int loop_start[HOST_REGS]; int score[HOST_REGS]; int end[HOST_REGS]; int reg=using_tlb?MMREG:ROREG; // Init for(hr=0;hr=0) { score[hr]=0;earliest_available[hr]=i+1; loop_start[hr]=MAXBLOCK; } if(itype[i]==UJUMP||itype[i]==RJUMP||itype[i]==CJUMP||itype[i]==SJUMP||itype[i]==FJUMP) { if(branch_regs[i].regmap[hr]>=0) { score[hr]=0;earliest_available[hr]=i+2; loop_start[hr]=MAXBLOCK; } } } // No register allocations after unconditional jumps if(itype[i]==UJUMP||itype[i]==RJUMP||(source[i]>>16)==0x1000) { for(hr=0;hr=0) break; if(itype[j]==UJUMP||itype[j]==RJUMP||itype[j]==CJUMP||itype[j]==SJUMP||itype[j]==FJUMP) { if(branch_regs[j].regmap[hr]>=0) break; if(ooo[j]) { if(count_free_regs(regs[j].regmap)<=minimum_free_regs[j+1]) break; }else{ if(count_free_regs(branch_regs[j].regmap)<=minimum_free_regs[j+1]) break; } } else if(count_free_regs(regs[j].regmap)<=minimum_free_regs[j]) break; if(itype[j]==UJUMP||itype[j]==RJUMP||itype[j]==CJUMP||itype[j]==SJUMP||itype[j]==FJUMP) { int t=(ba[j]-start)>>2; if(t=earliest_available[hr]) { if(t==1||(t>1&&itype[t-2]!=UJUMP&&itype[t-2]!=RJUMP)||(t>1&&rt1[t-2]!=31)) { // call/ret assumes no registers allocated // Score a point for hoisting loop invariant if(t>16)==0x1000) { // Stop on unconditional branch break; } else if(itype[j]==LOAD||itype[j]==LOADLR|| itype[j]==STORE||itype[j]==STORELR||itype[j]==C1LS) { score[hr]++; end[hr]=j; } } } } // Find highest score and allocate that register int maxscore=0; for(hr=0;hrscore[maxscore]) { maxscore=hr; //DebugMessage(M64MSG_VERBOSE, "highest score: %d %d (%x->%x)",score[hr],hr,start+i*4,start+end[hr]*4); } } } if(score[maxscore]>1) { if(i=0) {DebugMessage(M64MSG_ERROR, "oops: %x %x was %d=%d",loop_start[maxscore]*4+start,j*4+start,maxscore,regs[j].regmap[maxscore]);} assert(regs[j].regmap[maxscore]<0); if(j>loop_start[maxscore]) regs[j].regmap_entry[maxscore]=reg; regs[j].regmap[maxscore]=reg; regs[j].dirty&=~(1<>16)!=0x1000) { regmap_pre[j+2][maxscore]=reg; regs[j+2].wasdirty&=~(1<>2; if(t==loop_start[maxscore]) { if(t==1||(t>1&&itype[t-2]!=UJUMP&&itype[t-2]!=RJUMP)||(t>1&&rt1[t-2]!=31)) // call/ret assumes no registers allocated regs[t].regmap_entry[maxscore]=reg; } } else { if(j<1||(itype[j-1]!=RJUMP&&itype[j-1]!=UJUMP&&itype[j-1]!=CJUMP&&itype[j-1]!=SJUMP&&itype[j-1]!=FJUMP)) { regmap_pre[j+1][maxscore]=reg; regs[j+1].wasdirty&=~(1<=0) { if(regs[i].regmap[hr]<0&®s[i+1].regmap_entry[hr]<0) { regs[i].regmap[hr]=regs[i+1].regmap[hr]; regmap_pre[i+1][hr]=regs[i+1].regmap[hr]; regs[i+1].regmap_entry[hr]=regs[i+1].regmap[hr]; regs[i].isconst&=~(1<=0) { if(regs[i].regmap[hr]<0&®s[i+1].regmap_entry[hr]<0) { regs[i].regmap[hr]=regs[i+1].regmap[hr]; regmap_pre[i+1][hr]=regs[i+1].regmap[hr]; regs[i+1].regmap_entry[hr]=regs[i+1].regmap[hr]; regs[i].isconst&=~(1<=0) { if(regs[i].regmap[hr]<0&®s[i+1].regmap_entry[hr]<0) { regs[i].regmap[hr]=rs1[i+1]; regmap_pre[i+1][hr]=rs1[i+1]; regs[i+1].regmap_entry[hr]=rs1[i+1]; regs[i].isconst&=~(1<=0) { if(regs[i].regmap[hr]<0&®s[i+1].regmap_entry[hr]<0) { regs[i].regmap[hr]=rs1[i+1]; regmap_pre[i+1][hr]=rs1[i+1]; regs[i+1].regmap_entry[hr]=rs1[i+1]; regs[i].isconst&=~(1<=0) { int sr=get_reg(regs[i+1].regmap,rs1[i+1]); if(sr>=0&&((regs[i+1].wasconst>>sr)&1)) { int nr; if(regs[i].regmap[hr]<0&®s[i+1].regmap_entry[hr]<0) { regs[i].regmap[hr]=MGEN1+((i+1)&1); regmap_pre[i+1][hr]=MGEN1+((i+1)&1); regs[i+1].regmap_entry[hr]=MGEN1+((i+1)&1); regs[i].isconst&=~(1<=0) { // move it to another register regs[i+1].regmap[hr]=-1; regmap_pre[i+2][hr]=-1; regs[i+1].regmap[nr]=TLREG; regmap_pre[i+2][nr]=TLREG; regs[i].regmap[nr]=MGEN1+((i+1)&1); regmap_pre[i+1][nr]=MGEN1+((i+1)&1); regs[i+1].regmap_entry[nr]=MGEN1+((i+1)&1); regs[i].isconst&=~(1<=0); if(regs[i].regmap[hr]<0&®s[i+1].regmap_entry[hr]<0) { regs[i].regmap[hr]=rs1[i+1]; regmap_pre[i+1][hr]=rs1[i+1]; regs[i+1].regmap_entry[hr]=rs1[i+1]; regs[i].isconst&=~(1<=0); if(regs[i].regmap[hr]<0&®s[i+1].regmap_entry[hr]<0) { regs[i].regmap[hr]=rs1[i+1]; regmap_pre[i+1][hr]=rs1[i+1]; regs[i+1].regmap_entry[hr]=rs1[i+1]; regs[i].isconst&=~(1<=0) { // move it to another register regs[i+1].regmap[hr]=-1; regmap_pre[i+2][hr]=-1; regs[i+1].regmap[nr]=FTEMP; regmap_pre[i+2][nr]=FTEMP; regs[i].regmap[nr]=rs1[i+1]; regmap_pre[i+1][nr]=rs1[i+1]; regs[i+1].regmap_entry[nr]=rs1[i+1]; regs[i].isconst&=~(1<=0&®s[i].regmap[hr]<0) { int rs=get_reg(regs[i+1].regmap,rs1[i+1]); if(rs>=0&&((regs[i+1].wasconst>>rs)&1)) { regs[i].regmap[hr]=AGEN1+((i+1)&1); regmap_pre[i+1][hr]=AGEN1+((i+1)&1); regs[i+1].regmap_entry[hr]=AGEN1+((i+1)&1); regs[i].isconst&=~(1<=0;i--) { int hr; if(itype[i]==RJUMP||itype[i]==UJUMP||itype[i]==CJUMP||itype[i]==SJUMP||itype[i]==FJUMP) { if(ba[i]=(start+slen*4)) { // Branch out of this block, don't need anything r32=0; } else { // Internal branch // Need whatever matches the target // (and doesn't get overwritten by the delay slot instruction) r32=0; int t=(ba[i]-start)>>2; if(ba[i]>start+i*4) { // Forward branch if(!(requires_32bit[t]&~regs[i].was32)) r32|=requires_32bit[t]&(~(1LL<>16)!=0x1000) { if(i0) { if((regs[i].was32>>us1[i+1])&1) r32|=1LL<0) { if((regs[i].was32>>us2[i+1])&1) r32|=1LL<>dep1[i+1])&1)) { if((regs[i].was32>>dep1[i+1])&1) r32|=1LL<>dep2[i+1])&1)) { if((regs[i].was32>>dep2[i+1])&1) r32|=1LL<0) { if((regs[i].was32>>us1[i])&1) r32|=1LL<0) { if((regs[i].was32>>us2[i])&1) r32|=1LL<>dep1[i])&1)) { if((regs[i].was32>>dep1[i])&1) r32|=1LL<>dep2[i])&1)) { if((regs[i].was32>>dep2[i])&1) r32|=1LL<0&®s[i].regmap_entry[hr]<64) { if((regs[i].was32>>regs[i].regmap_entry[hr])&(regs[i].wasdirty>>hr)&1) { if(!((unneeded_reg_upper[i]>>regs[i].regmap_entry[hr])&1)) requires_32bit[i]|=1LL<>r)&1) { if(r==HIREG) DebugMessage(M64MSG_VERBOSE, " HI"); else if(r==LOREG) DebugMessage(M64MSG_VERBOSE, " LO"); else DebugMessage(M64MSG_VERBOSE, " r%d",r); } } DebugMessage(M64MSG_VERBOSE, " UU:"); for(r=1;r<=CCREG;r++) { if(((unneeded_reg_upper[i]&~unneeded_reg[i])>>r)&1) { if(r==HIREG) DebugMessage(M64MSG_VERBOSE, " HI"); else if(r==LOREG) DebugMessage(M64MSG_VERBOSE, " LO"); else DebugMessage(M64MSG_VERBOSE, " r%d",r); } } DebugMessage(M64MSG_VERBOSE, " 32:"); for(r=0;r<=CCREG;r++) { //if(((is32[i]>>r)&(~unneeded_reg[i]>>r))&1) { if((regs[i].was32>>r)&1) { if(r==CCREG) DebugMessage(M64MSG_VERBOSE, " CC"); else if(r==HIREG) DebugMessage(M64MSG_VERBOSE, " HI"); else if(r==LOREG) DebugMessage(M64MSG_VERBOSE, " LO"); else DebugMessage(M64MSG_VERBOSE, " r%d",r); } } #if NEW_DYNAREC == NEW_DYNAREC_X86 DebugMessage(M64MSG_VERBOSE, "pre: eax=%d ecx=%d edx=%d ebx=%d ebp=%d esi=%d edi=%d",regmap_pre[i][0],regmap_pre[i][1],regmap_pre[i][2],regmap_pre[i][3],regmap_pre[i][5],regmap_pre[i][6],regmap_pre[i][7]); #endif #if NEW_DYNAREC == NEW_DYNAREC_ARM DebugMessage(M64MSG_VERBOSE, "pre: r0=%d r1=%d r2=%d r3=%d r4=%d r5=%d r6=%d r7=%d r8=%d r9=%d r10=%d r12=%d",regmap_pre[i][0],regmap_pre[i][1],regmap_pre[i][2],regmap_pre[i][3],regmap_pre[i][4],regmap_pre[i][5],regmap_pre[i][6],regmap_pre[i][7],regmap_pre[i][8],regmap_pre[i][9],regmap_pre[i][10],regmap_pre[i][12]); #endif DebugMessage(M64MSG_VERBOSE, "needs: "); if(needed_reg[i]&1) DebugMessage(M64MSG_VERBOSE, "eax "); if((needed_reg[i]>>1)&1) DebugMessage(M64MSG_VERBOSE, "ecx "); if((needed_reg[i]>>2)&1) DebugMessage(M64MSG_VERBOSE, "edx "); if((needed_reg[i]>>3)&1) DebugMessage(M64MSG_VERBOSE, "ebx "); if((needed_reg[i]>>5)&1) DebugMessage(M64MSG_VERBOSE, "ebp "); if((needed_reg[i]>>6)&1) DebugMessage(M64MSG_VERBOSE, "esi "); if((needed_reg[i]>>7)&1) DebugMessage(M64MSG_VERBOSE, "edi "); DebugMessage(M64MSG_VERBOSE, "r:"); for(r=0;r<=CCREG;r++) { //if(((requires_32bit[i]>>r)&(~unneeded_reg[i]>>r))&1) { if((requires_32bit[i]>>r)&1) { if(r==CCREG) DebugMessage(M64MSG_VERBOSE, " CC"); else if(r==HIREG) DebugMessage(M64MSG_VERBOSE, " HI"); else if(r==LOREG) DebugMessage(M64MSG_VERBOSE, " LO"); else DebugMessage(M64MSG_VERBOSE, " r%d",r); } } /*DebugMessage(M64MSG_VERBOSE, "pr:"); for(r=0;r<=CCREG;r++) { //if(((requires_32bit[i]>>r)&(~unneeded_reg[i]>>r))&1) { if((pr32[i]>>r)&1) { if(r==CCREG) DebugMessage(M64MSG_VERBOSE, " CC"); else if(r==HIREG) DebugMessage(M64MSG_VERBOSE, " HI"); else if(r==LOREG) DebugMessage(M64MSG_VERBOSE, " LO"); else DebugMessage(M64MSG_VERBOSE, " r%d",r); } } if(pr32[i]!=requires_32bit[i]) DebugMessage(M64MSG_ERROR, " OOPS");*/ #if NEW_DYNAREC == NEW_DYNAREC_X86 DebugMessage(M64MSG_VERBOSE, "entry: eax=%d ecx=%d edx=%d ebx=%d ebp=%d esi=%d edi=%d",regs[i].regmap_entry[0],regs[i].regmap_entry[1],regs[i].regmap_entry[2],regs[i].regmap_entry[3],regs[i].regmap_entry[5],regs[i].regmap_entry[6],regs[i].regmap_entry[7]); DebugMessage(M64MSG_VERBOSE, "dirty: "); if(regs[i].wasdirty&1) DebugMessage(M64MSG_VERBOSE, "eax "); if((regs[i].wasdirty>>1)&1) DebugMessage(M64MSG_VERBOSE, "ecx "); if((regs[i].wasdirty>>2)&1) DebugMessage(M64MSG_VERBOSE, "edx "); if((regs[i].wasdirty>>3)&1) DebugMessage(M64MSG_VERBOSE, "ebx "); if((regs[i].wasdirty>>5)&1) DebugMessage(M64MSG_VERBOSE, "ebp "); if((regs[i].wasdirty>>6)&1) DebugMessage(M64MSG_VERBOSE, "esi "); if((regs[i].wasdirty>>7)&1) DebugMessage(M64MSG_VERBOSE, "edi "); #endif #if NEW_DYNAREC == NEW_DYNAREC_ARM DebugMessage(M64MSG_VERBOSE, "entry: r0=%d r1=%d r2=%d r3=%d r4=%d r5=%d r6=%d r7=%d r8=%d r9=%d r10=%d r12=%d",regs[i].regmap_entry[0],regs[i].regmap_entry[1],regs[i].regmap_entry[2],regs[i].regmap_entry[3],regs[i].regmap_entry[4],regs[i].regmap_entry[5],regs[i].regmap_entry[6],regs[i].regmap_entry[7],regs[i].regmap_entry[8],regs[i].regmap_entry[9],regs[i].regmap_entry[10],regs[i].regmap_entry[12]); DebugMessage(M64MSG_VERBOSE, "dirty: "); if(regs[i].wasdirty&1) DebugMessage(M64MSG_VERBOSE, "r0 "); if((regs[i].wasdirty>>1)&1) DebugMessage(M64MSG_VERBOSE, "r1 "); if((regs[i].wasdirty>>2)&1) DebugMessage(M64MSG_VERBOSE, "r2 "); if((regs[i].wasdirty>>3)&1) DebugMessage(M64MSG_VERBOSE, "r3 "); if((regs[i].wasdirty>>4)&1) DebugMessage(M64MSG_VERBOSE, "r4 "); if((regs[i].wasdirty>>5)&1) DebugMessage(M64MSG_VERBOSE, "r5 "); if((regs[i].wasdirty>>6)&1) DebugMessage(M64MSG_VERBOSE, "r6 "); if((regs[i].wasdirty>>7)&1) DebugMessage(M64MSG_VERBOSE, "r7 "); if((regs[i].wasdirty>>8)&1) DebugMessage(M64MSG_VERBOSE, "r8 "); if((regs[i].wasdirty>>9)&1) DebugMessage(M64MSG_VERBOSE, "r9 "); if((regs[i].wasdirty>>10)&1) DebugMessage(M64MSG_VERBOSE, "r10 "); if((regs[i].wasdirty>>12)&1) DebugMessage(M64MSG_VERBOSE, "r12 "); #endif disassemble_inst(i); //printf ("ccadj[%d] = %d",i,ccadj[i]); #if NEW_DYNAREC == NEW_DYNAREC_X86 DebugMessage(M64MSG_VERBOSE, "eax=%d ecx=%d edx=%d ebx=%d ebp=%d esi=%d edi=%d dirty: ",regs[i].regmap[0],regs[i].regmap[1],regs[i].regmap[2],regs[i].regmap[3],regs[i].regmap[5],regs[i].regmap[6],regs[i].regmap[7]); if(regs[i].dirty&1) DebugMessage(M64MSG_VERBOSE, "eax "); if((regs[i].dirty>>1)&1) DebugMessage(M64MSG_VERBOSE, "ecx "); if((regs[i].dirty>>2)&1) DebugMessage(M64MSG_VERBOSE, "edx "); if((regs[i].dirty>>3)&1) DebugMessage(M64MSG_VERBOSE, "ebx "); if((regs[i].dirty>>5)&1) DebugMessage(M64MSG_VERBOSE, "ebp "); if((regs[i].dirty>>6)&1) DebugMessage(M64MSG_VERBOSE, "esi "); if((regs[i].dirty>>7)&1) DebugMessage(M64MSG_VERBOSE, "edi "); #endif #if NEW_DYNAREC == NEW_DYNAREC_ARM DebugMessage(M64MSG_VERBOSE, "r0=%d r1=%d r2=%d r3=%d r4=%d r5=%d r6=%d r7=%d r8=%d r9=%d r10=%d r12=%d dirty: ",regs[i].regmap[0],regs[i].regmap[1],regs[i].regmap[2],regs[i].regmap[3],regs[i].regmap[4],regs[i].regmap[5],regs[i].regmap[6],regs[i].regmap[7],regs[i].regmap[8],regs[i].regmap[9],regs[i].regmap[10],regs[i].regmap[12]); if(regs[i].dirty&1) DebugMessage(M64MSG_VERBOSE, "r0 "); if((regs[i].dirty>>1)&1) DebugMessage(M64MSG_VERBOSE, "r1 "); if((regs[i].dirty>>2)&1) DebugMessage(M64MSG_VERBOSE, "r2 "); if((regs[i].dirty>>3)&1) DebugMessage(M64MSG_VERBOSE, "r3 "); if((regs[i].dirty>>4)&1) DebugMessage(M64MSG_VERBOSE, "r4 "); if((regs[i].dirty>>5)&1) DebugMessage(M64MSG_VERBOSE, "r5 "); if((regs[i].dirty>>6)&1) DebugMessage(M64MSG_VERBOSE, "r6 "); if((regs[i].dirty>>7)&1) DebugMessage(M64MSG_VERBOSE, "r7 "); if((regs[i].dirty>>8)&1) DebugMessage(M64MSG_VERBOSE, "r8 "); if((regs[i].dirty>>9)&1) DebugMessage(M64MSG_VERBOSE, "r9 "); if((regs[i].dirty>>10)&1) DebugMessage(M64MSG_VERBOSE, "r10 "); if((regs[i].dirty>>12)&1) DebugMessage(M64MSG_VERBOSE, "r12 "); #endif if(regs[i].isconst) { DebugMessage(M64MSG_VERBOSE, "constants: "); #if NEW_DYNAREC == NEW_DYNAREC_X86 if(regs[i].isconst&1) DebugMessage(M64MSG_VERBOSE, "eax=%x ",(int)constmap[i][0]); if((regs[i].isconst>>1)&1) DebugMessage(M64MSG_VERBOSE, "ecx=%x ",(int)constmap[i][1]); if((regs[i].isconst>>2)&1) DebugMessage(M64MSG_VERBOSE, "edx=%x ",(int)constmap[i][2]); if((regs[i].isconst>>3)&1) DebugMessage(M64MSG_VERBOSE, "ebx=%x ",(int)constmap[i][3]); if((regs[i].isconst>>5)&1) DebugMessage(M64MSG_VERBOSE, "ebp=%x ",(int)constmap[i][5]); if((regs[i].isconst>>6)&1) DebugMessage(M64MSG_VERBOSE, "esi=%x ",(int)constmap[i][6]); if((regs[i].isconst>>7)&1) DebugMessage(M64MSG_VERBOSE, "edi=%x ",(int)constmap[i][7]); #endif #if NEW_DYNAREC == NEW_DYNAREC_ARM if(regs[i].isconst&1) DebugMessage(M64MSG_VERBOSE, "r0=%x ",(int)constmap[i][0]); if((regs[i].isconst>>1)&1) DebugMessage(M64MSG_VERBOSE, "r1=%x ",(int)constmap[i][1]); if((regs[i].isconst>>2)&1) DebugMessage(M64MSG_VERBOSE, "r2=%x ",(int)constmap[i][2]); if((regs[i].isconst>>3)&1) DebugMessage(M64MSG_VERBOSE, "r3=%x ",(int)constmap[i][3]); if((regs[i].isconst>>4)&1) DebugMessage(M64MSG_VERBOSE, "r4=%x ",(int)constmap[i][4]); if((regs[i].isconst>>5)&1) DebugMessage(M64MSG_VERBOSE, "r5=%x ",(int)constmap[i][5]); if((regs[i].isconst>>6)&1) DebugMessage(M64MSG_VERBOSE, "r6=%x ",(int)constmap[i][6]); if((regs[i].isconst>>7)&1) DebugMessage(M64MSG_VERBOSE, "r7=%x ",(int)constmap[i][7]); if((regs[i].isconst>>8)&1) DebugMessage(M64MSG_VERBOSE, "r8=%x ",(int)constmap[i][8]); if((regs[i].isconst>>9)&1) DebugMessage(M64MSG_VERBOSE, "r9=%x ",(int)constmap[i][9]); if((regs[i].isconst>>10)&1) DebugMessage(M64MSG_VERBOSE, "r10=%x ",(int)constmap[i][10]); if((regs[i].isconst>>12)&1) DebugMessage(M64MSG_VERBOSE, "r12=%x ",(int)constmap[i][12]); #endif } DebugMessage(M64MSG_VERBOSE, " 32:"); for(r=0;r<=CCREG;r++) { if((regs[i].is32>>r)&1) { if(r==CCREG) DebugMessage(M64MSG_VERBOSE, " CC"); else if(r==HIREG) DebugMessage(M64MSG_VERBOSE, " HI"); else if(r==LOREG) DebugMessage(M64MSG_VERBOSE, " LO"); else DebugMessage(M64MSG_VERBOSE, " r%d",r); } } /*DebugMessage(M64MSG_VERBOSE, " p32:"); for(r=0;r<=CCREG;r++) { if((p32[i]>>r)&1) { if(r==CCREG) DebugMessage(M64MSG_VERBOSE, " CC"); else if(r==HIREG) DebugMessage(M64MSG_VERBOSE, " HI"); else if(r==LOREG) DebugMessage(M64MSG_VERBOSE, " LO"); else DebugMessage(M64MSG_VERBOSE, " r%d",r); } } if(p32[i]!=regs[i].is32) DebugMessage(M64MSG_VERBOSE, " NO MATCH");*/ if(itype[i]==RJUMP||itype[i]==UJUMP||itype[i]==CJUMP||itype[i]==SJUMP||itype[i]==FJUMP) { #if NEW_DYNAREC == NEW_DYNAREC_X86 DebugMessage(M64MSG_VERBOSE, "branch(%d): eax=%d ecx=%d edx=%d ebx=%d ebp=%d esi=%d edi=%d dirty: ",i,branch_regs[i].regmap[0],branch_regs[i].regmap[1],branch_regs[i].regmap[2],branch_regs[i].regmap[3],branch_regs[i].regmap[5],branch_regs[i].regmap[6],branch_regs[i].regmap[7]); if(branch_regs[i].dirty&1) DebugMessage(M64MSG_VERBOSE, "eax "); if((branch_regs[i].dirty>>1)&1) DebugMessage(M64MSG_VERBOSE, "ecx "); if((branch_regs[i].dirty>>2)&1) DebugMessage(M64MSG_VERBOSE, "edx "); if((branch_regs[i].dirty>>3)&1) DebugMessage(M64MSG_VERBOSE, "ebx "); if((branch_regs[i].dirty>>5)&1) DebugMessage(M64MSG_VERBOSE, "ebp "); if((branch_regs[i].dirty>>6)&1) DebugMessage(M64MSG_VERBOSE, "esi "); if((branch_regs[i].dirty>>7)&1) DebugMessage(M64MSG_VERBOSE, "edi "); #endif #if NEW_DYNAREC == NEW_DYNAREC_ARM DebugMessage(M64MSG_VERBOSE, "branch(%d): r0=%d r1=%d r2=%d r3=%d r4=%d r5=%d r6=%d r7=%d r8=%d r9=%d r10=%d r12=%d dirty: ",i,branch_regs[i].regmap[0],branch_regs[i].regmap[1],branch_regs[i].regmap[2],branch_regs[i].regmap[3],branch_regs[i].regmap[4],branch_regs[i].regmap[5],branch_regs[i].regmap[6],branch_regs[i].regmap[7],branch_regs[i].regmap[8],branch_regs[i].regmap[9],branch_regs[i].regmap[10],branch_regs[i].regmap[12]); if(branch_regs[i].dirty&1) DebugMessage(M64MSG_VERBOSE, "r0 "); if((branch_regs[i].dirty>>1)&1) DebugMessage(M64MSG_VERBOSE, "r1 "); if((branch_regs[i].dirty>>2)&1) DebugMessage(M64MSG_VERBOSE, "r2 "); if((branch_regs[i].dirty>>3)&1) DebugMessage(M64MSG_VERBOSE, "r3 "); if((branch_regs[i].dirty>>4)&1) DebugMessage(M64MSG_VERBOSE, "r4 "); if((branch_regs[i].dirty>>5)&1) DebugMessage(M64MSG_VERBOSE, "r5 "); if((branch_regs[i].dirty>>6)&1) DebugMessage(M64MSG_VERBOSE, "r6 "); if((branch_regs[i].dirty>>7)&1) DebugMessage(M64MSG_VERBOSE, "r7 "); if((branch_regs[i].dirty>>8)&1) DebugMessage(M64MSG_VERBOSE, "r8 "); if((branch_regs[i].dirty>>9)&1) DebugMessage(M64MSG_VERBOSE, "r9 "); if((branch_regs[i].dirty>>10)&1) DebugMessage(M64MSG_VERBOSE, "r10 "); if((branch_regs[i].dirty>>12)&1) DebugMessage(M64MSG_VERBOSE, "r12 "); #endif DebugMessage(M64MSG_VERBOSE, " 32:"); for(r=0;r<=CCREG;r++) { if((branch_regs[i].is32>>r)&1) { if(r==CCREG) DebugMessage(M64MSG_VERBOSE, " CC"); else if(r==HIREG) DebugMessage(M64MSG_VERBOSE, " HI"); else if(r==LOREG) DebugMessage(M64MSG_VERBOSE, " LO"); else DebugMessage(M64MSG_VERBOSE, " r%d",r); } } } } #endif /* Pass 8 - Assembly */ linkcount=0;stubcount=0; ds=0;is_delayslot=0; cop1_usable=0; #ifndef DESTRUCTIVE_WRITEBACK uint64_t is32_pre=0; u_int dirty_pre=0; #endif u_int beginning=(u_int)out; if((u_int)addr&1) { ds=1; pagespan_ds(); } for(i=0;i>16)!=0x1000)) { wb_sx(regmap_pre[i],regs[i].regmap_entry,regs[i].wasdirty,is32_pre,regs[i].was32, unneeded_reg[i],unneeded_reg_upper[i]); wb_valid(regmap_pre[i],regs[i].regmap_entry,dirty_pre,regs[i].wasdirty,is32_pre, unneeded_reg[i],unneeded_reg_upper[i]); } is32_pre=regs[i].is32; dirty_pre=regs[i].dirty; #endif // write back if(i<2||(itype[i-2]!=UJUMP&&itype[i-2]!=RJUMP&&(source[i-2]>>16)!=0x1000)) { wb_invalidate(regmap_pre[i],regs[i].regmap_entry,regs[i].wasdirty,regs[i].was32, unneeded_reg[i],unneeded_reg_upper[i]); loop_preload(regmap_pre[i],regs[i].regmap_entry); } // branch target entry point instr_addr[i]=(u_int)out; assem_debug("<->"); // load regs if(regs[i].regmap_entry[HOST_CCREG]==CCREG&®s[i].regmap[HOST_CCREG]!=CCREG) wb_register(CCREG,regs[i].regmap_entry,regs[i].wasdirty,regs[i].was32); load_regs(regs[i].regmap_entry,regs[i].regmap,regs[i].was32,rs1[i],rs2[i]); address_generation(i,®s[i],regs[i].regmap_entry); load_consts(regmap_pre[i],regs[i].regmap,regs[i].was32,i); if(itype[i]==RJUMP||itype[i]==UJUMP||itype[i]==CJUMP||itype[i]==SJUMP||itype[i]==FJUMP) { // Load the delay slot registers if necessary if(rs1[i+1]!=rs1[i]&&rs1[i+1]!=rs2[i]) load_regs(regs[i].regmap_entry,regs[i].regmap,regs[i].was32,rs1[i+1],rs1[i+1]); if(rs2[i+1]!=rs1[i+1]&&rs2[i+1]!=rs1[i]&&rs2[i+1]!=rs2[i]) load_regs(regs[i].regmap_entry,regs[i].regmap,regs[i].was32,rs2[i+1],rs2[i+1]); if(itype[i+1]==STORE||itype[i+1]==STORELR||(opcode[i+1]&0x3b)==0x39) load_regs(regs[i].regmap_entry,regs[i].regmap,regs[i].was32,INVCP,INVCP); } else if(i+1>16)==0x1000) literal_pool(1024); else literal_pool_jumpover(256); } } //assert(itype[i-2]==UJUMP||itype[i-2]==RJUMP||(source[i-2]>>16)==0x1000); // If the block did not end with an unconditional branch, // add a jump to the next instruction. if(i>1) { if(itype[i-2]!=UJUMP&&itype[i-2]!=RJUMP&&(source[i-2]>>16)!=0x1000&&itype[i-1]!=SPAN) { assert(itype[i-1]!=UJUMP&&itype[i-1]!=CJUMP&&itype[i-1]!=SJUMP&&itype[i-1]!=RJUMP&&itype[i-1]!=FJUMP); assert(i==slen); if(itype[i-2]!=CJUMP&&itype[i-2]!=SJUMP&&itype[i-2]!=FJUMP) { store_regs_bt(regs[i-1].regmap,regs[i-1].is32,regs[i-1].dirty,start+i*4); if(regs[i-1].regmap[HOST_CCREG]!=CCREG) emit_loadreg(CCREG,HOST_CCREG); emit_addimm(HOST_CCREG,CLOCK_DIVIDER*(ccadj[i-1]+1),HOST_CCREG); } else if(!likely[i-2]) { store_regs_bt(branch_regs[i-2].regmap,branch_regs[i-2].is32,branch_regs[i-2].dirty,start+i*4); assert(branch_regs[i-2].regmap[HOST_CCREG]==CCREG); } else { store_regs_bt(regs[i-2].regmap,regs[i-2].is32,regs[i-2].dirty,start+i*4); assert(regs[i-2].regmap[HOST_CCREG]==CCREG); } add_to_linker((int)out,start+i*4,0); emit_jmp(0); } } else { assert(i>0); assert(itype[i-1]!=UJUMP&&itype[i-1]!=CJUMP&&itype[i-1]!=SJUMP&&itype[i-1]!=RJUMP&&itype[i-1]!=FJUMP); store_regs_bt(regs[i-1].regmap,regs[i-1].is32,regs[i-1].dirty,start+i*4); if(regs[i-1].regmap[HOST_CCREG]!=CCREG) emit_loadreg(CCREG,HOST_CCREG); emit_addimm(HOST_CCREG,CLOCK_DIVIDER*(ccadj[i-1]+1),HOST_CCREG); add_to_linker((int)out,start+i*4,0); emit_jmp(0); } // TODO: delay slot stubs? // Stubs for(i=0;i %8x",link_addr[i][0],link_addr[i][1]); literal_pool(64); if(!link_addr[i][2]) { void *stub=out; void *addr=check_addr(link_addr[i][1]); emit_extjump(link_addr[i][0],link_addr[i][1]); if(addr) { set_jump_target(link_addr[i][0],(int)addr); add_link(link_addr[i][1],stub); } else set_jump_target(link_addr[i][0],(int)stub); } else { // Internal branch int target=(link_addr[i][1]-start)>>2; assert(target>=0&&target>1); //#else set_jump_target(link_addr[i][0],instr_addr[target]); //#endif } } // External Branch Targets (jump_in) if(copy+slen*4>shadow+sizeof(shadow)) copy=shadow; for(i=0;i>12; u_int vpage=page; if(page>262143&&tlb_LUT_r[vaddr>>12]) page=(tlb_LUT_r[page^0x80000]^0x80000000)>>12; if(page>2048) page=2048+(page&2047); if(vpage>262143&&tlb_LUT_r[vaddr>>12]) vpage&=2047; // jump_dirty uses a hash of the virtual address instead if(vpage>2048) vpage=2048+(vpage&2047); literal_pool(256); //if(!(is32[i]&(~unneeded_reg_upper[i])&~(1LL<>16)^vaddr)&0xFFFF]; if(ht_bin[0]==vaddr) { ht_bin[1]=entry_point; } if(ht_bin[2]==vaddr) { ht_bin[3]=entry_point; } } else { u_int r=requires_32bit[i]|!!(requires_32bit[i]>>32); assem_debug("%8x (%d) <- %8x",instr_addr[i],i,start+i*4); assem_debug("jump_in: %x (restricted - %x)",start+i*4,r); //int entry_point=(int)out; ////assem_debug("entry_point: %x",entry_point); //load_regs_entry(i); //if(entry_point==(int)out) // entry_point=instr_addr[i]; //else // emit_jmp(instr_addr[i]); //ll_add_32(jump_in+page,vaddr,r,(void *)entry_point); ll_add_32(jump_dirty+vpage,vaddr,r,(void *)out); int entry_point=do_dirty_stub(i); ll_add_32(jump_in+page,vaddr,r,(void *)entry_point); } } } } // Write out the literal pool if necessary literal_pool(0); #ifdef CORTEX_A8_BRANCH_PREDICTION_HACK // Align code if(((u_int)out)&7) emit_addnop(13); #endif assert((u_int)out-beginning (u_char *)((u_char *)base_addr+(1<>12;i<=(int)((start+slen*4)>>12);i++) { invalid_code[i]=0; memory_map[i]|=0x40000000; if((signed int)start>=(signed int)0xC0000000) { assert(using_tlb); j=(((u_int)i<<12)+(memory_map[i]<<2)-(u_int)g_rdram+(u_int)0x80000000)>>12; invalid_code[j]=0; memory_map[j]|=0x40000000; //DebugMessage(M64MSG_VERBOSE, "write protect physical page: %x (virtual %x)",j<<12,start); } } /* Pass 10 - Free memory by expiring oldest blocks */ int end=((((intptr_t)out-(intptr_t)base_addr)>>(TARGET_SIZE_2-16))+16384)&65535; while(expirep!=end) { int shift=TARGET_SIZE_2-3; // Divide into 8 blocks int base=(int)base_addr+((expirep>>13)<>11)&3) { case 0: // Clear jump_in and jump_dirty ll_remove_matching_addrs(jump_in+(expirep&2047),base,shift); ll_remove_matching_addrs(jump_dirty+(expirep&2047),base,shift); ll_remove_matching_addrs(jump_in+2048+(expirep&2047),base,shift); ll_remove_matching_addrs(jump_dirty+2048+(expirep&2047),base,shift); break; case 1: // Clear pointers ll_kill_pointers(jump_out[expirep&2047],base,shift); ll_kill_pointers(jump_out[(expirep&2047)+2048],base,shift); break; case 2: // Clear hash table for(i=0;i<32;i++) { u_int *ht_bin=hash_table[((expirep&2047)<<5)+i]; if(((ht_bin[3]-(u_int)base_addr)>>shift)==((base-(u_int)base_addr)>>shift) || ((ht_bin[3]-(u_int)base_addr-MAX_OUTPUT_BLOCK_SIZE)>>shift)==((base-(u_int)base_addr)>>shift)) { inv_debug("EXP: Remove hash %x -> %x\n",ht_bin[2],ht_bin[3]); ht_bin[2]=ht_bin[3]=-1; } if(((ht_bin[1]-(u_int)base_addr)>>shift)==((base-(u_int)base_addr)>>shift) || ((ht_bin[1]-(u_int)base_addr-MAX_OUTPUT_BLOCK_SIZE)>>shift)==((base-(u_int)base_addr)>>shift)) { inv_debug("EXP: Remove hash %x -> %x\n",ht_bin[0],ht_bin[1]); ht_bin[0]=ht_bin[2]; ht_bin[1]=ht_bin[3]; ht_bin[2]=ht_bin[3]=-1; } } break; case 3: // Clear jump_out #if NEW_DYNAREC == NEW_DYNAREC_ARM if((expirep&2047)==0) do_clear_cache(); #endif ll_remove_matching_addrs(jump_out+(expirep&2047),base,shift); ll_remove_matching_addrs(jump_out+2048+(expirep&2047),base,shift); break; } expirep=(expirep+1)&65535; } return 0; } void TLBWI_new(void) { unsigned int i; /* Remove old entries */ unsigned int old_start_even=tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].start_even; unsigned int old_end_even=tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].end_even; unsigned int old_start_odd=tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].start_odd; unsigned int old_end_odd=tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].end_odd; for (i=old_start_even>>12; i<=old_end_even>>12; i++) { if(i<0x80000||i>0xBFFFF) { invalidate_block(i); memory_map[i]=-1; } } for (i=old_start_odd>>12; i<=old_end_odd>>12; i++) { if(i<0x80000||i>0xBFFFF) { invalidate_block(i); memory_map[i]=-1; } } cached_interpreter_table.TLBWI(); //DebugMessage(M64MSG_VERBOSE, "TLBWI: index=%d",g_cp0_regs[CP0_INDEX_REG]); //DebugMessage(M64MSG_VERBOSE, "TLBWI: start_even=%x end_even=%x phys_even=%x v=%d d=%d",tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].start_even,tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].end_even,tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].phys_even,tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].v_even,tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].d_even); //DebugMessage(M64MSG_VERBOSE, "TLBWI: start_odd=%x end_odd=%x phys_odd=%x v=%d d=%d",tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].start_odd,tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].end_odd,tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].phys_odd,tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].v_odd,tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].d_odd); /* Combine tlb_LUT_r, tlb_LUT_w, and invalid_code into a single table for fast look up. */ for (i=tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].start_even>>12; i<=tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].end_even>>12; i++) { //DebugMessage(M64MSG_VERBOSE, "%x: r:%8x w:%8x",i,tlb_LUT_r[i],tlb_LUT_w[i]); if(i<0x80000||i>0xBFFFF) { if(tlb_LUT_r[i]) { memory_map[i]=((tlb_LUT_r[i]&0xFFFFF000)-(i<<12)+(unsigned int)g_rdram-0x80000000)>>2; // FIXME: should make sure the physical page is invalid too if(!tlb_LUT_w[i]||!invalid_code[i]) { memory_map[i]|=0x40000000; // Write protect }else{ assert(tlb_LUT_r[i]==tlb_LUT_w[i]); } if(!using_tlb) DebugMessage(M64MSG_VERBOSE, "Enabled TLB"); // Tell the dynamic recompiler to generate tlb lookup code using_tlb=1; } else memory_map[i]=-1; } //DebugMessage(M64MSG_VERBOSE, "memory_map[%x]: %8x (+%8x)",i,memory_map[i],memory_map[i]<<2); } for (i=tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].start_odd>>12; i<=tlb_e[g_cp0_regs[CP0_INDEX_REG]&0x3F].end_odd>>12; i++) { //DebugMessage(M64MSG_VERBOSE, "%x: r:%8x w:%8x",i,tlb_LUT_r[i],tlb_LUT_w[i]); if(i<0x80000||i>0xBFFFF) { if(tlb_LUT_r[i]) { memory_map[i]=((tlb_LUT_r[i]&0xFFFFF000)-(i<<12)+(unsigned int)g_rdram-0x80000000)>>2; // FIXME: should make sure the physical page is invalid too if(!tlb_LUT_w[i]||!invalid_code[i]) { memory_map[i]|=0x40000000; // Write protect }else{ assert(tlb_LUT_r[i]==tlb_LUT_w[i]); } if(!using_tlb) DebugMessage(M64MSG_VERBOSE, "Enabled TLB"); // Tell the dynamic recompiler to generate tlb lookup code using_tlb=1; } else memory_map[i]=-1; } //DebugMessage(M64MSG_VERBOSE, "memory_map[%x]: %8x (+%8x)",i,memory_map[i],memory_map[i]<<2); } } void TLBWR_new(void) { unsigned int i; g_cp0_regs[CP0_RANDOM_REG] = (g_cp0_regs[CP0_COUNT_REG]/2 % (32 - g_cp0_regs[CP0_WIRED_REG])) + g_cp0_regs[CP0_WIRED_REG]; /* Remove old entries */ unsigned int old_start_even=tlb_e[g_cp0_regs[CP0_RANDOM_REG]&0x3F].start_even; unsigned int old_end_even=tlb_e[g_cp0_regs[CP0_RANDOM_REG]&0x3F].end_even; unsigned int old_start_odd=tlb_e[g_cp0_regs[CP0_RANDOM_REG]&0x3F].start_odd; unsigned int old_end_odd=tlb_e[g_cp0_regs[CP0_RANDOM_REG]&0x3F].end_odd; for (i=old_start_even>>12; i<=old_end_even>>12; i++) { if(i<0x80000||i>0xBFFFF) { invalidate_block(i); memory_map[i]=-1; } } for (i=old_start_odd>>12; i<=old_end_odd>>12; i++) { if(i<0x80000||i>0xBFFFF) { invalidate_block(i); memory_map[i]=-1; } } cached_interpreter_table.TLBWR(); /* Combine tlb_LUT_r, tlb_LUT_w, and invalid_code into a single table for fast look up. */ for (i=tlb_e[g_cp0_regs[CP0_RANDOM_REG]&0x3F].start_even>>12; i<=tlb_e[g_cp0_regs[CP0_RANDOM_REG]&0x3F].end_even>>12; i++) { //DebugMessage(M64MSG_VERBOSE, "%x: r:%8x w:%8x",i,tlb_LUT_r[i],tlb_LUT_w[i]); if(i<0x80000||i>0xBFFFF) { if(tlb_LUT_r[i]) { memory_map[i]=((tlb_LUT_r[i]&0xFFFFF000)-(i<<12)+(unsigned int)g_rdram-0x80000000)>>2; // FIXME: should make sure the physical page is invalid too if(!tlb_LUT_w[i]||!invalid_code[i]) { memory_map[i]|=0x40000000; // Write protect }else{ assert(tlb_LUT_r[i]==tlb_LUT_w[i]); } if(!using_tlb) DebugMessage(M64MSG_VERBOSE, "Enabled TLB"); // Tell the dynamic recompiler to generate tlb lookup code using_tlb=1; } else memory_map[i]=-1; } //DebugMessage(M64MSG_VERBOSE, "memory_map[%x]: %8x (+%8x)",i,memory_map[i],memory_map[i]<<2); } for (i=tlb_e[g_cp0_regs[CP0_RANDOM_REG]&0x3F].start_odd>>12; i<=tlb_e[g_cp0_regs[CP0_RANDOM_REG]&0x3F].end_odd>>12; i++) { //DebugMessage(M64MSG_VERBOSE, "%x: r:%8x w:%8x",i,tlb_LUT_r[i],tlb_LUT_w[i]); if(i<0x80000||i>0xBFFFF) { if(tlb_LUT_r[i]) { memory_map[i]=((tlb_LUT_r[i]&0xFFFFF000)-(i<<12)+(unsigned int)g_rdram-0x80000000)>>2; // FIXME: should make sure the physical page is invalid too if(!tlb_LUT_w[i]||!invalid_code[i]) { memory_map[i]|=0x40000000; // Write protect }else{ assert(tlb_LUT_r[i]==tlb_LUT_w[i]); } if(!using_tlb) DebugMessage(M64MSG_VERBOSE, "Enabled TLB"); // Tell the dynamic recompiler to generate tlb lookup code using_tlb=1; } else memory_map[i]=-1; } //DebugMessage(M64MSG_VERBOSE, "memory_map[%x]: %8x (+%8x)",i,memory_map[i],memory_map[i]<<2); } } mupen64plus-core-src-2.5/src/r4300/new_dynarec/new_dynarec.h000066400000000000000000000041131251723631200236020ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - new_dynarec.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_NEW_DYNAREC_H #define M64P_R4300_NEW_DYNAREC_H #include #include #define NEW_DYNAREC_X86 1 #define NEW_DYNAREC_AMD64 2 #define NEW_DYNAREC_ARM 3 #ifdef __cplusplus extern "C" { #endif extern int pcaddr; extern int pending_exception; #ifdef __cplusplus } #endif void invalidate_all_pages(void); void invalidate_block(unsigned int block); void invalidate_cached_code_new_dynarec(uint32_t address, size_t size); void new_dynarec_init(void); void new_dyna_start(void); void new_dynarec_cleanup(void); #endif /* M64P_R4300_NEW_DYNAREC_H */ mupen64plus-core-src-2.5/src/r4300/new_dynarec/x86/000077500000000000000000000000001251723631200215615ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/r4300/new_dynarec/x86/assem_x86.c000066400000000000000000003620651251723631200235560ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - assem_x86.c * * Copyright (C) 2009-2011 Ari64 * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "main/main.h" int cycle_count; int last_count; int pcaddr; int pending_exception; int branch_target; uint64_t readmem_dword; static precomp_instr fake_pc; u_int memory_map[1048576]; ALIGN(8, static u_int mini_ht[32][2]); ALIGN(4, u_char restore_candidate[512]); #ifdef __cplusplus extern "C" { #endif void do_interrupt(); void jump_vaddr_eax(); void jump_vaddr_ecx(); void jump_vaddr_edx(); void jump_vaddr_ebx(); void jump_vaddr_ebp(); void jump_vaddr_edi(); #ifdef __cplusplus } #endif static const u_int jump_vaddr_reg[8] = { (int)jump_vaddr_eax, (int)jump_vaddr_ecx, (int)jump_vaddr_edx, (int)jump_vaddr_ebx, 0, (int)jump_vaddr_ebp, 0, (int)jump_vaddr_edi }; #ifdef __cplusplus extern "C" { #endif void invalidate_block_eax(); void invalidate_block_ecx(); void invalidate_block_edx(); void invalidate_block_ebx(); void invalidate_block_ebp(); void invalidate_block_esi(); void invalidate_block_edi(); #ifdef __cplusplus } #endif static const u_int invalidate_block_reg[8] = { (int)invalidate_block_eax, (int)invalidate_block_ecx, (int)invalidate_block_edx, (int)invalidate_block_ebx, 0, (int)invalidate_block_ebp, (int)invalidate_block_esi, (int)invalidate_block_edi }; static const u_short rounding_modes[4] = { 0x33F, // round 0xF3F, // trunc 0xB3F, // ceil 0x73F};// floor #include "../../fpu.h" // We need these for cmovcc instructions on x86 static const u_int const_zero=0; static const u_int const_one=1; /* Linker */ static void set_jump_target(int addr,int target) { u_char *ptr=(u_char *)addr; if(*ptr==0x0f) { assert(ptr[1]>=0x80&&ptr[1]<=0x8f); u_int *ptr2=(u_int *)(ptr+2); *ptr2=target-(int)ptr2-4; } else if(*ptr==0xe8||*ptr==0xe9) { u_int *ptr2=(u_int *)(ptr+1); *ptr2=target-(int)ptr2-4; } else { assert(*ptr==0xc7); /* mov immediate (store address) */ u_int *ptr2=(u_int *)(ptr+6); *ptr2=target; } } static void *kill_pointer(void *stub) { int *i_ptr=*((int **)((int)stub+6)); *i_ptr=(int)stub-(int)i_ptr-4; return i_ptr; } static int get_pointer(void *stub) { int *i_ptr=*((int **)((int)stub+6)); return *i_ptr+(int)i_ptr+4; } // Find the "clean" entry point from a "dirty" entry point // by skipping past the call to verify_code static u_int get_clean_addr(int addr) { u_char *ptr=(u_char *)addr; assert(ptr[20]==0xE8); // call instruction assert(ptr[25]==0x83); // pop (add esp,4) instruction if(ptr[28]==0xE9) return *(u_int *)(ptr+29)+addr+33; // follow jmp else return(addr+28); } static int verify_dirty(void *addr) { u_char *ptr=(u_char *)addr; assert(ptr[5]==0xB8); u_int source=*(u_int *)(ptr+6); u_int copy=*(u_int *)(ptr+11); u_int len=*(u_int *)(ptr+16); assert(ptr[20]==0xE8); // call instruction u_int verifier=*(u_int *)(ptr+21)+(u_int)ptr+25; if(verifier==(u_int)verify_code_vm||verifier==(u_int)verify_code_ds) { unsigned int page=source>>12; unsigned int map_value=memory_map[page]; if(map_value>=0x80000000) return 0; while(page<((source+len-1)>>12)) { if((memory_map[++page]<<2)!=(map_value<<2)) return 0; } source = source+(map_value<<2); } //DebugMessage(M64MSG_VERBOSE, "verify_dirty: %x %x %x",source,copy,len); return !memcmp((void *)source,(void *)copy,len); } // This doesn't necessarily find all clean entry points, just // guarantees that it's not dirty static int isclean(int addr) { u_char *ptr=(u_char *)addr; if(ptr[5]!=0xB8) return 1; // mov imm,%eax if(ptr[10]!=0xBB) return 1; // mov imm,%ebx if(ptr[15]!=0xB9) return 1; // mov imm,%ecx if(ptr[20]!=0xE8) return 1; // call instruction if(ptr[25]!=0x83) return 1; // pop (add esp,4) instruction return 0; } static void get_bounds(int addr,u_int *start,u_int *end) { u_char *ptr=(u_char *)addr; assert(ptr[5]==0xB8); u_int source=*(u_int *)(ptr+6); //u_int copy=*(u_int *)(ptr+11); u_int len=*(u_int *)(ptr+16); assert(ptr[20]==0xE8); // call instruction u_int verifier=*(u_int *)(ptr+21)+(u_int)ptr+25; if(verifier==(u_int)verify_code_vm||verifier==(u_int)verify_code_ds) { if(memory_map[source>>12]>=0x80000000) source = 0; else source = source+(memory_map[source>>12]<<2); } if(start) *start=source; if(end) *end=source+len; } /* Register allocation */ // Note: registers are allocated clean (unmodified state) // if you intend to modify the register, you must call dirty_reg(). static void alloc_reg(struct regstat *cur,int i,signed char reg) { int r,hr; int preferred_reg = (reg&3)+(reg>28)*4-(reg==32)+2*(reg==36)-(reg==40); // Don't allocate unused registers if((cur->u>>reg)&1) return; // see if it's already allocated for(hr=0;hrregmap[hr]==reg) return; } // Keep the same mapping if the register was already allocated in a loop preferred_reg = loop_reg(i,reg,preferred_reg); // Try to allocate the preferred register if(cur->regmap[preferred_reg]==-1) { cur->regmap[preferred_reg]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[preferred_reg]; if(r<64&&((cur->u>>r)&1)) { cur->regmap[preferred_reg]=reg; cur->dirty&=~(1<isconst&=~(1<=64&&((cur->uu>>(r&63))&1)) { cur->regmap[preferred_reg]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==-1) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[hr]; if(r>=0) { if(r<64) { if((cur->u>>r)&1) if(i==0||(unneeded_reg[i-1]>>r)&1) {cur->regmap[hr]=-1;break;} } else { if((cur->uu>>(r&63))&1) if(i==0||(unneeded_reg_upper[i-1]>>(r&63))&1) {cur->regmap[hr]=-1;break;} } } } // Try to allocate any available register, but prefer // registers that have not been used recently. if(i>0) { for(hr=0;hrregmap[hr]==-1) { if(regs[i-1].regmap[hr]!=rs1[i-1]&®s[i-1].regmap[hr]!=rs2[i-1]&®s[i-1].regmap[hr]!=rt1[i-1]&®s[i-1].regmap[hr]!=rt2[i-1]) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==-1) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[0]&63],hsn[cur->regmap[1]&63],hsn[cur->regmap[2]&63],hsn[cur->regmap[3]&63],hsn[cur->regmap[5]&63],hsn[cur->regmap[6]&63],hsn[cur->regmap[7]&63]); if(i>0) { // Don't evict the cycle count at entry points, otherwise the entry // stub will have to write it. if(bt[i]&&hsn[CCREG]>2) hsn[CCREG]=2; if(i>1&&hsn[CCREG]>2&&(itype[i-2]==RJUMP||itype[i-2]==UJUMP||itype[i-2]==CJUMP||itype[i-2]==SJUMP||itype[i-2]==FJUMP)) hsn[CCREG]=2; for(j=10;j>=3;j--) { // Alloc preferred register if available if(hsn[r=cur->regmap[preferred_reg]&63]==j) { for(hr=0;hrregmap[hr]&63)==r) { cur->regmap[hr]=-1; cur->dirty&=~(1<isconst&=~(1<regmap[preferred_reg]=reg; return; } for(r=1;r<=MAXREG;r++) { if(hsn[r]==j&&r!=rs1[i-1]&&r!=rs2[i-1]&&r!=rt1[i-1]&&r!=rt2[i-1]) { for(hr=0;hrregmap[hr]==r+64) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==r) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<=0;j--) { for(r=1;r<=MAXREG;r++) { if(hsn[r]==j) { for(hr=0;hrregmap[hr]==r+64) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==r) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<uu>>reg)&1) return; // see if the upper half is already allocated for(hr=0;hrregmap[hr]==reg+64) return; } // Keep the same mapping if the register was already allocated in a loop preferred_reg = loop_reg(i,reg,preferred_reg); // Try to allocate the preferred register if(cur->regmap[preferred_reg]==-1) { cur->regmap[preferred_reg]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[preferred_reg]; if(r<64&&((cur->u>>r)&1)) { cur->regmap[preferred_reg]=reg|64; cur->dirty&=~(1<isconst&=~(1<=64&&((cur->uu>>(r&63))&1)) { cur->regmap[preferred_reg]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==-1) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<=0;hr--) { r=cur->regmap[hr]; if(r>=0) { if(r<64) { if((cur->u>>r)&1) {cur->regmap[hr]=-1;break;} } else { if((cur->uu>>(r&63))&1) {cur->regmap[hr]=-1;break;} } } } // Try to allocate any available register, but prefer // registers that have not been used recently. if(i>0) { for(hr=0;hrregmap[hr]==-1) { if(regs[i-1].regmap[hr]!=rs1[i-1]&®s[i-1].regmap[hr]!=rs2[i-1]&®s[i-1].regmap[hr]!=rt1[i-1]&®s[i-1].regmap[hr]!=rt2[i-1]) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==-1) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[0],cur->regmap[1],cur->regmap[2],cur->regmap[3],cur->regmap[5],cur->regmap[6],cur->regmap[7]); //DebugMessage(M64MSG_VERBOSE, "hsn(%x): %d %d %d %d %d %d %d",start+i*4,hsn[cur->regmap[0]&63],hsn[cur->regmap[1]&63],hsn[cur->regmap[2]&63],hsn[cur->regmap[3]&63],hsn[cur->regmap[5]&63],hsn[cur->regmap[6]&63],hsn[cur->regmap[7]&63]); if(i>0) { // Don't evict the cycle count at entry points, otherwise the entry // stub will have to write it. if(bt[i]&&hsn[CCREG]>2) hsn[CCREG]=2; if(i>1&&hsn[CCREG]>2&&(itype[i-2]==RJUMP||itype[i-2]==UJUMP||itype[i-2]==CJUMP||itype[i-2]==SJUMP||itype[i-2]==FJUMP)) hsn[CCREG]=2; for(j=10;j>=3;j--) { // Alloc preferred register if available if(hsn[r=cur->regmap[preferred_reg]&63]==j) { for(hr=0;hrregmap[hr]&63)==r) { cur->regmap[hr]=-1; cur->dirty&=~(1<isconst&=~(1<regmap[preferred_reg]=reg|64; return; } for(r=1;r<=MAXREG;r++) { if(hsn[r]==j&&r!=rs1[i-1]&&r!=rs2[i-1]&&r!=rt1[i-1]&&r!=rt2[i-1]) { for(hr=0;hrregmap[hr]==r+64) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==r) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<=0;j--) { for(r=1;r<=MAXREG;r++) { if(hsn[r]==j) { for(hr=0;hrregmap[hr]==r+64) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==r) { cur->regmap[hr]=reg|64; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==reg) return; } // Try to allocate any available register, starting with EDI, ESI, EBP... // We prefer EDI, ESI, EBP since the others are used for byte/halfword stores for(hr=HOST_REGS-1;hr>=0;hr--) { if(hr!=EXCLUDE_REG&&cur->regmap[hr]==-1) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<=0;hr--) { r=cur->regmap[hr]; if(r>=0) { if(r<64) { if((cur->u>>r)&1) { if(i==0||((unneeded_reg[i-1]>>r)&1)) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<uu>>(r&63))&1) { if(i==0||((unneeded_reg_upper[i-1]>>(r&63))&1)) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[0]&63],hsn[cur->regmap[1]&63],hsn[cur->regmap[2]&63],hsn[cur->regmap[3]&63],hsn[cur->regmap[5]&63],hsn[cur->regmap[6]&63],hsn[cur->regmap[7]&63]); if(i>0) { // Don't evict the cycle count at entry points, otherwise the entry // stub will have to write it. if(bt[i]&&hsn[CCREG]>2) hsn[CCREG]=2; if(i>1&&hsn[CCREG]>2&&(itype[i-2]==RJUMP||itype[i-2]==UJUMP||itype[i-2]==CJUMP||itype[i-2]==SJUMP||itype[i-2]==FJUMP)) hsn[CCREG]=2; for(j=10;j>=3;j--) { for(r=1;r<=MAXREG;r++) { if(hsn[r]==j&&r!=rs1[i-1]&&r!=rs2[i-1]&&r!=rt1[i-1]&&r!=rt2[i-1]) { for(hr=0;hr2) { if(cur->regmap[hr]==r+64) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<2) { if(cur->regmap[hr]==r) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<=0;j--) { for(r=1;r<=MAXREG;r++) { if(hsn[r]==j) { for(hr=0;hrregmap[hr]==r+64) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[hr]==r) { cur->regmap[hr]=reg; cur->dirty&=~(1<isconst&=~(1<regmap[n]==reg) { dirty=(cur->dirty>>n)&1; cur->regmap[n]=-1; } } cur->regmap[hr]=reg; cur->dirty&=~(1<dirty|=dirty<isconst&=~(1<u&=~(1LL<u&=~(1LL<is32|=1LL<is32|=1LL<is32&=~(1LL<is32&=~(1LL<is32|=1LL<is32|=1LL<>4); if((r&63)==HIREG) addr=(int)&hi+((r&64)>>4); if((r&63)==LOREG) addr=(int)&lo+((r&64)>>4); if(r==CCREG) addr=(int)&cycle_count; if(r==CSREG) addr=(int)&g_cp0_regs[CP0_STATUS_REG]; if(r==FSREG) addr=(int)&FCR31; assem_debug("mov %x+%d,%%%s",addr,r,regname[hr]); output_byte(0x8B); output_modrm(0,5,hr); output_w32(addr); } } static void emit_storereg(int r, int hr) { int addr=((int)reg)+((r&63)<<3)+((r&64)>>4); if((r&63)==HIREG) addr=(int)&hi+((r&64)>>4); if((r&63)==LOREG) addr=(int)&lo+((r&64)>>4); if(r==CCREG) addr=(int)&cycle_count; if(r==FSREG) addr=(int)&FCR31; assem_debug("mov %%%s,%x+%d",regname[hr],addr,r); output_byte(0x89); output_modrm(0,5,hr); output_w32(addr); } static void emit_test(int rs, int rt) { assem_debug("test %%%s,%%%s",regname[rs],regname[rt]); output_byte(0x85); output_modrm(3,rs,rt); } static void emit_testimm(int rs,int imm) { assem_debug("test $0x%x,%%%s",imm,regname[rs]); if(imm<128&&imm>=-128&&rs<4) { output_byte(0xF6); output_modrm(3,rs,0); output_byte(imm); } else { output_byte(0xF7); output_modrm(3,rs,0); output_w32(imm); } } static void emit_not(int rs,int rt) { if(rs!=rt) emit_mov(rs,rt); assem_debug("not %%%s",regname[rt]); output_byte(0xF7); output_modrm(3,rt,2); } static void emit_and(u_int rs1,u_int rs2,u_int rt) { assert(rs1<8); assert(rs2<8); assert(rt<8); if(rs1==rt) { assem_debug("and %%%s,%%%s",regname[rs2],regname[rt]); output_byte(0x21); output_modrm(3,rs1,rs2); } else if(rs2==rt) { assem_debug("and %%%s,%%%s",regname[rs1],regname[rt]); output_byte(0x21); output_modrm(3,rs2,rs1); } else { emit_mov(rs1,rt); emit_and(rt,rs2,rt); } } static void emit_or(u_int rs1,u_int rs2,u_int rt) { assert(rs1<8); assert(rs2<8); assert(rt<8); if(rs1==rt) { assem_debug("or %%%s,%%%s",regname[rs2],regname[rt]); output_byte(0x09); output_modrm(3,rs1,rs2); } else if(rs2==rt) { assem_debug("or %%%s,%%%s",regname[rs1],regname[rt]); output_byte(0x09); output_modrm(3,rs2,rs1); } else { emit_mov(rs1,rt); emit_or(rt,rs2,rt); } } static void emit_or_and_set_flags(int rs1,int rs2,int rt) { emit_or(rs1,rs2,rt); } static void emit_xor(u_int rs1,u_int rs2,u_int rt) { assert(rs1<8); assert(rs2<8); assert(rt<8); if(rs1==rt) { assem_debug("xor %%%s,%%%s",regname[rs2],regname[rt]); output_byte(0x31); output_modrm(3,rs1,rs2); } else if(rs2==rt) { assem_debug("xor %%%s,%%%s",regname[rs1],regname[rt]); output_byte(0x31); output_modrm(3,rs2,rs1); } else { emit_mov(rs1,rt); emit_xor(rt,rs2,rt); } } static void emit_movimm(int imm,u_int rt) { assem_debug("mov $%d,%%%s",imm,regname[rt]); assert(rt<8); output_byte(0xB8+rt); output_w32(imm); } static void emit_addimm(int rs,int imm,int rt) { if(rs==rt) { if(imm!=0) { assem_debug("add $%d,%%%s",imm,regname[rt]); if(imm<128&&imm>=-128) { output_byte(0x83); output_modrm(3,rt,0); output_byte(imm); } else { output_byte(0x81); output_modrm(3,rt,0); output_w32(imm); } } } else { if(imm!=0) { assem_debug("lea %d(%%%s),%%%s",imm,regname[rs],regname[rt]); output_byte(0x8D); if(imm<128&&imm>=-128) { output_modrm(1,rs,rt); output_byte(imm); }else{ output_modrm(2,rs,rt); output_w32(imm); } }else{ emit_mov(rs,rt); } } } static void emit_addimm_and_set_flags(int imm,int rt) { assem_debug("add $%d,%%%s",imm,regname[rt]); if(imm<128&&imm>=-128) { output_byte(0x83); output_modrm(3,rt,0); output_byte(imm); } else { output_byte(0x81); output_modrm(3,rt,0); output_w32(imm); } } static void emit_addimm_no_flags(int imm,int rt) { if(imm!=0) { assem_debug("lea %d(%%%s),%%%s",imm,regname[rt],regname[rt]); output_byte(0x8D); if(imm<128&&imm>=-128) { output_modrm(1,rt,rt); output_byte(imm); }else{ output_modrm(2,rt,rt); output_w32(imm); } } } static void emit_adcimm(int imm,u_int rt) { assem_debug("adc $%d,%%%s",imm,regname[rt]); assert(rt<8); if(imm<128&&imm>=-128) { output_byte(0x83); output_modrm(3,rt,2); output_byte(imm); } else { output_byte(0x81); output_modrm(3,rt,2); output_w32(imm); } } static void emit_sbbimm(int imm,u_int rt) { assem_debug("sbb $%d,%%%s",imm,regname[rt]); assert(rt<8); if(imm<128&&imm>=-128) { output_byte(0x83); output_modrm(3,rt,3); output_byte(imm); } else { output_byte(0x81); output_modrm(3,rt,3); output_w32(imm); } } static void emit_addimm64_32(int rsh,int rsl,int imm,int rth,int rtl) { if(rsh==rth&&rsl==rtl) { assem_debug("add $%d,%%%s",imm,regname[rtl]); if(imm<128&&imm>=-128) { output_byte(0x83); output_modrm(3,rtl,0); output_byte(imm); } else { output_byte(0x81); output_modrm(3,rtl,0); output_w32(imm); } assem_debug("adc $%d,%%%s",imm>>31,regname[rth]); output_byte(0x83); output_modrm(3,rth,2); output_byte(imm>>31); } else { emit_mov(rsh,rth); emit_mov(rsl,rtl); emit_addimm64_32(rth,rtl,imm,rth,rtl); } } static void emit_sub64_32(int rs1l,int rs1h,int rs2l,int rs2h,int rtl,int rth) { if((rs1l==rtl)&&(rs1h==rth)) { assem_debug("sub %%%s,%%%s",regname[rs2l],regname[rs1l]); output_byte(0x29); output_modrm(3,rs1l,rs2l); assem_debug("sbb %%%s,%%%s",regname[rs2h],regname[rs1h]); output_byte(0x19); output_modrm(3,rs1h,rs2h); } else if((rs2l==rtl)&&(rs2h==rth)) { emit_neg(rs2l,rs2l); emit_adcimm(-1,rs2h); assem_debug("add %%%s,%%%s",regname[rs1l],regname[rs2l]); output_byte(0x01); output_modrm(3,rs2l,rs1l); emit_not(rs2h,rs2h); assem_debug("adc %%%s,%%%s",regname[rs1h],regname[rs2h]); output_byte(0x11); output_modrm(3,rs2h,rs1h); } else { emit_mov(rs1l,rtl); assem_debug("sub %%%s,%%%s",regname[rs2l],regname[rtl]); output_byte(0x29); output_modrm(3,rtl,rs2l); emit_mov(rs1h,rth); assem_debug("sbb %%%s,%%%s",regname[rs2h],regname[rth]); output_byte(0x19); output_modrm(3,rth,rs2h); } } static void emit_sbb(int rs1,int rs2) { assem_debug("sbb %%%s,%%%s",regname[rs1],regname[rs2]); output_byte(0x19); output_modrm(3,rs2,rs1); } static void emit_andimm(int rs,int imm,int rt) { if(imm==0) { emit_zeroreg(rt); } else if(rs==rt) { assem_debug("and $%d,%%%s",imm,regname[rt]); if(imm<128&&imm>=-128) { output_byte(0x83); output_modrm(3,rt,4); output_byte(imm); } else { output_byte(0x81); output_modrm(3,rt,4); output_w32(imm); } } else { emit_mov(rs,rt); emit_andimm(rt,imm,rt); } } static void emit_orimm(int rs,int imm,int rt) { if(rs==rt) { if(imm!=0) { assem_debug("or $%d,%%%s",imm,regname[rt]); if(imm<128&&imm>=-128) { output_byte(0x83); output_modrm(3,rt,1); output_byte(imm); } else { output_byte(0x81); output_modrm(3,rt,1); output_w32(imm); } } } else { emit_mov(rs,rt); emit_orimm(rt,imm,rt); } } static void emit_xorimm(int rs,int imm,int rt) { if(rs==rt) { if(imm!=0) { assem_debug("xor $%d,%%%s",imm,regname[rt]); if(imm<128&&imm>=-128) { output_byte(0x83); output_modrm(3,rt,6); output_byte(imm); } else { output_byte(0x81); output_modrm(3,rt,6); output_w32(imm); } } } else { emit_mov(rs,rt); emit_xorimm(rt,imm,rt); } } static void emit_shlimm(int rs,u_int imm,int rt) { if(rs==rt) { assem_debug("shl %%%s,%d",regname[rt],imm); assert(imm>0); if(imm==1) output_byte(0xD1); else output_byte(0xC1); output_modrm(3,rt,4); if(imm>1) output_byte(imm); } else { emit_mov(rs,rt); emit_shlimm(rt,imm,rt); } } static void emit_shrimm(int rs,u_int imm,int rt) { if(rs==rt) { assem_debug("shr %%%s,%d",regname[rt],imm); assert(imm>0); if(imm==1) output_byte(0xD1); else output_byte(0xC1); output_modrm(3,rt,5); if(imm>1) output_byte(imm); } else { emit_mov(rs,rt); emit_shrimm(rt,imm,rt); } } static void emit_sarimm(int rs,u_int imm,int rt) { if(rs==rt) { assem_debug("sar %%%s,%d",regname[rt],imm); assert(imm>0); if(imm==1) output_byte(0xD1); else output_byte(0xC1); output_modrm(3,rt,7); if(imm>1) output_byte(imm); } else { emit_mov(rs,rt); emit_sarimm(rt,imm,rt); } } static void emit_rorimm(int rs,u_int imm,int rt) { if(rs==rt) { assem_debug("ror %%%s,%d",regname[rt],imm); assert(imm>0); if(imm==1) output_byte(0xD1); else output_byte(0xC1); output_modrm(3,rt,1); if(imm>1) output_byte(imm); } else { emit_mov(rs,rt); emit_rorimm(rt,imm,rt); } } static void emit_shldimm(int rs,int rs2,u_int imm,int rt) { if(rs==rt) { assem_debug("shld %%%s,%%%s,%d",regname[rt],regname[rs2],imm); assert(imm>0); output_byte(0x0F); output_byte(0xA4); output_modrm(3,rt,rs2); output_byte(imm); } else { emit_mov(rs,rt); emit_shldimm(rt,rs2,imm,rt); } } static void emit_shrdimm(int rs,int rs2,u_int imm,int rt) { if(rs==rt) { assem_debug("shrd %%%s,%%%s,%d",regname[rt],regname[rs2],imm); assert(imm>0); output_byte(0x0F); output_byte(0xAC); output_modrm(3,rt,rs2); output_byte(imm); } else { emit_mov(rs,rt); emit_shrdimm(rt,rs2,imm,rt); } } static void emit_shlcl(int r) { assem_debug("shl %%%s,%%cl",regname[r]); output_byte(0xD3); output_modrm(3,r,4); } static void emit_shrcl(int r) { assem_debug("shr %%%s,%%cl",regname[r]); output_byte(0xD3); output_modrm(3,r,5); } static void emit_sarcl(int r) { assem_debug("sar %%%s,%%cl",regname[r]); output_byte(0xD3); output_modrm(3,r,7); } static void emit_shldcl(int r1,int r2) { assem_debug("shld %%%s,%%%s,%%cl",regname[r1],regname[r2]); output_byte(0x0F); output_byte(0xA5); output_modrm(3,r1,r2); } static void emit_shrdcl(int r1,int r2) { assem_debug("shrd %%%s,%%%s,%%cl",regname[r1],regname[r2]); output_byte(0x0F); output_byte(0xAD); output_modrm(3,r1,r2); } static void emit_cmpimm(int rs,int imm) { assem_debug("cmp $%d,%%%s",imm,regname[rs]); if(imm<128&&imm>=-128) { output_byte(0x83); output_modrm(3,rs,7); output_byte(imm); } else { output_byte(0x81); output_modrm(3,rs,7); output_w32(imm); } } static void emit_cmovne(const u_int *addr,int rt) { assem_debug("cmovne %x,%%%s",(int)addr,regname[rt]); if(addr==&const_zero) assem_debug(" [zero]"); else if(addr==&const_one) assem_debug(" [one]"); else assem_debug(""); output_byte(0x0F); output_byte(0x45); output_modrm(0,5,rt); output_w32((int)addr); } static void emit_cmovl(const u_int *addr,int rt) { assem_debug("cmovl %x,%%%s",(int)addr,regname[rt]); if(addr==&const_zero) assem_debug(" [zero]"); else if(addr==&const_one) assem_debug(" [one]"); else assem_debug(""); output_byte(0x0F); output_byte(0x4C); output_modrm(0,5,rt); output_w32((int)addr); } static void emit_cmovs(const u_int *addr,int rt) { assem_debug("cmovs %x,%%%s",(int)addr,regname[rt]); if(addr==&const_zero) assem_debug(" [zero]"); else if(addr==&const_one) assem_debug(" [one]"); else assem_debug(""); output_byte(0x0F); output_byte(0x48); output_modrm(0,5,rt); output_w32((int)addr); } static void emit_cmovne_reg(int rs,int rt) { assem_debug("cmovne %%%s,%%%s",regname[rs],regname[rt]); output_byte(0x0F); output_byte(0x45); output_modrm(3,rs,rt); } static void emit_cmovl_reg(int rs,int rt) { assem_debug("cmovl %%%s,%%%s",regname[rs],regname[rt]); output_byte(0x0F); output_byte(0x4C); output_modrm(3,rs,rt); } static void emit_cmovs_reg(int rs,int rt) { assem_debug("cmovs %%%s,%%%s",regname[rs],regname[rt]); output_byte(0x0F); output_byte(0x48); output_modrm(3,rs,rt); } static void emit_cmovnc_reg(int rs,int rt) { assem_debug("cmovae %%%s,%%%s",regname[rs],regname[rt]); output_byte(0x0F); output_byte(0x43); output_modrm(3,rs,rt); } static void emit_cmova_reg(int rs,int rt) { assem_debug("cmova %%%s,%%%s",regname[rs],regname[rt]); output_byte(0x0F); output_byte(0x47); output_modrm(3,rs,rt); } static void emit_cmovp_reg(int rs,int rt) { assem_debug("cmovp %%%s,%%%s",regname[rs],regname[rt]); output_byte(0x0F); output_byte(0x4A); output_modrm(3,rs,rt); } static void emit_cmovnp_reg(int rs,int rt) { assem_debug("cmovnp %%%s,%%%s",regname[rs],regname[rt]); output_byte(0x0F); output_byte(0x4B); output_modrm(3,rs,rt); } static void emit_setl(int rt) { assem_debug("setl %%%s",regname[rt]); output_byte(0x0F); output_byte(0x9C); output_modrm(3,rt,2); } static void emit_movzbl_reg(int rs, int rt) { assem_debug("movzbl %%%s,%%%s",regname[rs]+1,regname[rt]); output_byte(0x0F); output_byte(0xB6); output_modrm(3,rs,rt); } static void emit_slti32(int rs,int imm,int rt) { if(rs!=rt) emit_zeroreg(rt); emit_cmpimm(rs,imm); if(rt<4) { emit_setl(rt); if(rs==rt) emit_movzbl_reg(rt,rt); } else { if(rs==rt) emit_movimm(0,rt); emit_cmovl(&const_one,rt); } } static void emit_sltiu32(int rs,int imm,int rt) { if(rs!=rt) emit_zeroreg(rt); emit_cmpimm(rs,imm); if(rs==rt) emit_movimm(0,rt); emit_adcimm(0,rt); } static void emit_slti64_32(int rsh,int rsl,int imm,int rt) { assert(rsh!=rt); emit_slti32(rsl,imm,rt); if(imm>=0) { emit_test(rsh,rsh); emit_cmovne(&const_zero,rt); emit_cmovs(&const_one,rt); } else { emit_cmpimm(rsh,-1); emit_cmovne(&const_zero,rt); emit_cmovl(&const_one,rt); } } static void emit_sltiu64_32(int rsh,int rsl,int imm,int rt) { assert(rsh!=rt); emit_sltiu32(rsl,imm,rt); if(imm>=0) { emit_test(rsh,rsh); emit_cmovne(&const_zero,rt); } else { emit_cmpimm(rsh,-1); emit_cmovne(&const_one,rt); } } static void emit_cmp(int rs,int rt) { assem_debug("cmp %%%s,%%%s",regname[rt],regname[rs]); output_byte(0x39); output_modrm(3,rs,rt); } static void emit_set_gz32(int rs, int rt) { //assem_debug("set_gz32"); emit_cmpimm(rs,1); emit_movimm(1,rt); emit_cmovl(&const_zero,rt); } static void emit_set_nz32(int rs, int rt) { //assem_debug("set_nz32"); emit_cmpimm(rs,1); emit_movimm(1,rt); emit_sbbimm(0,rt); } static void emit_set_gz64_32(int rsh, int rsl, int rt) { //assem_debug("set_gz64"); emit_set_gz32(rsl,rt); emit_test(rsh,rsh); emit_cmovne(&const_one,rt); emit_cmovs(&const_zero,rt); } static void emit_set_nz64_32(int rsh, int rsl, int rt) { //assem_debug("set_nz64"); emit_or_and_set_flags(rsh,rsl,rt); emit_cmovne(&const_one,rt); } static void emit_set_if_less32(int rs1, int rs2, int rt) { //assem_debug("set if less (%%%s,%%%s),%%%s",regname[rs1],regname[rs2],regname[rt]); if(rs1!=rt&&rs2!=rt) emit_zeroreg(rt); emit_cmp(rs1,rs2); if(rs1==rt||rs2==rt) emit_movimm(0,rt); emit_cmovl(&const_one,rt); } static void emit_set_if_carry32(int rs1, int rs2, int rt) { //assem_debug("set if carry (%%%s,%%%s),%%%s",regname[rs1],regname[rs2],regname[rt]); if(rs1!=rt&&rs2!=rt) emit_zeroreg(rt); emit_cmp(rs1,rs2); if(rs1==rt||rs2==rt) emit_movimm(0,rt); emit_adcimm(0,rt); } static void emit_set_if_less64_32(int u1, int l1, int u2, int l2, int rt) { //assem_debug("set if less64 (%%%s,%%%s,%%%s,%%%s),%%%s",regname[u1],regname[l1],regname[u2],regname[l2],regname[rt]); assert(u1!=rt); assert(u2!=rt); emit_cmp(l1,l2); emit_mov(u1,rt); emit_sbb(u2,rt); emit_movimm(0,rt); emit_cmovl(&const_one,rt); } static void emit_set_if_carry64_32(int u1, int l1, int u2, int l2, int rt) { //assem_debug("set if carry64 (%%%s,%%%s,%%%s,%%%s),%%%s",regname[u1],regname[l1],regname[u2],regname[l2],regname[rt]); assert(u1!=rt); assert(u2!=rt); emit_cmp(l1,l2); emit_mov(u1,rt); emit_sbb(u2,rt); emit_movimm(0,rt); emit_adcimm(0,rt); } static void emit_call(int a) { assem_debug("call %x (%x+%x)",a,(int)out+5,a-(int)out-5); output_byte(0xe8); output_w32(a-(int)out-4); } static void emit_jmp(int a) { assem_debug("jmp %x (%x+%x)",a,(int)out+5,a-(int)out-5); output_byte(0xe9); output_w32(a-(int)out-4); } static void emit_jne(int a) { assem_debug("jne %x",a); output_byte(0x0f); output_byte(0x85); output_w32(a-(int)out-4); } static void emit_jeq(int a) { assem_debug("jeq %x",a); output_byte(0x0f); output_byte(0x84); output_w32(a-(int)out-4); } static void emit_js(int a) { assem_debug("js %x",a); output_byte(0x0f); output_byte(0x88); output_w32(a-(int)out-4); } static void emit_jns(int a) { assem_debug("jns %x",a); output_byte(0x0f); output_byte(0x89); output_w32(a-(int)out-4); } static void emit_jl(int a) { assem_debug("jl %x",a); output_byte(0x0f); output_byte(0x8c); output_w32(a-(int)out-4); } static void emit_jge(int a) { assem_debug("jge %x",a); output_byte(0x0f); output_byte(0x8d); output_w32(a-(int)out-4); } static void emit_jno(int a) { assem_debug("jno %x",a); output_byte(0x0f); output_byte(0x81); output_w32(a-(int)out-4); } static void emit_jc(int a) { assem_debug("jc %x",a); output_byte(0x0f); output_byte(0x82); output_w32(a-(int)out-4); } static void emit_jae(int a) { assem_debug("jae %x",a); output_byte(0x0f); output_byte(0x83); output_w32(a-(int)out-4); } static void emit_jb(int a) { assem_debug("jb %x",a); output_byte(0x0f); output_byte(0x82); output_w32(a-(int)out-4); } static void emit_pushimm(int imm) { assem_debug("push $%x",imm); output_byte(0x68); output_w32(imm); } static void emit_pushmem(int addr) { assem_debug("push *%x",addr); output_byte(0xFF); output_modrm(0,5,6); output_w32(addr); } static void emit_pusha() { assem_debug("pusha"); output_byte(0x60); } static void emit_popa() { assem_debug("popa"); output_byte(0x61); } static void emit_pushreg(u_int r) { assem_debug("push %%%s",regname[r]); assert(r<8); output_byte(0x50+r); } static void emit_popreg(u_int r) { assem_debug("pop %%%s",regname[r]); assert(r<8); output_byte(0x58+r); } static void emit_callreg(u_int r) { assem_debug("call *%%%s",regname[r]); assert(r<8); output_byte(0xFF); output_modrm(3,r,2); } /*static void emit_jmpreg(u_int r) { assem_debug("jmp *%%%s",regname[r]); assert(r<8); output_byte(0xFF); output_modrm(3,r,4); }*/ static void emit_jmpmem_indexed(u_int addr,u_int r) { assem_debug("jmp *%x(%%%s)",addr,regname[r]); assert(r<8); output_byte(0xFF); output_modrm(2,r,4); output_w32(addr); } static void emit_readword(int addr, int rt) { assem_debug("mov %x,%%%s",addr,regname[rt]); output_byte(0x8B); output_modrm(0,5,rt); output_w32(addr); } static void emit_readword_indexed(int addr, int rs, int rt) { assem_debug("mov %x+%%%s,%%%s",addr,regname[rs],regname[rt]); output_byte(0x8B); if(addr<128&&addr>=-128) { output_modrm(1,rs,rt); if(rs==ESP) output_sib(0,4,4); output_byte(addr); } else { output_modrm(2,rs,rt); if(rs==ESP) output_sib(0,4,4); output_w32(addr); } } static void emit_readword_tlb(int addr, int map, int rt) { if(map<0) emit_readword(addr+(int)g_rdram-0x80000000, rt); else { assem_debug("mov (%x,%%%s,4),%%%s",addr,regname[map],regname[rt]); output_byte(0x8B); output_modrm(0,4,rt); output_sib(2,map,5); output_w32(addr); } } static void emit_readword_indexed_tlb(int addr, int rs, int map, int rt) { if(map<0) emit_readword_indexed(addr+(int)g_rdram-0x80000000, rs, rt); else { assem_debug("mov %x(%%%s,%%%s,4),%%%s",addr,regname[rs],regname[map],regname[rt]); assert(rs!=ESP); output_byte(0x8B); if(addr==0&&rs!=EBP) { output_modrm(0,4,rt); output_sib(2,map,rs); } else if(addr<128&&addr>=-128) { output_modrm(1,4,rt); output_sib(2,map,rs); output_byte(addr); } else { output_modrm(2,4,rt); output_sib(2,map,rs); output_w32(addr); } } } static void emit_movmem_indexedx4(int addr, int rs, int rt) { assem_debug("mov (%x,%%%s,4),%%%s",addr,regname[rs],regname[rt]); output_byte(0x8B); output_modrm(0,4,rt); output_sib(2,rs,5); output_w32(addr); } static void emit_readdword_tlb(int addr, int map, int rh, int rl) { if(map<0) { if(rh>=0) emit_readword(addr+(int)g_rdram-0x80000000, rh); emit_readword(addr+(int)g_rdram-0x7FFFFFFC, rl); } else { if(rh>=0) emit_movmem_indexedx4(addr, map, rh); emit_movmem_indexedx4(addr+4, map, rl); } } static void emit_readdword_indexed_tlb(int addr, int rs, int map, int rh, int rl) { assert(rh!=rs); if(rh>=0) emit_readword_indexed_tlb(addr, rs, map, rh); emit_readword_indexed_tlb(addr+4, rs, map, rl); } static void emit_movsbl(int addr, int rt) { assem_debug("movsbl %x,%%%s",addr,regname[rt]); output_byte(0x0F); output_byte(0xBE); output_modrm(0,5,rt); output_w32(addr); } static void emit_movsbl_indexed(int addr, int rs, int rt) { assem_debug("movsbl %x+%%%s,%%%s",addr,regname[rs],regname[rt]); output_byte(0x0F); output_byte(0xBE); output_modrm(2,rs,rt); output_w32(addr); } static void emit_movsbl_tlb(int addr, int map, int rt) { if(map<0) emit_movsbl(addr+(int)g_rdram-0x80000000, rt); else { assem_debug("movsbl (%x,%%%s,4),%%%s",addr,regname[map],regname[rt]); output_byte(0x0F); output_byte(0xBE); output_modrm(0,4,rt); output_sib(2,map,5); output_w32(addr); } } static void emit_movsbl_indexed_tlb(int addr, int rs, int map, int rt) { if(map<0) emit_movsbl_indexed(addr+(int)g_rdram-0x80000000, rs, rt); else { assem_debug("movsbl %x(%%%s,%%%s,4),%%%s",addr,regname[rs],regname[map],regname[rt]); assert(rs!=ESP); output_byte(0x0F); output_byte(0xBE); if(addr==0&&rs!=EBP) { output_modrm(0,4,rt); output_sib(2,map,rs); } else if(addr<128&&addr>=-128) { output_modrm(1,4,rt); output_sib(2,map,rs); output_byte(addr); } else { output_modrm(2,4,rt); output_sib(2,map,rs); output_w32(addr); } } } static void emit_movswl(int addr, int rt) { assem_debug("movswl %x,%%%s",addr,regname[rt]); output_byte(0x0F); output_byte(0xBF); output_modrm(0,5,rt); output_w32(addr); } static void emit_movswl_indexed(int addr, int rs, int rt) { assem_debug("movswl %x+%%%s,%%%s",addr,regname[rs],regname[rt]); output_byte(0x0F); output_byte(0xBF); output_modrm(2,rs,rt); output_w32(addr); } static void emit_movswl_tlb(int addr, int map, int rt) { if(map<0) emit_movswl(addr+(int)g_rdram-0x80000000, rt); else { assem_debug("movswl (%x,%%%s,4),%%%s",addr,regname[map],regname[rt]); output_byte(0x0F); output_byte(0xBF); output_modrm(0,4,rt); output_sib(2,map,5); output_w32(addr); } } static void emit_movzbl(int addr, int rt) { assem_debug("movzbl %x,%%%s",addr,regname[rt]); output_byte(0x0F); output_byte(0xB6); output_modrm(0,5,rt); output_w32(addr); } static void emit_movzbl_indexed(int addr, int rs, int rt) { assem_debug("movzbl %x+%%%s,%%%s",addr,regname[rs],regname[rt]); output_byte(0x0F); output_byte(0xB6); output_modrm(2,rs,rt); output_w32(addr); } static void emit_movzbl_tlb(int addr, int map, int rt) { if(map<0) emit_movzbl(addr+(int)g_rdram-0x80000000, rt); else { assem_debug("movzbl (%x,%%%s,4),%%%s",addr,regname[map],regname[rt]); output_byte(0x0F); output_byte(0xB6); output_modrm(0,4,rt); output_sib(2,map,5); output_w32(addr); } } static void emit_movzbl_indexed_tlb(int addr, int rs, int map, int rt) { if(map<0) emit_movzbl_indexed(addr+(int)g_rdram-0x80000000, rs, rt); else { assem_debug("movzbl %x(%%%s,%%%s,4),%%%s",addr,regname[rs],regname[map],regname[rt]); assert(rs!=ESP); output_byte(0x0F); output_byte(0xB6); if(addr==0&&rs!=EBP) { output_modrm(0,4,rt); output_sib(2,map,rs); } else if(addr<128&&addr>=-128) { output_modrm(1,4,rt); output_sib(2,map,rs); output_byte(addr); } else { output_modrm(2,4,rt); output_sib(2,map,rs); output_w32(addr); } } } static void emit_movzwl(int addr, int rt) { assem_debug("movzwl %x,%%%s",addr,regname[rt]); output_byte(0x0F); output_byte(0xB7); output_modrm(0,5,rt); output_w32(addr); } static void emit_movzwl_indexed(int addr, int rs, int rt) { assem_debug("movzwl %x+%%%s,%%%s",addr,regname[rs],regname[rt]); output_byte(0x0F); output_byte(0xB7); output_modrm(2,rs,rt); output_w32(addr); } static void emit_movzwl_tlb(int addr, int map, int rt) { if(map<0) emit_movzwl(addr+(int)g_rdram-0x80000000, rt); else { assem_debug("movzwl (%x,%%%s,4),%%%s",addr,regname[map],regname[rt]); output_byte(0x0F); output_byte(0xB7); output_modrm(0,4,rt); output_sib(2,map,5); output_w32(addr); } } /* static void emit_movzwl_reg(int rs, int rt) { assem_debug("movzwl %%%s,%%%s",regname[rs]+1,regname[rt]); output_byte(0x0F); output_byte(0xB7); output_modrm(3,rs,rt); }*/ static void emit_xchg(int rs, int rt) { assem_debug("xchg %%%s,%%%s",regname[rs],regname[rt]); if(rs==EAX) { output_byte(0x90+rt); } else { output_byte(0x87); output_modrm(3,rs,rt); } } static void emit_writeword(int rt, int addr) { assem_debug("movl %%%s,%x",regname[rt],addr); output_byte(0x89); output_modrm(0,5,rt); output_w32(addr); } static void emit_writeword_indexed(int rt, int addr, int rs) { assem_debug("mov %%%s,%x+%%%s",regname[rt],addr,regname[rs]); output_byte(0x89); if(addr<128&&addr>=-128) { output_modrm(1,rs,rt); if(rs==ESP) output_sib(0,4,4); output_byte(addr); } else { output_modrm(2,rs,rt); if(rs==ESP) output_sib(0,4,4); output_w32(addr); } } static void emit_writeword_indexed_tlb(int rt, int addr, int rs, int map, int temp) { if(map<0) emit_writeword_indexed(rt, addr+(int)g_rdram-0x80000000, rs); else { assem_debug("mov %%%s,%x(%%%s,%%%s,1)",regname[rt],addr,regname[rs],regname[map]); assert(rs!=ESP); output_byte(0x89); if(addr==0&&rs!=EBP) { output_modrm(0,4,rt); output_sib(0,map,rs); } else if(addr<128&&addr>=-128) { output_modrm(1,4,rt); output_sib(0,map,rs); output_byte(addr); } else { output_modrm(2,4,rt); output_sib(0,map,rs); output_w32(addr); } } } static void emit_writedword_indexed_tlb(int rh, int rl, int addr, int rs, int map, int temp) { assert(rh>=0); emit_writeword_indexed_tlb(rh, addr, rs, map, temp); emit_writeword_indexed_tlb(rl, addr+4, rs, map, temp); } static void emit_writehword(int rt, int addr) { assem_debug("movw %%%s,%x",regname[rt]+1,addr); output_byte(0x66); output_byte(0x89); output_modrm(0,5,rt); output_w32(addr); } static void emit_writehword_indexed(int rt, int addr, int rs) { assem_debug("movw %%%s,%x+%%%s",regname[rt]+1,addr,regname[rs]); output_byte(0x66); output_byte(0x89); if(addr<128&&addr>=-128) { output_modrm(1,rs,rt); output_byte(addr); } else { output_modrm(2,rs,rt); output_w32(addr); } } static void emit_writebyte(int rt, int addr) { if(rt<4) { assem_debug("movb %%%cl,%x",regname[rt][1],addr); output_byte(0x88); output_modrm(0,5,rt); output_w32(addr); } else { emit_xchg(EAX,rt); emit_writebyte(EAX,addr); emit_xchg(EAX,rt); } } static void emit_writebyte_indexed(int rt, int addr, int rs) { if(rt<4) { assem_debug("movb %%%cl,%x+%%%s",regname[rt][1],addr,regname[rs]); output_byte(0x88); if(addr<128&&addr>=-128) { output_modrm(1,rs,rt); output_byte(addr); } else { output_modrm(2,rs,rt); output_w32(addr); } } else { emit_xchg(EAX,rt); emit_writebyte_indexed(EAX,addr,rs==EAX?rt:rs); emit_xchg(EAX,rt); } } static void emit_writebyte_indexed_tlb(int rt, int addr, int rs, int map, int temp) { if(map<0) emit_writebyte_indexed(rt, addr+(int)g_rdram-0x80000000, rs); else if(rt<4) { assem_debug("movb %%%cl,%x(%%%s,%%%s,1)",regname[rt][1],addr,regname[rs],regname[map]); assert(rs!=ESP); output_byte(0x88); if(addr==0&&rs!=EBP) { output_modrm(0,4,rt); output_sib(0,map,rs); } else if(addr<128&&addr>=-128) { output_modrm(1,4,rt); output_sib(0,map,rs); output_byte(addr); } else { output_modrm(2,4,rt); output_sib(0,map,rs); output_w32(addr); } } else { emit_xchg(EAX,rt); emit_writebyte_indexed_tlb(EAX,addr,rs==EAX?rt:rs,map==EAX?rt:map,temp); emit_xchg(EAX,rt); } } static void emit_writeword_imm(int imm, int addr) { assem_debug("movl $%x,%x",imm,addr); output_byte(0xC7); output_modrm(0,5,0); output_w32(addr); output_w32(imm); } static void emit_writeword_imm_esp(int imm, int addr) { assem_debug("mov $%x,%x(%%esp)",imm,addr); assert(addr>=-128&&addr<128); output_byte(0xC7); output_modrm(1,4,0); output_sib(0,4,4); output_byte(addr); output_w32(imm); } static void emit_writebyte_imm(int imm, int addr) { assem_debug("movb $%x,%x",imm,addr); assert(imm>=-128&&imm<128); output_byte(0xC6); output_modrm(0,5,0); output_w32(addr); output_byte(imm); } static void emit_mul(int rs) { assem_debug("mul %%%s",regname[rs]); output_byte(0xF7); output_modrm(3,rs,4); } static void emit_imul(int rs) { assem_debug("imul %%%s",regname[rs]); output_byte(0xF7); output_modrm(3,rs,5); } static void emit_div(int rs) { assem_debug("div %%%s",regname[rs]); output_byte(0xF7); output_modrm(3,rs,6); } static void emit_idiv(int rs) { assem_debug("idiv %%%s",regname[rs]); output_byte(0xF7); output_modrm(3,rs,7); } static void emit_cdq() { assem_debug("cdq"); output_byte(0x99); } // Load 2 immediates optimizing for small code size static void emit_mov2imm_compact(int imm1,u_int rt1,int imm2,u_int rt2) { emit_movimm(imm1,rt1); if(imm2-imm1<128&&imm2-imm1>=-128) emit_addimm(rt1,imm2-imm1,rt2); else emit_movimm(imm2,rt2); } // special case for checking pending_exception static void emit_cmpmem_imm_byte(int addr,int imm) { assert(imm<128&&imm>=-127); assem_debug("cmpb $%d,%x",imm,addr); output_byte(0x80); output_modrm(0,5,7); output_w32(addr); output_byte(imm); } // special case for checking invalid_code static void emit_cmpmem_indexedsr12_imm(int addr,int r,int imm) { assert(imm<128&&imm>=-127); assert(r>=0&&r<8); emit_shrimm(r,12,r); assem_debug("cmp $%d,%x+%%%s",imm,addr,regname[r]); output_byte(0x80); output_modrm(2,r,7); output_w32(addr); output_byte(imm); } // special case for checking hash_table static void emit_cmpmem_indexed(int addr,int rs,int rt) { assert(rs>=0&&rs<8); assert(rt>=0&&rt<8); assem_debug("cmp %x+%%%s,%%%s",addr,regname[rs],regname[rt]); output_byte(0x39); output_modrm(2,rs,rt); output_w32(addr); } // Used to preload hash table entries #ifdef IMM_PREFETCH static void emit_prefetch(void *addr) { assem_debug("prefetch %x",(int)addr); output_byte(0x0F); output_byte(0x18); output_modrm(0,5,1); output_w32((int)addr); } #endif /*void emit_submem(int r,int addr) { assert(r>=0&&r<8); assem_debug("sub %x,%%%s",addr,regname[r]); output_byte(0x2B); output_modrm(0,5,r); output_w32((int)addr); } static void emit_subfrommem(int addr,int r) { assert(r>=0&&r<8); assem_debug("sub %%%s,%x",regname[r],addr); output_byte(0x29); output_modrm(0,5,r); output_w32((int)addr); }*/ static void emit_flds(int r) { assem_debug("flds (%%%s)",regname[r]); output_byte(0xd9); if(r!=EBP) output_modrm(0,r,0); else {output_modrm(1,EBP,0);output_byte(0);} } static void emit_fldl(int r) { assem_debug("fldl (%%%s)",regname[r]); output_byte(0xdd); if(r!=EBP) output_modrm(0,r,0); else {output_modrm(1,EBP,0);output_byte(0);} } static void emit_fucomip(u_int r) { assem_debug("fucomip %d",r); assert(r<8); output_byte(0xdf); output_byte(0xe8+r); } static void emit_fchs() { assem_debug("fchs"); output_byte(0xd9); output_byte(0xe0); } static void emit_fabs() { assem_debug("fabs"); output_byte(0xd9); output_byte(0xe1); } static void emit_fsqrt() { assem_debug("fsqrt"); output_byte(0xd9); output_byte(0xfa); } static void emit_fadds(int r) { assem_debug("fadds (%%%s)",regname[r]); output_byte(0xd8); if(r!=EBP) output_modrm(0,r,0); else {output_modrm(1,EBP,0);output_byte(0);} } static void emit_faddl(int r) { assem_debug("faddl (%%%s)",regname[r]); output_byte(0xdc); if(r!=EBP) output_modrm(0,r,0); else {output_modrm(1,EBP,0);output_byte(0);} } static void emit_fadd(int r) { assem_debug("fadd st%d",r); output_byte(0xd8); output_byte(0xc0+r); } static void emit_fsubs(int r) { assem_debug("fsubs (%%%s)",regname[r]); output_byte(0xd8); if(r!=EBP) output_modrm(0,r,4); else {output_modrm(1,EBP,4);output_byte(0);} } static void emit_fsubl(int r) { assem_debug("fsubl (%%%s)",regname[r]); output_byte(0xdc); if(r!=EBP) output_modrm(0,r,4); else {output_modrm(1,EBP,4);output_byte(0);} } static void emit_fsub(int r) { assem_debug("fsub st%d",r); output_byte(0xd8); output_byte(0xe0+r); } static void emit_fmuls(int r) { assem_debug("fmuls (%%%s)",regname[r]); output_byte(0xd8); if(r!=EBP) output_modrm(0,r,1); else {output_modrm(1,EBP,1);output_byte(0);} } static void emit_fmull(int r) { assem_debug("fmull (%%%s)",regname[r]); output_byte(0xdc); if(r!=EBP) output_modrm(0,r,1); else {output_modrm(1,EBP,1);output_byte(0);} } static void emit_fmul(int r) { assem_debug("fmul st%d",r); output_byte(0xd8); output_byte(0xc8+r); } static void emit_fdivs(int r) { assem_debug("fdivs (%%%s)",regname[r]); output_byte(0xd8); if(r!=EBP) output_modrm(0,r,6); else {output_modrm(1,EBP,6);output_byte(0);} } static void emit_fdivl(int r) { assem_debug("fdivl (%%%s)",regname[r]); output_byte(0xdc); if(r!=EBP) output_modrm(0,r,6); else {output_modrm(1,EBP,6);output_byte(0);} } static void emit_fdiv(int r) { assem_debug("fdiv st%d",r); output_byte(0xd8); output_byte(0xf0+r); } static void emit_fpop() { // fstp st(0) assem_debug("fpop"); output_byte(0xdd); output_byte(0xd8); } static void emit_fildl(int r) { assem_debug("fildl (%%%s)",regname[r]); output_byte(0xdb); if(r!=EBP) output_modrm(0,r,0); else {output_modrm(1,EBP,0);output_byte(0);} } static void emit_fildll(int r) { assem_debug("fildll (%%%s)",regname[r]); output_byte(0xdf); if(r!=EBP) output_modrm(0,r,5); else {output_modrm(1,EBP,5);output_byte(0);} } static void emit_fistpl(int r) { assem_debug("fistpl (%%%s)",regname[r]); output_byte(0xdb); if(r!=EBP) output_modrm(0,r,3); else {output_modrm(1,EBP,3);output_byte(0);} } static void emit_fistpll(int r) { assem_debug("fistpll (%%%s)",regname[r]); output_byte(0xdf); if(r!=EBP) output_modrm(0,r,7); else {output_modrm(1,EBP,7);output_byte(0);} } static void emit_fstps(int r) { assem_debug("fstps (%%%s)",regname[r]); output_byte(0xd9); if(r!=EBP) output_modrm(0,r,3); else {output_modrm(1,EBP,3);output_byte(0);} } static void emit_fstpl(int r) { assem_debug("fstpl (%%%s)",regname[r]); output_byte(0xdd); if(r!=EBP) output_modrm(0,r,3); else {output_modrm(1,EBP,3);output_byte(0);} } static void emit_fnstcw_stack() { assem_debug("fnstcw (%%esp)"); output_byte(0xd9); output_modrm(0,4,7); output_sib(0,4,4); } static void emit_fldcw_stack() { assem_debug("fldcw (%%esp)"); output_byte(0xd9); output_modrm(0,4,5); output_sib(0,4,4); } static void emit_fldcw_indexed(int addr,int r) { assem_debug("fldcw %x(%%%s)",addr,regname[r]); output_byte(0xd9); output_modrm(0,4,5); output_sib(1,r,5); output_w32(addr); } static void emit_fldcw(int addr) { assem_debug("fldcw %x",addr); output_byte(0xd9); output_modrm(0,5,5); output_w32(addr); } #ifdef __SSE__ static void emit_movss_load(u_int addr,u_int ssereg) { assem_debug("movss (%%%s),xmm%d",regname[addr],ssereg); assert(ssereg<8); output_byte(0xf3); output_byte(0x0f); output_byte(0x10); if(addr!=EBP) output_modrm(0,addr,ssereg); else {output_modrm(1,EBP,ssereg);output_byte(0);} } static void emit_movsd_load(u_int addr,u_int ssereg) { assem_debug("movsd (%%%s),xmm%d",regname[addr],ssereg); assert(ssereg<8); output_byte(0xf2); output_byte(0x0f); output_byte(0x10); if(addr!=EBP) output_modrm(0,addr,ssereg); else {output_modrm(1,EBP,ssereg);output_byte(0);} } static void emit_movd_store(u_int ssereg,u_int addr) { assem_debug("movd xmm%d,(%%%s)",ssereg,regname[addr]); assert(ssereg<8); output_byte(0x66); output_byte(0x0f); output_byte(0x7e); if(addr!=EBP) output_modrm(0,addr,ssereg); else {output_modrm(1,EBP,ssereg);output_byte(0);} } static void emit_cvttps2dq(u_int ssereg1,u_int ssereg2) { assem_debug("cvttps2dq xmm%d,xmm%d",ssereg1,ssereg2); assert(ssereg1<8); assert(ssereg2<8); output_byte(0xf3); output_byte(0x0f); output_byte(0x5b); output_modrm(3,ssereg1,ssereg2); } static void emit_cvttpd2dq(u_int ssereg1,u_int ssereg2) { assem_debug("cvttpd2dq xmm%d,xmm%d",ssereg1,ssereg2); assert(ssereg1<8); assert(ssereg2<8); output_byte(0x66); output_byte(0x0f); output_byte(0xe6); output_modrm(3,ssereg1,ssereg2); } #endif /* Stubs/epilogue */ static void emit_extjump2(int addr, int target, int linker) { u_char *ptr=(u_char *)addr; if(*ptr==0x0f) { assert(ptr[1]>=0x80&&ptr[1]<=0x8f); addr+=2; } else { assert(*ptr==0xe8||*ptr==0xe9); addr++; } emit_movimm(target,EAX); emit_movimm(addr,EBX); //assert(addr>=0x7000000&&addr<0x7FFFFFF); //assert((target>=0x80000000&&target<0x80800000)||(target>0xA4000000&&target<0xA4001000)); //DEBUG > #ifdef DEBUG_CYCLE_COUNT emit_readword((int)&last_count,ECX); emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_readword((int)&next_interupt,ECX); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); emit_sub(HOST_CCREG,ECX,HOST_CCREG); emit_writeword(ECX,(int)&last_count); #endif //DEBUG < emit_jmp(linker); } static void emit_extjump(int addr, int target) { emit_extjump2(addr, target, (int)dyna_linker); } static void emit_extjump_ds(int addr, int target) { emit_extjump2(addr, target, (int)dyna_linker_ds); } static void do_readstub(int n) { assem_debug("do_readstub %x",start+stubs[n][3]*4); set_jump_target(stubs[n][1],(int)out); int type=stubs[n][0]; int i=stubs[n][3]; int rs=stubs[n][4]; struct regstat *i_regs=(struct regstat *)stubs[n][5]; signed char *i_regmap=i_regs->regmap; int addr=get_reg(i_regmap,AGEN1+(i&1)); int rth,rt; int ds; if(itype[i]==C1LS||itype[i]==LOADLR) { rth=get_reg(i_regmap,FTEMP|64); rt=get_reg(i_regmap,FTEMP); }else{ rth=get_reg(i_regmap,rt1[i]|64); rt=get_reg(i_regmap,rt1[i]); } assert(rs>=0); if(addr<0) addr=rt; if(addr<0&&itype[i]!=C1LS&&itype[i]!=LOADLR) addr=get_reg(i_regmap,-1); assert(addr>=0); int ftable=0; if(type==LOADB_STUB||type==LOADBU_STUB) ftable=(int)readmemb; if(type==LOADH_STUB||type==LOADHU_STUB) ftable=(int)readmemh; if(type==LOADW_STUB) ftable=(int)readmem; if(type==LOADD_STUB) ftable=(int)readmemd; emit_writeword(rs,(int)&address); emit_shrimm(rs,16,addr); emit_movmem_indexedx4(ftable,addr,addr); emit_pusha(); ds=i_regs!=®s[i]; int real_rs=(itype[i]==LOADLR)?-1:get_reg(i_regmap,rs1[i]); if(!ds) load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty&~(1<regmap_entry,i_regs->was32,i_regs->wasdirty&~(1<>rs1[i])&1)<<1)+ds,32); emit_add(cc,temp,cc); emit_writeword(cc,(int)&g_cp0_regs[CP0_COUNT_REG]); emit_callreg(addr); // We really shouldn't need to update the count here, // but not doing so causes random crashes... emit_readword((int)&g_cp0_regs[CP0_COUNT_REG],HOST_CCREG); emit_readword((int)&next_interupt,ECX); emit_addimm(HOST_CCREG,-(int)CLOCK_DIVIDER*(stubs[n][6]+1),HOST_CCREG); emit_sub(HOST_CCREG,ECX,HOST_CCREG); emit_writeword(ECX,(int)&last_count); emit_storereg(CCREG,HOST_CCREG); emit_popa(); if((cc=get_reg(i_regmap,CCREG))>=0) { emit_loadreg(CCREG,cc); } if(rt>=0) { if(type==LOADB_STUB) emit_movsbl((int)&readmem_dword,rt); if(type==LOADBU_STUB) emit_movzbl((int)&readmem_dword,rt); if(type==LOADH_STUB) emit_movswl((int)&readmem_dword,rt); if(type==LOADHU_STUB) emit_movzwl((int)&readmem_dword,rt); if(type==LOADW_STUB) emit_readword((int)&readmem_dword,rt); if(type==LOADD_STUB) { emit_readword((int)&readmem_dword,rt); if(rth>=0) emit_readword(((int)&readmem_dword)+4,rth); } } emit_jmp(stubs[n][2]); // return address } static void inline_readstub(int type, int i, u_int addr, signed char regmap[], int target, int adj, u_int reglist) { assem_debug("inline_readstub"); int rs=get_reg(regmap,target); int rth=get_reg(regmap,target|64); int rt=get_reg(regmap,target); if(rs<0) rs=get_reg(regmap,-1); assert(rs>=0); int ftable=0; if(type==LOADB_STUB||type==LOADBU_STUB) ftable=(int)readmemb; if(type==LOADH_STUB||type==LOADHU_STUB) ftable=(int)readmemh; if(type==LOADW_STUB) ftable=(int)readmem; if(type==LOADD_STUB) ftable=(int)readmemd; #ifdef HOST_IMM_ADDR32 emit_writeword_imm(addr,(int)&address); #else emit_writeword(rs,(int)&address); #endif emit_pusha(); if((signed int)addr>=(signed int)0xC0000000) { // Theoretically we can have a pagefault here, if the TLB has never // been enabled and the address is outside the range 80000000..BFFFFFFF // Write out the registers so the pagefault can be handled. This is // a very rare case and likely represents a bug. int ds=regmap!=regs[i].regmap; if(!ds) load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty,i); if(!ds) wb_dirtys(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty); else wb_dirtys(branch_regs[i-1].regmap_entry,branch_regs[i-1].was32,branch_regs[i-1].wasdirty); } int cc=get_reg(regmap,CCREG); int temp; if(cc<0) { if(rs==HOST_CCREG) { cc=0;temp=1; assert(cc!=HOST_CCREG); assert(temp!=HOST_CCREG); emit_loadreg(CCREG,cc); } else { cc=HOST_CCREG; emit_loadreg(CCREG,cc); temp=!rs; } } else { temp=!rs; } emit_readword((int)&last_count,temp); emit_addimm(cc,CLOCK_DIVIDER*(adj+1),cc); emit_add(cc,temp,cc); emit_writeword(cc,(int)&g_cp0_regs[CP0_COUNT_REG]); if((signed int)addr>=(signed int)0xC0000000) { // Pagefault address int ds=regmap!=regs[i].regmap; emit_writeword_imm_esp(start+i*4+(((regs[i].was32>>rs1[i])&1)<<1)+ds,32); } emit_call(((u_int *)ftable)[addr>>16]); // We really shouldn't need to update the count here, // but not doing so causes random crashes... emit_readword((int)&g_cp0_regs[CP0_COUNT_REG],HOST_CCREG); emit_readword((int)&next_interupt,ECX); emit_addimm(HOST_CCREG,-(int)CLOCK_DIVIDER*(adj+1),HOST_CCREG); emit_sub(HOST_CCREG,ECX,HOST_CCREG); emit_writeword(ECX,(int)&last_count); emit_storereg(CCREG,HOST_CCREG); emit_popa(); if((cc=get_reg(regmap,CCREG))>=0) { emit_loadreg(CCREG,cc); } if(rt>=0) { if(type==LOADB_STUB) emit_movsbl((int)&readmem_dword,rt); if(type==LOADBU_STUB) emit_movzbl((int)&readmem_dword,rt); if(type==LOADH_STUB) emit_movswl((int)&readmem_dword,rt); if(type==LOADHU_STUB) emit_movzwl((int)&readmem_dword,rt); if(type==LOADW_STUB) emit_readword((int)&readmem_dword,rt); if(type==LOADD_STUB) { emit_readword((int)&readmem_dword,rt); if(rth>=0) emit_readword(((int)&readmem_dword)+4,rth); } } } static void do_writestub(int n) { assem_debug("do_writestub %x",start+stubs[n][3]*4); set_jump_target(stubs[n][1],(int)out); int type=stubs[n][0]; int i=stubs[n][3]; int rs=stubs[n][4]; struct regstat *i_regs=(struct regstat *)stubs[n][5]; signed char *i_regmap=i_regs->regmap; int addr=get_reg(i_regmap,AGEN1+(i&1)); int rth,rt,r; int ds; if(itype[i]==C1LS) { rth=get_reg(i_regmap,FTEMP|64); rt=get_reg(i_regmap,r=FTEMP); }else{ rth=get_reg(i_regmap,rs2[i]|64); rt=get_reg(i_regmap,r=rs2[i]); } assert(rs>=0); assert(rt>=0); if(addr<0) addr=get_reg(i_regmap,-1); assert(addr>=0); int ftable=0; if(type==STOREB_STUB) ftable=(int)writememb; if(type==STOREH_STUB) ftable=(int)writememh; if(type==STOREW_STUB) ftable=(int)writemem; if(type==STORED_STUB) ftable=(int)writememd; emit_writeword(rs,(int)&address); emit_shrimm(rs,16,addr); emit_movmem_indexedx4(ftable,addr,addr); if(type==STOREB_STUB) emit_writebyte(rt,(int)&cpu_byte); if(type==STOREH_STUB) emit_writehword(rt,(int)&cpu_hword); if(type==STOREW_STUB) emit_writeword(rt,(int)&cpu_word); if(type==STORED_STUB) { emit_writeword(rt,(int)&cpu_dword); emit_writeword(r?rth:rt,(int)&cpu_dword+4); } emit_pusha(); ds=i_regs!=®s[i]; int real_rs=get_reg(i_regmap,rs1[i]); if(!ds) load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty&~(1<regmap_entry,i_regs->was32,i_regs->wasdirty&~(1<>rs1[i])&1)<<1)+ds,32); emit_add(cc,temp,cc); emit_writeword(cc,(int)&g_cp0_regs[CP0_COUNT_REG]); emit_callreg(addr); emit_readword((int)&g_cp0_regs[CP0_COUNT_REG],HOST_CCREG); emit_readword((int)&next_interupt,ECX); emit_addimm(HOST_CCREG,-(int)CLOCK_DIVIDER*(stubs[n][6]+1),HOST_CCREG); emit_sub(HOST_CCREG,ECX,HOST_CCREG); emit_writeword(ECX,(int)&last_count); emit_storereg(CCREG,HOST_CCREG); emit_popa(); if((cc=get_reg(i_regmap,CCREG))>=0) { emit_loadreg(CCREG,cc); } emit_jmp(stubs[n][2]); // return address } static void inline_writestub(int type, int i, u_int addr, signed char regmap[], int target, int adj, u_int reglist) { assem_debug("inline_writestub"); int rs=get_reg(regmap,-1); int rth=get_reg(regmap,target|64); int rt=get_reg(regmap,target); assert(rs>=0); assert(rt>=0); int ftable=0; if(type==STOREB_STUB) ftable=(int)writememb; if(type==STOREH_STUB) ftable=(int)writememh; if(type==STOREW_STUB) ftable=(int)writemem; if(type==STORED_STUB) ftable=(int)writememd; emit_writeword(rs,(int)&address); if(type==STOREB_STUB) emit_writebyte(rt,(int)&cpu_byte); if(type==STOREH_STUB) emit_writehword(rt,(int)&cpu_hword); if(type==STOREW_STUB) emit_writeword(rt,(int)&cpu_word); if(type==STORED_STUB) { emit_writeword(rt,(int)&cpu_dword); emit_writeword(target?rth:rt,(int)&cpu_dword+4); } emit_pusha(); if((signed int)addr>=(signed int)0xC0000000) { // Theoretically we can have a pagefault here, if the TLB has never // been enabled and the address is outside the range 80000000..BFFFFFFF // Write out the registers so the pagefault can be handled. This is // a very rare case and likely represents a bug. int ds=regmap!=regs[i].regmap; if(!ds) load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty,i); if(!ds) wb_dirtys(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty); else wb_dirtys(branch_regs[i-1].regmap_entry,branch_regs[i-1].was32,branch_regs[i-1].wasdirty); } int cc=get_reg(regmap,CCREG); int temp; if(cc<0) { if(rs==HOST_CCREG) { cc=0;temp=1; assert(cc!=HOST_CCREG); assert(temp!=HOST_CCREG); emit_loadreg(CCREG,cc); } else { cc=HOST_CCREG; emit_loadreg(CCREG,cc); temp=!rs; } } else { temp=!rs; } emit_readword((int)&last_count,temp); emit_addimm(cc,CLOCK_DIVIDER*(adj+1),cc); emit_add(cc,temp,cc); emit_writeword(cc,(int)&g_cp0_regs[CP0_COUNT_REG]); if((signed int)addr>=(signed int)0xC0000000) { // Pagefault address int ds=regmap!=regs[i].regmap; emit_writeword_imm_esp(start+i*4+(((regs[i].was32>>rs1[i])&1)<<1)+ds,32); } emit_call(((u_int *)ftable)[addr>>16]); emit_readword((int)&g_cp0_regs[CP0_COUNT_REG],HOST_CCREG); emit_readword((int)&next_interupt,ECX); emit_addimm(HOST_CCREG,-(int)CLOCK_DIVIDER*(adj+1),HOST_CCREG); emit_sub(HOST_CCREG,ECX,HOST_CCREG); emit_writeword(ECX,(int)&last_count); emit_storereg(CCREG,HOST_CCREG); emit_popa(); if((cc=get_reg(regmap,CCREG))>=0) { emit_loadreg(CCREG,cc); } } static void do_unalignedwritestub(int n) { set_jump_target(stubs[n][1],(int)out); output_byte(0xCC); emit_jmp(stubs[n][2]); // return address } static void do_invstub(int n) { set_jump_target(stubs[n][1],(int)out); emit_call(invalidate_block_reg[stubs[n][4]]); emit_jmp(stubs[n][2]); // return address } static int do_dirty_stub(int i) { assem_debug("do_dirty_stub %x",start+i*4); emit_pushimm(start+i*4); emit_movimm((int)start<(int)0xC0000000?(int)source:(int)start,EAX); emit_movimm((int)copy,EBX); emit_movimm(slen*4,ECX); emit_call((int)start<(int)0xC0000000?(int)&verify_code:(int)&verify_code_vm); emit_addimm(ESP,4,ESP); int entry=(int)out; load_regs_entry(i); if(entry==(int)out) entry=instr_addr[i]; emit_jmp(instr_addr[i]); return entry; } static void do_dirty_stub_ds() { emit_pushimm(start+1); emit_movimm((int)start<(int)0xC0000000?(int)source:(int)start,EAX); emit_movimm((int)copy,EBX); emit_movimm(slen*4,ECX); emit_call((int)&verify_code_ds); emit_addimm(ESP,4,ESP); } static void do_cop1stub(int n) { assem_debug("do_cop1stub %x",start+stubs[n][3]*4); set_jump_target(stubs[n][1],(int)out); int i=stubs[n][3]; struct regstat *i_regs=(struct regstat *)stubs[n][5]; int ds=stubs[n][6]; if(!ds) { load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty,i); //if(i_regs!=®s[i]) DebugMessage(M64MSG_VERBOSE, "oops: regs[i]=%x i_regs=%x",(int)®s[i],(int)i_regs); } //else {DebugMessage(M64MSG_VERBOSE, "fp exception in delay slot");} wb_dirtys(i_regs->regmap_entry,i_regs->was32,i_regs->wasdirty); if(regs[i].regmap_entry[HOST_CCREG]!=CCREG) emit_loadreg(CCREG,HOST_CCREG); emit_movimm(start+(i-ds)*4,EAX); // Get PC emit_addimm(HOST_CCREG,CLOCK_DIVIDER*ccadj[i],HOST_CCREG); // CHECK: is this right? There should probably be an extra cycle... emit_jmp(ds?(int)fp_exception_ds:(int)fp_exception); } /* TLB */ static int do_tlb_r(int s,int ar,int map,int cache,int x,int a,int shift,int c,u_int addr) { if(c) { if((signed int)addr>=(signed int)0xC0000000) { emit_readword((int)(memory_map+(addr>>12)),map); } else return -1; // No mapping } else { if(s!=map) emit_mov(s,map); emit_shrimm(map,12,map); // Schedule this while we wait on the load //if(x) emit_xorimm(addr,x,addr); if(shift>=0) emit_lea8(s,shift); if(~a) emit_andimm(s,a,ar); emit_movmem_indexedx4((int)memory_map,map,map); } return map; } static int do_tlb_r_branch(int map, int c, u_int addr, int *jaddr) { if(!c||(signed int)addr>=(signed int)0xC0000000) { emit_test(map,map); *jaddr=(int)out; emit_js(0); } return map; } static void gen_tlb_addr_r(int ar, int map) { if(map>=0) { emit_leairrx4(0,ar,map,ar); } } static int do_tlb_w(int s,int ar,int map,int cache,int x,int c,u_int addr) { if(c) { if(addr<0x80800000||addr>=0xC0000000) { emit_readword((int)(memory_map+(addr>>12)),map); } else return -1; // No mapping } else { if(s!=map) emit_mov(s,map); //if(s!=ar) emit_mov(s,ar); emit_shrimm(map,12,map); // Schedule this while we wait on the load //if(x) emit_xorimm(s,x,addr); emit_movmem_indexedx4((int)memory_map,map,map); } emit_shlimm(map,2,map); return map; } static void do_tlb_w_branch(int map, int c, u_int addr, int *jaddr) { if(!c||addr<0x80800000||addr>=0xC0000000) { *jaddr=(int)out; emit_jc(0); } } static void gen_tlb_addr_w(int ar, int map) { if(map>=0) { emit_leairrx1(0,ar,map,ar); } } // We don't need this for x86 static void generate_map_const(u_int addr,int reg) { // void *mapaddr=memory_map+(addr>>12); } /* Special assem */ static void shift_assemble_x86(int i,struct regstat *i_regs) { if(rt1[i]) { if(opcode2[i]<=0x07) // SLLV/SRLV/SRAV { char s,t,shift; t=get_reg(i_regs->regmap,rt1[i]); s=get_reg(i_regs->regmap,rs1[i]); shift=get_reg(i_regs->regmap,rs2[i]); if(t>=0){ if(rs1[i]==0) { emit_zeroreg(t); } else if(rs2[i]==0) { assert(s>=0); if(s!=t) emit_mov(s,t); } else { char temp=get_reg(i_regs->regmap,-1); assert(s>=0); if(t==ECX&&s!=ECX) { if(shift!=ECX) emit_mov(shift,ECX); if(rt1[i]==rs2[i]) {shift=temp;} if(s!=shift) emit_mov(s,shift); } else { if(rt1[i]==rs2[i]) {emit_mov(shift,temp);shift=temp;} if(s!=t) emit_mov(s,t); if(shift!=ECX) { if(i_regs->regmap[ECX]<0) emit_mov(shift,ECX); else emit_xchg(shift,ECX); } } if(opcode2[i]==4) // SLLV { emit_shlcl(t==ECX?shift:t); } if(opcode2[i]==6) // SRLV { emit_shrcl(t==ECX?shift:t); } if(opcode2[i]==7) // SRAV { emit_sarcl(t==ECX?shift:t); } if(shift!=ECX&&i_regs->regmap[ECX]>=0) emit_xchg(shift,ECX); } } } else { // DSLLV/DSRLV/DSRAV char sh,sl,th,tl,shift; th=get_reg(i_regs->regmap,rt1[i]|64); tl=get_reg(i_regs->regmap,rt1[i]); sh=get_reg(i_regs->regmap,rs1[i]|64); sl=get_reg(i_regs->regmap,rs1[i]); shift=get_reg(i_regs->regmap,rs2[i]); if(tl>=0){ if(rs1[i]==0) { emit_zeroreg(tl); if(th>=0) emit_zeroreg(th); } else if(rs2[i]==0) { assert(sl>=0); if(sl!=tl) emit_mov(sl,tl); if(th>=0&&sh!=th) emit_mov(sh,th); } else { // FIXME: What if shift==tl ? assert(shift!=tl); int temp=get_reg(i_regs->regmap,-1); int real_th=th; if(th<0&&opcode2[i]!=0x14) {th=temp;} // DSLLV doesn't need a temporary register assert(sl>=0); assert(sh>=0); if(tl==ECX&&sl!=ECX) { if(shift!=ECX) emit_mov(shift,ECX); if(sl!=shift) emit_mov(sl,shift); if(th>=0 && sh!=th) emit_mov(sh,th); } else if(th==ECX&&sh!=ECX) { if(shift!=ECX) emit_mov(shift,ECX); if(sh!=shift) emit_mov(sh,shift); if(sl!=tl) emit_mov(sl,tl); } else { if(sl!=tl) emit_mov(sl,tl); if(th>=0 && sh!=th) emit_mov(sh,th); if(shift!=ECX) { if(i_regs->regmap[ECX]<0) emit_mov(shift,ECX); else emit_xchg(shift,ECX); } } if(opcode2[i]==0x14) // DSLLV { if(th>=0) emit_shldcl(th==ECX?shift:th,tl==ECX?shift:tl); emit_shlcl(tl==ECX?shift:tl); emit_testimm(ECX,32); if(th>=0) emit_cmovne_reg(tl==ECX?shift:tl,th==ECX?shift:th); emit_cmovne(&const_zero,tl==ECX?shift:tl); } if(opcode2[i]==0x16) // DSRLV { assert(th>=0); emit_shrdcl(tl==ECX?shift:tl,th==ECX?shift:th); emit_shrcl(th==ECX?shift:th); emit_testimm(ECX,32); emit_cmovne_reg(th==ECX?shift:th,tl==ECX?shift:tl); if(real_th>=0) emit_cmovne(&const_zero,th==ECX?shift:th); } if(opcode2[i]==0x17) // DSRAV { assert(th>=0); emit_shrdcl(tl==ECX?shift:tl,th==ECX?shift:th); if(real_th>=0) { assert(temp>=0); emit_mov(th==ECX?shift:th,temp==ECX?shift:temp); } emit_sarcl(th==ECX?shift:th); if(real_th>=0) emit_sarimm(temp==ECX?shift:temp,31,temp==ECX?shift:temp); emit_testimm(ECX,32); emit_cmovne_reg(th==ECX?shift:th,tl==ECX?shift:tl); if(real_th>=0) emit_cmovne_reg(temp==ECX?shift:temp,th==ECX?shift:th); } if(shift!=ECX&&(i_regs->regmap[ECX]>=0||temp==ECX)) emit_xchg(shift,ECX); } } } } } #define shift_assemble shift_assemble_x86 static void loadlr_assemble_x86(int i,struct regstat *i_regs) { int s,th,tl,temp,temp2,addr,map=-1; int offset; int jaddr=0; int memtarget,c=0; u_int hr,reglist=0; th=get_reg(i_regs->regmap,rt1[i]|64); tl=get_reg(i_regs->regmap,rt1[i]); s=get_reg(i_regs->regmap,rs1[i]); temp=get_reg(i_regs->regmap,-1); temp2=get_reg(i_regs->regmap,FTEMP); addr=get_reg(i_regs->regmap,AGEN1+(i&1)); assert(addr<0); offset=imm[i]; for(hr=0;hrregmap[hr]>=0) reglist|=1<=0) { c=(i_regs->wasconst>>s)&1; memtarget=((signed int)(constmap[i][s]+offset))<(signed int)0x80800000; if(using_tlb&&((signed int)(constmap[i][s]+offset))>=(signed int)0xC0000000) memtarget=1; } if(!using_tlb) { if(!c) { emit_lea8(addr,temp); if (opcode[i]==0x22||opcode[i]==0x26) { emit_andimm(addr,0xFFFFFFFC,temp2); // LWL/LWR }else{ emit_andimm(addr,0xFFFFFFF8,temp2); // LDL/LDR } emit_cmpimm(addr,0x800000); jaddr=(int)out; emit_jno(0); } else { if (opcode[i]==0x22||opcode[i]==0x26) { emit_movimm(((constmap[i][s]+offset)<<3)&24,temp); // LWL/LWR }else{ emit_movimm(((constmap[i][s]+offset)<<3)&56,temp); // LDL/LDR } } }else{ // using tlb int a; if(c) { a=-1; }else if (opcode[i]==0x22||opcode[i]==0x26) { a=0xFFFFFFFC; // LWL/LWR }else{ a=0xFFFFFFF8; // LDL/LDR } map=get_reg(i_regs->regmap,TLREG); assert(map>=0); reglist&=~(1<regmap,FTEMP,ccadj[i],reglist); if(rt1[i]) { assert(tl>=0); emit_andimm(temp,24,temp); if (opcode[i]==0x26) emit_xorimm(temp,24,temp); // LWR if(temp==ECX) { int temp3=EDX; if(temp3==temp2) temp3++; emit_pushreg(temp3); emit_movimm(-1,temp3); if (opcode[i]==0x26) { emit_shrcl(temp3); emit_shrcl(temp2); }else{ emit_shlcl(temp3); emit_shlcl(temp2); } emit_mov(temp3,ECX); emit_not(ECX,ECX); emit_popreg(temp3); } else { int temp3=EBP; if(temp3==temp) temp3++; if(temp3==temp2) temp3++; if(temp3==temp) temp3++; emit_xchg(ECX,temp); emit_pushreg(temp3); emit_movimm(-1,temp3); if (opcode[i]==0x26) { emit_shrcl(temp3); emit_shrcl(temp2==ECX?temp:temp2); }else{ emit_shlcl(temp3); emit_shlcl(temp2==ECX?temp:temp2); } emit_not(temp3,temp3); emit_mov(temp,ECX); emit_mov(temp3,temp); emit_popreg(temp3); } emit_and(temp,tl,tl); emit_or(temp2,tl,tl); //emit_storereg(rt1[i],tl); // DEBUG /*emit_pusha(); //save_regs(0x100f); emit_readword((int)&last_count,ECX); if(get_reg(i_regs->regmap,CCREG)<0) emit_loadreg(CCREG,HOST_CCREG); emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_addimm(HOST_CCREG,2*ccadj[i],HOST_CCREG); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); emit_call((int)memdebug); emit_popa(); //restore_regs(0x100f);*/ } } if (opcode[i]==0x1A||opcode[i]==0x1B) { // LDL/LDR if(s>=0) if((i_regs->wasdirty>>s)&1) emit_storereg(rs1[i],s); if(get_reg(i_regs->regmap,rs1[i]|64)>=0) if((i_regs->wasdirty>>get_reg(i_regs->regmap,rs1[i]|64))&1) emit_storereg(rs1[i]|64,get_reg(i_regs->regmap,rs1[i]|64)); int temp2h=get_reg(i_regs->regmap,FTEMP|64); if(!c||memtarget) { //if(th>=0) emit_readword_indexed((int)g_rdram-0x80000000,temp2,temp2h); //emit_readword_indexed((int)g_rdram-0x7FFFFFFC,temp2,temp2); emit_readdword_indexed_tlb(0,temp2,map,temp2h,temp2); if(jaddr) add_stub(LOADD_STUB,jaddr,(int)out,i,temp2,(int)i_regs,ccadj[i],reglist); } else inline_readstub(LOADD_STUB,i,(constmap[i][s]+offset)&0xFFFFFFF8,i_regs->regmap,FTEMP,ccadj[i],reglist); if(rt1[i]) { assert(th>=0); assert(tl>=0); emit_andimm(temp,56,temp); emit_pushreg(temp); emit_pushreg(temp2h); emit_pushreg(temp2); emit_pushreg(th); emit_pushreg(tl); if(opcode[i]==0x1A) emit_call((int)ldl_merge); if(opcode[i]==0x1B) emit_call((int)ldr_merge); emit_addimm(ESP,20,ESP); if(tl!=EDX) { if(tl!=EAX) emit_mov(EAX,tl); if(th!=EDX) emit_mov(EDX,th); } else if(th!=EAX) { if(th!=EDX) emit_mov(EDX,th); if(tl!=EAX) emit_mov(EAX,tl); } else { emit_xchg(EAX,EDX); } if(s>=0) emit_loadreg(rs1[i],s); if(get_reg(i_regs->regmap,rs1[i]|64)>=0) emit_loadreg(rs1[i]|64,get_reg(i_regs->regmap,rs1[i]|64)); } } } #define loadlr_assemble loadlr_assemble_x86 static void cop0_assemble(int i,struct regstat *i_regs) { if(opcode2[i]==0) // MFC0 { if(rt1[i]) { signed char t=get_reg(i_regs->regmap,rt1[i]); char copr=(source[i]>>11)&0x1f; if(t>=0) { emit_writeword_imm((int)&fake_pc,(int)&PC); emit_writebyte_imm((source[i]>>11)&0x1f,(int)&(fake_pc.f.r.nrd)); if(copr==9) { emit_readword((int)&last_count,ECX); emit_loadreg(CCREG,HOST_CCREG); // TODO: do proper reg alloc emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_addimm(HOST_CCREG,CLOCK_DIVIDER*ccadj[i],HOST_CCREG); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); } emit_call((int)cached_interpreter_table.MFC0); emit_readword((int)&readmem_dword,t); } } } else if(opcode2[i]==4) // MTC0 { signed char s=get_reg(i_regs->regmap,rs1[i]); char copr=(source[i]>>11)&0x1f; assert(s>=0); emit_writeword(s,(int)&readmem_dword); emit_pusha(); emit_writeword_imm((int)&fake_pc,(int)&PC); emit_writebyte_imm((source[i]>>11)&0x1f,(int)&(fake_pc.f.r.nrd)); if(copr==9||copr==11||copr==12) { if(copr==12&&!is_delayslot) { wb_register(rs1[i],i_regs->regmap,i_regs->dirty,i_regs->is32); } emit_readword((int)&last_count,ECX); emit_loadreg(CCREG,HOST_CCREG); // TODO: do proper reg alloc emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_addimm(HOST_CCREG,CLOCK_DIVIDER*ccadj[i],HOST_CCREG); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); } // What a mess. The status register (12) can enable interrupts, // so needs a special case to handle a pending interrupt. // The interrupt must be taken immediately, because a subsequent // instruction might disable interrupts again. if(copr==12&&!is_delayslot) { emit_writeword_imm(start+i*4+4,(int)&pcaddr); emit_writebyte_imm(0,(int)&pending_exception); } //else if(copr==12&&is_delayslot) emit_call((int)MTC0_R12); //else emit_call((int)cached_interpreter_table.MTC0); if(copr==9||copr==11||copr==12) { emit_readword((int)&g_cp0_regs[CP0_COUNT_REG],HOST_CCREG); emit_readword((int)&next_interupt,ECX); emit_addimm(HOST_CCREG,-(int)CLOCK_DIVIDER*ccadj[i],HOST_CCREG); emit_sub(HOST_CCREG,ECX,HOST_CCREG); emit_writeword(ECX,(int)&last_count); emit_storereg(CCREG,HOST_CCREG); } emit_popa(); if(copr==12) { assert(!is_delayslot); //if(is_delayslot) output_byte(0xcc); emit_cmpmem_imm_byte((int)&pending_exception,0); emit_jne((int)&do_interrupt); } cop1_usable=0; } else { assert(opcode2[i]==0x10); if((source[i]&0x3f)==0x01) // TLBR emit_call((int)cached_interpreter_table.TLBR); if((source[i]&0x3f)==0x02) // TLBWI emit_call((int)TLBWI_new); if((source[i]&0x3f)==0x06) { // TLBWR // The TLB entry written by TLBWR is dependent on the count, // so update the cycle count emit_readword((int)&last_count,ECX); if(i_regs->regmap[HOST_CCREG]!=CCREG) emit_loadreg(CCREG,HOST_CCREG); emit_add(HOST_CCREG,ECX,HOST_CCREG); emit_addimm(HOST_CCREG,CLOCK_DIVIDER*ccadj[i],HOST_CCREG); emit_writeword(HOST_CCREG,(int)&g_cp0_regs[CP0_COUNT_REG]); emit_call((int)TLBWR_new); } if((source[i]&0x3f)==0x08) // TLBP emit_call((int)cached_interpreter_table.TLBP); if((source[i]&0x3f)==0x18) // ERET { int count=ccadj[i]; if(i_regs->regmap[HOST_CCREG]!=CCREG) emit_loadreg(CCREG,HOST_CCREG); emit_addimm_and_set_flags(CLOCK_DIVIDER*count,HOST_CCREG); // TODO: Should there be an extra cycle here? emit_jmp((int)jump_eret); } } } static void cop1_assemble(int i,struct regstat *i_regs) { // Check cop1 unusable if(!cop1_usable) { signed char rs=get_reg(i_regs->regmap,CSREG); assert(rs>=0); emit_testimm(rs,0x20000000); int jaddr=(int)out; emit_jeq(0); add_stub(FP_STUB,jaddr,(int)out,i,rs,(int)i_regs,is_delayslot,0); cop1_usable=1; } if (opcode2[i]==0) { // MFC1 signed char tl=get_reg(i_regs->regmap,rt1[i]); if(tl>=0) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],tl); emit_readword_indexed(0,tl,tl); } } else if (opcode2[i]==1) { // DMFC1 signed char tl=get_reg(i_regs->regmap,rt1[i]); signed char th=get_reg(i_regs->regmap,rt1[i]|64); if(tl>=0) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],tl); if(th>=0) emit_readword_indexed(4,tl,th); emit_readword_indexed(0,tl,tl); } } else if (opcode2[i]==4) { // MTC1 signed char sl=get_reg(i_regs->regmap,rs1[i]); signed char temp=get_reg(i_regs->regmap,-1); emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_writeword_indexed(sl,0,temp); } else if (opcode2[i]==5) { // DMTC1 signed char sl=get_reg(i_regs->regmap,rs1[i]); signed char sh=rs1[i]>0?get_reg(i_regs->regmap,rs1[i]|64):sl; signed char temp=get_reg(i_regs->regmap,-1); emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_writeword_indexed(sh,4,temp); emit_writeword_indexed(sl,0,temp); } else if (opcode2[i]==2) // CFC1 { signed char tl=get_reg(i_regs->regmap,rt1[i]); if(tl>=0) { u_int copr=(source[i]>>11)&0x1f; if(copr==0) emit_readword((int)&FCR0,tl); if(copr==31) emit_readword((int)&FCR31,tl); } } else if (opcode2[i]==6) // CTC1 { signed char sl=get_reg(i_regs->regmap,rs1[i]); u_int copr=(source[i]>>11)&0x1f; assert(sl>=0); if(copr==31) { emit_writeword(sl,(int)&FCR31); // Set the rounding mode char temp=get_reg(i_regs->regmap,-1); emit_movimm(3,temp); emit_and(sl,temp,temp); emit_fldcw_indexed((int)&rounding_modes,temp); } } } static void fconv_assemble_x86(int i,struct regstat *i_regs) { signed char temp=get_reg(i_regs->regmap,-1); assert(temp>=0); // Check cop1 unusable if(!cop1_usable) { signed char rs=get_reg(i_regs->regmap,CSREG); assert(rs>=0); emit_testimm(rs,0x20000000); int jaddr=(int)out; emit_jeq(0); add_stub(FP_STUB,jaddr,(int)out,i,rs,(int)i_regs,is_delayslot,0); cop1_usable=1; } #ifdef __SSE__ if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0d) { // trunc_w_s emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_movss_load(temp,0); emit_cvttps2dq(0,0); // float->int, truncate if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); emit_movd_store(0,temp); return; } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0d) { // trunc_w_d emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_movsd_load(temp,0); emit_cvttpd2dq(0,0); // double->int, truncate emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); emit_movd_store(0,temp); return; } #endif if(opcode2[i]==0x14&&(source[i]&0x3f)==0x20) { // cvt_s_w emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_fildl(temp); if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); emit_fstps(temp); return; } if(opcode2[i]==0x14&&(source[i]&0x3f)==0x21) { // cvt_d_w emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_fildl(temp); emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],temp); emit_fstpl(temp); return; } if(opcode2[i]==0x15&&(source[i]&0x3f)==0x20) { // cvt_s_l emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_fildll(temp); emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); emit_fstps(temp); return; } if(opcode2[i]==0x15&&(source[i]&0x3f)==0x21) { // cvt_d_l emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_fildll(temp); if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],temp); emit_fstpl(temp); return; } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x21) { // cvt_d_s emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_flds(temp); emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],temp); emit_fstpl(temp); return; } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x20) { // cvt_s_d emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_fldl(temp); emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); emit_fstps(temp); return; } if(opcode2[i]==0x10) { // cvt_*_s emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_flds(temp); } if(opcode2[i]==0x11) { // cvt_*_d emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_fldl(temp); } if((source[i]&0x3f)<0x10) { emit_fnstcw_stack(); if((source[i]&3)==0) emit_fldcw((int)&rounding_modes[0]); //DebugMessage(M64MSG_VERBOSE, "round"); if((source[i]&3)==1) emit_fldcw((int)&rounding_modes[1]); //DebugMessage(M64MSG_VERBOSE, "trunc"); if((source[i]&3)==2) emit_fldcw((int)&rounding_modes[2]); //DebugMessage(M64MSG_VERBOSE, "ceil"); if((source[i]&3)==3) emit_fldcw((int)&rounding_modes[3]); //DebugMessage(M64MSG_VERBOSE, "floor"); } if((source[i]&0x3f)==0x24||(source[i]&0x3c)==0x0c) { // cvt_w_* if(opcode2[i]!=0x10||((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); emit_fistpl(temp); } if((source[i]&0x3f)==0x25||(source[i]&0x3c)==0x08) { // cvt_l_* if(opcode2[i]!=0x11||((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],temp); emit_fistpll(temp); } if((source[i]&0x3f)<0x10) { emit_fldcw_stack(); } return; // C emulation code for debugging emit_pusha(); if(opcode2[i]==0x14&&(source[i]&0x3f)==0x20) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)cvt_s_w); } if(opcode2[i]==0x14&&(source[i]&0x3f)==0x21) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)cvt_d_w); } if(opcode2[i]==0x15&&(source[i]&0x3f)==0x20) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)cvt_s_l); } if(opcode2[i]==0x15&&(source[i]&0x3f)==0x21) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)cvt_d_l); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x21) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)cvt_d_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x24) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)cvt_w_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x25) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)cvt_l_s); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x20) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)cvt_s_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x24) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)cvt_w_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x25) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)cvt_l_d); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x08) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)round_l_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x09) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)trunc_l_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0a) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)ceil_l_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0b) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)floor_l_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0c) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)round_w_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0d) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)trunc_w_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0e) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)ceil_w_s); } if(opcode2[i]==0x10&&(source[i]&0x3f)==0x0f) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); emit_call((int)floor_w_s); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x08) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)round_l_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x09) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)trunc_l_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0a) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)ceil_l_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0b) { emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)floor_l_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0c) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)round_w_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0d) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)trunc_w_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0e) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)ceil_w_d); } if(opcode2[i]==0x11&&(source[i]&0x3f)==0x0f) { emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); emit_call((int)floor_w_d); } emit_addimm(ESP,8,ESP); emit_popa(); //emit_loadreg(CSREG,rs); return; } #define fconv_assemble fconv_assemble_x86 static void fcomp_assemble(int i,struct regstat *i_regs) { signed char fs=get_reg(i_regs->regmap,FSREG); signed char temp=get_reg(i_regs->regmap,-1); assert(temp>=0); // Check cop1 unusable if(!cop1_usable) { signed char cs=get_reg(i_regs->regmap,CSREG); assert(cs>=0); emit_testimm(cs,0x20000000); int jaddr=(int)out; emit_jeq(0); add_stub(FP_STUB,jaddr,(int)out,i,cs,(int)i_regs,is_delayslot,0); cop1_usable=1; } if((source[i]&0x3f)==0x30) { emit_andimm(fs,~0x800000,fs); return; } if((source[i]&0x3e)==0x38) { // sf/ngle - these should throw exceptions for NaNs emit_andimm(fs,~0x800000,fs); return; } if(opcode2[i]==0x10) { emit_readword((int)®_cop1_simple[(source[i]>>16)&0x1f],temp); emit_flds(temp); emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_flds(temp); emit_movimm(0x800000,temp); emit_or(fs,temp,fs); emit_xor(temp,fs,temp); emit_fucomip(1); emit_fpop(); if((source[i]&0x3f)==0x31) emit_cmovnp_reg(temp,fs); // c_un_s if((source[i]&0x3f)==0x32) {emit_cmovne_reg(temp,fs);emit_cmovp_reg(temp,fs);} // c_eq_s if((source[i]&0x3f)==0x33) emit_cmovne_reg(temp,fs); // c_ueq_s if((source[i]&0x3f)==0x34) {emit_cmovnc_reg(temp,fs);emit_cmovp_reg(temp,fs);} // c_olt_s if((source[i]&0x3f)==0x35) emit_cmovnc_reg(temp,fs); // c_ult_s if((source[i]&0x3f)==0x36) {emit_cmova_reg(temp,fs);emit_cmovp_reg(temp,fs);} // c_ole_s if((source[i]&0x3f)==0x37) emit_cmova_reg(temp,fs); // c_ule_s if((source[i]&0x3f)==0x3a) emit_cmovne_reg(temp,fs); // c_seq_s if((source[i]&0x3f)==0x3b) emit_cmovne_reg(temp,fs); // c_ngl_s if((source[i]&0x3f)==0x3c) emit_cmovnc_reg(temp,fs); // c_lt_s if((source[i]&0x3f)==0x3d) emit_cmovnc_reg(temp,fs); // c_nge_s if((source[i]&0x3f)==0x3e) emit_cmova_reg(temp,fs); // c_le_s if((source[i]&0x3f)==0x3f) emit_cmova_reg(temp,fs); // c_ngt_s return; } if(opcode2[i]==0x11) { emit_readword((int)®_cop1_double[(source[i]>>16)&0x1f],temp); emit_fldl(temp); emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_fldl(temp); emit_movimm(0x800000,temp); emit_or(fs,temp,fs); emit_xor(temp,fs,temp); emit_fucomip(1); emit_fpop(); if((source[i]&0x3f)==0x31) emit_cmovnp_reg(temp,fs); // c_un_d if((source[i]&0x3f)==0x32) {emit_cmovne_reg(temp,fs);emit_cmovp_reg(temp,fs);} // c_eq_d if((source[i]&0x3f)==0x33) emit_cmovne_reg(temp,fs); // c_ueq_d if((source[i]&0x3f)==0x34) {emit_cmovnc_reg(temp,fs);emit_cmovp_reg(temp,fs);} // c_olt_d if((source[i]&0x3f)==0x35) emit_cmovnc_reg(temp,fs); // c_ult_d if((source[i]&0x3f)==0x36) {emit_cmova_reg(temp,fs);emit_cmovp_reg(temp,fs);} // c_ole_d if((source[i]&0x3f)==0x37) emit_cmova_reg(temp,fs); // c_ule_d if((source[i]&0x3f)==0x3a) emit_cmovne_reg(temp,fs); // c_seq_d if((source[i]&0x3f)==0x3b) emit_cmovne_reg(temp,fs); // c_ngl_d if((source[i]&0x3f)==0x3c) emit_cmovnc_reg(temp,fs); // c_lt_d if((source[i]&0x3f)==0x3d) emit_cmovnc_reg(temp,fs); // c_nge_d if((source[i]&0x3f)==0x3e) emit_cmova_reg(temp,fs); // c_le_d if((source[i]&0x3f)==0x3f) emit_cmova_reg(temp,fs); // c_ngt_d return; } emit_pusha(); if(opcode2[i]==0x10) { emit_pushmem((int)®_cop1_simple[(source[i]>>16)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); if((source[i]&0x3f)==0x30) emit_call((int)c_f_s); if((source[i]&0x3f)==0x31) emit_call((int)c_un_s); if((source[i]&0x3f)==0x32) emit_call((int)c_eq_s); if((source[i]&0x3f)==0x33) emit_call((int)c_ueq_s); if((source[i]&0x3f)==0x34) emit_call((int)c_olt_s); if((source[i]&0x3f)==0x35) emit_call((int)c_ult_s); if((source[i]&0x3f)==0x36) emit_call((int)c_ole_s); if((source[i]&0x3f)==0x37) emit_call((int)c_ule_s); if((source[i]&0x3f)==0x38) emit_call((int)c_sf_s); if((source[i]&0x3f)==0x39) emit_call((int)c_ngle_s); if((source[i]&0x3f)==0x3a) emit_call((int)c_seq_s); if((source[i]&0x3f)==0x3b) emit_call((int)c_ngl_s); if((source[i]&0x3f)==0x3c) emit_call((int)c_lt_s); if((source[i]&0x3f)==0x3d) emit_call((int)c_nge_s); if((source[i]&0x3f)==0x3e) emit_call((int)c_le_s); if((source[i]&0x3f)==0x3f) emit_call((int)c_ngt_s); } if(opcode2[i]==0x11) { emit_pushmem((int)®_cop1_double[(source[i]>>16)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); if((source[i]&0x3f)==0x30) emit_call((int)c_f_d); if((source[i]&0x3f)==0x31) emit_call((int)c_un_d); if((source[i]&0x3f)==0x32) emit_call((int)c_eq_d); if((source[i]&0x3f)==0x33) emit_call((int)c_ueq_d); if((source[i]&0x3f)==0x34) emit_call((int)c_olt_d); if((source[i]&0x3f)==0x35) emit_call((int)c_ult_d); if((source[i]&0x3f)==0x36) emit_call((int)c_ole_d); if((source[i]&0x3f)==0x37) emit_call((int)c_ule_d); if((source[i]&0x3f)==0x38) emit_call((int)c_sf_d); if((source[i]&0x3f)==0x39) emit_call((int)c_ngle_d); if((source[i]&0x3f)==0x3a) emit_call((int)c_seq_d); if((source[i]&0x3f)==0x3b) emit_call((int)c_ngl_d); if((source[i]&0x3f)==0x3c) emit_call((int)c_lt_d); if((source[i]&0x3f)==0x3d) emit_call((int)c_nge_d); if((source[i]&0x3f)==0x3e) emit_call((int)c_le_d); if((source[i]&0x3f)==0x3f) emit_call((int)c_ngt_d); } emit_addimm(ESP,8,ESP); emit_popa(); emit_loadreg(FSREG,fs); return; } static void float_assemble(int i,struct regstat *i_regs) { signed char temp=get_reg(i_regs->regmap,-1); assert(temp>=0); // Check cop1 unusable if(!cop1_usable) { signed char cs=get_reg(i_regs->regmap,CSREG); assert(cs>=0); emit_testimm(cs,0x20000000); int jaddr=(int)out; emit_jeq(0); add_stub(FP_STUB,jaddr,(int)out,i,cs,(int)i_regs,is_delayslot,0); cop1_usable=1; } if((source[i]&0x3f)==6) // mov { if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) { if(opcode2[i]==0x10) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_flds(temp); emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); emit_fstps(temp); } if(opcode2[i]==0x11) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_fldl(temp); emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],temp); emit_fstpl(temp); } } return; } if((source[i]&0x3f)>3) { if(opcode2[i]==0x10) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_flds(temp); if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) { emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); } } if(opcode2[i]==0x11) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_fldl(temp); if(((source[i]>>11)&0x1f)!=((source[i]>>6)&0x1f)) { emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],temp); } } if((source[i]&0x3f)==4) // sqrt emit_fsqrt(); if((source[i]&0x3f)==5) // abs emit_fabs(); if((source[i]&0x3f)==7) // neg emit_fchs(); if(opcode2[i]==0x10) { emit_fstps(temp); } if(opcode2[i]==0x11) { emit_fstpl(temp); } return; } if((source[i]&0x3f)<4) { if(opcode2[i]==0x10) { emit_readword((int)®_cop1_simple[(source[i]>>11)&0x1f],temp); emit_flds(temp); } if(opcode2[i]==0x11) { emit_readword((int)®_cop1_double[(source[i]>>11)&0x1f],temp); emit_fldl(temp); } if(((source[i]>>11)&0x1f)!=((source[i]>>16)&0x1f)) { if(opcode2[i]==0x10) { emit_readword((int)®_cop1_simple[(source[i]>>16)&0x1f],temp); if((source[i]&0x3f)==0) emit_fadds(temp); if((source[i]&0x3f)==1) emit_fsubs(temp); if((source[i]&0x3f)==2) emit_fmuls(temp); if((source[i]&0x3f)==3) emit_fdivs(temp); } else if(opcode2[i]==0x11) { emit_readword((int)®_cop1_double[(source[i]>>16)&0x1f],temp); if((source[i]&0x3f)==0) emit_faddl(temp); if((source[i]&0x3f)==1) emit_fsubl(temp); if((source[i]&0x3f)==2) emit_fmull(temp); if((source[i]&0x3f)==3) emit_fdivl(temp); } } else { if((source[i]&0x3f)==0) emit_fadd(0); if((source[i]&0x3f)==1) emit_fsub(0); if((source[i]&0x3f)==2) emit_fmul(0); if((source[i]&0x3f)==3) emit_fdiv(0); } if(opcode2[i]==0x10) { if(((source[i]>>16)&0x1f)!=((source[i]>>6)&0x1f)) { emit_readword((int)®_cop1_simple[(source[i]>>6)&0x1f],temp); } emit_fstps(temp); } if(opcode2[i]==0x11) { if(((source[i]>>16)&0x1f)!=((source[i]>>6)&0x1f)) { emit_readword((int)®_cop1_double[(source[i]>>6)&0x1f],temp); } emit_fstpl(temp); } return; } if(opcode2[i]==0x10) { // Single precision emit_pusha(); emit_pushmem((int)®_cop1_simple[(source[i]>> 6)&0x1f]); if((source[i]&0x3f)<4) emit_pushmem((int)®_cop1_simple[(source[i]>>16)&0x1f]); emit_pushmem((int)®_cop1_simple[(source[i]>>11)&0x1f]); switch(source[i]&0x3f) { case 0x00: emit_call((int)add_s);break; case 0x01: emit_call((int)sub_s);break; case 0x02: emit_call((int)mul_s);break; case 0x03: emit_call((int)div_s);break; case 0x04: emit_call((int)sqrt_s);break; case 0x05: emit_call((int)abs_s);break; case 0x06: emit_call((int)mov_s);break; case 0x07: emit_call((int)neg_s);break; } emit_addimm(ESP,(source[i]&0x3f)<4?12:8,ESP); emit_popa(); } if(opcode2[i]==0x11) { // Double precision emit_pusha(); emit_pushmem((int)®_cop1_double[(source[i]>> 6)&0x1f]); if((source[i]&0x3f)<4) emit_pushmem((int)®_cop1_double[(source[i]>>16)&0x1f]); emit_pushmem((int)®_cop1_double[(source[i]>>11)&0x1f]); switch(source[i]&0x3f) { case 0x00: emit_call((int)add_d);break; case 0x01: emit_call((int)sub_d);break; case 0x02: emit_call((int)mul_d);break; case 0x03: emit_call((int)div_d);break; case 0x04: emit_call((int)sqrt_d);break; case 0x05: emit_call((int)abs_d);break; case 0x06: emit_call((int)mov_d);break; case 0x07: emit_call((int)neg_d);break; } emit_addimm(ESP,(source[i]&0x3f)<4?12:8,ESP); emit_popa(); } } static void multdiv_assemble_x86(int i,struct regstat *i_regs) { // case 0x18: MULT // case 0x19: MULTU // case 0x1A: DIV // case 0x1B: DIVU // case 0x1C: DMULT // case 0x1D: DMULTU // case 0x1E: DDIV // case 0x1F: DDIVU if(rs1[i]&&rs2[i]) { if((opcode2[i]&4)==0) // 32-bit { if(opcode2[i]==0x18) // MULT { char m1=get_reg(i_regs->regmap,rs1[i]); char m2=get_reg(i_regs->regmap,rs2[i]); assert(m1>=0); assert(m2>=0); emit_mov(m1,EAX); emit_imul(m2); } if(opcode2[i]==0x19) // MULTU { char m1=get_reg(i_regs->regmap,rs1[i]); char m2=get_reg(i_regs->regmap,rs2[i]); assert(m1>=0); assert(m2>=0); emit_mov(m1,EAX); emit_mul(m2); } if(opcode2[i]==0x1A) // DIV { char d1=get_reg(i_regs->regmap,rs1[i]); char d2=get_reg(i_regs->regmap,rs2[i]); assert(d1>=0); assert(d2>=0); emit_mov(d1,EAX); emit_cdq(); emit_test(d2,d2); emit_jeq((int)out+8); emit_idiv(d2); } if(opcode2[i]==0x1B) // DIVU { char d1=get_reg(i_regs->regmap,rs1[i]); char d2=get_reg(i_regs->regmap,rs2[i]); assert(d1>=0); assert(d2>=0); emit_mov(d1,EAX); emit_zeroreg(EDX); emit_test(d2,d2); emit_jeq((int)out+8); emit_div(d2); } } else // 64-bit { if(opcode2[i]==0x1C) // DMULT { char m1h=get_reg(i_regs->regmap,rs1[i]|64); char m1l=get_reg(i_regs->regmap,rs1[i]); char m2h=get_reg(i_regs->regmap,rs2[i]|64); char m2l=get_reg(i_regs->regmap,rs2[i]); assert(m1h>=0); assert(m2h>=0); assert(m1l>=0); assert(m2l>=0); emit_pushreg(m2h); emit_pushreg(m2l); emit_pushreg(m1h); emit_pushreg(m1l); emit_call((int)&mult64); emit_popreg(m1l); emit_popreg(m1h); emit_popreg(m2l); emit_popreg(m2h); char hih=get_reg(i_regs->regmap,HIREG|64); char hil=get_reg(i_regs->regmap,HIREG); if(hih>=0) emit_loadreg(HIREG|64,hih); if(hil>=0) emit_loadreg(HIREG,hil); char loh=get_reg(i_regs->regmap,LOREG|64); char lol=get_reg(i_regs->regmap,LOREG); if(loh>=0) emit_loadreg(LOREG|64,loh); if(lol>=0) emit_loadreg(LOREG,lol); } if(opcode2[i]==0x1D) // DMULTU { char m1h=get_reg(i_regs->regmap,rs1[i]|64); char m1l=get_reg(i_regs->regmap,rs1[i]); char m2h=get_reg(i_regs->regmap,rs2[i]|64); char m2l=get_reg(i_regs->regmap,rs2[i]); char temp=get_reg(i_regs->regmap,-1); assert(m1h>=0); assert(m2h>=0); assert(m1l>=0); assert(m2l>=0); assert(temp>=0); emit_mov(m1l,EAX); emit_mul(m2l); emit_storereg(LOREG,EAX); emit_mov(EDX,temp); emit_mov(m1h,EAX); emit_mul(m2l); emit_add(EAX,temp,temp); emit_adcimm(0,EDX); emit_storereg(HIREG,EDX); emit_mov(m2h,EAX); emit_mul(m1l); emit_add(EAX,temp,temp); emit_adcimm(0,EDX); emit_storereg(LOREG|64,temp); emit_mov(EDX,temp); emit_mov(m2h,EAX); emit_mul(m1h); emit_add(EAX,temp,EAX); emit_loadreg(HIREG,temp); emit_adcimm(0,EDX); emit_add(EAX,temp,EAX); emit_adcimm(0,EDX); // DEBUG /* emit_pushreg(m2h); emit_pushreg(m2l); emit_pushreg(m1h); emit_pushreg(m1l); emit_call((int)&multu64); emit_popreg(m1l); emit_popreg(m1h); emit_popreg(m2l); emit_popreg(m2h); char hih=get_reg(i_regs->regmap,HIREG|64); char hil=get_reg(i_regs->regmap,HIREG); if(hih>=0) emit_loadreg(HIREG|64,hih); // DEBUG if(hil>=0) emit_loadreg(HIREG,hil); // DEBUG */ // Shouldn't be necessary //char loh=get_reg(i_regs->regmap,LOREG|64); //char lol=get_reg(i_regs->regmap,LOREG); //if(loh>=0) emit_loadreg(LOREG|64,loh); //if(lol>=0) emit_loadreg(LOREG,lol); } if(opcode2[i]==0x1E) // DDIV { char d1h=get_reg(i_regs->regmap,rs1[i]|64); char d1l=get_reg(i_regs->regmap,rs1[i]); char d2h=get_reg(i_regs->regmap,rs2[i]|64); char d2l=get_reg(i_regs->regmap,rs2[i]); assert(d1h>=0); assert(d2h>=0); assert(d1l>=0); assert(d2l>=0); //emit_pushreg(d2h); //emit_pushreg(d2l); //emit_pushreg(d1h); //emit_pushreg(d1l); emit_addimm(ESP,-16,ESP); emit_writeword_indexed(d2h,12,ESP); emit_writeword_indexed(d2l,8,ESP); emit_writeword_indexed(d1h,4,ESP); emit_writeword_indexed(d1l,0,ESP); emit_call((int)&div64); //emit_popreg(d1l); //emit_popreg(d1h); //emit_popreg(d2l); //emit_popreg(d2h); emit_readword_indexed(0,ESP,d1l); emit_readword_indexed(4,ESP,d1h); emit_readword_indexed(8,ESP,d2l); emit_readword_indexed(12,ESP,d2h); emit_addimm(ESP,16,ESP); char hih=get_reg(i_regs->regmap,HIREG|64); char hil=get_reg(i_regs->regmap,HIREG); char loh=get_reg(i_regs->regmap,LOREG|64); char lol=get_reg(i_regs->regmap,LOREG); if(hih>=0) emit_loadreg(HIREG|64,hih); if(hil>=0) emit_loadreg(HIREG,hil); if(loh>=0) emit_loadreg(LOREG|64,loh); if(lol>=0) emit_loadreg(LOREG,lol); } if(opcode2[i]==0x1F) // DDIVU { char d1h=get_reg(i_regs->regmap,rs1[i]|64); char d1l=get_reg(i_regs->regmap,rs1[i]); char d2h=get_reg(i_regs->regmap,rs2[i]|64); char d2l=get_reg(i_regs->regmap,rs2[i]); assert(d1h>=0); assert(d2h>=0); assert(d1l>=0); assert(d2l>=0); //emit_pushreg(d2h); //emit_pushreg(d2l); //emit_pushreg(d1h); //emit_pushreg(d1l); emit_addimm(ESP,-16,ESP); emit_writeword_indexed(d2h,12,ESP); emit_writeword_indexed(d2l,8,ESP); emit_writeword_indexed(d1h,4,ESP); emit_writeword_indexed(d1l,0,ESP); emit_call((int)&divu64); //emit_popreg(d1l); //emit_popreg(d1h); //emit_popreg(d2l); //emit_popreg(d2h); emit_readword_indexed(0,ESP,d1l); emit_readword_indexed(4,ESP,d1h); emit_readword_indexed(8,ESP,d2l); emit_readword_indexed(12,ESP,d2h); emit_addimm(ESP,16,ESP); char hih=get_reg(i_regs->regmap,HIREG|64); char hil=get_reg(i_regs->regmap,HIREG); char loh=get_reg(i_regs->regmap,LOREG|64); char lol=get_reg(i_regs->regmap,LOREG); if(hih>=0) emit_loadreg(HIREG|64,hih); if(hil>=0) emit_loadreg(HIREG,hil); if(loh>=0) emit_loadreg(LOREG|64,loh); if(lol>=0) emit_loadreg(LOREG,lol); } } } else { // Multiply by zero is zero. // MIPS does not have a divide by zero exception. // The result is undefined, we return zero. char hr=get_reg(i_regs->regmap,HIREG); char lr=get_reg(i_regs->regmap,LOREG); if(hr>=0) emit_zeroreg(hr); if(lr>=0) emit_zeroreg(lr); } } #define multdiv_assemble multdiv_assemble_x86 static void do_preload_rhash(int r) { emit_movimm(0xf8,r); } static void do_preload_rhtbl(int r) { // Don't need this for x86 } static void do_rhash(int rs,int rh) { emit_and(rs,rh,rh); } static void do_miniht_load(int ht,int rh) { // Don't need this for x86. The load and compare can be combined into // a single instruction (below) } static void do_miniht_jump(int rs,int rh,int ht) { emit_cmpmem_indexed((int)mini_ht,rh,rs); emit_jne(jump_vaddr_reg[rs]); emit_jmpmem_indexed((int)mini_ht+4,rh); } static void do_miniht_insert(int return_address,int rt,int temp) { emit_movimm(return_address,rt); // PC into link register //emit_writeword_imm(return_address,(int)&mini_ht[(return_address&0xFF)>>8][0]); emit_writeword(rt,(int)&mini_ht[(return_address&0xFF)>>3][0]); add_to_linker((int)out,return_address,1); emit_writeword_imm(0,(int)&mini_ht[(return_address&0xFF)>>3][1]); } // We don't need this for x86 static void literal_pool(int n) {} static void literal_pool_jumpover(int n) {} // CPU-architecture-specific initialization, not needed for x86 static void arch_init() {} mupen64plus-core-src-2.5/src/r4300/new_dynarec/x86/assem_x86.h000066400000000000000000000012371251723631200235520ustar00rootroot00000000000000#ifndef M64P_R4300_ASSEM_X86_H #define M64P_R4300_ASSEM_X86_H #define HOST_REGS 8 #define HOST_CCREG 6 #define HOST_BTREG 5 #define EXCLUDE_REG 4 //#define IMM_PREFETCH 1 #define HOST_IMM_ADDR32 1 #define INVERTED_CARRY 1 #define DESTRUCTIVE_WRITEBACK 1 #define DESTRUCTIVE_SHIFT 1 #define USE_MINI_HT 1 #ifdef __cplusplus extern "C" { #endif extern void *base_addr; // Code generator target address #ifdef __cplusplus } #endif #define TARGET_SIZE_2 25 // 2^25 = 32 megabytes #define JUMP_TABLE_SIZE 0 // Not needed for 32-bit x86 /* x86 calling convention: caller-save: %eax %ecx %edx callee-save: %ebp %ebx %esi %edi */ #endif /* M64P_R4300_ASSEM_X86_H */ mupen64plus-core-src-2.5/src/r4300/new_dynarec/x86/linkage_x86.asm000066400000000000000000000510721251723631200244070ustar00rootroot00000000000000;Mupen64plus - linkage_x86.asm ;Copyright (C) 2009-2011 Ari64 ; ;This program is free software; you can redistribute it and/or modify ;it under the terms of the GNU General Public License as published by ;the Free Software Foundation; either version 2 of the License, or ;(at your option) any later version. ; ;This program is distributed in the hope that it will be useful, ;but WITHOUT ANY WARRANTY; without even the implied warranty of ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;GNU General Public License for more details. ; ;You should have received a copy of the GNU General Public License ;along with this program; if not, write to the ;Free Software Foundation, Inc., ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. %ifdef ELF_TYPE %macro cglobal 1 global %1 %endmacro %macro cextern 1 extern %1 %endmacro %else %macro cglobal 1 global _%1 %define %1 _%1 %endmacro %macro cextern 1 extern _%1 %define %1 _%1 %endmacro %endif cglobal dyna_linker cglobal dyna_linker_ds cglobal jump_vaddr_eax cglobal jump_vaddr_ecx cglobal jump_vaddr_edx cglobal jump_vaddr_ebx cglobal jump_vaddr_ebp cglobal jump_vaddr_edi cglobal verify_code_ds cglobal verify_code_vm cglobal verify_code cglobal cc_interrupt cglobal do_interrupt cglobal fp_exception cglobal fp_exception_ds cglobal jump_syscall cglobal jump_eret cglobal new_dyna_start cglobal invalidate_block_eax cglobal invalidate_block_ecx cglobal invalidate_block_edx cglobal invalidate_block_ebx cglobal invalidate_block_ebp cglobal invalidate_block_esi cglobal invalidate_block_edi cglobal write_rdram_new cglobal write_rdramb_new cglobal write_rdramh_new cglobal write_rdramd_new cglobal read_nomem_new cglobal read_nomemb_new cglobal read_nomemh_new cglobal read_nomemd_new cglobal write_nomem_new cglobal write_nomemb_new cglobal write_nomemh_new cglobal write_nomemd_new cglobal breakpoint cextern base_addr cextern tlb_LUT_r cextern jump_in cextern add_link cextern hash_table cextern jump_dirty cextern new_recompile_block cextern g_cp0_regs cextern get_addr_ht cextern cycle_count cextern get_addr cextern branch_target cextern memory_map cextern pending_exception cextern restore_candidate cextern gen_interupt cextern next_interupt cextern stop cextern last_count cextern pcaddr cextern clean_blocks cextern reg cextern hi cextern lo cextern invalidate_block cextern address cextern g_rdram cextern cpu_byte cextern cpu_hword cextern cpu_word cextern cpu_dword cextern invalid_code cextern readmem_dword cextern check_interupt cextern get_addr_32 section .bss align 4 section .rodata section .text dyna_linker: ;eax = virtual target address ;ebx = instruction to patch mov edi, eax mov ecx, eax shr edi, 12 cmp eax, 0C0000000h cmovge ecx, [tlb_LUT_r+edi*4] test ecx, ecx cmovz ecx, eax xor ecx, 080000000h mov edx, 2047 shr ecx, 12 and edx, ecx or edx, 2048 cmp ecx, edx cmova ecx, edx ;jump_in lookup mov edx, [jump_in+ecx*4] _A1: test edx, edx je _A3 mov edi, [edx] xor edi, eax or edi, [4+edx] je _A2 mov edx, DWORD [12+edx] jmp _A1 _A2: mov edi, [ebx] mov ebp, esi lea esi, [4+ebx+edi*1] mov edi, eax pusha call add_link popa mov edi, [8+edx] mov esi, ebp lea edx, [-4+edi] sub edx, ebx mov DWORD [ebx], edx jmp edi _A3: ;hash_table lookup mov edi, eax mov edx, eax shr edi, 16 shr edx, 12 xor edi, eax and edx, 2047 movzx edi, di shl edi, 4 cmp ecx, 2048 cmovc ecx, edx cmp eax, [hash_table+edi] jne _A5 _A4: mov edx, [hash_table+4+edi] jmp edx _A5: cmp eax, [hash_table+8+edi] lea edi, [8+edi] je _A4 ;jump_dirty lookup mov edx, [jump_dirty+ecx*4] _A6: test edx, edx je _A8 mov ecx, [edx] xor ecx, eax or ecx, [4+edx] je _A7 mov edx, DWORD [12+edx] jmp _A6 _A7: mov edx, [8+edx] ;hash_table insert mov ebx, [hash_table-8+edi] mov ecx, [hash_table-4+edi] mov [hash_table-8+edi], eax mov [hash_table-4+edi], edx mov [hash_table+edi], ebx mov [hash_table+4+edi], ecx jmp edx _A8: mov edi, eax pusha call new_recompile_block test eax, eax popa je dyna_linker ;pagefault mov ebx, eax mov ecx, 008h exec_pagefault: ;eax = instruction pointer ;ebx = fault address ;ecx = cause mov edx, [g_cp0_regs+48] add esp, -12 mov edi, [g_cp0_regs+16] or edx, 2 mov [g_cp0_regs+32], ebx ;BadVAddr and edi, 0FF80000Fh mov [g_cp0_regs+48], edx ;Status mov [g_cp0_regs+52], ecx ;Cause mov [g_cp0_regs+56], eax ;EPC mov ecx, ebx shr ebx, 9 and ecx, 0FFFFE000h and ebx, 0007FFFF0h mov [g_cp0_regs+40], ecx ;EntryHI or edi, ebx mov [g_cp0_regs+16], edi ;Context push 080000000h call get_addr_ht add esp, 16 jmp eax ;Special dynamic linker for the case where a page fault ;may occur in a branch delay slot dyna_linker_ds: mov edi, eax mov ecx, eax shr edi, 12 cmp eax, 0C0000000h cmovge ecx, [tlb_LUT_r+edi*4] test ecx, ecx cmovz ecx, eax xor ecx, 080000000h mov edx, 2047 shr ecx, 12 and edx, ecx or edx, 2048 cmp ecx, edx cmova ecx, edx ;jump_in lookup mov edx, [jump_in+ecx*4] _B1: test edx, edx je _B3 mov edi, [edx] xor edi, eax or edi, [4+edx] je _B2 mov edx, DWORD [12+edx] jmp _B1 _B2: mov edi, [ebx] mov ecx, esi lea esi, [4+ebx+edi*1] mov edi, eax pusha call add_link popa mov edi, [8+edx] mov esi, ecx lea edx, [-4+edi] sub edx, ebx mov DWORD [ebx], edx jmp edi _B3: ;hash_table lookup mov edi, eax mov edx, eax shr edi, 16 shr edx, 12 xor edi, eax and edx, 2047 movzx edi, di shl edi, 4 cmp ecx, 2048 cmovc ecx, edx cmp eax, [hash_table+edi] jne _B5 _B4: mov edx, [hash_table+4+edi] jmp edx _B5: cmp eax, [hash_table+8+edi] lea edi, [8+edi] je _B4 ;jump_dirty lookup mov edx, [jump_dirty+ecx*4] _B6: test edx, edx je _B8 mov ecx, [edx] xor ecx, eax or ecx, [4+edx] je _B7 mov edx, DWORD [12+edx] jmp _B6 _B7: mov edx, [8+edx] ;hash_table insert mov ebx, [hash_table-8+edi] mov ecx, [hash_table-4+edi] mov [hash_table-8+edi], eax mov [hash_table-4+edi], edx mov [hash_table+edi], ebx mov [hash_table+4+edi], ecx jmp edx _B8: mov edi, eax and edi, 0FFFFFFF8h inc edi pusha call new_recompile_block test eax, eax popa je dyna_linker_ds ;pagefault and eax, 0FFFFFFF8h mov ecx, 080000008h ;High bit set indicates pagefault in delay slot mov ebx, eax sub eax, 4 jmp exec_pagefault jump_vaddr_eax: mov edi, eax jmp jump_vaddr_edi jump_vaddr_ecx: mov edi, ecx jmp jump_vaddr_edi jump_vaddr_edx: mov edi, edx jmp jump_vaddr_edi jump_vaddr_ebx: mov edi, ebx jmp jump_vaddr_edi jump_vaddr_ebp: mov edi, ebp jump_vaddr_edi: mov eax, edi jump_vaddr: ;Check hash table shr eax, 16 xor eax, edi movzx eax, ax shl eax, 4 cmp edi, [hash_table+eax] jne _C2 _C1: mov edi, [hash_table+4+eax] jmp edi _C2: cmp edi, [hash_table+8+eax] lea eax, [8+eax] je _C1 ;No hit on hash table, call compiler add esp, -12 push edi mov [cycle_count], esi ;CCREG call get_addr mov esi, [cycle_count] add esp, 16 jmp eax verify_code_ds: mov [branch_target], ebp verify_code_vm: ;eax = source (virtual address) ;ebx = target ;ecx = length cmp eax, 0C0000000h jl verify_code mov edx, eax lea ebp, [-1+eax+ecx*1] shr edx, 12 shr ebp, 12 mov edi, [memory_map+edx*4] test edi, edi js _D5 lea eax, [eax+edi*4] _D1: xor edi, [memory_map+edx*4] shl edi, 2 jne _D5 mov edi, [memory_map+edx*4] inc edx cmp edx, ebp jbe _D1 verify_code: ;eax = source ;ebx = target ;ecx = length mov edi, [-4+eax+ecx*1] xor edi, [-4+ebx+ecx*1] jne _D5 mov edx, ecx add ecx, -4 je _D3 test edx, 4 cmove ecx, edx mov [cycle_count], esi _D2: mov edx, [-4+eax+ecx*1] mov ebp, [-4+ebx+ecx*1] mov esi, [-8+eax+ecx*1] xor ebp, edx mov edi, [-8+ebx+ecx*1] jne _D4 xor edi, esi jne _D4 add ecx, -8 jne _D2 mov esi, [cycle_count] mov ebp, [branch_target] _D3: ret _D4: mov esi, [cycle_count] _D5: mov ebp, [branch_target] push esi ;for stack alignment, unused push DWORD [8+esp] call get_addr add esp, 16 ;pop stack jmp eax cc_interrupt: add esi, [last_count] add esp, -28 ;Align stack mov [g_cp0_regs+36], esi ;Count shr esi, 19 mov DWORD [pending_exception], 0 and esi, 01fch cmp DWORD [restore_candidate+esi], 0 jne _E4 _E1: call gen_interupt mov esi, [g_cp0_regs+36] mov eax, [next_interupt] mov ebx, [pending_exception] mov ecx, [stop] add esp, 28 mov [last_count], eax sub esi, eax test ecx, ecx jne _E3 test ebx, ebx jne _E2 ret _E2: add esp, -8 mov edi, [pcaddr] mov [cycle_count], esi ;CCREG push edi call get_addr_ht mov esi, [cycle_count] add esp, 16 jmp eax _E3: add esp, 16 ;pop stack pop edi ;restore edi pop esi ;restore esi pop ebx ;restore ebx pop ebp ;restore ebp ret ;exit dynarec _E4: ;Move 'dirty' blocks to the 'clean' list mov ebx, DWORD [restore_candidate+esi] mov DWORD [restore_candidate+esi], 0 shl esi, 3 mov ebp, 0 _E5: shr ebx, 1 jnc _E6 mov ecx, esi add ecx, ebp push ecx call clean_blocks pop ecx _E6: inc ebp test ebp, 31 jne _E5 jmp _E1 do_interrupt: mov edi, [pcaddr] add esp, -12 push edi call get_addr_ht add esp, 16 mov esi, [g_cp0_regs+36] mov ebx, [next_interupt] mov [last_count], ebx sub esi, ebx add esi, 2 jmp eax fp_exception: mov edx, 01000002ch _E7: mov ebx, [g_cp0_regs+48] add esp, -12 or ebx, 2 mov [g_cp0_regs+48], ebx ;Status mov [g_cp0_regs+52], edx ;Cause mov [g_cp0_regs+56], eax ;EPC push 080000180h call get_addr_ht add esp, 16 jmp eax fp_exception_ds: mov edx, 09000002ch ;Set high bit if delay slot jmp _E7 jump_syscall: mov edx, 020h mov ebx, [g_cp0_regs+48] add esp, -12 or ebx, 2 mov [g_cp0_regs+48], ebx ;Status mov [g_cp0_regs+52], edx ;Cause mov [g_cp0_regs+56], eax ;EPC push 080000180h call get_addr_ht add esp, 16 jmp eax jump_eret: mov ebx, [g_cp0_regs+48] ;Status add esi, [last_count] and ebx, 0FFFFFFFDh mov [g_cp0_regs+36], esi ;Count mov [g_cp0_regs+48], ebx ;Status call check_interupt mov eax, [next_interupt] mov esi, [g_cp0_regs+36] mov [last_count], eax sub esi, eax mov eax, [g_cp0_regs+56] ;EPC jns _E11 _E8: mov ebx, 248 xor edi, edi _E9: mov ecx, [reg+ebx] mov edx, [reg+4+ebx] sar ecx, 31 xor edx, ecx neg edx adc edi, edi sub ebx, 8 jne _E9 mov ecx, [hi+ebx] mov edx, [hi+4+ebx] sar ecx, 31 xor edx, ecx jne _E10 mov ecx, [lo+ebx] mov edx, [lo+4+ebx] sar ecx, 31 xor edx, ecx _E10: neg edx adc edi, edi add esp, -8 push edi push eax mov [cycle_count], esi call get_addr_32 mov esi, [cycle_count] add esp, 16 jmp eax _E11: mov [pcaddr], eax call cc_interrupt mov eax, [pcaddr] jmp _E8 new_dyna_start: push ebp push ebx push esi push edi add esp, -8 ;align stack push 0a4000040h call new_recompile_block mov edi, DWORD [next_interupt] mov esi, DWORD [g_cp0_regs+36] mov DWORD [last_count], edi sub esi, edi jmp DWORD [base_addr] invalidate_block_eax: push eax push ecx push edx push eax jmp invalidate_block_call invalidate_block_ecx: push eax push ecx push edx push ecx jmp invalidate_block_call invalidate_block_edx: push eax push ecx push edx push edx jmp invalidate_block_call invalidate_block_ebx: push eax push ecx push edx push ebx jmp invalidate_block_call invalidate_block_ebp: push eax push ecx push edx push ebp jmp invalidate_block_call invalidate_block_esi: push eax push ecx push edx push esi jmp invalidate_block_call invalidate_block_edi: push eax push ecx push edx push edi invalidate_block_call: call invalidate_block pop eax ;Throw away pop edx pop ecx pop eax ret write_rdram_new: mov edi, [address] mov ecx, [cpu_word] mov [g_rdram-0x80000000+edi], ecx jmp _E12 write_rdramb_new: mov edi, [address] xor edi, 3 mov cl, BYTE [cpu_byte] mov BYTE [g_rdram-0x80000000+edi], cl jmp _E12 write_rdramh_new: mov edi, [address] xor edi, 2 mov cx, WORD [cpu_hword] mov WORD [g_rdram-0x80000000+edi], cx jmp _E12 write_rdramd_new: mov edi, [address] mov ecx, [cpu_dword+4] mov edx, [cpu_dword+0] mov [g_rdram-0x80000000+edi], ecx mov [g_rdram-0x80000000+4+edi], edx jmp _E12 do_invalidate: mov edi, [address] mov ebx, edi ;Return ebx to caller _E12: shr edi, 12 cmp BYTE [invalid_code+edi], 1 je _E13 push edi call invalidate_block pop edi _E13: ret read_nomem_new: mov edi, [address] mov ebx, edi shr edi, 12 mov edi, [memory_map+edi*4] mov eax, 08h test edi, edi js tlb_exception mov ecx, [ebx+edi*4] mov [readmem_dword], ecx ret read_nomemb_new: mov edi, [address] mov ebx, edi shr edi, 12 mov edi, [memory_map+edi*4] mov eax, 08h test edi, edi js tlb_exception xor ebx, 3 movzx ecx, BYTE [ebx+edi*4] mov [readmem_dword], ecx ret read_nomemh_new: mov edi, [address] mov ebx, edi shr edi, 12 mov edi, [memory_map+edi*4] mov eax, 08h test edi, edi js tlb_exception xor ebx, 2 movzx ecx, WORD [ebx+edi*4] mov [readmem_dword], ecx ret read_nomemd_new: mov edi, [address] mov ebx, edi shr edi, 12 mov edi, [memory_map+edi*4] mov eax, 08h test edi, edi js tlb_exception mov ecx, [4+ebx+edi*4] mov edx, [ebx+edi*4] mov [readmem_dword], ecx mov [readmem_dword+4], edx ret write_nomem_new: call do_invalidate mov edi, [memory_map+edi*4] mov ecx, [cpu_word] mov eax, 0ch shl edi, 2 jc tlb_exception mov [ebx+edi], ecx ret write_nomemb_new: call do_invalidate mov edi, [memory_map+edi*4] mov cl, BYTE [cpu_byte] mov eax, 0ch shl edi, 2 jc tlb_exception xor ebx, 3 mov BYTE [ebx+edi], cl ret write_nomemh_new: call do_invalidate mov edi, [memory_map+edi*4] mov cx, WORD [cpu_hword] mov eax, 0ch shl edi, 2 jc tlb_exception xor ebx, 2 mov WORD [ebx+edi], cx ret write_nomemd_new: call do_invalidate mov edi, [memory_map+edi*4] mov edx, [cpu_dword+4] mov ecx, [cpu_dword+0] mov eax, 0ch shl edi, 2 jc tlb_exception mov [ebx+edi], edx mov [4+ebx+edi], ecx ret tlb_exception: ;eax = cause ;ebx = address ;ebp = instr addr + flags mov ebp, [024h+esp] ;Debug: ;push ebp ;push ebx ;push eax ;call tlb_debug ;pop eax ;pop ebx ;pop ebp ;end debug mov esi, [g_cp0_regs+48] mov ecx, ebp mov edx, ebp mov edi, ebp shl ebp, 31 shr ecx, 12 or eax, ebp sar ebp, 29 and edx, 0FFFFFFFCh mov ecx, [memory_map+ecx*4] or esi, 2 mov ecx, [edx+ecx*4] add edx, ebp mov [g_cp0_regs+48], esi ;Status mov [g_cp0_regs+52], eax ;Cause mov [g_cp0_regs+56], edx ;EPC add esp, 024h mov edx, 06000022h mov ebp, ecx movsx eax, cx shr ecx, 26 shr ebp, 21 sub ebx, eax and ebp, 01fh ror edx, cl mov esi, [g_cp0_regs+16] cmovc ebx, [reg+ebp*8] and esi, 0FF80000Fh mov [reg+ebp*8], ebx add eax, ebx sar ebx, 31 mov [g_cp0_regs+32], eax ;BadVAddr shr eax, 9 test edi, 2 cmove ebx, [reg+4+ebp*8] add esp, -12 and eax, 0007FFFF0h mov [reg+4+ebp*8], ebx push 080000180h or esi, eax mov [g_cp0_regs+16], esi ;Context call get_addr_ht add esp, 16 mov edi, DWORD [next_interupt] mov esi, DWORD [g_cp0_regs+36] ;Count mov DWORD [last_count], edi sub esi, edi jmp eax breakpoint:mupen64plus-core-src-2.5/src/r4300/ops.h000066400000000000000000000201451251723631200176120ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - ops.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_OPS_H #define M64P_R4300_OPS_H typedef struct _cpu_instruction_table { /* All jump/branch instructions (except JR and JALR) have three versions: * - JUMPNAME() which for jumps inside the current block. * - JUMPNAME_OUT() which jumps outside the current block. * - JUMPNAME_IDLE() which does busy wait optimization. * * Busy wait optimization is used when a jump jumps to itself, * and the instruction on the delay slot is a NOP. * The program is waiting for the next interrupt, so we can just * increase Count until the point where the next interrupt happens. */ // Load and store instructions void (*LB)(void); void (*LBU)(void); void (*LH)(void); void (*LHU)(void); void (*LW)(void); void (*LWL)(void); void (*LWR)(void); void (*SB)(void); void (*SH)(void); void (*SW)(void); void (*SWL)(void); void (*SWR)(void); void (*LD)(void); void (*LDL)(void); void (*LDR)(void); void (*LL)(void); void (*LWU)(void); void (*SC)(void); void (*SD)(void); void (*SDL)(void); void (*SDR)(void); void (*SYNC)(void); // Arithmetic instructions (ALU immediate) void (*ADDI)(void); void (*ADDIU)(void); void (*SLTI)(void); void (*SLTIU)(void); void (*ANDI)(void); void (*ORI)(void); void (*XORI)(void); void (*LUI)(void); void (*DADDI)(void); void (*DADDIU)(void); // Arithmetic instructions (3-operand) void (*ADD)(void); void (*ADDU)(void); void (*SUB)(void); void (*SUBU)(void); void (*SLT)(void); void (*SLTU)(void); void (*AND)(void); void (*OR)(void); void (*XOR)(void); void (*NOR)(void); void (*DADD)(void); void (*DADDU)(void); void (*DSUB)(void); void (*DSUBU)(void); // Multiply and divide instructions void (*MULT)(void); void (*MULTU)(void); void (*DIV)(void); void (*DIVU)(void); void (*MFHI)(void); void (*MTHI)(void); void (*MFLO)(void); void (*MTLO)(void); void (*DMULT)(void); void (*DMULTU)(void); void (*DDIV)(void); void (*DDIVU)(void); // Jump and branch instructions void (*J)(void); void (*J_OUT)(void); void (*J_IDLE)(void); void (*JAL)(void); void (*JAL_OUT)(void); void (*JAL_IDLE)(void); void (*JR)(void); void (*JALR)(void); void (*BEQ)(void); void (*BEQ_OUT)(void); void (*BEQ_IDLE)(void); void (*BNE)(void); void (*BNE_OUT)(void); void (*BNE_IDLE)(void); void (*BLEZ)(void); void (*BLEZ_OUT)(void); void (*BLEZ_IDLE)(void); void (*BGTZ)(void); void (*BGTZ_OUT)(void); void (*BGTZ_IDLE)(void); void (*BLTZ)(void); void (*BLTZ_OUT)(void); void (*BLTZ_IDLE)(void); void (*BGEZ)(void); void (*BGEZ_OUT)(void); void (*BGEZ_IDLE)(void); void (*BLTZAL)(void); void (*BLTZAL_OUT)(void); void (*BLTZAL_IDLE)(void); void (*BGEZAL)(void); void (*BGEZAL_OUT)(void); void (*BGEZAL_IDLE)(void); void (*BEQL)(void); void (*BEQL_OUT)(void); void (*BEQL_IDLE)(void); void (*BNEL)(void); void (*BNEL_OUT)(void); void (*BNEL_IDLE)(void); void (*BLEZL)(void); void (*BLEZL_OUT)(void); void (*BLEZL_IDLE)(void); void (*BGTZL)(void); void (*BGTZL_OUT)(void); void (*BGTZL_IDLE)(void); void (*BLTZL)(void); void (*BLTZL_OUT)(void); void (*BLTZL_IDLE)(void); void (*BGEZL)(void); void (*BGEZL_OUT)(void); void (*BGEZL_IDLE)(void); void (*BLTZALL)(void); void (*BLTZALL_OUT)(void); void (*BLTZALL_IDLE)(void); void (*BGEZALL)(void); void (*BGEZALL_OUT)(void); void (*BGEZALL_IDLE)(void); void (*BC1TL)(void); void (*BC1TL_OUT)(void); void (*BC1TL_IDLE)(void); void (*BC1FL)(void); void (*BC1FL_OUT)(void); void (*BC1FL_IDLE)(void); // Shift instructions void (*SLL)(void); void (*SRL)(void); void (*SRA)(void); void (*SLLV)(void); void (*SRLV)(void); void (*SRAV)(void); void (*DSLL)(void); void (*DSRL)(void); void (*DSRA)(void); void (*DSLLV)(void); void (*DSRLV)(void); void (*DSRAV)(void); void (*DSLL32)(void); void (*DSRL32)(void); void (*DSRA32)(void); // COP0 instructions void (*MTC0)(void); void (*MFC0)(void); void (*TLBR)(void); void (*TLBWI)(void); void (*TLBWR)(void); void (*TLBP)(void); void (*CACHE)(void); void (*ERET)(void); // COP1 instructions void (*LWC1)(void); void (*SWC1)(void); void (*MTC1)(void); void (*MFC1)(void); void (*CTC1)(void); void (*CFC1)(void); void (*BC1T)(void); void (*BC1T_OUT)(void); void (*BC1T_IDLE)(void); void (*BC1F)(void); void (*BC1F_OUT)(void); void (*BC1F_IDLE)(void); void (*DMFC1)(void); void (*DMTC1)(void); void (*LDC1)(void); void (*SDC1)(void); void (*CVT_S_D)(void); void (*CVT_S_W)(void); void (*CVT_S_L)(void); void (*CVT_D_S)(void); void (*CVT_D_W)(void); void (*CVT_D_L)(void); void (*CVT_W_S)(void); void (*CVT_W_D)(void); void (*CVT_L_S)(void); void (*CVT_L_D)(void); void (*ROUND_W_S)(void); void (*ROUND_W_D)(void); void (*ROUND_L_S)(void); void (*ROUND_L_D)(void); void (*TRUNC_W_S)(void); void (*TRUNC_W_D)(void); void (*TRUNC_L_S)(void); void (*TRUNC_L_D)(void); void (*CEIL_W_S)(void); void (*CEIL_W_D)(void); void (*CEIL_L_S)(void); void (*CEIL_L_D)(void); void (*FLOOR_W_S)(void); void (*FLOOR_W_D)(void); void (*FLOOR_L_S)(void); void (*FLOOR_L_D)(void); void (*ADD_S)(void); void (*ADD_D)(void); void (*SUB_S)(void); void (*SUB_D)(void); void (*MUL_S)(void); void (*MUL_D)(void); void (*DIV_S)(void); void (*DIV_D)(void); void (*ABS_S)(void); void (*ABS_D)(void); void (*MOV_S)(void); void (*MOV_D)(void); void (*NEG_S)(void); void (*NEG_D)(void); void (*SQRT_S)(void); void (*SQRT_D)(void); void (*C_F_S)(void); void (*C_F_D)(void); void (*C_UN_S)(void); void (*C_UN_D)(void); void (*C_EQ_S)(void); void (*C_EQ_D)(void); void (*C_UEQ_S)(void); void (*C_UEQ_D)(void); void (*C_OLT_S)(void); void (*C_OLT_D)(void); void (*C_ULT_S)(void); void (*C_ULT_D)(void); void (*C_OLE_S)(void); void (*C_OLE_D)(void); void (*C_ULE_S)(void); void (*C_ULE_D)(void); void (*C_SF_S)(void); void (*C_SF_D)(void); void (*C_NGLE_S)(void); void (*C_NGLE_D)(void); void (*C_SEQ_S)(void); void (*C_SEQ_D)(void); void (*C_NGL_S)(void); void (*C_NGL_D)(void); void (*C_LT_S)(void); void (*C_LT_D)(void); void (*C_NGE_S)(void); void (*C_NGE_D)(void); void (*C_LE_S)(void); void (*C_LE_D)(void); void (*C_NGT_S)(void); void (*C_NGT_D)(void); // Special instructions void (*SYSCALL)(void); // Exception instructions void (*TEQ)(void); // Emulator helper functions void (*NOP)(void); // No operation (used to nullify R0 writes) void (*RESERVED)(void); // Reserved instruction handler void (*NI)(void); // Not implemented instruction handler void (*FIN_BLOCK)(void); // Handler for the end of a block void (*NOTCOMPILED)(void); // Handler for not yet compiled code void (*NOTCOMPILED2)(void); // TODOXXX } cpu_instruction_table; #endif /* M64P_R4300_OPS_H_*/ mupen64plus-core-src-2.5/src/r4300/pure_interp.c000066400000000000000000000570461251723631200213520ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - pure_interp.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2015 Nebuleon * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #define __STDC_FORMAT_MACROS #include #include "api/callbacks.h" #include "api/debugger.h" #include "api/m64p_types.h" /* TLBWrite requires invalid_code and blocks from cached_interp.h, but only if * (at run time) the active core is not the Pure Interpreter. */ #include "cached_interp.h" #include "cp0_private.h" #include "cp1_private.h" #include "exception.h" #include "interupt.h" #include "main/main.h" #include "memory/memory.h" #include "osal/preproc.h" #include "r4300.h" #include "tlb.h" #ifdef DBG #include "debugger/dbg_debugger.h" #include "debugger/dbg_types.h" #endif static precomp_instr interp_PC; static void InterpretOpcode(void); #define PCADDR interp_PC.addr #define ADD_TO_PC(x) interp_PC.addr += x*4; #define DECLARE_INSTRUCTION(name) static void name(uint32_t op) #define DECLARE_JUMP(name, destination, condition, link, likely, cop1) \ static void name(uint32_t op) \ { \ const int take_jump = (condition); \ const uint32_t jump_target = (destination); \ int64_t *link_register = (link); \ if (cop1 && check_cop1_unusable()) return; \ if (link_register != ®[0]) \ { \ *link_register = SE32(interp_PC.addr + 8); \ } \ if (!likely || take_jump) \ { \ interp_PC.addr += 4; \ delay_slot=1; \ InterpretOpcode(); \ update_count(); \ delay_slot=0; \ if (take_jump && !skip_jump) \ { \ interp_PC.addr = jump_target; \ } \ } \ else \ { \ interp_PC.addr += 8; \ update_count(); \ } \ last_addr = interp_PC.addr; \ if (next_interupt <= g_cp0_regs[CP0_COUNT_REG]) gen_interupt(); \ } \ static void name##_IDLE(uint32_t op) \ { \ const int take_jump = (condition); \ int skip; \ if (cop1 && check_cop1_unusable()) return; \ if (take_jump) \ { \ update_count(); \ skip = next_interupt - g_cp0_regs[CP0_COUNT_REG]; \ if (skip > 3) g_cp0_regs[CP0_COUNT_REG] += (skip & UINT32_C(0xFFFFFFFC)); \ else name(op); \ } \ else name(op); \ } #define CHECK_MEMORY() #define RD_OF(op) (((op) >> 11) & 0x1F) #define RS_OF(op) (((op) >> 21) & 0x1F) #define RT_OF(op) (((op) >> 16) & 0x1F) #define SA_OF(op) (((op) >> 6) & 0x1F) #define IMM16S_OF(op) ((int16_t) (op)) #define IMM16U_OF(op) ((uint16_t) (op)) #define FD_OF(op) (((op) >> 6) & 0x1F) #define FS_OF(op) (((op) >> 11) & 0x1F) #define FT_OF(op) (((op) >> 16) & 0x1F) #define JUMP_OF(op) ((op) & UINT32_C(0x3FFFFFF)) /* Determines whether a relative jump in a 16-bit immediate goes back to the * same instruction without doing any work in its delay slot. The jump is * relative to the instruction in the delay slot, so 1 instruction backwards * (-1) goes back to the jump. */ #define IS_RELATIVE_IDLE_LOOP(op, addr) \ (IMM16S_OF(op) == -1 && *fast_mem_access((addr) + 4) == 0) /* Determines whether an absolute jump in a 26-bit immediate goes back to the * same instruction without doing any work in its delay slot. The jump is * in the same 256 MiB segment as the delay slot, so if the jump instruction * is at the last address in its segment, it does not jump back to itself. */ #define IS_ABSOLUTE_IDLE_LOOP(op, addr) \ (JUMP_OF(op) == ((addr) & UINT32_C(0x0FFFFFFF)) >> 2 \ && ((addr) & UINT32_C(0x0FFFFFFF)) != UINT32_C(0x0FFFFFFC) \ && *fast_mem_access((addr) + 4) == 0) #define SE8(a) ((int64_t) ((int8_t) (a))) #define SE16(a) ((int64_t) ((int16_t) (a))) #define SE32(a) ((int64_t) ((int32_t) (a))) /* These macros are like those in macros.h, but they parse opcode fields. */ #define rrt reg[RT_OF(op)] #define rrd reg[RD_OF(op)] #define rfs FS_OF(op) #define rrs reg[RS_OF(op)] #define rsa SA_OF(op) #define irt reg[RT_OF(op)] #define ioffset IMM16S_OF(op) #define iimmediate IMM16S_OF(op) #define irs reg[RS_OF(op)] #define ibase reg[RS_OF(op)] #define jinst_index JUMP_OF(op) #define lfbase RS_OF(op) #define lfft FT_OF(op) #define lfoffset IMM16S_OF(op) #define cfft FT_OF(op) #define cffs FS_OF(op) #define cffd FD_OF(op) // 32 bits macros #ifndef M64P_BIG_ENDIAN #define rrt32 *((int32_t*) ®[RT_OF(op)]) #define rrd32 *((int32_t*) ®[RD_OF(op)]) #define rrs32 *((int32_t*) ®[RS_OF(op)]) #define irs32 *((int32_t*) ®[RS_OF(op)]) #define irt32 *((int32_t*) ®[RT_OF(op)]) #else #define rrt32 *((int32_t*) ®[RT_OF(op)] + 1) #define rrd32 *((int32_t*) ®[RD_OF(op)] + 1) #define rrs32 *((int32_t*) ®[RS_OF(op)] + 1) #define irs32 *((int32_t*) ®[RS_OF(op)] + 1) #define irt32 *((int32_t*) ®[RT_OF(op)] + 1) #endif // two functions are defined from the macros above but never used // these prototype declarations will prevent a warning #if defined(__GNUC__) static void JR_IDLE(uint32_t) __attribute__((used)); static void JALR_IDLE(uint32_t) __attribute__((used)); #endif #include "interpreter.def" void InterpretOpcode() { uint32_t op = *fast_mem_access(PC->addr); switch ((op >> 26) & 0x3F) { case 0: /* SPECIAL prefix */ switch (op & 0x3F) { case 0: /* SPECIAL opcode 0: SLL */ if (RD_OF(op) != 0) SLL(op); else NOP(0); break; case 2: /* SPECIAL opcode 2: SRL */ if (RD_OF(op) != 0) SRL(op); else NOP(0); break; case 3: /* SPECIAL opcode 3: SRA */ if (RD_OF(op) != 0) SRA(op); else NOP(0); break; case 4: /* SPECIAL opcode 4: SLLV */ if (RD_OF(op) != 0) SLLV(op); else NOP(0); break; case 6: /* SPECIAL opcode 6: SRLV */ if (RD_OF(op) != 0) SRLV(op); else NOP(0); break; case 7: /* SPECIAL opcode 7: SRAV */ if (RD_OF(op) != 0) SRAV(op); else NOP(0); break; case 8: JR(op); break; case 9: /* SPECIAL opcode 9: JALR */ /* Note: This can omit the check for Rd == 0 because the JALR * function checks for link_register != ®[0]. If you're * using this as a reference for a JIT, do check Rd == 0 in it. */ JALR(op); break; case 12: SYSCALL(op); break; case 13: /* SPECIAL opcode 13: BREAK (Not implemented) */ NI(op); break; case 15: SYNC(op); break; case 16: /* SPECIAL opcode 16: MFHI */ if (RD_OF(op) != 0) MFHI(op); else NOP(0); break; case 17: MTHI(op); break; case 18: /* SPECIAL opcode 18: MFLO */ if (RD_OF(op) != 0) MFLO(op); else NOP(0); break; case 19: MTLO(op); break; case 20: /* SPECIAL opcode 20: DSLLV */ if (RD_OF(op) != 0) DSLLV(op); else NOP(0); break; case 22: /* SPECIAL opcode 22: DSRLV */ if (RD_OF(op) != 0) DSRLV(op); else NOP(0); break; case 23: /* SPECIAL opcode 23: DSRAV */ if (RD_OF(op) != 0) DSRAV(op); else NOP(0); break; case 24: MULT(op); break; case 25: MULTU(op); break; case 26: DIV(op); break; case 27: DIVU(op); break; case 28: DMULT(op); break; case 29: DMULTU(op); break; case 30: DDIV(op); break; case 31: DDIVU(op); break; case 32: /* SPECIAL opcode 32: ADD */ if (RD_OF(op) != 0) ADD(op); else NOP(0); break; case 33: /* SPECIAL opcode 33: ADDU */ if (RD_OF(op) != 0) ADDU(op); else NOP(0); break; case 34: /* SPECIAL opcode 34: SUB */ if (RD_OF(op) != 0) SUB(op); else NOP(0); break; case 35: /* SPECIAL opcode 35: SUBU */ if (RD_OF(op) != 0) SUBU(op); else NOP(0); break; case 36: /* SPECIAL opcode 36: AND */ if (RD_OF(op) != 0) AND(op); else NOP(0); break; case 37: /* SPECIAL opcode 37: OR */ if (RD_OF(op) != 0) OR(op); else NOP(0); break; case 38: /* SPECIAL opcode 38: XOR */ if (RD_OF(op) != 0) XOR(op); else NOP(0); break; case 39: /* SPECIAL opcode 39: NOR */ if (RD_OF(op) != 0) NOR(op); else NOP(0); break; case 42: /* SPECIAL opcode 42: SLT */ if (RD_OF(op) != 0) SLT(op); else NOP(0); break; case 43: /* SPECIAL opcode 43: SLTU */ if (RD_OF(op) != 0) SLTU(op); else NOP(0); break; case 44: /* SPECIAL opcode 44: DADD */ if (RD_OF(op) != 0) DADD(op); else NOP(0); break; case 45: /* SPECIAL opcode 45: DADDU */ if (RD_OF(op) != 0) DADDU(op); else NOP(0); break; case 46: /* SPECIAL opcode 46: DSUB */ if (RD_OF(op) != 0) DSUB(op); else NOP(0); break; case 47: /* SPECIAL opcode 47: DSUBU */ if (RD_OF(op) != 0) DSUBU(op); else NOP(0); break; case 48: /* SPECIAL opcode 48: TGE (Not implemented) */ case 49: /* SPECIAL opcode 49: TGEU (Not implemented) */ case 50: /* SPECIAL opcode 50: TLT (Not implemented) */ case 51: /* SPECIAL opcode 51: TLTU (Not implemented) */ NI(op); break; case 52: TEQ(op); break; case 54: /* SPECIAL opcode 54: TNE (Not implemented) */ NI(op); break; case 56: /* SPECIAL opcode 56: DSLL */ if (RD_OF(op) != 0) DSLL(op); else NOP(0); break; case 58: /* SPECIAL opcode 58: DSRL */ if (RD_OF(op) != 0) DSRL(op); else NOP(0); break; case 59: /* SPECIAL opcode 59: DSRA */ if (RD_OF(op) != 0) DSRA(op); else NOP(0); break; case 60: /* SPECIAL opcode 60: DSLL32 */ if (RD_OF(op) != 0) DSLL32(op); else NOP(0); break; case 62: /* SPECIAL opcode 62: DSRL32 */ if (RD_OF(op) != 0) DSRL32(op); else NOP(0); break; case 63: /* SPECIAL opcode 63: DSRA32 */ if (RD_OF(op) != 0) DSRA32(op); else NOP(0); break; default: /* SPECIAL opcodes 1, 5, 10, 11, 14, 21, 40, 41, 53, 55, 57, 61: Reserved Instructions */ RESERVED(op); break; } /* switch (op & 0x3F) for the SPECIAL prefix */ break; case 1: /* REGIMM prefix */ switch ((op >> 16) & 0x1F) { case 0: /* REGIMM opcode 0: BLTZ */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BLTZ_IDLE(op); else BLTZ(op); break; case 1: /* REGIMM opcode 1: BGEZ */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BGEZ_IDLE(op); else BGEZ(op); break; case 2: /* REGIMM opcode 2: BLTZL */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BLTZL_IDLE(op); else BLTZL(op); break; case 3: /* REGIMM opcode 3: BGEZL */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BGEZL_IDLE(op); else BGEZL(op); break; case 8: /* REGIMM opcode 8: TGEI (Not implemented) */ case 9: /* REGIMM opcode 9: TGEIU (Not implemented) */ case 10: /* REGIMM opcode 10: TLTI (Not implemented) */ case 11: /* REGIMM opcode 11: TLTIU (Not implemented) */ case 12: /* REGIMM opcode 12: TEQI (Not implemented) */ case 14: /* REGIMM opcode 14: TNEI (Not implemented) */ NI(op); break; case 16: /* REGIMM opcode 16: BLTZAL */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BLTZAL_IDLE(op); else BLTZAL(op); break; case 17: /* REGIMM opcode 17: BGEZAL */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BGEZAL_IDLE(op); else BGEZAL(op); break; case 18: /* REGIMM opcode 18: BLTZALL */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BLTZALL_IDLE(op); else BLTZALL(op); break; case 19: /* REGIMM opcode 19: BGEZALL */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BGEZALL_IDLE(op); else BGEZALL(op); break; default: /* REGIMM opcodes 4..7, 13, 15, 20..31: Reserved Instructions */ RESERVED(op); break; } /* switch ((op >> 16) & 0x1F) for the REGIMM prefix */ break; case 2: /* Major opcode 2: J */ if (IS_ABSOLUTE_IDLE_LOOP(op, PC->addr)) J_IDLE(op); else J(op); break; case 3: /* Major opcode 3: JAL */ if (IS_ABSOLUTE_IDLE_LOOP(op, PC->addr)) JAL_IDLE(op); else JAL(op); break; case 4: /* Major opcode 4: BEQ */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BEQ_IDLE(op); else BEQ(op); break; case 5: /* Major opcode 5: BNE */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BNE_IDLE(op); else BNE(op); break; case 6: /* Major opcode 6: BLEZ */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BLEZ_IDLE(op); else BLEZ(op); break; case 7: /* Major opcode 7: BGTZ */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BGTZ_IDLE(op); else BGTZ(op); break; case 8: /* Major opcode 8: ADDI */ if (RT_OF(op) != 0) ADDI(op); else NOP(0); break; case 9: /* Major opcode 9: ADDIU */ if (RT_OF(op) != 0) ADDIU(op); else NOP(0); break; case 10: /* Major opcode 10: SLTI */ if (RT_OF(op) != 0) SLTI(op); else NOP(0); break; case 11: /* Major opcode 11: SLTIU */ if (RT_OF(op) != 0) SLTIU(op); else NOP(0); break; case 12: /* Major opcode 12: ANDI */ if (RT_OF(op) != 0) ANDI(op); else NOP(0); break; case 13: /* Major opcode 13: ORI */ if (RT_OF(op) != 0) ORI(op); else NOP(0); break; case 14: /* Major opcode 14: XORI */ if (RT_OF(op) != 0) XORI(op); else NOP(0); break; case 15: /* Major opcode 15: LUI */ if (RT_OF(op) != 0) LUI(op); else NOP(0); break; case 16: /* Coprocessor 0 prefix */ switch ((op >> 21) & 0x1F) { case 0: /* Coprocessor 0 opcode 0: MFC0 */ if (RT_OF(op) != 0) MFC0(op); else NOP(0); break; case 4: MTC0(op); break; case 16: /* Coprocessor 0 opcode 16: TLB */ switch (op & 0x3F) { case 1: TLBR(op); break; case 2: TLBWI(op); break; case 6: TLBWR(op); break; case 8: TLBP(op); break; case 24: ERET(op); break; default: /* TLB sub-opcodes 0, 3..5, 7, 9..23, 25..63: Reserved Instructions */ RESERVED(op); break; } /* switch (op & 0x3F) for Coprocessor 0 TLB opcodes */ break; default: /* Coprocessor 0 opcodes 1..3, 4..15, 17..31: Reserved Instructions */ RESERVED(op); break; } /* switch ((op >> 21) & 0x1F) for the Coprocessor 0 prefix */ break; case 17: /* Coprocessor 1 prefix */ switch ((op >> 21) & 0x1F) { case 0: /* Coprocessor 1 opcode 0: MFC1 */ if (RT_OF(op) != 0) MFC1(op); else NOP(0); break; case 1: /* Coprocessor 1 opcode 1: DMFC1 */ if (RT_OF(op) != 0) DMFC1(op); else NOP(0); break; case 2: /* Coprocessor 1 opcode 2: CFC1 */ if (RT_OF(op) != 0) CFC1(op); else NOP(0); break; case 4: MTC1(op); break; case 5: DMTC1(op); break; case 6: CTC1(op); break; case 8: /* Coprocessor 1 opcode 8: Branch on C1 condition... */ switch ((op >> 16) & 0x3) { case 0: /* opcode 0: BC1F */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BC1F_IDLE(op); else BC1F(op); break; case 1: /* opcode 1: BC1T */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BC1T_IDLE(op); else BC1T(op); break; case 2: /* opcode 2: BC1FL */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BC1FL_IDLE(op); else BC1FL(op); break; case 3: /* opcode 3: BC1TL */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BC1TL_IDLE(op); else BC1TL(op); break; } /* switch ((op >> 16) & 0x3) for branches on C1 condition */ break; case 16: /* Coprocessor 1 S-format opcodes */ switch (op & 0x3F) { case 0: ADD_S(op); break; case 1: SUB_S(op); break; case 2: MUL_S(op); break; case 3: DIV_S(op); break; case 4: SQRT_S(op); break; case 5: ABS_S(op); break; case 6: MOV_S(op); break; case 7: NEG_S(op); break; case 8: ROUND_L_S(op); break; case 9: TRUNC_L_S(op); break; case 10: CEIL_L_S(op); break; case 11: FLOOR_L_S(op); break; case 12: ROUND_W_S(op); break; case 13: TRUNC_W_S(op); break; case 14: CEIL_W_S(op); break; case 15: FLOOR_W_S(op); break; case 33: CVT_D_S(op); break; case 36: CVT_W_S(op); break; case 37: CVT_L_S(op); break; case 48: C_F_S(op); break; case 49: C_UN_S(op); break; case 50: C_EQ_S(op); break; case 51: C_UEQ_S(op); break; case 52: C_OLT_S(op); break; case 53: C_ULT_S(op); break; case 54: C_OLE_S(op); break; case 55: C_ULE_S(op); break; case 56: C_SF_S(op); break; case 57: C_NGLE_S(op); break; case 58: C_SEQ_S(op); break; case 59: C_NGL_S(op); break; case 60: C_LT_S(op); break; case 61: C_NGE_S(op); break; case 62: C_LE_S(op); break; case 63: C_NGT_S(op); break; default: /* Coprocessor 1 S-format opcodes 16..32, 34..35, 38..47: Reserved Instructions */ RESERVED(op); break; } /* switch (op & 0x3F) for Coprocessor 1 S-format opcodes */ break; case 17: /* Coprocessor 1 D-format opcodes */ switch (op & 0x3F) { case 0: ADD_D(op); break; case 1: SUB_D(op); break; case 2: MUL_D(op); break; case 3: DIV_D(op); break; case 4: SQRT_D(op); break; case 5: ABS_D(op); break; case 6: MOV_D(op); break; case 7: NEG_D(op); break; case 8: ROUND_L_D(op); break; case 9: TRUNC_L_D(op); break; case 10: CEIL_L_D(op); break; case 11: FLOOR_L_D(op); break; case 12: ROUND_W_D(op); break; case 13: TRUNC_W_D(op); break; case 14: CEIL_W_D(op); break; case 15: FLOOR_W_D(op); break; case 32: CVT_S_D(op); break; case 36: CVT_W_D(op); break; case 37: CVT_L_D(op); break; case 48: C_F_D(op); break; case 49: C_UN_D(op); break; case 50: C_EQ_D(op); break; case 51: C_UEQ_D(op); break; case 52: C_OLT_D(op); break; case 53: C_ULT_D(op); break; case 54: C_OLE_D(op); break; case 55: C_ULE_D(op); break; case 56: C_SF_D(op); break; case 57: C_NGLE_D(op); break; case 58: C_SEQ_D(op); break; case 59: C_NGL_D(op); break; case 60: C_LT_D(op); break; case 61: C_NGE_D(op); break; case 62: C_LE_D(op); break; case 63: C_NGT_D(op); break; default: /* Coprocessor 1 D-format opcodes 16..31, 33..35, 38..47: Reserved Instructions */ RESERVED(op); break; } /* switch (op & 0x3F) for Coprocessor 1 D-format opcodes */ break; case 20: /* Coprocessor 1 W-format opcodes */ switch (op & 0x3F) { case 32: CVT_S_W(op); break; case 33: CVT_D_W(op); break; default: /* Coprocessor 1 W-format opcodes 0..31, 34..63: Reserved Instructions */ RESERVED(op); break; } break; case 21: /* Coprocessor 1 L-format opcodes */ switch (op & 0x3F) { case 32: CVT_S_L(op); break; case 33: CVT_D_L(op); break; default: /* Coprocessor 1 L-format opcodes 0..31, 34..63: Reserved Instructions */ RESERVED(op); break; } break; default: /* Coprocessor 1 opcodes 3, 7, 9..15, 18..19, 22..31: Reserved Instructions */ RESERVED(op); break; } /* switch ((op >> 21) & 0x1F) for the Coprocessor 1 prefix */ break; case 20: /* Major opcode 20: BEQL */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BEQL_IDLE(op); else BEQL(op); break; case 21: /* Major opcode 21: BNEL */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BNEL_IDLE(op); else BNEL(op); break; case 22: /* Major opcode 22: BLEZL */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BLEZL_IDLE(op); else BLEZL(op); break; case 23: /* Major opcode 23: BGTZL */ if (IS_RELATIVE_IDLE_LOOP(op, PC->addr)) BGTZL_IDLE(op); else BGTZL(op); break; case 24: /* Major opcode 24: DADDI */ if (RT_OF(op) != 0) DADDI(op); else NOP(0); break; case 25: /* Major opcode 25: DADDIU */ if (RT_OF(op) != 0) DADDIU(op); else NOP(0); break; case 26: /* Major opcode 26: LDL */ if (RT_OF(op) != 0) LDL(op); else NOP(0); break; case 27: /* Major opcode 27: LDR */ if (RT_OF(op) != 0) LDR(op); else NOP(0); break; case 32: /* Major opcode 32: LB */ if (RT_OF(op) != 0) LB(op); else NOP(0); break; case 33: /* Major opcode 33: LH */ if (RT_OF(op) != 0) LH(op); else NOP(0); break; case 34: /* Major opcode 34: LWL */ if (RT_OF(op) != 0) LWL(op); else NOP(0); break; case 35: /* Major opcode 35: LW */ if (RT_OF(op) != 0) LW(op); else NOP(0); break; case 36: /* Major opcode 36: LBU */ if (RT_OF(op) != 0) LBU(op); else NOP(0); break; case 37: /* Major opcode 37: LHU */ if (RT_OF(op) != 0) LHU(op); else NOP(0); break; case 38: /* Major opcode 38: LWR */ if (RT_OF(op) != 0) LWR(op); else NOP(0); break; case 39: /* Major opcode 39: LWU */ if (RT_OF(op) != 0) LWU(op); else NOP(0); break; case 40: SB(op); break; case 41: SH(op); break; case 42: SWL(op); break; case 43: SW(op); break; case 44: SDL(op); break; case 45: SDR(op); break; case 46: SWR(op); break; case 47: CACHE(op); break; case 48: /* Major opcode 48: LL */ if (RT_OF(op) != 0) LL(op); else NOP(0); break; case 49: LWC1(op); break; case 52: /* Major opcode 52: LLD (Not implemented) */ NI(op); break; case 53: LDC1(op); break; case 55: /* Major opcode 55: LD */ if (RT_OF(op) != 0) LD(op); else NOP(0); break; case 56: /* Major opcode 56: SC */ if (RT_OF(op) != 0) SC(op); else NOP(0); break; case 57: SWC1(op); break; case 60: /* Major opcode 60: SCD (Not implemented) */ NI(op); break; case 61: SDC1(op); break; case 63: SD(op); break; default: /* Major opcodes 18..19, 28..31, 50..51, 54, 58..59, 62: Reserved Instructions */ RESERVED(op); break; } /* switch ((op >> 26) & 0x3F) */ } void pure_interpreter(void) { stop = 0; PC = &interp_PC; PC->addr = last_addr = 0xa4000040; while (!stop) { #ifdef COMPARE_CORE CoreCompareCallback(); #endif #ifdef DBG if (g_DebuggerActive) update_debugger(PC->addr); #endif InterpretOpcode(); } } mupen64plus-core-src-2.5/src/r4300/pure_interp.h000066400000000000000000000032151251723631200213440ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - pure_interp.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_PURE_INTERP_H #define M64P_R4300_PURE_INTERP_H void pure_interpreter(void); #endif /* M64P_R4300_PURE_INTERP_H */ mupen64plus-core-src-2.5/src/r4300/r4300.c000066400000000000000000000235041251723631200175560ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - r4300.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include #include "ai/ai_controller.h" #include "api/callbacks.h" #include "api/debugger.h" #include "api/m64p_types.h" #include "cached_interp.h" #include "cp0_private.h" #include "cp1_private.h" #include "interupt.h" #include "main/main.h" #include "main/rom.h" #include "memory/memory.h" #include "mi_controller.h" #include "new_dynarec/new_dynarec.h" #include "ops.h" #include "pi/pi_controller.h" #include "pure_interp.h" #include "r4300.h" #include "r4300_core.h" #include "recomp.h" #include "recomph.h" #include "rsp/rsp_core.h" #include "si/si_controller.h" #include "tlb.h" #include "vi/vi_controller.h" #ifdef DBG #include "debugger/dbg_debugger.h" #include "debugger/dbg_types.h" #endif #if defined(COUNT_INSTR) #include "instr_counters.h" #endif unsigned int r4300emu = 0; unsigned int count_per_op = COUNT_PER_OP_DEFAULT; int rompause; unsigned int llbit; #if NEW_DYNAREC != NEW_DYNAREC_ARM int stop; int64_t reg[32], hi, lo; uint32_t next_interupt; precomp_instr *PC; #endif long long int local_rs; unsigned int delay_slot; uint32_t skip_jump = 0; unsigned int dyna_interp = 0; uint32_t last_addr; cpu_instruction_table current_instruction_table; void generic_jump_to(uint32_t address) { if (r4300emu == CORE_PURE_INTERPRETER) PC->addr = address; else { #ifdef NEW_DYNAREC if (r4300emu == CORE_DYNAREC) last_addr = pcaddr; else jump_to(address); #else jump_to(address); #endif } } /* this hard reset function simulates the boot-up state of the R4300 CPU */ void r4300_reset_hard(void) { unsigned int i; // clear r4300 registers and TLB entries for (i = 0; i < 32; i++) { reg[i]=0; g_cp0_regs[i]=0; reg_cop1_fgr_64[i]=0; // --------------tlb------------------------ tlb_e[i].mask=0; tlb_e[i].vpn2=0; tlb_e[i].g=0; tlb_e[i].asid=0; tlb_e[i].pfn_even=0; tlb_e[i].c_even=0; tlb_e[i].d_even=0; tlb_e[i].v_even=0; tlb_e[i].pfn_odd=0; tlb_e[i].c_odd=0; tlb_e[i].d_odd=0; tlb_e[i].v_odd=0; tlb_e[i].r=0; //tlb_e[i].check_parity_mask=0x1000; tlb_e[i].start_even=0; tlb_e[i].end_even=0; tlb_e[i].phys_even=0; tlb_e[i].start_odd=0; tlb_e[i].end_odd=0; tlb_e[i].phys_odd=0; } for (i=0; i<0x100000; i++) { tlb_LUT_r[i] = 0; tlb_LUT_w[i] = 0; } llbit=0; hi=0; lo=0; FCR0 = UINT32_C(0x511); FCR31=0; // set COP0 registers g_cp0_regs[CP0_RANDOM_REG] = UINT32_C(31); g_cp0_regs[CP0_STATUS_REG]= UINT32_C(0x34000000); set_fpr_pointers(g_cp0_regs[CP0_STATUS_REG]); g_cp0_regs[CP0_CONFIG_REG]= UINT32_C(0x6e463); g_cp0_regs[CP0_PREVID_REG] = UINT32_C(0xb00); g_cp0_regs[CP0_COUNT_REG] = UINT32_C(0x5000); g_cp0_regs[CP0_CAUSE_REG] = UINT32_C(0x5C); g_cp0_regs[CP0_CONTEXT_REG] = UINT32_C(0x7FFFF0); g_cp0_regs[CP0_EPC_REG] = UINT32_C(0xFFFFFFFF); g_cp0_regs[CP0_BADVADDR_REG] = UINT32_C(0xFFFFFFFF); g_cp0_regs[CP0_ERROREPC_REG] = UINT32_C(0xFFFFFFFF); update_x86_rounding_mode(FCR31); } static unsigned int get_tv_type(void) { switch(ROM_PARAMS.systemtype) { default: case SYSTEM_NTSC: return 1; case SYSTEM_PAL: return 0; case SYSTEM_MPAL: return 2; } } /* Simulates end result of PIFBootROM execution */ void r4300_reset_soft(void) { unsigned int rom_type = 0; /* 0:Cart, 1:DD */ unsigned int reset_type = 0; /* 0:ColdReset, 1:NMI */ unsigned int s7 = 0; /* ??? */ unsigned int tv_type = get_tv_type(); /* 0:PAL, 1:NTSC, 2:MPAL */ uint32_t bsd_dom1_config = *(uint32_t*)g_rom; g_cp0_regs[CP0_STATUS_REG] = 0x34000000; g_cp0_regs[CP0_CONFIG_REG] = 0x0006e463; g_sp.regs[SP_STATUS_REG] = 1; g_sp.regs2[SP_PC_REG] = 0; g_pi.regs[PI_BSD_DOM1_LAT_REG] = (bsd_dom1_config ) & 0xff; g_pi.regs[PI_BSD_DOM1_PWD_REG] = (bsd_dom1_config >> 8) & 0xff; g_pi.regs[PI_BSD_DOM1_PGS_REG] = (bsd_dom1_config >> 16) & 0x0f; g_pi.regs[PI_BSD_DOM1_RLS_REG] = (bsd_dom1_config >> 20) & 0x03; g_pi.regs[PI_STATUS_REG] = 0; g_ai.regs[AI_DRAM_ADDR_REG] = 0; g_ai.regs[AI_LEN_REG] = 0; g_vi.regs[VI_V_INTR_REG] = 1023; g_vi.regs[VI_CURRENT_REG] = 0; g_vi.regs[VI_H_START_REG] = 0; g_r4300.mi.regs[MI_INTR_REG] &= ~(MI_INTR_PI | MI_INTR_VI | MI_INTR_AI | MI_INTR_SP); memcpy((unsigned char*)g_sp.mem+0x40, g_rom+0x40, 0xfc0); reg[19] = rom_type; /* s3 */ reg[20] = tv_type; /* s4 */ reg[21] = reset_type; /* s5 */ reg[22] = g_si.pif.cic.seed;/* s6 */ reg[23] = s7; /* s7 */ /* required by CIC x105 */ g_sp.mem[0x1000/4] = 0x3c0dbfc0; g_sp.mem[0x1004/4] = 0x8da807fc; g_sp.mem[0x1008/4] = 0x25ad07c0; g_sp.mem[0x100c/4] = 0x31080080; g_sp.mem[0x1010/4] = 0x5500fffc; g_sp.mem[0x1014/4] = 0x3c0dbfc0; g_sp.mem[0x1018/4] = 0x8da80024; g_sp.mem[0x101c/4] = 0x3c0bb000; /* required by CIC x105 */ reg[11] = INT64_C(0xffffffffa4000040); /* t3 */ reg[29] = INT64_C(0xffffffffa4001ff0); /* sp */ reg[31] = INT64_C(0xffffffffa4001550); /* ra */ /* ready to execute IPL3 */ } #if !defined(NO_ASM) static void dynarec_setup_code(void) { // The dynarec jumps here after we call dyna_start and it prepares // Here we need to prepare the initial code block and jump to it jump_to(UINT32_C(0xa4000040)); // Prevent segfault on failed jump_to if (!actual->block || !actual->code) dyna_stop(); } #endif void r4300_execute(void) { #if (defined(DYNAREC) && defined(PROFILE_R4300)) unsigned int i; #endif current_instruction_table = cached_interpreter_table; delay_slot=0; stop = 0; rompause = 0; /* clear instruction counters */ #if defined(COUNT_INSTR) memset(instr_count, 0, 131*sizeof(instr_count[0])); #endif last_addr = 0xa4000040; next_interupt = 624999; init_interupt(); if (r4300emu == CORE_PURE_INTERPRETER) { DebugMessage(M64MSG_INFO, "Starting R4300 emulator: Pure Interpreter"); r4300emu = CORE_PURE_INTERPRETER; pure_interpreter(); } #if defined(DYNAREC) else if (r4300emu >= 2) { DebugMessage(M64MSG_INFO, "Starting R4300 emulator: Dynamic Recompiler"); r4300emu = CORE_DYNAREC; init_blocks(); #ifdef NEW_DYNAREC new_dynarec_init(); new_dyna_start(); new_dynarec_cleanup(); #else dyna_start(dynarec_setup_code); PC++; #endif #if defined(PROFILE_R4300) pfProfile = fopen("instructionaddrs.dat", "ab"); for (i=0; i<0x100000; i++) if (invalid_code[i] == 0 && blocks[i] != NULL && blocks[i]->code != NULL && blocks[i]->block != NULL) { unsigned char *x86addr; int mipsop; // store final code length for this block mipsop = -1; /* -1 == end of x86 code block */ x86addr = blocks[i]->code + blocks[i]->code_length; if (fwrite(&mipsop, 1, 4, pfProfile) != 4 || fwrite(&x86addr, 1, sizeof(char *), pfProfile) != sizeof(char *)) DebugMessage(M64MSG_ERROR, "Error writing R4300 instruction address profiling data"); } fclose(pfProfile); pfProfile = NULL; #endif free_blocks(); } #endif else /* if (r4300emu == CORE_INTERPRETER) */ { DebugMessage(M64MSG_INFO, "Starting R4300 emulator: Cached Interpreter"); r4300emu = CORE_INTERPRETER; init_blocks(); jump_to(UINT32_C(0xa4000040)); /* Prevent segfault on failed jump_to */ if (!actual->block) return; last_addr = PC->addr; while (!stop) { #ifdef COMPARE_CORE if (PC->ops == cached_interpreter_table.FIN_BLOCK && (PC->addr < 0x80000000 || PC->addr >= 0xc0000000)) virtual_to_physical_address(PC->addr, 2); CoreCompareCallback(); #endif #ifdef DBG if (g_DebuggerActive) update_debugger(PC->addr); #endif PC->ops(); } free_blocks(); } DebugMessage(M64MSG_INFO, "R4300 emulator finished."); /* print instruction counts */ #if defined(COUNT_INSTR) if (r4300emu == CORE_DYNAREC) instr_counters_print(); #endif } mupen64plus-core-src-2.5/src/r4300/r4300.h000066400000000000000000000044701251723631200175640ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - r4300.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_R4300_H #define M64P_R4300_R4300_H #include #include "ops.h" #include "r4300_core.h" #include "recomp.h" extern precomp_instr *PC; extern int stop, rompause; extern unsigned int llbit; extern int64_t reg[32], hi, lo; extern long long int local_rs; extern unsigned int delay_slot; extern uint32_t skip_jump; extern unsigned int dyna_interp; extern unsigned int r4300emu; extern uint32_t next_interupt; extern uint32_t last_addr; #define COUNT_PER_OP_DEFAULT 2 extern unsigned int count_per_op; extern cpu_instruction_table current_instruction_table; void r4300_reset_hard(void); void r4300_reset_soft(void); void r4300_execute(void); // r4300 emulators #define CORE_PURE_INTERPRETER 0 #define CORE_INTERPRETER 1 #define CORE_DYNAREC 2 #endif /* M64P_R4300_R4300_H */ mupen64plus-core-src-2.5/src/r4300/r4300_core.c000066400000000000000000000057761251723631200206010ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - r4300_core.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "r4300_core.h" #include "cached_interp.h" #include "mi_controller.h" #include "new_dynarec/new_dynarec.h" #include "r4300.h" #include "recomp.h" void init_r4300(struct r4300_core* r4300) { init_mi(&r4300->mi); } int64_t* r4300_regs(void) { return reg; } int64_t* r4300_mult_hi(void) { return &hi; } int64_t* r4300_mult_lo(void) { return &lo; } unsigned int* r4300_llbit(void) { return &llbit; } uint32_t* r4300_pc(void) { #ifdef NEW_DYNAREC return (r4300emu == CORE_DYNAREC) ? (uint32_t*)&pcaddr : &PC->addr; #else return &PC->addr; #endif } uint32_t* r4300_last_addr(void) { return &last_addr; } unsigned int* r4300_next_interrupt(void) { return &next_interupt; } unsigned int get_r4300_emumode(void) { return r4300emu; } void invalidate_r4300_cached_code(uint32_t address, size_t size) { if (r4300emu != CORE_PURE_INTERPRETER) { #ifdef NEW_DYNAREC if (r4300emu == CORE_DYNAREC) { invalidate_cached_code_new_dynarec(address, size); } else #endif { invalidate_cached_code_hacktarux(address, size); } } } /* XXX: not really a good interface but it gets the job done... */ void savestates_load_set_pc(uint32_t pc) { #ifdef NEW_DYNAREC if (r4300emu == CORE_DYNAREC) { pcaddr = pc; pending_exception = 1; invalidate_all_pages(); } else #endif { generic_jump_to(pc); invalidate_r4300_cached_code(0,0); } } mupen64plus-core-src-2.5/src/r4300/r4300_core.h000066400000000000000000000050741251723631200205750ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - r4300_core.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_R4300_CORE_H #define M64P_R4300_R4300_CORE_H #include #include #include "cp0.h" #include "cp1.h" #include "interupt.h" #include "mi_controller.h" #include "tlb.h" struct r4300_core { struct mi_controller mi; }; void init_r4300(struct r4300_core* r4300); int64_t* r4300_regs(void); int64_t* r4300_mult_hi(void); int64_t* r4300_mult_lo(void); unsigned int* r4300_llbit(void); uint32_t* r4300_pc(void); uint32_t* r4300_last_addr(void); unsigned int* r4300_next_interrupt(void); unsigned int get_r4300_emumode(void); /* Allow cached/dynarec r4300 implementations to invalidate * their cached code at [address, address+size] * * If size == 0, r4300 implementation should invalidate * all cached code. */ void invalidate_r4300_cached_code(uint32_t address, size_t size); /* Jump to the given address. This works for all r4300 emulator, but is slower. * Use this for common code which can be executed from any r4300 emulator. */ void generic_jump_to(unsigned int address); void savestates_load_set_pc(uint32_t pc); #endif mupen64plus-core-src-2.5/src/r4300/recomp.c000066400000000000000000002115421251723631200202740ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - recomp.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include #define __STDC_FORMAT_MACROS #include #if defined(__GNUC__) #include #ifndef __MINGW32__ #include #endif #endif #include "api/callbacks.h" #include "api/m64p_types.h" #include "cached_interp.h" #include "cp0_private.h" #include "main/profile.h" #include "memory/memory.h" #include "ops.h" #include "r4300.h" #include "recomp.h" #include "recomph.h" //include for function prototypes #include "tlb.h" static void *malloc_exec(size_t size); static void free_exec(void *ptr, size_t length); // global variables : precomp_instr *dst; // destination structure for the recompiled instruction int code_length; // current real recompiled code length int max_code_length; // current recompiled code's buffer length unsigned char **inst_pointer; // output buffer for recompiled code precomp_block *dst_block; // the current block that we are recompiling uint32_t src; // the current recompiled instruction int fast_memory; int no_compiled_jump = 0; /* use cached interpreter instead of recompiler for jumps */ static void (*recomp_func)(void); // pointer to the dynarec's generator // function for the latest decoded opcode #if defined(PROFILE_R4300) FILE *pfProfile; #endif static const uint32_t *SRC; // currently recompiled instruction in the input stream static int check_nop; // next instruction is nop ? static int delay_slot_compiled = 0; static void RSV(void) { dst->ops = current_instruction_table.RESERVED; recomp_func = genreserved; } static void RFIN_BLOCK(void) { dst->ops = current_instruction_table.FIN_BLOCK; recomp_func = genfin_block; } static void RNOTCOMPILED(void) { dst->ops = current_instruction_table.NOTCOMPILED; recomp_func = gennotcompiled; } static void recompile_standard_i_type(void) { dst->f.i.rs = reg + ((src >> 21) & 0x1F); dst->f.i.rt = reg + ((src >> 16) & 0x1F); dst->f.i.immediate = (int16_t) src; } static void recompile_standard_j_type(void) { dst->f.j.inst_index = src & UINT32_C(0x3FFFFFF); } static void recompile_standard_r_type(void) { dst->f.r.rs = reg + ((src >> 21) & 0x1F); dst->f.r.rt = reg + ((src >> 16) & 0x1F); dst->f.r.rd = reg + ((src >> 11) & 0x1F); dst->f.r.sa = (src >> 6) & 0x1F; } static void recompile_standard_lf_type(void) { dst->f.lf.base = (src >> 21) & 0x1F; dst->f.lf.ft = (src >> 16) & 0x1F; dst->f.lf.offset = src & 0xFFFF; } static void recompile_standard_cf_type(void) { dst->f.cf.ft = (src >> 16) & 0x1F; dst->f.cf.fs = (src >> 11) & 0x1F; dst->f.cf.fd = (src >> 6) & 0x1F; } //------------------------------------------------------------------------- // SPECIAL //------------------------------------------------------------------------- static void RNOP(void) { dst->ops = current_instruction_table.NOP; recomp_func = gennop; } static void RSLL(void) { dst->ops = current_instruction_table.SLL; recomp_func = gensll; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RSRL(void) { dst->ops = current_instruction_table.SRL; recomp_func = gensrl; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RSRA(void) { dst->ops = current_instruction_table.SRA; recomp_func = gensra; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RSLLV(void) { dst->ops = current_instruction_table.SLLV; recomp_func = gensllv; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RSRLV(void) { dst->ops = current_instruction_table.SRLV; recomp_func = gensrlv; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RSRAV(void) { dst->ops = current_instruction_table.SRAV; recomp_func = gensrav; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RJR(void) { dst->ops = current_instruction_table.JR; recomp_func = genjr; recompile_standard_i_type(); } static void RJALR(void) { dst->ops = current_instruction_table.JALR; recomp_func = genjalr; recompile_standard_r_type(); } static void RSYSCALL(void) { dst->ops = current_instruction_table.SYSCALL; recomp_func = gensyscall; } static void RBREAK(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; } static void RSYNC(void) { dst->ops = current_instruction_table.SYNC; recomp_func = gensync; } static void RMFHI(void) { dst->ops = current_instruction_table.MFHI; recomp_func = genmfhi; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RMTHI(void) { dst->ops = current_instruction_table.MTHI; recomp_func = genmthi; recompile_standard_r_type(); } static void RMFLO(void) { dst->ops = current_instruction_table.MFLO; recomp_func = genmflo; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RMTLO(void) { dst->ops = current_instruction_table.MTLO; recomp_func = genmtlo; recompile_standard_r_type(); } static void RDSLLV(void) { dst->ops = current_instruction_table.DSLLV; recomp_func = gendsllv; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RDSRLV(void) { dst->ops = current_instruction_table.DSRLV; recomp_func = gendsrlv; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RDSRAV(void) { dst->ops = current_instruction_table.DSRAV; recomp_func = gendsrav; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RMULT(void) { dst->ops = current_instruction_table.MULT; recomp_func = genmult; recompile_standard_r_type(); } static void RMULTU(void) { dst->ops = current_instruction_table.MULTU; recomp_func = genmultu; recompile_standard_r_type(); } static void RDIV(void) { dst->ops = current_instruction_table.DIV; recomp_func = gendiv; recompile_standard_r_type(); } static void RDIVU(void) { dst->ops = current_instruction_table.DIVU; recomp_func = gendivu; recompile_standard_r_type(); } static void RDMULT(void) { dst->ops = current_instruction_table.DMULT; recomp_func = gendmult; recompile_standard_r_type(); } static void RDMULTU(void) { dst->ops = current_instruction_table.DMULTU; recomp_func = gendmultu; recompile_standard_r_type(); } static void RDDIV(void) { dst->ops = current_instruction_table.DDIV; recomp_func = genddiv; recompile_standard_r_type(); } static void RDDIVU(void) { dst->ops = current_instruction_table.DDIVU; recomp_func = genddivu; recompile_standard_r_type(); } static void RADD(void) { dst->ops = current_instruction_table.ADD; recomp_func = genadd; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RADDU(void) { dst->ops = current_instruction_table.ADDU; recomp_func = genaddu; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RSUB(void) { dst->ops = current_instruction_table.SUB; recomp_func = gensub; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RSUBU(void) { dst->ops = current_instruction_table.SUBU; recomp_func = gensubu; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RAND(void) { dst->ops = current_instruction_table.AND; recomp_func = genand; recompile_standard_r_type(); if(dst->f.r.rd == reg) RNOP(); } static void ROR(void) { dst->ops = current_instruction_table.OR; recomp_func = genor; recompile_standard_r_type(); if(dst->f.r.rd == reg) RNOP(); } static void RXOR(void) { dst->ops = current_instruction_table.XOR; recomp_func = genxor; recompile_standard_r_type(); if(dst->f.r.rd == reg) RNOP(); } static void RNOR(void) { dst->ops = current_instruction_table.NOR; recomp_func = gennor; recompile_standard_r_type(); if(dst->f.r.rd == reg) RNOP(); } static void RSLT(void) { dst->ops = current_instruction_table.SLT; recomp_func = genslt; recompile_standard_r_type(); if(dst->f.r.rd == reg) RNOP(); } static void RSLTU(void) { dst->ops = current_instruction_table.SLTU; recomp_func = gensltu; recompile_standard_r_type(); if(dst->f.r.rd == reg) RNOP(); } static void RDADD(void) { dst->ops = current_instruction_table.DADD; recomp_func = gendadd; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RDADDU(void) { dst->ops = current_instruction_table.DADDU; recomp_func = gendaddu; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RDSUB(void) { dst->ops = current_instruction_table.DSUB; recomp_func = gendsub; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RDSUBU(void) { dst->ops = current_instruction_table.DSUBU; recomp_func = gendsubu; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RTGE(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; } static void RTGEU(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; } static void RTLT(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; } static void RTLTU(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; } static void RTEQ(void) { dst->ops = current_instruction_table.TEQ; recomp_func = genteq; recompile_standard_r_type(); } static void RTNE(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; } static void RDSLL(void) { dst->ops = current_instruction_table.DSLL; recomp_func = gendsll; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RDSRL(void) { dst->ops = current_instruction_table.DSRL; recomp_func = gendsrl; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RDSRA(void) { dst->ops = current_instruction_table.DSRA; recomp_func = gendsra; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RDSLL32(void) { dst->ops = current_instruction_table.DSLL32; recomp_func = gendsll32; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RDSRL32(void) { dst->ops = current_instruction_table.DSRL32; recomp_func = gendsrl32; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void RDSRA32(void) { dst->ops = current_instruction_table.DSRA32; recomp_func = gendsra32; recompile_standard_r_type(); if (dst->f.r.rd == reg) RNOP(); } static void (*recomp_special[64])(void) = { RSLL , RSV , RSRL , RSRA , RSLLV , RSV , RSRLV , RSRAV , RJR , RJALR , RSV , RSV , RSYSCALL, RBREAK , RSV , RSYNC , RMFHI, RMTHI , RMFLO, RMTLO, RDSLLV , RSV , RDSRLV , RDSRAV , RMULT, RMULTU, RDIV , RDIVU, RDMULT , RDMULTU, RDDIV , RDDIVU , RADD , RADDU , RSUB , RSUBU, RAND , ROR , RXOR , RNOR , RSV , RSV , RSLT , RSLTU, RDADD , RDADDU , RDSUB , RDSUBU , RTGE , RTGEU , RTLT , RTLTU, RTEQ , RSV , RTNE , RSV , RDSLL, RSV , RDSRL, RDSRA, RDSLL32 , RSV , RDSRL32, RDSRA32 }; //------------------------------------------------------------------------- // REGIMM //------------------------------------------------------------------------- static void RBLTZ(void) { uint32_t target; dst->ops = current_instruction_table.BLTZ; recomp_func = genbltz; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BLTZ_IDLE; recomp_func = genbltz_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BLTZ_OUT; recomp_func = genbltz_out; } } static void RBGEZ(void) { uint32_t target; dst->ops = current_instruction_table.BGEZ; recomp_func = genbgez; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BGEZ_IDLE; recomp_func = genbgez_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BGEZ_OUT; recomp_func = genbgez_out; } } static void RBLTZL(void) { uint32_t target; dst->ops = current_instruction_table.BLTZL; recomp_func = genbltzl; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BLTZL_IDLE; recomp_func = genbltzl_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BLTZL_OUT; recomp_func = genbltzl_out; } } static void RBGEZL(void) { uint32_t target; dst->ops = current_instruction_table.BGEZL; recomp_func = genbgezl; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BGEZL_IDLE; recomp_func = genbgezl_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BGEZL_OUT; recomp_func = genbgezl_out; } } static void RTGEI(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; } static void RTGEIU(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; } static void RTLTI(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; } static void RTLTIU(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; } static void RTEQI(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; } static void RTNEI(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; } static void RBLTZAL(void) { uint32_t target; dst->ops = current_instruction_table.BLTZAL; recomp_func = genbltzal; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BLTZAL_IDLE; recomp_func = genbltzal_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BLTZAL_OUT; recomp_func = genbltzal_out; } } static void RBGEZAL(void) { uint32_t target; dst->ops = current_instruction_table.BGEZAL; recomp_func = genbgezal; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BGEZAL_IDLE; recomp_func = genbgezal_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BGEZAL_OUT; recomp_func = genbgezal_out; } } static void RBLTZALL(void) { uint32_t target; dst->ops = current_instruction_table.BLTZALL; recomp_func = genbltzall; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BLTZALL_IDLE; recomp_func = genbltzall_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BLTZALL_OUT; recomp_func = genbltzall_out; } } static void RBGEZALL(void) { uint32_t target; dst->ops = current_instruction_table.BGEZALL; recomp_func = genbgezall; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BGEZALL_IDLE; recomp_func = genbgezall_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BGEZALL_OUT; recomp_func = genbgezall_out; } } static void (*recomp_regimm[32])(void) = { RBLTZ , RBGEZ , RBLTZL , RBGEZL , RSV , RSV, RSV , RSV, RTGEI , RTGEIU , RTLTI , RTLTIU , RTEQI, RSV, RTNEI, RSV, RBLTZAL, RBGEZAL, RBLTZALL, RBGEZALL, RSV , RSV, RSV , RSV, RSV , RSV , RSV , RSV , RSV , RSV, RSV , RSV }; //------------------------------------------------------------------------- // TLB //------------------------------------------------------------------------- static void RTLBR(void) { dst->ops = current_instruction_table.TLBR; recomp_func = gentlbr; } static void RTLBWI(void) { dst->ops = current_instruction_table.TLBWI; recomp_func = gentlbwi; } static void RTLBWR(void) { dst->ops = current_instruction_table.TLBWR; recomp_func = gentlbwr; } static void RTLBP(void) { dst->ops = current_instruction_table.TLBP; recomp_func = gentlbp; } static void RERET(void) { dst->ops = current_instruction_table.ERET; recomp_func = generet; } static void (*recomp_tlb[64])(void) = { RSV , RTLBR, RTLBWI, RSV, RSV, RSV, RTLBWR, RSV, RTLBP, RSV , RSV , RSV, RSV, RSV, RSV , RSV, RSV , RSV , RSV , RSV, RSV, RSV, RSV , RSV, RERET, RSV , RSV , RSV, RSV, RSV, RSV , RSV, RSV , RSV , RSV , RSV, RSV, RSV, RSV , RSV, RSV , RSV , RSV , RSV, RSV, RSV, RSV , RSV, RSV , RSV , RSV , RSV, RSV, RSV, RSV , RSV, RSV , RSV , RSV , RSV, RSV, RSV, RSV , RSV }; //------------------------------------------------------------------------- // COP0 //------------------------------------------------------------------------- static void RMFC0(void) { dst->ops = current_instruction_table.MFC0; recomp_func = genmfc0; recompile_standard_r_type(); dst->f.r.rd = (int64_t*) (g_cp0_regs + ((src >> 11) & 0x1F)); dst->f.r.nrd = (src >> 11) & 0x1F; if (dst->f.r.rt == reg) RNOP(); } static void RMTC0(void) { dst->ops = current_instruction_table.MTC0; recomp_func = genmtc0; recompile_standard_r_type(); dst->f.r.nrd = (src >> 11) & 0x1F; } static void RTLB(void) { recomp_tlb[(src & 0x3F)](); } static void (*recomp_cop0[32])(void) = { RMFC0, RSV, RSV, RSV, RMTC0, RSV, RSV, RSV, RSV , RSV, RSV, RSV, RSV , RSV, RSV, RSV, RTLB , RSV, RSV, RSV, RSV , RSV, RSV, RSV, RSV , RSV, RSV, RSV, RSV , RSV, RSV, RSV }; //------------------------------------------------------------------------- // BC //------------------------------------------------------------------------- static void RBC1F(void) { uint32_t target; dst->ops = current_instruction_table.BC1F; recomp_func = genbc1f; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BC1F_IDLE; recomp_func = genbc1f_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BC1F_OUT; recomp_func = genbc1f_out; } } static void RBC1T(void) { uint32_t target; dst->ops = current_instruction_table.BC1T; recomp_func = genbc1t; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BC1T_IDLE; recomp_func = genbc1t_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BC1T_OUT; recomp_func = genbc1t_out; } } static void RBC1FL(void) { uint32_t target; dst->ops = current_instruction_table.BC1FL; recomp_func = genbc1fl; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BC1FL_IDLE; recomp_func = genbc1fl_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BC1FL_OUT; recomp_func = genbc1fl_out; } } static void RBC1TL(void) { uint32_t target; dst->ops = current_instruction_table.BC1TL; recomp_func = genbc1tl; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BC1TL_IDLE; recomp_func = genbc1tl_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BC1TL_OUT; recomp_func = genbc1tl_out; } } static void (*recomp_bc[4])(void) = { RBC1F , RBC1T , RBC1FL, RBC1TL }; //------------------------------------------------------------------------- // S //------------------------------------------------------------------------- static void RADD_S(void) { dst->ops = current_instruction_table.ADD_S; recomp_func = genadd_s; recompile_standard_cf_type(); } static void RSUB_S(void) { dst->ops = current_instruction_table.SUB_S; recomp_func = gensub_s; recompile_standard_cf_type(); } static void RMUL_S(void) { dst->ops = current_instruction_table.MUL_S; recomp_func = genmul_s; recompile_standard_cf_type(); } static void RDIV_S(void) { dst->ops = current_instruction_table.DIV_S; recomp_func = gendiv_s; recompile_standard_cf_type(); } static void RSQRT_S(void) { dst->ops = current_instruction_table.SQRT_S; recomp_func = gensqrt_s; recompile_standard_cf_type(); } static void RABS_S(void) { dst->ops = current_instruction_table.ABS_S; recomp_func = genabs_s; recompile_standard_cf_type(); } static void RMOV_S(void) { dst->ops = current_instruction_table.MOV_S; recomp_func = genmov_s; recompile_standard_cf_type(); } static void RNEG_S(void) { dst->ops = current_instruction_table.NEG_S; recomp_func = genneg_s; recompile_standard_cf_type(); } static void RROUND_L_S(void) { dst->ops = current_instruction_table.ROUND_L_S; recomp_func = genround_l_s; recompile_standard_cf_type(); } static void RTRUNC_L_S(void) { dst->ops = current_instruction_table.TRUNC_L_S; recomp_func = gentrunc_l_s; recompile_standard_cf_type(); } static void RCEIL_L_S(void) { dst->ops = current_instruction_table.CEIL_L_S; recomp_func = genceil_l_s; recompile_standard_cf_type(); } static void RFLOOR_L_S(void) { dst->ops = current_instruction_table.FLOOR_L_S; recomp_func = genfloor_l_s; recompile_standard_cf_type(); } static void RROUND_W_S(void) { dst->ops = current_instruction_table.ROUND_W_S; recomp_func = genround_w_s; recompile_standard_cf_type(); } static void RTRUNC_W_S(void) { dst->ops = current_instruction_table.TRUNC_W_S; recomp_func = gentrunc_w_s; recompile_standard_cf_type(); } static void RCEIL_W_S(void) { dst->ops = current_instruction_table.CEIL_W_S; recomp_func = genceil_w_s; recompile_standard_cf_type(); } static void RFLOOR_W_S(void) { dst->ops = current_instruction_table.FLOOR_W_S; recomp_func = genfloor_w_s; recompile_standard_cf_type(); } static void RCVT_D_S(void) { dst->ops = current_instruction_table.CVT_D_S; recomp_func = gencvt_d_s; recompile_standard_cf_type(); } static void RCVT_W_S(void) { dst->ops = current_instruction_table.CVT_W_S; recomp_func = gencvt_w_s; recompile_standard_cf_type(); } static void RCVT_L_S(void) { dst->ops = current_instruction_table.CVT_L_S; recomp_func = gencvt_l_s; recompile_standard_cf_type(); } static void RC_F_S(void) { dst->ops = current_instruction_table.C_F_S; recomp_func = genc_f_s; recompile_standard_cf_type(); } static void RC_UN_S(void) { dst->ops = current_instruction_table.C_UN_S; recomp_func = genc_un_s; recompile_standard_cf_type(); } static void RC_EQ_S(void) { dst->ops = current_instruction_table.C_EQ_S; recomp_func = genc_eq_s; recompile_standard_cf_type(); } static void RC_UEQ_S(void) { dst->ops = current_instruction_table.C_UEQ_S; recomp_func = genc_ueq_s; recompile_standard_cf_type(); } static void RC_OLT_S(void) { dst->ops = current_instruction_table.C_OLT_S; recomp_func = genc_olt_s; recompile_standard_cf_type(); } static void RC_ULT_S(void) { dst->ops = current_instruction_table.C_ULT_S; recomp_func = genc_ult_s; recompile_standard_cf_type(); } static void RC_OLE_S(void) { dst->ops = current_instruction_table.C_OLE_S; recomp_func = genc_ole_s; recompile_standard_cf_type(); } static void RC_ULE_S(void) { dst->ops = current_instruction_table.C_ULE_S; recomp_func = genc_ule_s; recompile_standard_cf_type(); } static void RC_SF_S(void) { dst->ops = current_instruction_table.C_SF_S; recomp_func = genc_sf_s; recompile_standard_cf_type(); } static void RC_NGLE_S(void) { dst->ops = current_instruction_table.C_NGLE_S; recomp_func = genc_ngle_s; recompile_standard_cf_type(); } static void RC_SEQ_S(void) { dst->ops = current_instruction_table.C_SEQ_S; recomp_func = genc_seq_s; recompile_standard_cf_type(); } static void RC_NGL_S(void) { dst->ops = current_instruction_table.C_NGL_S; recomp_func = genc_ngl_s; recompile_standard_cf_type(); } static void RC_LT_S(void) { dst->ops = current_instruction_table.C_LT_S; recomp_func = genc_lt_s; recompile_standard_cf_type(); } static void RC_NGE_S(void) { dst->ops = current_instruction_table.C_NGE_S; recomp_func = genc_nge_s; recompile_standard_cf_type(); } static void RC_LE_S(void) { dst->ops = current_instruction_table.C_LE_S; recomp_func = genc_le_s; recompile_standard_cf_type(); } static void RC_NGT_S(void) { dst->ops = current_instruction_table.C_NGT_S; recomp_func = genc_ngt_s; recompile_standard_cf_type(); } static void (*recomp_s[64])(void) = { RADD_S , RSUB_S , RMUL_S , RDIV_S , RSQRT_S , RABS_S , RMOV_S , RNEG_S , RROUND_L_S, RTRUNC_L_S, RCEIL_L_S, RFLOOR_L_S, RROUND_W_S, RTRUNC_W_S, RCEIL_W_S, RFLOOR_W_S, RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RCVT_D_S , RSV , RSV , RCVT_W_S , RCVT_L_S , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RC_F_S , RC_UN_S , RC_EQ_S , RC_UEQ_S , RC_OLT_S , RC_ULT_S , RC_OLE_S , RC_ULE_S , RC_SF_S , RC_NGLE_S , RC_SEQ_S , RC_NGL_S , RC_LT_S , RC_NGE_S , RC_LE_S , RC_NGT_S }; //------------------------------------------------------------------------- // D //------------------------------------------------------------------------- static void RADD_D(void) { dst->ops = current_instruction_table.ADD_D; recomp_func = genadd_d; recompile_standard_cf_type(); } static void RSUB_D(void) { dst->ops = current_instruction_table.SUB_D; recomp_func = gensub_d; recompile_standard_cf_type(); } static void RMUL_D(void) { dst->ops = current_instruction_table.MUL_D; recomp_func = genmul_d; recompile_standard_cf_type(); } static void RDIV_D(void) { dst->ops = current_instruction_table.DIV_D; recomp_func = gendiv_d; recompile_standard_cf_type(); } static void RSQRT_D(void) { dst->ops = current_instruction_table.SQRT_D; recomp_func = gensqrt_d; recompile_standard_cf_type(); } static void RABS_D(void) { dst->ops = current_instruction_table.ABS_D; recomp_func = genabs_d; recompile_standard_cf_type(); } static void RMOV_D(void) { dst->ops = current_instruction_table.MOV_D; recomp_func = genmov_d; recompile_standard_cf_type(); } static void RNEG_D(void) { dst->ops = current_instruction_table.NEG_D; recomp_func = genneg_d; recompile_standard_cf_type(); } static void RROUND_L_D(void) { dst->ops = current_instruction_table.ROUND_L_D; recomp_func = genround_l_d; recompile_standard_cf_type(); } static void RTRUNC_L_D(void) { dst->ops = current_instruction_table.TRUNC_L_D; recomp_func = gentrunc_l_d; recompile_standard_cf_type(); } static void RCEIL_L_D(void) { dst->ops = current_instruction_table.CEIL_L_D; recomp_func = genceil_l_d; recompile_standard_cf_type(); } static void RFLOOR_L_D(void) { dst->ops = current_instruction_table.FLOOR_L_D; recomp_func = genfloor_l_d; recompile_standard_cf_type(); } static void RROUND_W_D(void) { dst->ops = current_instruction_table.ROUND_W_D; recomp_func = genround_w_d; recompile_standard_cf_type(); } static void RTRUNC_W_D(void) { dst->ops = current_instruction_table.TRUNC_W_D; recomp_func = gentrunc_w_d; recompile_standard_cf_type(); } static void RCEIL_W_D(void) { dst->ops = current_instruction_table.CEIL_W_D; recomp_func = genceil_w_d; recompile_standard_cf_type(); } static void RFLOOR_W_D(void) { dst->ops = current_instruction_table.FLOOR_W_D; recomp_func = genfloor_w_d; recompile_standard_cf_type(); } static void RCVT_S_D(void) { dst->ops = current_instruction_table.CVT_S_D; recomp_func = gencvt_s_d; recompile_standard_cf_type(); } static void RCVT_W_D(void) { dst->ops = current_instruction_table.CVT_W_D; recomp_func = gencvt_w_d; recompile_standard_cf_type(); } static void RCVT_L_D(void) { dst->ops = current_instruction_table.CVT_L_D; recomp_func = gencvt_l_d; recompile_standard_cf_type(); } static void RC_F_D(void) { dst->ops = current_instruction_table.C_F_D; recomp_func = genc_f_d; recompile_standard_cf_type(); } static void RC_UN_D(void) { dst->ops = current_instruction_table.C_UN_D; recomp_func = genc_un_d; recompile_standard_cf_type(); } static void RC_EQ_D(void) { dst->ops = current_instruction_table.C_EQ_D; recomp_func = genc_eq_d; recompile_standard_cf_type(); } static void RC_UEQ_D(void) { dst->ops = current_instruction_table.C_UEQ_D; recomp_func = genc_ueq_d; recompile_standard_cf_type(); } static void RC_OLT_D(void) { dst->ops = current_instruction_table.C_OLT_D; recomp_func = genc_olt_d; recompile_standard_cf_type(); } static void RC_ULT_D(void) { dst->ops = current_instruction_table.C_ULT_D; recomp_func = genc_ult_d; recompile_standard_cf_type(); } static void RC_OLE_D(void) { dst->ops = current_instruction_table.C_OLE_D; recomp_func = genc_ole_d; recompile_standard_cf_type(); } static void RC_ULE_D(void) { dst->ops = current_instruction_table.C_ULE_D; recomp_func = genc_ule_d; recompile_standard_cf_type(); } static void RC_SF_D(void) { dst->ops = current_instruction_table.C_SF_D; recomp_func = genc_sf_d; recompile_standard_cf_type(); } static void RC_NGLE_D(void) { dst->ops = current_instruction_table.C_NGLE_D; recomp_func = genc_ngle_d; recompile_standard_cf_type(); } static void RC_SEQ_D(void) { dst->ops = current_instruction_table.C_SEQ_D; recomp_func = genc_seq_d; recompile_standard_cf_type(); } static void RC_NGL_D(void) { dst->ops = current_instruction_table.C_NGL_D; recomp_func = genc_ngl_d; recompile_standard_cf_type(); } static void RC_LT_D(void) { dst->ops = current_instruction_table.C_LT_D; recomp_func = genc_lt_d; recompile_standard_cf_type(); } static void RC_NGE_D(void) { dst->ops = current_instruction_table.C_NGE_D; recomp_func = genc_nge_d; recompile_standard_cf_type(); } static void RC_LE_D(void) { dst->ops = current_instruction_table.C_LE_D; recomp_func = genc_le_d; recompile_standard_cf_type(); } static void RC_NGT_D(void) { dst->ops = current_instruction_table.C_NGT_D; recomp_func = genc_ngt_d; recompile_standard_cf_type(); } static void (*recomp_d[64])(void) = { RADD_D , RSUB_D , RMUL_D , RDIV_D , RSQRT_D , RABS_D , RMOV_D , RNEG_D , RROUND_L_D, RTRUNC_L_D, RCEIL_L_D, RFLOOR_L_D, RROUND_W_D, RTRUNC_W_D, RCEIL_W_D, RFLOOR_W_D, RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RCVT_S_D , RSV , RSV , RSV , RCVT_W_D , RCVT_L_D , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RSV , RC_F_D , RC_UN_D , RC_EQ_D , RC_UEQ_D , RC_OLT_D , RC_ULT_D , RC_OLE_D , RC_ULE_D , RC_SF_D , RC_NGLE_D , RC_SEQ_D , RC_NGL_D , RC_LT_D , RC_NGE_D , RC_LE_D , RC_NGT_D }; //------------------------------------------------------------------------- // W //------------------------------------------------------------------------- static void RCVT_S_W(void) { dst->ops = current_instruction_table.CVT_S_W; recomp_func = gencvt_s_w; recompile_standard_cf_type(); } static void RCVT_D_W(void) { dst->ops = current_instruction_table.CVT_D_W; recomp_func = gencvt_d_w; recompile_standard_cf_type(); } static void (*recomp_w[64])(void) = { RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, RCVT_S_W, RCVT_D_W, RSV, RSV, RSV, RSV, RSV, RSV, RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV }; //------------------------------------------------------------------------- // L //------------------------------------------------------------------------- static void RCVT_S_L(void) { dst->ops = current_instruction_table.CVT_S_L; recomp_func = gencvt_s_l; recompile_standard_cf_type(); } static void RCVT_D_L(void) { dst->ops = current_instruction_table.CVT_D_L; recomp_func = gencvt_d_l; recompile_standard_cf_type(); } static void (*recomp_l[64])(void) = { RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, RCVT_S_L, RCVT_D_L, RSV, RSV, RSV, RSV, RSV, RSV, RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, RSV , RSV , RSV, RSV, RSV, RSV, RSV, RSV, }; //------------------------------------------------------------------------- // COP1 //------------------------------------------------------------------------- static void RMFC1(void) { dst->ops = current_instruction_table.MFC1; recomp_func = genmfc1; recompile_standard_r_type(); dst->f.r.nrd = (src >> 11) & 0x1F; if (dst->f.r.rt == reg) RNOP(); } static void RDMFC1(void) { dst->ops = current_instruction_table.DMFC1; recomp_func = gendmfc1; recompile_standard_r_type(); dst->f.r.nrd = (src >> 11) & 0x1F; if (dst->f.r.rt == reg) RNOP(); } static void RCFC1(void) { dst->ops = current_instruction_table.CFC1; recomp_func = gencfc1; recompile_standard_r_type(); dst->f.r.nrd = (src >> 11) & 0x1F; if (dst->f.r.rt == reg) RNOP(); } static void RMTC1(void) { dst->ops = current_instruction_table.MTC1; recompile_standard_r_type(); recomp_func = genmtc1; dst->f.r.nrd = (src >> 11) & 0x1F; } static void RDMTC1(void) { dst->ops = current_instruction_table.DMTC1; recompile_standard_r_type(); recomp_func = gendmtc1; dst->f.r.nrd = (src >> 11) & 0x1F; } static void RCTC1(void) { dst->ops = current_instruction_table.CTC1; recompile_standard_r_type(); recomp_func = genctc1; dst->f.r.nrd = (src >> 11) & 0x1F; } static void RBC(void) { recomp_bc[((src >> 16) & 3)](); } static void RS(void) { recomp_s[(src & 0x3F)](); } static void RD(void) { recomp_d[(src & 0x3F)](); } static void RW(void) { recomp_w[(src & 0x3F)](); } static void RL(void) { recomp_l[(src & 0x3F)](); } static void (*recomp_cop1[32])(void) = { RMFC1, RDMFC1, RCFC1, RSV, RMTC1, RDMTC1, RCTC1, RSV, RBC , RSV , RSV , RSV, RSV , RSV , RSV , RSV, RS , RD , RSV , RSV, RW , RL , RSV , RSV, RSV , RSV , RSV , RSV, RSV , RSV , RSV , RSV }; //------------------------------------------------------------------------- // R4300 //------------------------------------------------------------------------- static void RSPECIAL(void) { recomp_special[(src & 0x3F)](); } static void RREGIMM(void) { recomp_regimm[((src >> 16) & 0x1F)](); } static void RJ(void) { uint32_t target; dst->ops = current_instruction_table.J; recomp_func = genj; recompile_standard_j_type(); target = (dst->f.j.inst_index<<2) | (dst->addr & UINT32_C(0xF0000000)); if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.J_IDLE; recomp_func = genj_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.J_OUT; recomp_func = genj_out; } } static void RJAL(void) { uint32_t target; dst->ops = current_instruction_table.JAL; recomp_func = genjal; recompile_standard_j_type(); target = (dst->f.j.inst_index<<2) | (dst->addr & UINT32_C(0xF0000000)); if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.JAL_IDLE; recomp_func = genjal_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.JAL_OUT; recomp_func = genjal_out; } } static void RBEQ(void) { uint32_t target; dst->ops = current_instruction_table.BEQ; recomp_func = genbeq; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BEQ_IDLE; recomp_func = genbeq_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BEQ_OUT; recomp_func = genbeq_out; } } static void RBNE(void) { uint32_t target; dst->ops = current_instruction_table.BNE; recomp_func = genbne; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BNE_IDLE; recomp_func = genbne_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BNE_OUT; recomp_func = genbne_out; } } static void RBLEZ(void) { uint32_t target; dst->ops = current_instruction_table.BLEZ; recomp_func = genblez; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BLEZ_IDLE; recomp_func = genblez_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BLEZ_OUT; recomp_func = genblez_out; } } static void RBGTZ(void) { uint32_t target; dst->ops = current_instruction_table.BGTZ; recomp_func = genbgtz; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BGTZ_IDLE; recomp_func = genbgtz_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BGTZ_OUT; recomp_func = genbgtz_out; } } static void RADDI(void) { dst->ops = current_instruction_table.ADDI; recomp_func = genaddi; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RADDIU(void) { dst->ops = current_instruction_table.ADDIU; recomp_func = genaddiu; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RSLTI(void) { dst->ops = current_instruction_table.SLTI; recomp_func = genslti; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RSLTIU(void) { dst->ops = current_instruction_table.SLTIU; recomp_func = gensltiu; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RANDI(void) { dst->ops = current_instruction_table.ANDI; recomp_func = genandi; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RORI(void) { dst->ops = current_instruction_table.ORI; recomp_func = genori; recompile_standard_i_type(); if (dst->f.i.rt == reg) RNOP(); } static void RXORI(void) { dst->ops = current_instruction_table.XORI; recomp_func = genxori; recompile_standard_i_type(); if (dst->f.i.rt == reg) RNOP(); } static void RLUI(void) { dst->ops = current_instruction_table.LUI; recomp_func = genlui; recompile_standard_i_type(); if (dst->f.i.rt == reg) RNOP(); } static void RCOP0(void) { recomp_cop0[((src >> 21) & 0x1F)](); } static void RCOP1(void) { recomp_cop1[((src >> 21) & 0x1F)](); } static void RBEQL(void) { uint32_t target; dst->ops = current_instruction_table.BEQL; recomp_func = genbeql; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BEQL_IDLE; recomp_func = genbeql_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BEQL_OUT; recomp_func = genbeql_out; } } static void RBNEL(void) { uint32_t target; dst->ops = current_instruction_table.BNEL; recomp_func = genbnel; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BNEL_IDLE; recomp_func = genbnel_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BNEL_OUT; recomp_func = genbnel_out; } } static void RBLEZL(void) { uint32_t target; dst->ops = current_instruction_table.BLEZL; recomp_func = genblezl; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BLEZL_IDLE; recomp_func = genblezl_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BLEZL_OUT; recomp_func = genblezl_out; } } static void RBGTZL(void) { uint32_t target; dst->ops = current_instruction_table.BGTZL; recomp_func = genbgtzl; recompile_standard_i_type(); target = dst->addr + dst->f.i.immediate*4 + 4; if (target == dst->addr) { if (check_nop) { dst->ops = current_instruction_table.BGTZL_IDLE; recomp_func = genbgtzl_idle; } } else if (target < dst_block->start || target >= dst_block->end || dst->addr == (dst_block->end-4)) { dst->ops = current_instruction_table.BGTZL_OUT; recomp_func = genbgtzl_out; } } static void RDADDI(void) { dst->ops = current_instruction_table.DADDI; recomp_func = gendaddi; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RDADDIU(void) { dst->ops = current_instruction_table.DADDIU; recomp_func = gendaddiu; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RLDL(void) { dst->ops = current_instruction_table.LDL; recomp_func = genldl; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RLDR(void) { dst->ops = current_instruction_table.LDR; recomp_func = genldr; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RLB(void) { dst->ops = current_instruction_table.LB; recomp_func = genlb; recompile_standard_i_type(); if (dst->f.i.rt == reg) RNOP(); } static void RLH(void) { dst->ops = current_instruction_table.LH; recomp_func = genlh; recompile_standard_i_type(); if (dst->f.i.rt == reg) RNOP(); } static void RLWL(void) { dst->ops = current_instruction_table.LWL; recomp_func = genlwl; recompile_standard_i_type(); if (dst->f.i.rt == reg) RNOP(); } static void RLW(void) { dst->ops = current_instruction_table.LW; recomp_func = genlw; recompile_standard_i_type(); if (dst->f.i.rt == reg) RNOP(); } static void RLBU(void) { dst->ops = current_instruction_table.LBU; recomp_func = genlbu; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RLHU(void) { dst->ops = current_instruction_table.LHU; recomp_func = genlhu; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RLWR(void) { dst->ops = current_instruction_table.LWR; recomp_func = genlwr; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RLWU(void) { dst->ops = current_instruction_table.LWU; recomp_func = genlwu; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RSB(void) { dst->ops = current_instruction_table.SB; recomp_func = gensb; recompile_standard_i_type(); } static void RSH(void) { dst->ops = current_instruction_table.SH; recomp_func = gensh; recompile_standard_i_type(); } static void RSWL(void) { dst->ops = current_instruction_table.SWL; recomp_func = genswl; recompile_standard_i_type(); } static void RSW(void) { dst->ops = current_instruction_table.SW; recomp_func = gensw; recompile_standard_i_type(); } static void RSDL(void) { dst->ops = current_instruction_table.SDL; recomp_func = gensdl; recompile_standard_i_type(); } static void RSDR(void) { dst->ops = current_instruction_table.SDR; recomp_func = gensdr; recompile_standard_i_type(); } static void RSWR(void) { dst->ops = current_instruction_table.SWR; recomp_func = genswr; recompile_standard_i_type(); } static void RCACHE(void) { recomp_func = gencache; dst->ops = current_instruction_table.CACHE; } static void RLL(void) { recomp_func = genll; dst->ops = current_instruction_table.LL; recompile_standard_i_type(); if(dst->f.i.rt == reg) RNOP(); } static void RLWC1(void) { dst->ops = current_instruction_table.LWC1; recomp_func = genlwc1; recompile_standard_lf_type(); } static void RLLD(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; recompile_standard_i_type(); } static void RLDC1(void) { dst->ops = current_instruction_table.LDC1; recomp_func = genldc1; recompile_standard_lf_type(); } static void RLD(void) { dst->ops = current_instruction_table.LD; recomp_func = genld; recompile_standard_i_type(); if (dst->f.i.rt == reg) RNOP(); } static void RSC(void) { dst->ops = current_instruction_table.SC; recomp_func = gensc; recompile_standard_i_type(); if (dst->f.i.rt == reg) RNOP(); } static void RSWC1(void) { dst->ops = current_instruction_table.SWC1; recomp_func = genswc1; recompile_standard_lf_type(); } static void RSCD(void) { dst->ops = current_instruction_table.NI; recomp_func = genni; recompile_standard_i_type(); } static void RSDC1(void) { dst->ops = current_instruction_table.SDC1; recomp_func = gensdc1; recompile_standard_lf_type(); } static void RSD(void) { dst->ops = current_instruction_table.SD; recomp_func = gensd; recompile_standard_i_type(); } static void (*recomp_ops[64])(void) = { RSPECIAL, RREGIMM, RJ , RJAL , RBEQ , RBNE , RBLEZ , RBGTZ , RADDI , RADDIU , RSLTI, RSLTIU, RANDI, RORI , RXORI , RLUI , RCOP0 , RCOP1 , RSV , RSV , RBEQL, RBNEL, RBLEZL, RBGTZL, RDADDI , RDADDIU, RLDL , RLDR , RSV , RSV , RSV , RSV , RLB , RLH , RLWL , RLW , RLBU , RLHU , RLWR , RLWU , RSB , RSH , RSWL , RSW , RSDL , RSDR , RSWR , RCACHE, RLL , RLWC1 , RSV , RSV , RLLD , RLDC1, RSV , RLD , RSC , RSWC1 , RSV , RSV , RSCD , RSDC1, RSV , RSD }; static int get_block_length(const precomp_block *block) { return (block->end-block->start)/4; } static size_t get_block_memsize(const precomp_block *block) { int length = get_block_length(block); return ((length+1)+(length>>2)) * sizeof(precomp_instr); } /********************************************************************** ******************** initialize an empty block *********************** **********************************************************************/ void init_block(precomp_block *block) { int i, length, already_exist = 1; static int init_length; timed_section_start(TIMED_SECTION_COMPILER); #ifdef CORE_DBG DebugMessage(M64MSG_INFO, "init block %" PRIX32 " - %" PRIX32, block->start, block->end); #endif length = get_block_length(block); if (!block->block) { size_t memsize = get_block_memsize(block); if (r4300emu == CORE_DYNAREC) { block->block = (precomp_instr *) malloc_exec(memsize); if (!block->block) { DebugMessage(M64MSG_ERROR, "Memory error: couldn't allocate executable memory for dynamic recompiler. Try to use an interpreter mode."); return; } } else { block->block = (precomp_instr *) malloc(memsize); if (!block->block) { DebugMessage(M64MSG_ERROR, "Memory error: couldn't allocate memory for cached interpreter."); return; } } memset(block->block, 0, memsize); already_exist = 0; } if (r4300emu == CORE_DYNAREC) { if (!block->code) { #if defined(PROFILE_R4300) max_code_length = 524288; /* allocate so much code space that we'll never have to realloc(), because this may */ /* cause instruction locations to move, and break our profiling data */ #else max_code_length = 32768; #endif block->code = (unsigned char *) malloc_exec(max_code_length); } else { max_code_length = block->max_code_length; } code_length = 0; inst_pointer = &block->code; if (block->jumps_table) { free(block->jumps_table); block->jumps_table = NULL; } if (block->riprel_table) { free(block->riprel_table); block->riprel_table = NULL; } init_assembler(NULL, 0, NULL, 0); init_cache(block->block); } if (!already_exist) { #if defined(PROFILE_R4300) pfProfile = fopen("instructionaddrs.dat", "ab"); long x86addr = (long) block->code; int mipsop = -2; /* -2 == NOTCOMPILED block at beginning of x86 code */ if (fwrite(&mipsop, 1, 4, pfProfile) != 4 || // write 4-byte MIPS opcode fwrite(&x86addr, 1, sizeof(char *), pfProfile) != sizeof(char *)) // write pointer to dynamically generated x86 code for this MIPS instruction DebugMessage(M64MSG_ERROR, "Error writing R4300 instruction address profiling data"); #endif for (i=0; iblock + i; dst->addr = block->start + i*4; dst->reg_cache_infos.need_map = 0; dst->local_addr = code_length; #ifdef COMPARE_CORE if (r4300emu == CORE_DYNAREC) gendebug(); #endif RNOTCOMPILED(); if (r4300emu == CORE_DYNAREC) recomp_func(); } #if defined(PROFILE_R4300) fclose(pfProfile); pfProfile = NULL; #endif init_length = code_length; } else { #if defined(PROFILE_R4300) code_length = block->code_length; /* leave old instructions in their place */ #else code_length = init_length; /* recompile everything, overwrite old recompiled instructions */ #endif for (i=0; iblock + i; dst->reg_cache_infos.need_map = 0; dst->local_addr = i * (init_length / length); dst->ops = current_instruction_table.NOTCOMPILED; } } if (r4300emu == CORE_DYNAREC) { free_all_registers(); /* calling pass2 of the assembler is not necessary here because all of the code emitted by gennotcompiled() and gendebug() is position-independent and contains no jumps . */ block->code_length = code_length; block->max_code_length = max_code_length; free_assembler(&block->jumps_table, &block->jumps_number, &block->riprel_table, &block->riprel_number); } /* here we're marking the block as a valid code even if it's not compiled * yet as the game should have already set up the code correctly. */ invalid_code[block->start>>12] = 0; if (block->end < UINT32_C(0x80000000) || block->start >= UINT32_C(0xc0000000)) { uint32_t paddr = virtual_to_physical_address(block->start, 2); invalid_code[paddr>>12] = 0; if (!blocks[paddr>>12]) { blocks[paddr>>12] = (precomp_block *) malloc(sizeof(precomp_block)); blocks[paddr>>12]->code = NULL; blocks[paddr>>12]->block = NULL; blocks[paddr>>12]->jumps_table = NULL; blocks[paddr>>12]->riprel_table = NULL; blocks[paddr>>12]->start = paddr & ~UINT32_C(0xFFF); blocks[paddr>>12]->end = (paddr & ~UINT32_C(0xFFF)) + UINT32_C(0x1000); } init_block(blocks[paddr>>12]); paddr += block->end - block->start - 4; invalid_code[paddr>>12] = 0; if (!blocks[paddr>>12]) { blocks[paddr>>12] = (precomp_block *) malloc(sizeof(precomp_block)); blocks[paddr>>12]->code = NULL; blocks[paddr>>12]->block = NULL; blocks[paddr>>12]->jumps_table = NULL; blocks[paddr>>12]->riprel_table = NULL; blocks[paddr>>12]->start = paddr & ~UINT32_C(0xFFF); blocks[paddr>>12]->end = (paddr & ~UINT32_C(0xFFF)) + UINT32_C(0x1000); } init_block(blocks[paddr>>12]); } else { uint32_t alt_addr = block->start ^ UINT32_C(0x20000000); if (invalid_code[alt_addr>>12]) { if (!blocks[alt_addr>>12]) { blocks[alt_addr>>12] = (precomp_block *) malloc(sizeof(precomp_block)); blocks[alt_addr>>12]->code = NULL; blocks[alt_addr>>12]->block = NULL; blocks[alt_addr>>12]->jumps_table = NULL; blocks[alt_addr>>12]->riprel_table = NULL; blocks[alt_addr>>12]->start = alt_addr & ~UINT32_C(0xFFF); blocks[alt_addr>>12]->end = (alt_addr & ~UINT32_C(0xFFF)) + UINT32_C(0x1000); } init_block(blocks[alt_addr>>12]); } } timed_section_end(TIMED_SECTION_COMPILER); } void free_block(precomp_block *block) { size_t memsize = get_block_memsize(block); if (block->block) { if (r4300emu == CORE_DYNAREC) free_exec(block->block, memsize); else free(block->block); block->block = NULL; } if (block->code) { free_exec(block->code, block->max_code_length); block->code = NULL; } if (block->jumps_table) { free(block->jumps_table); block->jumps_table = NULL; } if (block->riprel_table) { free(block->riprel_table); block->riprel_table = NULL; } } /********************************************************************** ********************* recompile a block of code ********************** **********************************************************************/ void recompile_block(const uint32_t *source, precomp_block *block, uint32_t func) { uint32_t i; int length, finished=0; timed_section_start(TIMED_SECTION_COMPILER); length = (block->end-block->start)/4; dst_block = block; //for (i=0; i<16; i++) block->md5[i] = 0; block->adler32 = 0; if (r4300emu == CORE_DYNAREC) { code_length = block->code_length; max_code_length = block->max_code_length; inst_pointer = &block->code; init_assembler(block->jumps_table, block->jumps_number, block->riprel_table, block->riprel_number); init_cache(block->block + (func & 0xFFF) / 4); } #if defined(PROFILE_R4300) pfProfile = fopen("instructionaddrs.dat", "ab"); #endif for (i = (func & 0xFFF) / 4; finished != 2; i++) { if(block->start < UINT32_C(0x80000000) || UINT32_C(block->start >= 0xc0000000)) { uint32_t address2 = virtual_to_physical_address(block->start + i*4, 0); if(blocks[address2>>12]->block[(address2&UINT32_C(0xFFF))/4].ops == current_instruction_table.NOTCOMPILED) blocks[address2>>12]->block[(address2&UINT32_C(0xFFF))/4].ops = current_instruction_table.NOTCOMPILED2; } SRC = source + i; src = source[i]; check_nop = source[i+1] == 0; dst = block->block + i; dst->addr = block->start + i*4; dst->reg_cache_infos.need_map = 0; dst->local_addr = code_length; #ifdef COMPARE_CORE if (r4300emu == CORE_DYNAREC) gendebug(); #endif #if defined(PROFILE_R4300) long x86addr = (long) (block->code + block->block[i].local_addr); if (fwrite(source + i, 1, 4, pfProfile) != 4 || // write 4-byte MIPS opcode fwrite(&x86addr, 1, sizeof(char *), pfProfile) != sizeof(char *)) // write pointer to dynamically generated x86 code for this MIPS instruction DebugMessage(M64MSG_ERROR, "Error writing R4300 instruction address profiling data"); #endif recomp_func = NULL; recomp_ops[((src >> 26) & 0x3F)](); if (r4300emu == CORE_DYNAREC) recomp_func(); dst = block->block + i; /*if ((dst+1)->ops != NOTCOMPILED && !delay_slot_compiled && i < length) { if (r4300emu == CORE_DYNAREC) genlink_subblock(); finished = 2; }*/ if (delay_slot_compiled) { delay_slot_compiled--; free_all_registers(); } if (i >= length-2+(length>>2)) finished = 2; if (i >= (length-1) && (block->start == UINT32_C(0xa4000000) || block->start >= UINT32_C(0xc0000000) || block->end < UINT32_C(0x80000000))) finished = 2; if (dst->ops == current_instruction_table.ERET || finished == 1) finished = 2; if (/*i >= length &&*/ (dst->ops == current_instruction_table.J || dst->ops == current_instruction_table.J_OUT || dst->ops == current_instruction_table.JR) && !(i >= (length-1) && (block->start >= UINT32_C(0xc0000000) || block->end < UINT32_C(0x80000000)))) finished = 1; } #if defined(PROFILE_R4300) long x86addr = (long) (block->code + code_length); int mipsop = -3; /* -3 == block-postfix */ if (fwrite(&mipsop, 1, 4, pfProfile) != 4 || // write 4-byte MIPS opcode fwrite(&x86addr, 1, sizeof(char *), pfProfile) != sizeof(char *)) // write pointer to dynamically generated x86 code for this MIPS instruction DebugMessage(M64MSG_ERROR, "Error writing R4300 instruction address profiling data"); #endif if (i >= length) { dst = block->block + i; dst->addr = block->start + i*4; dst->reg_cache_infos.need_map = 0; dst->local_addr = code_length; #ifdef COMPARE_CORE if (r4300emu == CORE_DYNAREC) gendebug(); #endif RFIN_BLOCK(); if (r4300emu == CORE_DYNAREC) recomp_func(); i++; if (i < length-1+(length>>2)) // useful when last opcode is a jump { dst = block->block + i; dst->addr = block->start + i*4; dst->reg_cache_infos.need_map = 0; dst->local_addr = code_length; #ifdef COMPARE_CORE if (r4300emu == CORE_DYNAREC) gendebug(); #endif RFIN_BLOCK(); if (r4300emu == CORE_DYNAREC) recomp_func(); i++; } } else if (r4300emu == CORE_DYNAREC) genlink_subblock(); if (r4300emu == CORE_DYNAREC) { free_all_registers(); passe2(block->block, (func&0xFFF)/4, i, block); block->code_length = code_length; block->max_code_length = max_code_length; free_assembler(&block->jumps_table, &block->jumps_number, &block->riprel_table, &block->riprel_number); } #ifdef CORE_DBG DebugMessage(M64MSG_INFO, "block recompiled (%" PRIX32 "-%" PRIX32 ")", func, block->start+i*4); #endif #if defined(PROFILE_R4300) fclose(pfProfile); pfProfile = NULL; #endif timed_section_end(TIMED_SECTION_COMPILER); } static int is_jump(void) { recomp_ops[((src >> 26) & 0x3F)](); return (dst->ops == current_instruction_table.J || dst->ops == current_instruction_table.J_OUT || dst->ops == current_instruction_table.J_IDLE || dst->ops == current_instruction_table.JAL || dst->ops == current_instruction_table.JAL_OUT || dst->ops == current_instruction_table.JAL_IDLE || dst->ops == current_instruction_table.BEQ || dst->ops == current_instruction_table.BEQ_OUT || dst->ops == current_instruction_table.BEQ_IDLE || dst->ops == current_instruction_table.BNE || dst->ops == current_instruction_table.BNE_OUT || dst->ops == current_instruction_table.BNE_IDLE || dst->ops == current_instruction_table.BLEZ || dst->ops == current_instruction_table.BLEZ_OUT || dst->ops == current_instruction_table.BLEZ_IDLE || dst->ops == current_instruction_table.BGTZ || dst->ops == current_instruction_table.BGTZ_OUT || dst->ops == current_instruction_table.BGTZ_IDLE || dst->ops == current_instruction_table.BEQL || dst->ops == current_instruction_table.BEQL_OUT || dst->ops == current_instruction_table.BEQL_IDLE || dst->ops == current_instruction_table.BNEL || dst->ops == current_instruction_table.BNEL_OUT || dst->ops == current_instruction_table.BNEL_IDLE || dst->ops == current_instruction_table.BLEZL || dst->ops == current_instruction_table.BLEZL_OUT || dst->ops == current_instruction_table.BLEZL_IDLE || dst->ops == current_instruction_table.BGTZL || dst->ops == current_instruction_table.BGTZL_OUT || dst->ops == current_instruction_table.BGTZL_IDLE || dst->ops == current_instruction_table.JR || dst->ops == current_instruction_table.JALR || dst->ops == current_instruction_table.BLTZ || dst->ops == current_instruction_table.BLTZ_OUT || dst->ops == current_instruction_table.BLTZ_IDLE || dst->ops == current_instruction_table.BGEZ || dst->ops == current_instruction_table.BGEZ_OUT || dst->ops == current_instruction_table.BGEZ_IDLE || dst->ops == current_instruction_table.BLTZL || dst->ops == current_instruction_table.BLTZL_OUT || dst->ops == current_instruction_table.BLTZL_IDLE || dst->ops == current_instruction_table.BGEZL || dst->ops == current_instruction_table.BGEZL_OUT || dst->ops == current_instruction_table.BGEZL_IDLE || dst->ops == current_instruction_table.BLTZAL || dst->ops == current_instruction_table.BLTZAL_OUT || dst->ops == current_instruction_table.BLTZAL_IDLE || dst->ops == current_instruction_table.BGEZAL || dst->ops == current_instruction_table.BGEZAL_OUT || dst->ops == current_instruction_table.BGEZAL_IDLE || dst->ops == current_instruction_table.BLTZALL || dst->ops == current_instruction_table.BLTZALL_OUT || dst->ops == current_instruction_table.BLTZALL_IDLE || dst->ops == current_instruction_table.BGEZALL || dst->ops == current_instruction_table.BGEZALL_OUT || dst->ops == current_instruction_table.BGEZALL_IDLE || dst->ops == current_instruction_table.BC1F || dst->ops == current_instruction_table.BC1F_OUT || dst->ops == current_instruction_table.BC1F_IDLE || dst->ops == current_instruction_table.BC1T || dst->ops == current_instruction_table.BC1T_OUT || dst->ops == current_instruction_table.BC1T_IDLE || dst->ops == current_instruction_table.BC1FL || dst->ops == current_instruction_table.BC1FL_OUT || dst->ops == current_instruction_table.BC1FL_IDLE || dst->ops == current_instruction_table.BC1TL || dst->ops == current_instruction_table.BC1TL_OUT || dst->ops == current_instruction_table.BC1TL_IDLE); } /********************************************************************** ************ recompile only one opcode (use for delay slot) ********** **********************************************************************/ void recompile_opcode(void) { SRC++; src = *SRC; dst++; dst->addr = (dst-1)->addr + 4; dst->reg_cache_infos.need_map = 0; if(!is_jump()) { #if defined(PROFILE_R4300) long x86addr = (long) ((*inst_pointer) + code_length); if (fwrite(&src, 1, 4, pfProfile) != 4 || // write 4-byte MIPS opcode fwrite(&x86addr, 1, sizeof(char *), pfProfile) != sizeof(char *)) // write pointer to dynamically generated x86 code for this MIPS instruction DebugMessage(M64MSG_ERROR, "Error writing R4300 instruction address profiling data"); #endif recomp_func = NULL; recomp_ops[((src >> 26) & 0x3F)](); if (r4300emu == CORE_DYNAREC) recomp_func(); } else { RNOP(); if (r4300emu == CORE_DYNAREC) recomp_func(); } delay_slot_compiled = 2; } /********************************************************************** ************** allocate memory with executable bit set *************** **********************************************************************/ static void *malloc_exec(size_t size) { #if defined(WIN32) return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); #elif defined(__GNUC__) #ifndef MAP_ANONYMOUS #ifdef MAP_ANON #define MAP_ANONYMOUS MAP_ANON #endif #endif void *block = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (block == MAP_FAILED) { DebugMessage(M64MSG_ERROR, "Memory error: couldn't allocate %zi byte block of aligned RWX memory.", size); return NULL; } return block; #else return malloc(size); #endif } /********************************************************************** ************* reallocate memory with executable bit set ************** **********************************************************************/ void *realloc_exec(void *ptr, size_t oldsize, size_t newsize) { void* block = malloc_exec(newsize); if (block != NULL) { size_t copysize; if (oldsize < newsize) copysize = oldsize; else copysize = newsize; memcpy(block, ptr, copysize); } free_exec(ptr, oldsize); return block; } /********************************************************************** **************** frees memory with executable bit set **************** **********************************************************************/ static void free_exec(void *ptr, size_t length) { #if defined(WIN32) VirtualFree(ptr, 0, MEM_RELEASE); #elif defined(__GNUC__) munmap(ptr, length); #else free(ptr); #endif } mupen64plus-core-src-2.5/src/r4300/recomp.h000066400000000000000000000070121251723631200202740ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - recomp.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_RECOMP_H #define M64P_R4300_RECOMP_H #include #include #if defined(__x86_64__) #include "x86_64/assemble_struct.h" #else #include "x86/assemble_struct.h" #endif typedef struct _precomp_instr { void (*ops)(void); union { struct { int64_t *rs; int64_t *rt; int16_t immediate; } i; struct { uint32_t inst_index; } j; struct { int64_t *rs; int64_t *rt; int64_t *rd; unsigned char sa; unsigned char nrd; } r; struct { unsigned char base; unsigned char ft; short offset; } lf; struct { unsigned char ft; unsigned char fs; unsigned char fd; } cf; } f; uint32_t addr; /* word-aligned instruction address in r4300 address space */ unsigned int local_addr; /* byte offset to start of corresponding x86_64 instructions, from start of code block */ reg_cache_struct reg_cache_infos; } precomp_instr; typedef struct _precomp_block { precomp_instr *block; uint32_t start; uint32_t end; unsigned char *code; unsigned int code_length; unsigned int max_code_length; void *jumps_table; int jumps_number; void *riprel_table; int riprel_number; //unsigned char md5[16]; unsigned int adler32; } precomp_block; void recompile_block(const uint32_t *source, precomp_block *block, uint32_t func); void init_block(precomp_block *block); void free_block(precomp_block *block); void recompile_opcode(void); void dyna_jump(void); void dyna_start(void *code); void dyna_stop(void); void *realloc_exec(void *ptr, size_t oldsize, size_t newsize); extern precomp_instr *dst; /* precomp_instr structure for instruction being recompiled */ extern int no_compiled_jump; #if defined(__x86_64__) #include "x86_64/assemble.h" #include "x86_64/regcache.h" #else #include "x86/assemble.h" #include "x86/regcache.h" #endif #endif /* M64P_R4300_RECOMP_H */ mupen64plus-core-src-2.5/src/r4300/recomph.h000066400000000000000000000173161251723631200204540ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - recomph.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_RECOMPH_H #define M64P_R4300_RECOMPH_H #include "recomp.h" extern int code_length; extern int max_code_length; extern unsigned char **inst_pointer; extern precomp_block* dst_block; extern int fast_memory; extern uint32_t src; /* opcode of r4300 instruction being recompiled */ #if defined(PROFILE_R4300) #include extern FILE *pfProfile; #endif void passe2(precomp_instr *dest, int start, int end, precomp_block* block); void init_assembler(void *block_jumps_table, int block_jumps_number, void *block_riprel_table, int block_riprel_number); void free_assembler(void **block_jumps_table, int *block_jumps_number, void **block_riprel_table, int *block_riprel_number); void gencallinterp(unsigned long addr, int jump); void genupdate_system(int type); void genbnel(void); void genblezl(void); void genlw(void); void genlbu(void); void genlhu(void); void gensb(void); void gensh(void); void gensw(void); void gencache(void); void genlwc1(void); void genld(void); void gensd(void); void genbeq(void); void genbne(void); void genblez(void); void genaddi(void); void genaddiu(void); void genslti(void); void gensltiu(void); void genandi(void); void genori(void); void genxori(void); void genlui(void); void genbeql(void); void genmul_s(void); void gendiv_s(void); void gencvt_d_s(void); void genadd_d(void); void gentrunc_w_d(void); void gencvt_s_w(void); void genmfc1(void); void gencfc1(void); void genmtc1(void); void genctc1(void); void genj(void); void genjal(void); void genslt(void); void gensltu(void); void gendsll32(void); void gendsra32(void); void genbgez(void); void genbgezl(void); void genbgezal(void); void gentlbwi(void); void generet(void); void genmfc0(void); void genadd_s(void); void genmult(void); void genmultu(void); void genmflo(void); void genmtlo(void); void gendiv(void); void gendmultu(void); void genddivu(void); void genadd(void); void genaddu(void); void gensubu(void); void genand(void); void genor(void); void genxor(void); void genreserved(void); void gennop(void); void gensll(void); void gensrl(void); void gensra(void); void gensllv(void); void gensrlv(void); void genjr(void); void genni(void); void genmfhi(void); void genmthi(void); void genmtc0(void); void genbltz(void); void genlwl(void); void genswl(void); void gentlbp(void); void gentlbr(void); void genswr(void); void genlwr(void); void gensrav(void); void genbgtz(void); void genlb(void); void genswc1(void); void genldc1(void); void gencvt_d_w(void); void genmul_d(void); void gensub_d(void); void gendiv_d(void); void gencvt_s_d(void); void genmov_s(void); void genc_le_s(void); void genbc1t(void); void gentrunc_w_s(void); void genbc1tl(void); void genc_lt_s(void); void genbc1fl(void); void genneg_s(void); void genc_le_d(void); void genbgezal_idle(void); void genj_idle(void); void genbeq_idle(void); void genlh(void); void genmov_d(void); void genc_lt_d(void); void genbc1f(void); void gennor(void); void genneg_d(void); void gensub(void); void genblez_idle(void); void gendivu(void); void gencvt_w_s(void); void genbltzl(void); void gensdc1(void); void genc_eq_s(void); void genjalr(void); void gensub_s(void); void gensqrt_s(void); void genc_eq_d(void); void gencvt_w_d(void); void genfin_block(void); void genddiv(void); void gendaddiu(void); void genbgtzl(void); void gendsrav(void); void gendsllv(void); void gencvt_s_l(void); void gendmtc1(void); void gendsrlv(void); void gendsra(void); void gendmult(void); void gendsll(void); void genabs_s(void); void gensc(void); void gennotcompiled(void); void genjal_idle(void); void genjal_out(void); void genbeq_out(void); void gensyscall(void); void gensync(void); void gendadd(void); void gendaddu(void); void gendsub(void); void gendsubu(void); void genteq(void); void gendsrl(void); void gendsrl32(void); void genbltz_idle(void); void genbltz_out(void); void genbgez_idle(void); void genbgez_out(void); void genbltzl_idle(void); void genbltzl_out(void); void genbgezl_idle(void); void genbgezl_out(void); void genbltzal_idle(void); void genbltzal_out(void); void genbltzal(void); void genbgezal_out(void); void genbltzall_idle(void); void genbltzall_out(void); void genbltzall(void); void genbgezall_idle(void); void genbgezall_out(void); void genbgezall(void); void gentlbwr(void); void genbc1f_idle(void); void genbc1f_out(void); void genbc1t_idle(void); void genbc1t_out(void); void genbc1fl_idle(void); void genbc1fl_out(void); void genbc1tl_idle(void); void genbc1tl_out(void); void genround_l_s(void); void gentrunc_l_s(void); void genceil_l_s(void); void genfloor_l_s(void); void genround_w_s(void); void genceil_w_s(void); void genfloor_w_s(void); void gencvt_l_s(void); void genc_f_s(void); void genc_un_s(void); void genc_ueq_s(void); void genc_olt_s(void); void genc_ult_s(void); void genc_ole_s(void); void genc_ule_s(void); void genc_sf_s(void); void genc_ngle_s(void); void genc_seq_s(void); void genc_ngl_s(void); void genc_nge_s(void); void genc_ngt_s(void); void gensqrt_d(void); void genabs_d(void); void genround_l_d(void); void gentrunc_l_d(void); void genceil_l_d(void); void genfloor_l_d(void); void genround_w_d(void); void genceil_w_d(void); void genfloor_w_d(void); void gencvt_l_d(void); void genc_f_d(void); void genc_un_d(void); void genc_ueq_d(void); void genc_olt_d(void); void genc_ult_d(void); void genc_ole_d(void); void genc_ule_d(void); void genc_sf_d(void); void genc_ngle_d(void); void genc_seq_d(void); void genc_ngl_d(void); void genc_nge_d(void); void genc_ngt_d(void); void gencvt_d_l(void); void gendmfc1(void); void genj_out(void); void genbne_idle(void); void genbne_out(void); void genblez_out(void); void genbgtz_idle(void); void genbgtz_out(void); void genbeql_idle(void); void genbeql_out(void); void genbnel_idle(void); void genbnel_out(void); void genblezl_idle(void); void genblezl_out(void); void genbgtzl_idle(void); void genbgtzl_out(void); void gendaddi(void); void genldl(void); void genldr(void); void genlwu(void); void gensdl(void); void gensdr(void); void genlink_subblock(void); void gendelayslot(void); void gencheck_interupt_reg(void); void gentest(void); void gentest_out(void); void gentest_idle(void); void gentestl(void); void gentestl_out(void); void gencheck_cop1_unusable(void); void genll(void); #ifdef COMPARE_CORE void gendebug(void); #endif #endif /* M64P_R4300_RECOMPH_H */ mupen64plus-core-src-2.5/src/r4300/reset.c000066400000000000000000000046371251723631200201360ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - reset.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2011 CasualJames * * Copyright (C) 2008-2009 Richard Goedeken * * Copyright (C) 2008 Ebenblues Nmn Okaygo Tillin9 * * Hard reset based on code by hacktarux. * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "cached_interp.h" #include "interupt.h" #include "memory/memory.h" #include "r4300.h" #include "r4300_core.h" #include "reset.h" int reset_hard_job = 0; void reset_hard(void) { init_memory(); r4300_reset_hard(); r4300_reset_soft(); last_addr = UINT32_C(0xa4000040); next_interupt = 624999; init_interupt(); if(r4300emu != CORE_PURE_INTERPRETER) { free_blocks(); init_blocks(); } generic_jump_to(last_addr); } void reset_soft(void) { add_interupt_event(HW2_INT, 0); /* Hardware 2 Interrupt immediately */ add_interupt_event(NMI_INT, 50000000); /* Non maskable Interrupt after 1/2 second */ } mupen64plus-core-src-2.5/src/r4300/reset.h000066400000000000000000000034441251723631200201360ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - reset.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2011 CasualJames * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_RESET_H #define M64P_R4300_RESET_H /* For hard reset, set reset_hard_job and next interrupt will cause hard reset. * For soft reset, call reset_soft() at any time. */ extern int reset_hard_job; void reset_hard(); void reset_soft(); #endif /* M64P_R4300_RESET_H */ mupen64plus-core-src-2.5/src/r4300/tlb.c000066400000000000000000000120521251723631200175630ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - tlb.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "tlb.h" #include "api/m64p_types.h" #include "exception.h" #include "main/rom.h" tlb tlb_e[32]; unsigned int tlb_LUT_r[0x100000]; unsigned int tlb_LUT_w[0x100000]; void tlb_unmap(tlb *entry) { unsigned int i; if (entry->v_even) { for (i=entry->start_even; iend_even; i += 0x1000) tlb_LUT_r[i>>12] = 0; if (entry->d_even) for (i=entry->start_even; iend_even; i += 0x1000) tlb_LUT_w[i>>12] = 0; } if (entry->v_odd) { for (i=entry->start_odd; iend_odd; i += 0x1000) tlb_LUT_r[i>>12] = 0; if (entry->d_odd) for (i=entry->start_odd; iend_odd; i += 0x1000) tlb_LUT_w[i>>12] = 0; } } void tlb_map(tlb *entry) { unsigned int i; if (entry->v_even) { if (entry->start_even < entry->end_even && !(entry->start_even >= 0x80000000 && entry->end_even < 0xC0000000) && entry->phys_even < 0x20000000) { for (i=entry->start_even;iend_even;i+=0x1000) tlb_LUT_r[i>>12] = UINT32_C(0x80000000) | (entry->phys_even + (i - entry->start_even) + 0xFFF); if (entry->d_even) for (i=entry->start_even;iend_even;i+=0x1000) tlb_LUT_w[i>>12] = UINT32_C(0x80000000) | (entry->phys_even + (i - entry->start_even) + 0xFFF); } } if (entry->v_odd) { if (entry->start_odd < entry->end_odd && !(entry->start_odd >= 0x80000000 && entry->end_odd < 0xC0000000) && entry->phys_odd < 0x20000000) { for (i=entry->start_odd;iend_odd;i+=0x1000) tlb_LUT_r[i>>12] = UINT32_C(0x80000000) | (entry->phys_odd + (i - entry->start_odd) + 0xFFF); if (entry->d_odd) for (i=entry->start_odd;iend_odd;i+=0x1000) tlb_LUT_w[i>>12] = UINT32_C(0x80000000) | (entry->phys_odd + (i - entry->start_odd) + 0xFFF); } } } uint32_t virtual_to_physical_address(uint32_t addresse, int w) { if (addresse >= UINT32_C(0x7f000000) && addresse < UINT32_C(0x80000000) && isGoldeneyeRom) { /************************************************** GoldenEye 007 hack allows for use of TLB. Recoded by okaygo to support all US, J, and E ROMS. **************************************************/ switch (ROM_HEADER.Country_code & UINT16_C(0xFF)) { case 0x45: // U return UINT32_C(0xb0034b30) + (addresse & UINT32_C(0xFFFFFF)); break; case 0x4A: // J return UINT32_C(0xb0034b70) + (addresse & UINT32_C(0xFFFFFF)); break; case 0x50: // E return UINT32_C(0xb00329f0) + (addresse & UINT32_C(0xFFFFFF)); break; default: // UNKNOWN COUNTRY CODE FOR GOLDENEYE USING AMERICAN VERSION HACK return UINT32_C(0xb0034b30) + (addresse & UINT32_C(0xFFFFFF)); break; } } if (w == 1) { if (tlb_LUT_w[addresse>>12]) return (tlb_LUT_w[addresse>>12] & UINT32_C(0xFFFFF000)) | (addresse & UINT32_C(0xFFF)); } else { if (tlb_LUT_r[addresse>>12]) return (tlb_LUT_r[addresse>>12] & UINT32_C(0xFFFFF000)) | (addresse & UINT32_C(0xFFF)); } //printf("tlb exception !!! @ %x, %x, add:%x\n", addresse, w, PC->addr); //getchar(); TLB_refill_exception(addresse,w); //return 0x80000000; return 0x00000000; } mupen64plus-core-src-2.5/src/r4300/tlb.h000066400000000000000000000043501251723631200175720ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - tlb.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_TLB_H #define M64P_R4300_TLB_H #include typedef struct _tlb { short mask; int vpn2; char g; unsigned char asid; int pfn_even; char c_even; char d_even; char v_even; int pfn_odd; char c_odd; char d_odd; char v_odd; char r; //int check_parity_mask; unsigned int start_even; unsigned int end_even; unsigned int phys_even; unsigned int start_odd; unsigned int end_odd; unsigned int phys_odd; } tlb; extern tlb tlb_e[32]; extern uint32_t tlb_LUT_r[0x100000]; extern uint32_t tlb_LUT_w[0x100000]; void tlb_unmap(tlb *entry); void tlb_map(tlb *entry); uint32_t virtual_to_physical_address(uint32_t addresse, int w); #endif /* M64P_R4300_TLB_H */ mupen64plus-core-src-2.5/src/r4300/x86/000077500000000000000000000000001251723631200172635ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/r4300/x86/assemble.c000066400000000000000000000107421251723631200212260ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - assemble.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "assemble.h" #include "osal/preproc.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" typedef struct _jump_table { unsigned int mi_addr; unsigned int pc_addr; } jump_table; static jump_table *jumps_table = NULL; static int jumps_number, max_jumps_number; void init_assembler(void *block_jumps_table, int block_jumps_number, void *block_riprel_table, int block_riprel_number) { if (block_jumps_table) { jumps_table = (jump_table *) block_jumps_table; jumps_number = block_jumps_number; max_jumps_number = jumps_number; } else { jumps_table = (jump_table *) malloc(1000*sizeof(jump_table)); jumps_number = 0; max_jumps_number = 1000; } } void free_assembler(void **block_jumps_table, int *block_jumps_number, void **block_riprel_table, int *block_riprel_number) { *block_jumps_table = jumps_table; *block_jumps_number = jumps_number; *block_riprel_table = NULL; /* RIP-relative addressing is only for x86-64 */ *block_riprel_number = 0; } void add_jump(unsigned int pc_addr, unsigned int mi_addr) { if (jumps_number == max_jumps_number) { max_jumps_number += 1000; jumps_table = (jump_table *) realloc(jumps_table, max_jumps_number*sizeof(jump_table)); } jumps_table[jumps_number].pc_addr = pc_addr; jumps_table[jumps_number].mi_addr = mi_addr; jumps_number++; } void passe2(precomp_instr *dest, int start, int end, precomp_block *block) { unsigned int real_code_length, addr_dest; int i; build_wrappers(dest, start, end, block); real_code_length = code_length; for (i=0; i < jumps_number; i++) { code_length = jumps_table[i].pc_addr; if (dest[(jumps_table[i].mi_addr - dest[0].addr)/4].reg_cache_infos.need_map) { addr_dest = (unsigned int)dest[(jumps_table[i].mi_addr - dest[0].addr)/4].reg_cache_infos.jump_wrapper; put32(addr_dest-((unsigned int)block->code+code_length)-4); } else { addr_dest = dest[(jumps_table[i].mi_addr - dest[0].addr)/4].local_addr; put32(addr_dest-code_length-4); } } code_length = real_code_length; } static unsigned int g_jump_start8 = 0; static unsigned int g_jump_start32 = 0; void jump_start_rel8(void) { g_jump_start8 = code_length; } void jump_start_rel32(void) { g_jump_start32 = code_length; } void jump_end_rel8(void) { unsigned int jump_end = code_length; int jump_vec = jump_end - g_jump_start8; if (jump_vec > 127 || jump_vec < -128) { DebugMessage(M64MSG_ERROR, "8-bit relative jump too long! From %x to %x", g_jump_start8, jump_end); OSAL_BREAKPOINT_INTERRUPT; } code_length = g_jump_start8 - 1; put8(jump_vec); code_length = jump_end; } void jump_end_rel32(void) { unsigned int jump_end = code_length; int jump_vec = jump_end - g_jump_start32; code_length = g_jump_start32 - 4; put32(jump_vec); code_length = jump_end; } mupen64plus-core-src-2.5/src/r4300/x86/assemble.h000066400000000000000000000405171251723631200212360ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - assemble.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_ASSEMBLE_H #define M64P_R4300_ASSEMBLE_H #include #include #include "api/callbacks.h" #include "osal/preproc.h" #include "r4300/recomph.h" extern int64_t reg[32]; #define EAX 0 #define ECX 1 #define EDX 2 #define EBX 3 #define ESP 4 #define EBP 5 #define ESI 6 #define EDI 7 #define AX 0 #define CX 1 #define DX 2 #define BX 3 #define SP 4 #define BP 5 #define SI 6 #define DI 7 #define AL 0 #define CL 1 #define DL 2 #define BL 3 #define AH 4 #define CH 5 #define DH 6 #define BH 7 extern int branch_taken; extern const uint16_t trunc_mode, round_mode, ceil_mode, floor_mode; void jump_start_rel8(void); void jump_end_rel8(void); void jump_start_rel32(void); void jump_end_rel32(void); void add_jump(unsigned int pc_addr, unsigned int mi_addr); static osal_inline void put8(unsigned char octet) { (*inst_pointer)[code_length] = octet; code_length++; if (code_length == max_code_length) { *inst_pointer = (unsigned char *) realloc_exec(*inst_pointer, max_code_length, max_code_length+8192); max_code_length += 8192; } } static osal_inline void put32(unsigned int dword) { if ((code_length+4) >= max_code_length) { *inst_pointer = (unsigned char *) realloc_exec(*inst_pointer, max_code_length, max_code_length+8192); max_code_length += 8192; } *((unsigned int *)(&(*inst_pointer)[code_length])) = dword; code_length+=4; } static osal_inline void mov_eax_memoffs32(unsigned int *memoffs32) { put8(0xA1); put32((unsigned int)(memoffs32)); } static osal_inline void mov_memoffs32_eax(unsigned int *memoffs32) { put8(0xA3); put32((unsigned int)(memoffs32)); } static osal_inline void mov_m8_reg8(unsigned char *m8, int reg8) { put8(0x88); put8((reg8 << 3) | 5); put32((unsigned int)(m8)); } static osal_inline void mov_reg16_m16(int reg16, unsigned short *m16) { put8(0x66); put8(0x8B); put8((reg16 << 3) | 5); put32((unsigned int)(m16)); } static osal_inline void mov_m16_reg16(unsigned short *m16, int reg16) { put8(0x66); put8(0x89); put8((reg16 << 3) | 5); put32((unsigned int)(m16)); } static osal_inline void cmp_reg32_m32(int reg32, unsigned int *m32) { put8(0x3B); put8((reg32 << 3) | 5); put32((unsigned int)(m32)); } static osal_inline void cmp_reg32_reg32(int reg1, int reg2) { put8(0x39); put8((reg2 << 3) | reg1 | 0xC0); } static osal_inline void cmp_reg32_imm8(int reg32, unsigned char imm8) { put8(0x83); put8(0xF8 + reg32); put8(imm8); } static osal_inline void cmp_preg32pimm32_imm8(int reg32, unsigned int imm32, unsigned char imm8) { put8(0x80); put8(0xB8 + reg32); put32(imm32); put8(imm8); } static osal_inline void cmp_reg32_imm32(int reg32, unsigned int imm32) { put8(0x81); put8(0xF8 + reg32); put32(imm32); } static osal_inline void test_reg32_imm32(int reg32, unsigned int imm32) { put8(0xF7); put8(0xC0 + reg32); put32(imm32); } static osal_inline void test_m32_imm32(unsigned int *m32, unsigned int imm32) { put8(0xF7); put8(0x05); put32((unsigned int)m32); put32(imm32); } static osal_inline void add_m32_reg32(unsigned int *m32, int reg32) { put8(0x01); put8((reg32 << 3) | 5); put32((unsigned int)(m32)); } static osal_inline void sub_reg32_m32(int reg32, unsigned int *m32) { put8(0x2B); put8((reg32 << 3) | 5); put32((unsigned int)(m32)); } static osal_inline void sub_reg32_reg32(int reg1, int reg2) { put8(0x29); put8((reg2 << 3) | reg1 | 0xC0); } static osal_inline void sbb_reg32_reg32(int reg1, int reg2) { put8(0x19); put8((reg2 << 3) | reg1 | 0xC0); } static osal_inline void sub_reg32_imm32(int reg32, unsigned int imm32) { put8(0x81); put8(0xE8 + reg32); put32(imm32); } static osal_inline void sub_eax_imm32(unsigned int imm32) { put8(0x2D); put32(imm32); } static osal_inline void jne_rj(unsigned char saut) { put8(0x75); put8(saut); } static osal_inline void je_rj(unsigned char saut) { put8(0x74); put8(saut); } static osal_inline void jb_rj(unsigned char saut) { put8(0x72); put8(saut); } static osal_inline void jbe_rj(unsigned char saut) { put8(0x76); put8(saut); } static osal_inline void ja_rj(unsigned char saut) { put8(0x77); put8(saut); } static osal_inline void jae_rj(unsigned char saut) { put8(0x73); put8(saut); } static osal_inline void jle_rj(unsigned char saut) { put8(0x7E); put8(saut); } static osal_inline void jge_rj(unsigned char saut) { put8(0x7D); put8(saut); } static osal_inline void jg_rj(unsigned char saut) { put8(0x7F); put8(saut); } static osal_inline void jl_rj(unsigned char saut) { put8(0x7C); put8(saut); } static osal_inline void jp_rj(unsigned char saut) { put8(0x7A); put8(saut); } static osal_inline void je_near_rj(unsigned int saut) { put8(0x0F); put8(0x84); put32(saut); } static osal_inline void mov_reg32_imm32(int reg32, unsigned int imm32) { put8(0xB8+reg32); put32(imm32); } static osal_inline void jmp_imm_short(char saut) { put8(0xEB); put8(saut); } static osal_inline void or_m32_imm32(unsigned int *m32, unsigned int imm32) { put8(0x81); put8(0x0D); put32((unsigned int)(m32)); put32(imm32); } static osal_inline void or_reg32_reg32(unsigned int reg1, unsigned int reg2) { put8(0x09); put8(0xC0 | (reg2 << 3) | reg1); } static osal_inline void and_reg32_reg32(unsigned int reg1, unsigned int reg2) { put8(0x21); put8(0xC0 | (reg2 << 3) | reg1); } static osal_inline void and_m32_imm32(unsigned int *m32, unsigned int imm32) { put8(0x81); put8(0x25); put32((unsigned int)(m32)); put32(imm32); } static osal_inline void xor_reg32_reg32(unsigned int reg1, unsigned int reg2) { put8(0x31); put8(0xC0 | (reg2 << 3) | reg1); } static osal_inline void sub_m32_imm32(unsigned int *m32, unsigned int imm32) { put8(0x81); put8(0x2D); put32((unsigned int)(m32)); put32(imm32); } static osal_inline void add_reg32_imm32(unsigned int reg32, unsigned int imm32) { put8(0x81); put8(0xC0+reg32); put32(imm32); } static osal_inline void inc_m32(unsigned int *m32) { put8(0xFF); put8(0x05); put32((unsigned int)(m32)); } static osal_inline void cmp_m32_imm32(unsigned int *m32, unsigned int imm32) { put8(0x81); put8(0x3D); put32((unsigned int)(m32)); put32(imm32); } static osal_inline void cmp_eax_imm32(unsigned int imm32) { put8(0x3D); put32(imm32); } static osal_inline void mov_m32_imm32(unsigned int *m32, unsigned int imm32) { put8(0xC7); put8(0x05); put32((unsigned int)(m32)); put32(imm32); } static osal_inline void jmp(unsigned int mi_addr) { put8(0xE9); put32(0); add_jump(code_length-4, mi_addr); } static osal_inline void cdq(void) { put8(0x99); } static osal_inline void mov_m32_reg32(unsigned int *m32, unsigned int reg32) { put8(0x89); put8((reg32 << 3) | 5); put32((unsigned int)(m32)); } static osal_inline void call_reg32(unsigned int reg32) { put8(0xFF); put8(0xD0+reg32); } static osal_inline void shr_reg32_imm8(unsigned int reg32, unsigned char imm8) { put8(0xC1); put8(0xE8+reg32); put8(imm8); } static osal_inline void shr_reg32_cl(unsigned int reg32) { put8(0xD3); put8(0xE8+reg32); } static osal_inline void sar_reg32_cl(unsigned int reg32) { put8(0xD3); put8(0xF8+reg32); } static osal_inline void shl_reg32_cl(unsigned int reg32) { put8(0xD3); put8(0xE0+reg32); } static osal_inline void shld_reg32_reg32_cl(unsigned int reg1, unsigned int reg2) { put8(0x0F); put8(0xA5); put8(0xC0 | (reg2 << 3) | reg1); } static osal_inline void shld_reg32_reg32_imm8(unsigned int reg1, unsigned int reg2, unsigned char imm8) { put8(0x0F); put8(0xA4); put8(0xC0 | (reg2 << 3) | reg1); put8(imm8); } static osal_inline void shrd_reg32_reg32_cl(unsigned int reg1, unsigned int reg2) { put8(0x0F); put8(0xAD); put8(0xC0 | (reg2 << 3) | reg1); } static osal_inline void sar_reg32_imm8(unsigned int reg32, unsigned char imm8) { put8(0xC1); put8(0xF8+reg32); put8(imm8); } static osal_inline void shrd_reg32_reg32_imm8(unsigned int reg1, unsigned int reg2, unsigned char imm8) { put8(0x0F); put8(0xAC); put8(0xC0 | (reg2 << 3) | reg1); put8(imm8); } static osal_inline void mul_m32(unsigned int *m32) { put8(0xF7); put8(0x25); put32((unsigned int)(m32)); } static osal_inline void imul_reg32(unsigned int reg32) { put8(0xF7); put8(0xE8+reg32); } static osal_inline void mul_reg32(unsigned int reg32) { put8(0xF7); put8(0xE0+reg32); } static osal_inline void idiv_reg32(unsigned int reg32) { put8(0xF7); put8(0xF8+reg32); } static osal_inline void div_reg32(unsigned int reg32) { put8(0xF7); put8(0xF0+reg32); } static osal_inline void add_reg32_reg32(unsigned int reg1, unsigned int reg2) { put8(0x01); put8(0xC0 | (reg2 << 3) | reg1); } static osal_inline void adc_reg32_reg32(unsigned int reg1, unsigned int reg2) { put8(0x11); put8(0xC0 | (reg2 << 3) | reg1); } static osal_inline void add_reg32_m32(unsigned int reg32, unsigned int *m32) { put8(0x03); put8((reg32 << 3) | 5); put32((unsigned int)(m32)); } static osal_inline void adc_reg32_imm32(unsigned int reg32, unsigned int imm32) { put8(0x81); put8(0xD0 + reg32); put32(imm32); } static osal_inline void jmp_reg32(unsigned int reg32) { put8(0xFF); put8(0xE0 + reg32); } static osal_inline void mov_reg32_preg32(unsigned int reg1, unsigned int reg2) { put8(0x8B); put8((reg1 << 3) | reg2); } static osal_inline void mov_preg32_reg32(int reg1, int reg2) { put8(0x89); put8((reg2 << 3) | reg1); } static osal_inline void mov_reg32_preg32preg32pimm32(int reg1, int reg2, int reg3, unsigned int imm32) { put8(0x8B); put8((reg1 << 3) | 0x84); put8(reg2 | (reg3 << 3)); put32(imm32); } static osal_inline void mov_reg32_preg32pimm32(int reg1, int reg2, unsigned int imm32) { put8(0x8B); put8(0x80 | (reg1 << 3) | reg2); put32(imm32); } static osal_inline void mov_reg32_preg32x4pimm32(int reg1, int reg2, unsigned int imm32) { put8(0x8B); put8((reg1 << 3) | 4); put8(0x80 | (reg2 << 3) | 5); put32(imm32); } static osal_inline void mov_preg32pimm32_reg8(int reg32, unsigned int imm32, int reg8) { put8(0x88); put8(0x80 | reg32 | (reg8 << 3)); put32(imm32); } static osal_inline void mov_preg32pimm32_imm8(int reg32, unsigned int imm32, unsigned char imm8) { put8(0xC6); put8(0x80 + reg32); put32(imm32); put8(imm8); } static osal_inline void mov_preg32pimm32_reg16(int reg32, unsigned int imm32, int reg16) { put8(0x66); put8(0x89); put8(0x80 | reg32 | (reg16 << 3)); put32(imm32); } static osal_inline void mov_preg32pimm32_reg32(int reg1, unsigned int imm32, int reg2) { put8(0x89); put8(0x80 | reg1 | (reg2 << 3)); put32(imm32); } static osal_inline void add_eax_imm32(unsigned int imm32) { put8(0x05); put32(imm32); } static osal_inline void shl_reg32_imm8(unsigned int reg32, unsigned char imm8) { put8(0xC1); put8(0xE0 + reg32); put8(imm8); } static osal_inline void mov_reg32_m32(unsigned int reg32, unsigned int* m32) { put8(0x8B); put8((reg32 << 3) | 5); put32((unsigned int)(m32)); } static osal_inline void mov_reg8_m8(int reg8, unsigned char *m8) { put8(0x8A); put8((reg8 << 3) | 5); put32((unsigned int)(m8)); } static osal_inline void and_eax_imm32(unsigned int imm32) { put8(0x25); put32(imm32); } static osal_inline void and_reg32_imm32(int reg32, unsigned int imm32) { put8(0x81); put8(0xE0 + reg32); put32(imm32); } static osal_inline void or_reg32_imm32(int reg32, unsigned int imm32) { put8(0x81); put8(0xC8 + reg32); put32(imm32); } static osal_inline void xor_reg32_imm32(int reg32, unsigned int imm32) { put8(0x81); put8(0xF0 + reg32); put32(imm32); } static osal_inline void xor_reg8_imm8(int reg8, unsigned char imm8) { put8(0x80); put8(0xF0 + reg8); put8(imm8); } static osal_inline void mov_reg32_reg32(unsigned int reg1, unsigned int reg2) { if (reg1 == reg2) return; put8(0x89); put8(0xC0 | (reg2 << 3) | reg1); } static osal_inline void not_reg32(unsigned int reg32) { put8(0xF7); put8(0xD0 + reg32); } static osal_inline void movsx_reg32_m8(int reg32, unsigned char *m8) { put8(0x0F); put8(0xBE); put8((reg32 << 3) | 5); put32((unsigned int)(m8)); } static osal_inline void movsx_reg32_8preg32pimm32(int reg1, int reg2, unsigned int imm32) { put8(0x0F); put8(0xBE); put8((reg1 << 3) | reg2 | 0x80); put32(imm32); } static osal_inline void movsx_reg32_16preg32pimm32(int reg1, int reg2, unsigned int imm32) { put8(0x0F); put8(0xBF); put8((reg1 << 3) | reg2 | 0x80); put32(imm32); } static osal_inline void movsx_reg32_m16(int reg32, unsigned short *m16) { put8(0x0F); put8(0xBF); put8((reg32 << 3) | 5); put32((unsigned int)(m16)); } static osal_inline void fldcw_m16(unsigned short *m16) { put8(0xD9); put8(0x2D); put32((unsigned int)(m16)); } static osal_inline void fld_preg32_dword(int reg32) { put8(0xD9); put8(reg32); } static osal_inline void fdiv_preg32_dword(int reg32) { put8(0xD8); put8(0x30 + reg32); } static osal_inline void fstp_preg32_dword(int reg32) { put8(0xD9); put8(0x18 + reg32); } static osal_inline void fchs(void) { put8(0xD9); put8(0xE0); } static osal_inline void fstp_preg32_qword(int reg32) { put8(0xDD); put8(0x18 + reg32); } static osal_inline void fadd_preg32_dword(int reg32) { put8(0xD8); put8(reg32); } static osal_inline void fsub_preg32_dword(int reg32) { put8(0xD8); put8(0x20 + reg32); } static osal_inline void fmul_preg32_dword(int reg32) { put8(0xD8); put8(0x08 + reg32); } static osal_inline void fistp_preg32_dword(int reg32) { put8(0xDB); put8(0x18 + reg32); } static osal_inline void fistp_preg32_qword(int reg32) { put8(0xDF); put8(0x38 + reg32); } static osal_inline void fld_preg32_qword(int reg32) { put8(0xDD); put8(reg32); } static osal_inline void fild_preg32_qword(int reg32) { put8(0xDF); put8(0x28+reg32); } static osal_inline void fild_preg32_dword(int reg32) { put8(0xDB); put8(reg32); } static osal_inline void fadd_preg32_qword(int reg32) { put8(0xDC); put8(reg32); } static osal_inline void fdiv_preg32_qword(int reg32) { put8(0xDC); put8(0x30 + reg32); } static osal_inline void fsub_preg32_qword(int reg32) { put8(0xDC); put8(0x20 + reg32); } static osal_inline void fmul_preg32_qword(int reg32) { put8(0xDC); put8(0x08 + reg32); } static osal_inline void fsqrt(void) { put8(0xD9); put8(0xFA); } static osal_inline void fabs_(void) { put8(0xD9); put8(0xE1); } static osal_inline void fcomip_fpreg(int fpreg) { put8(0xDF); put8(0xF0 + fpreg); } static osal_inline void fucomip_fpreg(int fpreg) { put8(0xDF); put8(0xE8 + fpreg); } static osal_inline void ffree_fpreg(int fpreg) { put8(0xDD); put8(0xC0 + fpreg); } #endif /* M64P_R4300_ASSEMBLE_H */ mupen64plus-core-src-2.5/src/r4300/x86/assemble_struct.h000066400000000000000000000034351251723631200226400ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - assemble_struct.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_ASSEMBLE_STRUCT_H #define M64P_R4300_ASSEMBLE_STRUCT_H typedef struct _reg_cache_struct { int need_map; void *needed_registers[8]; unsigned char jump_wrapper[62]; int need_cop1_check; } reg_cache_struct; #endif /* M64P_R4300_ASSEMBLE_STRUCT_H */ mupen64plus-core-src-2.5/src/r4300/x86/gbc.c000066400000000000000000000165401251723631200201700ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gbc.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "interpret.h" #include "r4300/cached_interp.h" #include "r4300/cp1_private.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomph.h" static void genbc1f_test(void) { test_m32_imm32((unsigned int*)&FCR31, 0x800000); jne_rj(12); mov_m32_imm32((unsigned int*)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int*)(&branch_taken), 0); // 10 } void genbc1f(void) { #ifdef INTERPRET_BC1F gencallinterp((unsigned int)cached_interpreter_table.BC1F, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BC1F, 1); return; } gencheck_cop1_unusable(); genbc1f_test(); gendelayslot(); gentest(); #endif } void genbc1f_out(void) { #ifdef INTERPRET_BC1F_OUT gencallinterp((unsigned int)cached_interpreter_table.BC1F_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BC1F_OUT, 1); return; } gencheck_cop1_unusable(); genbc1f_test(); gendelayslot(); gentest_out(); #endif } void genbc1f_idle(void) { #ifdef INTERPRET_BC1F_IDLE gencallinterp((unsigned int)cached_interpreter_table.BC1F_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BC1F_IDLE, 1); return; } gencheck_cop1_unusable(); genbc1f_test(); gentest_idle(); genbc1f(); #endif } static void genbc1t_test(void) { test_m32_imm32((unsigned int*)&FCR31, 0x800000); je_rj(12); mov_m32_imm32((unsigned int*)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int*)(&branch_taken), 0); // 10 } void genbc1t(void) { #ifdef INTERPRET_BC1T gencallinterp((unsigned int)cached_interpreter_table.BC1T, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BC1T, 1); return; } gencheck_cop1_unusable(); genbc1t_test(); gendelayslot(); gentest(); #endif } void genbc1t_out(void) { #ifdef INTERPRET_BC1T_OUT gencallinterp((unsigned int)cached_interpreter_table.BC1T_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BC1T_OUT, 1); return; } gencheck_cop1_unusable(); genbc1t_test(); gendelayslot(); gentest_out(); #endif } void genbc1t_idle(void) { #ifdef INTERPRET_BC1T_IDLE gencallinterp((unsigned int)cached_interpreter_table.BC1T_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BC1T_IDLE, 1); return; } gencheck_cop1_unusable(); genbc1t_test(); gentest_idle(); genbc1t(); #endif } void genbc1fl(void) { #ifdef INTERPRET_BC1FL gencallinterp((unsigned int)cached_interpreter_table.BC1FL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BC1FL, 1); return; } gencheck_cop1_unusable(); genbc1f_test(); free_all_registers(); gentestl(); #endif } void genbc1fl_out(void) { #ifdef INTERPRET_BC1FL_OUT gencallinterp((unsigned int)cached_interpreter_table.BC1FL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BC1FL_OUT, 1); return; } gencheck_cop1_unusable(); genbc1f_test(); free_all_registers(); gentestl_out(); #endif } void genbc1fl_idle(void) { #ifdef INTERPRET_BC1FL_IDLE gencallinterp((unsigned int)cached_interpreter_table.BC1FL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BC1FL_IDLE, 1); return; } gencheck_cop1_unusable(); genbc1f_test(); gentest_idle(); genbc1fl(); #endif } void genbc1tl(void) { #ifdef INTERPRET_BC1TL gencallinterp((unsigned int)cached_interpreter_table.BC1TL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BC1TL, 1); return; } gencheck_cop1_unusable(); genbc1t_test(); free_all_registers(); gentestl(); #endif } void genbc1tl_out(void) { #ifdef INTERPRET_BC1TL_OUT gencallinterp((unsigned int)cached_interpreter_table.BC1TL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BC1TL_OUT, 1); return; } gencheck_cop1_unusable(); genbc1t_test(); free_all_registers(); gentestl_out(); #endif } void genbc1tl_idle(void) { #ifdef INTERPRET_BC1TL_IDLE gencallinterp((unsigned int)cached_interpreter_table.BC1TL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BC1TL_IDLE, 1); return; } gencheck_cop1_unusable(); genbc1t_test(); gentest_idle(); genbc1tl(); #endif } mupen64plus-core-src-2.5/src/r4300/x86/gcop0.c000066400000000000000000000037251251723631200204460ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gcop0.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "r4300/cached_interp.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" //static unsigned int pMFC0 = (unsigned int)(MFC0); void genmfc0(void) { gencallinterp((unsigned int)cached_interpreter_table.MFC0, 0); } //static unsigned int pMTC0 = (unsigned int)(MTC0); void genmtc0(void) { gencallinterp((unsigned int)cached_interpreter_table.MTC0, 0); } mupen64plus-core-src-2.5/src/r4300/x86/gcop1.c000066400000000000000000000113411251723631200204400ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gcop1.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include "assemble.h" #include "interpret.h" #include "memory/memory.h" #include "r4300/cp1_private.h" #include "r4300/macros.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" /* These are constants with addresses so that FLDCW can read them. * They are declared 'extern' so that other files can do the same. */ const uint16_t trunc_mode = 0xF3F; const uint16_t round_mode = 0x33F; const uint16_t ceil_mode = 0xB3F; const uint16_t floor_mode = 0x73F; void genmfc1(void) { #ifdef INTERPRET_MFC1 gencallinterp((unsigned int)cached_interpreter_table.MFC1, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_simple[dst->f.r.nrd])); mov_reg32_preg32(EBX, EAX); mov_m32_reg32((unsigned int*)dst->f.r.rt, EBX); sar_reg32_imm8(EBX, 31); mov_m32_reg32(((unsigned int*)dst->f.r.rt)+1, EBX); #endif } void gendmfc1(void) { #ifdef INTERPRET_DMFC1 gencallinterp((unsigned int)cached_interpreter_table.DMFC1, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.r.nrd])); mov_reg32_preg32(EBX, EAX); mov_reg32_preg32pimm32(ECX, EAX, 4); mov_m32_reg32((unsigned int*)dst->f.r.rt, EBX); mov_m32_reg32(((unsigned int*)dst->f.r.rt)+1, ECX); #endif } void gencfc1(void) { #ifdef INTERPRET_CFC1 gencallinterp((unsigned int)cached_interpreter_table.CFC1, 0); #else gencheck_cop1_unusable(); if(dst->f.r.nrd == 31) mov_eax_memoffs32((unsigned int*)&FCR31); else mov_eax_memoffs32((unsigned int*)&FCR0); mov_memoffs32_eax((unsigned int*)dst->f.r.rt); sar_reg32_imm8(EAX, 31); mov_memoffs32_eax(((unsigned int*)dst->f.r.rt)+1); #endif } void genmtc1(void) { #ifdef INTERPRET_MTC1 gencallinterp((unsigned int)cached_interpreter_table.MTC1, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)dst->f.r.rt); mov_reg32_m32(EBX, (unsigned int*)(®_cop1_simple[dst->f.r.nrd])); mov_preg32_reg32(EBX, EAX); #endif } void gendmtc1(void) { #ifdef INTERPRET_DMTC1 gencallinterp((unsigned int)cached_interpreter_table.DMTC1, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)dst->f.r.rt); mov_reg32_m32(EBX, ((unsigned int*)dst->f.r.rt)+1); mov_reg32_m32(EDX, (unsigned int*)(®_cop1_double[dst->f.r.nrd])); mov_preg32_reg32(EDX, EAX); mov_preg32pimm32_reg32(EDX, 4, EBX); #endif } void genctc1(void) { #ifdef INTERPRET_CTC1 gencallinterp((unsigned int)cached_interpreter_table.CTC1, 0); #else gencheck_cop1_unusable(); if (dst->f.r.nrd != 31) return; mov_eax_memoffs32((unsigned int*)dst->f.r.rt); mov_memoffs32_eax((unsigned int*)&FCR31); and_eax_imm32(3); cmp_eax_imm32(0); jne_rj(12); mov_m32_imm32((unsigned int*)&rounding_mode, 0x33F); // 10 jmp_imm_short(48); // 2 cmp_eax_imm32(1); // 5 jne_rj(12); // 2 mov_m32_imm32((unsigned int*)&rounding_mode, 0xF3F); // 10 jmp_imm_short(29); // 2 cmp_eax_imm32(2); // 5 jne_rj(12); // 2 mov_m32_imm32((unsigned int*)&rounding_mode, 0xB3F); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int*)&rounding_mode, 0x73F); // 10 fldcw_m16((unsigned short*)&rounding_mode); #endif } mupen64plus-core-src-2.5/src/r4300/x86/gcop1_d.c000066400000000000000000000435661251723631200207610ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gcop1_d.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "interpret.h" #include "r4300/cp1_private.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomph.h" void genadd_d(void) { #ifdef INTERPRET_ADD_D gencallinterp((unsigned int)cached_interpreter_table.ADD_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.ft])); fadd_preg32_qword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fstp_preg32_qword(EAX); #endif } void gensub_d(void) { #ifdef INTERPRET_SUB_D gencallinterp((unsigned int)cached_interpreter_table.SUB_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.ft])); fsub_preg32_qword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fstp_preg32_qword(EAX); #endif } void genmul_d(void) { #ifdef INTERPRET_MUL_D gencallinterp((unsigned int)cached_interpreter_table.MUL_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.ft])); fmul_preg32_qword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fstp_preg32_qword(EAX); #endif } void gendiv_d(void) { #ifdef INTERPRET_DIV_D gencallinterp((unsigned int)cached_interpreter_table.DIV_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.ft])); fdiv_preg32_qword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fstp_preg32_qword(EAX); #endif } void gensqrt_d(void) { #ifdef INTERPRET_SQRT_D gencallinterp((unsigned int)cached_interpreter_table.SQRT_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fsqrt(); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fstp_preg32_qword(EAX); #endif } void genabs_d(void) { #ifdef INTERPRET_ABS_D gencallinterp((unsigned int)cached_interpreter_table.ABS_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fabs_(); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fstp_preg32_qword(EAX); #endif } void genmov_d(void) { #ifdef INTERPRET_MOV_D gencallinterp((unsigned int)cached_interpreter_table.MOV_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fs])); mov_reg32_preg32(EBX, EAX); mov_reg32_preg32pimm32(ECX, EAX, 4); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); mov_preg32_reg32(EAX, EBX); mov_preg32pimm32_reg32(EAX, 4, ECX); #endif } void genneg_d(void) { #ifdef INTERPRET_NEG_D gencallinterp((unsigned int)cached_interpreter_table.NEG_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fchs(); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fstp_preg32_qword(EAX); #endif } void genround_l_d(void) { #ifdef INTERPRET_ROUND_L_D gencallinterp((unsigned int)cached_interpreter_table.ROUND_L_D, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&round_mode); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fd])); fistp_preg32_qword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void gentrunc_l_d(void) { #ifdef INTERPRET_TRUNC_L_D gencallinterp((unsigned int)cached_interpreter_table.TRUNC_L_D, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&trunc_mode); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fd])); fistp_preg32_qword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void genceil_l_d(void) { #ifdef INTERPRET_CEIL_L_D gencallinterp((unsigned int)cached_interpreter_table.CEIL_L_D, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&ceil_mode); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fd])); fistp_preg32_qword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void genfloor_l_d(void) { #ifdef INTERPRET_FLOOR_L_D gencallinterp((unsigned int)cached_interpreter_table.FLOOR_L_D, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&floor_mode); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fd])); fistp_preg32_qword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void genround_w_d(void) { #ifdef INTERPRET_ROUND_W_D gencallinterp((unsigned int)cached_interpreter_table.ROUND_W_D, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&round_mode); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_simple[dst->f.cf.fd])); fistp_preg32_dword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void gentrunc_w_d(void) { #ifdef INTERPRET_TRUNC_W_D gencallinterp((unsigned int)cached_interpreter_table.TRUNC_W_D, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&trunc_mode); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_simple[dst->f.cf.fd])); fistp_preg32_dword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void genceil_w_d(void) { #ifdef INTERPRET_CEIL_W_D gencallinterp((unsigned int)cached_interpreter_table.CEIL_W_D, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&ceil_mode); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_simple[dst->f.cf.fd])); fistp_preg32_dword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void genfloor_w_d(void) { #ifdef INTERPRET_FLOOR_W_D gencallinterp((unsigned int)cached_interpreter_table.FLOOR_W_D, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&floor_mode); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_simple[dst->f.cf.fd])); fistp_preg32_dword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void gencvt_s_d(void) { #ifdef INTERPRET_CVT_S_D gencallinterp((unsigned int)cached_interpreter_table.CVT_S_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_simple[dst->f.cf.fd])); fstp_preg32_dword(EAX); #endif } void gencvt_w_d(void) { #ifdef INTERPRET_CVT_W_D gencallinterp((unsigned int)cached_interpreter_table.CVT_W_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_simple[dst->f.cf.fd])); fistp_preg32_dword(EAX); #endif } void gencvt_l_d(void) { #ifdef INTERPRET_CVT_L_D gencallinterp((unsigned int)cached_interpreter_table.CVT_L_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fd])); fistp_preg32_qword(EAX); #endif } void genc_f_d(void) { #ifdef INTERPRET_C_F_D gencallinterp((unsigned int)cached_interpreter_table.C_F_D, 0); #else gencheck_cop1_unusable(); and_m32_imm32((unsigned int*)&FCR31, ~0x800000); #endif } void genc_un_d(void) { #ifdef INTERPRET_C_UN_D gencallinterp((unsigned int)cached_interpreter_table.C_UN_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(12); and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 jmp_imm_short(10); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 #endif } void genc_eq_d(void) { #ifdef INTERPRET_C_EQ_D gencallinterp((unsigned int)cached_interpreter_table.C_EQ_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fucomip_fpreg(1); ffree_fpreg(0); jne_rj(12); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_ueq_d(void) { #ifdef INTERPRET_C_UEQ_D gencallinterp((unsigned int)cached_interpreter_table.C_UEQ_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(14); jne_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_olt_d(void) { #ifdef INTERPRET_C_OLT_D gencallinterp((unsigned int)cached_interpreter_table.C_OLT_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fucomip_fpreg(1); ffree_fpreg(0); jae_rj(12); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_ult_d(void) { #ifdef INTERPRET_C_ULT_D gencallinterp((unsigned int)cached_interpreter_table.C_ULT_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(14); jae_rj(12); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_ole_d(void) { #ifdef INTERPRET_C_OLE_D gencallinterp((unsigned int)cached_interpreter_table.C_OLE_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fucomip_fpreg(1); ffree_fpreg(0); ja_rj(12); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_ule_d(void) { #ifdef INTERPRET_C_ULE_D gencallinterp((unsigned int)cached_interpreter_table.C_ULE_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(14); ja_rj(12); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_sf_d(void) { #ifdef INTERPRET_C_SF_D gencallinterp((unsigned int)cached_interpreter_table.C_SF_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fcomip_fpreg(1); ffree_fpreg(0); and_m32_imm32((unsigned int*)&FCR31, ~0x800000); #endif } void genc_ngle_d(void) { #ifdef INTERPRET_C_NGLE_D gencallinterp((unsigned int)cached_interpreter_table.C_NGLE_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(12); and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 jmp_imm_short(10); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 #endif } void genc_seq_d(void) { #ifdef INTERPRET_C_SEQ_D gencallinterp((unsigned int)cached_interpreter_table.C_SEQ_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fcomip_fpreg(1); ffree_fpreg(0); jne_rj(12); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_ngl_d(void) { #ifdef INTERPRET_C_NGL_D gencallinterp((unsigned int)cached_interpreter_table.C_NGL_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(14); jne_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_lt_d(void) { #ifdef INTERPRET_C_LT_D gencallinterp((unsigned int)cached_interpreter_table.C_LT_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fcomip_fpreg(1); ffree_fpreg(0); jae_rj(12); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_nge_d(void) { #ifdef INTERPRET_C_NGE_D gencallinterp((unsigned int)cached_interpreter_table.C_NGE_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(14); jae_rj(12); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_le_d(void) { #ifdef INTERPRET_C_LE_D gencallinterp((unsigned int)cached_interpreter_table.C_LE_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fcomip_fpreg(1); ffree_fpreg(0); ja_rj(12); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_ngt_d(void) { #ifdef INTERPRET_C_NGT_D gencallinterp((unsigned int)cached_interpreter_table.C_NGT_D, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.ft])); fld_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fld_preg32_qword(EAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(14); ja_rj(12); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } mupen64plus-core-src-2.5/src/r4300/x86/gcop1_l.c000066400000000000000000000045541251723631200207630ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gcop1_l.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "assemble.h" #include "interpret.h" #include "r4300/cp1_private.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomph.h" void gencvt_s_l(void) { #ifdef INTERPRET_CVT_S_L gencallinterp((unsigned int)cached_interpreter_table.CVT_S_L, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fild_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_simple[dst->f.cf.fd])); fstp_preg32_dword(EAX); #endif } void gencvt_d_l(void) { #ifdef INTERPRET_CVT_D_L gencallinterp((unsigned int)cached_interpreter_table.CVT_D_L, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fs])); fild_preg32_qword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fd])); fstp_preg32_qword(EAX); #endif } mupen64plus-core-src-2.5/src/r4300/x86/gcop1_s.c000066400000000000000000000435051251723631200207710ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gcop1_s.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "interpret.h" #include "r4300/cp1_private.h" #include "r4300/macros.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomph.h" void genadd_s(void) { #ifdef INTERPRET_ADD_S gencallinterp((unsigned int)cached_interpreter_table.ADD_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fadd_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg32_dword(EAX); #endif } void gensub_s(void) { #ifdef INTERPRET_SUB_S gencallinterp((unsigned int)cached_interpreter_table.SUB_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fsub_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg32_dword(EAX); #endif } void genmul_s(void) { #ifdef INTERPRET_MUL_S gencallinterp((unsigned int)cached_interpreter_table.MUL_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fmul_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg32_dword(EAX); #endif } void gendiv_s(void) { #ifdef INTERPRET_DIV_S gencallinterp((unsigned int)cached_interpreter_table.DIV_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fdiv_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg32_dword(EAX); #endif } void gensqrt_s(void) { #ifdef INTERPRET_SQRT_S gencallinterp((unsigned int)cached_interpreter_table.SQRT_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fsqrt(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg32_dword(EAX); #endif } void genabs_s(void) { #ifdef INTERPRET_ABS_S gencallinterp((unsigned int)cached_interpreter_table.ABS_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fabs_(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg32_dword(EAX); #endif } void genmov_s(void) { #ifdef INTERPRET_MOV_S gencallinterp((unsigned int)cached_interpreter_table.MOV_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); mov_reg32_preg32(EBX, EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); mov_preg32_reg32(EAX, EBX); #endif } void genneg_s(void) { #ifdef INTERPRET_NEG_S gencallinterp((unsigned int)cached_interpreter_table.NEG_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fchs(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg32_dword(EAX); #endif } void genround_l_s(void) { #ifdef INTERPRET_ROUND_L_S gencallinterp((unsigned int)cached_interpreter_table.ROUND_L_S, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&round_mode); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fistp_preg32_qword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void gentrunc_l_s(void) { #ifdef INTERPRET_TRUNC_L_S gencallinterp((unsigned int)cached_interpreter_table.TRUNC_L_S, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&trunc_mode); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fistp_preg32_qword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void genceil_l_s(void) { #ifdef INTERPRET_CEIL_L_S gencallinterp((unsigned int)cached_interpreter_table.CEIL_L_S, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&ceil_mode); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fistp_preg32_qword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void genfloor_l_s(void) { #ifdef INTERPRET_FLOOR_L_S gencallinterp((unsigned int)cached_interpreter_table.FLOOR_L_S, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&floor_mode); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fistp_preg32_qword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void genround_w_s(void) { #ifdef INTERPRET_ROUND_W_S gencallinterp((unsigned int)cached_interpreter_table.ROUND_W_S, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&round_mode); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg32_dword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void gentrunc_w_s(void) { #ifdef INTERPRET_TRUNC_W_S gencallinterp((unsigned int)cached_interpreter_table.TRUNC_W_S, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&trunc_mode); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg32_dword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void genceil_w_s(void) { #ifdef INTERPRET_CEIL_W_S gencallinterp((unsigned int)cached_interpreter_table.CEIL_W_S, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&ceil_mode); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg32_dword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void genfloor_w_s(void) { #ifdef INTERPRET_FLOOR_W_S gencallinterp((unsigned int)cached_interpreter_table.FLOOR_W_S, 0); #else gencheck_cop1_unusable(); fldcw_m16((unsigned short*)&floor_mode); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg32_dword(EAX); fldcw_m16((unsigned short*)&rounding_mode); #endif } void gencvt_d_s(void) { #ifdef INTERPRET_CVT_D_S gencallinterp((unsigned int)cached_interpreter_table.CVT_D_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fstp_preg32_qword(EAX); #endif } void gencvt_w_s(void) { #ifdef INTERPRET_CVT_W_S gencallinterp((unsigned int)cached_interpreter_table.CVT_W_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg32_dword(EAX); #endif } void gencvt_l_s(void) { #ifdef INTERPRET_CVT_L_S gencallinterp((unsigned int)cached_interpreter_table.CVT_L_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd])); fistp_preg32_qword(EAX); #endif } void genc_f_s(void) { #ifdef INTERPRET_C_F_S gencallinterp((unsigned int)cached_interpreter_table.C_F_S, 0); #else gencheck_cop1_unusable(); and_m32_imm32((unsigned int*)&FCR31, ~0x800000); #endif } void genc_un_s(void) { #ifdef INTERPRET_C_UN_S gencallinterp((unsigned int)cached_interpreter_table.C_UN_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(12); and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 jmp_imm_short(10); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 #endif } void genc_eq_s(void) { #ifdef INTERPRET_C_EQ_S gencallinterp((unsigned int)cached_interpreter_table.C_EQ_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fucomip_fpreg(1); ffree_fpreg(0); jne_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_ueq_s(void) { #ifdef INTERPRET_C_UEQ_S gencallinterp((unsigned int)cached_interpreter_table.C_UEQ_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(14); jne_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_olt_s(void) { #ifdef INTERPRET_C_OLT_S gencallinterp((unsigned int)cached_interpreter_table.C_OLT_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fucomip_fpreg(1); ffree_fpreg(0); jae_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_ult_s(void) { #ifdef INTERPRET_C_ULT_S gencallinterp((unsigned int)cached_interpreter_table.C_ULT_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(14); jae_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_ole_s(void) { #ifdef INTERPRET_C_OLE_S gencallinterp((unsigned int)cached_interpreter_table.C_OLE_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fucomip_fpreg(1); ffree_fpreg(0); ja_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_ule_s(void) { #ifdef INTERPRET_C_ULE_S gencallinterp((unsigned int)cached_interpreter_table.C_ULE_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(14); ja_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_sf_s(void) { #ifdef INTERPRET_C_SF_S gencallinterp((unsigned int)cached_interpreter_table.C_SF_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fcomip_fpreg(1); ffree_fpreg(0); and_m32_imm32((unsigned int*)&FCR31, ~0x800000); #endif } void genc_ngle_s(void) { #ifdef INTERPRET_C_NGLE_S gencallinterp((unsigned int)cached_interpreter_table.C_NGLE_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(12); and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 jmp_imm_short(10); // 2 or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 #endif } void genc_seq_s(void) { #ifdef INTERPRET_C_SEQ_S gencallinterp((unsigned int)cached_interpreter_table.C_SEQ_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fcomip_fpreg(1); ffree_fpreg(0); jne_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_ngl_s(void) { #ifdef INTERPRET_C_NGL_S gencallinterp((unsigned int)cached_interpreter_table.C_NGL_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(14); jne_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_lt_s(void) { #ifdef INTERPRET_C_LT_S gencallinterp((unsigned int)cached_interpreter_table.C_LT_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fcomip_fpreg(1); ffree_fpreg(0); jae_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_nge_s(void) { #ifdef INTERPRET_C_NGE_S gencallinterp((unsigned int)cached_interpreter_table.C_NGE_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(14); jae_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_le_s(void) { #ifdef INTERPRET_C_LE_S gencallinterp((unsigned int)cached_interpreter_table.C_LE_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fcomip_fpreg(1); ffree_fpreg(0); ja_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } void genc_ngt_s(void) { #ifdef INTERPRET_C_NGT_S gencallinterp((unsigned int)cached_interpreter_table.C_NGT_S, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.ft])); fld_preg32_dword(EAX); mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs])); fld_preg32_dword(EAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(14); ja_rj(12); or_m32_imm32((unsigned int*)&FCR31, 0x800000); // 10 jmp_imm_short(10); // 2 and_m32_imm32((unsigned int*)&FCR31, ~0x800000); // 10 #endif } mupen64plus-core-src-2.5/src/r4300/x86/gcop1_w.c000066400000000000000000000046001251723631200207660ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gcop1_w.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "interpret.h" #include "r4300/cp1_private.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomph.h" void gencvt_s_w(void) { #ifdef INTERPRET_CVT_S_W gencallinterp((unsigned int)cached_interpreter_table.CVT_S_W, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_simple[dst->f.cf.fs])); fild_preg32_dword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_simple[dst->f.cf.fd])); fstp_preg32_dword(EAX); #endif } void gencvt_d_w(void) { #ifdef INTERPRET_CVT_D_W gencallinterp((unsigned int)cached_interpreter_table.CVT_D_W, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int*)(®_cop1_simple[dst->f.cf.fs])); fild_preg32_dword(EAX); mov_eax_memoffs32((unsigned int*)(®_cop1_double[dst->f.cf.fd])); fstp_preg32_qword(EAX); #endif } mupen64plus-core-src-2.5/src/r4300/x86/gr4300.c000066400000000000000000001623461251723631200203620ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gr4300.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "api/debugger.h" #include "assemble.h" #include "interpret.h" #include "main/main.h" #include "memory/memory.h" #include "r4300/cached_interp.h" #include "r4300/cp0_private.h" #include "r4300/cp1_private.h" #include "r4300/exception.h" #include "r4300/interupt.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomph.h" #include "regcache.h" static precomp_instr fake_instr; #ifdef COMPARE_CORE static int eax, ebx, ecx, edx, esp, ebp, esi, edi; #endif int branch_taken; /* static functions */ static void genupdate_count(unsigned int addr) { #if !defined(COMPARE_CORE) && !defined(DBG) mov_reg32_imm32(EAX, addr); sub_reg32_m32(EAX, (unsigned int*)(&last_addr)); shr_reg32_imm8(EAX, 2); mov_reg32_m32(EDX, &count_per_op); mul_reg32(EDX); add_m32_reg32((unsigned int*)(&g_cp0_regs[CP0_COUNT_REG]), EAX); #else mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(dst+1)); mov_reg32_imm32(EAX, (unsigned int)update_count); call_reg32(EAX); #endif } static void gencheck_interupt(unsigned int instr_structure) { mov_eax_memoffs32(&next_interupt); cmp_reg32_m32(EAX, &g_cp0_regs[CP0_COUNT_REG]); ja_rj(17); mov_m32_imm32((unsigned int*)(&PC), instr_structure); // 10 mov_reg32_imm32(EAX, (unsigned int)gen_interupt); // 5 call_reg32(EAX); // 2 } static void gencheck_interupt_out(unsigned int addr) { mov_eax_memoffs32(&next_interupt); cmp_reg32_m32(EAX, &g_cp0_regs[CP0_COUNT_REG]); ja_rj(27); mov_m32_imm32((unsigned int*)(&fake_instr.addr), addr); mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(&fake_instr)); mov_reg32_imm32(EAX, (unsigned int)gen_interupt); call_reg32(EAX); } static void genbeq_test(void) { int rs_64bit = is64((unsigned int *)dst->f.i.rs); int rt_64bit = is64((unsigned int *)dst->f.i.rt); if (!rs_64bit && !rt_64bit) { int rs = allocate_register((unsigned int *)dst->f.i.rs); int rt = allocate_register((unsigned int *)dst->f.i.rt); cmp_reg32_reg32(rs, rt); jne_rj(12); mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } else if (rs_64bit == -1) { int rt1 = allocate_64_register1((unsigned int *)dst->f.i.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.i.rt); cmp_reg32_m32(rt1, (unsigned int *)dst->f.i.rs); jne_rj(20); cmp_reg32_m32(rt2, ((unsigned int *)dst->f.i.rs)+1); // 6 jne_rj(12); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } else if (rt_64bit == -1) { int rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); cmp_reg32_m32(rs1, (unsigned int *)dst->f.i.rt); jne_rj(20); cmp_reg32_m32(rs2, ((unsigned int *)dst->f.i.rt)+1); // 6 jne_rj(12); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } else { int rs1, rs2, rt1, rt2; if (!rs_64bit) { rt1 = allocate_64_register1((unsigned int *)dst->f.i.rt); rt2 = allocate_64_register2((unsigned int *)dst->f.i.rt); rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); } else { rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); rt1 = allocate_64_register1((unsigned int *)dst->f.i.rt); rt2 = allocate_64_register2((unsigned int *)dst->f.i.rt); } cmp_reg32_reg32(rs1, rt1); jne_rj(16); cmp_reg32_reg32(rs2, rt2); // 2 jne_rj(12); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } } static void genbne_test(void) { int rs_64bit = is64((unsigned int *)dst->f.i.rs); int rt_64bit = is64((unsigned int *)dst->f.i.rt); if (!rs_64bit && !rt_64bit) { int rs = allocate_register((unsigned int *)dst->f.i.rs); int rt = allocate_register((unsigned int *)dst->f.i.rt); cmp_reg32_reg32(rs, rt); je_rj(12); mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } else if (rs_64bit == -1) { int rt1 = allocate_64_register1((unsigned int *)dst->f.i.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.i.rt); cmp_reg32_m32(rt1, (unsigned int *)dst->f.i.rs); jne_rj(20); cmp_reg32_m32(rt2, ((unsigned int *)dst->f.i.rs)+1); // 6 jne_rj(12); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 } else if (rt_64bit == -1) { int rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); cmp_reg32_m32(rs1, (unsigned int *)dst->f.i.rt); jne_rj(20); cmp_reg32_m32(rs2, ((unsigned int *)dst->f.i.rt)+1); // 6 jne_rj(12); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 } else { int rs1, rs2, rt1, rt2; if (!rs_64bit) { rt1 = allocate_64_register1((unsigned int *)dst->f.i.rt); rt2 = allocate_64_register2((unsigned int *)dst->f.i.rt); rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); } else { rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); rt1 = allocate_64_register1((unsigned int *)dst->f.i.rt); rt2 = allocate_64_register2((unsigned int *)dst->f.i.rt); } cmp_reg32_reg32(rs1, rt1); jne_rj(16); cmp_reg32_reg32(rs2, rt2); // 2 jne_rj(12); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 } } static void genblez_test(void) { int rs_64bit = is64((unsigned int *)dst->f.i.rs); if (!rs_64bit) { int rs = allocate_register((unsigned int *)dst->f.i.rs); cmp_reg32_imm32(rs, 0); jg_rj(12); mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } else if (rs_64bit == -1) { cmp_m32_imm32(((unsigned int *)dst->f.i.rs)+1, 0); jg_rj(14); jne_rj(24); // 2 cmp_m32_imm32((unsigned int *)dst->f.i.rs, 0); // 10 je_rj(12); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 } else { int rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); cmp_reg32_imm32(rs2, 0); jg_rj(10); jne_rj(20); // 2 cmp_reg32_imm32(rs1, 0); // 6 je_rj(12); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 } } static void genbgtz_test(void) { int rs_64bit = is64((unsigned int *)dst->f.i.rs); if (!rs_64bit) { int rs = allocate_register((unsigned int *)dst->f.i.rs); cmp_reg32_imm32(rs, 0); jle_rj(12); mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } else if (rs_64bit == -1) { cmp_m32_imm32(((unsigned int *)dst->f.i.rs)+1, 0); jl_rj(14); jne_rj(24); // 2 cmp_m32_imm32((unsigned int *)dst->f.i.rs, 0); // 10 jne_rj(12); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 } else { int rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); cmp_reg32_imm32(rs2, 0); jl_rj(10); jne_rj(20); // 2 cmp_reg32_imm32(rs1, 0); // 6 jne_rj(12); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 } } /* global functions */ void gennotcompiled(void) { free_all_registers(); simplify_access(); mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(dst)); mov_reg32_imm32(EAX, (unsigned int)cached_interpreter_table.NOTCOMPILED); call_reg32(EAX); } void genlink_subblock(void) { free_all_registers(); jmp(dst->addr+4); } #ifdef COMPARE_CORE extern unsigned int op; /* api/debugger.c */ void gendebug(void) { free_all_registers(); mov_m32_reg32((unsigned int*)&eax, EAX); mov_m32_reg32((unsigned int*)&ebx, EBX); mov_m32_reg32((unsigned int*)&ecx, ECX); mov_m32_reg32((unsigned int*)&edx, EDX); mov_m32_reg32((unsigned int*)&esp, ESP); mov_m32_reg32((unsigned int*)&ebp, EBP); mov_m32_reg32((unsigned int*)&esi, ESI); mov_m32_reg32((unsigned int*)&edi, EDI); mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(dst)); mov_m32_imm32((unsigned int*)(&op), (unsigned int)(src)); mov_reg32_imm32(EAX, (unsigned int) CoreCompareCallback); call_reg32(EAX); mov_reg32_m32(EAX, (unsigned int*)&eax); mov_reg32_m32(EBX, (unsigned int*)&ebx); mov_reg32_m32(ECX, (unsigned int*)&ecx); mov_reg32_m32(EDX, (unsigned int*)&edx); mov_reg32_m32(ESP, (unsigned int*)&esp); mov_reg32_m32(EBP, (unsigned int*)&ebp); mov_reg32_m32(ESI, (unsigned int*)&esi); mov_reg32_m32(EDI, (unsigned int*)&edi); } #endif void gencallinterp(unsigned long addr, int jump) { free_all_registers(); simplify_access(); if (jump) mov_m32_imm32((unsigned int*)(&dyna_interp), 1); mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(dst)); mov_reg32_imm32(EAX, addr); call_reg32(EAX); if (jump) { mov_m32_imm32((unsigned int*)(&dyna_interp), 0); mov_reg32_imm32(EAX, (unsigned int)dyna_jump); call_reg32(EAX); } } void gendelayslot(void) { mov_m32_imm32(&delay_slot, 1); recompile_opcode(); free_all_registers(); genupdate_count(dst->addr+4); mov_m32_imm32(&delay_slot, 0); } void genni(void) { gencallinterp((unsigned int)cached_interpreter_table.NI, 0); } void genreserved(void) { gencallinterp((unsigned int)cached_interpreter_table.RESERVED, 0); } void genfin_block(void) { gencallinterp((unsigned int)cached_interpreter_table.FIN_BLOCK, 0); } void gencheck_interupt_reg(void) // addr is in EAX { mov_reg32_m32(EBX, &next_interupt); cmp_reg32_m32(EBX, &g_cp0_regs[CP0_COUNT_REG]); ja_rj(22); mov_memoffs32_eax((unsigned int*)(&fake_instr.addr)); // 5 mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(&fake_instr)); // 10 mov_reg32_imm32(EAX, (unsigned int)gen_interupt); // 5 call_reg32(EAX); // 2 } void gennop(void) { } void genj(void) { #ifdef INTERPRET_J gencallinterp((unsigned int)cached_interpreter_table.J, 1); #else unsigned int naddr; if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.J, 1); return; } gendelayslot(); naddr = ((dst-1)->f.j.inst_index<<2) | (dst->addr & 0xF0000000); mov_m32_imm32(&last_addr, naddr); gencheck_interupt((unsigned int)&actual->block[(naddr-actual->start)/4]); jmp(naddr); #endif } void genj_out(void) { #ifdef INTERPRET_J_OUT gencallinterp((unsigned int)cached_interpreter_table.J_OUT, 1); #else unsigned int naddr; if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.J_OUT, 1); return; } gendelayslot(); naddr = ((dst-1)->f.j.inst_index<<2) | (dst->addr & 0xF0000000); mov_m32_imm32(&last_addr, naddr); gencheck_interupt_out(naddr); mov_m32_imm32(&jump_to_address, naddr); mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(dst+1)); mov_reg32_imm32(EAX, (unsigned int)jump_to_func); call_reg32(EAX); #endif } void genj_idle(void) { #ifdef INTERPRET_J_IDLE gencallinterp((unsigned int)cached_interpreter_table.J_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.J_IDLE, 1); return; } mov_eax_memoffs32((unsigned int *)(&next_interupt)); sub_reg32_m32(EAX, (unsigned int *)(&g_cp0_regs[CP0_COUNT_REG])); cmp_reg32_imm8(EAX, 3); jbe_rj(11); and_eax_imm32(0xFFFFFFFC); // 5 add_m32_reg32((unsigned int *)(&g_cp0_regs[CP0_COUNT_REG]), EAX); // 6 genj(); #endif } void genjal(void) { #ifdef INTERPRET_JAL gencallinterp((unsigned int)cached_interpreter_table.JAL, 1); #else unsigned int naddr; if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.JAL, 1); return; } gendelayslot(); mov_m32_imm32((unsigned int *)(reg + 31), dst->addr + 4); if (((dst->addr + 4) & 0x80000000)) mov_m32_imm32((unsigned int *)(®[31])+1, 0xFFFFFFFF); else mov_m32_imm32((unsigned int *)(®[31])+1, 0); naddr = ((dst-1)->f.j.inst_index<<2) | (dst->addr & 0xF0000000); mov_m32_imm32(&last_addr, naddr); gencheck_interupt((unsigned int)&actual->block[(naddr-actual->start)/4]); jmp(naddr); #endif } void genjal_out(void) { #ifdef INTERPRET_JAL_OUT gencallinterp((unsigned int)cached_interpreter_table.JAL_OUT, 1); #else unsigned int naddr; if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.JAL_OUT, 1); return; } gendelayslot(); mov_m32_imm32((unsigned int *)(reg + 31), dst->addr + 4); if (((dst->addr + 4) & 0x80000000)) mov_m32_imm32((unsigned int *)(®[31])+1, 0xFFFFFFFF); else mov_m32_imm32((unsigned int *)(®[31])+1, 0); naddr = ((dst-1)->f.j.inst_index<<2) | (dst->addr & 0xF0000000); mov_m32_imm32(&last_addr, naddr); gencheck_interupt_out(naddr); mov_m32_imm32(&jump_to_address, naddr); mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(dst+1)); mov_reg32_imm32(EAX, (unsigned int)jump_to_func); call_reg32(EAX); #endif } void genjal_idle(void) { #ifdef INTERPRET_JAL_IDLE gencallinterp((unsigned int)cached_interpreter_table.JAL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.JAL_IDLE, 1); return; } mov_eax_memoffs32((unsigned int *)(&next_interupt)); sub_reg32_m32(EAX, (unsigned int *)(&g_cp0_regs[CP0_COUNT_REG])); cmp_reg32_imm8(EAX, 3); jbe_rj(11); and_eax_imm32(0xFFFFFFFC); add_m32_reg32((unsigned int *)(&g_cp0_regs[CP0_COUNT_REG]), EAX); genjal(); #endif } void gentest(void) { cmp_m32_imm32((unsigned int *)(&branch_taken), 0); je_near_rj(0); jump_start_rel32(); mov_m32_imm32(&last_addr, dst->addr + (dst-1)->f.i.immediate*4); gencheck_interupt((unsigned int)(dst + (dst-1)->f.i.immediate)); jmp(dst->addr + (dst-1)->f.i.immediate*4); jump_end_rel32(); mov_m32_imm32(&last_addr, dst->addr + 4); gencheck_interupt((unsigned int)(dst + 1)); jmp(dst->addr + 4); } void genbeq(void) { #ifdef INTERPRET_BEQ gencallinterp((unsigned int)cached_interpreter_table.BEQ, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BEQ, 1); return; } genbeq_test(); gendelayslot(); gentest(); #endif } void gentest_out(void) { cmp_m32_imm32((unsigned int *)(&branch_taken), 0); je_near_rj(0); jump_start_rel32(); mov_m32_imm32(&last_addr, dst->addr + (dst-1)->f.i.immediate*4); gencheck_interupt_out(dst->addr + (dst-1)->f.i.immediate*4); mov_m32_imm32(&jump_to_address, dst->addr + (dst-1)->f.i.immediate*4); mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(dst+1)); mov_reg32_imm32(EAX, (unsigned int)jump_to_func); call_reg32(EAX); jump_end_rel32(); mov_m32_imm32(&last_addr, dst->addr + 4); gencheck_interupt((unsigned int)(dst + 1)); jmp(dst->addr + 4); } void genbeq_out(void) { #ifdef INTERPRET_BEQ_OUT gencallinterp((unsigned int)cached_interpreter_table.BEQ_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BEQ_OUT, 1); return; } genbeq_test(); gendelayslot(); gentest_out(); #endif } void gentest_idle(void) { int reg; reg = lru_register(); free_register(reg); cmp_m32_imm32((unsigned int *)(&branch_taken), 0); je_near_rj(0); jump_start_rel32(); mov_reg32_m32(reg, (unsigned int *)(&next_interupt)); sub_reg32_m32(reg, (unsigned int *)(&g_cp0_regs[CP0_COUNT_REG])); cmp_reg32_imm8(reg, 5); jbe_rj(18); sub_reg32_imm32(reg, 2); // 6 and_reg32_imm32(reg, 0xFFFFFFFC); // 6 add_m32_reg32((unsigned int *)(&g_cp0_regs[CP0_COUNT_REG]), reg); // 6 jump_end_rel32(); } void genbeq_idle(void) { #ifdef INTERPRET_BEQ_IDLE gencallinterp((unsigned int)cached_interpreter_table.BEQ_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BEQ_IDLE, 1); return; } genbeq_test(); gentest_idle(); genbeq(); #endif } void genbne(void) { #ifdef INTERPRET_BNE gencallinterp((unsigned int)cached_interpreter_table.BNE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BNE, 1); return; } genbne_test(); gendelayslot(); gentest(); #endif } void genbne_out(void) { #ifdef INTERPRET_BNE_OUT gencallinterp((unsigned int)cached_interpreter_table.BNE_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BNE_OUT, 1); return; } genbne_test(); gendelayslot(); gentest_out(); #endif } void genbne_idle(void) { #ifdef INTERPRET_BNE_IDLE gencallinterp((unsigned int)cached_interpreter_table.BNE_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BNE_IDLE, 1); return; } genbne_test(); gentest_idle(); genbne(); #endif } void genblez(void) { #ifdef INTERPRET_BLEZ gencallinterp((unsigned int)cached_interpreter_table.BLEZ, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLEZ, 1); return; } genblez_test(); gendelayslot(); gentest(); #endif } void genblez_out(void) { #ifdef INTERPRET_BLEZ_OUT gencallinterp((unsigned int)cached_interpreter_table.BLEZ_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLEZ_OUT, 1); return; } genblez_test(); gendelayslot(); gentest_out(); #endif } void genblez_idle(void) { #ifdef INTERPRET_BLEZ_IDLE gencallinterp((unsigned int)cached_interpreter_table.BLEZ_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLEZ_IDLE, 1); return; } genblez_test(); gentest_idle(); genblez(); #endif } void genbgtz(void) { #ifdef INTERPRET_BGTZ gencallinterp((unsigned int)cached_interpreter_table.BGTZ, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGTZ, 1); return; } genbgtz_test(); gendelayslot(); gentest(); #endif } void genbgtz_out(void) { #ifdef INTERPRET_BGTZ_OUT gencallinterp((unsigned int)cached_interpreter_table.BGTZ_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGTZ_OUT, 1); return; } genbgtz_test(); gendelayslot(); gentest_out(); #endif } void genbgtz_idle(void) { #ifdef INTERPRET_BGTZ_IDLE gencallinterp((unsigned int)cached_interpreter_table.BGTZ_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGTZ_IDLE, 1); return; } genbgtz_test(); gentest_idle(); genbgtz(); #endif } void genaddi(void) { #ifdef INTERPRET_ADDI gencallinterp((unsigned int)cached_interpreter_table.ADDI, 0); #else int rs = allocate_register((unsigned int *)dst->f.i.rs); int rt = allocate_register_w((unsigned int *)dst->f.i.rt); mov_reg32_reg32(rt, rs); add_reg32_imm32(rt,(int)dst->f.i.immediate); #endif } void genaddiu(void) { #ifdef INTERPRET_ADDIU gencallinterp((unsigned int)cached_interpreter_table.ADDIU, 0); #else int rs = allocate_register((unsigned int *)dst->f.i.rs); int rt = allocate_register_w((unsigned int *)dst->f.i.rt); mov_reg32_reg32(rt, rs); add_reg32_imm32(rt,(int)dst->f.i.immediate); #endif } void genslti(void) { #ifdef INTERPRET_SLTI gencallinterp((unsigned int)cached_interpreter_table.SLTI, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); int rt = allocate_register_w((unsigned int *)dst->f.i.rt); long long imm = (long long)dst->f.i.immediate; cmp_reg32_imm32(rs2, (unsigned int)(imm >> 32)); jl_rj(17); jne_rj(8); // 2 cmp_reg32_imm32(rs1, (unsigned int)imm); // 6 jl_rj(7); // 2 mov_reg32_imm32(rt, 0); // 5 jmp_imm_short(5); // 2 mov_reg32_imm32(rt, 1); // 5 #endif } void gensltiu(void) { #ifdef INTERPRET_SLTIU gencallinterp((unsigned int)cached_interpreter_table.SLTIU, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); int rt = allocate_register_w((unsigned int *)dst->f.i.rt); long long imm = (long long)dst->f.i.immediate; cmp_reg32_imm32(rs2, (unsigned int)(imm >> 32)); jb_rj(17); jne_rj(8); // 2 cmp_reg32_imm32(rs1, (unsigned int)imm); // 6 jb_rj(7); // 2 mov_reg32_imm32(rt, 0); // 5 jmp_imm_short(5); // 2 mov_reg32_imm32(rt, 1); // 5 #endif } void genandi(void) { #ifdef INTERPRET_ANDI gencallinterp((unsigned int)cached_interpreter_table.ANDI, 0); #else int rs = allocate_register((unsigned int *)dst->f.i.rs); int rt = allocate_register_w((unsigned int *)dst->f.i.rt); mov_reg32_reg32(rt, rs); and_reg32_imm32(rt, (unsigned short)dst->f.i.immediate); #endif } void genori(void) { #ifdef INTERPRET_ORI gencallinterp((unsigned int)cached_interpreter_table.ORI, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); int rt1 = allocate_64_register1_w((unsigned int *)dst->f.i.rt); int rt2 = allocate_64_register2_w((unsigned int *)dst->f.i.rt); mov_reg32_reg32(rt1, rs1); mov_reg32_reg32(rt2, rs2); or_reg32_imm32(rt1, (unsigned short)dst->f.i.immediate); #endif } void genxori(void) { #ifdef INTERPRET_XORI gencallinterp((unsigned int)cached_interpreter_table.XORI, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); int rt1 = allocate_64_register1_w((unsigned int *)dst->f.i.rt); int rt2 = allocate_64_register2_w((unsigned int *)dst->f.i.rt); mov_reg32_reg32(rt1, rs1); mov_reg32_reg32(rt2, rs2); xor_reg32_imm32(rt1, (unsigned short)dst->f.i.immediate); #endif } void genlui(void) { #ifdef INTERPRET_LUI gencallinterp((unsigned int)cached_interpreter_table.LUI, 0); #else int rt = allocate_register_w((unsigned int *)dst->f.i.rt); mov_reg32_imm32(rt, (unsigned int)dst->f.i.immediate << 16); #endif } void gentestl(void) { cmp_m32_imm32((unsigned int *)(&branch_taken), 0); je_near_rj(0); jump_start_rel32(); gendelayslot(); mov_m32_imm32(&last_addr, dst->addr + (dst-1)->f.i.immediate*4); gencheck_interupt((unsigned int)(dst + (dst-1)->f.i.immediate)); jmp(dst->addr + (dst-1)->f.i.immediate*4); jump_end_rel32(); genupdate_count(dst->addr+4); mov_m32_imm32(&last_addr, dst->addr + 4); gencheck_interupt((unsigned int)(dst + 1)); jmp(dst->addr + 4); } void genbeql(void) { #ifdef INTERPRET_BEQL gencallinterp((unsigned int)cached_interpreter_table.BEQL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BEQL, 1); return; } genbeq_test(); free_all_registers(); gentestl(); #endif } void gentestl_out(void) { cmp_m32_imm32((unsigned int *)(&branch_taken), 0); je_near_rj(0); jump_start_rel32(); gendelayslot(); mov_m32_imm32(&last_addr, dst->addr + (dst-1)->f.i.immediate*4); gencheck_interupt_out(dst->addr + (dst-1)->f.i.immediate*4); mov_m32_imm32(&jump_to_address, dst->addr + (dst-1)->f.i.immediate*4); mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(dst+1)); mov_reg32_imm32(EAX, (unsigned int)jump_to_func); call_reg32(EAX); jump_end_rel32(); genupdate_count(dst->addr+4); mov_m32_imm32(&last_addr, dst->addr + 4); gencheck_interupt((unsigned int)(dst + 1)); jmp(dst->addr + 4); } void genbeql_out(void) { #ifdef INTERPRET_BEQL_OUT gencallinterp((unsigned int)cached_interpreter_table.BEQL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BEQL_OUT, 1); return; } genbeq_test(); free_all_registers(); gentestl_out(); #endif } void genbeql_idle(void) { #ifdef INTERPRET_BEQL_IDLE gencallinterp((unsigned int)cached_interpreter_table.BEQL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BEQL_IDLE, 1); return; } genbeq_test(); gentest_idle(); genbeql(); #endif } void genbnel(void) { #ifdef INTERPRET_BNEL gencallinterp((unsigned int)cached_interpreter_table.BNEL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BNEL, 1); return; } genbne_test(); free_all_registers(); gentestl(); #endif } void genbnel_out(void) { #ifdef INTERPRET_BNEL_OUT gencallinterp((unsigned int)cached_interpreter_table.BNEL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BNEL_OUT, 1); return; } genbne_test(); free_all_registers(); gentestl_out(); #endif } void genbnel_idle(void) { #ifdef INTERPRET_BNEL_IDLE gencallinterp((unsigned int)cached_interpreter_table.BNEL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BNEL_IDLE, 1); return; } genbne_test(); gentest_idle(); genbnel(); #endif } void genblezl(void) { #ifdef INTERPRET_BLEZL gencallinterp((unsigned int)cached_interpreter_table.BLEZL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLEZL, 1); return; } genblez_test(); free_all_registers(); gentestl(); #endif } void genblezl_out(void) { #ifdef INTERPRET_BLEZL_OUT gencallinterp((unsigned int)cached_interpreter_table.BLEZL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLEZL_OUT, 1); return; } genblez_test(); free_all_registers(); gentestl_out(); #endif } void genblezl_idle(void) { #ifdef INTERPRET_BLEZL_IDLE gencallinterp((unsigned int)cached_interpreter_table.BLEZL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLEZL_IDLE, 1); return; } genblez_test(); gentest_idle(); genblezl(); #endif } void genbgtzl(void) { #ifdef INTERPRET_BGTZL gencallinterp((unsigned int)cached_interpreter_table.BGTZL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGTZL, 1); return; } genbgtz_test(); free_all_registers(); gentestl(); #endif } void genbgtzl_out(void) { #ifdef INTERPRET_BGTZL_OUT gencallinterp((unsigned int)cached_interpreter_table.BGTZL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGTZL_OUT, 1); return; } genbgtz_test(); free_all_registers(); gentestl_out(); #endif } void genbgtzl_idle(void) { #ifdef INTERPRET_BGTZL_IDLE gencallinterp((unsigned int)cached_interpreter_table.BGTZL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGTZL_IDLE, 1); return; } genbgtz_test(); gentest_idle(); genbgtzl(); #endif } void gendaddi(void) { #ifdef INTERPRET_DADDI gencallinterp((unsigned int)cached_interpreter_table.DADDI, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); int rt1 = allocate_64_register1_w((unsigned int *)dst->f.i.rt); int rt2 = allocate_64_register2_w((unsigned int *)dst->f.i.rt); mov_reg32_reg32(rt1, rs1); mov_reg32_reg32(rt2, rs2); add_reg32_imm32(rt1, dst->f.i.immediate); adc_reg32_imm32(rt2, (int)dst->f.i.immediate>>31); #endif } void gendaddiu(void) { #ifdef INTERPRET_DADDIU gencallinterp((unsigned int)cached_interpreter_table.DADDIU, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.i.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); int rt1 = allocate_64_register1_w((unsigned int *)dst->f.i.rt); int rt2 = allocate_64_register2_w((unsigned int *)dst->f.i.rt); mov_reg32_reg32(rt1, rs1); mov_reg32_reg32(rt2, rs2); add_reg32_imm32(rt1, dst->f.i.immediate); adc_reg32_imm32(rt2, (int)dst->f.i.immediate>>31); #endif } void genldl(void) { gencallinterp((unsigned int)cached_interpreter_table.LDL, 0); } void genldr(void) { gencallinterp((unsigned int)cached_interpreter_table.LDR, 0); } void genlb(void) { #ifdef INTERPRET_LB gencallinterp((unsigned int)cached_interpreter_table.LB, 0); #else free_all_registers(); simplify_access(); mov_eax_memoffs32((unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)readmemb); cmp_reg32_imm32(EAX, (unsigned int)read_rdramb); } je_rj(47); mov_m32_imm32((unsigned int *)&PC, (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m32_imm32((unsigned int *)(&rdword), (unsigned int)dst->f.i.rt); // 10 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)readmemb); // 7 call_reg32(EBX); // 2 movsx_reg32_m8(EAX, (unsigned char *)dst->f.i.rt); // 7 jmp_imm_short(16); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 xor_reg8_imm8(BL, 3); // 3 movsx_reg32_8preg32pimm32(EAX, EBX, (unsigned int)g_rdram); // 7 set_register_state(EAX, (unsigned int*)dst->f.i.rt, 1); #endif } void genlh(void) { #ifdef INTERPRET_LH gencallinterp((unsigned int)cached_interpreter_table.LH, 0); #else free_all_registers(); simplify_access(); mov_eax_memoffs32((unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)readmemh); cmp_reg32_imm32(EAX, (unsigned int)read_rdramh); } je_rj(47); mov_m32_imm32((unsigned int *)&PC, (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m32_imm32((unsigned int *)(&rdword), (unsigned int)dst->f.i.rt); // 10 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)readmemh); // 7 call_reg32(EBX); // 2 movsx_reg32_m16(EAX, (unsigned short *)dst->f.i.rt); // 7 jmp_imm_short(16); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 xor_reg8_imm8(BL, 2); // 3 movsx_reg32_16preg32pimm32(EAX, EBX, (unsigned int)g_rdram); // 7 set_register_state(EAX, (unsigned int*)dst->f.i.rt, 1); #endif } void genlwl(void) { gencallinterp((unsigned int)cached_interpreter_table.LWL, 0); } void genlw(void) { #ifdef INTERPRET_LW gencallinterp((unsigned int)cached_interpreter_table.LW, 0); #else free_all_registers(); simplify_access(); mov_eax_memoffs32((unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)readmem); cmp_reg32_imm32(EAX, (unsigned int)read_rdram); } je_rj(45); mov_m32_imm32((unsigned int *)&PC, (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m32_imm32((unsigned int *)(&rdword), (unsigned int)dst->f.i.rt); // 10 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)readmem); // 7 call_reg32(EBX); // 2 mov_eax_memoffs32((unsigned int *)(dst->f.i.rt)); // 5 jmp_imm_short(12); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_reg32_preg32pimm32(EAX, EBX, (unsigned int)g_rdram); // 6 set_register_state(EAX, (unsigned int*)dst->f.i.rt, 1); #endif } void genlbu(void) { #ifdef INTERPRET_LBU gencallinterp((unsigned int)cached_interpreter_table.LBU, 0); #else free_all_registers(); simplify_access(); mov_eax_memoffs32((unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)readmemb); cmp_reg32_imm32(EAX, (unsigned int)read_rdramb); } je_rj(46); mov_m32_imm32((unsigned int *)&PC, (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m32_imm32((unsigned int *)(&rdword), (unsigned int)dst->f.i.rt); // 10 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)readmemb); // 7 call_reg32(EBX); // 2 mov_reg32_m32(EAX, (unsigned int *)dst->f.i.rt); // 6 jmp_imm_short(15); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 xor_reg8_imm8(BL, 3); // 3 mov_reg32_preg32pimm32(EAX, EBX, (unsigned int)g_rdram); // 6 and_eax_imm32(0xFF); set_register_state(EAX, (unsigned int*)dst->f.i.rt, 1); #endif } void genlhu(void) { #ifdef INTERPRET_LHU gencallinterp((unsigned int)cached_interpreter_table.LHU, 0); #else free_all_registers(); simplify_access(); mov_eax_memoffs32((unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)readmemh); cmp_reg32_imm32(EAX, (unsigned int)read_rdramh); } je_rj(46); mov_m32_imm32((unsigned int *)&PC, (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m32_imm32((unsigned int *)(&rdword), (unsigned int)dst->f.i.rt); // 10 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)readmemh); // 7 call_reg32(EBX); // 2 mov_reg32_m32(EAX, (unsigned int *)dst->f.i.rt); // 6 jmp_imm_short(15); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 xor_reg8_imm8(BL, 2); // 3 mov_reg32_preg32pimm32(EAX, EBX, (unsigned int)g_rdram); // 6 and_eax_imm32(0xFFFF); set_register_state(EAX, (unsigned int*)dst->f.i.rt, 1); #endif } void genlwr(void) { gencallinterp((unsigned int)cached_interpreter_table.LWR, 0); } void genlwu(void) { #ifdef INTERPRET_LWU gencallinterp((unsigned int)cached_interpreter_table.LWU, 0); #else free_all_registers(); simplify_access(); mov_eax_memoffs32((unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)readmem); cmp_reg32_imm32(EAX, (unsigned int)read_rdram); } je_rj(45); mov_m32_imm32((unsigned int *)(&PC), (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m32_imm32((unsigned int *)(&rdword), (unsigned int)dst->f.i.rt); // 10 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)readmem); // 7 call_reg32(EBX); // 2 mov_eax_memoffs32((unsigned int *)(dst->f.i.rt)); // 5 jmp_imm_short(12); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_reg32_preg32pimm32(EAX, EBX, (unsigned int)g_rdram); // 6 xor_reg32_reg32(EBX, EBX); set_64_register_state(EAX, EBX, (unsigned int*)dst->f.i.rt, 1); #endif } void gensb(void) { #ifdef INTERPRET_SB gencallinterp((unsigned int)cached_interpreter_table.SB, 0); #else free_all_registers(); simplify_access(); mov_reg8_m8(CL, (unsigned char *)dst->f.i.rt); mov_eax_memoffs32((unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)writememb); cmp_reg32_imm32(EAX, (unsigned int)write_rdramb); } je_rj(41); mov_m32_imm32((unsigned int *)(&PC), (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m8_reg8((unsigned char *)(&cpu_byte), CL); // 6 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)writememb); // 7 call_reg32(EBX); // 2 mov_eax_memoffs32((unsigned int *)(&address)); // 5 jmp_imm_short(17); // 2 mov_reg32_reg32(EAX, EBX); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 xor_reg8_imm8(BL, 3); // 3 mov_preg32pimm32_reg8(EBX, (unsigned int)g_rdram, CL); // 6 mov_reg32_reg32(EBX, EAX); shr_reg32_imm8(EBX, 12); cmp_preg32pimm32_imm8(EBX, (unsigned int)invalid_code, 0); jne_rj(54); mov_reg32_reg32(ECX, EBX); // 2 shl_reg32_imm8(EBX, 2); // 3 mov_reg32_preg32pimm32(EBX, EBX, (unsigned int)blocks); // 6 mov_reg32_preg32pimm32(EBX, EBX, (int)&actual->block - (int)actual); // 6 and_eax_imm32(0xFFF); // 5 shr_reg32_imm8(EAX, 2); // 3 mov_reg32_imm32(EDX, sizeof(precomp_instr)); // 5 mul_reg32(EDX); // 2 mov_reg32_preg32preg32pimm32(EAX, EAX, EBX, (int)&dst->ops - (int)dst); // 7 cmp_reg32_imm32(EAX, (unsigned int)cached_interpreter_table.NOTCOMPILED); // 6 je_rj(7); // 2 mov_preg32pimm32_imm8(ECX, (unsigned int)invalid_code, 1); // 7 #endif } void gensh(void) { #ifdef INTERPRET_SH gencallinterp((unsigned int)cached_interpreter_table.SH, 0); #else free_all_registers(); simplify_access(); mov_reg16_m16(CX, (unsigned short *)dst->f.i.rt); mov_eax_memoffs32((unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)writememh); cmp_reg32_imm32(EAX, (unsigned int)write_rdramh); } je_rj(42); mov_m32_imm32((unsigned int *)(&PC), (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m16_reg16((unsigned short *)(&cpu_hword), CX); // 7 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)writememh); // 7 call_reg32(EBX); // 2 mov_eax_memoffs32((unsigned int *)(&address)); // 5 jmp_imm_short(18); // 2 mov_reg32_reg32(EAX, EBX); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 xor_reg8_imm8(BL, 2); // 3 mov_preg32pimm32_reg16(EBX, (unsigned int)g_rdram, CX); // 7 mov_reg32_reg32(EBX, EAX); shr_reg32_imm8(EBX, 12); cmp_preg32pimm32_imm8(EBX, (unsigned int)invalid_code, 0); jne_rj(54); mov_reg32_reg32(ECX, EBX); // 2 shl_reg32_imm8(EBX, 2); // 3 mov_reg32_preg32pimm32(EBX, EBX, (unsigned int)blocks); // 6 mov_reg32_preg32pimm32(EBX, EBX, (int)&actual->block - (int)actual); // 6 and_eax_imm32(0xFFF); // 5 shr_reg32_imm8(EAX, 2); // 3 mov_reg32_imm32(EDX, sizeof(precomp_instr)); // 5 mul_reg32(EDX); // 2 mov_reg32_preg32preg32pimm32(EAX, EAX, EBX, (int)&dst->ops - (int)dst); // 7 cmp_reg32_imm32(EAX, (unsigned int)cached_interpreter_table.NOTCOMPILED); // 6 je_rj(7); // 2 mov_preg32pimm32_imm8(ECX, (unsigned int)invalid_code, 1); // 7 #endif } void genswl(void) { gencallinterp((unsigned int)cached_interpreter_table.SWL, 0); } void gensw(void) { #ifdef INTERPRET_SW gencallinterp((unsigned int)cached_interpreter_table.SW, 0); #else free_all_registers(); simplify_access(); mov_reg32_m32(ECX, (unsigned int *)dst->f.i.rt); mov_eax_memoffs32((unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)writemem); cmp_reg32_imm32(EAX, (unsigned int)write_rdram); } je_rj(41); mov_m32_imm32((unsigned int *)(&PC), (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m32_reg32((unsigned int *)(&cpu_word), ECX); // 6 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)writemem); // 7 call_reg32(EBX); // 2 mov_eax_memoffs32((unsigned int *)(&address)); // 5 jmp_imm_short(14); // 2 mov_reg32_reg32(EAX, EBX); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_preg32pimm32_reg32(EBX, (unsigned int)g_rdram, ECX); // 6 mov_reg32_reg32(EBX, EAX); shr_reg32_imm8(EBX, 12); cmp_preg32pimm32_imm8(EBX, (unsigned int)invalid_code, 0); jne_rj(54); mov_reg32_reg32(ECX, EBX); // 2 shl_reg32_imm8(EBX, 2); // 3 mov_reg32_preg32pimm32(EBX, EBX, (unsigned int)blocks); // 6 mov_reg32_preg32pimm32(EBX, EBX, (int)&actual->block - (int)actual); // 6 and_eax_imm32(0xFFF); // 5 shr_reg32_imm8(EAX, 2); // 3 mov_reg32_imm32(EDX, sizeof(precomp_instr)); // 5 mul_reg32(EDX); // 2 mov_reg32_preg32preg32pimm32(EAX, EAX, EBX, (int)&dst->ops - (int)dst); // 7 cmp_reg32_imm32(EAX, (unsigned int)cached_interpreter_table.NOTCOMPILED); // 6 je_rj(7); // 2 mov_preg32pimm32_imm8(ECX, (unsigned int)invalid_code, 1); // 7 #endif } void gensdl(void) { gencallinterp((unsigned int)cached_interpreter_table.SDL, 0); } void gensdr(void) { gencallinterp((unsigned int)cached_interpreter_table.SDR, 0); } void genswr(void) { gencallinterp((unsigned int)cached_interpreter_table.SWR, 0); } void gencheck_cop1_unusable(void) { free_all_registers(); simplify_access(); test_m32_imm32((unsigned int*)&g_cp0_regs[CP0_STATUS_REG], 0x20000000); jne_rj(0); jump_start_rel8(); gencallinterp((unsigned int)check_cop1_unusable, 0); jump_end_rel8(); } void genlwc1(void) { #ifdef INTERPRET_LWC1 gencallinterp((unsigned int)cached_interpreter_table.LWC1, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®[dst->f.lf.base])); add_eax_imm32((int)dst->f.lf.offset); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)readmem); cmp_reg32_imm32(EAX, (unsigned int)read_rdram); } je_rj(42); mov_m32_imm32((unsigned int *)(&PC), (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_reg32_m32(EDX, (unsigned int*)(®_cop1_simple[dst->f.lf.ft])); // 6 mov_m32_reg32((unsigned int *)(&rdword), EDX); // 6 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)readmem); // 7 call_reg32(EBX); // 2 jmp_imm_short(20); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_reg32_preg32pimm32(EAX, EBX, (unsigned int)g_rdram); // 6 mov_reg32_m32(EBX, (unsigned int*)(®_cop1_simple[dst->f.lf.ft])); // 6 mov_preg32_reg32(EBX, EAX); // 2 #endif } void genldc1(void) { #ifdef INTERPRET_LDC1 gencallinterp((unsigned int)cached_interpreter_table.LDC1, 0); #else gencheck_cop1_unusable(); mov_eax_memoffs32((unsigned int *)(®[dst->f.lf.base])); add_eax_imm32((int)dst->f.lf.offset); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)readmemd); cmp_reg32_imm32(EAX, (unsigned int)read_rdramd); } je_rj(42); mov_m32_imm32((unsigned int *)(&PC), (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_reg32_m32(EDX, (unsigned int*)(®_cop1_double[dst->f.lf.ft])); // 6 mov_m32_reg32((unsigned int *)(&rdword), EDX); // 6 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)readmemd); // 7 call_reg32(EBX); // 2 jmp_imm_short(32); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_reg32_preg32pimm32(EAX, EBX, ((unsigned int)g_rdram)+4); // 6 mov_reg32_preg32pimm32(ECX, EBX, ((unsigned int)g_rdram)); // 6 mov_reg32_m32(EBX, (unsigned int*)(®_cop1_double[dst->f.lf.ft])); // 6 mov_preg32_reg32(EBX, EAX); // 2 mov_preg32pimm32_reg32(EBX, 4, ECX); // 6 #endif } void gencache(void) { } void genld(void) { #ifdef INTERPRET_LD gencallinterp((unsigned int)cached_interpreter_table.LD, 0); #else free_all_registers(); simplify_access(); mov_eax_memoffs32((unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)readmemd); cmp_reg32_imm32(EAX, (unsigned int)read_rdramd); } je_rj(51); mov_m32_imm32((unsigned int *)(&PC), (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m32_imm32((unsigned int *)(&rdword), (unsigned int)dst->f.i.rt); // 10 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)readmemd); // 7 call_reg32(EBX); // 2 mov_eax_memoffs32((unsigned int *)(dst->f.i.rt)); // 5 mov_reg32_m32(ECX, (unsigned int *)(dst->f.i.rt)+1); // 6 jmp_imm_short(18); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_reg32_preg32pimm32(EAX, EBX, ((unsigned int)g_rdram)+4); // 6 mov_reg32_preg32pimm32(ECX, EBX, ((unsigned int)g_rdram)); // 6 set_64_register_state(EAX, ECX, (unsigned int*)dst->f.i.rt, 1); #endif } void genswc1(void) { #ifdef INTERPRET_SWC1 gencallinterp((unsigned int)cached_interpreter_table.SWC1, 0); #else gencheck_cop1_unusable(); mov_reg32_m32(EDX, (unsigned int*)(®_cop1_simple[dst->f.lf.ft])); mov_reg32_preg32(ECX, EDX); mov_eax_memoffs32((unsigned int *)(®[dst->f.lf.base])); add_eax_imm32((int)dst->f.lf.offset); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)writemem); cmp_reg32_imm32(EAX, (unsigned int)write_rdram); } je_rj(41); mov_m32_imm32((unsigned int *)(&PC), (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m32_reg32((unsigned int *)(&cpu_word), ECX); // 6 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)writemem); // 7 call_reg32(EBX); // 2 mov_eax_memoffs32((unsigned int *)(&address)); // 5 jmp_imm_short(14); // 2 mov_reg32_reg32(EAX, EBX); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_preg32pimm32_reg32(EBX, (unsigned int)g_rdram, ECX); // 6 mov_reg32_reg32(EBX, EAX); shr_reg32_imm8(EBX, 12); cmp_preg32pimm32_imm8(EBX, (unsigned int)invalid_code, 0); jne_rj(54); mov_reg32_reg32(ECX, EBX); // 2 shl_reg32_imm8(EBX, 2); // 3 mov_reg32_preg32pimm32(EBX, EBX, (unsigned int)blocks); // 6 mov_reg32_preg32pimm32(EBX, EBX, (int)&actual->block - (int)actual); // 6 and_eax_imm32(0xFFF); // 5 shr_reg32_imm8(EAX, 2); // 3 mov_reg32_imm32(EDX, sizeof(precomp_instr)); // 5 mul_reg32(EDX); // 2 mov_reg32_preg32preg32pimm32(EAX, EAX, EBX, (int)&dst->ops - (int)dst); // 7 cmp_reg32_imm32(EAX, (unsigned int)cached_interpreter_table.NOTCOMPILED); // 6 je_rj(7); // 2 mov_preg32pimm32_imm8(ECX, (unsigned int)invalid_code, 1); // 7 #endif } void gensdc1(void) { #ifdef INTERPRET_SDC1 gencallinterp((unsigned int)cached_interpreter_table.SDC1, 0); #else gencheck_cop1_unusable(); mov_reg32_m32(ESI, (unsigned int*)(®_cop1_double[dst->f.lf.ft])); mov_reg32_preg32(ECX, ESI); mov_reg32_preg32pimm32(EDX, ESI, 4); mov_eax_memoffs32((unsigned int *)(®[dst->f.lf.base])); add_eax_imm32((int)dst->f.lf.offset); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)writememd); cmp_reg32_imm32(EAX, (unsigned int)write_rdramd); } je_rj(47); mov_m32_imm32((unsigned int *)(&PC), (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m32_reg32((unsigned int *)(&cpu_dword), ECX); // 6 mov_m32_reg32((unsigned int *)(&cpu_dword)+1, EDX); // 6 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)writememd); // 7 call_reg32(EBX); // 2 mov_eax_memoffs32((unsigned int *)(&address)); // 5 jmp_imm_short(20); // 2 mov_reg32_reg32(EAX, EBX); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_preg32pimm32_reg32(EBX, ((unsigned int)g_rdram)+4, ECX); // 6 mov_preg32pimm32_reg32(EBX, ((unsigned int)g_rdram)+0, EDX); // 6 mov_reg32_reg32(EBX, EAX); shr_reg32_imm8(EBX, 12); cmp_preg32pimm32_imm8(EBX, (unsigned int)invalid_code, 0); jne_rj(54); mov_reg32_reg32(ECX, EBX); // 2 shl_reg32_imm8(EBX, 2); // 3 mov_reg32_preg32pimm32(EBX, EBX, (unsigned int)blocks); // 6 mov_reg32_preg32pimm32(EBX, EBX, (int)&actual->block - (int)actual); // 6 and_eax_imm32(0xFFF); // 5 shr_reg32_imm8(EAX, 2); // 3 mov_reg32_imm32(EDX, sizeof(precomp_instr)); // 5 mul_reg32(EDX); // 2 mov_reg32_preg32preg32pimm32(EAX, EAX, EBX, (int)&dst->ops - (int)dst); // 7 cmp_reg32_imm32(EAX, (unsigned int)cached_interpreter_table.NOTCOMPILED); // 6 je_rj(7); // 2 mov_preg32pimm32_imm8(ECX, (unsigned int)invalid_code, 1); // 7 #endif } void gensd(void) { #ifdef INTERPRET_SD gencallinterp((unsigned int)cached_interpreter_table.SD, 0); #else free_all_registers(); simplify_access(); mov_reg32_m32(ECX, (unsigned int *)dst->f.i.rt); mov_reg32_m32(EDX, ((unsigned int *)dst->f.i.rt)+1); mov_eax_memoffs32((unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { shr_reg32_imm8(EAX, 16); mov_reg32_preg32x4pimm32(EAX, EAX, (unsigned int)writememd); cmp_reg32_imm32(EAX, (unsigned int)write_rdramd); } je_rj(47); mov_m32_imm32((unsigned int *)(&PC), (unsigned int)(dst+1)); // 10 mov_m32_reg32((unsigned int *)(&address), EBX); // 6 mov_m32_reg32((unsigned int *)(&cpu_dword), ECX); // 6 mov_m32_reg32((unsigned int *)(&cpu_dword)+1, EDX); // 6 shr_reg32_imm8(EBX, 16); // 3 mov_reg32_preg32x4pimm32(EBX, EBX, (unsigned int)writememd); // 7 call_reg32(EBX); // 2 mov_eax_memoffs32((unsigned int *)(&address)); // 5 jmp_imm_short(20); // 2 mov_reg32_reg32(EAX, EBX); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_preg32pimm32_reg32(EBX, ((unsigned int)g_rdram)+4, ECX); // 6 mov_preg32pimm32_reg32(EBX, ((unsigned int)g_rdram)+0, EDX); // 6 mov_reg32_reg32(EBX, EAX); shr_reg32_imm8(EBX, 12); cmp_preg32pimm32_imm8(EBX, (unsigned int)invalid_code, 0); jne_rj(54); mov_reg32_reg32(ECX, EBX); // 2 shl_reg32_imm8(EBX, 2); // 3 mov_reg32_preg32pimm32(EBX, EBX, (unsigned int)blocks); // 6 mov_reg32_preg32pimm32(EBX, EBX, (int)&actual->block - (int)actual); // 6 and_eax_imm32(0xFFF); // 5 shr_reg32_imm8(EAX, 2); // 3 mov_reg32_imm32(EDX, sizeof(precomp_instr)); // 5 mul_reg32(EDX); // 2 mov_reg32_preg32preg32pimm32(EAX, EAX, EBX, (int)&dst->ops - (int)dst); // 7 cmp_reg32_imm32(EAX, (unsigned int)cached_interpreter_table.NOTCOMPILED); // 6 je_rj(7); // 2 mov_preg32pimm32_imm8(ECX, (unsigned int)invalid_code, 1); // 7 #endif } void genll(void) { gencallinterp((unsigned int)cached_interpreter_table.LL, 0); } void gensc(void) { gencallinterp((unsigned int)cached_interpreter_table.SC, 0); } mupen64plus-core-src-2.5/src/r4300/x86/gregimm.c000066400000000000000000000345471251723631200210730ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gregimm.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "interpret.h" #include "memory/memory.h" #include "r4300/cached_interp.h" #include "r4300/macros.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" static void genbltz_test(void) { int rs_64bit = is64((unsigned int *)dst->f.i.rs); if (!rs_64bit) { int rs = allocate_register((unsigned int *)dst->f.i.rs); cmp_reg32_imm32(rs, 0); jge_rj(12); mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } else if (rs_64bit == -1) { cmp_m32_imm32(((unsigned int *)dst->f.i.rs)+1, 0); jge_rj(12); mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } else { int rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); cmp_reg32_imm32(rs2, 0); jge_rj(12); mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } } void genbltz(void) { #ifdef INTERPRET_BLTZ gencallinterp((unsigned int)cached_interpreter_table.BLTZ, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLTZ, 1); return; } genbltz_test(); gendelayslot(); gentest(); #endif } void genbltz_out(void) { #ifdef INTERPRET_BLTZ_OUT gencallinterp((unsigned int)cached_interpreter_table.BLTZ_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLTZ_OUT, 1); return; } genbltz_test(); gendelayslot(); gentest_out(); #endif } void genbltz_idle(void) { #ifdef INTERPRET_BLTZ_IDLE gencallinterp((unsigned int)cached_interpreter_table.BLTZ_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLTZ_IDLE, 1); return; } genbltz_test(); gentest_idle(); genbltz(); #endif } static void genbgez_test(void) { int rs_64bit = is64((unsigned int *)dst->f.i.rs); if (!rs_64bit) { int rs = allocate_register((unsigned int *)dst->f.i.rs); cmp_reg32_imm32(rs, 0); jl_rj(12); mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } else if (rs_64bit == -1) { cmp_m32_imm32(((unsigned int *)dst->f.i.rs)+1, 0); jl_rj(12); mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } else { int rs2 = allocate_64_register2((unsigned int *)dst->f.i.rs); cmp_reg32_imm32(rs2, 0); jl_rj(12); mov_m32_imm32((unsigned int *)(&branch_taken), 1); // 10 jmp_imm_short(10); // 2 mov_m32_imm32((unsigned int *)(&branch_taken), 0); // 10 } } void genbgez(void) { #ifdef INTERPRET_BGEZ gencallinterp((unsigned int)cached_interpreter_table.BGEZ, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGEZ, 1); return; } genbgez_test(); gendelayslot(); gentest(); #endif } void genbgez_out(void) { #ifdef INTERPRET_BGEZ_OUT gencallinterp((unsigned int)cached_interpreter_table.BGEZ_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGEZ_OUT, 1); return; } genbgez_test(); gendelayslot(); gentest_out(); #endif } void genbgez_idle(void) { #ifdef INTERPRET_BGEZ_IDLE gencallinterp((unsigned int)cached_interpreter_table.BGEZ_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGEZ_IDLE, 1); return; } genbgez_test(); gentest_idle(); genbgez(); #endif } void genbltzl(void) { #ifdef INTERPRET_BLTZL gencallinterp((unsigned int)cached_interpreter_table.BLTZL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLTZL, 1); return; } genbltz_test(); free_all_registers(); gentestl(); #endif } void genbltzl_out(void) { #ifdef INTERPRET_BLTZL_OUT gencallinterp((unsigned int)cached_interpreter_table.BLTZL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLTZL_OUT, 1); return; } genbltz_test(); free_all_registers(); gentestl_out(); #endif } void genbltzl_idle(void) { #ifdef INTERPRET_BLTZL_IDLE gencallinterp((unsigned int)cached_interpreter_table.BLTZL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLTZL_IDLE, 1); return; } genbltz_test(); gentest_idle(); genbltzl(); #endif } void genbgezl(void) { #ifdef INTERPRET_BGEZL gencallinterp((unsigned int)cached_interpreter_table.BGEZL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGEZL, 1); return; } genbgez_test(); free_all_registers(); gentestl(); #endif } void genbgezl_out(void) { #ifdef INTERPRET_BGEZL_OUT gencallinterp((unsigned int)cached_interpreter_table.BGEZL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGEZL_OUT, 1); return; } genbgez_test(); free_all_registers(); gentestl_out(); #endif } void genbgezl_idle(void) { #ifdef INTERPRET_BGEZL_IDLE gencallinterp((unsigned int)cached_interpreter_table.BGEZL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGEZL_IDLE, 1); return; } genbgez_test(); gentest_idle(); genbgezl(); #endif } static void genbranchlink(void) { int r31_64bit = is64((unsigned int*)®[31]); if (!r31_64bit) { int r31 = allocate_register_w((unsigned int *)®[31]); mov_reg32_imm32(r31, dst->addr+8); } else if (r31_64bit == -1) { mov_m32_imm32((unsigned int *)®[31], dst->addr + 8); if (dst->addr & 0x80000000) mov_m32_imm32(((unsigned int *)®[31])+1, 0xFFFFFFFF); else mov_m32_imm32(((unsigned int *)®[31])+1, 0); } else { int r311 = allocate_64_register1_w((unsigned int *)®[31]); int r312 = allocate_64_register2_w((unsigned int *)®[31]); mov_reg32_imm32(r311, dst->addr+8); if (dst->addr & 0x80000000) mov_reg32_imm32(r312, 0xFFFFFFFF); else mov_reg32_imm32(r312, 0); } } void genbltzal(void) { #ifdef INTERPRET_BLTZAL gencallinterp((unsigned int)cached_interpreter_table.BLTZAL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLTZAL, 1); return; } genbltz_test(); genbranchlink(); gendelayslot(); gentest(); #endif } void genbltzal_out(void) { #ifdef INTERPRET_BLTZAL_OUT gencallinterp((unsigned int)cached_interpreter_table.BLTZAL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLTZAL_OUT, 1); return; } genbltz_test(); genbranchlink(); gendelayslot(); gentest_out(); #endif } void genbltzal_idle(void) { #ifdef INTERPRET_BLTZAL_IDLE gencallinterp((unsigned int)cached_interpreter_table.BLTZAL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLTZAL_IDLE, 1); return; } genbltz_test(); genbranchlink(); gentest_idle(); genbltzal(); #endif } void genbgezal(void) { #ifdef INTERPRET_BGEZAL gencallinterp((unsigned int)cached_interpreter_table.BGEZAL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGEZAL, 1); return; } genbgez_test(); genbranchlink(); gendelayslot(); gentest(); #endif } void genbgezal_out(void) { #ifdef INTERPRET_BGEZAL_OUT gencallinterp((unsigned int)cached_interpreter_table.BGEZAL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGEZAL_OUT, 1); return; } genbgez_test(); genbranchlink(); gendelayslot(); gentest_out(); #endif } void genbgezal_idle(void) { #ifdef INTERPRET_BGEZAL_IDLE gencallinterp((unsigned int)cached_interpreter_table.BGEZAL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGEZAL_IDLE, 1); return; } genbgez_test(); genbranchlink(); gentest_idle(); genbgezal(); #endif } void genbltzall(void) { #ifdef INTERPRET_BLTZALL gencallinterp((unsigned int)cached_interpreter_table.BLTZALL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLTZALL, 1); return; } genbltz_test(); genbranchlink(); free_all_registers(); gentestl(); #endif } void genbltzall_out(void) { #ifdef INTERPRET_BLTZALL_OUT gencallinterp((unsigned int)cached_interpreter_table.BLTZALL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLTZALL_OUT, 1); return; } genbltz_test(); genbranchlink(); free_all_registers(); gentestl_out(); #endif } void genbltzall_idle(void) { #ifdef INTERPRET_BLTZALL_IDLE gencallinterp((unsigned int)cached_interpreter_table.BLTZALL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BLTZALL_IDLE, 1); return; } genbltz_test(); genbranchlink(); gentest_idle(); genbltzall(); #endif } void genbgezall(void) { #ifdef INTERPRET_BGEZALL gencallinterp((unsigned int)cached_interpreter_table.BGEZALL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGEZALL, 1); return; } genbgez_test(); genbranchlink(); free_all_registers(); gentestl(); #endif } void genbgezall_out(void) { #ifdef INTERPRET_BGEZALL_OUT gencallinterp((unsigned int)cached_interpreter_table.BGEZALL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGEZALL_OUT, 1); return; } genbgez_test(); genbranchlink(); free_all_registers(); gentestl_out(); #endif } void genbgezall_idle(void) { #ifdef INTERPRET_BGEZALL_IDLE gencallinterp((unsigned int)cached_interpreter_table.BGEZALL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.BGEZALL_IDLE, 1); return; } genbgez_test(); genbranchlink(); gentest_idle(); genbgezall(); #endif } mupen64plus-core-src-2.5/src/r4300/x86/gspecial.c000066400000000000000000000773621251723631200212350ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gspecial.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "interpret.h" #include "r4300/cached_interp.h" #include "r4300/cp0_private.h" #include "r4300/exception.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" void gensll(void) { #ifdef INTERPRET_SLL gencallinterp((unsigned int)cached_interpreter_table.SLL, 0); #else int rt = allocate_register((unsigned int *)dst->f.r.rt); int rd = allocate_register_w((unsigned int *)dst->f.r.rd); mov_reg32_reg32(rd, rt); shl_reg32_imm8(rd, dst->f.r.sa); #endif } void gensrl(void) { #ifdef INTERPRET_SRL gencallinterp((unsigned int)cached_interpreter_table.SRL, 0); #else int rt = allocate_register((unsigned int *)dst->f.r.rt); int rd = allocate_register_w((unsigned int *)dst->f.r.rd); mov_reg32_reg32(rd, rt); shr_reg32_imm8(rd, dst->f.r.sa); #endif } void gensra(void) { #ifdef INTERPRET_SRA gencallinterp((unsigned int)cached_interpreter_table.SRA, 0); #else int rt = allocate_register((unsigned int *)dst->f.r.rt); int rd = allocate_register_w((unsigned int *)dst->f.r.rd); mov_reg32_reg32(rd, rt); sar_reg32_imm8(rd, dst->f.r.sa); #endif } void gensllv(void) { #ifdef INTERPRET_SLLV gencallinterp((unsigned int)cached_interpreter_table.SLLV, 0); #else int rt, rd; allocate_register_manually(ECX, (unsigned int *)dst->f.r.rs); rt = allocate_register((unsigned int *)dst->f.r.rt); rd = allocate_register_w((unsigned int *)dst->f.r.rd); if (rd != ECX) { mov_reg32_reg32(rd, rt); shl_reg32_cl(rd); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rt); shl_reg32_cl(temp); mov_reg32_reg32(rd, temp); } #endif } void gensrlv(void) { #ifdef INTERPRET_SRLV gencallinterp((unsigned int)cached_interpreter_table.SRLV, 0); #else int rt, rd; allocate_register_manually(ECX, (unsigned int *)dst->f.r.rs); rt = allocate_register((unsigned int *)dst->f.r.rt); rd = allocate_register_w((unsigned int *)dst->f.r.rd); if (rd != ECX) { mov_reg32_reg32(rd, rt); shr_reg32_cl(rd); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rt); shr_reg32_cl(temp); mov_reg32_reg32(rd, temp); } #endif } void gensrav(void) { #ifdef INTERPRET_SRAV gencallinterp((unsigned int)cached_interpreter_table.SRAV, 0); #else int rt, rd; allocate_register_manually(ECX, (unsigned int *)dst->f.r.rs); rt = allocate_register((unsigned int *)dst->f.r.rt); rd = allocate_register_w((unsigned int *)dst->f.r.rd); if (rd != ECX) { mov_reg32_reg32(rd, rt); sar_reg32_cl(rd); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rt); sar_reg32_cl(temp); mov_reg32_reg32(rd, temp); } #endif } void genjr(void) { #ifdef INTERPRET_JR gencallinterp((unsigned int)cached_interpreter_table.JR, 1); #else static unsigned int precomp_instr_size = sizeof(precomp_instr); unsigned int diff = (unsigned int)(&dst->local_addr) - (unsigned int)(dst); unsigned int diff_need = (unsigned int)(&dst->reg_cache_infos.need_map) - (unsigned int)(dst); unsigned int diff_wrap = (unsigned int)(&dst->reg_cache_infos.jump_wrapper) - (unsigned int)(dst); if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.JR, 1); return; } free_all_registers(); simplify_access(); mov_eax_memoffs32((unsigned int *)dst->f.i.rs); mov_memoffs32_eax((unsigned int *)&local_rs); gendelayslot(); mov_eax_memoffs32((unsigned int *)&local_rs); mov_memoffs32_eax((unsigned int *)&last_addr); gencheck_interupt_reg(); mov_eax_memoffs32((unsigned int *)&local_rs); mov_reg32_reg32(EBX, EAX); and_eax_imm32(0xFFFFF000); cmp_eax_imm32(dst_block->start & 0xFFFFF000); je_near_rj(0); jump_start_rel32(); mov_m32_reg32(&jump_to_address, EBX); mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(dst+1)); mov_reg32_imm32(EAX, (unsigned int)jump_to_func); call_reg32(EAX); jump_end_rel32(); mov_reg32_reg32(EAX, EBX); sub_eax_imm32(dst_block->start); shr_reg32_imm8(EAX, 2); mul_m32((unsigned int *)(&precomp_instr_size)); mov_reg32_preg32pimm32(EBX, EAX, (unsigned int)(dst_block->block)+diff_need); cmp_reg32_imm32(EBX, 1); jne_rj(7); add_eax_imm32((unsigned int)(dst_block->block)+diff_wrap); // 5 jmp_reg32(EAX); // 2 mov_reg32_preg32pimm32(EAX, EAX, (unsigned int)(dst_block->block)+diff); add_reg32_m32(EAX, (unsigned int *)(&dst_block->code)); jmp_reg32(EAX); #endif } void genjalr(void) { #ifdef INTERPRET_JALR gencallinterp((unsigned int)cached_interpreter_table.JALR, 0); #else static unsigned int precomp_instr_size = sizeof(precomp_instr); unsigned int diff = (unsigned int)(&dst->local_addr) - (unsigned int)(dst); unsigned int diff_need = (unsigned int)(&dst->reg_cache_infos.need_map) - (unsigned int)(dst); unsigned int diff_wrap = (unsigned int)(&dst->reg_cache_infos.jump_wrapper) - (unsigned int)(dst); if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned int)cached_interpreter_table.JALR, 1); return; } free_all_registers(); simplify_access(); mov_eax_memoffs32((unsigned int *)dst->f.r.rs); mov_memoffs32_eax((unsigned int *)&local_rs); gendelayslot(); mov_m32_imm32((unsigned int *)(dst-1)->f.r.rd, dst->addr+4); if ((dst->addr+4) & 0x80000000) mov_m32_imm32(((unsigned int *)(dst-1)->f.r.rd)+1, 0xFFFFFFFF); else mov_m32_imm32(((unsigned int *)(dst-1)->f.r.rd)+1, 0); mov_eax_memoffs32((unsigned int *)&local_rs); mov_memoffs32_eax((unsigned int *)&last_addr); gencheck_interupt_reg(); mov_eax_memoffs32((unsigned int *)&local_rs); mov_reg32_reg32(EBX, EAX); and_eax_imm32(0xFFFFF000); cmp_eax_imm32(dst_block->start & 0xFFFFF000); je_near_rj(0); jump_start_rel32(); mov_m32_reg32(&jump_to_address, EBX); mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(dst+1)); mov_reg32_imm32(EAX, (unsigned int)jump_to_func); call_reg32(EAX); jump_end_rel32(); mov_reg32_reg32(EAX, EBX); sub_eax_imm32(dst_block->start); shr_reg32_imm8(EAX, 2); mul_m32((unsigned int *)(&precomp_instr_size)); mov_reg32_preg32pimm32(EBX, EAX, (unsigned int)(dst_block->block)+diff_need); cmp_reg32_imm32(EBX, 1); jne_rj(7); add_eax_imm32((unsigned int)(dst_block->block)+diff_wrap); // 5 jmp_reg32(EAX); // 2 mov_reg32_preg32pimm32(EAX, EAX, (unsigned int)(dst_block->block)+diff); add_reg32_m32(EAX, (unsigned int *)(&dst_block->code)); jmp_reg32(EAX); #endif } void gensyscall(void) { #ifdef INTERPRET_SYSCALL gencallinterp((unsigned int)cached_interpreter_table.SYSCALL, 0); #else free_all_registers(); simplify_access(); mov_m32_imm32(&g_cp0_regs[CP0_CAUSE_REG], 8 << 2); gencallinterp((unsigned int)exception_general, 0); #endif } void gensync(void) { } void genmfhi(void) { #ifdef INTERPRET_MFHI gencallinterp((unsigned int)cached_interpreter_table.MFHI, 0); #else int rd1 = allocate_64_register1_w((unsigned int*)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int*)dst->f.r.rd); int hi1 = allocate_64_register1((unsigned int*)&hi); int hi2 = allocate_64_register2((unsigned int*)&hi); mov_reg32_reg32(rd1, hi1); mov_reg32_reg32(rd2, hi2); #endif } void genmthi(void) { #ifdef INTERPRET_MTHI gencallinterp((unsigned int)cached_interpreter_table.MTHI, 0); #else int hi1 = allocate_64_register1_w((unsigned int*)&hi); int hi2 = allocate_64_register2_w((unsigned int*)&hi); int rs1 = allocate_64_register1((unsigned int*)dst->f.r.rs); int rs2 = allocate_64_register2((unsigned int*)dst->f.r.rs); mov_reg32_reg32(hi1, rs1); mov_reg32_reg32(hi2, rs2); #endif } void genmflo(void) { #ifdef INTERPRET_MFLO gencallinterp((unsigned int)cached_interpreter_table.MFLO, 0); #else int rd1 = allocate_64_register1_w((unsigned int*)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int*)dst->f.r.rd); int lo1 = allocate_64_register1((unsigned int*)&lo); int lo2 = allocate_64_register2((unsigned int*)&lo); mov_reg32_reg32(rd1, lo1); mov_reg32_reg32(rd2, lo2); #endif } void genmtlo(void) { #ifdef INTERPRET_MTLO gencallinterp((unsigned int)cached_interpreter_table.MTLO, 0); #else int lo1 = allocate_64_register1_w((unsigned int*)&lo); int lo2 = allocate_64_register2_w((unsigned int*)&lo); int rs1 = allocate_64_register1((unsigned int*)dst->f.r.rs); int rs2 = allocate_64_register2((unsigned int*)dst->f.r.rs); mov_reg32_reg32(lo1, rs1); mov_reg32_reg32(lo2, rs2); #endif } void gendsllv(void) { #ifdef INTERPRET_DSLLV gencallinterp((unsigned int)cached_interpreter_table.DSLLV, 0); #else int rt1, rt2, rd1, rd2; allocate_register_manually(ECX, (unsigned int *)dst->f.r.rs); rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); if (rd1 != ECX && rd2 != ECX) { mov_reg32_reg32(rd1, rt1); mov_reg32_reg32(rd2, rt2); shld_reg32_reg32_cl(rd2,rd1); shl_reg32_cl(rd1); test_reg32_imm32(ECX, 0x20); je_rj(4); mov_reg32_reg32(rd2, rd1); // 2 xor_reg32_reg32(rd1, rd1); // 2 } else { int temp1, temp2; force_32(ECX); temp1 = lru_register(); temp2 = lru_register_exc1(temp1); free_register(temp1); free_register(temp2); mov_reg32_reg32(temp1, rt1); mov_reg32_reg32(temp2, rt2); shld_reg32_reg32_cl(temp2, temp1); shl_reg32_cl(temp1); test_reg32_imm32(ECX, 0x20); je_rj(4); mov_reg32_reg32(temp2, temp1); // 2 xor_reg32_reg32(temp1, temp1); // 2 mov_reg32_reg32(rd1, temp1); mov_reg32_reg32(rd2, temp2); } #endif } void gendsrlv(void) { #ifdef INTERPRET_DSRLV gencallinterp((unsigned int)cached_interpreter_table.DSRLV, 0); #else int rt1, rt2, rd1, rd2; allocate_register_manually(ECX, (unsigned int *)dst->f.r.rs); rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); if (rd1 != ECX && rd2 != ECX) { mov_reg32_reg32(rd1, rt1); mov_reg32_reg32(rd2, rt2); shrd_reg32_reg32_cl(rd1,rd2); shr_reg32_cl(rd2); test_reg32_imm32(ECX, 0x20); je_rj(4); mov_reg32_reg32(rd1, rd2); // 2 xor_reg32_reg32(rd2, rd2); // 2 } else { int temp1, temp2; force_32(ECX); temp1 = lru_register(); temp2 = lru_register_exc1(temp1); free_register(temp1); free_register(temp2); mov_reg32_reg32(temp1, rt1); mov_reg32_reg32(temp2, rt2); shrd_reg32_reg32_cl(temp1, temp2); shr_reg32_cl(temp2); test_reg32_imm32(ECX, 0x20); je_rj(4); mov_reg32_reg32(temp1, temp2); // 2 xor_reg32_reg32(temp2, temp2); // 2 mov_reg32_reg32(rd1, temp1); mov_reg32_reg32(rd2, temp2); } #endif } void gendsrav(void) { #ifdef INTERPRET_DSRAV gencallinterp((unsigned int)cached_interpreter_table.DSRAV, 0); #else int rt1, rt2, rd1, rd2; allocate_register_manually(ECX, (unsigned int *)dst->f.r.rs); rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); if (rd1 != ECX && rd2 != ECX) { mov_reg32_reg32(rd1, rt1); mov_reg32_reg32(rd2, rt2); shrd_reg32_reg32_cl(rd1,rd2); sar_reg32_cl(rd2); test_reg32_imm32(ECX, 0x20); je_rj(5); mov_reg32_reg32(rd1, rd2); // 2 sar_reg32_imm8(rd2, 31); // 3 } else { int temp1, temp2; force_32(ECX); temp1 = lru_register(); temp2 = lru_register_exc1(temp1); free_register(temp1); free_register(temp2); mov_reg32_reg32(temp1, rt1); mov_reg32_reg32(temp2, rt2); shrd_reg32_reg32_cl(temp1, temp2); sar_reg32_cl(temp2); test_reg32_imm32(ECX, 0x20); je_rj(5); mov_reg32_reg32(temp1, temp2); // 2 sar_reg32_imm8(temp2, 31); // 3 mov_reg32_reg32(rd1, temp1); mov_reg32_reg32(rd2, temp2); } #endif } void genmult(void) { #ifdef INTERPRET_MULT gencallinterp((unsigned int)cached_interpreter_table.MULT, 0); #else int rs, rt; allocate_register_manually_w(EAX, (unsigned int *)&lo, 0); allocate_register_manually_w(EDX, (unsigned int *)&hi, 0); rs = allocate_register((unsigned int*)dst->f.r.rs); rt = allocate_register((unsigned int*)dst->f.r.rt); mov_reg32_reg32(EAX, rs); imul_reg32(rt); #endif } void genmultu(void) { #ifdef INTERPRET_MULTU gencallinterp((unsigned int)cached_interpreter_table.MULTU, 0); #else int rs, rt; allocate_register_manually_w(EAX, (unsigned int *)&lo, 0); allocate_register_manually_w(EDX, (unsigned int *)&hi, 0); rs = allocate_register((unsigned int*)dst->f.r.rs); rt = allocate_register((unsigned int*)dst->f.r.rt); mov_reg32_reg32(EAX, rs); mul_reg32(rt); #endif } void gendiv(void) { #ifdef INTERPRET_DIV gencallinterp((unsigned int)cached_interpreter_table.DIV, 0); #else int rs, rt; allocate_register_manually_w(EAX, (unsigned int *)&lo, 0); allocate_register_manually_w(EDX, (unsigned int *)&hi, 0); rs = allocate_register((unsigned int*)dst->f.r.rs); rt = allocate_register((unsigned int*)dst->f.r.rt); cmp_reg32_imm32(rt, 0); je_rj((rs == EAX ? 0 : 2) + 1 + 2); mov_reg32_reg32(EAX, rs); // 0 or 2 cdq(); // 1 idiv_reg32(rt); // 2 #endif } void gendivu(void) { #ifdef INTERPRET_DIVU gencallinterp((unsigned int)cached_interpreter_table.DIVU, 0); #else int rs, rt; allocate_register_manually_w(EAX, (unsigned int *)&lo, 0); allocate_register_manually_w(EDX, (unsigned int *)&hi, 0); rs = allocate_register((unsigned int*)dst->f.r.rs); rt = allocate_register((unsigned int*)dst->f.r.rt); cmp_reg32_imm32(rt, 0); je_rj((rs == EAX ? 0 : 2) + 2 + 2); mov_reg32_reg32(EAX, rs); // 0 or 2 xor_reg32_reg32(EDX, EDX); // 2 div_reg32(rt); // 2 #endif } void gendmult(void) { gencallinterp((unsigned int)cached_interpreter_table.DMULT, 0); } void gendmultu(void) { #ifdef INTERPRET_DMULTU gencallinterp((unsigned int)cached_interpreter_table.DMULTU, 0); #else free_all_registers(); simplify_access(); mov_eax_memoffs32((unsigned int *)dst->f.r.rs); mul_m32((unsigned int *)dst->f.r.rt); // EDX:EAX = temp1 mov_memoffs32_eax((unsigned int *)(&lo)); mov_reg32_reg32(EBX, EDX); // EBX = temp1>>32 mov_eax_memoffs32((unsigned int *)dst->f.r.rs); mul_m32((unsigned int *)(dst->f.r.rt)+1); add_reg32_reg32(EBX, EAX); adc_reg32_imm32(EDX, 0); mov_reg32_reg32(ECX, EDX); // ECX:EBX = temp2 mov_eax_memoffs32((unsigned int *)(dst->f.r.rs)+1); mul_m32((unsigned int *)dst->f.r.rt); // EDX:EAX = temp3 add_reg32_reg32(EBX, EAX); adc_reg32_imm32(ECX, 0); // ECX:EBX = result2 mov_m32_reg32((unsigned int*)(&lo)+1, EBX); mov_reg32_reg32(ESI, EDX); // ESI = temp3>>32 mov_eax_memoffs32((unsigned int *)(dst->f.r.rs)+1); mul_m32((unsigned int *)(dst->f.r.rt)+1); add_reg32_reg32(EAX, ESI); adc_reg32_imm32(EDX, 0); // EDX:EAX = temp4 add_reg32_reg32(EAX, ECX); adc_reg32_imm32(EDX, 0); // EDX:EAX = result3 mov_memoffs32_eax((unsigned int *)(&hi)); mov_m32_reg32((unsigned int *)(&hi)+1, EDX); #endif } void genddiv(void) { gencallinterp((unsigned int)cached_interpreter_table.DDIV, 0); } void genddivu(void) { gencallinterp((unsigned int)cached_interpreter_table.DDIVU, 0); } void genadd(void) { #ifdef INTERPRET_ADD gencallinterp((unsigned int)cached_interpreter_table.ADD, 0); #else int rs = allocate_register((unsigned int *)dst->f.r.rs); int rt = allocate_register((unsigned int *)dst->f.r.rt); int rd = allocate_register_w((unsigned int *)dst->f.r.rd); if (rt != rd && rs != rd) { mov_reg32_reg32(rd, rs); add_reg32_reg32(rd, rt); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rs); add_reg32_reg32(temp, rt); mov_reg32_reg32(rd, temp); } #endif } void genaddu(void) { #ifdef INTERPRET_ADDU gencallinterp((unsigned int)cached_interpreter_table.ADDU, 0); #else int rs = allocate_register((unsigned int *)dst->f.r.rs); int rt = allocate_register((unsigned int *)dst->f.r.rt); int rd = allocate_register_w((unsigned int *)dst->f.r.rd); if (rt != rd && rs != rd) { mov_reg32_reg32(rd, rs); add_reg32_reg32(rd, rt); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rs); add_reg32_reg32(temp, rt); mov_reg32_reg32(rd, temp); } #endif } void gensub(void) { #ifdef INTERPRET_SUB gencallinterp((unsigned int)cached_interpreter_table.SUB, 0); #else int rs = allocate_register((unsigned int *)dst->f.r.rs); int rt = allocate_register((unsigned int *)dst->f.r.rt); int rd = allocate_register_w((unsigned int *)dst->f.r.rd); if (rt != rd && rs != rd) { mov_reg32_reg32(rd, rs); sub_reg32_reg32(rd, rt); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rs); sub_reg32_reg32(temp, rt); mov_reg32_reg32(rd, temp); } #endif } void gensubu(void) { #ifdef INTERPRET_SUBU gencallinterp((unsigned int)cached_interpreter_table.SUBU, 0); #else int rs = allocate_register((unsigned int *)dst->f.r.rs); int rt = allocate_register((unsigned int *)dst->f.r.rt); int rd = allocate_register_w((unsigned int *)dst->f.r.rd); if (rt != rd && rs != rd) { mov_reg32_reg32(rd, rs); sub_reg32_reg32(rd, rt); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rs); sub_reg32_reg32(temp, rt); mov_reg32_reg32(rd, temp); } #endif } void genand(void) { #ifdef INTERPRET_AND gencallinterp((unsigned int)cached_interpreter_table.AND, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.r.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.r.rs); int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); if (rt1 != rd1 && rs1 != rd1) { mov_reg32_reg32(rd1, rs1); mov_reg32_reg32(rd2, rs2); and_reg32_reg32(rd1, rt1); and_reg32_reg32(rd2, rt2); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rs1); and_reg32_reg32(temp, rt1); mov_reg32_reg32(rd1, temp); mov_reg32_reg32(temp, rs2); and_reg32_reg32(temp, rt2); mov_reg32_reg32(rd2, temp); } #endif } void genor(void) { #ifdef INTERPRET_OR gencallinterp((unsigned int)cached_interpreter_table.OR, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.r.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.r.rs); int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); if (rt1 != rd1 && rs1 != rd1) { mov_reg32_reg32(rd1, rs1); mov_reg32_reg32(rd2, rs2); or_reg32_reg32(rd1, rt1); or_reg32_reg32(rd2, rt2); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rs1); or_reg32_reg32(temp, rt1); mov_reg32_reg32(rd1, temp); mov_reg32_reg32(temp, rs2); or_reg32_reg32(temp, rt2); mov_reg32_reg32(rd2, temp); } #endif } void genxor(void) { #ifdef INTERPRET_XOR gencallinterp((unsigned int)cached_interpreter_table.XOR, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.r.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.r.rs); int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); if (rt1 != rd1 && rs1 != rd1) { mov_reg32_reg32(rd1, rs1); mov_reg32_reg32(rd2, rs2); xor_reg32_reg32(rd1, rt1); xor_reg32_reg32(rd2, rt2); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rs1); xor_reg32_reg32(temp, rt1); mov_reg32_reg32(rd1, temp); mov_reg32_reg32(temp, rs2); xor_reg32_reg32(temp, rt2); mov_reg32_reg32(rd2, temp); } #endif } void gennor(void) { #ifdef INTERPRET_NOR gencallinterp((unsigned int)cached_interpreter_table.NOR, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.r.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.r.rs); int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); if (rt1 != rd1 && rs1 != rd1) { mov_reg32_reg32(rd1, rs1); mov_reg32_reg32(rd2, rs2); or_reg32_reg32(rd1, rt1); or_reg32_reg32(rd2, rt2); not_reg32(rd1); not_reg32(rd2); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rs1); or_reg32_reg32(temp, rt1); mov_reg32_reg32(rd1, temp); mov_reg32_reg32(temp, rs2); or_reg32_reg32(temp, rt2); mov_reg32_reg32(rd2, temp); not_reg32(rd1); not_reg32(rd2); } #endif } void genslt(void) { #ifdef INTERPRET_SLT gencallinterp((unsigned int)cached_interpreter_table.SLT, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.r.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.r.rs); int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd = allocate_register_w((unsigned int *)dst->f.r.rd); cmp_reg32_reg32(rs2, rt2); jl_rj(13); jne_rj(4); // 2 cmp_reg32_reg32(rs1, rt1); // 2 jl_rj(7); // 2 mov_reg32_imm32(rd, 0); // 5 jmp_imm_short(5); // 2 mov_reg32_imm32(rd, 1); // 5 #endif } void gensltu(void) { #ifdef INTERPRET_SLTU gencallinterp((unsigned int)cached_interpreter_table.SLTU, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.r.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.r.rs); int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd = allocate_register_w((unsigned int *)dst->f.r.rd); cmp_reg32_reg32(rs2, rt2); jb_rj(13); jne_rj(4); // 2 cmp_reg32_reg32(rs1, rt1); // 2 jb_rj(7); // 2 mov_reg32_imm32(rd, 0); // 5 jmp_imm_short(5); // 2 mov_reg32_imm32(rd, 1); // 5 #endif } void gendadd(void) { #ifdef INTERPRET_DADD gencallinterp((unsigned int)cached_interpreter_table.DADD, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.r.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.r.rs); int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); if (rt1 != rd1 && rs1 != rd1) { mov_reg32_reg32(rd1, rs1); mov_reg32_reg32(rd2, rs2); add_reg32_reg32(rd1, rt1); adc_reg32_reg32(rd2, rt2); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rs1); add_reg32_reg32(temp, rt1); mov_reg32_reg32(rd1, temp); mov_reg32_reg32(temp, rs2); adc_reg32_reg32(temp, rt2); mov_reg32_reg32(rd2, temp); } #endif } void gendaddu(void) { #ifdef INTERPRET_DADDU gencallinterp((unsigned int)cached_interpreter_table.DADDU, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.r.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.r.rs); int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); if (rt1 != rd1 && rs1 != rd1) { mov_reg32_reg32(rd1, rs1); mov_reg32_reg32(rd2, rs2); add_reg32_reg32(rd1, rt1); adc_reg32_reg32(rd2, rt2); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rs1); add_reg32_reg32(temp, rt1); mov_reg32_reg32(rd1, temp); mov_reg32_reg32(temp, rs2); adc_reg32_reg32(temp, rt2); mov_reg32_reg32(rd2, temp); } #endif } void gendsub(void) { #ifdef INTERPRET_DSUB gencallinterp((unsigned int)cached_interpreter_table.DSUB, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.r.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.r.rs); int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); if (rt1 != rd1 && rs1 != rd1) { mov_reg32_reg32(rd1, rs1); mov_reg32_reg32(rd2, rs2); sub_reg32_reg32(rd1, rt1); sbb_reg32_reg32(rd2, rt2); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rs1); sub_reg32_reg32(temp, rt1); mov_reg32_reg32(rd1, temp); mov_reg32_reg32(temp, rs2); sbb_reg32_reg32(temp, rt2); mov_reg32_reg32(rd2, temp); } #endif } void gendsubu(void) { #ifdef INTERPRET_DSUBU gencallinterp((unsigned int)cached_interpreter_table.DSUBU, 0); #else int rs1 = allocate_64_register1((unsigned int *)dst->f.r.rs); int rs2 = allocate_64_register2((unsigned int *)dst->f.r.rs); int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); if (rt1 != rd1 && rs1 != rd1) { mov_reg32_reg32(rd1, rs1); mov_reg32_reg32(rd2, rs2); sub_reg32_reg32(rd1, rt1); sbb_reg32_reg32(rd2, rt2); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rs1); sub_reg32_reg32(temp, rt1); mov_reg32_reg32(rd1, temp); mov_reg32_reg32(temp, rs2); sbb_reg32_reg32(temp, rt2); mov_reg32_reg32(rd2, temp); } #endif } void genteq(void) { gencallinterp((unsigned int)cached_interpreter_table.TEQ, 0); } void gendsll(void) { #ifdef INTERPRET_DSLL gencallinterp((unsigned int)cached_interpreter_table.DSLL, 0); #else int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); mov_reg32_reg32(rd1, rt1); mov_reg32_reg32(rd2, rt2); shld_reg32_reg32_imm8(rd2, rd1, dst->f.r.sa); shl_reg32_imm8(rd1, dst->f.r.sa); if (dst->f.r.sa & 0x20) { mov_reg32_reg32(rd2, rd1); xor_reg32_reg32(rd1, rd1); } #endif } void gendsrl(void) { #ifdef INTERPRET_DSRL gencallinterp((unsigned int)cached_interpreter_table.DSRL, 0); #else int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); mov_reg32_reg32(rd1, rt1); mov_reg32_reg32(rd2, rt2); shrd_reg32_reg32_imm8(rd1, rd2, dst->f.r.sa); shr_reg32_imm8(rd2, dst->f.r.sa); if (dst->f.r.sa & 0x20) { mov_reg32_reg32(rd1, rd2); xor_reg32_reg32(rd2, rd2); } #endif } void gendsra(void) { #ifdef INTERPRET_DSRA gencallinterp((unsigned int)cached_interpreter_table.DSRA, 0); #else int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); mov_reg32_reg32(rd1, rt1); mov_reg32_reg32(rd2, rt2); shrd_reg32_reg32_imm8(rd1, rd2, dst->f.r.sa); sar_reg32_imm8(rd2, dst->f.r.sa); if (dst->f.r.sa & 0x20) { mov_reg32_reg32(rd1, rd2); sar_reg32_imm8(rd2, 31); } #endif } void gendsll32(void) { #ifdef INTERPRET_DSLL32 gencallinterp((unsigned int)cached_interpreter_table.DSLL32, 0); #else int rt1 = allocate_64_register1((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); mov_reg32_reg32(rd2, rt1); shl_reg32_imm8(rd2, dst->f.r.sa); xor_reg32_reg32(rd1, rd1); #endif } void gendsrl32(void) { #ifdef INTERPRET_DSRL32 gencallinterp((unsigned int)cached_interpreter_table.DSRL32, 0); #else int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd1 = allocate_64_register1_w((unsigned int *)dst->f.r.rd); int rd2 = allocate_64_register2_w((unsigned int *)dst->f.r.rd); mov_reg32_reg32(rd1, rt2); shr_reg32_imm8(rd1, dst->f.r.sa); xor_reg32_reg32(rd2, rd2); #endif } void gendsra32(void) { #ifdef INTERPRET_DSRA32 gencallinterp((unsigned int)cached_interpreter_table.DSRA32, 0); #else int rt2 = allocate_64_register2((unsigned int *)dst->f.r.rt); int rd = allocate_register_w((unsigned int *)dst->f.r.rd); mov_reg32_reg32(rd, rt2); sar_reg32_imm8(rd, dst->f.r.sa); #endif } mupen64plus-core-src-2.5/src/r4300/x86/gtlb.c000066400000000000000000000056071251723631200203670ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gtlb.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "r4300/cached_interp.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomph.h" void gentlbwi(void) { gencallinterp((unsigned int)cached_interpreter_table.TLBWI, 0); /*dst->local_addr = code_length; mov_m32_imm32((void *)(&PC), (unsigned int)(dst)); mov_reg32_imm32(EAX, (unsigned int)(TLBWI)); call_reg32(EAX); genupdate_system(0);*/ } void gentlbp(void) { gencallinterp((unsigned int)cached_interpreter_table.TLBP, 0); /*dst->local_addr = code_length; mov_m32_imm32((void *)(&PC), (unsigned int)(dst)); mov_reg32_imm32(EAX, (unsigned int)(TLBP)); call_reg32(EAX); genupdate_system(0);*/ } void gentlbr(void) { gencallinterp((unsigned int)cached_interpreter_table.TLBR, 0); /*dst->local_addr = code_length; mov_m32_imm32((void *)(&PC), (unsigned int)(dst)); mov_reg32_imm32(EAX, (unsigned int)(TLBR)); call_reg32(EAX); genupdate_system(0);*/ } void generet(void) { gencallinterp((unsigned int)cached_interpreter_table.ERET, 1); /*dst->local_addr = code_length; mov_m32_imm32((void *)(&PC), (unsigned int)(dst)); genupdate_system(0); mov_reg32_imm32(EAX, (unsigned int)(ERET)); call_reg32(EAX); mov_reg32_imm32(EAX, (unsigned int)(jump_code)); jmp_reg32(EAX);*/ } void gentlbwr(void) { gencallinterp((unsigned int)cached_interpreter_table.TLBWR, 0); } mupen64plus-core-src-2.5/src/r4300/x86/interpret.h000066400000000000000000000163101251723631200214510ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - interpret.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_INTERPRET_H #define M64P_R4300_INTERPRET_H //#define INTERPRET_J //#define INTERPRET_J_OUT //#define INTERPRET_J_IDLE //#define INTERPRET_JAL //#define INTERPRET_JAL_OUT //#define INTERPRET_JAL_IDLE //#define INTERPRET_BEQ //#define INTERPRET_BEQ_OUT //#define INTERPRET_BEQ_IDLE //#define INTERPRET_BNE //#define INTERPRET_BNE_OUT //#define INTERPRET_BNE_IDLE //#define INTERPRET_BLEZ //#define INTERPRET_BLEZ_OUT //#define INTERPRET_BLEZ_IDLE //#define INTERPRET_BGTZ //#define INTERPRET_BGTZ_OUT //#define INTERPRET_BGTZ_IDLE //#define INTERPRET_ADDI //#define INTERPRET_ADDIU //#define INTERPRET_SLTI //#define INTERPRET_SLTIU //#define INTERPRET_ANDI //#define INTERPRET_ORI //#define INTERPRET_XORI //#define INTERPRET_LUI //#define INTERPRET_BEQL //#define INTERPRET_BEQL_OUT //#define INTERPRET_BEQL_IDLE //#define INTERPRET_BNEL //#define INTERPRET_BNEL_OUT //#define INTERPRET_BNEL_IDLE //#define INTERPRET_BLEZL //#define INTERPRET_BLEZL_OUT //#define INTERPRET_BLEZL_IDLE //#define INTERPRET_BGTZL //#define INTERPRET_BGTZL_OUT //#define INTERPRET_BGTZL_IDLE //#define INTERPRET_DADDI //#define INTERPRET_DADDIU //#define INTERPRET_LB //#define INTERPRET_LH //#define INTERPRET_LW //#define INTERPRET_LBU //#define INTERPRET_LHU //#define INTERPRET_LWU //#define INTERPRET_SB //#define INTERPRET_SH //#define INTERPRET_SW //#define INTERPRET_LWC1 //#define INTERPRET_LDC1 //#define INTERPRET_LD //#define INTERPRET_SWC1 //#define INTERPRET_SDC1 //#define INTERPRET_SD //#define INTERPRET_SLL //#define INTERPRET_SRL //#define INTERPRET_SRA //#define INTERPRET_SLLV //#define INTERPRET_SRLV //#define INTERPRET_SRAV //#define INTERPRET_JR //#define INTERPRET_JALR //#define INTERPRET_SYSCALL //#define INTERPRET_MFHI //#define INTERPRET_MTHI //#define INTERPRET_MFLO //#define INTERPRET_MTLO //#define INTERPRET_DSLLV //#define INTERPRET_DSRLV //#define INTERPRET_DSRAV //#define INTERPRET_MULT //#define INTERPRET_MULTU //#define INTERPRET_DIV //#define INTERPRET_DIVU //#define INTERPRET_DMULTU //#define INTERPRET_ADD //#define INTERPRET_ADDU //#define INTERPRET_SUB //#define INTERPRET_SUBU //#define INTERPRET_AND //#define INTERPRET_OR //#define INTERPRET_XOR //#define INTERPRET_NOR //#define INTERPRET_SLT //#define INTERPRET_SLTU //#define INTERPRET_DADD //#define INTERPRET_DADDU //#define INTERPRET_DSUB //#define INTERPRET_DSUBU //#define INTERPRET_DSLL //#define INTERPRET_DSRL //#define INTERPRET_DSRA //#define INTERPRET_DSLL32 //#define INTERPRET_DSRL32 //#define INTERPRET_DSRA32 //#define INTERPRET_BLTZ //#define INTERPRET_BLTZ_OUT //#define INTERPRET_BLTZ_IDLE //#define INTERPRET_BGEZ //#define INTERPRET_BGEZ_OUT //#define INTERPRET_BGEZ_IDLE //#define INTERPRET_BLTZL //#define INTERPRET_BLTZL_OUT //#define INTERPRET_BLTZL_IDLE //#define INTERPRET_BGEZL //#define INTERPRET_BGEZL_OUT //#define INTERPRET_BGEZL_IDLE //#define INTERPRET_BLTZAL //#define INTERPRET_BLTZAL_OUT //#define INTERPRET_BLTZAL_IDLE //#define INTERPRET_BGEZAL //#define INTERPRET_BGEZAL_OUT //#define INTERPRET_BGEZAL_IDLE //#define INTERPRET_BLTZALL //#define INTERPRET_BLTZALL_OUT //#define INTERPRET_BLTZALL_IDLE //#define INTERPRET_BGEZALL //#define INTERPRET_BGEZALL_OUT //#define INTERPRET_BGEZALL_IDLE //#define INTERPRET_BC1F //#define INTERPRET_BC1F_OUT //#define INTERPRET_BC1F_IDLE //#define INTERPRET_BC1T //#define INTERPRET_BC1T_OUT //#define INTERPRET_BC1T_IDLE //#define INTERPRET_BC1FL //#define INTERPRET_BC1FL_OUT //#define INTERPRET_BC1FL_IDLE //#define INTERPRET_BC1TL //#define INTERPRET_BC1TL_OUT //#define INTERPRET_BC1TL_IDLE //#define INTERPRET_MFC1 //#define INTERPRET_DMFC1 //#define INTERPRET_CFC1 //#define INTERPRET_MTC1 //#define INTERPRET_DMTC1 //#define INTERPRET_CTC1 //#define INTERPRET_ADD_D //#define INTERPRET_SUB_D //#define INTERPRET_MUL_D //#define INTERPRET_DIV_D //#define INTERPRET_SQRT_D //#define INTERPRET_ABS_D //#define INTERPRET_MOV_D //#define INTERPRET_NEG_D //#define INTERPRET_ROUND_L_D //#define INTERPRET_TRUNC_L_D //#define INTERPRET_CEIL_L_D //#define INTERPRET_FLOOR_L_D //#define INTERPRET_ROUND_W_D //#define INTERPRET_TRUNC_W_D //#define INTERPRET_CEIL_W_D //#define INTERPRET_FLOOR_W_D //#define INTERPRET_CVT_S_D //#define INTERPRET_CVT_W_D //#define INTERPRET_CVT_L_D //#define INTERPRET_C_F_D //#define INTERPRET_C_UN_D //#define INTERPRET_C_EQ_D //#define INTERPRET_C_UEQ_D //#define INTERPRET_C_OLT_D //#define INTERPRET_C_ULT_D //#define INTERPRET_C_OLE_D //#define INTERPRET_C_ULE_D //#define INTERPRET_C_SF_D //#define INTERPRET_C_NGLE_D //#define INTERPRET_C_SEQ_D //#define INTERPRET_C_NGL_D //#define INTERPRET_C_LT_D //#define INTERPRET_C_NGE_D //#define INTERPRET_C_LE_D //#define INTERPRET_C_NGT_D //#define INTERPRET_CVT_S_L //#define INTERPRET_CVT_D_L //#define INTERPRET_CVT_S_W //#define INTERPRET_CVT_D_W //#define INTERPRET_ADD_S //#define INTERPRET_SUB_S //#define INTERPRET_MUL_S //#define INTERPRET_DIV_S //#define INTERPRET_SQRT_S //#define INTERPRET_ABS_S //#define INTERPRET_MOV_S //#define INTERPRET_NEG_S //#define INTERPRET_ROUND_L_S //#define INTERPRET_TRUNC_L_S //#define INTERPRET_CEIL_L_S //#define INTERPRET_FLOOR_L_S //#define INTERPRET_ROUND_W_S //#define INTERPRET_TRUNC_W_S //#define INTERPRET_CEIL_W_S //#define INTERPRET_FLOOR_W_S //#define INTERPRET_CVT_D_S //#define INTERPRET_CVT_W_S //#define INTERPRET_CVT_L_S //#define INTERPRET_C_F_S //#define INTERPRET_C_UN_S //#define INTERPRET_C_EQ_S //#define INTERPRET_C_UEQ_S //#define INTERPRET_C_OLT_S //#define INTERPRET_C_ULT_S //#define INTERPRET_C_OLE_S //#define INTERPRET_C_ULE_S //#define INTERPRET_C_SF_S //#define INTERPRET_C_NGLE_S //#define INTERPRET_C_SEQ_S //#define INTERPRET_C_NGL_S //#define INTERPRET_C_LT_S //#define INTERPRET_C_NGE_S //#define INTERPRET_C_LE_S //#define INTERPRET_C_NGT_S #endif /* M64P_R4300_INTERPRET_H */ mupen64plus-core-src-2.5/src/r4300/x86/regcache.c000066400000000000000000000525501251723631200211770ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - regcache.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #include "regcache.h" static unsigned int* reg_content[8]; static precomp_instr* last_access[8]; static precomp_instr* free_since[8]; static int dirty[8]; static int r64[8]; static unsigned int* r0; void init_cache(precomp_instr* start) { int i; for (i=0; i<8; i++) { last_access[i] = NULL; free_since[i] = start; } r0 = (unsigned int*)reg; } void free_all_registers(void) { #if defined(PROFILE_R4300) int freestart = code_length; int flushed = 0; #endif int i; for (i=0; i<8; i++) { #if defined(PROFILE_R4300) if (last_access[i] && dirty[i]) flushed = 1; #endif if (last_access[i]) free_register(i); else { while (free_since[i] <= dst) { free_since[i]->reg_cache_infos.needed_registers[i] = NULL; free_since[i]++; } } } #if defined(PROFILE_R4300) if (flushed == 1) { long x86addr = (long) ((*inst_pointer) + freestart); int mipsop = -5; fwrite(&mipsop, 1, 4, pfProfile); /* -5 = regcache flushing */ fwrite(&x86addr, 1, sizeof(char *), pfProfile); // write pointer to start of register cache flushing instructions x86addr = (long) ((*inst_pointer) + code_length); fwrite(&src, 1, 4, pfProfile); // write 4-byte MIPS opcode for current instruction fwrite(&x86addr, 1, sizeof(char *), pfProfile); // write pointer to dynamically generated x86 code for this MIPS instruction } #endif } // this function frees a specific X86 GPR void free_register(int reg) { precomp_instr *last; if (last_access[reg] != NULL && r64[reg] != -1 && (int)reg_content[reg] != (int)reg_content[r64[reg]]-4) { free_register(r64[reg]); return; } if (last_access[reg] != NULL) last = last_access[reg]+1; else last = free_since[reg]; while (last <= dst) { if (last_access[reg] != NULL && dirty[reg]) last->reg_cache_infos.needed_registers[reg] = reg_content[reg]; else last->reg_cache_infos.needed_registers[reg] = NULL; if (last_access[reg] != NULL && r64[reg] != -1) { if (dirty[r64[reg]]) last->reg_cache_infos.needed_registers[r64[reg]] = reg_content[r64[reg]]; else last->reg_cache_infos.needed_registers[r64[reg]] = NULL; } last++; } if (last_access[reg] == NULL) { free_since[reg] = dst+1; return; } if (dirty[reg]) { mov_m32_reg32(reg_content[reg], reg); if (r64[reg] == -1) { sar_reg32_imm8(reg, 31); mov_m32_reg32((unsigned int*)reg_content[reg]+1, reg); } else mov_m32_reg32(reg_content[r64[reg]], r64[reg]); } last_access[reg] = NULL; free_since[reg] = dst+1; if (r64[reg] != -1) { last_access[r64[reg]] = NULL; free_since[r64[reg]] = dst+1; } } int lru_register(void) { unsigned int oldest_access = 0xFFFFFFFF; int i, reg = 0; for (i=0; i<8; i++) { if (i != ESP && (unsigned int)last_access[i] < oldest_access) { oldest_access = (int)last_access[i]; reg = i; } } return reg; } int lru_register_exc1(int exc1) { unsigned int oldest_access = 0xFFFFFFFF; int i, reg = 0; for (i=0; i<8; i++) { if (i != ESP && i != exc1 && (unsigned int)last_access[i] < oldest_access) { oldest_access = (int)last_access[i]; reg = i; } } return reg; } // this function finds a register to put the data contained in addr, // if there was another value before it's cleanly removed of the // register cache. After that, the register number is returned. // If data are already cached, the function only returns the register number int allocate_register(unsigned int *addr) { unsigned int oldest_access = 0xFFFFFFFF; int reg = 0, i; // is it already cached ? if (addr != NULL) { for (i=0; i<8; i++) { if (last_access[i] != NULL && reg_content[i] == addr) { precomp_instr *last = last_access[i]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[i] = reg_content[i]; last++; } last_access[i] = dst; if (r64[i] != -1) { last = last_access[r64[i]]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[r64[i]] = reg_content[r64[i]]; last++; } last_access[r64[i]] = dst; } return i; } } } // if it's not cached, we take the least recently used register for (i=0; i<8; i++) { if (i != ESP && (unsigned int)last_access[i] < oldest_access) { oldest_access = (int)last_access[i]; reg = i; } } if (last_access[reg]) free_register(reg); else { while (free_since[reg] <= dst) { free_since[reg]->reg_cache_infos.needed_registers[reg] = NULL; free_since[reg]++; } } last_access[reg] = dst; reg_content[reg] = addr; dirty[reg] = 0; r64[reg] = -1; if (addr != NULL) { if (addr == r0 || addr == r0+1) xor_reg32_reg32(reg, reg); else mov_reg32_m32(reg, addr); } return reg; } // this function is similar to allocate_register except it loads // a 64 bits value, and return the register number of the LSB part int allocate_64_register1(unsigned int *addr) { int reg1, reg2, i; // is it already cached as a 32 bits value ? for (i=0; i<8; i++) { if (last_access[i] != NULL && reg_content[i] == addr) { if (r64[i] == -1) { allocate_register(addr); reg2 = allocate_register(dirty[i] ? NULL : addr+1); r64[i] = reg2; r64[reg2] = i; if (dirty[i]) { reg_content[reg2] = addr+1; dirty[reg2] = 1; mov_reg32_reg32(reg2, i); sar_reg32_imm8(reg2, 31); } return i; } } } reg1 = allocate_register(addr); reg2 = allocate_register(addr+1); r64[reg1] = reg2; r64[reg2] = reg1; return reg1; } // this function is similar to allocate_register except it loads // a 64 bits value, and return the register number of the MSB part int allocate_64_register2(unsigned int *addr) { int reg1, reg2, i; // is it already cached as a 32 bits value ? for (i=0; i<8; i++) { if (last_access[i] != NULL && reg_content[i] == addr) { if (r64[i] == -1) { allocate_register(addr); reg2 = allocate_register(dirty[i] ? NULL : addr+1); r64[i] = reg2; r64[reg2] = i; if (dirty[i]) { reg_content[reg2] = addr+1; dirty[reg2] = 1; mov_reg32_reg32(reg2, i); sar_reg32_imm8(reg2, 31); } return reg2; } } } reg1 = allocate_register(addr); reg2 = allocate_register(addr+1); r64[reg1] = reg2; r64[reg2] = reg1; return reg2; } // this function checks if the data located at addr are cached in a register // and then, it returns 1 if it's a 64 bit value // 0 if it's a 32 bit value // -1 if it's not cached int is64(unsigned int *addr) { int i; for (i=0; i<8; i++) { if (last_access[i] != NULL && reg_content[i] == addr) { if (r64[i] == -1) return 0; return 1; } } return -1; } int allocate_register_w(unsigned int *addr) { unsigned int oldest_access = 0xFFFFFFFF; int reg = 0, i; // is it already cached ? for (i=0; i<8; i++) { if (last_access[i] != NULL && reg_content[i] == addr) { precomp_instr *last = last_access[i]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[i] = NULL; last++; } last_access[i] = dst; dirty[i] = 1; if (r64[i] != -1) { last = last_access[r64[i]]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[r64[i]] = NULL; last++; } free_since[r64[i]] = dst+1; last_access[r64[i]] = NULL; r64[i] = -1; } return i; } } // if it's not cached, we take the least recently used register for (i=0; i<8; i++) { if (i != ESP && (unsigned int)last_access[i] < oldest_access) { oldest_access = (int)last_access[i]; reg = i; } } if (last_access[reg]) free_register(reg); else { while (free_since[reg] <= dst) { free_since[reg]->reg_cache_infos.needed_registers[reg] = NULL; free_since[reg]++; } } last_access[reg] = dst; reg_content[reg] = addr; dirty[reg] = 1; r64[reg] = -1; return reg; } int allocate_64_register1_w(unsigned int *addr) { int reg1, reg2, i; // is it already cached as a 32 bits value ? for (i=0; i<8; i++) { if (last_access[i] != NULL && reg_content[i] == addr) { if (r64[i] == -1) { allocate_register_w(addr); reg2 = lru_register(); if (last_access[reg2]) free_register(reg2); else { while (free_since[reg2] <= dst) { free_since[reg2]->reg_cache_infos.needed_registers[reg2] = NULL; free_since[reg2]++; } } r64[i] = reg2; r64[reg2] = i; last_access[reg2] = dst; reg_content[reg2] = addr+1; dirty[reg2] = 1; mov_reg32_reg32(reg2, i); sar_reg32_imm8(reg2, 31); return i; } else { last_access[i] = dst; last_access[r64[i]] = dst; dirty[i] = dirty[r64[i]] = 1; return i; } } } reg1 = allocate_register_w(addr); reg2 = lru_register(); if (last_access[reg2]) free_register(reg2); else { while (free_since[reg2] <= dst) { free_since[reg2]->reg_cache_infos.needed_registers[reg2] = NULL; free_since[reg2]++; } } r64[reg1] = reg2; r64[reg2] = reg1; last_access[reg2] = dst; reg_content[reg2] = addr+1; dirty[reg2] = 1; return reg1; } int allocate_64_register2_w(unsigned int *addr) { int reg1, reg2, i; // is it already cached as a 32 bits value ? for (i=0; i<8; i++) { if (last_access[i] != NULL && reg_content[i] == addr) { if (r64[i] == -1) { allocate_register_w(addr); reg2 = lru_register(); if (last_access[reg2]) free_register(reg2); else { while (free_since[reg2] <= dst) { free_since[reg2]->reg_cache_infos.needed_registers[reg2] = NULL; free_since[reg2]++; } } r64[i] = reg2; r64[reg2] = i; last_access[reg2] = dst; reg_content[reg2] = addr+1; dirty[reg2] = 1; mov_reg32_reg32(reg2, i); sar_reg32_imm8(reg2, 31); return reg2; } else { last_access[i] = dst; last_access[r64[i]] = dst; dirty[i] = dirty[r64[i]] = 1; return r64[i]; } } } reg1 = allocate_register_w(addr); reg2 = lru_register(); if (last_access[reg2]) free_register(reg2); else { while (free_since[reg2] <= dst) { free_since[reg2]->reg_cache_infos.needed_registers[reg2] = NULL; free_since[reg2]++; } } r64[reg1] = reg2; r64[reg2] = reg1; last_access[reg2] = dst; reg_content[reg2] = addr+1; dirty[reg2] = 1; return reg2; } void set_register_state(int reg, unsigned int *addr, int d) { last_access[reg] = dst; reg_content[reg] = addr; r64[reg] = -1; dirty[reg] = d; } void set_64_register_state(int reg1, int reg2, unsigned int *addr, int d) { last_access[reg1] = dst; last_access[reg2] = dst; reg_content[reg1] = addr; reg_content[reg2] = addr+1; r64[reg1] = reg2; r64[reg2] = reg1; dirty[reg1] = d; dirty[reg2] = d; } void force_32(int reg) { if (r64[reg] != -1) { precomp_instr *last = last_access[reg]+1; while (last <= dst) { if (dirty[reg]) last->reg_cache_infos.needed_registers[reg] = reg_content[reg]; else last->reg_cache_infos.needed_registers[reg] = NULL; if (dirty[r64[reg]]) last->reg_cache_infos.needed_registers[r64[reg]] = reg_content[r64[reg]]; else last->reg_cache_infos.needed_registers[r64[reg]] = NULL; last++; } if (dirty[reg]) { mov_m32_reg32(reg_content[reg], reg); mov_m32_reg32(reg_content[r64[reg]], r64[reg]); dirty[reg] = 0; } last_access[r64[reg]] = NULL; free_since[r64[reg]] = dst+1; r64[reg] = -1; } } void allocate_register_manually(int reg, unsigned int *addr) { int i; if (last_access[reg] != NULL && reg_content[reg] == addr) { precomp_instr *last = last_access[reg]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[reg] = reg_content[reg]; last++; } last_access[reg] = dst; if (r64[reg] != -1) { last = last_access[r64[reg]]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[r64[reg]] = reg_content[r64[reg]]; last++; } last_access[r64[reg]] = dst; } return; } if (last_access[reg]) free_register(reg); else { while (free_since[reg] <= dst) { free_since[reg]->reg_cache_infos.needed_registers[reg] = NULL; free_since[reg]++; } } // is it already cached ? for (i=0; i<8; i++) { if (last_access[i] != NULL && reg_content[i] == addr) { precomp_instr *last = last_access[i]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[i] = reg_content[i]; last++; } last_access[i] = dst; if (r64[i] != -1) { last = last_access[r64[i]]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[r64[i]] = reg_content[r64[i]]; last++; } last_access[r64[i]] = dst; } mov_reg32_reg32(reg, i); last_access[reg] = dst; r64[reg] = r64[i]; if (r64[reg] != -1) r64[r64[reg]] = reg; dirty[reg] = dirty[i]; reg_content[reg] = reg_content[i]; free_since[i] = dst+1; last_access[i] = NULL; return; } } last_access[reg] = dst; reg_content[reg] = addr; dirty[reg] = 0; r64[reg] = -1; if (addr != NULL) { if (addr == r0 || addr == r0+1) xor_reg32_reg32(reg, reg); else mov_reg32_m32(reg, addr); } } void allocate_register_manually_w(int reg, unsigned int *addr, int load) { int i; if (last_access[reg] != NULL && reg_content[reg] == addr) { precomp_instr *last = last_access[reg]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[reg] = reg_content[reg]; last++; } last_access[reg] = dst; if (r64[reg] != -1) { last = last_access[r64[reg]]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[r64[reg]] = reg_content[r64[reg]]; last++; } last_access[r64[reg]] = NULL; free_since[r64[reg]] = dst+1; r64[reg] = -1; } dirty[reg] = 1; return; } if (last_access[reg]) free_register(reg); else { while (free_since[reg] <= dst) { free_since[reg]->reg_cache_infos.needed_registers[reg] = NULL; free_since[reg]++; } } // is it already cached ? for (i=0; i<8; i++) { if (last_access[i] != NULL && reg_content[i] == addr) { precomp_instr *last = last_access[i]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[i] = reg_content[i]; last++; } last_access[i] = dst; if (r64[i] != -1) { last = last_access[r64[i]]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[r64[i]] = NULL; last++; } free_since[r64[i]] = dst+1; last_access[r64[i]] = NULL; r64[i] = -1; } if (load) mov_reg32_reg32(reg, i); last_access[reg] = dst; dirty[reg] = 1; r64[reg] = -1; reg_content[reg] = reg_content[i]; free_since[i] = dst+1; last_access[i] = NULL; return; } } last_access[reg] = dst; reg_content[reg] = addr; dirty[reg] = 1; r64[reg] = -1; if (addr != NULL && load) { if (addr == r0 || addr == r0+1) xor_reg32_reg32(reg, reg); else mov_reg32_m32(reg, addr); } } // 0x81 0xEC 0x4 0x0 0x0 0x0 sub esp, 4 // 0xA1 0xXXXXXXXX mov eax, XXXXXXXX (&code start) // 0x05 0xXXXXXXXX add eax, XXXXXXXX (local_addr) // 0x89 0x04 0x24 mov [esp], eax // 0x8B (reg<<3)|5 0xXXXXXXXX mov eax, [XXXXXXXX] // 0x8B (reg<<3)|5 0xXXXXXXXX mov ebx, [XXXXXXXX] // 0x8B (reg<<3)|5 0xXXXXXXXX mov ecx, [XXXXXXXX] // 0x8B (reg<<3)|5 0xXXXXXXXX mov edx, [XXXXXXXX] // 0x8B (reg<<3)|5 0xXXXXXXXX mov ebp, [XXXXXXXX] // 0x8B (reg<<3)|5 0xXXXXXXXX mov esi, [XXXXXXXX] // 0x8B (reg<<3)|5 0xXXXXXXXX mov edi, [XXXXXXXX] // 0xC3 ret // total : 62 bytes static void build_wrapper(precomp_instr *instr, unsigned char* code, precomp_block* block) { int i; int j=0; #if defined(PROFILE_R4300) long x86addr = (long) code; int mipsop = -4; fwrite(&mipsop, 1, 4, pfProfile); // write 4-byte MIPS opcode fwrite(&x86addr, 1, sizeof(char *), pfProfile); // write pointer to dynamically generated x86 code for this MIPS instruction #endif code[j++] = 0x81; code[j++] = 0xEC; code[j++] = 0x04; code[j++] = 0x00; code[j++] = 0x00; code[j++] = 0x00; code[j++] = 0xA1; *((unsigned int*)&code[j]) = (unsigned int)(&block->code); j+=4; code[j++] = 0x05; *((unsigned int*)&code[j]) = (unsigned int)instr->local_addr; j+=4; code[j++] = 0x89; code[j++] = 0x04; code[j++] = 0x24; for (i=0; i<8; i++) { if (instr->reg_cache_infos.needed_registers[i] != NULL) { code[j++] = 0x8B; code[j++] = (i << 3) | 5; *((unsigned int*)&code[j]) = (unsigned int)instr->reg_cache_infos.needed_registers[i]; j+=4; } } code[j++] = 0xC3; } void build_wrappers(precomp_instr *instr, int start, int end, precomp_block* block) { int i, reg;; for (i=start; ilocal_addr = code_length; for(i=0; i<8; i++) dst->reg_cache_infos.needed_registers[i] = NULL; } mupen64plus-core-src-2.5/src/r4300/x86/regcache.h000066400000000000000000000047401251723631200212020ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - regcache.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_REGCACHE_H #define M64P_R4300_REGCACHE_H #include "r4300/recomp.h" void init_cache(precomp_instr* start); void free_all_registers(void); void free_register(int reg); int allocate_register(unsigned int *addr); int allocate_64_register1(unsigned int *addr); int allocate_64_register2(unsigned int *addr); int is64(unsigned int *addr); void build_wrappers(precomp_instr*, int, int, precomp_block*); int lru_register(void); int allocate_register_w(unsigned int *addr); int allocate_64_register1_w(unsigned int *addr); int allocate_64_register2_w(unsigned int *addr); void set_register_state(int reg, unsigned int *addr, int dirty); void set_64_register_state(int reg1, int reg2, unsigned int *addr, int dirty); void allocate_register_manually(int reg, unsigned int *addr); void allocate_register_manually_w(int reg, unsigned int *addr, int load); void force_32(int reg); int lru_register_exc1(int exc1); void simplify_access(void); #endif /* M64P_R4300_REGCACHE_H */ mupen64plus-core-src-2.5/src/r4300/x86/rjump.c000066400000000000000000000140301251723631200205620ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rjump.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "r4300/cached_interp.h" #include "r4300/macros.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #ifdef __GNUC__ # define ASM_NAME(name) asm(name) #else # define ASM_NAME(name) #endif static long save_ebp ASM_NAME("save_ebp") = 0; static long save_ebx ASM_NAME("save_ebx") = 0; static long save_esi ASM_NAME("save_esi") = 0; static long save_edi ASM_NAME("save_edi") = 0; static long save_esp ASM_NAME("save_esp") = 0; static long save_eip ASM_NAME("save_eip") = 0; // that's where the dynarec will restart when going back from a C function static unsigned long *return_address ASM_NAME("return_address"); void dyna_jump() { if (stop == 1) { dyna_stop(); return; } if (PC->reg_cache_infos.need_map) *return_address = (unsigned long) (PC->reg_cache_infos.jump_wrapper); else *return_address = (unsigned long) (actual->code + PC->local_addr); } #if defined(WIN32) && !defined(__GNUC__) /* this warning disable only works if placed outside of the scope of a function */ #pragma warning(disable:4731) /* frame pointer register 'ebp' modified by inline assembly code */ #endif void dyna_start(void *code) { /* save the base and stack pointers */ /* make a call and a pop to retrieve the instruction pointer and save it too */ /* then call the code(), which should theoretically never return. */ /* When dyna_stop() sets the *return_address to the saved EIP, the emulator thread will come back here. */ /* It will jump to label 2, restore the base and stack pointers, and exit this function */ #if defined(WIN32) && !defined(__GNUC__) __asm { mov save_ebp, ebp mov save_esp, esp mov save_ebx, ebx mov save_esi, esi mov save_edi, edi call point1 jmp point2 point1: pop eax mov save_eip, eax sub esp, 0x10 and esp, 0xfffffff0 mov return_address, esp sub return_address, 4 mov eax, code call eax point2: mov ebp, save_ebp mov esp, save_esp mov ebx, save_ebx mov esi, save_esi mov edi, save_edi } #elif defined(__GNUC__) && defined(__i386__) #if defined(__PIC__) /* for -fPIC (shared libraries) */ #ifndef __GNUC_PREREQ # if defined __GNUC__ && defined __GNUC_MINOR__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) # else # define __GNUC_PREREQ(maj, min) 0 # endif #endif #if __GNUC_PREREQ (4, 7) # define GET_PC_THUNK_STR(reg) "__x86.get_pc_thunk." #reg #else # define GET_PC_THUNK_STR(reg) "__i686.get_pc_thunk." #reg #endif #define STORE_EBX #define LOAD_EBX "call " GET_PC_THUNK_STR(bx) " \n" \ "addl $_GLOBAL_OFFSET_TABLE_, %%ebx \n" #else /* for non-PIC binaries */ #define STORE_EBX "movl %%ebx, %[save_ebx] \n" #define LOAD_EBX "movl %[save_ebx], %%ebx \n" #endif asm volatile (STORE_EBX " movl %%ebp, %[save_ebp] \n" " movl %%esp, %[save_esp] \n" " movl %%esi, %[save_esi] \n" " movl %%edi, %[save_edi] \n" " call 1f \n" " jmp 2f \n" "1: \n" " popl %%eax \n" " movl %%eax, %[save_eip] \n" " subl $16, %%esp \n" /* save 16 bytes of padding just in case */ " andl $-16, %%esp \n" /* align stack on 16-byte boundary for OSX */ " movl %%esp, %[return_address] \n" " subl $4, %[return_address] \n" " call *%[codeptr] \n" "2: \n" LOAD_EBX " movl %[save_ebp], %%ebp \n" " movl %[save_esp], %%esp \n" " movl %[save_esi], %%esi \n" " movl %[save_edi], %%edi \n" : [save_ebp]"=m"(save_ebp), [save_esp]"=m"(save_esp), [save_ebx]"=m"(save_ebx), [save_esi]"=m"(save_esi), [save_edi]"=m"(save_edi), [save_eip]"=m"(save_eip), [return_address]"=m"(return_address) : [codeptr]"r"(code) : "eax", "ecx", "edx", "memory" ); #endif /* clear the registers so we don't return here a second time; that would be a bug */ /* this is also necessary to prevent compiler from optimizing out the static variables */ save_edi=0; save_esi=0; save_ebx=0; save_ebp=0; save_esp=0; save_eip=0; } void dyna_stop() { if (save_eip == 0) DebugMessage(M64MSG_WARNING, "instruction pointer is 0 at dyna_stop()"); else { *return_address = (unsigned long) save_eip; } } mupen64plus-core-src-2.5/src/r4300/x86_64/000077500000000000000000000000001251723631200175745ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/r4300/x86_64/assemble.c000066400000000000000000000171171251723631200215420ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - assemble.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "assemble.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #include "r4300/x86_64/assemble_struct.h" #include "r4300/x86_64/regcache.h" /* Placeholder for RIP-relative offsets is maxmimum 32-bit signed value. * So, if recompiled code is run without running passe2() first, it will * cause an exception. */ #define REL_PLACEHOLDER 0x7fffffff typedef struct _jump_table { unsigned int mi_addr; unsigned int pc_addr; unsigned int absolute64; } jump_table; static jump_table *jumps_table = NULL; static int jumps_number = 0, max_jumps_number = 0; typedef struct _riprelative_table { unsigned int pc_addr; /* index in bytes from start of x86_64 code block to the displacement value to write */ unsigned int extra_bytes; /* number of remaining instruction bytes (immediate data) after 4-byte displacement */ unsigned char *global_dst; /* 64-bit pointer to the data object */ } riprelative_table; static riprelative_table *riprel_table = NULL; static int riprel_number = 0, max_riprel_number = 0; /* Static Functions */ void add_jump(unsigned int pc_addr, unsigned int mi_addr, unsigned int absolute64) { if (jumps_number == max_jumps_number) { max_jumps_number += 512; jumps_table = realloc(jumps_table, max_jumps_number*sizeof(jump_table)); } jumps_table[jumps_number].pc_addr = pc_addr; jumps_table[jumps_number].mi_addr = mi_addr; jumps_table[jumps_number].absolute64 = absolute64; jumps_number++; } /* Global Functions */ void init_assembler(void *block_jumps_table, int block_jumps_number, void *block_riprel_table, int block_riprel_number) { if (block_jumps_table) { jumps_table = block_jumps_table; jumps_number = block_jumps_number; if (jumps_number <= 512) max_jumps_number = 512; else max_jumps_number = (jumps_number + 511) & 0xfffffe00; } else { jumps_table = malloc(512*sizeof(jump_table)); jumps_number = 0; max_jumps_number = 512; } if (block_riprel_table) { riprel_table = block_riprel_table; riprel_number = block_riprel_number; if (riprel_number <= 512) max_riprel_number = 512; else max_riprel_number = (riprel_number + 511) & 0xfffffe00; } else { riprel_table = malloc(512 * sizeof(riprelative_table)); riprel_number = 0; max_riprel_number = 512; } } void free_assembler(void **block_jumps_table, int *block_jumps_number, void **block_riprel_table, int *block_riprel_number) { *block_jumps_table = jumps_table; *block_jumps_number = jumps_number; *block_riprel_table = riprel_table; *block_riprel_number = riprel_number; } void passe2(precomp_instr *dest, int start, int end, precomp_block *block) { unsigned int i; build_wrappers(dest, start, end, block); /* First, fix up all the jumps. This involves a table lookup to find the offset into the block of x86_64 code for * for start of a recompiled r4300i instruction corresponding to the given jump destination address in the N64 * address space. Next, the relative offset between this destination and the location of the jump instruction is * computed and stored in memory, so that the jump will branch to the right place in the recompiled code. */ for (i = 0; i < jumps_number; i++) { precomp_instr *jump_instr = dest + ((jumps_table[i].mi_addr - dest[0].addr) / 4); unsigned int jmp_offset_loc = jumps_table[i].pc_addr; unsigned char *addr_dest = NULL; /* calculate the destination address to jump to */ if (jump_instr->reg_cache_infos.need_map) { addr_dest = jump_instr->reg_cache_infos.jump_wrapper; } else { addr_dest = block->code + jump_instr->local_addr; } /* write either a 32-bit IP-relative offset or a 64-bit absolute address */ if (jumps_table[i].absolute64) { *((unsigned long long *) (block->code + jmp_offset_loc)) = (unsigned long long) addr_dest; } else { long jump_rel_offset = (long) (addr_dest - (block->code + jmp_offset_loc + 4)); *((int *) (block->code + jmp_offset_loc)) = (int) jump_rel_offset; if (jump_rel_offset >= 0x7fffffffLL || jump_rel_offset < -0x80000000LL) { DebugMessage(M64MSG_ERROR, "assembler pass2 error: offset too big for relative jump from %p to %p", (block->code + jmp_offset_loc + 4), addr_dest); asm(" int $3; "); } } } /* Next, fix up all of the RIP-relative memory accesses. This is unique to the x86_64 architecture, because * the 32-bit absolute displacement addressing mode is not available (and there's no 64-bit absolute displacement * mode either). */ for (i = 0; i < riprel_number; i++) { unsigned char *rel_offset_ptr = block->code + riprel_table[i].pc_addr; long rip_rel_offset = (long) (riprel_table[i].global_dst - (rel_offset_ptr + 4 + riprel_table[i].extra_bytes)); if (rip_rel_offset >= 0x7fffffffLL || rip_rel_offset < -0x80000000LL) { DebugMessage(M64MSG_ERROR, "assembler pass2 error: offset too big between mem target: %p and code position: %p", riprel_table[i].global_dst, rel_offset_ptr); asm(" int $3; "); } *((int *) rel_offset_ptr) = (int) rip_rel_offset; } } static unsigned int g_jump_start8 = 0; static unsigned int g_jump_start32 = 0; void jump_start_rel8(void) { g_jump_start8 = code_length; } void jump_start_rel32(void) { g_jump_start32 = code_length; } void jump_end_rel8(void) { unsigned int jump_end = code_length; int jump_vec = jump_end - g_jump_start8; if (jump_vec > 127 || jump_vec < -128) { DebugMessage(M64MSG_ERROR, "Error: 8-bit relative jump too long! From %x to %x", g_jump_start8, jump_end); asm(" int $3; "); } code_length = g_jump_start8 - 1; put8(jump_vec); code_length = jump_end; } void jump_end_rel32(void) { unsigned int jump_end = code_length; int jump_vec = jump_end - g_jump_start32; code_length = g_jump_start32 - 4; put32(jump_vec); code_length = jump_end; } mupen64plus-core-src-2.5/src/r4300/x86_64/assemble.h000066400000000000000000000561361251723631200215530ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - assemble.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_ASSEMBLE_H #define M64P_R4300_ASSEMBLE_H #include #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "osal/preproc.h" #include "r4300/recomph.h" extern int64_t reg[32]; #define RAX 0 #define RCX 1 #define RDX 2 #define RBX 3 #define RSP 4 #define RBP 5 #define RSI 6 #define RDI 7 #define EAX 0 #define ECX 1 #define EDX 2 #define EBX 3 #define ESP 4 #define EBP 5 #define ESI 6 #define EDI 7 #define AX 0 #define CX 1 #define DX 2 #define BX 3 #define SP 4 #define BP 5 #define SI 6 #define DI 7 #define AL 0 #define CL 1 #define DL 2 #define BL 3 #define AH 4 #define CH 5 #define DH 6 #define BH 7 extern int branch_taken; extern const uint16_t trunc_mode, round_mode, ceil_mode, floor_mode; void jump_start_rel8(void); void jump_end_rel8(void); void jump_start_rel32(void); void jump_end_rel32(void); void add_jump(unsigned int pc_addr, unsigned int mi_addr, unsigned int absolute64); static inline void put8(unsigned char octet) { (*inst_pointer)[code_length] = octet; code_length++; if (code_length == max_code_length) { *inst_pointer = realloc_exec(*inst_pointer, max_code_length, max_code_length+8192); max_code_length += 8192; } } static inline void put32(unsigned int dword) { if ((code_length + 4) >= max_code_length) { *inst_pointer = realloc_exec(*inst_pointer, max_code_length, max_code_length+8192); max_code_length += 8192; } *((unsigned int *) (*inst_pointer + code_length)) = dword; code_length += 4; } static inline void put64(unsigned long long qword) { if ((code_length + 8) >= max_code_length) { *inst_pointer = realloc_exec(*inst_pointer, max_code_length, max_code_length+8192); max_code_length += 8192; } *((unsigned long long *) (*inst_pointer + code_length)) = qword; code_length += 8; } static inline int rel_r15_offset(void *dest, const char *op_name) { /* calculate the destination pointer's offset from the base of the r4300 registers */ long long rel_offset = (long long) ((unsigned char *) dest - (unsigned char *) reg); if (llabs(rel_offset) > 0x7fffffff) { DebugMessage(M64MSG_ERROR, "Error: destination %p more than 2GB away from r15 base %p in %s()", dest, reg, op_name); OSAL_BREAKPOINT_INTERRUPT; } return (int) rel_offset; } static inline void mov_memoffs32_eax(unsigned int *memoffs32) { put8(0xA3); put64((unsigned long long) memoffs32); } static inline void mov_rax_memoffs64(unsigned long long *memoffs64) { put8(0x48); put8(0xA1); put64((unsigned long long) memoffs64); } static inline void mov_memoffs64_rax(unsigned long long *memoffs64) { put8(0x48); put8(0xA3); put64((unsigned long long) memoffs64); } static inline void mov_m8rel_xreg8(unsigned char *m8, int xreg8) { int offset = rel_r15_offset(m8, "mov_m8rel_xreg8"); put8(0x41 | ((xreg8 & 8) >> 1)); put8(0x88); put8(0x87 | ((xreg8 & 7) << 3)); put32(offset); } static inline void mov_xreg16_m16rel(int xreg16, unsigned short *m16) { int offset = rel_r15_offset(m16, "mov_xreg16_m16rel"); put8(0x66); put8(0x41 | ((xreg16 & 8) >> 1)); put8(0x8B); put8(0x87 | ((xreg16 & 7) << 3)); put32(offset); } static inline void mov_m16rel_xreg16(unsigned short *m16, int xreg16) { int offset = rel_r15_offset(m16, "mov_m16rel_xreg16"); put8(0x66); put8(0x41 | ((xreg16 & 8) >> 1)); put8(0x89); put8(0x87 | ((xreg16 & 7) << 3)); put32(offset); } static inline void cmp_xreg32_m32rel(int xreg32, unsigned int *m32) { int offset = rel_r15_offset(m32, "cmp_xreg32_m32rel"); put8(0x41 | ((xreg32 & 8) >> 1)); put8(0x3B); put8(0x87 | ((xreg32 & 7) << 3)); put32(offset); } static inline void cmp_xreg64_m64rel(int xreg64, unsigned long long *m64) { int offset = rel_r15_offset(m64, "cmp_xreg64_m64rel"); put8(0x49 | ((xreg64 & 8) >> 1)); put8(0x3B); put8(0x87 | ((xreg64 & 7) << 3)); put32(offset); } static inline void cmp_reg32_reg32(int reg1, int reg2) { put8(0x39); put8((reg2 << 3) | reg1 | 0xC0); } static inline void cmp_reg64_reg64(int reg1, int reg2) { put8(0x48); put8(0x39); put8((reg2 << 3) | reg1 | 0xC0); } static inline void cmp_reg32_imm8(int reg32, unsigned char imm8) { put8(0x83); put8(0xF8 + reg32); put8(imm8); } static inline void cmp_reg64_imm8(int reg64, unsigned char imm8) { put8(0x48); put8(0x83); put8(0xF8 + reg64); put8(imm8); } static inline void cmp_reg32_imm32(int reg32, unsigned int imm32) { put8(0x81); put8(0xF8 + reg32); put32(imm32); } static inline void cmp_reg64_imm32(int reg64, unsigned int imm32) { put8(0x48); put8(0x81); put8(0xF8 + reg64); put32(imm32); } static inline void cmp_preg64preg64_imm8(int reg1, int reg2, unsigned char imm8) { put8(0x80); put8(0x3C); put8((reg1 << 3) | reg2); put8(imm8); } static inline void sete_m8rel(unsigned char *m8) { int offset = rel_r15_offset(m8, "sete_m8rel"); put8(0x41); put8(0x0F); put8(0x94); put8(0x87); put32(offset); } static inline void setne_m8rel(unsigned char *m8) { int offset = rel_r15_offset(m8, "setne_m8rel"); put8(0x41); put8(0x0F); put8(0x95); put8(0x87); put32(offset); } static inline void setl_m8rel(unsigned char *m8) { int offset = rel_r15_offset(m8, "setl_m8rel"); put8(0x41); put8(0x0F); put8(0x9C); put8(0x87); put32(offset); } static inline void setle_m8rel(unsigned char *m8) { int offset = rel_r15_offset(m8, "setle_m8rel"); put8(0x41); put8(0x0F); put8(0x9E); put8(0x87); put32(offset); } static inline void setg_m8rel(unsigned char *m8) { int offset = rel_r15_offset(m8, "setg_m8rel"); put8(0x41); put8(0x0F); put8(0x9F); put8(0x87); put32(offset); } static inline void setge_m8rel(unsigned char *m8) { int offset = rel_r15_offset(m8, "setge_m8rel"); put8(0x41); put8(0x0F); put8(0x9D); put8(0x87); put32(offset); } static inline void setl_reg8(unsigned int reg8) { put8(0x40); /* we need an REX prefix to use the uniform byte registers */ put8(0x0F); put8(0x9C); put8(0xC0 | reg8); } static inline void setb_reg8(unsigned int reg8) { put8(0x40); /* we need an REX prefix to use the uniform byte registers */ put8(0x0F); put8(0x92); put8(0xC0 | reg8); } static inline void test_m32rel_imm32(unsigned int *m32, unsigned int imm32) { int offset = rel_r15_offset(m32, "test_m32rel_imm32"); put8(0x41); put8(0xF7); put8(0x87); put32(offset); put32(imm32); } static inline void add_m32rel_xreg32(unsigned int *m32, int xreg32) { int offset = rel_r15_offset(m32, "add_m32rel_xreg32"); put8(0x41 | ((xreg32 & 8) >> 1)); put8(0x01); put8(0x87 | ((xreg32 & 7) << 3)); put32(offset); } static inline void sub_xreg32_m32rel(int xreg32, unsigned int *m32) { int offset = rel_r15_offset(m32, "sub_xreg32_m32rel"); put8(0x41 | ((xreg32 & 8) >> 1)); put8(0x2B); put8(0x87 | ((xreg32 & 7) << 3)); put32(offset); } static inline void sub_reg32_reg32(int reg1, int reg2) { put8(0x29); put8((reg2 << 3) | reg1 | 0xC0); } static inline void sub_reg64_reg64(int reg1, int reg2) { put8(0x48); put8(0x29); put8((reg2 << 3) | reg1 | 0xC0); } static inline void sub_reg64_imm32(int reg64, unsigned int imm32) { put8(0x48); put8(0x81); put8(0xE8 + reg64); put32(imm32); } static inline void sub_eax_imm32(unsigned int imm32) { put8(0x2D); put32(imm32); } static inline void jne_rj(unsigned char saut) { put8(0x75); put8(saut); } static inline void je_rj(unsigned char saut) { put8(0x74); put8(saut); } static inline void jbe_rj(unsigned char saut) { put8(0x76); put8(saut); } static inline void ja_rj(unsigned char saut) { put8(0x77); put8(saut); } static inline void jae_rj(unsigned char saut) { put8(0x73); put8(saut); } static inline void jp_rj(unsigned char saut) { put8(0x7A); put8(saut); } static inline void je_near_rj(unsigned int saut) { put8(0x0F); put8(0x84); put32(saut); } static inline void mov_reg32_imm32(int reg32, unsigned int imm32) { put8(0xB8+reg32); put32(imm32); } static inline void mov_reg64_imm64(int reg64, unsigned long long imm64) { put8(0x48); put8(0xB8+reg64); put64(imm64); } static inline void jmp_imm_short(char saut) { put8(0xEB); put8(saut); } static inline void or_m32rel_imm32(unsigned int *m32, unsigned int imm32) { int offset = rel_r15_offset(m32, "or_m32rel_imm32"); put8(0x41); put8(0x81); put8(0x8F); put32(offset); put32(imm32); } static inline void or_reg64_reg64(unsigned int reg1, unsigned int reg2) { put8(0x48); put8(0x09); put8(0xC0 | (reg2 << 3) | reg1); } static inline void and_reg64_reg64(unsigned int reg1, unsigned int reg2) { put8(0x48); put8(0x21); put8(0xC0 | (reg2 << 3) | reg1); } static inline void and_m32rel_imm32(unsigned int *m32, unsigned int imm32) { int offset = rel_r15_offset(m32, "and_m32rel_imm32"); put8(0x41); put8(0x81); put8(0xA7); put32(offset); put32(imm32); } static inline void xor_reg32_reg32(unsigned int reg1, unsigned int reg2) { put8(0x31); put8(0xC0 | (reg2 << 3) | reg1); } static inline void xor_reg64_reg64(unsigned int reg1, unsigned int reg2) { put8(0x48); put8(0x31); put8(0xC0 | (reg2 << 3) | reg1); } static inline void add_reg64_imm32(unsigned int reg64, unsigned int imm32) { put8(0x48); put8(0x81); put8(0xC0+reg64); put32(imm32); } static inline void add_reg32_imm32(unsigned int reg32, unsigned int imm32) { put8(0x81); put8(0xC0+reg32); put32(imm32); } static inline void inc_m32rel(unsigned int *m32) { int offset = rel_r15_offset(m32, "inc_m32rel"); put8(0x41); put8(0xFF); put8(0x87); put32(offset); } static inline void cmp_m32rel_imm32(unsigned int *m32, unsigned int imm32) { int offset = rel_r15_offset(m32, "cmp_m32rel_imm32"); put8(0x41); put8(0x81); put8(0xBF); put32(offset); put32(imm32); } static inline void cmp_eax_imm32(unsigned int imm32) { put8(0x3D); put32(imm32); } static inline void mov_m32rel_imm32(unsigned int *m32, unsigned int imm32) { int offset = rel_r15_offset(m32, "mov_m32rel_imm32"); put8(0x41); put8(0xC7); put8(0x87); put32(offset); put32(imm32); } static inline void jmp(unsigned int mi_addr) { put8(0xFF); put8(0x25); put32(0); put64(0); add_jump(code_length-8, mi_addr, 1); } static inline void cdq(void) { put8(0x99); } static inline void call_reg64(unsigned int reg64) { put8(0xFF); put8(0xD0+reg64); } static inline void shr_reg64_imm8(unsigned int reg64, unsigned char imm8) { put8(0x48); put8(0xC1); put8(0xE8+reg64); put8(imm8); } static inline void shr_reg32_imm8(unsigned int reg32, unsigned char imm8) { put8(0xC1); put8(0xE8+reg32); put8(imm8); } static inline void shr_reg32_cl(unsigned int reg32) { put8(0xD3); put8(0xE8+reg32); } static inline void shr_reg64_cl(unsigned int reg64) { put8(0x48); put8(0xD3); put8(0xE8+reg64); } static inline void sar_reg32_cl(unsigned int reg32) { put8(0xD3); put8(0xF8+reg32); } static inline void sar_reg64_cl(unsigned int reg64) { put8(0x48); put8(0xD3); put8(0xF8+reg64); } static inline void shl_reg32_cl(unsigned int reg32) { put8(0xD3); put8(0xE0+reg32); } static inline void shl_reg64_cl(unsigned int reg64) { put8(0x48); put8(0xD3); put8(0xE0+reg64); } static inline void sar_reg32_imm8(unsigned int reg32, unsigned char imm8) { put8(0xC1); put8(0xF8+reg32); put8(imm8); } static inline void sar_reg64_imm8(unsigned int reg64, unsigned char imm8) { put8(0x48); put8(0xC1); put8(0xF8+reg64); put8(imm8); } static inline void mul_m32rel(unsigned int *m32) { int offset = rel_r15_offset(m32, "mul_m32rel"); put8(0x41); put8(0xF7); put8(0xA7); put32(offset); } static inline void imul_reg32(unsigned int reg32) { put8(0xF7); put8(0xE8+reg32); } static inline void mul_reg64(unsigned int reg64) { put8(0x48); put8(0xF7); put8(0xE0+reg64); } static inline void mul_reg32(unsigned int reg32) { put8(0xF7); put8(0xE0+reg32); } static inline void idiv_reg32(unsigned int reg32) { put8(0xF7); put8(0xF8+reg32); } static inline void div_reg32(unsigned int reg32) { put8(0xF7); put8(0xF0+reg32); } static inline void add_reg32_reg32(unsigned int reg1, unsigned int reg2) { put8(0x01); put8(0xC0 | (reg2 << 3) | reg1); } static inline void add_reg64_reg64(unsigned int reg1, unsigned int reg2) { put8(0x48); put8(0x01); put8(0xC0 | (reg2 << 3) | reg1); } static inline void jmp_reg64(unsigned int reg64) { put8(0xFF); put8(0xE0 + reg64); } static inline void mov_reg32_preg64(unsigned int reg1, unsigned int reg2) { put8(0x8B); put8((reg1 << 3) | reg2); } static inline void mov_preg64_reg32(int reg1, int reg2) { put8(0x89); put8((reg2 << 3) | reg1); } static inline void mov_reg64_preg64(int reg1, int reg2) { put8(0x48); put8(0x8B); put8((reg1 << 3) | reg2); } static inline void mov_reg32_preg64preg64pimm32(int reg1, int reg2, int reg3, unsigned int imm32) { put8(0x8B); put8((reg1 << 3) | 0x84); put8(reg2 | (reg3 << 3)); put32(imm32); } static inline void mov_preg64preg64pimm32_reg32(int reg1, int reg2, unsigned int imm32, int reg3) { put8(0x89); put8((reg3 << 3) | 0x84); put8(reg1 | (reg2 << 3)); put32(imm32); } static inline void mov_reg64_preg64preg64pimm32(int reg1, int reg2, int reg3, unsigned int imm32) { put8(0x48); put8(0x8B); put8((reg1 << 3) | 0x84); put8(reg2 | (reg3 << 3)); put32(imm32); } static inline void mov_reg32_preg64preg64(int reg1, int reg2, int reg3) { put8(0x8B); put8((reg1 << 3) | 0x04); put8((reg2 << 3) | reg3); } static inline void mov_reg64_preg64preg64(int reg1, int reg2, int reg3) { put8(0x48); put8(0x8B); put8((reg1 << 3) | 0x04); put8(reg2 | (reg3 << 3)); } static inline void mov_reg32_preg64pimm32(int reg1, int reg2, unsigned int imm32) { put8(0x8B); put8(0x80 | (reg1 << 3) | reg2); put32(imm32); } static inline void mov_reg64_preg64pimm32(int reg1, int reg2, unsigned int imm32) { put8(0x48); put8(0x8B); put8(0x80 | (reg1 << 3) | reg2); put32(imm32); } static inline void mov_reg64_preg64pimm8(int reg1, int reg2, unsigned int imm8) { put8(0x48); put8(0x8B); put8(0x40 | (reg1 << 3) | reg2); put8(imm8); } static inline void mov_reg64_preg64x8preg64(int reg1, int reg2, int reg3) { put8(0x48); put8(0x8B); put8((reg1 << 3) | 4); put8(0xC0 | (reg2 << 3) | reg3); } static inline void mov_preg64preg64_reg8(int reg1, int reg2, int reg8) { put8(0x88); put8(0x04 | (reg8 << 3)); put8((reg1 << 3) | reg2); } static inline void mov_preg64preg64_imm8(int reg1, int reg2, unsigned char imm8) { put8(0xC6); put8(0x04); put8((reg1 << 3) | reg2); put8(imm8); } static inline void mov_preg64preg64_reg16(int reg1, int reg2, int reg16) { put8(0x66); put8(0x89); put8(0x04 | (reg16 << 3)); put8((reg1 << 3) | reg2); } static inline void mov_preg64preg64_reg32(int reg1, int reg2, int reg32) { put8(0x89); put8(0x04 | (reg32 << 3)); put8((reg1 << 3) | reg2); } static inline void mov_preg64pimm32_reg32(int reg1, unsigned int imm32, int reg2) { put8(0x89); put8(0x80 | reg1 | (reg2 << 3)); put32(imm32); } static inline void mov_preg64pimm8_reg64(int reg1, unsigned int imm8, int reg2) { put8(0x48); put8(0x89); put8(0x40 | (reg2 << 3) | reg1); put8(imm8); } static inline void add_eax_imm32(unsigned int imm32) { put8(0x05); put32(imm32); } static inline void shl_reg32_imm8(unsigned int reg32, unsigned char imm8) { put8(0xC1); put8(0xE0 + reg32); put8(imm8); } static inline void shl_reg64_imm8(unsigned int reg64, unsigned char imm8) { put8(0x48); put8(0xC1); put8(0xE0 + reg64); put8(imm8); } static inline void mov_reg32_reg32(unsigned int reg1, unsigned int reg2) { if (reg1 == reg2) return; put8(0x89); put8(0xC0 | (reg2 << 3) | reg1); } static inline void mov_reg64_reg64(unsigned int reg1, unsigned int reg2) { if (reg1 == reg2) return; put8(0x48); put8(0x89); put8(0xC0 | (reg2 << 3) | reg1); } static inline void mov_xreg32_m32rel(unsigned int xreg32, unsigned int *m32) { int offset = rel_r15_offset(m32, "mov_xreg32_m32rel"); put8(0x41 | ((xreg32 & 8) >> 1)); put8(0x8B); put8(0x87 | ((xreg32 & 7) << 3)); put32(offset); } static inline void mov_m32rel_xreg32(unsigned int *m32, unsigned int xreg32) { int offset = rel_r15_offset(m32, "mov_m32rel_xreg32"); put8(0x41 | ((xreg32 & 8) >> 1)); put8(0x89); put8(0x87 | ((xreg32 & 7) << 3)); put32(offset); } static inline void mov_xreg64_m64rel(unsigned int xreg64, unsigned long long* m64) { int offset = rel_r15_offset(m64, "mov_xreg64_m64rel"); put8(0x49 | ((xreg64 & 8) >> 1)); put8(0x8B); put8(0x87 | ((xreg64 & 7) << 3)); put32(offset); } static inline void mov_m64rel_xreg64(unsigned long long *m64, unsigned int xreg64) { int offset = rel_r15_offset(m64, "mov_m64rel_xreg64"); put8(0x49 | ((xreg64 & 8) >> 1)); put8(0x89); put8(0x87 | ((xreg64 & 7) << 3)); put32(offset); } static inline void mov_xreg8_m8rel(int xreg8, unsigned char *m8) { int offset = rel_r15_offset(m8, "mov_xreg8_m8rel"); put8(0x41 | ((xreg8 & 8) >> 1)); put8(0x8A); put8(0x87 | ((xreg8 & 7) << 3)); put32(offset); } static inline void and_eax_imm32(unsigned int imm32) { put8(0x25); put32(imm32); } static inline void or_reg64_imm32(int reg64, unsigned int imm32) { put8(0x48); put8(0x81); put8(0xC8 + reg64); put32(imm32); } static inline void and_reg32_imm32(int reg32, unsigned int imm32) { put8(0x81); put8(0xE0 + reg32); put32(imm32); } static inline void and_reg64_imm32(int reg64, unsigned int imm32) { put8(0x48); put8(0x81); put8(0xE0 + reg64); put32(imm32); } static inline void and_reg64_imm8(int reg64, unsigned char imm8) { put8(0x48); put8(0x83); put8(0xE0 + reg64); put8(imm8); } static inline void xor_reg64_imm32(int reg64, unsigned int imm32) { put8(0x48); put8(0x81); put8(0xF0 + reg64); put32(imm32); } static inline void xor_reg8_imm8(int reg8, unsigned char imm8) { put8(0x40); /* we need an REX prefix to use the uniform byte registers */ put8(0x80); put8(0xF0 + reg8); put8(imm8); } static inline void not_reg64(unsigned int reg64) { put8(0x48); put8(0xF7); put8(0xD0 + reg64); } static inline void neg_reg32(unsigned int reg32) { put8(0xF7); put8(0xD8 + reg32); } static inline void neg_reg64(unsigned int reg64) { put8(0x48); put8(0xF7); put8(0xD8 + reg64); } static inline void movsx_xreg32_m8rel(int xreg32, unsigned char *m8) { int offset = rel_r15_offset(m8, "movsx_xreg32_m8rel"); put8(0x41 | ((xreg32 & 8) >> 1)); put8(0x0F); put8(0xBE); put8(0x87 | ((xreg32 & 7) << 3)); put32(offset); } static inline void movsx_reg32_8preg64preg64(int reg1, int reg2, int reg3) { put8(0x0F); put8(0xBE); put8((reg1 << 3) | 0x04); put8((reg2 << 3) | reg3); } static inline void movsx_reg32_16preg64preg64(int reg1, int reg2, int reg3) { put8(0x0F); put8(0xBF); put8((reg1 << 3) | 0x04); put8((reg2 << 3) | reg3); } static inline void movsx_xreg32_m16rel(int xreg32, unsigned short *m16) { int offset = rel_r15_offset(m16, "movsx_xreg32_m16rel"); put8(0x41 | ((xreg32 & 8) >> 1)); put8(0x0F); put8(0xBF); put8(0x87 | ((xreg32 & 7) << 3)); put32(offset); } static inline void movsxd_reg64_reg32(int reg64, int reg32) { put8(0x48); put8(0x63); put8((reg64 << 3) | reg32 | 0xC0); } static inline void fldcw_m16rel(unsigned short *m16) { int offset = rel_r15_offset(m16, "fldcw_m16rel"); put8(0x41); put8(0xD9); put8(0xAF); put32(offset); } static inline void fld_preg64_dword(int reg64) { put8(0xD9); put8(reg64); } static inline void fdiv_preg64_dword(int reg64) { put8(0xD8); put8(0x30 + reg64); } static inline void fstp_preg64_dword(int reg64) { put8(0xD9); put8(0x18 + reg64); } static inline void fchs(void) { put8(0xD9); put8(0xE0); } static inline void fstp_preg64_qword(int reg64) { put8(0xDD); put8(0x18 + reg64); } static inline void fadd_preg64_dword(int reg64) { put8(0xD8); put8(reg64); } static inline void fsub_preg64_dword(int reg64) { put8(0xD8); put8(0x20 + reg64); } static inline void fmul_preg64_dword(int reg64) { put8(0xD8); put8(0x08 + reg64); } static inline void fistp_preg64_dword(int reg64) { put8(0xDB); put8(0x18 + reg64); } static inline void fistp_preg64_qword(int reg64) { put8(0xDF); put8(0x38 + reg64); } static inline void fld_preg64_qword(int reg64) { put8(0xDD); put8(reg64); } static inline void fild_preg64_qword(int reg64) { put8(0xDF); put8(0x28+reg64); } static inline void fild_preg64_dword(int reg64) { put8(0xDB); put8(reg64); } static inline void fadd_preg64_qword(int reg64) { put8(0xDC); put8(reg64); } static inline void fdiv_preg64_qword(int reg64) { put8(0xDC); put8(0x30 + reg64); } static inline void fsub_preg64_qword(int reg64) { put8(0xDC); put8(0x20 + reg64); } static inline void fmul_preg64_qword(int reg64) { put8(0xDC); put8(0x08 + reg64); } static inline void fsqrt(void) { put8(0xD9); put8(0xFA); } static inline void fabs_(void) { put8(0xD9); put8(0xE1); } static inline void fcomip_fpreg(int fpreg) { put8(0xDF); put8(0xF0 + fpreg); } static inline void fucomip_fpreg(int fpreg) { put8(0xDF); put8(0xE8 + fpreg); } static inline void ffree_fpreg(int fpreg) { put8(0xDD); put8(0xC0 + fpreg); } #endif /* M64P_R4300_ASSEMBLE_H */ mupen64plus-core-src-2.5/src/r4300/x86_64/assemble_struct.h000066400000000000000000000035521251723631200231510ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - assemble_struct.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_ASSEMBLE_STRUCT_H #define M64P_R4300_ASSEMBLE_STRUCT_H typedef struct _reg_cache_struct { int need_map; void *needed_registers[8]; unsigned char jump_wrapper[84]; int need_cop1_check; } reg_cache_struct; #endif /* M64P_R4300_ASSEMBLE_STRUCT_H */ mupen64plus-core-src-2.5/src/r4300/x86_64/gbc.c000066400000000000000000000177651251723631200205130ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gbc.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "interpret.h" #include "r4300/cached_interp.h" #include "r4300/cp1_private.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #include "r4300/x86_64/regcache.h" #if defined(COUNT_INSTR) #include "r4300/instr_counters.h" #endif static void genbc1f_test(void) { test_m32rel_imm32((unsigned int*)&FCR31, 0x800000); sete_m8rel((unsigned char *) &branch_taken); } void genbc1f(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[100]); #endif #ifdef INTERPRET_BC1F gencallinterp((unsigned long long)cached_interpreter_table.BC1F, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BC1F, 1); return; } gencheck_cop1_unusable(); genbc1f_test(); gendelayslot(); gentest(); #endif } void genbc1f_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[100]); #endif #ifdef INTERPRET_BC1F_OUT gencallinterp((unsigned long long)cached_interpreter_table.BC1F_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BC1F_OUT, 1); return; } gencheck_cop1_unusable(); genbc1f_test(); gendelayslot(); gentest_out(); #endif } void genbc1f_idle(void) { #ifdef INTERPRET_BC1F_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BC1F_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BC1F_IDLE, 1); return; } gencheck_cop1_unusable(); genbc1f_test(); gentest_idle(); genbc1f(); #endif } static void genbc1t_test(void) { test_m32rel_imm32((unsigned int*)&FCR31, 0x800000); setne_m8rel((unsigned char *) &branch_taken); } void genbc1t(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[101]); #endif #ifdef INTERPRET_BC1T gencallinterp((unsigned long long)cached_interpreter_table.BC1T, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BC1T, 1); return; } gencheck_cop1_unusable(); genbc1t_test(); gendelayslot(); gentest(); #endif } void genbc1t_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[101]); #endif #ifdef INTERPRET_BC1T_OUT gencallinterp((unsigned long long)cached_interpreter_table.BC1T_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BC1T_OUT, 1); return; } gencheck_cop1_unusable(); genbc1t_test(); gendelayslot(); gentest_out(); #endif } void genbc1t_idle(void) { #ifdef INTERPRET_BC1T_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BC1T_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BC1T_IDLE, 1); return; } gencheck_cop1_unusable(); genbc1t_test(); gentest_idle(); genbc1t(); #endif } void genbc1fl(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[102]); #endif #ifdef INTERPRET_BC1FL gencallinterp((unsigned long long)cached_interpreter_table.BC1FL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BC1FL, 1); return; } gencheck_cop1_unusable(); genbc1f_test(); free_all_registers(); gentestl(); #endif } void genbc1fl_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[102]); #endif #ifdef INTERPRET_BC1FL_OUT gencallinterp((unsigned long long)cached_interpreter_table.BC1FL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BC1FL_OUT, 1); return; } gencheck_cop1_unusable(); genbc1f_test(); free_all_registers(); gentestl_out(); #endif } void genbc1fl_idle(void) { #ifdef INTERPRET_BC1FL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BC1FL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BC1FL_IDLE, 1); return; } gencheck_cop1_unusable(); genbc1f_test(); gentest_idle(); genbc1fl(); #endif } void genbc1tl(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[103]); #endif #ifdef INTERPRET_BC1TL gencallinterp((unsigned long long)cached_interpreter_table.BC1TL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BC1TL, 1); return; } gencheck_cop1_unusable(); genbc1t_test(); free_all_registers(); gentestl(); #endif } void genbc1tl_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[103]); #endif #ifdef INTERPRET_BC1TL_OUT gencallinterp((unsigned long long)cached_interpreter_table.BC1TL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BC1TL_OUT, 1); return; } gencheck_cop1_unusable(); genbc1t_test(); free_all_registers(); gentestl_out(); #endif } void genbc1tl_idle(void) { #ifdef INTERPRET_BC1TL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BC1TL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BC1TL_IDLE, 1); return; } gencheck_cop1_unusable(); genbc1t_test(); gentest_idle(); genbc1tl(); #endif } mupen64plus-core-src-2.5/src/r4300/x86_64/gcop0.c000066400000000000000000000042151251723631200207520ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gcop0.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "r4300/cached_interp.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #if defined(COUNT_INSTR) #include "r4300/instr_counters.h" #endif void genmfc0(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[109]); #endif gencallinterp((unsigned long long)cached_interpreter_table.MFC0, 0); } void genmtc0(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[110]); #endif gencallinterp((unsigned long long)cached_interpreter_table.MTC0, 0); } mupen64plus-core-src-2.5/src/r4300/x86_64/gcop1.c000066400000000000000000000126331251723631200207560ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gcop1.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include "assemble.h" #include "interpret.h" #include "memory/memory.h" #include "r4300/cp1_private.h" #include "r4300/macros.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #if defined(COUNT_INSTR) #include "r4300/instr_counters.h" #endif /* These are constants with addresses so that FLDCW can read them. * They are declared 'extern' so that other files can do the same. */ const uint16_t trunc_mode = 0xF3F; const uint16_t round_mode = 0x33F; const uint16_t ceil_mode = 0xB3F; const uint16_t floor_mode = 0x73F; void genmfc1(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[111]); #endif #ifdef INTERPRET_MFC1 gencallinterp((unsigned long long)cached_interpreter_table.MFC1, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.r.nrd])); mov_reg32_preg64(EBX, RAX); mov_m32rel_xreg32((unsigned int*)dst->f.r.rt, EBX); sar_reg32_imm8(EBX, 31); mov_m32rel_xreg32(((unsigned int*)dst->f.r.rt)+1, EBX); #endif } void gendmfc1(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[112]); #endif #ifdef INTERPRET_DMFC1 gencallinterp((unsigned long long)cached_interpreter_table.DMFC1, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *) (®_cop1_double[dst->f.r.nrd])); mov_reg32_preg64(EBX, RAX); mov_reg32_preg64pimm32(ECX, RAX, 4); mov_m32rel_xreg32((unsigned int*)dst->f.r.rt, EBX); mov_m32rel_xreg32(((unsigned int*)dst->f.r.rt)+1, ECX); #endif } void gencfc1(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[113]); #endif #ifdef INTERPRET_CFC1 gencallinterp((unsigned long long)cached_interpreter_table.CFC1, 0); #else gencheck_cop1_unusable(); if(dst->f.r.nrd == 31) mov_xreg32_m32rel(EAX, (unsigned int*)&FCR31); else mov_xreg32_m32rel(EAX, (unsigned int*)&FCR0); mov_m32rel_xreg32((unsigned int*)dst->f.r.rt, EAX); sar_reg32_imm8(EAX, 31); mov_m32rel_xreg32(((unsigned int*)dst->f.r.rt)+1, EAX); #endif } void genmtc1(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[114]); #endif #ifdef INTERPRET_MTC1 gencallinterp((unsigned long long)cached_interpreter_table.MTC1, 0); #else gencheck_cop1_unusable(); mov_xreg32_m32rel(EAX, (unsigned int*)dst->f.r.rt); mov_xreg64_m64rel(RBX, (unsigned long long *)(®_cop1_simple[dst->f.r.nrd])); mov_preg64_reg32(RBX, EAX); #endif } void gendmtc1(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[115]); #endif #ifdef INTERPRET_DMTC1 gencallinterp((unsigned long long)cached_interpreter_table.DMTC1, 0); #else gencheck_cop1_unusable(); mov_xreg32_m32rel(EAX, (unsigned int*)dst->f.r.rt); mov_xreg32_m32rel(EBX, ((unsigned int*)dst->f.r.rt)+1); mov_xreg64_m64rel(RDX, (unsigned long long *)(®_cop1_double[dst->f.r.nrd])); mov_preg64_reg32(RDX, EAX); mov_preg64pimm32_reg32(RDX, 4, EBX); #endif } void genctc1(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[116]); #endif #ifdef INTERPRET_CTC1 gencallinterp((unsigned long long)cached_interpreter_table.CTC1, 0); #else gencheck_cop1_unusable(); if (dst->f.r.nrd != 31) return; mov_xreg32_m32rel(EAX, (unsigned int*)dst->f.r.rt); mov_m32rel_xreg32((unsigned int*)&FCR31, EAX); and_eax_imm32(3); cmp_eax_imm32(0); jne_rj(13); mov_m32rel_imm32((unsigned int*)&rounding_mode, 0x33F); // 11 jmp_imm_short(51); // 2 cmp_eax_imm32(1); // 5 jne_rj(13); // 2 mov_m32rel_imm32((unsigned int*)&rounding_mode, 0xF3F); // 11 jmp_imm_short(31); // 2 cmp_eax_imm32(2); // 5 jne_rj(13); // 2 mov_m32rel_imm32((unsigned int*)&rounding_mode, 0xB3F); // 11 jmp_imm_short(11); // 2 mov_m32rel_imm32((unsigned int*)&rounding_mode, 0x73F); // 11 fldcw_m16rel((unsigned short*)&rounding_mode); #endif } mupen64plus-core-src-2.5/src/r4300/x86_64/gcop1_d.c000066400000000000000000000527161251723631200212670ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gcop1_d.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "interpret.h" #include "r4300/cp1_private.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #if defined(COUNT_INSTR) #include "r4300/instr_counters.h" #endif void genadd_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[119]); #endif #ifdef INTERPRET_ADD_D gencallinterp((unsigned long long)cached_interpreter_table.ADD_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fadd_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fstp_preg64_qword(RAX); #endif } void gensub_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[120]); #endif #ifdef INTERPRET_SUB_D gencallinterp((unsigned long long)cached_interpreter_table.SUB_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fsub_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fstp_preg64_qword(RAX); #endif } void genmul_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[121]); #endif #ifdef INTERPRET_MUL_D gencallinterp((unsigned long long)cached_interpreter_table.MUL_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fmul_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fstp_preg64_qword(RAX); #endif } void gendiv_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[122]); #endif #ifdef INTERPRET_DIV_D gencallinterp((unsigned long long)cached_interpreter_table.DIV_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fdiv_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fstp_preg64_qword(RAX); #endif } void gensqrt_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[123]); #endif #ifdef INTERPRET_SQRT_D gencallinterp((unsigned long long)cached_interpreter_table.SQRT_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fsqrt(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fstp_preg64_qword(RAX); #endif } void genabs_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[124]); #endif #ifdef INTERPRET_ABS_D gencallinterp((unsigned long long)cached_interpreter_table.ABS_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fabs_(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fstp_preg64_qword(RAX); #endif } void genmov_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[125]); #endif #ifdef INTERPRET_MOV_D gencallinterp((unsigned long long)cached_interpreter_table.MOV_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); mov_reg32_preg64(EBX, RAX); mov_reg32_preg64pimm32(ECX, RAX, 4); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); mov_preg64_reg32(RAX, EBX); mov_preg64pimm32_reg32(RAX, 4, ECX); #endif } void genneg_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[126]); #endif #ifdef INTERPRET_NEG_D gencallinterp((unsigned long long)cached_interpreter_table.NEG_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fchs(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fstp_preg64_qword(RAX); #endif } void genround_l_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[127]); #endif #ifdef INTERPRET_ROUND_L_D gencallinterp((unsigned long long)cached_interpreter_table.ROUND_L_D, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&round_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fistp_preg64_qword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void gentrunc_l_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[128]); #endif #ifdef INTERPRET_TRUNC_L_D gencallinterp((unsigned long long)cached_interpreter_table.TRUNC_L_D, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&trunc_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fistp_preg64_qword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void genceil_l_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[129]); #endif #ifdef INTERPRET_CEIL_L_D gencallinterp((unsigned long long)cached_interpreter_table.CEIL_L_D, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&ceil_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fistp_preg64_qword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void genfloor_l_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[130]); #endif #ifdef INTERPRET_FLOOR_L_D gencallinterp((unsigned long long)cached_interpreter_table.FLOOR_L_D, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&floor_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fistp_preg64_qword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void genround_w_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[127]); #endif #ifdef INTERPRET_ROUND_W_D gencallinterp((unsigned long long)cached_interpreter_table.ROUND_W_D, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&round_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg64_dword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void gentrunc_w_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[128]); #endif #ifdef INTERPRET_TRUNC_W_D gencallinterp((unsigned long long)cached_interpreter_table.TRUNC_W_D, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&trunc_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg64_dword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void genceil_w_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[129]); #endif #ifdef INTERPRET_CEIL_W_D gencallinterp((unsigned long long)cached_interpreter_table.CEIL_W_D, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&ceil_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg64_dword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void genfloor_w_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[130]); #endif #ifdef INTERPRET_FLOOR_W_D gencallinterp((unsigned long long)cached_interpreter_table.FLOOR_W_D, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&floor_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg64_dword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void gencvt_s_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[117]); #endif #ifdef INTERPRET_CVT_S_D gencallinterp((unsigned long long)cached_interpreter_table.CVT_S_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg64_dword(RAX); #endif } void gencvt_w_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[117]); #endif #ifdef INTERPRET_CVT_W_D gencallinterp((unsigned long long)cached_interpreter_table.CVT_W_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg64_dword(RAX); #endif } void gencvt_l_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[117]); #endif #ifdef INTERPRET_CVT_L_D gencallinterp((unsigned long long)cached_interpreter_table.CVT_L_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fistp_preg64_qword(RAX); #endif } void genc_f_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_F_D gencallinterp((unsigned long long)cached_interpreter_table.C_F_D, 0); #else gencheck_cop1_unusable(); and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); #endif } void genc_un_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_UN_D gencallinterp((unsigned long long)cached_interpreter_table.C_UN_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(13); and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 jmp_imm_short(11); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 #endif } void genc_eq_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_EQ_D gencallinterp((unsigned long long)cached_interpreter_table.C_EQ_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fucomip_fpreg(1); ffree_fpreg(0); jne_rj(13); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_ueq_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_UEQ_D gencallinterp((unsigned long long)cached_interpreter_table.C_UEQ_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(15); jne_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_olt_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_OLT_D gencallinterp((unsigned long long)cached_interpreter_table.C_OLT_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fucomip_fpreg(1); ffree_fpreg(0); jae_rj(13); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_ult_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_ULT_D gencallinterp((unsigned long long)cached_interpreter_table.C_ULT_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(15); jae_rj(13); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_ole_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_OLE_D gencallinterp((unsigned long long)cached_interpreter_table.C_OLE_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fucomip_fpreg(1); ffree_fpreg(0); ja_rj(13); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_ule_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_ULE_D gencallinterp((unsigned long long)cached_interpreter_table.C_ULE_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(15); ja_rj(13); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_sf_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_SF_D gencallinterp((unsigned long long)cached_interpreter_table.C_SF_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fcomip_fpreg(1); ffree_fpreg(0); and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); #endif } void genc_ngle_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_NGLE_D gencallinterp((unsigned long long)cached_interpreter_table.C_NGLE_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(13); and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 jmp_imm_short(11); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 #endif } void genc_seq_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_SEQ_D gencallinterp((unsigned long long)cached_interpreter_table.C_SEQ_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fcomip_fpreg(1); ffree_fpreg(0); jne_rj(13); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_ngl_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_NGL_D gencallinterp((unsigned long long)cached_interpreter_table.C_NGL_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(15); jne_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_lt_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_LT_D gencallinterp((unsigned long long)cached_interpreter_table.C_LT_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fcomip_fpreg(1); ffree_fpreg(0); jae_rj(13); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_nge_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_NGE_D gencallinterp((unsigned long long)cached_interpreter_table.C_NGE_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(15); jae_rj(13); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_le_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_LE_D gencallinterp((unsigned long long)cached_interpreter_table.C_LE_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fcomip_fpreg(1); ffree_fpreg(0); ja_rj(13); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_ngt_d(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_NGT_D gencallinterp((unsigned long long)cached_interpreter_table.C_NGT_D, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.ft])); fld_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fld_preg64_qword(RAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(15); ja_rj(13); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } mupen64plus-core-src-2.5/src/r4300/x86_64/gcop1_l.c000066400000000000000000000053261251723631200212720ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - g_cop1_l.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "assemble.h" #include "interpret.h" #include "r4300/cp1_private.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #if defined(COUNT_INSTR) #include "r4300/instr_counters.h" #endif void gencvt_s_l(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[117]); #endif #ifdef INTERPRET_CVT_S_L gencallinterp((unsigned long long)cached_interpreter_table.CVT_S_L, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fild_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg64_dword(RAX); #endif } void gencvt_d_l(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[117]); #endif #ifdef INTERPRET_CVT_D_L gencallinterp((unsigned long long)cached_interpreter_table.CVT_D_L, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fs])); fild_preg64_qword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fstp_preg64_qword(RAX); #endif } mupen64plus-core-src-2.5/src/r4300/x86_64/gcop1_s.c000066400000000000000000000525511251723631200213030ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gcop1_s.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "interpret.h" #include "r4300/cp1_private.h" #include "r4300/macros.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #if defined(COUNT_INSTR) #include "r4300/instr_counters.h" #endif void genadd_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[119]); #endif #ifdef INTERPRET_ADD_S gencallinterp((unsigned long long)cached_interpreter_table.ADD_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fadd_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg64_dword(RAX); #endif } void gensub_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[120]); #endif #ifdef INTERPRET_SUB_S gencallinterp((unsigned long long)cached_interpreter_table.SUB_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fsub_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg64_dword(RAX); #endif } void genmul_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[121]); #endif #ifdef INTERPRET_MUL_S gencallinterp((unsigned long long)cached_interpreter_table.MUL_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fmul_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg64_dword(RAX); #endif } void gendiv_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[122]); #endif #ifdef INTERPRET_DIV_S gencallinterp((unsigned long long)cached_interpreter_table.DIV_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fdiv_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg64_dword(RAX); #endif } void gensqrt_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[123]); #endif #ifdef INTERPRET_SQRT_S gencallinterp((unsigned long long)cached_interpreter_table.SQRT_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fsqrt(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg64_dword(RAX); #endif } void genabs_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[124]); #endif #ifdef INTERPRET_ABS_S gencallinterp((unsigned long long)cached_interpreter_table.ABS_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fabs_(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg64_dword(RAX); #endif } void genmov_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[125]); #endif #ifdef INTERPRET_MOV_S gencallinterp((unsigned long long)cached_interpreter_table.MOV_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); mov_reg32_preg64(EBX, RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); mov_preg64_reg32(RAX, EBX); #endif } void genneg_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[126]); #endif #ifdef INTERPRET_NEG_S gencallinterp((unsigned long long)cached_interpreter_table.NEG_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fchs(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg64_dword(RAX); #endif } void genround_l_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[127]); #endif #ifdef INTERPRET_ROUND_L_S gencallinterp((unsigned long long)cached_interpreter_table.ROUND_L_S, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&round_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fistp_preg64_qword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void gentrunc_l_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[128]); #endif #ifdef INTERPRET_TRUNC_L_S gencallinterp((unsigned long long)cached_interpreter_table.TRUNC_L_S, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&trunc_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fistp_preg64_qword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void genceil_l_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[129]); #endif #ifdef INTERPRET_CEIL_L_S gencallinterp((unsigned long long)cached_interpreter_table.CEIL_L_S, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&ceil_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fistp_preg64_qword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void genfloor_l_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[130]); #endif #ifdef INTERPRET_FLOOR_L_S gencallinterp((unsigned long long)cached_interpreter_table.FLOOR_L_S, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&floor_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fistp_preg64_qword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void genround_w_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[127]); #endif #ifdef INTERPRET_ROUND_W_S gencallinterp((unsigned long long)cached_interpreter_table.ROUND_W_S, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&round_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg64_dword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void gentrunc_w_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[128]); #endif #ifdef INTERPRET_TRUNC_W_S gencallinterp((unsigned long long)cached_interpreter_table.TRUNC_W_S, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&trunc_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg64_dword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void genceil_w_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[129]); #endif #ifdef INTERPRET_CEIL_W_S gencallinterp((unsigned long long)cached_interpreter_table.CEIL_W_S, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&ceil_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg64_dword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void genfloor_w_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[130]); #endif #ifdef INTERPRET_FLOOR_W_S gencallinterp((unsigned long long)cached_interpreter_table.FLOOR_W_S, 0); #else gencheck_cop1_unusable(); fldcw_m16rel((unsigned short*)&floor_mode); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg64_dword(RAX); fldcw_m16rel((unsigned short*)&rounding_mode); #endif } void gencvt_d_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[117]); #endif #ifdef INTERPRET_CVT_D_S gencallinterp((unsigned long long)cached_interpreter_table.CVT_D_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fstp_preg64_qword(RAX); #endif } void gencvt_w_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[117]); #endif #ifdef INTERPRET_CVT_W_S gencallinterp((unsigned long long)cached_interpreter_table.CVT_W_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fistp_preg64_dword(RAX); #endif } void gencvt_l_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[117]); #endif #ifdef INTERPRET_CVT_L_S gencallinterp((unsigned long long)cached_interpreter_table.CVT_L_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fistp_preg64_qword(RAX); #endif } void genc_f_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_F_S gencallinterp((unsigned long long)cached_interpreter_table.C_F_S, 0); #else gencheck_cop1_unusable(); and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); #endif } void genc_un_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_UN_S gencallinterp((unsigned long long)cached_interpreter_table.C_UN_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(13); and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 jmp_imm_short(11); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 #endif } void genc_eq_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_EQ_S gencallinterp((unsigned long long)cached_interpreter_table.C_EQ_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fucomip_fpreg(1); ffree_fpreg(0); jne_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_ueq_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_UEQ_S gencallinterp((unsigned long long)cached_interpreter_table.C_UEQ_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(15); jne_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_olt_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_OLT_S gencallinterp((unsigned long long)cached_interpreter_table.C_OLT_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fucomip_fpreg(1); ffree_fpreg(0); jae_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_ult_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_ULT_S gencallinterp((unsigned long long)cached_interpreter_table.C_ULT_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(15); jae_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_ole_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_OLE_S gencallinterp((unsigned long long)cached_interpreter_table.C_OLE_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fucomip_fpreg(1); ffree_fpreg(0); ja_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_ule_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_ULE_S gencallinterp((unsigned long long)cached_interpreter_table.C_ULE_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fucomip_fpreg(1); ffree_fpreg(0); jp_rj(15); ja_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_sf_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_SF_S gencallinterp((unsigned long long)cached_interpreter_table.C_SF_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fcomip_fpreg(1); ffree_fpreg(0); and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); #endif } void genc_ngle_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_NGLE_S gencallinterp((unsigned long long)cached_interpreter_table.C_NGLE_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(13); and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 jmp_imm_short(11); // 2 or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 #endif } void genc_seq_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_SEQ_S gencallinterp((unsigned long long)cached_interpreter_table.C_SEQ_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fcomip_fpreg(1); ffree_fpreg(0); jne_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_ngl_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_NGL_S gencallinterp((unsigned long long)cached_interpreter_table.C_NGL_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(15); jne_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_lt_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_LT_S gencallinterp((unsigned long long)cached_interpreter_table.C_LT_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fcomip_fpreg(1); ffree_fpreg(0); jae_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_nge_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_NGE_S gencallinterp((unsigned long long)cached_interpreter_table.C_NGE_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(15); jae_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_le_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_LE_S gencallinterp((unsigned long long)cached_interpreter_table.C_LE_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fcomip_fpreg(1); ffree_fpreg(0); ja_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } void genc_ngt_s(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[118]); #endif #ifdef INTERPRET_C_NGT_S gencallinterp((unsigned long long)cached_interpreter_table.C_NGT_S, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.ft])); fld_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fld_preg64_dword(RAX); fcomip_fpreg(1); ffree_fpreg(0); jp_rj(15); ja_rj(13); or_m32rel_imm32((unsigned int*)&FCR31, 0x800000); // 11 jmp_imm_short(11); // 2 and_m32rel_imm32((unsigned int*)&FCR31, ~0x800000); // 11 #endif } mupen64plus-core-src-2.5/src/r4300/x86_64/gcop1_w.c000066400000000000000000000053521251723631200213040ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gcop1_w.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "interpret.h" #include "r4300/cp1_private.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #if defined(COUNT_INSTR) #include "r4300/instr_counters.h" #endif void gencvt_s_w(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[117]); #endif #ifdef INTERPRET_CVT_S_W gencallinterp((unsigned long long)cached_interpreter_table.CVT_S_W, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fild_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fd])); fstp_preg64_dword(RAX); #endif } void gencvt_d_w(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[117]); #endif #ifdef INTERPRET_CVT_D_W gencallinterp((unsigned long long)cached_interpreter_table.CVT_D_W, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_simple[dst->f.cf.fs])); fild_preg64_dword(RAX); mov_xreg64_m64rel(RAX, (unsigned long long *)(®_cop1_double[dst->f.cf.fd])); fstp_preg64_qword(RAX); #endif } mupen64plus-core-src-2.5/src/r4300/x86_64/gr4300.c000066400000000000000000001760011251723631200206640ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gr4300.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include "api/debugger.h" #include "assemble.h" #include "interpret.h" #include "main/main.h" #include "memory/memory.h" #include "r4300/cached_interp.h" #include "r4300/cp0_private.h" #include "r4300/cp1_private.h" #include "r4300/exception.h" #include "r4300/interupt.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #include "regcache.h" #if defined(COUNT_INSTR) #include "r4300/instr_counters.h" #endif #if !defined(offsetof) # define offsetof(TYPE,MEMBER) ((unsigned int) &((TYPE*)0)->MEMBER) #endif static precomp_instr fake_instr; #ifdef COMPARE_CORE static long long debug_reg_storage[8]; #endif int branch_taken = 0; /* static functions */ static void genupdate_count(unsigned int addr) { #if !defined(COMPARE_CORE) && !defined(DBG) mov_reg32_imm32(EAX, addr); sub_xreg32_m32rel(EAX, (unsigned int*)(&last_addr)); shr_reg32_imm8(EAX, 2); mov_xreg32_m32rel(EDX, (void*)&count_per_op); mul_reg32(EDX); add_m32rel_xreg32((unsigned int*)(&g_cp0_regs[CP0_COUNT_REG]), EAX); #else mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); mov_reg64_imm64(RAX, (unsigned long long)update_count); call_reg64(RAX); #endif } static void gencheck_interupt(unsigned long long instr_structure) { mov_xreg32_m32rel(EAX, (void*)(&next_interupt)); cmp_xreg32_m32rel(EAX, (void*)&g_cp0_regs[CP0_COUNT_REG]); ja_rj(0); jump_start_rel8(); mov_reg64_imm64(RAX, (unsigned long long) instr_structure); mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); mov_reg64_imm64(RAX, (unsigned long long) gen_interupt); call_reg64(RAX); jump_end_rel8(); } static void gencheck_interupt_out(unsigned int addr) { mov_xreg32_m32rel(EAX, (void*)(&next_interupt)); cmp_xreg32_m32rel(EAX, (void*)&g_cp0_regs[CP0_COUNT_REG]); ja_rj(0); jump_start_rel8(); mov_m32rel_imm32((unsigned int*)(&fake_instr.addr), addr); mov_reg64_imm64(RAX, (unsigned long long) (&fake_instr)); mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); mov_reg64_imm64(RAX, (unsigned long long) gen_interupt); call_reg64(RAX); jump_end_rel8(); } static void genbeq_test(void) { int rs_64bit = is64((unsigned int *)dst->f.i.rs); int rt_64bit = is64((unsigned int *)dst->f.i.rt); if (rs_64bit == 0 && rt_64bit == 0) { int rs = allocate_register_32((unsigned int *)dst->f.i.rs); int rt = allocate_register_32((unsigned int *)dst->f.i.rt); cmp_reg32_reg32(rs, rt); sete_m8rel((unsigned char *) &branch_taken); } else if (rs_64bit == -1) { int rt = allocate_register_64((unsigned long long *)dst->f.i.rt); cmp_xreg64_m64rel(rt, (unsigned long long *) dst->f.i.rs); sete_m8rel((unsigned char *) &branch_taken); } else if (rt_64bit == -1) { int rs = allocate_register_64((unsigned long long *)dst->f.i.rs); cmp_xreg64_m64rel(rs, (unsigned long long *)dst->f.i.rt); sete_m8rel((unsigned char *) &branch_taken); } else { int rs = allocate_register_64((unsigned long long *)dst->f.i.rs); int rt = allocate_register_64((unsigned long long *)dst->f.i.rt); cmp_reg64_reg64(rs, rt); sete_m8rel((unsigned char *) &branch_taken); } } static void genbne_test(void) { int rs_64bit = is64((unsigned int *)dst->f.i.rs); int rt_64bit = is64((unsigned int *)dst->f.i.rt); if (rs_64bit == 0 && rt_64bit == 0) { int rs = allocate_register_32((unsigned int *)dst->f.i.rs); int rt = allocate_register_32((unsigned int *)dst->f.i.rt); cmp_reg32_reg32(rs, rt); setne_m8rel((unsigned char *) &branch_taken); } else if (rs_64bit == -1) { int rt = allocate_register_64((unsigned long long *) dst->f.i.rt); cmp_xreg64_m64rel(rt, (unsigned long long *)dst->f.i.rs); setne_m8rel((unsigned char *) &branch_taken); } else if (rt_64bit == -1) { int rs = allocate_register_64((unsigned long long *) dst->f.i.rs); cmp_xreg64_m64rel(rs, (unsigned long long *)dst->f.i.rt); setne_m8rel((unsigned char *) &branch_taken); } else { int rs = allocate_register_64((unsigned long long *)dst->f.i.rs); int rt = allocate_register_64((unsigned long long *)dst->f.i.rt); cmp_reg64_reg64(rs, rt); setne_m8rel((unsigned char *) &branch_taken); } } static void genblez_test(void) { int rs_64bit = is64((unsigned int *)dst->f.i.rs); if (rs_64bit == 0) { int rs = allocate_register_32((unsigned int *)dst->f.i.rs); cmp_reg32_imm32(rs, 0); setle_m8rel((unsigned char *) &branch_taken); } else { int rs = allocate_register_64((unsigned long long *)dst->f.i.rs); cmp_reg64_imm8(rs, 0); setle_m8rel((unsigned char *) &branch_taken); } } static void genbgtz_test(void) { int rs_64bit = is64((unsigned int *)dst->f.i.rs); if (rs_64bit == 0) { int rs = allocate_register_32((unsigned int *)dst->f.i.rs); cmp_reg32_imm32(rs, 0); setg_m8rel((unsigned char *) &branch_taken); } else { int rs = allocate_register_64((unsigned long long *)dst->f.i.rs); cmp_reg64_imm8(rs, 0); setg_m8rel((unsigned char *) &branch_taken); } } static void ld_register_alloc(int *pGpr1, int *pGpr2, int *pBase1, int *pBase2) { int gpr1, gpr2, base1, base2 = 0; #ifdef COMPARE_CORE free_registers_move_start(); // to maintain parity with 32-bit core #endif if (dst->f.i.rs == dst->f.i.rt) { allocate_register_32((unsigned int*)dst->f.r.rs); // tell regcache we need to read RS register here gpr1 = allocate_register_32_w((unsigned int*)dst->f.r.rt); // tell regcache we will modify RT register during this instruction gpr2 = lock_register(lru_register()); // free and lock least recently used register for usage here add_reg32_imm32(gpr1, (int)dst->f.i.immediate); mov_reg32_reg32(gpr2, gpr1); } else { gpr2 = allocate_register_32((unsigned int*)dst->f.r.rs); // tell regcache we need to read RS register here gpr1 = allocate_register_32_w((unsigned int*)dst->f.r.rt); // tell regcache we will modify RT register during this instruction free_register(gpr2); // write out gpr2 if dirty because I'm going to trash it right now add_reg32_imm32(gpr2, (int)dst->f.i.immediate); mov_reg32_reg32(gpr1, gpr2); lock_register(gpr2); // lock the freed gpr2 it so it doesn't get returned in the lru query } base1 = lock_register(lru_base_register()); // get another lru register if (!fast_memory) { base2 = lock_register(lru_base_register()); // and another one if necessary unlock_register(base2); } unlock_register(base1); // unlock the locked registers (they are unlock_register(gpr2); set_register_state(gpr1, NULL, 0, 0); // clear gpr1 state because it hasn't been written yet - // we don't want it to be pushed/popped around read_rdramX call *pGpr1 = gpr1; *pGpr2 = gpr2; *pBase1 = base1; *pBase2 = base2; } /* global functions */ void gennotcompiled(void) { free_registers_move_start(); mov_reg64_imm64(RAX, (unsigned long long) dst); mov_memoffs64_rax((unsigned long long *) &PC); /* RIP-relative will not work here */ mov_reg64_imm64(RAX, (unsigned long long) cached_interpreter_table.NOTCOMPILED); call_reg64(RAX); } void genlink_subblock(void) { free_all_registers(); jmp(dst->addr+4); } #ifdef COMPARE_CORE extern unsigned int op; /* api/debugger.c */ void gendebug(void) { free_all_registers(); mov_memoffs64_rax((unsigned long long *) &debug_reg_storage); mov_reg64_imm64(RAX, (unsigned long long) &debug_reg_storage); mov_preg64pimm8_reg64(RAX, 8, RBX); mov_preg64pimm8_reg64(RAX, 16, RCX); mov_preg64pimm8_reg64(RAX, 24, RDX); mov_preg64pimm8_reg64(RAX, 32, RSP); mov_preg64pimm8_reg64(RAX, 40, RBP); mov_preg64pimm8_reg64(RAX, 48, RSI); mov_preg64pimm8_reg64(RAX, 56, RDI); mov_reg64_imm64(RAX, (unsigned long long) dst); mov_memoffs64_rax((unsigned long long *) &PC); mov_reg32_imm32(EAX, (unsigned int) src); mov_memoffs32_eax((unsigned int *) &op); mov_reg64_imm64(RAX, (unsigned long long) CoreCompareCallback); call_reg64(RAX); mov_reg64_imm64(RAX, (unsigned long long) &debug_reg_storage); mov_reg64_preg64pimm8(RDI, RAX, 56); mov_reg64_preg64pimm8(RSI, RAX, 48); mov_reg64_preg64pimm8(RBP, RAX, 40); mov_reg64_preg64pimm8(RSP, RAX, 32); mov_reg64_preg64pimm8(RDX, RAX, 24); mov_reg64_preg64pimm8(RCX, RAX, 16); mov_reg64_preg64pimm8(RBX, RAX, 8); mov_reg64_preg64(RAX, RAX); } #endif void gencallinterp(unsigned long addr, int jump) { free_registers_move_start(); if (jump) mov_m32rel_imm32((unsigned int*)(&dyna_interp), 1); mov_reg64_imm64(RAX, (unsigned long long) dst); mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); mov_reg64_imm64(RAX, addr); call_reg64(RAX); if (jump) { mov_m32rel_imm32((unsigned int*)(&dyna_interp), 0); mov_reg64_imm64(RAX, (unsigned long long)dyna_jump); call_reg64(RAX); } } void gendelayslot(void) { mov_m32rel_imm32((void*)(&delay_slot), 1); recompile_opcode(); free_all_registers(); genupdate_count(dst->addr+4); mov_m32rel_imm32((void*)(&delay_slot), 0); } void genni(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[1]); #endif gencallinterp((unsigned long long)cached_interpreter_table.NI, 0); } void genreserved(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[0]); #endif gencallinterp((unsigned long long)cached_interpreter_table.RESERVED, 0); } void genfin_block(void) { gencallinterp((unsigned long long)cached_interpreter_table.FIN_BLOCK, 0); } void gencheck_interupt_reg(void) // addr is in EAX { mov_xreg32_m32rel(EBX, (void*)&next_interupt); cmp_xreg32_m32rel(EBX, (void*)&g_cp0_regs[CP0_COUNT_REG]); ja_rj(0); jump_start_rel8(); mov_m32rel_xreg32((unsigned int*)(&fake_instr.addr), EAX); mov_reg64_imm64(RAX, (unsigned long long) (&fake_instr)); mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); mov_reg64_imm64(RAX, (unsigned long long) gen_interupt); call_reg64(RAX); jump_end_rel8(); } void gennop(void) { } void genj(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[2]); #endif #ifdef INTERPRET_J gencallinterp((unsigned long long)cached_interpreter_table.J, 1); #else unsigned int naddr; if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.J, 1); return; } gendelayslot(); naddr = ((dst-1)->f.j.inst_index<<2) | (dst->addr & 0xF0000000); mov_m32rel_imm32((void*)(&last_addr), naddr); gencheck_interupt((unsigned long long) &actual->block[(naddr-actual->start)/4]); jmp(naddr); #endif } void genj_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[2]); #endif #ifdef INTERPRET_J_OUT gencallinterp((unsigned long long)cached_interpreter_table.J_OUT, 1); #else unsigned int naddr; if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.J_OUT, 1); return; } gendelayslot(); naddr = ((dst-1)->f.j.inst_index<<2) | (dst->addr & 0xF0000000); mov_m32rel_imm32((void*)(&last_addr), naddr); gencheck_interupt_out(naddr); mov_m32rel_imm32(&jump_to_address, naddr); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); mov_reg64_imm64(RAX, (unsigned long long)jump_to_func); call_reg64(RAX); #endif } void genj_idle(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[2]); #endif #ifdef INTERPRET_J_IDLE gencallinterp((unsigned long long)cached_interpreter_table.J_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.J_IDLE, 1); return; } mov_xreg32_m32rel(EAX, (unsigned int *)(&next_interupt)); sub_xreg32_m32rel(EAX, (unsigned int *)(&g_cp0_regs[CP0_COUNT_REG])); cmp_reg32_imm8(EAX, 3); jbe_rj(12); and_eax_imm32(0xFFFFFFFC); // 5 add_m32rel_xreg32((unsigned int *)(&g_cp0_regs[CP0_COUNT_REG]), EAX); // 7 genj(); #endif } void genjal(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[3]); #endif #ifdef INTERPRET_JAL gencallinterp((unsigned long long)cached_interpreter_table.JAL, 1); #else unsigned int naddr; if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.JAL, 1); return; } gendelayslot(); mov_m32rel_imm32((unsigned int *)(reg + 31), dst->addr + 4); if (((dst->addr + 4) & 0x80000000)) mov_m32rel_imm32((unsigned int *)(®[31])+1, 0xFFFFFFFF); else mov_m32rel_imm32((unsigned int *)(®[31])+1, 0); naddr = ((dst-1)->f.j.inst_index<<2) | (dst->addr & 0xF0000000); mov_m32rel_imm32((void*)(&last_addr), naddr); gencheck_interupt((unsigned long long) &actual->block[(naddr-actual->start)/4]); jmp(naddr); #endif } void genjal_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[3]); #endif #ifdef INTERPRET_JAL_OUT gencallinterp((unsigned long long)cached_interpreter_table.JAL_OUT, 1); #else unsigned int naddr; if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.JAL_OUT, 1); return; } gendelayslot(); mov_m32rel_imm32((unsigned int *)(reg + 31), dst->addr + 4); if (((dst->addr + 4) & 0x80000000)) mov_m32rel_imm32((unsigned int *)(®[31])+1, 0xFFFFFFFF); else mov_m32rel_imm32((unsigned int *)(®[31])+1, 0); naddr = ((dst-1)->f.j.inst_index<<2) | (dst->addr & 0xF0000000); mov_m32rel_imm32((void*)(&last_addr), naddr); gencheck_interupt_out(naddr); mov_m32rel_imm32(&jump_to_address, naddr); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); mov_reg64_imm64(RAX, (unsigned long long) jump_to_func); call_reg64(RAX); #endif } void genjal_idle(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[3]); #endif #ifdef INTERPRET_JAL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.JAL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.JAL_IDLE, 1); return; } mov_xreg32_m32rel(EAX, (unsigned int *)(&next_interupt)); sub_xreg32_m32rel(EAX, (unsigned int *)(&g_cp0_regs[CP0_COUNT_REG])); cmp_reg32_imm8(EAX, 3); jbe_rj(12); and_eax_imm32(0xFFFFFFFC); // 5 add_m32rel_xreg32((unsigned int *)(&g_cp0_regs[CP0_COUNT_REG]), EAX); // 7 genjal(); #endif } void gentest(void) { cmp_m32rel_imm32((unsigned int *)(&branch_taken), 0); je_near_rj(0); jump_start_rel32(); mov_m32rel_imm32((void*)(&last_addr), dst->addr + (dst-1)->f.i.immediate*4); gencheck_interupt((unsigned long long) (dst + (dst-1)->f.i.immediate)); jmp(dst->addr + (dst-1)->f.i.immediate*4); jump_end_rel32(); mov_m32rel_imm32((void*)(&last_addr), dst->addr + 4); gencheck_interupt((unsigned long long)(dst + 1)); jmp(dst->addr + 4); } void genbeq(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[4]); #endif #ifdef INTERPRET_BEQ gencallinterp((unsigned long long)cached_interpreter_table.BEQ, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BEQ, 1); return; } genbeq_test(); gendelayslot(); gentest(); #endif } void gentest_out(void) { cmp_m32rel_imm32((unsigned int *)(&branch_taken), 0); je_near_rj(0); jump_start_rel32(); mov_m32rel_imm32((void*)(&last_addr), dst->addr + (dst-1)->f.i.immediate*4); gencheck_interupt_out(dst->addr + (dst-1)->f.i.immediate*4); mov_m32rel_imm32(&jump_to_address, dst->addr + (dst-1)->f.i.immediate*4); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); mov_reg64_imm64(RAX, (unsigned long long) jump_to_func); call_reg64(RAX); jump_end_rel32(); mov_m32rel_imm32((void*)(&last_addr), dst->addr + 4); gencheck_interupt((unsigned long long) (dst + 1)); jmp(dst->addr + 4); } void genbeq_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[4]); #endif #ifdef INTERPRET_BEQ_OUT gencallinterp((unsigned long long)cached_interpreter_table.BEQ_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BEQ_OUT, 1); return; } genbeq_test(); gendelayslot(); gentest_out(); #endif } void gentest_idle(void) { int reg; reg = lru_register(); free_register(reg); cmp_m32rel_imm32((unsigned int *)(&branch_taken), 0); je_near_rj(0); jump_start_rel32(); mov_xreg32_m32rel(reg, (unsigned int *)(&next_interupt)); sub_xreg32_m32rel(reg, (unsigned int *)(&g_cp0_regs[CP0_COUNT_REG])); cmp_reg32_imm8(reg, 3); jbe_rj(0); jump_start_rel8(); and_reg32_imm32(reg, 0xFFFFFFFC); add_m32rel_xreg32((unsigned int *)(&g_cp0_regs[CP0_COUNT_REG]), reg); jump_end_rel8(); jump_end_rel32(); } void genbeq_idle(void) { #ifdef INTERPRET_BEQ_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BEQ_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BEQ_IDLE, 1); return; } genbeq_test(); gentest_idle(); genbeq(); #endif } void genbne(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[5]); #endif #ifdef INTERPRET_BNE gencallinterp((unsigned long long)cached_interpreter_table.BNE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BNE, 1); return; } genbne_test(); gendelayslot(); gentest(); #endif } void genbne_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[5]); #endif #ifdef INTERPRET_BNE_OUT gencallinterp((unsigned long long)cached_interpreter_table.BNE_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BNE_OUT, 1); return; } genbne_test(); gendelayslot(); gentest_out(); #endif } void genbne_idle(void) { #ifdef INTERPRET_BNE_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BNE_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BNE_IDLE, 1); return; } genbne_test(); gentest_idle(); genbne(); #endif } void genblez(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[6]); #endif #ifdef INTERPRET_BLEZ gencallinterp((unsigned long long)cached_interpreter_table.BLEZ, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLEZ, 1); return; } genblez_test(); gendelayslot(); gentest(); #endif } void genblez_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[6]); #endif #ifdef INTERPRET_BLEZ_OUT gencallinterp((unsigned long long)cached_interpreter_table.BLEZ_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLEZ_OUT, 1); return; } genblez_test(); gendelayslot(); gentest_out(); #endif } void genblez_idle(void) { #ifdef INTERPRET_BLEZ_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BLEZ_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLEZ_IDLE, 1); return; } genblez_test(); gentest_idle(); genblez(); #endif } void genbgtz(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[7]); #endif #ifdef INTERPRET_BGTZ gencallinterp((unsigned long long)cached_interpreter_table.BGTZ, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGTZ, 1); return; } genbgtz_test(); gendelayslot(); gentest(); #endif } void genbgtz_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[7]); #endif #ifdef INTERPRET_BGTZ_OUT gencallinterp((unsigned long long)cached_interpreter_table.BGTZ_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGTZ_OUT, 1); return; } genbgtz_test(); gendelayslot(); gentest_out(); #endif } void genbgtz_idle(void) { #ifdef INTERPRET_BGTZ_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BGTZ_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGTZ_IDLE, 1); return; } genbgtz_test(); gentest_idle(); genbgtz(); #endif } void genaddi(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[8]); #endif #ifdef INTERPRET_ADDI gencallinterp((unsigned long long)cached_interpreter_table.ADDI, 0); #else int rs = allocate_register_32((unsigned int *)dst->f.i.rs); int rt = allocate_register_32_w((unsigned int *)dst->f.i.rt); mov_reg32_reg32(rt, rs); add_reg32_imm32(rt,(int)dst->f.i.immediate); #endif } void genaddiu(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[9]); #endif #ifdef INTERPRET_ADDIU gencallinterp((unsigned long long)cached_interpreter_table.ADDIU, 0); #else int rs = allocate_register_32((unsigned int *)dst->f.i.rs); int rt = allocate_register_32_w((unsigned int *)dst->f.i.rt); mov_reg32_reg32(rt, rs); add_reg32_imm32(rt,(int)dst->f.i.immediate); #endif } void genslti(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[10]); #endif #ifdef INTERPRET_SLTI gencallinterp((unsigned long long)cached_interpreter_table.SLTI, 0); #else int rs = allocate_register_64((unsigned long long *) dst->f.i.rs); int rt = allocate_register_64_w((unsigned long long *) dst->f.i.rt); int imm = (int) dst->f.i.immediate; cmp_reg64_imm32(rs, imm); setl_reg8(rt); and_reg64_imm8(rt, 1); #endif } void gensltiu(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[11]); #endif #ifdef INTERPRET_SLTIU gencallinterp((unsigned long long)cached_interpreter_table.SLTIU, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.i.rs); int rt = allocate_register_64_w((unsigned long long *)dst->f.i.rt); int imm = (int) dst->f.i.immediate; cmp_reg64_imm32(rs, imm); setb_reg8(rt); and_reg64_imm8(rt, 1); #endif } void genandi(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[12]); #endif #ifdef INTERPRET_ANDI gencallinterp((unsigned long long)cached_interpreter_table.ANDI, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.i.rs); int rt = allocate_register_64_w((unsigned long long *)dst->f.i.rt); mov_reg64_reg64(rt, rs); and_reg64_imm32(rt, (unsigned short)dst->f.i.immediate); #endif } void genori(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[13]); #endif #ifdef INTERPRET_ORI gencallinterp((unsigned long long)cached_interpreter_table.ORI, 0); #else int rs = allocate_register_64((unsigned long long *) dst->f.i.rs); int rt = allocate_register_64_w((unsigned long long *) dst->f.i.rt); mov_reg64_reg64(rt, rs); or_reg64_imm32(rt, (unsigned short)dst->f.i.immediate); #endif } void genxori(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[14]); #endif #ifdef INTERPRET_XORI gencallinterp((unsigned long long)cached_interpreter_table.XORI, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.i.rs); int rt = allocate_register_64_w((unsigned long long *)dst->f.i.rt); mov_reg64_reg64(rt, rs); xor_reg64_imm32(rt, (unsigned short)dst->f.i.immediate); #endif } void genlui(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[15]); #endif #ifdef INTERPRET_LUI gencallinterp((unsigned long long)cached_interpreter_table.LUI, 0); #else int rt = allocate_register_32_w((unsigned int *)dst->f.i.rt); mov_reg32_imm32(rt, (unsigned int)dst->f.i.immediate << 16); #endif } void gentestl(void) { cmp_m32rel_imm32((unsigned int *)(&branch_taken), 0); je_near_rj(0); jump_start_rel32(); gendelayslot(); mov_m32rel_imm32((void*)(&last_addr), dst->addr + (dst-1)->f.i.immediate*4); gencheck_interupt((unsigned long long) (dst + (dst-1)->f.i.immediate)); jmp(dst->addr + (dst-1)->f.i.immediate*4); jump_end_rel32(); genupdate_count(dst->addr-4); mov_m32rel_imm32((void*)(&last_addr), dst->addr + 4); gencheck_interupt((unsigned long long) (dst + 1)); jmp(dst->addr + 4); } void genbeql(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[16]); #endif #ifdef INTERPRET_BEQL gencallinterp((unsigned long long)cached_interpreter_table.BEQL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BEQL, 1); return; } genbeq_test(); free_all_registers(); gentestl(); #endif } void gentestl_out(void) { cmp_m32rel_imm32((unsigned int *)(&branch_taken), 0); je_near_rj(0); jump_start_rel32(); gendelayslot(); mov_m32rel_imm32((void*)(&last_addr), dst->addr + (dst-1)->f.i.immediate*4); gencheck_interupt_out(dst->addr + (dst-1)->f.i.immediate*4); mov_m32rel_imm32(&jump_to_address, dst->addr + (dst-1)->f.i.immediate*4); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); mov_reg64_imm64(RAX, (unsigned long long) jump_to_func); call_reg64(RAX); jump_end_rel32(); genupdate_count(dst->addr-4); mov_m32rel_imm32((void*)(&last_addr), dst->addr + 4); gencheck_interupt((unsigned long long) (dst + 1)); jmp(dst->addr + 4); } void genbeql_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[16]); #endif #ifdef INTERPRET_BEQL_OUT gencallinterp((unsigned long long)cached_interpreter_table.BEQL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BEQL_OUT, 1); return; } genbeq_test(); free_all_registers(); gentestl_out(); #endif } void genbeql_idle(void) { #ifdef INTERPRET_BEQL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BEQL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BEQL_IDLE, 1); return; } genbeq_test(); gentest_idle(); genbeql(); #endif } void genbnel(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[17]); #endif #ifdef INTERPRET_BNEL gencallinterp((unsigned long long)cached_interpreter_table.BNEL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BNEL, 1); return; } genbne_test(); free_all_registers(); gentestl(); #endif } void genbnel_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[17]); #endif #ifdef INTERPRET_BNEL_OUT gencallinterp((unsigned long long)cached_interpreter_table.BNEL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BNEL_OUT, 1); return; } genbne_test(); free_all_registers(); gentestl_out(); #endif } void genbnel_idle(void) { #ifdef INTERPRET_BNEL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BNEL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BNEL_IDLE, 1); return; } genbne_test(); gentest_idle(); genbnel(); #endif } void genblezl(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[18]); #endif #ifdef INTERPRET_BLEZL gencallinterp((unsigned long long)cached_interpreter_table.BLEZL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLEZL, 1); return; } genblez_test(); free_all_registers(); gentestl(); #endif } void genblezl_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[18]); #endif #ifdef INTERPRET_BLEZL_OUT gencallinterp((unsigned long long)cached_interpreter_table.BLEZL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLEZL_OUT, 1); return; } genblez_test(); free_all_registers(); gentestl_out(); #endif } void genblezl_idle(void) { #ifdef INTERPRET_BLEZL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BLEZL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLEZL_IDLE, 1); return; } genblez_test(); gentest_idle(); genblezl(); #endif } void genbgtzl(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[19]); #endif #ifdef INTERPRET_BGTZL gencallinterp((unsigned long long)cached_interpreter_table.BGTZL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGTZL, 1); return; } genbgtz_test(); free_all_registers(); gentestl(); #endif } void genbgtzl_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[19]); #endif #ifdef INTERPRET_BGTZL_OUT gencallinterp((unsigned long long)cached_interpreter_table.BGTZL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGTZL_OUT, 1); return; } genbgtz_test(); free_all_registers(); gentestl_out(); #endif } void genbgtzl_idle(void) { #ifdef INTERPRET_BGTZL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BGTZL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGTZL_IDLE, 1); return; } genbgtz_test(); gentest_idle(); genbgtzl(); #endif } void gendaddi(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[20]); #endif #ifdef INTERPRET_DADDI gencallinterp((unsigned long long)cached_interpreter_table.DADDI, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.i.rs); int rt = allocate_register_64_w((unsigned long long *)dst->f.i.rt); mov_reg64_reg64(rt, rs); add_reg64_imm32(rt, (int) dst->f.i.immediate); #endif } void gendaddiu(void) { #ifdef INTERPRET_DADDIU gencallinterp((unsigned long long)cached_interpreter_table.DADDIU, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.i.rs); int rt = allocate_register_64_w((unsigned long long *)dst->f.i.rt); mov_reg64_reg64(rt, rs); add_reg64_imm32(rt, (int) dst->f.i.immediate); #endif } void genldl(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[22]); #endif gencallinterp((unsigned long long)cached_interpreter_table.LDL, 0); } void genldr(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[23]); #endif gencallinterp((unsigned long long)cached_interpreter_table.LDR, 0); } void genlb(void) { int gpr1, gpr2, base1, base2 = 0; #if defined(COUNT_INSTR) inc_m32rel(&instr_count[24]); #endif #ifdef INTERPRET_LB gencallinterp((unsigned long long)cached_interpreter_table.LB, 0); #else free_registers_move_start(); ld_register_alloc(&gpr1, &gpr2, &base1, &base2); mov_reg64_imm64(base1, (unsigned long long) readmemb); if(fast_memory) { and_reg32_imm32(gpr1, 0xDF800000); cmp_reg32_imm32(gpr1, 0x80000000); } else { mov_reg64_imm64(base2, (unsigned long long) read_rdramb); shr_reg32_imm8(gpr1, 16); mov_reg64_preg64x8preg64(gpr1, gpr1, base1); cmp_reg64_reg64(gpr1, base2); } je_rj(0); jump_start_rel8(); mov_reg64_imm64(gpr1, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), gpr1); mov_m32rel_xreg32((unsigned int *)(&address), gpr2); mov_reg64_imm64(gpr1, (unsigned long long) dst->f.i.rt); mov_m64rel_xreg64((unsigned long long *)(&rdword), gpr1); shr_reg32_imm8(gpr2, 16); mov_reg64_preg64x8preg64(gpr2, gpr2, base1); call_reg64(gpr2); movsx_xreg32_m8rel(gpr1, (unsigned char *)dst->f.i.rt); jmp_imm_short(24); jump_end_rel8(); mov_reg64_imm64(base1, (unsigned long long) g_rdram); // 10 and_reg32_imm32(gpr2, 0x7FFFFF); // 6 xor_reg8_imm8(gpr2, 3); // 4 movsx_reg32_8preg64preg64(gpr1, gpr2, base1); // 4 set_register_state(gpr1, (unsigned int*)dst->f.i.rt, 1, 0); #endif } void genlh(void) { int gpr1, gpr2, base1, base2 = 0; #if defined(COUNT_INSTR) inc_m32rel(&instr_count[25]); #endif #ifdef INTERPRET_LH gencallinterp((unsigned long long)cached_interpreter_table.LH, 0); #else free_registers_move_start(); ld_register_alloc(&gpr1, &gpr2, &base1, &base2); mov_reg64_imm64(base1, (unsigned long long) readmemh); if(fast_memory) { and_reg32_imm32(gpr1, 0xDF800000); cmp_reg32_imm32(gpr1, 0x80000000); } else { mov_reg64_imm64(base2, (unsigned long long) read_rdramh); shr_reg32_imm8(gpr1, 16); mov_reg64_preg64x8preg64(gpr1, gpr1, base1); cmp_reg64_reg64(gpr1, base2); } je_rj(0); jump_start_rel8(); mov_reg64_imm64(gpr1, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), gpr1); mov_m32rel_xreg32((unsigned int *)(&address), gpr2); mov_reg64_imm64(gpr1, (unsigned long long) dst->f.i.rt); mov_m64rel_xreg64((unsigned long long *)(&rdword), gpr1); shr_reg32_imm8(gpr2, 16); mov_reg64_preg64x8preg64(gpr2, gpr2, base1); call_reg64(gpr2); movsx_xreg32_m16rel(gpr1, (unsigned short *)dst->f.i.rt); jmp_imm_short(24); jump_end_rel8(); mov_reg64_imm64(base1, (unsigned long long) g_rdram); // 10 and_reg32_imm32(gpr2, 0x7FFFFF); // 6 xor_reg8_imm8(gpr2, 2); // 4 movsx_reg32_16preg64preg64(gpr1, gpr2, base1); // 4 set_register_state(gpr1, (unsigned int*)dst->f.i.rt, 1, 0); #endif } void genlwl(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[27]); #endif gencallinterp((unsigned long long)cached_interpreter_table.LWL, 0); } void genlw(void) { int gpr1, gpr2, base1, base2 = 0; #if defined(COUNT_INSTR) inc_m32rel(&instr_count[26]); #endif #ifdef INTERPRET_LW gencallinterp((unsigned long long)cached_interpreter_table.LW, 0); #else free_registers_move_start(); ld_register_alloc(&gpr1, &gpr2, &base1, &base2); mov_reg64_imm64(base1, (unsigned long long) readmem); if(fast_memory) { and_reg32_imm32(gpr1, 0xDF800000); cmp_reg32_imm32(gpr1, 0x80000000); } else { mov_reg64_imm64(base2, (unsigned long long) read_rdram); shr_reg32_imm8(gpr1, 16); mov_reg64_preg64x8preg64(gpr1, gpr1, base1); cmp_reg64_reg64(gpr1, base2); } jne_rj(21); mov_reg64_imm64(base1, (unsigned long long) g_rdram); // 10 and_reg32_imm32(gpr2, 0x7FFFFF); // 6 mov_reg32_preg64preg64(gpr1, gpr2, base1); // 3 jmp_imm_short(0); // 2 jump_start_rel8(); mov_reg64_imm64(gpr1, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), gpr1); mov_m32rel_xreg32((unsigned int *)(&address), gpr2); mov_reg64_imm64(gpr1, (unsigned long long) dst->f.i.rt); mov_m64rel_xreg64((unsigned long long *)(&rdword), gpr1); shr_reg32_imm8(gpr2, 16); mov_reg64_preg64x8preg64(gpr1, gpr2, base1); call_reg64(gpr1); mov_xreg32_m32rel(gpr1, (unsigned int *)(dst->f.i.rt)); jump_end_rel8(); set_register_state(gpr1, (unsigned int*)dst->f.i.rt, 1, 0); // set gpr1 state as dirty, and bound to r4300 reg RT #endif } void genlbu(void) { int gpr1, gpr2, base1, base2 = 0; #if defined(COUNT_INSTR) inc_m32rel(&instr_count[28]); #endif #ifdef INTERPRET_LBU gencallinterp((unsigned long long)cached_interpreter_table.LBU, 0); #else free_registers_move_start(); ld_register_alloc(&gpr1, &gpr2, &base1, &base2); mov_reg64_imm64(base1, (unsigned long long) readmemb); if(fast_memory) { and_reg32_imm32(gpr1, 0xDF800000); cmp_reg32_imm32(gpr1, 0x80000000); } else { mov_reg64_imm64(base2, (unsigned long long) read_rdramb); shr_reg32_imm8(gpr1, 16); mov_reg64_preg64x8preg64(gpr1, gpr1, base1); cmp_reg64_reg64(gpr1, base2); } je_rj(0); jump_start_rel8(); mov_reg64_imm64(gpr1, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), gpr1); mov_m32rel_xreg32((unsigned int *)(&address), gpr2); mov_reg64_imm64(gpr1, (unsigned long long) dst->f.i.rt); mov_m64rel_xreg64((unsigned long long *)(&rdword), gpr1); shr_reg32_imm8(gpr2, 16); mov_reg64_preg64x8preg64(gpr2, gpr2, base1); call_reg64(gpr2); mov_xreg32_m32rel(gpr1, (unsigned int *)dst->f.i.rt); jmp_imm_short(23); jump_end_rel8(); mov_reg64_imm64(base1, (unsigned long long) g_rdram); // 10 and_reg32_imm32(gpr2, 0x7FFFFF); // 6 xor_reg8_imm8(gpr2, 3); // 4 mov_reg32_preg64preg64(gpr1, gpr2, base1); // 3 and_reg32_imm32(gpr1, 0xFF); set_register_state(gpr1, (unsigned int*)dst->f.i.rt, 1, 0); #endif } void genlhu(void) { int gpr1, gpr2, base1, base2 = 0; #if defined(COUNT_INSTR) inc_m32rel(&instr_count[29]); #endif #ifdef INTERPRET_LHU gencallinterp((unsigned long long)cached_interpreter_table.LHU, 0); #else free_registers_move_start(); ld_register_alloc(&gpr1, &gpr2, &base1, &base2); mov_reg64_imm64(base1, (unsigned long long) readmemh); if(fast_memory) { and_reg32_imm32(gpr1, 0xDF800000); cmp_reg32_imm32(gpr1, 0x80000000); } else { mov_reg64_imm64(base2, (unsigned long long) read_rdramh); shr_reg32_imm8(gpr1, 16); mov_reg64_preg64x8preg64(gpr1, gpr1, base1); cmp_reg64_reg64(gpr1, base2); } je_rj(0); jump_start_rel8(); mov_reg64_imm64(gpr1, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), gpr1); mov_m32rel_xreg32((unsigned int *)(&address), gpr2); mov_reg64_imm64(gpr1, (unsigned long long) dst->f.i.rt); mov_m64rel_xreg64((unsigned long long *)(&rdword), gpr1); shr_reg32_imm8(gpr2, 16); mov_reg64_preg64x8preg64(gpr2, gpr2, base1); call_reg64(gpr2); mov_xreg32_m32rel(gpr1, (unsigned int *)dst->f.i.rt); jmp_imm_short(23); jump_end_rel8(); mov_reg64_imm64(base1, (unsigned long long) g_rdram); // 10 and_reg32_imm32(gpr2, 0x7FFFFF); // 6 xor_reg8_imm8(gpr2, 2); // 4 mov_reg32_preg64preg64(gpr1, gpr2, base1); // 3 and_reg32_imm32(gpr1, 0xFFFF); set_register_state(gpr1, (unsigned int*)dst->f.i.rt, 1, 0); #endif } void genlwr(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[31]); #endif gencallinterp((unsigned long long)cached_interpreter_table.LWR, 0); } void genlwu(void) { int gpr1, gpr2, base1, base2 = 0; #if defined(COUNT_INSTR) inc_m32rel(&instr_count[30]); #endif #ifdef INTERPRET_LWU gencallinterp((unsigned long long)cached_interpreter_table.LWU, 0); #else free_registers_move_start(); ld_register_alloc(&gpr1, &gpr2, &base1, &base2); mov_reg64_imm64(base1, (unsigned long long) readmem); if(fast_memory) { and_reg32_imm32(gpr1, 0xDF800000); cmp_reg32_imm32(gpr1, 0x80000000); } else { mov_reg64_imm64(base2, (unsigned long long) read_rdram); shr_reg32_imm8(gpr1, 16); mov_reg64_preg64x8preg64(gpr1, gpr1, base1); cmp_reg64_reg64(gpr1, base2); } je_rj(0); jump_start_rel8(); mov_reg64_imm64(gpr1, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), gpr1); mov_m32rel_xreg32((unsigned int *)(&address), gpr2); mov_reg64_imm64(gpr1, (unsigned long long) dst->f.i.rt); mov_m64rel_xreg64((unsigned long long *)(&rdword), gpr1); shr_reg32_imm8(gpr2, 16); mov_reg64_preg64x8preg64(gpr2, gpr2, base1); call_reg64(gpr2); mov_xreg32_m32rel(gpr1, (unsigned int *)dst->f.i.rt); jmp_imm_short(19); jump_end_rel8(); mov_reg64_imm64(base1, (unsigned long long) g_rdram); // 10 and_reg32_imm32(gpr2, 0x7FFFFF); // 6 mov_reg32_preg64preg64(gpr1, gpr2, base1); // 3 set_register_state(gpr1, (unsigned int*)dst->f.i.rt, 1, 1); #endif } void gensb(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[32]); #endif #ifdef INTERPRET_SB gencallinterp((unsigned long long)cached_interpreter_table.SB, 0); #else free_registers_move_start(); mov_xreg8_m8rel(CL, (unsigned char *)dst->f.i.rt); mov_xreg32_m32rel(EAX, (unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); mov_reg64_imm64(RSI, (unsigned long long) writememb); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { mov_reg64_imm64(RDI, (unsigned long long) write_rdramb); shr_reg32_imm8(EAX, 16); mov_reg64_preg64x8preg64(RAX, RAX, RSI); cmp_reg64_reg64(RAX, RDI); } je_rj(49); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); // 10 mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); // 7 mov_m32rel_xreg32((unsigned int *)(&address), EBX); // 7 mov_m8rel_xreg8((unsigned char *)(&cpu_byte), CL); // 7 shr_reg32_imm8(EBX, 16); // 3 mov_reg64_preg64x8preg64(RBX, RBX, RSI); // 4 call_reg64(RBX); // 2 mov_xreg32_m32rel(EAX, (unsigned int *)(&address)); // 7 jmp_imm_short(25); // 2 mov_reg64_imm64(RSI, (unsigned long long) g_rdram); // 10 mov_reg32_reg32(EAX, EBX); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 xor_reg8_imm8(BL, 3); // 4 mov_preg64preg64_reg8(RBX, RSI, CL); // 3 mov_reg64_imm64(RSI, (unsigned long long) invalid_code); mov_reg32_reg32(EBX, EAX); shr_reg32_imm8(EBX, 12); cmp_preg64preg64_imm8(RBX, RSI, 0); jne_rj(65); mov_reg64_imm64(RDI, (unsigned long long) blocks); // 10 mov_reg32_reg32(ECX, EBX); // 2 mov_reg64_preg64x8preg64(RBX, RBX, RDI); // 4 mov_reg64_preg64pimm32(RBX, RBX, (int) offsetof(precomp_block, block)); // 7 mov_reg64_imm64(RDI, (unsigned long long) cached_interpreter_table.NOTCOMPILED); // 10 and_eax_imm32(0xFFF); // 5 shr_reg32_imm8(EAX, 2); // 3 mov_reg32_imm32(EDX, sizeof(precomp_instr)); // 5 mul_reg32(EDX); // 2 mov_reg64_preg64preg64pimm32(RAX, RAX, RBX, (int) offsetof(precomp_instr, ops)); // 8 cmp_reg64_reg64(RAX, RDI); // 3 je_rj(4); // 2 mov_preg64preg64_imm8(RCX, RSI, 1); // 4 #endif } void gensh(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[33]); #endif #ifdef INTERPRET_SH gencallinterp((unsigned long long)cached_interpreter_table.SH, 0); #else free_registers_move_start(); mov_xreg16_m16rel(CX, (unsigned short *)dst->f.i.rt); mov_xreg32_m32rel(EAX, (unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); mov_reg64_imm64(RSI, (unsigned long long) writememh); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { mov_reg64_imm64(RDI, (unsigned long long) write_rdramh); shr_reg32_imm8(EAX, 16); mov_reg64_preg64x8preg64(RAX, RAX, RSI); cmp_reg64_reg64(RAX, RDI); } je_rj(50); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); // 10 mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); // 7 mov_m32rel_xreg32((unsigned int *)(&address), EBX); // 7 mov_m16rel_xreg16((unsigned short *)(&cpu_hword), CX); // 8 shr_reg32_imm8(EBX, 16); // 3 mov_reg64_preg64x8preg64(RBX, RBX, RSI); // 4 call_reg64(RBX); // 2 mov_xreg32_m32rel(EAX, (unsigned int *)(&address)); // 7 jmp_imm_short(26); // 2 mov_reg64_imm64(RSI, (unsigned long long) g_rdram); // 10 mov_reg32_reg32(EAX, EBX); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 xor_reg8_imm8(BL, 2); // 4 mov_preg64preg64_reg16(RBX, RSI, CX); // 4 mov_reg64_imm64(RSI, (unsigned long long) invalid_code); mov_reg32_reg32(EBX, EAX); shr_reg32_imm8(EBX, 12); cmp_preg64preg64_imm8(RBX, RSI, 0); jne_rj(65); mov_reg64_imm64(RDI, (unsigned long long) blocks); // 10 mov_reg32_reg32(ECX, EBX); // 2 mov_reg64_preg64x8preg64(RBX, RBX, RDI); // 4 mov_reg64_preg64pimm32(RBX, RBX, (int) offsetof(precomp_block, block)); // 7 mov_reg64_imm64(RDI, (unsigned long long) cached_interpreter_table.NOTCOMPILED); // 10 and_eax_imm32(0xFFF); // 5 shr_reg32_imm8(EAX, 2); // 3 mov_reg32_imm32(EDX, sizeof(precomp_instr)); // 5 mul_reg32(EDX); // 2 mov_reg64_preg64preg64pimm32(RAX, RAX, RBX, (int) offsetof(precomp_instr, ops)); // 8 cmp_reg64_reg64(RAX, RDI); // 3 je_rj(4); // 2 mov_preg64preg64_imm8(RCX, RSI, 1); // 4 #endif } void genswl(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[35]); #endif gencallinterp((unsigned long long)cached_interpreter_table.SWL, 0); } void gensw(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[34]); #endif #ifdef INTERPRET_SW gencallinterp((unsigned long long)cached_interpreter_table.SW, 0); #else free_registers_move_start(); mov_xreg32_m32rel(ECX, (unsigned int *)dst->f.i.rt); mov_xreg32_m32rel(EAX, (unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); mov_reg64_imm64(RSI, (unsigned long long) writemem); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { mov_reg64_imm64(RDI, (unsigned long long) write_rdram); shr_reg32_imm8(EAX, 16); mov_reg64_preg64x8preg64(RAX, RAX, RSI); cmp_reg64_reg64(RAX, RDI); } je_rj(49); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); // 10 mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); // 7 mov_m32rel_xreg32((unsigned int *)(&address), EBX); // 7 mov_m32rel_xreg32((unsigned int *)(&cpu_word), ECX); // 7 shr_reg32_imm8(EBX, 16); // 3 mov_reg64_preg64x8preg64(RBX, RBX, RSI); // 4 call_reg64(RBX); // 2 mov_xreg32_m32rel(EAX, (unsigned int *)(&address)); // 7 jmp_imm_short(21); // 2 mov_reg64_imm64(RSI, (unsigned long long) g_rdram); // 10 mov_reg32_reg32(EAX, EBX); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_preg64preg64_reg32(RBX, RSI, ECX); // 3 mov_reg64_imm64(RSI, (unsigned long long) invalid_code); mov_reg32_reg32(EBX, EAX); shr_reg32_imm8(EBX, 12); cmp_preg64preg64_imm8(RBX, RSI, 0); jne_rj(65); mov_reg64_imm64(RDI, (unsigned long long) blocks); // 10 mov_reg32_reg32(ECX, EBX); // 2 mov_reg64_preg64x8preg64(RBX, RBX, RDI); // 4 mov_reg64_preg64pimm32(RBX, RBX, (int) offsetof(precomp_block, block)); // 7 mov_reg64_imm64(RDI, (unsigned long long) cached_interpreter_table.NOTCOMPILED); // 10 and_eax_imm32(0xFFF); // 5 shr_reg32_imm8(EAX, 2); // 3 mov_reg32_imm32(EDX, sizeof(precomp_instr)); // 5 mul_reg32(EDX); // 2 mov_reg64_preg64preg64pimm32(RAX, RAX, RBX, (int) offsetof(precomp_instr, ops)); // 8 cmp_reg64_reg64(RAX, RDI); // 3 je_rj(4); // 2 mov_preg64preg64_imm8(RCX, RSI, 1); // 4 #endif } void gensdl(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[37]); #endif gencallinterp((unsigned long long)cached_interpreter_table.SDL, 0); } void gensdr(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[38]); #endif gencallinterp((unsigned long long)cached_interpreter_table.SDR, 0); } void genswr(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[36]); #endif gencallinterp((unsigned long long)cached_interpreter_table.SWR, 0); } void gencheck_cop1_unusable(void) { free_registers_move_start(); test_m32rel_imm32((unsigned int*)&g_cp0_regs[CP0_STATUS_REG], 0x20000000); jne_rj(0); jump_start_rel8(); gencallinterp((unsigned long long)check_cop1_unusable, 0); jump_end_rel8(); } void genlwc1(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[39]); #endif #ifdef INTERPRET_LWC1 gencallinterp((unsigned long long)cached_interpreter_table.LWC1, 0); #else gencheck_cop1_unusable(); mov_xreg32_m32rel(EAX, (unsigned int *)(®[dst->f.lf.base])); add_eax_imm32((int)dst->f.lf.offset); mov_reg32_reg32(EBX, EAX); mov_reg64_imm64(RSI, (unsigned long long) readmem); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { mov_reg64_imm64(RDI, (unsigned long long) read_rdram); shr_reg32_imm8(EAX, 16); mov_reg64_preg64x8preg64(RAX, RAX, RSI); cmp_reg64_reg64(RAX, RDI); } je_rj(49); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); // 10 mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); // 7 mov_m32rel_xreg32((unsigned int *)(&address), EBX); // 7 mov_xreg64_m64rel(RDX, (unsigned long long *)(®_cop1_simple[dst->f.lf.ft])); // 7 mov_m64rel_xreg64((unsigned long long *)(&rdword), RDX); // 7 shr_reg32_imm8(EBX, 16); // 3 mov_reg64_preg64x8preg64(RBX, RBX, RSI); // 4 call_reg64(RBX); // 2 jmp_imm_short(28); // 2 mov_reg64_imm64(RSI, (unsigned long long) g_rdram); // 10 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_reg32_preg64preg64(EAX, RBX, RSI); // 3 mov_xreg64_m64rel(RBX, (unsigned long long *)(®_cop1_simple[dst->f.lf.ft])); // 7 mov_preg64_reg32(RBX, EAX); // 2 #endif } void genldc1(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[40]); #endif #ifdef INTERPRET_LDC1 gencallinterp((unsigned long long)cached_interpreter_table.LDC1, 0); #else gencheck_cop1_unusable(); mov_xreg32_m32rel(EAX, (unsigned int *)(®[dst->f.lf.base])); add_eax_imm32((int)dst->f.lf.offset); mov_reg32_reg32(EBX, EAX); mov_reg64_imm64(RSI, (unsigned long long) readmemd); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { mov_reg64_imm64(RDI, (unsigned long long) read_rdramd); shr_reg32_imm8(EAX, 16); mov_reg64_preg64x8preg64(RAX, RAX, RSI); cmp_reg64_reg64(RAX, RDI); } je_rj(49); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); // 10 mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); // 7 mov_m32rel_xreg32((unsigned int *)(&address), EBX); // 7 mov_xreg64_m64rel(RDX, (unsigned long long *)(®_cop1_double[dst->f.lf.ft])); // 7 mov_m64rel_xreg64((unsigned long long *)(&rdword), RDX); // 7 shr_reg32_imm8(EBX, 16); // 3 mov_reg64_preg64x8preg64(RBX, RBX, RSI); // 4 call_reg64(RBX); // 2 jmp_imm_short(39); // 2 mov_reg64_imm64(RSI, (unsigned long long) g_rdram); // 10 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_reg64_preg64preg64(RAX, RBX, RSI); // 4 mov_xreg64_m64rel(RBX, (unsigned long long *)(®_cop1_double[dst->f.lf.ft])); // 7 mov_preg64pimm32_reg32(RBX, 4, EAX); // 6 shr_reg64_imm8(RAX, 32); // 4 mov_preg64_reg32(RBX, EAX); // 2 #endif } void gencache(void) { } void genld(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[41]); #endif #ifdef INTERPRET_LD gencallinterp((unsigned long long)cached_interpreter_table.LD, 0); #else free_registers_move_start(); mov_xreg32_m32rel(EAX, (unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); mov_reg64_imm64(RSI, (unsigned long long) readmemd); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { mov_reg64_imm64(RDI, (unsigned long long) read_rdramd); shr_reg32_imm8(EAX, 16); mov_reg64_preg64x8preg64(RAX, RAX, RSI); cmp_reg64_reg64(RAX, RDI); } je_rj(59); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); // 10 mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); // 7 mov_m32rel_xreg32((unsigned int *)(&address), EBX); // 7 mov_reg64_imm64(RAX, (unsigned long long) dst->f.i.rt); // 10 mov_m64rel_xreg64((unsigned long long *)(&rdword), RAX); // 7 shr_reg32_imm8(EBX, 16); // 3 mov_reg64_preg64x8preg64(RBX, RBX, RSI); // 4 call_reg64(RBX); // 2 mov_xreg64_m64rel(RAX, (unsigned long long *)(dst->f.i.rt)); // 7 jmp_imm_short(33); // 2 mov_reg64_imm64(RSI, (unsigned long long) g_rdram); // 10 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_reg32_preg64preg64(EAX, RBX, RSI); // 3 mov_reg32_preg64preg64pimm32(EBX, RBX, RSI, 4); // 7 shl_reg64_imm8(RAX, 32); // 4 or_reg64_reg64(RAX, RBX); // 3 set_register_state(RAX, (unsigned int*)dst->f.i.rt, 1, 1); #endif } void genswc1(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[43]); #endif #ifdef INTERPRET_SWC1 gencallinterp((unsigned long long)cached_interpreter_table.SWC1, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RDX, (unsigned long long *)(®_cop1_simple[dst->f.lf.ft])); mov_reg32_preg64(ECX, RDX); mov_xreg32_m32rel(EAX, (unsigned int *)(®[dst->f.lf.base])); add_eax_imm32((int)dst->f.lf.offset); mov_reg32_reg32(EBX, EAX); mov_reg64_imm64(RSI, (unsigned long long) writemem); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { mov_reg64_imm64(RDI, (unsigned long long) write_rdram); shr_reg32_imm8(EAX, 16); mov_reg64_preg64x8preg64(RAX, RAX, RSI); cmp_reg64_reg64(RAX, RDI); } je_rj(49); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); // 10 mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); // 7 mov_m32rel_xreg32((unsigned int *)(&address), EBX); // 7 mov_m32rel_xreg32((unsigned int *)(&cpu_word), ECX); // 7 shr_reg32_imm8(EBX, 16); // 3 mov_reg64_preg64x8preg64(RBX, RBX, RSI); // 4 call_reg64(RBX); // 2 mov_xreg32_m32rel(EAX, (unsigned int *)(&address)); // 7 jmp_imm_short(21); // 2 mov_reg64_imm64(RSI, (unsigned long long) g_rdram); // 10 mov_reg32_reg32(EAX, EBX); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_preg64preg64_reg32(RBX, RSI, ECX); // 3 mov_reg64_imm64(RSI, (unsigned long long) invalid_code); mov_reg32_reg32(EBX, EAX); shr_reg32_imm8(EBX, 12); cmp_preg64preg64_imm8(RBX, RSI, 0); jne_rj(65); mov_reg64_imm64(RDI, (unsigned long long) blocks); // 10 mov_reg32_reg32(ECX, EBX); // 2 mov_reg64_preg64x8preg64(RBX, RBX, RDI); // 4 mov_reg64_preg64pimm32(RBX, RBX, (int) offsetof(precomp_block, block)); // 7 mov_reg64_imm64(RDI, (unsigned long long) cached_interpreter_table.NOTCOMPILED); // 10 and_eax_imm32(0xFFF); // 5 shr_reg32_imm8(EAX, 2); // 3 mov_reg32_imm32(EDX, sizeof(precomp_instr)); // 5 mul_reg32(EDX); // 2 mov_reg64_preg64preg64pimm32(RAX, RAX, RBX, (int) offsetof(precomp_instr, ops)); // 8 cmp_reg64_reg64(RAX, RDI); // 3 je_rj(4); // 2 mov_preg64preg64_imm8(RCX, RSI, 1); // 4 #endif } void gensdc1(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[44]); #endif #ifdef INTERPRET_SDC1 gencallinterp((unsigned long long)cached_interpreter_table.SDC1, 0); #else gencheck_cop1_unusable(); mov_xreg64_m64rel(RSI, (unsigned long long *)(®_cop1_double[dst->f.lf.ft])); mov_reg32_preg64(ECX, RSI); mov_reg32_preg64pimm32(EDX, RSI, 4); mov_xreg32_m32rel(EAX, (unsigned int *)(®[dst->f.lf.base])); add_eax_imm32((int)dst->f.lf.offset); mov_reg32_reg32(EBX, EAX); mov_reg64_imm64(RSI, (unsigned long long) writememd); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { mov_reg64_imm64(RDI, (unsigned long long) write_rdramd); shr_reg32_imm8(EAX, 16); mov_reg64_preg64x8preg64(RAX, RAX, RSI); cmp_reg64_reg64(RAX, RDI); } je_rj(56); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); // 10 mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); // 7 mov_m32rel_xreg32((unsigned int *)(&address), EBX); // 7 mov_m32rel_xreg32((unsigned int *)(&cpu_dword), ECX); // 7 mov_m32rel_xreg32((unsigned int *)(&cpu_dword)+1, EDX); // 7 shr_reg32_imm8(EBX, 16); // 3 mov_reg64_preg64x8preg64(RBX, RBX, RSI); // 4 call_reg64(RBX); // 2 mov_xreg32_m32rel(EAX, (unsigned int *)(&address)); // 7 jmp_imm_short(28); // 2 mov_reg64_imm64(RSI, (unsigned long long) g_rdram); // 10 mov_reg32_reg32(EAX, EBX); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_preg64preg64pimm32_reg32(RBX, RSI, 4, ECX); // 7 mov_preg64preg64_reg32(RBX, RSI, EDX); // 3 mov_reg64_imm64(RSI, (unsigned long long) invalid_code); mov_reg32_reg32(EBX, EAX); shr_reg32_imm8(EBX, 12); cmp_preg64preg64_imm8(RBX, RSI, 0); jne_rj(65); mov_reg64_imm64(RDI, (unsigned long long) blocks); // 10 mov_reg32_reg32(ECX, EBX); // 2 mov_reg64_preg64x8preg64(RBX, RBX, RDI); // 4 mov_reg64_preg64pimm32(RBX, RBX, (int) offsetof(precomp_block, block)); // 7 mov_reg64_imm64(RDI, (unsigned long long) cached_interpreter_table.NOTCOMPILED); // 10 and_eax_imm32(0xFFF); // 5 shr_reg32_imm8(EAX, 2); // 3 mov_reg32_imm32(EDX, sizeof(precomp_instr)); // 5 mul_reg32(EDX); // 2 mov_reg64_preg64preg64pimm32(RAX, RAX, RBX, (int) offsetof(precomp_instr, ops)); // 8 cmp_reg64_reg64(RAX, RDI); // 3 je_rj(4); // 2 mov_preg64preg64_imm8(RCX, RSI, 1); // 4 #endif } void gensd(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[45]); #endif #ifdef INTERPRET_SD gencallinterp((unsigned long long)cached_interpreter_table.SD, 0); #else free_registers_move_start(); mov_xreg32_m32rel(ECX, (unsigned int *)dst->f.i.rt); mov_xreg32_m32rel(EDX, ((unsigned int *)dst->f.i.rt)+1); mov_xreg32_m32rel(EAX, (unsigned int *)dst->f.i.rs); add_eax_imm32((int)dst->f.i.immediate); mov_reg32_reg32(EBX, EAX); mov_reg64_imm64(RSI, (unsigned long long) writememd); if(fast_memory) { and_eax_imm32(0xDF800000); cmp_eax_imm32(0x80000000); } else { mov_reg64_imm64(RDI, (unsigned long long) write_rdramd); shr_reg32_imm8(EAX, 16); mov_reg64_preg64x8preg64(RAX, RAX, RSI); cmp_reg64_reg64(RAX, RDI); } je_rj(56); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); // 10 mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); // 7 mov_m32rel_xreg32((unsigned int *)(&address), EBX); // 7 mov_m32rel_xreg32((unsigned int *)(&cpu_dword), ECX); // 7 mov_m32rel_xreg32((unsigned int *)(&cpu_dword)+1, EDX); // 7 shr_reg32_imm8(EBX, 16); // 3 mov_reg64_preg64x8preg64(RBX, RBX, RSI); // 4 call_reg64(RBX); // 2 mov_xreg32_m32rel(EAX, (unsigned int *)(&address)); // 7 jmp_imm_short(28); // 2 mov_reg64_imm64(RSI, (unsigned long long) g_rdram); // 10 mov_reg32_reg32(EAX, EBX); // 2 and_reg32_imm32(EBX, 0x7FFFFF); // 6 mov_preg64preg64pimm32_reg32(RBX, RSI, 4, ECX); // 7 mov_preg64preg64_reg32(RBX, RSI, EDX); // 3 mov_reg64_imm64(RSI, (unsigned long long) invalid_code); mov_reg32_reg32(EBX, EAX); shr_reg32_imm8(EBX, 12); cmp_preg64preg64_imm8(RBX, RSI, 0); jne_rj(65); mov_reg64_imm64(RDI, (unsigned long long) blocks); // 10 mov_reg32_reg32(ECX, EBX); // 2 mov_reg64_preg64x8preg64(RBX, RBX, RDI); // 4 mov_reg64_preg64pimm32(RBX, RBX, (int) offsetof(precomp_block, block)); // 7 mov_reg64_imm64(RDI, (unsigned long long) cached_interpreter_table.NOTCOMPILED); // 10 and_eax_imm32(0xFFF); // 5 shr_reg32_imm8(EAX, 2); // 3 mov_reg32_imm32(EDX, sizeof(precomp_instr)); // 5 mul_reg32(EDX); // 2 mov_reg64_preg64preg64pimm32(RAX, RAX, RBX, (int) offsetof(precomp_instr, ops)); // 8 cmp_reg64_reg64(RAX, RDI); // 3 je_rj(4); // 2 mov_preg64preg64_imm8(RCX, RSI, 1); // 4 #endif } void genll(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[42]); #endif gencallinterp((unsigned long long)cached_interpreter_table.LL, 0); } void gensc(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[46]); #endif gencallinterp((unsigned long long)cached_interpreter_table.SC, 0); } mupen64plus-core-src-2.5/src/r4300/x86_64/gregimm.c000066400000000000000000000360051251723631200213730ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gregimm.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include "assemble.h" #include "interpret.h" #include "memory/memory.h" #include "r4300/cached_interp.h" #include "r4300/macros.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #include "r4300/x86_64/regcache.h" #if defined(COUNT_INSTR) #include "r4300/instr_counters.h" #endif static void genbltz_test(void) { int rs_64bit = is64((unsigned int *)dst->f.i.rs); if (rs_64bit == 0) { int rs = allocate_register_32((unsigned int *)dst->f.i.rs); cmp_reg32_imm32(rs, 0); setl_m8rel((unsigned char *) &branch_taken); } else if (rs_64bit == -1) { cmp_m32rel_imm32(((unsigned int *)dst->f.i.rs)+1, 0); setl_m8rel((unsigned char *) &branch_taken); } else { int rs = allocate_register_64((unsigned long long *)dst->f.i.rs); cmp_reg64_imm8(rs, 0); setl_m8rel((unsigned char *) &branch_taken); } } void genbltz(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[47]); #endif #ifdef INTERPRET_BLTZ gencallinterp((unsigned long long)cached_interpreter_table.BLTZ, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLTZ, 1); return; } genbltz_test(); gendelayslot(); gentest(); #endif } void genbltz_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[47]); #endif #ifdef INTERPRET_BLTZ_OUT gencallinterp((unsigned long long)cached_interpreter_table.BLTZ_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLTZ_OUT, 1); return; } genbltz_test(); gendelayslot(); gentest_out(); #endif } void genbltz_idle(void) { #ifdef INTERPRET_BLTZ_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BLTZ_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLTZ_IDLE, 1); return; } genbltz_test(); gentest_idle(); genbltz(); #endif } static void genbgez_test(void) { int rs_64bit = is64((unsigned int *)dst->f.i.rs); if (rs_64bit == 0) { int rs = allocate_register_32((unsigned int *)dst->f.i.rs); cmp_reg32_imm32(rs, 0); setge_m8rel((unsigned char *) &branch_taken); } else if (rs_64bit == -1) { cmp_m32rel_imm32(((unsigned int *)dst->f.i.rs)+1, 0); setge_m8rel((unsigned char *) &branch_taken); } else { int rs = allocate_register_64((unsigned long long *)dst->f.i.rs); cmp_reg64_imm8(rs, 0); setge_m8rel((unsigned char *) &branch_taken); } } void genbgez(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[48]); #endif #ifdef INTERPRET_BGEZ gencallinterp((unsigned long long)cached_interpreter_table.BGEZ, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGEZ, 1); return; } genbgez_test(); gendelayslot(); gentest(); #endif } void genbgez_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[48]); #endif #ifdef INTERPRET_BGEZ_OUT gencallinterp((unsigned long long)cached_interpreter_table.BGEZ_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGEZ_OUT, 1); return; } genbgez_test(); gendelayslot(); gentest_out(); #endif } void genbgez_idle(void) { #ifdef INTERPRET_BGEZ_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BGEZ_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGEZ_IDLE, 1); return; } genbgez_test(); gentest_idle(); genbgez(); #endif } void genbltzl(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[49]); #endif #ifdef INTERPRET_BLTZL gencallinterp((unsigned long long)cached_interpreter_table.BLTZL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLTZL, 1); return; } genbltz_test(); free_all_registers(); gentestl(); #endif } void genbltzl_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[49]); #endif #ifdef INTERPRET_BLTZL_OUT gencallinterp((unsigned long long)cached_interpreter_table.BLTZL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLTZL_OUT, 1); return; } genbltz_test(); free_all_registers(); gentestl_out(); #endif } void genbltzl_idle(void) { #ifdef INTERPRET_BLTZL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BLTZL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLTZL_IDLE, 1); return; } genbltz_test(); gentest_idle(); genbltzl(); #endif } void genbgezl(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[50]); #endif #ifdef INTERPRET_BGEZL gencallinterp((unsigned long long)cached_interpreter_table.BGEZL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGEZL, 1); return; } genbgez_test(); free_all_registers(); gentestl(); #endif } void genbgezl_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[50]); #endif #ifdef INTERPRET_BGEZL_OUT gencallinterp((unsigned long long)cached_interpreter_table.BGEZL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGEZL_OUT, 1); return; } genbgez_test(); free_all_registers(); gentestl_out(); #endif } void genbgezl_idle(void) { #ifdef INTERPRET_BGEZL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BGEZL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGEZL_IDLE, 1); return; } genbgez_test(); gentest_idle(); genbgezl(); #endif } static void genbranchlink(void) { int r31_64bit = is64((unsigned int*)®[31]); if (r31_64bit == 0) { int r31 = allocate_register_32_w((unsigned int *)®[31]); mov_reg32_imm32(r31, dst->addr+8); } else if (r31_64bit == -1) { mov_m32rel_imm32((unsigned int *)®[31], dst->addr + 8); if (dst->addr & 0x80000000) mov_m32rel_imm32(((unsigned int *)®[31])+1, 0xFFFFFFFF); else mov_m32rel_imm32(((unsigned int *)®[31])+1, 0); } else { int r31 = allocate_register_64_w((unsigned long long *)®[31]); mov_reg32_imm32(r31, dst->addr+8); movsxd_reg64_reg32(r31, r31); } } void genbltzal(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[51]); #endif #ifdef INTERPRET_BLTZAL gencallinterp((unsigned long long)cached_interpreter_table.BLTZAL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLTZAL, 1); return; } genbltz_test(); genbranchlink(); gendelayslot(); gentest(); #endif } void genbltzal_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[51]); #endif #ifdef INTERPRET_BLTZAL_OUT gencallinterp((unsigned long long)cached_interpreter_table.BLTZAL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLTZAL_OUT, 1); return; } genbltz_test(); genbranchlink(); gendelayslot(); gentest_out(); #endif } void genbltzal_idle(void) { #ifdef INTERPRET_BLTZAL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BLTZAL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLTZAL_IDLE, 1); return; } genbltz_test(); genbranchlink(); gentest_idle(); genbltzal(); #endif } void genbgezal(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[52]); #endif #ifdef INTERPRET_BGEZAL gencallinterp((unsigned long long)cached_interpreter_table.BGEZAL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGEZAL, 1); return; } genbgez_test(); genbranchlink(); gendelayslot(); gentest(); #endif } void genbgezal_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[52]); #endif #ifdef INTERPRET_BGEZAL_OUT gencallinterp((unsigned long long)cached_interpreter_table.BGEZAL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGEZAL_OUT, 1); return; } genbgez_test(); genbranchlink(); gendelayslot(); gentest_out(); #endif } void genbgezal_idle(void) { #ifdef INTERPRET_BGEZAL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BGEZAL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGEZAL_IDLE, 1); return; } genbgez_test(); genbranchlink(); gentest_idle(); genbgezal(); #endif } void genbltzall(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[53]); #endif #ifdef INTERPRET_BLTZALL gencallinterp((unsigned long long)cached_interpreter_table.BLTZALL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLTZALL, 1); return; } genbltz_test(); genbranchlink(); free_all_registers(); gentestl(); #endif } void genbltzall_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[53]); #endif #ifdef INTERPRET_BLTZALL_OUT gencallinterp((unsigned long long)cached_interpreter_table.BLTZALL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLTZALL_OUT, 1); return; } genbltz_test(); genbranchlink(); free_all_registers(); gentestl_out(); #endif } void genbltzall_idle(void) { #ifdef INTERPRET_BLTZALL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BLTZALL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BLTZALL_IDLE, 1); return; } genbltz_test(); genbranchlink(); gentest_idle(); genbltzall(); #endif } void genbgezall(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[54]); #endif #ifdef INTERPRET_BGEZALL gencallinterp((unsigned long long)cached_interpreter_table.BGEZALL, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGEZALL, 1); return; } genbgez_test(); genbranchlink(); free_all_registers(); gentestl(); #endif } void genbgezall_out(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[54]); #endif #ifdef INTERPRET_BGEZALL_OUT gencallinterp((unsigned long long)cached_interpreter_table.BGEZALL_OUT, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGEZALL_OUT, 1); return; } genbgez_test(); genbranchlink(); free_all_registers(); gentestl_out(); #endif } void genbgezall_idle(void) { #ifdef INTERPRET_BGEZALL_IDLE gencallinterp((unsigned long long)cached_interpreter_table.BGEZALL_IDLE, 1); #else if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.BGEZALL_IDLE, 1); return; } genbgez_test(); genbranchlink(); gentest_idle(); genbgezall(); #endif } mupen64plus-core-src-2.5/src/r4300/x86_64/gspecial.c000066400000000000000000000657401251723631200215430ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gspecial.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include "assemble.h" #include "interpret.h" #include "r4300/cached_interp.h" #include "r4300/cp0_private.h" #include "r4300/exception.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #include "r4300/x86_64/regcache.h" #if defined(COUNT_INSTR) #include "r4300/instr_counters.h" #endif #if !defined(offsetof) # define offsetof(TYPE,MEMBER) ((unsigned int) &((TYPE*)0)->MEMBER) #endif void gensll(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[55]); #endif #ifdef INTERPRET_SLL gencallinterp((unsigned long long)cached_interpreter_table.SLL, 0); #else int rt = allocate_register_32((unsigned int *)dst->f.r.rt); int rd = allocate_register_32_w((unsigned int *)dst->f.r.rd); mov_reg32_reg32(rd, rt); shl_reg32_imm8(rd, dst->f.r.sa); #endif } void gensrl(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[56]); #endif #ifdef INTERPRET_SRL gencallinterp((unsigned long long)cached_interpreter_table.SRL, 0); #else int rt = allocate_register_32((unsigned int *)dst->f.r.rt); int rd = allocate_register_32_w((unsigned int *)dst->f.r.rd); mov_reg32_reg32(rd, rt); shr_reg32_imm8(rd, dst->f.r.sa); #endif } void gensra(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[57]); #endif #ifdef INTERPRET_SRA gencallinterp((unsigned long long)cached_interpreter_table.SRA, 0); #else int rt = allocate_register_32((unsigned int *)dst->f.r.rt); int rd = allocate_register_32_w((unsigned int *)dst->f.r.rd); mov_reg32_reg32(rd, rt); sar_reg32_imm8(rd, dst->f.r.sa); #endif } void gensllv(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[58]); #endif #ifdef INTERPRET_SLLV gencallinterp((unsigned long long)cached_interpreter_table.SLLV, 0); #else int rt, rd; allocate_register_32_manually(ECX, (unsigned int *)dst->f.r.rs); rt = allocate_register_32((unsigned int *)dst->f.r.rt); rd = allocate_register_32_w((unsigned int *)dst->f.r.rd); if (rd != ECX) { mov_reg32_reg32(rd, rt); shl_reg32_cl(rd); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rt); shl_reg32_cl(temp); mov_reg32_reg32(rd, temp); } #endif } void gensrlv(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[59]); #endif #ifdef INTERPRET_SRLV gencallinterp((unsigned long long)cached_interpreter_table.SRLV, 0); #else int rt, rd; allocate_register_32_manually(ECX, (unsigned int *)dst->f.r.rs); rt = allocate_register_32((unsigned int *)dst->f.r.rt); rd = allocate_register_32_w((unsigned int *)dst->f.r.rd); if (rd != ECX) { mov_reg32_reg32(rd, rt); shr_reg32_cl(rd); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rt); shr_reg32_cl(temp); mov_reg32_reg32(rd, temp); } #endif } void gensrav(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[60]); #endif #ifdef INTERPRET_SRAV gencallinterp((unsigned long long)cached_interpreter_table.SRAV, 0); #else int rt, rd; allocate_register_32_manually(ECX, (unsigned int *)dst->f.r.rs); rt = allocate_register_32((unsigned int *)dst->f.r.rt); rd = allocate_register_32_w((unsigned int *)dst->f.r.rd); if (rd != ECX) { mov_reg32_reg32(rd, rt); sar_reg32_cl(rd); } else { int temp = lru_register(); free_register(temp); mov_reg32_reg32(temp, rt); sar_reg32_cl(temp); mov_reg32_reg32(rd, temp); } #endif } void genjr(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[61]); #endif #ifdef INTERPRET_JR gencallinterp((unsigned long long)cached_interpreter_table.JR, 1); #else static unsigned int precomp_instr_size = sizeof(precomp_instr); unsigned int diff = (unsigned int) offsetof(precomp_instr, local_addr); unsigned int diff_need = (unsigned int) offsetof(precomp_instr, reg_cache_infos.need_map); unsigned int diff_wrap = (unsigned int) offsetof(precomp_instr, reg_cache_infos.jump_wrapper); if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.JR, 1); return; } free_registers_move_start(); mov_xreg32_m32rel(EAX, (unsigned int *)dst->f.i.rs); mov_m32rel_xreg32((unsigned int *)&local_rs, EAX); gendelayslot(); mov_xreg32_m32rel(EAX, (unsigned int *)&local_rs); mov_m32rel_xreg32((unsigned int *)&last_addr, EAX); gencheck_interupt_reg(); mov_xreg32_m32rel(EAX, (unsigned int *)&local_rs); mov_reg32_reg32(EBX, EAX); and_eax_imm32(0xFFFFF000); cmp_eax_imm32(dst_block->start & 0xFFFFF000); je_near_rj(0); jump_start_rel32(); mov_m32rel_xreg32(&jump_to_address, EBX); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); mov_reg64_imm64(RAX, (unsigned long long) jump_to_func); call_reg64(RAX); /* will never return from call */ jump_end_rel32(); mov_reg64_imm64(RSI, (unsigned long long) dst_block->block); mov_reg32_reg32(EAX, EBX); sub_eax_imm32(dst_block->start); shr_reg32_imm8(EAX, 2); mul_m32rel((unsigned int *)(&precomp_instr_size)); mov_reg32_preg64preg64pimm32(EBX, RAX, RSI, diff_need); cmp_reg32_imm32(EBX, 1); jne_rj(11); add_reg32_imm32(EAX, diff_wrap); // 6 add_reg64_reg64(RAX, RSI); // 3 jmp_reg64(RAX); // 2 mov_reg32_preg64preg64pimm32(EBX, RAX, RSI, diff); mov_rax_memoffs64((unsigned long long *) &dst_block->code); add_reg64_reg64(RAX, RBX); jmp_reg64(RAX); #endif } void genjalr(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[62]); #endif #ifdef INTERPRET_JALR gencallinterp((unsigned long long)cached_interpreter_table.JALR, 0); #else static unsigned int precomp_instr_size = sizeof(precomp_instr); unsigned int diff = (unsigned int) offsetof(precomp_instr, local_addr); unsigned int diff_need = (unsigned int) offsetof(precomp_instr, reg_cache_infos.need_map); unsigned int diff_wrap = (unsigned int) offsetof(precomp_instr, reg_cache_infos.jump_wrapper); if (((dst->addr & 0xFFF) == 0xFFC && (dst->addr < 0x80000000 || dst->addr >= 0xC0000000))||no_compiled_jump) { gencallinterp((unsigned long long)cached_interpreter_table.JALR, 1); return; } free_registers_move_start(); mov_xreg32_m32rel(EAX, (unsigned int *)dst->f.r.rs); mov_m32rel_xreg32((unsigned int *)&local_rs, EAX); gendelayslot(); mov_m32rel_imm32((unsigned int *)(dst-1)->f.r.rd, dst->addr+4); if ((dst->addr+4) & 0x80000000) mov_m32rel_imm32(((unsigned int *)(dst-1)->f.r.rd)+1, 0xFFFFFFFF); else mov_m32rel_imm32(((unsigned int *)(dst-1)->f.r.rd)+1, 0); mov_xreg32_m32rel(EAX, (unsigned int *)&local_rs); mov_m32rel_xreg32((unsigned int *)&last_addr, EAX); gencheck_interupt_reg(); mov_xreg32_m32rel(EAX, (unsigned int *)&local_rs); mov_reg32_reg32(EBX, EAX); and_eax_imm32(0xFFFFF000); cmp_eax_imm32(dst_block->start & 0xFFFFF000); je_near_rj(0); jump_start_rel32(); mov_m32rel_xreg32(&jump_to_address, EBX); mov_reg64_imm64(RAX, (unsigned long long) (dst+1)); mov_m64rel_xreg64((unsigned long long *)(&PC), RAX); mov_reg64_imm64(RAX, (unsigned long long) jump_to_func); call_reg64(RAX); /* will never return from call */ jump_end_rel32(); mov_reg64_imm64(RSI, (unsigned long long) dst_block->block); mov_reg32_reg32(EAX, EBX); sub_eax_imm32(dst_block->start); shr_reg32_imm8(EAX, 2); mul_m32rel((unsigned int *)(&precomp_instr_size)); mov_reg32_preg64preg64pimm32(EBX, RAX, RSI, diff_need); cmp_reg32_imm32(EBX, 1); jne_rj(11); add_reg32_imm32(EAX, diff_wrap); // 6 add_reg64_reg64(RAX, RSI); // 3 jmp_reg64(RAX); // 2 mov_reg32_preg64preg64pimm32(EBX, RAX, RSI, diff); mov_rax_memoffs64((unsigned long long *) &dst_block->code); add_reg64_reg64(RAX, RBX); jmp_reg64(RAX); #endif } void gensyscall(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[63]); #endif #ifdef INTERPRET_SYSCALL gencallinterp((unsigned long long)cached_interpreter_table.SYSCALL, 0); #else free_registers_move_start(); mov_m32rel_imm32(&g_cp0_regs[CP0_CAUSE_REG], 8 << 2); gencallinterp((unsigned long long)exception_general, 0); #endif } void gensync(void) { } void genmfhi(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[64]); #endif #ifdef INTERPRET_MFHI gencallinterp((unsigned long long)cached_interpreter_table.MFHI, 0); #else int rd = allocate_register_64_w((unsigned long long *) dst->f.r.rd); int _hi = allocate_register_64((unsigned long long *) &hi); mov_reg64_reg64(rd, _hi); #endif } void genmthi(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[65]); #endif #ifdef INTERPRET_MTHI gencallinterp((unsigned long long)cached_interpreter_table.MTHI, 0); #else int _hi = allocate_register_64_w((unsigned long long *) &hi); int rs = allocate_register_64((unsigned long long *) dst->f.r.rs); mov_reg64_reg64(_hi, rs); #endif } void genmflo(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[66]); #endif #ifdef INTERPRET_MFLO gencallinterp((unsigned long long)cached_interpreter_table.MFLO, 0); #else int rd = allocate_register_64_w((unsigned long long *) dst->f.r.rd); int _lo = allocate_register_64((unsigned long long *) &lo); mov_reg64_reg64(rd, _lo); #endif } void genmtlo(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[67]); #endif #ifdef INTERPRET_MTLO gencallinterp((unsigned long long)cached_interpreter_table.MTLO, 0); #else int _lo = allocate_register_64_w((unsigned long long *)&lo); int rs = allocate_register_64((unsigned long long *)dst->f.r.rs); mov_reg64_reg64(_lo, rs); #endif } void gendsllv(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[68]); #endif #ifdef INTERPRET_DSLLV gencallinterp((unsigned long long)cached_interpreter_table.DSLLV, 0); #else int rt, rd; allocate_register_32_manually(ECX, (unsigned int *)dst->f.r.rs); rt = allocate_register_64((unsigned long long *)dst->f.r.rt); rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); if (rd != ECX) { mov_reg64_reg64(rd, rt); shl_reg64_cl(rd); } else { int temp; temp = lru_register(); free_register(temp); mov_reg64_reg64(temp, rt); shl_reg64_cl(temp); mov_reg64_reg64(rd, temp); } #endif } void gendsrlv(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[69]); #endif #ifdef INTERPRET_DSRLV gencallinterp((unsigned long long)cached_interpreter_table.DSRLV, 0); #else int rt, rd; allocate_register_32_manually(ECX, (unsigned int *)dst->f.r.rs); rt = allocate_register_64((unsigned long long *)dst->f.r.rt); rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); if (rd != ECX) { mov_reg64_reg64(rd, rt); shr_reg64_cl(rd); } else { int temp; temp = lru_register(); free_register(temp); mov_reg64_reg64(temp, rt); shr_reg64_cl(temp); mov_reg64_reg64(rd, temp); } #endif } void gendsrav(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[70]); #endif #ifdef INTERPRET_DSRAV gencallinterp((unsigned long long)cached_interpreter_table.DSRAV, 0); #else int rt, rd; allocate_register_32_manually(ECX, (unsigned int *)dst->f.r.rs); rt = allocate_register_64((unsigned long long *)dst->f.r.rt); rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); if (rd != ECX) { mov_reg64_reg64(rd, rt); sar_reg64_cl(rd); } else { int temp; temp = lru_register(); free_register(temp); mov_reg64_reg64(temp, rt); sar_reg64_cl(temp); mov_reg64_reg64(rd, temp); } #endif } void genmult(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[71]); #endif #ifdef INTERPRET_MULT gencallinterp((unsigned long long)cached_interpreter_table.MULT, 0); #else int rs, rt; allocate_register_32_manually_w(EAX, (unsigned int *)&lo); /* these must be done first so they are not assigned by allocate_register() */ allocate_register_32_manually_w(EDX, (unsigned int *)&hi); rs = allocate_register_32((unsigned int*)dst->f.r.rs); rt = allocate_register_32((unsigned int*)dst->f.r.rt); mov_reg32_reg32(EAX, rs); imul_reg32(rt); #endif } void genmultu(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[72]); #endif #ifdef INTERPRET_MULTU gencallinterp((unsigned long long)cached_interpreter_table.MULTU, 0); #else int rs, rt; allocate_register_32_manually_w(EAX, (unsigned int *)&lo); allocate_register_32_manually_w(EDX, (unsigned int *)&hi); rs = allocate_register_32((unsigned int*)dst->f.r.rs); rt = allocate_register_32((unsigned int*)dst->f.r.rt); mov_reg32_reg32(EAX, rs); mul_reg32(rt); #endif } void gendiv(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[73]); #endif #ifdef INTERPRET_DIV gencallinterp((unsigned long long)cached_interpreter_table.DIV, 0); #else int rs, rt; allocate_register_32_manually_w(EAX, (unsigned int *)&lo); allocate_register_32_manually_w(EDX, (unsigned int *)&hi); rs = allocate_register_32((unsigned int*)dst->f.r.rs); rt = allocate_register_32((unsigned int*)dst->f.r.rt); cmp_reg32_imm32(rt, 0); je_rj((rs == EAX ? 0 : 2) + 1 + 2); mov_reg32_reg32(EAX, rs); // 0 or 2 cdq(); // 1 idiv_reg32(rt); // 2 #endif } void gendivu(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[74]); #endif #ifdef INTERPRET_DIVU gencallinterp((unsigned long long)cached_interpreter_table.DIVU, 0); #else int rs, rt; allocate_register_32_manually_w(EAX, (unsigned int *)&lo); allocate_register_32_manually_w(EDX, (unsigned int *)&hi); rs = allocate_register_32((unsigned int*)dst->f.r.rs); rt = allocate_register_32((unsigned int*)dst->f.r.rt); cmp_reg32_imm32(rt, 0); je_rj((rs == EAX ? 0 : 2) + 2 + 2); mov_reg32_reg32(EAX, rs); // 0 or 2 xor_reg32_reg32(EDX, EDX); // 2 div_reg32(rt); // 2 #endif } void gendmult(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[75]); #endif gencallinterp((unsigned long long)cached_interpreter_table.DMULT, 0); } void gendmultu(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[76]); #endif #ifdef INTERPRET_DMULTU gencallinterp((unsigned long long)cached_interpreter_table.DMULTU, 0); #else free_registers_move_start(); mov_xreg64_m64rel(RAX, (unsigned long long *) dst->f.r.rs); mov_xreg64_m64rel(RDX, (unsigned long long *) dst->f.r.rt); mul_reg64(RDX); mov_m64rel_xreg64((unsigned long long *) &lo, RAX); mov_m64rel_xreg64((unsigned long long *) &hi, RDX); #endif } void genddiv(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[77]); #endif gencallinterp((unsigned long long)cached_interpreter_table.DDIV, 0); } void genddivu(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[78]); #endif gencallinterp((unsigned long long)cached_interpreter_table.DDIVU, 0); } void genadd(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[79]); #endif #ifdef INTERPRET_ADD gencallinterp((unsigned long long)cached_interpreter_table.ADD, 0); #else int rs = allocate_register_32((unsigned int *)dst->f.r.rs); int rt = allocate_register_32((unsigned int *)dst->f.r.rt); int rd = allocate_register_32_w((unsigned int *)dst->f.r.rd); if (rs == rd) add_reg32_reg32(rd, rt); else if (rt == rd) add_reg32_reg32(rd, rs); else { mov_reg32_reg32(rd, rs); add_reg32_reg32(rd, rt); } #endif } void genaddu(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[80]); #endif #ifdef INTERPRET_ADDU gencallinterp((unsigned long long)cached_interpreter_table.ADDU, 0); #else int rs = allocate_register_32((unsigned int *)dst->f.r.rs); int rt = allocate_register_32((unsigned int *)dst->f.r.rt); int rd = allocate_register_32_w((unsigned int *)dst->f.r.rd); if (rs == rd) add_reg32_reg32(rd, rt); else if (rt == rd) add_reg32_reg32(rd, rs); else { mov_reg32_reg32(rd, rs); add_reg32_reg32(rd, rt); } #endif } void gensub(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[81]); #endif #ifdef INTERPRET_SUB gencallinterp((unsigned long long)cached_interpreter_table.SUB, 0); #else int rs = allocate_register_32((unsigned int *)dst->f.r.rs); int rt = allocate_register_32((unsigned int *)dst->f.r.rt); int rd = allocate_register_32_w((unsigned int *)dst->f.r.rd); if (rs == rd) sub_reg32_reg32(rd, rt); else if (rt == rd) { neg_reg32(rd); add_reg32_reg32(rd, rs); } else { mov_reg32_reg32(rd, rs); sub_reg32_reg32(rd, rt); } #endif } void gensubu(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[82]); #endif #ifdef INTERPRET_SUBU gencallinterp((unsigned long long)cached_interpreter_table.SUBU, 0); #else int rs = allocate_register_32((unsigned int *)dst->f.r.rs); int rt = allocate_register_32((unsigned int *)dst->f.r.rt); int rd = allocate_register_32_w((unsigned int *)dst->f.r.rd); if (rs == rd) sub_reg32_reg32(rd, rt); else if (rt == rd) { neg_reg32(rd); add_reg32_reg32(rd, rs); } else { mov_reg32_reg32(rd, rs); sub_reg32_reg32(rd, rt); } #endif } void genand(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[83]); #endif #ifdef INTERPRET_AND gencallinterp((unsigned long long)cached_interpreter_table.AND, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.r.rs); int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); if (rs == rd) and_reg64_reg64(rd, rt); else if (rt == rd) and_reg64_reg64(rd, rs); else { mov_reg64_reg64(rd, rs); and_reg64_reg64(rd, rt); } #endif } void genor(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[84]); #endif #ifdef INTERPRET_OR gencallinterp((unsigned long long)cached_interpreter_table.OR, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.r.rs); int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); if (rs == rd) or_reg64_reg64(rd, rt); else if (rt == rd) or_reg64_reg64(rd, rs); else { mov_reg64_reg64(rd, rs); or_reg64_reg64(rd, rt); } #endif } void genxor(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[85]); #endif #ifdef INTERPRET_XOR gencallinterp((unsigned long long)cached_interpreter_table.XOR, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.r.rs); int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); if (rs == rd) xor_reg64_reg64(rd, rt); else if (rt == rd) xor_reg64_reg64(rd, rs); else { mov_reg64_reg64(rd, rs); xor_reg64_reg64(rd, rt); } #endif } void gennor(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[86]); #endif #ifdef INTERPRET_NOR gencallinterp((unsigned long long)cached_interpreter_table.NOR, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.r.rs); int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); if (rs == rd) { or_reg64_reg64(rd, rt); not_reg64(rd); } else if (rt == rd) { or_reg64_reg64(rd, rs); not_reg64(rd); } else { mov_reg64_reg64(rd, rs); or_reg64_reg64(rd, rt); not_reg64(rd); } #endif } void genslt(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[87]); #endif #ifdef INTERPRET_SLT gencallinterp((unsigned long long)cached_interpreter_table.SLT, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.r.rs); int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); cmp_reg64_reg64(rs, rt); setl_reg8(rd); and_reg64_imm8(rd, 1); #endif } void gensltu(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[88]); #endif #ifdef INTERPRET_SLTU gencallinterp((unsigned long long)cached_interpreter_table.SLTU, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.r.rs); int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); cmp_reg64_reg64(rs, rt); setb_reg8(rd); and_reg64_imm8(rd, 1); #endif } void gendadd(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[89]); #endif #ifdef INTERPRET_DADD gencallinterp((unsigned long long)cached_interpreter_table.DADD, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.r.rs); int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); if (rs == rd) add_reg64_reg64(rd, rt); else if (rt == rd) add_reg64_reg64(rd, rs); else { mov_reg64_reg64(rd, rs); add_reg64_reg64(rd, rt); } #endif } void gendaddu(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[90]); #endif #ifdef INTERPRET_DADDU gencallinterp((unsigned long long)cached_interpreter_table.DADDU, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.r.rs); int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); if (rs == rd) add_reg64_reg64(rd, rt); else if (rt == rd) add_reg64_reg64(rd, rs); else { mov_reg64_reg64(rd, rs); add_reg64_reg64(rd, rt); } #endif } void gendsub(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[91]); #endif #ifdef INTERPRET_DSUB gencallinterp((unsigned long long)cached_interpreter_table.DSUB, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.r.rs); int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); if (rs == rd) sub_reg64_reg64(rd, rt); else if (rt == rd) { neg_reg64(rd); add_reg64_reg64(rd, rs); } else { mov_reg64_reg64(rd, rs); sub_reg64_reg64(rd, rt); } #endif } void gendsubu(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[92]); #endif #ifdef INTERPRET_DSUBU gencallinterp((unsigned long long)cached_interpreter_table.DSUBU, 0); #else int rs = allocate_register_64((unsigned long long *)dst->f.r.rs); int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); if (rs == rd) sub_reg64_reg64(rd, rt); else if (rt == rd) { neg_reg64(rd); add_reg64_reg64(rd, rs); } else { mov_reg64_reg64(rd, rs); sub_reg64_reg64(rd, rt); } #endif } void genteq(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[96]); #endif gencallinterp((unsigned long long)cached_interpreter_table.TEQ, 0); } void gendsll(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[93]); #endif #ifdef INTERPRET_DSLL gencallinterp((unsigned long long)cached_interpreter_table.DSLL, 0); #else int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); mov_reg64_reg64(rd, rt); shl_reg64_imm8(rd, dst->f.r.sa); #endif } void gendsrl(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[94]); #endif #ifdef INTERPRET_DSRL gencallinterp((unsigned long long)cached_interpreter_table.DSRL, 0); #else int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); mov_reg64_reg64(rd, rt); shr_reg64_imm8(rd, dst->f.r.sa); #endif } void gendsra(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[95]); #endif #ifdef INTERPRET_DSRA gencallinterp((unsigned long long)cached_interpreter_table.DSRA, 0); #else int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); mov_reg64_reg64(rd, rt); sar_reg64_imm8(rd, dst->f.r.sa); #endif } void gendsll32(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[97]); #endif #ifdef INTERPRET_DSLL32 gencallinterp((unsigned long long)cached_interpreter_table.DSLL32, 0); #else int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); mov_reg64_reg64(rd, rt); shl_reg64_imm8(rd, dst->f.r.sa + 32); #endif } void gendsrl32(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[98]); #endif #ifdef INTERPRET_DSRL32 gencallinterp((unsigned long long)cached_interpreter_table.DSRL32, 0); #else int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); mov_reg64_reg64(rd, rt); shr_reg64_imm8(rd, dst->f.r.sa + 32); #endif } void gendsra32(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[99]); #endif #ifdef INTERPRET_DSRA32 gencallinterp((unsigned long long)cached_interpreter_table.DSRA32, 0); #else int rt = allocate_register_64((unsigned long long *)dst->f.r.rt); int rd = allocate_register_64_w((unsigned long long *)dst->f.r.rd); mov_reg64_reg64(rd, rt); sar_reg64_imm8(rd, dst->f.r.sa + 32); #endif } mupen64plus-core-src-2.5/src/r4300/x86_64/gtlb.c000066400000000000000000000065771251723631200207070ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gtlb.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "assemble.h" #include "r4300/cached_interp.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomph.h" #if defined(COUNT_INSTR) #include "r4300/instr_counters.h" #endif void gentlbwi(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[104]); #endif gencallinterp((unsigned long long)cached_interpreter_table.TLBWI, 0); /*dst->local_addr = code_length; mov_m32_imm32((void *)(&PC), (unsigned int)(dst)); mov_reg32_imm32(EAX, (unsigned int)(TLBWI)); call_reg32(EAX); genupdate_system(0);*/ } void gentlbp(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[105]); #endif gencallinterp((unsigned long long)cached_interpreter_table.TLBP, 0); /*dst->local_addr = code_length; mov_m32_imm32((void *)(&PC), (unsigned int)(dst)); mov_reg32_imm32(EAX, (unsigned int)(TLBP)); call_reg32(EAX); genupdate_system(0);*/ } void gentlbr(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[106]); #endif gencallinterp((unsigned long long)cached_interpreter_table.TLBR, 0); /*dst->local_addr = code_length; mov_m32_imm32((void *)(&PC), (unsigned int)(dst)); mov_reg32_imm32(EAX, (unsigned int)(TLBR)); call_reg32(EAX); genupdate_system(0);*/ } void generet(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[108]); #endif gencallinterp((unsigned long long)cached_interpreter_table.ERET, 1); /*dst->local_addr = code_length; mov_m32_imm32((void *)(&PC), (unsigned int)(dst)); genupdate_system(0); mov_reg32_imm32(EAX, (unsigned int)(ERET)); call_reg32(EAX); mov_reg32_imm32(EAX, (unsigned int)(jump_code)); jmp_reg32(EAX);*/ } void gentlbwr(void) { #if defined(COUNT_INSTR) inc_m32rel(&instr_count[107]); #endif gencallinterp((unsigned long long)cached_interpreter_table.TLBWR, 0); } mupen64plus-core-src-2.5/src/r4300/x86_64/interpret.h000066400000000000000000000164251251723631200217710ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - interpret.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_R4300_INTERPRET_H #define M64P_R4300_INTERPRET_H //#define INTERPRET_J //#define INTERPRET_J_OUT //#define INTERPRET_J_IDLE //#define INTERPRET_JAL //#define INTERPRET_JAL_OUT //#define INTERPRET_JAL_IDLE //#define INTERPRET_BEQ //#define INTERPRET_BEQ_OUT //#define INTERPRET_BEQ_IDLE //#define INTERPRET_BNE //#define INTERPRET_BNE_OUT //#define INTERPRET_BNE_IDLE //#define INTERPRET_BLEZ //#define INTERPRET_BLEZ_OUT //#define INTERPRET_BLEZ_IDLE //#define INTERPRET_BGTZ //#define INTERPRET_BGTZ_OUT //#define INTERPRET_BGTZ_IDLE //#define INTERPRET_ADDI //#define INTERPRET_ADDIU //#define INTERPRET_SLTI //#define INTERPRET_SLTIU //#define INTERPRET_ANDI //#define INTERPRET_ORI //#define INTERPRET_XORI //#define INTERPRET_LUI //#define INTERPRET_BEQL //#define INTERPRET_BEQL_OUT //#define INTERPRET_BEQL_IDLE //#define INTERPRET_BNEL //#define INTERPRET_BNEL_OUT //#define INTERPRET_BNEL_IDLE //#define INTERPRET_BLEZL //#define INTERPRET_BLEZL_OUT //#define INTERPRET_BLEZL_IDLE //#define INTERPRET_BGTZL //#define INTERPRET_BGTZL_OUT //#define INTERPRET_BGTZL_IDLE //#define INTERPRET_DADDI //#define INTERPRET_DADDIU //#define INTERPRET_LB //#define INTERPRET_LH //#define INTERPRET_LW //#define INTERPRET_LBU //#define INTERPRET_LHU //#define INTERPRET_LWU //#define INTERPRET_SB //#define INTERPRET_SH //#define INTERPRET_SW //#define INTERPRET_LWC1 //#define INTERPRET_LDC1 //#define INTERPRET_LD //#define INTERPRET_SWC1 //#define INTERPRET_SDC1 //#define INTERPRET_SD //#define INTERPRET_SLL //#define INTERPRET_SRL //#define INTERPRET_SRA //#define INTERPRET_SLLV //#define INTERPRET_SRLV //#define INTERPRET_SRAV //#define INTERPRET_JR //#define INTERPRET_JALR //#define INTERPRET_SYSCALL //#define INTERPRET_MFHI //#define INTERPRET_MTHI //#define INTERPRET_MFLO //#define INTERPRET_MTLO //#define INTERPRET_DSLLV //#define INTERPRET_DSRLV //#define INTERPRET_DSRAV //#define INTERPRET_MULT //#define INTERPRET_MULTU //#define INTERPRET_DIV //#define INTERPRET_DIVU //#define INTERPRET_DMULTU //#define INTERPRET_ADD //#define INTERPRET_ADDU //#define INTERPRET_SUB //#define INTERPRET_SUBU //#define INTERPRET_AND //#define INTERPRET_OR //#define INTERPRET_XOR //#define INTERPRET_NOR //#define INTERPRET_SLT //#define INTERPRET_SLTU //#define INTERPRET_DADD //#define INTERPRET_DADDU //#define INTERPRET_DSUB //#define INTERPRET_DSUBU //#define INTERPRET_DSLL //#define INTERPRET_DSRL //#define INTERPRET_DSRA //#define INTERPRET_DSLL32 //#define INTERPRET_DSRL32 //#define INTERPRET_DSRA32 //#define INTERPRET_BLTZ //#define INTERPRET_BLTZ_OUT //#define INTERPRET_BLTZ_IDLE //#define INTERPRET_BGEZ //#define INTERPRET_BGEZ_OUT //#define INTERPRET_BGEZ_IDLE //#define INTERPRET_BLTZL //#define INTERPRET_BLTZL_OUT //#define INTERPRET_BLTZL_IDLE //#define INTERPRET_BGEZL //#define INTERPRET_BGEZL_OUT //#define INTERPRET_BGEZL_IDLE //#define INTERPRET_BLTZAL //#define INTERPRET_BLTZAL_OUT //#define INTERPRET_BLTZAL_IDLE //#define INTERPRET_BGEZAL //#define INTERPRET_BGEZAL_OUT //#define INTERPRET_BGEZAL_IDLE //#define INTERPRET_BLTZALL //#define INTERPRET_BLTZALL_OUT //#define INTERPRET_BLTZALL_IDLE //#define INTERPRET_BGEZALL //#define INTERPRET_BGEZALL_OUT //#define INTERPRET_BGEZALL_IDLE //#define INTERPRET_BC1F //#define INTERPRET_BC1F_OUT //#define INTERPRET_BC1F_IDLE //#define INTERPRET_BC1T //#define INTERPRET_BC1T_OUT //#define INTERPRET_BC1T_IDLE //#define INTERPRET_BC1FL //#define INTERPRET_BC1FL_OUT //#define INTERPRET_BC1FL_IDLE //#define INTERPRET_BC1TL //#define INTERPRET_BC1TL_OUT //#define INTERPRET_BC1TL_IDLE //#define INTERPRET_MFC1 //#define INTERPRET_DMFC1 //#define INTERPRET_CFC1 //#define INTERPRET_MTC1 //#define INTERPRET_DMTC1 //#define INTERPRET_CTC1 //#define INTERPRET_ADD_D //#define INTERPRET_SUB_D //#define INTERPRET_MUL_D //#define INTERPRET_DIV_D //#define INTERPRET_SQRT_D //#define INTERPRET_ABS_D //#define INTERPRET_MOV_D //#define INTERPRET_NEG_D //#define INTERPRET_ROUND_L_D //#define INTERPRET_TRUNC_L_D //#define INTERPRET_CEIL_L_D //#define INTERPRET_FLOOR_L_D //#define INTERPRET_ROUND_W_D //#define INTERPRET_TRUNC_W_D //#define INTERPRET_CEIL_W_D //#define INTERPRET_FLOOR_W_D //#define INTERPRET_CVT_S_D //#define INTERPRET_CVT_W_D //#define INTERPRET_CVT_L_D //#define INTERPRET_C_F_D //#define INTERPRET_C_UN_D //#define INTERPRET_C_EQ_D //#define INTERPRET_C_UEQ_D //#define INTERPRET_C_OLT_D //#define INTERPRET_C_ULT_D //#define INTERPRET_C_OLE_D //#define INTERPRET_C_ULE_D //#define INTERPRET_C_SF_D //#define INTERPRET_C_NGLE_D //#define INTERPRET_C_SEQ_D //#define INTERPRET_C_NGL_D //#define INTERPRET_C_LT_D //#define INTERPRET_C_NGE_D //#define INTERPRET_C_LE_D //#define INTERPRET_C_NGT_D //#define INTERPRET_CVT_S_L //#define INTERPRET_CVT_D_L //#define INTERPRET_CVT_S_W //#define INTERPRET_CVT_D_W //#define INTERPRET_ADD_S //#define INTERPRET_SUB_S //#define INTERPRET_MUL_S //#define INTERPRET_DIV_S //#define INTERPRET_SQRT_S //#define INTERPRET_ABS_S //#define INTERPRET_MOV_S //#define INTERPRET_NEG_S //#define INTERPRET_ROUND_L_S //#define INTERPRET_TRUNC_L_S //#define INTERPRET_CEIL_L_S //#define INTERPRET_FLOOR_L_S //#define INTERPRET_ROUND_W_S //#define INTERPRET_TRUNC_W_S //#define INTERPRET_CEIL_W_S //#define INTERPRET_FLOOR_W_S //#define INTERPRET_CVT_D_S //#define INTERPRET_CVT_W_S //#define INTERPRET_CVT_L_S //#define INTERPRET_C_F_S //#define INTERPRET_C_UN_S //#define INTERPRET_C_EQ_S //#define INTERPRET_C_UEQ_S //#define INTERPRET_C_OLT_S //#define INTERPRET_C_ULT_S //#define INTERPRET_C_OLE_S //#define INTERPRET_C_ULE_S //#define INTERPRET_C_SF_S //#define INTERPRET_C_NGLE_S //#define INTERPRET_C_SEQ_S //#define INTERPRET_C_NGL_S //#define INTERPRET_C_LT_S //#define INTERPRET_C_NGE_S //#define INTERPRET_C_LE_S //#define INTERPRET_C_NGT_S #endif /* M64P_R4300_INTERPRET_H */ mupen64plus-core-src-2.5/src/r4300/x86_64/regcache.c000066400000000000000000000423401251723631200215040ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - regcache.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2007 Richard Goedeken (Richard42) * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #include "r4300/x86_64/assemble.h" #include "r4300/x86_64/assemble_struct.h" #include "regcache.h" static unsigned long long * reg_content[8]; static precomp_instr* last_access[8]; static precomp_instr* free_since[8]; static int dirty[8]; static int is64bits[8]; static unsigned long long *r0; void init_cache(precomp_instr* start) { int i; for (i=0; i<8; i++) { reg_content[i] = NULL; last_access[i] = NULL; free_since[i] = start; dirty[i] = 0; is64bits[i] = 0; } r0 = (unsigned long long *) reg; } void free_all_registers(void) { #if defined(PROFILE_R4300) int freestart = code_length; int flushed = 0; #endif int i; for (i=0; i<8; i++) { #if defined(PROFILE_R4300) if (last_access[i] && dirty[i]) flushed = 1; #endif if (last_access[i]) { free_register(i); } else { while (free_since[i] <= dst) { free_since[i]->reg_cache_infos.needed_registers[i] = NULL; free_since[i]++; } } } #if defined(PROFILE_R4300) if (flushed == 1) { long long x86addr = (long long) ((*inst_pointer) + freestart); int mipsop = -5; if (fwrite(&mipsop, 1, 4, pfProfile) != 4 || /* -5 = regcache flushing */ fwrite(&x86addr, 1, sizeof(char *), pfProfile) != sizeof(char *)) // write pointer to start of register cache flushing instructions DebugMessage(M64MSG_ERROR, "Error writing R4300 instruction address profiling data"); x86addr = (long long) ((*inst_pointer) + code_length); if (fwrite(&src, 1, 4, pfProfile) != 4 || // write 4-byte MIPS opcode for current instruction fwrite(&x86addr, 1, sizeof(char *), pfProfile) != sizeof(char *)) // write pointer to dynamically generated x86 code for this MIPS instruction DebugMessage(M64MSG_ERROR, "Error writing R4300 instruction address profiling data"); } #endif } static void simplify_access(void) { int i; dst->local_addr = code_length; for(i=0; i<8; i++) dst->reg_cache_infos.needed_registers[i] = NULL; } void free_registers_move_start(void) { /* flush all dirty registers and clear needed_registers table */ free_all_registers(); /* now move the start of the new instruction down past the flushing instructions */ simplify_access(); } // this function frees a specific X86 GPR void free_register(int reg) { precomp_instr *last; if (last_access[reg] != NULL) last = last_access[reg]+1; else last = free_since[reg]; while (last <= dst) { if (last_access[reg] != NULL && dirty[reg]) last->reg_cache_infos.needed_registers[reg] = reg_content[reg]; else last->reg_cache_infos.needed_registers[reg] = NULL; last++; } if (last_access[reg] == NULL) { free_since[reg] = dst+1; return; } if (dirty[reg]) { if (is64bits[reg]) { mov_m64rel_xreg64((unsigned long long *) reg_content[reg], reg); } else { movsxd_reg64_reg32(reg, reg); mov_m64rel_xreg64((unsigned long long *) reg_content[reg], reg); } } last_access[reg] = NULL; free_since[reg] = dst+1; } int lru_register(void) { unsigned long long oldest_access = 0xFFFFFFFFFFFFFFFFULL; int i, reg = 0; for (i=0; i<8; i++) { if (i != ESP && (unsigned long long) last_access[i] < oldest_access) { oldest_access = (unsigned long long) last_access[i]; reg = i; } } return reg; } int lru_base_register(void) /* EBP cannot be used as a base register for SIB addressing byte */ { unsigned long long oldest_access = 0xFFFFFFFFFFFFFFFFULL; int i, reg = 0; for (i=0; i<8; i++) { if (i != ESP && i != EBP && (unsigned long long) last_access[i] < oldest_access) { oldest_access = (unsigned long long) last_access[i]; reg = i; } } return reg; } void set_register_state(int reg, unsigned int *addr, int _dirty, int _is64bits) { if (addr == NULL) last_access[reg] = NULL; else last_access[reg] = dst; reg_content[reg] = (unsigned long long *) addr; is64bits[reg] = _is64bits; dirty[reg] = _dirty; } int lock_register(int reg) { free_register(reg); last_access[reg] = (precomp_instr *) 0xFFFFFFFFFFFFFFFFULL; reg_content[reg] = NULL; return reg; } void unlock_register(int reg) { last_access[reg] = NULL; } // this function finds a register to put the data contained in addr, // if there was another value before it's cleanly removed of the // register cache. After that, the register number is returned. // If data are already cached, the function only returns the register number int allocate_register_32(unsigned int *addr) { int reg = 0, i; // is it already cached ? if (addr != NULL) { for (i = 0; i < 8; i++) { if (last_access[i] != NULL && (unsigned int *) reg_content[i] == addr) { precomp_instr *last = last_access[i]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[i] = reg_content[i]; last++; } last_access[i] = dst; is64bits[i] = 0; return i; } } } // it's not cached, so take the least recently used register reg = lru_register(); if (last_access[reg]) free_register(reg); else { while (free_since[reg] <= dst) { free_since[reg]->reg_cache_infos.needed_registers[reg] = NULL; free_since[reg]++; } } last_access[reg] = dst; reg_content[reg] = (unsigned long long *) addr; dirty[reg] = 0; is64bits[reg] = 0; if (addr != NULL) { if (addr == (unsigned int *) r0) xor_reg32_reg32(reg, reg); else mov_xreg32_m32rel(reg, addr); } return reg; } // this function is similar to allocate_register except it loads // a 64 bits value, and return the register number of the LSB part int allocate_register_64(unsigned long long *addr) { int reg, i; // is it already cached? if (addr != NULL) { for (i = 0; i < 8; i++) { if (last_access[i] != NULL && reg_content[i] == addr) { precomp_instr *last = last_access[i]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[i] = reg_content[i]; last++; } last_access[i] = dst; if (is64bits[i] == 0) { movsxd_reg64_reg32(i, i); is64bits[i] = 1; } return i; } } } // it's not cached, so take the least recently used register reg = lru_register(); if (last_access[reg]) free_register(reg); else { while (free_since[reg] <= dst) { free_since[reg]->reg_cache_infos.needed_registers[reg] = NULL; free_since[reg]++; } } last_access[reg] = dst; reg_content[reg] = addr; dirty[reg] = 0; is64bits[reg] = 1; if (addr != NULL) { if (addr == r0) xor_reg64_reg64(reg, reg); else mov_xreg64_m64rel(reg, addr); } return reg; } // this function checks if the data located at addr are cached in a register // and then, it returns 1 if it's a 64 bit value // 0 if it's a 32 bit value // -1 if it's not cached int is64(unsigned int *addr) { int i; for (i = 0; i < 8; i++) { if (last_access[i] != NULL && reg_content[i] == (unsigned long long *) addr) { return is64bits[i]; } } return -1; } int allocate_register_32_w(unsigned int *addr) { int reg = 0, i; // is it already cached ? for (i = 0; i < 8; i++) { if (last_access[i] != NULL && reg_content[i] == (unsigned long long *) addr) { precomp_instr *last = last_access[i] + 1; while (last <= dst) { last->reg_cache_infos.needed_registers[i] = NULL; last++; } last_access[i] = dst; dirty[i] = 1; is64bits[i] = 0; return i; } } // it's not cached, so take the least recently used register reg = lru_register(); if (last_access[reg]) free_register(reg); else { while (free_since[reg] <= dst) { free_since[reg]->reg_cache_infos.needed_registers[reg] = NULL; free_since[reg]++; } } last_access[reg] = dst; reg_content[reg] = (unsigned long long *) addr; dirty[reg] = 1; is64bits[reg] = 0; return reg; } int allocate_register_64_w(unsigned long long *addr) { int reg, i; // is it already cached? for (i = 0; i < 8; i++) { if (last_access[i] != NULL && reg_content[i] == addr) { precomp_instr *last = last_access[i] + 1; while (last <= dst) { last->reg_cache_infos.needed_registers[i] = NULL; last++; } last_access[i] = dst; is64bits[i] = 1; dirty[i] = 1; return i; } } // it's not cached, so take the least recently used register reg = lru_register(); if (last_access[reg]) free_register(reg); else { while (free_since[reg] <= dst) { free_since[reg]->reg_cache_infos.needed_registers[reg] = NULL; free_since[reg]++; } } last_access[reg] = dst; reg_content[reg] = addr; dirty[reg] = 1; is64bits[reg] = 1; return reg; } void allocate_register_32_manually(int reg, unsigned int *addr) { int i; /* check if we just happen to already have this r4300 reg cached in the requested x86 reg */ if (last_access[reg] != NULL && reg_content[reg] == (unsigned long long *) addr) { precomp_instr *last = last_access[reg] + 1; while (last <= dst) { last->reg_cache_infos.needed_registers[reg] = reg_content[reg]; last++; } last_access[reg] = dst; /* we won't touch is64bits or dirty; the register returned is "read-only" */ return; } /* otherwise free up the requested x86 register */ if (last_access[reg]) free_register(reg); else { while (free_since[reg] <= dst) { free_since[reg]->reg_cache_infos.needed_registers[reg] = NULL; free_since[reg]++; } } /* if the r4300 register is already cached in a different x86 register, then copy it to the requested x86 register */ for (i=0; i<8; i++) { if (last_access[i] != NULL && reg_content[i] == (unsigned long long *) addr) { precomp_instr *last = last_access[i]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[i] = reg_content[i]; last++; } last_access[i] = dst; if (is64bits[i]) mov_reg64_reg64(reg, i); else mov_reg32_reg32(reg, i); last_access[reg] = dst; is64bits[reg] = is64bits[i]; dirty[reg] = dirty[i]; reg_content[reg] = reg_content[i]; /* free the previous x86 register used to cache this r4300 register */ free_since[i] = dst + 1; last_access[i] = NULL; return; } } /* otherwise just load the 32-bit value into the requested register */ last_access[reg] = dst; reg_content[reg] = (unsigned long long *) addr; dirty[reg] = 0; is64bits[reg] = 0; if ((unsigned long long *) addr == r0) xor_reg32_reg32(reg, reg); else mov_xreg32_m32rel(reg, addr); } void allocate_register_32_manually_w(int reg, unsigned int *addr) { int i; /* check if we just happen to already have this r4300 reg cached in the requested x86 reg */ if (last_access[reg] != NULL && reg_content[reg] == (unsigned long long *) addr) { precomp_instr *last = last_access[reg]+1; while (last <= dst) { last->reg_cache_infos.needed_registers[reg] = NULL; last++; } last_access[reg] = dst; is64bits[reg] = 0; dirty[reg] = 1; return; } /* otherwise free up the requested x86 register */ if (last_access[reg]) free_register(reg); else { while (free_since[reg] <= dst) { free_since[reg]->reg_cache_infos.needed_registers[reg] = NULL; free_since[reg]++; } } /* if the r4300 register is already cached in a different x86 register, then free it and bind to the requested x86 register */ for (i = 0; i < 8; i++) { if (last_access[i] != NULL && reg_content[i] == (unsigned long long *) addr) { precomp_instr *last = last_access[i] + 1; while (last <= dst) { last->reg_cache_infos.needed_registers[i] = NULL; last++; } last_access[reg] = dst; reg_content[reg] = reg_content[i]; dirty[reg] = 1; is64bits[reg] = 0; /* free the previous x86 register used to cache this r4300 register */ free_since[i] = dst+1; last_access[i] = NULL; return; } } /* otherwise just set up the requested register as 32-bit */ last_access[reg] = dst; reg_content[reg] = (unsigned long long *) addr; dirty[reg] = 1; is64bits[reg] = 0; } // 0x48 0x83 0xEC 0x8 sub rsp, byte 8 // 0x48 0xA1 0xXXXXXXXXXXXXXXXX mov rax, qword (&code start) // 0x48 0x05 0xXXXXXXXX add rax, dword (local_addr) // 0x48 0x89 0x04 0x24 mov [rsp], rax // 0x48 0xB8 0xXXXXXXXXXXXXXXXX mov rax, ®[0] // 0x48 0x8B (reg<<3)|0x80 0xXXXXXXXX mov rdi, [rax + XXXXXXXX] // 0x48 0x8B (reg<<3)|0x80 0xXXXXXXXX mov rsi, [rax + XXXXXXXX] // 0x48 0x8B (reg<<3)|0x80 0xXXXXXXXX mov rbp, [rax + XXXXXXXX] // 0x48 0x8B (reg<<3)|0x80 0xXXXXXXXX mov rdx, [rax + XXXXXXXX] // 0x48 0x8B (reg<<3)|0x80 0xXXXXXXXX mov rcx, [rax + XXXXXXXX] // 0x48 0x8B (reg<<3)|0x80 0xXXXXXXXX mov rbx, [rax + XXXXXXXX] // 0x48 0x8B (reg<<3)|0x80 0xXXXXXXXX mov rax, [rax + XXXXXXXX] // 0xC3 ret // total : 84 bytes static void build_wrapper(precomp_instr *instr, unsigned char* pCode, precomp_block* block) { int i; #if defined(PROFILE_R4300) long long x86addr = (long long) pCode; int mipsop = -4; if (fwrite(&mipsop, 1, 4, pfProfile) != 4 || // write 4-byte MIPS opcode fwrite(&x86addr, 1, sizeof(char *), pfProfile) != sizeof(char *)) // write pointer to dynamically generated x86 code for this MIPS instruction DebugMessage(M64MSG_ERROR, "Error writing R4300 instruction address profiling data"); #endif *pCode++ = 0x48; *pCode++ = 0x83; *pCode++ = 0xEC; *pCode++ = 0x08; *pCode++ = 0x48; *pCode++ = 0xA1; *((unsigned long long *) pCode) = (unsigned long long) (&block->code); pCode += 8; *pCode++ = 0x48; *pCode++ = 0x05; *((unsigned int *) pCode) = (unsigned int) instr->local_addr; pCode += 4; *pCode++ = 0x48; *pCode++ = 0x89; *pCode++ = 0x04; *pCode++ = 0x24; *pCode++ = 0x48; *pCode++ = 0xB8; *((unsigned long long *) pCode) = (unsigned long long) ®[0]; pCode += 8; for (i=7; i>=0; i--) { long long riprel; if (instr->reg_cache_infos.needed_registers[i] != NULL) { *pCode++ = 0x48; *pCode++ = 0x8B; *pCode++ = 0x80 | (i << 3); riprel = (long long) ((unsigned char *) instr->reg_cache_infos.needed_registers[i] - (unsigned char *) ®[0]); *((int *) pCode) = (int) riprel; pCode += 4; if (riprel >= 0x7fffffffLL || riprel < -0x80000000LL) { DebugMessage(M64MSG_ERROR, "build_wrapper error: reg[%i] offset too big for relative address from %p to %p", i, (®[0]), instr->reg_cache_infos.needed_registers[i]); asm(" int $3; "); } } } *pCode++ = 0xC3; } void build_wrappers(precomp_instr *instr, int start, int end, precomp_block* block) { int i, reg; for (i=start; i #include "api/callbacks.h" #include "api/m64p_types.h" #include "r4300/cached_interp.h" #include "r4300/macros.h" #include "r4300/ops.h" #include "r4300/r4300.h" #include "r4300/recomp.h" #include "r4300/recomph.h" #include "r4300/x86_64/assemble_struct.h" // that's where the dynarec will restart when going back from a C function static unsigned long long *return_address; void dyna_jump(void) { if (stop == 1) { dyna_stop(); return; } if (PC->reg_cache_infos.need_map) *return_address = (unsigned long long) (PC->reg_cache_infos.jump_wrapper); else *return_address = (unsigned long long) (actual->code + PC->local_addr); } static long long save_rsp = 0; static long long save_rip = 0; void dyna_start(void *code) { /* save the base and stack pointers */ /* make a call and a pop to retrieve the instruction pointer and save it too */ /* then call the code(), which should theoretically never return. */ /* When dyna_stop() sets the *return_address to the saved RIP, the emulator thread will come back here. */ /* It will jump to label 2, restore the base and stack pointers, and exit this function */ DebugMessage(M64MSG_INFO, "R4300: starting 64-bit dynamic recompiler at: %p", code); #if defined(__GNUC__) && defined(__x86_64__) asm volatile (" push %%rbx \n" /* we must push an even # of registers to keep stack 16-byte aligned */ " push %%r12 \n" " push %%r13 \n" " push %%r14 \n" " push %%r15 \n" " push %%rbp \n" " mov %%rsp, %[save_rsp] \n" " lea %[reg], %%r15 \n" /* store the base location of the r4300 registers in r15 for addressing */ " call 1f \n" " jmp 2f \n" "1: \n" " pop %%rax \n" " mov %%rax, %[save_rip] \n" " sub $0x10, %%rsp \n" " and $-16, %%rsp \n" /* ensure that stack is 16-byte aligned */ " mov %%rsp, %%rax \n" " sub $8, %%rax \n" " mov %%rax, %[return_address]\n" " call *%%rbx \n" "2: \n" " mov %[save_rsp], %%rsp \n" " pop %%rbp \n" " pop %%r15 \n" " pop %%r14 \n" " pop %%r13 \n" " pop %%r12 \n" " pop %%rbx \n" : [save_rsp]"=m"(save_rsp), [save_rip]"=m"(save_rip), [return_address]"=m"(return_address) : "b" (code), [reg]"m"(*reg) : "%rax", "memory" ); #endif /* clear the registers so we don't return here a second time; that would be a bug */ save_rsp=0; save_rip=0; } void dyna_stop(void) { if (save_rip == 0) DebugMessage(M64MSG_WARNING, "Instruction pointer is 0 at dyna_stop()"); else { *return_address = (unsigned long long) save_rip; } } mupen64plus-core-src-2.5/src/rdp/000077500000000000000000000000001251723631200166535ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/rdp/fb.c000066400000000000000000000136361251723631200174170ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - fb.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "fb.h" #include "api/m64p_types.h" #include "memory/memory.h" #include "plugin/plugin.h" #include "r4300/r4300_core.h" #include "rdp_core.h" #include "ri/ri_controller.h" extern int fast_memory; #include void init_fb(struct fb* fb) { memset(fb, 0, sizeof(*fb)); fb->once = 1; } static void pre_framebuffer_read(struct fb* fb, uint32_t address) { size_t i; for(i = 0; i < FB_INFOS_COUNT; ++i) { if (fb->infos[i].addr) { unsigned int start = fb->infos[i].addr & 0x7FFFFF; unsigned int end = start + fb->infos[i].width* fb->infos[i].height* fb->infos[i].size - 1; if ((address & 0x7FFFFF) >= start && (address & 0x7FFFFF) <= end && fb->dirty_page[(address & 0x7FFFFF)>>12]) { gfx.fBRead(address); fb->dirty_page[(address & 0x7FFFFF)>>12] = 0; } } } } static void pre_framebuffer_write(struct fb* fb, uint32_t address) { size_t i; for(i = 0; i < FB_INFOS_COUNT; ++i) { if (fb->infos[i].addr) { unsigned int start = fb->infos[i].addr & 0x7FFFFF; unsigned int end = start + fb->infos[i].width* fb->infos[i].height* fb->infos[i].size - 1; if ((address & 0x7FFFFF) >= start && (address & 0x7FFFFF) <= end) gfx.fBWrite(address, 4); } } } int read_rdram_fb(void* opaque, uint32_t address, uint32_t* value) { struct rdp_core* dp = (struct rdp_core*)opaque; pre_framebuffer_read(&dp->fb, address); return read_rdram_dram(dp->ri, address, value); } int write_rdram_fb(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct rdp_core* dp = (struct rdp_core*)opaque; pre_framebuffer_write(&dp->fb, address); return write_rdram_dram(dp->ri, address, value, mask); } #define R(x) read_ ## x ## b, read_ ## x ## h, read_ ## x, read_ ## x ## d #define W(x) write_ ## x ## b, write_ ## x ## h, write_ ## x, write_ ## x ## d #define RW(x) R(x), W(x) void protect_framebuffers(struct rdp_core* dp) { struct fb* fb = &dp->fb; if (gfx.fBGetFrameBufferInfo && gfx.fBRead && gfx.fBWrite) gfx.fBGetFrameBufferInfo(fb->infos); if (gfx.fBGetFrameBufferInfo && gfx.fBRead && gfx.fBWrite && fb->infos[0].addr) { size_t i; for(i = 0; i < FB_INFOS_COUNT; ++i) { if (fb->infos[i].addr) { int j; int start = fb->infos[i].addr & 0x7FFFFF; int end = start + fb->infos[i].width* fb->infos[i].height* fb->infos[i].size - 1; int start1 = start; int end1 = end; start >>= 16; end >>= 16; for (j=start; j<=end; j++) { map_region(0x8000+j, M64P_MEM_RDRAM, RW(rdramFB)); map_region(0xa000+j, M64P_MEM_RDRAM, RW(rdramFB)); } start <<= 4; end <<= 4; for (j=start; j<=end; j++) { if (j>=start1 && j<=end1) fb->dirty_page[j]=1; else fb->dirty_page[j] = 0; } if (fb->once != 0) { fb->once = 0; fast_memory = 0; invalidate_r4300_cached_code(0, 0); } } } } } void unprotect_framebuffers(struct rdp_core* dp) { struct fb* fb = &dp->fb; if (gfx.fBGetFrameBufferInfo && gfx.fBRead && gfx.fBWrite && fb->infos[0].addr) { size_t i; for(i = 0; i < FB_INFOS_COUNT; ++i) { if (fb->infos[i].addr) { int j; int start = fb->infos[i].addr & 0x7FFFFF; int end = start + fb->infos[i].width* fb->infos[i].height* fb->infos[i].size - 1; start = start >> 16; end = end >> 16; for (j=start; j<=end; j++) { map_region(0x8000+j, M64P_MEM_RDRAM, RW(rdram)); map_region(0xa000+j, M64P_MEM_RDRAM, RW(rdram)); } } } } } mupen64plus-core-src-2.5/src/rdp/fb.h000066400000000000000000000041431251723631200174150ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - fb.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_RDP_FB_H #define M64P_RDP_FB_H #include #include "api/m64p_plugin.h" struct rdp_core; enum { FB_INFOS_COUNT = 6 }; enum { FB_DIRTY_PAGES_COUNT = 0x800 }; struct fb { unsigned char dirty_page[FB_DIRTY_PAGES_COUNT]; FrameBufferInfo infos[FB_INFOS_COUNT]; unsigned int once; }; void init_fb(struct fb* fb); int read_rdram_fb(void* opaque, uint32_t address, uint32_t* value); int write_rdram_fb(void* opaque, uint32_t address, uint32_t value, uint32_t mask); void protect_framebuffers(struct rdp_core* dp); void unprotect_framebuffers(struct rdp_core* dp); #endif mupen64plus-core-src-2.5/src/rdp/rdp_core.c000066400000000000000000000105671251723631200206250ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rdp_core.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "rdp_core.h" #include #include "memory/memory.h" #include "plugin/plugin.h" #include "r4300/r4300_core.h" #include "rsp/rsp_core.h" static int update_dpc_status(struct rdp_core* dp, uint32_t w) { /* see do_SP_Task for more info */ int do_sp_task_on_unfreeze = 0; /* clear / set xbus_dmem_dma */ if (w & 0x1) dp->dpc_regs[DPC_STATUS_REG] &= ~0x1; if (w & 0x2) dp->dpc_regs[DPC_STATUS_REG] |= 0x1; /* clear / set freeze */ if (w & 0x4) { dp->dpc_regs[DPC_STATUS_REG] &= ~0x2; if (!(dp->sp->regs[SP_STATUS_REG] & 0x3)) // !halt && !broke do_sp_task_on_unfreeze = 1; } if (w & 0x8) dp->dpc_regs[DPC_STATUS_REG] |= 0x2; /* clear / set flush */ if (w & 0x10) dp->dpc_regs[DPC_STATUS_REG] &= ~0x4; if (w & 0x20) dp->dpc_regs[DPC_STATUS_REG] |= 0x4; return do_sp_task_on_unfreeze; } void connect_rdp(struct rdp_core* dp, struct r4300_core* r4300, struct rsp_core* sp, struct ri_controller* ri) { dp->r4300 = r4300; dp->sp = sp; dp->ri = ri; } void init_rdp(struct rdp_core* dp) { memset(dp->dpc_regs, 0, DPC_REGS_COUNT*sizeof(uint32_t)); memset(dp->dps_regs, 0, DPS_REGS_COUNT*sizeof(uint32_t)); init_fb(&dp->fb); } int read_dpc_regs(void* opaque, uint32_t address, uint32_t* value) { struct rdp_core* dp = (struct rdp_core*)opaque; uint32_t reg = dpc_reg(address); *value = dp->dpc_regs[reg]; return 0; } int write_dpc_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct rdp_core* dp = (struct rdp_core*)opaque; uint32_t reg = dpc_reg(address); switch(reg) { case DPC_STATUS_REG: if (update_dpc_status(dp, value & mask) != 0) do_SP_Task(dp->sp); case DPC_CURRENT_REG: case DPC_CLOCK_REG: case DPC_BUFBUSY_REG: case DPC_PIPEBUSY_REG: case DPC_TMEM_REG: return 0; } masked_write(&dp->dpc_regs[reg], value, mask); switch(reg) { case DPC_START_REG: dp->dpc_regs[DPC_CURRENT_REG] = dp->dpc_regs[DPC_START_REG]; break; case DPC_END_REG: gfx.processRDPList(); signal_rcp_interrupt(dp->r4300, MI_INTR_DP); break; } return 0; } int read_dps_regs(void* opaque, uint32_t address, uint32_t* value) { struct rdp_core* dp = (struct rdp_core*)opaque; uint32_t reg = dps_reg(address); *value = dp->dps_regs[reg]; return 0; } int write_dps_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct rdp_core* dp = (struct rdp_core*)opaque; uint32_t reg = dps_reg(address); masked_write(&dp->dps_regs[reg], value, mask); return 0; } void rdp_interrupt_event(struct rdp_core* dp) { dp->dpc_regs[DPC_STATUS_REG] &= ~2; dp->dpc_regs[DPC_STATUS_REG] |= 0x81; raise_rcp_interrupt(dp->r4300, MI_INTR_DP); } mupen64plus-core-src-2.5/src/rdp/rdp_core.h000066400000000000000000000056271251723631200206330ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rdp_core.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_RDP_RDP_CORE_H #define M64P_RDP_RDP_CORE_H #include #include "fb.h" struct r4300_core; struct ri_controller; struct rsp_core; enum dpc_registers { DPC_START_REG, DPC_END_REG, DPC_CURRENT_REG, DPC_STATUS_REG, DPC_CLOCK_REG, DPC_BUFBUSY_REG, DPC_PIPEBUSY_REG, DPC_TMEM_REG, DPC_REGS_COUNT }; enum dps_registers { DPS_TBIST_REG, DPS_TEST_MODE_REG, DPS_BUFTEST_ADDR_REG, DPS_BUFTEST_DATA_REG, DPS_REGS_COUNT }; struct rdp_core { uint32_t dpc_regs[DPC_REGS_COUNT]; uint32_t dps_regs[DPS_REGS_COUNT]; struct fb fb; struct r4300_core* r4300; struct rsp_core* sp; struct ri_controller* ri; }; static uint32_t dpc_reg(uint32_t address) { return (address & 0xffff) >> 2; } static uint32_t dps_reg(uint32_t address) { return (address & 0xffff) >> 2; } void connect_rdp(struct rdp_core* dp, struct r4300_core* r4300, struct rsp_core* sp, struct ri_controller* ri); void init_rdp(struct rdp_core* dp); int read_dpc_regs(void* opaque, uint32_t address, uint32_t* value); int write_dpc_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask); int read_dps_regs(void* opaque, uint32_t address, uint32_t* value); int write_dps_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask); void rdp_interrupt_event(struct rdp_core* dp); #endif mupen64plus-core-src-2.5/src/ri/000077500000000000000000000000001251723631200165005ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/ri/rdram.c000066400000000000000000000056141251723631200177570ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rdram.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "rdram.h" #include #include "memory/memory.h" #include "ri_controller.h" void connect_rdram(struct rdram* rdram, uint32_t* dram, size_t dram_size) { rdram->dram = dram; rdram->dram_size = dram_size; } void init_rdram(struct rdram* rdram) { memset(rdram->regs, 0, RDRAM_REGS_COUNT*sizeof(uint32_t)); memset(rdram->dram, 0, rdram->dram_size); } int read_rdram_regs(void* opaque, uint32_t address, uint32_t* value) { struct ri_controller* ri = (struct ri_controller*)opaque; uint32_t reg = rdram_reg(address); *value = ri->rdram.regs[reg]; return 0; } int write_rdram_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct ri_controller* ri = (struct ri_controller*)opaque; uint32_t reg = rdram_reg(address); masked_write(&ri->rdram.regs[reg], value, mask); return 0; } int read_rdram_dram(void* opaque, uint32_t address, uint32_t* value) { struct ri_controller* ri = (struct ri_controller*)opaque; uint32_t addr = rdram_dram_address(address); *value = ri->rdram.dram[addr]; return 0; } int write_rdram_dram(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct ri_controller* ri = (struct ri_controller*)opaque; uint32_t addr = rdram_dram_address(address); masked_write(&ri->rdram.dram[addr], value, mask); return 0; } mupen64plus-core-src-2.5/src/ri/rdram.h000066400000000000000000000051701251723631200177610ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rdram.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_RI_RDRAM_H #define M64P_RI_RDRAM_H #include #include enum rdram_registers { RDRAM_CONFIG_REG, RDRAM_DEVICE_ID_REG, RDRAM_DELAY_REG, RDRAM_MODE_REG, RDRAM_REF_INTERVAL_REG, RDRAM_REF_ROW_REG, RDRAM_RAS_INTERVAL_REG, RDRAM_MIN_INTERVAL_REG, RDRAM_ADDR_SELECT_REG, RDRAM_DEVICE_MANUF_REG, RDRAM_REGS_COUNT }; struct rdram { uint32_t regs[RDRAM_REGS_COUNT]; uint32_t* dram; size_t dram_size; }; static uint32_t rdram_reg(uint32_t address) { return (address & 0x3ff) >> 2; } static uint32_t rdram_dram_address(uint32_t address) { return (address & 0xffffff) >> 2; } void connect_rdram(struct rdram* rdram, uint32_t* dram, size_t dram_size); void init_rdram(struct rdram* rdram); int read_rdram_regs(void* opaque, uint32_t address, uint32_t* value); int write_rdram_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask); int read_rdram_dram(void* opaque, uint32_t address, uint32_t* value); int write_rdram_dram(void* opaque, uint32_t address, uint32_t value, uint32_t mask); #endif mupen64plus-core-src-2.5/src/ri/rdram_detection_hack.c000066400000000000000000000040251251723631200227760ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rdram_detection_hack.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "rdram_detection_hack.h" #include #include "main/main.h" #include "ri_controller.h" #include "si/si_controller.h" /* HACK: force detected RDRAM size * This hack is triggered just before initial ROM loading (see pi_controller.c) * * Proper emulation of RI/RDRAM subsystem is required to avoid this hack. */ void force_detected_rdram_size_hack(void) { uint32_t address = (g_si.pif.cic.version != CIC_X105) ? 0x318 : 0x3f0; g_ri.rdram.dram[address/4] = g_ri.rdram.dram_size; } mupen64plus-core-src-2.5/src/ri/rdram_detection_hack.h000066400000000000000000000032101251723631200227760ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rdram_detection_hack.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_RI_RDRAM_DETECTION_HACK_H #define M64P_RI_RDRAM_DETECTION_HACK_H void force_detected_rdram_size_hack(void); #endif mupen64plus-core-src-2.5/src/ri/ri_controller.c000066400000000000000000000045031251723631200215230ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - ri_controller.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "ri_controller.h" #include #include "memory/memory.h" void connect_ri(struct ri_controller* ri, uint32_t* dram, size_t dram_size) { connect_rdram(&ri->rdram, dram, dram_size); } void init_ri(struct ri_controller* ri) { memset(ri->regs, 0, RI_REGS_COUNT*sizeof(uint32_t)); init_rdram(&ri->rdram); } int read_ri_regs(void* opaque, uint32_t address, uint32_t* value) { struct ri_controller* ri = (struct ri_controller*)opaque; uint32_t reg = ri_reg(address); *value = ri->regs[reg]; return 0; } int write_ri_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct ri_controller* ri = (struct ri_controller*)opaque; uint32_t reg = ri_reg(address); masked_write(&ri->regs[reg], value, mask); return 0; } mupen64plus-core-src-2.5/src/ri/ri_controller.h000066400000000000000000000044471251723631200215370ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - ri_controller.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_RI_RI_CONTROLLER_H #define M64P_RI_RI_CONTROLLER_H #include #include #include "rdram.h" enum ri_registers { RI_MODE_REG, RI_CONFIG_REG, RI_CURRENT_LOAD_REG, RI_SELECT_REG, RI_REFRESH_REG, RI_LATENCY_REG, RI_ERROR_REG, RI_WERROR_REG, RI_REGS_COUNT }; struct ri_controller { uint32_t regs[RI_REGS_COUNT]; struct rdram rdram; }; static uint32_t ri_reg(uint32_t address) { return (address & 0xffff) >> 2; } void connect_ri(struct ri_controller* ri, uint32_t* dram, size_t dram_size); void init_ri(struct ri_controller* ri); int read_ri_regs(void* opaque, uint32_t address, uint32_t* value); int write_ri_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask); #endif mupen64plus-core-src-2.5/src/rsp/000077500000000000000000000000001251723631200166725ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/rsp/rsp_core.c000066400000000000000000000231601251723631200206540ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rsp_core.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "rsp_core.h" #include #include "main/main.h" #include "main/profile.h" #include "memory/memory.h" #include "plugin/plugin.h" #include "r4300/r4300_core.h" #include "rdp/rdp_core.h" #include "ri/ri_controller.h" static void dma_sp_write(struct rsp_core* sp) { unsigned int i,j; unsigned int l = sp->regs[SP_RD_LEN_REG]; unsigned int length = ((l & 0xfff) | 7) + 1; unsigned int count = ((l >> 12) & 0xff) + 1; unsigned int skip = ((l >> 20) & 0xfff); unsigned int memaddr = sp->regs[SP_MEM_ADDR_REG] & 0xfff; unsigned int dramaddr = sp->regs[SP_DRAM_ADDR_REG] & 0xffffff; unsigned char *spmem = (unsigned char*)sp->mem + (sp->regs[SP_MEM_ADDR_REG] & 0x1000); unsigned char *dram = (unsigned char*)sp->ri->rdram.dram; for(j=0; jregs[SP_WR_LEN_REG]; unsigned int length = ((l & 0xfff) | 7) + 1; unsigned int count = ((l >> 12) & 0xff) + 1; unsigned int skip = ((l >> 20) & 0xfff); unsigned int memaddr = sp->regs[SP_MEM_ADDR_REG] & 0xfff; unsigned int dramaddr = sp->regs[SP_DRAM_ADDR_REG] & 0xffffff; unsigned char *spmem = (unsigned char*)sp->mem + (sp->regs[SP_MEM_ADDR_REG] & 0x1000); unsigned char *dram = (unsigned char*)sp->ri->rdram.dram; for(j=0; jregs[SP_STATUS_REG] &= ~0x1; if (w & 0x2) sp->regs[SP_STATUS_REG] |= 0x1; /* clear broke */ if (w & 0x4) sp->regs[SP_STATUS_REG] &= ~0x2; /* clear SP interrupt */ if (w & 0x8) { clear_rcp_interrupt(sp->r4300, MI_INTR_SP); } /* set SP interrupt */ if (w & 0x10) { signal_rcp_interrupt(sp->r4300, MI_INTR_SP); } /* clear / set single step */ if (w & 0x20) sp->regs[SP_STATUS_REG] &= ~0x20; if (w & 0x40) sp->regs[SP_STATUS_REG] |= 0x20; /* clear / set interrupt on break */ if (w & 0x80) sp->regs[SP_STATUS_REG] &= ~0x40; if (w & 0x100) sp->regs[SP_STATUS_REG] |= 0x40; /* clear / set signal 0 */ if (w & 0x200) sp->regs[SP_STATUS_REG] &= ~0x80; if (w & 0x400) sp->regs[SP_STATUS_REG] |= 0x80; /* clear / set signal 1 */ if (w & 0x800) sp->regs[SP_STATUS_REG] &= ~0x100; if (w & 0x1000) sp->regs[SP_STATUS_REG] |= 0x100; /* clear / set signal 2 */ if (w & 0x2000) sp->regs[SP_STATUS_REG] &= ~0x200; if (w & 0x4000) sp->regs[SP_STATUS_REG] |= 0x200; /* clear / set signal 3 */ if (w & 0x8000) sp->regs[SP_STATUS_REG] &= ~0x400; if (w & 0x10000) sp->regs[SP_STATUS_REG] |= 0x400; /* clear / set signal 4 */ if (w & 0x20000) sp->regs[SP_STATUS_REG] &= ~0x800; if (w & 0x40000) sp->regs[SP_STATUS_REG] |= 0x800; /* clear / set signal 5 */ if (w & 0x80000) sp->regs[SP_STATUS_REG] &= ~0x1000; if (w & 0x100000) sp->regs[SP_STATUS_REG] |= 0x1000; /* clear / set signal 6 */ if (w & 0x200000) sp->regs[SP_STATUS_REG] &= ~0x2000; if (w & 0x400000) sp->regs[SP_STATUS_REG] |= 0x2000; /* clear / set signal 7 */ if (w & 0x800000) sp->regs[SP_STATUS_REG] &= ~0x4000; if (w & 0x1000000) sp->regs[SP_STATUS_REG] |= 0x4000; //if (get_event(SP_INT)) return; if (!(w & 0x1) && !(w & 0x4)) return; if (!(sp->regs[SP_STATUS_REG] & 0x3)) // !halt && !broke do_SP_Task(sp); } void connect_rsp(struct rsp_core* sp, struct r4300_core* r4300, struct rdp_core* dp, struct ri_controller* ri) { sp->r4300 = r4300; sp->dp = dp; sp->ri = ri; } void init_rsp(struct rsp_core* sp) { memset(sp->mem, 0, SP_MEM_SIZE); memset(sp->regs, 0, SP_REGS_COUNT*sizeof(uint32_t)); memset(sp->regs2, 0, SP_REGS2_COUNT*sizeof(uint32_t)); sp->regs[SP_STATUS_REG] = 1; } int read_rsp_mem(void* opaque, uint32_t address, uint32_t* value) { struct rsp_core* sp = (struct rsp_core*)opaque; uint32_t addr = rsp_mem_address(address); *value = sp->mem[addr]; return 0; } int write_rsp_mem(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct rsp_core* sp = (struct rsp_core*)opaque; uint32_t addr = rsp_mem_address(address); masked_write(&sp->mem[addr], value, mask); return 0; } int read_rsp_regs(void* opaque, uint32_t address, uint32_t* value) { struct rsp_core* sp = (struct rsp_core*)opaque; uint32_t reg = rsp_reg(address); *value = sp->regs[reg]; if (reg == SP_SEMAPHORE_REG) { sp->regs[SP_SEMAPHORE_REG] = 1; } return 0; } int write_rsp_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct rsp_core* sp = (struct rsp_core*)opaque; uint32_t reg = rsp_reg(address); switch(reg) { case SP_STATUS_REG: update_sp_status(sp, value & mask); case SP_DMA_FULL_REG: case SP_DMA_BUSY_REG: return 0; } masked_write(&sp->regs[reg], value, mask); switch(reg) { case SP_RD_LEN_REG: dma_sp_write(sp); break; case SP_WR_LEN_REG: dma_sp_read(sp); break; case SP_SEMAPHORE_REG: sp->regs[SP_SEMAPHORE_REG] = 0; break; } return 0; } int read_rsp_regs2(void* opaque, uint32_t address, uint32_t* value) { struct rsp_core* sp = (struct rsp_core*)opaque; uint32_t reg = rsp_reg2(address); *value = sp->regs2[reg]; return 0; } int write_rsp_regs2(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct rsp_core* sp = (struct rsp_core*)opaque; uint32_t reg = rsp_reg2(address); masked_write(&sp->regs2[reg], value, mask); return 0; } void do_SP_Task(struct rsp_core* sp) { uint32_t save_pc = sp->regs2[SP_PC_REG] & ~0xfff; if (sp->mem[0xfc0/4] == 1) { if (sp->dp->dpc_regs[DPC_STATUS_REG] & 0x2) // DP frozen (DK64, BC) { // don't do the task now // the task will be done when DP is unfreezed (see update_dpc_status) return; } unprotect_framebuffers(sp->dp); //gfx.processDList(); sp->regs2[SP_PC_REG] &= 0xfff; timed_section_start(TIMED_SECTION_GFX); rsp.doRspCycles(0xffffffff); timed_section_end(TIMED_SECTION_GFX); sp->regs2[SP_PC_REG] |= save_pc; new_frame(); update_count(); if (sp->r4300->mi.regs[MI_INTR_REG] & MI_INTR_SP) add_interupt_event(SP_INT, 1000); if (sp->r4300->mi.regs[MI_INTR_REG] & MI_INTR_DP) add_interupt_event(DP_INT, 1000); sp->r4300->mi.regs[MI_INTR_REG] &= ~(MI_INTR_SP | MI_INTR_DP); sp->regs[SP_STATUS_REG] &= ~0x303; protect_framebuffers(sp->dp); } else if (sp->mem[0xfc0/4] == 2) { //audio.processAList(); sp->regs2[SP_PC_REG] &= 0xfff; timed_section_start(TIMED_SECTION_AUDIO); rsp.doRspCycles(0xffffffff); timed_section_end(TIMED_SECTION_AUDIO); sp->regs2[SP_PC_REG] |= save_pc; update_count(); if (sp->r4300->mi.regs[MI_INTR_REG] & MI_INTR_SP) add_interupt_event(SP_INT, 4000/*500*/); sp->r4300->mi.regs[MI_INTR_REG] &= ~MI_INTR_SP; sp->regs[SP_STATUS_REG] &= ~0x303; } else { sp->regs2[SP_PC_REG] &= 0xfff; rsp.doRspCycles(0xffffffff); sp->regs2[SP_PC_REG] |= save_pc; update_count(); if (sp->r4300->mi.regs[MI_INTR_REG] & MI_INTR_SP) add_interupt_event(SP_INT, 0/*100*/); sp->r4300->mi.regs[MI_INTR_REG] &= ~MI_INTR_SP; sp->regs[SP_STATUS_REG] &= ~0x203; } } void rsp_interrupt_event(struct rsp_core* sp) { sp->regs[SP_STATUS_REG] |= 0x203; if ((sp->regs[SP_STATUS_REG] & 0x40) != 0) { raise_rcp_interrupt(sp->r4300, MI_INTR_SP); } } mupen64plus-core-src-2.5/src/rsp/rsp_core.h000066400000000000000000000062171251723631200206650ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rsp_core.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_RSP_RSP_CORE_H #define M64P_RSP_RSP_CORE_H #include struct r4300_core; struct rdp_core; struct ri_controller; enum { SP_MEM_SIZE = 0x2000 }; enum sp_registers { SP_MEM_ADDR_REG, SP_DRAM_ADDR_REG, SP_RD_LEN_REG, SP_WR_LEN_REG, SP_STATUS_REG, SP_DMA_FULL_REG, SP_DMA_BUSY_REG, SP_SEMAPHORE_REG, SP_REGS_COUNT }; enum sp_registers2 { SP_PC_REG, SP_IBIST_REG, SP_REGS2_COUNT }; struct rsp_core { uint32_t mem[SP_MEM_SIZE/4]; uint32_t regs[SP_REGS_COUNT]; uint32_t regs2[SP_REGS2_COUNT]; struct r4300_core* r4300; struct rdp_core* dp; struct ri_controller* ri; }; static uint32_t rsp_mem_address(uint32_t address) { return (address & 0x1fff) >> 2; } static uint32_t rsp_reg(uint32_t address) { return (address & 0xffff) >> 2; } static uint32_t rsp_reg2(uint32_t address) { return (address & 0xffff) >> 2; } void connect_rsp(struct rsp_core* sp, struct r4300_core* r4300, struct rdp_core* dp, struct ri_controller* ri); void init_rsp(struct rsp_core* sp); int read_rsp_mem(void* opaque, uint32_t address, uint32_t* value); int write_rsp_mem(void* opaque, uint32_t address, uint32_t value, uint32_t mask); int read_rsp_regs(void* opaque, uint32_t address, uint32_t* value); int write_rsp_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask); int read_rsp_regs2(void* opaque, uint32_t address, uint32_t* value); int write_rsp_regs2(void* opaque, uint32_t address, uint32_t value, uint32_t mask); void do_SP_Task(struct rsp_core* sp); void rsp_interrupt_event(struct rsp_core* sp); #endif mupen64plus-core-src-2.5/src/si/000077500000000000000000000000001251723631200165015ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/si/af_rtc.c000066400000000000000000000057141251723631200201120ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - af_rtc.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "af_rtc.h" #include #include "api/callbacks.h" #include "api/m64p_types.h" static unsigned char byte2bcd(int n) { n %= 100; return ((n / 10) << 4) | (n % 10); } const struct tm* af_rtc_get_time(struct af_rtc* rtc) { return rtc->get_time(rtc->user_data); } void af_rtc_status_command(struct af_rtc* rtc, uint8_t* cmd) { /* AF-RTC status query */ cmd[3] = 0x00; cmd[4] = 0x10; cmd[5] = 0x00; } void af_rtc_read_command(struct af_rtc* rtc, uint8_t* cmd) { const struct tm *rtc_time; /* read RTC block (cmd[3]: block number) */ switch (cmd[3]) { case 0: cmd[4] = 0x00; cmd[5] = 0x02; cmd[12] = 0x00; break; case 1: DebugMessage(M64MSG_ERROR, "AF-RTC read command: cannot read block 1"); break; case 2: rtc_time = af_rtc_get_time(rtc); cmd[4] = byte2bcd(rtc_time->tm_sec); cmd[5] = byte2bcd(rtc_time->tm_min); cmd[6] = 0x80 + byte2bcd(rtc_time->tm_hour); cmd[7] = byte2bcd(rtc_time->tm_mday); cmd[8] = byte2bcd(rtc_time->tm_wday); cmd[9] = byte2bcd(rtc_time->tm_mon + 1); cmd[10] = byte2bcd(rtc_time->tm_year); cmd[11] = byte2bcd(rtc_time->tm_year / 100); cmd[12] = 0x00; // status break; } } void af_rtc_write_command(struct af_rtc* rtc, uint8_t* cmd) { /* write RTC block */ DebugMessage(M64MSG_ERROR, "AF-RTC write command: not yet implemented"); } mupen64plus-core-src-2.5/src/si/af_rtc.h000066400000000000000000000037011251723631200201110ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - af_rtc.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_SI_AF_RTC_H #define M64P_SI_AF_RTC_H #include struct tm; struct af_rtc { /* external time source */ void* user_data; const struct tm* (*get_time)(void*); }; const struct tm* af_rtc_get_time(struct af_rtc* rtc); void af_rtc_status_command(struct af_rtc* rtc, uint8_t* cmd); void af_rtc_read_command(struct af_rtc* rtc, uint8_t* cmd); void af_rtc_write_command(struct af_rtc* rtc, uint8_t* cmd); #endif mupen64plus-core-src-2.5/src/si/cic.c000066400000000000000000000052711251723631200174100ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cic.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "cic.h" #include #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #define __STDC_FORMAT_MACROS #include void init_cic_using_ipl3(struct cic* cic, const void* ipl3) { size_t i; uint64_t crc = 0; static const struct cic cics[] = { { CIC_X101, 0x3f }, { CIC_X102, 0x3f }, { CIC_X103, 0x78 }, { CIC_X105, 0x91 }, { CIC_X106, 0x85 } }; for (i = 0; i < 0xfc0/4; i++) crc += ((uint32_t*)ipl3)[i]; switch(crc) { default: DebugMessage(M64MSG_WARNING, "Unknown CIC type (%016" PRIX64 ")! using CIC 6102.", crc); /* fall through */ case UINT64_C(0x000000D057C85244): i = 1; break; /* CIC_X102 */ case UINT64_C(0x000000D0027FDF31): /* CIC_X101 */ case UINT64_C(0x000000CFFB631223): i = 0; break; /* CIC_X101 */ case UINT64_C(0x000000D6497E414B): i = 2; break; /* CIC_X103 */ case UINT64_C(0x0000011A49F60E96): i = 3; break; /* CIC_X105 */ case UINT64_C(0x000000D6D5BE5580): i = 4; break; /* CIC_X106 */ } memcpy(cic, &cics[i], sizeof(*cic)); } mupen64plus-core-src-2.5/src/si/cic.h000066400000000000000000000034321251723631200174120ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - cic.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_SI_CIC_H #define M64P_SI_CIC_H enum cic_version { CIC_X101, CIC_X102, CIC_X103, CIC_X105, CIC_X106 }; struct cic { enum cic_version version; unsigned int seed; }; void init_cic_using_ipl3(struct cic* cic, const void* ipl3); #endif mupen64plus-core-src-2.5/src/si/eeprom.c000066400000000000000000000060511251723631200201360ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - eeprom.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "eeprom.h" #include #include #include "api/callbacks.h" #include "api/m64p_types.h" #define __STDC_FORMAT_MACROS #include void eeprom_save(struct eeprom* eeprom) { eeprom->save(eeprom->user_data); } void format_eeprom(uint8_t* eeprom, size_t size) { memset(eeprom, 0xff, size); } void eeprom_status_command(struct eeprom* eeprom, uint8_t* cmd) { /* check size */ if (cmd[1] != 3) { cmd[1] |= 0x40; if ((cmd[1] & 3) > 0) cmd[3] = (eeprom->id & 0xff); if ((cmd[1] & 3) > 1) cmd[4] = (eeprom->id >> 8); if ((cmd[1] & 3) > 2) cmd[5] = 0; } else { cmd[3] = (eeprom->id & 0xff); cmd[4] = (eeprom->id >> 8); cmd[5] = 0; } } void eeprom_read_command(struct eeprom* eeprom, uint8_t* cmd) { uint16_t address = cmd[3] * 8; uint8_t* data = &cmd[4]; /* read 8-byte block */ if (address < eeprom->size) { memcpy(data, &eeprom->data[address], 8); } else { DebugMessage(M64MSG_WARNING, "Invalid access to eeprom address=%04" PRIX16, address); } } void eeprom_write_command(struct eeprom* eeprom, uint8_t* cmd) { uint16_t address = cmd[3] * 8; const uint8_t* data = &cmd[4]; /* write 8-byte block */ if (address < eeprom->size) { memcpy(&eeprom->data[address], data, 8); eeprom_save(eeprom); } else { DebugMessage(M64MSG_WARNING, "Invalid access to eeprom address=%04" PRIX16, address); } } mupen64plus-core-src-2.5/src/si/eeprom.h000066400000000000000000000040361251723631200201440ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - eeprom.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_SI_EEPROM_H #define M64P_SI_EEPROM_H #include #include struct eeprom { /* external eep storage */ void* user_data; void (*save)(void*); uint8_t* data; size_t size; uint16_t id; }; void eeprom_save(struct eeprom* eeprom); void format_eeprom(uint8_t* eeprom, size_t size); void eeprom_status_command(struct eeprom* eeprom, uint8_t* cmd); void eeprom_read_command(struct eeprom* eeprom, uint8_t* cmd); void eeprom_write_command(struct eeprom* eeprom, uint8_t* cmd); #endif mupen64plus-core-src-2.5/src/si/game_controller.c000066400000000000000000000125661251723631200220330ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - game_controller.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "game_controller.h" #include "api/callbacks.h" #include "api/m64p_types.h" #include "pif.h" #ifdef COMPARE_CORE #include "api/debugger.h" #endif #include #include static uint8_t pak_data_crc(const uint8_t* data) { size_t i; uint8_t crc = 0; for(i = 0; i <= 0x20; ++i) { int mask; for (mask = 0x80; mask >= 1; mask >>= 1) { uint8_t xor_tap = (crc & 0x80) ? 0x85 : 0x00; crc <<= 1; if (i != 0x20 && (data[i] & mask)) crc |= 1; crc ^= xor_tap; } } return crc; } static void read_controller_read_buttons(struct game_controller* cont, uint8_t* cmd) { enum pak_type pak; int connected = game_controller_is_connected(cont, &pak); if (!connected) return; *((uint32_t*)(cmd + 3)) = game_controller_get_input(cont); #ifdef COMPARE_CORE CoreCompareDataSync(4, cmd + 3); #endif } static void controller_status_command(struct game_controller* cont, uint8_t* cmd) { enum pak_type pak; int connected = game_controller_is_connected(cont, &pak); if (cmd[1] & 0x80) return; if (!connected) { cmd[1] |= 0x80; return; } cmd[3] = 0x05; cmd[4] = 0x00; switch(pak) { case PAK_MEM: case PAK_RUMBLE: case PAK_TRANSFER: cmd[5] = 1; break; case PAK_NONE: default: cmd[5] = 0; } } static void controller_read_buttons_command(struct game_controller* cont, uint8_t* cmd) { enum pak_type pak; int connected = game_controller_is_connected(cont, &pak); if (!connected) cmd[1] |= 0x80; /* NOTE: buttons reading is done in read_controller_read_buttons instead */ } static void controller_read_pak_command(struct game_controller* cont, uint8_t* cmd) { enum pak_type pak; int connected = game_controller_is_connected(cont, &pak); if (!connected) { cmd[1] |= 0x80; return; } switch (pak) { case PAK_NONE: memset(&cmd[5], 0, 0x20); break; case PAK_MEM: mempak_read_command(&cont->mempak, cmd); break; case PAK_RUMBLE: rumblepak_read_command(&cont->rumblepak, cmd); break; case PAK_TRANSFER: /* TODO */ break; default: DebugMessage(M64MSG_WARNING, "Unknown plugged pak %d", (int)pak); } cmd[0x25] = pak_data_crc(&cmd[5]); } static void controller_write_pak_command(struct game_controller* cont, uint8_t* cmd) { enum pak_type pak; int connected = game_controller_is_connected(cont, &pak); if (!connected) { cmd[1] |= 0x80; return; } switch (pak) { case PAK_NONE: /* do nothing */ break; case PAK_MEM: mempak_write_command(&cont->mempak, cmd); break; case PAK_RUMBLE: rumblepak_write_command(&cont->rumblepak, cmd); break; case PAK_TRANSFER: /* TODO */ break; default: DebugMessage(M64MSG_WARNING, "Unknown plugged pak %d", (int)pak); } cmd[0x25] = pak_data_crc(&cmd[5]); } int game_controller_is_connected(struct game_controller* cont, enum pak_type* pak) { return cont->is_connected(cont->user_data, pak); } uint32_t game_controller_get_input(struct game_controller* cont) { return cont->get_input(cont->user_data); } void process_controller_command(struct game_controller* cont, uint8_t* cmd) { switch (cmd[2]) { case PIF_CMD_STATUS: case PIF_CMD_RESET: controller_status_command(cont, cmd); break; case PIF_CMD_CONTROLLER_READ: controller_read_buttons_command(cont, cmd); break; case PIF_CMD_PAK_READ: controller_read_pak_command(cont, cmd); break; case PIF_CMD_PAK_WRITE: controller_write_pak_command(cont, cmd); break; break; } } void read_controller(struct game_controller* cont, uint8_t* cmd) { switch (cmd[2]) { case PIF_CMD_CONTROLLER_READ: read_controller_read_buttons(cont, cmd); break; } } mupen64plus-core-src-2.5/src/si/game_controller.h000066400000000000000000000043541251723631200220340ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - game_controller.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_SI_GAME_CONTROLLER_H #define M64P_SI_GAME_CONTROLLER_H #include #include "mempak.h" #include "rumblepak.h" enum pak_type { PAK_NONE, PAK_MEM, PAK_RUMBLE, PAK_TRANSFER }; struct game_controller { /* external controller input */ void* user_data; int (*is_connected)(void*,enum pak_type*); uint32_t (*get_input)(void*); struct mempak mempak; struct rumblepak rumblepak; }; int game_controller_is_connected(struct game_controller* cont, enum pak_type* pak); uint32_t game_controller_get_input(struct game_controller* cont); void process_controller_command(struct game_controller* cont, uint8_t* cmd); void read_controller(struct game_controller* cont, uint8_t* cmd); #endif mupen64plus-core-src-2.5/src/si/mempak.c000066400000000000000000000077171251723631200201330ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - mempak.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "mempak.h" #include #include void mempak_save(struct mempak* mpk) { mpk->save(mpk->user_data); } void format_mempak(uint8_t* mpk_data) { size_t i; static const uint8_t init[] = { 0x81,0x01,0x02,0x03, 0x04,0x05,0x06,0x07, 0x08,0x09,0x0a,0x0b, 0x0c,0x0d,0x0e,0x0f, 0x10,0x11,0x12,0x13, 0x14,0x15,0x16,0x17, 0x18,0x19,0x1a,0x1b, 0x1c,0x1d,0x1e,0x1f, 0xff,0xff,0xff,0xff, 0x05,0x1a,0x5f,0x13, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff, 0xff,0xff,0x01,0xff, 0x66,0x25,0x99,0xcd, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0xff,0xff,0xff,0xff, 0x05,0x1a,0x5f,0x13, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff, 0xff,0xff,0x01,0xff, 0x66,0x25,0x99,0xcd, 0xff,0xff,0xff,0xff, 0x05,0x1a,0x5f,0x13, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff, 0xff,0xff,0x01,0xff, 0x66,0x25,0x99,0xcd, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0xff,0xff,0xff,0xff, 0x05,0x1a,0x5f,0x13, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff, 0xff,0xff,0x01,0xff, 0x66,0x25,0x99,0xcd, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x71,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03, 0x00,0x03,0x00,0x03 }; memcpy(mpk_data, init, 272); for(i = 272; i < MEMPAK_SIZE; i += 2) { mpk_data[i] = 0x00; mpk_data[i+1] = 0x03; } } void mempak_read_command(struct mempak* mpk, uint8_t* cmd) { uint16_t address = (cmd[3] << 8) | (cmd[4] & 0xe0); if (address < 0x8000) { memcpy(&cmd[5], &mpk->data[address], 0x20); } else { memset(&cmd[5], 0x00, 0x20); } } void mempak_write_command(struct mempak* mpk, uint8_t* cmd) { uint16_t address = (cmd[3] << 8) | (cmd[4] & 0xe0); if (address < 0x8000) { memcpy(&mpk->data[address], &cmd[5], 0x20); mempak_save(mpk); } else { /* do nothing */ } } mupen64plus-core-src-2.5/src/si/mempak.h000066400000000000000000000036601251723631200201310ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - mempak.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_SI_MEMPAK_H #define M64P_SI_MEMPAK_H #include struct mempak { /* external mpk storage */ void* user_data; void (*save)(void*); uint8_t* data; }; enum { MEMPAK_SIZE = 0x8000 }; void mempak_save(struct mempak* mpk); void format_mempak(uint8_t* mempak); void mempak_read_command(struct mempak* mpk, uint8_t* cmd); void mempak_write_command(struct mempak* mpk, uint8_t* cmd); #endif mupen64plus-core-src-2.5/src/si/n64_cic_nus_6105.c000066400000000000000000000137501251723631200214400ustar00rootroot00000000000000/* * Copyright 2011 X-Scale. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY X-Scale ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL X-Scale OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of X-Scale. * * This software provides an algorithm that emulates the protection scheme of * N64 PIF/CIC-NUS-6105, by determining the proper response to each challenge. * It was synthesized after a careful, exhaustive and detailed analysis of the * challenge/response pairs stored in the 'pif2.dat' file from Project 64. * These challenge/response pairs were the only resource used during this * project. There was no kind of physical access to N64 hardware. * * This project would have never been possible without the contribuitions of * the following individuals and organizations: * * - Oman: For being at the right place at the right time and being brave * enough to pay a personal price so we could understand in a much deeper * way how this magical console really works. We owe you so much. * * - Jovis: For all the positive energy and impressive hacking spirit that you * shared with the N64 community. You were absolutely instrumental in * several key events that shaped the N64 community in the last 14 years. * Even if you're not physically with us anymore, your heritage, your * knowledge and your attitude will never be forgotten. * * 'The candle that burns twice as bright burns half as long.' * * - LaC: For the endless contributions that you've given to the N64 community * since the early days, when N64 was the next big thing. I've always * admired the deep knowledge that you've gathered about the most little * hardware details. Recently, you challanged us to find a small and * concise algorithm that would emulate the behaviour of CIC-NUS-6105 * challenge/response protection scheme and here is the final result. * LaC, Oman and Jovis were definitly the dream team of N64 reversing in * the late 90's. Without your contributions, we would be much poorer. * * - marshall: For keeping the N64 scene alive during the last decade, when * most people lost interest and moved along to different projects. You * are the force that has been keeping us all together in the later * years. When almost nobody cared about N64 anymore, you were always * there, spreading the word, developing in the console, and lately, * making impressive advances on the hardware side. I wish the best * success to your new 64drive project. * * - hcs: For your contributions to the better understanding of the inner * workings of the Reality Co-Processor (RCP). Your skills have impressed * me for a long time now. And without your precious help by sharing your * kownledge, I would have never understood the immense importance of * Oman, Jovis and LaC achievements. Thank you ! * * - Azimer & Tooie: For sharing with the N64 community your findings about the * challenge/response pair used in 'Jet Force Gemini' and the 267 * challenge/response pairs used in 'Banjo Tooie', all stored in the * 'pif2.dat' file of Project 64. They were instrumental to the final * success of this endeavour. * * - Silicon Graphics, Inc. (SGI): For creating MIPS R4000, MIPS R4300 and * Reality Co-Processor (RCP). You were the ultimate dream creator during * the late 80's and early 90's. A very special word of gratitude goes to * the two teams that during those years created RCP and MIPS R4300. They * were technological breakthroughs back then. * * On a personal note, I would like to show my deepest gratitude to _Bijou_, * for being always a source of endless hope and inspiration. * * -= X-Scale =- (#n64dev@EFnet) */ #include "n64_cic_nus_6105.h" void n64_cic_nus_6105(char chl[], char rsp[], int len) { static char lut0[0x10] = { 0x4, 0x7, 0xA, 0x7, 0xE, 0x5, 0xE, 0x1, 0xC, 0xF, 0x8, 0xF, 0x6, 0x3, 0x6, 0x9 }; static char lut1[0x10] = { 0x4, 0x1, 0xA, 0x7, 0xE, 0x5, 0xE, 0x1, 0xC, 0x9, 0x8, 0x5, 0x6, 0x3, 0xC, 0x9 }; char key, *lut; int i, sgn, mag, mod; for (key = 0xB, lut = lut0, i = 0; i < len; i++) { rsp[i] = (key + 5 * chl[i]) & 0xF; key = lut[(int) rsp[i]]; sgn = (rsp[i] >> 3) & 0x1; mag = ((sgn == 1) ? ~rsp[i] : rsp[i]) & 0x7; mod = (mag % 3 == 1) ? sgn : 1 - sgn; if (lut == lut1 && (rsp[i] == 0x1 || rsp[i] == 0x9)) mod = 1; if (lut == lut1 && (rsp[i] == 0xB || rsp[i] == 0xE)) mod = 0; lut = (mod == 1) ? lut1 : lut0; } } mupen64plus-core-src-2.5/src/si/n64_cic_nus_6105.h000066400000000000000000000124251251723631200214430ustar00rootroot00000000000000/* * Copyright 2011 X-Scale. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY X-Scale ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL X-Scale OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of X-Scale. * * This software provides an algorithm that emulates the protection scheme of * N64 PIF/CIC-NUS-6105, by determining the proper response to each challenge. * It was synthesized after a careful, exhaustive and detailed analysis of the * challenge/response pairs stored in the 'pif2.dat' file from Project 64. * These challenge/response pairs were the only resource used during this * project. There was no kind of physical access to N64 hardware. * * This project would have never been possible without the contribuitions of * the following individuals and organizations: * * - Oman: For being at the right place at the right time and being brave * enough to pay a personal price so we could understand in a much deeper * way how this magical console really works. We owe you so much. * * - Jovis: For all the positive energy and impressive hacking spirit that you * shared with the N64 community. You were absolutely instrumental in * several key events that shaped the N64 community in the last 14 years. * Even if you're not physically with us anymore, your heritage, your * knowledge and your attitude will never be forgotten. * * 'The candle that burns twice as bright burns half as long.' * * - LaC: For the endless contributions that you've given to the N64 community * since the early days, when N64 was the next big thing. I've always * admired the deep knowledge that you've gathered about the most little * hardware details. Recently, you challanged us to find a small and * concise algorithm that would emulate the behaviour of CIC-NUS-6105 * challenge/response protection scheme and here is the final result. * LaC, Oman and Jovis were definitly the dream team of N64 reversing in * the late 90's. Without your contributions, we would be much poorer. * * - marshall: For keeping the N64 scene alive during the last decade, when * most people lost interest and moved along to different projects. You * are the force that has been keeping us all together in the later * years. When almost nobody cared about N64 anymore, you were always * there, spreading the word, developing in the console, and lately, * making impressive advances on the hardware side. I wish the best * success to your new 64drive project. * * - hcs: For your contributions to the better understanding of the inner * workings of the Reality Co-Processor (RCP). Your skills have impressed * me for a long time now. And without your precious help by sharing your * kownledge, I would have never understood the immense importance of * Oman, Jovis and LaC achievements. Thank you ! * * - Azimer & Tooie: For sharing with the N64 community your findings about the * challenge/response pair used in 'Jet Force Gemini' and the 267 * challenge/response pairs used in 'Banjo Tooie', all stored in the * 'pif2.dat' file of Project 64. They were instrumental to the final * success of this endeavour. * * - Silicon Graphics, Inc. (SGI): For creating MIPS R4000, MIPS R4300 and * Reality Co-Processor (RCP). You were the ultimate dream creator during * the late 80's and early 90's. A very special word of gratitude goes to * the two teams that during those years created RCP and MIPS R4300. They * were technological breakthroughs back then. * * On a personal note, I would like to show my deepest gratitude to _Bijou_, * for being always a source of endless hope and inspiration. * * -= X-Scale =- (#n64dev@EFnet) */ #ifndef N64_CIC_NUS_6105_H #define N64_CIC_NUS_6105_H #define CHL_LEN 0x20 void n64_cic_nus_6105(char chl[], char rsp[], int len); #endif /* N64_CIC_NUS_6105_H */ mupen64plus-core-src-2.5/src/si/pif.c000066400000000000000000000174231251723631200174320ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - pif.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "pif.h" #include #include #include "api/callbacks.h" #include "api/m64p_plugin.h" #include "api/m64p_types.h" #include "memory/memory.h" #include "n64_cic_nus_6105.h" #include "plugin/plugin.h" #include "r4300/r4300_core.h" #include "si_controller.h" #define __STDC_FORMAT_MACROS #include //#define DEBUG_PIF #ifdef DEBUG_PIF void print_pif(struct pif* pif) { int i; for (i=0; i<(64/8); i++) DebugMessage(M64MSG_INFO, "%02" PRIX8 " %02" PRIX8 " %02" PRIX8 " %02" PRIX8 " | %02" PRIX8 " %02" PRIX8 " %02" PRIX8 " %02" PRIX8, pif->ram[i*8+0], pif->ram[i*8+1],pif->ram[i*8+2], pif->ram[i*8+3], pif->ram[i*8+4], pif->ram[i*8+5],pif->ram[i*8+6], pif->ram[i*8+7]); } #endif static void process_cart_command(struct pif* pif, uint8_t* cmd) { switch (cmd[2]) { case PIF_CMD_STATUS: eeprom_status_command(&pif->eeprom, cmd); break; case PIF_CMD_EEPROM_READ: eeprom_read_command(&pif->eeprom, cmd); break; case PIF_CMD_EEPROM_WRITE: eeprom_write_command(&pif->eeprom, cmd); break; case PIF_CMD_AF_RTC_STATUS: af_rtc_status_command(&pif->af_rtc, cmd); break; case PIF_CMD_AF_RTC_READ: af_rtc_read_command(&pif->af_rtc, cmd); break; case PIF_CMD_AF_RTC_WRITE: af_rtc_write_command(&pif->af_rtc, cmd); break; default: DebugMessage(M64MSG_ERROR, "unknown PIF command: %02" PRIX8, cmd[2]); } } void init_pif(struct pif* pif) { memset(pif->ram, 0, PIF_RAM_SIZE); } int read_pif_ram(void* opaque, uint32_t address, uint32_t* value) { struct si_controller* si = (struct si_controller*)opaque; uint32_t addr = pif_ram_address(address); if (addr >= PIF_RAM_SIZE) { DebugMessage(M64MSG_ERROR, "Invalid PIF address: %08" PRIX32, address); *value = 0; return -1; } memcpy(value, si->pif.ram + addr, sizeof(*value)); *value = sl(*value); return 0; } int write_pif_ram(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct si_controller* si = (struct si_controller*)opaque; uint32_t addr = pif_ram_address(address); if (addr >= PIF_RAM_SIZE) { DebugMessage(M64MSG_ERROR, "Invalid PIF address: %08" PRIX32, address); return -1; } masked_write((uint32_t*)(&si->pif.ram[addr]), sl(value), sl(mask)); if ((addr == 0x3c) && (mask & 0xff)) { if (si->pif.ram[0x3f] == 0x08) { si->pif.ram[0x3f] = 0; update_count(); add_interupt_event(SI_INT, /*0x100*/0x900); } else { update_pif_write(si); } } return 0; } void update_pif_write(struct si_controller* si) { struct pif* pif = &si->pif; char challenge[30], response[30]; int i=0, channel=0; if (pif->ram[0x3F] > 1) { switch (pif->ram[0x3F]) { case 0x02: #ifdef DEBUG_PIF DebugMessage(M64MSG_INFO, "update_pif_write() pif_ram[0x3f] = 2 - CIC challenge"); #endif // format the 'challenge' message into 30 nibbles for X-Scale's CIC code for (i = 0; i < 15; i++) { challenge[i*2] = (pif->ram[48+i] >> 4) & 0x0f; challenge[i*2+1] = pif->ram[48+i] & 0x0f; } // calculate the proper response for the given challenge (X-Scale's algorithm) n64_cic_nus_6105(challenge, response, CHL_LEN - 2); pif->ram[46] = 0; pif->ram[47] = 0; // re-format the 'response' into a byte stream for (i = 0; i < 15; i++) { pif->ram[48+i] = (response[i*2] << 4) + response[i*2+1]; } // the last byte (2 nibbles) is always 0 pif->ram[63] = 0; break; case 0x08: #ifdef DEBUG_PIF DebugMessage(M64MSG_INFO, "update_pif_write() pif_ram[0x3f] = 8"); #endif pif->ram[0x3F] = 0; break; default: DebugMessage(M64MSG_ERROR, "error in update_pif_write(): %" PRIX8, pif->ram[0x3F]); } return; } while (i<0x40) { switch (pif->ram[i]) { case 0x00: channel++; if (channel > 6) i=0x40; break; case 0xFF: break; default: if (!(pif->ram[i] & 0xC0)) { if (channel < 4) { if (Controls[channel].Present && Controls[channel].RawData) input.controllerCommand(channel, &pif->ram[i]); else process_controller_command(&pif->controllers[channel], &pif->ram[i]); } else if (channel == 4) process_cart_command(pif, &pif->ram[i]); else DebugMessage(M64MSG_ERROR, "channel >= 4 in update_pif_write"); i += pif->ram[i] + (pif->ram[(i+1)] & 0x3F) + 1; channel++; } else i=0x40; } i++; } //pif->ram[0x3F] = 0; /* notify the INPUT plugin that we're at the end of PIF ram processing */ input.controllerCommand(-1, NULL); } void update_pif_read(struct si_controller* si) { struct pif* pif = &si->pif; int i=0, channel=0; while (i<0x40) { switch (pif->ram[i]) { case 0x00: channel++; if (channel > 6) i=0x40; break; case 0xFE: i = 0x40; break; case 0xFF: break; case 0xB4: case 0x56: case 0xB8: break; default: if (!(pif->ram[i] & 0xC0)) { if (channel < 4) { if (Controls[channel].Present && Controls[channel].RawData) input.readController(channel, &pif->ram[i]); else read_controller(&pif->controllers[channel], &pif->ram[i]); } i += pif->ram[i] + (pif->ram[(i+1)] & 0x3F) + 1; channel++; } else i=0x40; } i++; } /* notify the INPUT plugin that we're at the end of PIF ram processing */ input.readController(-1, NULL); } mupen64plus-core-src-2.5/src/si/pif.h000066400000000000000000000052071251723631200174340ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - pif.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_SI_PIF_H #define M64P_SI_PIF_H #include #include "af_rtc.h" #include "cic.h" #include "eeprom.h" #include "game_controller.h" enum { GAME_CONTROLLERS_COUNT = 4 }; struct si_controller; enum { PIF_RAM_SIZE = 0x40 }; enum pif_commands { PIF_CMD_STATUS = 0x00, PIF_CMD_CONTROLLER_READ = 0x01, PIF_CMD_PAK_READ = 0x02, PIF_CMD_PAK_WRITE = 0x03, PIF_CMD_EEPROM_READ = 0x04, PIF_CMD_EEPROM_WRITE = 0x05, PIF_CMD_AF_RTC_STATUS = 0x06, PIF_CMD_AF_RTC_READ = 0x07, PIF_CMD_AF_RTC_WRITE = 0x08, PIF_CMD_RESET = 0xff, }; struct pif { uint8_t ram[PIF_RAM_SIZE]; struct game_controller controllers[GAME_CONTROLLERS_COUNT]; struct eeprom eeprom; struct af_rtc af_rtc; struct cic cic; }; static uint32_t pif_ram_address(uint32_t address) { return ((address & 0xfffc) - 0x7c0); } void init_pif(struct pif* pif); int read_pif_ram(void* opaque, uint32_t address, uint32_t* value); int write_pif_ram(void* opaque, uint32_t address, uint32_t value, uint32_t mask); void update_pif_write(struct si_controller* si); void update_pif_read(struct si_controller* si); #endif mupen64plus-core-src-2.5/src/si/rumblepak.c000066400000000000000000000044461251723631200206370ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rumblepak.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "rumblepak.h" #include void rumblepak_rumble(struct rumblepak* rpk, enum rumble_action action) { rpk->rumble(rpk->user_data, action); } void rumblepak_read_command(struct rumblepak* rpk, uint8_t* cmd) { uint8_t data; uint16_t address = (cmd[3] << 8) | (cmd[4] & 0xe0); if ((address >= 0x8000) && (address < 0x9000)) { data = 0x80; } else { data = 0x00; } memset(&cmd[5], data, 0x20); } void rumblepak_write_command(struct rumblepak* rpk, uint8_t* cmd) { enum rumble_action action; uint16_t address = (cmd[3] << 8) | (cmd[4] & 0xe0); if (address == 0xc000) { action = (cmd[5] == 0) ? RUMBLE_STOP : RUMBLE_START; rumblepak_rumble(rpk, action); } } mupen64plus-core-src-2.5/src/si/rumblepak.h000066400000000000000000000037371251723631200206460ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - rumblepak.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_SI_RUMBLEPAK_H #define M64P_SI_RUMBLEPAK_H #include enum rumble_action { RUMBLE_STOP, RUMBLE_START }; struct rumblepak { /* external rumble sink */ void* user_data; void (*rumble)(void*,enum rumble_action); }; void rumblepak_rumble(struct rumblepak* rpk, enum rumble_action action); void rumblepak_read_command(struct rumblepak* rpk, uint8_t* cmd); void rumblepak_write_command(struct rumblepak* rpk, uint8_t* cmd); #endif mupen64plus-core-src-2.5/src/si/si_controller.c000066400000000000000000000106301251723631200215230ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - si_controller.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "si_controller.h" #include #include "api/callbacks.h" #include "api/m64p_types.h" #include "main/main.h" #include "memory/memory.h" #include "r4300/r4300_core.h" #include "ri/ri_controller.h" static void dma_si_write(struct si_controller* si) { int i; if (si->regs[SI_PIF_ADDR_WR64B_REG] != 0x1FC007C0) { DebugMessage(M64MSG_ERROR, "dma_si_write(): unknown SI use"); return; } for (i = 0; i < PIF_RAM_SIZE; i += 4) { *((uint32_t*)(&si->pif.ram[i])) = sl(si->ri->rdram.dram[(si->regs[SI_DRAM_ADDR_REG]+i)/4]); } update_pif_write(si); update_count(); if (g_delay_si) { add_interupt_event(SI_INT, /*0x100*/0x900); } else { si->regs[SI_STATUS_REG] |= 0x1000; // INTERRUPT signal_rcp_interrupt(si->r4300, MI_INTR_SI); } } static void dma_si_read(struct si_controller* si) { int i; if (si->regs[SI_PIF_ADDR_RD64B_REG] != 0x1FC007C0) { DebugMessage(M64MSG_ERROR, "dma_si_read(): unknown SI use"); return; } update_pif_read(si); for (i = 0; i < PIF_RAM_SIZE; i += 4) { si->ri->rdram.dram[(si->regs[SI_DRAM_ADDR_REG]+i)/4] = sl(*(uint32_t*)(&si->pif.ram[i])); } update_count(); if (g_delay_si) { add_interupt_event(SI_INT, /*0x100*/0x900); } else { si->regs[SI_STATUS_REG] |= 0x1000; // INTERRUPT signal_rcp_interrupt(si->r4300, MI_INTR_SI); } } void connect_si(struct si_controller* si, struct r4300_core* r4300, struct ri_controller* ri) { si->r4300 = r4300; si->ri = ri; } void init_si(struct si_controller* si) { memset(si->regs, 0, SI_REGS_COUNT*sizeof(uint32_t)); init_pif(&si->pif); } int read_si_regs(void* opaque, uint32_t address, uint32_t* value) { struct si_controller* si = (struct si_controller*)opaque; uint32_t reg = si_reg(address); *value = si->regs[reg]; return 0; } int write_si_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct si_controller* si = (struct si_controller*)opaque; uint32_t reg = si_reg(address); switch (reg) { case SI_DRAM_ADDR_REG: masked_write(&si->regs[SI_DRAM_ADDR_REG], value, mask); break; case SI_PIF_ADDR_RD64B_REG: masked_write(&si->regs[SI_PIF_ADDR_RD64B_REG], value, mask); dma_si_read(si); break; case SI_PIF_ADDR_WR64B_REG: masked_write(&si->regs[SI_PIF_ADDR_WR64B_REG], value, mask); dma_si_write(si); break; case SI_STATUS_REG: si->regs[SI_STATUS_REG] &= ~0x1000; clear_rcp_interrupt(si->r4300, MI_INTR_SI); break; } return 0; } void si_end_of_dma_event(struct si_controller* si) { main_check_inputs(); si->pif.ram[0x3f] = 0x0; /* trigger SI interrupt */ si->regs[SI_STATUS_REG] |= 0x1000; raise_rcp_interrupt(si->r4300, MI_INTR_SI); } mupen64plus-core-src-2.5/src/si/si_controller.h000066400000000000000000000047161251723631200215400ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - si_controller.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef SI_SI_CONTROLLER_H #define SI_SI_CONTROLLER_H #include #include "pif.h" struct r4300_core; struct ri_controller; enum si_registers { SI_DRAM_ADDR_REG, SI_PIF_ADDR_RD64B_REG, SI_R2_REG, /* reserved */ SI_R3_REG, /* reserved */ SI_PIF_ADDR_WR64B_REG, SI_R5_REG, /* reserved */ SI_STATUS_REG, SI_REGS_COUNT }; struct si_controller { uint32_t regs[SI_REGS_COUNT]; struct pif pif; struct r4300_core* r4300; struct ri_controller* ri; }; static uint32_t si_reg(uint32_t address) { return (address & 0xffff) >> 2; } void connect_si(struct si_controller* si, struct r4300_core* r4300, struct ri_controller* ri); void init_si(struct si_controller* si); int read_si_regs(void* opaque, uint32_t address, uint32_t* value); int write_si_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask); void si_end_of_dma_event(struct si_controller* si); #endif mupen64plus-core-src-2.5/src/vi/000077500000000000000000000000001251723631200165045ustar00rootroot00000000000000mupen64plus-core-src-2.5/src/vi/vi_controller.c000066400000000000000000000074471251723631200215450ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - vi_controller.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "vi_controller.h" #include #include "main/main.h" #include "memory/memory.h" #include "plugin/plugin.h" #include "r4300/r4300_core.h" void connect_vi(struct vi_controller* vi, struct r4300_core* r4300) { vi->r4300 = r4300; } void init_vi(struct vi_controller* vi) { memset(vi->regs, 0, VI_REGS_COUNT*sizeof(uint32_t)); vi->field = 0; vi->delay = vi->next_vi = 5000; } int read_vi_regs(void* opaque, uint32_t address, uint32_t* value) { struct vi_controller* vi = (struct vi_controller*)opaque; uint32_t reg = vi_reg(address); const uint32_t* cp0_regs = r4300_cp0_regs(); if (reg == VI_CURRENT_REG) { update_count(); vi->regs[VI_CURRENT_REG] = (vi->delay - (vi->next_vi - cp0_regs[CP0_COUNT_REG]))/1500; vi->regs[VI_CURRENT_REG] = (vi->regs[VI_CURRENT_REG] & (~1)) | vi->field; } *value = vi->regs[reg]; return 0; } int write_vi_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask) { struct vi_controller* vi = (struct vi_controller*)opaque; uint32_t reg = vi_reg(address); switch(reg) { case VI_STATUS_REG: if ((vi->regs[VI_STATUS_REG] & mask) != (value & mask)) { masked_write(&vi->regs[VI_STATUS_REG], value, mask); gfx.viStatusChanged(); } return 0; case VI_WIDTH_REG: if ((vi->regs[VI_WIDTH_REG] & mask) != (value & mask)) { masked_write(&vi->regs[VI_WIDTH_REG], value, mask); gfx.viWidthChanged(); } return 0; case VI_CURRENT_REG: clear_rcp_interrupt(vi->r4300, MI_INTR_VI); return 0; } masked_write(&vi->regs[reg], value, mask); return 0; } void vi_vertical_interrupt_event(struct vi_controller* vi) { gfx.updateScreen(); /* allow main module to do things on VI event */ new_vi(); /* toggle vi field if in interlaced mode */ vi->field ^= (vi->regs[VI_STATUS_REG] >> 6) & 0x1; /* schedule next vertical interrupt */ vi->delay = (vi->regs[VI_V_SYNC_REG] == 0) ? 500000 : (vi->regs[VI_V_SYNC_REG] + 1)*1500; vi->next_vi += vi->delay; add_interupt_event_count(VI_INT, vi->next_vi); /* trigger interrupt */ raise_rcp_interrupt(vi->r4300, MI_INTR_VI); } mupen64plus-core-src-2.5/src/vi/vi_controller.h000066400000000000000000000047701251723631200215460ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - vi_controller.h * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2014 Bobby Smiles * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef M64P_VI_VI_CONTROLLER_H #define M64P_VI_VI_CONTROLLER_H #include struct r4300_core; enum vi_registers { VI_STATUS_REG, VI_ORIGIN_REG, VI_WIDTH_REG, VI_V_INTR_REG, VI_CURRENT_REG, VI_BURST_REG, VI_V_SYNC_REG, VI_H_SYNC_REG, VI_LEAP_REG, VI_H_START_REG, VI_V_START_REG, VI_V_BURST_REG, VI_X_SCALE_REG, VI_Y_SCALE_REG, VI_REGS_COUNT }; struct vi_controller { uint32_t regs[VI_REGS_COUNT]; unsigned int field; unsigned int delay; unsigned int next_vi; struct r4300_core* r4300; }; static uint32_t vi_reg(uint32_t address) { return (address & 0xffff) >> 2; } void connect_vi(struct vi_controller* vi, struct r4300_core* r4300); void init_vi(struct vi_controller* vi); int read_vi_regs(void* opaque, uint32_t address, uint32_t* value); int write_vi_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask); void vi_vertical_interrupt_event(struct vi_controller* vi); #endif mupen64plus-core-src-2.5/tools/000077500000000000000000000000001251723631200164375ustar00rootroot00000000000000mupen64plus-core-src-2.5/tools/build_bundle_bin.sh000077500000000000000000000063041251723631200222610ustar00rootroot00000000000000#!/bin/sh #/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * Mupen64plus - build_bundle_bin.sh * # * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * # * Copyright (C) 2009-2013 Richard Goedeken * # * * # * This program is free software; you can redistribute it and/or modify * # * it under the terms of the GNU General Public License as published by * # * the Free Software Foundation; either version 2 of the License, or * # * (at your option) any later version. * # * * # * This program is distributed in the hope that it will be useful, * # * but WITHOUT ANY WARRANTY; without even the implied warranty of * # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * # * GNU General Public License for more details. * # * * # * You should have received a copy of the GNU General Public License * # * along with this program; if not, write to the * # * Free Software Foundation, Inc., * # * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ # terminate the script if any commands return a non-zero error code set -e if [ $# -lt 2 ]; then echo "Usage: build_bundle_bin.sh [ ...]" exit 1 fi TEMPDIR="mupen64plus-temp-build" rm -rf ${TEMPDIR} mkdir -p ${TEMPDIR}/source cd ${TEMPDIR}/source echo "************************************ Downloading Mupen64Plus module source code" git clone --branch $1 https://github.com/mupen64plus/mupen64plus-core.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-rom.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-ui-console.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-audio-sdl.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-input-sdl.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-rsp-hle.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-video-rice.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-video-glide64mk2.git shift for dirname in ./mupen64plus-*; do rm -rf ${dirname}/.git*; done OUTPUTDIR="mupen64plus-bundle-$1" shift echo "************************************ Building Mupen64Plus modules" cd .. tar xzvf source/mupen64plus-core/tools/m64p_helper_scripts.tar.gz ./m64p_build.sh COREDIR=/usr/local/lib/ $@ mv "test" "${OUTPUTDIR}" echo "************************************ Creating archive" cp source/mupen64plus-core/tools/install_binary_bundle.sh "${OUTPUTDIR}/install.sh" cp source/mupen64plus-core/tools/uninstall_binary_bundle.sh "${OUTPUTDIR}/uninstall.sh" tar c "${OUTPUTDIR}" --owner 0 --group 0 --numeric-owner | gzip -n > "../${OUTPUTDIR}.tar.gz" cd .. rm -rf "${TEMPDIR}" mupen64plus-core-src-2.5/tools/build_bundle_src.sh000077500000000000000000000057661251723631200223130ustar00rootroot00000000000000#!/bin/sh #/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * Mupen64plus - build_bundle_src.sh * # * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * # * Copyright (C) 2009-2013 Richard Goedeken * # * * # * This program is free software; you can redistribute it and/or modify * # * it under the terms of the GNU General Public License as published by * # * the Free Software Foundation; either version 2 of the License, or * # * (at your option) any later version. * # * * # * This program is distributed in the hope that it will be useful, * # * but WITHOUT ANY WARRANTY; without even the implied warranty of * # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * # * GNU General Public License for more details. * # * * # * You should have received a copy of the GNU General Public License * # * along with this program; if not, write to the * # * Free Software Foundation, Inc., * # * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ # terminate the script if any commands return a non-zero error code set -e if [ $# -lt 2 ]; then echo "Usage: build_bundle_src.sh " exit 1 fi OUTPUTDIR="mupen64plus-bundle-$2" echo "************************************ Creating directory: " ${OUTPUTDIR} rm -rf ${OUTPUTDIR} mkdir -p ${OUTPUTDIR}/source cd ${OUTPUTDIR}/source echo "************************************ Downloading Mupen64Plus module source code" git clone --branch $1 https://github.com/mupen64plus/mupen64plus-core.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-rom.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-ui-console.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-audio-sdl.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-input-sdl.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-rsp-hle.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-video-rice.git git clone --branch $1 https://github.com/mupen64plus/mupen64plus-video-glide64mk2.git for dirname in ./mupen64plus-*; do rm -rf ${dirname}/.git*; done # unzip the helper scripts and remove the Mercurial scripts cd .. tar xzvf source/mupen64plus-core/tools/m64p_helper_scripts.tar.gz rm -f m64p_get.sh m64p_update.sh echo "************************************ Creating archive" cd .. tar c "${OUTPUTDIR}" --owner 0 --group 0 --numeric-owner | gzip -n > "${OUTPUTDIR}.tar.gz" rm -rf "${OUTPUTDIR}" mupen64plus-core-src-2.5/tools/build_modules_src.sh000077500000000000000000000044171251723631200225020ustar00rootroot00000000000000#!/bin/sh #/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * Mupen64plus - build_modules_src.sh * # * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * # * Copyright (C) 2009-2013 Richard Goedeken * # * * # * This program is free software; you can redistribute it and/or modify * # * it under the terms of the GNU General Public License as published by * # * the Free Software Foundation; either version 2 of the License, or * # * (at your option) any later version. * # * * # * This program is distributed in the hope that it will be useful, * # * but WITHOUT ANY WARRANTY; without even the implied warranty of * # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * # * GNU General Public License for more details. * # * * # * You should have received a copy of the GNU General Public License * # * along with this program; if not, write to the * # * Free Software Foundation, Inc., * # * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ # terminate the script if any commands return a non-zero error code set -e if [ $# -lt 2 ]; then echo "Usage: build_modules_src.sh " exit 1 fi modules='mupen64plus-core mupen64plus-rom mupen64plus-ui-console mupen64plus-audio-sdl mupen64plus-input-sdl mupen64plus-rsp-hle mupen64plus-video-rice mupen64plus-video-glide64mk2' for modname in ${modules}; do echo "************************************ Downloading and packaging module source code: ${modname}" rm -rf "tmp" OUTPUTDIR="${modname}-$2" git clone --bare "https://github.com/mupen64plus/${modname}.git" "tmp" git --git-dir="$(pwd)/tmp/" archive --format=tar --prefix="${OUTPUTDIR}/" $1 | gzip -n --best > "${OUTPUTDIR}.tar.gz" rm -rf "tmp" done mupen64plus-core-src-2.5/tools/cheat_code_convert.py000077500000000000000000000102771251723631200226410ustar00rootroot00000000000000#!/usr/bin/python '''* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - code_convert.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2010 Rhett Osborne * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Usage: python code_convert.py > ../data/mupencheat.txt < ../data/mupen64plus.cht ''' from sys import stdin class cheat: def __init__(self): self.n="" self.d="" self.c=[] self.v=0 self.hb='00' def add(self, l): if(self.n == ""): return l.append(" cn %s"%(self.n)) if(self.d != ""): l.append(" cd %s"%(self.d)) for code in self.c: l.append(" "+code) def clear(self): self.n="" self.d="" self.c=[] self.v=0 l=[] cCount=0 _cs = [] for i in range(225): _cs.append(cheat()) cs = _cs[:] def print_l(): global l, cs for cheat in cs: cheat.add(l) for line in l: print line.replace("\x00", "") l=[] cCount=0 for i in range(225): cs[i].clear() lines = stdin.read().split("\n") for line in lines: if len(line) < 2: continue elif(line[:2] == "//" and line != "//----" and line != "//---" ): l.append(line) elif len(line) < 4: continue elif(line[0] == '[' and line[-1] == ']' and len(line) > 23): print_l() l.append("\ncrc %s" % line[1:-1]) elif(line[:5] == "Name="): l.append("gn %s" % (line[5:])) elif(line[:5] == "Cheat"): t = line[5:].split('=')[0] if (len(t)>1 and t[-2] == '_'): n = int(t[:-2]) if(t[-1] == 'N'): cs[n].d = line.split("=")[1] else: for option in line.split("=")[1].split("$")[1:]: if(len(option) < 4): break; if(option[-1]==','): end =-1 else: end = None if(option[2] == " "): cs[n].c[cs[n].v] += "%s%s:\"%s\""%(cs[n].hb,option[:2],option[3:end].replace("\"", "\\\"")) else: cs[n].c[cs[n].v] += "%s:\"%s\""%(option[:4],option[5:end].replace("\"", "\\\"")) cs[n].c[cs[n].v]+=',' cs[n].c[cs[n].v] = cs[n].c[cs[n].v][:-1] else: n = int(t) cn = line.split('"') cs[n].c = cn[2][1:].split(',') cs[n].n = cn[1]; i=0 for cheat in cs[n].c: if(cheat[-1] == '?'): if(cheat[-2:] == '??' and cheat[-4:-2] != '??'): cs[n].hb = cheat[-4:-2] else: cs[n].hb = '00' cs[n].c[i] = cheat[:9] + "???? "; cs[n].v=i i+=1 if(n > cCount): cCount = n elif(line != "//----" and line != "//---" ): l.append("//%s" %line) mupen64plus-core-src-2.5/tools/gen_sdl_key_converter.c000066400000000000000000000447021251723631200231640ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gen_sdl_key_converter.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2013 Mupen64plus development team * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* gcc -E `sdl2-config --cflags --libs` `sdl-config --cflags --libs` gen_sdl_key_converter.c -o gen_sdl_key_converter */ #include #include #include #include struct keycode2scancode { const char *keysym_name; uint32_t keysym; const char *scancode_name; uint32_t scancode; }; #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) #define _XSTR(x) #x #define KEYSYM2SCANCODE(k, s) { \ .keysym_name = _XSTR(SDLK_##k), \ .keysym = SDLK_##k, \ .scancode_name = _XSTR(SDL_SCANCODE_##s), \ .scancode = SDL_SCANCODE_##s, \ } /* Table from SDL 1.2.5 to SDL2 2.0-rc1 */ static const struct keycode2scancode keycode2scancode[] = { KEYSYM2SCANCODE(BACKSPACE, BACKSPACE), KEYSYM2SCANCODE(TAB, TAB), KEYSYM2SCANCODE(CLEAR, CLEAR), KEYSYM2SCANCODE(RETURN, RETURN), KEYSYM2SCANCODE(PAUSE, PAUSE), KEYSYM2SCANCODE(ESCAPE, ESCAPE), KEYSYM2SCANCODE(SPACE, SPACE), KEYSYM2SCANCODE(EXCLAIM, UNKNOWN), KEYSYM2SCANCODE(QUOTEDBL, UNKNOWN), KEYSYM2SCANCODE(HASH, UNKNOWN), KEYSYM2SCANCODE(DOLLAR, UNKNOWN), KEYSYM2SCANCODE(AMPERSAND, UNKNOWN), KEYSYM2SCANCODE(QUOTE, UNKNOWN), KEYSYM2SCANCODE(LEFTPAREN, UNKNOWN), KEYSYM2SCANCODE(RIGHTPAREN, UNKNOWN), KEYSYM2SCANCODE(ASTERISK, UNKNOWN), KEYSYM2SCANCODE(PLUS, UNKNOWN), KEYSYM2SCANCODE(COMMA, COMMA), KEYSYM2SCANCODE(MINUS, MINUS), KEYSYM2SCANCODE(PERIOD, PERIOD), KEYSYM2SCANCODE(SLASH, SLASH), KEYSYM2SCANCODE(0, 0), KEYSYM2SCANCODE(1, 1), KEYSYM2SCANCODE(2, 2), KEYSYM2SCANCODE(3, 3), KEYSYM2SCANCODE(4, 4), KEYSYM2SCANCODE(5, 5), KEYSYM2SCANCODE(6, 6), KEYSYM2SCANCODE(7, 7), KEYSYM2SCANCODE(8, 8), KEYSYM2SCANCODE(9, 9), KEYSYM2SCANCODE(COLON, UNKNOWN), KEYSYM2SCANCODE(SEMICOLON, SEMICOLON), KEYSYM2SCANCODE(LESS, UNKNOWN), KEYSYM2SCANCODE(EQUALS, EQUALS), KEYSYM2SCANCODE(GREATER, UNKNOWN), KEYSYM2SCANCODE(QUESTION, UNKNOWN), KEYSYM2SCANCODE(AT, UNKNOWN), KEYSYM2SCANCODE(LEFTBRACKET, LEFTBRACKET), KEYSYM2SCANCODE(BACKSLASH, BACKSLASH), KEYSYM2SCANCODE(RIGHTBRACKET, RIGHTBRACKET), KEYSYM2SCANCODE(CARET, UNKNOWN), KEYSYM2SCANCODE(UNDERSCORE, UNKNOWN), KEYSYM2SCANCODE(BACKQUOTE, UNKNOWN), KEYSYM2SCANCODE(a, A), KEYSYM2SCANCODE(b, B), KEYSYM2SCANCODE(c, C), KEYSYM2SCANCODE(d, D), KEYSYM2SCANCODE(e, E), KEYSYM2SCANCODE(f, F), KEYSYM2SCANCODE(g, G), KEYSYM2SCANCODE(h, H), KEYSYM2SCANCODE(i, I), KEYSYM2SCANCODE(j, J), KEYSYM2SCANCODE(k, K), KEYSYM2SCANCODE(l, L), KEYSYM2SCANCODE(m, M), KEYSYM2SCANCODE(n, N), KEYSYM2SCANCODE(o, O), KEYSYM2SCANCODE(p, P), KEYSYM2SCANCODE(q, Q), KEYSYM2SCANCODE(r, R), KEYSYM2SCANCODE(s, S), KEYSYM2SCANCODE(t, T), KEYSYM2SCANCODE(u, U), KEYSYM2SCANCODE(v, V), KEYSYM2SCANCODE(w, W), KEYSYM2SCANCODE(x, X), KEYSYM2SCANCODE(y, Y), KEYSYM2SCANCODE(z, Z), KEYSYM2SCANCODE(DELETE, DELETE), KEYSYM2SCANCODE(WORLD_0, UNKNOWN), KEYSYM2SCANCODE(WORLD_1, UNKNOWN), KEYSYM2SCANCODE(WORLD_2, UNKNOWN), KEYSYM2SCANCODE(WORLD_3, UNKNOWN), KEYSYM2SCANCODE(WORLD_4, UNKNOWN), KEYSYM2SCANCODE(WORLD_5, UNKNOWN), KEYSYM2SCANCODE(WORLD_6, UNKNOWN), KEYSYM2SCANCODE(WORLD_7, UNKNOWN), KEYSYM2SCANCODE(WORLD_8, UNKNOWN), KEYSYM2SCANCODE(WORLD_9, UNKNOWN), KEYSYM2SCANCODE(WORLD_10, UNKNOWN), KEYSYM2SCANCODE(WORLD_11, UNKNOWN), KEYSYM2SCANCODE(WORLD_12, UNKNOWN), KEYSYM2SCANCODE(WORLD_13, UNKNOWN), KEYSYM2SCANCODE(WORLD_14, UNKNOWN), KEYSYM2SCANCODE(WORLD_15, UNKNOWN), KEYSYM2SCANCODE(WORLD_16, UNKNOWN), KEYSYM2SCANCODE(WORLD_17, UNKNOWN), KEYSYM2SCANCODE(WORLD_18, UNKNOWN), KEYSYM2SCANCODE(WORLD_19, UNKNOWN), KEYSYM2SCANCODE(WORLD_20, UNKNOWN), KEYSYM2SCANCODE(WORLD_21, UNKNOWN), KEYSYM2SCANCODE(WORLD_22, UNKNOWN), KEYSYM2SCANCODE(WORLD_23, UNKNOWN), KEYSYM2SCANCODE(WORLD_24, UNKNOWN), KEYSYM2SCANCODE(WORLD_25, UNKNOWN), KEYSYM2SCANCODE(WORLD_26, UNKNOWN), KEYSYM2SCANCODE(WORLD_27, UNKNOWN), KEYSYM2SCANCODE(WORLD_28, UNKNOWN), KEYSYM2SCANCODE(WORLD_29, UNKNOWN), KEYSYM2SCANCODE(WORLD_30, UNKNOWN), KEYSYM2SCANCODE(WORLD_31, UNKNOWN), KEYSYM2SCANCODE(WORLD_32, UNKNOWN), KEYSYM2SCANCODE(WORLD_33, UNKNOWN), KEYSYM2SCANCODE(WORLD_34, UNKNOWN), KEYSYM2SCANCODE(WORLD_35, UNKNOWN), KEYSYM2SCANCODE(WORLD_36, UNKNOWN), KEYSYM2SCANCODE(WORLD_37, UNKNOWN), KEYSYM2SCANCODE(WORLD_38, UNKNOWN), KEYSYM2SCANCODE(WORLD_39, UNKNOWN), KEYSYM2SCANCODE(WORLD_40, UNKNOWN), KEYSYM2SCANCODE(WORLD_41, UNKNOWN), KEYSYM2SCANCODE(WORLD_42, UNKNOWN), KEYSYM2SCANCODE(WORLD_43, UNKNOWN), KEYSYM2SCANCODE(WORLD_44, UNKNOWN), KEYSYM2SCANCODE(WORLD_45, UNKNOWN), KEYSYM2SCANCODE(WORLD_46, UNKNOWN), KEYSYM2SCANCODE(WORLD_47, UNKNOWN), KEYSYM2SCANCODE(WORLD_48, UNKNOWN), KEYSYM2SCANCODE(WORLD_49, UNKNOWN), KEYSYM2SCANCODE(WORLD_50, UNKNOWN), KEYSYM2SCANCODE(WORLD_51, UNKNOWN), KEYSYM2SCANCODE(WORLD_52, UNKNOWN), KEYSYM2SCANCODE(WORLD_53, UNKNOWN), KEYSYM2SCANCODE(WORLD_54, UNKNOWN), KEYSYM2SCANCODE(WORLD_55, UNKNOWN), KEYSYM2SCANCODE(WORLD_56, UNKNOWN), KEYSYM2SCANCODE(WORLD_57, UNKNOWN), KEYSYM2SCANCODE(WORLD_58, UNKNOWN), KEYSYM2SCANCODE(WORLD_59, UNKNOWN), KEYSYM2SCANCODE(WORLD_60, UNKNOWN), KEYSYM2SCANCODE(WORLD_61, UNKNOWN), KEYSYM2SCANCODE(WORLD_62, UNKNOWN), KEYSYM2SCANCODE(WORLD_63, UNKNOWN), KEYSYM2SCANCODE(WORLD_64, UNKNOWN), KEYSYM2SCANCODE(WORLD_65, UNKNOWN), KEYSYM2SCANCODE(WORLD_66, UNKNOWN), KEYSYM2SCANCODE(WORLD_67, UNKNOWN), KEYSYM2SCANCODE(WORLD_68, UNKNOWN), KEYSYM2SCANCODE(WORLD_69, UNKNOWN), KEYSYM2SCANCODE(WORLD_70, UNKNOWN), KEYSYM2SCANCODE(WORLD_71, UNKNOWN), KEYSYM2SCANCODE(WORLD_72, UNKNOWN), KEYSYM2SCANCODE(WORLD_73, UNKNOWN), KEYSYM2SCANCODE(WORLD_74, UNKNOWN), KEYSYM2SCANCODE(WORLD_75, UNKNOWN), KEYSYM2SCANCODE(WORLD_76, UNKNOWN), KEYSYM2SCANCODE(WORLD_77, UNKNOWN), KEYSYM2SCANCODE(WORLD_78, UNKNOWN), KEYSYM2SCANCODE(WORLD_79, UNKNOWN), KEYSYM2SCANCODE(WORLD_80, UNKNOWN), KEYSYM2SCANCODE(WORLD_81, UNKNOWN), KEYSYM2SCANCODE(WORLD_82, UNKNOWN), KEYSYM2SCANCODE(WORLD_83, UNKNOWN), KEYSYM2SCANCODE(WORLD_84, UNKNOWN), KEYSYM2SCANCODE(WORLD_85, UNKNOWN), KEYSYM2SCANCODE(WORLD_86, UNKNOWN), KEYSYM2SCANCODE(WORLD_87, UNKNOWN), KEYSYM2SCANCODE(WORLD_88, UNKNOWN), KEYSYM2SCANCODE(WORLD_89, UNKNOWN), KEYSYM2SCANCODE(WORLD_90, UNKNOWN), KEYSYM2SCANCODE(WORLD_91, UNKNOWN), KEYSYM2SCANCODE(WORLD_92, UNKNOWN), KEYSYM2SCANCODE(WORLD_93, UNKNOWN), KEYSYM2SCANCODE(WORLD_94, UNKNOWN), KEYSYM2SCANCODE(WORLD_95, UNKNOWN), KEYSYM2SCANCODE(KP0, KP_0), KEYSYM2SCANCODE(KP1, KP_1), KEYSYM2SCANCODE(KP2, KP_2), KEYSYM2SCANCODE(KP3, KP_3), KEYSYM2SCANCODE(KP4, KP_4), KEYSYM2SCANCODE(KP5, KP_5), KEYSYM2SCANCODE(KP6, KP_6), KEYSYM2SCANCODE(KP7, KP_7), KEYSYM2SCANCODE(KP8, KP_8), KEYSYM2SCANCODE(KP9, KP_9), KEYSYM2SCANCODE(KP_PERIOD, KP_PERIOD), KEYSYM2SCANCODE(KP_DIVIDE, KP_DIVIDE), KEYSYM2SCANCODE(KP_MULTIPLY, KP_MULTIPLY), KEYSYM2SCANCODE(KP_MINUS, KP_MINUS), KEYSYM2SCANCODE(KP_PLUS, KP_PLUS), KEYSYM2SCANCODE(KP_ENTER, KP_ENTER), KEYSYM2SCANCODE(KP_EQUALS, KP_EQUALS), KEYSYM2SCANCODE(UP, UP), KEYSYM2SCANCODE(DOWN, DOWN), KEYSYM2SCANCODE(RIGHT, RIGHT), KEYSYM2SCANCODE(LEFT, LEFT), KEYSYM2SCANCODE(INSERT, INSERT), KEYSYM2SCANCODE(HOME, HOME), KEYSYM2SCANCODE(END, END), KEYSYM2SCANCODE(PAGEUP, PAGEUP), KEYSYM2SCANCODE(PAGEDOWN, PAGEDOWN), KEYSYM2SCANCODE(F1, F1), KEYSYM2SCANCODE(F2, F2), KEYSYM2SCANCODE(F3, F3), KEYSYM2SCANCODE(F4, F4), KEYSYM2SCANCODE(F5, F5), KEYSYM2SCANCODE(F6, F6), KEYSYM2SCANCODE(F7, F7), KEYSYM2SCANCODE(F8, F8), KEYSYM2SCANCODE(F9, F9), KEYSYM2SCANCODE(F10, F10), KEYSYM2SCANCODE(F11, F11), KEYSYM2SCANCODE(F12, F12), KEYSYM2SCANCODE(F13, F13), KEYSYM2SCANCODE(F14, F14), KEYSYM2SCANCODE(F15, F15), KEYSYM2SCANCODE(NUMLOCK, NUMLOCKCLEAR), KEYSYM2SCANCODE(CAPSLOCK, CAPSLOCK), KEYSYM2SCANCODE(SCROLLOCK, UNKNOWN), KEYSYM2SCANCODE(RSHIFT, RSHIFT), KEYSYM2SCANCODE(LSHIFT, LSHIFT), KEYSYM2SCANCODE(RCTRL, RCTRL), KEYSYM2SCANCODE(LCTRL, LCTRL), KEYSYM2SCANCODE(RALT, RALT), KEYSYM2SCANCODE(LALT, LALT), KEYSYM2SCANCODE(RMETA, UNKNOWN), KEYSYM2SCANCODE(LMETA, UNKNOWN), KEYSYM2SCANCODE(LSUPER, LGUI), KEYSYM2SCANCODE(RSUPER, RGUI), KEYSYM2SCANCODE(MODE, MODE), KEYSYM2SCANCODE(COMPOSE, UNKNOWN), KEYSYM2SCANCODE(HELP, HELP), KEYSYM2SCANCODE(PRINT, UNKNOWN), KEYSYM2SCANCODE(SYSREQ, SYSREQ), KEYSYM2SCANCODE(BREAK, UNKNOWN), KEYSYM2SCANCODE(MENU, MENU), KEYSYM2SCANCODE(POWER, POWER), KEYSYM2SCANCODE(EURO, UNKNOWN), KEYSYM2SCANCODE(UNDO, UNDO), KEYSYM2SCANCODE(UNKNOWN, NONUSHASH), KEYSYM2SCANCODE(UNKNOWN, APOSTROPHE), KEYSYM2SCANCODE(UNKNOWN, GRAVE), KEYSYM2SCANCODE(UNKNOWN, PRINTSCREEN), KEYSYM2SCANCODE(UNKNOWN, SCROLLLOCK), KEYSYM2SCANCODE(UNKNOWN, NONUSBACKSLASH), KEYSYM2SCANCODE(UNKNOWN, APPLICATION), KEYSYM2SCANCODE(UNKNOWN, F16), KEYSYM2SCANCODE(UNKNOWN, F17), KEYSYM2SCANCODE(UNKNOWN, F18), KEYSYM2SCANCODE(UNKNOWN, F19), KEYSYM2SCANCODE(UNKNOWN, F20), KEYSYM2SCANCODE(UNKNOWN, F21), KEYSYM2SCANCODE(UNKNOWN, F22), KEYSYM2SCANCODE(UNKNOWN, F23), KEYSYM2SCANCODE(UNKNOWN, F24), KEYSYM2SCANCODE(UNKNOWN, EXECUTE), KEYSYM2SCANCODE(UNKNOWN, SELECT), KEYSYM2SCANCODE(UNKNOWN, STOP), KEYSYM2SCANCODE(UNKNOWN, AGAIN), KEYSYM2SCANCODE(UNKNOWN, CUT), KEYSYM2SCANCODE(UNKNOWN, COPY), KEYSYM2SCANCODE(UNKNOWN, PASTE), KEYSYM2SCANCODE(UNKNOWN, FIND), KEYSYM2SCANCODE(UNKNOWN, MUTE), KEYSYM2SCANCODE(UNKNOWN, VOLUMEUP), KEYSYM2SCANCODE(UNKNOWN, VOLUMEDOWN), KEYSYM2SCANCODE(UNKNOWN, KP_COMMA), KEYSYM2SCANCODE(UNKNOWN, KP_EQUALSAS400), KEYSYM2SCANCODE(UNKNOWN, INTERNATIONAL1), KEYSYM2SCANCODE(UNKNOWN, INTERNATIONAL2), KEYSYM2SCANCODE(UNKNOWN, INTERNATIONAL3), KEYSYM2SCANCODE(UNKNOWN, INTERNATIONAL4), KEYSYM2SCANCODE(UNKNOWN, INTERNATIONAL5), KEYSYM2SCANCODE(UNKNOWN, INTERNATIONAL6), KEYSYM2SCANCODE(UNKNOWN, INTERNATIONAL7), KEYSYM2SCANCODE(UNKNOWN, INTERNATIONAL8), KEYSYM2SCANCODE(UNKNOWN, INTERNATIONAL9), KEYSYM2SCANCODE(UNKNOWN, LANG1), KEYSYM2SCANCODE(UNKNOWN, LANG2), KEYSYM2SCANCODE(UNKNOWN, LANG3), KEYSYM2SCANCODE(UNKNOWN, LANG4), KEYSYM2SCANCODE(UNKNOWN, LANG5), KEYSYM2SCANCODE(UNKNOWN, LANG6), KEYSYM2SCANCODE(UNKNOWN, LANG7), KEYSYM2SCANCODE(UNKNOWN, LANG8), KEYSYM2SCANCODE(UNKNOWN, LANG9), KEYSYM2SCANCODE(UNKNOWN, ALTERASE), KEYSYM2SCANCODE(UNKNOWN, CANCEL), KEYSYM2SCANCODE(UNKNOWN, PRIOR), KEYSYM2SCANCODE(UNKNOWN, RETURN2), KEYSYM2SCANCODE(UNKNOWN, SEPARATOR), KEYSYM2SCANCODE(UNKNOWN, OUT), KEYSYM2SCANCODE(UNKNOWN, OPER), KEYSYM2SCANCODE(UNKNOWN, CLEARAGAIN), KEYSYM2SCANCODE(UNKNOWN, CRSEL), KEYSYM2SCANCODE(UNKNOWN, EXSEL), KEYSYM2SCANCODE(UNKNOWN, KP_00), KEYSYM2SCANCODE(UNKNOWN, KP_000), KEYSYM2SCANCODE(UNKNOWN, THOUSANDSSEPARATOR), KEYSYM2SCANCODE(UNKNOWN, DECIMALSEPARATOR), KEYSYM2SCANCODE(UNKNOWN, CURRENCYUNIT), KEYSYM2SCANCODE(UNKNOWN, CURRENCYSUBUNIT), KEYSYM2SCANCODE(UNKNOWN, KP_LEFTPAREN), KEYSYM2SCANCODE(UNKNOWN, KP_RIGHTPAREN), KEYSYM2SCANCODE(UNKNOWN, KP_LEFTBRACE), KEYSYM2SCANCODE(UNKNOWN, KP_RIGHTBRACE), KEYSYM2SCANCODE(UNKNOWN, KP_TAB), KEYSYM2SCANCODE(UNKNOWN, KP_BACKSPACE), KEYSYM2SCANCODE(UNKNOWN, KP_A), KEYSYM2SCANCODE(UNKNOWN, KP_B), KEYSYM2SCANCODE(UNKNOWN, KP_C), KEYSYM2SCANCODE(UNKNOWN, KP_D), KEYSYM2SCANCODE(UNKNOWN, KP_E), KEYSYM2SCANCODE(UNKNOWN, KP_F), KEYSYM2SCANCODE(UNKNOWN, KP_XOR), KEYSYM2SCANCODE(UNKNOWN, KP_POWER), KEYSYM2SCANCODE(UNKNOWN, KP_PERCENT), KEYSYM2SCANCODE(UNKNOWN, KP_LESS), KEYSYM2SCANCODE(UNKNOWN, KP_GREATER), KEYSYM2SCANCODE(UNKNOWN, KP_AMPERSAND), KEYSYM2SCANCODE(UNKNOWN, KP_DBLAMPERSAND), KEYSYM2SCANCODE(UNKNOWN, KP_VERTICALBAR), KEYSYM2SCANCODE(UNKNOWN, KP_DBLVERTICALBAR), KEYSYM2SCANCODE(UNKNOWN, KP_COLON), KEYSYM2SCANCODE(UNKNOWN, KP_HASH), KEYSYM2SCANCODE(UNKNOWN, KP_SPACE), KEYSYM2SCANCODE(UNKNOWN, KP_AT), KEYSYM2SCANCODE(UNKNOWN, KP_EXCLAM), KEYSYM2SCANCODE(UNKNOWN, KP_MEMSTORE), KEYSYM2SCANCODE(UNKNOWN, KP_MEMRECALL), KEYSYM2SCANCODE(UNKNOWN, KP_MEMCLEAR), KEYSYM2SCANCODE(UNKNOWN, KP_MEMADD), KEYSYM2SCANCODE(UNKNOWN, KP_MEMSUBTRACT), KEYSYM2SCANCODE(UNKNOWN, KP_MEMMULTIPLY), KEYSYM2SCANCODE(UNKNOWN, KP_MEMDIVIDE), KEYSYM2SCANCODE(UNKNOWN, KP_PLUSMINUS), KEYSYM2SCANCODE(UNKNOWN, KP_CLEAR), KEYSYM2SCANCODE(UNKNOWN, KP_CLEARENTRY), KEYSYM2SCANCODE(UNKNOWN, KP_BINARY), KEYSYM2SCANCODE(UNKNOWN, KP_OCTAL), KEYSYM2SCANCODE(UNKNOWN, KP_DECIMAL), KEYSYM2SCANCODE(UNKNOWN, KP_HEXADECIMAL), KEYSYM2SCANCODE(UNKNOWN, AUDIONEXT), KEYSYM2SCANCODE(UNKNOWN, AUDIOPREV), KEYSYM2SCANCODE(UNKNOWN, AUDIOSTOP), KEYSYM2SCANCODE(UNKNOWN, AUDIOPLAY), KEYSYM2SCANCODE(UNKNOWN, AUDIOMUTE), KEYSYM2SCANCODE(UNKNOWN, MEDIASELECT), KEYSYM2SCANCODE(UNKNOWN, WWW), KEYSYM2SCANCODE(UNKNOWN, MAIL), KEYSYM2SCANCODE(UNKNOWN, CALCULATOR), KEYSYM2SCANCODE(UNKNOWN, COMPUTER), KEYSYM2SCANCODE(UNKNOWN, AC_SEARCH), KEYSYM2SCANCODE(UNKNOWN, AC_HOME), KEYSYM2SCANCODE(UNKNOWN, AC_BACK), KEYSYM2SCANCODE(UNKNOWN, AC_FORWARD), KEYSYM2SCANCODE(UNKNOWN, AC_STOP), KEYSYM2SCANCODE(UNKNOWN, AC_REFRESH), KEYSYM2SCANCODE(UNKNOWN, AC_BOOKMARKS), KEYSYM2SCANCODE(UNKNOWN, BRIGHTNESSDOWN), KEYSYM2SCANCODE(UNKNOWN, BRIGHTNESSUP), KEYSYM2SCANCODE(UNKNOWN, DISPLAYSWITCH), KEYSYM2SCANCODE(UNKNOWN, KBDILLUMTOGGLE), KEYSYM2SCANCODE(UNKNOWN, KBDILLUMDOWN), KEYSYM2SCANCODE(UNKNOWN, KBDILLUMUP), KEYSYM2SCANCODE(UNKNOWN, EJECT), KEYSYM2SCANCODE(UNKNOWN, SLEEP), KEYSYM2SCANCODE(UNKNOWN, APP1), KEYSYM2SCANCODE(UNKNOWN, APP2), }; int main(void) { size_t i, j; int found; uint16_t max_keysym = 0, max_scancode = 0; for (i = 0; i < ARRAY_SIZE(keycode2scancode); i++) { if (max_keysym < keycode2scancode[i].keysym) max_keysym = keycode2scancode[i].keysym; if (max_scancode < keycode2scancode[i].scancode) max_scancode = keycode2scancode[i].scancode; } puts("#include "); puts("#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))\n"); puts("uint16_t sdl_keysym2scancode(uint16_t keysym)\n{"); printf(" static const uint16_t keysym2scancode[%"PRIu16"] = {\n", max_keysym + 1); for (i = 0; i < (max_keysym + 1); i++) { found = 0; for (j = 0; j < ARRAY_SIZE(keycode2scancode); j++) { if (i != 0 && keycode2scancode[j].keysym == i) { printf(" 0x%04xu, /* %s -> %s */\n", keycode2scancode[j].scancode, keycode2scancode[j].keysym_name, keycode2scancode[j].scancode_name); if (found) fprintf(stderr, "Multiple entry with keysym %zu, %s -> %s\n", i, keycode2scancode[j].keysym_name, keycode2scancode[j].scancode_name); found = 1; } } if (!found) printf(" 0x%04xu, /* %s -> %s */\n", 0, "unassigned", "SDL_SCANCODE_UNKNOWN"); } puts(" };\n"); puts(" if (keysym >= ARRAY_SIZE(keysym2scancode))"); puts(" return 0;"); puts(" return keysym2scancode[keysym];\n}\n"); puts("uint16_t sdl_scancode2keysym(uint16_t scancode)\n{"); printf(" static const uint16_t scancode2keysym[%"PRIu16"] = {\n", max_scancode + 1); for (i = 0; i < (max_scancode + 1); i++) { found = 0; for (j = 0; j < ARRAY_SIZE(keycode2scancode); j++) { if (i != 0 && keycode2scancode[j].scancode == i) { printf(" 0x%04xu, /* %s -> %s */\n", keycode2scancode[j].keysym, keycode2scancode[j].scancode_name, keycode2scancode[j].keysym_name); if (found) fprintf(stderr, "Multiple entry with scancode %zu, %s -> %s\n", i, keycode2scancode[j].scancode_name, keycode2scancode[j].keysym_name); found = 1; } } if (!found) printf(" 0x%04xu, /* %s -> %s */\n", 0, "unassigned", "SDLK_UNKNOWN"); } puts(" };\n"); puts(" if (scancode >= ARRAY_SIZE(scancode2keysym))"); puts(" return 0;"); puts(" return scancode2keysym[scancode];\n}"); return 0; } mupen64plus-core-src-2.5/tools/install_binary_bundle.sh000077500000000000000000000120631251723631200233430ustar00rootroot00000000000000#!/bin/sh # # mupen64plus binary bundle install script # # Copyright 2007-2014 The Mupen64Plus Development Team # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # set -e export PATH=/bin:/usr/bin GINSTALLFLAG=-D if `which ginstall >/dev/null 2>&1`; then INSTALL=ginstall elif install --help >/dev/null 2>&1; then INSTALL=install elif [ -e "`which install 2>/dev/null`" ]; then printf "warning: GNU install not found, assuming BSD install\n" >&2 INSTALL=install GINSTALLFLAG= else printf "error: install tool not found\n" >&2 exit 1 fi INSTALL_STRIP_FLAG="${INSTALL_STRIP_FLAG:=-s}" usage() { printf "usage: $(basename $0) [PREFIX] [SHAREDIR] [BINDIR] [LIBDIR] [PLUGINDIR] [MANDIR] [APPSDIR] [ICONSDIR] \tPREFIX - installation directories prefix (default: /usr/local) \tSHAREDIR - path to Mupen64Plus shared data files (default: \$PREFIX/share/mupen64plus) \tBINDIR - path to Mupen64Plus binary program files (default: \$PREFIX/bin) \tLIBDIR - path to Mupen64Plus core library (default: \$PREFIX/lib) \tPLUGINDIR - path to Mupen64Plus plugin libraries (default: \$PREFIX/lib/mupen64plus) \tMANDIR - path to manual files (default: \$PREFIX/share/man) \tAPPSDIR - path to install desktop file (default: \$PREFIX/share/applications) \tICONSDIR - path to install icon files (default: \$PREFIX/share/icons/hicolor) " } if [ $# -gt 8 ]; then usage exit 1 fi PREFIX="${1:-/usr/local}" SHAREDIR="${2:-${PREFIX}/share/mupen64plus}" BINDIR="${3:-${PREFIX}/bin}" LIBDIR="${4:-${PREFIX}/lib}" PLUGINDIR="${5:-${PREFIX}/lib/mupen64plus}" MANDIR="${6:-${PREFIX}/share/man}" APPSDIR="${7:-${PREFIX}/share/applications}" ICONSDIR="${8:-${PREFIX}/share/icons/hicolor}" # simple check for permissions if [ -d "${SHAREDIR}" -a ! -w "${SHAREDIR}" ]; then printf "Error: you do not have permission to install at: ${SHAREDIR}\nMaybe you need to be root?\n" exit 1 fi if [ -d "${BINDIR}" -a ! -w "${BINDIR}" ]; then printf "Error: you do not have permission to install at: ${BINDIR}\nMaybe you need to be root?\n" exit 1 fi if [ -d "${LIBDIR}" -a ! -w "${LIBDIR}" ]; then printf "Error: you do not have permission to install at: ${LIBDIR}\nMaybe you need to be root?\n" exit 1 fi if [ -d "${PLUGINDIR}" -a ! -w "${PLUGINDIR}" ]; then printf "Error: you do not have permission to install at: ${PLUGINDIR}\nMaybe you need to be root?\n" exit 1 fi if [ -d "${MANDIR}" -a ! -w "${MANDIR}" ]; then printf "Error: you do not have permission to install at: ${MANDIR}\nMaybe you need to be root?\n" exit 1 fi if [ -d "${APPSDIR}" -a ! -w "${APPSDIR}" ]; then printf "Error: you do not have permission to install at: ${APPSDIR}\nMaybe you need to be root?\n" exit 1 fi if [ -d "${ICONSDIR}" -a ! -w "${ICONSDIR}" ]; then printf "Error: you do not have permission to install at: ${ICONSDIR}\nMaybe you need to be root?\n" exit 1 fi printf "Installing Mupen64Plus Binary Bundle to ${PREFIX}\n" # Mupen64Plus-Core $INSTALL -d -v "${LIBDIR}" $INSTALL -m 0644 "${INSTALL_STRIP_FLAG}" libmupen64plus.so.2.* "${LIBDIR}" /sbin/ldconfig $INSTALL -d -v "${SHAREDIR}" $INSTALL -m 0644 font.ttf "${SHAREDIR}" $INSTALL -m 0644 mupencheat.txt "${SHAREDIR}" $INSTALL -m 0644 mupen64plus.ini "${SHAREDIR}" $INSTALL -d -v "${SHAREDIR}/doc" $INSTALL -m 0644 doc/* "${SHAREDIR}/doc" # Mupen64Plus-ROM $INSTALL -m 0644 m64p_test_rom.v64 "${SHAREDIR}" # Mupen64Plus-UI-Console $INSTALL -d -v "${BINDIR}" $INSTALL $GINSTALLFLAG -m 0755 mupen64plus "${BINDIR}" $INSTALL -d -v "${MANDIR}/man6" $INSTALL -m 0644 man6/mupen64plus.6 "${MANDIR}/man6" $INSTALL -d -v "${APPSDIR}" $INSTALL -m 0644 mupen64plus.desktop "${APPSDIR}" $INSTALL -d -v "${ICONSDIR}/48x48/apps" $INSTALL -m 0644 icons/48x48/apps/mupen64plus.png "${ICONSDIR}/48x48/apps" $INSTALL -d -v "${ICONSDIR}/scalable/apps" $INSTALL -m 0644 icons/scalable/apps/mupen64plus.svg "${ICONSDIR}/scalable/apps" # Plugins $INSTALL -d -v "${PLUGINDIR}" $INSTALL -m 0644 "${INSTALL_STRIP_FLAG}" mupen64plus-audio-sdl.so "${PLUGINDIR}" $INSTALL -m 0644 "${INSTALL_STRIP_FLAG}" mupen64plus-input-sdl.so "${PLUGINDIR}" $INSTALL -m 0644 "${INSTALL_STRIP_FLAG}" mupen64plus-rsp-hle.so "${PLUGINDIR}" $INSTALL -m 0644 "${INSTALL_STRIP_FLAG}" mupen64plus-video-rice.so "${PLUGINDIR}" $INSTALL -m 0644 "${INSTALL_STRIP_FLAG}" mupen64plus-video-glide64mk2.so "${PLUGINDIR}" $INSTALL -m 0644 RiceVideoLinux.ini "${SHAREDIR}" $INSTALL -m 0644 InputAutoCfg.ini "${SHAREDIR}" $INSTALL -m 0644 Glide64mk2.ini "${SHAREDIR}" printf "Installation successful.\n" mupen64plus-core-src-2.5/tools/m64p_helper_scripts.tar.gz000066400000000000000000000033451251723631200234670ustar00rootroot00000000000000‹4¢Sí[mOã8Þ¯äWÌuù°»"MÓWÝ"¤ ¥°Õµ¥j‹VètBiâ6>’8rØ.â¿ß8-4eÒ…–}ñT"q?ÇÎó$!¨–£³aB}7{oÖc´Z¥"·f­RHËf¹œnѪ…ZùY, ¥b¡VÃóÒÂ(¬ÉŸKbas€7Ñ„³ÇÏ#<Þ„C›µ·C±§½5>À‹ý´·ø D$Ä ó“t²¹O·;h]‰æ±€Dö˜|Oˆè£a8Ì%ù1ccŸä‘Ì/n܃Vg8ätì xWÅBáO½ˆi =êx6wሗœ“ði¾½ŒÝ  <CÄÙ˜Ûàîˆ1‰K›“]˜°;N\ N‡‰ @Ø¡k0séh2GÚ$t á„1°QZ8êœÀ ·}è&CŸ:Т c6: Äqa˜A“í¥?ý™?pÈÞ”…»@(Ös¸ÀÉ‚e(Þ\i»è_¶§ïl!»ÃEà=öa¾-æùâ¶ÞQ˜Û¦ÝòX„!õ°äKêû0$€KÅ(ñwî a;øÜ|:>€Õ9…ÏV¯gu§»ØNx kÉ™¢Ò ò)^£ËíPLdï µ½ú'lní7[ÍÁ© ëasÐiôûpxÜ ºVoЬŸ´¬tOzÝã~Ù'$½À]´Gò`”&޲K„Mýø‘áXÏ(œb²ÇßϾ ˜ô¡œÂOHå,ší³pœF[͇wèB&và’SœL‚-Äé!ßš;Ð ü΃íïG«˜h‡ç>&W_ 4ºsHGèê¡Ïß} Þ¶ P4Í‚n– æœô­ü]´ûâÉEƒ†¶˜fOìp 19Yq± pá‰q`DÂC–…úWÂÎ1{äʬÅD€N4 ýúWÈm·­¿9øwWB†Ú–,îö9ÑF4{®÷gõãv÷¸Óè úÙ‹5{9Gf)g$TwX3W±Ä¥L]'l”ˆtÇ‘îaÝu Ó9&Élwìã¦Z΋9鄜»”ƒAÞ$†&}BÜ‹ñÌBÇcûðƒ}y£§8Ùdì wÜÆël}Rô*Â;[Â’½aëx]#å ò´3,å/ªål+ &ä1ßçyðXF¡tºibrÏ)èј†X/³â»bõ-[H/pÈ7óA¯ßls—¬ÿˆ#b# ép|‚L`û¯g@ØxÛz ‘D§ 2E3“äýLðÜö»èÒ}??Ìío2ÁeÆ3wd®·šõF§ßèC¯a´¸i5¬~cšðÓŒ×q–,stû ñ®³ã/îÉÍrsïfÇô‡ÚÈôÆüØr±8íIœ gG¾îßÞP1Ýn ~¶y[â×}Æ}â¼ø"VíòÔ×éÅWïùÖ™þgû—þymí¢ìù–®±c"Ö§þ—êÿr¹REý_¬”KÅJ­Œõ¦Y«Ö”þß„m\ÿOsí;tÀºÕÿŠÂíeL©¥þ•ú_DSêÿWRÿ+H§:'L-” ¨4§$Îi<fòd&Ðg…ä¡Á(ÚïB<ÚöõEó» }f?M7qåupV“” ÄHðˆ— Så ž¼DX"Ф:þEOÊÉfú}]`ÿ/™%äÿ¦Y*š(Lùþ¯Zª*þ¿ Û8ÿŸçÚÊ\@)¥^s”P `Ñ7¥ÖóþOqù‡¹üÏðÞ«9½É¯÷Í×ü­Ó¯JÎ7`·ïX×ø` ÿ/™f ù¡X*«5³*ù¿YQü#¶qþ?˵ïaŠÿ+þÿ𣠸¿âÿ‹¾ýüßqÓo¸´|vI…ü·ßgiŠƒýl–Ž!Òéu>^íù¯üÿR±PQüo¶qþ—͵×GÅÿÿ{ÍQPüOñ¿Eß~þ§žÿªç¿«=ÿí‘€]¬÷éï-PÏŸcSNá²EÖöx)ÿ/o¾ÿ®¡ ÏËõý÷Flóüÿ&×VgŠÿ+þÿ𣠸¿âÿ‹¾)þÿ þ¯ˆýOü‘öIz_Îï#[x·ÿü»ŒáϾçÖõKÆÏu9°é•„Ànë:Öé.å·Ç ùívoS¸ìêúh¤³ÐŸ(9 L™2eÊ”-µÿŒê@°Pmupen64plus-core-src-2.5/tools/osx_build_bundle.sh000077500000000000000000000042701251723631200223220ustar00rootroot00000000000000#!/bin/sh ./m64p_build.sh mkdir -p mupen64plus.app/Contents/MacOS/ mv test/mupen64plus test/*.dylib mupen64plus.app/Contents/MacOS/ APP_CONTENTS="./mupen64plus.app/Contents" FIX_LIST="-x $APP_CONTENTS/MacOS/mupen64plus \ -x $APP_CONTENTS/MacOS/libmupen64plus.dylib \ -x $APP_CONTENTS/MacOS/mupen64plus-audio-sdl.dylib \ -x $APP_CONTENTS/MacOS/mupen64plus-input-sdl.dylib \ -x $APP_CONTENTS/MacOS/mupen64plus-rsp-hle.dylib \ -x $APP_CONTENTS/MacOS/mupen64plus-video-rice.dylib \ -x $APP_CONTENTS/MacOS/mupen64plus-video-glide64mk2.dylib" dylibbundler -od -b $FIX_LIST -d $APP_CONTENTS/libs/ rm -rf $APP_CONTENTS/Resources rm -rf $APP_CONTENTS/SharedSupport mkdir -p $APP_CONTENTS/Resources mkdir -p $APP_CONTENTS/Frameworks mv test/*.ini test/*.ttf $APP_CONTENTS/Resources mv test/mupen* $APP_CONTENTS/Resources mv test $APP_CONTENTS/SharedSupport mv $APP_CONTENTS/SharedSupport/m64p_test_rom.v64 ./example.v64 echo './mupen64plus.app/Contents/MacOS/mupen64plus --corelib ./mupen64plus.app/Contents/MacOS/libmupen64plus.dylib --plugindir ./mupen64plus.app/Contents/MacOS --gfx mupen64plus-video-rice "$@"' > run_rice.sh echo './mupen64plus.app/Contents/MacOS/mupen64plus --corelib ./mupen64plus.app/Contents/MacOS/libmupen64plus.dylib --plugindir ./mupen64plus.app/Contents/MacOS --gfx mupen64plus-video-glide64mk2 "$@"' > run_glide.sh echo -e "Note that Mupen64Plus requires an Intel mac and will not run on PPC macs.\nIt is known to run on OS X 10.8; and most likely also runs on 10.7.\n\nThis application can NOT be opened in the Finder by double-clicking.\n To use, launch the terminal, then cd into the directory that contains mupen64plus.app and use a command like :\n\n $ ./run_rice.sh example.v64 # for the Rice video plugin\n $ ./run_glide.sh example.v64 # for the Glide64mk2 video plugin\n\n Note that at this point, the only way to configure Mupen64Plus is to edit the config files in ~/.config/mupen64plus\n\n If you cannot follow the instructions above then this package is not meant for you =)\n" > Readme.txt chmod +x run_rice.sh run_glide.sh CURDATE=`date +%Y%m%d` zip -r mupen64plus-bundle-osx-$CURDATE.zip mupen64plus.app Readme.txt run_rice.sh run_glide.sh example.v64 mupen64plus-core-src-2.5/tools/osx_build_instructions.txt000066400000000000000000000015001251723631200240100ustar00rootroot00000000000000Mupen64plus build under OSX 10.9.5 (Mavericks) with Xcode 6.1.1 1. Install command-line tools through xcode - Xcode --> Preferences... --> Downloads tab --> Components page --> Command Line Tools 2. Install mac ports - download page: http://www.macports.org/install.php - .pkg installer for Mavericks 3. Install Git via macports - command line: "sudo port install git†4. Get m64p_helper_scripts.tar.gz from https://code.google.com/p/mupen64plus/wiki/CompilingFromGit - unzip into build folder - run "./m64p_get.sh" 5. Install other build dependencies: - sudo port install pkgconfig - sudo port install libpng - edit /opt/local/etc/macports/variants.conf: - add: +no_x11 +quartz - sudo port install libSDL2 - sudo port install freetype - sudo port install boost 6. Run "./m64p_build.sh" mupen64plus-core-src-2.5/tools/profiling.txt000066400000000000000000000111441251723631200211720ustar00rootroot00000000000000How to profile R4300 instructions with mupen64plus: Pre-requisites: - either 32-bit (x86) or 64-bit (amd64) Linux system - Lots of memory. It doesn't cause swapping in a machine with 2GB of ram, but it probably would with 1GB - OProfile (http://oprofile.sourceforge.net/) - Mupen64plus source code Procedure: 1. Install OProfile linux tool 2. Build r4300 profile tool with "gcc -o r4300prof r4300prof.c" 3. Build mupen64plus with "make DBGSYM=1 DBG_PROFILE=1" 4. Delete any pre-existing profiling files: "rm instructionaddrs.dat" 5. Clear any residual profiling data in oprofile: "sudo opcontrol --reset" 6. Make profiling run by typing in console: sudo opcontrol --start ; ./mupen64plus --nogui --emumode 2 --audio ./plugins/dummyaudio.so ; sudo opcontrol --stop 7. Exit emulator with Escape key after running for desired time 7. Move data file into tools folder: "mv instructionaddrs.dat tools/" 8. Dump instruction-level profiling data for mupen64plus with oprofile: opreport -d -l ./mupen64plus > ./tools/prof-mupen64-detail.txt 9. Run tool to generate r4300 instruction profile report: cd tools ; ./r4300prof instructionaddrs.dat prof-mupen64-detail.txt Example profile output: Loading instructionaddrs.dat... 283844 r4300 instruction locations read. 247911 non-empty MIPS instructions. Loading prof-mupen64-detail.txt... 118181 lines in sample data file. Found 117905 profile hits. Instruction time (samples): reserved: 00007515 NI: 00000000 J: 00000043 JAL: 00003345 BEQ: 00004498 BNE: 00003424 BLEZ: 00000222 BGTZ: 00000029 ADDI: 00000585 ADDIU: 00017439 SLTI: 00000765 SLTIU: 00000089 ANDI: 00003847 ORI: 00000381 XORI: 00000035 LUI: 00010389 BEQL: 00001873 BNEL: 00002617 BLEZL: 00000013 BGTZL: 00000010 DADDI: 00000000 DADDIU: 00000000 LDL: 00000000 LDR: 00000000 LB: 00002600 LH: 00006653 LW: 00024840 LWL: 00000001 LBU: 00003525 LHU: 00004954 LWU: 00000000 LWR: 00000003 SB: 00003007 SH: 00004133 SW: 00023221 SWL: 00000000 SWR: 00000000 SDL: 00000000 SDR: 00000000 LWC1: 00012405 LDC1: 00001855 LD: 00000815 LL: 00000000 SWC1: 00007671 SDC1: 00001326 SD: 00001233 SC: 00000000 BLTZ: 00000383 BGEZ: 00000331 BLTZL: 00000161 BGEZL: 00000168 BLTZAL: 00000000 BGEZAL: 00000115 BLTZALL: 00000000 BGEZALL: 00000000 SLL: 00003376 SRL: 00000604 SRA: 00000686 SLLV: 00000015 SRLV: 00000039 SRAV: 00000000 JR: 00001358 JALR: 00000004 SYSCALL: 00000000 MFHI: 00000058 MTHI: 00000002 MFLO: 00000277 MTLO: 00000004 DSLLV: 00000000 DSRLV: 00000000 DSRAV: 00000000 MULT: 00000000 MULTU: 00000583 DIV: 00000941 DIVU: 00000000 DMULT: 00000000 DMULTU: 00000000 DDIV: 00000000 DDIVU: 00000000 ADD: 00000170 ADDU: 00001706 SUB: 00000037 SUBU: 00000833 AND: 00000909 OR: 00006360 XOR: 00000079 NOR: 00000004 SLT: 00000925 SLTU: 00001401 DADD: 00000000 DADDU: 00000000 DSUB: 00000000 DSUBU: 00000000 DSLL: 00000000 DSRL: 00000000 DSRA: 00000000 TEQ: 00000000 DSLL32: 00000000 DSRL32: 00000000 DSRA32: 00000000 BC1F: 00000286 BC1T: 00000032 BC1FL: 00000775 BC1TL: 00000077 TLBWI: 00000000 TLBP: 00000000 TLBR: 00000000 TLBWR: 00000000 ERET: 00000036 MFC0: 00000396 MTC0: 00000034 MFC1: 00000929 DMFC1: 00000000 CFC1: 00000141 MTC1: 00003081 DMTC1: 00000000 CTC1: 00000163 f.CVT: 00001113 f.CMP: 00002149 f.ADD: 00001387 f.SUB: 00000947 f.MUL: 00002696 f.DIV: 00000315 f.SQRT: 00000025 f.ABS: 00000000 f.MOV: 00000631 f.NEG: 00000323 f.ROUND: 00000000 f.TRUNC: 00000867 f.CEIL: 00000000 f.FLOOR: 00000000 Special code samples: Regcache flushing: 12371 Jump wrappers: 15520 NOTCOMPILED: 33 block postfix & link samples: 619 Unaccounted samples: 19929 Total accounted instruction samples: 221836 Load: 35.2% (68040) Store: 21.0% (40591) Data move/convert: 03.5% (6829) 32-bit math: 16.0% (30861) 64-bit math: 05.7% (10948) Float Math: 04.5% (8709) Jump: 02.5% (4750) Branch: 07.8% (15014) Exceptions: 00.0% (36) Reserved: 03.9% (7515) Other: 00.0% (0) mupen64plus-core-src-2.5/tools/r4300prof.c000066400000000000000000000422341251723631200202470ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - r4300prof.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include /* Global data */ unsigned int instr_samples[132]; char instr_name[][10] = { "reserved", "NI", "J", "JAL", "BEQ", "BNE", "BLEZ", "BGTZ", "ADDI", "ADDIU", "SLTI", "SLTIU", "ANDI", "ORI", "XORI", "LUI", "BEQL", "BNEL", "BLEZL", "BGTZL", "DADDI", "DADDIU", "LDL", "LDR", "LB", "LH", "LW", "LWL", "LBU", "LHU", "LWU", "LWR", "SB", "SH", "SW", "SWL", "SWR", "SDL", "SDR", "LWC1", "LDC1", "LD", "LL", "SWC1", "SDC1", "SD", "SC", "BLTZ", "BGEZ", "BLTZL", "BGEZL", "BLTZAL", "BGEZAL", "BLTZALL", "BGEZALL", "SLL", "SRL", "SRA", "SLLV", "SRLV", "SRAV", "JR", "JALR", "SYSCALL", "MFHI", "MTHI", "MFLO", "MTLO", "DSLLV", "DSRLV", "DSRAV", "MULT", "MULTU", "DIV", "DIVU", "DMULT", "DMULTU", "DDIV", "DDIVU", "ADD", "ADDU", "SUB", "SUBU", "AND", "OR", "XOR", "NOR", "SLT", "SLTU", "DADD", "DADDU", "DSUB", "DSUBU", "DSLL", "DSRL", "DSRA", "TEQ", "DSLL32", "DSRL32", "DSRA32", "BC1F", "BC1T", "BC1FL", "BC1TL", "TLBWI", "TLBP", "TLBR", "TLBWR", "ERET", "MFC0", "MTC0", "MFC1", "DMFC1", "CFC1", "MTC1", "DMTC1", "CTC1", "f.CVT", "f.CMP", "f.ADD", "f.SUB", "f.MUL", "f.DIV", "f.SQRT", "f.ABS", "f.MOV", "f.NEG", "f.ROUND", "f.TRUNC", "f.CEIL", "f.FLOOR" }; unsigned int instr_type[131] = { 9, 10, 6, 6, 7, 7, 7, 7, 3, 3, 4, 4, 3, 4, 4, 0, 7, 7, 7, 7, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 7, 7, 3, 3, 3, 3, 3, 3, 6, 6, 10, 2, 2, 2, 2, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 4, 4, 4, 7, 7, 7, 7, 10, 10, 10, 10, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 2, 5, 5, 5, 5, 5 }; char instr_typename[][20] = { "Load", "Store", "Data move/convert", "32-bit math", "64-bit math", "Float Math", "Jump", "Branch", "Exceptions", "Reserved", "Other" }; /* Global functions */ int GetInstrType(int opcode); int AddrCompare(const void *, const void *); int ParseProfLine(const char *pchIn, long *plAddress, int *piSamples, float *pfPercentage); /* defined types */ typedef struct __attribute__ ((__packed__)) { int mipsop; long x86addr; } r4300op; typedef struct { long x86addr; int samples; } profilehit; /* static functions */ static int isSpace(char ch) { return (ch == ' ' || ch == '\t' ? 1 : 0); } static int isNum(char ch) { return (ch >= '0' && ch <= '9' ? 1 : 0); } static int isFloat(char ch) { return ((ch >= '0' && ch <= '9') || ch == '.' || ch == '+' || ch == '-' || ch == 'e' ? 1 : 0); } static int isHex(char ch) { return ((ch >= '0' && ch <= '9') || ((ch & 0xdf) >= 'A' && (ch & 0xdf) <= 'F') ? 1 : 0); } /* main */ int main(int argc, void *argv[]) { long lOpStart, lOpEnd; int flength, oplistlength, totaltime, proflistlength; int samp_unknown, samp_blockend, samp_notcompiled, samp_wrappers, samp_flush; int i, j; FILE *pfIn; r4300op *pOpAddrTable; profilehit *pProfTable; char *pch, *pchSampleData; /* check arguments */ if (argc < 3) { printf("Usage: r4300prof r4300addr.dat x86profile.txt\n\n"); printf("r4300addr.dat - binary table of r4300 opcodes and corresponding x86 starting addresses\n"); printf("x86profile.txt - text file containing a list of profile sample counts by x86 address on the heap\n\n"); return 1; } /* open r4300 opcode/x86 address table generated from emulator run */ printf("Loading %s...\n", argv[1]); pfIn = fopen(argv[1], "rb"); if (pfIn == NULL) { printf("Couldn't open input file: %s\n", argv[1]); return 2; } /* get file length and calculate number of r4300op table entries */ fseek(pfIn, 0L, SEEK_END); flength = (int) ftell(pfIn); fseek(pfIn, 0L, SEEK_SET); oplistlength = flength / sizeof(r4300op); /* read the file */ pOpAddrTable = (r4300op *) malloc(flength); if (pOpAddrTable == NULL) { printf("Failed to allocate %i bytes for OpAddrTable!\n", flength); fclose(pfIn); return 3; } fread(pOpAddrTable, 1, flength, pfIn); fclose(pfIn); printf("%i r4300 instruction locations read.\n", oplistlength); /* sort the opcode/address table according to x86addr */ qsort(pOpAddrTable, oplistlength, sizeof(r4300op), AddrCompare); /* remove any 0-length r4300 instructions */ i = 0; j = 0; while (i < oplistlength) { pOpAddrTable[j].mipsop = pOpAddrTable[i].mipsop; pOpAddrTable[j].x86addr = pOpAddrTable[i].x86addr; i++; if (pOpAddrTable[j].x86addr != pOpAddrTable[i].x86addr) j++; } oplistlength = j; printf("%i non-empty MIPS instructions.\n", oplistlength); /* convert each r4300 opcode to an instruction type index */ for (i = 0; i < oplistlength; i++) if (pOpAddrTable[i].mipsop > 0 || pOpAddrTable[i].mipsop < -16) pOpAddrTable[i].mipsop = GetInstrType(pOpAddrTable[i].mipsop); /* open the profiling sample data file */ printf("Loading %s...\n", argv[2]); pfIn = fopen(argv[2], "rb"); if (pfIn == NULL) { printf("Couldn't open input file: %s\n", argv[2]); free(pOpAddrTable); return 4; } /* load it */ fseek(pfIn, 0L, SEEK_END); flength = (int) ftell(pfIn); fseek(pfIn, 0L, SEEK_SET); pchSampleData = (char *) malloc(flength + 16); if (pchSampleData == NULL) { printf("Failed to allocate %i bytes for pchSampleData!\n", flength + 16); fclose(pfIn); free(pOpAddrTable); return 5; } fread(pchSampleData, 1, flength, pfIn); pchSampleData[flength] = 0; fclose(pfIn); /* count the number of newlines in the ascii-formatted sample data file */ proflistlength = 1; pch = pchSampleData; while (pch = strchr(pch, '\n')) { proflistlength++; pch++; } printf("%i lines in sample data file.\n", proflistlength); /* extract text data into binary table */ pProfTable = (profilehit *) malloc(proflistlength * sizeof(profilehit)); if (pProfTable == NULL) { printf("Failed to allocate %i bytes for pProfTable!\n", proflistlength * sizeof(profilehit)); free(pOpAddrTable); free(pchSampleData); return 6; } pch = pchSampleData; j = 0; long long llOffset = 0; while (j < proflistlength) { long lAddress; int iSamples; float fPercentage; char *pchNext = strchr(pch, '\n'); if (pchNext != NULL) *pchNext++ = 0; // null-terminate this line if (strstr(pch, "range:0x") != NULL) // search for offset change { pch = strstr(pch, "range:0x") + 8; // extract hex value and update our offset char *pch2 = pch; while (isHex(*pch2)) pch2++; *pch2 = 0; llOffset = strtoll(pch, NULL, 16); } else // parse line for sample point { int rval = ParseProfLine(pch, &lAddress, &iSamples, &fPercentage); if (rval != 0) { pProfTable[j].x86addr = (unsigned long) (lAddress + llOffset); pProfTable[j].samples = iSamples; j++; } } pch = pchNext; if (pch == NULL) break; } free(pchSampleData); proflistlength = j; printf("Found %i profile hits.\n", proflistlength); /* clear r4300 instruction sample data table */ for (i = 0; i < 132; i++) instr_samples[i] = 0; /* calculate r4300 instruction profiling data by merging the tables */ samp_unknown = 0; samp_blockend = 0; samp_notcompiled = 0; samp_wrappers = 0; samp_flush = 0; i = 0; // i == OpAddrTable index lOpStart = pOpAddrTable[0].x86addr; lOpEnd = pOpAddrTable[1].x86addr; for (j = 0; j < proflistlength; j++) // j == pProfTable index { long lOpx86addr = pProfTable[j].x86addr; if (lOpx86addr >= lOpStart && lOpx86addr <= lOpEnd) /* these profile samples lie within current r4300 instruction */ { int instr = pOpAddrTable[i].mipsop; if (instr == -1) printf("%lx sample point lies between %i/%lx and %i/%lx\n", lOpx86addr, instr, lOpStart, pOpAddrTable[i+1].mipsop, lOpEnd); if (instr == -1) samp_unknown += pProfTable[j].samples; else if (instr == -2) samp_notcompiled += pProfTable[j].samples; else if (instr == -3) samp_blockend += pProfTable[j].samples; else if (instr == -4) samp_wrappers += pProfTable[j].samples; else if (instr == -5) samp_flush += pProfTable[j].samples; else instr_samples[instr] += pProfTable[j].samples; continue; } if (lOpx86addr < pOpAddrTable[0].x86addr || lOpx86addr >= pOpAddrTable[oplistlength-1].x86addr) { /* outside the range of all recompiled instructions */ samp_unknown += pProfTable[j].samples; continue; } if (lOpx86addr < lOpStart) /* discontinuity in profile list, go back to start */ { i = 0; lOpStart = pOpAddrTable[0].x86addr; lOpEnd = pOpAddrTable[1].x86addr; j--; continue; } /* this profile point is ahead of current r4300 instruction */ do /* race ahead in r4300 opcode list until we hit this profile sample point */ { i++; } while (i+1 < oplistlength && lOpx86addr > pOpAddrTable[i+1].x86addr); lOpStart = pOpAddrTable[i].x86addr; lOpEnd = pOpAddrTable[i+1].x86addr; if (lOpx86addr < lOpStart || lOpx86addr > lOpEnd) { printf("Error: lOpx86addr = %lx but lOpStart, lOpEnd = %lx, %lx\n", lOpx86addr, lOpStart, lOpEnd); return 7; } /* we have found the correct r4300 instruction corresponding to this profile point */ j--; } /* print the results */ unsigned int iTypeCount[11] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; printf("\nInstruction time (samples):\n"); totaltime = 0; for (i = 0; i < 131; i++) { printf("%8s: %08i ", instr_name[i], instr_samples[i]); if (i % 5 == 4) printf("\n"); iTypeCount[instr_type[i]] += instr_samples[i]; totaltime += instr_samples[i]; } int special = samp_flush + samp_wrappers + samp_notcompiled + samp_blockend; printf("\n\nSpecial code samples:\n"); printf(" Regcache flushing: %i\n", samp_flush); printf(" Jump wrappers: %i\n", samp_wrappers); printf(" NOTCOMPILED: %i\n", samp_notcompiled); printf(" block postfix & link samples: %i\n", samp_blockend); printf("\nUnaccounted samples: %i\n", samp_unknown); printf("Total accounted instruction samples: %i\n", totaltime + special); for (i = 0; i < 11; i++) { printf("%20s: %04.1f%% (%i)\n", instr_typename[i], (float) iTypeCount[i] * 100.0 / totaltime, iTypeCount[i]); } free(pOpAddrTable); free(pProfTable); return 0; } int AddrCompare(const void *p1, const void *p2) { const r4300op *pOp1 = (const r4300op *) p1; const r4300op *pOp2 = (const r4300op *) p2; if (pOp1->x86addr < pOp2->x86addr) return -1; else if (pOp1->x86addr == pOp2->x86addr) return (int) (pOp1 - pOp2); /* this forces qsort to be stable */ else return 1; } int ParseProfLine(const char *pchIn, long *plAddress, int *piSamples, float *pfPercentage) { char chVal[128], *pchOut; /* skip any initial whitespace */ while (isSpace(*pchIn)) pchIn++; if (!isHex(*pchIn)) return 0; /* parse hexadecimal address value */ pchOut = chVal; while (isHex(*pchIn)) *pchOut++ = *pchIn++; *pchOut = 0; if (!isSpace(*pchIn)) return 0; *plAddress = strtol(chVal, NULL, 16); /* skip more whitespace */ while (isSpace(*pchIn)) pchIn++; if (!isNum(*pchIn)) return 0; /* parse decimal sample count value */ pchOut = chVal; while (isNum(*pchIn)) *pchOut++ = *pchIn++; *pchOut = 0; if (!isSpace(*pchIn)) return 0; *piSamples = atoi(chVal); /* skip more whitespace */ while (isSpace(*pchIn)) pchIn++; if (!isFloat(*pchIn)) return 0; /* parse floating-point percentage value */ pchOut = chVal; while (isFloat(*pchIn)) *pchOut++ = *pchIn++; *pchOut = 0; if (!isSpace(*pchIn) && *pchIn != '\r' && *pchIn != '\n' && *pchIn != 0) return 0; *pfPercentage = atof(chVal); /* if this isn't the end of the line, it's not a valid sample point */ while (isSpace(*pchIn)) pchIn++; if (*pchIn != '\r' && *pchIn != '\n' && *pchIn != 0) return 0; return 1; } static int InstrTypeStd[64] = { -1, -1, 02, 03, 04, 05, 06, 07, 8, 9, 10, 11, 12, 13, 14, 15, -1, -1, 00, 00, 16, 17, 18, 19, 20, 21, 22, 23, 00, 00, 00, 00, 24, 25, 27, 26, 28, 29, 31, 30, 32, 33, 35, 34, 37, 38, 36, 01, 42, 39, 00, 00, 01, 40, 00, 41, 46, 43, 00, 00, 01, 44, 00, 45 }; static int InstrTypeSpecial[64] = { 55, 00, 56, 57, 58, 00, 59, 60, 61, 62, 00, 00, 63, 01, 00, 00, 64, 65, 66, 67, 68, 00, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 00, 00, 87, 88, 89, 90, 91, 92, 01, 01, 01, 01, 96, 00, 01, 00, 93, 00, 94, 95, 97, 00, 98, 99 }; static int InstrTypeRegImm[32] = { 47, 48, 49, 50, 00, 00, 00, 00, 01, 01, 01, 01, 01, 00, 01, 00, 51, 52, 53, 54, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 }; static int InstrTypeCop1[32] = { 111, 112, 113, 00, 114, 115, 116, 00, -1, 00, 00, 00, 00, 00, 00, 00, -1, -1, 00, 00, -1, -1, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 }; static int InstrTypeCop1Math[64] = { 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 127, 128, 129, 130, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 117, 117, 00, 00, 117, 117, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118 }; int GetInstrType(int opcode) { int iType = (opcode >> 26) & 63; if (iType == 0) { /* SPECIAL instruction */ iType = opcode & 63; return InstrTypeSpecial[iType]; } else if (iType == 1) { /* REGIMM instruction */ iType = (opcode >> 16) & 31; return InstrTypeRegImm[iType]; } else if (iType == 16) { /* COP0 instruction */ int iType1 = opcode & 0x01FFFFFF; int iType2 = (opcode >> 21) & 31; if (iType1 == 1) return 106; // TLBR else if (iType1 == 2) return 104; // TLBWI else if (iType1 == 6) return 107; // TLBWR else if (iType1 == 8) return 105; // TLBP else if (iType1 == 24) return 108; // ERET else if ((opcode & 0x7FF) == 0 && iType2 == 0) return 109; // MFC0 else if ((opcode & 0x7FF) == 0 && iType2 == 4) return 110; // MTC0 else return 0; // reserved } else if (iType == 17) { /* COP1 instruction */ int iType1 = (opcode >> 21) & 31; if (iType1 == 8) { /* conditional branch */ int iType2 = (opcode >> 16) & 31; if (iType2 == 0) return 100; // BC1F else if (iType2 == 1) return 101; // BC1T else if (iType2 == 2) return 102; // BC1FL else if (iType2 == 3) return 103; // BC1TL else return 0; // reserved } else if (iType1 == 16 || iType1 == 17 || iType1 == 20 || iType1 == 21) { /* Single, Double, Word, Long instructions */ int iType2 = opcode & 63; return InstrTypeCop1Math[iType2]; } else { /* other Cop1 (move) */ return InstrTypeCop1[iType1]; } } /* standard MIPS instruction */ return InstrTypeStd[iType]; } mupen64plus-core-src-2.5/tools/regtests/000077500000000000000000000000001251723631200202775ustar00rootroot00000000000000mupen64plus-core-src-2.5/tools/regtests/daily-tests.cfg000066400000000000000000000157741251723631200232400ustar00rootroot00000000000000#/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * Mupen64plus - daily-tests.cfg * # * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * # * Copyright (C) 2008-2009 Richard Goedeken * # * * # * This program is free software; you can redistribute it and/or modify * # * it under the terms of the GNU General Public License as published by * # * the Free Software Foundation; either version 2 of the License, or * # * (at your option) any later version. * # * * # * This program is distributed in the hope that it will be useful, * # * but WITHOUT ANY WARRANTY; without even the implied warranty of * # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * # * GNU General Public License for more details. * # * * # * You should have received a copy of the GNU General Public License * # * along with this program; if not, write to the * # * Free Software Foundation, Inc., * # * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ # Daily regression test config file for Mupen64Plus # # To set up an automatic nightly test, run "crontab -e" and add a line like this: # # 30 03 * * * export DISPLAY=:0 ; /home/username/software/regtests/regression-video.py # # This will launch the test at 3:30am each night. You will need to replace the path to the # regression-video.py script with the correct path for your system. You may also need to # disable your screen saver to make this work. # Global test settings rompath = /path/to/N64/ROMs sendemail = me@mydomain.com videobuild = 64-bit basic build videobuildparams = all numspeedbuilds = 3 speedbuild0params = all BITS=32 SDL_CONFIG="sdl-config" speedbuild0tests = 3 speedbuild0test0name = 32-bit Pure Interpreter speedbuild0test0options = --emumode 0 speedbuild0test1name = 32-bit Cached Interpreter speedbuild0test1options = --emumode 1 speedbuild0test2name = 32-bit Old Dynarec speedbuild0test2options = --emumode 2 speedbuild1params = all BITS=32 NEW_DYNAREC=1 SDL_CONFIG="sdl-config" speedbuild1tests = 1 speedbuild1test0name = 32-bit New Dynarec speedbuild1test0options = --emumode 2 speedbuild2params = all speedbuild2tests = 3 speedbuild2test0name = 64-bit Pure Interpreter speedbuild2test0options = --emumode 0 speedbuild2test1name = 64-bit Cached Interpreter speedbuild2test1options = --emumode 1 speedbuild2test2name = 64-bit Old Dynarec speedbuild2test2options = --emumode 2 {Core Library} url = https://github.com/mupen64plus/mupen64plus-core outputfiles = libmupen64plus.so.2 testbuilds = 32-bit build on 64-bit system, LIRC build, No Assembly build, Debug Info build, R4300 Debugger build testbuildparams = all BITS=32, all LIRC=1, all NO_ASM=1, all DEBUG=1 DBG_CORE=1 DBG_COUNT=1 DBG_COMPARE=1 DBG_PROFILE=1, all DEBUGGER=1 {Console UI} url = https://github.com/mupen64plus/mupen64plus-ui-console outputfiles = mupen64plus testbuilds = 32-bit build testbuildparams = all BITS=32 {Video-Rice} url = https://github.com/mupen64plus/mupen64plus-video-rice outputfiles = mupen64plus-video-rice.so testbuilds = 32-bit build, no assembly build, debug build testbuildparams = all BITS=32, all NO_ASM=1, all DEBUG=1 {Video-Glide64mk2} url = https://github.com/mupen64plus/mupen64plus-video-glide64mk2 outputfiles = mupen64plus-video-glide64mk2.so testbuilds = 32-bit build testbuildparams = all BITS=32 {Audio-SDL} url = https://github.com/mupen64plus/mupen64plus-audio-sdl outputfiles = mupen64plus-audio-sdl.so testbuilds = 32-bit build testbuildparams = all BITS=32 {Input-SDL} url = https://github.com/mupen64plus/mupen64plus-input-sdl outputfiles = mupen64plus-input-sdl.so testbuilds = 32-bit build testbuildparams = all BITS=32 {RSP-HLE} url = https://github.com/mupen64plus/mupen64plus-rsp-hle outputfiles = mupen64plus-rsp-hle.so testbuilds = 32-bit build testbuildparams = all BITS=32 # Game-specific settings [1080 Snowboarding (E) (M4) [!].z64] screenshots = 22, 147, 276, 354, 540, 684 [Airboarders 64.z64] screenshots = 46, 450, 475, 508, 548, 632 [Automobili Lamborghini.z64] screenshots = 35, 226, 532, 586, 632, 682, 752, 838 [Banjo-Kazooie.z64] screenshots = 26, 129, 287, 536, 581, 627 [Batman Beyond - Return of the Joker.z64] screenshots = 42, 352, 613, 1178 [Bomberman 64 (U) [!].z64] screenshots = 72, 578, 767, 950, 1110, 1219 [Bust-A-Move '99.z64] screenshots = 119,966,1186,1282,1378,1479,1691,2082 [Cruis'n USA.z64] screenshots = 0, 93, 191, 250, 308, 420 [Doom 64.z64] screenshots = 18, 364, 469 [Earthworm Jim 3D.z64] screenshots = 42, 354, 770, 877, 991, 1285, 1364, 1487 [Elmo's Letter Adventure.z64] screenshots = 49, 393, 1389 [Fighting Force 64.z64] screenshots = 35, 353, 919 ,1044, 1401, 2267 [Forsaken 64.z64] screenshots = 27, 527 [Gauntlet Legends.v64] screenshots = 31, 503, 792, 929, 1038, 1228, 1284, 1412, 1589 skipvideo = glN64 [Iggy's Reckin' Balls.z64] screenshots = 142, 493, 531, 726, 824 [Kirby 64 - The Crystal Shards (U) [!].z64] screenshots = 28, 164, 439, 606, 859, 979, 1115, 1203, 1384, 1612, 1921, 2170 [Mario Kart 64 (U) [!].z64] screenshots = 41, 104, 260, 572, 629, 897, 961 speedtest = 3000 [Micro Machines 64 Turbo.z64] screenshots = 52, 142, 250, 511, 623, 690, 743 [Mischief Makers.z64] screenshots = 85, 360, 607, 882, 1043, 1155, 1259, 1334, 1489 [Mortal Kombat 4 (U) [!].z64] screenshots = 37, 171, 319, 517 [Paper Mario (U) [!].z64] screenshots = 57, 235, 595, 843, 1177, 1401 [Penny Racers.z64] screenshots = 24, 462, 620, 755 skipvideo = rice, glide64 [Quake 64 (U) [!].z64] screenshots = 35, 319, 427 [Road Rash 64.z64] screenshots = 44, 330, 459, 634 [San Francisco Rush - Extreme Racing.z64] screenshots = 17, 93, 246, 282, 397, 509, 704 [Star Fox 64 (U) (V1.1) [!].z64] screenshots = 35, 295, 458, 794, 929, 1390 [Super Mario 64 (U) [!].z64] screenshots = 17, 119, 199, 330, 421 [Super Smash Bros..z64] screenshots = 40, 78, 185, 590, 1008, 1117, 1349, 1566, 1639, 1683, 1745, 1805 [Taz Express (E) (M6) [!].z64] screenshots = 25, 119, 167, 322 [TheLegendofZeldaOcarinaofTime.v64] screenshots = 84, 299, 380, 513, 601, 706, 770 [Top Gear Rally.z64] screenshots = 62, 194, 299, 454, 557, 861, 937, 970, 1072, 1228, 1273, 1342 [Turok - Dinosaur Hunter.z64] screenshots = 51, 222, 301, 438, 554, 910, 975, 1004 [Turok 2 - Seeds of Evil.z64] speedtest = 3000 [Vigilante 8.z64] speedtest = 3000 [Wave Race 64.z64] screenshots = 25, 99, 214, 275, 333, 389, 426 [Wetrix.N64] screenshots = 66, 176, 353, 440, 545, 742, 827, 863 [Worms - Armageddon (U) (M3) [!].z64] screenshots = 38, 375 [Yoshi's Story (U) (M2) [!].z64] screenshots = 68, 276, 340, 572, 638 mupen64plus-core-src-2.5/tools/regtests/regression-video.py000077500000000000000000000734361251723631200241550ustar00rootroot00000000000000#!/usr/bin/env python #/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * Mupen64plus - regression-video.py * # * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * # * Copyright (C) 2008-2012 Richard Goedeken * # * * # * This program is free software; you can redistribute it and/or modify * # * it under the terms of the GNU General Public License as published by * # * the Free Software Foundation; either version 2 of the License, or * # * (at your option) any later version. * # * * # * This program is distributed in the hope that it will be useful, * # * but WITHOUT ANY WARRANTY; without even the implied warranty of * # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * # * GNU General Public License for more details. * # * * # * You should have received a copy of the GNU General Public License * # * along with this program; if not, write to the * # * Free Software Foundation, Inc., * # * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ from optparse import OptionParser from threading import Thread from datetime import date import subprocess import commands import shutil import stat import time import sys import os # set global report string report = "Mupen64Plus Regression Test report\n----------------------------------\n" #****************************************************************************** # main functions # def main(rootdir, cfgfile, nogit, nobuild, nospeed, novidcheck, noemail): global report # set up child directory paths srcdir = os.path.join(rootdir, "source") shotdir = os.path.join(rootdir, "current") refdir = os.path.join(rootdir, "reference") archivedir = os.path.join(rootdir, "archive") # run the test procedure tester = RegTester(rootdir, srcdir, shotdir) rval = 0 while True: # Step 1: load the test config file if not tester.LoadConfig(cfgfile): rval = 1 break # Step 2: check out from Git if not nogit: if not tester.CheckoutSource(srcdir): rval = 2 break # Step 3: run test builds if not nobuild: for modname in tester.modulesAndParams: module = tester.modulesAndParams[modname] if "testbuilds" not in module: continue modurl = module["url"] modfilename = modurl.split('/')[-1] testlist = [ name.strip() for name in module["testbuilds"].split(',') ] makeparams = [ params.strip() for params in module["testbuildparams"].split(',') ] if len(testlist) != len(makeparams): report += "Config file error for test builds in %s. Build name list and makefile parameter list have different lengths.\n" % modname testbuilds = min(len(testlist), len(makeparams)) for i in range(testbuilds): buildname = testlist[i] buildmake = makeparams[i] BuildSource(srcdir, modfilename, modname, buildname, buildmake, module["outputfiles"], True, False) # Step 4: run speed tests if not nospeed: SpeedTestResults = [ ] # we iterate over each separate build numSpeedBuilds = int(tester.generalParams["numspeedbuilds"]) for buildIdx in range(numSpeedBuilds): buildname = "Speedtest Build #%i" % (buildIdx+1) buildmake = tester.generalParams["speedbuild%iparams" % buildIdx] # build all modules for modname in tester.modulesAndParams: module = tester.modulesAndParams[modname] modurl = module["url"] modfilename = modurl.split('/')[-1] if not BuildSource(srcdir, modfilename, modname, buildname, buildmake, module["outputfiles"], False, False): rval = 3 break if rval > 0: break # then we iterate over each separate test case for this build numCases = int(tester.generalParams["speedbuild%itests" % buildIdx]) for caseIdx in range(numCases): caseName = tester.generalParams["speedbuild%itest%iname" % (buildIdx, caseIdx)] caseOptions = tester.generalParams["speedbuild%itest%ioptions" % (buildIdx, caseIdx)].split(" ") oneRunResults = tester.RunSpeedTests(caseName, caseOptions) SpeedTestResults.append((caseName, oneRunResults)) # now we summarize the results if numSpeedBuilds > 0 and SpeedTestResults[0][1] is not None: numGames = len(SpeedTestResults[0][1]) gameNames = [result[0] for result in SpeedTestResults[0][1]] gameNameLengths = [len(name) for name in gameNames] maxTestNameLength = max([len(case[0]) for case in SpeedTestResults]) report += "Run %i speed test cases with %i games (best of 3 trials)\n" % (len(SpeedTestResults),numGames) tableHeader = (" " * (maxTestNameLength + 2)) + " ".join(gameNames) report += tableHeader + "\n" + ("=" * len(tableHeader)) + "\n" for (caseName, runResults) in SpeedTestResults: report += caseName + (" " * (maxTestNameLength - len(caseName) + 2)) if runResults == None: report += "Failed!\n" continue for (gameName, testTime) in runResults: strTime = "%.2f" % testTime report += strTime + (" " * (len(gameName) - len(strTime) + 2)) report += "\n" report += "\n" # Step 5: build the binary for the video regression test if not novidcheck: videobuild = tester.generalParams["videobuild"] videomake = tester.generalParams["videobuildparams"] for modname in tester.modulesAndParams: module = tester.modulesAndParams[modname] modurl = module["url"] modfilename = modurl.split('/')[-1] if not BuildSource(srcdir, modfilename, modname, videobuild, videomake, module["outputfiles"], False, True): rval = 3 break if rval != 0: break # Step 6: run the tests, check the results if not tester.RunTests(): rval = 4 break if not tester.CheckResults(refdir): rval = 5 break # test procedure is finished break # Step 7: send email report and archive the results if not noemail: if not tester.SendReport(): rval = 6 if not novidcheck: if not tester.ArchiveResults(archivedir): rval = 7 # all done with test process return rval #****************************************************************************** # Checkout & build functions # def BuildSource(srcdir, moddir, modname, buildname, buildmake, outputfiles, isbuildtest, isvideotest): global report makepath = os.path.join(srcdir, moddir, "projects", "unix") # to start, clean up os.system("make -C %s clean" % makepath) # print build report message and clear counters testbuildcommand = "make -C %s %s" % (makepath, buildmake) if isbuildtest: report += "Running %s test build \"%s\"\n" % (modname, buildname) elif isvideotest: report += "Building %s \"%s\" for video test\n" % (modname, buildname) warnings = 0 errors = 0 # run make and capture the output output = commands.getoutput(testbuildcommand) makelines = output.split("\n") # print warnings and errors for line in makelines: if "error:" in line: report += " " + line + "\n" errors += 1 if "warning:" in line and (isbuildtest or isvideotest): report += " " + line + "\n" warnings += 1 if isbuildtest or isvideotest: report += "%i errors. %i warnings.\n" % (errors, warnings) if errors > 0 and not isbuildtest: return False # check for output files for filename in outputfiles.split(','): if not os.path.exists(os.path.join(makepath, filename)): report += "Build failed: '%s' not found\n" % filename errors += 1 if errors > 0 and not isbuildtest: return False # if this wasn't a build test, then copy our output files and data files if not isbuildtest: for filename in outputfiles.split(','): try: os.unlink(os.path.join(srcdir, filename)) except: pass shutil.move(os.path.join(makepath, filename), srcdir) datapath = os.path.join(srcdir, moddir, "data") if os.path.isdir(datapath): copytree(datapath, os.path.join(srcdir, "data")) # build was successful! return True #****************************************************************************** # Test execution classes # class RegTester: def __init__(self, rootdir, bindir, screenshotdir): self.rootdir = rootdir self.bindir = bindir self.screenshotdir = screenshotdir self.generalParams = { } self.gamesAndParams = { } self.modulesAndParams = { } self.videoplugins = [ "mupen64plus-video-rice.so", "mupen64plus-video-glide64mk2.so" ] self.thisdate = str(date.today()) def LoadConfig(self, filename): global report # read the config file report += "\nLoading regression test configuration.\n" try: cfgfile = open(os.path.join(self.rootdir, filename), "r") cfglines = cfgfile.read().split("\n") cfgfile.close() except Exception, e: report += "Error in RegTestConfigParser::LoadConfig(): %s" % e return False # parse the file GameFilename = None ModuleName = None for line in cfglines: # strip leading and trailing whitespace line = line.strip() # test for comment if len(line) == 0 or line[0] == '#': continue # test for new game filename if line[0] == '[' and line [-1] == ']': GameFilename = line[1:-1] if GameFilename in self.gamesAndParams: report += " Warning: Config file '%s' contains duplicate game entry '%s'\n" % (filename, GameFilename) else: self.gamesAndParams[GameFilename] = { } continue # test for new source module build if line[0] == '{' and line [-1] == '}': ModuleName = line[1:-1] if ModuleName in self.modulesAndParams: report += " Warning: Config file '%s' contains duplicate source module '%s'\n" % (filename, ModuleName) else: self.modulesAndParams[ModuleName] = { } continue # print warning and continue if it's not a (key = value) pair pivot = line.find('=') if pivot == -1: report += " Warning: Config file '%s' contains unrecognized line: '%s'\n" % (filename, line) continue # parse key, value key = line[:pivot].strip().lower() value = line[pivot+1:].strip() if ModuleName is None: paramDict = self.generalParams elif GameFilename is None: paramDict = self.modulesAndParams[ModuleName] else: paramDict = self.gamesAndParams[GameFilename] if key in paramDict: report += " Warning: duplicate key '%s'\n" % key continue paramDict[key] = value # check for required parameters if "rompath" not in self.generalParams: report += " Error: rompath is not given in config file\n" return False # config is loaded return True def CheckoutSource(self, srcdir): global report # remove any current source directory if not deltree(srcdir): return False os.mkdir(srcdir) os.mkdir(os.path.join(srcdir, "data")) # loop through all of the source modules for modname in self.modulesAndParams: module = self.modulesAndParams[modname] if "url" not in module: report += "Error: no Git repository URL for module %s\n\n" % modname return False modurl = module["url"] modfilename = modurl.split("/")[-1] # call Git to checkout Mupen64Plus source module (status, output) = commands.getstatusoutput("git clone %s %s/%s" % (modurl, srcdir, modfilename)) # parse the output lastline = output.split("\n")[-1] if 0 != os.WEXITSTATUS(status): report += "Git Error: %s\n\n" % lastline return False # get the revision info RevFound = False output = commands.getoutput("git --git-dir=%s/.git log HEAD~1..HEAD" % os.path.join(srcdir, modfilename)) for line in output.split('\n'): words = line.split() if len(words) == 2 and words[0] == 'commit': report += "Git Checkout %s: changeset %s\n" % (modfilename, words[1]) RevFound = True if not RevFound: report += "Git Error: couldn't find revision information\n\n" return False return True def RunTests(self): global report rompath = self.generalParams["rompath"] if not os.path.exists(rompath): report += " Error: ROM directory '%s' does not exist!\n" % rompath return False # Remove any current screenshot directory if not deltree(self.screenshotdir): return False # Data initialization and start message os.mkdir(self.screenshotdir) for plugin in self.videoplugins: videoname = plugin[:plugin.find('.')] os.mkdir(os.path.join(self.screenshotdir, videoname)) report += "\nRunning regression tests on %i games.\n" % len(self.gamesAndParams) # loop over each game filename given in regtest config file for GameFilename in self.gamesAndParams: GameParams = self.gamesAndParams[GameFilename] # if no screenshots parameter given for this game then skip it if "screenshots" not in GameParams: continue # make a list of screenshots and check it shotlist = [ str(int(framenum.strip())) for framenum in GameParams["screenshots"].split(',') ] if len(shotlist) < 1 or (len(shotlist) == 1 and shotlist[0] == '0'): report += " Warning: invalid screenshot list for game '%s'\n" % GameFilename continue # run a test for each video plugin for plugin in self.videoplugins: videoname = plugin[:plugin.find('.')] # check if this plugin should be skipped if "skipvideo" in GameParams: skipit = False skiplist = [ name.strip() for name in GameParams["skipvideo"].split(',') ] for skiptag in skiplist: if skiptag.lower() in plugin.lower(): skipit = True if skipit: continue # construct the command line exepath = os.path.join(self.bindir, "mupen64plus") exeparms = [ "--corelib", os.path.join(self.bindir, "libmupen64plus.so.2") ] exeparms += [ "--testshots", ",".join(shotlist) ] exeparms += [ "--sshotdir", os.path.join(self.screenshotdir, videoname) ] exeparms += [ "--plugindir", self.bindir ] exeparms += [ "--datadir", os.path.join(self.bindir, "data") ] myconfig = os.path.join(self.rootdir, "config") #if os.path.exists(myconfig): exeparms += [ "--configdir", myconfig ] exeparms += [ "--gfx", plugin ] exeparms += [ "--emumode", "2" ] exeparms += [ os.path.join(rompath, GameFilename) ] # run it, but if it takes too long print an error and kill it testrun = RegTestRunner(exepath, exeparms) testrun.start() testrun.join(60.0) if testrun.isAlive(): report += " Error: Test run timed out after 60 seconds: '%s'\n" % " ".join(exeparms) os.kill(testrun.pid, 9) testrun.join(10.0) # all tests have been run return True def RunSpeedTests(self, caseName, caseOptions): global report rompath = self.generalParams["rompath"] if not os.path.exists(rompath): report += " Error: ROM directory '%s' does not exist!\n" % rompath return None # Remove any current screenshot directory if not deltree(self.screenshotdir): return None # Data initialization and start message os.mkdir(self.screenshotdir) # figure out which games to test testGames = [] for GameFilename in sorted(self.gamesAndParams.iterkeys()): GameParams = self.gamesAndParams[GameFilename] if "speedtest" not in GameParams: continue numFrames = int(GameParams["speedtest"]) # clean up the game's name GameName = GameFilename for charDelimiter in [".","-","("]: pivot = GameName.find(charDelimiter) if pivot != -1: GameName = GameName[:pivot] testGames.append((GameName, GameFilename,numFrames)) # run the tests speedResults = [ ] for (gameName, gameFilename, numFrames) in testGames: # construct the command line exepath = os.path.join(self.bindir, "mupen64plus") exeparms = [ "--corelib", os.path.join(self.bindir, "libmupen64plus.so.2") ] exeparms += [ "--testshots", ("%i" % numFrames) ] exeparms += [ "--sshotdir", self.screenshotdir ] exeparms += [ "--plugindir", self.bindir ] exeparms += [ "--datadir", os.path.join(self.bindir, "data") ] exeparms += [ "--configdir", os.path.join(self.rootdir, "config") ] exeparms += [ "--gfx", "mupen64plus-video-rice" ] exeparms += [ "--nospeedlimit", "--noosd", "--nosaveoptions" ] exeparms += [ "--audio", "dummy" ] exeparms += caseOptions exeparms += [ os.path.join(rompath, gameFilename) ] # make 3 runs, take best of them bestTime = None for i in range(3): # run it, but if it takes too long print an error and kill it testrun = RegTestRunner(exepath, exeparms) startTime = time.time() testrun.start() testrun.join(360.0) if testrun.isAlive(): report += " Error: Test run timed out after 360 seconds: '%s'\n" % " ".join(exeparms) os.kill(testrun.pid, 9) testrun.join(10.0) break endTime = time.time() thisTime = endTime - startTime if bestTime is None or thisTime < bestTime: bestTime = thisTime # save the best of 3 times speedResults.append((gameName,bestTime)) return speedResults def CheckResults(self, refdir): global report # print message warnings = 0 errors = 0 report += "\nChecking regression test results\n" # get lists of files in the reference folders refshots = { } if not os.path.exists(refdir): os.mkdir(refdir) for plugin in self.videoplugins: videoname = plugin[:plugin.find('.')] videodir = os.path.join(refdir, videoname) if not os.path.exists(videodir): os.mkdir(videodir) refshots[videoname] = [ ] else: refshots[videoname] = [ filename for filename in os.listdir(videodir) ] # get lists of files produced by current test runs newshots = { } for plugin in self.videoplugins: videoname = plugin[:plugin.find('.')] videodir = os.path.join(self.screenshotdir, videoname) if not os.path.exists(videodir): newshots[videoname] = [ ] else: newshots[videoname] = [ filename for filename in os.listdir(videodir) ] # make list of matching ref/test screenshots, and look for missing reference screenshots checklist = { } for plugin in self.videoplugins: videoname = plugin[:plugin.find('.')] checklist[videoname] = [ ] for filename in newshots[videoname]: if filename in refshots[videoname]: checklist[videoname] += [ filename ] else: report += " Warning: reference screenshot '%s/%s' missing. Copying from current test run\n" % (videoname, filename) shutil.copy(os.path.join(self.screenshotdir, videoname, filename), os.path.join(refdir, videoname)) warnings += 1 # look for missing test screenshots for plugin in self.videoplugins: videoname = plugin[:plugin.find('.')] for filename in refshots[videoname]: if filename not in newshots[videoname]: report += " Error: Test screenshot '%s/%s' missing.\n" % (videoname, filename) errors += 1 # do image comparisons for plugin in self.videoplugins: videoname = plugin[:plugin.find('.')] for filename in checklist[videoname]: refimage = os.path.join(refdir, videoname, filename) testimage = os.path.join(self.screenshotdir, videoname, filename) diffimage = os.path.join(self.screenshotdir, videoname, os.path.splitext(filename)[0] + "_DIFF.png") if videoname.find("rice") != -1: # we have to escape some characters in here for the shell escrefimage = refimage.replace("'", "\\'") esctestimage = testimage.replace("'", "\\'") escdiffimage = diffimage.replace("'", "\\'") # we do a center crop to ignore the outer 1 pixel border, because it often contains garbage in rice video cmd = ("/bin/bash", "-c", "/usr/bin/compare -metric PSNR <( /usr/bin/convert " + escrefimage + " -crop 638x478+1+1 - ) <( /usr/bin/convert " + esctestimage + " -crop 638x478+1+1 - ) " + escdiffimage) else: cmd = ("/usr/bin/compare", "-metric", "PSNR", refimage, testimage, diffimage) pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout similarity = pipe.read().strip() pipe.close() try: db = float(similarity) except: db = 0 if db > 60.0: os.unlink(diffimage) else: report += " Warning: test image '%s/%s' does not match reference. PSNR = %s\n" % (videoname, filename, similarity) warnings += 1 # give report and return report += "%i errors. %i warnings.\n" % (errors, warnings) return True def SendReport(self): global report # if there are no email addresses in the config file, then just we're done if "sendemail" not in self.generalParams: return True if len(self.generalParams["sendemail"]) < 5: return True # construct the email message header emailheader = "To: %s\n" % self.generalParams["sendemail"] emailheader += "From: Mupen64Plus-Tester@fascination.homelinux.net\n" emailheader += "Subject: %s Regression Test Results for Mupen64Plus\n" % self.thisdate emailheader += "Reply-to: do-not-reply@fascination.homelinux.net\n" emailheader += "Content-Type: text/plain; charset=UTF-8\n" emailheader += "Content-Transfer-Encoding: 8bit\n\n" # open a pipe to sendmail and dump our report try: pipe = subprocess.Popen(("/usr/sbin/sendmail", "-t"), stdin=subprocess.PIPE).stdin pipe.write(emailheader) pipe.write(report) pipe.close() except Exception, e: report += "Exception encountered when calling sendmail: '%s'\n" % e report += "Email header:\n%s\n" % emailheader return False return True def ArchiveResults(self, archivedir): global report # create archive dir if it doesn't exist if not os.path.exists(archivedir): os.mkdir(archivedir) # move the images into a subdirectory of 'archive' given by date subdir = os.path.join(archivedir, self.thisdate) if os.path.exists(subdir): if not deltree(subdir): return False if os.path.exists(self.screenshotdir): shutil.move(self.screenshotdir, subdir) # copy the report into the archive directory f = open(os.path.join(archivedir, "report_%s.txt" % self.thisdate), "w") f.write(report) f.close() # archival is complete return True class RegTestRunner(Thread): def __init__(self, exepath, exeparms): self.exepath = exepath self.exeparms = exeparms self.pid = 0 self.returnval = None Thread.__init__(self) def run(self): # start the process testprocess = subprocess.Popen([self.exepath] + self.exeparms) # get the PID of the new test process self.pid = testprocess.pid # wait for the test to complete self.returnval = testprocess.wait() #****************************************************************************** # Generic helper functions # def deltree(dirname): global report if not os.path.exists(dirname): return True try: for path in (os.path.join(dirname, filename) for filename in os.listdir(dirname)): if os.path.isdir(path): if not deltree(path): return False else: os.unlink(path) os.rmdir(dirname) except Exception, e: report += "Error in deltree(): %s\n" % e return False return True def copytree(srcpath, dstpath): if not os.path.isdir(srcpath) or not os.path.isdir(dstpath): return False for filename in os.listdir(srcpath): filepath = os.path.join(srcpath, filename) if os.path.isdir(filepath): subdstpath = os.path.join(dstpath, filename) if not os.path.exists(subdstpath): os.mkdir(subdstpath) copytree(filepath, subdstpath) else: dstfile = os.path.join(dstpath, filename) if os.path.exists(dstfile): os.unlink(dstfile) shutil.copy(filepath, dstpath) return True #****************************************************************************** # main function call for standard script execution # if __name__ == "__main__": # parse the command-line arguments parser = OptionParser() parser.add_option("-g", "--nogit", dest="nogit", default=False, action="store_true", help="Assume source code is present; don't check out latest from Git") parser.add_option("-b", "--nobuild", dest="nobuild", default=False, action="store_true", help="Do not run build tests") parser.add_option("-s", "--nospeed", dest="nospeed", default=False, action="store_true", help="Do not run speed regression test suite") parser.add_option("-v", "--novidcheck", dest="novidcheck", default=False, action="store_true", help="Do not run video screenshot comparison tests") parser.add_option("-e", "--noemail", dest="noemail", default=False, action="store_true", help="don't send email or archive results") parser.add_option("-t", "--testpath", dest="testpath", help="Set root of testing directory to PATH", metavar="PATH") parser.add_option("-c", "--cfgfile", dest="cfgfile", default="daily-tests.cfg", help="Use regression test config file FILE", metavar="FILE") (opts, args) = parser.parse_args() # check test path if opts.testpath is None: # change directory to the directory containing this script and set root test path to "." scriptdir = os.path.dirname(sys.argv[0]) os.chdir(scriptdir) rootdir = "." else: rootdir = opts.testpath # call the main function rval = main(rootdir, opts.cfgfile, opts.nogit, opts.nobuild, opts.nospeed, opts.novidcheck, opts.noemail) sys.exit(rval) mupen64plus-core-src-2.5/tools/savestate_convert.c000066400000000000000000000256771251723631200223630ustar00rootroot00000000000000/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - savestate_convert.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2008 Richard Goedeken * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include #include /* savestate file header: magic number and version number */ const char *savestate_magic = "M64+SAVE"; const int savestate_newest_version = 0x00010000; // 1.0 /* Data field lengths */ #define SIZE_REG_RDRAM 40 #define SIZE_REG_MIPS 36 #define SIZE_REG_PI 52 #define SIZE_REG_SP 52 #define SIZE_REG_RSP 8 #define SIZE_REG_SI 16 #define SIZE_REG_VI 60 #define SIZE_REG_RI 32 #define SIZE_REG_AI 40 #define SIZE_REG_DPC 48 #define SIZE_REG_DPS 16 #define SIZE_FLASHRAM_INFO 24 #define SIZE_TLB_ENTRY 52 #define SIZE_MAX_EVENTQUEUE 1024 /* Arrays and pointers for savestate data */ char rom_md5[32]; char rdram_register[SIZE_REG_RDRAM]; char mips_register[SIZE_REG_MIPS]; char pi_register[SIZE_REG_PI]; char sp_register[SIZE_REG_SP]; char rsp_register[SIZE_REG_RSP]; char si_register[SIZE_REG_SI]; char vi_register[SIZE_REG_VI]; char ri_register[SIZE_REG_RI]; char ai_register[SIZE_REG_AI]; char dpc_register[SIZE_REG_DPC]; char dps_register[SIZE_REG_DPS]; char *rdram; /* 0x800000 bytes */ char SP_DMEM[0x1000]; char SP_IMEM[0x1000]; char PIF_RAM[0x40]; char flashram[SIZE_FLASHRAM_INFO]; char *tlb_LUT_r; /* 0x400000 bytes */ char *tlb_LUT_w; /* 0x400000 bytes */ char llbit[4]; char reg[32][8]; char reg_cop0[32][4]; char lo[8]; char hi[8]; char reg_cop1_fgr_64[32][8]; char FCR0[4]; char FCR31[4]; char tlb_e[32][SIZE_TLB_ENTRY]; char PCaddr[4]; char next_interupt[4]; char next_vi[4]; char vi_field[4]; char eventqueue[SIZE_MAX_EVENTQUEUE]; /* savestate data parameters calculated from file contents */ int queuelength = 0; /* Forward declarations for functions */ void printhelp(const char *progname); int allocate_memory(void); void free_memory(void); int load_original_mupen64(const char *filename); int save_newest(const char *filename); /* Main Function - parse arguments, check version, load state file, overwrite state file with new one */ int main(int argc, char *argv[]) { FILE *pfTest; gzFile f; char *filename; char magictag[8]; unsigned char inbuf[4]; int (*load_function)(const char *) = NULL; int iVersion; /* start by parsing the command-line arguments */ if (argc != 2 || strncmp(argv[1], "-h", 2) == 0 || strncmp(argv[1], "--help", 6) == 0) { printhelp(argv[0]); return 1; } filename = argv[1]; pfTest = fopen(filename, "rb"); if (pfTest == NULL) { printf("Error: cannot open savestate file '%s' for reading.\n", filename); return 2; } fclose(pfTest); /* try to determine the version of this savestate file */ f = gzopen(filename, "rb"); if (f == NULL) { printf("Error: state file '%s' is corrupt\n", filename); return 3; } if (gzread(f, magictag, 8) != 8 || gzread(f, inbuf, 4) != 4) { printf("Error: state file '%s' is corrupt: end of savestate file while reading header.\n", filename); gzclose(f); return 4; } gzclose(f); iVersion = inbuf[0]; iVersion = (iVersion << 8) | inbuf[1]; iVersion = (iVersion << 8) | inbuf[2]; iVersion = (iVersion << 8) | inbuf[3]; /* determine which type of savestate file to load, based on savestate version */ if (strncmp(magictag, savestate_magic, 8) != 0) { printf("Warning: old savestate file format. This is presumed to be from the original Mupen64 or Mupen64Plus version 1.4 or earlier.\n"); load_function = load_original_mupen64; } else if (iVersion == savestate_newest_version) { printf("This savestate file is already up to date (version %08x)\n", savestate_newest_version); return 0; } else { printf("This savestate file uses an unknown version (%08x)\n", iVersion); return 5; } /* allocate memory for savestate data */ if (allocate_memory() != 0) { printf("Error: couldn't allocate memory for savestate data storage.\n"); return 6; } /* load the savestate file */ if (load_function(filename) != 0) { free_memory(); return 7; } /* write new updated savestate file */ if (save_newest(filename) != 0) { free_memory(); return 8; } /* free the memory and return */ printf("Savestate file '%s' successfully converted to latest version (%08x).\n", filename, savestate_newest_version); free_memory(); return 0; } void printhelp(const char *progname) { printf("%s - convert older Mupen64Plus savestate files to most recent version.\n\n", progname); printf("Usage: %s [-h] [--help] \n\n", progname); printf(" -h, --help: display this message\n"); printf(" : full path to savestate file which will be overwritten with latest version.\n"); } int allocate_memory(void) { rdram = malloc(0x800000); if (rdram == NULL) return 1; tlb_LUT_r = malloc(0x400000); if (tlb_LUT_r == NULL) { free_memory(); return 2; } tlb_LUT_w = malloc(0x400000); if (tlb_LUT_w == NULL) { free_memory(); return 3; } return 0; } void free_memory(void) { if (rdram != NULL) { free(rdram); rdram = NULL; } if (tlb_LUT_r != NULL) { free(tlb_LUT_r); tlb_LUT_r = NULL; } if (tlb_LUT_w != NULL) { free(tlb_LUT_w); tlb_LUT_w = NULL; } } /* State Loading Functions */ int load_original_mupen64(const char *filename) { char buffer[4]; int i; gzFile f; f = gzopen(filename, "rb"); if (f == NULL) { printf("Error: savestate file '%s' is corrupt.\n", filename); return 1; } gzread(f, rom_md5, 32); gzread(f, rdram_register, SIZE_REG_RDRAM); gzread(f, mips_register, SIZE_REG_MIPS); gzread(f, pi_register, SIZE_REG_PI); gzread(f, sp_register, SIZE_REG_SP); gzread(f, rsp_register, SIZE_REG_RSP); gzread(f, si_register, SIZE_REG_SI); gzread(f, vi_register, SIZE_REG_VI); gzread(f, ri_register, SIZE_REG_RI); gzread(f, ai_register, SIZE_REG_AI); gzread(f, dpc_register, SIZE_REG_DPC); gzread(f, dps_register, SIZE_REG_DPS); gzread(f, rdram, 0x800000); gzread(f, SP_DMEM, 0x1000); gzread(f, SP_IMEM, 0x1000); gzread(f, PIF_RAM, 0x40); gzread(f, flashram, SIZE_FLASHRAM_INFO); memset(tlb_LUT_r, 0, 0x400000); memset(tlb_LUT_w, 0, 0x400000); gzread(f, tlb_LUT_r, 0x100000); gzread(f, tlb_LUT_w, 0x100000); gzread(f, llbit, 4); gzread(f, reg, 32*8); for (i = 0; i < 32; i++) { gzread(f, reg_cop0[i], 4); gzread(f, buffer, 4); /* for compatibility with older versions. */ } gzread(f, lo, 8); gzread(f, hi, 8); gzread(f, reg_cop1_fgr_64[0], 32 * 8); gzread(f, FCR0, 4); gzread(f, FCR31, 4); gzread(f, tlb_e[0], 32 * SIZE_TLB_ENTRY); gzread(f, PCaddr, 4); gzread(f, next_interupt, 4); gzread(f, next_vi, 4); gzread(f, vi_field, 4); queuelength = 0; while(queuelength < SIZE_MAX_EVENTQUEUE) { if (gzread(f, eventqueue + queuelength, 4) != 4) { printf("Error: savestate file '%s' is corrupt.\n", filename); return 2; } if (*((unsigned int*) &eventqueue[queuelength]) == 0xFFFFFFFF) { queuelength += 4; break; } gzread(f, eventqueue + queuelength + 4, 4); queuelength += 8; } if (queuelength >= SIZE_MAX_EVENTQUEUE) { printf("Error: savestate file '%s' has event queue larger than %i bytes.\n", filename, SIZE_MAX_EVENTQUEUE); return 3; } gzclose(f); return 0; } /* State Saving Functions */ int save_newest(const char *filename) { unsigned char outbuf[4]; gzFile f; f = gzopen(filename, "wb"); /* write magic number */ gzwrite(f, savestate_magic, 8); /* write savestate file version in big-endian */ outbuf[0] = (savestate_newest_version >> 24) & 0xff; outbuf[1] = (savestate_newest_version >> 16) & 0xff; outbuf[2] = (savestate_newest_version >> 8) & 0xff; outbuf[3] = (savestate_newest_version >> 0) & 0xff; gzwrite(f, outbuf, 4); gzwrite(f, rom_md5, 32); gzwrite(f, rdram_register, SIZE_REG_RDRAM); gzwrite(f, mips_register, SIZE_REG_MIPS); gzwrite(f, pi_register, SIZE_REG_PI); gzwrite(f, sp_register, SIZE_REG_SP); gzwrite(f, rsp_register, SIZE_REG_RSP); gzwrite(f, si_register, SIZE_REG_SI); gzwrite(f, vi_register, SIZE_REG_VI); gzwrite(f, ri_register, SIZE_REG_RI); gzwrite(f, ai_register, SIZE_REG_AI); gzwrite(f, dpc_register, SIZE_REG_DPC); gzwrite(f, dps_register, SIZE_REG_DPS); gzwrite(f, rdram, 0x800000); gzwrite(f, SP_DMEM, 0x1000); gzwrite(f, SP_IMEM, 0x1000); gzwrite(f, PIF_RAM, 0x40); gzwrite(f, flashram, SIZE_FLASHRAM_INFO); gzwrite(f, tlb_LUT_r, 0x400000); gzwrite(f, tlb_LUT_w, 0x400000); gzwrite(f, llbit, 4); gzwrite(f, reg[0], 32*8); gzwrite(f, reg_cop0[0], 32*4); gzwrite(f, lo, 8); gzwrite(f, hi, 8); gzwrite(f, reg_cop1_fgr_64[0], 32*8); gzwrite(f, FCR0, 4); gzwrite(f, FCR31, 4); gzwrite(f, tlb_e[0], 32 * SIZE_TLB_ENTRY); gzwrite(f, PCaddr, 4); gzwrite(f, next_interupt, 4); gzwrite(f, next_vi, 4); gzwrite(f, vi_field, 4); gzwrite(f, eventqueue, queuelength); gzclose(f); return 0; } mupen64plus-core-src-2.5/tools/savestate_convert.txt000066400000000000000000000027451251723631200227470ustar00rootroot00000000000000============================================================================== savestate_convert.txt - Mupen64Plus - July 12th, 2008 This conversion tool was written to help users migrate their savestate files when there are changes to the savestate file format which break backward compatibility. To compile the conversion tool, open a console window, go to the root of your Mupen64Plus source code, and type: gcc -o savestate_convert -lz tools/savestate_convert.c This will create a small command-line application called 'savestate_convert'. This program takes only one command-line parameter, which is a path to the savestate file that you want to update. The old savestate file will be overwritten with the new one, so you may wish to first make a backup copy of the savestate file. If you update a savestate file to a newer version, older versions of Mupen64Plus will not be able to load it. If you wish to update all of the savestate files in your home directory, you may do so with the following bash command: for file in ~/.mupen64plus/save/*.st*; do ./savestate_convert "${file}"; done ============================================================================== Savestate File Format History: version 0: - Original (Unversioned) file format - used by Mupen64 v0.5 and Mupen64Plus up to v1.4 version 1.0: - bugfix: TLB was not being entirely saved and restored - added small header with magic number and version number - introduced in rev 758 of Mupen64Plus SVN repository (trunk) mupen64plus-core-src-2.5/tools/uninstall_binary_bundle.sh000077500000000000000000000112671251723631200237130ustar00rootroot00000000000000#!/bin/sh # # mupen64plus binary bundle uninstall script # # Copyright 2007-2014 The Mupen64Plus Development Team # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # set -e export PATH=/bin:/usr/bin usage() { printf "usage: $(basename $0) [PREFIX] [SHAREDIR] [BINDIR] [LIBDIR] [PLUGINDIR] [MANDIR] \tPREFIX - installation directories prefix (default: /usr/local) \tSHAREDIR - path to Mupen64Plus shared data files (default: \$PREFIX/share/mupen64plus) \tBINDIR - path to Mupen64Plus binary program files (default: \$PREFIX/bin) \tLIBDIR - path to Mupen64Plus core library (default: \$PREFIX/lib) \tPLUGINDIR - path to Mupen64Plus plugin libraries (default: \$PREFIX/lib/mupen64plus) \tMANDIR - path to manual files (default: \$PREFIX/man) \tAPPSDIR - path to install desktop file (default: \$PREFIX/share/applications) \tICONSDIR - path to install icon files (default: \$PREFIX/share/icons/hicolor) " } if [ $# -gt 8 ]; then usage exit 1 fi PREFIX="${1:-/usr/local}" SHAREDIR="${2:-${PREFIX}/share/mupen64plus}" BINDIR="${3:-${PREFIX}/bin}" LIBDIR="${4:-${PREFIX}/lib}" PLUGINDIR="${5:-${PREFIX}/lib/mupen64plus}" MANDIR="${6:-${PREFIX}/share/man}" APPSDIR="${7:-${PREFIX}/share/applications}" ICONSDIR="${8:-${PREFIX}/share/icons/hicolor}" # simple check for some permissions if [ -d "${SHAREDIR}" -a ! -w "${SHAREDIR}" ]; then printf "Error: you do not have permission to uninstall from: ${SHAREDIR}\nMaybe you need to be root?\n" exit 1 fi if [ -d "${BINDIR}" -a ! -w "${BINDIR}" ]; then printf "Error: you do not have permission to uninstall from: ${BINDIR}\nMaybe you need to be root?\n" exit 1 fi if [ -d "${LIBDIR}" -a ! -w "${LIBDIR}" ]; then printf "Error: you do not have permission to uninstall from: ${LIBDIR}\nMaybe you need to be root?\n" exit 1 fi if [ -d "${PLUGINDIR}" -a ! -w "${PLUGINDIR}" ]; then printf "Error: you do not have permission to uninstall from: ${PLUGINDIR}\nMaybe you need to be root?\n" exit 1 fi if [ -d "${MANDIR}" -a ! -w "${MANDIR}" ]; then printf "Error: you do not have permission to uninstall from: ${MANDIR}\nMaybe you need to be root?\n" exit 1 fi if [ -d "${APPSDIR}" -a ! -w "${APPSDIR}" ]; then printf "Error: you do not have permission to install at: ${APPSDIR}\nMaybe you need to be root?\n" exit 1 fi if [ -d "${ICONSDIR}" -a ! -w "${ICONSDIR}" ]; then printf "Error: you do not have permission to install at: ${ICONSDIR}\nMaybe you need to be root?\n" exit 1 fi printf "Uninstalling Mupen64Plus Binary Bundle from ${PREFIX}\n" # Mupen64Plus-Core rm -f "${LIBDIR}"/libmupen64plus.so* /sbin/ldconfig rm -f "${SHAREDIR}/font.ttf" rm -f "${SHAREDIR}/mupencheat.txt" rm -f "${SHAREDIR}/mupen64plus.ini" rm -f "${SHAREDIR}"/doc/* # Mupen64Plus-ROM rm -f "${SHAREDIR}/m64p_test_rom.v64" # Mupen64Plus-UI-Console rm -f "${BINDIR}/mupen64plus" rm -f "${MANDIR}/man6/mupen64plus.6" rm -f "${APPSDIR}/mupen64plus.desktop" rm -f "${ICONSDIR}/48x48/apps/mupen64plus.png" rm -f "${ICONSDIR}/scalable/apps/mupen64plus.svg" # Plugins rm -f "${PLUGINDIR}/mupen64plus-audio-sdl.so" rm -f "${PLUGINDIR}/mupen64plus-input-sdl.so" rm -f "${PLUGINDIR}/mupen64plus-rsp-hle.so" rm -f "${PLUGINDIR}/mupen64plus-video-rice.so" rm -f "${PLUGINDIR}/mupen64plus-video-glide64mk2.so" rm -f "${SHAREDIR}/RiceVideoLinux.ini" rm -f "${SHAREDIR}/InputAutoCfg.ini" rm -f "${SHAREDIR}/Glide64mk2.ini" # get rid of the empty dirs # ignore directories if they are really symbolic links [ ! -L "${SHAREDIR}/doc" ] && rmdir --ignore-fail-on-non-empty "${SHAREDIR}/doc" [ ! -L "${SHAREDIR}" ] && rmdir --ignore-fail-on-non-empty "${SHAREDIR}" [ ! -L "${BINDIR}" ] && rmdir --ignore-fail-on-non-empty "${BINDIR}" [ ! -L "${LIBDIR}" ] && rmdir --ignore-fail-on-non-empty "${LIBDIR}" [ ! -L "${PLUGINDIR}" ] && rmdir --ignore-fail-on-non-empty "${PLUGINDIR}" [ ! -L "${MANDIR}/man6" ] && rmdir --ignore-fail-on-non-empty "${MANDIR}/man6" [ ! -L "${MANDIR}" ] && rmdir --ignore-fail-on-non-empty "${MANDIR}" [ ! -L "${APPSDIR}" ] && rmdir --ignore-fail-on-non-empty "${APPSDIR}" [ ! -L "${ICONSDIR}" ] && rmdir --ignore-fail-on-non-empty "${ICONSDIR}" printf "Uninstall successful.\n"