Difference between revisions of "Programming Libraries and Engines"

From Intellivision Wiki
Jump to: navigation, search
(Basic Math)
m (Protected "Programming Libraries and Engines" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
 
(13 intermediate revisions by 2 users not shown)
Line 6: Line 6:
  
 
If there are specific functions or library elements that you'd like to see, put a request on the "discussion" page.
 
If there are specific functions or library elements that you'd like to see, put a request on the "discussion" page.
 +
 +
== Utility / Hardware Description ==
 +
 +
* Definitions for register addresses and bit fields:  [[gimini.asm]]
 +
* Macro libraries
 +
** High level constructs: [[util.mac]]
 +
** [[PSG]] abstraction: [[psg.mac]]
 +
** [[STIC]] abstraction:  [[stic.mac]]
 +
** Graphic image macros:  [[gfx.mac]]
  
 
== Basic Math ==
 
== Basic Math ==
Line 11: Line 20:
 
* Multiplication
 
* Multiplication
 
** (to do)
 
** (to do)
** See also: [[Introducing_the_Instruction_Set_Part_4#Using_Shifts_for_Multiplication|this tutorial on using shifts for multiplication]]
+
** See also: [[Introducing_the_Instruction_Set_Part_4#Using_Shifts_for_Multiplication|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|this tutorial on using shifts for division by powers of 2]]
+
** See also: [[Introducing_the_Instruction_Set_Part_4#Using_Shifts_for_Division_by_Powers_of_Two|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]]
Line 22: Line 31:
  
 
* Distance computation:  [[dist_fast.asm]]
 
* Distance computation:  [[dist_fast.asm]]
* Random number generation:  [[rand.asm]]
+
* Random number generation
 +
** Fully featured:  [[rand.asm]]
 +
** Stripped down and fast: [[randfast.asm]]
  
 
== Memory Management ==
 
== Memory Management ==
  
 +
* Game variables
 +
** Macros for setting up the cartridge and declaring variables: [[cart.mac]]
 +
** Initializing memory:  [[initmem.asm and initmem.mac]]
 +
* Block memory functions
 +
** Copy memory
 +
*** As-is: [[memcpy.asm]]
 +
*** Unpacking packed 8-bit data: [[memunpk.asm]]
 +
** Compare memory:  [[memcmp.asm]]
 +
** Fill / clear memory
 +
*** C-style function:  [[memset.asm]]
 +
*** Older FILLMEM/FILLZERO/CLRSCR combined routine: [[fillmem.asm]]
 
* Bank switching
 
* Bank switching
 
** Intellicart bank switch utility routines [[ic_banksw.asm]]
 
** Intellicart bank switch utility routines [[ic_banksw.asm]]
 
** To do:  ECS-style bank switching routines
 
** To do:  ECS-style bank switching routines
* Game variables
 
** Macros for declaring variables: [[dseg.mac]]
 
  
 
== Basic I/O ==
 
== Basic I/O ==
  
 
* Status display
 
* Status display
** Printing strings: [[print.asm]]
+
** Printing strings: [[print.asm]] [[print.mac]]
** Printing number
+
** Printing numbers
 
*** 16-bit decimal numbers: [[prnum16.asm]]
 
*** 16-bit decimal numbers: [[prnum16.asm]]
 
*** 32-bit decimal numbers: [[prnum32.asm]]
 
*** 32-bit decimal numbers: [[prnum32.asm]]
*** Hexadecimal numbers: [[hex_disp.asm]] [[hex16.asm]]
+
*** Hexadecimal numbers: [[hexdisp.asm]] [[hex16.asm]]
 
* Hand controller scanning
 
* Hand controller scanning
 
** Wait for tap / wait for release:  [[wnk.asm]]
 
** Wait for tap / wait for release:  [[wnk.asm]]
Line 55: Line 75:
 
== Music / Sound Effects ==
 
== Music / Sound Effects ==
  
The intention is to put music and sound effects engine here. None present currently.
+
* Music
 +
** Tracker: [[tracker.asm and tracker.mac]]
 +
** Example: [[Trkdemo.asm and demosong.asm]]

Latest revision as of 09:08, 4 December 2010


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.

Utility / Hardware Description

Basic Math

Game Math

Memory Management

Basic I/O

  • Status display
  • 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