Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - wildstray

#1
Feature Requests / Re: Panorama module?
October 27, 2016, 08:30:02 PM
Anybody interested to collaborate in a basic module development? Nothing complicated for now, only a stich assistant. I'm looking for a method to show a resized LV in a rectangle instead of the full screen LV. Something similar to that one shown in the cropmarks settings. The next step would be showing show 1/2 or 1/3 or 1/4 of the last shot picture beside the resized LV.
#2
Camera-specific Development / Re: Canon EOS M
October 24, 2016, 02:42:40 AM
Quote from: a1ex on October 23, 2016, 06:59:04 PM
Powersave idea: drop to 10 FPS after X seconds of idle time, switch back on half-shutter press (or on any key press).

Great idea. I just wrote some modifications to powersave.c, it works... but there is an annoying issue: with touch or keypress the camera returns instantaneously responsive, while with half shutter there is a little delay... little but noticeable...   :-\


diff -r 15fce5b49b23 src/powersave.c
--- a/src/powersave.c   Sat Oct 08 16:22:41 2016 +0200
+++ b/src/powersave.c   Mon Oct 24 02:31:13 2016 +0200
@@ -129,6 +129,7 @@
static CONFIG_INT("idle.display.gdraw_off.after", idle_display_global_draw_off_after, 0);
static CONFIG_INT("idle.rec", idle_rec, 0);
static CONFIG_INT("idle.shortcut.key", idle_shortcut_key, 0);
+static CONFIG_INT("idle.display.fps_on.after", idle_display_fps_on_after, 0);

/* also used in zebra.c */
volatile int idle_globaldraw_disable = 0;
@@ -143,6 +144,8 @@
static int idle_countdown_display_off_prev = 50;
static int idle_countdown_globaldraw_prev = 50;
static int idle_countdown_clrscr_prev = 50;
+static int idle_countdown_fps = 50;
+static int idle_countdown_fps_prev = 50;

/* this will block all Canon drawing routines when the camera is idle */
/* (workaround for 50D) */
@@ -154,7 +157,7 @@

int idle_is_powersave_enabled()
{
-    return idle_display_dim_after || idle_display_turn_off_after || idle_display_global_draw_off_after;
+    return idle_display_dim_after || idle_display_turn_off_after || idle_display_global_draw_off_after || idle_display_fps_on_after;
}

int idle_is_powersave_enabled_on_info_disp_key()
@@ -166,7 +169,8 @@
{
     return (idle_display_dim_after && !idle_countdown_display_dim_prev) ||
            (idle_display_turn_off_after && !idle_countdown_display_off_prev) ||
-           (idle_display_global_draw_off_after && !idle_countdown_globaldraw_prev);
+           (idle_display_global_draw_off_after && !idle_countdown_globaldraw_prev) ||
+           (idle_display_fps_on_after && !idle_countdown_fps_prev);
}

void idle_force_powersave_in_1s()
@@ -174,6 +178,7 @@
     idle_countdown_display_off = MIN(idle_countdown_display_off, 10);
     idle_countdown_display_dim = MIN(idle_countdown_display_dim, 10);
     idle_countdown_globaldraw  = MIN(idle_countdown_globaldraw, 10);
+    idle_countdown_fps         = MIN(idle_countdown_fps, 10);
}

void idle_force_powersave_now()
@@ -181,6 +186,7 @@
     idle_countdown_display_off = MIN(idle_countdown_display_off, 1);
     idle_countdown_display_dim = MIN(idle_countdown_display_dim, 1);
     idle_countdown_globaldraw  = MIN(idle_countdown_globaldraw, 1);
+    idle_countdown_fps         = MIN(idle_countdown_fps, 1);
}

int handle_powersave_key(struct event * event)
@@ -229,6 +235,7 @@
     idle_countdown_display_off = sensor_status ? 25 : idle_display_turn_off_after * 10;
     idle_countdown_display_dim = sensor_status ? 25 : idle_display_dim_after * 10;
     idle_countdown_globaldraw  = sensor_status ? 25 : idle_display_global_draw_off_after * 10;
+    idle_countdown_fps         = sensor_status ? 25 : idle_display_fps_on_after * 10;

     if (reason == -2345) // disable powersave during recording
         return;
@@ -379,6 +386,16 @@
         idle_globaldraw_disable--;
}

+void idle_fps_en()
+{
+    set_config_var("fps.override", 1);
+}
+
+void idle_fps_dis()
+{
+    set_config_var("fps.override", 0);
+}
+
#ifdef CONFIG_KILL_FLICKER

static void black_bars_50D()
@@ -463,6 +480,11 @@
     if (idle_display_global_draw_off_after)
         idle_action_do(&idle_countdown_globaldraw, &idle_countdown_globaldraw_prev, idle_globaldraw_dis, idle_globaldraw_en);

+    #ifdef FEATURE_FPS_OVERRIDE
+    if (idle_display_fps_on_after)
+        idle_action_do(&idle_countdown_fps, &idle_countdown_fps_prev, idle_fps_en, idle_fps_dis);
+    #endif
+
     /* zebra.c */
     extern int clearscreen;
     if (clearscreen == 2) // clear overlay when idle
@@ -611,6 +633,17 @@
             .help = "Turn off GlobalDraw when idle, to save some CPU cycles.",
             //~ .edit_mode = EM_MANY_VALUES,
         },
+       #ifdef FEATURE_FPS_OVERRIDE
+        {
+            .name = "Turn on FPS override",
+            .priv           = &idle_display_fps_on_after,
+            .update         = idle_display_feature_print,
+            .select         = idle_timeout_toggle,
+            .max            = 900,
+            .icon_type      = IT_PERCENT_LOG_OFF,
+            .help = "Turn on FPS override when idle, to save some CPU cycles.",
+        },
+       #endif
         MENU_EOL
     },
   }
@@ -633,5 +666,7 @@
void idle_globaldraw_en() { }
void idle_force_powersave_now() { }
void idle_force_powersave_in_1s() { }
+void idle_fps_en() { }
+void idle_fps_dis() { }
#endif 

#3
Camera-specific Development / Re: Canon EOS M
October 23, 2016, 06:40:15 PM
Quote from: a1ex on October 23, 2016, 06:23:17 PM
60D: 57% in photo mode (30fps, global draw off).

Drops to 26% with FPS override at 10 FPS.

Thank you a1ex! So it seems that CPU usage is related to LV...
EOS M with FPS override at 10 FPS has 20% cpu usage... good for battery... but the camera become unusable.
AF slows down proportionally to FPS. It's already slow without override... at 10 fps it takes 4-5 seconds to focus :o
In the 60D AF slows down?
#4
Camera-specific Development / Re: Canon EOS M
October 23, 2016, 06:15:00 PM
Hello all, about EOS M do you notice a poor battery life? It seems to me really poor (not even an hour of usage). Better with a compatibile battery, worse with the original Canon one.
Thanks to ML I noticed that CPU usage never decrease below 40%... is it normal? What's the idle cpu load for other cameras? Maybe the reason for poor battery life and what's using the CPU so much? (LV?)
#5
Feature Requests / Re: Panorama module?
October 23, 2016, 04:44:19 PM
I would be really interested in a panorama module, indeed I thought to develope it. I think to run it when in LV + landscape shooting mode and display a cropped and scaled ghost image for 1/2, 1/3 or 1/4 beside to a scaled LV... as like as panorama mode of Powershot series (eg. https://www.youtube.com/watch?v=FCH6e7Z_VCw ). I don't expect to stich pictures in camera or to find and match features with heavy algorithms, only a simple assistant image alignment (especially for free hand shooting). I wish the same of what I use on my G9. In the future it would be thinkable to add other feature such as HDR.
For now, I'm encounter difficulties in setting up an usable development enviroment (running ROM & ML in qemu) so I didn't begin to write the module itself (I draft a skeleton only).
#6
Yeah! :D After several peregrinations between repositories and patches, and thanks to install.sh and run_canon_fw.sh scripts and the suggestions of a1ex, now I have a semi-working qemu environment. After seconds, I got the Canon menu...



But this is the maximum I can do. When I press a key, I can see only these warnings in qemu console...


Warning: no scancode found for keysym 112
Warning: no scancode found for keysym 112
Warning: no scancode found for keysym 112
Warning: no scancode found for keysym 112


Did I miss something about keycodes?

PS: I tried to run 60D and EOS ROMs... I seen the Magic Lantern Rescue screen for both. But the sd card image I prepared with ML installation is 60D.
#7
Thank for the clarifications, A1ex!

Ok, I could works indifferently on an emulated 60D, 5D3 or so. But the only ROM I have is the one dumped from my camera, so firstly I need to obtain another ROM (how?).

About ML branches, you recommend to use qemu branch for new developers? If it would be more reliable I'll use it. Actually, I wanted to use unified because of SD emulation wrapping on host fs... it would be simpler and more agile to work in ML directory without mounting and unmounting an image file.
#8
PS: I had to comment out a code fragment from eos_init_common(). Otherwise, after loading ROM-EOSM.BIN, qemu exits with a "CF init failed".

    /* init CF card */
    DriveInfo *dj;
    dj = drive_get_next(IF_IDE);
    if (!dj) {
        printf("CF init failed\n");
        exit(1);
    }

    ide_bus_new(&s->cf.bus, sizeof(s->cf.bus), NULL, 0, 2);
    ide_init2(&s->cf.bus, s->interrupt);
    ide_create_drive(&s->cf.bus, 0, dj);


EOSM doesn't have CF. It fails also if I create a cfcard directory. And now I have the dubt that sdcard and cfcard directory are totally ignored...
#9
Hello, I'm new to ML, I'm trying it on an EOSM. I wish to develop a module, but it would be really difficult using the "physical" camera. So I'm trying to setup an emulation environment... unluckily I miss something... I'm stuck on qemu... I need some help.

/opt/qemu/bin/qemu-system-arm -machine EOSM
00000000 - 00000FFF: eos.tcm_code
40000000 - 40000FFF: eos.tcm_data
00001000 - 3FFFFFFF: eos.ram
40001000 - 7FFFFFFF: eos.ram_uncached
F0000000 - F0FFFFFF: eos.rom0
F1000000 - F1FFFFFF: eos.rom0_mirror_F1
F2000000 - F2FFFFFF: eos.rom0_mirror_F2
F3000000 - F3FFFFFF: eos.rom0_mirror_F3
F4000000 - F4FFFFFF: eos.rom0_mirror_F4
F5000000 - F5FFFFFF: eos.rom0_mirror_F5
F6000000 - F6FFFFFF: eos.rom0_mirror_F6
F7000000 - F7FFFFFF: eos.rom0_mirror_F7
F8000000 - F8FFFFFF: eos.rom1
F9000000 - F9FFFFFF: eos.rom1_mirror_F9
FA000000 - FAFFFFFF: eos.rom1_mirror_FA
FB000000 - FBFFFFFF: eos.rom1_mirror_FB
FC000000 - FCFFFFFF: eos.rom1_mirror_FC
FD000000 - FDFFFFFF: eos.rom1_mirror_FD
FE000000 - FEFFFFFF: eos.rom1_mirror_FE
FF000000 - FFFFFFFF: eos.rom1_mirror_FF
C0000000 - CFFFFFFF: eos.iomem
[EOS] loading 'ROM-EOSM.BIN' to 0xF0000000-0xF0FFFFFF
[EOS] loading 'ROM-EOSM.BIN' to 0xF8000000-0xF8FFFFFF (offset 0x1000000)
FIXME: no MPU spells for EOSM.

Available keys:
- Arrow keys   : Navigation
- [ and ]      : Main dial (top scrollwheel)
- SPACE        : SET
- M            : MENU
- P            : PLAY
- I            : INFO/DISP
- L            : LiveView
- F1           : show this help

VNC server running on '127.0.0.1;5900'


I know that without MPU spells I cannot display Canon menu. But the only think I can display in VNC is the garbled screen. How to load ML?
I compiled EOSM platform with CONFIG_QEMU=y and I made qemu-helper.bin.



This is my directory setup (all uppercase as required?):


├── ROM-EOSM.BIN
└── sdcard
     ├── AUTOEXEC.BIN
     ├── ML
     │   ├── CROPMKS
     │   │   ├── CINESCO2.BMP
     │   │   ├── CRSSMTR2.BMP
     │   │   ├── PASSPORT.BMP
     │   │   ├── PHIPHOTO.BMP
     │   │   └── PHIVIDEO.BMP
     │   ├── DATA
     │   │   ├── APSC8P.LUT
     │   │   ├── APSC8R.LUT
     │   │   ├── FF8P.LUT
     │   │   └── FF8R.LUT
     │   ├── DOC
     │   ├── DOCS
     │   ├── FONTS
     │   │   ├── ARGHLF22.RBF
     │   │   ├── ARGNOR23.RBF
     │   │   ├── ARGNOR28.RBF
     │   │   ├── ARGNOR32.RBF
     │   │   ├── TERM12.RBF
     │   │   └── TERM20.RBF
     │   ├── MODULES
     │   │   ├── ADV_INT.MO
     │   │   ├── ARKANOID.MO
     │   │   ├── AUTOEXPO.MO
     │   │   ├── BENCH.MO
     │   │   ├── DEFLICK.MO
     │   │   ├── DUAL_ISO.MO
     │   │   ├── EOSM_202.SYM
     │   │   ├── ETTR.MO
     │   │   ├── FILE_MAN.MO
     │   │   ├── LUA.MO
     │   │   ├── MLV_PLAY.MO
     │   │   ├── MLV_REC.MO
     │   │   ├── MLV_SND.MO
     │   │   ├── PANO.MO
     │   │   ├── PIC_VIEW.MO
     │   │   ├── RAW_REC.MO
     │   │   ├── SELFTEST.MO
     │   │   └── SILENT.MO
     │   ├── README
     │   └── SCRIPTS
     ├── MAGICLANTERN
     ├── ML-SETUP.FIR
     └── QEMU-HELPER.BIN


Qemu 2.5.50 from niklastisk repo, branch eos-develop-new (./configure --disable-docs --target-list=arm-softmmu).

...anyway, I'm asking myself: is there a way to display ML menu at startup in the emulator? Otherwise it would be a bit difficult to recall it on EOSM... on the real camera I use double touch on the screen...