--
http://magiclantern.wikia.com/
To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en
I'd start with a minimal build (no audio, no zebras, just booting) and
then enable each feature individually. This is much easier to
troubleshoot. But you do need to be able to compile ML in order to do
this.
Bricking is unlikely with a clean build imo; the hardest job (i.e.
booting the fw) has been done successfully by Indy.
I smell some memory corruption in audio.c and shoot.c (at least on
550d), so be careful with those.
If you are talking about this:
http://magiclantern.wikia.com/wiki/GUI_Events/550D
that's my event log, inspired from Trammell's work. Code:
https://bitbucket.org/a1ex/magic-lantern/changeset/5cefa40dd254
To disable the modules, remove the <modulename.o> entries in the
Makefile, compile, and if there are some module dependencies (e.g.
shoot calls something from zebra and you've disabled zebra), either
comment out that functionality or add some dummy function.
Deti, please be aware that Magic Lantern is licensed under the GPL,
and therefore you should publish the source code of all your builds.
Thanks.
Deti
Deti
Deti
# magiclantern.lds script MUST be first
# entry.o MUST be second
# menu.o and debug.o must come before the modules
ML_OBJS-y = \
magiclantern.lds \
entry.o \
5d-hack.o \
stubs-550d.109.o \
version.o \
bmp.o \
font-large.o \
font-med.o \
font-small.o \
config.o \
menu.o \
debug.o \
stdio.o \
lens.o \
property.o \
gui.o \
NO=\
audio.o \
bootflags.o \
zebra.o \
shoot.o \
focus.o \
hotplug.o \
bracket.o \
ptp.o \
spotmeter.o \
Comment out config file parsing from 5d-hack (or debug.c). I think you
can also remove lens.
On 550D, press/release codes are consecutive (e.g. 1c = press left, 1d
= unpress left).
If you are lucky and the other set of button codes are the same as on
550D, navigation may work out of the box.
=> many codes identical with the 5D; when I've enabled the menu, no
change to gui.h was needed.
> have to pull the battery
This is good, menu task started and blocks events. Now find the new
button codes.
Latest builds return 1 whenever possible (from menu_handler). This is
the reason for menu flickering: I'm not blocking the events in order
to leave the camera as stable as possible (and some of those events
trigger redraws). It's annoying, but at least it works.
What you have to do now is to troubleshoot menu_handler (put
bmp_printf's or debugmsgs and see what codes it receives).
Any new sources or bin to test with my 60d? :)
--
No problem with compile and run minimal ml.
"menu should come up by putting 0xC instead of 0xA" - you mean in
gui.c at this line?
if( gui_state != GUISTATE_PLAYMENU && event->type == 0 && event->param
== 0xA ) // trash button
Somewhere else? I attached my full dump file with pressing erase/trash
button. Any advice what next?
On Sun, Jan 9, 2011 at 6:30 AM, Alex <broscu...@gmail.com> wrote:
> Hello,
> Are you able to compile and run your code?
>
> See the advice I've given to Jason, and:
> http://magiclantern.wikia.com/wiki/Debugging_Magic_Lantern
> http://magiclantern.wikia.com/wiki/550d_dev
>
> On Sun, Jan 9, 2011 at 3:13 AM, xaos <hipo...@gmail.com> wrote:
>>
>> Hello Alex.
>>
>> I have a new 60d to bricking :) Could you help me with debug 60d to
>> activate menu. Up to now I have working firmware from
>> http://magiclantern.wikia.com/wiki/60D. What I shoud do next?
>>
>> Regards, xaos.
>
>
I have enabled the menu and navigaton (4 from 8-way controller)
without DISP button. Some things work out of the box but some make the
camera freeze. No brick for now, but who know when... :) I have
uploaded the video to show where I am with code. Alex, Indy what
should I do next? How to eliminate freezes? Alex, should I send you
modified sources?
xaos
P.S. http://www.youtube.com/watch?v=m28QmqnzMys (some debugs at screen)
Problem with auto-disabling - don't start again. Second press
trash/erase freezes cam.
Menu Audio - all ok and working (without ext mic, not tested)
Menu Video - ok, but
CropM: - Error
Shot - ok, but
Intervalometr: OFF/ON - Error (reboot)
LCD RemoteShot: - Error (reboot)
Brack - ok, but
Test bracket - Error
I think that is a problem with disabling menu and accessing card (save
config rebooted cam).
--
See this page for hints on how to find VRAM segments (on 60D or any
other camera):
http://magiclantern.wikia.com/wiki/VRAM/550D
P.S. I attached a patch needed to enable menu (to version try2).
In 550D I've found 2 possible values:
#define DISPLAY_SENSOR 0x2dec
#define DISPLAY_SENSOR_MAYBE 0xC0220104
=> scan around these addresses with mem-spy.
You can use the audio trigger instead. Does the 60D have some other
sensor? like for adjusting the backlight? (I've heard that 5D2 does
that)
On Mon, Jan 17, 2011 at 5:58 PM, xaos <hipo...@gmail.com> wrote:
> Anytime you half-press the shutter button, the display will turn
> off... There is no problem, but RemoteShot is a great idea :(
>
Or you may try to port CHDK's motion detection routine ;)
Or you may use focus peaking info to implement trap focus in LiveView mode.
Problem with gui_task_destroy resolved about week ago:
grep -i gui_task_destroy stubs-60d.108.S
NSTUB( 0xff3065bc, gui_task_destroy )
NSTUB( 0xFF2B4D30, gui_task_destroy )
Value 0xff3065bc is correct.
What doesn't work? Silence picture (no surprise) and
LoadCalendarFromRTC (Err 80). Any ideas with LoadCalendarFromRTC..?
I merged (partially) my build with latest sources for 550d, but Alex
is so fast with coding... :)
P.S. Example from my bench tests:
Stable video recording (no audio) with qscale=-16 and ISO=3200
VIDEO: [H264] 1920x1088 24bpp 25.000 fps 89150.9 kbps (10882.7 kbyte/s)
Audio: no sound
Transcend SDHC class 10, 32GB
I have next ones - FIO_FindFirstEx & FIO_FindNextEx
Is it possible to generate new stubs for 60d?
x.
What's missing next?
=Alex=
I merged sources for 550d rev 819 (Mon Jan 24 22:06:47 2011 +0200) and
main problem I have now is to determine
* FreeMemory addr
* FOCUS_CONFIRMATION
draw_zebra_and_focus():
* YUV422_LV_BUFFER
* YUV422_HD_BUFFER
(err 70)
Silent pic
I have read
http://magiclantern.wikia.com/wiki/VRAM/550D
http://magiclantern.wikia.com/wiki/VRAM
http://magiclantern.wikia.com/wiki/ASM_Zedbra
but without success. I have dumps for 0-7 segments x3 (LV, CAM LV, CAM
LV REC) but I don't understand how you found e.g. address
0x04000080...
You can find all my dumps (gzipped) here http://andromeda.ap.krakow.pl/60d/
=Indy=
I don't have but now I want :) I will disable all not working code
(lv buffers, lcd remote shot).
Will look at the dumps. Did it freeze at segment 8? (550D does).
> Did it freeze at segment 8? (550D does).
No... Only:
DUMP 0 80000000
and suddenly
DUMP F 8F000000
without 81.. 8E on screen, without any file.
aj_find_changing_memory.c:550:19: error: 'AJ_active_search_y_height'
undeclared (first use in this function)
aj_find_changing_memory.c:567:26: error: 'AJ_active_search_x_bytes'
undeclared (first use in this function)
> we can notice that Alex's addresses were good.
Yes :)
> are you registered to bitbucket and a 60d branch follower ?
And yes.
Here's my method, with the code from the wiki, step-by-step (with images):
First, notice 0.bin and 1.bin refer to the same memory, maybe with
different caching bits (and also 4.bin). Maybe it's true for others,
too. As the wiki says, we can make the difference between the dumps,
and the large contiguous different blocks are possible VRAM buffers.
alex@karmic:~/src/ml/AJ mem scan$ ipython
...
In [1]: run -i img.py # load the code from the wiki
In [2]: a = readsampled("60d/0.BIN") # this reads the file
downsampled by 100, 'cause the dumps are large
In [3]: b = readsampled("60d/1.BIN")
In [4]: d = array(a) - array(b) # difference...
In [5]: d[d != 0] = 1 # do this to get a nice plot
In [6]: plot(d); show() # notice one of the
blocks starting around 1000000
Out[6]: [<matplotlib.lines.Line2D object at 0x9c93c2c>]
In [7]: x = 1000000*100 # remember downsampling factor
In [8]: s = readseg("60d/0.BIN", x, 1000000) # read 1MB from there
In [9]: guesspitch(s) # guess pitch with FFT
2114.16490486
In [10]: imgseq(s, 2114) # starts to look like an image!
In [11]: imgseq(s, 2112) # perfect sync :)
In [12]: s = readseg("60d/0.BIN", x+316*2112, 2112*704) # image data
starts from line 316; from 550d we know buffer is 1056*704
In [13]: imgseq(s, 2112) # almost there
In [14]: hex(x+316*2112)
Out[14]: '0x6001000'
In [15]: s = readseg("60d/0.BIN", 0x6000080, 2112*704) #
from 550D, I guess it should end in 0080
In [16]: imgseq(s, 2112) # bingo!
Final result: 0x46000080 (with the caching bit from 550D).
Was it difficult?
Next:
- Can you format it nicely and put it on the wiki?
- Find the other buffers
> Next:
> - Can you format it nicely and put it on the wiki?
Yes.
> - Find the other buffers
Ok.
zebra.c:
static void bvram_mirror_init()
{
if (!bvram_mirror)
{
bvram_mirror = AllocateMemory(bmp_pitch()*540 + 100);
if (!bvram_mirror)
{
bmp_printf(FONT_MED, 30, 30, "Failed to
allocate BVRAM mirror");
msleep(2000);
return;
}
bzero32(bvram_mirror, 960*540);
}
}
where bmp_pitch() return 960 and for a while I see "Failed to allocate
BVRAM mirror" an then
Err 70, shooting is not possible due to an error..
AllocateMemory is 0xFF06FFD0
To debug this, try allocating smaller amounts of RAM, until it fails.
I also suggest to do this:
- after failed allocation, don't return from that function, e.g. put a
while(1) msleep(100).
- do a Debug->dump dmlog and see what happened (AllocateMemory will
say something).
Code which uses the bvram mirror should check first if it's not null;
maybe it's one where I forgot to check.
Free mem: 24088
Alex
I can't msleep(whatever) and dump dmlog, it's always happen too fast,
but.. it works:
bvram_mirror = AllocateMemory(bmp_pitch()*540 + 100);
dumpf();
^@ 14185: 12727.154 [STARTUP] ERROR ^GASSERT : Memory\Memory.c, Task =
zebra_task
^@ 14186: 12727.190 [STARTUP] ERROR ^GASSERT : Line 188
^@ 14187: 12727.202 [STARTUP] ERROR ^GASSERT : FALSE
^@ 14188: 12727.353 [STARTUP] startupErrorRequestChangeCBR (0x1d)
^@ 14189: 12727.382 [STARTUP] startupErrorRequestChangeCBR : ErrorSend
(101, ABORT)
^@ 14190: 12727.618 [STARTUP] ASSERT Time 2011/1/25 22:59:33.
Alex, can you look at this pictures from silent pic
http://andromeda.ap.krakow.pl/60d/sp/
What's your opinion?
5 is OK, 1056x704. Was it photo mode or fullhd video?
6 is 1016x1344. Was it in 2x1 hi-res mode?
1 has pitch 2112 (1056 horizontal). There may be two buffers right one
after another (i.e. first read data from sensor in buffer A and
process buffer B, second, read data in buffer B and process buffer A).
The base address of that segment may start a bit earlier (if you crop
first 704 pixels, you also get pixels from the bottom half).
The artifacts you see in the pictures are present on the 550D, too
(but not always).
From what I understand, the only major issue left is that
AllocateMemory can't be used for large amounts of RAM. As a result,
cropmarks and the mirror algorithm (which prevents zebra & friends
from overwriting Canon menus and other ML elements) do not work.
We had the same issue on the 550D, and it was solved with your
suggestion of using AllocateMemory instead of malloc.
Xaos, is that correct?