Boot Sequence

From SpecNext official Wiki
Jump to: navigation, search

The following is the assembled information about the startup sequence of the Spectrum Next.

  • When the machine is first switched on, the Anti-brick system loads a fixed Spectrum 48k and checks to see if a particular combination of physical buttons is being held down. If it does, the updater module (see below) is loaded from the SD card and run on the anti-brick core.
  • If this is not the case, the main core is reloaded into the FPGA from flash memory, which includes the IPL (Initial Program Loader) in RAM. The IPL displays the message "Loading..." (which appears only very briefly) and loads the file TBBLUE.FW from the root of the SD card. If this fails, an error message is displayed ("Error initializing SD card!"), the border turns red, and the code loops.
  • TBBLUE.FW contains 3 modules; by default the boot module is loaded. It reads the files Machines\Next\CONFIG.INI, Machines\Next\MENU.INI and Machines\Next\MENU.DEF from the SD card, and uses them to configure the default machine settings. It then loads 3 ROM images from the SD card: one for the DivMMC interface, one for the Multiface, and one for the Spectrum ROM itself. For more information on how this works, see https://gitlab.com/thesmog358/tbblue/-/blob/master/docs/config/config.txt
  • The TBBLUE loader then write-protects the areas of ROM, maps the addressable memory to the standard Spectrum layout, and resets the CPU.
  • The standard ROM setup is interrupted by DivMMC (how?) which runs the ESXDOS setup. This loads four files: SYS\ESXDOS.SYS, SYS\NMI.SYS, SYS\RTC.SYS and SYS\BETADISK.SYS. These are the user-layer software for ESXDOS, the NMI (non-maskable interrupt) driver for the DivMMC button, a real-time clock driver (?) and a TRDos Emulator layer for ESXDos.
  • The remaining Spectrum ROM setup runs, clearing the ULA screen and producing the Sinclair copyright message.