07-25-2012, 05:20 AM | #1 |
Member
Posts: 23
Karma: 193423
Join Date: Jul 2012
Device: Kindle Touch
|
Frotz curses interface for Kindle Touch & Paperwhite (via kterm)
Frotz version: 2.43d http://frotz.sourceforge.net/
Compiled for Kindle K5 version: 1.1.2 Frotz is an interpreter for Z-machine interactive fiction (Infocom-style text games -- like Zork, Hitchikers Guide to the Galaxy, etc.). It's a console-based program and thus requires a text display. You can use kterm to run it on a Kindle Touch and Paperwhite (see below). It might also work on other models of Kindle or other ARM devices, but I can't test this. It should be able to play any game that frotz-2.43d supports. I've only tested a few. Freefall (http://www.wurb.com/if/game/94) works, so you can now have Tetris on your Kindle too (more or less). For the executable itself, all I did was cross-compile frotz to run on ARM (using the gcc-arm-linux-gnueabi package on Ubuntu). The GPLed source code and more information are on the frotz site (http://frotz.sourceforge.net/). I had to fiddle with the Makefile and use a copy of /usr/lib/libncurses.so.5.6 from the KT to compile, but the only change in the source was to comment-out a sanity check in curses/ux_init.c so it would run as root (there's no regular user account on the Kindle). Otherwise it's vanilla frotz. Sound is deactivated since frotz uses OSS and Kindle Touch uses ALSA and I don't know how to make that work. Color modes, especially color backgrounds, cause weird display issues in kterm, but that can be disabled on the command line (see below). Or you can telnet into your Kindle from something with a color display. Note: Zacaj ported frotz to the Kindle 3 before (https://www.mobileread.com/forums/sho...d.php?t=126768), but he compiled it as the simpler "dumbfrotz" version instead of the normal version that uses the curses library (which lets text displays put characters arbitrarily on the screen, allowing for status bars, etc.). I don't know why he did that, but the curses version is better, ergo this port (also, this is a newer version -- his was 2.32R1). KINDLE UNIFIED APPLICATIONS LAUNCHER EXTENSION: Also included are files so you can use it with the Kindle Unified Applications Launcher (KUAL, see below). It will add a "Start Frotz" option that includes a file selector dialog. This is optional, but without it you'll have to start kterm then type stuff to start frotz. To use the Launcher extension, you will also need the separate "dialog" program installed (see below). I'm distributing it separately since it has general-purpose uses so someone might want just it and I don't want to maintain multiple copies. INSTALLATION: The root of your Kindle's USB drive (what you see when you plug it into your computer) is actually located at "/mnt/us/" inside the Kindle's filesystem. Assume they are the same below for brevity... Installing frotz: 1) For the Touch & Paperwhite, you need baf's kterm (http://www.fabiszewski.net/kindle-terminal/) and anything it needs to run (jail breaking, etc.). Once you got that up and working, continue... 2) Create a folder called "bin" in /mnt/us. If it's already there, good. (Note: You can use a different folder, but you will have to edit start_frotz_shell.sh and frotz_shell.sh in /mnt/us/extensions/frotz/bin/ so they can find it.) 3) Copy the file "frotz" from the bin folder into it. Installing the Launcher extension: 1) Make sure you have KUAL installed (https://www.mobileread.com/forums/sho...d.php?t=203326). 2) Copy the folder "frotz" from the extensions to /mnt/us/extensions/ 3) Get the dialog package attached below and copy the files "dialog" and ".dialogrc" into /mnt/us/bin/ Installing Interactive Fiction Files: You can also create the folder /mnt/us/if/ and put your game files in it. That's where the launcher's file selector defaults to. You can change this location by editing the file /mnt/us/extensions/frotz/bin/frotz_shell.sh Installation complete! Note: any editing of text files above should be done with an editor that can handle unix-style text files. UNINSTALL: Just remove the stuff you added. HOW TO USE: Via Launcher: Run "Kindle Launcher", tap "Start Frotz". You'll get a text-based file selector. If you put your game files in /mnt/us/if/ they'll be listed on the right-hand side. If not, you can change folders using the file selector. Tap the one you want then tap "OK". Invoked from a term: You can run it on its own (if you didn't install the launcher) by starting kterm first, then entering: /mnt/us/bin/frotz -d /mnt/us/if/gamename.z5 If you did the PATH edit mentioned above, you can use just: frotz -d /mnt/us/if/gamename.z5 In both cases replacing the path to the game file and its name as needed. Be sure to use the "-d" option to disable color as that can do ugly things on the epaper display. Hint: In kterm, use the tab key for path/filename completion and the up-arrow to access previous commands. Or type all the above out in full each time on the tiny keyboard as practice for playing text games on your KT. Quitting: To quit frotz, use command "q" and follow the prompts, or if that's not available press the "ctrl" key on the screen keyboard, then the "c" key. Or tap the upper right and select "Quit" from kterm's menu. If launched using the launcher, it will quit to a Kindle screen. If launched from within kterm, it will quit to the command prompt. Saving: Save files will be in /mnt/us/extensions/frotz/bin/ (this is not ideal, but it'll have to do until I figure out how to change it). WHERE TO GET GAME FILES: You can find many games and more info about interactive fiction at the Interactive Fiction Archive (http://www.ifarchive.org/). Last edited by Fvek; 01-29-2013 at 05:53 PM. Reason: updated for kterm and the new Launcher |
07-25-2012, 08:59 AM | #2 |
BLAM!
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
FWIW, the K3 does have the curse library bundled ;-).
|
Advert | |
|
07-28-2012, 02:59 AM | #3 |
Member
Posts: 23
Karma: 193423
Join Date: Jul 2012
Device: Kindle Touch
|
I updated this with a GUI Launcher extension. Because you need to select which game to play, I needed a file selector, so I also ported dialog. It's attached separately in case anyone wants to use it for something else.
I altered the behavior of dialog's file selector to make it easier to use on a touch screen -- you just tap the desired file then tap OK instead of having to use the space key. Otherwise it's the same as the stock version. I don't know if I like how it looks, but it works. |
07-28-2012, 06:39 PM | #4 |
Connoisseur
Posts: 89
Karma: 19669
Join Date: Apr 2012
Device: Kindle Touch
|
Wow, there are almost 600 games in ifarchive, and even more than 50 in my mother language! Entertainment for ages!
Had to edit one of the scripts though, the path wasn't complete (I think a "bin/" was missing in start_frotz_shell.sh, but I'm not 100% sure now). Thanks for opening the doors of this Z-Machine universe to the KT. Edit for Spanish speakers: apparently there's an active community that still develops for Z-Machine, here you can find more than 100 games: http://www.caad.es/taxonomy/term/21 Last edited by atordo; 07-28-2012 at 07:02 PM. |
07-28-2012, 08:13 PM | #5 | |
Member
Posts: 23
Karma: 193423
Join Date: Jul 2012
Device: Kindle Touch
|
Quote:
* If anyone wants a copy of the text editor joe, I got that working and can post it too. It's a lot easier to use than vi (I can never remember how you're supposed to quit vi!) |
|
Advert | |
|
08-01-2012, 07:59 AM | #6 |
Tech Geek Forever
Posts: 230
Karma: 568824
Join Date: Jun 2012
Location: USA
Device: Kindle Touch hacked
|
nothing happens when i tap start frotz in gui launcher.i am using the latest version of this.this works through xterm though.
|
08-01-2012, 08:16 AM | #7 | |
Member
Posts: 23
Karma: 193423
Join Date: Jul 2012
Device: Kindle Touch
|
Quote:
Do you have both start_frotz_shell.sh and frotz_shell.sh in extensions/frotz/bin? Another possibility... I was having problems getting console commands to run from a launched xterm like this. xterm would start then immediately stop without displaying anything. I solved it by adding a "sleep 1" (pause for 1 second) before the command. Maybe making it 2 seconds? |
|
08-01-2012, 08:30 AM | #8 |
Tech Geek Forever
Posts: 230
Karma: 568824
Join Date: Jun 2012
Location: USA
Device: Kindle Touch hacked
|
yes i have done both yet i dont get anything when i tap start frotz.
UPDATE:sorry for bothering you.i must have messed up somewhere.anyway after i installed the latest version of gui launcher collection,the gui launcher frotz started working. Last edited by techiemonkey; 08-03-2012 at 12:56 PM. |
09-24-2012, 10:47 AM | #9 |
Penguin
Posts: 1,017
Karma: 4742434
Join Date: Jul 2012
Device: Kindle Touch 5.3.2.1
|
Where can I get interactive fiction files?
|
09-24-2012, 11:12 AM | #10 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Searching for "frotz interactive fiction" with Google returns many hits, starting with this:
The Interactive Fiction Archive: http://ifarchive.org/ Here is a search engine for that archive: http://wurb.com/if/ When you cannot find what you seek, I recommend that you try using Google. Last edited by geekmaster; 09-24-2012 at 11:18 AM. |
09-24-2012, 12:06 PM | #11 |
Penguin
Posts: 1,017
Karma: 4742434
Join Date: Jul 2012
Device: Kindle Touch 5.3.2.1
|
Thanks.
|
09-27-2012, 07:22 AM | #12 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
hehehe. I managed to lock up my 5 with tetris. Nice work mate.
now where is htop when you need it... *goes off to make one* |
10-13-2012, 05:19 PM | #13 |
Penguin
Posts: 1,017
Karma: 4742434
Join Date: Jul 2012
Device: Kindle Touch 5.3.2.1
|
Hello people, I think I'm being stupid again.
When I try to save a game, Itried lots of different ones, it says save failed. I type in whatever it says the default file name is. Edit: oh, you have to enter the full path in the filename. Last edited by icantbebothered; 10-25-2012 at 12:55 PM. |
10-13-2012, 09:17 PM | #14 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
|
12-27-2012, 05:16 AM | #15 |
Junior Member
Posts: 8
Karma: 10706
Join Date: Nov 2010
Device: Amazon Kindle 3
|
Does this work on the new Kindle Paperwhite?
|
Tags |
dialog, frotz, interactive fiction, launcher add-ons, ncurses, xterm |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Kindle Touch] xterm & matchbox-keyboard | baf | Kindle Developer's Corner | 228 | 05-11-2016 03:50 AM |
Kindle touch landscape and new interface with new update | arad26 | Amazon Kindle | 8 | 04-12-2012 02:28 AM |
new kindle touch user interface? | geekmaster | Kindle Developer's Corner | 1 | 04-10-2012 11:19 AM |
Interface Android Cell Phone via Amazon Kindle Touch | nealsharmon | Kindle Developer's Corner | 11 | 03-01-2012 08:11 PM |
Curses, I like the Kindle 3, sorta. | LDBoblo | Amazon Kindle | 27 | 11-08-2010 06:37 PM |