Esempio n. 1
0
 private static void WaitSignal()
 {
     for (int i = 0; i < 1000 & ((CPUBus.Read8(0x64) & 2) != 0); i++)
     {
         ;
     }
 }
Esempio n. 2
0
 private static void WaitData()
 {
     for (int i = 0; i < 1000 & ((CPUBus.Read8(0x64) & 1) == 1); i++)
     {
         ;
     }
 }
Esempio n. 3
0
 private static void Write(byte b)
 {
     //Wait to be able to send a command
     WaitSignal();
     //Tell the mouse we are sending a command
     CPUBus.Write8(0x64, 0xD4);
     //Wait for the final part
     WaitSignal();
     //Finally write
     CPUBus.Write8(0x60, b);
 }
Esempio n. 4
0
 private static byte Read()
 {
     WaitData();
     return(CPUBus.Read8(0x60));
 }