aboutsummaryrefslogtreecommitdiffstats
path: root/fw/pseudo/csu_command_surface.c
blob: 912a3bfcbf8aa29c9301d0bbdc53021ca82fe441 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// CSU TA command surface, decompiled with restored names, prototypes and types.
// Source: psp_out/versions_win/ta_42-0-0-6_1c874c3c.bin
// Handlers resolved from fw/cmdmaps/csu.json; loc_* labels mapped to their
// containing function. Generated by fw/ta_surface.py.

// ================ cmd 0x3 @ 0x40104e ================
int __fastcall csu_cmd03(void *ctx, struct ta_params *params)
{
  return 7;
}

// ================ cmd 0x1 @ 0x401058 ================
int __fastcall csu_cmd01(void *ctx, struct ta_params *params)
{
  int result; // r0
  char v4; // r1
  int ctxa; // [sp+4h] [bp-4h] BYREF

  ctxa = 0;
  result = csu_cmd01__h1(ctx: &ctxa, params);
  if ( result == 0 )
  {
    v4 = ctxa;
    *((_BYTE *)ctx + 17) = ctxa & 1;
    *((_BYTE *)ctx + 19) = (v4 & 4) != 0;
    *((_BYTE *)ctx + 18) = (v4 & 2) != 0;
    *((_BYTE *)ctx + 16) = (v4 & 7) != 0;
  }
  return result;
}

// ================ cmd 0x2 @ 0x40108c ================
int __fastcall csu_cmd02(void *ctx, struct ta_params *params)
{
  unsigned int v2; // r0
  int result; // r0
  int v4; // r0

  v2 = *((unsigned __int8 *)ctx + 12);
  if ( v2 == 0 )
  {
    v4 = 6;
    return sub_4011E4(a1: v4);
  }
  result = csu_asd_rpc_306(arg: v2);
  if ( result == 0 )
  {
    v4 = 5;
    return sub_4011E4(a1: v4);
  }
  return result;
}