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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
.include "macros.inc"
.section .text, "ax"
.global TRKInitializeDispatcher
TRKInitializeDispatcher:
lis r3, gTRKDispatchTableSize@ha
li r0, 0x20
stw r0, gTRKDispatchTableSize@l(r3)
li r3, 0
blr
.global TRKDispatchMessage
TRKDispatchMessage:
mflr r0
li r4, 0
stw r0, 4(r1)
stwu r1, -0x18(r1)
stw r31, 0x14(r1)
li r31, 0x500
stw r30, 0x10(r1)
addi r30, r3, 0
bl TRKSetBufferPosition
addi r3, r30, 0
addi r4, r1, 8
bl TRKReadBuffer1_ui8
lis r3, gTRKDispatchTableSize@ha
lbz r4, 8(r1)
lwz r0, gTRKDispatchTableSize@l(r3)
cmplw r4, r0
bge lbl_80088B10
lis r3, gTRKDispatchTable@ha
slwi r4, r4, 2
addi r0, r3, gTRKDispatchTable@l
add r3, r0, r4
lwz r12, 0(r3)
addi r3, r30, 0
mtlr r12
blrl
mr r31, r3
lbl_80088B10:
mr r3, r31
lwz r31, 0x14(r1)
lwz r30, 0x10(r1)
addi r1, r1, 0x18
lwz r0, 4(r1)
mtlr r0
blr
.section .data, "wa"
.global gTRKDispatchTable
gTRKDispatchTable:
.4byte TRKDoUnsupported
.4byte TRKDoConnect
.4byte TRKDoDisconnect
.4byte TRKDoReset
.4byte TRKDoVersions
.4byte TRKDoSupportMask
.4byte TRKDoCPUType
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte TRKDoReadMemory
.4byte TRKDoWriteMemory
.4byte TRKDoReadRegisters
.4byte TRKDoWriteRegisters
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte TRKDoFlushCache
.4byte TRKDoUnsupported
.4byte TRKDoContinue
.4byte TRKDoStep
.4byte TRKDoStop
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte TRKDoUnsupported
.4byte 0
.4byte 0
.section .bss, "wa"
.global gTRKDispatchTableSize
gTRKDispatchTableSize:
.skip 0x8
|