G11 porting - page 25 - DryOS Development - CHDK Forum  

G11 porting

  • 530 Replies
  • 233747 Views
Re: G11 porting
« Reply #240 on: 11 / January / 2010, 17:47:39 »
Advertisements
i updated the COLOR defines in gui_draw.h:


Do you mean you have changed an existing palette or defined a new one ?

If an existing palette, it obviously has to be correct for the other cameras that use it.


*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #241 on: 11 / January / 2010, 18:27:12 »
I created a new one (CAM_BITMAP_PALETTE 4). I used as base the values from palette 3 and modfied a few values.

In the mean time, i also updated the shutterspeeds_table[] and iso_table[].
The values does not differs great from other cams, looks like the "usual" values:
Code: [Select]
const ShutterSpeed shutter_speeds_table[] = {
    { -12, -384, "15", 15000000 },
    { -11, -352, "13", 13000000 },
    { -10, -320, "10", 10000000 },
    {  -9, -288, "8",   8000000 },
    {  -8, -256, "6",   6000000 },
    {  -7, -224, "5",   5000000 },
    {  -6, -192, "4",   4000000 },
    {  -5, -160, "3.2", 3200000 },
    {  -4, -128, "2.5", 2500000 },
    {  -3,  -96, "2",   2000000 },
    {  -2,  -64, "1.6", 1600000 },
    {  -1,  -32, "1.3", 1300000 },
    {   0,    0, "1",   1000000 },
    {   1,   32, "0.8",  800000 },
    {   2,   64, "0.6",  600000 },
    {   3,   96, "0.5",  500000 },
    {   4,  128, "0.4",  400000 },
    {   5,  160, "0.3",  300000 },
    {   6,  192, "1/4",  250000 },
    {   7,  224, "1/5",  200000 },
    {   8,  256, "1/6",  166667 },
    {   9,  288, "1/8",  125000 },
    {  10,  320, "1/10", 100000 },
    {  11,  352, "1/13",  76923 },
    {  12,  384, "1/15",  66667 },
    {  13,  416, "1/20",  50000 },
    {  14,  448, "1/25",  40000 },
    {  15,  480, "1/30",  33333 },
    {  16,  512, "1/40",  25000 },
    {  17,  544, "1/50",  20000 },
    {  18,  576, "1/60",  16667 },
    {  19,  608, "1/80",  12500 },
    {  20,  640, "1/100", 10000 },
    {  21,  672, "1/125",  8000 },
    {  22,  704, "1/160",  6250 },
    {  23,  736, "1/200",  5000 },
    {  24,  768, "1/250",  4000 },
    {  25,  800, "1/320",  3125 },
    {  26,  832, "1/400",  2500 },
    {  27,  864, "1/500",  2000 },
    {  28,  896, "1/640",  1563 },
    {  29,  928, "1/800",  1250 },
    {  30,  960, "1/1000", 1000 },
    {  31,  992, "1/1250",  800 },
    {  32, 1024, "1/1600",  625 },
{  33, 1056, "1/2000",  500 },
    {  34, 1088, "1/2500",  409 },
    {  35, 1120, "1/3200",  313 },
    {  36, 1152, "1/4000",  250 },
};

const ISOTable iso_table[] = {
    {  0,     0,  "Auto", -1},
    {  1,    80,    "80", -1},
    {  2,   100,   "100", -1},
    {  3,   200,   "200", -1},
    {  4,   400,   "400", -1},
    {  5,   800,   "800", -1},
    {  6,  1600,  "1600", -1},
    {  7,  3200,  "3200", -1},
};        

Re: G11 porting
« Reply #242 on: 11 / January / 2010, 18:59:57 »
I am not sure why these shutter-speed tables exist.

Tv96 values are precisely related to shutter-speed by the formula given in platform\generic\shooting.c.

*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #243 on: 12 / January / 2010, 02:43:40 »
I am also not sure, but anyway, the list is updated now.

In the mean time i did some bugfixing, some of the (not 100% hits) string functions addresses in stubs_entry.s was really wrong. This functions did not crash immediatly, but there are did some wild pointer action and crashes other functions. I fixed that, and now also scripting or loading of grids is working. I was now able to run LLIBTST.LUA script, without crashing the camera.  :D

But there are still some open points on the list:

1) Finding the address of this variables
Code: [Select]
DEF(recreview_hold, xxx)       
DEF(movie_status, xxx)       
DEF(some_flag_for_af_scan, xxx)   

2) Check if all of this (currently) nullsub functions, are really not available:
Code: [Select]
NHSTUB(rename, 0xFF810B04)
NHSTUB(rewinddir, 0xFF810B04)
NHSTUB(Unmount_FileSystem, 0xFF810B04)
NHSTUB(Mount_FileSystem, 0xFF810B04)
NHSTUB(Remove, 0xFF810B04)
NHSTUB(kbd_pwr_on, 0xFF810B04)
NHSTUB(EnterToCompensationEVF, 0xFF810B04)
NHSTUB(ExitFromCompensationEVF, 0xFF810B04)
NHSTUB(PT_PlaySound, 0xFF810B04)
NHSTUB(UIFS_WriteFirmInfoToFile, 0xFF810B04)
NHSTUB(readfastdir, 0xFF810B04)
NHSTUB(Lseek, 0xFF840F84)
NHSTUB(MakeAFScan, 0xFF810B04)
NHSTUB(ExpCtrlTool_StartContiAE, 0xFF810B04)

3) Update of aperture table:
Code: [Select]
aperture_sizes_table[]
4) Finding the cause for the not correct working display clear/update problem:


Re: G11 porting
« Reply #244 on: 12 / January / 2010, 05:54:17 »
2) Check if all of this (currently) nullsub functions, are really not available:

If you comment-out all entries (apart from PT_PlaySound) above and in stubs_entry.s, does the code still compile OK ?

I think only PTPlaySound is used by CHDK.

Re: G11 porting
« Reply #245 on: 12 / January / 2010, 06:29:22 »
Code: [Select]
DEF(recreview_hold, xxx)  

On the SX200, code starts at 0xFF964C00.

On the G11, compare with code at 0xFF998194.

Maybe 0x7D00 + 0xD8 ?

*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #246 on: 12 / January / 2010, 08:01:14 »
2) Check if all of this (currently) nullsub functions, are really not available:

If you comment-out all entries (apart from PT_PlaySound) above and in stubs_entry.s, does the code still compile OK ?

I think only PTPlaySound is used by CHDK.


No, it does not build if i simply comment this stubs out:

Code: [Select]
ERROR! There are unresolved addresses in 'stubs_entry.S' (g11-100j) for the following names:
EnterToCompensationEVF
ExitFromCompensationEVF
Lseek
PT_PlaySound
Remove
UIFS_WriteFirmInfoToFile
kbd_pwr_on
readfastdir
rename

and:

../platform/g11/libplatform.a(wrappers.o): In function `MakeAFScan':
wrappers.c:(.text+0x350): undefined reference to `_MakeAFScan'
wrappers.c:(.text+0x360): undefined reference to `_ExpCtrlTool_StartContiAE'
../platform/g11/libplatform.a(wrappers.o): In function `rewinddir':
wrappers.c:(.text+0x7ec): undefined reference to `_rewinddir'
../platform/g11/libplatform.a(wrappers.o): In function `remount_filesystem':
wrappers.c:(.text+0xdb0): undefined reference to `_Unmount_FileSystem'
wrappers.c:(.text+0xdb4): undefined reference to `_Mount_FileSystem'
collect2: ld returned 1 exit status

Re: G11 porting
« Reply #247 on: 12 / January / 2010, 08:10:44 »
A couple of suggestions :-

DEF(some_flag_for_af_scan, 0x72B4)   //found at ROM:FF965F34
DEF(movie_status, 0x6D58+0x38)      //ROM:FF96249C


These are G9 nullsubs :-

NHSTUB(rewinddir, 0xFF810958) // nullsub
NHSTUB(Unmount_FileSystem, 0xFF810958) // nullsub
NHSTUB(Mount_FileSystem, 0xFF810958) // nullsub
NHSTUB(kbd_pwr_on, 0xFF810958) // nullsub
« Last Edit: 12 / January / 2010, 08:26:07 by Microfunguy »


*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #248 on: 12 / January / 2010, 11:04:44 »
Okay, i think i found some of the missing functions:
Code: [Select]
NHSTUB(EnterToCompensationEVF, 0xFF8373D8)
NHSTUB(ExitFromCompensationEVF, 0xFF83741C)
NHSTUB(PT_PlaySound, 0xFF882414)
NHSTUB(UIFS_WriteFirmInfoToFile, 0xFF980560)
NHSTUB(MakeAFScan, 0xFF966130)
NHSTUB(ExpCtrlTool_StartContiAE, 0xFF844CE0)
NHSTUB(Remove, 0xFF8359E4)
NHSTUB(readfastdir, 0xFFA84270)

So only the "rename" and "Lseek" function are left to be found.

Re: G11 porting
« Reply #249 on: 12 / January / 2010, 11:18:33 »
I read somewhere that for one recent camera Lseek and lseek were the same.

Does CHDK use rename and Lseek  ?

EDIT:

Yes.
« Last Edit: 12 / January / 2010, 11:46:54 by Microfunguy »

 

Related Topics