Jump to content

TheMole

Members
  • Content Count

    824
  • Joined

  • Last visited

Community Reputation

662 Excellent

About TheMole

  • Rank
    Dragonstomper
  • Birthday 09/11/1979

Profile Information

  • Gender
    Male
  • Location
    Belgium

Recent Profile Visitors

8,668 profile views
  1. TheMole

    TheMole

  2. Oh, cool! I'd really love to see Fuzix on the TI!
  3. Well, you should, 'cause otherwise there's no way for your crt0 file to resolve those symbols, nor will the linker know how to organize your binary
  4. Does changing the definition of your segment pointers from "int" to "unsigned int" not help? I'm not sure if the signedness of these symbols would make it so that aren't found, but the values will overflow the range of an int, giving that we have a 16 bit address space. So try extern "unsigned int __VAL_START;" instead of "extern int __VAL_START;", etc... Other than that, I see nothing wrong with your code. You are in fact explicitly invoking the linker though, that's what your ti99_cross_chase.elf target does in your Makefile.
  5. Friend of mine is a Pablodraw wizard... makes mostly portraits of famous military and political figures, mostly in ASCII and recently also PETSCII. it's amazing how instantly recognizable they are... https://www.facebook.com/pg/galzasciiart/photos/?ref=page_internal
  6. For reference, register usage is explained in this post: http://atariage.com/forums/topic/164295-gcc-for-the-ti/?p=2033241 Also worth looking at the next few posts, which explain the calling convention. Do keep in mind there's been quite a few patches since, so there's a chance it has changed a bit in the meantime.
  7. Only js99'er has full F18A support, I'm afraid. What are you trying to run it on?
  8. In researching this, I was just amazed at how powerful linker scripts really can be for a platform like this. The beautiful thing is that without the need for any binary tools at all gcc can create binaries that just work on the ti... Yup, embedded assembly works just fine, as do pure assembly files (although I do think the gcc assembler syntax is slightly different from the EA5 syntax. Not sure how it compares to your toolchain either)
  9. I use linker scripts for my stuff, but I only create cart images (although EA5 format is just a flat binary chopped up in 8k chunks, so it should be easy enough to do with linker scripts and some creative use of cut as well). The following is my linker script for bank switching binaries. It's a bit convoluted, but it automatically adds binary resource to the image and facilitates the bankswitching scheme I'm using. Maybe it's useful for you. /* Linker script to create TI99/4A cartridges */ /* Output straight to a flat binary format (i.e. not ELF) */ OUTPUT_FORMAT(binary) OUTPUT(cartridge.bin) /* TI memory layout */ MEMORY { cart_rom (rx) : ORIGIN = 0x6000, LENGTH = 0x2000 /* cartridge ROM, read-only */ lower_exp (wx) : ORIGIN = 0x2000, LENGTH = 0x2000 /* 8k, not minus 128b */ higher_exp (wx) : ORIGIN = 0xa000, LENGTH = 0x6000 scratchpad (wx) : ORIGIN = 0x8342, LENGTH = 0x00bd /* 32b is for gcc workspace, 34b for audio player workspace */ } /* Where we put sections */ SECTIONS { . = 0x6000; .header0 : { bank0/cart_header.o(.text) } >cart_rom _persistent_src = 0x6000 + SIZEOF(.header0); .persistent : AT ( _persistent_src ) { _persistent = . ; persistent/*.o(.text); _persistent_end = . ; } >lower_exp .bank0 (LOADADDR(.persistent) + SIZEOF( .persistent )) : { _text = . ; bank0/*.o(.text); _text_end = . ; } _scratchpad_src = .; .scratchpad 0x8342 : AT ( _text_end ) { _scratchpad = . ; scratchpad/*.o(.text); _scratchpad_end = . ; } .header1 0x6000 : AT ( 0x8000 ) { bank1/cart_header.o(.text) } .bank1 0x6022 : AT ( 0x8022 ) { bank1/*.o(.text); } .header2 0x6000 : AT ( 0xa000 ) { bank2/cart_header.o(.text) } .bank2 0x6022 : AT ( 0xa022 ) { bank2/*.o(.text); } .header3 0x6000 : AT ( 0xc000 ) { bank3/cart_header.o(.text) } .bank3 0x6022 : AT ( 0xc022 ) { bank3/*.o(.text); } .data 0xa000 : AT ( 0xe000 ) { _data = . ; persistent/*.o( .data ) bank0/*.o( .data ) bank1/*.o( .data ) bank2/*.o( .data ) bank3/*.o( .data ); _data_end = . ; } .binary 0x0000 : AT ( 0x10000 ) { resources/*.o( .data ); } .bss (_data_end) : AT ( 0x80000) { _bss = . ; persistent/*.o( .bss ) bank0/*.o( .bss ) bank1/*.o( .bss ) bank2/*.o( .bss ) bank3/*.o( .bss ); _bss_end = . ; } .fill 0x83fff : AT ( 0x83fff) { BYTE(0x00); } /* Pad to 504kb, 8k less than full image size */ .headerend 0x6000 : AT ( 0x84000) { bankx/cart_header.o(.text) } .fill2 0x85fff : AT ( 0x85fff) { BYTE(0x00); } /* Pad to 512kb, change this to your flash size */ } /* Ensure banks don't call each other's functions directly */ NOCROSSREFS( .bank0 .bank1 .bank2 .bank3)
  10. I use an edited version of the install.sh script that looks like this: # Super simple patch and install script for GCC and Binutils # Base all following work on latest patch versions BINUTILS_PATCH=`tree -ivL 1 . | grep binutils.*.patch | tail -1` GCC_PATCH=` tree -ivL 1 . | grep gcc.*.patch | tail -1` # Extract tool versions from patch name BINUTILS_VERSION=`echo $BINUTILS_PATCH | sed "s/-tms9900.*//"` GCC_VERSION=` echo $GCC_PATCH | sed "s/-tms9900.*//"` # Compose name of source archive BINUTILS_ARCHIVE="$BINUTILS_VERSION.tar.bz2" GCC_ARCHIVE="$GCC_VERSION.tar.gz" # Select download tool if [ ! -z "`which wget`" ]; then WGET="wget " elif [ ! -z "`which curl`" ]; then WGET="curl -O --retry 999 --retry-max-time 0 -C -" fi # Print error text if last command failed check_result () { if [ ! $? == 0 ] ; then echo $1 exit fi } # Check arguments PREFIX=$1 if [ -z $PREFIX ] ; then echo Error: No output directory specified echo echo Usage: echo install.sh DIRECTORY echo The output binaries willl be installed at DIRECTORY/bin exit fi echo "Using these patches:" echo " $BINUTILS_PATCH" echo " $GCC_PATCH" echo echo "=== Creating output directory ===" if [ ! -d $PREFIX ] ; then mkdir -p $PREFIX check_result "=== Failed to create output directory ===" fi START=`pwd` PREFIX=`cd $PREFIX; pwd` echo "=== Getting Binutils sources ===" if [ ! -f $BINUTILS_ARCHIVE ] ; then $WGET http://ftp.gnu.org/gnu/binutils/$BINUTILS_ARCHIVE check_result "=== Failed to get Binutils sources ===" fi echo "=== Getting GCC sources ===" if [ ! -f $GCC_ARCHIVE ] ; then $WGET http://ftp.gnu.org/gnu/gcc/$GCC_VERSION/$GCC_ARCHIVE check_result "=== Failed to get GCC sources ===" fi echo "=== Make build directory ===" if [ ! -d build ] ; then mkdir build check_result "=== Failed to create build directory ===" fi cd build echo "=== Decompressing and patching Binutils sources ===" if [ ! -d $BINUTILS_VERSION ] ; then bunzip2 -c ../$BINUTILS_ARCHIVE > binutils.tar && tar -xf binutils.tar && rm binutils.tar check_result "=== Failed to decompress Binutils sources ===" fi if [ ! -f .binutils_patched ] ; then cd $BINUTILS_VERSION patch -p1 < ../../$BINUTILS_PATCH check_result "=== Failed to patch Binutils sources ===" cd .. touch .binutils_patched fi echo "=== Decompressing and patching GCC sources ===" if [ ! -d $GCC_VERSION ] ; then tar -xzf ../$GCC_ARCHIVE -C . check_result "=== Failed to decompress GCC sources ===" fi if [ ! -f .gcc_patched ] ; then cd $GCC_VERSION patch -p1 < ../../$GCC_PATCH check_result "=== Failed to patch GCC sources ===" cd .. touch .gcc_patched fi echo "=== Building Binutils ===" if [ ! -f .binutils_built ] ; then cd $BINUTILS_VERSION ./configure --target tms9900 --prefix $PREFIX --disable-build-warnings check_result "=== Failed to configure Binutils ===" make all check_result "=== Failed to build Binutils ===" make install check_result "=== Failed to install Binutils ===" cd .. touch .binutils_built fi echo "=== Building GCC ===" if [ ! -f .gcc_built ] ; then cd $GCC_VERSION mkdir build cd build ../configure --prefix $PREFIX --target=tms9900 --enable-languages=c check_result "=== Failed to configure GCC ===" # make all-gcc all-target-libgcc make all-gcc check_result "=== Failed to build GCC ===" make install # Make install has an expected failure: # /bin/bash: line 3: cd: tms9900/libssp: No such file or directory # We do not build libssp, so that's OK cd ../.. touch .gcc_built fi echo === Installation complete === cd $START This doesn't build c++ (which seems to cause issues for Fabrizio) or libgcc, but I don't need those anyway. This works for me on Mac and Linux
  11. Not sure what that would mean... Say you position the cursor at column 4, and start typing... what then ends up in the file before what you just typed? Spaces? A tab? Or nothing at all? And if nothing at all, how does the editor know to start this line at column 4 instead of column one next time you open the file?
  12. Super, super cool stuff. I love these cross-platform Homebrew developments.
×
×
  • Create New...