Magic Lantern Forum

Developing Magic Lantern => General Development => Topic started by: josepvm on July 04, 2014, 05:36:56 PM

Title: Trying to build for 500D
Post by: josepvm on July 04, 2014, 05:36:56 PM
Hi,

Since the last stubs reformat one month ago, Nightly Builds for 500D are broken.

Following A1ex tutorial, I have finally found the missings stubs for 500D:

FIO_SeekSkipFile    0xFF1967D4
SetTimerAfter       0xFF070500
CancelTimer         0xFF070700
SetHPTimerAfterNow  0xFF068268
SetHPTimerNextTick  0xFF0682E8

I have put this values in stubs.S for 500D, and tried to build.
But the build still fails:

[ CC       ]   chdk-dng.o
[ CC       ]   edmac-memcpy.o
[ AR       ]   strrchr.o
[ AR       ]   dietlibc.a
[ AR       ]   lib_a-setjmp.o
[ AR       ]   newlib-libc.a
[ CP       ]   newlib-libm.a
[ CP       ]   gcc-libgcc.a
[ LD       ]   magiclantern
edmac-memcpy.o: In function `edmac_memcpy_init':
edmac-memcpy.c:(.text+0x78): undefined reference to `CreateResLockEntry'
edmac-memcpy.o: In function `edmac_memcpy_res_lock':
edmac-memcpy.c:(.text+0xe0): undefined reference to `LockEngineResources'
edmac-memcpy.o: In function `edmac_memcpy_res_unlock':
edmac-memcpy.c:(.text+0x114): undefined reference to `UnLockEngineResources'
edmac-memcpy.o: In function `edmac_memcpy_start':
edmac-memcpy.c:(.text+0x628): undefined reference to `LockEngineResources'
make[1]: *** [magiclantern] Error 1
make[1]: Leaving directory `/home/jv/ML_Unified/magic-lantern/platform/500D.111'
make: *** [500D] Error 2


These errors are also present in build output for failed builds on the Nightly builds download page.

So it seems there is still something missing, and not only GUI timer stubs   :-[

Any chance to see builds for 500D working again ?

Title: Re: Trying to build for 500D
Post by: Greg on July 04, 2014, 06:01:02 PM
500D need :

/** ResLock **/
NSTUB(    ?,  CreateResLockEntry)
NSTUB(    ?,  LockEngineResources)
NSTUB(    ?,  UnLockEngineResources)
Title: Re: Trying to build for 500D
Post by: josepvm on July 04, 2014, 07:46:18 PM
Ok, thanks, I will look for these ones.
Title: Re: Trying to build for 500D
Post by: josepvm on July 04, 2014, 09:33:42 PM
Done  ;)


/** ResLock **/
NSTUB(0xFF19384C,  CreateResLockEntry)
NSTUB(0xFF194190,  LockEngineResources)
NSTUB(0xFF193ED0,  UnLockEngineResources)


Now it builds , and works nicely  in my 500D

mlv_rec and mlv_play modules do not build, but the ones I use most (Dual-ISO, ETTR) work well.

There is any specific functionality I should test, to be sure the new stubs are working ?

Title: Re: Trying to build for 500D
Post by: Greg on July 04, 2014, 10:20:29 PM
Quote from: josepvm on July 04, 2014, 09:33:42 PM
mlv_rec and mlv_play modules do not build
// NSTUB(    ???,  msg_queue_count)  ;)

Quote from: josepvm on July 04, 2014, 09:33:42 PM
There is any specific functionality I should test, to be sure the new stubs are working ?

I do Stubs API test, looks good.
Title: Re: Trying to build for 500D
Post by: josepvm on July 04, 2014, 11:58:11 PM
Done again  ;)


NSTUB(0xFF0696FC,  msg_queue_count)


I hope this was the last one, or my brain will explode  :o

mlv_rec and mlv_play are working now.  Only tested at minimum resolution, global draw disabled.  An error message appears when starting or ending the recording, but the movie is saved,  mlv_play successfully plays it.

And Stubs API test completes with no errors.

I will try to commit and push request my stubs.S file tomorrow, I have not done this before.



Title: Re: Trying to build for 500D
Post by: Greg on July 05, 2014, 12:33:14 AM
Great! Thanks!  :D

mlv_rec, mlv_play work  :D

Quote from: josepvm on July 04, 2014, 11:58:11 PM
An error message appears when starting or ending the recording
Extra Hacks? The easiest way, disable this in the menu.
Title: Re: Trying to build for 500D
Post by: Audionut on July 05, 2014, 05:40:11 AM
Quote from: josepvm on July 04, 2014, 11:58:11 PM
I will try to commit and push request my stubs.S file tomorrow, I have not done this before.

This is pretty easy to follow:  http://www.magiclantern.fm/forum/index.php?topic=7940.0
Title: Re: Trying to build for 500D
Post by: josepvm on July 05, 2014, 08:00:22 AM
Thanks, Audionut.   :)

This makes it much easier for me.

Title: Re: Trying to build for 500D
Post by: josepvm on July 05, 2014, 10:54:34 AM
Allready done  ;)

https://bitbucket.org/josepvm/ml_500d_josepvm/pull-request/1/added-missing-stubs-for-500d-gui-timers-an/diff (https://bitbucket.org/josepvm/ml_500d_josepvm/pull-request/1/added-missing-stubs-for-500d-gui-timers-an/diff)

Many thanks to Greg, Audionut, A1ex and Pelican for assisting me in my first contribution to this awesome project.  :)


Title: Re: Trying to build for 500D
Post by: josepvm on July 05, 2014, 11:19:21 AM
I think something is wrong. I accepted to do a pull request at the same time I was doing the commit.

But the pull request appears only on my own repository, not in ML main repository  :(.

Title: Re: Trying to build for 500D
Post by: josepvm on July 05, 2014, 11:23:00 AM
This one is OK, I hope:

https://bitbucket.org/hudson/magic-lantern/pull-request/531/added-missing-stubs-for-500d-gui-timers-an/diff (https://bitbucket.org/hudson/magic-lantern/pull-request/531/added-missing-stubs-for-500d-gui-timers-an/diff)

Title: Re: Trying to build for 500D
Post by: josepvm on July 05, 2014, 12:38:46 PM
Quote from: Greg on July 05, 2014, 12:33:14 AM
mlv_rec, mlv_play work  :D
Extra Hacks? The easiest way, disable this in the menu.

Ok, disabling Extra hacks, the error message does not appear anymore.

But there is an annoying issue with mlv_rec  : after recording a clip, Magic Lantern does not boot anymore (the camara works Ok, but without Magic Lantern).
I need to put the sd card on my computer, erase ML folder, and launch "make install" from platorm/500D directory to have it working again.

No problem for me, I don't use video recording at all. In photo mode the build seems to work well.

Title: Re: Trying to build for 500D
Post by: Unsoft on July 05, 2014, 10:08:12 PM
I don't have any issue with mlv_rec.
ML still working even after recording a clip.
Thanks josepvm for all stubs !:)
Title: Re: Trying to build for 500D
Post by: josepvm on July 05, 2014, 11:54:48 PM
Quote from: Unsoft on July 05, 2014, 10:08:12 PM
I don't have any issue with mlv_rec.
ML still working even after recording a clip.

Yes, it works, I see now. I was wrong.

A really silly mistake on my part, because I never use my camera for video.  I disabled global draw to avoid errors while recording.  And don't remembered it when finished.

After restarting the camera and not seeing the usual ML text on screen ... I concluded to soon ML was not loading  ::) Sorry  ;)

So everything works fine.

Title: Re: Trying to build for 500D
Post by: curtis8523 on July 08, 2014, 02:31:13 AM
Quote from: josepvm on July 05, 2014, 11:54:48 PM
Yes, it works, I see now. I was wrong.

A really silly mistake on my part, because I never use my camera for video.  I disabled global draw to avoid errors while recording.  And don't remembered it when finished.

After restarting the camera and not seeing the usual ML text on screen ... I concluded to soon ML was not loading  ::) Sorry  ;)

So everything works fine.



I was wondering if you could post your build. i am by no means a developer or anything. i dont know the first thing about building from source. Please and thank you


Matt
Title: Re: Trying to build for 500D
Post by: josepvm on July 08, 2014, 09:59:00 AM
Quote from: curtis8523 on July 08, 2014, 02:31:13 AM

I was wondering if you could post your build. i am by no means a developer or anything. i dont know the first thing about building from source. Please and thank you


The stubs I found are already sent to ML main repository, and approved. So the build should be available soon in the Nightly Builds download page.

So be patient.  It's preferable you use the official Nightly Build. 


I started building Magic Lantern myself only one month ago.  And, in case I do something wrong, I can accept to risk my own camera, but I don't want to risk elseone cameras.



Title: Re: Trying to build for 500D
Post by: Greg on July 11, 2014, 05:42:03 PM
I'm trying to look for stubs

Correct?
NSTUB(0xFF05A57C,  PROPAD_GetPropertyData)
NSTUB(0xFF367910,  StartPlayProtectGuideApp)
NSTUB(0xFF367678,  StopPlayProtectGuideApp)
Title: Re: Trying to build for 500D
Post by: josepvm on July 11, 2014, 09:14:59 PM
Quote from: Greg on July 11, 2014, 05:42:03 PM
I'm trying to look for stubs

Correct?
NSTUB(0xFF05A57C,  PROPAD_GetPropertyData)
NSTUB(0xFF367910,  StartPlayProtectGuideApp)
NSTUB(0xFF367678,  StopPlayProtectGuideApp)


Absolutely correct.  (I've compared them with 550D or 5D2 code, and there's no doubt)

What are they used for ?   :)



Title: Re: Trying to build for 500D
Post by: Greg on July 11, 2014, 09:28:48 PM
Quote from: josepvm on July 11, 2014, 09:14:59 PM
What are they used for ?   :)

I do not know  :D
I learn to look stubs.


Now raw_rec with small hacks does not result an error.
dialog_refresh_timer_addr 0xFF2ABEF8
Title: Re: Trying to build for 500D
Post by: curtis8523 on July 13, 2014, 04:17:50 PM
does anyone know when the t1i will have a new nightly built. the last one was on the 7th. just out of curiosity
Title: Re: Trying to build for 500D
Post by: josepvm on July 13, 2014, 04:30:01 PM
Quote from: curtis8523 on July 13, 2014, 04:17:50 PM
does anyone know when the t1i will have a new nightly built. the last one was on the 7th. just out of curiosity

See the comments here:

https://bitbucket.org/hudson/magic-lantern/pull-request/531/added-missing-stubs-for-500d-gui-timers-an/diff (https://bitbucket.org/hudson/magic-lantern/pull-request/531/added-missing-stubs-for-500d-gui-timers-an/diff)