# Programming Libraries and Engines

### From Intellivision Wiki

(Difference between revisions)

(→Basic Math) |
|||

Line 11: | Line 11: | ||

* Multiplication | * Multiplication | ||

** (to do) | ** (to do) | ||

- | ** See also: [[Introducing_the_Instruction_Set_Part_4#Using_Shifts_for_Multiplication | + | ** See also: [[Introducing_the_Instruction_Set_Part_4#Using_Shifts_for_Multiplication|this tutorial on using shifts for multiplication]] |

* Division | * Division | ||

** Signed and unsigned divide: [[dividivu.asm]] | ** Signed and unsigned divide: [[dividivu.asm]] | ||

** Optimized unsigned divide: [[fastdivu.asm]] | ** Optimized unsigned divide: [[fastdivu.asm]] | ||

- | ** See also: [[Introducing_the_Instruction_Set_Part_4#Using_Shifts_for_Division_by_Powers_of_Two | + | ** See also: [[Introducing_the_Instruction_Set_Part_4#Using_Shifts_for_Division_by_Powers_of_Two|this tutorial on using shifts for division by powers of 2]] |

* Square root | * Square root | ||

** Integer and fixed point square root: [[sqrt.asm]] | ** Integer and fixed point square root: [[sqrt.asm]] |

## Revision as of 19:16, 6 September 2008

## Contents |

# Programming Libraries and Engines

Below are links to various library functions, as well as programming frameworks (aka "engines") that you can use when building a game. After all, while inventing wheels is sometimes fun, more often than not it's more fun to focus on writing a game.

If there are specific functions or library elements that you'd like to see, put a request on the "discussion" page.

## Basic Math

- Multiplication
- (to do)
- See also: this tutorial on using shifts for multiplication

- Division
- Signed and unsigned divide: dividivu.asm
- Optimized unsigned divide: fastdivu.asm
- See also: this tutorial on using shifts for division by powers of 2

- Square root
- Integer and fixed point square root: sqrt.asm

## Game Math

- Distance computation: dist_fast.asm
- Random number generation: rand.asm

## Memory Management

- Bank switching
- Intellicart bank switch utility routines ic_banksw.asm
- To do: ECS-style bank switching routines

- Game variables
- Macros for declaring variables: dseg.mac

## Basic I/O

- Status display
- Printing strings: print.asm
- Printing number
- 16-bit decimal numbers: prnum16.asm
- 32-bit decimal numbers: prnum32.asm
- Hexadecimal numbers: hex_disp.asm hex16.asm

- Hand controller scanning
- Wait for tap / wait for release: wnk.asm
- Comprehensive: (todo -- tends to be integrated with game's event handling scheme)

- Intellivoice
- Core Intellivoice driver: ivoice.asm
- Speaking numbers using RESROM samples: saynum16.asm
- Speaking numbers using AL2: (to do)
- SP0256-AL2 Allophone library: (external link coming; cannot be uploaded here due to license reasons.)

## Sprite Engine

The intention is to put a sprite engine here. None present currently.

## Music / Sound Effects

The intention is to put music and sound effects engine here. None present currently.