This file contains a few notes about the DarcNES NES emulator.

DarcNES is Copyright 1998, 1999 by Alastair Bridgewater.

Commercial use prohibited without express written permission from
the author. Everyone else can do whatever they want, provided that
I am credited in the documentation (and, if released, the source code).

Disclaimer:

This software is provided AS IS, etc. No warranty, etc, etc. You know
the drill.


Usage notes:

    DOS users: edit the Makefile and nes_psg.c, the required changes
should be fairly obvious. keys are 'A', 'S', '[', ']', arrows, and escape.

    SVGALib users: edit the Makefile, the required change should be
fairly obvious. keys are the same as the dos version + ctrl, alt, tab, and
enter.

    XWindows users: keys are the same as the dos version. you have to use
file->exit to save the battery file (if any). if you don't specify a file
on the command line, "cart.nes" will be used.


Internals:

The asm CPU core is substantially complete. however, there are still
some bugs lurking in the code somewhere.

The C CPU core is a modified version of Marat's infamous m6502. I
had to rebuild the main loop and modify the memory access stuff.
This CPU core must go. It's buggier than the ASM one.

The I/O space is substantially complete. There are still some bugs
in the PPU (Sprite priority, etc). The APU is minimally functional,
but will require more work (only three channels, none complete).

The debugger has reached the point where a total rewrite with GUI
integration is in order. As I am having trouble figuring out how
to work with Xt, I have decided to leave it alone for now (It's
not that important anymore now that the system is running fairly
well). Plus, it needs to be redesigned to support multi-cpu systems
and multiple types of cpu.

The Mapper system is relatively decent. nes.c calls set_mapper() to
choose a specific mapper and calls cur_init() to reset it, then during
operation emu6502.S calls the mapper write function.


Things that need work:

    Debugger. (Needs to be updated to use a GUI)
    CPU. (Bug checking. More undocumented opcodes, etc.)
    CAL. (have to add support for word and long sized memory access, may want
to add support for block-marking and dynamic compilation cores)
    PPU. (sprite priority, timing, speed)
    APU. (only three channels, poor control, etc.)
    GUI. (Linux/XWin one is junk, DOS one doesn't exist)
    Video. (XWin needs to support SHM/DGA, DOS needs to support 16bpp)
    Documentation. (If you haven't noticed by now, I don't like writing
it. I also don't comment my code very much either, prefering to spend
my time making it obvious enough to not need comments)
    Support scripts/Makefiles. (I'm thinking of adding a configuration
program of some sort to configure each build)
    Additional system support. (I have the SMS/GG emulated fairly well (except
for the battery ram and the GG palette, and am working on some other systems)
    Extra frills that make for a great product. (Autoframeskip, etc.)


Files: (Incomplete list)

  dt*.[ch]:       Instruction decode for debugger. (various processors)
  emu6502.[Sh]:   Emulation core, memory access routines, instruction dispatch.
  flags.[ch]:     Flag conversion tables.
  io_nes.[Sh]:    NES IO emulation.
  io_pce.[Sh]:    PC-Engine IO emulation.
  machdep.h:      Machine compatability definitions.
  Makefile:       It's a Makefile.
  mappers.[ch]:   Emulation routines for the memory mappers.
  opc6502.S:      Opcode emulation, and instruction dispatch table.
  opc6502.h:      Emulation macrology and context definitions.
  nes.c:          NES system emulation.
  nes_blit.[ch]:  The NES blit compiler.
  nes_ppu.[ch]:   NES PPU emulation.
  nes_psg.[ch]:   NES pAPU emulation.
  nespal.c:       NES palette.
  readme:         This file.
  tool.[ch]:      Cart loader, System selection.
  video.h:        Video display interface.
  video_*.c:      Various video drivers.
  ui.h:           User interface interface.
  ui_*.c:         User interface drivers.

there are also emu*.[Sh] and opc*.[Sh] for other CPU types.

Other things that should be listed in this file:

  This emulator was written by the following:

    Nyef (Alastair Bridgewater)

  The following people (among others) provided documentation/inspiration/code:

    Marat Fayzullin (nes.doc, m6502)
    Jeremy Chadwick (nestech)
    FireBug (mappers.doc)
    Matt Conte (sound ideas)
    Kritz (opinions, documentation, code)
    Fx3 (opinions, documentation)
    Toby Deshane (SVGALib support code)
    Sepiroth (DOS testing, inspiration)
    Magnus Oman (new nes palette)
    Michael Vance (code)
    Jussi Lindgren (testing, inspiration)
    Charles Mac Donald (documentation)
    Joshua Moore (inspiration)
    Matan Ziv-Av (documentation, inspiration)


/* EOF */
