Show Posts

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 ... 16 17 [18] 19 20 ... 24
256
TI-BASIC / Re: So... how 'bout that 68k BASIC programming?
« on: August 04, 2010, 10:06:00 am »
68k BASIC is quite powerful, but the thing that turned me away from it was the fact that i couldn't utilize the entire screen.
I agree. This is kind of annoying and one of the reasons I don't think it's the best language for games.

The NewProg language doesn't have this problem, so you might want to try that.

257
General Calculator Help / Re: TI-89 language localization apps
« on: August 03, 2010, 11:21:07 pm »
Okay, thanks apcalc.

258
TI-BASIC / Re: So... how 'bout that 68k BASIC programming?
« on: August 03, 2010, 11:19:41 pm »
I write math programs on the 89, because I prefer writing math programs myself.

I have made a few utilities- a timer (to play around with the time functions in 68k Basic, not because I needed one), and a custom toolbar for my z89 IDE project.

I'm not really a game programmer (unlike everyone else on Omnimaga), but I would probably make games in C instead if I was interested in making one for the 89.

259
General Calculator Help / Re: TI-89 language localization apps
« on: August 03, 2010, 11:14:48 pm »
I deleted all of my lanugage apps and it works fine.  I can't see any reason why it should be unstable.

That's good to hear, but did you have the "calculator locking up" problem too? Or not?

I used TI Connect's Device Explorer to do it, by the way. And that's because previously, when I was deleting the Cabri app from the VAR-LINK menu I got a "Crash prevented" message in the bottom of the screen from PreOS (which I was using at the time). I then tried it with the Device Explorer and this didn't happen.

260
General Calculator Help / TI-89 language localization apps
« on: August 03, 2010, 10:53:04 pm »
My TI-89 Titanium came preloaded with language localization apps- German, French, and Spanish. I assume all Titaniums do.

I don't speak either of these languages (I'm a native English speaker), and since combined they take up a reasonably large amount of space, I decided to delete them to give me more memory.

I deleted the German app- and found my calculator was locked up. I did a RAM reset (using ON+2ND+LEFT+RIGHT) reinstalled KerNO, and used Stefan Heule's backup utility to restore my settings, and now the calculator appears to work fine.

My question is this: is my calculator unstable now without it? Can I do the same for the other language localization apps? I can deal with the crashes easily enough, but if what I'm doing is leaving my Titanium unstable, I'll send the German app back to my calc.

261
Calculator C / Pointer trouble
« on: August 03, 2010, 07:45:23 pm »
A note- this is 68k C (GCC4TI), not Nspire C. Shouldn't really be a difference except for the nature of my error...

I've mostly finished making z89 (that's my z80 Basic editor for 68k calcs) read in the list of tokens from a token file, then build them into an array of tokenInfo structures. The code to do this is rather complicated and probably poorly written- I'm not the best C programmer. I only started programming in C recently. However, it works.

Or, at least, it would work if not for the Address Error I get when I try to free allocated memory at the end of the process. I have four pointers to strings being dynamically allocated- the text of the token file, a "working" string (for storing end-of-line characters and other things necessary in procedures like strcpsn()), a line string (for storing each line of the text file), and a "tokenstr" string, for storing token information (first the name, then the first token in hex).

I had had problems with this before. Specifically, originally I was using realloc() to shrink and decrease the line string on each pass through the while loop. But that was causing an Address Error. I "solved" it by allocating enough memory to store the entire file to the line string- I'm not entirely sure why that solved the problem, though.

The GCC4TI docs offer the definition of an address error below, but I'm not sure how trying to free the pointers would cause that.

Quote from: GCC4TI docs
Q: What kind of error in my program usually causes an "Address Error"?

A: Well, writing over the boundaries of an array can usually cause all sorts of errors, since it usually destroys code or the return address of the function. However, an "Address Error" actually means that a short or long value is read or written at an odd address. So if you get an "Address Error" while you are dealing with pointers, check that you do not cast an odd address to a pointer to a short or long integer. 

Here is my long and probably over-complex initTokens() function, which is where the array of token infos is built. It assumes the text file is formatted as follows (name\byte1\byte2, with byte2=0 if the token is one byte):

Code: [Select]
:BoxPlot\0x05\0
:ClrHome\0xE1\0

Code: [Select]
void initTokens(tokenInfo *tokens, char *tokenfile)
{
    int length;
    int bool;
    int newlength;
    int span = 0;
    int i = 0;
    char newchar;
    char endline = '\r';
    unsigned long rawhex;
    unsigned short size = 0;
    unsigned char hex = '0';

    char *tokentext = NULL;
    char *working = NULL;
    char *line = NULL;
    char *tokenstr = NULL;

    tokenInfo token;
    SYM_ENTRY *sym;
   
    if ((working = (char *)calloc(2, sizeof(char))) == NULL)
    {
        DlgMessage("DMA Failure", "Unable to allocate space for working string", BT_OK, BT_NONE);
        return;
    }
    if ((line = (char *)calloc(10, sizeof(char))) == NULL)
    {
        DlgMessage("DMA Failure", "Unable to allocate space for line string", BT_OK, BT_NONE);
        free(working);
        return;
    }
    if ((tokenstr = (char *)calloc(16, sizeof(char))) == NULL)
    {
        DlgMessage("DMA Failure", "Unable to allocate space for token working string", BT_OK, BT_NONE);
        free(working);
        free(line);
        return;
    }
   
    //Get the size of the token file and allocate memory accordingly
    sym = SymFindPtr(SYMSTR(tokenfile), 0);
    size = ((MULTI_EXPR*)HeapDeref(sym->handle))->Size + 2;
    if ((tokentext = (char *)calloc(size, sizeof(char))) == NULL)
    {
        DlgMessage("DMA Failure", "Unable to allocate space for token file string", BT_OK, BT_NONE);
        free(working);
        free(line);
        free(tokenstr);
        return;
    }
   
    //Get input from file, set length and reallocate memory to troublesome pointers
    bool = getPrgmFromText(tokenfile, tokentext, size);
    if (bool == 0)
    {
        free(tokentext);
        free(working);
        free(line);
        return;
    }
    length = strlen(tokentext);
    line = (char *)realloc(line, (length + 2) * sizeof(char));
    tokenstr = (char *)realloc(tokenstr, (length + 2) * sizeof(char));

    //Loop until the length of the input string is zero
    while (length > 0)
    {
        //Maintain num token size!
        i += 1;
        if (i > NUM_TOKENS)
        {
            tokens = (tokenInfo *)realloc(tokens, i * sizeof(tokenInfo));
            NUM_TOKENS = i;
        }

        //Get the length of the line up to trailing character, reallocate memory
        memset(working, '\0', strlen(working));
        memset(line, '\0', strlen(line));   
        memset(tokenstr, '\0', strlen(tokenstr));           
        sprintf(working, "%c", endline);
        span = strcspn(tokentext, working);
       
        //Load the line into a string, and then remove it
        line = strncat(line, tokentext, span);
        tokentext = strpbrk(tokentext, working);
       
        //Then clear out the \r at the front of the string and clear the working string out
        newchar = tokentext[2];
        sprintf(working, "%c", newchar);
        tokentext = strpbrk(tokentext, working);
        length = strlen(tokentext);
       
        //Init the token
        token = tokens[i];
        token.twoByteToken = 0;

        //Seperate the name component from the line and set it (and it's length!)
        memset(working, '\0', strlen(working));
        sprintf(working, "%c", '\\');
        newlength = strcspn(line, working);
        tokenstr = strncat(tokenstr, line, newlength);
        line += (newlength + 1);
        token.chars = newlength;
        token.name = tokenstr;
       
        //Seperate the hex component from the line and set it
        memset(tokenstr, '\0', strlen(tokenstr));
        tokenstr = strncat(tokenstr, line, 4);
        rawhex = strtol(tokenstr, NULL, 0);
        hex = (unsigned char)rawhex;
        token.hex[0] = hex;
        line += 5;

        //Then check if what's left of the string is the second byte of a two-byte token and deal with it
        if (line[0] != '0')
        {
            rawhex = strtol(tokenstr, NULL, 0);
            ngetchx();
            hex = (unsigned char)rawhex;
            token.hex[1] = hex;
            token.twoByteToken = 1;
        }

        //Update the token
        tokens[i] = token;
    }
   
    //Free memory
    free(working);
    free(tokenstr);
    free(line);
    free(tokentext);
}

262
Other Calculators / Re: TI-76.fr in action
« on: August 02, 2010, 05:41:36 pm »
Wait, so exactly what english calculator is the TI-76.fr the equivalent of?
I think the TI-73, they were developed for the same audience according to Datamath's page about it.

263
A few updates.

First, I've settled on a name for the project (at least temporarily, anyway)- it will be called "z89 IDE". I am, however, considering naming the on-calc component "Solar89" as a reference to Lunar IDE... I'm bad at coming up with names.

Second, the Python end of things is working perfectly (or appears to be). I tested it with a variable generated from an older version of the tokenizer and it produced a *.8xp file, which I ran successfully in WabbitEmu! Admittedly, all it did was clear the screen, but that's progress.

I'm now resuming work on the tokenizer. I just need to finish getting it to read tokens in from a text file, then actually write that text file, and then I can release a beta.

264
TI-Nspire / Re: Virus to crack RSA for nspire? :P
« on: August 01, 2010, 11:31:56 pm »
Is the same true for other search engines?

But really, if TI does follow calculator forums, a thread with a title like this one is definitely one that they would follow.

265
TI-Nspire / Re: Virus to crack RSA for nspire? :P
« on: August 01, 2010, 01:37:08 pm »
What code did you put in? I hope you did not send them some precious info on how the community did some stuff...

I think we need to be careful with what kind of e-mails we send them. If they get too many e-mails involving Nspire cracking, it might backfire on us as they might try harder at protecting the calc.
I think he's referring to why he posted the message in code tags.

266
Gaming Discussion / Re: Game modders?
« on: July 31, 2010, 11:34:37 pm »
I never played Civilization. Is it like Warcraft and Starcraft where you can build bases and armies then destroy the enemy base?
Kind of. It's a TBS, not an RTS, so obviously it's a bit different.

Instead of building bases, you build cities. Each city can build buildings, train units, and work the countryside. As a city grows in people, it can work more land, and thus produces more yields. Buildings can do things like allow you to build a unit, increase yield production of a certain type, etc. Cities then produce culture and espionage. Culture is, basically, the region a city controls (the more culture it produces the more land it will control). Espionage lets you spy on other players (obviously).

Cities also produce research (you can allocate how much money you're spending on research), and the amount of research being produced influences how long it will take you to discover a technology. A tech allows you to do various things, like build buildings and units, build improvements on the land that produce more of a certain yield, etc.

Winning isn't just wiping out the enemy, you can also dominate a large percentage of the map, you can complete the Space Race project, you can make a diplomatic alliance, etc.

That's an extremely simple summary, of course, and it's based on Civ 4 (Civ 3, 2, 1, and the upcoming 5 are all a bit different). If you want to find out more I recommend you check out Civfanatics.

267
Gaming Discussion / Re: Game modders?
« on: July 31, 2010, 10:00:37 pm »
I might as well mention what my own mods are, since I brought the topic up. You can find my Civilization 4 mods on my user page at civfanatics.com, a website about the Civilization series with a large downloads database (where you can find almost anything related to Civilization, including mods much better than mine).

I've been modding Civ 4 for about a year now, and major projects I've worked on include:
-A wild west total conversion for Civilization IV Colonization- a game that was basically an official mod built on the Civilization 4 engine
-An expansion to Final Frontier, the space total conversion that was created by Firaxis and comes as part of the Beyond the Sword expansion pack
-A new ice-themed civilization for Fall from Heaven 2, a massive fantasy total conversion mod for Civilization 4

Basically everything else on the page is related to one of those three.

268
Gaming Discussion / Re: Game modders?
« on: July 31, 2010, 05:52:21 pm »
Sadly not much myself. The closest thing to mods I did are some F-Zero custom tracks you patch with a F-Zero 64 ROM
Yeah, I saw those in the archive and they looked cool. But I'm a PC gamer, not a console gamer, so I wouldn't be able to try them.

I think of ROM hacking being a bit different from game modding because of the platform- when I think "game modding" I think PC (or Mac or Linux, of course), and when I think "ROM hacking" I think consoles. But it is pretty similar.

I've modified the AI for Star Trek: Armada.  Although it "cheated," it's very hard to create a descent AI on Armada, so many people enjoyed it
Is this your mod? There aren't too many Armada 1 files on Filefront, and this looks the most similar.

I've played both Armada games but I never tried mods for Armada 1 (mainly because there aren't too many and I've had trouble getting the game to work on Windows 7- or maybe it's just that my disk is a bit damaged).

269
Gaming Discussion / Game modders?
« on: July 31, 2010, 11:31:41 am »
I was wondering if there was anyone else on Omnimaga who has ever made mods for games?

I've modded Civilization 4- a great game mainly because of how moddable it is. The developer, Firaxis, released the source code for the game's DLL, which allows modders to change mostly everything save what's hardcoded in the EXE (the graphics engine and a few other things), and provided Python as a built-in scripting language.


I know there was an older thread about this but that was about games with impressive maps/mods, not people who make them.

Oh, and I'm not really sure if this goes in the Computer development forum or this one, but since the previous topic about modding was here I thought I'd post it here.

270
Miscellaneous / Re: How did you find Omnimaga?
« on: July 31, 2010, 10:55:38 am »
I saw a link to it on ticalc.org once- can't remember when.

That's also how I found other calculator sites, like UTI and Cemetech.

Pages: 1 ... 16 17 [18] 19 20 ... 24