<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 12 Aug 1997 23:32:42 +0100 (BST)
From   : Mark Cooke <mpc@...>
Subject: !6502Em tape and snapshot documentation

Hi all,

I went to see Mike B. last weekend, and swiped a bunch of the !6502Em
documentation from him with permission to distribute it for comments.

Documents from 6502Em follow. Note that on the Archimedes a word is 4
bytes, not 2 as it is commonly defined on the PC and other platforms.

Notes on the tape format:

1. FF is used as a control character, with the following byte being the
   control byte. FF FF is an actual FF byte in the data stream from the
   tape.

Notes on the snapshot format:

1. Sideways roms other than the current one are not in the snapshot
   format.
2. Saving the current paged rom and OS rom is optional in the snapshot.
3. The script format referenced here will be in my next e-mail

Regards,

Mark


6502Em: Filetype BBCSnap (&BBC)
==============================

Acorn's filetype &BBC (BBC ROM) has been extended by 6502Em

If the first line of the file is one of the following:

BBC Script
BBC Tapefile
BBC Snapshot
BBC Snapshot101

then it is a new type of file, otherwise it is still
a sideways ROM image (which 6502Em will also load)

BBC Snapshot files are saved out by the emulator, and
contain the complete state of the emulator at the moment
it was saved.

BBC Tapefile files can be accessed from the emulator using
the casette filing system (selected by *TAPE)

BBC Script files are described in 'Scripts'

File format of 'BBC Tapefile'

FF 04 : DCD bit goes high (ie data carrier STOPs and interrupt occurs)
FF 00 : DCD bit goes low (ie data carrier STARTs and NO interrupt)
FF FF : FF byte from tape hardware
nn    : (not FF) byte from tape hardware

File format of 'BBC Snapshot101'

NB if a location is "unused", any information in it will be discarded
when the snapshot is loaded. The information saved out is included for
completeness.

String : "BBC Snapshot101"+CHR$ &0A (ie 16 bytes)

256 bytes (Sheila, &FE00-&FEFF)
Contains the raw values written to memory locations

Word : 6502's Accumulator in top 8 bits
Word : 6502's X register in top 8 bits
Word : 6502's Y register in top 8 bits
Word : 6502's Flags register in bottom 8 bits
Word : 6502's Stack Pointer in top 8 bits
Word : 6502's Program Counter in top 16 bits
Word : unused (Timer 1 mode)
Word : Timer 2 mode (0=no further interrupts)
Word : unused (Timer 3 mode)
Word : Timer 4 mode (0=no further interrupts)
Word : Timer 1          }
Word : Timer 1 latch    }
Word : Timer 2          }
Word : Timer 2 latch    } NB top two bytes
Word : Timer 3          }
Word : Timer 3 latch    }
Word : Timer 4          }
Word : Timer 4 latch    }
Word : Counter to vsync                  }  NB bottom two bytes
Word : unused (Latch for above, &9C40)   }
Word : unused (time until next interrupt)
Word : unused (timer, used by sound code)
Byte : System VIA's IFR
Byte : System VIA's IER
Byte : User VIA's IFR
Byte : User VIA's IER
Word : unused (arc_screenstart)
Word : unused (tamper)
Word : unused (cursor_tamper)
Word : unused (romsel_on)
Word : Sheila &30 (ROMSEL)
Word } 
Word } one byte for each ROM socket - 0=ROM, 1=RAM, 2=unused
Word }
Word }
Word : Sheila &20
Word }
Word }
Word }  6845 CRT's registers
Word }  ("register 19" contains contents of addressable latch)
Word }
Word : unused
Word : unused
Word } 
Word } Palette Registers
Word }
Word }
Word : unused (palette_on)
Word : ACCCON
Byte : unused (patch_on)
Byte : unused (pal_tamper)
Byte : unused (lastmode)
Byte : Sheila &FE10
Word : unused (tapecount)
Word : unused (keyaddr)
Word : unused (screenstart_tamper)
Word : unused (screenstart_previous)

Padding up to &210 bytes followed by memory dump
(any size up to &10000, usually &8000 or &C000 bytes)

Mark Cooke                  The views expressed above are mine and are not
Systems Programmer          necessarily representative of university policy
University Of Birmingham    URL: http://www.sr.bham.ac.uk/~mpc/


<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>