From 7725884eb09af19f25b54c01d0a747a759b95599 Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Thu, 3 Jun 2021 18:17:06 -0500 Subject: [PATCH] arm32: platform, vasm and armips, unicorn.js --- .gitmodules | 3 + Makefile | 1 + electron.html | 4 +- index.html | 1 + presets/arm32/vidfill.vasm | 15 + presets/verilog/cpu6502.v | 6 + src/common/baseplatform.ts | 10 +- src/common/cpu/ARM.ts | 3942 ++++++++++++++++++++++ src/common/emu.ts | 8 +- src/ide/ui.ts | 3 +- src/ide/views.ts | 47 +- src/platform/arm32.ts | 248 ++ src/platform/c64.ts | 5 - src/platform/verilog.ts | 1 + src/platform/zx.ts | 5 - src/worker/wasm/armips.js | 22 + src/worker/wasm/armips.wasm | Bin 0 -> 931997 bytes src/worker/wasm/vasmarm_std.js | 5313 ++++++++++++++++++++++++++++++ src/worker/wasm/vasmarm_std.wasm | Bin 0 -> 189860 bytes src/worker/workermain.ts | 157 +- test/cli/testworker.js | 6 +- unicorn.js | 1 + 22 files changed, 9749 insertions(+), 49 deletions(-) create mode 100644 presets/arm32/vidfill.vasm create mode 100644 src/common/cpu/ARM.ts create mode 100644 src/platform/arm32.ts create mode 100644 src/worker/wasm/armips.js create mode 100644 src/worker/wasm/armips.wasm create mode 100644 src/worker/wasm/vasmarm_std.js create mode 100644 src/worker/wasm/vasmarm_std.wasm create mode 160000 unicorn.js diff --git a/.gitmodules b/.gitmodules index f8488a10..c22c46f6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "nanoasm"] path = nanoasm url = https://github.com/sehugg/nanoasm +[submodule "unicorn.js"] + path = unicorn.js + url = https://github.com/AlexAltea/unicorn.js diff --git a/Makefile b/Makefile index d1040b42..f5d266f9 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ all: cp node_modules/localforage/dist/localforage.min.js ./lib/ cp node_modules/jszip/dist/jszip.min.js ./lib/ cp node_modules/file-saver/dist/*.min.js ./lib/ + cp unicorn.js/dist/unicorn-arm.min.js ./unicorn.js/demos/externals/capstone-arm.min.js ./lib/ cp gif.js/dist/* ./lib/ cd jsnes && npm i $(TSC) -v diff --git a/electron.html b/electron.html index cf5b2473..d1debdf6 100644 --- a/electron.html +++ b/electron.html @@ -437,8 +437,8 @@ $( ".dropdown-submenu" ).click(function(event) { +