Jump to content

Photo

GCC for the TI


448 replies to this topic

#376 ElectricLab OFFLINE  

ElectricLab

    Chopper Commander

  • 245 posts
  • Location:Hillsboro, Oregon

Posted Thu Aug 9, 2018 10:45 AM

I am just 1000% opposed to promoting multipurposing the TIPI's PI.

To each their own. I have lots of counter arguments, but none of that has to do with gcc.

(Does anyone really think I waste any time transferring files in my dev workflow when there are 200 ways to automate that for Unix to Unix?)

 

I can respect your stance on further multi-purposing of the tipi-connected Pi, especially since in increases the likelihood of problems and need for support which is outside the scope of TIPI, but people might still expect you to help. 

 

Also - No, I didn't imagine you were manually copying files. I was referring to the transfer time required, automated or no :)



#377 BeeryMiller OFFLINE  

BeeryMiller

    Dragonstomper

  • 733 posts
  • Location:Campbellsburg, KY

Posted Thu Aug 9, 2018 11:00 AM

I have almost zero knowledge on the use of the Raspberry PI or anything Unix related.  I have two PI's, one never even used, waiting for the TIPI.  The other I have played around with a bit but beyond getting a working image to get online, that is about it.  I did not even know the "lite" version had no desktop.

 

Myself, I was interested in some of the work Matt was doing and wondering if I could kill two birds with one stone with the gcc utilities and the TIPI.  Thought it would make an interesting development platform if the possibility existed for either the TI-99/4A or Geneve.

 

At some point in time, I will need to get one of those books for "Dummies" to fully understand the layout, directories, etc.  At this point in time, I just do not know the system to know what it can or can not do, or its limitations, thus my inquiry.

 

Beery



#378 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • 1,826 posts
  • Location:Beaverton, OR

Posted Thu Aug 9, 2018 11:03 AM

That's all funny...

 

Ok, people can expect that I'd help, but they'd be wrong.  I don't have gcc setup on any raspbian system... and cannot help with systems I don't have. That's what you are for! 

 

--------- 

 

Let's not forget the real question at hand!  Atari guy wants -lgcc to work. And so do we.  I've put hours into trying to figure that out, but have not been  able to get it to build. 

 

Insomnia's recommendation a few weeks ago wasn't enough to get there.  I'm still stuck on this too.  Luckily, I don't have an immediate need, but I can see  Irata Online requiring more maths.

 

-M@



#379 TheMole OFFLINE  

TheMole

    Dragonstomper

  • 807 posts
  • Location:Belgium

Posted Thu Aug 9, 2018 11:28 AM

 

Right. Where's the best place to get started with this bad-boy?

 

Uhm, sorry Willsy, not sure what else you're asking for... did you miss my prior post or was something not clear?

 

http://atariage.com/...e-ti/?p=4088115



#380 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Thu Aug 9, 2018 2:41 PM

$ /cygdrive/d/tms9900/bin/tms9900-gcc protocol.c
/cygdrive/d/tms9900/lib/gcc/tms9900/4.4.0/../../../../tms9900/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status

this is after building libgcc and running make install in the build dir to install it. 
-Thom


#381 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Thu Aug 9, 2018 3:59 PM

Before I start cobbling together a Makefile from libti99, has anyone made a generic Makefile for ti99 projects?

 

-Thom



#382 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Thu Aug 9, 2018 6:03 PM

Getting farther, my little test harness is compiling, but...

tms9900-gcc -c crt0.c -std=c99 -Os --save-temp -I/home/thomc/Workspace/libti99 -I/cygdrive/d/tms9900/lib/gcc/tms9900/4.4.0/include -o crt0.o
tms9900-gcc -c main.c -std=c99 -Os --save-temp -I/home/thomc/Workspace/libti99 -I/cygdrive/d/tms9900/lib/gcc/tms9900/4.4.0/include -o main.o
tms9900-ld crt0.o main.o --script=linkfile -L/home/thomc/Workspace/libti99 -lti99 -o plato.elf -Map=mapfile
elf2ea5 plato.elf plato.bin
Warning: no "_init_data" symbol found

???

 

-Thom



#383 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Thu Aug 9, 2018 6:11 PM

FWIW, I was able to build libgcc and place it in tms9900's libgcc libdir, use a -L for that lib directory, and link against it.

 

-Thom



#384 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Thu Aug 9, 2018 7:19 PM

Ok, so I've checked in the first commit of PLATOTerm99 code:

 

http://github.com/ts...909/platoterm99

 

It compiles and an elf and bin spits out.

 

But, ea5split doesn't produce anything, am assuming that it's because it's not quite 8K in size, yet?

 

When I try to take the bin and plop it over into classic99 as PLATO in my DSK1 folder, and load with option 5, I get an I/O error 2...what am I doing wrong? (yes, dsk1 is mounted, and I can run other binaries in that folder)...

 

-Thom



#385 chue OFFLINE  

chue

    Moonsweeper

  • 305 posts

Posted Thu Aug 9, 2018 7:58 PM

Before I start cobbling together a Makefile from libti99, has anyone made a generic Makefile for ti99 projects?

 

-Thom

 

There are makefiles in the sample projects in the first post of this thread.  The sample projects are: hello, hello2, and hello_cpp



#386 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Thu Aug 9, 2018 8:09 PM

Yeah, I found them, and borrowed some from the test project.

 

but I'm wondering why my resulting ea5 binaries from elf2ea5 won't load...

 

-Thom



#387 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • 1,826 posts
  • Location:Beaverton, OR

Posted Thu Aug 9, 2018 10:41 PM

Ok, so I've checked in the first commit of PLATOTerm99 code:

 

http://github.com/ts...909/platoterm99

 

It compiles and an elf and bin spits out.

 

But, ea5split doesn't produce anything, am assuming that it's because it's not quite 8K in size, yet?

 

When I try to take the bin and plop it over into classic99 as PLATO in my DSK1 folder, and load with option 5, I get an I/O error 2...what am I doing wrong? (yes, dsk1 is mounted, and I can run other binaries in that folder)...

 

-Thom

 

You need to make sure the crt module is the first / at the head of your program... 

 

An EA5 file is a memory image, and execution starts at the address where it is first loaded into. 

Your code is setup to link into >A000... upper 24k of the memory expansion... good. typical.

 

But the first instruction in needs to be there at >A000...   Just move crt to the top of the list from here:

 

https://github.com/t...39/Makefile#L34

 

to here:

 

https://github.com/t...39/Makefile#L28

 

There are other approaches, but they all involve making sure the first instruction in the image is the instruction you want it to run first :) 

 

-M@



#388 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • 1,826 posts
  • Location:Beaverton, OR

Posted Thu Aug 9, 2018 10:47 PM

It's actually misleading that there is even a label attached to _start...  as it isn't a special symbol, and our gcc linking tools don't pay it any regard. 

 

-M@



#389 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Thu Aug 9, 2018 10:53 PM

ok, interesting. Sorry, I'm literally going a zillion miles an hour, trying to make as many mistakes up front, as I can. :)

 

Hm. still not working. Am noticing that each of the runnable images have the name of the first file within the first few bytes of the file, am I missing something?

 

Also, I really don't know how much RAM this will need.. the 6502 version takes up 24K of RAM currently, so I would say anywhere from 16K to 24K...

 

-Thom



#390 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • 1,826 posts
  • Location:Beaverton, OR

Posted Thu Aug 9, 2018 11:19 PM

The files that have their name in them are a 'container' file for hosting a TI file on a foreign filesystem... 

 

EA5SPLIT creates files contained in the TIFILES format... 128 bytes into that is the real TI binary....  6 bytes into that is were your first instruction has to be. 

 

Hopefully our 32k will be sufficient. :) 

 

Let me clone and see what I can see... 

 

-M@



#391 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Thu Aug 9, 2018 11:25 PM

I found the problem. somehow in my constant compiling and recompiling the toolchain to fix things, I munged up ea5split. Now the binary seems to run, if going to a green blank screen..that's okay.. at least I know it's attempting to load, I'll go forward now and see if I can start filling in the system dependent code....

 

my immediate goal is to get the terminal to output the protocol-encoded data in splash.c to render the splash screen. Once this works, 75% of the terminal is done, then it's hooking up serial and keyboard I/O.

 

-Thom



#392 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • 1,826 posts
  • Location:Beaverton, OR

Posted Thu Aug 9, 2018 11:31 PM

Cool... the VDP memory map isn't setup yet... 

That's why you get just a green screen.

 

set_text();

charsetlc();

 

before your putstring, and then I'm seeing some output...

 

Take a look at the libti99/testlib.c for how this stuff is strung together... 

 

-M@



#393 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Fri Aug 10, 2018 12:42 AM

and with a few more functions, we have a successful bring-up!

 

Attached File  platoterm_ti.PNG   728.85KB   2 downloads

 

Now i'll go ahead and do a TI splash.

 

-Thom

 



#394 TheMole OFFLINE  

TheMole

    Dragonstomper

  • 807 posts
  • Location:Belgium

Posted Fri Aug 10, 2018 2:12 AM

and with a few more functions, we have a successful bring-up!

 

attachicon.gifplatoterm_ti.PNG

 

Now i'll go ahead and do a TI splash.

 

-Thom

 

 

Awesome!



#395 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Fri Aug 10, 2018 11:40 AM

one last post in this thread on PT, I've done the TI splash, a bit more appropriate. now I am to the point where I _really_ need help on RS232 and TIPI routines.

 

Attached File  platoterm_ti2.PNG   393.43KB   1 downloads

 

-Thom

 

(p.s.) Why is there a green border I can't seem to get rid of? I want border and background to be the same)

 



#396 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 3,942 posts
  • Location:Portland, Oregon USA

Posted Fri Aug 10, 2018 11:47 AM

one last post in this thread on PT, I've done the TI splash, a bit more appropriate. now I am to the point where I _really_ need help on RS232 and TIPI routines.
 
attachicon.gifplatoterm_ti2.PNG
 
-Thom
 
(p.s.) Why is there a green border I can't seem to get rid of? I want border and background to be the same)
 

Screen color needs to be set to Black then

bgcolor();

Sent from my LG-H872 using Tapatalk

#397 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Fri Aug 10, 2018 11:55 AM

Yup, that did it. the API slightly confusing, there is bm_setforeground, bm_setbackground, bordercolor(), and bgcolor()... urgh.

 

-Thom



#398 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Fri Aug 10, 2018 11:57 AM

What are the limitations of color in bitmap (GRAPHICS II) mode? I can try to graft in color support (the protocol decoder supports 24-bit color, but I will try to add support for the default system color constants, at least)

 

-Thom



#399 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,946 posts
  • Location:Denmark

Posted Fri Aug 10, 2018 12:11 PM

What are the limitations of color in bitmap (GRAPHICS II) mode? I can try to graft in color support (the protocol decoder supports 24-bit color, but I will try to add support for the default system color constants, at least)

 

-Thom

 

For each row of 8 pixels you can only use two of the 16 colors.


Edited by Asmusr, Fri Aug 10, 2018 12:12 PM.


#400 tschak909 OFFLINE  

tschak909

    River Patroller

  • 2,858 posts
  • Location:USA

Posted Fri Aug 10, 2018 12:13 PM

Ok, that might be sufficient to add some color support. I will add it and see what happens. :)

 

(but first I _really_ need some working RS232!)

 

-Thom






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users