Repository navigation
NativeCall 1.8.0: kernels on the PC under WinUAE
nativecall.library 1.8 (md5 c3494aa71d3bc719e1bbca48d1dd99ea), hypervisor 8 (armstub md5
6e6cf204a40e4389dc900d3d76f6213a, unchanged since 1.7.0: no need to touch the SD card), WinUAE host DLL
nativecall-windows-x86-64.dll (md5 ef64a6638df0868c206fc33c72895ff0).
The same program now runs its kernels on the Pi's ARM cores, on the PC's x64 processor under WinUAE, or as
68k code on any other Amiga: one SDK, one kernel source, one 68k binary.
New
- WinUAE x64 backend: without the hypervisor, library 1.8 runs kernels on the PC through WinUAE's
uaenative.libraryand a host DLL in WinUAE'spluginsfolder.nc_run_mpandnc_start_mpuse a thread
pool (all logical processors but one). Crashes, stack overflows and endless loops end the call with
NC_ST_FAULT/NC_ST_TIMEOUTand WinUAE goes on; the log, fault details (with a backtrace) and statistics
work as on the Pi.NCLog STATSandNCStatussay "WinUAE x64". - SDK:
NC_X64 := 1builds a module's kernels for the PC as well, without a C library (8 to 12 KB), and
embeds them in the program next to the.narm. v1.7.0 binaries run on the PC too, unchanged, with their
.nx64next to them. - Byte order: the PC is little-endian. Parameter structures are converted by the compiler; plain arrays in
68k memory useNC_GET16/32/FandNC_PUT16/32/F, which are plain accesses on the Pi (the.narmmodules
of all examples are byte for byte those of 1.7.0). nc_now_usreads the PC's clock under WinUAE (the emulation's own clocks miss the time a kernel runs);
nc_addr_okaccepts all of the Amiga's RAM there.
Fixes
mp3demo BENCHreported "No MP3 sound found" for files shorter thanSECONDS(20 by default).- Projects that build their 68k side themselves: regenerate
<prefix>_image.c(nc make narm); it now also
holds the x64 module.
Measured under WinUAE (6.1 beta, 68060 JIT, a PC with 24 logical processors)
| 1280x720 | WinUAE 68k | PC, 1 thread | PC, 23 threads | gain (compute) |
|---|---|---|---|---|
filterdemo |
4.9 fps | 59.7 fps | 420.7 fps | 129.6x |
nbodydemo |
13.7 fps | 147.2 fps | 693.2 fps | 103.9x |
raydemo |
1.9 fps | 16.7 fps | 147.0 fps | 96.5x |
mandeldemo (Miter/s) |
57.5 | 8146 | 142x |
mandeldemo 640x480, the unchanged v1.7.0 binary: 58.5 Miter/s on WinUAE's 68k JIT, 6044 on the PC (103x).
On the A1200, library 1.8 gives the 1.7.0 figures (raydemo 18.4x on three cores, ncdemo 198 to 205 fps).
Tested
- A1200 (PiStorm32-lite, Pi 4 8 GB, Emu68 1.1.0-beta.1), library 1.8: all ten examples built by GCC and by
VBCC,hellowith every test, and the v1.7.0 binaries. - WinUAE 6.1 beta 22/23: every
hellotest on the PC, a kernel recursing without end (caught on the emulation
thread and on the pool),bench,mp3demo BENCHand annbodydemostep compared with the 68k, the graphics
demos at 1280x720, the programs without any.nx64file next to them. ./build.shfrom a clean clone gives the 47 files ofbinaries/byte for byte.
Not tested: other WinUAE versions or PCs, other Pi 4 RAM sizes on hardware. WinUAE 6.1 beta resets now and then
on a 640x480 AGA screen fed with WriteChunkyPixels, with or without NativeCall: use an RTG screen there.
Installing
- Pi: nothing changes on the SD card. Replace
nativecall.libraryinLIBS:, thenAvail FLUSHor restart. - WinUAE: copy
binaries/WinUAE/nativecall-windows-x86-64.dllto WinUAE'spluginsfolder, turn on
Settings > Host > Miscellaneous > Allow native code, copynativecall.librarytoLIBS:.
Assets: NativeCall-1.8.0.zip (source, SDK, and binaries/ built by ./build.sh), NativeCall.pdf,
SHA256SUMS.txt.