This is Info file vice.info, produced by Makeinfo version 1.68 from the
input file vice.texi.

START-INFO-DIR-ENTRY
* VICE: (vice).        VICE, the Versatile Commodore Emulator.
END-INFO-DIR-ENTRY

   VICE Manual

   Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

   Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.



File: vice.info,  Node: VIC20 memory module,  Next: PET memory module,  Prev: C128 memory module,  Up: Module formats

VIC20 memory module
...................

   The VIC20 memory module actually consists of two modules.  The
"VIC20MEM" module is mandatory and contains the RAM dump.  The
"VIC20ROM" module is optional and contains a dump of the ROM images.

   The size of the VIC20 memory modules differs with each different
memory configuration. The RAM configuration is saved in the snapshot,
and restored when the snapshot is loaded. The attached cartridges are
also restored upon load if they have been saved in the snapshot.

   The VIC20MEM module

   Version numbers: Major 1, Minor 0

Type    Name                          Description                          
BYTE    CONFIG                        Configuration register.  Bits        
                                      0,1,2,3,5 reflect if the             
                                      corresponding memory block is RAM    
                                      (bit=1) or not (bit=0).              
ARRAY   RAM0                          1k RAM dump $0000-$03ff              
ARRAY   RAM1                          4k RAM dump $1000-$1fff              
ARRAY   COLORRAM                      2k Color RAM, $9400-$9bff            
ARRAY   BLK0                          if CONFIG & 1 then: 3k RAM dump      
                                      $0400-$0fff                          
ARRAY   BLK1                          if CONFIG & 2 then: 8k RAM dump      
                                      $2000-$3fff                          
ARRAY   BLK2                          if CONFIG & 4 then: 8k RAM dump      
                                      $4000-$5fff                          
ARRAY   BLK3                          if CONFIG & 8 then: 8k RAM dump      
                                      $6000-$7fff                          
ARRAY   BLK5                          if CONFIG & 32 then: 8k RAM dump     
                                      $a000-$bfff                          

   The VIC20ROM module

   Version numbers: Major 1, Minor 1

Type    Name                          Description                          
BYTE    CONFIG                        Bit 0: 1= ROM block $2*** enabled.   
                                      Bit 1: 1= ROM block $3*** enabled.   
                                      Bit 2: 1= ROM block $4*** enabled.   
                                      Bit 3: 1= ROM block $5*** enabled.   
                                      Bit 4: 1= ROM block $6*** enabled.   
                                      Bit 5: 1= ROM block $7*** enabled.   
                                      Bit 6: 1= ROM block $A*** enabled.   
                                      Bit 7: 1= ROM block $B*** enabled.   
ARRAY   KERNAL                        8k KERNAL ROM image $e000-$ffff      
ARRAY   BASIC                         16k BASIC ROM image $c000-$dfff      
ARRAY   CHARGEN                       4k CHARGEN ROM image                 
ARRAY   BLK1A                         4k ROM image $2*** (if CONFIG & 1)   
ARRAY   BLK1B                         4k ROM image $3*** (if CONFIG & 2)   
ARRAY   BLK3A                         4k ROM image $6*** (if CONFIG & 16)  
ARRAY   BLK3B                         4k ROM image $7*** (if CONFIG & 32)  
ARRAY   BLK5A                         4k ROM image $A*** (if CONFIG & 64)  
ARRAY   BLK5B                         4k ROM image $B*** (if CONFIG & 128) 
ARRAY   BLK2A                         4k ROM image $4*** (if CONFIG & 4;   
                                      added in V1.1)                       
ARRAY   BLK2B                         4k ROM image $5*** (if CONFIG & 8;   
                                      added in V1.1)                       


File: vice.info,  Node: PET memory module,  Next: CBM-II memory module,  Prev: VIC20 memory module,  Up: Module formats

PET memory module
.................

   The PET memory module actually consists of two modules.  The
"PETMEM" module is mandatory and contains the RAM dump.  The "PETROM"
module is optional and contains a dump of the ROM images.

   The size of the PET memory modules differs with each different memory
configuration.  The RAM configuration is saved in the snapshot, and
restored when the snapshot is loaded.

   The PETMEM module

   Version numbers: Major 1, Minor 2

Type    Name                          Description                          
BYTE    CONFIG                        Configuration value. Bits 0-3: 0=    
                                      40 col PET without CRTC; 1= 40 col   
                                      PET with CRTC; 2 = 80 col PET (with  
                                      CRTC); 3= SuperPET; 4= 8096; 5=      
                                      8296. Bit 6: 1= RAM at $9***. Bit    
                                      7: 1= RAM at $A***.                  
BYTE    KEYBOARD                      Keyboard type. 0= UK business; 1=    
                                      Graphics; 2= German business         
BYTE    MEMSIZE                       memory size of low 32k in k          
                                      (possible values 4, 8, 16, 32)       
BYTE    CONF8X96                      Value of the 8x96 configuration      
                                      register                             
BYTE    SUPERPET                      SuperPET config. Bit 0: 1= $9***     
                                      RAM enabled. Bit 1: 1= RAM write     
                                      protected. Bit 2: 1= CTRL register   
                                      write protected. Bit 3: 0= DIAG pin  
                                      active. Bits 4-7: RAM block in use.  
ARRAY   RAM                           4-32k RAM (not 8296, size depends    
                                      on MEMSIZE)                          
ARRAY   VRAM                          2/4k RAM (not 8296, size depends on  
                                      CONFIG)                              
ARRAY   EXTRAM                        64k expansion RAM (SuperPET and      
                                      8096 only)                           
ARRAY   RAM                           128k RAM (8296 only)                 
-       -                             The following item has been added    
                                      in V1.1                              
BYTE    POSITIONAL                    bit 0=0 = symbolic keyboard          
                                      mapping, bit 0=1 = positional        
                                      mapping.                             
-       -                             The following item has been added    
                                      in V1.1                              
BYTE    EOIBLANK                      bit 0=0 = EOI does not blank         
                                      screen, bit 0=1 = EOI blanks screen. 

   The last item has been added in PETMEM snapshot version 1.1. It is
ignored by earlier restore routines (V1.0) and the V1.1 restore routines
do not change the current setting when reading a V1.0 snapshot.

   In V1.2 the new EOIBLANK variable has been added. This implements
the "blank screen on EOI" feature that was previously linked to a wrong
resource.

   The PETROM module

   Version numbers: Major 1, Minor 0

Type    Name                          Description                          
BYTE    CONFIG                        Bit 0: 1= $9*** ROM included. Bit    
                                      1: 1= $A*** ROM included. Bit 2: 1=  
                                      $B*** ROM included. Bit 3: 1=        
                                      $e900-$efff ROM included             
ARRAY   KERNAL                        4k KERNAL ROM image $f000-$ffff      
ARRAY   EDITOR                        2k EDITOR ROM image $e000-$e7ff      
ARRAY   CHARGEN                       2k CHARGEN ROM image                 
ARRAY   ROM9                          4k $9*** ROM image (if CONFIG & 1)   
ARRAY   ROMA                          4k $A*** ROM image (if CONFIG & 2)   
ARRAY   ROMB                          4k $B*** ROM image (if CONFIG & 4)   
ARRAY   ROMC                          4k $C*** ROM image                   
ARRAY   ROMD                          4k $D*** ROM image                   
ARRAY   ROME9                         7 blocks $e900-$efff ROM image (if   
                                      CONFIG & 8)                          


File: vice.info,  Node: CBM-II memory module,  Next: C500 data module,  Prev: PET memory module,  Up: Module formats

CBM-II memory module
....................

   The CBM-II memory module actually consists of two modules.  The
"CBM2MEM" module is mandatory and contains the RAM dump.  The "CBM2ROM"
module is optional and contains a dump of the ROM images.

   The size of the CBM-II memory modules differs with each different
memory configuration.  The RAM configuration is saved in the snapshot,
and restored when the snapshot is loaded.

   Version numbers: Major 1, Minor 0

   The CBM2MEM module

Type    Name                          Description                          
UBYTE   MEMSIZE                       Memory size in 128k blocks (1=128k,  
                                      2=256k, 4=512k, 8=1024k)             
UBYTE   CONFIG                        Bit 0 = $f0800-$f0fff RAM, Bit 1 =   
                                      $f1000-$f1fff RAM, Bit 2 =           
                                      $f2000-$f3fff RAM, Bit 3 =           
                                      $f4000-$f5fff RAM, Bit 4 =           
                                      $f6000-$f7fff RAM, Bit 5 =           
                                      $fc000-$fcfff RAM, Bit 6 = is a C500 
UBYTE   HWCONFIG                      Bit 0/1: model line configuration    
UBYTE   EXECBANK                      CPUs execution bank register         
UBYTE   INDBANK                       CPUs indirection bank register       
ARRAY   SYSRAM                        2k system RAM $f0000-$f07ff          
ARRAY   VIDEO                         2k video RAM $fd000-$fd7ff           
ARRAY   RAM                           RAM dump, size according to MEMSIZE  
ARRAY   RAM08                         if memsize < 1M and CONFIG & 1 : 2k  
                                      RAM $f0800-$f0fff                    
ARRAY   RAM1                          if memsize < 1M and CONFIG & 2 : 4k  
                                      RAM $f1000-$f1fff                    
ARRAY   RAM2                          if memsize < 1M and CONFIG & 4 : 8k  
                                      RAM $f2000-$f3fff                    
ARRAY   RAM4                          if memsize < 1M and CONFIG & 8 : 8k  
                                      RAM $f4000-$f5fff                    
ARRAY   RAM6                          if memsize < 1M and CONFIG & 16 :    
                                      8k RAM $f6000-$f7fff                 
ARRAY   RAMC                          if memsize < 1M and CONFIG & 32 :    
                                      4k RAM $fc000-$fcfff                 

   The RAM* arrays are only saved if the RAM itself is less than 1M.
If the memory size is 1M then those areas are taken from the bank 15
area of the normal RAM.

   The memory array starts at $10000 if the memory size is less than
512k, or at $00000 if 512k or more. In case of a C510, then the memory
array also always starts at $00000.

   The CBM2ROM module

Type    Name                          Description                          
UBYTE   CONFIG                        Bit 1: 1= $1*** ROM image included.  
                                      Bit 2: 1= $2000-$3fff ROM image      
                                      included. Bit 3: 1= $4000-$5fff ROM  
                                      image included. Bit 4: 1=            
                                      $6000-$7fff ROM image included. Bit  
                                      5: 1= chargen ROM is VIC-II          
                                      chargen, 0= CRTC chargen.            
ARRAY   KERNAL                        8 KERNAL ROM image ($e000-$efff)     
ARRAY   BASIC                         BASIC ROM image ($8000-$bfff)        
ARRAY   CHARGEN                       4k CHARGEN ROM image                 
ARRAY   ROM1                          4k cartridge ROM image for $1***     
                                      (if CONFIG & 2)                      
ARRAY   ROM2                          8k cartridge ROM image for           
                                      $2000-$3fff (if CONFIG & 4)          
ARRAY   ROM4                          8k cartridge ROM image for           
                                      $4000-$5fff (if CONFIG & 8)          
ARRAY   ROM6                          8k cartridge ROM image for           
                                      $6000-$7fff (if CONFIG & 16)         


File: vice.info,  Node: C500 data module,  Prev: CBM-II memory module,  Up: Module formats

C500 data module
................

   The C500 data module contains simple state information not already
saved in the other modules.

   Version numbers: Major 0, Minor 0

   The C500DATA module

Type    Name                          Description                          
DWORD   IRQCLK                        CPU clock ticks till next 50Hz IRQ   


File: vice.info,  Node: Monitor,  Next: c1541,  Prev: Snapshots,  Up: Top

Monitor
*******

   Every VICE emulator has a complete built-in monitor, which can be
used to examine, disassemble and assemble machine language programs, as
well as debug them through breakpoints.  It can be activated by using
the "Activate monitor" command (left button menu).  Notice that you have
to run the emulator from a terminal emulation program (such as `rxvt'
or `xterm') in order to use the monitor.

   Warning: this version of the monitor is still under construction,
and some of the features are not fully working yet.

* Menu:

* Terminology::
* Machine state commands::
* Memory commands::
* Assembly commands::
* Checkpoint commands::
* General commands::
* Disk commands::
* Command file commands::
* Label commands::
* Miscellaneous commands::


File: vice.info,  Node: Terminology,  Next: Machine state commands,  Prev: Monitor,  Up: Monitor

Terminology
===========

`address_space'
     This refers to the range of memory locations and a set of
     registers.  This can be the addresses available to the computer's
     processor, the disk drive's processor or a specific memory
     configuration of one of the mentioned processors.

`bankname'
     The CPU can only see 64k of memory at any one time, due to its 16
     bit address bus. The C64 and other computers have more than this
     amount, and this is handled by banking: a memory address can have
     different contents, depending on the active memory bank.  A
     bankname names a specific bank in the current address_space.

`register'
     One of the following: program counter (PC), stack pointer (SP),
     accumulator (A), X register (X), or Y register (Y).

`address'
     A specific memory location in the range $0000 to $FFFF.

`address_range'
     Two addresses.  If the second address is less than the first, the
     range is assumed to wraparound from $FFFF to $0000.  Both
     addresses must be in the same address space.

`address_opt_range'
     An address or an address range.

`prompt'
     The prompt has the format [x:y].  If x is -, memory reads from the
     monitor do not have side effects.  Otherwise, x is S.  The second
     part of the prompt, y, shows the default address space.

`checkpoint'
     The monitor has the ability to setup triggers that perform an
     action when a specified situation occurs.  There are three types
     of checkpoints; breakpoints, tracepoints and watchpoints.

`breakpoint'
     A breakpoint is triggered based on the program counter.  When it is
     triggered, the monitor is entered.

`tracepoint'
     Like breakpoints, a tracepoint is triggered based on the program
     counter.  Instead of entering the monitor, the program counter is
     printed and execution continues.

`watchpoint'
     Watchpoints are triggered by a read and/or write to an address.
     When a watchpoint is triggered, the monitor is entered.

`<...>'
     A data type.

`*'
     Zero or more occurrences.

`[...]'
     An optional argument.


File: vice.info,  Node: Machine state commands,  Next: Memory commands,  Prev: Terminology,  Up: Monitor

Machine state commands
======================

`goto <address>'
     Change the PC to address and continue execution.

`io'
     Nothing yet.  Will display VIC/VIA/CIA/SID registers.

`next [<count>]'
     Advance to the next instruction.  Subroutines are treated as a
     single instruction.

`registers [<reg_name> = <number> [, <reg_name> = <number>]*]'
     Assign respective registers.  With no parameters, display register
     values.

`return'
     Continues execution  and returns to the monitor just after the
     next RTS or RTI is executed.

`step [<count>]'
     Single step through instructions.  An optional count allows
     stepping more than a single instruction at a time.


File: vice.info,  Node: Memory commands,  Next: Assembly commands,  Prev: Machine state commands,  Up: Monitor

Memory commands
===============

`bank [<bankname>]'
     Without a bankname, display all available banks for the current
     address_space. With a bankname given, switch to the specified
     bank. If a bank is not completely filled (ROM banks for example)
     normally the `ram' bank is used where the bank has holes.  The
     `cpu' bank uses the bank currently used by the CPU.

`compare <address_range> <address>'
     Compare memory from the source specified by the address range to
     the destination specified by the address.  The regions may
     overlap.  Any values that miscompare are displayed using the
     default displaytype.

`device [c:|8:|9:]'
     Set the default address space to either the computer `c:' or the
     specified drive `8:' or `9:'

`fill <address_range> <data_list>'
     Fill memory in the specified address range with the data in
     <data_list>.  If the size of the address range is greater than the
     size of the data_list, the data_list is repeated.

`hunt <address_range> <data_list>'
     Hunt memory in the specified address range for the data in
     <data_list>.  If the data is found, the starting address of the
     match is displayed.  The entire range is searched for all possible
     matches.

`i <address_opt_range>'
     Display memory contents as PETSCII text.

`m [<data_type>] [<address_opt_range>]'
     Display the contents of memory.  If no datatype is given, the
     default is used.  If only one address is specified, the length of
     data displayed is based on the datatype.  If no addresses are
     given, the 'dot' address is used.

`mc [<data_type>] [<address_opt_range>]'
     Display the contents of memory as character data.  If only one
     address is specified, only one character is displayed.  If no
     addresses are given, the "dot" address is used.

`ms [<data_type>] [<address_opt_range>]'
     Display the contents of memory as sprite data.  If only one
     address is specified, only one sprite is displayed.  If no
     addresses are given, the "dot" address is used.

`move <address_range> <address>'
     Move memory from the source specified by the address range to the
     destination specified by the address.  The regions may overlap.

`sidefx [on|off|toggle]'
     Control how monitor generated reads affect memory locations that
     have read side-effects, like CIA interrupt registers for example.
     If the argument is 'on' then reads may cause side-effects.  If the
     argument is 'off' then reads don't cause side-effects.  If the
     argument is 'toggle' then the current mode is switched.  No
     argument displays the current state.

`> [<address>] <data_list>'
     Write the specified data at `address'.


File: vice.info,  Node: Assembly commands,  Next: Checkpoint commands,  Prev: Memory commands,  Up: Monitor

Assembly commands
=================

`a <address> [ <instruction> [: <instruction>]* ]'
     Assemble instructions to the specified address.  If only one
     instruction is specified, enter assembly mode (enter an empty line
     to exit assembly mode).

`d [<address> [<address>]]'
     Disassemble instructions.  If two addresses are specified, they
     are used as a start and end address.  If only one is specified, it
     is treated as the start address and a default number of
     instructions are disassembled.  If no addresses are specified, a
     default number of instructions are disassembled from the dot
     address.


File: vice.info,  Node: Checkpoint commands,  Next: General commands,  Prev: Assembly commands,  Up: Monitor

Checkpoint commands
===================

`break [<address> [if <cond_expr>] ]'
     This command allows setting a breakpoint or listing the current
     breakpoints.  If no address is given, the currently valid
     checkpoints are printed.  If an address is given, a breakpoint is
     set for that address and the breakpoint number is printed.  A
     conditional expression can also be specified for the breakpoint.
     For more information on conditions, see the CONDITION command.

`enable <checknum>'

`disable <checknum>'
     Each checkpoint can be enabled or disabled.  This command allows
     changing between these states.

`command <checknum> "<command>"'
     When checkpoint `checknum' is hit, the specified command is
     executed by the monitor.  Note that the `x' command is not yet
     supported as a command argument.

`condition <checknum> if <cond_expr>'
     Each time the specified checkpoint is examined, the condition is
     evaluated.  If it evalutes to true, the checkpoint is activated.
     Otherwise, it is ignores.  If registers are specified in the
     expression, the values used are those at the time the checkpoint
     is examined, not when the condition is set.

`delete <checknum>'
     Delete the specified checkpoint.

`ignore <checknum> [<count>]'
     Ignore a checkpoint after a given number of crossings.  If no
     count is given, the default value is 1.

`trace [address [address]]'
     This command is similar to the `break' command except that it
     operates on tracepoints.  A tracepoint differs from a breakpoint
     by not stopping execution but simply printing the PC, giving the
     user an execution trace.  The second optional address can be used
     to specify the end of an range of addresses to be traced.

`watch [loadstore] [address [address]]'
     This command is similar to the previous two commands except that it
     operates on watchpoints.  A watchpoint differs from the others by
     stopping on a read and/or write to an address or range of
     addresses.  If no addresses are given, a list of all the
     watchpoints is printed.  The loadstore parameter can be either
     "load" or "store" to determine on which operation the monitor
     breaks. If not specified, the monitor breaks on both operations.


File: vice.info,  Node: General commands,  Next: Disk commands,  Prev: Checkpoint commands,  Up: Monitor

General commands
================

`cd <directory>'
     Change the working directory.

`device [c:|d:]'
     Set the default memory device to either the computer (`c:') or the
     disk (`d:').

`radix [H|D|O|B]'
     Set the default radix to hex, decimal, octal, or binary.  With no
     argument, the current radix is printed.

`sidefx [on|off|toggle]'
     Control how monitor generated reads affect memory locations that
     have read side-effects.  If the argument is 'on' then reads may
     cause side-effects.  If the argument is 'off' then reads don't
     cause side-effects.  If the argument is 'toggle' then the current
     mode is switched.  No argument displays the current state.

`system <system command>'
     Nothing yet.


File: vice.info,  Node: Disk commands,  Next: Command file commands,  Prev: General commands,  Up: Monitor

Disk commands
=============

`br <track> <sector> [<address>]'
     Read the block at the specified track and sector.  If an address is
     specified, the data is loaded into memory.  If no address is
     given, the data is displayed using the default datatype.

`bw <track> <sector> <address>'
     Write a block of data at `address' to the specified track and
     sector of disk in drive 8.

`@<disk command>'
     Perform a disk command on the currently attached disk image on
     drive 8.  The specified disk command is sent to the drive's
     channel #15.

`load "<filename>" <address>'
     Load the specified file into memory at the specified address.

`save "<filename>" <address1> <address2>'
     Save the memory from address1 to address2 to the specified file.


File: vice.info,  Node: Command file commands,  Next: Label commands,  Prev: Disk commands,  Up: Monitor

Command file commands
=====================

`playback "<filename>"'
     Monitor commands from the specified file are read and executed.
     This command stops at the end of file or when a STOP command is
     read.

`record "<filename>"'
     After this command, all commands entered are written to the
     specified file until the STOP command is entered.

`stop'
     Stop recording commands.  See `record'.


File: vice.info,  Node: Label commands,  Next: Miscellaneous commands,  Prev: Command file commands,  Up: Monitor

Label commands
==============

`add_label <address> <label>'
     Map a given address to a label.  This label can be used when
     entering assembly code and is shown during disassembly.

`delete_label [<memspace>] <label>'
     Remove the specified label from the label tables.  If no memory
     space is checked, all tables are checked.

`load_labels [<memspace>] "<filename>"'
     Load a file containing a mapping of labels to addresses.  If no
     memory space is specified, the default readspace is used.

`save_labels [<memspace>] "<filename>"'
     Save labels to a file.  If no memory space is specified, all of the
     labels are saved.

`show_labels [<memspace>]'
     Display current label mappings.  If no memory space is specified,
     show all labels.


File: vice.info,  Node: Miscellaneous commands,  Prev: Label commands,  Up: Monitor

Miscellaneous commands
======================

`exit'
     Leave the monitor and return to execution.

`print <expression>'
     Evaluate the specified expression and output the result.

`quit'
     Exit the emulator immediately.

`~ <number>'
     Display the specified number in decimal, hex, octal and binary.


File: vice.info,  Node: c1541,  Next: File formats,  Prev: Monitor,  Up: Top

c1541
*****

   VICE is provided with a complete stand-alone disk image maintenance
utility, called `c1541'.

   You can either invoke it from the command line or from within one of
the VICE emulators, using the "Run c1541" command which will open a new
`xterm' window with a running `c1541' in it.

   The syntax is:

     c1541 [IMAGE1 [IMAGE2]] [COMMAND1 COMMAND2 ... COMMANDN]

   `IMAGE1' and `IMAGE2' are disk image names that can be attached
before `c1541' starts.  `c1541' can handle up to two disk images at the
same time by using two virtual built-in drives, numbered `8' and `9';
`IMAGE1' (if present) is always attached to drive `8', while `IMAGE2'
is attached to drive `9'.

   `COMMAND's specified on the command-line all begin with the minus
sign (`-'); if present, `c1541' executes them in the same order as they
are on the command line and returns a zero error code if they were
successful.  If any of the `COMMAND's fails, `c1541' stops and returns
a nonzero error code.

   If no `COMMAND's are specified at all, `c1541' enters interactive
mode, where you can type commands manually.  Commands in interactive
mode are the same as commands in batch mode, but do not require a
leading `-'.  As with the monitor, file name completion and command
line editing with history are provided via GNU `readline'.  Use the
command `quit' or press `C-d' to exit.

* Menu:

* c1541 file specification::
* c1541 quoting::
* c1541 commands and options::
* c1541 executing shell commands::


File: vice.info,  Node: c1541 file specification,  Next: c1541 quoting,  Prev: c1541,  Up: c1541

Specifying files in c1541
=========================

   When accessing CBM DOS files (i.e. files that reside on disk images),
c1541 uses a special syntax that lets you access files on both drive 8
and 9.  If you prepend the file name with `@8:' or `@9:', you will
specified that file is to be found or created on drive 8 and 9,
respectively.

   For instance,

     @8:somefile

   will name file named `somefile' on unit 8, while

     @9:somefile

   will name file named `somefile' on unit 9.


File: vice.info,  Node: c1541 quoting,  Next: c1541 commands and options,  Prev: c1541 file specification,  Up: c1541

Using quotes and backslashes
============================

   You can use quotes (`"') in a command to embed spaces into file
names.  For instance,

     read some file

   will read file `some' from the disk image and write it into the file
system as `file', while

     read "some file"

   will copy `some file' into the file system, with the name `some
file'.

   The backslash character (`\') has a special meaning too: it lets you
literally insert the following character no matter what it is.  For
example,

     read some\ file

   will copy file `some file' into the file system, while

     read some\ file this\"file

   will copy `some file' into the file system with name `this"file'
(with an embedded quote).


File: vice.info,  Node: c1541 commands and options,  Next: c1541 executing shell commands,  Prev: c1541 quoting,  Up: c1541

c1541 commands and options
==========================

   This is a list of the `c1541' commands.  They are shown in their
interactive form, without the leading `-'.  Square brackets [] indicate
an optional part, and "<COMMAND>" translates to a disk command
according to CBM DOS, like "i0" for example.

` [<command>]'
     Execute specified CBM DOS command and print the current status of
     the drive.  If no `command' is specified, just print the status.

`? [<command>]'
     Explain specified command.  If no command is specified, list
     available ones.

`attach <diskimage> [<unit>]'
     Attach `diskimage' to `unit' (default unit is 8).

`block <track> <sector> <disp> [<drive>]'
     Show specified disk block in hex form.

`copy <source1> [<source2> ... <sourceN>] <destination>'
     Copy `source1' ... `sourceN' into destination.  If N > 1,
     `destination' must be a simple drive specifier (`@n:').

`delete <file1> [<file2> ... <fileN>]'
     Delete the specified files.

`exit'
     Exit (same as `quit').

`extract'
     Extract all the files to the file system.

`format <diskname,id> [<type> <imagename>] [<unit>]'
     If `unit' is specified, format the disk in unit `unit'.  If `type'
     and `imagename' are specified, create a new image named
     `imagename', attach it to unit 8 and format it.  `type' is a disk
     image type, and must be either `x64', `d64' (both VC1541/2031),
     `g64' (VC1541/2031 but in GCR coding), `d71' (VC1571), `d81'
     (VC1581), `d80' (CBM8050) or `d82' (CBM8250/1001).  Otherwise,
     format the disk in the current unit, if any.

`gcrformat <diskname,id> <imagename>'
     Create and format a G64 disk image named `imagename'.

`help [<command>]'
     Explain specified command.  If no command is specified, list
     available ones.

`info [<unit>]'
     Display information about unit `unit' (if unspecified, use the
     current one).

`list [<pattern>]'
     List files matching `pattern' (default is all files).

`quit'
     Exit (same as `exit').

`read <source> [<destination>]'
     Read `source' from the disk image and copy it into `destination' in
     the file system.  If `destination' is not specified, copy it into a
     file with the same name as `source'.",

`rename <oldname> <newname>'
     Rename `oldname' into `newname'.  The files must be on the same
     drive.

`tape <t64name> [<file1> ... <fileN>]'
     Extract files from a T64 image.

`unit <number>'
     Make unit `number' the current unit.

`unlynx <lynxname> [<unit>]'
     Extract the specified Lynx image file into the specified unit
     (default is the current unit).

`validate [<unit>]'
     Validate the disk in unit `unit'.  If `unit' is not specified,
     validate the disk in the current unit.

`write <source> [<destination>]'
     Write `source' from the file system into `destination' on a disk
     image.

`zcreate <x64name> <zipname> [<label,id>]'
     Create an X64 disk image out of a set of four Zipcoded files named
     `1!zipname', `2!zipname', `3!zipname' and `4!zipname'.


File: vice.info,  Node: c1541 executing shell commands,  Prev: c1541 commands and options,  Up: c1541

Executing shell commands
========================

   If you want to execute a shell command from withing `c1541', just
prepend it with an exclamation mark (`!').  For example,

     !ls -la

   will execute the command `ls -la', which will show you all the files
in the current directory.


File: vice.info,  Node: File formats,  Next: Acknowledgments,  Prev: c1541,  Up: Top

The emulator file formats
*************************

   This chapter gives a technical description of the various files
supported by the emulators.

* Menu:

* T64::                         The tape image format
* G64::                         The GCR-encoded disk image format


File: vice.info,  Node: T64,  Next: G64,  Prev: File formats,  Up: File formats

The T64 tape image format
=========================

   (This section was taken from the C64S distribution.)

   The `T64' File Structure was developed by Miha Peternel for use in
the C64S emulator.  It is easy to use and allows future extensions.

* Menu:

* T64 file structure::
* T64 tape record::
* T64 file record::


File: vice.info,  Node: T64 file structure,  Next: T64 tape record,  Prev: T64,  Up: T64

T64 File structure
------------------

Offset                 Size                   Description                   
0                      64                     tape record                   
64                     32*n                   file records for n directory  
                                              entries                       
64+32*n                varies                 binary contents of the files  


File: vice.info,  Node: T64 tape record,  Next: T64 file record,  Prev: T64 file structure,  Up: T64

Tape Record
-----------

Offset                 Size                   Description                   
0                      32                     DOS tape description + EOF    
                                              (for type)                    
32                     2                      tape version ($0200)          
34                     2                      number of directory entries   
36                     2                      number of used entries (can   
                                              be 0 in my loader)            
38                     2                      free                          
40                     24                     user description as           
                                              displayed in tape menu        


File: vice.info,  Node: T64 file record,  Prev: T64 tape record,  Up: T64

File record
-----------

Offset                 Size                   Description                   
0                      1                      entry type (see below)        
1                      1                      C64 file type                 
2                      2                      start address                 
4                      2                      end address                   
6                      2                      free                          
8                      4                      offset of file contents       
                                              start within T64 file         
12                     4                      free                          
16                     16                     C64 file name                 

   Valid entry types are:

Code                   Explanation                                        
`0'                    free entry                                         
`1'                    normal tape file                                   
`2'                    tape file with header: header is saved just        
                       before file data                                   
`3'                    memory snapshot v0.9, uncompressed                 
`4'                    tape block                                         
`5'                    digitized stream                                   
`6' ... `255'          reserved                                           

   Notes:

   * VICE only supports file type `1'.

   * Types `3', `4' and `5' are subject to change (and are rarely
     used).

