Some crap I found on one of my old PCs. Stuff I had fun with in my last year of
university when r-e the leo library and peeking into the 64dd. Heh.
Mods remove if you think this is sensitive info (but please let me know if you do so), but all of it is out of my own pocket so it should be ok
.
WARNING : extremely low level!
If anyone ever gets to use this info for something, please credit me in the "thanks" section
.
kammedo
PS: oh, and if you can, do what I did not had the time to complete : bring the 64dd completely to life!
university when r-e the leo library and peeking into the 64dd. Heh.
Mods remove if you think this is sensitive info (but please let me know if you do so), but all of it is out of my own pocket so it should be ok
.WARNING : extremely low level!
If anyone ever gets to use this info for something, please credit me in the "thanks" section
.kammedo
PS: oh, and if you can, do what I did not had the time to complete : bring the 64dd completely to life!
Code:
----------------------------- N64 DD information by kammedo, (c) 2011 [email hidden] Version 0.3 ----------------------------- NOTE : all DD registers are in A5000000 base. Register layout : (offsets relative to base offset of 0xA5000000) ============================ 0x0000 C2 Buffer 0x0400 Sector Data (0x80 bytes at a time) 0x0580 RAM sequence data 0x0500 Leo data 0x0504 ??? 0x0508 DD status (R), cmd (w) 0x050C Current track 0x0510 Transfer Buffer status (R), buffer control (w) register 0x0514 Sector error 0x0518 Sequence Status 0x051C Sequence Control 0x0520 Leo reset LEO ASIC Commands (writes to register 0x508) ============================ *All uneven versions of the even commands mask errors related to disk not being present in the relative functions. 0x10000/1 = Leo seek (read) 0x20000/1 = Leo seek (write) For both of the seeks, the Data register (0x500) is : ((head nr < 0xC) + all LEOtgtParam << 16) 0x30000/1 = reZero / recal (value for 0x500 is 0) 0x40000 = BRAKE (SLEEP MODE), used in SplMotor if bit 0, 1 are not set. if bit 2 is set, the command parameter becomes 1 (meaning probably the brake is on) 0x50000/1 = START COMMAND , used in SpdlMotor if bit 0 of cmdBlock.control is set. 0x60000 = standby 0x70000 = Set Sleep mode 0x80000 = ???? 0x90000 = Set drive in unreset state 0xA0000 = Get Asic Version 0xB0001 = used to submit disk type to drive 0xC0000 = ASIC cmd inquiry - returns state of transition on upper 16 bits of 0x500 (bits 16,17,18,19,21) 0xD0000 = STANDBY MODE (NOT SLEEP) used in SpdlMotor, if bit 1 of cmdBlock.control is set and bit 0 is not set 0xE0001 = Detect index from disk 0xF0000 = Set Year / month of RTC (value in upper 16 bits of 0x500) 0x100000 = Set day / hour of RTC 0x110000 = Set minute / sec of RTC 0x120000 = read minute / sec of RTC (from 0x0500 higher 16 bits) 0x130000 = read hour / day of RTC (from 0x0500 higher 16 bits) 0x140000 = read month / year of RTC (from 0x0500 higher 16 bits) 0x1b0000 = disk inquiry, result on data register (0x500) LEO STATUS REGISTER (reads from register 0x508): ============================ READ : 0000 00ga bc0h i0de ffff ffff ffff ffff a - Disk inserted if not zero, and bit c is zero, leo returns LEO_SENSE_EJECTED_ILLEGALLY_RESUME, else checks bits d and e (in that order)) b - if (only?) this bit is set, return LEO_SENSE_COMMAND_PHASE_ERROR - is set right after having issued a read / write cmd c - reset state (1 = reset state) (if this bit is set, leo returns LEO_SENSE_POWERONRESET_DEVICERESET_OCCURED) d - if set on read LEO returns LEO_SENSE_NO_SEEK_COMPLETE e - if not zero, leo returns LEO_SENSE_MEDIUM_MAY_HAVE_CHANGED f - if any of those not zero, LEO_SENSE_DEVICE_COMMUNICATION_FAILURE is returned g - If set, ISR clears interrupt by writing 0x01000000 to 0x510 - interrupt issued by 0x508 occoured h - state of motor (1=not spinning) i - write : resets bit 16 (=0) ,read : state of head (1=retracted) Decoded as : h i sleep mode 1 1 (motor not spinning, head retracted) standby mode 0 1 (motor spinning, head parked) active mode 0 0 (motor spinning, head not parked) Acivity list 1) reads LEO_status (0x508) -> usually returns 0x590000 1) checks the status by writing 0x0 to 510 (reset interrupt?) 2) writes 0x1b0000 (inquiry ?) 3) triggers interrupt, in the interrupt : a) reads 0x508 WRITE : 0000 0000 0000 a00b ffff ffff ffff ffff a,b - leo writes to those bits (0x90000). This sets the LEO active bit in the status. LEO INTERRUPT REGISTER (0xA5000510) ============================ 0000 000a 0000 0000 0000 0000 0000 0000 a - Clear Cart interrupt LEO RESET REGISTER 0x520 ============================ leoreset writes 0xAAAA0000 to this register. Sets the drive in "reset state"? Clears the interrupt (bit 25 AND cause bit of interrupt 0x800)