-
Notifications
You must be signed in to change notification settings - Fork 0
/
reclock
executable file
·135 lines (107 loc) · 3.13 KB
/
reclock
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/bin/bash
e="" # Set to echo for dry run
# PCLOCK?
#$e nvapoke 0x1371c8 0x00030000
#$e nvapoke 0x1371cc 0x00030000
$e nvapeek 0x137360 # was 3, but should already be 1, why?
$e nvapoke 0x137360 1
# PBFB_BROADCAST
$e nvapoke 0x10f440 0x22f84f10 # was 0x22442410
# PBFB_BROADCAST
$e nvapoke 0x10f8f4 0x212100a7
# And the actual reclock..
$e nvapoke 1548 0x80000102
name=`mktemp`
cat > "${name}" << EOF
0x00000000 0x00000000 0x00000000
0x00000100 0x000000ff 0xffffffff
0x00000200 0x00000055 0x55555555
0x00000300 0x000000aa 0xaaaaaaaa
0x00000400 0x00000033 0x33333333
0x00000500 0x000000cc 0xcccccccc
0x00000600 0x00000000 0xf0f0f0f0
0x00000700 0x000000ff 0x0f0f0f0f
0x00000800 0x000000ff 0x00ff00ff
0x00000900 0x00000000 0xff00ff00
0x00000a00 0x000000ff 0x0000ffff
0x00000b00 0x00000000 0xffff0000
0x00000c00 0x00000000 0x00000000
0x00000d00 0x000000ff 0xffffffff
0x00000e00 0x00000055 0x55555555
0x00000f00 0x000000aa 0xaaaaaaaa
0x00001000 0x00000033 0x33333333
0x00001100 0x000000cc 0xcccccccc
0x00001200 0x00000000 0xf0f0f0f0
0x00001300 0x000000ff 0x0f0f0f0f
0x00001400 0x000000ff 0x00ff00ff
0x00001500 0x00000000 0xff00ff00
0x00001600 0x000000ff 0x0000ffff
0x00001700 0x00000000 0xffff0000
0x00001800 0x00000000 0x00000000
0x00001900 0x000000ff 0xffffffff
0x00001a00 0x00000055 0x55555555
0x00001b00 0x000000aa 0xaaaaaaaa
0x00001c00 0x00000033 0x33333333
0x00001d00 0x000000cc 0xcccccccc
0x00001e00 0x00000000 0xf0f0f0f0
0x00001f00 0x000000ff 0x0f0f0f0f
0x00002000 0x000000ff 0x00ff00ff
0x00002100 0x00000000 0xff00ff00
0x00002200 0x000000ff 0x0000ffff
0x00002300 0x00000000 0xffff0000
0x00002400 0x00000000 0x00000000
0x00002500 0x000000ff 0xffffffff
0x00002600 0x00000055 0x55555555
0x00002700 0x000000aa 0xaaaaaaaa
0x00002800 0x00000033 0x33333333
0x00002900 0x000000cc 0xcccccccc
0x00002a00 0x00000000 0xf0f0f0f0
0x00002b00 0x000000ff 0x0f0f0f0f
0x00002c00 0x000000ff 0x00ff00ff
0x00002d00 0x00000000 0xff00ff00
0x00002e00 0x000000ff 0x0000ffff
0x00002f00 0x00000000 0xffff0000
EOF
while read x y z; do
$e nvapoke 0x10f968 $x
$e nvapoke 0x10f96c $x
$e nvapoke 0x10f920 $(printf 0x%08x $(($y | 0x100)))
$e nvapoke 0x10f924 $(printf 0x%08x $(($y | 0x100)))
$e nvapoke 0x10f918 $z
$e nvapoke 0x10f91c $z
$e nvapoke 0x10f920 $y
$e nvapoke 0x10f924 $y
$e nvapoke 0x10f918 $z
$e nvapoke 0x10f91c $z
done < "${name}"
rm "${name}"
# What is this? Bus training?
$e nvapeek 0x132000
$e nvapoke 0x132000 0x18000002
$e nvapoke 0x132000 0x18000000
$e nvapeek 0x132000
$e nvapeek 0x132018
# PBFB_BROADCAST again, might also be
# for training purposes
$e nvapeek 0x10fe20
$e nvapeek 0x10fe24
$e nvapoke 0x10fe20 0x20000002
$e nvapoke 0x10fe20 0x20000000
$e nvapeek 0x132020
$e ./gen
$e nvapeek 0x10f824 # 7fd4
$e nvapoke 0x10f824 0x00007fd4
$e nvapoke 0x001548 0x102
$e nvapeek 0x10f468 # 1005
$e nvapoke 0x10f468 0x00020020
$e nvapeek 0x10f420 # 42
$e nvapoke 0x10f420 0x00000043
$e nvapeek 0x10f430 # 40
$e nvapoke 0x10f430 0x00000041
$e nvapeek 0x10f400 # 1707
$e nvapoke 0x10f400 0x0000171f
$e nvapeek 0x10f410 # 307
$e nvapoke 0x10f410 0x00000107
$e nvapeek 0x10f444 # 04cc009f
$e nvapoke 0x10f444 0x04cc883f
$e nvapoke 0x001548 0x101