mirror of
https://github.com/arabine/open-story-teller.git
synced 2025-12-06 17:09:06 +01:00
More docs on the story formats
This commit is contained in:
parent
e368021540
commit
ce26db3aaa
5 changed files with 70 additions and 14 deletions
|
|
@ -1,5 +1,4 @@
|
|||
# Stories architecture
|
||||
|
||||
## Story location
|
||||
|
||||
The stories are located on a SD-Card flash memory. The following file system formats are supported by openStoryTeller:
|
||||
|
|
@ -9,7 +8,7 @@ The stories are located on a SD-Card flash memory. The following file system for
|
|||
|
||||
Connect OpenStoryTeller to your computer using a USB cable, a USB-disk will show up on your file explorer.
|
||||
|
||||
## Story tree
|
||||
## Story root tree
|
||||
|
||||
A typical folder organisation is showed here:
|
||||
|
||||
|
|
@ -17,8 +16,41 @@ A typical folder organisation is showed here:
|
|||
|
||||
At the root of the SD-Card, a special index file named `index.ost` must be present. It contains the list of installed stories as well as other informations about each story.
|
||||
|
||||
## Index file format
|
||||
## Story folder organisation
|
||||
|
||||
TLV format.
|
||||
A story folder name must be a UUID v4 string.
|
||||
|
||||
It must contains:
|
||||
- A project file in JSON named `project.json`
|
||||
- A pre-compiled story binary name `story.c32`
|
||||
- A directory named `assets`
|
||||
|
||||
The assets directory must contains all the resource files for the story (sounds, images...).
|
||||
|
||||
# Index file format
|
||||
|
||||
## General principle
|
||||
|
||||
This binary file is encoded using a simple TLV format (Type Lenght Value) supporting the following types:
|
||||
|
||||
|
||||
| Type | encoding |
|
||||
| ----- | ----- |
|
||||
| Object | 0xE7 |
|
||||
| Array | 0xAB |
|
||||
| String | 0x3D |
|
||||
| Integer | 0x77 |
|
||||
| Real | 0xB8 |
|
||||
|
||||
Each Type is encoded on a byte.
|
||||
|
||||
The Length is encoded on two bytes, little endian. The length indicates the size of the Value.
|
||||
|
||||
## Application on the Index File Forma
|
||||
|
||||
- Array
|
||||
- Object
|
||||
- String (UUID, folder name of the story)
|
||||
- String (title image file name)
|
||||
- String (sound title file name)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ This is the official development kit. It offers the following advantages:
|
|||
3. Low wiring/soldering: usage of a motherboard
|
||||
4. SWD debug port
|
||||
|
||||
Current status: ON DEVELOPMENT
|
||||
Current status: Firmware and software are completed. Build instructions under writing.
|
||||
|
||||

|
||||
|
||||
|
|
@ -57,17 +57,41 @@ The pins usage for this bundle is indicated by the folling wirering. OST pins ar
|
|||
|
||||

|
||||
|
||||
# Bundle build guide
|
||||
|
||||
|
||||
# Firmware flashing
|
||||
|
||||
## Get the firmware binary
|
||||
|
||||
Download the right file for your bundle on the Github project page : [Github project page](https://github.com/arabine/open-story-teller)
|
||||
|
||||
For the Raspberry Pi Pico bundle, the executable is a ELF file extension.
|
||||
|
||||
## Procedure
|
||||
|
||||
You can program the Pico without any software thanks to the UF2 file system driver embedded in the Pico bootloader.
|
||||
|
||||
- Press the Boot button located on the Marbe Pico
|
||||
- Without releasing the button, connect the Marbe Pico to your computer using a USB-C cable
|
||||
- Release the button
|
||||
- A new disk drive should popup on your file system
|
||||
|
||||
Button position:
|
||||
|
||||

|
||||
|
||||
|
||||
UF2 disk on your file explorer:
|
||||
|
||||

|
||||
|
||||
|
||||
Just drag and drop the firmware image in this directory, wait for the programming and firmware reboot.
|
||||
|
||||
# How to build from the source code
|
||||
# Bundle build guide
|
||||
|
||||
TODO
|
||||
|
||||
|
||||
# How to build the firmare image from the source code
|
||||
|
||||
## Clone the repository
|
||||
|
||||
|
|
|
|||
BIN
docs/images/marble-pico.png
Normal file
BIN
docs/images/marble-pico.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 469 KiB |
|
|
@ -7,18 +7,17 @@ This documentation will guide you to make your own story teller. You can choose
|
|||
Before starting, here is a complete list of links where you'll find project information:
|
||||
|
||||
- :octopus: [Github](https://github.com/arabine/open-story-teller): source code for the firmware, the player and the story editor, issue tracking
|
||||
- [Itch.io](https://d8s-apps.itch.io/open-story-teller): Download page for the Story Editor and various player versions.
|
||||
- Free stories community (in French) [Discord](https://monurl.ca/DiscordLuniiYT)
|
||||
- My Discord channel for this project: https://discord.gg/4TW4B3R4Ye
|
||||
|
||||
## Helping
|
||||
|
||||
You can help in various ways:
|
||||
|
||||
- Report bugs on Github (open an new issue)
|
||||
- Propose patches, ideas, mechanical drawings, ports (open an issue)
|
||||
- Propose patches, ideas, mechanical drawings for enclosures, ports (open an issue)
|
||||
- Translate stuff
|
||||
|
||||
Reach me on Discord: [Discord](https://monurl.ca/DiscordLuniiYT)
|
||||
|
||||
## Where to start
|
||||
|
||||
Before building your own hardware, make sure you have a minimal knowledge of basic electronics. You may have to solder some wires, but nothing's complicated.
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@ void StoryProject::New(const std::string &uuid, const std::string &file_path)
|
|||
#define TLV_ARRAY_TYPE 0xAB
|
||||
#define TLV_OBJECT_TYPE 0xE7
|
||||
#define TLV_STRING_TYPE 0x3D
|
||||
|
||||
#define TLV_INTEGER 0x77
|
||||
#define TLV_REAL 0xB8
|
||||
|
||||
class Tlv
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue