User Tools

Site Tools


sd: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
sd:sd-8516_programmer_s_reference_guide [2026/02/25 02:35] appledogsd:sd-8516_programmer_s_reference_guide [2026/02/25 02:44] (current) appledog
Line 339: Line 339:
  
 == Appendix 3. Memory Map == Appendix 3. Memory Map
-=== Bank Addressing +Placed in it's own section for easy reference
-The SD-8516 supports 4 banks of 64KB each (256KB total) through special addressing modes+[[Appendix 3 Memory Map]]
- +
-<codify armasm> +
-        ; ld/st example +
-        LDA [I:J]        ; Load from bank I, offset J +
-        STA [2:$1000]    ; Store to bank 2, offset $1000 +
- +
-</codify> +
- +
-**Bank allocation:** +
-* Bank 0: User Programming Space +
-* Bank 1: KERNAL and Operating System +
-* Bank 2: Primary video framebuffer + palette +
-* 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 +
-|= Address |= Description | +
-| $EF00 | Video mode register | +
-| $EF01 | Column count (40 or 80) | +
-| $EF02 | Row count (25) | +
-| $EF03 | Character width (8) | +
-| $EF04 | Character height (8) | +
-| $EF05-$EF08 | Hardware clock (32-bit milliseconds) | +
-| $EF09 | Default character color | +
-| $EF0A | Cursor color | +
-| $EF0B | Color palette mode (0=COLORDORE, 1=CGA 5153) | +
-| $EF10 | Cursor X position | +
-| $EF11 | Cursor Y position | +
-| $EF12 | Cursor blink state | +
-| $EF20 | Keyboard status flags | +
-| $EF21 | Keyboard buffer count | +
-| $EF22-$EF31 | Keyboard buffer (16 bytes) | +
- +
-=== Memory Map +
- +
-^ **BANK 0 - User RAM & System Variables** |||| +
-^ Address ^ Size (Bytes) ^ Name ^ Description | +
-| $000000-$00FFFF | 65,536 | USER_RAM | Free user RAM | +
-^ **BASIC Program Storage** |||| +
-| $000100-$00FF00 | 65,024 | BASIC_START | BASIC program area | +
- +
- +
-^ **BANK 1 - KERNAL ROM & Hardware** |||| +
-^ Address ^ Size ^ Name ^ Description | +
-| $010000-$0100FF | 256 | BOOTSTRAP | Kernal zero page (reserved) | +
-| $010100-$013FFF | ~16KB | KERNAL_CODE | Soft Reset entry point | +
-| $014000-$01DBFF | 40,960 | RESERVED | Future kernal expansion | +
-| $01DB00-$01DBFF | 256 | PATB_TBUF | ROM BASIC tokenizer scratch | +
-| $01DC00-$01DFFF | 1,024 | STACK | Stack space (grows down from $01DFFF) | +
-| $01E000-$01E7FF | 2,048 | VM1_CHAR_ROM | PETSCII font data | +
-| $01E800-$01E8FF | 256 | KERNAL_WORK | Kernal workspace | +
-| $01E900-$01EBFF | 768 | INT_VECTOR_TABLE | Interrupt vectors (256 × 3 bytes) | +
-| $01EC00-$01ECFF | 256 | SCRATCH_BUFFER | General-purpose scratch space | +
-| $01ED00-$01EDFF | 256 | INPUT_BUFFER | Input line buffer / Kernal variables | +
-^ **Video System** |||| +
-| $01EF00 | 1 | VIDEO_MODE | Current video mode | +
-| $01EF01 | 1 | VIDEO_COLUMNS | Number of columns (40) | +
-| $01EF02 | 1 | VIDEO_ROWS | Number of rows (25) | +
-| $01EF03 | 1 | VIDEO_CHAR_WIDTH | Character width in pixels (8) | +
-| $01EF04 | 1 | VIDEO_CHAR_HEIGHT | Character height in pixels (8) | +
-| $01EF05-$01,EF08 | 4 | VIDEO_HW_CLOCK | Hardware clock (32-bit milliseconds) | +
-| $01EF09 | 1 | VIDEO_CHAR_COLOR | Default character color | +
-| $01EF0A | 1 | VIDEO_CURSOR_COLOR | Cursor color | +
-| $01EF0B | 1 | VIDEO_COLOR_MODE | Color palette mode | +
-|= **Cursor System** |||| +
-| $01EF0C | 1 | CURSOR_BLINK | Cursor blink state | +
-| $01EF0D | 1 | CURSOR_STATE | Cursor on/off | +
-| $01EF0E | 1 | CURSOR_X | Cursor column | +
-| $01EF0F | 1 | CURSOR_Y | Cursor row | +
-|= **Keyboard System** |||| +
-| $01EF10 | 1 | KBD_BUFFER_COUNT | Number of keys in buffer | +
-| $01EF11-$01,EF30 | 32 | KBD_BUFFER | Key buffer (16 pairs) | +
-|= **Input Mode System** |||| +
-| $01EF31 | 1 | INPUT_MODE | Input mode flag (0=normal, 1=input) | +
-| $01EF32 | 1 | INPUT_LENGTH | Current input length | +
-| $01EF33 | 1 | SYSCALL_STATUS | Execute SYS on next opportunity | +
-| $01EF34-$01,EF36 | 3 | SYSCALL_ADDR | SYS call address | +
-| $01EF37-$01,EF39 | 3 | KBPC | BASIC code pointer | +
-|= **Random Number Generator** |||| +
-| $01EF40-$01,EF41 | 2 | RND_SEED | PRNG seed | +
-|= **Sound System - Voice 0** |||| +
-| $01EF80-$01,EF81 | 2 | SOUND0_FREQUENCY | Voice 0 frequency | +
-| $01EF82 | 1 | SOUND0_GATE | Voice 0 gate/waveform | +
-| $01EF83 | 1 | SOUND0_VOLUME | Voice 0 volume | +
-| $01EF84 | 1 | SOUND0_ATTACK | Voice 0 attack | +
-| $01EF85 | 1 | SOUND0_DECAY | Voice 0 decay | +
-| $01EF86 | 1 | SOUND0_SUSTAIN | Voice 0 sustain | +
-| $01EF87 | 1 | SOUND0_RELEASE | Voice 0 release | +
-| $01EF88-$01,EF89 | 2 | SOUND0_DATA | Voice 0 data | +
-|= **Sound System - Voice 1** |||| +
-| $01EF90-$01,EF91 | 2 | SOUND1_FREQUENCY | Voice 1 frequency | +
-| $01EF92 | 1 | SOUND1_GATE | Voice 1 gate/waveform | +
-| $01EF93 | 1 | SOUND1_VOLUME | Voice 1 volume | +
-| $01EF94 | 1 | SOUND1_ATTACK | Voice 1 attack | +
-| $01EF95 | 1 | SOUND1_DECAY | Voice 1 decay | +
-| $01EF96 | 1 | SOUND1_SUSTAIN | Voice 1 sustain | +
-| $01EF97 | 1 | SOUND1_RELEASE | Voice 1 release | +
-| $01EF98-$01,EF99 | 2 | SOUND1_DATA | Voice 1 data | +
-|= **Sound System - Voice 2** |||| +
-| $01EFA0-$01,EFA1 | 2 | SOUND2_FREQUENCY | Voice 2 frequency | +
-| $01EFA2 | 1 | SOUND2_GATE | Voice 2 gate/waveform | +
-| $01EFA3 | 1 | SOUND2_VOLUME | Voice 2 volume | +
-| $01EFA4 | 1 | SOUND2_ATTACK | Voice 2 attack | +
-| $01EFA5 | 1 | SOUND2_DECAY | Voice 2 decay | +
-| $01EFA6 | 1 | SOUND2_SUSTAIN | Voice 2 sustain | +
-| $01EFA7 | 1 | SOUND2_RELEASE | Voice 2 release | +
-| $01EFA8-$01EFA9 | 2 | SOUND2_DATA | Voice 2 data | +
-|= **Sound System - Voice 3** |||| +
-| $01EFB0-$01EFB1 | 2 | SOUND3_FREQUENCY | Voice 3 frequency | +
-| $01EFB2 | 1 | SOUND3_GATE | Voice 3 gate/waveform | +
-| $01EFB3 | 1 | SOUND3_VOLUME | Voice 3 volume | +
-| $01EFB4 | 1 | SOUND3_ATTACK | Voice 3 attack | +
-| $01EFB5 | 1 | SOUND3_DECAY | Voice 3 decay | +
-| $01EFB6 | 1 | SOUND3_SUSTAIN | Voice 3 sustain | +
-| $01EFB7 | 1 | SOUND3_RELEASE | Voice 3 release | +
-| $01EFB8-$01EFB9 | 2 | SOUND3_DATA | Voice 3 data | +
-|= **Video Memory** |||| +
-| $01F000-$01F3E7 | 1,000 | VM1_TEXT_BASE | Text mode character map | +
-| $01F800-$01FBE7 | 1,000 | VM1_COLOR_BASE | Text mode color map | +
-|= **BANK 2 & 3 - User RAM** |||| +
-| $020000-$02FFFF | 65,536 | USER_RAM | Free user RAM (Bank 2) | +
-| $030000-$03FFFF | 65,536 | USER_RAM | Free user RAM (Bank 3) | +
- +
  
 == Appendix 4. Instruction Set Architecture == Appendix 4. Instruction Set Architecture
sd/sd-8516_programmer_s_reference_guide.txt · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki