The iVM-app is an implementation of an initial-program that decodes and renders digital data stored as 2D-barcodes (called boxing format) on the long-term storage medium. The application binary should be stored as human readable hex codes, and future users should transcribe the hex codes and feed the binary stream into the iVM machine memory. The application is self extracting to save storage space and minimize the amount of manual typing needed to bootstrap the application.
iVM-app modules:
- ivm-xz: Decompresses and then executes initial-program.
- initial-program: Responsible for unboxing frames, decoding table-of-content, decoding files and render the supported file-formats.
- app: Lib called by initial-program to do the actual file decoding.
- unboxer: Decodes images read from the image input device and return a bitstream and status codes.
- AFS: Archival file system, organizes the frames on storage-medium into files.
- file decoder: Decodes files from the assembler and renders them to one or more of the iVM output devices.
Modules the user needs to provide:
- iVM implementation: Implementation of iVM specification with support for starting iVM-app from memory or file. The iVM must communicate with an image source device, feeding digitized images into the iVM and it must implement output devices supporting the formats provided by the iVM specification.
- iVM execution environment: Operation system or similar where the iVM runs.
- Image source device: Device capable of digitizing the frames on the storage medium.
+-----------------+
| initial-program |
| |
|-----------------|
| ivm-xz |
+--------+ +-----------------+ +--------+
| image | | iVM | | I/O |
| source | | implementation | | device |
| device | | | | |
| +------->+ +<------->+ |
+--------+ +-----------------+ +--------+
| execution |
| environment |
+-----------------+
Core libraries for decoding frames and assembling frames into files.
- iVM repo: https://github.com/preservationvm/boxing
- Source: https://github.com/piql/boxing
- iVM repo: https://github.com/preservationvm/afs
- Source: https://github.com/piql/afs
The file format decoders are based on standardized open-source components and slightly modified so it complies with the iVM-compiler.
Since the iVM is not POSIX file system compliant, the libraries used cannot use any kind of file I/O. Similar, the iVM does not support multithreading so the library must be able to compile as a single threaded library.
The libraries should be configured using --prefix <path>/ivm-apps/file-format-decoders/
, so that a make install
will install the libraries in a folder where the ivm-app expects to find them.
- iVM repo: https://github.com/preservationvm/tiff-v4.1.0
- Source: libtiff-v4.1.0 from https://download.osgeo.org/libtiff
Work in progress. The PDF ghostscript library compiles and runs standalone using ivm compiler. But some outstanding issues in integration.
- Check that the file format library meets the requirements for iVM: No file system and no threads. Many mature libraries supports this through use of defines and / or configure switches. If not the library will have to be modified.
- Compile the library targeting the iVM, see build.sh for examples on how this is done for other libs.
- Add file format test data to testdata repo.
- Create static test driver under tests, see [tests/static_tiff/main.c] for example.
- Implement the driver for the ivm-app and add it to list of supported formats, see [ivm_formats/ivm_formats.c].
Utility library for interfacing the iVM I/O devices.
git clone https://github.com/immortalvm/ivm-apps.git
cd ivm-apps
# Get libs, vm & compiler
./install-libs.sh
# Setup env (note leading ".")
. ./setup.sh # Alternatively: source ./setup.sh
# Build
./build.sh -t ivm -b lib
./build.sh -t ivm -b app
# Test
cd build/ivm/tests/static_tiff
./static_tiff # Will assemble and run
# Test with another iVM implementation
../../../../../yet_another_ivm_emulator/ivm_emu_parallel -o out ./static_tiff