==== Major NOTES: ==== All ints are big endian, pre-converted by the firmware ODE expects **boot.iso** to be present on the root dir of at least one medium. If no "boot.iso" present, the ODE will just blink LEDs. /USB takes priority if both are present. 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. status[0]=error code, status[1]=last entry flag. status - 16bytes of entry, starting from offset X * 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/read; * 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 "MSF" . assuming got back: [0] .flags=TOC_FLAG_DIR, .toc_id=0x1, .name="usb"; [1] .flags=TOC_FLAG_DIR, .toc_id=0x2, .name="sd"; [2] .flags=TOC_FLAG_INVALID ---- listing is : /usb (dir or mountpoint), /sd (dir or mountpoint). user selected "/sd" : 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 "MSF" . assuming got back: [0] .flags=TOC_FLAG_FILE, .toc_id=0x1, .name="test.iso"; [1] .flags=TOC_FLAG_DIR, .toc_id=0x2, .name="some dir"; [2] .flags=TOC_FLAG_INVALID ---- listing is : /sd/test.iso (file), /sd/some dir (dir). user selected "/sd/some dir" 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 "MSF" . assuming got back: [0] .flags=TOC_FLAG_FILE, .toc_id=0x1, .name="test2.iso"; [1] .flags=TOC_FLAG_INVALID ---- listing is : /sd/some dir/test2.iso (file). user selected ".." – level up 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 "MSF" . [0] .flags=TOC_FLAG_FILE, .toc_id=0x1, .name="test.iso"; [1] .flags=TOC_FLAG_DIR, .toc_id=0x2, .name="some dir"; [2] .flags=TOC_FLAG_INVALID user selected "test.iso" as quick launch: 0xc3 0xc4 00 00 00 01 0xc5 ---- ---- #define TOC_FLAG_FILE 0x1 #define TOC_FLAG_DIR 0x2 #define TOC_FLAG_INVALID 0xffffffff typedef struct{ uint32_t flags; uint32_t toc_id; //local toc id uint32_t name_length; //strlen char name[name_length+1] ; //0 terminated }toc_entry; #define FLAG_DESC_PRESENT 1 #define FLAG_BANNER_PRESENT 2 #define FLAG_TYPE_MASK 0xff00 #define FLAG_TYPE_OPERA_DISC 0x0100 #define FLAG_TYPE_CDDA 0x0200 #define FLAG_TYPE_CDXA_PHOTO 0x0300 #define FLAG_TYPE_CDXA_VIDEO 0x0400 #define FLAG_TYPE_OPERA_UNSIGNED 0x0500 typedef struct{ uint32_t flags; uint32_t desc_len; //if FLAG_DESC_PRESENT is set char description[desc_len+1]; //0 terminated uint32_t banner_len; //if FLAG_BANNER_PRESENT is set char banner[banner_len]; //actual banner CEL with proper CCB }toc_description;