This shows you the differences between two versions of the page.
documentation:ode_interface_description [2022/11/07 14:49] – created fixelsan | documentation:ode_interface_description [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== Major NOTES: ==== | ||
+ | |||
+ | All ints are big endian, pre-converted by the firmware | ||
+ | |||
+ | < | ||
+ | |||
+ | ODE includes base **boot.iso** in flash. If any of mounted partitions (sd or usb or all) contains** boot.iso**, the one with freshest built FS prevails. ODE uses label→dl_VolumeUniqueIdentifier as unix timestamp. | ||
+ | |||
+ | **boot.iso** must have bootable, signed image, containing ode driver (signed with 3do keys, priority set) and menu app. | ||
+ | === FZ1 ODE (xport dev1): === | ||
+ | |||
+ | No ID on the bus present, don't implement XBUS Dev proxy in FPGA. | ||
+ | |||
+ | * on 0x83 report mfg_id=MEI (0x10), dev_num=CDROM (0x1) no DRV bit in status! | ||
+ | * on 0x8e for simple ode report status command error, for full featured, follow the ROMTAGs structure for dipir. | ||
+ | * new cmd : | ||
+ | * 0xc0 [l3] [l2] [l1] [l0] - change current TOC root to L (L=0 - root) - status[0]=error code, selects either devlist if more than one device or partition present. example : | ||
+ | * only sd is mounted with 1 partition : "/ = root of the sdcard" | ||
+ | * sd mounted with 2 partitions : "/sd0 /sd1". | ||
+ | * usb is mounted with 1 partition : "/ = root of usb device" | ||
+ | * usb with 2 partitions, sd with 1 partitions : "/sd /usb0 /usb1" | ||
+ | * list index starts from 0x00000001 !!!! | ||
+ | * 0xc1 [t3] [t2] [t1] [t0] [X1] [X0] - read TOC entries starting from T. < | ||
+ | * 0xc2 [t3] [t2] [t1] [t0] [X1] [X0] - read description for given TOC entry. status[0] = error code. status are 16bit of entry, starting from offset X | ||
+ | * 0xc3 - clear current playlist. status[0] = error code | ||
+ | * 0xc4 [t3] [t2] [t1] [t0] - add TOC to the playlist, status[0] = error code, status[1][2][3][4] = current playlist count | ||
+ | * 0xc5 - launch playlist. status[0] = error code | ||
+ | * 0xc6 [t3] [t2] [t1] [t0] [op] - open toc id (file) for operation : op= 0x1 – read, op=0x2 –write, op=0x3- create (get ascii-z filename from generic buffer), returns toc id for created. | ||
+ | * 0xc7 [o3][o2][o1][o0] [se] - file seek operation (se) to offset OO | ||
+ | * 0xc8 [l1][l0] - set buffer size for file operations, tells byte count is IN the buffer for write op, or byte count for READ op to read. This completes the operation immediately -- as if calling read/write. status [1][2] = bytes written/ | ||
+ | * 0xc9 [o1][o0] [b0][b1][b2][b3] -- write 4 bytes to file buffer at offset OOOO. | ||
+ | * 0xca [o1][o0] [ct] - reads ct bytes (up to 16) from file buffer at offset OOOO. bytes are returned in status. | ||
+ | |||
+ | === XPort ODE: === | ||
+ | |||
+ | 3 devices on the XBUS Bus: | ||
+ | |||
+ | * dev 1 = MEI CDRom (read above) | ||
+ | * dev 2 = RAM Depot : on 0x83 report mfg_id=3DO (0x1000), dev_num=Depot (0x30) no DRV bit in status! Make sure to include depot driver into the boot.iso! | ||
+ | * dev 3 = Nicky | ||
+ | |||
+ | === RAM Depot: === | ||
+ | |||
+ | * CMD Read 0x20 xx xx xx xx LL LL : read LLLL bytes from XXXXXXXX address | ||
+ | * CMD Write 0x21 xx xx xx xx LL LL : write LLLL bytes to XXXXXXXX address | ||
+ | |||
+ | 0x0c000000 : register base | ||
+ | |||
+ | 0x80000000 : ram base. 256kbytes | ||
+ | |||
+ | 0x00000000 : rom base : 512kbytes | ||
+ | |||
+ | === ODE Limitations : === | ||
+ | |||
+ | RFIFO - ode to 3do data fifo, 2048 bytes (refill required for CDDA/CDXA) | ||
+ | |||
+ | WFIFO - 3do to ode data fifo, 512 bytes (pre-fill before issuing the command, mind W flags) | ||
+ | |||
+ | CMDFIFO - 7 bytes precisely. Abort is handled as soon as it arrives. | ||
+ | |||
+ | STATFIFO - 16 bytes | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Nicky : === | ||
+ | |||
+ | TBD | ||
+ | |||
+ | === Typical SD navigation process : === | ||
+ | |||
+ | 0xc0 0 0 0 0 (change to device root). | ||
+ | |||
+ | 0xc1 0 0 0 0 (start from local root) : | ||
+ | |||
+ | 0x10 0 0 0 0 0 0 = read 2048 bytes of TOCs. indexed by " | ||
+ | |||
+ | assuming got back: | ||
+ | |||
+ | [0] .flags=TOC_FLAG_DIR, | ||
+ | |||
+ | [1] .flags=TOC_FLAG_DIR, | ||
+ | |||
+ | [2] .flags=TOC_FLAG_INVALID | ||
+ | |||
+ | ---- | ||
+ | |||
+ | listing is : /usb (dir or mountpoint), | ||
+ | |||
+ | user selected "/ | ||
+ | |||
+ | 0xc0 00 00 00 02 //change to new TOC 0xc1 00 00 00 00 //start reading from local root | ||
+ | |||
+ | 0x10 0 0 0 0 0 0 = read 2048 bytes of TOCs. indexed by " | ||
+ | |||
+ | assuming got back: | ||
+ | |||
+ | [0] .flags=TOC_FLAG_FILE, | ||
+ | |||
+ | [1] .flags=TOC_FLAG_DIR, | ||
+ | |||
+ | [2] .flags=TOC_FLAG_INVALID | ||
+ | |||
+ | ---- | ||
+ | |||
+ | listing is : / | ||
+ | |||
+ | user selected "/ | ||
+ | |||
+ | 0xc0 00 00 00 02 //change to new TOC 0xc1 00 00 00 00 //start reading from local root | ||
+ | |||
+ | 0x10 0 0 0 0 0 0 = read 2048 bytes of TOCs. indexed by " | ||
+ | |||
+ | assuming got back: | ||
+ | |||
+ | [0] .flags=TOC_FLAG_FILE, | ||
+ | |||
+ | [1] .flags=TOC_FLAG_INVALID | ||
+ | |||
+ | ---- | ||
+ | |||
+ | listing is : /sd/some dir/ | ||
+ | |||
+ | user selected " | ||
+ | |||
+ | 0xc0 ff ff ff ff //change to new TOC (return to previous) 0xc1 00 00 00 00 //start reading from local root | ||
+ | |||
+ | 0x10 0 0 0 0 0 0 = read 2048 bytes of TOCs. indexed by " | ||
+ | |||
+ | [0] .flags=TOC_FLAG_FILE, | ||
+ | |||
+ | [1] .flags=TOC_FLAG_DIR, | ||
+ | |||
+ | [2] .flags=TOC_FLAG_INVALID | ||
+ | |||
+ | user selected " | ||
+ | |||
+ | 0xc3 | ||
+ | |||
+ | 0xc4 00 00 00 01 | ||
+ | |||
+ | 0xc5 | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ---- | ||
+ | |||
+ | < | ||
+ | #define TOC_FLAG_FILE | ||
+ | #define TOC_FLAG_DIR | ||
+ | #define TOC_FLAG_INVALID | ||
+ | |||
+ | typedef struct{ | ||
+ | uint32_t flags; | ||
+ | uint32_t toc_id; | ||
+ | uint32_t name_length; | ||
+ | char name[name_length+1] ; //0 terminated | ||
+ | }toc_entry; | ||
+ | |||
+ | #define FLAG_DESC_PRESENT | ||
+ | #define FLAG_BANNER_PRESENT | ||
+ | #define FLAG_TYPE_MASK | ||
+ | #define FLAG_TYPE_OPERA_DISC | ||
+ | #define FLAG_TYPE_CDDA | ||
+ | #define FLAG_TYPE_CDXA_PHOTO | ||
+ | #define FLAG_TYPE_CDXA_VIDEO | ||
+ | #define FLAG_TYPE_OPERA_UNSIGNED | ||
+ | |||
+ | typedef struct{ | ||
+ | uint32_t flags; | ||
+ | |||
+ | uint32_t desc_len; //if FLAG_DESC_PRESENT is set | ||
+ | char description[desc_len+1]; | ||
+ | |||
+ | uint32_t banner_len; //if FLAG_BANNER_PRESENT is set | ||
+ | char banner[banner_len]; | ||
+ | }toc_description; | ||
+ | |||
+ | </ | ||
+ | |||