Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-13-2013, 03:37 AM   #1
BigBoot
Member
BigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud of
 
Posts: 15
Karma: 27766
Join Date: Dec 2013
Device: Kobo Aura HD
QtFrotz - Frotz port to Kobo e-readers

Hello,

I've ported Frotz to the Kobo e-readers. Frotz is an interpreter for Infocom games and other Z-machine games. It complies with standard 1.0 of Graham Nelson's specification. It was written by Stefan Jokisch in 1995-1997. It was ported to Unix by Galen Hazelwood. Currently the Unix port is being developed and maintained by David Griffith. The Unix port is also the canonical core version upon which all other ports are based.

Instructions:
  1. You'll need KoboLauncher, so if you haven't already installed it, do so now.
  2. Extract the files to the KoboLauncher directory (.kobo/KoboLauncher on internal storage)
  3. Open the applications.ini file in the KoboLauncher directory and insert the following line:
    Code:
    Frotz = frotz.sh
  4. Start KoboLauncher and open Frotz.

Some notes:
  • To change the font size, click on File->Settings (only works when no game is active), don't set some to crazy values or games will probably crash
  • To quit you first have to quit the game (by typing "QUIT" or pressing File->Exit) and then press File->Exit again
  • The savestates menu seems to cause problems in some games. In these cases just use "SAVE" and "RESTORE" commands.

Sourcecode is attached.

Changelog:
12-13-2013:
  • Fix special keys on keyboard
  • fix savestates
  • fix problems with some "graphics"

BigBoot
Attached Thumbnails
Click image for larger version

Name:	QtFrotz3.png
Views:	650
Size:	35.0 KB
ID:	116626   Click image for larger version

Name:	QtFrotz4.png
Views:	711
Size:	54.4 KB
ID:	116627  
Attached Files
File Type: zip Frotz.zip (85.2 KB, 160 views)
File Type: zip Frotz-12-13-2013.zip (85.6 KB, 216 views)
File Type: zip QtFrotz-src.zip (118.8 KB, 168 views)
BigBoot is offline   Reply With Quote
Advert
Old 12-14-2013, 05:18 AM   #2
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 674
Karma: 77854
Join Date: Apr 2013
Device: Kobo Glo, Kindle 4
First of all, this is a great work

Frotz starts with the screen completely black and a virtual keyboard. I tried to launch this game, but the screen continues to be completely black (Glo 3.1.1) and it's not possible to quit without physical rebooting (I tried both QUIT and file->exit many times). Is there a way to debug it?

Last edited by Lucas Malor; 12-14-2013 at 05:28 AM.
Lucas Malor is offline   Reply With Quote
Old 12-14-2013, 07:09 AM   #3
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 419
Karma: 289158
Join Date: May 2011
Device: Kobo Glo and Aura HD
Nice little app would you mind if I take your work as inspiration and start to add Infocom files support to Koreader? It would be a duplication of efforts on kobos, but it would also benefit kindle owners.
giorgio130 is offline   Reply With Quote
Old 12-14-2013, 07:22 AM   #4
BigBoot
Member
BigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud of
 
Posts: 15
Karma: 27766
Join Date: Dec 2013
Device: Kobo Aura HD
The game doesn't work here to, I will look into this, If this happens again, you should still be able to press Menu->Exit, enter "y" (you will se no input), then you can load another game or quit via Menu->Exit.

@giorgio130
Feel free to do so, i am happy about any improvements to the ereader devices.
BigBoot is offline   Reply With Quote
Old 12-14-2013, 11:08 AM   #5
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 674
Karma: 77854
Join Date: Apr 2013
Device: Kobo Glo, Kindle 4
The y "trick" works. Is it normal that the screen is black even if no game is loaded?

For the record, I tried this one and it works. Probably the first game doesn't work because it uses colors.

EDIT: I confirm this, the b&w version of the game works, even if with some problems.


If someone don't know how to find these games, there's a bunch of interactive novels at IFDB database.

Last edited by Lucas Malor; 12-14-2013 at 11:28 AM.
Lucas Malor is offline   Reply With Quote
Advert
Old 12-14-2013, 11:10 AM   #6
BigBoot
Member
BigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud of
 
Posts: 15
Karma: 27766
Join Date: Dec 2013
Device: Kobo Aura HD
Yes, when no game is loaded, screen is completely black.
BigBoot is offline   Reply With Quote
Old 12-14-2013, 12:43 PM   #7
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,086
Karma: 5821288
Join Date: Dec 2009
Location: The Heart of Texas
Device: JetBook Lite (retired), AuraHD, PDA,
Works fine, except on my AuraHD I am having a lot of trouble getting to the "File" tab. It could just be my device and the IR touchscreen, things in the very corners often are hard to get to respond. Most of the time poking "File" brings down the "Savestate" menus, or is unresponsive. Edit; it is that AuraHD, the IR Touchscreen works much better on my other AuraHD, so Frotz is working fine.

zork1.z5 works fine
Bronze.zblorb gives a fatal error what required a pinhole reset to get out of.

Luck;
Ken

Last edited by Ken Maltby; 12-15-2013 at 03:05 AM.
Ken Maltby is offline   Reply With Quote
Old 12-17-2013, 05:26 AM   #8
traycold
Connoisseur
traycold doesn't littertraycold doesn't litter
 
Posts: 55
Karma: 196
Join Date: Oct 2010
Device: Kobo Glo Hd, Pockebook Inkpad
hi BigBoot,
thank you very much for your effort.
Maybe I found a small bug in the interpreter, i.e.: the abbreviation 'x' (for 'examine') doesn't work.
Having a look at source code, maybe the cause lies in this piece that handles some abbreviations (file: frotz/text.c):
Code:
[..]
    if (f_setup.expand_abbreviations)

	if (padding == 0x05 && decoded[1] == 0)

	    switch (decoded[0]) {
		case 'g': ptr = again; break;
		case 'x': ptr = examine; break;
		case 'z': ptr = wait; break;
	    }
[..]
Since the keyboard forces uppercase, I think the case statements should be switched to uppercase too, to force the 3 abbreviations handled here.

I don't have a development environment, so I can't recompile and verify by myself.
traycold is offline   Reply With Quote
Old 12-17-2013, 06:28 AM   #9
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 674
Karma: 77854
Join Date: Apr 2013
Device: Kobo Glo, Kindle 4
Does abbreviations exists? I discovered a new dimension.
Lucas Malor is offline   Reply With Quote
Old 12-17-2013, 06:52 AM   #10
BigBoot
Member
BigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud of
 
Posts: 15
Karma: 27766
Join Date: Dec 2013
Device: Kobo Aura HD
The abbreviations are handled seperately in qtfrotzview.cpp at around line 605, they should work, at least here they do. Maybe this is a issue specific to the game you are playing.

BigBoot
BigBoot is offline   Reply With Quote
Old 12-18-2013, 03:19 AM   #11
traycold
Connoisseur
traycold doesn't littertraycold doesn't litter
 
Posts: 55
Karma: 196
Join Date: Oct 2010
Device: Kobo Glo Hd, Pockebook Inkpad
Quote:
Originally Posted by BigBoot View Post
Maybe this is a issue specific to the game you are playing.
BigBoot
hi BigBoot, thanks for your feedback.
Actually, it may be that the issue is due to the game (I'm a noob in the world of I.F.), but I tried on many platforms (desktop with Frotz and Gargoyle, android phone with JFrotz) and in all cases the "X" shortcut works correctly on that game. The same behaviour also occurs on the other 2 shortcuts that are managed in the same piece of code (i.e.: Z and G): they don't work only on Kobo-Frotz, while they work correctly on all other readers.
If you want to try, I attach here the game (it's in italian, but even not knowing ther language you can verify that just typing X while Kobo-Frotz respond with "this is as unknown verb", any other reader respond correctly with messsage "what do you want to examine?").

Regards
Attached Files
File Type: zip villa.z5.zip (65.6 KB, 71 views)
traycold is offline   Reply With Quote
Old 12-18-2013, 03:25 AM   #12
BigBoot
Member
BigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud ofBigBoot has much to be proud of
 
Posts: 15
Karma: 27766
Join Date: Dec 2013
Device: Kobo Aura HD
The problem actually is the language, as e.g. 'x' is expanded to examine, which doesn't exists in the game, I will try to find a solution for this.
BigBoot is offline   Reply With Quote
Old 12-18-2013, 04:11 AM   #13
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 674
Karma: 77854
Join Date: Apr 2013
Device: Kobo Glo, Kindle 4
I confirm that it does not work, not only for "examine" but also for the other abbreviations defined by Frotz itself. Abbreviations defined in the game does work.

I see an option_expand_abbreviations = 0 in frotz/frotz_main.c, but it seems it does only appears here and it does not override f_setup.expand_abbreviations (I do not really know how user can change settings). Maybe the problem is with if (padding == 0x05 && decoded[1] == 0).
Lucas Malor is offline   Reply With Quote
Old 12-18-2013, 04:25 AM   #14
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 674
Karma: 77854
Join Date: Apr 2013
Device: Kobo Glo, Kindle 4
Ah, I forgot: "examine" and "wait" do exist in the game I'm playing (the game is "9:05").

Last edited by Lucas Malor; 12-18-2013 at 04:28 AM.
Lucas Malor is offline   Reply With Quote
Old 12-18-2013, 06:34 PM   #15
traycold
Connoisseur
traycold doesn't littertraycold doesn't litter
 
Posts: 55
Karma: 196
Join Date: Oct 2010
Device: Kobo Glo Hd, Pockebook Inkpad
Quote:
Originally Posted by BigBoot View Post
The problem actually is the language, as e.g. 'x' is expanded to examine, which doesn't exists in the game, I will try to find a solution for this.
you were right, infact in the version of the game I uploaded in the previous message, "examine" was not understood (only the italian transaltion "esamina" was working").
So I modified a bit the game, in particular the files dealing with translation into italian, and attached to this message you can find a version that can understand either "x", "examine" and "esamina" with the same meaning.
Anyway, on kobo-frotz, now only "examine" and "esamina" works, "x" is yet not understood (and on desktop interpreters, the 3 words are interpreted).
Hope this may lead you to a solution.
Attached Files
File Type: zip villa.zip (64.3 KB, 74 views)
traycold is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
K5 Frotz curses interface for Kindle Touch (via XTerm) Fvek Kindle Developer's Corner 85 02-14-2016 05:34 AM
Mini Kobo mini charging port loose eufc Kobo Reader 7 04-14-2013 01:52 AM
Kindle Paperwhite: Frotz or other Z-Machine interpreter? ezuk Kindle Developer's Corner 10 01-29-2013 12:18 PM
Frotz zacaj Kindle Developer's Corner 7 05-27-2011 10:48 AM


All times are GMT -4. The time now is 06:03 PM.


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