SDROM by Charlie Robson (SirMorris) and Kees van Oss.

To use the SDROM as a file system for a SD-card you need following components:

  • An Acorn Atom with memory at #2000 - #24FF
  • SD-card interface, an interface with a SD-card socket
  • SD-card, min 128 mB capacity for storing 1023 Atom-DOS-disc images
    Remark: not all SD-card can be used. I tested several and for me the Scandisk 2 gB card worked fine.
  • The SDROM is a utility ROM for the Acorn Atom for managing disk images on a SD-card.
    For storing disk images on a SD-card, you need a interface controlled by the VIA or addressed at #B400 (PL8).
The disk images can be accessed by the standard Atom DOS commands. The SDROM consists of 2 parts:
  • SD-card disk-image handling commands
  • Atom DOS compatible commands.

The SDROM is started by typing SDDOS on the command line.
A list of the commands can be displayed by entering *DHELP on the command line.

Parameters:
    <drv>  Drive number (0 to 3)
    <dno> Disk number (0 to 1022, The capacity of the SD-card has to be minimal 128 Mb)
    <dnf>  Disk Name Filter specification, i.e. first letter of disk name
Parameters in brackets are optional.
Note: If disk titles contain spaces they must be enclosed in quotes.

SD-CARD INTERFACE:

The SD-card interface is a PCB connected to PL6/7. The schematic looks like this:


SD-CARD FORMAT:

Before you can use the SD-card, it must be formatted in a special way. You can do this in several ways but I will describe 2 ways:

  1. Run a program on the Atom for formatting the SD-card.

     10 REM FORMAT SD-CARD
     20 REM ONLY FOR SDROM2.2!
     30
     40 DIM A(17)
     50 R=#F9;REM RWPTR
     60 T=#84;REM SECTOR
     70 L=#AE87;REM SD-SECTOR-W
     80
     90 $A="                ";REM 16 SPACES
    100 A?15=#F0
    110
    120 SDDOS
    130
    140 P.$12"SD-FORMAT V1.0"''
    150 F.S=0TO31
    160  P."FORMAT SD-SECTOR:"S$13
    170  IF S<>0;G.200
    180   !#2300=-1;!#2304=-1
    190   $#2308="SDDOS   ";REM 3 SPACES
    200  F.J=0TO15
    210   IF S=0 AND J=0;G.230
    220    $(#2300+J*16)=$A
    230  N.
    240  !R=#2300;!T=S
    250  LINK L
    260 N.
    270 P.'
    280 END

  2. Copy a sector-image to the SD-card with a program like HexWorkshop or DD.
    A copy of a sector-image can be found here.

    A small, very lightweight, python script may be found here which can take 100k Atom disk images and create a suitable sector-image. Instructions are part of the script.
GENERAL COMMANDS:

 

  SDDOS

 

Enters the SD-card Operating System.

 

  *DOS

 

Enters the standard Atom Disk Operating System.

 

  *COS

 

Enters the standard Atom 300 baud Cassette Operating System

 

COMMANDS TO HANDLE DISK-IMAGES ON SD-CARD:

 

  *DIN <drv>,<dno>

 

Insert specified disk into drive.

Example: *DIN 0,23

 

Note: A disk cannot be in more than one drive at a time. E.g. if Disk 200 is in Drive 0, and the

user enters *DIN 2,200 , Disk 200 will then be in Drive 2, and "No Disk" will be in Drive 0.

 

  *DCAT <from dno>,<to dno> (,<dnf>)

 

Lists formatted disks in disk number order.

An optional Disk Name Filter can be specified.

Example: *DCAT 10,20,G displays all (formatted) disks with numbers in the range 10 to

20 whose disk title begins with "G":

 

  12 GAMES 1       P

  19 GAMES 2       P

  21 GAMES 3       P

 

DISKS FOUND:    3

 

Note: "P" after the disk title indicates that the disk is locked "read-only", and the number of disks

found matching any specification is given at the bottom of the list.

 

  *DDISKS

 

Lists the drives and which disks are currently "inserted" plus their status.

Example: *DDISKS

 

0:    2 GAMES 1       P

1:  127 DATABASE      P

2:    -

3:    -

 

  *DPROT <dno>

 

Protects a disk so that it is read-only.

Example: *DPROT 123

 

  *DUNPROT <dno>

 

Unprotect a disk so that it can be written to.

Example: *DUNPROT 123

 

  *DFREE

 

Displays the number of unformatted disks, and the total number of formatted and unformatted disks.

Example: *DFREE

 

 1019 OF  1023 DISKS FREE

 

  *DKILL <dno>

 

Marks a disk as unformatted.

Example: *DKILL 483

 

KILL DISK:

  483 JUNK DISK     P :(Y/N) Y

 

NB: This command does not change any data on the disk -surface- and can be undone using *DRESTORE.

 

  *DRESTORE <dno>

 

Marks a previously unformatted disk as formatted.

Example: *DRESTORE 483

 

  *DNEW <drv>

 

Finds the first unformatted disk, formats it and places it in specified drive.

Example: *DNEW 0

 

DISK   100 IN DRIVE 0

 

  *DFORM <dno>

 

Formats the specified unformatted disk. This is similar to *DRESTORE but a blank catalogue is written to the disk "surface".

 

  *DONBOOT <drv>,<dno>

 

Defines which disks are in drives 0 to 3 when the SDROM is initialized.

Example: *DONBOOT 0,23

 

  *DHELP

 

Display list with *-commands to handle disk-images on SD-card

 

ATOM DOS COMMANDS:

 

  *CAT <drv>

 

Displays the catalogue. The first line shows the title of the disc and the current qualifier. The filenames are displayed arranged by qualifier, with '#' indicating that the file is locked. The catalogue is read when there was a disk change, otherwise it is transferred from the catalogue buffer (at #2000).

 

  *DELETE <filename>

 

Deletes the named file.

 

  *DIR <drv>

 

Reads the catalogue from disc to the buffer but does not display it.

 

  *DRIVE <drv>

 

Sets drive number without loading the catalogue

 

  *INFALL

 

            Displays information about all files on disk. The format is the same as *INFO

 

 

  *INFO <filename>

 

            Displays information about the named file. The format is:

 

     qualifier lock  filename load    execution length   start

               state          address address   in bytes sector

 

     s:          #   BASIC    C000    C2B2      00100     002

 

  *LOAD <filename> <loadaddress>

 

Loads the named file. The file is loaded into memory starting at <loadaddress>, or at the file's start address if this is missing.

 

  *LOCK <filename>

 

Locks the named file. Locked files cannot be deleted or updated.

 

  *MON

 

Turns on messages. Subsequent file operations print out the file's information in the format of *INFO.

 

  *NOMON

 

Turns off messages

 

  *RUN <filename> <string>

 

Load and run the named file, using the start and execution address. <string> is transferred to memory starting at #0100 with a terminating CR, where it can be accessed by the user's program.

 

  *SAVE <filename> <startaddress> <endaddress> <linkaddress>

 

Creates a file. The contents of memory from <startaddress> to <endaddress>-1 are saved as the named file. If a file with the same name already exists under the current qualifier, it is deleted. The address <linkaddress> is an optional execution address and it defaults to <startaddress> if not supplied.

 

  *SET<qual>

 

Sets the qualifier for all subsequent operations on files to <qual>. Operations that use existing files will only search among those created under the qualifier currently set. The default qualifier is space. When returning to the default qualifier, be sure to enter the space after the SET command.

 

  *TITLE <txt>

 

Sets the title of the disc to the first 13 characters of title.

 

  *UNLOCK <filename>

 

Unlocks the named file

 

  *USE<qual>

 

Temporarily sets the qualifier to <qual>. The system returns to the previous qualifier after the next successful operation. Two successive USE commands are equivalent to a SET.

 

  *<filename> <string>

 

Load and run the named file, using the start and execution address. <string> is transferred to memory starting at #0100 with a terminating CR, where it can be accessed by the user's program.