Jump to content
IGNORED

Best C Cross Compiler for TI-99/4A? Possibly with conio.h?


Recommended Posts

Hi!

I am writing an open source cross-platform game for *all* 8-bit computer with enough RAM (about 28-30k).

https://github.com/Fabrizio-Caruso/ASCII-CHASE/releases
My game is written in ANSI C + conio.h + few patches for a couple of specific targets.
It already exists for about 16 different 8-bit computers/configurations with 6502 and Z80 CPUs.
I would like to make a version for computers with "alternative" CPUs such as the TI-99/4A.

What is the easiest solution for a C cross compiler that could generate code for the TI-99/4A?

Ideally I would like to have conio.h for input/output but I can live without it as long as I get:
1. [output] a function to print a given ASCII character at x,y
2. [input] a function to read the keyboard without waiting for a key press

Any suggestions?

Fabrizio

  • Like 2
Link to comment
Share on other sites

There's really only one, but it's a pretty descent port of gcc (version 4.4), and can be found here: http://atariage.com/forums/topic/164295-gcc-for-the-ti/?do=findComment&comment=2028632

The biggest hurdle is getting it up and running on non-Linux systems, but it has been succesfully compiled on macOS and Windows, so it does work.

 

Unfortunately, I'm not aware of a conio.h implementation that's compatible with the TI, but it should be easy enough to put one together. There is Tursi's libti99 though, which is the go-to library for interacting with the computer's HW (screen, keyboard, joysticks, sound, ...): https://github.com/tursilion/libti99

 

Cool idea, by the way, looking forward to seeing the TI supported!

 

*edit* Lee beat me to the punch...

And true, I forgot about c99c ( http://ti99-geek.nl/Projects/c99c/c99c.html), but I do want to add that that is a small-c compiler only, not ANSI C compliant in any way.

Edited by TheMole
Link to comment
Share on other sites

  • 3 months later...

Hi !

 

I have tried to compile my universal 8 bit game CROSS CHASE
https://github.com/Fabrizio-Caruso/CROSS-CHASE

 

with C99C but I soon realized it is not possible because C99C is far from being an ANSI C compiler.
CMOC, CC65 and Z88DK all manage to compile my game for more than 50 different configurations.

I have also tried a precompiled version GCC 6809 for Cygwin but it seems to do nothing with the input files...

I would like to compile my game for the Ti 99 but I have not been able to find anything close to the other 8 bit cross compilers.

Any suggestion? Who has succeded in compiling anything in half-modern C (e.g., possibly with extern , // comments, etc.)

Fabrizio

Edited by Fabrizio Caruso
Link to comment
Share on other sites

Hi !

 

I have tried to compile my universal 8 bit game CROSS CHASE

https://github.com/Fabrizio-Caruso/CROSS-CHASE

 

with C99C but I soon realized it is not possible because C99C is far from being an ANSI C compiler.

CMOC, CC65 and Z88DK all manage to compile my game for more than 50 different configurations.

 

I have also tried a precompiled version GCC 6809 for Cygwin but it seems to do nothing with the input files...

 

I would like to compile my game for the Ti 99 but I have not been able to find anything close to the other 8 bit cross compilers.

 

Any suggestion? Who has succeded in compiling anything in half-modern C (e.g., possibly with extern , // comments, etc.)

 

Fabrizio

 

Have you tried GCC for the TI, yet?

 

...lee

Link to comment
Share on other sites

I thought the Cygwin version is just a port of GCC for TI, which does not work for me.

GCC for TI does not come in a precompiled version and I am scared about the complicated compilation process and all the reported problems.
The latest report on a different thread was about errors.
I would try it if someone reported that it works for medium/big projects.

Link to comment
Share on other sites

I am pretty sure that both @Tursi and @TheMole have compiled sizable projects with it. They should be along shortly to discuss it. I believe others have used it successfully, as well. I have not yet used it, even though C is my favorite non-TI-99/4A language. On the 4A, my fave is Forth, which is no surprise, I'm sure.

 

...lee

  • Like 1
Link to comment
Share on other sites

The GCC port includes a script to build it in whatever environment you're in, you should be able to make that go for you (I did it in Cygwin in the past, my recent build used the Windows Subsystem for Linux. If it works there, it should work anywhere).

 

c99 is K&R syntax, so modern apps require a bit of work to even try to build there.

 

As far as conio goes, I've got a function that handles printing anywhere in my libti99, as well as functions to switch to 40 column if that helps. You can link it or just rip them out as needed. ;) http://github.com/tursilion/libti99

  • Like 1
Link to comment
Share on other sites

Oh, I'd previously built Text Elite with the GCC compiler, but floats were not well supported then and that caused me some grief. Converting ints to chars and back was sometimes an issue. But the compiler has seen a lot of updates since then and is pretty well stable.

Link to comment
Share on other sites

I have tried the Cygwin precompiled version, but it does not seem to work for me.

I have moved the dll files in /bin as described in the readme file but the compiler does nothing with the input files.

 

Where can I find a working version for Cygwin?
If there is no working pre-build Cygwin version where can I at least find a detailed (possibly not too hard) description for the build process for Cygwin?

Edited by Fabrizio Caruso
Link to comment
Share on other sites

Post one of the GCC thread has the patches and the installer -- use the installer to automate the build. - http://atariage.com/forums/topic/164295-gcc-for-the-ti/page-1

 

(Post 1 also has the manual build instructions right above the changelist).

 

I couldn't find the instructions for the installer script, but I know they are in there. I've used it a couple times myself and it goes out and downloads stuff for you. ;) But the manual build isn't too hard!

Link to comment
Share on other sites

I am trying to run install under Cygwin. I guess some files are missing. Maybe in the end it will work. For the moment I am not yet there.

$ ./install.sh ../gcc_ti99
Using these patches:
binutils-2.19.1-tms9900-1.7.patch
gcc-4.4.0-tms9900-1.16.patch

=== Creating output directory ===
=== Getting Binutils sources ===
--2017-11-03 02:41:30-- http://ftp.gnu.org/gnu/binutils/binutils-2.19.1.tar.bz2
Resolving ftp.gnu.org (ftp.gnu.org)... 208.118.235.20
Connecting to ftp.gnu.org (ftp.gnu.org)|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16306586 (16M) [application/x-bzip2]
Saving to: ‘binutils-2.19.1.tar.bz2’

binutils-2.19.1.tar 100%[===================>] 15.55M 312KB/s in 70s

2017-11-03 02:42:41 (228 KB/s) - ‘binutils-2.19.1.tar.bz2’ saved [16306586/16306586]

=== Getting GCC sources ===
--2017-11-03 02:42:41-- http://ftp.gnu.org/gnu/gcc/gcc-4.4.0/gcc-4.4.0.tar.gz
Resolving ftp.gnu.org (ftp.gnu.org)... 208.118.235.20, 2001:4830:134:3::b
Connecting to ftp.gnu.org (ftp.gnu.org)|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 81816176 (78M) [application/x-gzip]
Saving to: ‘gcc-4.4.0.tar.gz’

gcc-4.4.0.tar.gz 100%[===================>] 78.03M 132KB/s in 7m 16s

2017-11-03 02:49:57 (183 KB/s) - ‘gcc-4.4.0.tar.gz’ saved [81816176/81816176]

=== Make build directory ===
=== Decompressing and patching Binutils sources ===
./install.sh: line 83: patch: command not found
=== Failed to patch Binutils sources ===

Edited by Fabrizio Caruso
Link to comment
Share on other sites

That should be pretty easy to resolve - you just need to find out which package to install with Cygwin... By default, it's pretty bare-bones and you need to tell it what features to install.

 

The installer does not seem to work:
$ ./install.sh ../gcc_ti99
./install.sh: line 4: tree: command not found
./install.sh: line 5: tree: command not found

Link to comment
Share on other sites

Right... so you need patch -- you probably don't have GCC installed either, as by default Cygwin doesn't have it (the native GCC is needed to build the GCC cross-compiler). Apparently 'tree' as well... you can read the install script and see what commands it needs, then add them via Cygwin setup.

 

I don't have Cygwin installed or I'd just give you mine, but you can get through it!

Link to comment
Share on other sites

The installer fails to build binutils...
The installer fetches and install the required GCC version (4.4)
I am using the very latest Cygwin version and the installer found on the GCC for TI thread.

What else do I need to build GCC for TI?

Remark: texinfo is installed in Cygwin.

Is there an up to date installer that works with current Cygwin?

./elf.texi:11: raising the section level of @subsubsection which is too low
make[3]: *** [Makefile:394: bfd.info] Error 1
make[3]: Leaving directory '/cygdrive/c/Users/Brizio/Retro/gcc-installer/build/binutils-2.19.1/bfd/doc'
Making info in po
make[3]: Entering directory '/cygdrive/c/Users/Brizio/Retro/gcc-installer/build/binutils-2.19.1/bfd/po'
( if test 'x../.././bfd/po' != 'x.'; then \
posrcprefix='../.././bfd/'; \
else \
posrcprefix="../"; \
fi; \
rm -f SRC-POTFILES-t SRC-POTFILES \
&& (sed -e '/^#/d' \
-e '/^[ ]*$/d' \
-e "s@.*@ $posrcprefix& \\\\@" < ../.././bfd/po/SRC-POTFILES.in \
| sed -e '$s/\\$//') > SRC-POTFILES-t \
&& chmod a-w SRC-POTFILES-t \
&& mv SRC-POTFILES-t SRC-POTFILES )
( rm -f BLD-POTFILES-t BLD-POTFILES \
&& (sed -e '/^#/d' \
-e '/^[ ]*$/d' \
-e "s@.*@ ../& \\\\@" < ../.././bfd/po/BLD-POTFILES.in \
| sed -e '$s/\\$//') > BLD-POTFILES-t \
&& chmod a-w BLD-POTFILES-t \
&& mv BLD-POTFILES-t BLD-POTFILES )
cd .. \
&& CONFIG_FILES=po/Makefile.in:po/Make-in \
CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating po/Makefile.in
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default-1 commands
config.status: executing bfd_stdint.h commands
config.status: executing default commands
make[3]: Nothing to be done for 'info'.
make[3]: Leaving directory '/cygdrive/c/Users/Brizio/Retro/gcc-installer/build/binutils-2.19.1/bfd/po'
make[3]: Entering directory '/cygdrive/c/Users/Brizio/Retro/gcc-installer/build/binutils-2.19.1/bfd'
make[3]: Nothing to be done for 'info-am'.
make[3]: Leaving directory '/cygdrive/c/Users/Brizio/Retro/gcc-installer/build/binutils-2.19.1/bfd'
make[2]: *** [Makefile:1094: info-recursive] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/Brizio/Retro/gcc-installer/build/binutils-2.19.1/bfd'
make[1]: *** [Makefile:3100: all-bfd] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/Brizio/Retro/gcc-installer/build/binutils-2.19.1'
make: *** [Makefile:723: all] Error 2
=== Failed to build Binutils ===
Edited by Fabrizio Caruso
Link to comment
Share on other sites

./elf.texi:11: raising the section level of @subsubsection which is too low

make[3]: *** [Makefile:394: bfd.info] Error 1

make[3]: Leaving directory '/cygdrive/c/Users/Brizio/Retro/gcc-installer/build/binutils-2.19.1/bfd/doc'

Making info in po

make[3]: Entering directory '/cygdrive/c/Users/Brizio/Retro/gcc-installer/build/binutils-2.19.1/bfd/po'

( if test 'x../.././bfd/po' != 'x.'; then \

posrcprefix='../.././bfd/'; \

else \

posrcprefix="../"; \

fi; \

rm -f SRC-POTFILES-t SRC-POTFILES \

&& (sed -e '/^#/d' \

-e '/^[ ]*$/d' \

-e "s@.*@ $posrcprefix& \\\\@" < ../.././bfd/po/SRC-POTFILES.in \

| sed -e '$s/\\$//') > SRC-POTFILES-t \

&& chmod a-w SRC-POTFILES-t \

&& mv SRC-POTFILES-t SRC-POTFILES )

( rm -f BLD-POTFILES-t BLD-POTFILES \

&& (sed -e '/^#/d' \

-e '/^[ ]*$/d' \

-e "s@.*@ ../& \\\\@" < ../.././bfd/po/BLD-POTFILES.in \

| sed -e '$s/\\$//') > BLD-POTFILES-t \

&& chmod a-w BLD-POTFILES-t \

&& mv BLD-POTFILES-t BLD-POTFILES )

cd .. \

&& CONFIG_FILES=po/Makefile.in:po/Make-in \

CONFIG_HEADERS= /bin/sh ./config.status



I have heard people say that Forth is a read only language... :-D

:woozy:


But all joking aside, installing Tursi's GCC port is worth enduring all the pain of this holy-crap complex

installation. From what we have seen it generates excellent 9900 code.

Well... you know, for a C compiler.


(ok just a little joking)
  • Like 1
Link to comment
Share on other sites

@unhuman My problem is not related to tree which I have installed correctly.

Now the error is: make[3]: *** [Makefile:394: bfd.info] Error 1
Remark: I have installed texinfo.

Could you share your working version? Did you build it with the latest Cygwin? Please share it if it is the case.
I don't know what else I have to do to build it.

@TheBF, you are getting the same problem?

Has anyone manage to build it with the very latest Cygwin?

 

Link to comment
Share on other sites

@Tursi, I am getting the error above despite having
gcc (native 6.4.0)
tree
flex
bison
make
...
texinfo
...

The initial error seems to be
make[3]: *** [Makefile:394: bfd.info] Error 1

which does not tell me much.

I have installed and re-installed texinfo with NO issues.

If I run makeinfo --version I get a warning:
"Can't locate ./Config at /usr/bin/makeinfo line 395

texi2any (GNU texinfo) 6.5
"

I am using the very latest Cygwin installation.

Edited by Fabrizio Caruso
Link to comment
Share on other sites

@unhuman My problem is not related to tree which I have installed correctly.

 

Now the error is: make[3]: *** [Makefile:394: bfd.info] Error 1

Remark: I have installed texinfo.

 

Could you share your working version? Did you build it with the latest Cygwin? Please share it if it is the case.

I don't know what else I have to do to build it.

 

@TheBF, you are getting the same problem?

 

Has anyone manage to build it with the very latest Cygwin?

 

 

 

 

I have not tried. I am waiting for al the smoke to clear in this thread.

Link to comment
Share on other sites

I'm not sure whether I can help, since I don't have experience in Cygwin; I'm using Linux natively. My makeinfo says

 

 

$ makeinfo --version
texi2any (GNU texinfo) 6.4
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

 

Could you please zip the texi2any and Makefile files and attach the zip file to your message?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...