CDStatusData

From Yabause
Jump to: navigation, search

CD Status Data

CR1 CD status(high byte), flag and repeat count(low byte)
CR2 Ctrl addr(high byte), track number(low byte)
CR3 Index number(high byte), upper byte of FAD(low byte)
CR4 Lower word of FAD(word)

CD Status flags are as follows:

0x00 Busy
0x01 Paused
0x02 Standby/Stopped
0x03 Playing Audio/Reading Data Sectors
0x04 Seeking Position
0x05 Scanning Disc
0x06 Tray Open
0x07 No Disc
0x08 Retrying Read
0x09 Error reading data
0x0A Fatal Error
0x20 Periodic Response(this is done 75 times a second when playing at 1x, 150 times a second at 2x, and 60 times a second when nothing is playing)
0x40 Data Transfer Request
0x80 Waiting
0xFF Rejected command

Notes: Only one flag in the ranges of 0x00-0x0A and 0xFF can be set at once, the rest of the flags can potentially be set at the same time(For example if the drive is reading data and a periodic response happens, status is set to 0x23).