Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-05-2011, 03:35 PM   #136
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Quote:
Originally Posted by BenChen View Post
When I tried Sudoku, I couldn't get the menus to work. They would open, but none of the entries were clickable.
Thanks for reporting back.
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);
}
This should work at least with all touch-devices, but will have no effect for 300/505 as there is no HOME-Button calling doRoot.
Mark Nord is offline   Reply With Quote
Old 02-05-2011, 03:49 PM   #137
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
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)
Attached Files
File Type: rar TestApp.rar (91.2 KB, 212 views)

Last edited by Mark Nord; 02-08-2011 at 07:34 AM. Reason: typo
Mark Nord is offline   Reply With Quote
Advert
Old 02-05-2011, 04:17 PM   #138
kartu
PRS+ author
kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.
 
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).
kartu is offline   Reply With Quote
Old 02-06-2011, 02:23 AM   #139
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
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.
BenChen is offline   Reply With Quote
Old 02-06-2011, 02:32 AM   #140
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
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.
BenChen is offline   Reply With Quote
Advert
Old 02-06-2011, 02:39 AM   #141
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
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?
BenChen is offline   Reply With Quote
Old 02-06-2011, 05:52 AM   #142
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
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.
BenChen is offline   Reply With Quote
Old 02-06-2011, 10:56 AM   #143
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
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.
BenChen is offline   Reply With Quote
Old 02-06-2011, 11:37 AM   #144
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
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.
BenChen is offline   Reply With Quote
Old 02-10-2011, 07:57 AM   #145
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
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
BenChen is offline   Reply With Quote
Old 02-11-2011, 12:26 PM   #146
hcripe
Junior Member
hcripe is on a distinguished road
 
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
hcripe is offline   Reply With Quote
Old 02-12-2011, 04:17 AM   #147
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
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!
Quote:
Originally Posted by hcripe View Post
.. the menu list displays, then greys out, ...
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)?
Attached Files
File Type: rar Sudoku-Fix.rar (7.9 KB, 181 views)
Mark Nord is offline   Reply With Quote
Old 02-12-2011, 08:04 AM   #148
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
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>
But that didn't get the HOME button working either. I'm stumped, I'm afraid!

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 02-12-2011, 08:52 AM   #149
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
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
Mark Nord is offline   Reply With Quote
Old 02-12-2011, 09:17 AM   #150
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
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.
BenChen is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 02:24 AM.


MobileRead.com is a privately owned, operated and funded community.