User Tools

Site Tools


sd:history

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
sd:history [2026/03/20 12:24] appledogsd:history [2026/03/20 12:33] (current) appledog
Line 64: Line 64:
 The SD-8516's legendary //single-cycle MUL// is not based on the latest technology, but technology from yesteryear. It uses a lookup table to perform an 8bit argument to 16 bit result MUL in a single CPU cycle. The SD-8516's legendary //single-cycle MUL// is not based on the latest technology, but technology from yesteryear. It uses a lookup table to perform an 8bit argument to 16 bit result MUL in a single CPU cycle.
  
-The //Quarter-square lookup// uses the formula xy = (x^2 + y^2 - (x-y)^2) / in a squaring table of just 512 bytes. This allows it to do an 8x8 multiply with three lookups. One such implementation ran in 79 to 83 cycles on a 6502 -- much faster than shift-and-add. On a chip with an internal squaring ROM and a dedicated subtractor, this can be done in 3 to 4 cycles.+The //Quarter-square lookup// uses the formula xy = ((x+y)^2 - (x-y)^2) / in a squaring table of just 512 bytes. This allows it to do an 8x8 multiply with three lookups. One such implementation ran in 79 to 83 cycles on a 6502 -- much faster than shift-and-add. On a chip with an internal squaring ROM and a dedicated subtractor, this can be done in 3 to 4 cycles.
  
 But 3 to 4 cycles is nothing compared to one. //According to the lore,// Stellar Dynamics bet the bank and licensed a 128 KB mask ROM die from an unknown Japanese semiconductor partner. Hitachi, Toshiba, Sharp and many others were all doing custom ROM for game cartridges in that era. This ROM, bonded directly into the SD-8516 package, contains a complete 8 bit to 16 bit multiplication table. The MUL microcode concatenates the two 8-bit operands as a 16-bit ROM address and reads the 16-bit result in a single bus cycle. For partial products it then sums them with the internal ALU. A total of no more than 4 ROM lookups and 3 additions. Pipelined, an 8x8 mul into 16 bits could be done in //one CPU cycle.// But 3 to 4 cycles is nothing compared to one. //According to the lore,// Stellar Dynamics bet the bank and licensed a 128 KB mask ROM die from an unknown Japanese semiconductor partner. Hitachi, Toshiba, Sharp and many others were all doing custom ROM for game cartridges in that era. This ROM, bonded directly into the SD-8516 package, contains a complete 8 bit to 16 bit multiplication table. The MUL microcode concatenates the two 8-bit operands as a 16-bit ROM address and reads the 16-bit result in a single bus cycle. For partial products it then sums them with the internal ALU. A total of no more than 4 ROM lookups and 3 additions. Pipelined, an 8x8 mul into 16 bits could be done in //one CPU cycle.//
  
-<blockquote>In truth, it's not really a single-cycle MUL -- that's just a marketing term. It actually can take up to seven CPU cycles to multiply a 32 bit number, as it has to shift and add for each additional byte -- and most MULs on the platform will be 16 bits, so you are looking at 2-4 cycles per MUL. Still, pound for pound, a 1 cycle 8 bit MUL is technically very impressive.+<blockquote>In truth, it's not really a single-cycle MUL -- that's just a marketing term. It actually can take up to five CPU cycles to multiply a 16 bit number, as it has to shift and add for each additional byte. Still, pound for pound, nothing else could do an 8 bit MUL that fast.
  
 And thus, the SD-8516's legendary "single-cycle MUL" was born. And thus, the SD-8516's legendary "single-cycle MUL" was born.
-</blockqoute>+</blockquote>
  
 Table lookup MUL was not new, but it was typically impractical due to cost and die area. Stellar Dynamics' innovation was integrating the lookup ROM on-die at a time when most competitors considered 128 KB of ROM too expensive for a general-purpose processor. The gamble paid off. The SD-8516's legendary "single-cycle MUL" became a signature feature and the reason it found its niche in scientific instruments, embedded systems, arcade hardware, and high-end personal computers where multiply-intensive workloads (3D graphics, signal processing, game physics) justified the premium price. Table lookup MUL was not new, but it was typically impractical due to cost and die area. Stellar Dynamics' innovation was integrating the lookup ROM on-die at a time when most competitors considered 128 KB of ROM too expensive for a general-purpose processor. The gamble paid off. The SD-8516's legendary "single-cycle MUL" became a signature feature and the reason it found its niche in scientific instruments, embedded systems, arcade hardware, and high-end personal computers where multiply-intensive workloads (3D graphics, signal processing, game physics) justified the premium price.
sd/history.1774009459.txt.gz · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki