140 (*(
volatile unsigned char *)(addr)) = data;
144 return (*(
volatile unsigned char *)(addr));
166# define JO_PERIPHERAL_ID_NOT_CONNECTED (0xff)
168# define JO_PERIPHERAL_ID_STANDARD_PAD (0x02)
170# define JO_PERIPHERAL_ID_RACING_WHEEL (0x13)
172# define JO_PERIPHERAL_ID_MISSION_STICK (0x15)
174# define JO_PERIPHERAL_ID_NIGHTS_PAD (0x16)
176# define JO_PERIPHERAL_ID_MOUSE (0x23)
178# define JO_PERIPHERAL_ID_SHUTTLE_MOUSE (0xe3)
180# define JO_PERIPHERAL_ID_KEYBOARD (0x34)
183# define JO_PERIPHERAL_KEYBOARD_CAPS_LOCK (1 << 6)
185# define JO_PERIPHERAL_KEYBOARD_NUM_LOCK (1 << 5)
187# define JO_PERIPHERAL_KEYBOARD_SCROLL_LOCK (1 << 4)
189# define JO_PERIPHERAL_KEYBOARD_MAKE (1 << 3)
191# define JO_PERIPHERAL_KEYBOARD_BREAK (1 << 0)
255# define JO_SMPC_PERIPHERAL_PER_PORT (15)
unsigned short year
Definition smpc.h:264
unsigned char id
Definition smpc.h:211
unsigned short data
Definition smpc.h:230
unsigned short pull
Definition smpc.h:247
short y
Definition smpc.h:234
unsigned char hour
Definition smpc.h:267
unsigned char y
Definition smpc.h:217
unsigned char size
Definition smpc.h:212
jo_smpc_status __jo_smpc_status
SMPC status, refreshed every frame (Internal usage).
unsigned char size
Definition smpc.h:244
unsigned short push
Definition smpc.h:246
unsigned char code
Definition smpc.h:249
unsigned int reserved[3]
Definition smpc.h:220
unsigned char z
Definition smpc.h:218
unsigned char second
Definition smpc.h:269
unsigned char cond
Definition smpc.h:263
static __jo_force_inline void jo_smpc_write_byte(jo_smpc_memory_address addr, unsigned char data)
Definition smpc.h:138
#define JO_SMPC_PERIPHERAL_PER_PORT
Number of peripherals per port (with a multitap).
Definition smpc.h:255
unsigned short pull
Definition smpc.h:232
unsigned short push
Definition smpc.h:201
static __jo_force_inline void jo_smpc_end_command(jo_smpc_command command)
Definition smpc.h:155
jo_smpc_memory_address
Definition smpc.h:82
@ OutputRegister17
Definition smpc.h:115
@ OutputRegister7
Definition smpc.h:105
@ ExternalLatchEnableRegister
Definition smpc.h:135
@ OutputRegister22
Definition smpc.h:120
@ OutputRegister20
Definition smpc.h:118
@ OutputRegister8
Definition smpc.h:106
@ OutputRegister23
Definition smpc.h:121
@ OutputRegister16
Definition smpc.h:114
@ OutputRegister11
Definition smpc.h:109
@ DataDirectionRegister1
Definition smpc.h:132
@ InputRegister3
Definition smpc.h:93
@ InputRegister0
Input registers for command issuing. Whatever data the SMPC needs for processing command goes here.
Definition smpc.h:90
@ OutputRegister28
Definition smpc.h:126
@ OutputRegister13
Definition smpc.h:111
@ OutputRegister27
Definition smpc.h:125
@ OutputRegister19
Definition smpc.h:117
@ OutputRegister25
Definition smpc.h:123
@ InputRegister4
Definition smpc.h:94
@ OutputRegister0
Ouput Register for the command. If it supports it, it'll output any return data here.
Definition smpc.h:98
@ OutputRegister30
Definition smpc.h:128
@ DataDirectionRegister2
Definition smpc.h:133
@ OutputRegister24
Definition smpc.h:122
@ InputRegister2
Definition smpc.h:92
@ OutputRegister15
Definition smpc.h:113
@ InputRegister5
Definition smpc.h:95
@ OutputRegister9
Definition smpc.h:107
@ StatusRegister
Status Register.
Definition smpc.h:86
@ OutputRegister26
Definition smpc.h:124
@ InputRegister1
Definition smpc.h:91
@ OutputRegister1
Definition smpc.h:99
@ PortDataRegister1
Definition smpc.h:130
@ OutputRegister31
Definition smpc.h:129
@ OutputRegister12
Definition smpc.h:110
@ OutputRegister5
Definition smpc.h:103
@ OutputRegister4
Definition smpc.h:102
@ StatusFlag
Status Flag. Shows the status of the SMPC command. Normally you set this to 1 when issuing out a comm...
Definition smpc.h:88
@ InputOutputSelectRegister
Definition smpc.h:134
@ PortDataRegister2
Definition smpc.h:131
@ OutputRegister29
Definition smpc.h:127
@ OutputRegister14
Definition smpc.h:112
@ OutputRegister2
Definition smpc.h:100
@ OutputRegister21
Definition smpc.h:119
@ OutputRegister18
Definition smpc.h:116
@ OutputRegister3
Definition smpc.h:101
@ OutputRegister10
Definition smpc.h:108
@ CommandRegister
The command that's supposed to be issued by the SMPC.
Definition smpc.h:84
@ OutputRegister6
Definition smpc.h:104
@ InputRegister6
Definition smpc.h:96
short x
Definition smpc.h:233
jo_peripheral __jo_smpc_peripherals[(15) *2]
Peripherals (Internal usage): 15 entries for port 1 followed by 15 entries for port 2.
unsigned int reserved[4]
Definition smpc.h:203
unsigned char condition
Definition smpc.h:248
unsigned char size
Definition smpc.h:199
static __jo_force_inline unsigned char jo_smpc_read_byte(jo_smpc_memory_address addr)
Definition smpc.h:142
unsigned int reserved2[3]
Definition smpc.h:251
unsigned char day
Definition smpc.h:266
unsigned char id
Definition smpc.h:243
unsigned short pull
Definition smpc.h:215
unsigned char minute
Definition smpc.h:268
jo_smpc_command
SMPC Commands.
Definition smpc.h:42
@ EnableSoundCPU
Resets and enables the Motorola C68K (sound) CPU.
Definition smpc.h:50
@ EnableCD
Resets and enables the CD Block.
Definition smpc.h:54
@ ChangeSystemClockSpeed320
Changes the system clockspeed.
Definition smpc.h:66
@ SetSMPCMemory
Sets the 4-byte battery-backed memory contained on the SMPC(which is used by the bios for language se...
Definition smpc.h:72
@ DisableReset
Disables NMI requests to be sent when the Reset button is pressed.
Definition smpc.h:78
@ EnableNetlink
Resets and enables Netlink execution.
Definition smpc.h:58
@ DisableSlaveCPU
Disables the SH-2 Slave CPU.
Definition smpc.h:48
@ SystemReset
Resets the System.
Definition smpc.h:62
@ EnableReset
Enables NMI requests to be sent when the Reset button is pressed.
Definition smpc.h:76
@ ChangeSystemClockSpeed352
Changes the system clockspeed.
Definition smpc.h:64
@ DisableSoundCPU
Disables the Motorola C68K (sound) CPU.
Definition smpc.h:52
@ SetRTCDateAndTime
Sets the date and time for the RTC.
Definition smpc.h:70
@ EnableMasterCPU
Resets and enables the SH-2 Master CPU.
Definition smpc.h:44
@ DisableCD
Disables the CD Block.
Definition smpc.h:56
@ FetchStatusAndPeripheralData
Fetches the SMPC status and peripheral data.
Definition smpc.h:68
@ EnableSlaveCPU
Resets and enables the SH-2 Slave CPU.
Definition smpc.h:46
@ SendNMIRequestToMasterCPU
Sends an NMI request to the Master SH2.
Definition smpc.h:74
@ DisableNetlink
Disables Netlink execution.
Definition smpc.h:60
static __jo_force_inline void jo_smpc_wait(void)
Definition smpc.h:146
unsigned char id
Definition smpc.h:228
unsigned short data
Definition smpc.h:245
unsigned short data
Definition smpc.h:200
unsigned short system_status
Definition smpc.h:272
unsigned char id
Definition smpc.h:198
unsigned int smpc_memory
Definition smpc.h:273
unsigned short pull
Definition smpc.h:202
unsigned short data
Definition smpc.h:213
unsigned short push
Definition smpc.h:231
unsigned char w
Definition smpc.h:219
unsigned char month
Definition smpc.h:265
unsigned char size
Definition smpc.h:229
unsigned char cartridge_code
Definition smpc.h:270
unsigned int reserved[3]
Definition smpc.h:235
unsigned char area_code
Definition smpc.h:271
void __jo_smpc_command(const jo_smpc_command command)
Send a command to the SMPC and wait for the end of the command (Internal usage).
unsigned char x
Definition smpc.h:216
unsigned short push
Definition smpc.h:214
unsigned short reserved1
Definition smpc.h:250
static __jo_force_inline void jo_smpc_begin_command(void)
Definition smpc.h:150
Digital peripheral data (gamepad).
Definition smpc.h:197
Analog peripheral data (racing wheel, mission stick, 3D pad).
Definition smpc.h:210
Keyboard data.
Definition smpc.h:242
Pointing peripheral data (mouse).
Definition smpc.h:227
SMPC status (Internal usage).
Definition smpc.h:262
#define __jo_force_inline
force inline attribute (and prevent Doxygen prototype parsing bug)
Definition types.h:39