Skip to content

Instantly share code, notes, and snippets.

@bog-dan-ro
Last active June 19, 2016 07:22
Show Gist options
  • Save bog-dan-ro/dd463a7d5f7d94aaa933d412a68b00de to your computer and use it in GitHub Desktop.
Save bog-dan-ro/dd463a7d5f7d94aaa933d412a68b00de to your computer and use it in GitHub Desktop.
ZX Meta info proposal
//DEPRECATED, Moved flatbuffers here https://gist.github.com/bog-dan-ro/910cc13f6a5ff2f2649788328717db16
// ZX Spectrum metadata file
package ZX.Meta;
message Entry {
enum MachineType {
Spectrum_16K = 0; // Spectrum 16K
Spectrum_48K = 1; // Spectrum 48K
Spectrum_48K_NTSC = 2; // Spectrum 48K (NTSC)
Timex_TC2048 = 3; // Timex TC2048
Timex_TC2068 = 4; // Timex TC2068
Timex_TS2068 = 5; // Timex TS2068
Spectrum_128K = 6; // Spectrum 128K
Spectrum_128Ke = 7; // Spectrum 128Ke
Spectrum_PLUS2 = 8; // Spectrum +2
Pentagon_128K = 9; // Pentagon 128K
Pentagon_512K = 10; // Pentagon 512K
Pentagon_1024K = 11; // Pentagon 1024K
Spectrum_PLUS2A = 12; // Spectrum +2A
Spectrum_PLUS3 = 13; // Spectrum +3
Spectrum_PLUS3E = 14; // Spectrum +3e
Scorpion_ZS_256 = 15; // Scorpion ZS 256
Spectrum_SE = 16; // Spectrum SE
}
enum Language {
ENG = 0;
SPA = 1;
GER = 2;
POL = 3;
RUS = 4;
}
enum Compression {
NONE = 0;
GZIP = 1;
}
message Screen { // Only spectrum screens are supported
enum Type {
LOADING = 0;
IN_GAME = 1;
// TODO ADD MORE ?
}
required Type type = 1;
required bytes content = 2;
required Compression compression = 3;
optional Language language = 4;
}
message Controls {
optional bool kempston = 1;
optional bool sinclair_1 = 2;
optional bool sinclair_2 = 3;
optional bool cursor = 4;
optional bool timex_1 = 5;
optional bool timex_2 = 6;
optional bool fuller = 7;
// TODO CHECK IF THERE ARE MORE ?
}
message Magazine {
enum Type {
Reference = 0;
Advertising = 1;
}
enum FileType {
PNG = 0;
GIF = 1;
JPG = 2;
}
required Type type = 1;
required FileType fileType = 2;
required bytes content = 3;
}
required int32 id = 1; // wosid ?
message DisplayInfo {
required string name = 1;
repeated string type = 2; // file type e.g. ["game", "action", etc.]
repeated string publishers = 3;
repeated string authors = 4;
optional uint32 year = 5;
optional string collection = 6;
repeated MachineType machineTypes = 7;
optional uint32 players = 8;
optional Controls controls = 9;
repeated Language languages = 10; // all the files languages
repeated Screen screens = 11;
repeated Magazine magazines = 12; // Do we really need such a thing?
}
required DisplayInfo displayInfo = 2;
message ZX_File {
enum FileType {
UNKNOWN = 0;
PZX = 1; // IMHO it is the best choice for tape files
Z80 = 3; // One of the most widely used format ...
DSK = 4;
SCL = 5;
TRD = 6;
// TODO ADD MORE ?
}
required FileType type = 1;
required Compression compression = 2;
optional string origin = 3;
repeated bytes parts = 4; // some games have multiple parts/sides, PZX files should be just glued
optional Language language = 5;
message PokeInfo {
required string name = 1; // a short name e.g. infinite lives
optional string description = 2; // full description of the poke
message Poke {
optional uint32 bank = 1;
required uint32 address = 2;
required uint32 value = 3;
optional uint32 original_value = 4; // might be useful for emulator that doesn't store the original value to restore the previous value
optional bool askForValue = 5;
}
repeated Poke pokes = 3;
}
repeated PokeInfo pokes = 6;
}
repeated ZX_File zxFiles = 4;
message Instruction {
enum FileType {
TEXT = 0; // plain text format
MD = 1; // Markdown text format
HTML = 2; // HTML format
}
required FileType type = 1;
required bytes content = 2;
required Compression compression = 3;
}
repeated Instruction instructions = 5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment