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

IXUS 240/ELPH 320 HS Porting thread

  • 312 Replies
  • 145237 Views
*

Offline koshy

  • *****
  • 1096
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #300 on: 04 / May / 2021, 19:42:47 »
Advertisements
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)
They do. The only thing slightly off was that in the transparent frame on the camera I'd see my SD card on the table while in CHDKPTP I saw some displacement but that may very well be normal.
« Last Edit: 04 / May / 2021, 19:50:14 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 koshy

  • *****
  • 1096
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #301 on: 04 / May / 2021, 19:44:30 »
Also, in rec mode, can you post the output of

Code: [Select]
> rmem -i32 0x194b88 30
0x00194b88 120
0x00194b88: 0x00307230 0x00000000 0x00000000 0x00000000
0x00194b98: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194ba8: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194bb8: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194bc8: 0x0031a5d8 0x00000000 0x00000000 0x00000000
0x00194bd8: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194be8: 0x00000000 0x00000000 0x00000000 0x00000000
0x00194bf8: 0x00000000 0x00000000
> rmem -i32 0xea34 2
0x0000ea34 8
0x0000ea34: 0x00000000 0x00194b88
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

  • ******
  • 14126
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #302 on: 04 / May / 2021, 19:58:01 »
Great, thanks.

@Caefix: On your camera, are the Canon colors normal on the actual screen?
Also, what is "Color Option" (below "Startup Image") set to in the Canon settings menu?


For both Caefix and Koshy, can you post the result of
Code: [Select]
=return get_parameter_data(0x1a,1)
Don't forget what the H stands for.

*

Offline koshy

  • *****
  • 1096
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #303 on: 04 / May / 2021, 20:09:21 »
Code: [Select]
=return get_parameter_data(0x1a,1)
The camera already went to bed on its shelf, and I need to as well, let me know if you still need this the day after tomorrow.
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

  • ******
  • 14126
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #304 on: 05 / May / 2021, 00:44:15 »
I checked in the viewport fixes and a quick fix to keep loading custom colors into a null palette trunk 5873. This does not address the other palette issues seen on Caefix cam.

@koshy:
I would like that result from your cam when you have a chance, no rush. Also, I'd like to see Not needed now.
Code: [Select]
rmem -i32 0xea34 2
in play mode, when the main menu is open, and when the func menu is open.[/code]
« Last Edit: 05 / May / 2021, 19:25:25 by reyalp »
Don't forget what the H stands for.

*

Offline Caefix

  • *****
  • 948
  • Sorry, busy deleting test shots...
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #305 on: 05 / May / 2021, 10:45:12 »
 :-* "Color Option" set to blue-grey. Now all colors are complete in <rec>, other b/w in <play>.
CO set to khaki, the (<rec>) colors are same as before.

WARNING: camera live view protocol not supported by this client, live view disabled
update_mode_list failed Operation Not Supported
> =return get_parameter_data(0x1a,1)
ERROR: Operation Not Supported
because I forgot the SD-lock. :P

> =return get_parameter_data(0x1a,1)

orange
2:return:'' // 'NJET'
2:return:0

blue-grey  // In npp++ it´s 'SOH' char.
3:return:''
3:return:1

khaki
3:return:''  // 'STX'
3:return:2

pink
5:return:'' // 'ETX'
5:return:3

Quote
Can you also post a firmware dump from this camera?
If still needed I´ll search canon basic script card...  :)
« Last Edit: 05 / May / 2021, 12:33:33 by Caefix »
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14126
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #306 on: 05 / May / 2021, 12:49:17 »
:-* "Color Option" set to blue-grey. Now all colors are complete in <rec>, other b/w in <play>.
CO set to khaki, the (<rec>) colors are same as before.
OK, I think we have an explanation. Good news, it doesn't look like bit rot, firmware dump is not needed. Bad news: It makes our lives complicated.

The normal vid_get_bitmap_active_palette logic is only valid for the default color scheme (orange). When a different color scheme is used, the location in palette_buffer is offset by the number of the color scheme.  This logic appears in ixus240 102a FUN_ff2ddd74 (ixus140 equivalent is FUN_ff20f904)

That's why in post 295, caefix's rmem -i32 0x194b88 shows palette_buffer[0] being NULL, and palette_buffer[1] having a value, while koshy's (set to orange), has a a value in palette_buffer[0].

This also explains why playback is 16 rather than 4, because there needs to be space for each color option. This may provide a way of detecting the affected firmwares.

We could use get_parameter_data(0x1a,1) in vid_get_bitmap_active_palette replicate this, but it's not clear the current CHDK custom entries will be appropriate in different Canon palettes. I'm also not sure we want to call get_parameter_data so often.

It seems like there should be a variable somewhere that has the offset already applied or points to the actual current palette, but I haven't seen one.

Making vid_get_bitmap_active_palette and load_custom_colors handle NULLs correctly will at least avoid the memory corruption, and people affected may complain that the colors are messed up.

All cameras that offer this color option will need to a fix. I'm not sure how many there are, none of my  cams have it, but the firmware code still checks the flash param.

« Last Edit: 05 / May / 2021, 16:51:10 by reyalp »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14126
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #307 on: 05 / May / 2021, 19:24:04 »
@Caefix here's a new test build. CHDK colors should now be correct with any Canon color setting.
Don't forget what the H stands for.

*

Offline Caefix

  • *****
  • 948
  • Sorry, busy deleting test shots...
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #308 on: 06 / May / 2021, 10:53:22 »
 :xmas Yes! Yet same as Ix310 & N.
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14126
Re: IXUS 240/ELPH 320 HS Porting thread
« Reply #309 on: 06 / May / 2021, 16:46:57 »
:xmas Yes!
Thanks, added in trunk 5884

Quote
Yet same as Ix310 & N.
I don't understand. Does this mean ixus310 and N have the same problem?
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal