add kermit header and stubs

This commit is contained in:
JoseAaronLopezGarcia
2025-09-05 15:53:40 +02:00
parent 6ba471c7c3
commit bac379ba88
9 changed files with 450 additions and 0 deletions

View File

@@ -37,4 +37,5 @@ SUBDIRS = \
video \ video \
vsh \ vsh \
wlan \ wlan \
kermit \
samples samples

58
src/kermit/Makefile.am Normal file
View File

@@ -0,0 +1,58 @@
libdir = @PSPSDK_LIBDIR@
CC = @PSP_CC@
CCAS = $(CC)
AR = @PSP_AR@
RANLIB = @PSP_RANLIB@
CPPFLAGS = -I$(top_srcdir)/src/base -I$(top_srcdir)/src/kernel
CFLAGS = @PSPSDK_CFLAGS@
CCASFLAGS = $(CFLAGS)
KERMIT_DRIVER_OBJS = sceKermit_driver_0000.o sceKermit_driver_0001.o sceKermit_driver_0002.o sceKermit_driver_0003.o sceKermit_driver_0004.o sceKermit_driver_0005.o
KERMIT_FLASHFS_DRIVER_OBJS = sceKermitFlashfs_driver_0000.o sceKermitFlashfs_driver_0001.o
KERMIT_MSFS_DRIVER_OBJS = sceKermitMsfs_driver_0000.o sceKermitMsfs_driver_0001.o sceKermitMsfs_driver_0002.o sceKermitMsfs_driver_0003.o sceKermitMsfs_driver_0004.o sceKermitMsfs_driver_0005.o sceKermitMsfs_driver_0006.o
KERMIT_MEMORY_DRIVER_OBJS = sceKermitMemory_driver_0000.o sceKermitMemory_driver_0001.o sceKermitMemory_driver_0002.o sceKermitMemory_driver_0003.o
KERMIT_PERIPHERAL_OBJS = sceKermitPeripheral_0000.o sceKermitPeripheral_0001.o sceKermitPeripheral_0002.o sceKermitPeripheral_0003.o
KERMIT_PERIPHERAL_DRIVER_OBJS = sceKermitPeripheral_driver_0000.o sceKermitPeripheral_driver_0001.o sceKermitPeripheral_driver_0002.o sceKermitPeripheral_driver_0003.o sceKermitPeripheral_driver_0004.o sceKermitPeripheral_driver_0005.o sceKermitPeripheral_driver_0006.o sceKermitPeripheral_driver_0007.o sceKermitPeripheral_driver_0008.o sceKermitPeripheral_driver_0009.o sceKermitPeripheral_driver_0010.o sceKermitPeripheral_driver_0011.o sceKermitPeripheral_driver_0012.o sceKermitPeripheral_driver_0013.o sceKermitPeripheral_driver_0014.o sceKermitPeripheral_driver_0015.o sceKermitPeripheral_driver_0016.o sceKermitPeripheral_driver_0017.o sceKermitPeripheral_driver_0018.o
kermitincludedir = @PSPSDK_INCLUDEDIR@
kermitinclude_HEADERS = kermit.h
lib_LIBRARIES = libpspkermit_driver.a libpspkermitflashfs_driver.a libpspkermitmsfs_driver.a libpspkermitmemory_driver.a libpspkermitperipheral.a libpspkermitperipheral_driver.a
libpspkermit_driver_a_SOURCES = sceKermit_driver.S
libpspkermit_driver_a_LIBADD = $(KERMIT_DRIVER_OBJS)
libpspkermitflashfs_driver_a_SOURCES = sceKermitFlashfs_driver.S
libpspkermitflashfs_driver_a_LIBADD = $(KERMIT_FALSHFS_DRIVER_OBJS)
libpspkermitmsfs_driver_a_SOURCES = sceKermitMsfs_driver.S
libpspkermitmsfs_driver_a_LIBADD = $(KERMIT_MSFS_DRIVER_OBJS)
libpspkermitmemory_driver_a_SOURCES = sceKermitMemory_driver.S
libpspkermitmemory_driver_a_LIBADD = $(KERMIT_MEMORY_DRIVER_OBJS)
libpspkermitperipheral_a_SOURCES = sceKermitPeripheral.S
libpspkermitperipheral_a_LIBADD = $(KERMIT_PERIPHERAL_OBJS)
libpspkermitperipheral_driver_a_SOURCES = sceKermitPeripheral_driver.S
libpspkermitperipheral_driver_a_LIBADD = $(KERMIT_PERIPHERAL_DRIVER_OBJS)
$(KERMIT_DRIVER_OBJS): sceKermit_driver.S
$(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@
$(KERMIT_FLASHFS_DRIVER_OBJS): sceKermitFlashfs_driver.S
$(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@
$(KERMIT_MSFS_DRIVER_OBJS): sceKermitMsfs_driver.S
$(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@
$(KERMIT_MEMORY_DRIVER_OBJS): sceKermitMemory_driver.S
$(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@
$(KERMIT_PERIPHERAL_OBJS): sceKermitPeripheral.S
$(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@
$(KERMIT_PERIPHERAL_DRIVER_OBJS): sceKermitPeripheral_driver.S
$(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@

241
src/kermit/kermit.h Normal file
View File

@@ -0,0 +1,241 @@
#ifndef __KERMIT_H__
#define __KERMIT_H__
#include <pspsdk.h>
#define KERMIT_MAX_ARGC (14)
/* kermit KERMIT_MODE_PERIPHERAL commands */
#define KERMIT_CMD_RTC_GET_CURRENT_TICK (0x0)
#define KERMIT_CMD_ID_STORAGE_LOOKUP (0x1)
#define KERMIT_CMD_POWER_FREQUENCY (0x2)
#define KERMIT_CMD_AUDIO_ROUTING (0x3)
#define KERMIT_CMD_GET_CAMERA_DIRECTION (0x5)
#define KERMIT_CMD_GET_IDPSC_ENABLE (0x6)
#define KERMIT_CMD_DISABLE_MULTITASKING (0x7)
#define KERMIT_CMD_ERROR_EXIT (0x8)
#define KERMIT_CMD_ERROR_EXIT_2 (0x422)
#define KERMIT_CMD_ENABLE_MULTITASKING (0x9)
#define KERMIT_CMD_RESUME_DEVICE (0xA)
#define KERMIT_CMD_REQUEST_SUSPEND (0xB)
#define KERMIT_CMD_IS_FIRST_BOOT (0xC)
#define KERMIT_CMD_GET_PREFIX_SSID (0xD)
#define KERMIT_CMD_SET_PS_BUTTON_STATE (0x10)
/* kermit KERMIT_MODE_MSFS commands */
#define KERMIT_CMD_INIT_MS (0x0)
#define KERMIT_CMD_EXIT_MS (0x1)
#define KERMIT_CMD_OPEN_MS (0x2)
#define KERMIT_CMD_CLOSE_MS (0x3)
#define KERMIT_CMD_READ_MS (0x4)
#define KERMIT_CMD_WRITE_MS (0x5)
#define KERMIT_CMD_SEEK_MS (0x6)
#define KERMIT_CMD_IOCTL_MS (0x7)
#define KERMIT_CMD_REMOVE_MS (0x8)
#define KERMIT_CMD_MKDIR_MS (0x9)
#define KERMIT_CMD_RMDIR_MS (0xA)
#define KERMIT_CMD_DOPEN_MS (0xB)
#define KERMIT_CMD_DCLOSE_MS (0xC)
#define KERMIT_CMD_DREAD_MS (0xD)
#define KERMIT_CMD_GETSTAT_MS (0xE)
#define KERMIT_CMD_CHSTAT_MS (0xF)
#define KERMIT_CMD_RENAME_MS (0x10)
#define KERMIT_CMD_CHDIR_MS (0x11)
#define KERMIT_CMD_DEVCTL (0x14)
/* kermit KERMIT_MODE_AUDIO commands */
#define KERMIT_CMD_INIT_AUDIO_IN 0x0
#define KERMIT_CMD_OUTPUT_1 0x1
#define KERMIT_CMD_OUTPUT_2 0x2
#define KERMIT_CMD_SUSPEND_AUDIO 0x3
#define KERMIT_CMD_RESUME 0x4
/* kermit KERMIT_MODE_ME commands */
#define KERMIT_CMD_UNK0 0x0
#define KERMIT_CMD_SETAVC_TIMESTAMPINTERNAL 0x1
#define KERMIT_CMD_BOOT_START 0x2
/* kermit KERMIT_MODE_LOWIO commands */
#define KERMIT_CMD_UNK9 0x9
#define KERMIT_CMD_UNKA 0xA
#define KERMIT_CMD_UNKB 0xB
#define KERMIT_CMD_UNKC 0xC
/* kermit KERMIT_MODE_WLAN commands */
#define KERMIT_CMD_INIT 0x0
#define KERMIT_CMD_GET_SWITCH_INTERNAL_STATE 0x2
#define KERMIT_CMD_GET_ETHER_ADDR 0x3
#define KERMIT_CMD_ADHOC_CTL_INIT 0x6
#define KERMIT_CMD_ADHOC_CTL_TERM 0x7
#define KERMIT_CMD_ADHOC_SCAN 0x8
#define KERMIT_CMD_ADHOC_JOIN 0x9
#define KERMIT_CMD_ADHOC_CREATE 0xA
#define KERMIT_CMD_ADHOC_LEAVE 0xB
#define KERMIT_CMD_ADHOC_TX_DATA 0xC
#define KERMIT_CMD_ADHOC_RX_DATA 0xD
#define KERMIT_CMD_INET_INIT 0xE
#define KERMIT_CMD_INET_START 0xF
#define KERMIT_CMD_INET_TERM 0x10
#define KERMIT_CMD_INET_SOCKET 0x11
#define KERMIT_CMD_INET_CLOSE 0x12
#define KERMIT_CMD_INET_BIND 0x13
#define KERMIT_CMD_INET_LISTEN 0x14
#define KERMIT_CMD_INET_CONNECT 0x15
#define KERMIT_CMD_INET_SHUTDOWN 0x16
#define KERMIT_CMD_INET_POLL 0x17
#define KERMIT_CMD_INET_ACCEPT 0x18
#define KERMIT_CMD_INET_GET_PEER_NAME 0x19
#define KERMIT_CMD_INET_GET_SOCK_NAME 0x1A
#define KERMIT_CMD_INET_GET_OPT 0x1B
#define KERMIT_CMD_INET_SET_OPT 0x1C
#define KERMIT_CMD_INET_RECV_FROM 0x1D
#define KERMIT_CMD_INET_SENDTO_INTERNAL 0x1E
#define KERMIT_CMD_INET_SOIOCTL 0x1F
#define KERMIT_CMD_SUSPEND_WLAN 0x20
#define KERMIT_CMD_SET_WOL_PARAM 0x22
#define KERMIT_CMD_GET_WOL_INFO 0x23
#define KERMIT_CMD_SET_HOST_DISCOVER 0x24
/* kermit KERMIT_MODE_UTILITY commands */
#define KERMIT_CMD_OSK_START (0x0)
#define KERMIT_CMD_OSK_SHUTDOWN (0x1)
#define KERMIT_CMD_OSK_UPDATE (0x3)
/* kermit KERMIT_MODE_USB commands */
#define KERMIT_CMD_INIT 0x0
#define KERMIT_CMD_ACTIVATE 0x15
#define KERMIT_CMD_DEACTIVATE 0x16
#define KERMIT_CMD_SET_OP 0x19
#define KERMIT_CMD_SET_OP_BIS 0x1A
#define KERMIT_CMD_UNK1B 0x1B
/* KERMIT_PACKET address macros */
#define KERNEL(x) ((x & 0x80000000)? 1:0)
#define KERMIT_PACKET(x) (x | (2-KERNEL(x))*0x20000000)
#define ALIGN_64(x) ((x) & -64)
#define KERMIT_CALLBACK_DISABLE 0
enum KermitModes {
KERMIT_MODE_NONE,
KERMIT_MODE_UNK_1,
KERMIT_MODE_UNK_2,
KERMIT_MODE_MSFS,
KERMIT_MODE_FLASHFS,
KERMIT_MODE_AUDIOOUT,
KERMIT_MODE_ME,
KERMIT_MODE_LOWIO,
KERMIT_MODE_POCS_USBPSPCM,
KERMIT_MODE_PERIPHERAL,
KERMIT_MODE_WLAN,
KERMIT_MODE_AUDIOIN,
KERMIT_MODE_USB,
KERMIT_MODE_UTILITY,
KERMIT_MODE_EXTRA_1,
KERMIT_MODE_EXTRA_2,
};
enum KermitVirtualInterrupts {
KERMIT_VIRTUAL_INTR_NONE,
KERMIT_VIRTUAL_INTR_AUDIO_CH1,
KERMIT_VIRTUAL_INTR_AUDIO_CH2,
KERMIT_VIRTUAL_INTR_AUDIO_CH3,
KERMIT_VIRTUAL_INTR_ME_DMA_CH1,
KERMIT_VIRTUAL_INTR_ME_DMA_CH2,
KERMIT_VIRTUAL_INTR_ME_DMA_CH3,
KERMIT_VIRTUAL_INTR_WLAN_CH1,
KERMIT_VIRTUAL_INTR_WLAN_CH2,
KERMIT_VIRTUAL_INTR_IMPOSE_CH1,
KERMIT_VIRTUAL_INTR_POWER_CH1,
KERMIT_VIRTUAL_INTR_UNKNOWN_CH1, // <- used after settings
KERMIT_VIRTUAL_INTR_USBGPS_CH1,
KERMIT_VIRTUAL_INTR_USBPSPCM_CH1,
};
enum KermitArgumentModes {
KERMIT_INPUT_MODE = 0x1,
KERMIT_OUTPUT_MODE = 0x2,
};
typedef struct {
uint32_t cmd; //0x0
SceUID sema_id; //0x4
uint64_t *response; //0x8
uint32_t padding; //0xC
uint64_t args[14]; // 0x10
} SceKermitRequest; //0x80
// 0xBFC00800
typedef struct {
uint32_t cmd; //0x00
SceKermitRequest *request; //0x04
} SceKermitCommand; //0x8
// 0xBFC00840
typedef struct {
uint64_t result; //0x0
SceUID sema_id; //0x8
int32_t unk_C; //0xC
uint64_t *response; //0x10
uint64_t unk_1C; //0x1C
} SceKermitResponse; //0x24 or 0x30????
// 0xBFC008C0
typedef struct {
int32_t unk_0; //0x0
int32_t unk_4; //0x4
} SceKermitInterrupt; //0x8
typedef struct KermitPacket_
{
u32 cmd; //0x0
SceUID sema; //0x4
struct KermitPacket_ *self; //0x8
u32 unk_C; //0xC
} KermitPacket;
/*
Issue a command to kermit.
packet: a kermit packet. Header followed by 64 bit words (LE) as arguements.
cmd_mode: a valid command mode type.
cmd: a valid command subtype of cmd_mode.
argc: the number of 64 bit arguements following the header. Max 13 arguements.
allow_callback: set non-zero to use callback permitting semaphore wait.
resp: 64 bit word returned by the kermit call.
returns 0 on success, else < 0 on error.
*/
int sceKermit_driver_4F75AA05(KermitPacket *packet, u32 cmd_mode, u32 cmd, u32 argc, u32 allow_callback, u64 *resp);
/*
Apply IO to kermit packet.
packet: a kermit packet. Header followed by 64 bit words (LE) as arguements.
argc: the number of arguements in the packet. Max 13 arguements.
buffer: the input buffer containing the data to be sent or the output buffer to store data.
buffer_size: the size of the input data, else the size of the output buffer.
io_mode: KERMIT_INPUT_MODE for data input. KERMIT_OUTPUT_MODE for expecting output data.
*/
void sceKermitMemory_driver_AAF047AC(KermitPacket *packet, u32 argc, u8 *buffer, u32 buffer_size, u32 io_mode);
/*
Send data to vita host.
data: pointer to the data to be sent to host.
len: the size of the data to be sent.
*/
void sceKermitMemory_driver_80E1240A(u8 *data, u32 len);
/*
Recieve data from vita host.
data: pointer to buffer to store output data.
len: the size of the expected output data.
*/
void sceKermitMemory_driver_90B662D0(u8 *data, u32 data_size);
#endif /* __KERMIT_H__ */

View File

@@ -0,0 +1,10 @@
.set noreorder
#include "pspimport.s"
#ifdef F_sceKermitFlashfs_driver_0000
IMPORT_START "sceKermitFlashfs_driver",0x00010000
#endif
#ifdef F_sceKermitFlashfs_driver_0001
IMPORT_FUNC "sceKermitFlashfs_driver",0x78D76B63,sceKermitFlashfs_driver_78D76B63
#endif

View File

@@ -0,0 +1,16 @@
.set noreorder
#include "pspimport.s"
#ifdef F_sceKermitMemory_driver_0000
IMPORT_START "sceKermitMemory_driver",0x00010000
#endif
#ifdef F_sceKermitMemory_driver_0001
IMPORT_FUNC "sceKermitMemory_driver",0x80E1240A,sceKermitMemory_driver_80E1240A
#endif
#ifdef F_sceKermitMemory_driver_0002
IMPORT_FUNC "sceKermitMemory_driver",0x90B662D0,sceKermitMemory_driver_90B662D0
#endif
#ifdef F_sceKermitMemory_driver_0003
IMPORT_FUNC "sceKermitMemory_driver",0xAAF047AC,sceKermitMemorySetArgument
#endif

View File

@@ -0,0 +1,25 @@
.set noreorder
#include "pspimport.s"
#ifdef F_sceKermitMsfs_driver_0000
IMPORT_START "sceKermitMsfs_driver",0x00010000
#endif
#ifdef F_sceKermitMsfs_driver_0001
IMPORT_FUNC "sceKermitMsfs_driver",0x1A4DC9B7,sceKermitMsfs_driver_1A4DC9B7
#endif
#ifdef F_sceKermitMsfs_driver_0002
IMPORT_FUNC "sceKermitMsfs_driver",0x7668D90C,sceKermitMsfs_driver_7668D90C
#endif
#ifdef F_sceKermitMsfs_driver_0003
IMPORT_FUNC "sceKermitMsfs_driver",0x93B61A29,sceKermitMsfs_driver_93B61A29
#endif
#ifdef F_sceKermitMsfs_driver_0004
IMPORT_FUNC "sceKermitMsfs_driver",0xBE954163,sceKermitMsfs_driver_BE954163
#endif
#ifdef F_sceKermitMsfs_driver_0005
IMPORT_FUNC "sceKermitMsfs_driver",0xC1B4213A,sceKermitMsfs_driver_C1B4213A
#endif
#ifdef F_sceKermitMsfs_driver_0006
IMPORT_FUNC "sceKermitMsfs_driver",0xEAD1D2C6,sceKermitMsfs_driver_EAD1D2C6
#endif

View File

@@ -0,0 +1,16 @@
.set noreorder
#include "pspimport.s"
#ifdef F_sceKermitPeripheral_0000
IMPORT_START "sceKermitPeripheral",0x40010000
#endif
#ifdef F_sceKermitPeripheral_0001
IMPORT_FUNC "sceKermitPeripheral",0x4A26B7C8,sceKermitPeripheral_4A26B7C8
#endif
#ifdef F_sceKermitPeripheral_0002
IMPORT_FUNC "sceKermitPeripheral",0xC0EBC631,sceKermitPeripheral_C0EBC631
#endif
#ifdef F_sceKermitPeripheral_0003
IMPORT_FUNC "sceKermitPeripheral",0xD27C5E03,sceKermitPeripheral_D27C5E03
#endif

View File

@@ -0,0 +1,61 @@
.set noreorder
#include "pspimport.s"
#ifdef F_sceKermitPeripheral_driver_0000
IMPORT_START "sceKermitPeripheral_driver",0x00010000
#endif
#ifdef F_sceKermitPeripheral_driver_0001
IMPORT_FUNC "sceKermitPeripheral_driver",0x0648E1A3,sceKermitPeripheral_driver_0648E1A3
#endif
#ifdef F_sceKermitPeripheral_driver_0002
IMPORT_FUNC "sceKermitPeripheral_driver",0x15F5C107,sceKermitPeripheral_driver_15F5C107
#endif
#ifdef F_sceKermitPeripheral_driver_0003
IMPORT_FUNC "sceKermitPeripheral_driver",0x1617E966,sceKermitPeripheral_driver_1617E966
#endif
#ifdef F_sceKermitPeripheral_driver_0004
IMPORT_FUNC "sceKermitPeripheral_driver",0x20638B97,sceKermitPeripheral_driver_20638B97
#endif
#ifdef F_sceKermitPeripheral_driver_0005
IMPORT_FUNC "sceKermitPeripheral_driver",0x4A26B7C8,sceKermitPeripheral_driver_4A26B7C8
#endif
#ifdef F_sceKermitPeripheral_driver_0006
IMPORT_FUNC "sceKermitPeripheral_driver",0x55D690DD,sceKermitPeripheral_driver_55D690DD
#endif
#ifdef F_sceKermitPeripheral_driver_0007
IMPORT_FUNC "sceKermitPeripheral_driver",0x61BEA1D2,sceKermitPeripheral_driver_61BEA1D2
#endif
#ifdef F_sceKermitPeripheral_driver_0008
IMPORT_FUNC "sceKermitPeripheral_driver",0x65D98A21,sceKermitPeripheral_driver_65D98A21
#endif
#ifdef F_sceKermitPeripheral_driver_0009
IMPORT_FUNC "sceKermitPeripheral_driver",0x675DB2C1,sceKermitPeripheral_driver_675DB2C1
#endif
#ifdef F_sceKermitPeripheral_driver_0010
IMPORT_FUNC "sceKermitPeripheral_driver",0x6D6AA215,sceKermitPeripheral_driver_6D6AA215
#endif
#ifdef F_sceKermitPeripheral_driver_0011
IMPORT_FUNC "sceKermitPeripheral_driver",0x76BE2E28,sceKermitPeripheral_driver_76BE2E28
#endif
#ifdef F_sceKermitPeripheral_driver_0012
IMPORT_FUNC "sceKermitPeripheral_driver",0x8C7903E7,sceKermitPeripheral_driver_8C7903E7
#endif
#ifdef F_sceKermitPeripheral_driver_0013
IMPORT_FUNC "sceKermitPeripheral_driver",0x9EF7501D,sceKermitPeripheral_driver_9EF7501D
#endif
#ifdef F_sceKermitPeripheral_driver_0014
IMPORT_FUNC "sceKermitPeripheral_driver",0xAB29C68B,sceKermitPeripheral_driver_AB29C68B
#endif
#ifdef F_sceKermitPeripheral_driver_0015
IMPORT_FUNC "sceKermitPeripheral_driver",0xB778DB22,sceKermitPeripheral_driver_B778DB22
#endif
#ifdef F_sceKermitPeripheral_driver_0016
IMPORT_FUNC "sceKermitPeripheral_driver",0xB93A88E2,sceKermitPeripheral_driver_B93A88E2
#endif
#ifdef F_sceKermitPeripheral_driver_0017
IMPORT_FUNC "sceKermitPeripheral_driver",0xC6F8B4E1,sceKermitPeripheral_driver_C6F8B4E1
#endif
#ifdef F_sceKermitPeripheral_driver_0018
IMPORT_FUNC "sceKermitPeripheral_driver",0xD0A69002,sceKermitPeripheral_driver_D0A69002
#endif

View File

@@ -0,0 +1,22 @@
.set noreorder
#include "pspimport.s"
#ifdef F_sceKermit_driver_0000
IMPORT_START "sceKermit_driver",0x00010000
#endif
#ifdef F_sceKermit_driver_0001
IMPORT_FUNC "sceKermit_driver",0x36666181,sceKermitSendRequest
#endif
#ifdef F_sceKermit_driver_0002
IMPORT_FUNC "sceKermit_driver",0x4C3A362D,sceKermit_driver_4C3A362D
#endif
#ifdef F_sceKermit_driver_0003
IMPORT_FUNC "sceKermit_driver",0x5280B410,sceKermitRegisterVirtualIntrHandler
#endif
#ifdef F_sceKermit_driver_0004
IMPORT_FUNC "sceKermit_driver",0x9DDD7DCA,sceKermit_driver_9DDD7DCA
#endif
#ifdef F_sceKermit_driver_0005
IMPORT_FUNC "sceKermit_driver",0xD69C50BB,sceKermit_driver_D69C50BB
#endif