iNES
version 3.0
Contents
Disclaimers
- Nintendo Entertainment System (NES), Famicom, Famicom Disk System
and Dandy are all registered trademarks of Nintendo.
- GameGenie is a registered trademark of Galoob.
- The author is in no way affiliated with Nintendo.
- The author is in no way affiliated with any pirate group out there.
- The author cannot and will not provide you with
any NES or Famicom games.
- The author cannot be held responsible for anything this program
will do to your computer, brains, free time, housemates, pets, or
family members.
New in This Version
- Extended .NES file specification with a flag for PAL cartridges.
See my NES
Architecture Document for details. iNES now allows to
force PAL (
-pal
), NTSC (-ntsc
), or
select the mode automatically by the cartridge header.
- When you buy iNES-Windows, you now also get iNES-MSDOS.
- Added DirectDraw-based full screen mode to iNES-Windows.
Press [ALT]+[ENTER] to switch in and out of the full screen mode.
Use it with caution, as DirectDraw is notoriously unstable.
- Added support for mapper 13 (CPROM).
- Added support for mappers 79 (Nina-3) and 81 (Nina-6).
- Fixed mapper 25 (VRC4B) to allow writing to cartridge RAM.
- Fixed a minor bug (typo) in the screen driver, thanks to Aaron Oneal.
- Added fast-forwarding option ([F9], also [PGUP] in Windows and Unix).
- Fixed incorrect label on the "Sync to..." slider in iNES-Windows.
- Raised the maximal "Sync to..." frequency to 80Hz.
- Window size and position are now saved on exit in iNES-Windows.
History
New in iNES 2.3
- Switched to the latest version of the OpenWatcom C/C++ compiler.
- The infamous Windows problem with spaces in directory names seems
to be fixed by using a newer compiler.
- Joystick problems in iNES-Windows are fixed.
- Added joystick configuration to iNES-Windows setup panel.
- Added HSV palette configuration to iNES-Windows setup panel
(not functional yet).
- Fixed a Unix sound driver problem with non-atomic write, thanks to
Colin Howell.
New in iNES 2.3
- Added RAM page selection to MMC1.
- All screen refresh is now directed by the VRAM address register.
- Two lower bits of PPUCONT1 register immediately propagate to
VRAM address bits (Super Mario Borthers, Zelda).
- Fixed frequency sweep for sound channel 0 when increasing frequency
(Othello-Bit).
- Fixed vertical scroll rollover.
- Automatic HPeriod/VPeriod computation is now default.
- Now taking into account cycles taken by the sprite DMA.
- Now not generating NMI if VBlank flag was reset in the PPU status
register (Ikari Warriors 3, BWings).
- Reduced delay between VBlank and NMI to several cycles (Overlord,
Dragon Strike).
- Removed cycle counter roundups.
- Now saving raster effect option as global (not cartridge specific).
- Now cleanly removing the debugger console in iNES-Windows.
- Added keyboard support for FamilyBASIC and other programs using
the keyboard.
- Fixed Windows sound driver to avoid crashes in Windows 2000.
New in iNES 2.1
- New iNES-Windows demo is now available.
- Now setting B-flag to 1 when popping SR off the stack.
- Added wrap-around emulation to 6502's JMP ($xxxx) instruction.
- Added -DNO_DECIMAL to iNES-Windows and iNES-Unix makefiles
(NES 6502 has no decimal mode).
- Added VRAM mirroring between $2000-$2F00 and $3000-$3F00.
- Switched to a single latch for $2005 and $2006.
- Now setting EightSprites flag correctly.
- Now starting sprite DMA from the address set via $2003.
- Now not updating scroll and VAddr until both bytes transferred.
- Fixed a bug in the MMC4 implementation.
- Fixed a bug in the debugger when printing out sprite table.
- Added console debugger to iNES-Windows (press F1).
- Added TV raster effect to iNES-Windows.
- Removed MIDI volume control from the Windows sound driver.
New in iNES 2.0
- Number of 8kB RAM pages added to the .NES header!
- State file format has changed.
- Major overhaul of the screen update driver to get rid of
memcpy() calls in mapper handlers.
- Replaced the original iNES color palette with the one Chris Covell
obtained from the real NES. The original palette is still available
in the Old-iNES.pal file.
- Added support for loading/saving multiple (up to 4x8kB right now)
battery-backed RAM pages from a .SAV file.
- Fully implemented mappers 9 (MMC2 used in Punchout) and 10 (MMC4).
- Limited IRQ counter updates in MMC3 to situations when screen
refresh is on and ChrGen/SprGen use different tables.
- Added mapper 24 (Konami VRC6) but interrupts are still wrong.
- Added mapper 25 (Konami VRC4B).
- Added mappers 64 (Tengen RAMBO-1), 65 (Irem H-3001), 66 (GNROM),
67 (SunSoft3), 68 (SunSoft4), 69 (SunSoft5 FME-7), 71 (Camerica),
78 (Irem 74HC161/32), 91 (HK-SF3).
- Implemented a lot of special features of mapper 5 (MMC5) such as
extended graphics and sound.
- Fixed mapper 11 (Color Dreams games).
- Fixed mapper 19 (Namcot 106).
- Fixed mapper 16 (Bandai) although some timing problems still persist.
- Fixes to mappers 1 (MMC1), 21 (VRC4A), 22 (VRC2A), and 23 (VRC2B).
- Now generating VBlank NMI at line 244 (Galaxian, Toki, Goonies 2, etc.).
- Now retaining mirroring bits when MMC1 is reset (Jekyll And Hyde).
- Added "PPU interface mode" (Elite).
- Fixed vertical offset calculation inside sprites.
- Fixed horizontal scroll calculation from VRAM address.
- Changed HitFlag computation again.
- Changed sound length setting for the sound channel 2.
- Fixed frequency sweep for sound channels 0,1.
- Some general fixes to the sound chip emulation.
- Some improvements to the built-in debugger.
- Documentation has a new section describing iNES-Windows menus
and setup.
- Set background color in iNES-Windows to black.
- Added F6 and F7 to quickly load and save emulation state in
iNES-Windows.
- Added "JoyA", "JoyB", "JoySELECT", and "JoySTART" parameters to the
[iNES] section of the iNES.INI file to configure joystick button
assignments (no GUI yet).
- Obsoleted headers.tgz and headers.zip files.
New in iNES 1.3
- Save state (.STA) file format has changed.
- Added new modular sound chip emulation.
- Added PCM sound channel.
- Improved MIDI logging.
- Implemented correct sprite overlap (SuperMarioBrothers3). Thanks
to John Stiles who pointed out this problem.
- Fixed a bug in FDS sound emulation (Castlevania2, DokiDokiPanic),
also thanks to John Stiles.
- Major rewrite of the sound drivers and sound logging system.
- Fixed several problems with Windows waveOut sound drivers.
- iNES-Windows now runs in 16BPP HiColor mode.
- Added debugger to iNES-MSDOS (F1).
New in iNES 1.2
- Added capability to save and restore emulation state (.STA files).
- Keyboard assignments changed slightly to be consistent with VGB and MG.
- Now storing ROM and VROM in flat chunks of memory.
- Implemented DiskSystem timer.
- Implemented DiskSystem melodic sound (not finished).
- Fixed HitFlag bug.
- Fixed bug with sprites not updated when background is off.
- Made PCM sound start when the channel is switched on.
- Fixed mapper #16 (Dragon Ball Z series and other Bandai games).
- Fixed joystick support in iNES-Windows.
- Fixed current directory name in iNES-Windows.
- iNES-Unix runs in a resizable window now.
- iNES-Unix now has a proper application icon in WMaker.
- Fixed IPC key allocation bug in iNES-Unix.
- iNES-Windows now uses multimedia timer to sync screen refresh.
New in iNES 1.0
- Rewritten and extended documentation.
- Famicom DiskSystem emulation.
- VS System emulation.
- Majorly bugfixed PPU emulation.
- Completely rewritten mapper code.
- NES 6502 does not support decimal math.
- Direct saving of soundtrack to MIDI files.
- Default palette can be loaded from a file.
- Speed control in iNES-Windows.
- Window size/position snapshots in iNES-Windows.
- Keyboard assignments added to iNES-Windows.
- Added speed control to VGB-Unix.
- Removed description of the .SND format.
- Moved .NES format description to the hardware document.
- Many other small fixes and improvements.
New in iNES 0.7
- iNES-Windows can now be registered by phone or via WWW! Pay with
a credit card!
- Extended .NES cartridge format!
- Description of .SND file format!
- Split screens and scrolling are now much more stable.
- Added GameGenie support, thanks to Alex Krasivsky.
- Multiple exotic memory mappers added, thanks to Yang Fanwen.
- Multiple fixes to mapper #4 (MMC3) and mapper #1 (MMC1).
- Sound support completely rewritten, thanks to Kawase Tomohiro.
- Added keyboard setting for Japanese version of FamilyBASIC.
- Added two palette choices from NESticle 0.2 and 0.21.
- Started adding Nintendo DiskSystem support (not finished yet).
- Windows version got built-in support for GZIPped files.
- GUI rewritten and extended in the Windows version.
- MIDI sound implemented in the Windows version.
- Increased number of Windows wave synthesis buffers.
- Added sound logging to the Windows version.
- WinG no longer required for the Windows version.
Introduction
iNES is a portable emulator of the Nintendo Entertainment System (aka
Famicom in Korea and Japan, Dandy in Russia), written in C. The original
idea belongs to Alex Krasivsky from Moscow, although nothing remains from
the original code today. iNES runs most NES/Famicom games and supports
such esoteric devices as GameGenie, Family BASIC keyboard, and Famicom
Disk System. You can always get latest iNES news, binaries, and support
files from
http://www.komkon.org/fms/iNES/
Following is a list of features iNES supports:
- General NES Hardware
- CPU (6502 without decimal math)
- 8kB Internal RAM
- Up to 32kB External RAM
- Two Joysticks
- Video Processor (aka PPU)
- Up to 16kB of VRAM
- Screen Mirroring
- Scrolling via $2005
- Screen Splits via $2006
- Several Choices of Palette
- Sprites with Priorities
- Sprite Hit Flag
- Sound Generator
- Three Channels of Melodic Sound
- White Noise Channel
- PCM Wave Channel
- DiskSystem Melodic Channel
- NES/Famicom Add-Ons
- Galoob GameGenie
- Famicom DiskSystem
- Nintendo VS-System
- FamilyBASIC 2 Keyboard
- FamilyBASIC 3 Keyboard
- Cartridges
- Battery Backed RAM
- CNROM Cartridges (#2)
- UNROM Cartridges (#3)
- GNROM Cartridges (#66)
- AOROM Cartridges (#7)
- CPROM Cartridges (#13)
- Specialized 32kB ROM Switch (#34)
- Nintendo MMC1 Chip (#1)
- Nintendo MMC2 Chip (#9)
- Nintendo MMC3 Chip (#4)
- Nintendo MMC4 Chip (#10)
- Nintendo MMC5 Chip (#5)
- Konami VRC4a Chip (#21)
- Konami VRC4b Chip (#25)
- Konami VRC2a Chip (#22)
- Konami VRC2b Chip (#23)
- Konami VRC6 Chip (#24, not quite done)
- FrontFarEast Copier F4xxx Games (#6)
- FrontFarEast Copier F3xxx Games (#8)
- FrontFarEast Copier F6xxx Games (#12, not quite done)
- FrontFarEast Copier F8xxx Games (#17)
- ColorDreams Cartridges (#11)
- AVE Nina-3 Cartridges (#79)
- AVE Nina-6 Cartridges (#81)
- Bandai Cartridges (#16)
- Jaleco SS8806 Chip (#18)
- Namco 106 Chip (#19)
- Irem G-101 Chip (#32)
- Irem H-3001 Chip (#65)
- Irem 74HC161/32-based Cartridges (#78)
- Taito TC0190/TC0350 Chips (#33)
- Tengen RAMBO-1 Chip (#64)
- SunSoft3 Chip (#67)
- SunSoft4 Chip (#68)
- SunSoft5 Chip aka FME-7 (#69)
- Camerica Chip (#71)
- Pirate HK-SF3 Chip (#91)
- 100-in-1 Cartridge (#15)
- Other
- Automatic Handling of GZIPped ROMs
- Emulation State Saving and Loading
- Soundtrack Logging into MIDI Files
- Built-In Debugger
- Resizable Window (Windows and Unix ports)
- Full Screen Mode (Windows and MSDOS ports)
- Screen Snapshots (MSDOS port only)
iNES Ports
Because of iNES is a very portable program, it can be compiled on many
different platforms: Unix, Macintosh, MSDOS, Windows, PocketPC, Amiga, etc.
The complete up-to-date list of iNES ports can be found at the iNES
distribution site. Following are the major ports of iNES:
Unix
-
iNES-Unix is available freely in binary form for various flavors of Unix
from the iNES distribution site. I am always trying to compile it on as many
different Unices as I have handy at the moment.
Windows
-
The Windows version of iNES is available from me, Marat Fayzullin, for
$35US. This fee ensures that you get the latest full version of iNES-Windows
with sound and joystick support, saved preferences, GameGenie support, and
free updates via email as long as iNES-Windows is being updated. As of
version 3.0, iNES-Windows runs in both windowed and full screen modes
(using DirectDraw). For more information about iNES-Windows, take a look at
http://www.komkon.org/fms/iNES/iNESWindows.html
You can buy iNES-Windows by one of the following methods:
- ORDER BY MAIL
-
Send $35US in cash, money order, or a US bank check to:
Marat Fayzullin
3030 Southview Road
Ellicott City, MD 21042
USA
Don't forget to include your email address and mention that you want
iNES-Windows, as I'm selling several other products as well. The software
will be emailed to you as soon as I receive the money.
- ORDER BY PHONE
-
Call one of the following numbers in US:
1-800-242-4775 (extension 15246)
1-713-524-6394 (extension 15246)
and refer to product #15246 (iNES-Windows). This service is provided by
DigiBuy. You can pay them with a credit card. Don't forget to give them
your email address. The software will be emailed to you as soon as I
receive the notification from DigiBuy.
- ORDER ON THE WEB
-
Tell your WWW browser to go to
http://www.digibuy.com/cgi-bin/order.html?296825+92971131037
and use the online form to register iNES-Windows. You can pay with a credit
card. They take MasterCard, Visa, Amex, or Discover. The software will be
emailed to you as soon as I receive the notification from DigiBuy.
MSDOS
-
The MSDOS version of iNES is included with the Windows version. By
buying the iNES-Windows you effectively buy the iNES-MSDOS as well.
iNES-MSDOS is compiled with OpenWatcom C/C++ and runs in full screen
mode under the DOS4GW 32bit DOS extender. It supports analogue joysticks,
screen snapshots, and includes a debugger.
PocketPC
-
The PocketPC version of iNES has long been developed by Aaron Oneal.
Recently, Aaron moved to other projects and passed the maintenance duties
to me, Marat Fayzullin. You can get the PocketPC version of iNES and my
other emulators from
http://www.komkon.org/fms/MorphGear/
MacOS
-
The Macintosh version of iNES is being developed by John Stiles. It is
available from him as a shareware and can be found at the iNES distribution
site.
Linux
-
Currently, iNES-Linux (ELF, GLIBC, X11) is compiled from the same source
as all other Unix versions. You can get it for free from the iNES
distribution site.
Registered Users
If you have registered iNES-Windows, please do not give your copy
to anyone. And I do mean anyone. There was a couple of cases when
registered users gave iNES away to their friends, relatives, or just "KeWl"
Net characters and then I found it pirated, put onto WWW pages, 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 are 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)
wines.exe - iNES executable file (Windows)
ines.exe - iNES executable file (MSDOS, ines.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.
What is not Included
Absolutely no ROM images of NES/Famicom games are included. These games
are still copyrighted by the companies who have produced them, and
therefore, I cannot 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.
The iNES WWW page contains some links to NES cartridge copier info.
Cartridge copiers can be used to dump NES cartridges into files. I cannot
provide you with any additional information about these copiers, so do
not send me email asking for this information. Use the copier-related
links at the iNES WWW page.
I'm no longer distributing the 6502 disassembler and NESLIST cartridge
listing utility with the emulator. These programs are now distributed
separately in the EMUTools package, also available at iNES WWW page.
Buttons
When using FamilyBASIC keyboard, press [CONTROL]+[KEY] to access a
special function of a [KEY] if it also performs a keyboard function.
[SPACE] - FIRE-A button (also: [LALT],A,S,D,F,G,H,J,K,L)
[CONTROL] - FIRE-B button (also: Z,X,C,V,B,N,M)
[TAB] - SELECT button
[ENTER] - START button
[BACKSPC] - Light gun trigger (not quite done)
Insert VS System coin
Flip DiskSystem floppy
[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] - Toggle GameGenie cheats on/off
[F6] - Load emulation state
[F7] - Save emulation state
[F9] - Fast-forward emulation (also: [PGUP] in Unix and Windows)
[F11] - Reset NES
[SHIFT] and [CAPSLOCK] switch between joypads
When compiled with #define SOUND:
[1]-[7] - Toggle sound channels on/off
[0] - Toggle all sound on/off
[-] - Decrease sound volume
[+] - Increase sound 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 MSDOS:
[F8] - Toggle joysticks 1/2 on/off
[F10] - Make a screen snapshot (SNAPxxxx.GIF)
[PGUP] - See upper part of the screen
[PGDOWN] - See lower part of the screen
Menus and Setup Panel Options (Windows)
iNES-Windows has three main menus: File, Size, and
Help. Let's see what options are available from these menus.
- File->New
- Load and start a new game. A file selector will appear asking you
to choose either a
.NES
(NES game cartridge) or an
.FDS
(Famicom Disk System disk(s)) file. GZIPped
versions of these files are also supported.
- File->Setup
- Show the Setup Panel with iNES
configuration parameters.
- File->Load State
- Load emulation state from a file with the
.STA
extension. State files allow to "freeze" gameplay at some
point and then continue playing from this point by loading a
state file. You can also quickly load the state by
pressing the [F6] key on your keyboard.
- File->Save State
- Save emulation state to a file with the
.STA
extension. You can also quickly save the state by
pressing the [F7] key on your keyboard.
- File->Quit
- Quit iNES.
- Size->1:1
- Set window size to 1:1 scale, i.e. 256x224 pixels. This is usually
the fastest setting but today's huge screen resolutions make it
difficult to see. :)
- Size->2:1
- Set window size to 2:1 scale, i.e. 512x448 pixels. Most likely,
this is what you are going to use.
- Size->3:1
- Set window size to 3:1 scale, i.e. 768x672 pixels.
- Size->4:1
- Set window size to 4:1 scale, i.e. 1024x896 pixels. This window is
HUGE and, as result, it may take a while to draw, so expect
slower gameplay.
- Size->Full Screen
- This option will switch iNES to the full screen mode. You can also
use [ALT]+[ENTER] keys to switch between full screen and
windowed modes.
- Help->Info
- Show information about the cartridge you are using. A window will
appear displaying ROM and VROM sizes, mapper type, and other useful
data.
- Help->About
- A window with information about iNES will appear, showing the
compilation date and whether it is a registered version or a demo.
iNES-Windows Setup Panel has three sections: Options,
Cheats, and Sound. Let's start with the largest section,
Options, and then proceed to the smaller ones.
Options Section
- "Update x ... frames" slider
- Choose how frequently you want iNES to update its window, relative
to the real NES. For example, setting this parameter to 3 means that
iNES will update its window once every three updates of the real TV
screen.
- "Sync updates to ...Hz" slider
- The real NES updates its screen 60 times a second (50 times for a
European NES). It may happen that iNES runs too fast, updating its
window faster than the real thing. With this slider, you limit
the number of updates per second. Don't forget that iNES may not
do every real update (see "Update x ... frames" description
above). For example, if iNES is doing one window update every three
real TV frames and the real frames run at 60Hz, you want to set this
slider to
60Hz/3=20Hz
.
- "VBlank x ... lines" slider
- Select how frequently VBlank (or end-of-TV-frame) occurs, in
scanlines. Normally, you don't need to mess with this parameter.
- "HBlank x ... cycles" slider
- Select how frequently HBlank (or end-of-TV-scanline) occurs, in
CPU cycles. Normally, you don't need to mess with this parameter.
- "Automatic timings" checkbox
- You will usually want to select this checkbox to insure that your
VBlank and HBlank parameters are automatically set to the correct
values, whether PAL or NTSC. When this checkbox is selected, iNES
will ignore the VBlank and HBlank sliders!
- "European (PAL) mode" checkbox
- Emulate a European TV that has 240 visible scanlines on its screen.
American and Japanese TVs have only 224 visible scanlines, hiding
eight upper and eight lower lines of the NES screen. When neither
PAL nor NTSC options are selected, iNES will determine the TV mode
from the cartridge header. Attention: When this option is
changed, the game will reset.
- "American (NTSC) mode" checkbox
- Emulate an American or Japanese TV that has 224 visible scanlines on
its screen. European TVs have 240 visible scanlines. When neither
PAL nor NTSC options are selected, iNES will determine the TV mode
from the cartridge header. Attention: When this option is
changed, the game will reset.
- "Autofire for buttons A/B" checkboxes
- Select these options if you want an "automatic fire" effect for
the NES buttons. Standard NES joypads did not support automatic
fire but some third-party controllers did.
- "Save CPU" checkbox
- This option puts iNES to "sleep" while you are using other
applications on your desktop. This is useful both to pause
gameplay and to save CPU cycles for the real work.
- "TV raster effect" checkbox
- Emulate TV raster lines. While this effect may use a little extra
CPU time, it makes the game look like it is running on a real
TV screen.
- "Use MIDI sound" checkbox
- Use MIDI instead of wave synthesis for sound emulation. MIDI
instruments sound different from the real NES hardware, but some
ears may find them nicer than the real thing. Besides, this option
lets you play NES soundtrack on a real musical keyboard
plugged into a MIDI port on your computer! Using MIDI also saves
CPU time, so iNES runs faster with MIDI.
- "Use MIDI drums" checkbox
- When using MIDI sound, you can select this option to emulate the NES
noise channel by "hitting" MIDI drums. This produces cool percussion
effects in some games but may sound out of place in the others. Use
this option at your own risk. :)
- "Japanese keyboard" checkbox
- Select this option to emulate the keyboard when using a Japanese
version of the FamilyBASIC or some other program that uses the
keyboard. You can still use the joypad and the emulation control
keys by pressing them while holding the [CONTROL] key.
- "Russian keyboard" checkbox
- Select this option to emulate the keyboard when using a Russian
version of the FamilyBASIC or some other program that uses the
keyboard. You can still use the joypad and the emulation control
keys by pressing them while holding the [CONTROL] key.
- "Load palette from this file" box
- Due to the hardware peculiarities, different NES versions had slightly
different color palettes. If you do not like the base palette supplied
by iNES, you can load a different one from a file by entering its name
in this input box. Some palette files (with
.PAL
extension) come with iNES-Windows.
Attention: When this option is changed, the game will reset.
- "Log sound to this file" box
- By entering a file name in this box and selecting corresponding
checkbox, you can save NES music to a MIDI file as it plays. MIDI
logging works even when you are not using MIDI sound. Notice that
you can turn sound logging on and off by pressing the [F2]
key on the keyboard.
Sound Section
- "Channels" checkboxes
- These checkboxes allow to switch off and on the five primary and
the two extra (FDS or MMC5) sound channels. Notice that the same
can be done with [0]-[7] keys on the keyboard.
- "Volume" slider
- This is the sound volume for the wave synthesis. The volume can
also be controlled with [+] and [-] keys on the
keyboard. To control MIDI volume, use the Windows volume control
in the bottom right corner of your taskbar.
- "Sound rate ...Hz" slider
- When using wave synthesis ("Use MIDI sound" checkbox is off),
this parameter controls the sound quality. Higher sound rate means
better sound quality, but it also consumes more CPU cycles (so iNES
runs slower). The "standard" sound rate used by most people is
22050Hz. For better quality, you can set the rate up to 44100Hz.
Lowering sound rate makes sound dinkier and loses high chords. You
can lower it down to 8192Hz that roughly corresponds to the
telephone sound quality.
- "Sound buffers ..." slider
- When using wave synthesis ("Use MIDI sound" checkbox is off),
this parameter controls the amount of memory used to store sound.
Think of it as an "anti-skip" feature in your CD player: when Windows
needs to do something else (besides running iNES) and the number of
buffers is too low, you will hear chirps. Yet, if the number of
buffers is too high, the sound will lag behind the gameplay. Higher
sound rates require larger number of buffers, so you may want to
adjust the "Sound buffers ..." parameter when changing the
sound rate.
Cheats Section
This section is the easiest to describe. You enter a GameGenie code in
a box at the bottom and press the [Add] button to add it to the
cheat list. To remove a code, highlight it in the cheat list and press
the [Delete] button.
Command Line Options (MSDOS and Unix)
-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
-hperiod <period> - Number of CPU cycles per HBlank [AUTO]
-vperiod <period> - Number of CPU cycles per VBlank [AUTO]
-uperiod <period> - Number of VBlanks per screen update [3]
-help - Print this help page
-cheat <GG code> - Activate a GameGenie 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]
-palette <filename> - Load default palette from a file [automatic]
-logsnd <filename> - Write soundtrack to a MIDI file [LOG.MID]
-cheat <GG code> - Activate a GameGenie cheat
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 SOUND:
-sound [<quality>] - Sound emulation quality [0]
0 - Off 1 - Adlib (MSDOS)
Values >8191 are treated as wave synthesis
frequencies.
-nosound - Same as '-sound 0'
When compiled with #define UNIX:
-shm/-noshm - Use/don't use MIT SHM extensions for X [-shm]
-saver/-nosaver - Save/don't save CPU when inactive [-saver]
-sync <frequency> - Sync screen updates to <frequency> [0]
-nosync - Same as '-sync 0'
-scale <factor> - Scale window by <factor> [1]
When compiled with #define MSDOS:
-vsync/-novsync - Sync/Don't sync screen updates [-novsync]
-240/-200 - Use/Don't use non-standard 320x240 mode [-200]
-tv/-notv - Show/Don't show TV raster lines [-notv]
Frequently Asked Questions
- 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.
- How do I copy games from cartridges to a computer?
You can use a special device called cartridge copier. Pascal Felber has
made such a copier. Its schematics and software are available at
http://lsewww.epfl.ch/~felber/IO-56/
You can also buy this copier from Pascal, either in parts or as a
pre-built kit.
- 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://www.komkon.org/fms/EMUL8/
- 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 :(.
- Where do I get iNES for MSDOS?
This is explained in the beginning of this document.
- 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.
- Your ROM image file may have an incorrect header or other problems.
Some of them can be detected by running it through the NESLIST
utility (included into EMUTools package).
- It is considered "cool" by many pirates to put their "signatures"
into unused bytes of .NES headers. Such image files are not
guaranteed to work, even if they worked on some older version of
iNES. Do not use pirated ROM images.
- The VBlank and HBlank periods may be wrong. Try to play with them,
using
-vperiod/-hperiod
options in Unix, or
corresponding sliders in the Setup Panel of a Windows version. The
first thing would be to make VBlank period bigger and see what
happens.
- The game does not run with a FamilyBASIC keyboard. The keyboard
support is off by default, but if you have it on, turn it off by
not using -rkbd/-jkbd options. On the other hand, some cartridges
may require the keyboard. Use an -rkbd/-jkbd option for them. All
above only applies if your version of iNES supports the keyboard
(iNES Unix does).
- The game may require some exotic piece of equipment, such as a
light gun. Not all NES hardware addons are supported by iNES.
- iNES can't currently run this game. Not all games are supported at
this moment. Don't expect 100% compatibility with the real hardware.
- Why is iNES so slow on my machine?
Because your machine is too slow to run iNES. My experience shows that
you need at least a Pentium/90 machine with fast video to run iNES at a
reasonable speed. Following are the ways to speed things up:
- Increase UPeriod by using
-uperiod
option on Unix, or
the "Update x ... frames" slider on Windows. The gameplay
will become more jittery, but the game will run faster.
- On Unix, always use MIT Shared Memory Extension for X (MITSHM). This,
of course, means that you have to run iNES locally.
- On Unix, run X in 256-color mode.
- On Windows and Unix, use 1:1 window to achieve the highest speed.
- On Windows, use MIDI sound, as wave synthesis takes quite a lot of
CPU time.
- iNES is too fast on my machine! How do I slow it down?
Frankly, when I started writing iNES, I never expected that it will be
too fast on any machine :). But times change...
- Decrease UPeriod to 1-2 either with the
-uperiod
option on Unix, or with the "Update x ... frames" slider
on Windows. The emulation will become slower, but smoother.
- On Unix, use
-sync
option to tie screen updates to
the certain frequency (usually, 60Hz/UPeriod
).
- On Windows, use "Sync to ...Hz" slider in the Setup
Panel to tie screen updates to a certain frequency (usually,
60Hz/UPeriod
).
- On Windows and Unix, double or triple the window size.
- What are .NES files? Do you have 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://www.komkon.org/fms/EMUL8/
- What are .FDS files? Do you have 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.
- 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 DiskSystem BIOS and have
length of 8192 bytes.
To run a program from an .FDS file, use the -disk
option
in iNES-Unix, or just open this .FDS file in iNES-Windows. iNES will
start with the disk "removed" from the "drive". To insert the disk,
press [F6] 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 [F6]: 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), click [F6] multiple times.
- 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.
- 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 the iNES WWW site.
- Do I need to unpack GZIPped ROM images to run them on iNES?
No, unless your copy of iNES has been compiled without
#define ZLIB
. iNES-Windows and most versions of iNES-Unix
are compiled with this option. It allows iNES to recognize and
automatically unpack GZIPped and singular PKZIPped files. To find out
whether your iNES-Unix supports this feature, run it with the
-help
option and see if there is anything said about GZIP
support.
- When starting iNES-Unix, ld says that libz library isn't found.
Some iNES-Unix binaries are compiled with #define ZLIB
option to make them automatically recognize and unpack GZIPped files.
This option requires ZLib library which can be obtained from
http://www.cdrom.com/pub/infozip/zlib/zlib.html
- I entered registration code into iNES-MacOS and now it says I pirated it!
iNES-MacOS will lock up if you try to "register" it without paying for
registration and using the correct registration code. It will then refuse
to work on your computer. If you think that you have been mistreated
for a simple typing error, contact John Stiles for help.
- 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.
- 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 -noshm option to
tell it not to use shared memory.
- 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.
- 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.
- 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:
- Use MIDI sound instead. It has both advantages and disadvantages
though.
- Make iNES window smaller to decrease the load on the CPU. 1:1 is
the optimal size.
- Decrease the sampling frequency (in the Setup Panel). The sound may
become tinkier, but less distorted.
- Increase the number of wave buffers (in the Setup Panel). This may
cause sound to fall a second or two behind the screen action, but
the sound quality will become better.
- Does iNES-Windows support joystick? My joystick doesn't work!
iNES-Windows supports joystick. If your joystick does not work, go into
Windows Control Panel to see if it is configured and calibrated properly.
Also, some new joysticks working in esoteric standards (like GRiP) are
known to have problems.
- iNES-Windows starts, but then quits immediately!
Check the pathname to wherever your iNES is located. It should not contain
spaces. For example, "C:\Program Files\iNES" is a bad place for iNES, while
"C:\iNES" will work. This bug is caused by an old version of C compiler I am
using. I hope to get rid of it when I switch to a new compiler.
- Colors are all screwed up in iNES-Windows!
When running Windows in 256-color mode, it will try to approximate
colors to existing ones, but it won't always get an exact match. I'm
working on fixing this. For now, switch Windows into 16bit graphics to
get perfect colors.
- Black window in iNES-Windows!
If you are running Windows in 256-color mode, then this is most likely
the cause of a problem. Try switching Windows into 16bit screen mode.
- Command line options don't work in iNES-Windows!
iNES-Windows only accepts the .NES file name at the command line, but
no options. All configuration is done via the Setup Panel and the
iNES.INI file.
- Will iNES-Windows work on Windows 3.xx?
It may, but I can't guarantee it. iNES-Windows has never been tested on
Windows 3.xx. Maybe it is time to upgrade.
- I'm a registered iNES-Windows user and some games no longer run!
It is quite possible that your iNES.INI file no longer works with the
new version of iNES. It is my suggestion to delete iNES.INI every time you
get a new version of iNES. You can still use some ASCII editor (Notepad or
DOS Editor) to migrate some of your old settings into new iNES.INI.
- How do I save and load emulation state during the game?
The emulation state can be saved by pressing [F6] button. 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. State saving is not perfect yet,
so for some games state may not be correctly saved.
- 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.
- 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.
- 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.
- What are those "HPeriod" and "VPeriod" options?
The -hperiod
controls how many CPU cycles it will take to
refresh a single scanline of display (including HBlank).
The -vperiod
controls how many CPU cycles it takes to
refresh the entire screen (including VBlank). The VPeriod/HPeriod value
should never be less than 256 to give VBlank interrupt handlers enough
CPU cycles.
- 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.
© Copyright by
Marat Fayzullin
(fms [at] cs [dot] umd [dot] edu)