User Tools

Site Tools


base:6502_6510_maths

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
base:6502_6510_maths [2015-10-20 06:53] – [Multiplication] grahambase:6502_6510_maths [2022-08-14 12:07] – [Packing/Crunching algos] martin_piper
Line 11: Line 11:
   * [[http://www.6502.org/tutorials/compare_beyond.html|Beyond 8-bit Unsigned Comparisons]] - A very interesting article by Bruce Clark at [[http://www.6502.org|www.6502.org]]   * [[http://www.6502.org/tutorials/compare_beyond.html|Beyond 8-bit Unsigned Comparisons]] - A very interesting article by Bruce Clark at [[http://www.6502.org|www.6502.org]]
   * [[8-Bit Ranged Comparison]] - By White Flame   * [[8-Bit Ranged Comparison]] - By White Flame
 +  * [[16-Bit Absolute Comparison]] - By Skate & Eins
 +  * [[16-Bit Comparison]] - TWW
 +
 ==== Addition/Subtraction ==== ==== Addition/Subtraction ====
  
   * [[16bit addition and subtraction]] - 16-bit addition and subtraction by FMan   * [[16bit addition and subtraction]] - 16-bit addition and subtraction by FMan
-  * [[Inverse subtraction]] - .A = operand - .A, opposite of what SBC does by White Flame +  * [[Inverse subtraction]] - .A = operand - .A, opposite of what SBC does by White Flame 
-  * [[Signed 8bit + 16bit addition]] - by White Flame+  * [[Signed 8bit + 16bit addition]] - Sign extension by White Flame
  
 ==== Multiplication ==== ==== Multiplication ====
Line 21: Line 24:
   * [[8bit multiplication (8bit product)]] - by White Flame   * [[8bit multiplication (8bit product)]] - by White Flame
   * [[8bit multiplication (16bit product)]] - also can be 16*8=16bit - by White Flame   * [[8bit multiplication (16bit product)]] - also can be 16*8=16bit - by White Flame
 +  * [[Short 8bit multiplication (16bit product)]] - by Graham 
 +  * [[8bit multiplication (16bit product) fast no tables]] - by djmips
   * [[16bit multiplication (32-bit product)]]   * [[16bit multiplication (32-bit product)]]
-  * [[Short 8bit multiplication (16bit product)]] - by Graham 
   * [[Fast 8bit multiplication(16bit product)]] (signed multiplication) - by Oswald/Resource   * [[Fast 8bit multiplication(16bit product)]] (signed multiplication) - by Oswald/Resource
   * [[Seriously fast multiplication]] (8/16 bit signed/unsigned multiplication) - by JackAsser/Instinct   * [[Seriously fast multiplication]] (8/16 bit signed/unsigned multiplication) - by JackAsser/Instinct
 +  * [[Fastest multiplication]] (16 bit unsigned multiplication) - by Repose
 +  * [[Another fast 8bit multiplication]] (16bit product) - by litwr
   * [[Table generator routine for fast 8 bit mul table]] - by Graham   * [[Table generator routine for fast 8 bit mul table]] - by Graham
   * [[Multiplication with a constant]] - by Various   * [[Multiplication with a constant]] - by Various
 +  * [[base:24bit_multiplication_24bit_product|24 bit multiplication (signed or unsigned)]] -by Neils
 ==== Division ==== ==== Division ====
  
   * [[8bit divide (8bit product)]]   * [[8bit divide (8bit product)]]
 +  * [[8bit divide by constant (8bit result)]]
   * [[16bit division (16-bit result) ]]   * [[16bit division (16-bit result) ]]
 +  * [[24bit division (24-bit result) ]]
   * [[signed 8bit divide by 2 (arithmetic shift right)]] - by Bitbreaker/Oxyron/Nuance   * [[signed 8bit divide by 2 (arithmetic shift right)]] - by Bitbreaker/Oxyron/Nuance
 +
 +==== Exponentiation ====
 +  * [[Exponentiation]]
  
 ==== Square Root ==== ==== Square Root ====
-  * [[Fast sqrt]] (extracted from CSDB forums)- Graham+  * [[Fast sqrt]] (extracted from CSDB forums) - Graham 
 +  * [[16bit and 24bit sqrt]] (extracted from CSDB forums)
  
 ==== Log ==== ==== Log ====
Line 43: Line 55:
  
   * [[8bit atan2 (8-bit angle)]] - by doynax   * [[8bit atan2 (8-bit angle)]] - by doynax
 +  * [[8bit atan2 using the CORDIC algorithm]] - by Oswald
   * [[Generating Sines with BASIC]] - by Doynax   * [[Generating Sines with BASIC]] - by Doynax
   * [[Generating Approximate Sines in Assembly]] - by White Flame   * [[Generating Approximate Sines in Assembly]] - by White Flame
Line 70: Line 83:
   * [[Perspective]]   * [[Perspective]]
   * [[Backface Culling]]   * [[Backface Culling]]
-  * [[Lighting]] 
-  * [[Flat Shading]] 
-  * [[Gouraud Shading]] 
  
-Also I strongly advise you to read Stephen Judd's awesome series titled "A different perspective" about 3d coding in C= Hacking:+You may also want to read Stephen Judd's awesome series titled "A different perspective" about 3d coding in C= Hacking:
  
   * [[magazines:chacking8|C= Hacking Issue 8]] - August 1994   * [[magazines:chacking8|C= Hacking Issue 8]] - August 1994
Line 92: Line 102:
   * [[Optimal Sort (16-bit elements)]] - by Mats Rosengren   * [[Optimal Sort (16-bit elements)]] - by Mats Rosengren
   * [[Shell Sort (16-bit elements)]] - by Fredrik Ramsberg   * [[Shell Sort (16-bit elements)]] - by Fredrik Ramsberg
 +  * [[Quicksort (16-bit elements)]] - by Vladimir Lidovski aka litwr
  
 +Also see the page on [[base:sprites|sprites]] for some sorting routines optimised for sprite multiplexers.
  
 ===== Random Numbers ===== ===== Random Numbers =====
  
 +  * [[Comparison of 6502 random generators]]
 +    * [[16bit xorshift random generator]]
 +    * [[X ABC Random Number Generator (8/16 bit)]]
 +    * [[32bit Galois LFSR]]
 +    * [[Two very fast 16bit pseudo random generators as LFSR]] - with nearly 2^31 period - by Hanno Behrens
 +    * [[16bit pseudo random generator]]
 +    * [[another 16bit pseudo random generator]]
 +    * [[Small, fast 8-bit PRNG]] - with full 8-bit period - by White Flame
 +    * [[Small, fast 16-bit PRNG]] - with full 16-bit period - by White Flame
 +    * [[AX+ Tinyrand8]] - a fast 8-bit random generator with internal 16bit state - by Wil
   * [[BASIC RND routine]] - Stephen Judd   * [[BASIC RND routine]] - Stephen Judd
   * [[Fast 8bit ranged random numbers]] - by kerm1t   * [[Fast 8bit ranged random numbers]] - by kerm1t
-  * [[16bit pseudo random generator]] +  * [[Ranged Random Numbers with Even Distribution]] - by Kruthers
-  * [[another 16bit pseudo random generator]] +
-  * [[Two very fast 16bit pseudo random generators as LFSR]] - with nearly 2^31 period - by Hanno Behrens +
-  * [[32bit Galois LFSR]]+
   * [[Flexible Galois LFSR]] - by gregg   * [[Flexible Galois LFSR]] - by gregg
-  * [[Small, fast 8-bit PRNG]] - with full 8-bit period - by White Flame + 
-  * [[Small, fast 16-bit PRNG]] - with full 16-bit period - by White Flame+
  
 ===== Number conversion ===== ===== Number conversion =====
Line 111: Line 130:
   * [[More Hexadecimal to Decimal Conversion]] - without lookup tables, by Andrew Jacobs - taken from [[http://www.6502.org|www.6502.org]]   * [[More Hexadecimal to Decimal Conversion]] - without lookup tables, by Andrew Jacobs - taken from [[http://www.6502.org|www.6502.org]]
   * [[Another Hexadecimal to Decimal Conversion]] - using lookup tables, to plain ASCII, by Mace   * [[Another Hexadecimal to Decimal Conversion]] - using lookup tables, to plain ASCII, by Mace
 +  * [[Int16 and UInt16 conversion to String]]
   * [[Decimal to Hexadecimal Conversion]] - by Mace   * [[Decimal to Hexadecimal Conversion]] - by Mace
 +  * [[8 bit to Hexadecimal Conversion]] - by Abujok
   * [[32 bit hexadecimal to decimal conversion]] - no tables, no BCD mode, by Graham    * [[32 bit hexadecimal to decimal conversion]] - no tables, no BCD mode, by Graham 
   * [[Tiny .A to ASCII routine|Tiny .A to 3-Digit Decimal Conversion]]   * [[Tiny .A to ASCII routine|Tiny .A to 3-Digit Decimal Conversion]]
Line 117: Line 138:
  
 ===== Packing/Crunching algos ===== ===== Packing/Crunching algos =====
 +For actual crunching software and usage of crunching software, see [[https://codebase64.org/doku.php?id=base:crossdev#crunching|the cross development section]] or [[https://codebase64.org/doku.php?id=tools:start#native_development|the tools for native development section]] instead.
  
 +  * [[Streaming 1/2/4/8-bit Numbers Without Spanning Bytes]] - by White Flame
   * [[The Secret of Fast LZW Crunching]] - by Antitrack/Legend, Sept.22nd, a.d.1998, for Domination paper edition   * [[The Secret of Fast LZW Crunching]] - by Antitrack/Legend, Sept.22nd, a.d.1998, for Domination paper edition
-  * [[RLE pack/unpack]] - Coded by MagerValp+  * [[base:rle_pack_unpack|RLE Toolkit for CC65 v 1.0]] - RLE pack/unpack coded by MagerValp
   * [[2Mhz Time Crunch V5 disassembled]] - Disassembly of Stoat and Tim's Time Cruncher V5. Disassembled by Marko Makela.   * [[2Mhz Time Crunch V5 disassembled]] - Disassembly of Stoat and Tim's Time Cruncher V5. Disassembled by Marko Makela.
   * [[Decruncher for MDG-Packer/Linker 1.1]] - Dasm source code for depacking MDG-Packer Files.   * [[Decruncher for MDG-Packer/Linker 1.1]] - Dasm source code for depacking MDG-Packer Files.
   * [[MDG Bytesmasher 0.04]] - Dasm Source code of a simple rle packer with 5 packcodes.   * [[MDG Bytesmasher 0.04]] - Dasm Source code of a simple rle packer with 5 packcodes.
   * [[base:LZMPi compression|LZMPi compressor and decompressor]]. Includes source and examples.   * [[base:LZMPi compression|LZMPi compressor and decompressor]]. Includes source and examples.
 +  * [[base:compression_benchmarks|Compression Benchmarks]]. A comparison of compression ratios and decompression speeds of various packers. 
 +  * [[base:Dictionary compression|Dictionary compression algorithm]]. Includes source and examples.
base/6502_6510_maths.txt · Last modified: 2023-08-21 00:49 by repose