Debian Codegraph @

src/romdump_9x/dusb.h

raw symbols SCIP
1 // USB link routines (taken from Kevin's Backgammon game)
2 // Copyright (c) 2004-2006 Kevin Kofler
3
4 /* This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #define XR_stringPtr_addr (_rom_call_addr(293))
20 #define push_offset_array_addr (_rom_call_addr(3c4))
21 #define IsSupportedUSBAMS() (IsSupportedUSBAMS30x()||IsSupportedUSBAMS31x())
22 #define IsSupportedUSBAMS30x() (*(long long*)(XR_stringPtr_addr-116)==0x76021003261f4e75ll)
23 #define IsSupportedUSBAMS31x() (*(long long*)(push_offset_array_addr-1112)==0x76021003261f4e75ll)
24 #define DetectLinkInterface30x ((unsigned char(*)(void))(XR_stringPtr_addr-158))
25 #define DetectReceiveInterface30x ((unsigned char(*)(short))(XR_stringPtr_addr-108))
26 #define DetectLinkInterface31x ((unsigned char(*)(void))(push_offset_array_addr-1154))
27 #define DetectReceiveInterface31x ((unsigned char(*)(short))(push_offset_array_addr-1104))
28 #define DetectLinkInterface (IsSupportedUSBAMS31x()?DetectLinkInterface31x:DetectLinkInterface30x)
29 #define DetectReceiveInterface (IsSupportedUSBAMS31x()?DetectReceiveInterface31x:DetectReceiveInterface30x)
30 #define DetectUSB (*(short(**)(void))(DetectLinkInterface+4))
31 #define USBCheckReceived (*(void(**)(void))(DetectReceiveInterface+16))
32 #define USBCheckStatus (*(short(**)(void))(DetectReceiveInterface+22))
33 #define USB_SendData ((short(* __attribute__((__stkparm__)))(const void *, size_t, unsigned long))(USBCheckStatus-494))
34 #define USB_RecvData ((short(* __attribute__((__stkparm__)))(void *, size_t, unsigned long))(USBCheckStatus-246))
35 #define USBLinkClose ((short(*)(void))(USBCheckStatus-266))
36 #define USBLinkReset (*(void(**)(void))(DetectLinkInterface+36))