Loading sequence - retrotruestory/M1DEV GitHub Wiki

Based on the bootloader code analysis for Magic-1, here are the files loaded into memory in sequence:

  1. ROM and Initial Memory Setup

    • Boot ROM (0x0000 - 0x3FFF)
    • Device SRAM (0x4000 - 0x7FFF)
    • ROM and SRAM copy in physical SRAM (0x20000 - 0x27FFF)
  2. System Files

    • Image table from sector 2 (read_image_table())
    • System microcode from PROM devices
    • Bootloader configuration
  3. Boot Images Each loaded image contains:

    • Code segment (if split image: 0x0000 - 0xFFFF)
    • Data segment (if split image: separate 0x0000 - 0xFFFF)
    • Process table entries
  4. Device Mappings

    • UART0 (Console) at 0xFFF0-0xFFFF
    • UART1 (Auxiliary) at 0xFFE0-0xFFEF
    • RTC at 0xFFD0-0xFFDF
    • Post code display at 0xFFC0-0xFFCF
    • IDE interface at 0xFFB0-0xFFBF
    • Front panel switches at 0xFFA0-0xFFAF
  5. Special Memory Areas

    • Stack start and transfer buffer (PHYS0_XFER) at 0x8000-0x8FFF
    • Image transfer buffer (IMAGE_XFER) at 0x9000-0x9FFF
    • Device page mapping at 0xF800-0xFFFF

This loading sequence ensures proper system initialization and memory management for the Magic-1 computer.