Been doing some private stub hunting coaching with @critix -- private because we've been looking at disassembled Canon code. The
pull request he is working on will need to be redone so I thought some of the notes that came up should be discussed on this forum topic.
First thing obviously wrong: bzero32.
How's this?
platform/1300D.110/stubs.S
NSTUB( 0x29898, bzero32) // called by cstart() rom
This seems to be working fine in QEMU though I'm not really sure what to look for.
Second thing obviously wrong: task list doesn’t work; is_taskid_valid has a different syntax (address is correct). This one could have been noticed within minutes of playing with QEMU; don’t remember anyone mentioning it.
I've been playing with QEMU but again not sure what to look for. Here's a snippet from a QEMU session and it looks to me that tasks are starting up fine:
[****] Starting task fe2be514(7d7940) TOMgr
[ TOMgr:fe123c94 ] (00:01) [PM] DisablePowerSave (Counter = 2)
[ TOMgr:fe37e258 ] (43:05) tomSetRawJpgMode (Type = 0x4)
[ TOMgr:fe123d04 ] (00:01) [PM] EnablePowerSave (Counter = 1)
[****] Starting task fe2be514(7da6fc) Fstorage
[****] Starting task fe2be514(7d754c) ShootPreDevelop
[ShootPreDevelop:fe134a38 ] (95:05) spsInit
[****] Starting task fe12b9c0(0) AEmodeJudge
[****] Starting task fe5423d8(0) CSMgrTask
55: 110.080 [RSC] hMemoryQue[MPU] Sending : 1a 18 01 4e 00 00 00 00 00 00 00 00 00 00 00 1e 00 00 00 0f 00 00 00 00 00 00 (PROP_VIDEO_MODE)
[ DbgMgr:fe123c94 ] (00:01) [PM] DisablePowerSave (Counter = 2)
[ DbgMgr:fe123d04 ] (00:01) [PM] EnablePowerSave (Counter = 1)
ue (0x660012) hStorageQueue (0x680014)
117: 115.456 [RTC] PROPAD_GetPropertyData : PROP_RTC 0xfd
120: 117.504 [RTC] ChangePropertyCBR 0x0, 0x0
121: 117.760 [RTC] RTC_Permit 0x20
135: 118.784 [SND] Seq LPC fin
153: 119.808 [ENG] [ENGIO](Addr:0x4fb40000, Data:0x 30000)
167: 122.880 [TERMINATE] SHUTDOWN init comp
169: 122.880 [TERMINATE] Abort init comp
176: 128.256 [WB] AdjustWb Done.
196: 130.048 [MC] PROP_GUI_STATE 0
201: 130.048 [MC] JobState 0
204: 130.304 [MC] PROP_LCD_OFFON_BUTTON : 0
206: 130.304 [MC] PROP_VARIANGLE_GUICTRL : Enable
209: 130.816 [MC] regist master CardCover
Modules are loading:
Register modules...
Load configs...
Init modules...
[i] Init: 'lua'
[ module_task:00c002bc ] task_create(lua_load_task, prio=1c, stack=10000, entry=c01a60, arg=0)
[****] Starting task c01a60(0) lua_load_task
[i] cbr 'CBR_PRE_SHOOT' -> 000C021D8
[i] cbr 'CBR_POST_SHOOT' -> 000C021A4
[i] cbr 'CBR_SHOOT_TASK' -> 000C02170
[i] cbr 'CBR_SECONDS_CLOCK' -> 000C0213C
[i] cbr 'CBR_KEYPRESS' -> 000C0209C
[i] cbr 'CBR_CUSTOM_PICTURE_TAKING' -> 000C02068
[i] cbr 'CBR_INTERVALOMETER' -> 000C02030
[i] cbr 'CBR_CONFIG_SAVE' -> 000C01FFC
Updating symbols...
[i] 404: edmac_format_size c81930
[i] 404: edmac_format_size c83a50
[i] 404: edmac_format_size c8d230
[i] 404: edmac_format_size c8eba0
[i] 404: dual_iso_get_recovery_iso c97b10
[i] 404: dual_iso_is_active c97b10
[i] 404: auto_ettr_intervalometer_wait ca41b0
[i] 404: auto_ettr_intervalometer_warning ca41b0
[i] 404: auto_ettr_export_correction caaca0
[i] 404: dual_iso_get_dr_improvement cb85d0
[i] 404: dual_iso_get_recovery_iso cb85d0
[i] 404: edmac_format_size cbc250
And the GUI is looking good:


Several modules aren't building but that's also a problem with the 1100D (
shameless plug for my pull request)

A few more: FOCUS_CONFIRMATION 0x36EC4, HALFSHUTTER_PRESSED 0x359BC, INFO_BTN_NAME "DISP" and I could go on.
I'm confused. This is what is in the current code:
platform/1300D.110/consts.h [EDIT] originally pasted the 1200D values, these are from the 1300D
// guess
#define FOCUS_CONFIRMATION (*(int*)0x479C)
#define HALFSHUTTER_PRESSED (*(int*)0x31308) // same as 60D
Finding stubs using pattern matching won't help with these and I'm not sure how to use QEMU to ferret them out.
I was hoping to find somebody who understands how a computer works, to some extent…
Not me--I went to art school
