Wiki Home >> SIO-Command-$D6-Set-Boot-Mode

SIO-Command-$D6-Set-Boot-Mode


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

Set Boot Mode ($D6)

Description

Temporarily sets the boot mode for CONFIG Boot to one of two values when #FujiNet is reset:

ValueDescription
0Boot into CONFIG program
1Boot into mount-and-boot
2Boot into Game Lobby

Mount-and-boot is a simplified program which mounts the available disk slots.

Lobby is the multi-player game lobby.

Parameters

DCBValue
DDEVIC$70
DUNIT$01
DCOMND$D6
DSTATS0x00
DBUFNULL
DTIMLO$0F
DBYT0
DAUX1mode
DAUX20

Examples

CC65

/**
 * Set Boot Mode
 */
void set_boot_mode(unsigned char m)
{
  OS.dcb.ddevic=0x70;
  OS.dcb.dunit=1;
  OS.dcb.dcomnd=0xD6; // set boot mode
  OS.dcb.dstats=0x00; // No payload
  OS.dcb.dbuf=0x00;
  OS.dcb.dtimlo=0x0F; // 15 second timeout
  OS.dcb.dbyt=0;      
  OS.dcb.daux1=m;
  siov();

  return OS.dcb.dstats; // 1 = successful, anything else = error.
}

Wiki content is mirrored from the FujiNet Github Wiki