iNES
version 1.2
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
- 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.
History
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, who also wrote the original
code. I added missing CPU commands, wrote screen drivers, then rewrote the
code, then did thorough hacking to make it as compatible with the real
hardware as possible, and suddenly wound up with a completely different
emulator of my own.
You can always get latest iNES binaries and support files from
http://www.komkon.org/fms/iNES/
At the present time, iNES successfully runs most NES/Famicom games
and supports such esoteric devices as GameGenie, Family BASIC keyboard,
and Famicom Disk System. Following is a list of features supported by
iNES at this moment:
- General NES Hardware
- CPU (6502 without decimal math)
- 8kB Internal 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 (Macintosh port only)
- NES/Famicom Add-Ons
- Galoob GameGenie
- Famicom DiskSystem
- Nintendo VS-System
- FamilyBASIC 2 Keyboard (Unix port only)
- FamilyBASIC 3 Keyboard (Unix port only)
- Cartridges
- Battery Backed RAM
- CN-ROM Cartridges (#2)
- UN-ROM Cartridges (#3)
- Generic 32kB ROM Switch (#7)
- 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 VRC4 Chip (#21)
- 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, not quite done)
- Bandai Cartridges (#16)
- Jaleco SS8806 Chip (#18)
- Namco 106 Chip (#19)
- Irem G-101 Chip (#32)
- Taito TC0190/TC0350 Chips (#33)
- 100-in-1 Cartridge (#15)
- Other
- Automatic Handling of GZIPped ROMs
- Emulation State Saving and Loading
- Soundtrack Logging into MIDI Files
- Built-In Debugger (Unix port only)
- Resizable window (Windows and Unix ports)
- Screen Snapshots (MSDOS port only)
iNES Ports
Because of its portability, iNES can be compiled on a wide variety of
platforms: Unix, Amiga, Macintosh, MSDOS, Windows, etc. Unfortunately, it
looks that for each person geniunely interested in hardware hacking and
revival of the old videogame experience there is a dozen of adolescent
gremlins hungry for a quick fun of playing pirated NES games on their PCs.
Because of that, I decided not to release iNES source code and not to
produce free versions of iNES for MSDOS or Windows. I do not want to
provide free entertainment for the vermin. I do feel it necessary to
apologize for inconvinience created to all the intended users of iNES.
The complete up-to-date list of iNES ports can be obtained from the
iNES distribution site. Following are the major ports of iNES available
at the moment:
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.
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.
Windows 95/98/NT
-
The Windows version of iNES is available from me, Marat Fayzullin, for
$35US. This fee ensures that you will get you 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. For more information about it, take a look at
http://www.komkon.org/fms/iNES/iNESWindows.html
I do not feel very good about maintaining the Windows version because
people pirate it a lot and most Windows users appear to be mentally
underdeveloped (judging from their email, anyway). If you do want
to see Windows version being developed, please, register it by one of the
following methods:
- ORDER BY MAIL
-
Send $35US in cash, money order, or a US bank check to:
Marat Fayzullin
6304 Hampton Place
Elkridge, MD 21075
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
-
There are no publicly available MSDOS versions of iNES. Please, do not
mail me asking for it: I won't answer to you. I won't allow anyone to do
an MSDOS port of iNES either. See above for the reasons why.
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. Please, do not ask me for an SVGALib version though:
I do not consider SVGALib as a viable standard and will not develop for
it.
Registered Users
If you registered iNES-Windows, please do not give your copy to
anybody. And I do mean anybody. There was a couple of cases when
registered users gave iNES away to their friends, relatives, or just "KeWl"
guys on the Net, 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 threating 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)
ines-debug - iNES with debugger (Unix. ines-debug -help for options)
ines.exe - iNES executable file (Windows)
iNES.html - This documentation
CART.NES - Sample ROM image
headers.tgz - .NES file headers for some games (Unix)
headers.zip - .NES file headers for some games (Windows)
What is not Included
Absolutely no ROM images of NES/Famicom games are included. These 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.
The iNES WWW page contains some links to NES cartridge copier info.
Cartridge copiers can be used to dump NES cartridges into files. I can
not 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 this 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] - Save emulation state
[F7] - Cycle through palettes
[F11] - Reset NES
[SHIFT] and [CAPSLOCK] switch between joypads
When compiled with #define SOUND:
[1]-[5] - 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 MSDOS:
[F8] - Toggle joystick 1 on/off
[F9] - Toggle joystick 2 on/off
[F10] - Make a screen snapshot (SNAPxxxx.GIF)
[PGUP] - See upper part of the screen
[PGDOWN] - See lower part of the screen
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
-hperiod <period> - Number of CPU cycles per HBlank [115]
-vperiod <period> - Number of CPU cycles per VBlank [30475]
-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 [-ntsc]
-rkbd/-jkbd/-nokbd - FBASIC3R, FBASIC2J, or no keyboard [-nokbd]
-disk/-nodisk - Emulate/Don't emulate DiskSystem [-nodisk]
-palette <filename> - Load default palette from a file [DEFAULT.PAL]
-palette <number> - Choose a color palette [0]
0 - Default 1 - Adjusted Pasofami
2 - Original Pasofami 3 - NESticle 0.2
4 - NESticle 0.21
-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. Default frequency is 22kHz.
-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]
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.
- How do I make .NES files out of raw ROM images?
The iNES distribution includes .NES file headers for some carts, which
can be used to convert carts into .NES format. These headers are not
guaranteed to work though. If you have a cartridge ROM in CART.PRG file,
and a cartridge VROM in CART.CHR file, the following has to be done to
create the CART.NES file:
in Unix: cat CART.HDR CART.PRG CART.CHR > CART.NES
in MSDOS: copy/b CART.HDR+CART.PRG+CART.CHR CART.NES
The size of a CART.PRG file should be divisible by 16384. The size of a
CART.CHR file should be divisible by 8192.
- 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). Others get revealed by
comparison with the sample headers which come with iNES (see
headers.tgz or headers.zip file).
- 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 if 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 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 speeds thing up:
- Increase UPeriod. The picture will get more jerky, but iNES will
become 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 2 or even to 1. The emulation will become much
slower, but smoother.
- On Unix, ue
-sync
option to tie screen updates to
the certain frequency (usually, 60Hz/UPeriod).
- On Windows, use "Sync To..." option in the setup window 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 Setup Panel). The sound may
become tinkier, but less distorted.
- Increase the number of wave buffers (in 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!
They shouldn't. The demo version of iNES-Windows supports no command
line interface at all. The full version will only accept the .NES file
name at the command line, but no options. All configuration is done via
Setup Panel and iNES.INI file.
- Volume control works strangely in iNES-Windows!
It is a result of the volume control being shared between iNES and other
Windows applications. You can usually restore normal volume by leaving iNES
window and then activating it again.
- 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@cs.umd.edu)