View Single Post
Old 01-04-2011, 10:58 AM   #1502
welshkid
Junior Member
welshkid began at the beginning.
 
Posts: 5
Karma: 26
Join Date: Nov 2010
Device: prs-505
Quote:
Originally Posted by Mark Nord View Post
I just implemented a very basic Standby Picture for my PRS505

Suspend via the power-switch is handled in ebook.so which needs to be patched here:
Code:
patched ebook.so PRS505 1.4.00.23260
.text:0000B988 ; =============== S U B R O U T I N E ==========================
.text:0000B988                 EXPORT PowerStandby
.text:0000B988 PowerStandby                            ; CODE XREF: SubcpuThreadProcessCommand+228
.text:0000B988

.text:0000BA58 loc_BA58                                ; CODE XREF: PowerStandby+98
.text:0000BA58                 BL      _sync
.text:0000BA5C                 LDR     R3, =0x41C
.text:0000BA60                 LDR     R0, [R10,R3]    ; char *
.text:0000BA64                 BL      _system
.text:0000BA68                 BL      ebookEinkThreadSuspend
.text:0000BA6C             BL      ebookEinkErase  ; NOP this new code: 00 00 A0 E1
.text:0000BA70                 LDR     R0, [R4]
.text:0000BA74                 MOV     R1, #1
.text:0000BA78                 BL      sub_B39C
.text:0000BA7C                 LDRB    R3, [R4,#0xAD]
.text:0000BA80                 CMP     R3, #0
.text:0000BA84                 BNE     loc_BCD0
So the screen isn't any longer erased during suspend.

Then I added this to main.xml to show up the StandbyPicture;
Code:
		<texture href="/Data/kBookStandbyPic.png">
			<cutout id="defaultStandbyPic-a" x="0" y="0" width="600" height="800"/>
		</texture>	
		<skin id="defaultStandbyPic" 
				cutouts="defaultStandbyPic-a"/>	

		<function id="doResume">
			this.STANDBY_IMAGE.show(false);
			this.STANDBY_IMAGE.enable(false);
			this.STATUS_GROUP.show(true);
			this.getDevice().doneResume();
			this.getModel().resume();
			if (this.modal) {
				...
			}
		</function>
		<function id="doSuspend">
			this.STATUS_GROUP.show(false);
			this.STANDBY_IMAGE.show(true);
			this.STANDBY_IMAGE.enable(true);
			this.getModel().suspend();
			this.getDevice().doneSuspend();
		</function>

	<group id="STANDBY_IMAGE" left="0" right="0" top="0" bottom="0" active="false" visible="false">
		<background skin="defaultStandbyPic" left="0" right="0" top="0" bottom="0"/>
		<!--standbyImage left="0" right="0" top="0" bottom="0"/-->
	</group>
I'm sure the picture selection and integration could be done much more elegant, but take this as proof of concept.

I finished on this just one hour ago, so I can't tell about possible side-effects, or a fading of the picture.

Obviously I can't show a screenshoot, too
How would i apply this patch to my prs-505?
Thanks
welshkid is offline   Reply With Quote