User Tools

Site Tools


x68000:cpsfdev

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
x68000:cpsfdev [2017/10/02 15:15] – <030 requires supervisor mode. better deinit. neko68kx68000:cpsfdev [2017/10/08 03:38] – unbuffered key detection for exit. doesn't spew trash into the console anymore. neko68k
Line 1: Line 1:
-This is a simple program demonstrating how to interface with a CPSF or CPSF-MD joystick. Using a second CPSF should follow the same technique but with joyport_b, IOC5 and PC5. It can be compiled with the Lydux toolchain with the following commands:+This is a simple program demonstrating how to interface with a CPSF or CPSF-MD joystick. Refer to the following page for joystick register [[joystick_regs|reference]]. Using a second CPSF should follow the same technique but with joyport_b, IOC5 and PC5. It can be compiled with the Lydux toolchain with the following commands:
  
 <file> <file>
Line 59: Line 59:
   
  // quit on ESC  // quit on ESC
- if(_iocs_bitsns(0) == 2){ + if(_dos_inpout(0xFF)==27){ 
- *joycontrolword = 8; + if(_dos_inpout(0xFF)==00){ 
- *joyport_c = joyport_c_old; + *joycontrolword = 8; 
- _iocs_b_super(usp); + *joyport_c = joyport_c_old; 
- return 0;+ _iocs_b_super(usp); 
 + return 0; 
 + }
  }  }
  }  }
 } }
 </file> </file>
x68000/cpsfdev.txt · Last modified: 2019/08/27 20:45 by 127.0.0.1