Using the X16 Reference
This page covers the ways into the guide: the contents, the reader, search, look up and Copilot Chat. They all end up in the same reader tab.
How to find your way around
The X16 Reference view, under the BitMagic X16 butterfly in the activity bar, lists every chapter and its sections, two levels down. Click any of them to open the reader there.
The buttons at the top of the view search the guide, open it at its contents page, and check for a newer version.
How to read
The reader shows one chapter at a time, in an editor tab. You can split it beside your code like any other tab.
- Back and forward with the arrows,
Alt+LeftandAlt+Right, or the mouse’s side buttons. Links between chapters open in the same tab, so back always takes you to where you were. - The chapter list at the top jumps to any chapter, and Contents goes to the guide’s contents page. Each page ends with links to the previous and next chapters.
- The outline down the left lists the page’s sections and follows where you are as you scroll. Outline hides it.
- Find in page with
Ctrl+F. - It reopens where you left it when VSCode restarts.
How to search
X16 Reference: Search the X16 Reference, or the search button in the view, searches as you type. The search box in the reader (Ctrl+K or /) does the same.
| Type | Finds |
|---|---|
| A name | Routines, registers, keywords and instructions by name, and by their other names: CHROUT, memory_fill, ADDRx_L, POKE, LDA |
| An address | What’s at it: $FFD2, 0x9F23, FFD2h |
| Words | Sections that have all of them: sprite attributes, load file |
Reference entries come first, then the pages.
How to look up the word under the cursor
Put the cursor on a word and press Ctrl+F1 (or right-click and choose Look Up in the X16 Reference). The entry opens beside your code, and the cursor stays where it was.
It understands the forms code uses for the same thing:
jsr CHROUT ; BSOUT, the kernal routine
lda VERA_DATA0 ; DATA0, the VERA register at $9F23
sta $9F20 ; ADDRx_L
bne loop ; the branch instructions
It looks up BASIC keywords too (CHR$, PRINT#), and a selection if you’ve made one. If more than one entry matches, you choose; if none does, you get the search instead.
The keyboard shortcut works in any file. The right-click menu item shows whenever text is selected, and in languages that ask for it: ones an extension declares, and any you add in Settings.
How to ask Copilot Chat
The extension gives Copilot Chat a tool to search the guide. Add #x16docs to a question to use it. In agent mode, Copilot picks it up by itself when you ask about the X16.
#x16docs which kernal routine fills memory, and what does it take?
It answers from the reference entries and the most relevant sections, and says which version of the guide it used.
What’s in the reference entries
The search and look up know these, read from the guide’s own tables:
| Kind | Examples |
|---|---|
| Kernal routines | CHROUT, memory_fill, GRAPH_init, with their addresses, inputs and what they affect |
| Math library routines | AYINT, FADD |
| BASIC keywords | POKE, FOR, CHR$, with their formats |
| VERA registers | ADDRx_L, DC_VIDEO (for each DCSEL), with their bit fields |
| Memory | The memory map, the I/O area, the kernal vectors and the r0 to r15 registers |
| 65c02 instructions | LDA, BBRx, the branches, with their addressing modes |
Anything else in the guide is still found by searching for words.
