PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
freemtap.c File Reference
#include "types.h"
#include "irx.h"
#include "stdio.h"
#include "loadcore.h"
#include "thevent.h"
#include "thbase.h"
#include "xsio2man.h"
#include "freemtap.h"
+ Include dependency graph for freemtap.c:

Go to the source code of this file.

Macros

#define BANNER   "FREEMTAP %s\n"
 
#define VERSION   "v1.0"
 
#define EF_UPDATE_SLOTS   0x1
 
#define EF_EXIT_THREAD   0x2
 

Functions

 IRX_ID ("multitap_manager", 2, 2)
 
s32 read_stat6c_bit (u32 bit, sio2_transfer_data_t *tdata)
 
void get_slot_number_setup_td (u32 port, u32 reg)
 
s32 get_slot_number_check_td (u32 bit)
 
s32 get_slot_number (u32 port, u32 retries)
 
void update_slot_numbers_thread ()
 
s32 change_slot_setup_td (u32 port, s32 slot, u32 reg)
 
s32 change_slot_check_td (u32 a)
 
int change_slot (s32 *arg)
 
int get_slots1 (int port)
 
int get_slots2 (int port)
 
void update_slot_numbers ()
 
int _start (int argc, char *argv[])
 
void shutdown ()
 
s32 mtapPortOpen (u32 port)
 
s32 mtapPortClose (u32 port)
 
s32 mtapGetConnection (u32 port)
 
s32 mtapGetSlotNumber (u32 port)
 
s32 mtapChangeSlot (u32 port, u32 slot)
 

Variables

struct irx_export_table _exp_mtapman
 
static s32 event_flag
 
static s32 threadid_main
 
static u32 state_open [4]
 
static u32 state_getcon [4]
 
static u32 state_slots [4]
 
static u8 in_buffer [256]
 
static u8 out_buffer [256]
 
static sio2_transfer_data_t td
 

Detailed Description

IOP multitap driver

Definition in file freemtap.c.

Macro Definition Documentation

◆ BANNER

#define BANNER   "FREEMTAP %s\n"

Definition at line 23 of file freemtap.c.

◆ VERSION

#define VERSION   "v1.0"

Definition at line 24 of file freemtap.c.

◆ EF_UPDATE_SLOTS

#define EF_UPDATE_SLOTS   0x1

Definition at line 26 of file freemtap.c.

◆ EF_EXIT_THREAD

#define EF_EXIT_THREAD   0x2

Definition at line 27 of file freemtap.c.

Function Documentation

◆ read_stat6c_bit()

s32 read_stat6c_bit ( u32  bit,
sio2_transfer_data_t tdata 
)

Definition at line 45 of file freemtap.c.

◆ get_slot_number_setup_td()

void get_slot_number_setup_td ( u32  port,
u32  reg 
)

Definition at line 69 of file freemtap.c.

◆ get_slot_number_check_td()

s32 get_slot_number_check_td ( u32  bit)

Definition at line 94 of file freemtap.c.

◆ get_slot_number()

s32 get_slot_number ( u32  port,
u32  retries 
)

Definition at line 117 of file freemtap.c.

◆ update_slot_numbers_thread()

void update_slot_numbers_thread ( )

Definition at line 153 of file freemtap.c.

◆ change_slot_setup_td()

s32 change_slot_setup_td ( u32  port,
s32  slot,
u32  reg 
)

Definition at line 194 of file freemtap.c.

◆ change_slot_check_td()

s32 change_slot_check_td ( u32  a)

Definition at line 228 of file freemtap.c.

◆ change_slot()

int change_slot ( s32 *  arg)

Definition at line 265 of file freemtap.c.

◆ get_slots1()

int get_slots1 ( int  port)

Definition at line 368 of file freemtap.c.

◆ get_slots2()

int get_slots2 ( int  port)

Definition at line 373 of file freemtap.c.

◆ update_slot_numbers()

void update_slot_numbers ( )

Definition at line 378 of file freemtap.c.

◆ _start()

int _start ( int  argc,
char *  argv[] 
)

Definition at line 383 of file freemtap.c.

◆ mtapPortOpen()

s32 mtapPortOpen ( u32  port)

Definition at line 468 of file freemtap.c.

◆ mtapPortClose()

s32 mtapPortClose ( u32  port)

Definition at line 493 of file freemtap.c.

◆ mtapGetConnection()

s32 mtapGetConnection ( u32  port)

Definition at line 501 of file freemtap.c.

◆ mtapGetSlotNumber()

s32 mtapGetSlotNumber ( u32  port)

Definition at line 506 of file freemtap.c.

◆ mtapChangeSlot()

s32 mtapChangeSlot ( u32  port,
u32  slot 
)

Definition at line 522 of file freemtap.c.

Variable Documentation

◆ event_flag

s32 event_flag
static

Definition at line 35 of file freemtap.c.

◆ threadid_main

s32 threadid_main
static

Definition at line 36 of file freemtap.c.

◆ state_open

u32 state_open[4]
static

Definition at line 38 of file freemtap.c.

◆ state_getcon

u32 state_getcon[4]
static

Definition at line 39 of file freemtap.c.

◆ state_slots

u32 state_slots[4]
static

Definition at line 40 of file freemtap.c.

◆ in_buffer

u8 in_buffer[256]
static

Definition at line 41 of file freemtap.c.

◆ out_buffer

u8 out_buffer[256]
static

Definition at line 42 of file freemtap.c.

◆ td

Definition at line 43 of file freemtap.c.