$Id: Configuration,v 1.10 2000/09/02 18:48:25 james Exp $

Setting up Config.h
===================

Many of the configuration #defines in Config.h can be ignored in most
cases.  However, if you want to play about with the emulator, you'll
probably need to know what they are at some stage or other...

LO_PAGE

 defining this means that the emulator assumes there will be no strange
 side effects of writing to pages 0 and 1. I'm particularly thinking
 about the situation where screen memory is mapped onto page 0 here
 -- if you don't care if that won't work properly, defining LO_PAGE
 means that no checks are made to see if the screen has changed and the
 emulator runs faster.


FASTCLOCK

 Given excessive amounts of CPU power, it's probably possible to do all
 the work of updating the VIA timers etc. depending on the duration of
 each instruction, after every instruction. Generally, though, that does
 slow things down somewhat. Defining FASTCLOCK means that the timers are
 updated no more often than FASTCLOCK cycles, which greatly reduces the
 overhead involved in updating the timers and checking for interrupts. The
 code may not even function correctly with this undefined at the moment.


ENDIAN_6502

 If you have a "little endian" machine, define this.  It allows for certain
 optimisations because the 6502 is little endian, too.


NO_FRED_JIM

 Currently there's no emulation of the Fred and Jim memory-mapped IO. If
 you're not interested in emulating them, or never use them, defining
 this just means they get completely ignored when handling memory-mapped
 IO, resulting in faster emulation.


LIMIT

 Define this to a number of instructions after which the emulator should
 exit.  Only really useful for debugging and timing purposes.


DISASS

 Define this to enable the executing instruction disassembler.  Defining it
 to be 0 means that disassembly is turned off initially, defining it as
 DISASSEMBLE means that it's turned on initially.  Once running, disassembly
 can be controlled by the keypad "+" and "-" keys.  This produces lots of
 output very fast and slows the emulator down no end.  Only really useful
 for debugging.


INFO

 Causes all sorts of informational messages about the emulator's internals
 to be displayed.  Not very interesting to many.


NEED_STRCASECMP

 Define this to use the supplied strcasecmp if your C library doesn't
 have that function.


NEED_STRTOUL

 Define this to use the supplied strtoul if your C library doesn't have
 it.


EMUL_FS

 Defining this enables the emulated filing system.  Without it, you won't
 be able to load or save anything.


XDFS

 Defining this as well as EMUL_FS enables the XDFS support.  Recommended.


COUNT_INSTRS

 Defining this causes instruction counting code to be enabled in the
 emulator.  I used this for determining which instructions were executed
 most in order to better decide where I should spend time trying to
 optimise code.  It produces quite unexpected results -- the instruction
 execution frequencies are very skewed.


EFS_CATALOG_SIZE

 Defined to be 31 -- the maximum number of files on a DFS disk.  This
 is because I want to be able to migrate the emulated filing system to
 something more integrated with the OS later on.  Feel free to increase
 it if you really don't care about that.


XBEEBROOT

 Where to find all of the Xbeeb files -- roms, snapshots, EFS "disks" and
 (if/when I write the tape system support, tape images, too).


SHIFTLOCK_SOUND_HACK

 Disable the Shift Lock key indicating that the sound buffer is full.
 This is recommended because having the Shift Lock key flickering whilst
 playing sound dramatically slows down the emulator.  Use this even
 if you don't have SOUND_OSS defined.


M6502
R65C02
R65C12

 Define M6502 for emulation of the original Motorola 6502 CPU. R65C02
 emulates the Rockwell 65C02 and R65C12 emulates the Rockwell 65C12.
 Only define one of these three.


MODEL_B_ONLY

 Defining this removes support for the Model A (16K) machine, which will
 speed the emulator up a little.


DIP_SWITCHES

 Sets the default setting for the keyboard DIP switches.


SOUND_OSS

 Use the OSS sound emulation code.


KEYMAP_STRICT
KEYMAP_LEGEND

 To use a keymap based on the positions on keys on the keyboard, #define
 KEYMAP_STRICT.  This is best for games.  To use a keymap based on the
 legend on any pressed key, #define KEYMAP_LEGEND.  This is probably
 easier if you're used to a certain keyboard layout and want to do lots
 of typing.


OS_ROM

 The name of the OS ROM image


LANG_ROM

 The name of the default language ROM image


SNAPSHOT_EXT

 The snapshot file extension.


DEF_SNAPSHOT

 The name of the default snapshot file -- if you just press return at
 the snapshot name prompt.


CAT_NAME

 The name of the catalog file in the emulated filing system.


TMP_FILE
TMP_CAT
BAK_FILE
BAK_CAT

 Names of temporary files and catalogs used whilst manipulating entries
 in the emulated filesystem.


Revision History
================

$Log: Configuration,v $
Revision 1.10  2000/09/02 18:48:25  james
Changed all VoxWare references to OSS

Revision 1.9  1996/10/13 17:12:39  james
Add local version of "strtoul" for those systems that don't have it.

Revision 1.8  1996/10/08 00:04:21  james
Added InfoWindow to show LED status.  Also required addition of the
SHIFTLOCK_SOUND_HACK to prevent the Shift Lock LED being light up
whenever the sound buffer is full, which means that far too much
time can be spent re-drawing the LED.

Revision 1.7  1996/10/07 22:59:39  james
Modified FASTCLOCK implementation to allow configuration of the number
of instructions between interrupts.

Revision 1.6  1996/10/07 22:06:24  james
Added XDFS ROM & support code from David Ralph Stacey.

Revision 1.5  1996/10/01 22:30:26  james
Added VoxWare sound code from James Murray <jsm@jsm-net.demon.co.uk>.

Revision 1.4  1996/10/01 22:09:51  james
Split keyboard handling into kEYMAP_STRICT and KEYMAP_LEGEND models.

Revision 1.3  1996/09/24 22:39:36  james
Massive overhaul of instruction decoding code.  Includes :

  Correct implementation of (indirect),Y instructions when overflow occurs,
  allowing the removal of the RANGE_CHECK directive for those instructions.

  Correct handling of address wrap-around for all zp,X and zp,Y
  instructions.  This removes the need for the RANGE_CHECK define.  Removed
  that, too.

  Updated all disassembly instructions to give the full number of hex
  digits when displaying their parameters.

  Split opcodes.h to give NMOS 6502 opcodes in 6502ops.h and EFS opcodes
  in EFSops.h

  Add all NMOS 6502 HALT opcodes.

  Add all NMOS 6502 NOP opcodes.

  Coded for the undocumented NMOS 6502 NOP operations so that
  they load a value from memory according to their addressing mode (but
  neither store it anywhere nor set any SR flags).

  Coded all other undocumented NMOS 6502 operations.

  Changed the EFS dummy opcodes because of a clash with the undocumented
  NMOS 6502 DCP instructions.  The new trap values are now codes that would
  normally halt the CPU.

  Added all the R65C02 opcodes.

  Added all the R65C12 opcodes.

  Correctly coded (zp,X) addressing mode where zp+X(+1) overlaps the
  page boundary.

  Added #defined values for the number of cycles taken by each instruction
  in 6502.h

  Added #defines for the original 6502 and Rockwell 65C02 and 65C12.

Revision 1.2  1996/09/24 18:22:30  james
Change LITTLE_ENDIAN #define to ENDIAN_6502 because of a clash with
header files on some systems.

Revision 1.1  1996/09/21 19:14:31  james
Added new documenation files : doc/Configuration doc/DataXfer
doc/DiskEmulation doc/Keyboard doc/KnownBugs doc/MailingLists doc/Options
doc/RomPatches doc/WorkingSoftware

