12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- // (C) Copyright 1993/1994 Sony Corporation,Tokyo,Japan. All Rights Reserved
- // libetc.h: Pad Interface
- unit libetc;
- interface
- var
- PadIdentifier: longint; external;
- // PAD I/O (SIO Pad)
- const
- PADLup = 1 shl 12;
- PADLdown = 1 shl 14;
- PADLleft = 1 shl 15;
- PADLright = 1 shl 13;
- PADRup = 1 shl 4;
- PADRdown = 1 shl 6;
- PADRleft = 1 shl 7;
- PADRright = 1 shl 5;
- PADi = 1 shl 9;
- PADj = 1 shl 10;
- PADk = 1 shl 8;
- PADl = 1 shl 3;
- PADm = 1 shl 1;
- PADn = 1 shl 2;
- PADo = 1 shl 0;
- PADh = 1 shl 11;
- PADL1 = PADn;
- PADL2 = PADo;
- PADR1 = PADl;
- PADR2 = PADm;
- PADstart = PADh;
- PADselect = PADk;
-
- MOUSEleft = 1 shl 3;
- MOUSEright = 1 shl 2;
- // PAD utility macro: _PAD(x,y)
- // x: controller ID (0 or 1)
- // y: PAD assign macro
- //
- // Example: _PAD(0,PADstart) ... PADstart of controller 1
- // _PAD(1,PADLup) ... PADLup of controller 2
- function _PAD(x, y: longint): longint;
- // scratch pad address 0x1f800000 - 0x1f800400 */
- function getScratchAddr(offset: dword): dword;
- // Video Mode: NTSC/PAL
- const
- MODE_NTSC = 0;
- MODE_PAL = 1;
- function CheckCallback: longint; stdcall; external;
- procedure PadInit(mode: longint); stdcall; external;
- function ResetCallback: longint; stdcall; external;
- function RestartCallback: longint; stdcall; external;
- function StopCallback: longint; stdcall; external;
- function VSync(mode: longint): longint; stdcall; external;
- function VSyncCallback(f: pointer): longint; stdcall; external;
- function GetVideoMode: longint; stdcall; external;
- function SetVideoMode(mode: longint): longint; stdcall; external;
- function PadRead(id: longint): dword; stdcall; external;
- procedure PadStop; stdcall; external;
- implementation
- function _PAD(x, y: longint): longint;
- begin
- _PAD:= y shl x shl 4;
- end;
- function getScratchAddr(offset: dword): dword;
- begin
- getScratchAddr:= $1f800000+(offset*4);
- end;
- begin
- end.
|