SampleCodeLibrary
From Retrosoftware
(→Sample Code Library) |
(Added link to Hyper Viper) |
||
| Line 103: | Line 103: | ||
Fully commented GPL source code of a simple P65 assembler Space Invaders clone designed for use with the SWIFT IDE as an extensible base for further projects. | Fully commented GPL source code of a simple P65 assembler Space Invaders clone designed for use with the SWIFT IDE as an extensible base for further projects. | ||
| + | |||
| + | [[HyperViper]] by Kenton Price | ||
Revision as of 00:32, 19 February 2011
Contents |
Sample Code Library
BASIC Routines
Text Wrapping Routine by Francis G. Loch
An example of how to dynamically wrap text for use in programs such as text adventures.
Limitless commenting in BASIC by Andrew Weston
Using BeebugSoft's Toolkit Plus *CRUNCH command, with !Beebit and !6502em on RISC OS.
Assembler Routines
Bit manipulation by J.G.Harston
Setting Clearing and Copying bits of data.
Crunching Using Pu Crunch by Dave Footitt
Efficient compaction of data using Pu Crunch.
Custom Text Input by Francis G. Loch
Custom routine for obtaining text input.
Day of week by J.G.Harston
Calculate the day of the week from day/month/year input.
Denormalising by J.G.Harston
Denormalising a number (converting from floating point to integer).
Detecting the TUBE by Francis G. Loch
Routine for detecting whether the TUBE is being used.
Fast fixed-point multiplication library by Rich Talbot-Watkins
A collection of routines designed to perform multiplication by fixed-point values between -1.0 and +1.0 on the 6502, typically for applying transformations to a point, e.g. in a 3D game.
Fast multiplication routines by Rich Talbot-Watkins
Various techniques for performing a multiply quickly on the 6502.
Print decimal by J.G.Harston
Printing decimal numbers.
Reading the keyboard by direct hardware access by Rich Talbot-Watkins
How to improve the speed of your games by ditching OSBYTE and reading the keyboard hardware directly.
Square roots by J.G.Harston
Calculating integer square roots.
Graphic Routines
Line by line vertical scrolling on the Beeb by Rich Talbot-Watkins (Updated!)
An introduction to the "vertical rupture" technique, and then an application of its use in a line-by-line vertical scrolling routine.
Calculate 10K screen mode screen address by Steve O'Leary
A Screen address calculator for use in 10 screens (i.e. Mode 4 and 5).
Calculate 20K sceen mode screen address by Steve O'Leary
A Screen address calculator for use in 20K screens (i.e. Mode 0,1 and 2).
Basic Mode 2 Sprite Plotter (no mask) by Steve O'Leary
A basic sprite plotter (in assembly) for use in Mode 2 but easily adapted for other modes. Written in Swift in P65 assembler.
Mode 2 masked sprite Plotter by Steve O'Leary
A Mode 2 masked sprite plotter but easily adapted for other modes. Written in Swift in P65 assembler.
Moving Mode 2 masked sprites by Steve O'Leary
Demo and source for a mode 2 masked sprite plotter showing how to erase/plot and move sprites about. Written in Swift in P65 assembler.
Sound Routines
Sample Sound Routine Example by A.N. Fibber
Development Support Routines
BASIC tokeniser/detokeniser in C by Thomas Harte
Micro Power Style Loading Screen
Freeware Loading Screen by Paul Davis
A set of tools and a short tutorial describing how to create your own loading screen for our freeware releases.
Full Game Source Code
Jet Set Miner by Tom Walker
Sparse Invaders by Neil Beresford
Fully commented GPL source code of a simple P65 assembler Space Invaders clone designed for use with the SWIFT IDE as an extensible base for further projects.
HyperViper by Kenton Price