|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#16 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 853
Karma: 314486
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Hi, Victor!
I was tired, last night, and tested just with my own scripts. And so the calculator was set as the default application. Which couldn't start, because you don't have it. Please "change eBookSimMain.xml" that it reads this way: Code:
<!-- Put your AUTORUN-Application.xml here --> <view id="VIEW" href="sudoku/sudoku.xml" left="0" top="0" right="0" bottom="0"/> //--> <!--view id="VIEW" href="mahjong/mahjong.xml" left="0" top="0" right="0" bottom="0"/> //--> <!--view id="VIEW" href="fivballs/fiveballs.xml" left="0" top="0" right="0" bottom="0"/> //--> <!--view id="VIEW" href="dict/dictionary.xml" left="0" top="0" right="0" bottom="0"/> //--> <!--view id="VIEW" href="Calc/calculator.xml" left="0" top="0" right="0" bottom="0"/> //--> Don't forget to KILL the hanging "FSK Starter.exe". Last edited by Mark Nord; 05-31-2010 at 02:19 PM. |
![]() |
![]() |
![]() |
#17 |
Enthusiast
![]() Posts: 41
Karma: 86
Join Date: Jul 2009
Device: PRS-505
|
|
![]() |
![]() |
![]() |
#18 | |
Enthusiast
![]() Posts: 41
Karma: 86
Join Date: Jul 2009
Device: PRS-505
|
Quote:
Code:
var part=new Object; part.key=2; this.container.EINK.VIEW.DOCUMENT.AUTORUN_GROUP.AUTORUN.bubble("doDigit",part); Code:
this.container.EINK.VIEW.DOCUMENT.AUTORUN_GROUP.AUTORUN.bubble("doDigit",2) |
|
![]() |
![]() |
![]() |
#19 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 318
Karma: 1846
Join Date: Dec 2009
Device: PRS-505
|
Quote:
|
|
![]() |
![]() |
![]() |
#20 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 853
Karma: 314486
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Not at all!
![]() As I wrote earlier I'm a old-style Turbo-Pascal, Delphi Coder and IMHO fairly skilled reverse engineer. But I never ever really used (heavy) OOP. I justed tried to define a part object, but with no luck, so the work-around was born. As I don't like to retype code over and over again, we can shorten this by intruduce: Code:
<code> <function id="numkey" params="num"> var part=new Object; part.key=num; this.EINK.VIEW.DOCUMENT.AUTORUN_GROUP.AUTORUN.bubble("doDigit",part); </function> </code> Code:
<button id="NUM_BUTTON1" active="true" text="1" left="715" top="75" width="30" height="60" visible="false"> <code> <function id="click"> this.bubble("numkey",1); </function> </code> </button> That is one thing which I really would like to have in the Sim. And the best thing is, PRSPlus.js is executed and the CORE Scripts are loaded! (PRSPlus.log is created, CORE dumps fine) But where the heck is this CORE Instance created, how can it be called from any other script? I will attach a ZIP file with the actually used sources, if you will have a look? (You will have to set the path-variables manually by now) Any help / suggestions are highly appreciated. Last edited by Mark Nord; 06-01-2010 at 02:48 PM. |
![]() |
![]() |
![]() |
#21 | |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 853
Karma: 314486
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
But beside this you are able to interact with the SUDOKU-Scripts and play the game? |
|
![]() |
![]() |
![]() |
#22 |
Enthusiast
![]() Posts: 41
Karma: 86
Join Date: Jul 2009
Device: PRS-505
|
Mark, I found another improvement into eBookSimMain.xml. Put following fragment into 'main' code segment and you can use keyboard instead of mouse (now only for digits but it is easy to implement the rest). I implemented it because I need buttonhold functionality (now alt+digit)
Code:
<function id="internalNumKey" params="num"> var part=new Object; part.key=num; this.EINK.VIEW.DOCUMENT.AUTORUN_GROUP.AUTORUN.bubble("doDigit", part); </function> <function id="internalNumKeyHold" params="num"> this.EINK.VIEW.DOCUMENT.AUTORUN_GROUP.AUTORUN.bubble("doHold"+ num); </function> <function id="keyDown" params="ev"> <![CDATA[ //this.bubble('tracelog', 'keyDown:'+ev); //this.bubble('tracelog', 'keyDown.key:'+ev.key); //this.bubble('tracelog', 'keyDown.keyCode:'+ev.keyCode); //this.bubble('tracelog', 'keyDown.altKey:'+ev.altKey); //this.bubble('tracelog', 'keyDown.shiftKey:'+ev.shiftKey); //this.bubble('tracelog', 'keyDown.controlKey:'+ev.controlKey); //this.bubble('tracelog', 'keyDown.functionKey:'+ev.functionKey); //this.bubble('tracelog', 'keyDown.x:'+ev.x); //this.bubble('tracelog', 'keyDown.y:'+ev.y); //this.bubble('tracelog', 'keyDown.time:'+ev.time); //this.bubble('tracelog', 'keyDown.clickCount:'+ev.clickCount); //this.bubble('tracelog', 'keyDown.contextual:'+ev.contextual); //this.bubble('tracelog', 'keyDown-'); if ((ev.key >='0') && (ev.key<='9')){ if(ev.altKey){ this.internalNumKeyHold(ev.key); }else{ this.internalNumKey(ev.key); } } ]]> </function> |
![]() |
![]() |
![]() |
#23 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 853
Karma: 314486
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Great!
![]() I thought to implement something like this, eventually with doubleclick on the button for the doHold function. [right-click is used for doHold] Will see to get the cursor-keys working, too. [done] With the num-Pad for joystick and cursor-keys for navi. [there are no scancodes, so the keys can't be identified correctly] BTW: doNext and doPrevious are linked to both, the left and the rigth navi-keys. As far as I see there are no special "do.." functions for the left pair. In some code they are checked in the <parts> tag. Any idea how to call it this way? But after six weeks of rainy, cold weather my reader and I are in the moment out in the sun in "reading-mode" ![]() Last edited by Mark Nord; 07-25-2010 at 01:35 PM. Reason: typo, some new infos |
![]() |
![]() |
![]() |
#24 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 853
Karma: 314486
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
New code as per 2010-07-25
Hi there!
I improved the code of the simulator somewhat by integrating all of m-lands great suggestions, as well as integrated right-mouse-click-handling for the "doHold" functionality and finally managed to load PRS+Core functions. This requires a slightly different way to call the Apps. Pls see in the code. New SimMenu is provided to choose all available Apps. Exiting the Apps via standard-functionality is possible. Furthermore a system-menu with about- and help-dialoge is integrated. [Edit 2010-08-11 BTW: dialogs can be used on the PRS 505 as well, but you have to define a dialog-skin. And a keyboard-handler to close them [/Edit] Check the Sudoku-Code, I was able to do the programm with only one (1) set of SPRITES! And last but not least a finding about the visibility of FSK-functions to ECMA-Scripts: As there is no fskcache in the WIN version there is no way to get Core.system.getSoValue working with a unpached fskin.dll By reading fskin.dmp you find that scriptable object methodes are defined with putID('name',0C,04) while hidden to ECMA-Script methodes are defined with putID('name',0C,0C). These methodes could only be called by *.xso/*.xsb code or via getSoValue. As a solution I provide a slightly patched fskin.dll and modified Core-Script with this Simulator, where some hidden methodes are exposed to ECMA-Script. This is mainly scoller.scrollPage() used to scroll the Tracelog automatically. While developing with the Simulator you should use a unpatched fskin.dll (e.g. from the firmware-updater, or the reader library) to check which mehtodes are scriptable (or consult the defsk *.dmp files) and change then to the patched DLL. [Edit 2010-08-11] I just figured out, that on a PC with no Sony-Reader-Library installed, two (2) DLLs are missing. I attached them as "support_dll.zip" [/Edit] [Edit 2010-12-05] Attachments removed, see latest code in post #59 [/Edit] Last edited by Mark Nord; 12-06-2010 at 02:36 AM. |
![]() |
![]() |
![]() |
#25 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 411
Karma: 902071
Join Date: Jun 2008
Location: Zaragoza (Spain)
Device: prs-505, kobo auraHD, kobo auraH2O, kobo Glo HD, kobo aura ONE
|
very interesting ...
|
![]() |
![]() |
![]() |
#26 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 853
Karma: 314486
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Kinoma Create for the desktop
Just stumbled over this blog entry at http://developer.kinoma.com/blog/?p=280
Can't find any further about this, but sounds interesting. I don't know if this is related to the fsk-framework used in the Sony PRS readers. |
![]() |
![]() |
![]() |
#27 | |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 853
Karma: 314486
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
This is done by patching only prsp.xsb, having prsp.setSoValue and prsp.compile set as scriptable, and by some additional code in core_system.js compiling the missing functionality: Code:
// 2010-08-15 Modified by Mark Nord Core.system.cloneObj = Core.system.compile('Obj',"var result; result = new xs.newInstanceOf(Obj); return result;"); /* redo it via compile */ delete Core.system.getSoValue; var getInstance = Core.system.compile('propName',"var s,v,i;s = propName.split('.');v = s.shift();i = this;while (v) {i = i[v];v = s.shift();}return i;"); Core.system.getSoValue = function (obj, propName) { return getInstance.call(obj, propName); }; [EDIT 26.08.2010] To use the prsp.xsb functions you have to uncomment the line <bytecode href="[applicationPath]prsp"/> in <programmfolder>\eBookSim\eBookSim.xml The attached zip is updated, too. [\EDIT] [Edit 2010-12-05] Attachment removed, use latest code in post #59 [\Edit] Last edited by Mark Nord; 12-06-2010 at 02:37 AM. Reason: attachement removed |
|
![]() |
![]() |
![]() |
#28 | |
PRS+ author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
|
Quote:
Last edited by kartu; 08-24-2010 at 12:28 PM. |
|
![]() |
![]() |
![]() |
#29 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 853
Karma: 314486
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Sim with "compiled" Core-functions
This is a version of the Simulated Environment with "compiled" / elevated Core-function, as done by kartu in the 2.0.x Code for the PRS-300.
Mainly done to look at the problem with the Dictionary. It seams, that "compiled" and "sandboxed" JS-functions can't see each other. And I can't figure out the dependencies between "compiled" and "sandboxed" JS. Especially with "compiled" dumpToString I expected to see .sandbox. propery, but it doesn't show up. So I did a (very) simple wrapper to have _Core.any.thing = getSoValue(Core.any.thing). Dictionary still hangs with _Core.log.loggers("") so still coment this out. [Edit 2010-12-05] Attachment removed, use latest code in post #59 [\Edit] Last edited by Mark Nord; 12-06-2010 at 02:37 AM. Reason: Attachment removed |
![]() |
![]() |
![]() |
#30 | |
Enthusiast
![]() Posts: 41
Karma: 86
Join Date: Jul 2009
Device: PRS-505
|
Quote:
I have some time now and I'm going to implement Dictionary using virtual keyboard (as I promised to VICTORSJG). I would like to use your great test enviro (of course) and I have few questions: 1) Do I understand well that I can use Core calls as I do on "real" device? Any limits? 2) I need to have my "keyboard driver" loaded "on startup" (e.g. just after another core files. Is it enough to put my vk.js file to directory .../FSK Test\eBookSim\core? Or is there any other way? 3) What to do to use it on notebook (1024x768 screen res)? Any other ideas? Thanks in advance, M. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fsk error, code = -13 | Brian Charles | Sony Reader | 4 | 04-23-2010 04:21 PM |
Fsk error code= -43 | shrktank | Sony Reader | 1 | 12-24-2009 09:32 AM |
Just a silly tweak: AUTORUN.INF for Windows | Rootman | Kindle Developer's Corner | 3 | 12-04-2009 10:17 AM |
Request for test in Windows XP | kovidgoyal | Calibre | 5 | 08-26-2009 01:14 PM |
Windows Develpment Environment issue | itimpi | Calibre | 20 | 01-17-2009 07:15 PM |