Read about our upcoming Code of Conduct on this issue

Commit 7d7c4247 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU: 1300D GUI works!

- this camera uses a different DryOS timer (totally unexpected!)
- removed JPCORE patch (firmware expects this to be initialized properly)
- generic MPU spells; button codes from 1100D
- powersave workaround (without it, GUI would lock up after a few seconds of inactivity)
- no patches required!

branch : qemu
parent 351f6deb24e5
......@@ -1172,13 +1172,19 @@ unsigned int eos_handle_jpcore( unsigned int parm, EOSState *s, unsigned int add
if (value & 1)
msg = "Start JPCORE";
eos_trigger_int(s, 0x64, 100);
eos_trigger_int(s, 0x64, 10);
/* EOSM: this value starts JPCORE, but fails the DCIM test */
//ret = 0x1010000;
if (strcmp(s->model->name, "1300D") == 0)
/* 1300D requires it */
ret = 0x1010000;
......@@ -1210,6 +1216,11 @@ unsigned int eos_handle_jpcore( unsigned int parm, EOSState *s, unsigned int add
case 0x0044:
msg = "interrupt status? (70D loop)";
ret = rand();
if (strcmp(s->model->name, "1300D") == 0)
ret = 0x400;
case 0x0080:
......@@ -4385,6 +4385,14 @@ unsigned int eos_handle_basic ( unsigned int parm, EOSState *s, unsigned int add
/* 5D classic: expects 1 at 0xFFFF01A4 */
ret = 1;
if ((address & 0xFFF) == 0x110)
/* 1300D: expects 0x80000000 at 0xFE0C038C */
/* GUI locks up without it after entering PowerSave */
msg = "Powersave related?";
ret = 0x80000000;
io_log("BASIC", s, address, type, value, ret, msg, 0, 0);
return ret;
......@@ -295,6 +295,8 @@ struct eos_model_desc eos_model_list[] = {
.rom0_size = 0x02000000,
.rom1_size = 0x02000000,
.firmware_start = 0xFF0C0000,
.dryos_timer_id = 1, /* set to 10ms; run with -d io,int,v to find it */
.dryos_timer_interrupt = 0x09, /* enabled right before setting the timer value */
.mpu_request_register = 0xC022D0C4, /* written in mpu_send (run with -d io) */
.mpu_request_bitmask = 0x00100000, /* 0x83DC00 request, 0x93D800 idle */
.mpu_status_register = 0xC022F484, /* read in SIO3_ISR and MREQ_ISR (tst 0x40000) */
......@@ -302,7 +304,8 @@ struct eos_model_desc eos_model_list[] = {
.sd_driver_interrupt = 0x4B,
.sd_dma_interrupt = 0x32,
.uart_rx_interrupt = 0x38,
.rtc_time_correct = 0xFD,
.rtc_time_correct = 0xFD, /* RTC_TIME_CORRECT_CHANGE */
.rtc_cs_register = 0xC022D0B8, /* GPIO set/cleared in rtc_read */
.name = "EOSM",
......@@ -1131,6 +1131,7 @@ void mpu_spells_init(EOSState *s)
......@@ -2,14 +2,14 @@
* Minimal generic spell set based on 60D (deleted everything that did not prevent booting)
* Without card support (comment out PROP_CARD2_EXISTS), it boots most EOS models (menu navigation works)
* Tested on: 5D2 5D3 6D 50D 60D 70D 450D 500D 550D 600D 650D 700D 100D 1000D 1100D 1200D EOSM2.
* Tested on: 5D2 5D3 6D 50D 60D 70D 450D 500D 550D 600D 650D 700D 100D 1000D 1100D 1200D 1300D EOSM2.
* Not working: EOSM.
* Does something: 80D, 750D, 760D.
* With SD card support (unmodified - PROP_CARD2_EXISTS enabled), it initializes SD
* on all the above EOS models, but may crash at EstimatedSize on the most recent ones.
* Even if it crashes, the SD card is initialized and the firmware can save files to the virtual card.
* Working (menu navigation, card format): 60D 500D 550D 600D 650D 700D 1100D 1200D.
* Working (menu navigation, card format): 60D 500D 550D 600D 650D 700D 1100D 1200D 1300D.
* Working (menu navigation, card recognized): 450D 1000D.
* Assert at EstimatedSize, dumpf works: 5D3 6D 70D 80D 100D EOSM2.
* Not working EOSM.
......@@ -2,7 +2,6 @@
# ./ 1300D -d debugmsg -s -S & arm-none-eabi-gdb -x 1300D/debugmsg.gdb
source -v debug-logging.gdb
source -v 1300D/patches.gdb
# To get debugging symbols from Magic Lantern, uncomment this:
#symbol-file ../magic-lantern/platform/1300D.110/magiclantern
# ./ 1300D -s -S & arm-none-eabi-gdb -x 1300D/patches.gdb
# Only patches required for emulation
source patch-header.gdb
# patch JPCORE (assert)
set *(int*)0xFE4244FC = 0xe12fff1e
source patch-footer.gdb
4d038e391d1e475dd911b2773eef750e calls-main.log
5c2122c76128857f29b2bbcfc030f53b calls-main.idc
e9b69f1cd8ef78c36b0261daac13afea calls-main-basic.log
8a6da5f2e8e1e573fcaa8a74426c85d4 calls-main-basic.idc
bc105b866e866a67cf23b010f4306e6e calls-main.log
d404b0222c815dda3ec1f3d29904fe83 calls-main.idc
0c1e30d5b6d6c43729838297187692e8 calls-main-basic.log
2818f4dc123cf1b15eafb25c9f91a3a8 calls-main-basic.idc
54da70f90922b89c4a9198d4acc0b405 format0.png
4e19f58c2c3837c8e2512594290ba921 format1.png
5445a0ab3cc419319dc129fd41131e17 format2.png
92d7a2ed24522a2a2caa6232367d3902 format3.png
42a9c0a5ba5eefc1c1430c223eff9ebe format4.png
8dbca899d667ccb48e07d2a4eb98b3d3 format5.png
eef418e2325e9020bb79dd54a6951abe format6.png
42a9c0a5ba5eefc1c1430c223eff9ebe format8.png
4818575627790d69b80fa56beef527f9 format9.png
321e413f96dc411172e63c8f8cfb092c menu0.png
d9972340b07b16f76f6879221ba21875 menu10.png
3d83517dafc435a240050a3b1f2a38aa menu11.png
bc3382db7cd4900e811a9ce7d12c4555 menu12.png
e58f57a02e5e6f14778090626e51ccc5 menu13.png
efc4d15d1881177dffc6b6025b2d2307 menu14.png
2ba20b85fa911ef91be15fb00181dced menu15.png
56e9211d677708511f6e841fb9875250 menu16.png
624889f64790d239f767addf88fa3ed6 menu17.png
4bebff6c0b7c697844d0a24170a3641b menu18.png
624889f64790d239f767addf88fa3ed6 menu19.png
2b912194b1fe3b4248ef2cfdd3939a07 menu1.png
855ae3ca9decf521e9ec957d0ca0bf8f menu20.png
624889f64790d239f767addf88fa3ed6 menu21.png
56e9211d677708511f6e841fb9875250 menu22.png
790e5ffd06c1ebb1c83abdb5795cdf99 menu23.png
bfc507e54f72144a5baa2c14ecdbee4b menu24.png
a0a3b89476ba7d3108de62f57cc779f4 menu25.png
5400452d7e7a0c31ce38d35451ff77c0 menu26.png
26940c68e547c575ca1703193a76d970 menu27.png
321e413f96dc411172e63c8f8cfb092c menu28.png
d3fae9eb78467881985fd4c0478bdf8e menu29.png
321e413f96dc411172e63c8f8cfb092c menu2.png
4479ba8ecaeacfdfd66128805163a7f4 menu30.png
291ccf7b50919f994460f6a22f93da83 menu31.png
4479ba8ecaeacfdfd66128805163a7f4 menu32.png
321e413f96dc411172e63c8f8cfb092c menu33.png
a5b424592a5cb93df9e7ba2ea25d2f6f menu34.png
48c2549d6f57f3779de607559334d85c menu35.png
321e413f96dc411172e63c8f8cfb092c menu36.png
54da70f90922b89c4a9198d4acc0b405 menu3.png
2239fc09ea3c3ae356bdb7fb3d91efec menu4.png
54da70f90922b89c4a9198d4acc0b405 menu5.png
b5abb37cc0454b8f4410100d287f22f2 menu6.png
beb6a0fe4b77969e5806e56a73ca2d09 menu7.png
d9972340b07b16f76f6879221ba21875 menu8.png
4f095e9b8154964f90d51b8acb679ce0 menu9.png
......@@ -22,7 +22,7 @@ EOS_SECONDARY_CORES=( 5D3eeko 5D4AE 7D2S )
# cameras able to run Canon GUI (menu tests)
GUI_CAMS=( 5D2 5D3 6D 50D 60D 70D
450D 500D 550D 600D 650D 700D
100D 1000D 1100D 1200D EOSM EOSM2 )
100D 1000D 1100D 1200D 1300D EOSM EOSM2 )
# cameras with a SD card
SD_CAMS=( 5D3 5D4 6D 60D 70D 80D
......@@ -110,6 +110,7 @@ MENU_SEQUENCE[100D]="f1 i i i m left left left up up left left left left left le
MENU_SEQUENCE[1000D]="f1 i w w i p p m space space up up space m left i"
MENU_SEQUENCE[1100D]="f1 i i m i i left m p p down right space right right space up right space" # drive mode not working
MENU_SEQUENCE[1200D]="f1 i i m i i space m m p p down right space right right space up right space" # drive mode not working
MENU_SEQUENCE[1300D]="f1 i i m i i up up up space m up up space right space down space i m space space m left up space down space m q right space i q down p p"
MENU_SEQUENCE[EOSM]="f1 m up up up space m up space m up space m left down down down space space p p " # only menu works
MENU_SEQUENCE[EOSM2]="f1 m space space space up up space m up space m up space m up space m right space space m m" # only menu works
......@@ -134,6 +135,7 @@ FORMAT_SEQUENCE[100D]="m $FMT_SEQ" # fixme: free space
FORMAT_SEQUENCE[1000D]="m left left $FMT_SEQ" # fixme: locks up
FORMAT_SEQUENCE[1100D]="m right right down $FMT_SEQ"
FORMAT_SEQUENCE[1200D]="m left left $FMT_SEQ"
FORMAT_SEQUENCE[1300D]="m left left down down $FMT_SEQ"
FORMAT_SEQUENCE[EOSM]="m left left left $FMT_SEQ"
FORMAT_SEQUENCE[EOSM2]="m left left left up $FMT_SEQ"
......@@ -998,9 +1000,9 @@ function test_dcim {
echo "Testing file I/O (DCIM directory)..."
# Currently works only on models that can boot Canon GUI,
# and also on 1300D and 80D.
# and also on 80D.
# we need to check the card contents; cannot run in parallel
for CAM in ${GUI_CAMS[*]} 1300D 80D; do
for CAM in ${GUI_CAMS[*]} 80D; do
run_test dcim $CAM
done; cleanup
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment