Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - petabyte

#26
You could do it by creating a custom PTP command that reports keypresses. You could do it in a module, like I did recently: https://github.com/petabyt/ptpview/blob/master/ptpview.c
For receiving the data, you could use Python ptpy and https://github.com/fujihack/fujihack/blob/master/ptp/hijack.py to run custom opcodes.
#27
Modules Development / Re: ML Tetris (mltetris.mo)
December 28, 2022, 11:55:46 PM
I've abandoned the archived tetris module (https://github.com/petabyt/mltetris) but the last one I've worked on is https://github.com/petabyt/magiclantern_simplified/tree/tetris/modules/tetris (complete rewrite)
It's been a while since I've touched the two, but the more recent one is much better at rendering, but has slight game logic issues. Can't remember exactly what.
#28
Modules Development / Re: ML Tetris (mltetris.mo)
December 28, 2022, 04:55:13 AM
QuoteI think the speed should start off slower and increase over time
Good idea! I'll implement this when I have the time.

Currently I haven't touched the tetris code since August, so I'll have to find the time to re-read the source code and fix a few things.
Eventually, it should end up in the magiclantern_simplified repository or other forks as it has a compatible license.
#29
Quote from: Skinny on December 19, 2022, 11:05:08 AM
I think an option to turn the display 90 and 180 degrees as well as mirroring it could be useful in some situations.. What about RAW recording while using your app?
PTP while recording MOV/MLV is possible. I've hardly tested my custom liveview module (for liveview while recording) but it works while recording both formats. Unstable currently, but works.
#30
Update:
I've made a lot of progress - bulb works, focus works, mirror flipping works, live get/set ISO/aperture/shutter speed/image format is almost done, and liveview works (on Linux and Android)
Now I need to make the HTML/CSS/JS user interface a little better. This is what I'm currently working on:
https://eggnog.theres.life/f/63-sacuojn5xehdxje3rmoz321iachj5c.png
https://eggnog.theres.life/f/64-mkgly30jykmfbj14yh6wq3fah4qi7t.png
Currently I've been testing it mostly in portrait mode, but I think users will be in landscape mode the most (with a phone mounted to the flash mount).
Having both won't be impossible, but it might require a lot of planning and CSS magic (and likely some JS stuff too) to make everything fit properly and not overlap.

So I'm asking a bunch of camera nerds, what UI layout would be optimal? Would you ever use portrait mode? What should I tweak in my current design?
#31
Release 0.9.3
Now recommend win32 libusb filter installer over Zadig
https://github.com/petabyt/mlinstall/releases/tag/0.9.3

I spent a while working on a Windows driver for PTP, and finished it, but it's pretty much useless. I wrote it
with Wia (Windows image acquisition), and the win32 API seems to build a tree of all files on the SD card
when the device is opened, which takes around 5 minutes if your card if filled up. Other than that it works perfectly.
#32
Quote from: Whr on December 02, 2022, 11:36:53 AM
Maybe there's some other way to achieve the GPS function. It just works as a GPS logger, recording phone location every minute(or at a specific time). When users use their phone to output photos from the camera, the app will automatically write the location to EXIF. At the same time, the software can export the location information for a time period as a separate file and the user can write the photo location information in batches on the computer using ExifTool.
I can say this: whatever the EOS apps can do, I can do.
#33
Bulb mode is easy to implement, at least for Canon. Trying to design everything so a Nikon/Sony/Fuji extension would be as easy as possible.
#34
Time sync is possible I think. GPS - I don't know. Would be vendor specific I guess.
Still working on this consistently - just a time consuming and difficult project.
#35
Modules Development / Re: ML Tetris (mltetris.mo)
November 25, 2022, 07:16:30 PM
Quote from: dpjpandone on November 25, 2022, 05:21:17 PM
Is it because EOSM has "Q" "Set" combined? so game does not start?
Maybe? I don't know, I've never used an EOS M and I'm not familiar with the button macros.
Are you compiling https://github.com/petabyt/magiclantern_simplified/tree/tetris/modules/tetris or https://github.com/petabyt/mltetris?
Wouldn't make sense if none of the buttons work, I assume it must be some kind of major bug. Maybe try in Qemu?
#36
You can disable it with EvProcs over USB: https://www.magiclantern.fm/forum/index.php?topic=20507.msg240093#msg240093
mlinstall supports calling EvProcs with parameters. I think chdkptp can do it too.
Edit: Nevermind - I think service mode disables PTP. You might be able to install ML on it and run the EvProc from Lua.
#37
Modules Development / Re: ML Tetris (mltetris.mo)
November 19, 2022, 03:13:37 AM
Should work if you compile it yourself. MODULE_KEY_PRESS macros might be different.
#38
You couldn't get the source code. You might be able to throw it in Ghidra and use that to help you rewrite the code.
#39
Welcome, I recognize you from Github
#40
Quick google search shows it's a completely new IP based protocol created by Canon, for their very high end cameras.
Has nothing to do with PTP, so this app will never support it. Even if I could support it, I'm nowhere near getting my hands on a $2000 cinema camera.
#41
Quote from: koljanych on November 12, 2022, 10:11:18 PM
what do you think about Canon XC Protocol ?
Never heard of it
#42
Updates:
- Implemented screen liveview https://www.youtube.com/watch?v=daW97UECLEo
Very slow, ~5fps transferring 259k per frame, should eventually be improved to ~30fps (?)
- MOV recording is possible while transmitting screen data - haven't tested RAW yet
- Base code for the app is implemented - stable data transmission, connecting/disconnecting, working backend (hardest part finished)
- It's written mostly in C99, which communicates with some Java code via JNI. The frontend will be written in JS/HTML/CSS (WebView), which will be transparent over the graphical canvas element.
- The app will allow custom JS scripts to be run/loaded to provide extra functionality - this is where ML interconnectivity can be implemented.
- The app will be sold on Google Play.
- While I'm working on the Android/Java backend, I'm also working on a LibUSB backend (WinUSB soon, hopefully) and implementing a browser based version.
Eventually, a WiFi connected raspberry pi could be plugged into the camera, which would host a control panel that could be accessed by any device on the same network.

TODO List:
- Design modern user interface, find icons
- Implement ~10 PTP opcodes
- Implement ~30 canon/eos opcodes
- Implement parsing/packing of object structures + into/from JSON
- Ensure LibUSB backend is reliable/stable
- Design a PTP API for Javascript
- Implement PTP/IP support - I think it's less complicated than USB, but painfully unreliable
- Sort out JPEG decoding/encoding
- Decide on a good name... currently "CamControl"
#43
Finally managed to get EOS Utility working with my camera. Turns out LibUSB wasn't permanently installed, but I had managed to uninstall the Windows MTP driver.
In order to restore this driver, head to C:\Windows\INF\ and right click on the wptmtp.inf, and Cick Install. That, along with uninstalling the LibUSB connection in device manager, should restore everything.

Zadig still seems very janky, slow, and destructive, so I now recommend using the libusb win32 filter installer: https://github.com/mcuee/libusb-win32/releases/download/snapshot_1.2.7.3/libusb-win32-bin-1.2.7.3.zip
The nice thing about it is that you don't need to remove it, I've been able to run EOS Utility and mlinstall at the same time. Not sure if it's stable, but it can work. Probably still a good idea to remove the filter when you're done.
#44
User Introduction / Re: Greeting
November 06, 2022, 03:21:56 AM
Welcome. Progress on this project is slow but steady.
#45
Modules Development / Re: ML Tetris (mltetris.mo)
November 02, 2022, 11:25:43 PM
Update:
Will eventually be merged into magiclantern_simplified. https://github.com/petabyt/magiclantern_simplified/tree/tetris
Some notes:
- menu_redraw_blocked is set to 1 to prevent flickering as menu is being drawn.
- task_create is called to keep the ML menus in place after the game is quit.
- Code is based on my project, ptetris (https://github.com/petabyt/ptetris/), which can be compiled and run with X11/rawdraw
#46
Working on porting ML to 1300D/T6 firmware version 1.2.0.
https://github.com/petabyt/magiclantern_simplified/commits/1300d

Currently it boots into menus, and passes stubs API test. I'll test it more over the next few weeks.

The plan is to move the codebase to https://github.com/reticulatedpines/magiclantern_simplified,
which is more modern and has some build system fixes.
#47
Quote from: Niichad on September 28, 2022, 12:25:37 PM
I am having an issue installing the ml software. Forgot to downgrade my firmware from 1.2.0 and cant seem to get any downgrade options to work. Still connects fine to my pc and is still recognizable, but EOS utility doesnt work which i kinda expected.
There is an issue upstream with Zadig, which makes the driver near impossible to uninstall. I'm very slowly working on a solution.
You can use the battery door method to downgrade the firmware, see https://www.magiclantern.fm/forum/index.php?topic=24926.0
Eventually mlinstall itself will have a feature that makes it possible to downgrade the firmware over USB.
#48
Currently figuring out how make it so that mlinstall will work on Windows without Zadig. (Where it's a pain to uninstall libusb)

Option 1:
Use win32-libusb filter installer: https://github.com/mcuee/libusb-win32/releases/download/snapshot_1.2.7.3/libusb-win32-devel-filter-1.2.7.3.exe
Without an installer: https://github.com/mcuee/libusb-win32/releases/download/snapshot_1.2.7.3/libusb-win32-bin-1.2.7.3.zip

Option 2:
Use the native Windows API directly.
- This adds WinUSB support to a libusb-like interface, https://github.com/avrdudes/libusb
- I tried to get WinUSB to connect to my camera, but it wouldn't accept it.
- It might be possible to fork libusb-win32 and patch it to work on a specific GUID (GUID_DEVCLASS_IMAGE)
#49
I'm also very slowly working on LibUSB and WinUSB backends for this lib, so chances are it might find it's way into https://github.com/petabyt/mlinstall/ someday
#50
That would be pretty easy, would just have to copy the device name and serial number.