sd-8516_programmer_s_reference_guide
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sd-8516_programmer_s_reference_guide [2026/01/29 18:40] – appledog | sd-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: | ||
| + | * **Languages: | ||
| + | * **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, | ||
| + | |||
| + | While our earliest designs struggled with resonance cascade instability, | ||
| + | |||
| + | These advancements position the Stellar Dynamics SD-8516 as the definitive architecture for next-generation computation: | ||
| < | < | ||
| Line 31: | Line 64: | ||
| Think of your SD-8516 PROGRAMMER' | Think of your SD-8516 PROGRAMMER' | ||
| - | == System Lore | ||
| - | Since the days of the first minicomputers, | ||
| - | |||
| - | While our earliest designs struggled with resonance cascade instability, | ||
| - | |||
| - | These advancements position the Stellar Dynamics SD-8516 as the definitive architecture for next-generation computation: | ||
| == CPU Architecture | == CPU Architecture | ||
| Line 61: | Line 88: | ||
| | R15 | Z | General Purpose | | | R15 | Z | General Purpose | | ||
| - | **Note:** The SD-8516 does not use register | + | == Register Encoding |
| + | === Byte Access | ||
| + | Each register's high and low bytes are individually addressable using H/L suffixes: AH/AL, BH/BL, XH/XL, etc. | ||
| - | === Register Encoding | + | === 32-bit Pairs |
| - | Registers are encoded as 4-bit values | + | 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 A, B}}} encodes as {{{0x01}}} | + | 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 (BL, EL, FL, GL, IL, JL, LL, TL) each pair with eight address registers | ||
| + | |||
| + | === Register Overlap | ||
| + | As with their 32-bit counterparts, | ||
| === Flags Register | === Flags Register | ||
| 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 | + | The KERNAL ROM provides system services |
| - | === Input/ | ||
| - | **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 @ | ||
| - | </ | ||
| - | |||
| - | **Immediates: | ||
| - | <codify armasm> | ||
| - | ; immediates example | ||
| - | LDA # | ||
| - | LDA #100 ; Decimal | ||
| - | LDAL #' | ||
| - | </ | ||
| - | |||
| - | **Comments: | ||
| - | {{{ | ||
| - | ; Single-line comment | ||
| - | }}} | ||
| - | |||
| - | **Data Directives: | ||
| - | <codify armasm> | ||
| - | ; data directives | ||
| - | .equ CONSTANT $1234 ; Define constant | ||
| - | .bytes " | ||
| - | .word $1234, $5678 ; Word array | ||
| - | </ | ||
| - | |||
| - | === Example Programs | ||
| - | **Hello World** | ||
| - | <codify armasm> | ||
| - | ; Hello World: | ||
| - | |||
| - | LDA @MSG | ||
| - | LDX #0 | ||
| - | LDY #0 | ||
| - | CALL @WRITE_STRING | ||
| - | RET | ||
| - | |||
| - | MSG: | ||
| - | .bytes "HELLO WORLD!", | ||
| - | </ | ||
| - | |||
| - | **Fill Screen with Stars:** | ||
| - | <codify armasm> | ||
| - | LDAL #' | ||
| - | 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 | ||
| - | </ | ||
| - | |||
| - | **Random Number Generator (Galois LFSR):** | ||
| - | <codify armasm> | ||
| - | .equ RND_SEED $EFF0 | ||
| - | |||
| - | rnd_init: | ||
| - | LDA [$EF05] | ||
| - | 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 | ||
| - | </ | ||
| - | |||
| - | == 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: | ||
| - | **Languages: | ||
| - | **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.1769712057.txt.gz · Last modified: by appledog
