Canon Powershot N2 CHDK - DryOS Development - CHDK Forum  

Canon Powershot N2 CHDK

  • 12 Replies
  • 3724 Views
Canon Powershot N2 CHDK
« on: 23 / May / 2016, 05:50:17 »
Advertisements
Does anyone know how to get CHDK working on the Canon Powershot N2?

*

Offline reyalp

  • ******
  • 13456
Re: Canon Powershot N2 CHDK
« Reply #1 on: 23 / May / 2016, 13:45:59 »
Does anyone know how to get CHDK working on the Canon Powershot N2?
There is currently no port for the N2, see this FAQ about unported cameras.

The N2 is a digic 6 camera, so a port would take more effort than earlier cameras. We don't currently have a firmware dump for this camera. If you can get one, that would be helpful, see http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Dumper

Getting a dump doesn't mean someone will make a port, but it will help our efforts to support digic 6. If you are developer with decent C and assembler skills and want to have a go yourself, we're happy to give advice.

Don't forget what the H stands for.

*

Offline Caefix

  • *****
  • 652
  • Sorry, busy deleting test shots...
Re: Canon Powershot N2 CHDK
« Reply #2 on: 01 / October / 2021, 15:03:11 »
Does anyone know how to get CHDK working on the Canon Powershot N2?
There is currently no port for the N2, see this FAQ about unported cameras.
Quote
;) and assembler skills and want to have a go yourself, we're happy to give advice.

30 days, ==> https://ufile.io/g46xqxrd Primary.bin,  ::) 100c...
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 652
  • Sorry, busy deleting test shots...
Re: Canon Powershot N2 CHDK
« Reply #3 on: 02 / October / 2021, 15:05:50 »
First crash :D with
Code: [Select]
private sub Initialize()
    System.Create()
    CamInfo_Debug(1)
end sub

then first Romlog with https://chdk.fandom.com/wiki/Canon_Basic/Scripts/Romlog

==> Green PutMsg("done")
Written in GETLOG.LOG: Getting log done
Quote
ASSERT!! EvntProc.c Line 222

Scripts seem to start fine when the LED keeps off after reading filesystem...
Edit: Led-test script counts, beeps & blinks fine, AF-beam bright & dimmed.
« Last Edit: 02 / October / 2021, 16:02:26 by Caefix »
All lifetime is a loan from eternity.


*

Offline c_joerg

  • *****
  • 1157
Re: Canon Powershot N2 CHDK
« Reply #4 on: 03 / October / 2021, 06:43:13 »
First crash :D with
Code: [Select]
private sub Initialize()
    System.Create()
    CamInfo_Debug(1)
end sub

It is not available on DIGIC 6 like on my M3
M100 100a, M3 101a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline reyalp

  • ******
  • 13456
Re: Canon Powershot N2 CHDK
« Reply #5 on: 03 / October / 2021, 16:31:57 »
It is not available on DIGIC 6 like on my M3
Indeed, if it were present, it would almost certainly appear in the func_by_*.csv files. This appears to be dryos version rather than digic specific, CamInfo_Debug is present on sx730 (digic 6 / dryos r59)

N2 is DryOS 55p6, like g7x, sx60 and M3. This should make it a mostly straightforward port, but lack of buttons means it will need the touch UI like the earlier N models.
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1157
Re: Canon Powershot N2 CHDK
« Reply #6 on: 04 / October / 2021, 02:38:33 »
Indeed, if it were present, it would almost certainly appear in the func_by_*.csv files. This appears to be dryos version rather than digic specific, CamInfo_Debug is present on sx730 (digic 6 / dryos r59)

On N2 you can try to call ‘GetCameraInformationData’ plus dump like on M3
https://chdk.setepontos.com/index.php?topic=12542.300


M100 100a, M3 101a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline Caefix

  • *****
  • 652
  • Sorry, busy deleting test shots...
Re: Canon Powershot N2 CHDK
« Reply #7 on: 04 / October / 2021, 12:08:30 »
I tried ...
Code: [Select]
private sub Initialize()
    System.Create()
'    CamInfo_Debug(1) // EvntProc
'call_event_proc('GetCameraInformationData') // Script
'call_event_proc("GetCameraInformationData") // EvntProc
'ExecuteEventProcedure("GetCameraInformationData") // EvntProc with
      '00003340: UI:Button:0x00000858:PressWideButton
      '00003350: System.Create
      '00003350: ExecuteEventProcedure
'ExecuteEventProcedure('GetCameraInformationData') // Script
end sub
quoted with >'< leads to Assert script.c Line 468, (Edit2: Even in () ' starts comment (==>~Parse Error) :-[
with >"< to EvntProc line 222 ...
LCDMsg_SetStr(a,"LED Test") function is stable, no flicker in <play>, <rec> & <video>,
hidden only in <menu>, transparent behind [P] ...

Edit: Starting with the Wifi Button gave some hints:
Edit2: Some more hints.
Code: [Select]
00004190: UI:Button:0x0000100D:PressMySmaphoButton
00004940: UI:Button:0x0000100E:UnpressMySmaphoButton

00005920: UI:Button:0xFFFFFFFF:UnknowControlEvent
00009990: UI:Button:0x000010D3:TiltUp
00009990: UI:VTMLock
00009990: UI:VTMUnLock
00009990: UI:SetSyncroDisplayDeviceControllerForLcdDir
00009990: UI:SetPanelDirectionToLcdController
00010000: UI:Button:0xFFFFFFFF:UnknowControlEvent

00010870: UI:Button:0x000010D3:TiltUp
00010870: UI:VTMLock
00010870: UI:VTMUnLock
00010870: UI:SetSyncroDisplayDeviceControllerForLcdDir
00010870: UI:SetPanelDirectionToLcdController
00010880: UI:Button:0xFFFFFFFF:UnknowControlEvent
00011970: UI:Button:0x000010D4:TiltDown
00011970: UI:VTMLock
00011970: UI:VTMUnLock
00011970: UI:SetSyncroDisplayDeviceControllerForLcdDir
00011970: UI:SetPanelDirectionToLcdController
00011980: UI:Button:0xFFFFFFFF:UnknowControlEvent
00017570: UI:Button:0x000010D3:TiltUp

00004370: UI:Button:0x00000854:PressTeleButton
00004650: UI:Button:0x00000855:UnpressTeleButton
00005940: UI:Button:0x00006271:PressTouchPanel
00005940: Touch:0x00006271:(0)=(131,58)-1
00005980: UI:Button:0x0000627E:MultiPressTouchPanel
00005980: Touch:0x0000627E:(1)=(544,349)-2
00005980: UI:Button:0x00006271:PressTouchPanel
00005980: Touch:0x00006271:(2)=(544,349)-2
00006110: UI:Button:0x0000627F:MultiUnpressTouchPanel
00006110: Touch:0x0000627F:(3)=(125,53)-1
00006110: UI:Button:0x00006272:UnpressTouchPanel
00006110: Touch:0x00006272:(4)=(131,58)-1
00006110: UI:Button:0x00006272:UnpressTouchPanel
00006110: Touch:0x00006272:(5)=(544,349)-2
00006410: UI:Button:0x0000627A:SingleTapAfterRelease
00006410: Touch:0x0000627A:(6)=(131,58)-1
00006410: UI:Button:0x0000627A:SingleTapAfterRelease
00006410: Touch:0x0000627A:(7)=(544,349)-2
00010430: UI:Button:0x00006271:PressTouchPanel
00010430: Touch:0x00006271:(8)=(606,48)-1
00010490: UI:Button:0x00006272:UnpressTouchPanel
00010490: Touch:0x00006272:(9)=(606,48)-1
00010490: UI:LogicalEvent:0x0000082a:adr:0,Para:0
00010490: UI:Button:0x0000082A:PressMenuButton
00010490: UI:LogicalEvent:0x0000082b:adr:0,Para:0
00010490: UI:Button:0x0000082B:UnpressMenuButton
00010500: UI:StopWireless
00003820: UI:Button:0x000009A1:PressSwOne
00003820: SS:IsLens=0
00003920: UI:Button:0x000009A3:PressSwTwo
00003920: SS:IsLens=0
00004610: UI:Button:0x000009A4:UnpressSwTwo
00004630: UI:Button:0x000009A2:UnpressSwOne
00007700: UI:Button:0x00006271:PressTouchPanel
00007700: Touch:0x00006271:(0)=(711,478)-1
00007840: UI:Button:0x00006272:UnpressTouchPanel
00007840: Touch:0x00006272:(1)=(711,478)-1
00008140: UI:Button:0x0000627A:SingleTapAfterRelease
00008140: Touch:0x0000627A:(2)=(711,478)-1
00011100: UI:Button:0x00006271:PressTouchPanel
00011100: Touch:0x00006271:(3)=(6,472)-1
00011310: UI:Button:0x00006272:UnpressTouchPanel
00011310: Touch:0x00006272:(4)=(6,472)-1
00011610: UI:Button:0x0000627A:SingleTapAfterRelease
00011610: Touch:0x0000627A:(5)=(6,472)-1
00015100: UI:Button:0x00006271:PressTouchPanel
00015100: Touch:0x00006271:(6)=(641,57)-1
00015160: UI:Button:0x00006272:UnpressTouchPanel
00015160: Touch:0x00006272:(7)=(641,57)-1
00015160: UI:LogicalEvent:0x0000082a:adr:0,Para:0
00015160: UI:Button:0x0000082A:PressMenuButton
00015160: UI:LogicalEvent:0x0000082b:adr:0,Para:0
00015160: UI:Button:0x0000082B:UnpressMenuButton
00015170: UI:StopWireless
« Last Edit: 19 / October / 2021, 15:53:11 by Caefix »
All lifetime is a loan from eternity.


Re: Canon Powershot N2 CHDK
« Reply #8 on: 04 / October / 2021, 20:23:56 »
This should make it a mostly straightforward port, but lack of buttons means it will need the touch UI like the earlier N models.
FWIW, finding a place to hook the Touch UI of the Powershot N was the biggest and most time consuming disassembly project of all the cameras I have ported. 
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline Caefix

  • *****
  • 652
  • Sorry, busy deleting test shots...
Re: Canon Powershot N2 CHDK
« Reply #9 on: 06 / October / 2021, 13:43:48 »
 :xmas Xtend.m fun for N2   :-*
Code: [Select]
'' Torch Mode, best for cams with white AF-beam as N1,N2.
'' os.execute("echo for DC_scriptdisk>X:\\script.req")
'' os.execute("type Torch.txt>X:\\extend.m")
'' Written for N2: ( was https://chdk.fandom.com/wiki/Canon_Basic LED Test )
'' Nice for LowQ macro/video or reading map in the dark.

'' Await green LED off, turning zoom wheel needs to be first action.
'' Open lens with <Play>  // PressPBButton() UnpressPBButton()
'' LED turns off after touching <wifi>.

'' Edit: Some shades of visible text colors (cl):
'' N1 Orange=15,30,47,83,180, beige=17, brown=19,20,dkBrown=66,118,ltBrown=120
'' N1 LightRed=93, Green=10, DarkGreen=69, Cyan=70, Grey=14,152,  black=11,12
'' N1 white=3,16, Yellow=209, DarkYellow=21,109,205, LightYellow=18,72,
'' N1 Grey=14, LightGrey=7, DarkGrey=6,8,13,21, TransparentDarkGrey=28,49,225

'' N2 white=1,4,5, green=2,19,185, yellow=0, beige=9,21,200
'' N2 ltyellow=10, brown=17, ltgrey=16, black=33
'' N2 DarkYellow=31, Orange=101, Red=187,LightRed=183
'' N2 Light Green=192, Blue=184, Cyan=25, Magenta=186

dim a,b,c
dim cl=2 '' green text on N2
dim t=60
dim lin=40

private sub Initialize()

    System.Create()
    Driver.Create()
    UI.CreatePublic()

    a=LCDMsg_Create()
    LCDMsg_ChangeColor(a,cl)
    LCDMsg_Move(b,0,lin)
    LCDMsg_SetStr(a,"AF-beam-torch")
    Wait(1000)
 
    b=LCDMsg_Create()
    LCDMsg_ChangeColor(b,cl)
    LCDMsg_Move(b,300,lin)


        BeepDrive(3)
        Wait(500)
        LEDDrive(6,0) 'AF dimmed '
''        LEDDrive(4,0) 'AF bright'


    for c=0 to t 
        LCDMsg_SetNum(b,t-c)
''        BeepDrive(3)
        Wait(100)
''        LEDDrive(c%16,0)
''        Wait(2000)
''        LEDDrive(c%16,1)
    next


    LCDMsg_SetNum(b,VbattGet()/10) ''-->=~320 cV
    LCDMsg_SetStr(a,":o..... Torch")
        BeepDrive(2)
        Wait(500)
end sub

private sub Terminate()

end sub
« Last Edit: 08 / October / 2021, 16:34:41 by Caefix »
All lifetime is a loan from eternity.

 

Related Topics