dos33fsprogs/split_screen/calc_freq.c

27 lines
452 B
C
Raw Normal View History

#include <stdio.h>
int main(int argc, char **argv) {
int x,y,cycles,desired,range=10;
// desired=3116;
// desired=4152;
// desired=5196;
2018-07-05 19:56:59 +00:00
// desired=4547;
2018-07-05 21:02:04 +00:00
// desired=9685;
2018-07-06 20:34:46 +00:00
desired=4680;
printf("You want %d cycles\n",desired);
for(x=0;x<255;x++) {
for(y=0;y<255;y++) {
cycles=1+5*y+y*(5*x+1);
if (((cycles-desired)<range) && ((cycles-desired)>-range)) {
printf("Try X=%d Y=%d cycles=%d\n",
x,y,cycles);
}
}
}
return 0;
}