This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - TC01
Pages: 1 ... 19 20 [21] 22 23 24
301
« on: July 22, 2010, 12:06:45 pm »
Oh, I assumed you had the compiler installed already... yes, you need to follow apcalc's instructions here, but instead of compiling using the command line, use one of the batch files.
302
« on: July 22, 2010, 11:39:03 am »
Yes, to make a batch file you just need to make a text file, and rename it *.bat.
If you're going to be using fb39ca4's batch file, I suggest you create it in your project folder and give it the same name as your project. So if you're compiling the demo, call the batch file demo.bat and put it in the same folder. Then copy-paste the code he posted into it and run it.
If you're going to be using my batch file, create it anywhere (probably in the compiler's folder), copy-paste the code I posted into it, and make a shortcut on your desktop. So again, if you were compiling the demo, when you run the batch file type out (or copy-paste) the path to the demo folder and press enter.
303
« on: July 22, 2010, 11:35:20 am »
Well... I've figured this out- \ isn't picked up because a single backslash plus the next character (like \n or \r) is a seperate character. The actual string would need to have a double backslash for it to work. Fortunately, if \r is a single character then I can look for it using strncpy() and strcspn() without problems.
Don't know if I should even bother posting updates since there aren't really any 68k C programmers around... but I will anyway if I have more issues, just in case someone actually looks at and replies to this.
304
« on: July 22, 2010, 10:55:06 am »
Or you could do it so the batch file autonavigates to the project directory based on the user's input... I don't have an Nspire, but based on the way apcalc explains it in the tutorial, all you'd need is this (based off a batch file I wrote for SPASM recently):
@echo off title Nspire C Compiler set /p project=Project folder: cd %project% echo Making project... make pause
The advantage is that you would only need one batch file, not one for each project. So, you could create a shortcut to this batch file on your desktop. (The disadvantage is users not easily being able to recompile your source without a batch file in the project folder like fb39ca4's).
305
« on: July 21, 2010, 11:10:35 pm »
Well, I've figured most of this out on my own.
Except for one thing- strcspn is not working as expected. I have the code below (seperate project I created to test it):
// A test of the strcspn function, and how it works void _main(void) { const char string[10] = "Abc\Defg"; unsigned long length = strcspn(string, "\\"); clrscr(); printf("%d", (int)length); ngetchx(); }
"\\" is apparently equivalent to a single backslash- at least, it is when I print it out. Even if it isn't, it shouldn't matter what happens here because the documentation says strcspn should return the length of string 1 containing no characters from string 2. But evidently it does... the program prints out 7.
What's wrong here? How can I read a string up to a backslash? strcspn works fine if I have it run up to the "D" in the above test... can I fix this?
306
« on: July 21, 2010, 09:16:41 pm »
You can find the list of known version differences on WikiTI here. 1.17 and 1.18 both have no known changes. 1.19 does something with TI-Navigator, enabling its apps to write apps and appvars to write directly to Flash. I think, anyway- the text is a little corrupted.
307
« on: July 21, 2010, 05:15:02 pm »
Yes, Nelson Sousa is active on ticalc.org (or was last year, anyway). He claims to have programmed in Basic for every calculator (with a few exceptions like the 80 and the 81) but only owns two, an 84+ and an Nspire. He has, however, authored 13 Nspire Basic programs. I started writing this post when the record was not even tied, but the time it took to search ticalc.org and check out some of this guy's programs slowed me down...
308
« on: July 20, 2010, 12:03:32 am »
What did TSE do special? I remember hearing about it years ago on a huge french TI-83+ site
Multitasking, according to the file page on ticalc.org. It lets you switch between programs you're running. Also, the actual "shell" part, the GUI called Utopia, is replaceable. For instance, Michael Vincent also wrote a Linux GUI for TSE.
309
« on: July 19, 2010, 09:01:52 pm »
Also, one thing I did as newbie for NPC convos in a RPG was using Pause "text" for long speeches. So to read the entire text you had to scroll left and right. That said, the idea may not have been that n00bish, though, and it actually looked cool and took very few space on the screen . But still remains the fact it was a really cheap way to display huge text and avoiding coding an entire text routine 
Actually, I like that idea. As you say it takes up very little space, plus it means if you want to wait for the user to press enter before displaying the next line (like you might in an RPG), it's done automatically for you, no getKey routines involved. The only downside would be actually having to scroll left and right for really long text, of course.
310
« on: July 19, 2010, 08:54:25 pm »
Having seen how NewProg got its own section like BBC Basic, I assume it is an interpreted language, though. The fact people most likely need the NewProg APP on their calc to run games made with it probably doesn't help. I think the 68k scene kinda died, though, but unlike the z80 scene, in 2009 and 2010, it did not pick up again. I gave NewProg a try recently. Well, actually, I haven't done much with it, just installed it, probably because I've been learning C. Appropriately enough given this topic, it's not actually an app, it's a suite of programs. The way it works is you write programs in a Basic-like syntax using the Program Editor (in a way similar to Axe, except since this is the 89 the function names are typed out), then "compile" it into an app variable (*.89y, HPP on calc). The difference to Axe is that you do need the newprog() program to run it, it's not a nostub program- which is why it gets its own file section on ticalc.org, I assume.
311
« on: July 19, 2010, 08:14:40 pm »
I think the reason why Flash APPs are more popular on z80 calcs is because of their even more limited memory and the 8 KB code limit present on the 83+/84+. The disadvantage of flash apps, though, is that they can take a long while to transfer to the calc and they disallows self-modifying code. On 68K calcs, you have a lot of RAM so you don't need to rely on APPs as much.
As for the 68k community, one thing that could maybe be done is attempt at setting up a main hub forum for the 68k programmers and it would have a spiral effect in terms of activity increase, as people would join due to the higher activity. The problem, though, is that TI-Freakware tried to do that a few years ago and despite the absence of troublemakers on their board, it still didn't work. From experience, I also remember that some 68K C programmers were rather narrow-minded about BASIC programmers, so if Omnimaga managed to attract 68K coders again, I am a bit worried that it would clash between z80 BASIC/Axe+68K/Nspire BASIC programmers and 68K ASM/C programmers, like I've seen happen before when I ran into 68k coders. One example would be the reply to the first comment on this page: http://www.ticalc.org/archives/news/articles/13/139/139347.html That said, there are so many BASIC/Axe programmers and open-minded people right now on Omni that if someone came and caused trouble, he would get most of the community against himself.
True. Its rather sad that even the release of a new on-calc programming language for the 68k calcs hasn't had much of an effect- the only NewProg program on ticalc.org is a Minesweeper clone made by the NewProg developer. I'm learning 68k C programming, and am currently working on a 68k project, but I definitely still do a lot of Z80 programming- maybe not as much at the moment with my 83+'s dead link port, but still some.
312
« on: July 19, 2010, 05:55:59 pm »
Archeowyrm just sounds cooler than Twin-Serpent (which seems more generic, in my opinion), so I voted for it.
313
« on: July 19, 2010, 05:52:26 pm »
The first 68k C question in this subforum! (the flash apps one I posted was in the Other Calculator Help and Support forum)
Anyway, I'm having a little trouble understanding some of the string manipulation functions in GCC4TI (string.h). It's probably because of the way strings are treated in C (as arrays) which isn't really what I'm used to, being a programmer in higher level languages (Python and VB). Also because I haven't really used pointers before in programming.
Specifically, I want to read a text file (*.89t) and split it line by line, then do operations on each line. I've gotten my program to a point where it uses a dialog box to get the name of the text file, opens and reads it, and then prints the text to the screen (this last bit is just for debugging). It's the "splitting line-by-line" that's causing me problems.
I've realized that the text files use "\r" as newline characters (at least, I think they do) and so I thought to use strscn() to get the length of the string up until the "line", then use strcpy() to copy the line into another string and strpbrk() to create a substring without the first line.
The first problem is that if you type "\", GCC4TI ignores the closing quotation mark, assuming another character is coming after it. I've had to use "\r"- but the problem of this is that if the line has "r" in it, strscn() would stop early (because it's characters from the second string, not the second string as a whole). Is there any way to solve this? Or am I wrong and, in fact, it would only stop when it found both "\" and "r"?
Then, the second problem is that I'm unsure what exactly strpbrk() does. The docs say it "returns a pointer to the first occurrence of any of the characters in s2"- is this just a pointer to that one character, or a pointer to everything from that character to the end of the string?
314
« on: July 19, 2010, 10:54:54 am »
This was already posted here in Miscellaneous discussion.
315
« on: July 18, 2010, 04:14:18 pm »
Yeah, but why not at least start the factoring of the keys with boinc like we did last time, and eventually as computing power increases (Well GPUs are really the powerhouses now) we will have it .... ok still in a looong time, but at least eventually we'll have it!
I don't disagree with that- I'm just saying that concentrating all the community's resources on it right now might not be a good idea. Because in the short term, hacking 1.7, or 2.0 or 2.1, will be much more beneficial. And probably easier/faster to do, too.
Pages: 1 ... 19 20 [21] 22 23 24
|