db48x/sim
Christophe de Dinechin 76150c6289 files: Allow STO and RCL to write to filesystem
When the argument describing the variable is a text, interpret that as
a file path on the disk. By default, data is stored in in a directory
named `data`, which will be created if necessary. For example, you can
use `3 "foo.48s" STO` to store the value `3` in a file named
`data/foo.48s` on disk.

How the file is stored depends on the extension given to the file:

* For `.txt` files, the object is stored as text
* For `.48s` files, the object is stored as DB48X source code
* For `.48b` files, the object is stored in binary format
* For `.csv` files, the object is stored in comma-separated format.

The binary format used for `.48b` includes a 4-byte magic number
identifying a DB48X format, and a 4-byte checksum used to ensure
binary compatibility between the firmware and the disk format.

At least during early days of development (prior to 1.0), it is quite
unlikely that the binary format for one version of the firmware would
be readable or writable by another version. If you need to recover
data from another version, you need to install that version and save
the object again in `.48s` (text) format.

Fixes: #375

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-11-15 01:59:04 +01:00
..
db48x.pro files: Allow STO and RCL to write to filesystem 2023-11-15 01:59:04 +01:00
dmcp.cpp files: Allow STO and RCL to write to filesystem 2023-11-15 01:59:04 +01:00
dmcp.h Simulated sdb must be in regular memory 2023-06-19 21:56:30 +02:00
dmcp_fonts.c Working simulator, good enough for initial debugging 2023-06-19 21:56:30 +02:00
ff_ifc.h Prototype simulator for the DM42 2023-06-19 21:56:30 +02:00
gcc111libbid-Darwin-arm64.a Build fixes for Fedora Linux 2023-06-28 15:16:42 +02:00
gcc111libbid-Linux-x86_64.a Build fixes for Fedora Linux 2023-06-28 15:16:42 +02:00
icon-dm42.png Prototype simulator for the DM42 2023-06-19 21:56:30 +02:00
keyboard-db48x.png keyboard: Change 'CST' label to 'CONST' 2023-10-15 22:13:49 +02:00
keyboard-dm42.png Prototype simulator for the DM42 2023-06-19 21:56:30 +02:00
lft_ifc.h Prototype simulator for the DM42 2023-06-19 21:56:30 +02:00
sim-main.cpp simulator: Display DB48X keyboard by default 2023-10-15 22:13:49 +02:00
sim-rpl.cpp More robust mechanism for saving state on exit on the simulator 2023-06-24 00:19:49 +02:00
sim-rpl.h Super-dumb implementation of timers 2023-06-19 21:56:30 +02:00
sim-screen.cpp Use the new graphics to clear the screen 2023-06-19 21:56:31 +02:00
sim-screen.h Use the new graphics to clear the screen 2023-06-19 21:56:31 +02:00
sim-window.cpp simulator: Only activate transient alpha on alpha keys 2023-07-29 22:24:11 +02:00
sim-window.h Switch to using QT File dialog and settings to save state 2023-06-23 22:53:37 +02:00
sim-window.ui Add the ability to use the DB48X keyboard mapping 2023-06-22 18:30:38 +02:00
sim.qrc Add the ability to use the DB48X keyboard mapping 2023-06-22 18:30:38 +02:00