![]() |
#136 | |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
Interesting as your menu in FiveInARow is build pretty much the same!? As for kartus suggestion, I think we can simply include this code in every App Code:
target.doRoot = function () { kbook.autoRunRoot.exitIf(kbook.model); } |
|
![]() |
![]() |
![]() |
#137 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
FSK - Timer
Interim Report:
I have set up some Timer-Actions within TestApp. App should be run in the Sim-Enviro with the PRS-505 skin. FreeCell / FreeCell-Skins had to be in the addons-path. (+) SIZE Starts/Stops Timer Action Digit changes Card and Timer-Duration You can also edit JS Code to use .scheduleRepeating instead of .schedule Code works as expected in the SimEnviro = Card is moved to the right. But if executed on my PRS-505 some strange things happens: At a schedule(Repeating) = 1000 the card keeps moving, at a higher schedule nothing seams to happen until you press a key, then one or more scheduled actions take place. (Ok not so well described). I assume the A) screenrefresh or B) the main-processor enter any kind of sleep-mode Havn't tried yet to keep the main-processor bussy by some dummy-calculations in a loop. PS: For the x50 Series there should be a hardware.timer with the ability to wake a suspended JS-Engine. (I think this is used in the porkupan/boroda x50 firmware to have a "ticking" clock) Last edited by Mark Nord; 02-08-2011 at 07:34 AM. Reason: typo |
![]() |
![]() |
Advert | |
|
![]() |
#138 |
PRS+ author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
|
Mark,
the timers do not work reliably, because of CPU going into sleep mode. This was first encountered with Screenshot addon, depending on where you were saving it, timer was or was not fired in time. But it should be possible to explicitly force CPU to not go to sleep using setProcessing call (don't remember who has it, probably ebook). |
![]() |
![]() |
![]() |
#139 |
EPUB Metadata ******
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
|
Well, thanks to Kartu's code for forcing a screen-refresh, I don't think I need to worry about timers any more. But thanks, Mark, for working this out! I'm sure it will come in handy for future applications.
|
![]() |
![]() |
![]() |
#140 |
EPUB Metadata ******
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
|
Mark's suggestion for using the HOME button for quit is excellent. That button has already been used for that in Mahjong and Free Cell. It could be easily added to the others.
I am thinking about some additions to Chess: 1. Quit using HOME. 2. Auto-move mode (using Kartu's code). But this will be limited to human as white and reader as black. (You could always use the manual button to play black against the reader!) 3. An undo button. So, if Kartu is not going to get these games into the prs+ alpha, then I guess I have a bit of time to work on it! I can also do updates for Five In A Row and Five Balls with the HOME button functioning as quit. (Maybe I can make the menus a bit bigger while I am at it...) Sincerely, Ben. |
![]() |
![]() |
Advert | |
|
![]() |
#141 |
EPUB Metadata ******
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
|
Just noticed that for all games (except Five Balls) the "0" button could be used as a quit button on the non-touch readers. Is that worth trying?
|
![]() |
![]() |
![]() |
#142 |
EPUB Metadata ******
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
|
I have updated Chess (see post #118). Changes as follows:
1. Quit using HOME. 2. Auto-move mode (using Kartu's code). But this will be limited to human as white and reader as black. (You can always use the manual button to play black against the reader!) 3. An undo button. More details in the prior post. |
![]() |
![]() |
![]() |
#143 |
EPUB Metadata ******
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
|
Sorry to the one person who already downloaded the Chess game, but I updated it again.
TINY UPDATE: Undo now allows you to continue if your were in checkmate and you press undo. Sincerely, Ben. |
![]() |
![]() |
![]() |
#144 |
EPUB Metadata ******
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
|
Sorry to the two people who just downloaded the update, but I've made another small change.
ANOTHER TINY UPDATE: If you force a white AI move (with the SIZE button) when Auto is On, the reader will now automatically do the subsequent Black move as you would expect. (This is what comes from uploading an update and then doing further checking!) Last edited by BenChen; 02-07-2011 at 03:06 AM. |
![]() |
![]() |
![]() |
#145 |
EPUB Metadata ******
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
|
Games for Sony Readers (an updated collection)
Hi everyone,
I have updated all of the games and so it seemed sensible to place them all in one post. I have attempted to give the games more of an overall similarity in terms of the interface. Consequently, for a non-touch reader pressing the "0" button in 4 of the 5 games will quit the game. (The exception is Fiveballs which has 10 columns and so needs the 0 button for one of the columns.) Similarly, for the touch readers, they all now have "Quit" buttons near the upper right corner. (In addition, pressing the HOME or ROOT button will exit too.) I am looking forward to seeing these games incorporated into PRS+, so if anyone finds a problem please let me know so that the code can be fixed in time. Sincerely, Ben. UPDATE 1: Problem with Mahjong. I discovered that Mahjong was freezing on my reader when I tried it out. (It wouldn't even start. It does now.) UPDATE 2: As per Kartu's request, I have removed the non-ascii copyright character from these zip files. (It mostly affected just the PRS+ startup files.) UPDATE 3: Kartu pointed out that the 300 does not have PREV and NEXT buttons. So I have made changes to the non-touch version so that buttons 9 and 0 are used instead (for "new game" and "quit" you now need to hold the buttons down). UPDATE 4: FreeCell now has the ability to move more than one card at a time, if they are already in order and if there are enough freecells to make the move. NOTE: Zip files are now located in post #193. Last edited by BenChen; 03-20-2011 at 11:36 AM. Reason: Zip files moved to different post |
![]() |
![]() |
![]() |
#146 |
Junior Member
![]() Posts: 5
Karma: 55
Join Date: Feb 2010
Location: Kansas - USA
Device: Sony PRS-600
|
I am trying out building new PRS+ firmware for my PRS-600, and have gotten all of the games working (Chess, Fiveballs, Fiverow, Freecell and Mahjong) except for Sudoku. I am experiencing the same issue as kartu with the Sudoku app. It starts and displays properly, you can touch on the menu options and the menu list displays, then greys out, and I they don't do anything except close the menu when pressed.
I would like to thank everyone for their work on all of this - it really improves the Sony readers and gives them great additional features. Let me know if I can help testing anything. Howard |
![]() |
![]() |
![]() |
#147 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Hello Howard!
Thanks for reporting, and offering help! Welcome to MR! This points to a failure in the function "always" which needs to return "true" to have a menu-entry active. In the first "clickable" version this was the only action for this function. Also in Ben's FiveInARow the function does barely more then return "true". Since the "_Final" code version of sudoku I have included code to stop the Win-Game-Animation in "always". So maybe this is the reason for failing on a real device. ![]() So I put a TRY-CATCH block around the suspicious code and also included code to exit the game by pressing the HOME-button. If somebody would be so kind an try this with his device? While testing you can "GAME" - "Load" a filled grid and win by putting in the last number. Is the Win-Annimation working, and will is stop by tapping the (invicible) menu? I also don't know if save-game is working. As the savegame-file is created in the applictions-folder, this folder had to be writeable. I assume kartu has chosen the /dict/ folder because it will be writeable, but I don't know for sure. PS: is the menubar large enough or should it be wider (higher)? |
![]() |
![]() |
![]() |
#148 |
EPUB Metadata ******
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
|
Hi Mark,
I gave it a try on my 600. It didn't make a difference: the menus still don't work. Neither did pressing the HOME button to exit. When I took a look, I thought that was because the following was missing from the <code> section of the sudoku.xml file: Code:
<function id="doRoot"> this.doRoot(); </function> Sincerely, Ben. |
![]() |
![]() |
![]() |
#149 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Thank you Ben,
may I ask you to try the very first version of sudoku in post #32? It was reported to be working, but will freeze the touch-interface on exit, because of the missing loop-breaking code. If the HOME button isn't working it seams that the code breaks any where in init. ![]() It is proof of concept, that you can define a "system do-functuion" just in JS-code, without notice it in the XML. (See doHold# in FreeCell for instance) Or just a second thought: It seams that the reader had to go thru a full restart cycle before accepting modified code. (You have once deleted a try-catch block from startup-code, which couldn't have done any harm, and got the App working afterwards) Regards Mark |
![]() |
![]() |
![]() |
#150 |
EPUB Metadata ******
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
|
Hi Mark,
I tried Sudoku_Click.zip. The game starts, and the menu is clickable. At least, I was able to quit using the menu. But then my touch screen would accept no further clicks. I had to do another hard reset. Sincerely, Ben. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |