/dev/odm: Difference between revisions

From WiiUBrew
Jump to navigation Jump to search
Document "Frec" IOCTLs
Tag: Reverted
m Reverted edit by GaryOderNichts (talk) to last revision by Spletz
Tags: Rollback Reverted
Line 69: Line 69:
===0x07 - ODMGetRvlDiscRegion()===
===0x07 - ODMGetRvlDiscRegion()===
===0x08 - ODMFrecRead()===
===0x08 - ODMFrecRead()===
Reads "Frec" data from the disc. Used by "カラオケJOYSOUND for Wii U" for trial discs.
==== IOCTL Response ====
{| class="wikitable"
|-
! Start
! Length
! Description
|-
| 0x00
| 4
| Slot/section 0 status.
|-
| 0x04
| 4
| Slot/section 1 status.
|-
| 0x08
| 4
| Slot/section 2 status.
|-
| 0x0C
| 4
| Slot/section 3 status.
|-
| 0x10
| 1
| Slot/section 0 data.
|-
| 0x11
| 1
| Slot/section 1 data.
|-
| 0x12
| 1
| Slot/section 2 data.
|-
| 0x13
| 1
| Slot/section 3 data.
|-
| 0x14
| 0xC
| Padding
|}
===0x09 - ODMFrecWriteOneSection()===
===0x09 - ODMFrecWriteOneSection()===
Writes an 8-bit value to a slot/section (first free?) of the disc's "Frec" data. Used by "カラオケJOYSOUND for Wii U" to mark trial discs.
===0x0A - ODMFrecEmuDirtyData()===
===0x0A - ODMFrecEmuDirtyData()===
===0x0B - ODMCleanDrive()===
===0x0B - ODMCleanDrive()===

Revision as of 00:34, 19 December 2025

/dev/odm can be used to communicate with the disc drive. Once opened, ioctl() requests can be issued to the interface, which are documented below.

ioctl() interface

0x00 - Unknown

Calls odmMethodStartStopUnit.

0x01 - Unknown

Calls odmMethodStartStopUnit in a loop.

0x02 - ODMAwakeMotor()

0x03 - Unknown

0x04 - ODMGetDriveState()

Value ODM State
0 NONE
1 INITIAL
2 AUTHENTICATION
3 WAIT_FOR_DISC_READY
4 CAFE_DISC
5 RVL_DISC
6 CLEANING_DISC
8 INVALID_DISC
9 DIRTY_DISC
10 NO_DISC
11 INVALID_DRIVE
12 FATAL
13 HARD_FATAL
14 SHUTDOWN

0x05 - ODMControlMotor(buffer_io[0] = command)

command: 1 = MOTOR_START; 2 = MOTOR_STOP;

0x06 - ODMGetDiscUniqueCode(buffer_io[0] = type)

type: 1 = Disc serial ID; 2 = UNKNOWN;

0x07 - ODMGetRvlDiscRegion()

0x08 - ODMFrecRead()

0x09 - ODMFrecWriteOneSection()

0x0A - ODMFrecEmuDirtyData()

0x0B - ODMCleanDrive()