projects
/
retrobench
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
minor makefile fixes
[retrobench]
/
tools
/
lutgen.c
1
#include <stdio.h>
2
#include <math.h>
3
4
int main(void)
5
{
6
int i;
7
8
puts("\t.data");
9
puts("\t.globl _sinlut");
10
puts("\t.globl sinlut");
11
puts("_sinlut:");
12
puts("sinlut:");
13
for(i=0; i<2048; i++) {
14
float x = sin((float)i / 1024.0f * M_PI);
15
printf("\t.word %d\n", (short)(x * 32767.0f));
16
}
17
return 0;
18
}