|Up to TI-86 Assembly Source
|3D Rotation and Misc. 3D Math Routines
This is an unsigned multiply routinw for the TI-86. I believe it's the fastest routine possible, but obviously that's easy for such a small program. I'm sure this has been done before at least as good, but if you need a multiplier you might want to use this one.
Display an aligned sprite.
|Even More Advanced Sprite Clipping Routine
Nemesis' sprite routine featuring non-aligned, variable-sized (1x1-8x255) and horizontally CLIPPED!!! Just 72 bytes and fast enough.
|Advanced Sprite Clipping Routines
|C exit and atexit functions
These are the "atexit", "exit", and "_Exit" functions as found in the C Standard Library. Use "atexit" to register a function to be called on program exit. Use "exit" to exit from anywhere in a program and call each function registered with "atexit" in reverse order. Use "_Exit" to exit immediately. This version is a little faster and smaller than the previous version, at $36 bytes for code (versus $3A bytes). It still uses $05 bytes for variables and at least $42 bytes (this can vary) for stack space.
|String to Floating Point Number Conversion Routine
|Convert a string to an integer
Standard C atoi function. Converts a null-terminated string to a 16-bit integer. Now faster and smaller than ever.
|Binary to String
Two routines that format integer numbers to ascii strings that are printable using _puts or _vputs.
Display an any size, b&w sprite anywhere on screen! Comes with an example!
|Centered Text Routines
Routines for displaying centered text in the large and small font.
Routine draws any filled circle. It's quite optimized. (Uses a line routine to draw)
|CTime User Code
CTime code for other programs to display a clock while CTime is running.
|C&C 86 Engine
Source code to the map scrolling and mouse interface for a C&C type game.
According to the Guide: [This] is a fast String Variable Type creation tool easy enough for everyone to use.
|Character classification routines
Standard C character classification routines - isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, and isxdigit. Might be useful somehow.
|TI-86 Z80 Disassembler
|Display History Entry
The source shows you how to display a history entry on the screen in the variable width font
Converts gray to black and white using a 4x4 dithering pattern. Includes three different dithering patterns: Bayer, newspaper, and "K map" (for really interesting results). This whole routine takes only 70 cycles.
Table-driven menu engine produces bar menus similar to BASIC's menu() command.
Draws a filled box on-screen.
|8xYx4 Sprite Drawing Routine
One of the fastest routine to draw 8xY 4colors sprites (for 8x8x4,
Bresenham's circle algorithm. MUCH faster that the TI-OS routines. This version fixes a bug in the PSet subroutine.
Clears the screen faster than call _clrLCD
|Faster FindPixel Routine
|Fast Sprite Shooter
This is a program for anyone making a game. It is a very fast routine that moves a sprite which can shoot bullets. All it needs is enemies and a storyline. This routine is fast enough to be used with some type of scrolling background and multiple enemies. A great start for any programer especially the beginer to intermediate that doesn't want to bother with their sprite shooting routines.
a fast tilemap routine compatible with most sprite routines
|Fast Enough Signed Multiply routine
Fast and small signed 8-bit multiply routine. Probably the fastest and smallest classic shift-and-add signed multiply routine (correct me if I'm wrong).
|Fast Enough Unsigned Multiply routine
Fast (204-251 cycles) and small (35 bytes) unsigned 8-bit multiply routine. Probably the fastest and smallest classic shift-and-add multiply routine.
24 bytes, 127 cycles, 134 cycles with bus load time
Smallest Findpixel available (24 bytes)... Now works even if bit 6 of hl is set!
|91/95 T-state FindPixel Routine
|Find Pixel Routines
Two routines, one for speed and one for size.
Fast line routine. Uses Bresenham's Line Algorithm.
A collection of different font installation programs.
This is a routine that allows you to use the FOR repitition structure in Assembly Language. This can easily be used on any calculator because there are no specific TI-86 ROM Calls
|Fast FindPixel Routine
Allows bold, italic, underline formatting. Some grayscale support. May contain strange opcodes.
|Get Direction Routine
Four shaded grayscale routine. Super fast and with less flicker than any other routine.
|GrayScale PutSprite Routine
PutSprite routine modified for grayscale.
|HeapSort for the Z80
An implementation of the famous HeapSort sorting algorithm in Z80 assembly language.
|String Input Routine
This is a routine that accepts a string entered on the keypad, and stores it in memory at a specified location. It supports most common characters, multiple lines, string length limits, backspacing, and graph screen text.
Inverses the entire screen. Very fast
|JM's Memory Resident Loader
This is a loader that will place a small program (1KB or less) into the top of page 1. This allows you to write a program using the TI-OS's built in program writer to write a machine language. This algorithm can also be used for library routines in conjuction with an Interrupt.
|Length of String
This routine calculates the length of a string if it would be printed in the variable width font. Can be useful for centering text etc.
|16-bit math routines (multiply, divide)
|32-bit Math Routines for the Z80
|Menu 86 v1.4
TI-86 menu drawing routine. Very helpful, if you need a menus for your assembly program, or are trying to port a program directly from TI-86 Basic language. Right now the routine itself is only 159 bytes. It also has easy access to display text inside the menu. Also included is the ability to choose from the two different types of menus.
This makes a menu that uses the up and down arrows to move, and uses an arrow to point at the item you want.
|Menu Bar Routine
This is a generic scrolling menu routine. It scrolls up and down with the arrow keys, calls a routine for the selection when ENTER or 2nd is pressed, returns when EXIT is pressed, and calls a routine when any other key is pressed. The routine is data-driven, so you don't have to change the routine at all. Using it is very simple and is all explained in the README.txt file.
|Fast 8-bit Multiply Routine
|Multiply HL by 10
Multiplies HL by 10. Returns carry on overflow. Faster and smaller than the TI-OS version.
|Fast 8-bit Signed Multiplication Routines
|Music routines version 0.1b
These are easy-to-use functions to play songs on the link port. The songs it plays are defined with notes and not with a soundwave like other sound routines and programs. Because of this, the songs are much smaller than the wave versions (though they're limited to simple notes). This project is a beta version, so USE AT YOUR OWN RISK.
|Op1 Equals Pi
The value of Op1 equals Pi (3.1415...)
Various testing and practice programs I have written. Maybe one of these will help you or spark an idea for you.
This routine puts a 16x16 masked sprite without clipping. You can save the background too and restore it at the same place. This is an example, maybe not the fastest...
Fast and small PutSprite routine.
|Ubiquitous Z80 QuickSort Implementation
This routine is quicksort, the fastest sorting algorithm currently out there. It sorts stuff in ascending order, and a demo is included. Just plug the start and end indexes of the list to bc and de, and you're set. Simple and small (<41 instructions, 90 bytes) and really, really fast (200 elements in an unnoticable amount of time). It works for all Z80 processors, all calcs, cellphones, and whatever, though the demo is for the 86. But like all quicksorts, it uses the stack, although I made the recursion structure a little less stack expensive.
|Random number generator
this routine is equal to randInt(1,100) or the more correct form 100 int(rand)+1
|Random Number Generator
This routine uses a linear feedback shift register to generate a stream of random bits. Used in "Antz!". Read the file for more info.
|Random Number Routine
A collection of different routines maybe usefull for something.
|Russian Peasants' Algorithm
Waits for a keypress and then prints the Scan Code (Hex equivalent) of that keypress.
Simple Vertical Scrolling Routine by Nick Haigler. Scrolls up to 319 pixels!!!
Gives you that RPG style look of someone talking, or typing text. It also will scroll the screen as it gets to the bottom row.
assorted scrolling routines for you to use, fairly fast. slightly updated from previous version
|TI-86 Game Engine
This is a very complex and fast scrolling engine. Working, but UNFINISHED!!! Demo program included.
|Search for strings
This routine allows you to easily search for strings with a certain markup word at the beginning of the data.
|Search and Compare Routines
Various routines for searching and comparing.
Rotates image on screen or in buffer. Good for moving backgrounds.
Gives the same functions to the small font that we are used to witth the large one (_homeup, _newline...).
Using this routine programs using _getkey can be smaller.
|Small Scrolling Text
This routine basically displays scrolling text in small font one letter at a time. It can easily be ported to the z80 calcs if needed.
This is a nifty little routine that will scroll your text down/right one pixel as many times as you want... pretty neat! check it out!!!
|Soft Scroll 86
This is a sound routine for the TI-86 calculator. It takes in the wavelength of the note, and time the note plays. This is one of the purest sound routines I have ever used. The note comes out very smooth. Attached are two pictures of how the sound wave actually looks coming from the routine.
|IPS Patch for ZX48.ROM v0.25a
This patch, applied to a Sinclair Spectrum ROM, allows it to be runned instead of the TI-86 ROM in emulators like TI86EMU. Check webpage for more details.
A compilation of a few useful sprite routines.
|Sprite Moving Demo
Demos basic game coding concepts
Several string routines for use in asm. Substr (like sub() in BASIC), strlen (find the # of chars in a string), and strpixels (find long a string is in pixels as if it were printed in the small font). Updated to fix _substr and make it smaller.
|String handling routines
This is an implementation of the string handling functions found in the ANSI C Standard Library. All of the functions memchr, memcmp, memcpy, memmove, memset, strcat, strchr, strcmp, strcoll, strcpy, strcspn, strlen, strncat, strncmp, strncpy, strpbrk, strrchr, strspn, strstr, and strxfrm are implemented. Only strerror and strtok are unimplemented currently. See the file doc/index.html in the archive for complete documentation.
Routine to input a string.
Converts a string to a real number.
|General Sound Algorithm
General routine for link port sound.
These 2 routines reverse sprites. The 1st reverses every byte, bit-by-bit, in a set of data (ideal for 1 byte wide sprites). Ihe other reverses for a 2 byte wide sprite after the 1st is applied. These saved me over 350 bytes in Super Saiya-jin Rage, soon to be re-released.
Text input routine that accepts numbers and upper/lowercase letters.
An update to my threading system. This time, I've fixed a bug with restoring the ix register, and I've also added memory locking and unlocking. This will help protect programs from crashing during routines that access global data.
|Preemptive Multithreading 1.0
These are functions for *preemptive* multithreading in an assembly-language program. This is similar to the way modern operating systems multitask. It uses mode 2 interrupts, so grayscale is possible by editing the interrupt handler. It supports unlimited number of threads (currently only one variable limits it to 255); exiting and canceling threads mid-slice; waiting on another thread; and variable thread priorities, similar to nice in *nix. It also supports conditional assembling, so you can include only the features you need!
|Cooperative Multi-threading v1.0
Functions for cooperative multi-threading in an assembly-language program. This version more closely (but not exactly) adheres to POSIX threads (Pthreads) than the previous versions.
|Cooperative Multithreading Library
This is a cooperative multithreading library for the Z80 processor. It has all of the common routines for manipulating threads. It also includes a library for handling readers/writer locks.
|Trig Tables FAT v2.1
Header file for sine and cosine values.
|Trig Tables LITE v2.1
Header file for sine and cosine values. Compiles half the size of fat version, but twice as accurate.
A (unaligned) sprite routine that uses a precalculated table to speed up drawing. Very fast, but not suitable for all purposes. No masking, no clipping, black and white, 8x8 only.
|Ultra Slow Unsigned Multiply routine
Ultra slow (averages 218114190 cycles) unsigned 8-bit multiply routine. Useful when you want the speed of cold molasses.
|Very Fast Gray Sprite Routine (8x8 and 16x16)
Draws an 8x8 grayscale sprite in 4,609 cycles or less, and a 16x16 in 16,443. The fastest that I know about so far... Optional clipping added.
|Very Fast 8-bit Multiplication Library
|Very Fast Customizeable Sprite Routine
|_vputs for multiple lines
This routine works exactly like _vputs, except that it will interperet $d6 as a newline char. This can dramatically reduce code size when using the variable-width text on multiple lines. Now includes a version for the '83+.
|Very Small 4 GrayScale
The smallest 4 GrayScale routine: 96 bytes only.
|While Loop Routine
A routine that alows you to use the WHILE repitition structure in Assembly Language.
A highly optimized writeback routine for saving data such as high scores and saved games.
Decrease Contrast on ti86
Routine for Increasing the Screen Contrast
|ZMR - Zoomin' Mob Routine (Grayscale Version)
Originally by Dux Gregis, updated by Ricky Cobb for Grayscale, and Optional Masking. This 8x8 putsprite/grayscale routine does clipping of sprites to draw only what is need to the screen. This update includes a small bug fix from the original ZMR.