Jarm
ARMv7a emulator written in Java, and an OpenComputers mod that uses it
Install / Use
/learn @SolraBizna/JarmREADME
This is the source code for the JARM emulator, and several related packages. Project files are not included.
JARM Emulator
This is a Java-based ARMv7-A emulator. It currently supports most ARM instructions, including VFPv4 floating point. In the future, it will support exceptions, virtual memory, and every ARM and Thumb instruction.
To embed the emulator into your own project, you need only the classes in the
src/name/bizna/jarm directory. I'm no Java expert, but you can probably link
against the simulator JAR.
OC-ARM Architecture
This is an Architecture module for OpenComputers that uses JARM as its core. It is a sync-safe architecture.
To build the Minecraft mod, you require the following directories:
src/name/bizna/jarm
The emulator core.src/name/bizna/ocarm
The OpenComputers architecture module, and the Minecraft mod that enables it.
Provide your own Forge source, etc. Should build against Minecraft 1.7 and 1.8, but is only tested against 1.7.
OC-ARM Simulator
This is a program that provides a simulation of a simple OC-ARM computer. It facilitates development and debugging of ROM modules and software for the OC-ARM Architecture.
To build the simulator, you require the following directories:
src/name/bizna/jarm
The emulator core.src/name/bizna/ocarmsim
The simulator application, and the fake OC-ARM scaffold.src/net/minecraft/nbt
Stub of a bit of Minecraft API, to make the section of OpenComputers API we use work.
You must also build against the OpenComputers API.
JarmTool
This is a program that allows you to write simple command-line applications against an improbable ARMv7-A machine. It is intended to ease cross-compilation where platform-specific source files are generated by programs which are built with the same build system as the final program. (NetHack, for example.)
Usage: java -jar JarmTool.jar path/to/program.elf [arguments]
To build JarmTool, you require the following directories:
src/name/bizna/jarm
The emulator core.src/name/bizna/jarmtool
JarmTool sources.
Memory Map
- 0x00000000 through ...
Where the program is loaded. The memory is as large as is necessary to load the program, up to 1GiB. (This means that you must explicitly include the heap in your.bsssection.) - 0x40000000 through ...
A "ROM" which contains the argc and argv values the program should use in itsmain()function.
IO (and other operations)
LDC p3, cr15, <...>
Read a null-terminated string from the given address, print an error message, and exit with a non-zero exit status. This is deliberately compatible with OC-ARM, and is primarily intended for compact exception handlers.MCR p7, #0, <rX>, cr15, cr15Exit the program.rXcontains the desired exit status; 0 = success, non-zero = failureCDP p7, <call>, cr0, cr0, cr0, #0Perform a UNIX(ish) system call. Set Z and place an errno code into r3 if the call failed, clear Z if the call succeeded. (Either way, place the proper return value into r0, exactly like a normal function call.) These instructions are deliberately designed to make it easy to write JarmTool tools with newlib. List of calls:- 0:
fstat(fills in only a few fields with meaningful data) - 1:
open - 2:
read - 3:
write - 4:
close - 5:
gettimeofday - 6:
isatty(returns 1 for the default stdin/stdout/stderr, 0 for all file descriptors returned byopen) - 7:
lseek - 8:
unlink
- 0:
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
