QuoteHow do I use and dereference pointers in Canon Basic?We don't know all details of this language. I'd probably use the peek event procedures that are registered by System.Create: Peek8, Peek16, Peek32 - for addresses, you obviously need Peek32.
How do I use and dereference pointers in Canon Basic?
The function I'd call LEDtable_init is sub_fc075dc4. The suspicious values there are 0x21 and 4.
I'm assuming you do follow reyalp's work on the D6 sigfinder - it's progressing pretty well.
'Based on the Dumper Scriptstartaddr = 0x9BACstartptr = *startaddrromsize = 504sprintf(msgstr,"Adr %0X",startaddr)PutMsg(msgstr)sprintf(msgstr,"Ptr %0X",startptr)PutMsg(msgstr) dumpfile = Fopen_Fut("A/PRIMARY.BIN","w")Fwrite_Fut(startaddr,romsize,1,dumpfile)Fclose_Fut(dumpfile)
led1addr = 0xd20b0884 led2addr = 0xd20b0810 Poke32(led2addr, 0x4d0002) 'It is ON now!! *led2addr = 0x4d0002 'Works, too! Poke32(led1addr, 0x4c0003) 'It is OFF now!!
0xd20b0884 'Status light - Back facing green LED0xd20b0810 'Focus helper - Front facing white LED
> Anyone still working on this camera?I bought a G3X last year and I've spent some work on porting to my G3X this (extended) weekend, I've now got it booting (in playback mode only) and showing the initial CHDK messages, but none of the hooks are implemented yet (except for the InitFileModules hook).
Welcome, and nice work G3X should be a relatively straightforward Digic 6 port at this point, I think. Other DryOS 57 ports are SX710 and M10. Ghidra version tracking can be quite helpful https://chdk.fandom.com/wiki/Ghidra_Version_Tracking_workflow_for_porting
It's also really helpful that that are a number of Digic-6 cams in the tree already, I've started with the G5X port for reference since I guess it will be the best fit, but looking at M10 and G16 ports has been helpful as well.
' clean rec mode palette' G3X, 110eDIM palette_buffer_ptr = 0x15dbcDIM palette_to_zero = 0DIM msg = 0public sub check_compat() check_compat = 0 if strcmp("EC385\n\r",0xfc000584) = 0 then exit sub end if if strcmp("GM1.10E",0xfc54e0b5) = 0 then check_compat = 1 exit sub end ifend subprivate sub palette_mod() adr = *palette_buffer_ptr adr = adr + (palette_to_zero * 4) if *adr <> 0 then adr = *adr + 4 memset(adr, 0, 256 * 4) end ifend subprivate sub setup() System.Create() UI.CreatePublic() msg=LCDMsg_Create() LCDMsg_Move(msg,10,200) LCDMsg_ChangeColor(msg, 2) ' Green Wait(10) ' Necessary for message to show up properly LCDMsg_SetStr(msg,"Script running")end subprivate sub Initialize() setup() ret = check_compat() if ret=0 then Wait(100) LCDMsg_SetStr(msg,"Not compatible!") end if if ret=1 then Wait(100) palette_mod() LCDMsg_SetStr(msg,"Overlay disabled!") end if Wait(500) ' Keep last message visible for 0.5send sub
So I'm still having issues with the live view crashing in particular in 1080p mode over HDMI, maybe because CHDK is taking up too much memory or is causing some subtle timing issue somewhere. It works for a while, but usually crashes within a minute or so.
You're not providing a lot of details (firmware dump, source, romlog), so I'm just having a guess. Newer models have the overlay buffers located at the end of physical RAM. If you happen to draw outside them, there's a chance you'll overwrite the start of RAM (camera has 512MB of RAM, it's mirrored above 0x20000000 and 0x60000000).
I also noticed that you're working on the 110e firmware which is not the latest. The latest official firmware is the recently released 120a (1.2.0). I'd suggest working on that to avoid having to maintain multiple ports.
Started by yukia10 Firmware Dumping
Started by alvm Firmware Dumping
Started by alvm « 1 2 3 » Firmware Dumping
Started by blueSTAR Firmware Dumping