Author Topic: How to run Magic Lantern into QEMU?!...  (Read 153274 times)

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12290
  • Emergencies only
Re: How to run Magic Lantern into QEMU?!...
« Reply #400 on: April 09, 2019, 02:25:06 PM »
Narrowed down a bunch of bugs in the logging code, i.e. edge and corner cases when following DryOS or VxWorks task switches. Commit.

Whew, this was hard! I kept bumping into all sorts of edge cases... but hey, it finally passes the tests!!! I can finally follow all those task switches!

New feature: print number of instructions executed by each function (-d calls,tasks -icount 5). Very useful for code optimization - I actually wrote it one month ago for profiling the drawing code for DIGIC 6/7/8, in particular for helping chris_overseas with the Hello World code for 5D4. It was actually this feature (i.e. a simple assertion) that revealed all the above bugs. Commit.

Example - profiling Hello World on 60D.111:
Code: [Select]
call 0x1FE0FE18 bmp_printf(40201, 32, 32, 1fe589da "Hello, World!")             at [ml_init:1fe008b0:ff07b8d0] (my_big_init_task)
  call 0x1FE56018 __vsnprintf_veneer(1660b0, 7f, 1fe589da "Hello, World!", 166140)
                                                                                 at [ml_init:1fe0fe44:1fe008b4] (bmp_printf)
   -> 0xFF1DA530 vsnprintf                                                       at [ml_init:1fe56018:1fe0fe48] (__vsnprintf_veneer)
  return d to 0x1FE0FE48                                                         at [ml_init:ff1da8dc:1fe008b4]                    [icount 141]
  call 0x1FE0FD80 bmp_puts(40201, 1660a4, 1660a0, 1660b0 "Hello, World!")        at [ml_init:1fe0fe58:1fe008b4] (bmp_printf)
   call 0x1FE11D20 rbf_draw_string(96868, 32, 32, 1660b0 "Hello, World!")        at [ml_init:1fe0fdf8:1fe0fe5c] (bmp_puts)
    call 0x1FE114F8 rbf_draw_char(96868, 32, 32, 48)                             at [ml_init:1fe11d88:1fe0fdfc] (rbf_draw_string)
    ...
    return 15 to 0x1FE11D8C                                                      at [ml_init:1fe11678:1fe0fdfc] (rbf_draw_char)    [icount 12905]
    ...
    return 9 to 0x1FE11D8C                                                       at [ml_init:1fe11678:1fe0fdfc] (rbf_draw_char)    [icount 5993]
   return b8 to 0x1FE0FDFC                                                       at [ml_init:1fe121f0:1fe0fe5c] (rbf_draw_string)  [icount 116740]
  return b8 to 0x1FE0FE5C                                                        at [ml_init:1fe0fe0c:1fe008b4] (bmp_puts)         [icount 116776]
 return b8 to 0x1FE008B4                                                         at [ml_init:1fe0fe68:ff07b8d0] (bmp_printf)       [icount 116938]

 call 0x1FE0D620 info_led_blink(1, 1f4, 1f4, 218)                                at [ml_init:1fe008d8:ff07b8d0] (my_big_init_task)
  call 0x1FE56020 __msleep_veneer(1f4, 1f4, 1f4, 218)                            at [ml_init:1fe0d650:1fe008dc] (info_led_blink)
   -> 0xFF06EA08 msleep                                                          at [ml_init:1fe56020:1fe0d654] (__msleep_veneer)
   ... (other tasks) ...
 return 0 to 0x1FE008DC                                                          at [ml_init:1fe0d668:ff07b8d0] (info_led_blink)   [icount 542]

Profiling minimal Hello World on 5D4 (doesn't work out of the box yet):
Code: [Select]
call 0x1CCCB0 font_draw(64, 4b, 1, 3)                                           at [run_test:1cca48:80001737] (hello_world)
  arg5 = 1d09a4 "Hello, World!"                                                  at [run_test:1ccccc:1cca4c] (font_draw)
  call 0x1CCAA8 disp_set_pixel(64, 4b, 1, 1ccaa8 disp_set_pixel)                 at [run_test:1ccd70:1cca4c] (font_draw)
   call 0x1CD0F0 rgb2yuv422(ff, ff, ff, 1cd0f0 rgb2yuv422)                       at [run_test:1ccb00:1ccd74] (disp_set_pixel)
    -> 0x1CCF6C rgb2yuv422_rec709                                                at [run_test:1cd0f0:1ccb04] (rgb2yuv422)
   return fe80fe80 to 0x1CCB04                                                   at [run_test:1cd024:1ccd74] (rgb2yuv422_rec709)   [icount 48]
  return 80fe80 to 0x1CCD74                                                      at [run_test:1ccb5c:1cca4c] (disp_set_pixel)      [icount 89]
...
 return 0 to 0x1CCA4C                                                            at [run_test:1ccd8c:80001737] (font_draw)         [icount 555882]

It reveals how many instructions are required for the entire function, for a single pixel, where various overheads come from, and so on. Very useful for me.

I'd also like to clean it up a bit, make sure it works on all major operating systems (anyone had trouble with the install script?) and merge the current state into mainline, as pretty much all recent developments depend on this.

scrax

  • Contributor
  • Hero Member
  • *****
  • Posts: 1543
  • Code monkey
Re: How to run Magic Lantern into QEMU?!...
« Reply #401 on: April 09, 2019, 04:49:13 PM »
To be sure. I've made (in qemu branch):

Code: [Select]
hg pull
cd contrib/qemu/
./install.sh

I'm on OsX 10.13.6 and seems to work ok with clang
GCC: gcc-arm-none-eabi-7-2017-q4-major
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

calle2010

  • Contributor
  • New to the forum
  • *****
  • Posts: 47
Re: How to run Magic Lantern into QEMU?!...
« Reply #402 on: April 09, 2019, 11:33:41 PM »
A good oppportunity to reprovision my Vagrant environment. The install script works with latest Ubuntu Bionic

arm-none-eabi-gcc: gcc version 6.3.1 20170620 (15:6.3.1+svn253039-1build1)
gdb-multiarch: GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12290
  • Emergencies only
Re: How to run Magic Lantern into QEMU?!...
« Reply #403 on: April 10, 2019, 12:08:21 AM »
Sounds good. I've tested on an older Win10 WSL VM (based on Xenial) and downloaded a newer one, hopefully based on Bionic; not expecting any surprises, other than minor usability quirks.

Also preparing to install Mojave in a VM to try that as well; High Sierra appears to work fine (well, with the "1998" Mac quirks discussed earlier in the thread).

Noticed a quirk - in the "qemu" branch I'm compiling ML with -ggdb3; this option adds debug information usable for QEMU+GDB (so you can step through ML code at source level). For some reason, this also generates slightly different binary code (aside from the additional debug information, which doesn't end up in autoexec.bin anyway). Likely minor, as this change was used in experimental builds for quite some time, without issues.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3737
Re: How to run Magic Lantern into QEMU?!...
« Reply #404 on: April 10, 2019, 12:29:44 AM »
I'm using QEMU on Mojave, macOS 10.14.4 using an actual (not virtual) PowerBook and it seems (almost) as good as Linux. Haven't checked to see if that 1998 quirk is still there.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12290
  • Emergencies only
Re: How to run Magic Lantern into QEMU?!...
« Reply #405 on: April 10, 2019, 09:11:36 AM »
Installed Mojave, downloaded the zip archive of the QEMU branch (from here) with Safari (i.e. without first installing hg & co), ran the install script (cd contrib/qemu; ./install.sh) and... worked out of the box! It installed brew and other dependencies, compiled gdb 8.2.1 from source et voilĂ ! QEMU and ML development environment installed and ready to use!

Problems:
- precompiled toolchain (8-2018-q4 at the time of writing) includes gdb 8.0.x 8.2.50.20181213-git, which... doesn't work with our scripts (e.g. EOSM/debugmsg.gdb)
- guess what - gdb 8.2.1 "stable" is not working either! Why?! I remember testing 8.1 successfully before...
- back to gdb 8.1 from source -> working! Regression in GDB?!
- previous precompiled toolchain (7-2018-q2-update) uses gdb 8.1.0.20180315-git, which IS WORKING with EOSM/debugmsg.gdb, so I'll just use that in the install script.

Minor wrinkles:
- user has to modify PATH manually (can be solved, see e.g. this PR for another project)
- need to allow Terminal to interact with System Events or something like that

Mac quirks:
- how do you type a tilde on Mac?! (OK, found it at the end of a google search)
- why is scrolling in the opposite direction?! (and why it's asking me for a USB mouse in order to change this setting?!)
- how do you open a new terminal?! (clicking the icon just activates the old one)
- how do you navigate to your Home directory? how do you cut & paste a file? and so on...

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5921
Re: How to run Magic Lantern into QEMU?!...
« Reply #406 on: April 10, 2019, 09:27:05 AM »

Mac quirks:
- how do you open a new terminal?! (clicking the icon just activates the old one)
- how do you navigate to your Home directory? how do you cut & paste a file? and so on...

- cmd + n for new terminal window while having terminal up front
- Cut not working but cmd + c(copy) then cmd + v(paste)
- Shift + cmd + g(will open 'Go to the folder' field) then paste tilde sign and enter

Other stuff:
- shift + cmd + .(punctuation) will unhide all hidden folders. Run the same command to go back to hidden mode.

calle2010

  • Contributor
  • New to the forum
  • *****
  • Posts: 47
Re: How to run Magic Lantern into QEMU?!...
« Reply #407 on: April 10, 2019, 03:55:17 PM »
- why is scrolling in the opposite direction?!

Because this direction is the same as the direction you would use on a touchpad with a two-finger-gesture to move the screen content. See the scroll wheel as a primitive one-dimensional touchpad.

The Windows scroll wheel direction comes from the "I click&drag a scrollbar to move the content" times (1990s or so :) ). The scrollbar moves into the opposite direction (down if the content moves up).
Fortunately my Logitech mouse on Windows can change this weird Windows quirk.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3737
Re: How to run Magic Lantern into QEMU?!...
« Reply #408 on: April 10, 2019, 04:05:39 PM »
- how do you navigate to your Home directory?

All of these work on the Mac:

Code: [Select]
cd
cd ~
cd ~/
cd $HOME
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12290
  • Emergencies only
Re: How to run Magic Lantern into QEMU?!...
« Reply #409 on: April 10, 2019, 10:00:54 PM »
I mean, the Mac has a reputation of being easy to use, right? I get all sorts of animated popups, OK, maybe that's what users like, but... for pretty much every single basic thing (like moving a file, or going to the Home directory in the GUI, or... typing the ~ character) I need to google how to do it. And it's not the first time I've used a Mac.

Win10 has its own share of quirks (e.g. the WSL home directory is hidden quite deep in the host filesystem), but not nearly as many.

Good news - precompiled toolchain 7-2018-q2-update appears to work fine! The installation script now defaults to that on both Mac and WSL.

scrax

  • Contributor
  • Hero Member
  • *****
  • Posts: 1543
  • Code monkey
Re: How to run Magic Lantern into QEMU?!...
« Reply #410 on: April 10, 2019, 10:07:12 PM »
I mean, the Mac has a reputation of being easy to use, right? I get all sorts of animated popups, OK, maybe that's what users like, but... for pretty much every single basic thing (like moving a file, or going to the Home directory in the GUI, or... typing the ~ character) I need to google how to do it. And it's not the first time I've used a Mac.

Win10 has its own share of quirks (e.g. the WSL home directory is hidden quite deep in the host filesystem), but not nearly as many.

Good news - precompiled toolchain 7-2018-q2-update appears to work fine! The installation script now defaults to that on both Mac and WSL.
It's easy for who never used a PC before :P
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

scrax

  • Contributor
  • Hero Member
  • *****
  • Posts: 1543
  • Code monkey
Re: How to run Magic Lantern into QEMU?!...
« Reply #411 on: April 21, 2019, 11:59:00 AM »
I don't know if it something that need attention or not, but when emulating 600D if I press L (for live view) i got this:

Code: [Select]
   163:  8499.968 [MC] PROP_GUI_STATE 0
   164:  8499.968 [PRP] ERROR TWICE ACK REQUEST L:846
   165:  8499.968 [PRP] this->dwWaitAckID = 0x80020000(0x80040004)
   166:  8499.968 [LV] [LVAE] EP_SetControlBv() >> EP_ControlBv:1
   167:  8500.992 WARN [LVDS] First Get DTS_GetAllRandomData
   168:  8501.248 [LV] [PATH] GetPathDriveInfo[0]
   169:  8501.248 WARN [LVDS] First Get DTS_GetAllRandomData
   170:  8501.760 WARN [LVDS] First Get DTS_GetAllRandomData
   171:  8502.272 WARN [LVDS] First Get DTS_GetAllRandomData
   172:  8502.272 WARN [LVDS] First Get DTS_GetAllRandomData
   173:  8502.528 [MC] cam event guimode comp. 0
   175:  8506.880 [GUI] ERROR ***** Lv GetMovieFrameRateIcon S (81)
   176:  8507.136 [GUI] ERROR ***** Lv GetMovieZoomIcon S (88)
   177:  8507.136 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   178:  8508.672 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   179:  8508.672 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   180:  8508.928 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   181:  8508.928 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   182:  8510.208 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   183:  8510.208 [DISP] UpdateReverseTFT(off) Current=1 Target=1
   184:  8558.336 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   185:  8558.336 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   186:  8558.592 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   187:  8558.592 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   188:  8558.848 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   189:  8616.704 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   190:  8616.704 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   191:  8616.704 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
   192:  8616.704 [GUI] ERROR ***** Lv IsMovieZoomSetting(88)
... this Lv IsMovieZoomSetting(88) continues till I get out of LV...

(I'm using last qemu branch with python3 and new toolchain)
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

kitor

  • Contributor
  • Member
  • *****
  • Posts: 130
Re: How to run Magic Lantern into QEMU?!...
« Reply #412 on: April 23, 2019, 04:37:56 PM »
I installed QEMU from qemu branch, however I don't see any definitions for M50 or R here. What do I need to do to emulate those?
Any hacks in arm-softmmu/hw/eos, or I should use some other camera for now?
EOS R

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12290
  • Emergencies only
Re: How to run Magic Lantern into QEMU?!...
« Reply #413 on: April 23, 2019, 04:39:43 PM »
There is a patch for M50 here; IIRC it worked on R with minimal changes. Will clean them up for committing, but I think it will happen after bringing the current state into mainline.

heder

  • New to the forum
  • *
  • Posts: 28
Re: How to run Magic Lantern into QEMU?!...
« Reply #414 on: May 28, 2019, 03:51:49 PM »
Hi.

I'm trying to get QEMU running with my 500D rom on Ubuntu 14.04 but I get only white noise ...

Branch: "qemu"
HOST: QEMU (installed using contrib/qemu/install.sh)
TARGET: Canon 500D
GCC: 5.4.1

Inorder to get the 500D platform to compile I had to change "static void my_gui_main_task(void)" into "void ml_gui_main_task(void)" in platform/500D.111/gui.c as 500D is still using it's own gui.c. After that it compiles. Then I ran ./run_ml_500D.sh

Running the firmware does however only give me white noise in QEMU. I'v noticed in the log that ml_init_task is not started and I rather get the standard init task. Somehow the hijack in boot-hack is not working. I also defined CONFIG_HELLO_WORLD, but nothing happens.

Here is my log.

Code: [Select]
make: Entering directory `/home/ml/qemu/qemu-1.6.0'
CHK version_gen.h
make: Leaving directory `/home/ml/qemu/qemu-1.6.0'
make: Entering directory `/home/ml/magic-lantern/platform/500D.111'
[ VERSION  ]   ../../platform/500D.111/version.bin
[ VERSION  ]   ../../platform/500D.111/version.c
[ CC       ]   version.o
make -C ../../tcc
make[1]: Entering directory `/home/ml/magic-lantern/tcc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/ml/magic-lantern/tcc'
[ LD       ]   magiclantern
[ OBJCOPY  ]   magiclantern.bin
[ STAT     ]   magiclantern.bin
magiclantern.bin: 473052 bytes
[ CC       ]   reboot.o
../../src/reboot.c: In function 'cstart':
../../src/reboot.c:100:6: warning: #warning Signature Checking bypassed!! Please use a proper signature [-Wcpp]
     #warning Signature Checking bypassed!! Please use a proper signature
      ^
[ LD       ]   autoexec

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  EXIDX          0x0738d4 0x000c07d4 0x000c07d4 0x00008 0x00008 R   0x4
  LOAD           0x000100 0x0004d000 0x0004d000 0x737dc 0x86ccc RWE 0x100
[ OBJCOPY  ]   autoexec.bin
[ STAT     ]   autoexec.bin
autoexec.bin: 473552 bytes
[ SYMBOLS  ]   magiclantern.sym
[ CP       ]   500D_111.sym
make: Leaving directory `/home/ml/magic-lantern/platform/500D.111'
make: Entering directory `/home/ml/magic-lantern/platform/500D.111'
make: `qemu-helper.bin' is up to date.
make: Leaving directory `/home/ml/magic-lantern/platform/500D.111'
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-500D.BIN' to 0xF0000000-0xF1FFFFFF
[EOS] loading 'ROM-500D.BIN' to 0xF8000000-0xF9FFFFFF
[EOS] loading 'autoexec.bin' to 0x00800000-0x008739CF
[EOS] loading 'qemu-helper.bin' to 0x30000000-0x30008C8F
[QEMU_HELPER] stub ff066a98 -> 300000a0 (e92d000f)
[QEMU_HELPER] stub ff197378 -> 3000072c (e92d41f0)
[QEMU_HELPER] stub ff1974a4 -> 30000784 (e92d41f0)
[QEMU_HELPER] stub ff1975a4 -> 300000f4 (e92d4070)
[QEMU_HELPER] stub ff196a88 -> 30000224 (e92d4010)
[QEMU_HELPER] stub ff1963ec -> 30000118 (e92d4070)
[QEMU_HELPER] stub ff196338 -> 3000026c (e92d41f0)
[QEMU_HELPER] stub ff196724 -> 30000328 (e92d41f0)
[QEMU_HELPER] stub ff1968d4 -> 30000148 (e92d41f0)
[QEMU_HELPER] stub ff196494 -> 300001a8 (e92d4070)
[QEMU_HELPER] stub ff1967d4 -> 30000820 (e92d43f8)
[QEMU_HELPER] stub ff059868 -> 30000050 (e92d4ff8)
[QEMU_HELPER] stub ff059988 -> 3000006c (e92d43f8)
[QEMU_HELPER] stub ff19384c -> 30000088 (e92d47f0)
[GPIO] at [0x00873910] [0x00000046] -> [0xC0220134]
[FlashIF] at [0x000C0920]: 'Write enable' enabled
[???] [0x00000001] -> [0xC020010C] PC: 0x000C0920
[???] [0x000000FF] -> [0xC020000C] PC: 0x000C0920
[???] [0x000000FF] -> [0xC020001C] PC: 0x000C0920
[???] [0x000000FF] -> [0xC020002C] PC: 0x000C0920
[???] [0x000000FF] -> [0xC020003C] PC: 0x000C0920
[???] [0x000000FF] -> [0xC020004C] PC: 0x000C0920
[???] [0x000000FF] -> [0xC020005C] PC: 0x000C0920
[???] [0x000000FF] -> [0xC020006C] PC: 0x000C0920
[???] [0x000000FF] -> [0xC020007C] PC: 0x000C0920
[???] [0x000000FF] -> [0xC020008C] PC: 0x000C0920
[???] [0x000000FF] -> [0xC020009C] PC: 0x000C0920
[???] [0x000000FF] -> [0xC02000AC] PC: 0x000C0920
[???] [0x000000FF] -> [0xC02000BC] PC: 0x000C0920
[???] [0x000000FF] -> [0xC02000CC] PC: 0x000C0920
[???] [0x000000FF] -> [0xC02000DC] PC: 0x000C0920
[???] [0x000000FF] -> [0xC02000EC] PC: 0x000C0920
[???] [0x000000FF] -> [0xC02000FC] PC: 0x000C0920
[Basic] at [0x000C0920] [0x00430005] -> [0xC0400008]
[???] [0x00000000] <- [0xC0242010] PC: 0x000C0920
[???] [0x00000001] -> [0xC0242010] PC: 0x000C0920
[Int] Write to Int space [0x43210DCB] -> [0xC0201100] PC: [0xFF0128D8]
[Int] Write to Int space [0xFEA98765] -> [0xC0201104] PC: [0xFF0128D8]
[Int] Write to Int space [0x00000001] -> [0xC0201200] PC: [0xFF0128D8]
[???] [0x00000008] -> [0xC0203008] PC: 0xFF0129A8
[Int] Enabled interrupt ID 0x0A PC: [0xFF012928]
[Basic] at [0xFF010370] [0x00000000] -> [0xC0400018]
[Basic] at [0xFF012A64] [0x00000000] <- [0xC0400008]
[Basic] at [0xFF012A64] [0x00001000] -> [0xC0400008]
[Basic] at [0xFF010380] [0x00000000] <- [0xC0400000]
[Timer] at [0xFF0129E8] [0x80000000] -> [0xC0210200]
[Timer] at [0xFF012A08] [0x00000002] -> [0xC0210204]
[Timer] at [0xFF012A08] [0x00000003] -> [0xC0210214]
[Timer] at [0xFF0103B0] [0x0000270F] -> [0xC0210208]
[Timer] at [0xFF012A40] [0x00000001] -> [0xC0210210]
[Timer] at [0xFF012A40] Starting triggering
[EOS] trigger int 0x0A (delayed!)
[Timer] at [0xFF012A40] [0x00000001] -> [0xC0210200]
[Int] Enabled interrupt ID 0x2E PC: [0xFF012908]
[Int] Enabled interrupt ID 0x3A PC: [0xFF012908]
[???] [0x00000000] <- [0xC05000D0] PC: 0xFF012418
[???] [0x00000000] -> [0xC05000D0] PC: 0xFF012418
[???] [0x40024680] -> [0xC05000C0] PC: 0xFF012418
[???] [0x00000080] -> [0xC05000C4] PC: 0xFF012418
[???] [0x40024680] -> [0xC05000C8] PC: 0xFF012418
[???] [0x00000080] -> [0xC05000CC] PC: 0xFF012418
[???] [0x00000000] -> [0xC05000D4] PC: 0xFF012418
[???] [0x00000017] -> [0xC05000D8] PC: 0xFF012418
[???] [0x00010023] -> [0xC05000D0] PC: 0xFF012418
[TIO] Reset RX indicator
K252 READY
[GPIO] at [0xFF01321C] [0x00000010] -> [0xC0222004]
[GPIO] at [0xFF0638E4] [0x00800C00] -> [0xC022D074]
[GPIO] at [0xFF0638E4] [0x00000000] -> [0xC0221110]
[GPIO] at [0xFF0638E4] [0x00000050] -> [0xC0221104]
[GPIO] ERASE SW OFF read at [0xFF063910]
[GPIO] at [0xFF063910] [0x00000000] -> [0xC022110C]
[GPIO] at [0xFF063924] [0x0000001F] -> [0xC0221200]
[GPIO] at [0xFF063930] [0x0000000E] -> [0xC0221204]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221208]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC022120C]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221210]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221214]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221218]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC022121C]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221220]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221224]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221228]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC022122C]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221230]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221234]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221238]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC022123C]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221240]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221244]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221248]
[GPIO] at [0xFF063930] [0x00000006] -> [0xC022124C]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221250]
[GPIO] at [0xFF063930] [0x0000001D] -> [0xC0221254]
[GPIO] at [0xFF063930] [0x00000034] -> [0xC0221258]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC022125C]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221260]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221264]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221268]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC022126C]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221270]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221274]
[GPIO] at [0xFF063930] [0x0000001F] -> [0xC0221278]
[GPIO] at [0xFF063944] [0x00000002] -> [0xC0221000]
[GPIO] at [0xFF063944] [0x00000048] -> [0xC0220000]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC0220004]
[GPIO] at [0xFF063968] [0x00000046] -> [0xC0220008]
[GPIO] at [0xFF063968] [0x00000008] -> [0xC022000C]
[GPIO] at [0xFF063954] [0x0000001F] -> [0xC0221004]
[GPIO] at [0xFF063954] [0x00000044] -> [0xC0220010]
[GPIO] /VSW_ON read at [0xFF063968]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC0220018]
[GPIO] at [0xFF063968] [0x00000000] -> [0xC022001C]
[GPIO] at [0xFF063968] [0x00000001] -> [0xC0221008]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC0220020]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC0220024]
[GPIO] at [0xFF063968] [0x00000046] -> [0xC0220028]
[GPIO] at [0xFF063968] [0x00000028] -> [0xC022002C]
[GPIO] at [0xFF063968] [0x0000001C] -> [0xC022100C]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC0220030]
[GPIO] USB CONNECT read at [0xFF063968]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC0220038]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC022003C]
[GPIO] at [0xFF063968] [0x0000001F] -> [0xC0221010]
[GPIO] at [0xFF063968] [0x00000004] -> [0xC0220040]
[GPIO] at [0xFF063968] [0x00000004] -> [0xC0220044]
[GPIO] at [0xFF063968] [0x00000004] -> [0xC0220048]
[GPIO] at [0xFF063968] [0x00000004] -> [0xC022004C]
[GPIO] /VSW_ON read at [0xFF063968]
[GPIO] at [0xFF063968] [0x00000004] -> [0xC0220050]
[GPIO] at [0xFF063968] [0x00000004] -> [0xC0220054]
[GPIO] at [0xFF063968] [0x00000004] -> [0xC0220058]
[GPIO] at [0xFF063968] [0x00000004] -> [0xC022005C]
[GPIO] at [0xFF063968] [0x0000001F] -> [0xC0221018]
[GPIO] at [0xFF063968] [0x00000004] -> [0xC0220060]
[GPIO] at [0xFF063968] [0x00000004] -> [0xC0220064]
[GPIO] at [0xFF063968] [0x00000004] -> [0xC0220068]
[GPIO] at [0xFF063968] [0x00000004] -> [0xC022006C]
[GPIO] at [0xFF063968] [0x00000008] -> [0xC022101C]
[GPIO] VIDEO CONNECT read at [0xFF063968]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC0220074]
[GPIO] at [0xFF063968] [0x00000040] -> [0xC0220078]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC022007C]
[GPIO] at [0xFF063968] [0x00000003] -> [0xC0221020]
[GPIO] at [0xFF063968] [0x00000000] -> [0xC0220080]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC0220084]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC0220088]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC022008C]
[GPIO] at [0xFF063968] [0x0000001F] -> [0xC0221024]
[GPIO] at [0xFF063968] [0x00000040] -> [0xC0220090]
[GPIO] at [0xFF063968] [0x00000040] -> [0xC0220094]
[GPIO] at [0xFF063968] [0x00000046] -> [0xC0220098]
[GPIO] at [0xFF063968] [0x00000046] -> [0xC022009C]
[GPIO] at [0xFF063968] [0x0000001F] -> [0xC0221028]
[GPIO] at [0xFF063968] [0x00000020] -> [0xC02200A0]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC02200A4]
[GPIO] at [0xFF063968] [0x00000040] -> [0xC02200A8]
[GPIO] at [0xFF063968] [0x00000040] -> [0xC02200AC]
[GPIO] at [0xFF063968] [0x0000001F] -> [0xC022102C]
[GPIO] at [0xFF063968] [0x00000040] -> [0xC02200B0]
[GPIO] at [0xFF063968] [0x00000040] -> [0xC02200B4]
[GPIO] at [0xFF063968] [0x00000040] -> [0xC02200B8]
[GPIO] at [0xFF063968] [0x00000040] -> [0xC02200BC]
[GPIO] at [0xFF063968] [0x0000001F] -> [0xC0221030]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC02200C0]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC02200C4]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC02200C8]
[GPIO] at [0xFF063968] [0x00000000] -> [0xC02200CC]
[GPIO] USB CONNECT read at [0xFF063968]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC02200D0]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC02200D4]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC02200D8]
[GPIO] at [0xFF063968] [0x00000040] -> [0xC02200DC]
[GPIO] at [0xFF063968] [0x0000001F] -> [0xC0221038]
[GPIO] at [0xFF063968] [0x00000040] -> [0xC02200E0]
[GPIO] at [0xFF063968] [0x00000040] -> [0xC02200E4]
[GPIO] MIC CONNECT read at [0xFF063968]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC02200EC]
[GPIO] at [0xFF063968] [0x00000015] -> [0xC022103C]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC02200F0]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC02200F4]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC02200F8]
[GPIO] at [0xFF063968] [0x00000048] -> [0xC02200FC]
[GPIO] at [0xFF063968] [0x0000001F] -> [0xC0221040]
[GPIO] at [0xFF063968] [0x00000046] -> [0xC0220100]
[GPIO] at [0xFF063968] [0x00000000] -> [0xC0220104]
[GPIO] ERASE SW OFF read at [0xFF063968]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC022010C]
[GPIO] at [0xFF063968] [0x0000001F] -> [0xC0221044]
[GPIO] at [0xFF063968] [0x00000046] -> [0xC0220110]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC0220114]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC0220118]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC022011C]
[GPIO] at [0xFF063968] [0x0000001F] -> [0xC0221048]
[GPIO] at [0xFF063968] [0x00000046] -> [0xC0220120]
[GPIO] at [0xFF063968] [0x00000046] -> [0xC0220124]
[RTC] CS reset at [0xFF063968]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC0220128]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC022012C]
[GPIO] at [0xFF063968] [0x0000001F] -> [0xC022104C]
[GPIO] at [0xFF063968] [0x00000046] -> [0xC0220130]
[GPIO] at [0xFF063968] [0x00000044] -> [0xC0220134]
[GPIO] HDMI CONNECT read at [0xFF063968]
[GPIO] at [0xFF063968] [0x00000020] -> [0xC022013C]
[GPIO] at [0xFF06398C] [0x00000025] -> [0xC0221300]
[???] [0x00000004] -> [0xC020302C] PC: 0xFF06398C
[GPIO] at [0xFF0639A0] [0x00000024] -> [0xC0221304]
[???] [0x00000004] -> [0xC0203030] PC: 0xFF0639A0
[GPIO] at [0xFF0639A0] [0x00000007] -> [0xC0221308]
[GPIO] at [0xFF0639A0] [0x0000004F] -> [0xC022130C]
[???] [0x00000004] -> [0xC0203038] PC: 0xFF0639A0
[GPIO] at [0xFF0639A0] [0x0000004E] -> [0xC0221310]
[GPIO] at [0xFF0639A0] [0x0000001E] -> [0xC0221314]
[GPIO] at [0xFF0639A0] [0x0000001C] -> [0xC0221318]
[???] [0x00000004] -> [0xC0203044] PC: 0xFF0639A0
[GPIO] at [0xFF0639A0] [0x00000041] -> [0xC022131C]
[Int] Write to Int space [0x43210DCB] -> [0xC0201100] PC: [0xFF0128D8]
[Int] Write to Int space [0xFEA98765] -> [0xC0201104] PC: [0xFF0128D8]
[Int] Write to Int space [0x00000001] -> [0xC0201200] PC: [0xFF0128D8]
[???] [0x00000000] -> [0xC0243110] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243214] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243214] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC024321C] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC024321C] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC0243120] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243224] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243224] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC024322C] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC024322C] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC0243130] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243234] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243234] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC024323C] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC024323C] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC0243140] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243244] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243244] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC024324C] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC024324C] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC0243150] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243254] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243254] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC024325C] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC024325C] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC0243160] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243264] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243264] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC024326C] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC024326C] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC0243170] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243274] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243274] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC024327C] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC024327C] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC0243180] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243284] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243284] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC024328C] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC024328C] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC0243190] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243294] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243294] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC024329C] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC024329C] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC02431A0] PC: 0xFF19F098
[???] [0x00000000] -> [0xC02432A4] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC02432A4] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC02432AC] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC02432AC] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC02431B0] PC: 0xFF19F098
[???] [0x00000000] -> [0xC02432B4] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC02432B4] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC02432BC] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC02432BC] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC02431C0] PC: 0xFF19F098
[???] [0x00000000] -> [0xC02432C4] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC02432C4] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC02432CC] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC02432CC] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC02431D0] PC: 0xFF19F098
[???] [0x00000000] -> [0xC02432D4] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC02432D4] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC02432DC] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC02432DC] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC02431E0] PC: 0xFF19F098
[???] [0x00000000] -> [0xC02432E4] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC02432E4] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC02432EC] PC: 0xFF19F0FC
[???] [0x00000000] <- [0xC02432EC] PC: 0xFF19F0FC
[???] [0x00000000] -> [0xC0202000] PC: 0xFF19F138
[???] [0x00000000] -> [0xC0242200] PC: 0xFF19F160
[???] [0x00000000] -> [0xC0242204] PC: 0xFF19F170
[???] [0x00000000] -> [0xC0202004] PC: 0xFF19F138
[???] [0x00000000] -> [0xC0242210] PC: 0xFF19F160
[???] [0x00000000] -> [0xC0242214] PC: 0xFF19F170
[???] [0x00000000] -> [0xC0202008] PC: 0xFF19F138
[???] [0x00000000] -> [0xC0242220] PC: 0xFF19F160
[???] [0x00000000] -> [0xC0242224] PC: 0xFF19F170
[???] [0x00000000] -> [0xC020200C] PC: 0xFF19F138
[???] [0x00000000] -> [0xC0242230] PC: 0xFF19F160
[???] [0x00000000] -> [0xC0242234] PC: 0xFF19F170
[???] [0x00000000] -> [0xC0202010] PC: 0xFF19F138
[???] [0x00000000] -> [0xC0242240] PC: 0xFF19F160
[???] [0x00000000] -> [0xC0242244] PC: 0xFF19F170
[???] [0x00000000] -> [0xC0202014] PC: 0xFF19F138
[???] [0x00000000] -> [0xC0242250] PC: 0xFF19F160
[???] [0x00000000] -> [0xC0242254] PC: 0xFF19F170
[???] [0x00000000] -> [0xC0202018] PC: 0xFF19F138
[???] [0x00000000] -> [0xC0242260] PC: 0xFF19F160
[???] [0x00000000] -> [0xC0242264] PC: 0xFF19F170
[???] [0x00000000] -> [0xC020201C] PC: 0xFF19F138
[???] [0x00000000] -> [0xC0242270] PC: 0xFF19F160
[???] [0x00000000] -> [0xC0242274] PC: 0xFF19F170
[???] [0x00000000] -> [0xC0243700] PC: 0xFF19F200
[???] [0x00000000] -> [0xC0243710] PC: 0xFF19F200
[???] [0x00000001] -> [0xC024311C] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC024312C] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC024313C] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC024314C] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC024315C] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC024316C] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC024317C] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC024318C] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC024319C] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC02431AC] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC02431BC] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC02431CC] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC02431DC] PC: 0xFF19F1A4
[???] [0x00000001] -> [0xC02431EC] PC: 0xFF19F1A4
[???] [0x00000000] -> [0xC0243800] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243804] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243808] PC: 0xFF19F214
[???] [0x00000000] -> [0xC024380C] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243810] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243814] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243818] PC: 0xFF19F214
[???] [0x00000000] -> [0xC024381C] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243820] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243824] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243828] PC: 0xFF19F214
[???] [0x00000000] -> [0xC024382C] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243830] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243834] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243838] PC: 0xFF19F214
[???] [0x00000000] -> [0xC024383C] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243840] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243844] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243848] PC: 0xFF19F214
[???] [0x00000000] -> [0xC024384C] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243850] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243854] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243858] PC: 0xFF19F214
[???] [0x00000000] -> [0xC024385C] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243860] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243864] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243868] PC: 0xFF19F214
[???] [0x00000000] -> [0xC024386C] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243870] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243874] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243878] PC: 0xFF19F214
[???] [0x00000000] -> [0xC024387C] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243880] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243884] PC: 0xFF19F214
[???] [0x00000000] -> [0xC0243888] PC: 0xFF19F214
[???] [0x00000000] -> [0xC024388C] PC: 0xFF19F214
[Int] Enabled interrupt ID 0x1A PC: [0xFF012908]
[Int] Enabled interrupt ID 0x1B PC: [0xFF012908]
[Int] Enabled interrupt ID 0x1C PC: [0xFF012908]
[Int] Enabled interrupt ID 0x1D PC: [0xFF012908]
[Int] Enabled interrupt ID 0x1E PC: [0xFF012908]
[Int] Enabled interrupt ID 0x1F PC: [0xFF012908]
[Int] Enabled interrupt ID 0x10 PC: [0xFF012908]
[Int] Enabled interrupt ID 0x20 PC: [0xFF012908]
[Int] Enabled interrupt ID 0x21 PC: [0xFF012908]
[Int] Enabled interrupt ID 0x22 PC: [0xFF012908]
[Int] Enabled interrupt ID 0x23 PC: [0xFF012908]
[Int] Enabled interrupt ID 0x24 PC: [0xFF012908]
[Int] Enabled interrupt ID 0x25 PC: [0xFF012908]
[Int] Enabled interrupt ID 0x26 PC: [0xFF012908]
[Int] Enabled interrupt ID 0x27 PC: [0xFF012908]
[???] [0x00000000] -> [0xC0243160] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243264] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243264] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC0243170] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243274] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243274] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC0243180] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243284] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243284] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC0243190] PC: 0xFF19F098
[???] [0x00000000] -> [0xC0243294] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC0243294] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC02431A0] PC: 0xFF19F098
[???] [0x00000000] -> [0xC02432A4] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC02432A4] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC02431B0] PC: 0xFF19F098
[???] [0x00000000] -> [0xC02432B4] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC02432B4] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC02431C0] PC: 0xFF19F098
[???] [0x00000000] -> [0xC02432C4] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC02432C4] PC: 0xFF19F0E8
[???] [0x00000000] -> [0xC02431D0] PC: 0xFF19F098
[???] [0x00000000] -> [0xC02432D4] PC: 0xFF19F0E8
[???] [0x00000000] <- [0xC02432D4] PC: 0xFF19F0E8
[???] [0x40000401] -> [0xC0242010] PC: 0xFF19F000
[Basic] at [0xFF06DAB8] [0x00000000] <- [0xC0400008]
[Basic] at [0xFF06DAB8] [0x00200000] -> [0xC0400008]
[Basic] at [0xFF06E18C] [0x00000000] <- [0xC0400008]
[Basic] at [0xFF06E18C] [0x01000000] -> [0xC0400008]
[DMA1] [0x00000001] -> [0xC0A10000]
[DMA2] [0x00000001] -> [0xC0A20000]
[DMA3] [0x00000001] -> [0xC0A30000]
[DMA4] [0x00000001] -> [0xC0A40000]
[DebugMsg] (0,1) [PM] DisablePowerSave (Counter = 1)
[DebugMsg] (139,22)
K252 ICU Firmware Version 1.1.1 ( 3.6.4 )
[DebugMsg] (139,5)
ICU Release DateTime 2011.03.04 10:18:15
[DebugMsg] (0,3) [SEQ] CreateSequencer (Startup, Num = 6)
[DebugMsg] (0,2) [SEQ] NotifyComplete (Startup, Flag = 0x10000)
[DebugMsg] (0,3) [SEQ] NotifyComplete (Cur = 0, 0x10000, Flag = 0x10000)
[DebugMsg] (50,3) Magic Lantern Nightly.2019May28.500D111 (a8a501d5773e+ (qemu))
[DebugMsg] (50,3) Built on 2019-05-28 13:05:28 UTC by ml@ml-pc
BMP buffer (LCD): raw=40302f6c hdmi=40303008 lcd=4030a100 real=4030a100 idle=4038a100

Open Console K252[1]>...

K252[1]>[DebugMsg] (0,5) [SEQ] seqEventDispatch (Startup, 0)
[GPIO] at [0xFF013774] [0x00000012] -> [0xC0222004]
[DebugMsg] (139,5) startupEntry
[GPIO] at [0xFF013580] [0x00000012] -> [0xC0222000]
[DMA1] [0x00000000] -> [0xC0A10004]
[DMA1] [0x00000000] -> [0xC0A10010]
[DMA1] [0xF8A00000] -> [0xC0A10018]
[DMA1] [0x40405B00] -> [0xC0A1001C]
[DMA1] [0x00196794] -> [0xC0A10020]
[DMA1] [0x00000007] -> [0xC0A10014]
[Int] Enabled interrupt ID 0x2F PC: [0xFF012908]
[DMA1] Copy [0xF8A00000] -> [0x40405B00], length [0x00196794], flags [0x00030001]
[DMA1] OK
[EOS] trigger int 0x2F
[Int] Requested int reason [0x000000BC] <- [0xC0201004] PC: [0x00000500]
[DMA1] [0x00000000] -> [0xC0A10010]
[DebugMsg] (2,6) SearchFromProperty DataType = 0x00000000(L:1581)
ASSERT : Startup\Startup.c, Task = Startup, Line 334
[DebugMsg] (139,6) ASSERT : Startup\Startup.c, Task = Startup
[DebugMsg] (139,6) ASSERT : Line 334
[DebugMsg] (139,6) ASSERT : err == SUCCESS
*** _prop_request_change(80030002)
[DebugMsg] (139,5) startupPropAdminMain : End
[DebugMsg] (0,2) [SEQ] NotifyComplete (Startup, Flag = 0x20000000)
[DebugMsg] (0,3) [SEQ] NotifyComplete (Cur = 1, 0x20000002, Flag = 0x20000000)
[GPIO] at [0xFF013640] [0x00000010] -> [0xC0222000]
[DMA1] [0x00000000] -> [0xC0A10004]
[DMA1] [0x00000000] -> [0xC0A10010]
[DMA1] [0xF8910000] -> [0xC0A10018]
[DMA1] [0x406C5D00] -> [0xC0A1001C]
[DMA1] [0x000323DC] -> [0xC0A10020]
[DMA1] [0x00000007] -> [0xC0A10014]
[DMA1] Copy [0xF8910000] -> [0x406C5D00], length [0x000323DC], flags [0x00030001]
[DMA1] OK
[EOS] trigger int 0x2F
[Int] Requested int reason [0x000000BC] <- [0xC0201004] PC: [0x00000500]
[DMA1] [0x00000000] -> [0xC0A10010]
[DMA1] [0x00000000] -> [0xC0A10004]
[DMA1] [0x00000000] -> [0xC0A10010]
[DMA1] [0xF88F7000] -> [0xC0A10018]
[DMA1] [0x40705F00] -> [0xC0A1001C]
[DMA1] [0x00000864] -> [0xC0A10020]
[DMA1] [0x00000007] -> [0xC0A10014]
[DMA1] Copy [0xF88F7000] -> [0x40705F00], length [0x00000864], flags [0x00030001]
[DMA1] OK
[EOS] trigger int 0x2F
[Int] Requested int reason [0x000000BC] <- [0xC0201004] PC: [0x00000500]
[DMA1] [0x00000000] -> [0xC0A10010]
[DMA1] [0x00000000] -> [0xC0A10004]
[DMA1] [0x00000000] -> [0xC0A10010]
[DMA1] [0xF89B0000] -> [0xC0A10018]
[DMA1] [0x40707100] -> [0xC0A1001C]
[DMA1] [0x0000F3BC] -> [0xC0A10020]
[DMA1] [0x00000007] -> [0xC0A10014]
[DMA1] Copy [0xF89B0000] -> [0x40707100], length [0x0000F3BC], flags [0x00030001]
[DMA1] OK
[EOS] trigger int 0x2F
[Int] Requested int reason [0x000000BC] <- [0xC0201004] PC: [0x00000500]
[DMA1] [0x00000000] -> [0xC0A10010]
[DMA1] [0x00000000] -> [0xC0A10004]
[DMA1] [0x00000000] -> [0xC0A10010]
[DMA1] [0xF8EB0000] -> [0xC0A10018]
[DMA1] [0x40727200] -> [0xC0A1001C]
[DMA1] [0x00008DDC] -> [0xC0A10020]
[DMA1] [0x00000007] -> [0xC0A10014]
[DMA1] Copy [0xF8EB0000] -> [0x40727200], length [0x00008DDC], flags [0x00030001]
[DMA1] OK
[EOS] trigger int 0x2F
[Int] Requested int reason [0x000000BC] <- [0xC0201004] PC: [0x00000500]
[DMA1] [0x00000000] -> [0xC0A10010]
[Basic] at [0xFF18A804] [0x00000000] <- [0xC0400008]
[Basic] at [0xFF18A804] [0x00200000] -> [0xC0400008]
[???] [0x0000000C] -> [0xC020302C] PC: 0xFF18A804
[Int] Enabled interrupt ID 0x50 PC: [0xFF012908]
[Int] Enabled interrupt ID 0x36 PC: [0xFF012908]
[DebugMsg] (0,1) [PM] DisablePowerSave (Counter = 2)
[DebugMsg] (0,1) [PM] EnablePowerSave (Counter = 1)
[GPIO] at [0xFF18A904] [0x00000001] <- [0xC022009C]
[GPIO] at [0xFF18A904] [0x00000001] -> [0xC022009C]
[GPIO] VIDEO CONNECT read at [0xFF01DFE4]
[???] [0x0000001C] -> [0xC0203044] PC: 0xFF01E000
[GPIO] USB CONNECT read at [0xFF01E000]
[???] [0x00000018] -> [0xC020301C] PC: 0xFF01E000
[Int] Enabled interrupt ID 0x56 PC: [0xFF012908]
[Int] Enabled interrupt ID 0x44 PC: [0xFF012908]
[Int] Enabled interrupt ID 0x54 PC: [0xFF012908]
[DebugMsg] (138,3) CreateTask Master End
*** prop_register_slave(12fae0)
[GPIO] VIDEO CONNECT read at [0xFF01DCCC]
[GPIO] USB CONNECT read at [0xFF01DD78]
[GPIO] HDMI CONNECT read at [0xFF01DDD8]
[GPIO] VIDEO CONNECT read at [0xFF01DCE0]
[GPIO] USB CONNECT read at [0xFF01DCF0]
[GPIO] HDMI CONNECT read at [0xFF01DCF0]
[GPIO] VIDEO CONNECT read at [0xFF01DE58]
[GPIO] USB CONNECT read at [0xFF01DE58]
[GPIO] HDMI CONNECT read at [0xFF01DE58]
[GPIO] VIDEO CONNECT read at [0xFF01DE58]
[GPIO] USB CONNECT read at [0xFF01DE58]
[GPIO] HDMI CONNECT read at [0xFF01DE58]
[GPIO] VIDEO CONNECT read at [0xFF01DE58]

Any clues to what is wrong ?

Embedded SW engineer. Current Cameras: Canon 20d, Canon 40d

heder

  • New to the forum
  • *
  • Posts: 28
Re: How to run Magic Lantern into QEMU?!...
« Reply #415 on: May 30, 2019, 12:12:14 AM »
Hi.

I'm trying to get QEMU running with my 500D rom on Ubuntu 14.04 but I get only white noise ...
...
Any clues to what is wrong ?

 :o

I found the issue myself tonight, I was using the old qemu system. After "make 500D.111 install_qemu" it's working.
Embedded SW engineer. Current Cameras: Canon 20d, Canon 40d

Jip-Hop

  • Freshman
  • **
  • Posts: 87
Re: How to run Magic Lantern into QEMU?!...
« Reply #416 on: July 09, 2019, 11:30:58 AM »
Installed Mojave, downloaded the zip archive of the QEMU branch (from here) with Safari (i.e. without first installing hg & co), ran the install script (cd contrib/qemu; ./install.sh) and... worked out of the box! It installed brew and other dependencies, compiled gdb 8.2.1 from source et voilĂ ! QEMU and ML development environment installed and ready to use!

I'm following these instructions to get QEMU working with EOSM, but I'm stuck.
If I run ./run_canon_fw.sh EOSM,firmware=boot=1 I get this message:
Could not open ./EOSM/SFDATA.BIN

So I need to get my hands on a compiled version of the sf_dump module.
But when I run make in this folder:
/magic-lantern/modules/sf_dump

I get this output:

abort: no repository found in '/magic-lantern/modules/sf_dump' (.hg not found)!

(<type 'exceptions.SystemExit'>, SystemExit(1,), <traceback object at 0x10dca43f8>)
[ CC       ]   sf_dump.o
In file included from sf_dump.c:3:0:
../../src/module.h:344:10: fatal error: module_strings.h: No such file or directory
 #include "module_strings.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [sf_dump.o] Error 1

Where can I find a compiled version of this module?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12290
  • Emergencies only
Re: How to run Magic Lantern into QEMU?!...
« Reply #417 on: July 09, 2019, 01:47:54 PM »
The portable ROM dumper should do the trick (I should update the docs).

The error means you should clone the repository (with hg clone), rather than just downloading the sources. Reason: the compiled modules (i.e. *.mo files) also include some version info, and any source code changes since last commit.

Jip-Hop

  • Freshman
  • **
  • Posts: 87
Re: How to run Magic Lantern into QEMU?!...
« Reply #418 on: July 09, 2019, 06:11:05 PM »
Thanks a1ex! Used portable rom dumper, got the SFDATA.BIN file now.
What should I do next to get GDB working?

Code: [Select]
./run_canon_fw.sh EOSM,firmware="boot=0" -s -S & arm-none-eabi-gdb -x EOSM/patches.gdb -ex quit
[1] 1311
-bash: arm-none-eabi-gdb: command not found

QEMU starts but all I see is a grey screen.
This is the terminal output:

Code: [Select]
./run_canon_fw.sh EOSM,firmware=boot=0 -s -S &

DebugMsg=0x40D4 (from GDB script)
Lockdown read 4
Lockdown read 4
Lockdown read 5
Lockdown read 5
Lockdown read 0
Lockdown read 0
Lockdown read 1
Lockdown read 1
Lockdown read 2
Lockdown read 2
Lockdown read 3
Lockdown read 3
00000000 - 00000FFF: eos.tcm_code
40000000 - 40000FFF: eos.tcm_data
00001000 - 0FFFFFFF: eos.ram
40001000 - 4FFFFFFF: eos.ram_uncached
F8000000 - F8FFFFFF: eos.rom1
F9000000 - F9FFFFFF: eos.rom1_mirror
FA000000 - FAFFFFFF: eos.rom1_mirror
FB000000 - FBFFFFFF: eos.rom1_mirror
FC000000 - FCFFFFFF: eos.rom1_mirror
FD000000 - FDFFFFFF: eos.rom1_mirror
FE000000 - FEFFFFFF: eos.rom1_mirror
FF000000 - FFFFFFFF: eos.rom1_mirror
C0000000 - DFFFFFFF: eos.mmio
[EOS] loading './EOSM/ROM1.BIN' to 0xF8000000-0xF8FFFFFF
[EOS] loading './EOSM/SFDATA.BIN' as serial flash, size=0x800000
[MPU] warning: non-empty spell #30 (PROP 80030019) has duplicate(s): #34
[MPU] warning: non-empty spell #40 (PROP_VIDEO_MODE) has duplicate(s): #41

[MPU] Available keys:
- Arrow keys   : Navigation
- [ and ]      : Main dial (top scrollwheel)
- SPACE        : SET
- DELETE       : guess (press only)
- M            : MENU (press only)
- P            : PLAY (press only)
- I            : INFO/DISP (press only)
- Q            : guess
- L            : LiveView (press only)
- Z/X          : Zoom in/out
- Shift        : Half-shutter
- 0/9          : Mode dial (press only)
- V            : Movie mode (press only)
- B            : Open battery door
- C            : Open card door
- F10          : Power down switch
- F1           : show this help

Setting BOOTDISK flag to 0

Seems like GDB didn't install at all:
Code: [Select]
-bash: gdb: command not found

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12290
  • Emergencies only
Re: How to run Magic Lantern into QEMU?!...
« Reply #419 on: July 09, 2019, 06:21:30 PM »
If the installer asked you to type some PATH commands during installation, and you closed the terminal since then, you will have to type them again. The installation doesn't start unless you have a valid arm-none-eabi-gdb installed.

Normally, these paths should be added to your Bash profile, but I didn't want to mess with user's config files.

TODO: add this to the install script.

Jip-Hop

  • Freshman
  • **
  • Posts: 87
Re: How to run Magic Lantern into QEMU?!...
« Reply #420 on: July 09, 2019, 08:54:30 PM »
Aah yes that was it!

If I try to run Canon firmware, following this guide, I still get a mostly grey screen. It also has a grey circle on the bottom right now and some black lines on the top left.

Code: [Select]
./run_canon_fw.sh EOSM,firmware="boot=0" -s -S & arm-none-eabi-gdb -x EOSM/patches.gdb -ex quit
Here's the log.

Trying to run ML with boot=1 I get a message to remove the battery.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12290
  • Emergencies only
Re: How to run Magic Lantern into QEMU?!...
« Reply #421 on: July 10, 2019, 03:51:11 PM »
Sounds about right - press M to open Canon menu. LiveView emulation is quite tricky and has plenty of bugs.

To run ML with boot=1, you will have to run "make install_qemu" from platform/EOSM.202 first. Then, to open ML menu, I need to press "L" a few times, as a workaround (not exactly deterministic, sometimes works, sometimes doesn't). Things are better on cameras that don't start in LiveView by default.

Jip-Hop

  • Freshman
  • **
  • Posts: 87
Re: How to run Magic Lantern into QEMU?!...
« Reply #422 on: July 10, 2019, 05:28:16 PM »
Thanks, I'll try it next time. For now I think I'll stick to testing my Lua scripts on my EOS M. That's probably the quickest.

heder

  • New to the forum
  • *
  • Posts: 28
Re: How to run Magic Lantern into QEMU?!...
« Reply #423 on: August 02, 2019, 08:50:08 PM »
Help  :(

I'v got a strange problem using qemu from qemu branch (freshly compiled without problems).

My system is ubuntu studio 18.02, using vnc from win10 to the ubuntu studio server (not qemu itself)

My qemu keys are not the correct onces, for instance instead of menu "M" I need to use "U"
and all other keys are mapped to other keys. My problem is that I can't locate the arrow keys.

Anyone experience this problem before ?


Embedded SW engineer. Current Cameras: Canon 20d, Canon 40d

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12290
  • Emergencies only
Re: How to run Magic Lantern into QEMU?!...
« Reply #424 on: August 02, 2019, 09:22:52 PM »
That's an interesting bug, but didn't encounter it yet. I couldn't reproduce it on a Bionic 18.04 VM with Mate interface, also accessed via VNC, but from an openSUSE desktop.

Workaround: the button codes are hardcoded in mpu.c, so you can change them as needed. Would be nice to reproduce the issue and fix it properly, though.