iNES
version 4.9

by Marat Fayzullin

Contents

Disclaimers

New in This Version

Introduction

iNES is a portable emulator of the Nintendo Entertainment System (aka Famicom in Korea and Japan, Dendy in Russia). It runs most NES/Famicom games and supports such esoteric devices as GameGenie, Family BASIC keyboard, Famicom Disk System, and VS-System coin-op arcade. The original idea of iNES belongs to Alex Krasivsky, who found the first pieces of information about NES hardware and wrote the initial code, although nothing remains of that code today. You can always get latest iNES news, binaries, and support files from

http://fms.komkon.org/iNES/

Following is a list of features iNES supports:

iNES Ports

Because iNES is a very portable program, it can run on many different platforms: Windows, Android, Linux, Unix, MacOS, MSDOS, Symbian, PocketPC, etc. The complete up-to-date list of iNES ports is available at the iNES distribution site. Following are the major ports:

iNES-Android

The Android version of iNES is available from Google Play:

https://play.google.com/store/apps/details?id=com.fms.ng

Once you download a copy, you should be able to use it on as many Android devices as you own, as long as they are all linked to the same Google Play account. Make sure to enable automatic updates, as iNES-Android updates often. The Android version comes with many additional features, such as Cheatopedia with cheat codes for many popular games, State Exchange letting iNES users exchange saved games, the Box Art Downloader, improved Network Play functionality, and more.

iNES-Windows

The iNES-Windows is now free for everyone to use and share. It can be downloaded from the iNES homepage:

http://fms.komkon.org/iNES/

For more information, take a look at my other products for Windows:

http://fms.komkon.org/EmuWindows/

As I have made iNES-Windows free, it is no longer being sold via eSellerate. Existing users should go to the above site and download a fresh copy. If you wish to support my work on iNES-Windows and other emulators, please consider buying iNES-Android.

iNES-Unix and iNES-Linux

iNES-Unix and iNES-Linux are available freely in binary form from the iNES homepage:

http://fms.komkon.org/iNES/

I am always trying to compile it on as many different Unix and Linux flavors as I have handy at the moment.

iNES-Maemo and iNES-Meego

The iNES-Maemo works on Nokia devices running Maemo or Meego OS. It is specifically optimized for Maemo platform and available for free from respective package repositories and iNES homepage. As both Maemo and Meego platforms are dead, I am no longer developing for them though.

iNES-MSDOS

I am no longer developing and supporting iNES-MSDOS, as the MSDOS platform is completely dead nowadays. Older iNES-MSDOS versions were sold as part of the iNES-Windows package (now free), compiled with OpenWatcom C++, and used DOS4GW 32bit DOS extender and VESA screen drivers.

iNES-Symbian

The iNES-Symbian port worked on phones running the 3rd Edition of the Nokia S60 software. It is no longer being developed and supported, as Symbian and all its development tools are dead. You can still access some of my Symbian products at this address though:

http://fms.komkon.org/EmuSymbian/

iNES-PocketPC

The PocketPC version of iNES has long been developed by Aaron Oneal. As PocketPC is long dead though, iNES-PocketPC is dead as well. You can still get older PocketPC versions of iNES and my other emulators from

http://fms.komkon.org/MorphGear/

Registered Users

If you've registered iNES-Windows, please do not give your copy to anybody. And I do mean anybody. There were cases when registered users gave iNES away to their friends, relatives, or just some shady characters on the Net, and then I found it pirated, put onto the Web, and even posted to USENET newsgroups. If I find your personalized copy of iNES being spread around, your registration gets automatically cancelled which means no support and no more updates.

I understand that the previous paragraph may sound threatening to some people, but this kind of piracy really hurts my profits and feelings. I've put a lot of effort into iNES, and can only continue working on it if people do not try to cheat on me.

It may also be a good idea to buy a real cartridge for each NES ROM image you use with the emulator. NES software is copyrighted, but as long as you own the real cartridge, you should be protected by the law allowing customers to backup bought software.

What is Included

Following files are included into the distribution:

  ines           - iNES executable file (Unix, ines -help for options)
  ines.exe       - iNES executable file (Windows)
  ines-dos.exe   - iNES executable file (MSDOS, ines-dos.exe -help for options)
  iNES.html      - This documentation
  CART.NES       - Sample ROM image
  Old-iNES.pal   - Palette file with standard (old) iNES colors.
  Covell.pal     - Palette file with NES colors as measured by Chris Covell.
  FCEU.pal       - Palette file used by the FCE Ultra emulator.
  RP2C04-001.pal - VS System palette used in the RP2C04-001 chips.
  RP2C04-002.pal - VS System palette used in the RP2C04-002 chips.
  RP2C04-003.pal - VS System palette used in the RP2C04-003 chips.
  RP2C05-004.pal - VS System palette used in the RP2C05-004 chips.

What is Not Included

Absolutely no ROM images of NES games are included. NES games are still copyrighted by the companies who produced them, and therefore, I can not distribute any of them. I'm also unable to tell you where to find these games, so do not send me email asking for them. You will have to look for them on your own.

Buttons

When using FamilyBASIC keyboard, press [CONTROL]+[KEY] to access a special function of a [KEY] if it also performs a keyboard function.

  [ALT]          - Hold to switch to the second controller
  [SPACE]        - FIRE-A button (also: [SHIFT],A,S,D,F,G,H,J,K,L,Q,E,T,U,O)
  [CONTROL]      - FIRE-B button (also: Z,X,C,V,B,N,M,W,R,Y,I,P)
  [TAB]          - SELECT button
  [ENTER]        - START button
  [BACKSPC]      - Insert VS System coin
                   Flip DiskSystem floppy
  [PGUP]         - Fast-forward emulation (also: [F9])
  [ESC]          - Quit emulation (also: [F12])
  [F2]           - Toggle soundtrack log on/off
  [F3]           - Toggle FIRE-A autofire on/off
  [F4]           - Toggle FIRE-B autofire on/off
  [F5]           - Invoke builtin menu
  [F6]           - Load emulation state
  [F7]           - Save emulation state
  [F8]           - Replay recorded gameplay
  [F9]           - Fast-forward emulation (also: [PGUP])
  [F11]          - Reset NES
  [F12]          - Quit emulation (also: [ESC])
  [Q,W,E,R,A,S,D,F,Z,X,C,V] - PowerPad buttons (upside)
  [U,I,O,P,H,J,K,L,B,N,M,,] - PowerPad buttons (downside)
  [ALT]+[PGUP]   - Increase audio volume
  [ALT]+[PGDOWN] - Decrease audio volume

  When compiled with #define DEBUG:
  [F1]           - Go into built-in debugger

  When compiled with #define WINDOWS:
  [ALT]+[ENTER]  - Switch between full screen and windowed modes.

  When compiled with #define GIFLIB:
  [F10]          - Make a screen snapshot (SNAPxxxx.GIF)

Command Line Options

  -verbose <level>    - Select debugging messages [5]
                         0 - Silent             1 - Startup messages
                         2 - Illegal accesses   4 - Illegal CPU ops
                         8 - Bank switching    16 - DiskSystem
                        32 - PPU accesses
  -skip <percent>     - Percentage of frames to skip [25]
  -help               - Print this help page
  -cheat <code>       - Activate a GameGenie or Pro Action Replay cheat
  -autoa/-noautoa     - Autofire/No autofire for button A [-noautoa]
  -autob/-noautob     - Autofire/No autofire for button B [-noautob]
  -pal/-ntsc          - Show 240 or 224 lines [automatic]
  -rkbd/-jkbd/-nokbd  - FBASIC3R, FBASIC2J, or no keyboard [-nokbd]
  -gun                - Emulate light gun [off]
  -ppad               - Emulate PowerPad [off]
  -paddle/-jpaddle    - Emulate US/Japanese paddle [off]
  -allspr             - Show all sprites, ignore hardware limit [off]
  -dip <hexbyte>      - Set VS System DIP switches [$00]
  -palette <filename> - Load default palette from a file [automatic]
  -logsnd <filename>  - Write soundtrack to a MIDI file [LOG.MID]
  -sync <frequency>   - Sync screen updates to <frequency> [60]
  -nosync             - Do not sync screen updates
  -tv/-lcd/-raster    - Simulate TV scanlines or LCD raster [off]
  -soft/-eagle        - Scale display with 2xSaI or EAGLE [off]
  -epx/-scale2x       - Scale display with EPX or Scale2X [off]
  -cmy/-rgb           - Simulate CMY/RGB pixel raster [off]
  -mono/-sepia        - Simulate monochrome or sepia CRT [off]
  -green/-amber       - Simulate green or amber CRT [off]
  -4x3                - Force 4:3 television screen ratio [off]
  -sound [<quality>]  - Sound emulation quality (Hz) [22050]
  -nosound            - Disable sound emulation

  When compiled with #define DEBUG:
  -trap <address>     - Trap execution when PC reaches address [FFFFh]
                        When a keyword 'now' is used in place of the
                        <address>, execution will trap immediately.

  When compiled with #define UNIX or #define MAEMO:
  -shm/-noshm         - Use/don't use MIT SHM extensions for X [-shm]
  -saver/-nosaver     - Save/don't save CPU when inactive [-saver]
  -scale <factor>     - Scale window by <factor> [2]

  When compiled with #define MSDOS:
  -vsync              - Sync screen updates to VGA VBlanks [-vsync]
  -480/-200           - Use 640x480/320x200 VGA screen mode [-200]

Frequently Asked Questions

  1. I WANNA PLAY GAMES!!!! WHERE DO I GET GAMES???????

    I do not know. I can't give you any due to both legal and moral reasons. Please, do not mail me asking for games. I will delete your mail right away, and you won't get an answer.

  2. How do I copy games from cartridges to a computer?

    You can use a special device called cartridge copier.

  3. What is NES? How its hardware works?

    Nintendo Entertainment System (NES), known as Famicom in Asia, is an old videogame console produced by Nintendo that was very popular in the eighties and nineties. It is built around a 6502 CPU. You can find details on the NES architecture at

    http://fms.komkon.org/EMUL8/

  4. There is no version of iNES for my Unix!

    I am trying to compile Unix binaries for as many flavors of Unix as possible, but as I do not have access to many machines, do not expect immediate support for every Unix flavor out there. Don't mail me asking for the source either: iNES source code is not publicly distrbutable, as much as I regret to say this.

  5. My favorite game doesn't work on iNES. What do I do?

    There may be several reasons why a game has problems running on iNES or does not run at all.

  6. What are .NES files? Do you have the format description?

    .NES files are used to store ROM images of NES cartridges. As NES carts may contain separate ROM, VROM, and other circuitry, it has been necessary to make a special file format for them. The complete description of the .NES file format can be obtained from the NES Hardware Architecture document at

    http://fms.komkon.org/EMUL8/

  7. What are .FDS files? Do you have the format description?

    .FDS files are used to store Famicom DiskSystem disk images. Each disk has two sides and each side stores 65000 bytes of data. An .FDS file contains concatenated images of these sides, first for side A, then for side B. It may contain images of multiple disks, stored one after another. There are no headers or other information, just 65000-byte chunks of data.

  8. How do I use DiskSystem emulation in iNES?

    First of all, you need to have a file called DISKSYS.ROM in your current directory. This file should contain the DiskSystem BIOS of 8192 bytes in size.

    To run a program from an .FDS file, open it as you would open any normal .NES file. iNES will start with the disk "removed" from the "drive". To insert the disk, press [BACKSPACE] and release it. The boot-up sequence will start. Every time the program asks you to change the disk side or put a next disk, press and release [BACKSPACE]: this will simulate disk removal/insertion and also switch iNES to the next chunk of data from the .FDS file. To skip to a certain disk (or side), press [BACKSPACE] multiple times.

  9. What is NESLIST?

    NESLIST is a small utility which will list, verify, and possibly fix NES ROM images for you. It is highly recommended to all iNES users and has been a part of the iNES distribution for a long time. It is now distributed as a part of the EMUTools package.

  10. What is EMUTools package and where can I get it?

    EMUTools is a set of utilities which may be useful for both emulator authors and users. They allow to list and verify diferent ROM images, convert music files, disassemble and compare ROMs. EMUTools can be obtained from

    http://fms.komkon.org/EMUL8/

  11. Do I need to unpack GZIPped ROM images to run them on iNES?

    No, unless your copy of iNES has been compiled without ZLib library. Most iNES ports are compiled with this library. ZLib allows iNES to recognize and automatically unpack GZIPped and singular PKZIPped files. To find out whether your copy of iNES supports this feature, run it with the -help option and see if its says anything about GZIP support.

  12. When starting iNES-Unix, ld says that libz library isn't found.

    Most iNES-Unix binaries are compiled with ZLib library to make them recognize and unpack GZIPped files. This option requires ZLib library which can be obtained from

    http://www.zlib.net/

  13. When starting iNES-Unix, ld says that some library isn't found.

    This may happen if the versions of your shared libraries are older than the ones for which iNES has been compiled. A decent way to deal with this is to upgrade your Unix. A quick and dirty way is to make a symbolic link from the existing library to a name required by iNES.

  14. When starting iNES-Unix, I get X_ShmAttach error.

    You are probably trying to run iNES-Unix on a remote Xterminal while it attempts to use shared memory for interfacing with X. Use the -noshm option to tell it not to use shared memory.

  15. When starting iNES-Unix, I get X_PutImage error.

    iNES-Unix version currently needs 8bit, 16bit, or 32bit X. Neither 2-color nor 16-color Xterminals will work. 24bit Xterminals may work, but don't count on it.

  16. When starting iNES-Unix, the window stays black.

    Some other X application took over all available colors so that the emulation could not allocate any for itself. Check if you run XV, Netscape, or something similar.

  17. The sound is distorted in the iNES-Windows. How do I fix it?

    The wave-synthetized sound in iNES may become distorted on slow or highly loaded machines (no graphics acceleration, for example). There are several ways you can improve sound:

  18. How do I save and load emulation state during the game?

    The machine state can be saved by pressing [F7] button and loaded using [F6]. The resulting data file will have the same name as your .NES file, but its extension is going to be .STA. This state file will be loaded automatically next time you start iNES. The same state file is not guaranteed to work for versions of iNES running on a different hardware.

  19. What are those weird Fxxx and SMxxx files?

    Those are most likely files produced by the Front Far East copier. Each such file has a 512-byte header (which you need to get rid of), an optional 512-byte trainer (which you probably want to retain), a ROM, and an optional VROM, all stuck together into a single file. Simply cut off the FFE header, add a .NES header, and modify it to reflect the correct number of pages, mapper type, etc.

    It is necessary to note that even those FFE ROM images which do not have a trainer were very often modified to work with the FFE copier. Although iNES has support for several types of FFE images, it is strongly recommended that you only use clean, unhacked ROM images backed directly from the cartridges you own, instead of FFE images.

  20. What are the interleaved NES ROM images?

    Interleaved NES ROM image is a file which contains the ROM data in each even byte, and the VROM data in each odd byte. You will have to write a program to separate such file into ROM and VROM, and then glue them together with a .NES header to produce the .NES file.

  21. What is that "Mirroring" flag?

    In the real NES/Famicom cartridges, either A10 or A11 line of the address bus can be connected to VRAM. Depending on it, video memory may either contain two screens at addresses $2000/$2400 mirrored at $2800/$2C00 (Vertical Mirroring), or two screens at $2000/$2800 mirrored at $2400/$2C00 (Horizontal Mirroring).

    The games which only use one screen do not care about the mirroring. The games using two screens require an appropriate mirroring though. Be aware that many bank switches allow to switch mirroring from the program. Other cartridges contain additional VRAM and have both A10 and A11 lines connected. Mirroring has no meaning for such cartridges.

  22. What is the "512-byte Trainer"?

    The 512-byte trainer mentioned before is something implemented in the Front Far East copier for the NES. When this trainer is present (its code precedes the ROM contents in the .NES file), it is loaded into $7000-$71FF, and then control is passed to it at some points of the program execution.

History

New in iNES 4.8

New in iNES 4.7

New in iNES 4.6

New in iNES 4.5

New in iNES 4.4

New in iNES 4.3

New in iNES 4.2

New in iNES 3.6

New in iNES 3.5

New in iNES 3.4

New in iNES 3.3

New in iNES 3.2

New in iNES 3.1

New in iNES 3.0

New in iNES 2.3

New in iNES 2.3

New in iNES 2.1

New in iNES 2.0

New in iNES 1.3

New in iNES 1.2

New in iNES 1.0

New in iNES 0.7


© Copyright by Marat Fayzullin (marat [at] komkon /dot/ org)