Author: Ranman
Posted: 20 Feb 2013 10:46:12 pm (GMT -5)
As always... thanks for the kind words Kerm!![Smile]()
Things have been progressing (a little slower than I would like) mostly on some behind the scenes things such as the creation of all of the level packs (8 level packs in all). I can now compile/make all my levels packs with a simple double click on a single BAT file -- you gotta love BAT files.
Here are some screenies:
![]()
![]()
Here is a snippet from my BAT file:
Code:
Line 1: tprbuilder -DJM_BEGINNER_1_4 jm_levels.tpr
This line uses a command line tool called tprbuilder from the GCC4TI & TIGGC IDEs to build my project called jm_levels.tpr (tpr is the file extension for GCC4TI/TIGCC project files) The -D option passes in a macro called JM_BEGINNER_1_4 (essentially the same thing as #define JM_BEGINNER_1_4 in C source code). This macro is used by the C preprocessor; and it allows me to specify at compile time which C code (in this case, level data) will and will not be included in the output file. It outputs a file named jm_levels.z89.
Line 2: ttpack jm_levels.z89 jm_beg_1_4.tt
This line uses a tool called TTPack by Thomas Nussbaumer (included in GCC4TI) to compress the contents of jm_levels.z89 into a file called jm_beg_1_4.tt.
Line 3: copy /b jm_level_marker.txt + jm_beg_1_4.txt + jm_pad_4.bin + jm_beg_1_4.tt jm_beg_1_4.bin
This line basically uses the DOS copy command to concatenate 4 files in binary mode. Jm_level_marker.txt contains a magic number to mark the location of the long name of the level pack. The name of the level pack is contained in jm_beg_1_4.txt. Jm_pad_4.bin contains a 4 byte padding of zeroes. This simply provides separation of the level pack name and the compressed level pack contents (it also gives me a NULL just in case the level pack name is not NULL terminated). And jm_beg_1_4.tt contains the compressed level pack from the previous line. This is all copied/concatenated into a a file called jm_beg_1_4.bin.
Line 4: ttbin2oth -89 jml jm_beg_1_4.bin jmb1
This line uses a utility called TTBin2OTH by Thomas Nussbaumer (included in GCC4TI) to convert the binary file output from the previous line to a variable (file) that the calculator will understand. The output file will be named jmb1.89y. On the calc, the file will have the name jmb1.jml.
All of that to generate a single level pack file. I have to repeat all 4 lines for every level pack.
I hope these details will help someone in the future.![Smile]()
_________________
Ranman
Bringing Randy Glover's Jumpman to the TI-89 calculator. Download available here.
Posted: 20 Feb 2013 10:46:12 pm (GMT -5)
As always... thanks for the kind words Kerm!

Things have been progressing (a little slower than I would like) mostly on some behind the scenes things such as the creation of all of the level packs (8 level packs in all). I can now compile/make all my levels packs with a simple double click on a single BAT file -- you gotta love BAT files.
Here are some screenies:


Here is a snippet from my BAT file:
Code:
tprbuilder -v -DJM_BEGINNER_1_4 jm_levels.tpr
ttpack jm_levels.z89 jm_beg_1_4.tt
copy /b jm_level_marker.txt + jm_beg_1_4.txt + jm_pad_4.bin + jm_beg_1_4.tt jm_beg_1_4.bin
ttbin2oth -89 jml jm_beg_1_4.bin jmb1
Line 1: tprbuilder -DJM_BEGINNER_1_4 jm_levels.tpr
This line uses a command line tool called tprbuilder from the GCC4TI & TIGGC IDEs to build my project called jm_levels.tpr (tpr is the file extension for GCC4TI/TIGCC project files) The -D option passes in a macro called JM_BEGINNER_1_4 (essentially the same thing as #define JM_BEGINNER_1_4 in C source code). This macro is used by the C preprocessor; and it allows me to specify at compile time which C code (in this case, level data) will and will not be included in the output file. It outputs a file named jm_levels.z89.
Line 2: ttpack jm_levels.z89 jm_beg_1_4.tt
This line uses a tool called TTPack by Thomas Nussbaumer (included in GCC4TI) to compress the contents of jm_levels.z89 into a file called jm_beg_1_4.tt.
Line 3: copy /b jm_level_marker.txt + jm_beg_1_4.txt + jm_pad_4.bin + jm_beg_1_4.tt jm_beg_1_4.bin
This line basically uses the DOS copy command to concatenate 4 files in binary mode. Jm_level_marker.txt contains a magic number to mark the location of the long name of the level pack. The name of the level pack is contained in jm_beg_1_4.txt. Jm_pad_4.bin contains a 4 byte padding of zeroes. This simply provides separation of the level pack name and the compressed level pack contents (it also gives me a NULL just in case the level pack name is not NULL terminated). And jm_beg_1_4.tt contains the compressed level pack from the previous line. This is all copied/concatenated into a a file called jm_beg_1_4.bin.
Line 4: ttbin2oth -89 jml jm_beg_1_4.bin jmb1
This line uses a utility called TTBin2OTH by Thomas Nussbaumer (included in GCC4TI) to convert the binary file output from the previous line to a variable (file) that the calculator will understand. The output file will be named jmb1.89y. On the calc, the file will have the name jmb1.jml.
All of that to generate a single level pack file. I have to repeat all 4 lines for every level pack.
I hope these details will help someone in the future.

_________________
Ranman
Bringing Randy Glover's Jumpman to the TI-89 calculator. Download available here.