Skip to content

NativeCall 1.7.0

Choose a tag to compare

@Sdursun Sdursun released this 13 Nov 10:05

NativeCall 1.7.0: time limit, memory protection, log, status window, new demos

nativecall.library 1.7, hypervisor 8 (armstub md5 6e6cf204a40e4389dc900d3d76f6213a, library md5
4dec34cb18f35fe3b491d34de1a258b8).

If you built modules with SDK 1.5.0 or 1.6.0, rebuild them. Those SDKs left a module's .bss out of the
module file: a kernel with zero-initialised static or global variables wrote past its module and could corrupt
memory (a rare reset of the Amiga). Library 1.6 and newer also keep 64 KB of slack behind every module.
NOTES.md 26.7.

New

  • Time limit: a kernel that runs too long (1 s by default, nc_set_timeout) is stopped and the call
    returns NC_ST_TIMEOUT. An endless loop no longer locks the machine.
  • Memory protection: native code sees only the RAM the 68k sees. The hypervisor's code and page tables are
    read-only, Emu68's private memory is hidden, every stack has a guard page.
  • Log and fault details: nc_printf in kernels, the NCLog tool, registers and a backtrace of the last
    fault, nc addr2line for source lines.
  • Job cancel: nc_cancel; the jobs of a program that exits or crashes are cancelled.
  • Status: NCStatus (MUI window, with icon) and NCLog STATS: is NativeCall active, native load per ARM
    core, SoC temperature, the programs with native modules.
  • PiReboot NOW: restarts the Pi from the Amiga, so a new armstub loads without cutting power.
  • Demos: raydemo (ray tracing), voxeldemo (landscape), nbodydemo, filterdemo, mp3demo (MP3 player
    decoding on an idle core); ncdemo on all cores.
  • Faster 68k fallback: default 68k compiler flags tuned for Emu68's JIT (NOTES.md 27).

Measured on the A1200 (Pi 4, 640x480 16-bit RTG, GCC)

68k native, 3 cores gain
raydemo 1.9 fps 33.6 fps 18.4x
filterdemo 9.7 fps 125.3 fps 15.5x
nbodydemo 6.0 fps 61.0 fps 10.9x
voxeldemo 40.7 fps 198.3 fps 6.0x
ncdemo 50.4 fps 204.6 fps 4.1x
MP3 decoding (1 core) 27.8x real time 198x real time 7.1x

Tested

All ten examples from these binaries, built by GCC and by VBCC, on one A1200 (PiStorm32-lite, Pi 4 8 GB, Emu68
1.1.0-beta.1). All QEMU scenarios with this armstub binary. Not tested: other Pi 4 RAM sizes on hardware, the
new demos without RTG. Details in README.md.

Upgrading

Replace nativecall-armstub.bin on the SD card and nativecall.library in LIBS:, then power the Pi off and
on. Old and new library and hypervisor versions work with each other; missing features fall back. NCStatus
needs MUI 3.8 or newer.

Assets: NativeCall-1.7.0.zip (source, SDK, and binaries/ built by ./build.sh), NativeCall.pdf,
SHA256SUMS.txt.