Wiki Home >> SIO-Command-$E7-New-Disk

SIO-Command-$E7-New-Disk


This is a command for Device $70 - The FujiNet Device itself (see SIO-Commands-for-Device-ID-$70).

New Disk ($E7)

Description

Given the following parameters:

  • Number of total sectors
  • Sector Size
  • Host Slot
  • Device Slot

Create a new, blank disk image on the specified host.

Parameters

DCBValue
DDEVIC$70
DUNIT$01
DCOMND$E7
DSTATS$80
DBUFnewDisk buffer (262 bytes)
DTIMLO$E0
DBYT42
DAUX10
DAUX20

Examples

C

union
{
  struct
  {
    unsigned short numSectors;
    unsigned short sectorSize;
    unsigned char hostSlot;
    unsigned char deviceSlot;
    char filename[256];
  };
  unsigned char rawData[262];
} newDisk;
       
    OS.dcb.ddevic=0x70;
    OS.dcb.dunit=1;
    OS.dcb.dcomnd=0xE7;
    OS.dcb.dstats=0x80;
    OS.dcb.dbuf=&newDisk.rawData;
    OS.dcb.dtimlo=0x0f;
    OS.dcb.dbyt=42;
    OS.dcb.daux=0; 
    siov();
    

Apple II specific

For Apple II, an additional field 't' was added to specify disk image type:

tdescription
0Unadorned (.PO)
12MG

This makes the structure:

offsetDescription
0Length (LO)
1Length (HI)
2Host Slot (0-7)
3Disk slot (0-3)
4Type (0 = PO, 1 = 2MG)
5-8# of blocks
9-263Path

See Also

To be done


Wiki content is mirrored from the FujiNet Github Wiki