User Tools

Site Tools


sd-8516_programmer_s_reference_guide

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-8516_programmer_s_reference_guide [2026/01/29 18:39] appledogsd-8516_programmer_s_reference_guide [2026/01/30 02:03] (current) appledog
Line 4: Line 4:
 The **Stellar Dynamics SD-8516** represents a categoretroical reimagining of microprocessor architecture. This 16-bit CPU, implemented in AssemblyScript for the VC-3 computer system, delivers performance exceeding conventional silicon constraints through advanced cross-boundary resonance microcascades. The **Stellar Dynamics SD-8516** represents a categoretroical reimagining of microprocessor architecture. This 16-bit CPU, implemented in AssemblyScript for the VC-3 computer system, delivers performance exceeding conventional silicon constraints through advanced cross-boundary resonance microcascades.
  
-**Key Specifications:**+The SD-8516 is intended to be an easy to learn architecture which remains era-authentic. 
 + 
 +^ CPU ^ Opcodes ^ Assembler ^ Notes ^ 
 +|  
 +| SD-8516 | 56 opcodes | 105 opcodes | | 
 +| 6809 | 59 opcodes | 154+ | "the most elegant 8 bit CPU ever designed"
 +| 8086 | 117 opcodes | 117 | standard of the era | 
 +| 6502 | 151 opcodes | 151 | standard of the era | 
 +| Z80 | 158 opcodes | hundreds | prefix machine--158 base opcodes | 
 +| 8080 | 244 opcodes | | | 
 + 
 + 
 +=== Key Specifications
 * 16-bit architecture with 16 general-purpose registers * 16-bit architecture with 16 general-purpose registers
 * 32-bit and 64-bit register pairing system * 32-bit and 64-bit register pairing system
Line 10: Line 22:
 * Memory: 256KB addressable via 4-bank system * Memory: 256KB addressable via 4-bank system
 * ~20× performance improvement over legacy 8510 design * ~20× performance improvement over legacy 8510 design
 +
 +=== Measured Performance:
 +* Clock speed: 10 MHz base, up to 100 MHz
 +* Sustained MIPS: 70 MIPS (i7-12700k)
 +* Memory bandwidth: ~540 MB/s
 +* Sound system overhead: < 5% CPU time
 +* Video refresh: 60 Hz (16.67ms frame time)
 +
 +== Technical Implementation
 +* **Architecture:** WebAssembly-based virtual CPU
 +* **Languages:** AssemblyScript (CPU core), JavaScript (I/O systems)
 +* **Memory Model:** 4 banks of 64k RAM
 +* **Audio Backend:** SD-450 4 voice polyphonic 5 waveform Audio System
 +* **Video Backend:** 9 mode Text and Graphics pixel-perfect render engine
 +
 +== Lore
 +Since the days of the first minicomputers, Stellar Dynamics has been at the forefront of microarchitecture design. The SD-8516 is not simply an iteration upon its predecessors; it is a categorical reimagining of what a "processor" can be when unshackled from quantum locality.
 +
 +While our earliest designs struggled with resonance cascade instability, the SD-8516 delivers stable, predictable cross-boundary resonance microcascades at clock rates exceeding the theoretical limits of conventional silicon.
 +
 +These advancements position the Stellar Dynamics SD-8516 as the definitive architecture for next-generation computation: a bridge between classical logic engines and the emergent technologies of multidimensional processing.
  
 <blockquote>This SD-8516 PROGRAMMER'S REFERENCE GUIDE has been developed as a working tool and reference source for those of you who want to maximize your use of the built-in capabilities of your VC-3 Computer System. This manual contains the information you need for your programs, from the simplest example all the way to the most complex. The PROGRAMMER'S REFERENCE GUIDE is designed so that everyone from the beginning BASIC programmer to the professional experienced in SD-8516 machine language can get information to develop his or her own creative programs. At the same time this book shows you how clever your SD-8516 really is. <blockquote>This SD-8516 PROGRAMMER'S REFERENCE GUIDE has been developed as a working tool and reference source for those of you who want to maximize your use of the built-in capabilities of your VC-3 Computer System. This manual contains the information you need for your programs, from the simplest example all the way to the most complex. The PROGRAMMER'S REFERENCE GUIDE is designed so that everyone from the beginning BASIC programmer to the professional experienced in SD-8516 machine language can get information to develop his or her own creative programs. At the same time this book shows you how clever your SD-8516 really is.
Line 31: Line 64:
 Think of your SD-8516 PROGRAMMER'S REFERENCE GUIDE as a useful tool to help you and you will enjoy the hours of programming ahead of you.</blockquote> Think of your SD-8516 PROGRAMMER'S REFERENCE GUIDE as a useful tool to help you and you will enjoy the hours of programming ahead of you.</blockquote>
  
-== System Lore 
-Since the days of the first minicomputers, Stellar Dynamics has been at the forefront of microarchitecture design. The SD-8516 is not simply an iteration upon its predecessors; it is a categorical reimagining of what a "processor" can be when unshackled from quantum locality. 
- 
-While our earliest designs struggled with resonance cascade instability, the SD-8516 delivers stable, predictable cross-boundary resonance microcascades at clock rates exceeding the theoretical limits of conventional silicon. 
- 
-These advancements position the Stellar Dynamics SD-8516 as the definitive architecture for next-generation computation: a bridge between classical logic engines and the emergent technologies of multidimensional processing. 
  
 == CPU Architecture == CPU Architecture
Line 61: Line 88:
 | R15 | Z | General Purpose | | R15 | Z | General Purpose |
  
-**Note:** The SD-8516 does not use register pairing except for multiplication operationswhich store results in the AB register pair.+== Register Encoding 
 +=== Byte Access 
 +Each register's high and low bytes are individually addressable using H/L suffixes: AH/ALBH/BL, XH/XL, etc.
  
-=== Register Encoding +=== 32-bit Pairs 
-Registers are encoded as 4-bit values (0-15), allowing two registers per byte: +Adjacent registers can be combined for certain 32-bit operations using concatenated names: 
-* Low nibble: First operand +- AB = A (high) + B (low) 
-* High nibble: Second operand+CD = C (high) + D (low
 +- EF, GI, JK, LM, TY, XZ
  
-Example{{{ADD AB}}} encodes as {{{0x01}}} (A=0B=1)+This is simulated 32 bit access; changing the value of a 32 bit pair will corrupt the underlying 16 bit registers, and so forth. Secondly, access is only marginally faster than 16 bit access; for memory loads, stores and compares it is usually faster to use native 16-bit mode. 
 + 
 +=== 24-bit Pointers 
 +Memory addressing uses a bank byte plus 16-bit offset. The naming convention is `[low-byte][offset]`: 
 +- BLX = BL (bank) + X (address) 
 +- ELM = EL (bank) + M (address) 
 +- FLD = FL (bank) + D (address) 
 +- GLK = GL (bank) + K (address) 
 + 
 +Eight bank registers (BLEL, FL, GL, IL, JL, LL, TL) each pair with eight address registers (A, C, D, K, M, X, Y, Z), yielding 64 possible 24-bit pointer combinations. 
 + 
 +=== Register Overlap 
 +As with their 32-bit counterparts, 24-bit pointers share components. ELM and ELD both use the EL bank byte. FLD and GLD both use the D address register. Modifying one affects the other -- a common source of bugs. Always verify pointer independence when using multiple pointers simultaneously.
  
 === Flags Register === Flags Register
Line 202: Line 244:
 | $01EFA6 | 1 | SOUND2_SUSTAIN | Voice 2 sustain | | $01EFA6 | 1 | SOUND2_SUSTAIN | Voice 2 sustain |
 | $01EFA7 | 1 | SOUND2_RELEASE | Voice 2 release | | $01EFA7 | 1 | SOUND2_RELEASE | Voice 2 release |
-| $01EFA8-$01,EFA9 | 2 | SOUND2_DATA | Voice 2 data |+| $01EFA8-$01EFA9 | 2 | SOUND2_DATA | Voice 2 data |
 |= **Sound System - Voice 3** |||| |= **Sound System - Voice 3** ||||
-| $01EFB0-$01,EFB1 | 2 | SOUND3_FREQUENCY | Voice 3 frequency |+| $01EFB0-$01EFB1 | 2 | SOUND3_FREQUENCY | Voice 3 frequency |
 | $01EFB2 | 1 | SOUND3_GATE | Voice 3 gate/waveform | | $01EFB2 | 1 | SOUND3_GATE | Voice 3 gate/waveform |
 | $01EFB3 | 1 | SOUND3_VOLUME | Voice 3 volume | | $01EFB3 | 1 | SOUND3_VOLUME | Voice 3 volume |
Line 211: Line 253:
 | $01EFB6 | 1 | SOUND3_SUSTAIN | Voice 3 sustain | | $01EFB6 | 1 | SOUND3_SUSTAIN | Voice 3 sustain |
 | $01EFB7 | 1 | SOUND3_RELEASE | Voice 3 release | | $01EFB7 | 1 | SOUND3_RELEASE | Voice 3 release |
-| $01EFB8-$01,EFB9 | 2 | SOUND3_DATA | Voice 3 data |+| $01EFB8-$01EFB9 | 2 | SOUND3_DATA | Voice 3 data |
 |= **Video Memory** |||| |= **Video Memory** ||||
 | $01F000-$01F3E7 | 1,000 | VM1_TEXT_BASE | Text mode character map | | $01F000-$01F3E7 | 1,000 | VM1_TEXT_BASE | Text mode character map |
Line 309: Line 351:
 | SEV | Set overflow flag | | SEV | Set overflow flag |
 | CLV | Clear overflow flag | | CLV | Clear overflow flag |
 +
 +=== Other
 +
 +|= Instruction |= Description |
 +| TSX | Transfer SP to register* |
 +| TXS | Transfer register to SP* |
 +
 +* (*) these opcodes were suggested by stackminer from the Fantasy Console 2.0 discord. Thank you, stackminer!
  
 === System Operations === System Operations
Line 420: Line 470:
  
 == KERNAL Functions == KERNAL Functions
-The KERNAL ROM provides system services at {{{$E000}}}:+The KERNAL ROM provides system services via an INT-accessible jumptable. The general format is to load AH with the function number and call the specified interrupt handler via INT (ex. INT 10h).
  
-=== Input/Output 
-**GETKEY** - Read keyboard buffer 
-{{{ 
-IN:  None 
-OUT: A = ASCII character (if available) 
-     B = previous buffer count 
-}}} 
  
-**WRITE_CHAR** - Write character to screen 
-{{{ 
-IN:  A = character code 
-     X = column (0-39/79) 
-     Y = row (0-24) 
-}}} 
- 
-**WRITE_STRING** - Write null-terminated string 
-{{{ 
-IN:  A = string address (low byte) 
-     B = string address (high byte) 
-     X = column 
-     Y = row 
-}}} 
- 
-=== Cursor Management 
-**CTOXY** - Move cursor 
-{{{ 
-IN:  X = column 
-     Y = row 
-}}} 
- 
-**GETCURSOR** - Read cursor position 
-{{{ 
-OUT: X = column 
-     Y = row 
-}}} 
- 
-=== String Utilities 
-**STRLEN** - Get string length 
-{{{ 
-IN:  A = string address (low byte) 
-     B = string address (high byte) 
-OUT: A = length (low byte) 
-     B = length (high byte) 
-     C = carry flag if > 256 bytes 
-}}} 
- 
-**BYTETOSTR** - Convert byte to decimal string 
-{{{ 
-IN:  A = byte value (0-255) 
-     X = destination address (low) 
-     Y = destination address (high) 
-OUT: Zero-terminated string at XY 
-}}} 
- 
-=== Arrow Key Handlers 
-* **ARR_LEFT** - Move cursor left (bounded) 
-* **ARR_RIGHT** - Move cursor right (bounded) 
-* **ARR_UP** - Move cursor up (bounded) 
-* **ARR_DOWN** - Move cursor down (bounded) 
- 
-== Assembly Language 
-=== Syntax 
-**Labels:** 
-<codify armasm: 
-                        ; labels example 
-loop:                   ; Define label 
-        JMP @loop       ; Reference label with @ 
-</codify> 
- 
-**Immediates:** 
-<codify armasm> 
-; immediates example 
-    LDA #$1234          ; Hexadecimal 
-    LDA #100            ; Decimal 
-    LDAL #'A'           ; Character literal 
-    </codify> 
- 
-**Comments:** 
-{{{ 
-; Single-line comment 
-}}} 
- 
-**Data Directives:** 
-<codify armasm> 
-; data directives 
-    .equ CONSTANT $1234         ; Define constant 
-    .bytes "Hello", 0           ; Byte array 
-    .word $1234, $5678          ; Word array 
-</codify> 
- 
-=== Example Programs 
-**Hello World** 
-<codify armasm> 
-; Hello World: 
- 
-    LDA @MSG 
-    LDX #0 
-    LDY #0 
-    CALL @WRITE_STRING 
-    RET 
- 
-MSG: 
-    .bytes "HELLO WORLD!", 0 
-</codify> 
- 
-**Fill Screen with Stars:** 
-<codify armasm> 
-    LDAL #'*'           ; Character to draw 
-    LDX #0              ; Start column 
-    LDY #0              ; Start row 
-     
-loop: 
-    CALL @WRITE_CHAR 
-    INC X 
-    CMP X, #40 
-    JNZ @loop 
-     
-    LDX #0              ; Reset column 
-    INC Y 
-    CMP Y, #25 
-    JNZ @loop 
-     
-    RET 
-</codify> 
- 
-**Random Number Generator (Galois LFSR):** 
-<codify armasm> 
-.equ RND_SEED $EFF0 
- 
-rnd_init: 
-    LDA [$EF05]         ; Hardware clock 
-    LDB [$EF06] 
-    XOR A, B 
-    STA [@RND_SEED] 
-    RET 
- 
-rnd_byte: 
-    LDA [@RND_SEED] 
-    MOV B, A 
-    ANDB BL, $01        ; Check LSB 
-    SHR A               ; Shift right 
-    CMPB BL, $00 
-    JZ @no_xor 
-    LDB $B400           ; Polynomial 
-    XOR A, B 
-no_xor: 
-    STA [@RND_SEED] 
-    RET 
-</codify> 
- 
-== Performance Characteristics == 
-**Measured Performance:** 
-* Clock speed: 10 MHz base, up to 100 MHz 
-* Sustained MIPS: 70 MIPS (i7-12700k) 
-* Memory bandwidth: ~540 MB/s 
-* Sound system overhead: < 5% CPU time 
-* Video refresh: 60 Hz (16.67ms frame time) 
- 
-**Optimization Notes:** 
-* Batch instruction execution (787,401 instructions per batch at 100 MIPS target) 
-* MessageChannel-based scheduling for low-latency loops 
-* Time-debt throttling maintains consistent clock rate 
-* Sound updates triggered by register writes (not polling) 
- 
-== Technical Implementation 
-**Architecture:** WebAssembly-based virtual CPU 
-**Languages:** AssemblyScript (CPU core), JavaScript (I/O systems) 
-**Memory Model:** 4 banks of 64k RAM 
-**Audio Backend:** SD-450 4 voice polyphonic 5 waveform Audio System 
-**Video Backend:** 9 mode Text and Graphics pixel-perfect render engine 
  
 == Appendix: Planned Features == Appendix: Planned Features
Line 622: Line 503:
 --- ---
  
-**SD-8516 Technical Manual** - Revision 1.0 +**SD-8516 Technical Manual** - Revision 1.0\\  
-**Copyright © 2025 Appledog Hu**+**Copyright © 2025 Appledog Hu**\\ 
 **All specifications subject to change as quantum resonance research continues.** **All specifications subject to change as quantum resonance research continues.**
sd-8516_programmer_s_reference_guide.1769711965.txt.gz · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki