| Line | |
|---|
| 1 | #include "lolevel.h" |
|---|
| 2 | #include "platform.h" |
|---|
| 3 | #include "core.h" |
|---|
| 4 | #include "keyboard.h" |
|---|
| 5 | extern long link_bss_start; |
|---|
| 6 | extern long link_bss_end; |
|---|
| 7 | extern void boot(); |
|---|
| 8 | long get_sensor_width() |
|---|
| 9 | { |
|---|
| 10 | return 5760; |
|---|
| 11 | } |
|---|
| 12 | void startup() |
|---|
| 13 | { |
|---|
| 14 | long *bss = &link_bss_start; |
|---|
| 15 | long *ptr; |
|---|
| 16 | |
|---|
| 17 | if ((long)&link_bss_end > (MEMISOSTART + MEMISOSIZE)){ |
|---|
| 18 | started(); |
|---|
| 19 | shutdown(); |
|---|
| 20 | } |
|---|
| 21 | |
|---|
| 22 | while (bss<&link_bss_end) |
|---|
| 23 | *bss++ = 0; |
|---|
| 24 | boot(); |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | static const int fl_tbl[] = {7700, 9572, 11454, 13683, 16293, 19548, 23495, 28500}; |
|---|
| 29 | #define NUM_FL (sizeof(fl_tbl)/sizeof(fl_tbl[0])) |
|---|
| 30 | #define CF_EFL 60869 |
|---|
| 31 | const int zoom_points = NUM_FL; |
|---|
| 32 | int get_effective_focal_length(int zp) { |
|---|
| 33 | return (CF_EFL*get_focal_length(zp))/10000; |
|---|
| 34 | } |
|---|
| 35 | int get_focal_length(int zp) { |
|---|
| 36 | if (zp<0) return fl_tbl[0]; |
|---|
| 37 | else if (zp>NUM_FL-1) return fl_tbl[NUM_FL-1]; |
|---|
| 38 | else return fl_tbl[zp]; |
|---|
| 39 | } |
|---|
| 40 | int get_zoom_x(int zp) { |
|---|
| 41 | if (zp<1) return 10; |
|---|
| 42 | else if (zp>NUM_FL-1) return fl_tbl[NUM_FL-1]*10/fl_tbl[0]; |
|---|
| 43 | else return fl_tbl[zp]*10/fl_tbl[0]; |
|---|
| 44 | } |
|---|
| 45 | #if 0 |
|---|
| 46 | int rec_switch_state(void) { |
|---|
| 47 | // both were in the original mode_get() function, status unknown |
|---|
| 48 | // mode = (physw_status[1] & 0x08000000)?MODE_PLAY:MODE_REC; |
|---|
| 49 | // mode = (physw_status[0] & 0x00000040)?MODE_REC:MODE_PLAY; |
|---|
| 50 | return (physw_status[0] & 0x00000040); |
|---|
| 51 | } |
|---|
| 52 | #endif |
|---|
| 53 | |
|---|
| 54 | long get_vbatt_min() |
|---|
| 55 | { |
|---|
| 56 | return 3500; |
|---|
| 57 | } |
|---|
| 58 | long get_vbatt_max() |
|---|
| 59 | { |
|---|
| 60 | return 4100; |
|---|
| 61 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.