Difference between revisions of "Mini Memory"
Stephen Shaw (talk | contribs) (add link to article on sound and call load) |
Stephen Shaw (talk | contribs) (link to specific section of speech) |
||
Line 114: | Line 114: | ||
References: Editor Assembler Manual: pages 351. 355. 422 to 427 (Errata: The reference in para 1, page 355. should be to Section 22.1.4. not as printed in the manual). | References: Editor Assembler Manual: pages 351. 355. 422 to 427 (Errata: The reference in para 1, page 355. should be to Section 22.1.4. not as printed in the manual). | ||
Also refer to the article [[Speech]] | Also refer to the article [[Speech#Using CALL LOADs for SPEECH|Speech with CALL LOAD]] | ||
and the article [[Sound with CALL LOAD]] | and the article [[Sound with CALL LOAD]] | ||
Revision as of 13:50, 7 October 2014
Summary
Mini Memory module is a plug in module containing a battery and battery sustained ram. The memory can be used for a variety of purposes including program storage and permits the creation of assembly routines using the simple line-by-line assembler supplied on cassette with the module. Additional CALLs are added to BASIC including access to VDP RAM.
The mini memory module carries out a number of functions, but only one at a time:
You may use it for ONE of:
File Handling
The module itself can be used in a TI BASIC program as though it was a single disk file called "MINIMEM", and all the file handling commands available with disk drives will work with the module. It has a battery backup, and the information you store in the module will therefore remain after you switch your console off.
The module permits you to use the 32k Expansion Memory as a second 'solid state disk drive' called "EXPMEM2", which may store up to 24k of data. This data is lost when the 32k expansion is switched off.
Using either the module or the 32k expansion as data files, the information is retrieved even more quickly than with a disk drive. The computer does not have to waste time in moving a disk drive head over the disk.
It is possible to store data in the module or expansion memory with one program, and then to access the data with a second program, provided you do not reset the system by using QUIT or removing the module or power supply. This may help you to run a long adventure program for instance, by first placing the text into the memory and then loading your control program.
If you use the module as a data file, the contents can be saved to tape: thus you may store adventure text into the module with a BASIC program, and then copy the data onto tape easily using the 'S' option from the 'Easybug' selection from the main menu. Data is reloaded with the 'L' option.
Default values
When you OPEN a file to save data to mini memory the default settings are:
SEQUENTIAL, DISPLAY, VARIABLE 80.
Using APPEND
If you have problems opening APPEND files just try dropping the file definitions and open as
OPEN # 1:" MINIMEM", APPEND
This can be used with files opened previously as OPEN #1 :" MINIMEM", OUTPUT etc.
The default values apply -e. g. SEQUENTIAL, DISPLAY, VARIABLE 80.
APPEND can ONLY be used with VARIABLE records, but you can specify a different length e. g. VARIABLE 100 etc.
N. B. This length is the MAXIMUM length of the VARIABLE file.
DISPLAY is OK if you are only putting single values into each record, but becomes obscure for multi-value records. You may prefer to specify INTERNAL for these.
Because APPEND can only be used with VARIABLE records, you are also stuck with SEQUENTIAL records - you cannot specify a RELATIVE file.
So OPEN # 1:" MINIMEM", SEQUENTIAL, INTERNAL, VARIABLE 100, APPEND
is OK. (The restrictions on the use of APPEND appear in the Extended Basic Manual, which also indicates the default values - MINIMEM appears to be treated in the same way as a disk drive).
Sample BASIC program storing DATA to Mini Memory
100 CALL INIT 110 OPEN #1:" MINIMEM", OUTPUT, VARIABLE 120 PRINT #1: AAA 130 CLOSE #1 140 OPEN #1: "MlNIMEM", APPEND 150 PRINT #1: 1234 160 CLOSE #1 170 OPEN #1:" MINIMEM", INPUT 180 INPUT #1: A 190 INPUT #1: B 200 PRINT A, B 210 CLOSE #1 220 END
Storing a screen dump to Mini Memory
See Mini Memory Screen Dump to Module A routine with explanation on reading the screen and dumping the screen to mini memory by placing it directly into memory locations in the module; and a routine to read the dumpred screen from the module and place it on screen.
Program storage
A small program (up to 4k) may be stored in the module using SAVE MINIMEM and recovered using OLD MINIMEM. The program is loaded almost instantly.
Assembly Language access
With the module a cassette is supplied with a 'line by line assembler' which provides a primitive and difficult to use method of writing your own machine code programs.
You will need to purchase the Editor/Assembler manual for information on the 99/4A Assembly language, and should be aware that the manual is not written for the novice.
The LBLA itself occupies the module, and the maximum machine code program you may write with it is therefore about 750 bytes. A few machine code games are now appearing on cassette which can be loaded into the module.
The mini memory provides a low cost entry into the field of machine code programming.
Machine code is a 'low level' language, which is not as easy to use as BASIC. Because the computer does not have to translate the commands, a machine code program may be as much as 1600 times faster than a TI Basic program.
EXTENSIONS TO TI BASIC
The mini memory adds some commands for use in your TI BASIC programs, allowing you to PEEK and POKE both CPU and VDP memory, and to obtain the hexadecimal string defining any character:
See also the article Using VDP with BASIC
CALL CHARPAT
is used to obtain the defining string for a character, which you may then manipulate with SEG$ and redefine with CALL CHAR.
e.g.CALL HCHAR(1,1,94,760) CALL CHARPAT(94,A$) A$=SEG$(A$,1,14)&"FF"
CALL LINK
permits a TI BASIC program to use a machine code utility or program stored in the Mini Memory with CALL LOAD.
PEEK and POKE
are used in many computers to look at and change the contents of one single memory location in the computer. The 99/4A console has 16k of user memory (RAM) known as VDP RAM, which is not directly addressable by the CPU (Central Processing Unit). The Mini Memory is the ONLY module available which allows you access to the VDP ram.
CALL PEEKV and CALL POKEV
are used, and samples may be seen in preceeding chapter on advanced programming. They may be used to look at your PROGRAM, or to manipulate the SCREEN DISPLAY.
CALL LOAD and CALL PEEK
are used to access the CPU RAM, which comprises of the 4k mini memory, the 32k expansion memory, and the 255 bytes of CPU ram in the console. CALL PEEK can also be used to examine the contents of CPU ROM (READ ONLY MEMORY).
If you have a speech synthesiser try this line in a BASIC program with the Mini Memory module plugged in:
CALL LOAD(-27648,70,"",-27648,65,"",-27648,72,"",-27648,70,"",-27648,64,"",-27648,80)
This also works with Extended Basic with Expansion Memory.
References: Editor Assembler Manual: pages 351. 355. 422 to 427 (Errata: The reference in para 1, page 355. should be to Section 22.1.4. not as printed in the manual).
Also refer to the article Speech with CALL LOAD and the article Sound with CALL LOAD
CAUTION
The mini memory contains a battery with a stated life of two years, and will retain any data you load into it, even after the console is switched off and the module removed.
Data is destroyed if you: Insert or remove the module when the console is switched on. Use CALL INIT or the INITIALISE option. Use the module for something else.
Data in the module is also subject to corruption by static electricity, and you should not rely on it as a sole copy of your program or data. Always keep a tape backup.