summaryrefslogtreecommitdiffstats
path: root/hp54520a_reversing/fun_00a73940.pl
blob: 083cbf8da55cb4e04701baf775d770205ed556db (plain)
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
135
136
137
138
139
140
#!/usr/bin/env perl
use warnings;
use strict;

#FUN_00a7380a


my $style='style="stroke:red;stroke-width:2"';


sub atos($)
{
my $a=shift;
my $c="black";
$a=int($a) & 0xff;
if ($a==0xfe) {
	$c="white";
} elsif ($a==0x01) {
	$c="white";
} elsif ($a==0x02) {
	$c="yellow";
} elsif ($a==0x04) {
	$c="blue";
} elsif ($a==0x08) {
	$c="green";
} elsif ($a==0x10) {
	$c="orange";
} elsif ($a==0x20) {
	$c="cyan";
} elsif ($a==0x40) {
	$c="red";
} elsif ($a==0x80) {
	$c="magenta";
}

return 'style="stroke:'.$c.';stroke-width:2;fill:'.$c.'"';

}


sub draw_horiz_line
{
my ($a,$y,$x1,$x2,$b,$c)=@_;


print '<line x1="',int($x1),'" y1="',int($y),'" x2="',int($x2),'" y2="',int($y),'" ',atos($a),'/>';
print "\n";
}


sub draw_vert_line
{
my ($a,$x,$y1,$y2,$b,$c)=@_;

print '<line x1="',int($x),'" y1="',int($y1),'" x2="',int($x),'" y2="',int($y2),'" ',atos($a),'/>';
print "\n";
}

sub draw_box
{
my ($a,$y2,$x2,$y1,$x1,$b,$c)=@_;
print '<rect x="',int($x1),'" y="',int($y1),'" width="',int($x2-$x1),'" height="',int($y2-$y1),'" ',atos($a),'/>';
print "\n";
}

sub write_text
{
}

sub meh
{
my($a,$x,$y,$b,$c)=@_;

print '<circle cx="',int($x),'" cy="',int($y),'" r="1" style="fill:red"/>';
print "\n";

}



print '<svg height="384" width="641" style="background:black" xmlns="http://www.w3.org/2000/svg">';

my $p1=50;
my $p2=40;

  draw_horiz_line(0xfe,$p1-3,0x1fb,0x203,$p2,0);
  draw_horiz_line(0xfe,$p1-3,0x276,0x27c,$p2,0);
  draw_horiz_line(0xfe,$p1+32,0x1fb,0x203,$p2,0);
  draw_horiz_line(0xfe,$p1+32,0x276,0x27c,$p2,0);

meh(0xfe,0x1fa,$p1-2,$p2,0);
meh(0xfe,0x27f,$p1-2,$p2,0);
meh(0xfe,0x280,$p1-1,$p2,0);
meh(0xfe,0x1f9,$p1-1,$p2,0);

meh(0xfe,0x1fa,$p1+0x1f,$p2,0);
meh(0xfe,0x27f,$p1+0x1f,$p2,0);
meh(0xfe,0x280,$p1+0x1e,$p2,0);
meh(0xfe,0x1f9,$p1+0x1e,$p2,0);

draw_vert_line(0xfe,0x1f8,$p1,$p1+0x1d,$p2,0);
draw_vert_line(0xfe,0x281,$p1,$p1+0x1d,$p2,0);



#  draw_horiz_line(0xfe,0x17f,0,0x27f,0x11,0);
#  draw_vert_line(0xfe,0,0,0x17f,0x11,0);
#  draw_vert_line(0xfe,0x27f,0,0x17f,0x11,0);
#  draw_vert_line(0xfe,0x57,0,0x50,0x11,0);
#  draw_vert_line(0xfe,0x22c,0,0x50,0x11,0);
#  draw_vert_line(0xfe,0x57,0x12f,0x17f,0x11,0);
#  draw_vert_line(0xfe,0x22c,0x12f,0x17f,0x11,0);
#  draw_horiz_line(0xfe,0x50,0,0x57,0x11,0);
#  draw_horiz_line(0xfe,0x12f,0,0x57,0x11,0);
#  draw_horiz_line(0xfe,0x50,0x22c,0x27f,0x11,0);
#  draw_horiz_line(0xfe,0x12f,0x22c,0x27f,0x11,0);
#  draw_box(0xff01,0xfe,0x128,0x82,0x92);
#  draw_box(0xff02,0xfe,0x1f1,0x82,0x15b);
#  draw_box(0xff01,0x122,0xc0,0x10e,0xac);
#  draw_box(0xff02,0x122,0xe8,0x10e,0xd4);
#  draw_box(0xff04,0x122,0x110,0x10e,0xfc);
#  draw_box(0xff08,0x122,0x138,0x10e,0x124);
#  draw_box(0xff10,0x122,0x160,0x10e,0x14c);
#  draw_box(0xff20,0x122,0x188,0x10e,0x174);
#  draw_box(0xff40,0x122,0x1b0,0x10e,0x19c);
#  draw_box(0xff80,0x122,0x1d8,0x10e,0x1c4);
#  draw_box(0xff01,0x71,0xc0,0x5d,0xac);
#  draw_box(0xff02,0x71,0xe8,0x5d,0xd4);
#  draw_box(0xff04,0x71,0x110,0x5d,0xfc);
#  draw_box(0xff08,0x71,0x138,0x5d,0x124);
#  draw_box(0xff10,0x71,0x160,0x5d,0x14c);
#  draw_box(0xff20,0x71,0x188,0x5d,0x174);
#  draw_box(0xff40,0x71,0x1b0,0x5d,0x19c);
#  draw_box(0xff80,0x71,0x1d8,0x5d,0x1c4);
#  write_text(0xfe,0xed,0x1e,"gys358aenrmxzcoftkh#%",1,1,0);
#  write_text(0xfe,0xed,0x32,"gys358aenrmxzcoftkh#%",0,1,0);
#  write_text(0xfe,0xed,0x140,"gys358aenrmxzcoftkh#%",1,1,0);
#  write_text(0xfe,0xed,0x154,"gys358aenrmxzcoftkh#%",0,1,0);
#  write_text(0xfe,0x1f2,0x5f,"any softkey exits",1,0,0);
print '</svg>';