SX200is Porting - page 11 - DryOS Development - CHDK Forum

SX200is Porting

  • 1105 Replies
  • 412034 Views
*

Offline Darkness

  • **
  • 72
  • SX200IS 100D
Re: SX200is Porting
« Reply #100 on: 29 / August / 2009, 05:31:37 »
Advertisements
from going over the assembly code at ROM:FF847A08, 0x2000000 : 0x1000000 makes more sense ::) but I could be interpreting that code incorrectly...
SX200IS 100D

*

Offline Darkness

  • **
  • 72
  • SX200IS 100D
Re: SX200is Porting
« Reply #101 on: 29 / August / 2009, 06:53:19 »
Darkness,
I missed that,
just tried switching them and the cam stays in play mode (via firmware update option) interesting!.
Did you see at this point any difference compared with booting the standard firmware? As in, any indication of CHDK stuff that didn't used to be there?
SX200IS 100D

*

Offline OldGit

  • ****
  • 303
Re: SX200is Porting
« Reply #102 on: 29 / August / 2009, 07:28:03 »
Did you see at this point any difference compared with booting the standard firmware? As in, any indication of CHDK stuff that didn't used to be there?
No, only dif I can see is that you stay in play mode.

But CHDK is running just not showing the menus, I have been chasing through main, gui and conf in the core trying to see what could cause the crash when you activate OPT_DEBUGGING.

As I put in a 200 sleep around the started() finished() sections I found that I could crash it with the half-shoot, menu and zoom-out buttons.
(I have all hook tasks commented out at present)
I think my problem is with the addresses or sizes in lib.c.
This would cause problems with the memcpy that is used by OPT_DEBUGGING and would also be used by any draw commands from the keys, I think !!!
Currently just going back throgh lib.c settings (yet again !)

But then again I could be completely wrong !!!!
SX200 IS-100C

*

Offline ADamb

  • **
  • 65
  • sx200is
Re: SX200is Porting
« Reply #103 on: 29 / August / 2009, 09:54:47 »
Maybe you can tray     void **fb=(void **)0x2180 in lib.c

Found after filling .data segment at 0x1900 and comparing to sx10

ROM:FF810130                 LDR     R0, =0xFFB91B18
ROM:FF810134                 LDR     R1, =0x1900
ROM:FF810138                 LDR     R3, =0xDBCC
ROM:FF81013C loc_FF81013C
ROM:FF81013C                 CMP     R1, R3
ROM:FF810140                 LDRCC   R2, [R0],#4
ROM:FF810144                 STRCC   R2, [R1],#4
ROM:FF810148                 BCC     loc_FF81013C

Converted to IDC:

auto R0, R1, R3;
R0 =0xFFB91B18;
R1 =0x00001900;
R3 =0x0000DBCC;
while (R1 < R3) {
  PatchDword(R1,Dword(R0));
  R0=R0+4;
  R1=R1+4;
}

SX200 IS-100C


Re: SX200is Porting
« Reply #104 on: 29 / August / 2009, 15:08:01 »
Since I don't have time to work on this, I'll just cheer you guys on for now. Maybe once I get my thesis in it will be different.

*

Offline reyalp

  • ******
  • 11923
Re: SX200is Porting
« Reply #105 on: 29 / August / 2009, 18:48:54 »
But CHDK is running just not showing the menus, I have been chasing through main, gui and conf in the core trying to see what could cause the crash when you activate OPT_DEBUGGING.
You shouldn't have to change any of those.

The only thing that should really matter in lib.c is the bitmap buffer address being correct, and the size being <= the actual size of the buffer. If you set the sizes too small, the display will look messed up, but it won't crash. 320x200 should be safe.

The other very likely cause of frequent crashes are a bad entry point or variable address (stubs_entry.S, stubs_entry_2.s, stubs_min.S)

edit:
display drawing issues could be related to RefreshPhysicalScreen (AKA ScreenUnLock) and ScreenLock.
« Last Edit: 29 / August / 2009, 18:50:53 by reyalp »
Don't forget what the H stands for.

*

Offline Darkness

  • **
  • 72
  • SX200IS 100D
Re: SX200is Porting
« Reply #106 on: 29 / August / 2009, 20:27:34 »
edit:
display drawing issues could be related to RefreshPhysicalScreen (AKA ScreenUnLock) and ScreenLock.
in that case, let me put this here:

RefreshPhysicalScreen should be here I think: (stubs_entry_2.S)
NSTUB(RefreshPhysicalScreen, 0xFF9D4F7C)
SX200IS 100D

*

Offline OldGit

  • ****
  • 303
Re: SX200is Porting
« Reply #107 on: 30 / August / 2009, 02:39:17 »
You shouldn't have to change any of those.
.......
display drawing issues could be related to RefreshPhysicalScreen (AKA ScreenUnLock) and ScreenLock.
Hi,
thanks for the all the help.
reyalp
I'm not changing anything in the core, just seting blink points to check where it fails.
I have already checked all entry points (and found a lot missing / wrong) but it may be worth a third or fourth look.

Darkness,
the entry point for RefreshPhysicalScreen you quote is correct, unfortunatly I already have this in stubs_entry_2.
By the way, if you add to stubs_entry_2 I think it needs to be NHSTUB, I made that mistake.

I've just tried the address from ADamb, but that just moves the splash to the left of the screen.

Oh well back to more testing, I WILL get this thing to work.

Thanks again all,
I'll check back later
OldGit
SX200 IS-100C


*

Offline reyalp

  • ******
  • 11923
Re: SX200is Porting
« Reply #108 on: 30 / August / 2009, 04:08:53 »
By the way, if you add to stubs_entry_2 I think it needs to be NHSTUB, I made that mistake.
Yes, otherwise it may not override stubs_entry.S
Don't forget what the H stands for.

*

Offline Darkness

  • **
  • 72
  • SX200IS 100D
Re: SX200is Porting
« Reply #109 on: 30 / August / 2009, 09:09:47 »
indeed, should be NHSTUB
SX200IS 100D

 

Related Topics