Skip to main content
nileswan documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Hardware overview

nileswan emulates the following hardware:

  • Up to 16 MiB of ROM space
  • Up to 512 KiB of RAM space, with battery back-up
  • 2001 and 2003-compatible I/O ports, including port 0xCE
  • Up to 2 KiB of EEPROM space (M93LC46, M93LC76 and M93LC86 compatible), with back-up
  • S-3511A compatible real-time clock

In addition, nileswan provides the following native hardware facilities for user homebrew:

  • Removable storage card, via SPI interface
  • USB port for CDC serial transfers, via MCU and SPI interface
  • 512 bytes of inter-process communication memory

Flowchart

flowchart LR
    CB[Cartridge bus]
    BAT[Backup battery]
    FPGA[ICE40HX1K FPGA]
    MCU[STM32U0 MCU]
    PSRAM[16 MiB PSRAM]
    SRAM[512 KiB SRAM]
    FLASH[SPI flash]
    USB[USB port]
    TF[TF card slot]
    ACCEL[Accelerometer]
    BUTTON[External button]

    BAT --> MCU
    BAT --> SRAM
    CB <--> FPGA
    FPGA <-->|SPI| MCU
    FPGA <--> PSRAM
    CB <--> PSRAM
    FPGA <--> SRAM
    CB <--> SRAM
    MCU <--> USB
    FPGA <-->|SPI| TF
    FPGA <-->|SPI| FLASH
    MCU <-->|I²C| ACCEL
    FPGA --- BUTTON

Board revisions

External Internal BOARD_REVISION
pre-production rev. 6 0x00
pre-production rev. 7 0x01
pre-production rev. 8 0x02
REV-00 rev. 9 0x02

Limitations

Most of these limitations should not impact end users; however, documenting them may be of use to homebrew developers.

  • RTC command timings are slightly slower than on real hardware. This is a compromise between accuracy and power consumption.
  • EEPROM write and erase timings are not guaranteed to match real hardware. This may be improved in the future with firmware updates. Note that, in general, EEPROM write and erase timings are not guaranteed to be consistent across cartridges.
  • Due to hardware limitations, the emulation of the MBM29DL400TC NOR flash chip used on certain cartridges is very limited. Writes are correctly passed through, but other commands, including erases, may be stubbed or unimplemented.
  • The ability to set jumpers using GPIO pins is not yet implemented. This will be resolved in the future with a firmware update.
  • No infrared transmitter or transceiver is present on the cartridge board.
  • No sonar is connected to the cartridge board.
  • If the 8-bit ROM access width is used, the native SPI area is not correctly mapped. This may be resolved in the future with a firmware update.