sd-8516_programmer_s_reference_guide
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| sd-8516_programmer_s_reference_guide [2026/01/08 17:15] – created appledog | sd-8516_programmer_s_reference_guide [2026/01/08 17:57] (current) – appledog | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| * 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 | ||
| + | |||
| + | < | ||
| + | |||
| + | This REFERENCE GUIDE is not designed to teach the BASIC programming language or the SD-8516 machine language. There is, however, an extensive glossary of terms and a " | ||
| + | |||
| + | The SD-8516 PROGRAMMER' | ||
| + | apply the information creatively really depends on how much knowledge you have about the subject. In other words if you are a novice programmer you will not be able to use all the facts and figures in this book until you expand your current programming knowledge. | ||
| + | |||
| + | What you can do with this book is to find a considerable amount of valuable programming reference information written in easy to read, plain English with the programmer' | ||
| + | |||
| + | WHAT'S INCLUDED? | ||
| + | * Our complete "BASIC dictionary" | ||
| + | * If you need an introduction to using machine language with BASIC programs our layman' | ||
| + | * A powerful feature of all VC systems is called the KERNAL. It helps insure that the programs you write today can also be used on the VC-3 system of tomorrow. | ||
| + | * The Input/ | ||
| + | * You can explore the world of SPRITES, programmable characters, and high resolution graphics for the most detailed and advanced animated pictures in the microcomputer industry. | ||
| + | * You can also enter the world of music synthesis and create your own songs and sound effects with the best built-in synthesizer available in any personal computer. | ||
| + | * If you're an experienced programmer, the soft load language section gives you information about the 64's ability to run C and other high level languages. This is in addition to BASIC. | ||
| + | |||
| + | Think of your SD-8516 PROGRAMMER' | ||
| == System Lore | == System Lore | ||
| Line 93: | Line 113: | ||
| **Bank allocation: | **Bank allocation: | ||
| - | * Bank 0: System RAM, program space | + | * Bank 0: User Programming Space |
| - | * Bank 1: Audio samples | + | * Bank 1: KERNAL |
| * Bank 2: Primary video framebuffer + palette | * Bank 2: Primary video framebuffer + palette | ||
| * Bank 3: Secondary video buffer (high-resolution modes) | * Bank 3: Secondary video buffer (high-resolution modes) | ||
| + | |||
| + | Banks 2 and 3 are free for use in text mode and bank 3 is usually free in the lower-resolution video modes. | ||
| === System Variables | === System Variables | ||
| Line 146: | Line 168: | ||
| |= Instruction |= Description |= Flags Affected | | |= Instruction |= Description |= Flags Affected | | ||
| | ADD | Add | Z, N, C, V | | | ADD | Add | Z, N, C, V | | ||
| - | | ADDB | Add bytes | Z, N, C, V | | ||
| | SUB | Subtract | Z, N, C, V | | | SUB | Subtract | Z, N, C, V | | ||
| - | | SUBB | Subtract bytes | Z, N, C, V | | ||
| | MUL | Multiply (result in AB) | Z, N | | | MUL | Multiply (result in AB) | Z, N | | ||
| - | | MULB | Multiply bytes | Z, N | | ||
| | DIV | Divide (quotient in A, remainder in B) | Z, N | | | DIV | Divide (quotient in A, remainder in B) | Z, N | | ||
| - | | DIVB | Divide bytes | Z, N | | ||
| | MOD | Modulo | Z, N | | | MOD | Modulo | Z, N | | ||
| - | | MODB | Modulo bytes | Z, N | | ||
| | INC | Increment | Z, N | | | INC | Increment | Z, N | | ||
| | DEC | Decrement | Z, N | | | DEC | Decrement | Z, N | | ||
| Line 162: | Line 179: | ||
| |= Instruction |= Description |= Flags Affected | | |= Instruction |= Description |= Flags Affected | | ||
| | AND | Bitwise AND | Z, N | | | AND | Bitwise AND | Z, N | | ||
| - | | ANDB | Bitwise AND (byte) | Z, N | | ||
| | OR | Bitwise OR | Z, N | | | OR | Bitwise OR | Z, N | | ||
| - | | ORB | Bitwise OR (byte) | Z, N | | ||
| | XOR | Bitwise XOR | Z, N | | | XOR | Bitwise XOR | Z, N | | ||
| - | | XORB | Bitwise XOR (byte) | Z, N | | ||
| | NOT | Bitwise NOT | Z, N | | | NOT | Bitwise NOT | Z, N | | ||
| - | | NOTB | Bitwise NOT (byte) | Z, N | | ||
| | TEST | Bitwise AND (no write) | Z, N | | | TEST | Bitwise AND (no write) | Z, N | | ||
| - | | TESTB | Bitwise AND byte (no write) | Z, N | | ||
| === Shift/ | === Shift/ | ||
| Line 176: | Line 188: | ||
| |= Instruction |= Description |= Flags Affected | | |= Instruction |= Description |= Flags Affected | | ||
| | SHL | Shift left | Z, N, C | | | SHL | Shift left | Z, N, C | | ||
| - | | SHLB | Shift left byte | Z, N, C | | ||
| | SHR | Shift right | Z, N, C | | | SHR | Shift right | Z, N, C | | ||
| - | | SHRB | Shift right byte | Z, N, C | | ||
| | ROL | Rotate left | Z, N, C | | | ROL | Rotate left | Z, N, C | | ||
| - | | ROLB | Rotate left byte | Z, N, C | | ||
| | ROR | Rotate right | Z, N, C | | | ROR | Rotate right | Z, N, C | | ||
| - | | RORB | Rotate right byte | Z, N, C | | ||
| === Comparison & Branching | === Comparison & Branching | ||
| Line 188: | Line 196: | ||
| |= Instruction |= Description |= Flags Affected | | |= Instruction |= Description |= Flags Affected | | ||
| | CMP | Compare (subtract, discard result) | Z, N, C, V | | | CMP | Compare (subtract, discard result) | Z, N, C, V | | ||
| - | | CMPB | Compare bytes | Z, N, C, V | | ||
| | JMP | Unconditional jump | None | | | JMP | Unconditional jump | None | | ||
| | JZ | Jump if zero | None | | | JZ | Jump if zero | None | | ||
| Line 194: | Line 201: | ||
| | JC | Jump if carry set | None | | | JC | Jump if carry set | None | | ||
| | JNC | Jump if carry clear | None | | | JNC | Jump if carry clear | None | | ||
| - | | JN | Jump if negative | None | | ||
| - | | JNN | Jump if not negative | None | | ||
| - | | JV | Jump if overflow | None | | ||
| - | | JNV | Jump if no overflow | None | | ||
| - | | JL | Jump if less (signed) | None | | ||
| - | | JNL | Jump if not less | None | | ||
| - | | JG | Jump if greater (signed) | None | | ||
| - | | JNG | Jump if not greater | None | | ||
| === Subroutine Operations | === Subroutine Operations | ||
| Line 212: | Line 211: | ||
| | PUSHA | Push all registers | | | PUSHA | Push all registers | | ||
| | POPA | Pop all registers | | | POPA | Pop all registers | | ||
| + | | INT | Software interrupt | | ||
| - | === System | + | === Flag Operations |
| |= Instruction |= Description | | |= Instruction |= Description | | ||
| - | | NOP | No operation | | ||
| - | | HALT | Halt CPU (set H flag) | | ||
| - | | INT | Software interrupt | | ||
| - | | TICK | Performance counter tick | | ||
| | SSI | Enable Sound System Interrupts | | | SSI | Enable Sound System Interrupts | | ||
| | CSI | Clear Sound System Interrupts | | | CSI | Clear Sound System Interrupts | | ||
| Line 230: | Line 226: | ||
| | SEV | Set overflow flag | | | SEV | Set overflow flag | | ||
| | CLV | Clear overflow flag | | | CLV | Clear overflow flag | | ||
| + | |||
| + | === System Operations | ||
| + | |= Instruction |= Description | | ||
| + | | CART | Cartridge trigger, used for Cartridge BASIC and others. | | ||
| + | | YIELD | Poll UI, System Clock, Sound Chip, Video Chip, and others | | ||
| + | | NOP | No operation | | ||
| + | | HALT | Halt CPU (set H flag) | | ||
| == Sound System (SD-450) | == Sound System (SD-450) | ||
| Line 250: | Line 253: | ||
| **Voice base addresses: | **Voice base addresses: | ||
| - | * Voice 0: {{{$ED00}}} | + | * Voice 0: {{{$1ED00}}} |
| - | * Voice 1: {{{$ED10}}} | + | * Voice 1: {{{$1ED10}}} |
| - | * Voice 2: {{{$ED20}}} | + | * Voice 2: {{{$1ED20}}} |
| - | * Voice 3: {{{$ED30}}} | + | * Voice 3: {{{$1ED30}}} |
| === Waveforms | === Waveforms | ||
| Line 276: | Line 279: | ||
| ; Play middle C on voice 0 | ; Play middle C on voice 0 | ||
| LDA $112B ; C4 frequency (262 Hz / 0.0596) | LDA $112B ; C4 frequency (262 Hz / 0.0596) | ||
| - | STA [$ED00] ; FREQ_LO/HI | + | STA [$1ED00] ; FREQ_LO/HI |
| LDAL $01 ; Square wave | LDAL $01 ; Square wave | ||
| - | STAL [$ED02] ; GATE | + | STAL [$1ED02] ; GATE |
| LDAL $4D ; ~30% volume | LDAL $4D ; ~30% volume | ||
| - | STAL [$ED03] ; VOLUME | + | STAL [$1ED03] ; VOLUME |
| }}} | }}} | ||
| Line 484: | Line 487: | ||
| **Measured Performance: | **Measured Performance: | ||
| * Clock speed: 10 MHz base, up to 100 MHz | * Clock speed: 10 MHz base, up to 100 MHz | ||
| - | * Sustained MIPS: 60 MIPS (i7-12700k) | + | * Sustained MIPS: 70 MIPS (i7-12700k) |
| - | * Memory bandwidth: ~280 MB/s | + | * Memory bandwidth: ~540 MB/s |
| * Sound system overhead: < 5% CPU time | * Sound system overhead: < 5% CPU time | ||
| * Video refresh: 60 Hz (16.67ms frame time) | * Video refresh: 60 Hz (16.67ms frame time) | ||
sd-8516_programmer_s_reference_guide.1767892518.txt.gz · Last modified: by appledog
