IXUS 240/ELPH 320 HS Porting thread - page 30 - DryOS Development - CHDK Forum

IXUS 240/ELPH 320 HS Porting thread

  • 312 Replies
  • 128289 Views
*

Offline reyalp

  • ******
  • 14080
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #290 on: 01 / May / 2021, 14:44:35 »
Advertisements
:) FHD & fisheye full size now, aspect ratios & Videobuttons both fine.
 :blink: Trying UI Overlay freezes liveview:
Code: [Select]
I/O errorlive timer update error
I/O error

...aPortable\CHDK-Shell\chdkptp-r964\lua\gui_live_stats.lua:182: attempt to perform arithmetic on local 'xfer_bytes' (a nil value)
stack traceback:
D:\hostluaPortable\CHDK-Shell\chdkptp-r964\lua\gui_live.lua:471: in function <D:\hostluaPortable\CHDK-Shell\chdkptp-r964\lua\gui_live.lua:424>
[C]: in function 'xpcall'
D:\hostluaPortable\CHDK-Shell\chdkptp-r964\lua\gui_live.lua:519: in function <D:\hostluaPortable\CHDK-Shell\chdkptp-r964\lua\gui_live.lua:517>
(...tail calls...)
[C]: in function 'MainLoop'
D:\hostluaPortable\CHDK-Shell\chdkptp-r964\lua\gui.lua:761: in function <D:\hostluaPortable\CHDK-Shell\chdkptp-r964\lua\gui.lua:734>
(...tail calls...)
D:\hostluaPortable\CHDK-Shell\chdkptp-r964\lua\main.lua:304: in main chunk
[C]: in function 'require'
[string "require('main')"]:1: in main chunklive timer update error
What happens on the camera? Does it crash, freeze, or something else?

Quote
;) vfb 0..7 during rec, 0..3 while not.
Do you mean it's 0..7 while recording video and 0..3 not recording video?

If so, are you certain? This would be something never seen before.

If not, please clarify.

Quote
:-* Edited palette ...
This port has "custom colors" enabled, so this should not be needed, but the palette stuff in general seems to be broken.
Don't forget what the H stands for.

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #291 on: 01 / May / 2021, 14:51:04 »
Code: [Select]
exec require'camtests'.runbatch{bench=true,filexfer=true,shoot=true,xfersizebugs=true} :( 19/2

vfb 0..3 during rec, 0..7 while not, sorry.  :haha

Quote
What happens on the camera? Does it crash, freeze, or something else?
nothing unusual, once ptpgui crashed, ... PC´s keyboard &mouse /switching windows slow down a lot, trying some dump freezes liveview too.

Code: [Select]
starting gui...
open_camera_dev_usb: ptp_opensession failed 0x2ff
Device status OK
ERROR: Could not close session!
open_camera_dev_usb: ptp_opensession failed 0x2ff
Device status OK


I/O errorgrabbing frame 1
ERROR: I/O error
16 bytes recorded to chdk_3240_20210501_210307.lvdump
live timer update error
I/O errorlive timer update error
« Last Edit: 01 / May / 2021, 15:20:34 by Caefix »
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14080
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #292 on: 01 / May / 2021, 20:19:39 »
Thanks. I checked in the fix for Video button.

Here's another test for other issues. Please report:

Does UI overlay work in chdkptp
Values in misc debug in play and rec
Using OSD settings -> CHDK Color test,  do "System colors" match the names
- viewed on the actual screen
- viewed in chdkptp live view
Don't forget what the H stands for.

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #293 on: 03 / May / 2021, 12:48:45 »
 :) UI Overlay works fine in all modes.
Code: [Select]
MEM:0xff06a4a4
APB:  0 rec     16 play   12 menu/func
BAP:0x4
PBP:0x194b88
PB2:0x4
vfb play 0..7, rec 0..3
Code: [Select]
exec require'camtests'.runbatch{bench=true,filexfer=true,shoot=true,xfersizebugs=true}  :D 26/0

Palette issue left...
In ptp<rec> most colors are tranpparent.
« Last Edit: 03 / May / 2021, 14:31:22 by Caefix »
All lifetime is a loan from eternity.


*

Offline reyalp

  • ******
  • 14080
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #294 on: 04 / May / 2021, 02:25:34 »
APB:  0 rec     16 play   12 menu/func
Thanks. Are you sure about the APB values in play and menu? They would be quite unusual.
APB = active_palette_buffer

Quote
BAP:0x4
PBP:0x194b88
PB2:0x4
This is quite puzzling. BAP / PB2 implies palette buffer is null, which implies that in rec CHDK custom color code is stomping over random ITCM starting around 0x29c :o. But the firmware code that references active_palette_buffer, palette_buffer, palette_buffer_ptr seems quite similar to known working cams :blink:

BAP = vid_get_bitmap_active_palette return.
PB2 =  palette_buffer_ptr[active_palette_buffer]+1

can you check in chdkptp, in rec
Code: [Select]
rmem -i32 -buf 0x290 100

And also
Code: [Select]
rmem -i32 0x194b88 30
Don't forget what the H stands for.

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #295 on: 04 / May / 2021, 10:36:53 »
 :-X
Code: [Select]
<play>
> rmem -i32 -buf 0x290 100
0x00000290 400
0x00000290: 0x5c287ace 0x31052763 0x495ca3e2 0x9e1b8d32
0x000002a0: 0x90b9e70a 0x06397ab1 0xa22fe02b 0x72f6cbfb
0x000002b0: 0xb03b6289 0xcaa1e60f 0x7467fb1b 0x4ea2e864
0x000002c0: 0xd42ec1fa 0x92e36a5d 0xad59479c 0xf8e4e0ee
0x000002d0: 0x4f541cf9 0xccc061dc 0xd28451f5 0x78f3d70e
0x000002e0: 0xeb7c6936 0x92d09138 0xf6215837 0x1f127861
0x000002f0: 0x759ecf30 0x1e315ec1 0x3cc54e5e 0x141b51a1
0x00000300: 0x4c3bc98a 0xc090624a 0x0bde91e2 0xb407fb7d
0x00000310: 0x758064d5 0xae992d87 0xb622d345 0x3f94e63d
0x00000320: 0x2fa2113c 0x1b5a0e78 0x89c922c6 0x6505d840
0x00000330: 0x2cf32790 0xa0883035 0xf739c359 0x52871cd8
0x00000340: 0x0154bc26 0xe679c337 0xee1d8847 0xb55aab40
0x00000350: 0x74b6ed48 0xbc5dc315 0xc5787c45 0xb79e10d0
0x00000360: 0xa666d990 0x5408688b 0xbb38746a 0x09e18add
0x00000370: 0xfd0118f9 0xb4684626 0x85d2bee9 0x7d19f6c9
0x00000380: 0xbe0b9d97 0x4bdf3223 0x5f9e3ffa 0xf5ca9947
0x00000390: 0xb3317c72 0xa82c4c2b 0xa7ca1509 0xf24d4b8c
0x000003a0: 0x7c25ad56 0x302c50ee 0x0c21a744 0x6d2c76bf
0x000003b0: 0x7c08eab4 0xaabaa60e 0xdf5d0e2f 0x42c5cbcf
0x000003c0: 0x240393e1 0x6b865d41 0x59f28ee9 0x462e24e9
0x000003d0: 0x0308a889 0x5ee0994e 0xa0ef63de 0xa7be3d41
0x000003e0: 0x78a8cebc 0x5761d753 0x555198c0 0x69cf4cce
0x000003f0: 0x19a794fb 0xdcc27abf 0xc193671a 0x93643a7f

> rmem -i32 0x194b88 30
0x00194b88 120
0x00194b88: 0x00000000 0x003072c0 0x00000000 0x00000000
0x00194b98: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194ba8: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194bb8: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194bc8: 0x00000000 0x0031a668 0x00000000 0x00000000
0x00194bd8: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194be8: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194bf8: 0x00000000 0x00000000

<REC>
> rmem -i32 -buf 0x290 100
0x00000290 400
0x00000290: 0x0326ea40 0x034cd57f 0x0373bfae 0x034bd6ca
0x000002a0: 0x0395ab95 0x034766f0 0x031250f3 0x037f408f
0x000002b0: 0x03512d5b 0x03a9a917 0x03819137 0x03ded115
0x000002c0: 0xd42ec1fa 0x92e36a5d 0xad59479c 0xf8e4e0ee
0x000002d0: 0x4f541cf9 0xccc061dc 0xd28451f5 0x78f3d70e
0x000002e0: 0xeb7c6936 0x92d09138 0xf6215837 0x1f127861
0x000002f0: 0x759ecf30 0x1e315ec1 0x3cc54e5e 0x141b51a1
0x00000300: 0x4c3bc98a 0xc090624a 0x0bde91e2 0xb407fb7d
0x00000310: 0x758064d5 0xae992d87 0xb622d345 0x3f94e63d
0x00000320: 0x2fa2113c 0x1b5a0e78 0x89c922c6 0x6505d840
0x00000330: 0x2cf32790 0xa0883035 0xf739c359 0x52871cd8
0x00000340: 0x0154bc26 0xe679c337 0xee1d8847 0xb55aab40
0x00000350: 0x74b6ed48 0xbc5dc315 0xc5787c45 0xb79e10d0
0x00000360: 0xa666d990 0x5408688b 0xbb38746a 0x09e18add
0x00000370: 0xfd0118f9 0xb4684626 0x85d2bee9 0x7d19f6c9
0x00000380: 0xbe0b9d97 0x4bdf3223 0x5f9e3ffa 0xf5ca9947
0x00000390: 0xb3317c72 0xa82c4c2b 0xa7ca1509 0xf24d4b8c
0x000003a0: 0x7c25ad56 0x302c50ee 0x0c21a744 0x6d2c76bf
0x000003b0: 0x7c08eab4 0xaabaa60e 0xdf5d0e2f 0x42c5cbcf
0x000003c0: 0x240393e1 0x6b865d41 0x59f28ee9 0x462e24e9
0x000003d0: 0x0308a889 0x5ee0994e 0xa0ef63de 0xa7be3d41
0x000003e0: 0x78a8cebc 0x5761d753 0x555198c0 0x69cf4cce
0x000003f0: 0x19a794fb 0xdcc27abf 0xc193671a 0x93643a7f
0x00000400: 0xb36f5d68 0x5c00223a 0x8c4e8239 0xe4413033
0x00000410: 0x00eb6d8c 0xf61d4928 0x31c897c0 0xd68f0a0a

> rmem -i32 0x194b88 30
0x00194b88 120
0x00194b88: 0x00000000 0x003072c0 0x00000000 0x00000000
0x00194b98: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194ba8: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194bb8: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194bc8: 0x00000000 0x0031a668 0x00000000 0x00000000
0x00194bd8: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194be8: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194bf8: 0x00000000 0x00000000


« Last Edit: 04 / May / 2021, 11:30:14 by Caefix »
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14080
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #296 on: 04 / May / 2021, 14:36:24 »
<REC>
Thanks.
Quote
0x00000290: 0x0326ea40 0x034cd57f 0x0373bfae 0x034bd6ca
0x000002a0: 0x0395ab95 0x034766f0 0x031250f3 0x037f408f
0x000002b0: 0x03512d5b 0x03a9a917 0x03819137 0x03ded115

Code: [Select]
                pal[CHDK_COLOR_BASE+1]  = 0x326EA40;  // Dark Red
                pal[CHDK_COLOR_BASE+2]  = 0x34CD57F;  // Light Red
                pal[CHDK_COLOR_BASE+3]  = 0x373BFAE;  // Green
                pal[CHDK_COLOR_BASE+4]  = 0x34BD6CA;  // Dark Green
                pal[CHDK_COLOR_BASE+5]  = 0x395AB95;  // Light Green
                pal[CHDK_COLOR_BASE+6]  = 0x34766F0;  // Blue
                pal[CHDK_COLOR_BASE+7]  = 0x31250F3;  // Dark Blue
                pal[CHDK_COLOR_BASE+8]  = 0x37F408F;  // Cyan
                pal[CHDK_COLOR_BASE+9]  = 0x3512D5B;  // Magenta
                pal[CHDK_COLOR_BASE+10] = 0x3A9A917;  // Yellow
                pal[CHDK_COLOR_BASE+11] = 0x3819137;  // Dark Yellow
                pal[CHDK_COLOR_BASE+12] = 0x3DED115;  // Light Yellow
:o
(I rounded the wrong way on the rmem command, so the first entry isn't included)

This is Not Good. I think at a minimum, it's time to make sure all ports don't try to write custom colors if palette_buffer[active_palette_buffer] (or equivalent with palette_buffer_ptr logic) is null.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14080
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #297 on: 04 / May / 2021, 18:13:04 »
@Caefix Here's a new test build. At a minimum, it should no longer corrupt ITCM. It might also work  :-[

Can you also post a firmware dump from this camera (It will be too big for the forum, use a file sharing site like dropbox, google drive etc)? While I think it's probably a port bug, there might be a whiff of rot.

I'd be interested to know if other users see the incorrect CHDK colors like in post 293 (using the autobuild, not the test build attached to this post).  Ping @koshy
Don't forget what the H stands for.


*

Offline koshy

  • *****
  • 1096
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #298 on: 04 / May / 2021, 19:15:31 »
I'd be interested to know if other users see the incorrect CHDK colors like in post 293 (using the autobuild, not the test build attached to this post).  Ping @koshy
Thanks for thinking Hello :-)

I guess this is what you wanted to see... (nothing out of the ordinary)
Using trunk 1.00D   ixus240_elph320hs-100d-1.6.0-5869-full_ALPHA.zip  (839KB)

And the build of CHDKPTP 939 which was what I built last.
« Last Edit: 04 / May / 2021, 19:25:13 by koshy »
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline reyalp

  • ******
  • 14080
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #299 on: 04 / May / 2021, 19:28:11 »
I guess this is what you wanted to see... (nothing out of the ordinary)
Using trunk 1.00D   ixus240_elph320hs-100d-1.6.0-5869-full_ALPHA.zip  (839KB)

And the built of CHDKPTP 939 which was what I built last.
:blink: :blink: :blink:
Thanks @koshy. If you use "CHDK settings -> Color Settings -> CHDK Color test", do the colors also match the names, so it has "white" under the white square, red under the red square and so on. You only need to check the first page (System colors)

Also, in rec mode, can you post the output of
Code: [Select]
rmem -i32 0x194b88 30
and
Code: [Select]
rmem -i32 0xea34 2
Don't forget what the H stands for.

 

Related Topics