10 year bump
I spent some time improving A1100 support in
@names_are_hard's excellent qemu fork, and figured I should put some notes somewhere. Over a few posts, I'll try to cover how to build / use it, CHDK / PowerShot specifics, and lessons learned adding camera support.
SetupThe code is in
https://github.com/reticulatedpines/qemu-eos/tree/qemu-eos-v4.2.1 (you want the qemu-eos-v4.2.1 branch. This includes my A1100 fixes)
The configuration below is just what works for me, it's not the only or necessarily best way to set things up.
I found following the build instructions on
https://github.com/reticulatedpines/qemu-eos/tree/qemu-eos-v4.2.1/magiclantern worked out of the box on a Debian 11 x64 VM in virtualbox. It is a quite old qemu version and does have some compiler and distro sensitivities, so other distros may be less smooth. I'd stay away from trying to build it natively on Windows or Mac (though I haven't actually tried Mac)
If you do run into problems building, I suggest leaving off the -j option, as non-parallel output is much easier to follow.
Performance running in virtualbox on an ancient i5 windows system is fine, though it can get sluggish with gdb scripts.
For powershots, you don't need the magiclantern_simplified tree mentioned in the instructions. You also don't need the libmagiclantern.so plugin, though it's tiny and harmless (it allows printing camera debug messages without gdb, but the function signature is different from powershot LogCameraEvent)
I use a virtualbox file share for the source so I can work on the code outside of the VM, so in my configuration qemu-eos is a symlink into the mounted tree of my CHDK stuff. The qemu-eos-build directory is on the VM filesystem.
qemu also expects the firmware to have different names and directory structure from typical CHDK usage, so I use a separate tree with symlinks for that.
My tree (under $HOME in this case) ends up looking like
qemu/
qemu-eos -> /mnt/chdk/qemu-eos
... clone of git repo
qemu-eos-build/
... binaries and disk images are under here
roms/
A1100/
ROM1.BIN -> /mnt/chdk/dumps/a1100/sub/100c/PRIMARY.BIN
Note qemu-eos does support setting the firmware version, but it expects the version to be a plain number (rather than powershot style number + letter), and the actual qemu implementation may have firmware version specific code (patching addresses in ROM, for example,) though A1100 currently does not.
In the case of A1100, the only known firmware versions are 100b and 100c, and 100b is a copied sub in CHDK, so should presumably be identical from a qemu POV.
My usual build command looks like
( cd ~/qemu/qemu-eos-build && make && make plugins && cp tests/plugin/libmagiclantern.so arm-softmmu/plugins/ )
I keep long commands like this in my notes and paste or run from history as needed, hence the subshell and cds.
... to be continued