Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11522 - Make Rockbox recognize Game of Life configurations with a .l extension

Attached to Project: Rockbox
Opened by Justin Hannigan (Chronon) - Friday, 06 August 2010, 18:54 GMT+2
Task Type Patches
Category Plugins
Status Unconfirmed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

Some collections (such as ftp://sunsite.unc.edu/pub/Linux/games/amusements/life/dblifelib-2.tgz) use an extension of ".l" instead of ".cells" for what appears to be the same file format (same comment character and same characters for dead and live cell).

This patch just adds an entry to viewers.config so that Rockbox will treat .l files as supported and open them with Rocklife.
   rocklife_l.patch (0.3 KiB)
 viewers.config |    1 +
 1 file changed, 1 insertion(+)

This task depends upon

Comment by Justin Hannigan (Chronon) - Friday, 06 August 2010, 21:39 GMT+2
I have discovered that some files with a .l extension do not have the same format. These don't pose a problem for rocklife, but will just appear as a blank starting configuration. I will see about adding support for these configs too.
Comment by Justin Hannigan (Chronon) - Friday, 06 August 2010, 22:12 GMT+2
I found a page that describes commonly used file formats here:
http://psoup.math.wisc.edu/mcell/ca_files_formats.html#Life%201.05

I will work on adding support for .LIF .RLE and .L formats.
Comment by Justin Hannigan (Chronon) - Monday, 09 August 2010, 08:08 GMT+2
This patch adds support for both varieties of .l files and should allow for relatively easy inclusion of new formats. Should support any of the files in the archive I linked in the task details.
   rocklife_newformat.patch (7 KiB)
 apps/plugins/rocklife.c     |  186 +++++++++++++++++++++++++++++++++++++-------
 apps/plugins/viewers.config |    1 
 2 files changed, 160 insertions(+), 27 deletions(-)

Comment by Justin Hannigan (Chronon) - Monday, 09 August 2010, 08:23 GMT+2
From http://psoup.math.wisc.edu/mcell/ca_files_formats.html#Life%201.05
===========
dbLife (*.L)

Essentially the same format as RLE. David I. Bell used this format for his large collection dbLifeLib (http://canb.auug.org.au/~dbell/archive/c3.tar.gz). Some patterns in this format mix the Life 1.05 format with RLE.
===========

Time permitting I will next add support for the RLE and Life 1.05 with .rle and .lif extensions (respectively).
Comment by Justin Hannigan (Chronon) - Thursday, 19 August 2010, 04:36 GMT+2
I have found a couple of bugs. I'll upload a new patch when I find some time.
Comment by Justin Hannigan (Chronon) - Sunday, 29 August 2010, 00:56 GMT+2
Here's an updated patch that should open both types of .l files, Life 1.05 (.LIF, .LIFE) and RLE configurations.
   rocklife_newformats.patch (11.9 KiB)
 apps/plugins/rocklife.c     |  313 ++++++++++++++++++++++++++++++++++++++++----
 apps/plugins/viewers.config |    4 
 2 files changed, 290 insertions(+), 27 deletions(-)

Comment by Justin Hannigan (Chronon) - Friday, 03 September 2010, 19:32 GMT+2
Just to clarify, with the newest patch Rocklife should open .cells, .l, .lif, .life, and .rle configurations.
Comment by Justin Hannigan (Chronon) - Thursday, 21 October 2010, 06:52 GMT+2
This patch parses rules from RLE, Life 1.05 and .L files. Status screen now displays currently loaded rule.

For some reason, loading RLE (and RLE-type .L) files crashes the simulator but it seems to work fine on target (tested on Gigabeat F40).

I tested various configurations for some non-standard rule sets and they appear to be working properly. Any feedback would be welcome.
   rocklife_load_rules.patch (17 KiB)
 apps/plugins/rocklife.c     |  413 ++++++++++++++++++++++++++++++++++++++++----
 apps/plugins/viewers.config |    4 
 2 files changed, 385 insertions(+), 32 deletions(-)

Comment by Teruaki Kawashima (teru) - Friday, 22 October 2010, 08:19 GMT+2
here is cleaned up version of the patch with error checks and centering input.
the cause of crash seems to lack of break statement for the case ext_c is b.
also, i think header[30] is a bit small.
   rocklife_load_rules_fix.patch (15.6 KiB)
 apps/plugins/rocklife.c     |  393 +++++++++++++++++++++++++++++++++++++++-----
 apps/plugins/viewers.config |    4 
 2 files changed, 359 insertions(+), 38 deletions(-)

Comment by Justin Hannigan (Chronon) - Friday, 22 October 2010, 17:44 GMT+2
Thank you, teru!
Comment by Justin Hannigan (Chronon) - Monday, 25 October 2010, 17:31 GMT+2
I will work on a patch for the manual to document the changes, should this patch be accepted.
Comment by Justin Hannigan (Chronon) - Friday, 06 May 2011, 07:55 GMT+2
Here is a patch for the manual. It lists the supported file extensions and makes cursory mention of support for alternate rule sets.
Comment by Justin Hannigan (Chronon) - Friday, 06 May 2011, 07:56 GMT+2
Forgot the patch.
   new_configs_manual.patch (1.5 KiB)
 manual/plugins/rocklife.tex |   20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

Loading...