[General Topics] Menneisyys:
2.2.1	Desktop PC -> emulator file transfer

First, let’s get some for example games so that we can indeed try to operate the emulator! (Note that getting and deploying productivity apps – for example, math functions – is done exactly the same way. In here, I’ve chosen games to show you how excellent gaming platform these calculators are with the right coding.)

For example, download Earth Mission HERE. It’s a really nice, very fast action platformer game. After downloading, decompress earth89.zip. It’ll contain two files of interest, earth.89y and earth.89z (in addition to the French language readme file, lisez-moi.txt). Highlight them in either Windows Explorer or, for example, Total Commander and drag-and-drop them on the calculator image (make sure the virtual TI-89 is switched on - you can't transfer anything to switched-off emulator images).

During this, you shouldn’t be presented a Transfer error dialog box; if you are (most importantly because you’re run out of the, when nothing is installed in the RAM, 192 kbytes of RAM), just click Cancel and read on to find out how you can check the free RAM memory of your emulated calculator and how it can be increased.

Now, press 2nd (again, on the PC keyboard, the Alt shortcut key) and - buttons (that is, invoke VAR-LINK). You’ll see the following:

http://www.winmobiletech.com/062007TICalculators/varlink1.png

Now, let’s create a so-called “folder” (they’re just like a directory in the file system) in order to separate the game from other apps / games you’ll later upload to avoid name clashes / much better separation.

2.2.2	Creating / using folders

Using folders is particularly useful because most third-party apps, particularly games, contain several executable and/or data files, which makes browsing them REALLY hard. When correctly separated into folders, managing / browsing them becomes far easier – as with directories in a file system. (Note that only top-level directories are allowed – not nested ones! That is, you can’t, for example, create a Games main folder and, for example, an Asteroids subfolder inside it.)

To do this, still in this, VAR-LINK mode, click the F1 button (or, of course, on the keyboard) and select 5: Create Folder.

http://www.winmobiletech.com/062007TICalculators/varlinkCrFolder.png

Enter some meaningful name for the new folder; for example, earthmis:

http://www.winmobiletech.com/062007TICalculators/varlinkCrFolder2.png

Press (click – it’s at the bottom right) Enter two times. The new folder will be created as can be seen in here.

Now, select the new files you want to move to the new folder. To do this, press (click at the top, under the screen or press the hardware key on your keyboard) F5 (All) to bring up the selection menu. Here, just select 1:Select all. All the files will be marked in the non-collapsed folders. The results will be the following:

http://www.winmobiletech.com/062007TICalculators/varlinkCrFolder5.png

Now, press F1 (Manage) and select Move. You’ll need to decide which folder to move the selected files to; as you have only one folder (in addition to MAIN), you can just choose the default (earthmis). (If you will have more than one potential target folders, you’ll be able to select them right here.)

Now, you’ll be taken back to the file list view:

http://www.winmobiletech.com/062007TICalculators/varlinkCrFolder7.png

As can be seen, the two files have been copied to the new folder.

When copied into separate folders, you must use the folder name as the prefix when starting a given program in these folders as in foldername\appname(). This will be auto-generated for you when, after doing the above tests (but NOT making the new folder the default one – this will be explained later), you press Enter on the executable file of the two (earth.ASM):

http://www.winmobiletech.com/062007TICalculators/varlinkCrFolder8.png

In this screenshot, as can be seen, the name of the executable program (earth) has been prefixed by earthmis, using the backslash character to separate the two names. To try to run the game, you can just supply the closing parenthesis and pressing Enter. Then, you’ll be presented the “earthpgm not found” error message as can be seen in here.

This is because the main executable, earth, is trying to find the related resource files in the MAIN folder (in here, there is the executable ASM file (earth.89z – note the z at the end! Z, in most cases, states for assembly programs) and one data file (earth.89y – note the y, which, mostly, states for data files). This will be a problem with ALL third-party applications / games depending on other resource files.

To combat the problem, you will need to use the setFold (folderName) command (cd (Change Directory) under MS-DOS / Windows), where folderName, as you may have already guessed, will be earthmis in our case:

http://www.winmobiletech.com/062007TICalculators/varlinkCrFolder10.png

Press Enter two times; the result of this will be changing to the new folder:

http://www.winmobiletech.com/062007TICalculators/varlinkCrFolder11.png

Now, you can reissue the earthmis\earth() command above (you can even leave the foldername and just use earth()) and the game will now start. (Note that you’ll need to start the game and control jumping with the 2nd button in the game; not, say, Enter. This is pretty understandable if you take into account that this button is pretty much in the same line as the D-pad, unlike Enter.).

There is another very important thing you MUST master: copying the files off the RAM to the flash ROM.

2.2.3	Using the built-in flash ROM to store programs / data

As with all mobile platforms, dynamic memory (RAM) is very scarce and really precious. There is only 192 kbytes of RAM in the TI-89, which fills in REALLY fast, particularly if you (try to) run games. (If you encounter problems when you try to run something, it will most likely be caused by the shortage of RAM). Therefore, you MUST master backing up your files to the built-in flash ROM of your device. There is much more flash ROM than RAM.

To do this, go back to the already-known VAR-LINK mode, select the files in RAM to be moved to flash (in the F5: All menu), press F1:Manage and select 8:Archive variable:

http://www.winmobiletech.com/062007TICalculators/desktopVITArchiveVriable1.png

The filenames will, now, be prefixed with the http://www.winmobiletech.com/062007TICalculators/desktopVITArchiveVriable3.png icon, which means the files are no longer in RAM:

http://www.winmobiletech.com/062007TICalculators/desktopVITArchiveVriable2.png

You can easily check whether the transfer to the flash ROM has indeed succeeded. To do this, you’ll need to use the memory applet – another very important applet you need to master with all programmable calculators so that you can see how much dynamic (program) / static (flash ROM storage) memory you still have.

2.2.4	Checking the available RAM / flash ROM size

To do this, just press 2nd + 6 (MEM). In there, look for the two numbers at the bottom right (the cursor is just below them):

http://www.winmobiletech.com/062007TICalculators/desktopVTImemsize.png

The “RAM free 195852” means you have the full (factory) available RAM at your disposal; the “Flash ROM free 631482” means some 20k of files are already in the flash ROM of the device (that is, in this case, the emulator).

Finally, let me elaborate on how you can export files from the desktop emulator to the file system of your desktop computer. If you, for example, write a program in the emulator (see Chapter 17: Programming in the official manual on how programs need to be entered in the emulator) and save it as, say, omaapp2 (as can be seen in here), you’ll need to select F3:Link and, then, 1: Send. The desktop Windows OS will present a file save dialog, where you can rename the file before saving and also select its target directory):

http://www.winmobiletech.com/062007TICalculators/desktopVTISaveProgs3.png

(Note the ‘p’ in the .89p extension. As opposed to assembly programs, which end up in z, BASIC programs created using the built-in program editor end in p. Also note that the different file extensions are also listed HERE and HERE.)