SX60HS Porting - page 7 - DryOS Development - CHDK Forum supplierdeeply

SX60HS Porting

  • 915 Replies
  • 371555 Views
Re: SX60HS Porting
« Reply #60 on: 20 / March / 2016, 16:54:06 »
Advertisements
Modified the DEF in stubs_min.S for active_bitmap_buffer (again), this time maybe correct.  Camera boots, stays booted.  Horizontal bars appear for a moment in the middle of the LCD, followed by a short busy, and then replaced near the top where they stay.  Like the screen raster is sized incorrectly (which wouldn't suprise me)

*

Offline reyalp

  • ******
  • 14117
Re: SX60HS Porting
« Reply #61 on: 20 / March / 2016, 17:07:18 »
I am not yet loading this module in CreateTask_my, so perhaps spytask cannot yet run? Perhaps I should uncomment this part in CreateTAsk_my.
There's a timeout if this isn't implemented, see core/main.c core_spytask

Quote
Camera boots, stays booted.  Horizontal bars appear for a moment in the middle of the LCD, followed by a short busy, and then replaced near the top where they stay.  Like the screen raster is sized incorrectly (which wouldn't suprise me)
This is quite likely. You can dump RAM starting at your expected bitmap buffer addresses and then use srsa's tool https://chdk.setepontos.com/index.php?topic=12721.0 to try to find the resolution.

To dump RAM before you have script, ptp etc working you can just fopen, fwrite a file somewhere, like the start of spytask, or somewhere in the main spytask loop withe a variable to ensure it only gets called once.

You can also try to determine the correct resolution(s) from disassembly. Resolution may vary depending on whether you are using EVF or the camera LCD, or if you have any video out connected.

Note that if  active_bitmap_buffer is incorrect, but on something that happens to stay 0 in the time you test, it would also not crash.
Don't forget what the H stands for.

Re: SX60HS Porting
« Reply #62 on: 20 / March / 2016, 18:03:07 »
It always seems to power up with the LCD screen...used to powerup with EVF or LCD depending on last one used. The LCD screen is 922K dots (spec) which I think means 1280x720. I see resolution is referenced in lib.c and also in platform_camera.h. Would I need to change both? or somewhere else?
I'll check disassembly as well.
« Last Edit: 20 / March / 2016, 18:08:29 by 62ndidiot »

*

Offline srsa_4c

  • ******
  • 4451
Re: SX60HS Porting
« Reply #63 on: 20 / March / 2016, 18:26:24 »
The LCD screen is 922K dots (spec) which I think means 1280x720.
AFAIK the dot count in LCD specs means single-color dots, so the real (full color) pixel count is 1/3 of that 922k (640x480).
Quote
I see resolution is referenced in lib.c and also in platform_camera.h. Would I need to change both? or somewhere else?
If the LCD and EVF happen to use same buffer resolutions, then you can simply start by #undef'ing CAM_SUPPORT_BITMAP_RES_CHANGE in platform_camera.h and entering the correct values here:
#define CAM_BITMAP_WIDTH                    640 // Actual width of bitmap screen in pixels
#define CAM_BITMAP_HEIGHT                   480 // Actual height of bitmap screen in rows
#define CAM_SCREEN_WIDTH                    640 // Width of bitmap screen in CHDK co-ordinates
#define CAM_SCREEN_HEIGHT                   480 // Height of bitmap screen in CHDK co-ordinates

Despite the LCD resolution, the buffer might be higher res. than 640x480.


Re: SX60HS Porting
« Reply #64 on: 20 / March / 2016, 18:28:41 »
seems to me i should be able to use dump_memory and scheduler in core/main.c

*

Offline reyalp

  • ******
  • 14117
Re: SX60HS Porting
« Reply #65 on: 20 / March / 2016, 18:30:47 »
It always seems to power up with the LCD screen...used to powerup with EVF or LCD depending on last one used. The LCD screen is 922K dots (spec) which I think means 1280x720.
FWIW, I've never been clear how the "dots" specs relate to the various frame buffer resolutions.

The live view and UI use separate frame buffers, which can have different resolutions. These are referred to as "bitmap" and "viewport" in CHDK. See also http://chdk.wikia.com/wiki/Frame_buffers

G7X is a claimed "1.04m dot" with a 720x480 (=345600 pixels) bitmap and viewport. I guess x3 colors would get it up to about 1m. But ixus140 is 720x480 viewport / 720x240 bitmap and a claimed 460k dot.  ???

Quote
I see resolution is referenced in lib.c and also in platform_camera.h. Would I need to change both? or somewhere else?
The bitmap (UI) stuff is mostly defined in platform_camera.h. If it varies like sx280, you'll need the update_screen_dimensions stuff in lib.c as well.

Personally, I'd probably start with dumping and using the bin viewer tool if I thought I had the right addresses.
Don't forget what the H stands for.

Re: SX60HS Porting
« Reply #66 on: 20 / March / 2016, 19:33:54 »
Doesn't seem like core_spytask in core/main.c ever executes....stuck a mkdir("A/TEST") in there...nothing happens. Had hoped to use dump-memory and the scheduler...maybe I am linked somewhere to a dummy/alternate core_spytask.   >:(

Re: SX60HS Porting
« Reply #67 on: 20 / March / 2016, 19:46:23 »
Looking at core/main.c I'd expect all sorts of files and directories to have been created.  So I don't understand something.


*

Offline reyalp

  • ******
  • 14117
Re: SX60HS Porting
« Reply #68 on: 20 / March / 2016, 20:00:56 »
Looking at core/main.c I'd expect all sorts of files and directories to have been created.  So I don't understand something.
Have you implemented enough of kbd task to mask out the SD card lock? If not (and you aren't booting with firm update), nothing that updates the filesystem will work.

The fact that you see something on the display suggests it's running. You could blink an LED to check.
Don't forget what the H stands for.

Re: SX60HS Porting
« Reply #69 on: 20 / March / 2016, 20:13:09 »
Kbd task is not implemented.  I'll work on that.  What about init_file_modules? That too?

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal