xahmol Posted March 28, 2021 Share Posted March 28, 2021 (edited) <MOVED> Edited March 29, 2021 by xahmol 5 Quote Link to comment Share on other sites More sharing options...
Tursi Posted March 28, 2021 Share Posted March 28, 2021 Nice! But you say it /crashes/ in Classic99? Or just doesn't sound right? Classic99's speech implementation is unable to halt the CPU - if you want it to work in Classic99 you can't just blitz data at the speech synth, you have to monitor the buffer control bits and feed it only when it's low. I know why it doesn't work and the fix is complex, but coming. But if it is actually /crashing/, that I want to know about. Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted March 28, 2021 Share Posted March 28, 2021 I see things run off into illegal instructions... but not if I'm stepping through... and that wasn't until I added the 'blast-mode' say-data piece so maybe if I implement the prescribed buffer flow stuff it'll work... Quote Link to comment Share on other sites More sharing options...
xahmol Posted March 29, 2021 Share Posted March 29, 2021 (edited) <MOVED> Classic99.AVI LudoTI994a-v199-20210328-1617.zip Edited March 29, 2021 by xahmol Quote Link to comment Share on other sites More sharing options...
+chue Posted March 29, 2021 Share Posted March 29, 2021 This is all good stuff but maybe should be in its own thread? Try to keep this thread about issues with the compiler - this thread is huge as is. Quote Link to comment Share on other sites More sharing options...
xahmol Posted March 29, 2021 Share Posted March 29, 2021 (edited) 5 hours ago, chue said: This is all good stuff but maybe should be in its own thread? Try to keep this thread about issues with the compiler - this thread is huge as is. Agree and sorry. Questioning the one came to the other and there seemed no other suitable C thread to ask the inititial question in. Made seperate topic (or if a mod reads this, please move whole chain) Edited March 29, 2021 by xahmol Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted April 2, 2021 Share Posted April 2, 2021 When I coded the fix to stop crashing classic99 by overrunning the speech fifo, I still had compiler usability issues... I had to force the function to never be inlined, so that in the context of the say_data function it would actually perform a call. The optimizer leaves the status check in during the compilation of the routine I used to read status. But if it inlined that into a greater function, it decided the __asm__ had no side effects and removed it. I probably needed to make sure the __asm__ produced an output to a gcc register. 2 Quote Link to comment Share on other sites More sharing options...
Tursi Posted April 2, 2021 Share Posted April 2, 2021 You can also try the volatile tag on the asm, but I am unsure whether it will make a difference. https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/Extended-Asm.html#Volatile 2 1 Quote Link to comment Share on other sites More sharing options...
+chue Posted April 19, 2021 Share Posted April 19, 2021 @jbdigriz unearthed a second (older?) gcc project that targets tms-9900. Don’t know what the capabilities are though. 1 Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted April 27, 2021 Share Posted April 27, 2021 On 3/12/2021 at 10:21 PM, jedimatt42 said: I've performed a fresh Ubuntu 20.10 virtual machine installation, and then performed the steps in this installation guide... (edit updated guide in this post: The promise of Ubuntu on WSL """Should""" work the same. works great! Quote Link to comment Share on other sites More sharing options...
Elia Spallanzani fdt Posted April 27, 2021 Share Posted April 27, 2021 is there a beginner's guide to install gcc on windows? Quote Link to comment Share on other sites More sharing options...
xahmol Posted April 27, 2021 Share Posted April 27, 2021 1 minute ago, Elia Spallanzani fdt said: is there a beginner's guide to install gcc on windows? Install Windows Subsystem for Linux on your Windows 10 and use the above instructions. That is what I did, works great. https://docs.microsoft.com/en-us/windows/wsl/install-win10 1 Quote Link to comment Share on other sites More sharing options...
Elia Spallanzani fdt Posted April 27, 2021 Share Posted April 27, 2021 ack! i have windows 7, at best. Quote Link to comment Share on other sites More sharing options...
xahmol Posted April 27, 2021 Share Posted April 27, 2021 (edited) 29 minutes ago, Elia Spallanzani fdt said: ack! i have windows 7, at best. All the more reason to update to Windows 10 ?It is really unsafe to still use Win7 and be online anyway. Win7 is the new Windows eXPired….. And Windows 10 is actually much faster on both my 2009 as 2011 PC than Win7 was. Of course there are alternatives getting this to work with Cygwin, Docker and using a VM as well, but no experience with that combined with GCC for TI, so you have to delve in the rest of the thread for that. Edited April 27, 2021 by xahmol Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted April 27, 2021 Share Posted April 27, 2021 All the more reason to update to Windows 10 [emoji6]It is really unsafe to still use Win7 and be online anyway. Win7 is the new Windows eXPired….. And Windows 10 is actually much faster on both my 2009 as 2011 PC than Win7 was. Of course there are alternatives getting this to work with Cygwin, Docker and using a VM as well, but no experience with that combined with GCC for TI, so you have to delve in the rest of the thread for that.Last I checked you can do the upgrade for free stillSent from my LM-V600 using Tapatalk Quote Link to comment Share on other sites More sharing options...
Elia Spallanzani fdt Posted April 27, 2021 Share Posted April 27, 2021 (edited) ooooookey, i was sure it wouldn't work but i installed cigwin (on win7, 32 bit) and followed the procedure given in this post: https://atariage.com/forums/topic/164295-gcc-for-the-ti/ ? do = findComment & comment = 2485813 Eventually I get the error ciggmp_3.dll is missing. From setup I installed ciggmp devel and the others you see in the screenshot. What am I doing wrong? Edited April 27, 2021 by Elia Spallanzani fdt Quote Link to comment Share on other sites More sharing options...
elmer Posted April 28, 2021 Share Posted April 28, 2021 21 hours ago, Elia Spallanzani fdt said: From setup I installed ciggmp devel and the others you see in the screenshot. What am I doing wrong? It's been years since I used cygwin, because the whole cygwin project has been rather eclipsed by the developers of the mingw32/msys2 project, but if I remember, cygwin doesn't always put the directory of its DLLs into the current path. Have you searched you cygwin directories for the missing cyggmp-3.dll? If you can find it, then copy it into the same directory as your tms9900-gcc.exe file. Like you, I still use Win7, and I just tried building tms9900-gcc with msys2, but it failed with some errors. This is because every new version of the GCC compiler finds more and more warnings/errors in the older binutils and gcc sources, and the old build scripts fail unless the old source is fixed, or the build scripts are modified. I am having exactly the same problems compiling older versions of GCC with the new GCC 10 compiler on both Windows (msys2) and Linux. ? 4 Quote Link to comment Share on other sites More sharing options...
Elia Spallanzani fdt Posted April 28, 2021 Share Posted April 28, 2021 Thank you! A small step for the Elia Spallanzani Foundation, an even smaller one for humanity! I downloaded cyggmp-3.dll and copied it to the cygwin/bin folder and now the "make" command as expected produced 2 files: rush_our.ea5.bin " and "rush_hour.c.bin. Now the question is: how do I install the additional patches? 1 Quote Link to comment Share on other sites More sharing options...
elmer Posted April 28, 2021 Share Posted April 28, 2021 1 hour ago, Elia Spallanzani fdt said: Now the question is: how do I install the additional patches? I've never tried to build tms9900-gcc before. Which additional patches are you referring to? Quote Link to comment Share on other sites More sharing options...
Elia Spallanzani fdt Posted April 28, 2021 Share Posted April 28, 2021 I followed the instructions from - so i installed TI99-GCC-1.5.zip . However, patches 1.6, 1.7, 1.8 and 1.9 were attached in the first post of the thread. Do you have to install them all, one after the other? Or just 1.9? And how do you install them under 32-bit cigwin? Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted April 28, 2021 Share Posted April 28, 2021 (edited) 35 minutes ago, Elia Spallanzani fdt said: I followed the instructions from - so i installed TI99-GCC-1.5.zip . However, patches 1.6, 1.7, 1.8 and 1.9 were attached in the first post of the thread. Do you have to install them all, one after the other? Or just 1.9? And how do you install them under 32-bit cigwin? The patches are source patches... so you don't 'install' them, you apply them to the source before building... The Ubuntu instructions I shared a while back should cover getting to the latest patch level of the gcc source you want to build. I wrote it down so I don't remember anymore... but It seems to me, nobody ever has to apply the individual patches unless they are just incrementing from a previously installed gcc build. The start from zero approach included latest patches from Insomnia. There is an additional patch from another user here. This also can be applied first, before building. This is captured in the Ubuntu instructions. (Edit: Re-reading my instructions, the patches are accumulative, so patch 1.9 contains 1.0-1.8, etc... which is good, cause you want to get to 1.19) (The Ubuntu instructions are here: https://atariage.com/forums/applications/core/interface/file/attachment.php?id=820048, in this thread as attachment tms9900gcc-Ubuntu-Installation-Guide.md, .md files can be viewed in notepad, I would think... IDK... ) Edited April 28, 2021 by jedimatt42 2 Quote Link to comment Share on other sites More sharing options...
elmer Posted April 28, 2021 Share Posted April 28, 2021 (edited) 47 minutes ago, Elia Spallanzani fdt said: However, patches 1.6, 1.7, 1.8 and 1.9 were attached in the first post of the thread. Do you have to install them all, one after the other? Or just 1.9? And how do you install them under 32-bit cigwin? 20 minutes ago, jedimatt42 said: The patches are source patches... so you don't 'install' them, you apply them to the source before building... Yes, the patches are source code patches to the original binutils and gcc source code. They aren't incremental, you just apply the latest patches to the original GNU source archives. The instructions that you're following are from 2012 ... it looks like "gcc-installer.tgz" script was written some time after that. "gcc-installer.tgz" expands into the "install.sh" shell script, which does all of the downloading/patching/build for you. I suggest that you try building the compiler using that script. If your really want to do your own extract/patch/configure/build process, then I suggest that you follow jedimatt42's build instructions (which look as though they also do some patching to get things to build with the gcc10 compiler). Edited April 28, 2021 by elmer 2 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted September 6, 2021 Share Posted September 6, 2021 Couple of (dumb) questions: 1. Does GCC for TI-99 generate E/A 3 compatible object code? 2. Can GCC generate a program smaller than 8K or is the runtime bigger than that? Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted September 6, 2021 Share Posted September 6, 2021 1 hour ago, TheBF said: Couple of (dumb) questions: 1. Does GCC for TI-99 generate E/A 3 compatible object code? No.. the linker produces ELF binaries. But then there is a bespoke extraction tools for PROGRAM images, and cart... and gnu objcopy to extract binary segments. Someone could write something that transforms a binary into TI's E/A3 loader format... I typically use objcopy and post-process the binary to create what I want. Quote 2. Can GCC generate a program smaller than 8K or is the runtime bigger than that? There isn't a runtime. Or, it's craft your own. I think the examples from Insomnia bring startup code to initialize BSS segments, or for C++ code run the constructors of static scoped instances. And then launch into your program. But you have full control of that. for an EA5 the runtime is whatever piece of machine code is linked in at the launch/first address. For cartridges, you included a header that dictates where program entry begins. You can make single instruction programs if you like. Along with no runtime, there is no stdio. No console. No heap. I've found certain code constructs implicitly expect certain functions to exist. Such as literal string assignment to a char array declaration will invoke memcpy. But we seem to have to provide our own memcpy ( if you use that sort of code ) - I suspect I'm overlooking something here, but we have control. I like that. Tursi's libti99 is a good place to start. It fills the void of having no runtime. Provides an implementation of memcpy, and real routines for getting IO done on the 4A. Generally each function is isolated in the .a archive so linking only includes the routines you use. examples of 'runtime' : * my crazy cart: https://github.com/jedimatt42/fcmd/blob/master/b0_crt0.c * libti99's testlib example: https://github.com/tursilion/libti99/blob/master/crt0_ea5.asm For the longest time, I used no 'crt0' like substance, and just made sure my main function was linked first, and that I initialized any memory addresses to the state I needed them to be at, never assuming anything, and that worked quite well. I make my little Force Command executables with gcc, and no '_start' or anything, but instead follow a custom cartridge like model... where there is just a start address in a header on the file at a well known location. So after it loads I know where to BL to. When you write your own loader, you can do whatever you want. 3 Quote Link to comment Share on other sites More sharing options...
Tursi Posted September 6, 2021 Share Posted September 6, 2021 1) No, it generates ELF format object files. It includes a tool to convert ELF to EA#5 image files or cart files. 2) There's no runtime beyond what you provide (at least in the build I have!). The crt0 (startup code) that I have is 60 bytes long. You could make it smaller if you didn't need initialized variables. Here's a sample Hello World. I've included the listing and map file so you can see the memory layout. The total code size is 118 bytes. HelloWorld.zip 2 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.