| 1 |
// |
| 2 |
// Copyright (C) 2018 Team Kodi |
| 3 |
// This file is part of Kodi - https://kodi.tv |
| 4 |
// |
| 5 |
// SPDX-License-Identifier: MIT |
| 6 |
// See LICENSES/README.md for more information. |
| 7 |
// |
| 8 |
|
| 9 |
include "video.fbs"; |
| 10 |
|
| 11 |
namespace KODI.RETRO; |
| 12 |
|
| 13 |
// Savestate schema |
| 14 |
// Version 3 |
| 15 |
|
| 16 |
file_identifier "SAV_"; |
| 17 |
|
| 18 |
enum SaveType : uint8 { |
| 19 |
Unknown, |
| 20 |
Auto, |
| 21 |
Manual |
| 22 |
} |
| 23 |
|
| 24 |
table Savestate { |
| 25 |
// Schema version |
| 26 |
version:uint8 (id: 0); |
| 27 |
|
| 28 |
// Savestate properties |
| 29 |
type:SaveType (id: 1); |
| 30 |
slot:uint8 (id: 2); |
| 31 |
label:string (id: 3); |
| 32 |
caption:string (id: 11); |
| 33 |
created:string (id: 4); // W3C date time [ISO 8601 : 1988 (E)] with timezone info |
| 34 |
|
| 35 |
// Game properties |
| 36 |
game_file_name:string (id: 5); |
| 37 |
|
| 38 |
// Environment properties |
| 39 |
timestamp_frames:uint64 (id: 6); |
| 40 |
timestamp_wall_clock_ns:uint64 (id: 7); |
| 41 |
|
| 42 |
// Emulator properties |
| 43 |
emulator_addon_id:string (id: 8); |
| 44 |
emulator_version:string (id: 9); // Semantic version |
| 45 |
|
| 46 |
// Video stream properties |
| 47 |
pixel_format:PixelFormat (id: 12); |
| 48 |
nominal_width:uint16 (id: 13); |
| 49 |
nominal_height:uint16 (id: 14); |
| 50 |
max_width:uint16 (id: 15); |
| 51 |
max_height:uint16 (id: 16); |
| 52 |
pixel_aspect_ratio:float (id: 17); |
| 53 |
|
| 54 |
// Video frame properties |
| 55 |
video_data:[uint8] (id: 18); |
| 56 |
video_width:uint16 (id: 19); |
| 57 |
video_height:uint16 (id: 20); |
| 58 |
rotation_ccw:VideoRotation (id: 21); |
| 59 |
|
| 60 |
// Memory properties |
| 61 |
memory_data:[uint8] (id: 10); |
| 62 |
} |
| 63 |
|
| 64 |
root_type Savestate; |