Skip to content

Commit

Permalink
WIP BROKEN libtifiles: add two variable types which are normally for …
Browse files Browse the repository at this point in the history
…internal use only; tifileutil: add the initial version of an in-tree libtifiles front-end (issue #31), so that it can be used by the libticalcs build; libticalcs: use tifileutil instead of tf2hex + tipack;

Temporarily integrate downstream Debian patch in tf2hex by Andi B. Mundt, possibly unnecessary for tifileutil ?

TODO use tifileutil in libticalcs' ROM dumper build:
    * next commit: use it for the TI-68k dumpers, instead of the custom as & ld header + footer which doesn't compute the trailing checksum;
    * delete tf2hex from libticalcs, simplify the build defs.

Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
  • Loading branch information
debrouxl committed Jan 2, 2021
1 parent afa1774 commit 59bdee4
Show file tree
Hide file tree
Showing 39 changed files with 2,070 additions and 54 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ _linuxpackages: &_linuxpackages
- zlib1g-dev
- libusb-1.0-0-dev
- gettext
- intltool
- bison
- flex
- groff
Expand Down
7 changes: 7 additions & 0 deletions .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ if [ "$PREBUILDER" == "autotools" ]; then
mkdir m4; autoreconf -ivf &
cd ../../libtifiles/trunk
mkdir m4; autoreconf -ivf &
cd ../../tifileutil/trunk
mkdir m4; autoreconf -ivf &
cd ../../libticables/trunk
mkdir m4; autoreconf -ivf &
cd ../../libticalcs/trunk
Expand All @@ -30,6 +32,11 @@ if [ "$PREBUILDER" == "autotools" ]; then
./configure --prefix=${prefixpath}
make -j${NPROC} check
make -j${NPROC} install
cd ../../tifileutil/trunk
cd po; make tifileutil.pot-update; make update-po; cd ..
./configure --prefix=${prefixpath}
make -j${NPROC} check
make -j${NPROC} install
cd ../../libticables/trunk
cd po; make libticables2.pot-update; make update-po; cd ..
./configure --prefix=${prefixpath} --enable-logging --enable-libusb10
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ project(tilibs C CXX)
# - probably doesn't work very well with ancient toolchains or on uncommon OSes
#
# In the future...:
# - TODO: add support to build tifileutil
# - TODO: add support to build the ROM dumpers (will end up just launching the external tools...)
# - WISH: do not hardcode the (auto-generated...) potfiles_* target names
# - WISH: better expose each lib's generated install target (NTS: look at cmake's components feature?)
Expand Down
20 changes: 9 additions & 11 deletions libticalcs/trunk/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ AC_ARG_ENABLE([builtin-rom-dumpers],
[], [enable_builtin_rom_dumpers=yes])

AC_ARG_VAR([SPASM], [SPASM Z80 assembler])
AC_ARG_VAR([TIPACK], [Tool for creating TI variable files])
AC_ARG_VAR([TIFILEUTIL], [Tool for creating TI variable files])
have_spasm=no
have_tipack=no
have_tifileutil=no
have_tigcc=no
: ${SPASM=spasm}
: ${TIPACK=tipack}
: ${TIFILEUTIL=tifileutil}

if test "x$enable_builtin_rom_dumpers" != "xyes" ; then
AC_MSG_CHECKING([whether $SPASM works])
Expand All @@ -224,13 +224,11 @@ EOF
fi
AC_MSG_RESULT([$have_spasm])

if test "x$have_spasm" = "xyes" ; then
AC_MSG_CHECKING([whether $TIPACK works])
if "$TIPACK" conftest.bin -p -o conftest.8xp >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then
have_tipack=yes
fi
AC_MSG_RESULT([$have_tipack])
AC_MSG_CHECKING([whether $TIFILEUTIL works])
if "$TIFILEUTIL" wrap conftest.bin -p -o conftest.8xp >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then
have_tifileutil=yes
fi
AC_MSG_RESULT([$have_tifileutil])

AC_MSG_CHECKING([whether tigcc works])
cat >conftest.c <<EOF
Expand All @@ -256,12 +254,12 @@ EOF
AC_MSG_RESULT([$have_tigcc])
fi

if test "x$have_spasm$have_tipack" = "xyesyes" ; then
if test "x$have_spasm$have_tifileutil" = "xyesyes" ; then
build_z80_rom_dumpers=yes
else
build_z80_rom_dumpers=no
if test "x$enable_builtin_rom_dumpers" = "xno" ; then
AC_MSG_FAILURE([spasm and/or tipack are not installed or are not usable.])
AC_MSG_FAILURE([spasm and/or tifileutil are not installed or are not usable.])
fi
fi

Expand Down
57 changes: 27 additions & 30 deletions libticalcs/trunk/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

AM_CFLAGS = -Wall -W

SUBDIRS = tf2hex romdump_8x romdump_84p_usb romdump_834pce_usb romdump_9x
SUBDIRS = romdump_8x romdump_84p_usb romdump_834pce_usb romdump_9x

# libraries and files to compile and install
lib_LTLIBRARIES = libticalcs2.la
Expand Down Expand Up @@ -46,9 +46,6 @@ if OS_WIN32
libticalcs2_la_DEPENDENCIES = ../build/mingw/ticalcs2-rc.o
libticalcs2_la_LDFLAGS += -Wl,../build/mingw/ticalcs2-rc.o -Wl,--output-def,libticalcs2.def
EXTRA_DIST = libticalcs2.def
tf2hex = ./tf2hex/tf2hex.exe
else
tf2hex = ./tf2hex/tf2hex
endif


Expand All @@ -58,41 +55,41 @@ if BUILD_Z80_ROM_DUMPERS

BUILT_SOURCES += rom73.h rom82.h rom83.h rom83p.h rom84p.h rom84pc.h rom84pcu.h rom834pceu.h rom85.h rom86.h

rom73.h: romdump_8x/dump73.73p $(tf2hex)
$(tf2hex) romdump_8x/dump73.73p $(srcdir)/rom73.h 73
rom73.h: romdump_8x/dump73.73p $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_8x/dump73.73p $(srcdir)/rom73.h romDump73 romDumpSize73 8 64

rom82.h: romdump_8x/dump82.82y $(tf2hex)
$(tf2hex) romdump_8x/dump82.82y $(srcdir)/rom82.h 82
rom82.h: romdump_8x/dump82.82y $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_8x/dump82.82y $(srcdir)/rom82.h romDump82 romDumpSize82 8 64

rom83.h: romdump_8x/dump83.83p $(tf2hex)
$(tf2hex) romdump_8x/dump83.83p $(srcdir)/rom83.h 83
rom83.h: romdump_8x/dump83.83p $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_8x/dump83.83p $(srcdir)/rom83.h romDump83 romDumpSize83 8 64

rom83p.h: romdump_8x/dump83p.8xp $(tf2hex)
$(tf2hex) romdump_8x/dump83p.8xp $(srcdir)/rom83p.h 8Xp
rom83p.h: romdump_8x/dump83p.8xp $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_8x/dump83p.8xp $(srcdir)/rom83p.h romDump8Xp romDumpSize8Xp 8 64

rom84pc.h: romdump_8x/dump84pc.8xp $(tf2hex)
$(tf2hex) romdump_8x/dump84pc.8xp $(srcdir)/rom84pc.h 84pc
rom84pc.h: romdump_8x/dump84pc.8xp $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_8x/dump84pc.8xp $(srcdir)/rom84pc.h romDump84pc romDumpSize84pc 8 64

rom85.h: romdump_8x/dump85.85s $(tf2hex)
$(tf2hex) romdump_8x/dump85.85s $(srcdir)/rom85.h 85
rom85.h: romdump_8x/dump85.85s $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_8x/dump85.85s $(srcdir)/rom85.h romDump85 romDumpSize85 8 64

rom86.h: romdump_8x/dump86.86p $(tf2hex)
$(tf2hex) romdump_8x/dump86.86p $(srcdir)/rom86.h 86
rom86.h: romdump_8x/dump86.86p $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_8x/dump86.86p $(srcdir)/rom86.h romDump86 romDumpSize86 8 64

romdump_8x/dump73.73p romdump_8x/dump82.82y romdump_8x/dump83.83p romdump_8x/dump83p.8xp romdump_8x/dump85.85s romdump_8x/dump86.86p romdump_8x/dump84pc.8xp:
cd romdump_8x && $(MAKE)

rom84p.h: romdump_84p_usb/dump84p.8xp $(tf2hex)
$(tf2hex) romdump_84p_usb/dump84p.8xp $(srcdir)/rom84p.h 84p
rom84p.h: romdump_84p_usb/dump84p.8xp $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_84p_usb/dump84p.8xp $(srcdir)/rom84p.h romDump84p romDumpSize84p 8 64

rom84pcu.h: romdump_84p_usb/dump84pcu.8xp $(tf2hex)
$(tf2hex) romdump_84p_usb/dump84pcu.8xp $(srcdir)/rom84pcu.h 84pcu
rom84pcu.h: romdump_84p_usb/dump84pcu.8xp $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_84p_usb/dump84pcu.8xp $(srcdir)/rom84pcu.h romDump84pcu romDumpSize84pcu 8 64

romdump_84p_usb/dump84p.8xp romdump_84p_usb/dump84pcu.8xp:
cd romdump_84p_usb && $(MAKE)

rom834pceu.h: romdump_834pce_usb/dump834pceu.8xp $(tf2hex)
$(tf2hex) romdump_834pce_usb/dump834pceu.8xp $(srcdir)/rom834pceu.h 834pceu
rom834pceu.h: romdump_834pce_usb/dump834pceu.8xp $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_834pce_usb/dump834pceu.8xp $(srcdir)/rom834pceu.h romDump834pceu romDumpSize834pceu 8 64

romdump_834pce_usb/dump834pceu.8xp:
cd romdump_834pce_usb && $(MAKE)
Expand All @@ -103,14 +100,14 @@ if BUILD_68K_ROM_DUMPERS

BUILT_SOURCES += rom89.h rom89t.h rom92f2.h

rom89.h: romdump_9x/romdump.89z $(tf2hex)
$(tf2hex) romdump_9x/romdump.89z $(srcdir)/rom89.h 89
rom89.h: romdump_9x/romdump.89z $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_9x/romdump.89z $(srcdir)/rom89.h romDump89 romDumpSize89 8 64

rom89t.h: romdump_9x/romdumpu.89z $(tf2hex)
$(tf2hex) romdump_9x/romdumpu.89z $(srcdir)/rom89t.h 89t
rom89t.h: romdump_9x/romdumpu.89z $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_9x/romdumpu.89z $(srcdir)/rom89t.h romDump89t romDumpSize89t 8 64

rom92f2.h: romdump_9x/romdump.92p $(tf2hex)
$(tf2hex) romdump_9x/romdump.92p $(srcdir)/rom92f2.h 92
rom92f2.h: romdump_9x/romdump.92p $(TIFILEUTIL)
$(TIFILEUTIL) dump chexarray romdump_9x/romdump.92p $(srcdir)/rom92f2.h romDump92 romDumpSize92 8 64

romdump_9x/romdump.89z:
cd romdump_9x && $(MAKE)
Expand Down
2 changes: 1 addition & 1 deletion libticalcs/trunk/src/romdump_834pce_usb/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ endif
dump834pceu.bin: romdump.z80
$(SPASM) $(SPASMFLAGS) -A -DTI834PCE $(srcdir)/romdump.z80 dump834pceu.bin
dump834pceu.8xp: dump834pceu.bin
$(TIPACK) -n 'ROMDUMP' dump834pceu.bin -p -o dump834pceu.8xp
$(TIFILEUTIL) -n 'ROMDUMP' dump834pceu.bin -p -o dump834pceu.8xp
4 changes: 2 additions & 2 deletions libticalcs/trunk/src/romdump_84p_usb/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ endif
dump84p.bin: romdump.z80
$(SPASM) $(SPASMFLAGS) -A -DTI84P $(srcdir)/romdump.z80 dump84p.bin
dump84p.8xp: dump84p.bin
$(TIPACK) -n 'ROMDUMP' dump84p.bin -p -o dump84p.8xp
$(TIFILEUTIL) -n 'ROMDUMP' dump84p.bin -p -o dump84p.8xp

dump84pcu.bin: romdump.z80
$(SPASM) $(SPASMFLAGS) -A -DTI84PC $(srcdir)/romdump.z80 dump84pcu.bin
dump84pcu.8xp: dump84pcu.bin
$(TIPACK) -n 'ROMDUMP' dump84pcu.bin -p -o dump84pcu.8xp
$(TIFILEUTIL) -n 'ROMDUMP' dump84pcu.bin -p -o dump84pcu.8xp
14 changes: 7 additions & 7 deletions libticalcs/trunk/src/romdump_8x/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ dump86.bin: romdump.asm romdump.inc ti86defs.inc defs.inc main.asm \
$(SPASM) $(SPASMFLAGS) -A -DTI86 -I $(srcdir) $(srcdir)/romdump.asm dump86.bin

dump73.73p: dump73.bin
$(TIPACK) -n 'ROMDUMP' dump73.bin -p -o dump73.73p
$(TIFILEUTIL) -n 'ROMDUMP' dump73.bin -p -o dump73.73p

dump82.82y: dump82.bin
$(TIPACK) -n '$$RD' dump82.bin -o dump82.82y
$(TIFILEUTIL) -n '$$RD' dump82.bin -o dump82.82y

dump83.83p: dump83.bin
$(TIPACK) -n 'ROMDUMP' dump83.bin -p -o dump83.83p
$(TIFILEUTIL) -n 'ROMDUMP' dump83.bin -p -o dump83.83p

dump83p.8xp: dump83p.bin
$(TIPACK) -n 'ROMDUMP' dump83p.bin -p -o dump83p.8xp
$(TIFILEUTIL) -n 'ROMDUMP' dump83p.bin -p -o dump83p.8xp

dump84pc.8xp: dump84pc.bin
$(TIPACK) -n 'ROMDUMP' dump84pc.bin -p -o dump84pc.8xp
$(TIFILEUTIL) -n 'ROMDUMP' dump84pc.bin -p -o dump84pc.8xp

dump85.85s: dump85.bin
$(TIPACK) -n '$$RD' dump85.bin -o dump85.85s
$(TIFILEUTIL) -n '$$RD' dump85.bin -o dump85.85s

dump86.86p: dump86.bin
$(TIPACK) -n 'ROMDump' dump86.bin -o dump86.86p
$(TIFILEUTIL) -n 'ROMDump' dump86.bin -o dump86.86p
2 changes: 1 addition & 1 deletion libticalcs/trunk/src/tf2hex/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ CLEANFILES = tf2hex
all: tf2hex

tf2hex: tf2hex.cc
$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $(srcdir)/tf2hex.cc -o tf2hex
$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $(CPPFLAGS) $(LDFLAGS) $(srcdir)/tf2hex.cc -o tf2hex
4 changes: 4 additions & 0 deletions libtifiles/trunk/po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,10 @@ msgstr "Zoom"
msgid "Table Setup"
msgstr "Tabellen Einstellungen"

#: src/types83p.cc:55
msgid "App Obj"
msgstr ""

#: src/types83p.cc:56 src/typesoldz80.cc:66
msgid "App Var"
msgstr "Anwendungsvariablen"
Expand Down
4 changes: 4 additions & 0 deletions libtifiles/trunk/po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,10 @@ msgstr "Zoom"
msgid "Table Setup"
msgstr "Config Table"

#: src/types83p.cc:55
msgid "App Obj"
msgstr "Objet Application"

#: src/types83p.cc:56 src/typesoldz80.cc:66
msgid "App Var"
msgstr "Variable Application"
Expand Down
4 changes: 4 additions & 0 deletions libtifiles/trunk/po/libtifiles2.pot
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ msgstr ""
msgid "Table Setup"
msgstr ""

#: src/types83p.cc:55
msgid "App Obj"
msgstr ""

#: src/types83p.cc:56 src/typesoldz80.cc:66
msgid "App Var"
msgstr ""
Expand Down
4 changes: 2 additions & 2 deletions libtifiles/trunk/src/types83p.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ const TI83p_DATA TI83p_CONST[TI83p_MAXTYPES + 1] =
{"TABLE", "8Xt", "8Xt", "8Xt", "8Xt", "8Xt", "8Xt", "Table Setup", N_("Table Setup")},
{"", "8X?", "8X?", "8X?", "8X?", "8X?", "8X?", "Unknown", N_("Unknown")},
{"BKUP", "8Xb", "8Xb", "8Xb", "8Xb", "8Xb", "8Xb", "Backup", N_("Backup")},
{"", "8X?", "8X?", "8X?", "8X?", "8X?", "8X?", "Unknown", N_("Unknown")}, // 20, 0x14
{"APPOBJ", "8Xv", "8Xv", "8Xv", "8Xv", "8Xv", "8Xv", "Unknown", N_("App Obj")}, /* AppObj */ // 20, 0x14
{"APPV", "8Xv", "8Xv", "8Xv", "8Xv", "8Xv", "8Xv", "App Var", N_("App Var")},
{"TPRGM", "8Xp", "8Xp", "8Xp", "8Xp", "8Xp", "8Xp", "Program", N_("Program")}, /* TempProg */
{"TPRGM", "8Xp", "8Xp", "8Xp", "8Xp", "8Xp", "8Xp", "Program", N_("Program")}, /* TempProgObj */
{"GRP", "8Xo", "8Xo", "8Xo", "8Xo", "8Xo", "8Xo", "Group Var", N_("Group Var")}, // Also 8Xg
{"REAL", "8Xn", "8Xn", "8Xn", "8Xn", "8Xn", "8Xn", "Real", N_("Real")}, /* Fraction */
{"DIR", "8X?", "8X?", "8X?", "8X?", "8X?", "8X?", "Unknown", N_("Unknown")}, // 25, 0x19
Expand Down
2 changes: 2 additions & 0 deletions libtifiles/trunk/src/types83p.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
#define TI83p_TAB 0x11 //deprecated
#define TI83p_TABLE 0x11
#define TI83p_BKUP 0x13
#define TI83p_APPOBJ 0x14
#define TI83p_APPVAR 0x15 //deprecated
#define TI83p_APPV 0x15
#define TI83p_TEMPPROGOBJ 0x16
#define TI83p_GRP 0x17
#define TI83p_DIR 0x19
#define TI83p_AMS 0x23
Expand Down
2 changes: 2 additions & 0 deletions libtifiles/trunk/src/types84p.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
#define TI84p_TAB 0x11 //deprecated
#define TI84p_TABLE 0x11
#define TI84p_BKUP 0x13
#define TI84p_APPOBJ 0x14
#define TI84p_APPVAR 0x15 //deprecated
#define TI84p_APPV 0x15
#define TI84p_TEMPPROGOBJ 0x16
#define TI84p_GROUP 0x17
#define TI83pce_SIMPLEFRAC 0x18
#define TI84p_DIR 0x19
Expand Down
22 changes: 22 additions & 0 deletions tifileutil/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Lionel Debroux: maintainer (2009-): tifileutil
==============================================

web: http://lpg.ticalc.org/prj_tilp , http://tict.ticalc.org , https://tiplanet.org
mail: lionel_debroux@yahoo.fr

Benjamin Moody (FloppusMaximus): tipack, etc.
=============================================

web: http://lpg.ticalc.org/prj_tilem/index.html
mail: benjamin.moody@gmail.com

Romain Liévin (roms): former maintainer (1999-2009), tf2hex
===========================================================

web: http://lpg.ticalc.org/prj_tilp
mail: roms@tilp.info

Jon Sturm (Jonimus): titools
============================

mail: jonimoose@gmail.com
Loading

0 comments on commit 59bdee4

Please sign in to comment.