SIO Command $E7 New Disk - FujiNetWIFI/fujinet-firmware GitHub Wiki

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

DCB Value
DDEVIC $70
DUNIT $01
DCOMND $E7
DSTATS $80
DBUF newDisk buffer (262 bytes)
DTIMLO $E0
DBYT 42
DAUX1 0
DAUX2 0

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:

t description
0 Unadorned (.PO)
1 2MG

This makes the structure:

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

See Also

To be done