the sx20 porting thread - page 5 - General Discussion and Assistance - CHDK Forum

the sx20 porting thread

  • 1286 Replies
  • 483927 Views
*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #40 on: 18 / October / 2009, 05:18:11 »
Advertisements
I must correct myself.

I got E31 message on LCD screen NOT E51. Ehh, i was too sleepy yesterday..

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #41 on: 18 / October / 2009, 05:19:28 »
Read fi2.inc.txt, and the thread I provided.
Ok, i found, thanks. I'll read.

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #42 on: 18 / October / 2009, 05:24:50 »
Wait, did you do the /loader/ stuff first? The reset code and things?
Uuups. I didn't touch anything in the resetcode/main.c. Will you please show your one? I would like to compare with your sd980 firmware. It is not in the svn yet.

*

Offline RaduP

  • *****
  • 926
Re: the sx20 porting thread
« Reply #43 on: 18 / October / 2009, 05:47:59 »
The SD980 code is not in the SVN yet because it's not ready. You can use the SX10 port as a reference for the reset/loader code, that's what I used, and it is pretty similar with SD980.

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #44 on: 18 / October / 2009, 05:57:04 »
The SD980 code is not in the SVN yet because it's not ready. You can use the SX10 port as a reference for the reset/loader code, that's what I used, and it is pretty similar with SD980.
well, the sx10 code is what i also used, and the code same in the three firmwares. The only thing, i do not understand is the jump vector:

              // "LDR     R0, =loc_FF810000\n"
                 "MOV     R0, %0\n"              // new jump-vector
                 "LDMFD   SP!, {R4,LR}\n"
                 "BX      R0\n"
                 : : "r"(dst_void) : "memory","r0","r1","r2","r3","r4");

What "%0" means?

*

Offline RaduP

  • *****
  • 926
Re: the sx20 porting thread
« Reply #45 on: 18 / October / 2009, 06:07:11 »
I had problems with that too, but I forgot what it means. I THINK it means replace %0 with dst_void, but not 100% sure. Look in the SD980 thread, I asked there and reyalp answered with a link to the gcc asm docs.

*

Offline reyalp

  • ******
  • 14126
Don't forget what the H stands for.

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #47 on: 18 / October / 2009, 06:31:34 »
Nice. We jump to dst_void. :)

MOV R0, %0 // dst_void to R0.
BX R0 // jump to where R0 points.

Anyway, this code seems good without modification.

It's time to look up the missing function addresses, but i think my E31 problem is not regarding the function addresses but something else, and it's annoying me.

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #48 on: 18 / October / 2009, 06:53:58 »
I got the first ones.

NHSTUB(EnterToCompensationEVF, 0xFF836D84)
NHSTUB(PT_PlaySound, 0xFF8840D4) // maybe
NHSTUB(RefreshPhysicalScreen, 0xFFA0492C)
NHSTUB(TurnOffBackLight, 0xFF89B6A4)

In the sd980:

NHSTUB(kbd_pwr_off, 0xFF810B04)
NHSTUB(kbd_pwr_on, 0xFF810B04)

And in the firmware there is a function begins at 0xFF810B08! it's seem not ok, or i don't understand something. And why the same address for different functions?

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #49 on: 18 / October / 2009, 07:04:38 »
NHSTUB(kbd_pwr_off, 0xFF810B04)
NHSTUB(kbd_pwr_on, 0xFF810B04)

And in the firmware there is a function begins at 0xFF810B08! it's seem not ok, or i don't understand something. And why the same address for different functions?
Ok, i see the comment:
// null sub - point these at nullsub_1 as labelled in IDA

What that means? It is seems like importand to find the kbd_pwr_on. (by it's function name :-) )

 

Related Topics


SimplePortal © 2008-2014, SimplePortal