#include "camera_info.h"
#include "keyboard.h"
#include "viewport.h"
#include "clock.h"
#include "raw_buffer.h"
#include "lang.h"
#include "gui.h"
#include "gui_lang.h"
#include "gui_draw.h"
#include "cachebit.h"
#include "module_def.h"
#include "simple_module.c"
gehe zum Quellcode dieser Datei
|
#define | draw_txt_string(x, y, s, c) draw_string((x)*FONT_WIDTH,(y)*FONT_HEIGHT,s,c) |
|
#define | draw_txt_stringnonalign(x, y, s, c) draw_string((x)*FONT_WIDTH+1,(y)*FONT_HEIGHT,s,c) |
|
#define | LOGBUFSIZE 1024 |
|
#define | BENCHLOGFILE "A/BENCH.LOG" |
|
#define | BENCH_ALL 1 |
|
#define | BENCH_NOCARD 2 |
|
#define | BENCHTMP "A/BENCH.TMP" |
|
#define | BENCH_CTL_START 0 |
|
#define | BENCH_CTL_LOG 1 |
|
#define | BENCH_CTL_SD 2 |
|
#define | BENCH_CTL_MAX BENCH_CTL_SD |
|
#define | CYCLES 100000 |
|
#define | INSTPERCYCLE 2 |
|
|
void | gui_bench_draw () |
|
void | gui_module_menu_kbd_process () |
|
int | gui_bench_kbd_process () |
|
void | gui_bench_init () |
|
static void | gui_bench_draw_results_screen (int pos, int value, int ss) |
|
static void | gui_bench_draw_results_memory (int pos, int value, int value_uc) |
|
static void | gui_bench_draw_results (int pos, int value) |
|
static void | gui_bench_draw_results_cpu (int pos, int value) |
|
static void | gui_bench_draw_results_text (int pos, int value, int valuen, int ss) |
|
static void | write_log (int really) |
|
static void | add_to_log (int really, char *title, char *txt) |
|
static void | add_log_head (int really) |
|
static int | bench_draw_control_txt (int pos, const char *s, int active) |
|
static int | bench_draw_checkbox (int pos, const char *title, int active, int checked) |
|
static void | draw_controls (void) |
|
static void | run_test (int num) |
|
static unsigned int | getcurrentmachinetime () |
|
static unsigned int | get_usec_diff (unsigned int t) |
|
static void | bench_screen_write () |
|
static void | bench_screen_read () |
|
static void | bench_mem_write (int *buff) |
|
static void | bench_mem_read (int *buff) |
|
static void | bench_measure_text_write () |
|
void | __attribute__ ((naked, noinline)) |
|
static void | bench_measure_cpuspeed () |
|
int | basic_module_init () |
|
#define BENCH_CTL_START 0 |
#define BENCHLOGFILE "A/BENCH.LOG" |
#define BENCHTMP "A/BENCH.TMP" |
Definiert in Zeile 489 der Datei gui_bench.c.
492 #if defined(__thumb__)
static void add_log_head |
( |
int |
really) | |
|
|
static |
static void add_to_log |
( |
int |
really, |
|
|
char * |
title, |
|
|
char * |
txt |
|
) |
| |
|
static |
int basic_module_init |
( |
) | |
|
static int bench_draw_checkbox |
( |
int |
pos, |
|
|
const char * |
title, |
|
|
int |
active, |
|
|
int |
checked |
|
) |
| |
|
static |
static int bench_draw_control_txt |
( |
int |
pos, |
|
|
const char * |
s, |
|
|
int |
active |
|
) |
| |
|
static |
static void bench_measure_cpuspeed |
( |
) | |
|
|
static |
Definiert in Zeile 508 der Datei gui_bench.c.
509 unsigned int t, best, c;
513 for (c=0; c<4; c++) {
518 if (t < best) best = t;
static void bench_measure_text_write |
( |
) | |
|
|
static |
Definiert in Zeile 450 der Datei gui_bench.c.
451 unsigned int t, best,
d;
456 for (d=0; d<4; d++) {
458 for (c=0; c<16; c++) {
465 if (t < best) best = t;
467 bench.text_cps = (best==0)?0:16*80*1000000/best;
469 for (d=0; d<4; d++) {
471 for (c=0; c<16; c++) {
478 if (t < best) best = t;
480 bench.textnonalign_cps = (best==0)?0:16*80*1000000/best;
static void bench_mem_read |
( |
int * |
buff) | |
|
|
static |
Definiert in Zeile 417 der Datei gui_bench.c.
419 register unsigned int n;
420 register char *
buf = (
char *)buff;
422 result[0]=&
bench.memory_read_bps;
423 result[1]=&
bench.memory_read_uc_bps;
424 for (m=0; m<2; m++) {
429 for (n=0; n<1024; ++
n) {
438 ::
"r" (
buf),
"r" (buf+0x10000),
"r" (
n) :
"r0",
"r1"
442 *result[
m] = (t==0)?0:0x10000*100 / (t/10) * 1024;
static void bench_mem_write |
( |
int * |
buff) | |
|
|
static |
Definiert in Zeile 384 der Datei gui_bench.c.
386 register unsigned int n;
387 register char *
buf = (
char *)buff;
389 result[0]=&
bench.memory_write_bps;
390 result[1]=&
bench.memory_write_uc_bps;
391 for (m=0; m<2; m++) {
396 for (n=0; n<1024; ++
n) {
405 ::
"r" (
buf),
"r" (buf+0x10000),
"r" (
n) :
"r0",
"r1"
409 *result[
m] = (t==0)?0:0x10000*100 / (t/10) * 1024;
static void bench_screen_read |
( |
) | |
|
|
static |
Definiert in Zeile 353 der Datei gui_bench.c.
355 register unsigned int n,
s;
362 if ((s < 1) || (s > 360*240*3)) s = 360*240*3;
363 bench.screen_input_size =
s;
365 for (n=0; n<32; ++
n) {
373 ::
"r" (scr),
"r" (scr+s) :
"r0",
"r1"
377 bench.screen_input_bps = (t==0)?0:s*32*100 / (t/10);
static void bench_screen_write |
( |
) | |
|
|
static |
Definiert in Zeile 323 der Datei gui_bench.c.
325 register unsigned int s;
333 for (c=0; c<64; ++c) {
342 ::
"r" (c),
"r" (scr),
"r" (scr+
s) :
"r0",
"r1"
346 bench.screen_output_bps = (t==0)?0:s*64*100 / (t/10);
static void draw_controls |
( |
void |
) | |
|
|
static |
static unsigned int get_usec_diff |
( |
unsigned int |
t) | |
|
|
static |
Definiert in Zeile 313 der Datei gui_bench.c.
314 unsigned int v = *(
unsigned int*)0xc0242014;
static unsigned int getcurrentmachinetime |
( |
) | |
|
|
static |
Definiert in Zeile 309 der Datei gui_bench.c.
310 return *(
unsigned int*)0xc0242014;
static void gui_bench_draw_results |
( |
int |
pos, |
|
|
int |
value |
|
) |
| |
|
static |
static void gui_bench_draw_results_cpu |
( |
int |
pos, |
|
|
int |
value |
|
) |
| |
|
static |
static void gui_bench_draw_results_memory |
( |
int |
pos, |
|
|
int |
value, |
|
|
int |
value_uc |
|
) |
| |
|
static |
static void gui_bench_draw_results_screen |
( |
int |
pos, |
|
|
int |
value, |
|
|
int |
ss |
|
) |
| |
|
static |
static void gui_bench_draw_results_text |
( |
int |
pos, |
|
|
int |
value, |
|
|
int |
valuen, |
|
|
int |
ss |
|
) |
| |
|
static |
Definiert in Zeile 70 der Datei gui_bench.c.
71 bench.screen_input_bps=-1;
72 bench.screen_input_size=0;
73 bench.screen_output_bps=-1;
74 bench.memory_read_bps=-1;
75 bench.memory_read_uc_bps=-1;
76 bench.memory_write_bps=-1;
77 bench.memory_write_uc_bps=-1;
78 bench.disk_read_buf_kbps=-1;
79 bench.disk_write_buf_kbps=-1;
80 bench.disk_write_raw_kbps=-1;
81 bench.disk_write_mem_kbps=-1;
84 bench.textnonalign_cps=-1;
int gui_bench_kbd_process |
( |
) | |
|
void gui_module_menu_kbd_process |
( |
) | |
|
static void run_test |
( |
int |
num) | |
|
|
static |
Definiert in Zeile 525 der Datei gui_bench.c.
533 bench.screen_output_bps = 0;
538 bench.screen_input_bps = 0;
543 bench.memory_write_bps = 0;
550 bench.memory_read_bps = 0;
563 bench.disk_write_raw_kbps = 0;
574 bench.disk_write_raw_kbps = (t==0)?0:s*100 / (t/10);
576 bench.disk_write_mem_kbps = 0;
583 s=
write(x, (
void*)0x10000, 0xC00000)/1024;
586 bench.disk_write_mem_kbps = (t==0)?0:s*100 / (t/10);
588 bench.disk_write_buf_kbps = 0;
597 for (n=0; n<256; ++
n)
602 bench.disk_write_buf_kbps = (t==0)?0:s*100 / (t/10);
605 bench.disk_read_buf_kbps = 0;
614 for (n=0; n<256; ++
n)
619 bench.disk_read_buf_kbps = (t==0)?0:s*100 / (t/10);
static void write_log |
( |
int |
really) | |
|
|
static |
unsigned int screen_input_size |