|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 851
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
FSK Test-Environment for Autorun Applications under MS-Windows
Even when the title reads PRS-505 this Simulator can be used to test Sripts for all Sony readers. If testing for a touch-device, you can now switch the skin from 505 to 600/350/650 and to 950
As per 2011-05-09 Code for FSK Test-Environment for Autorun Applications under MS-Windows is moved to repository apps, kindly provided by kartu, at his prs+ goolgecode project page. A, very basic, Wiki-page was created, too. To get started I would recommend to read at least Post #6, #24 and #31 in this thread. Original Text, kept for reference: While more playing around, then really knowing what I'm doing, I was able to modify the Sony-Firmware-Updater for Windows in a way, that three and a half (3 1/2) of six (6) to me known AUTORUN-Applications are working in a Windows-Environment. This was done mainly to have a test-environment for forthcoming AUTORUN-Apps. As it is annoying to copy from and to and connect and disconnect the reader form and to USB in sequence. Prerequisite: Windows OS capable to run the original Sony-Firmware-Updater 1.1.00.18040 a vertical screen-resulution equal or better then 1024 px. Extract the attached archive to any folder and start "FSK Starter.exe" to start the SUDOKU-Game. Use KILL-FSK.BAT to cancel the program if it does not start up after a change in *.XML or *.JS code. Spoiler:
Fully working are the three games, Sudoku (©Mikhail Sharonov), Fiveballs and Mahjong (by clemenseken) DictoLauncher has a working UI, the shell-calls and therewith the actual searching are disabled, also there are some modification in the code, e.g. use of a additional <text> tag to display the results. Scrolling "should" be easy, as "text" is a descendant of "scroller" and scroller has the methodes .scrollBy(dx,dy), .scrollLine(axis,sing) and .scrollPage(axis, sign) (as defined in fskin) But unfortunatly this mehtods are "not scriptable", so direct calling of this.textlines.scrollPage(true,1) didn't work :-( On the PRS-505 in a prs+ environment it should be possible to use var scrollPage=getSoValue(this.textlines,"scrollPage") and then scrollPage.call(true,1); kartu's prs+installer didn't work in the simulated enviroment, because of heavy use of kbook-related functions and I didn't check igorsk Universal-Flasher in the simulator. Next to expect is a scientific-calculator, see screenshots - released here Attachments removed, moved to repository apps Last edited by Mark Nord; 02-28-2013 at 10:45 AM. Reason: Newer Code postet in Post #24 |
![]() |
![]() |
![]() |
#2 |
Enthusiast
![]() Posts: 41
Karma: 86
Join Date: Jul 2009
Device: PRS-505
|
Really nice work! I have a question: from where you know what is possible in XML files/how to create them? I'm trying to find some clue how to use all these style, cutout and so on stuff...
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | ||
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 851
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
Glad you like it. But sorry to say that I did what you already wrote: Quote:
![]() Valuable sources are especially the XML-Files in PRS-505 FSK.img (new_opt.img), the files in the Sony-Firmware-Updater and at least the Reader-Library Files. Regarding methodes and properties, scan the "defsk-ed" *.xsb, *.xso and *.so files. If you don't have it by now and can't finde Igorsk "deFsk0.2", as I can't find the link right in the moment, ask and I will post it for you. What's possible in XML / JS can be found by try and error, or by using prs+ core dumpingcode "dumpToString" as integrated in the "dictionary.js" If a, fully qualified methode dumps as "a function" you can call it form XML or JS, even if the parent object is dumped as "object with no propertys", if the dump says "undefined" we have bad luck and can't use the function directly. But on the PRS-505 with PRS+ the way over soGetValue and calling the retrieved function should be possible. I also din't start XML files form the scratch, but started to modify existing ones, with a plain code editor like JEdit (as recommended by kartu) or EditPadPro, which is used by me. Both are capable of saving the code in UTF-8, if configured correctly. Regarding this style, skin and cutout-stuff, this all reminds me, the one and other way, to plain old HTML-coding. Examine the code of the games, play with it in this simulator, and see what happens. I also found that assumptions often works well. In the original updater code a <noGrowBorder> is defined. In "connectAssets.xml" there is a style and skin "growBorder",so I simply tried the <growBorder> Tag and it works. |
||
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 41
Karma: 86
Join Date: Jul 2009
Device: PRS-505
|
Hi Mark,
Based on answers to my previous question (as you quotet it here) I got deFsk (btw here: http://projects.mobileread.com/reade...k/DeFsk_02.zip) and studied generated files for some days - really a lot of new information for me. Today I spent whole day playing with your test enviro and I'm stuck with XML. For text element you used skin fileText. I found its definition, I found another definitions as well, but after all my experiments I have not clue what particular parts mean... OK, I'll continue the same way ![]() |
![]() |
![]() |
![]() |
#5 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 318
Karma: 1846
Join Date: Dec 2009
Device: PRS-505
|
Mark Nord
Could you upload the scripts of the calculator? Is it posible to incorporated the calculator in PRS+? Thanks |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 851
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
m-land:
Ok, lets parse the <text> TAG used: <text id="textlines" // a name to adress the object skin="fileText" // skin actually used, definition is in simAssets.xml Lets look on the skin "fileText" which I used because it uses smaller textsize then the text-skin.left="213" right="157" top="207" height="395" // position in respect of the parent align="left" // no comment active="false" // doesn't accept input, If "true" you can type in code (at least under windows) value="textlines"/> // the initial text to be displayed/used variable = "anyvar" // a variable defined by <variable id="anyvar" value="textlines"> to be displayed in "textlines" <skin id="fileText" the cutouts are defined this way:cutouts="text-lt, // Left Top // cutouts defines the visual appearance of the "GUI element" styles="text-e, // styles defines the appearance of text text-ct, // Center Top text-rt, // Right Top text-lm, // Left Middle text-cm, // Center Middle text-rm, // Right Middle text-lb, // Left Bottom text-cb, // Center Bottom text-rb" // Right Bottom text-e, text-p, text-s"/> <texture href="simAssets.png"> // look for the used grafic in this file text-styles comes from:<cutout id="null" x="0" y="0" width="0" height="0"/> .. <cutout id="text-lt" x="306" y="6" width="9" height="9" lines="60"/> <cutout id="text-ct" x="315" y="6" width="30" height="9" lines="60"/> <cutout id="text-rt" x="345" y="6" width="9" height="9" lines="60"/> <cutout id="text-lm" x="306" y="15" width="9" height="30" lines="60"/> <cutout id="text-cm" x="315" y="15" width="30" height="30" lines="60"/> <cutout id="text-rm" x="345" y="15" width="9" height="30" lines="60"/> <cutout id="text-lb" x="306" y="45" width="9" height="9" lines="60"/> <cutout id="text-cb" x="315" y="45" width="30" height="9" lines="60"/> <cutout id="text-rb" x="345" y="45" width="9" height="9" lines="60"/> // lines: grafic is repeated for different "State" all 60 Lines, x, y, width and height are obvious // columns: does the same in horizontal direction <style font="Arial" size="14"> And here are also styles for the four (4) STATES of the element!.. <style id="text-e" halign="left" left="4" top="4" right="4" bottom="4"> // E<nabled <style id="text-d" color="#959595" background="#6D6D6D"/> // D<isabled <style id="text-p" background="#B49AFF"/> // P<ressed <style id="text-s" background="#B49AFF"/> // S<selected (thank's m-land) </style> As far as I can see, that's all that's done/defined here victorsjg: I will upload the scripts and assets when, and only when they reach a public "beta" state. (Expect them in Mid-June) At the moment I'm pleased with the UI, but have to finish some internals and sort out a problem with doDigit() on the PRS-505. Calculator is already running as a "addon" in prs+ on my reader (still with the german v1.4 firmware), but the code will be released as autorun-script, and have kartu to decide if he wants to include it into prs+ kartu: Thanks for the "Fantastic!" Last edited by Mark Nord; 05-30-2010 at 04:27 AM. |
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() Posts: 41
Karma: 86
Join Date: Jul 2009
Device: PRS-505
|
Thanks for explanation, I must be blind with these cutouts.
Regarding text styles: e-enabled d-disabled p-??? s-selected (I found ![]() BTW: bulet you use in FSK test enviro in dictionary leads real reader to hang-up ![]() |
![]() |
![]() |
![]() |
#8 | |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 851
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
If saved in UTF-8 the reader is perfectly capable of displaying all kinds of symbols. As a work around you can try to define Code:
var szBul = String.fromCharCode(149) HTH |
|
![]() |
![]() |
![]() |
#9 | |
Enthusiast
![]() Posts: 41
Karma: 86
Join Date: Jul 2009
Device: PRS-505
|
Quote:
UTF-8 => reader hangs (even with not bullet) ASCII with bullet => reader hangs ASCII with String.fromCharCode(149) => 'squers' are displayed It costs me another couple of reboots, I'll let it be for now ![]() |
|
![]() |
![]() |
![]() |
#10 | |
PRS+ author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
|
m-land
Are you sure you can trust your editor? ![]() Mark Nord Quote:
![]() |
|
![]() |
![]() |
![]() |
#11 | |
Enthusiast
![]() Posts: 41
Karma: 86
Join Date: Jul 2009
Device: PRS-505
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#12 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 851
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
|
![]() |
![]() |
![]() |
#13 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 318
Karma: 1846
Join Date: Dec 2009
Device: PRS-505
|
Is it posible to modify it to use in screen with resolution 1280x800?
thanks |
![]() |
![]() |
![]() |
#14 | |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 851
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
But if you can live without the exact look and feel of a PRS-505 copy the two files in the attachment over the original ones and have a look. [EDIT] 31.05.2010 exchanged "eBookSimMain.xml" So that SUDOKU is the started App. [/EDIT] Last edited by Mark Nord; 05-31-2010 at 02:14 PM. |
|
![]() |
![]() |
![]() |
#15 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 318
Karma: 1846
Join Date: Dec 2009
Device: PRS-505
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |