Eos 400d ( Rebel XTI ) - page 176 - DSLR Hack development - CHDK Forum

Eos 400d ( Rebel XTI )

  • 1871 Replies
  • 840944 Views
*

Offline 0xAF

  • ***
  • 220
    • 0xAF
Re: Eos 400d ( Rebel XTI )
« Reply #1750 on: 03 / May / 2013, 15:34:10 »
Advertisements
Thank you very much for the solution! I thought it will be harder to fix it.
I see it still has small part on the screen left which didn't invert. It goes through memcpy in 0xFF92C5FC location. I was trying to fix it with "cache_fake(0xFF92C5FC, BL_INSTR(0xFF92C5FC, &vram_copy), TYPE_ICACHE);"
It invert all screen now but camera freezes right before firmware updates available picture count.
it works normally here... i totaly left D caches and not touched them btw.
you can see how i get all the hacks with I caches only in the code.

When I hardcode the check it works correctly.
i.e.
if (GUIMODE == OLC || GUIMODE == ACTIVESWEEP_OLC) { ... }

but if i add the check from our settings
i.e.
if (settings.invert_olc && (GUIMODE == OLC || GUIMODE == ACTIVESWEEP_OLC)) {...}
then it has artifacts ...
this is because we read the settings at some later time after the init of the camera ...
if active sweep is off, it's ok, but the stupid animation is making part of the screen white ...
after the screen refreshes, everything is ok.
// AF

*

Offline Sergei

  • ***
  • 114
Re: Eos 400d ( Rebel XTI )
« Reply #1751 on: 03 / May / 2013, 15:45:52 »
if active sweep is off, it's ok, but the stupid animation is making part of the screen white ...
after the screen refreshes, everything is ok.
Yes, that is why I was trying to fix it with:
cache_fake(0xFF92C5D8, BL_INSTR(0xFF92C5D8, &vram_copy), TYPE_ICACHE);
cache_fake(0xFF92C5FC, BL_INSTR(0xFF92C5FC, &vram_copy), TYPE_ICACHE);
But camera start freezing after I add second line.

*

Offline Sergei

  • ***
  • 114
Re: Eos 400d ( Rebel XTI )
« Reply #1752 on: 03 / May / 2013, 21:50:35 »
0xAF, are there downsides if I use D-caches?
Thanks.

*

Offline Sergei

  • ***
  • 114
Re: Eos 400d ( Rebel XTI )
« Reply #1753 on: 04 / May / 2013, 06:45:25 »
if active sweep is off, it's ok, but the stupid animation is making part of the screen white ...
after the screen refreshes, everything is ok.
Yes, that is why I was trying to fix it with:
cache_fake(0xFF92C5D8, BL_INSTR(0xFF92C5D8, &vram_copy), TYPE_ICACHE);
cache_fake(0xFF92C5FC, BL_INSTR(0xFF92C5FC, &vram_copy), TYPE_ICACHE);
But camera start freezing after I add second line.
Here is the right code. Works without any problems.
Code: [Select]
void* vram_copy(char *dest, char *src, int size)
 { if(GUIMode==OLC_MODE || GUIMode==ACTIVESWEEP_OLC)
    { while (size--) {
        *dest++ = 0xBB - (*src++); //0xBB can be any char. Some good colors can be obtained with 0xBB, 0xDD, 0xFF
    }
    }else memcpy(dest, src, size);
}

    /* LCD Night Mode */
cache_fake(0xFF92C5D8, BL_INSTR(0xFF92C5D8, &vram_copy), TYPE_ICACHE);
cache_fake(0xFF92C5FC, BL_INSTR(0xFF92C5FC, &vram_copy), TYPE_ICACHE);
« Last Edit: 04 / May / 2013, 06:52:58 by Sergei »


*

Offline 0xAF

  • ***
  • 220
    • 0xAF
Re: Eos 400d ( Rebel XTI )
« Reply #1754 on: 04 / May / 2013, 08:12:40 »
0xAF, are there downsides if I use D-caches?
Thanks.

I dont know, but when I spoke with g3gg0 back then (when i was working on 5D), he suggested to stick with the I caches only, at least until i get it to work.
And what I'm thinking, it's better to leave D caches to the camera, so it can benefit from D caches atleast.
Since when we lock the caches, they are not useful for optimization from the camera anymore.
So I prefer to leave the D caches to the camera, since we can get everything from I caches only.
// AF

*

Offline 0xAF

  • ***
  • 220
    • 0xAF
Re: Eos 400d ( Rebel XTI )
« Reply #1755 on: 04 / May / 2013, 08:25:17 »
Code: [Select]
    /* LCD Night Mode */
cache_fake(0xFF92C5D8, BL_INSTR(0xFF92C5D8, &vram_copy), TYPE_ICACHE);
cache_fake(0xFF92C5FC, BL_INSTR(0xFF92C5FC, &vram_copy), TYPE_ICACHE);

Thanks for this.
I was wondering how to stop the stupid animation, but you seems to have found the memcpy for the animation ;)
// AF

*

Offline 0xAF

  • ***
  • 220
    • 0xAF
Re: Eos 400d ( Rebel XTI )
« Reply #1756 on: 04 / May / 2013, 14:17:01 »
These are "sort of" useful colors.
subtract the pixel from one of these numbers to get the real color.

Code: [Select]
0x1B, // 27  Blk on Gry
0xE5, // 229 Blk on Yel
0x70, // Grn on Gry
0xC1, // 193 Blu on Gry
0x24, // 36  Blu on Blk
0xF1, // 241 Blu on Yel
0x11, // Cya on Gry
0x44, // 68  Yel on Blk
0x42, // 66  Org on Blk
0x7C, // 124 Yel on Grn
0x84, // 132 Yel on Blu
0x86, // 134 Yel on Blu
0x88, // 136 Yel on Blu
0x87, // 135 Yel on Cya
0x49, // 73  Yel on Red
0x89, // 137 Yel on Pur
0x35, // 53  Red on Gry
0x34, // 52  Red on Gry
0x72, // 114 Red on Gry
0x39, // 57  Red on Pnk
0x3A, // 58  Red on Yel
0x92, // 146 Red on Blk
0x22, // 34  Pur on Blk
0x76, // 118 Wht on Grn
0x5F, // 95  Gry on Gry
0x99, // 153 Gry on Red
0x9C, // 156 Gry on Red
0xFF, // 255 Gry on Blu
0x8C, // 140 Wht on Blu
0x78, // 120 Wht on Cya
0xBE, // 190 Gry on Yel
0xDE, // 222 Gry on Yel
0xFE, // 254 Gry on Yel
// AF

*

Offline Sergei

  • ***
  • 114
Re: Eos 400d ( Rebel XTI )
« Reply #1757 on: 06 / May / 2013, 09:05:35 »
but if i add the check from our settings
i.e.
if (settings.invert_olc && (GUIMODE == OLC || GUIMODE == ACTIVESWEEP_OLC)) {...}
then it has artifacts ...
this is because we read the settings at some later time after the init of the camera ...
Camera's dpr_data.video_system probably can be used for enabling/disabling "Change LCD Colors" at startup.


Re: Eos 400d ( Rebel XTI )
« Reply #1758 on: 03 / June / 2013, 10:11:10 »
Would a laser pointer make a change in value int the IR remote sensor in front or to the other  sensor?
It could make an instant high speed trigger for those split second bullet shots.

Or at lest a reverse IR remote setting where a IR remote control button is held on and when something breaks its signal it triggers.
It should work for big things like a motorcycle driving by and perhaps even a ball sized object.
One could just activate it and move to the other side of path object and hold button down and when the object obstructs the remote's signal it could provide a high speed trigger.

much love

Re: Eos 400d ( Rebel XTI )
« Reply #1759 on: 03 / June / 2013, 13:27:37 »
Would a laser pointer make a change in value int the IR remote sensor in front or to the other  sensor?
It could make an instant high speed trigger for those split second bullet shots.

Or at lest a reverse IR remote setting where a IR remote control button is held on and when something breaks its signal it triggers.
It should work for big things like a motorcycle driving by and perhaps even a ball sized object.
One could just activate it and move to the other side of path object and hold button down and when the object obstructs the remote's signal it could provide a high speed trigger.

much love

Now, that idea is genius if it's possible!

 

Related Topics