Block Types and Helpers¶
Every byte in a Regenerator 2000 project belongs to a Block Type, which controls how the disassembler decodes, labels, and formats that byte range.
Press any block shortcut on the current line—or press Shift+V first to enter Visual Mode and convert an entire range at once.
Quick Reference¶
| Key | Block Type | Labels & X-Refs? | Best Used For |
|---|---|---|---|
| D | Disassemble Address (Flow) | Yes | Tracing entry points and subroutines automatically |
| C | Code | Yes | Forcing 6502 instruction decoding on a fixed range |
| B | Data Byte | — | Sprite/charset bytes, lookup tables, single-byte variables |
| W | Data Word | — | 16-bit numeric counters and non-pointer constants |
| A | Address | Yes | Jump tables and 16-bit pointer arrays |
| P | PETSCII Text | — | CHROUT strings, menus, high-score text |
| S | Screencode Text | — | Strings copied straight into Screen RAM (e.g. $0400) |
| < | Lo/Hi Address Table | Yes | Split pointer tables (low bytes first, high bytes second) |
| > | Hi/Lo Address Table | Yes | Split pointer tables (high bytes first, low bytes second) |
| , | Lo/Hi Word Table | — | Split 16-bit numeric tables (e.g. SID frequency tables) |
| . | Hi/Lo Word Table | — | Split 16-bit numeric tables stored high-byte first |
| Shift+E | External File | — | Large binary blobs (SID music, bitmaps) exported to .bin |
| ? | Undefined | — | Clearing classifications back to unexplored bytes |
Assembler Directive Conventions
Most block types look nearly identical across all four assemblers—only three syntax conventions differ globally:
- ACME prefixes data and fill directives with
!instead of.(!byte,!word,!fill,!binary). - KickAssembler uses
//for comments instead of;. - ca65 emits
.res N, $XXfor compressed byte fill runs instead of.fill/!fill.
Multi-assembler tabs are shown below only where directives diverge significantly (text encodings, external binaries, and lexical scopes).
Code & Flow Analysis¶
Disassemble Address (Flow Analysis)¶
Shortcut: D
Traces execution starting from the cursor across 6502 branches, jumps, and JSR calls, converting every reachable instruction range into Code blocks. Because flow analysis skips inline data tables parked between subroutines, prefer D over C when exploring unknown code.
Where Tracing Stops
Unconditional return instructions (RTS and RTI) stop the active trace path. Unreferenced bytes immediately after a return remain unexplored until another branch or jump reaches them.
Code¶
Shortcut: C
Decodes the selected byte range directly as MOS 6502/6510 instructions without following branches beyond the selection. Useful when jump tables or self-modifying code jump into a block that flow analysis did not discover.
Data & Pointer Blocks¶
Data Byte¶
Shortcut: B
Formats bytes as 8-bit hexadecimal values—ideal for graphics bytes, lookup tables, and 8-bit variables.
Fill Run Threshold
When a contiguous run of identical bytes meets or exceeds the Fill run threshold in Document Settings (default 8), Regenerator 2000 collapses it into a single fill directive:
| Assembler | Fill Syntax |
|---|---|
| 64tass / KickAssembler | .fill N, $XX |
| ACME | !fill N, $XX |
| ca65 | .res N, $XX |
Data Word¶
Shortcut: W
Formats pairs of bytes as little-endian 16-bit numeric constants without generating labels or cross-references. Use this for numeric values—never for pointers.
Address¶
Shortcut: A
Formats pairs of bytes as 16-bit little-endian memory pointers. Unlike Data Word, the analyzer resolves every word to a label and records an [O] offset cross-reference at the target address.
- Each entry creates (or reuses) a label at that target address and links it to the Jump to Operand picker (Enter).
Text Blocks¶
PETSCII Text¶
Shortcut: P
Decodes bytes as Commodore PETSCII strings—the standard encoding for CHROUT ($FFD2) output and BASIC messages. Contiguous printable runs are grouped into quoted strings.
Screencode Text¶
Shortcut: S
Decodes bytes as Commodore video-matrix screen codes for buffers written directly to Screen RAM (such as $0400 on the C64, where 'A' is $01 instead of PETSCII $41).
Split Lo/Hi & Hi/Lo Tables¶
6502 programs frequently store 16-bit tables as two separate parallel arrays indexed by X or Y (LDA table_lo,X / LDA table_hi,X). Select an even number of bytes in Visual Mode and choose one of the four split formats:
| Key | Block Type | First Half | Second Half | Labels & X-Refs? | Typical Use |
|---|---|---|---|---|---|
| < | Lo/Hi Address | Low bytes | High bytes | Yes | Split jump/RTS/pointer tables (low first) |
| > | Hi/Lo Address | High bytes | Low bytes | Yes | Split jump/RTS/pointer tables (high first) |
| , | Lo/Hi Word | Low bytes | High bytes | — | Split numeric tables like SID frequencies |
| . | Hi/Lo Word | High bytes | Low bytes | — | Split numeric tables stored high-byte first |
Here is how the exact same 8 raw bytes ($00, $01, $02, $03, $c0, $d1, $e2, $f3) decode under each split block type:
.byte <a_C000, <a_D101, <a_E202, <a_F303 ; (1)!
.byte >a_C000, >a_D101, >a_E202, >a_F303
- Pairs
$00+$C0as$C000, generatinga_C000(or reusing any user label) and[O]cross-references.
.byte >a_00C0, >a_01D1, >a_02E2, >a_03F3 ; (1)!
.byte <a_00C0, <a_01D1, <a_02E2, <a_03F3
- Pairs
$00(high) +$C0(low) as$00C0, generatinga_00C0and[O]cross-references.
- Keeps
$C000–$F303as raw 16-bit literals with no labels or cross-references.
External Files & Resetting¶
External File¶
Shortcut: Shift+E
Keeps large binary blobs—such as SID music, bitmaps, or level maps—out of your .asm listing. During export, Regenerator 2000 writes the range to a separate .bin file and emits the target assembler's binary include directive (for bytes at $1000–$1007):
Undefined¶
Shortcut: ?
Clears manual block classifications back to unexplored single-byte lines:
Immediate Mode Helpers¶
Cycle Immediate Operand Formats¶
Shortcuts: I (forward) · Shift+I (backward)
Cycles the immediate operand under the cursor across six representations—handy when a bitmask reads better in binary or a counter reads better in decimal:
| Disassembly Output | Format |
|---|---|
lda #$d2 |
Hexadecimal |
lda #~$2d |
Inverse Hexadecimal |
lda #210 |
Decimal |
lda #-46 |
Inverse Decimal |
lda #%11010010 |
Binary |
lda #~%00101101 |
Inverse Binary |
Pack Lo/Hi or Hi/Lo Immediate Addresses¶
Shortcuts: [ (Lo/Hi) · ] (Hi/Lo)
Links two separate 8-bit immediate loads (LDA, LDX, or LDY) into a single 16-bit symbolic pointer reference (#<label and #>label).
For example, to turn the raw bytes loading an IRQ vector at $1480 into a symbolic reference, select lines 1–3 in Visual Mode and press [:
To revert, press U to undo the command or press I on either instruction to cycle back to hex.
Organization Tools¶
Use comments, scopes, splitters, and collapsing to keep large disassemblies navigable.
Comments¶
- Side Comment (;): Appears inline to the right of an instruction or data directive.
- Line Comment (:): Appears on dedicated lines above the address (Shift+Enter or Ctrl+J inserts newlines; Alt+-, Alt+=, and Alt+\ insert divider lines).
Line Comments Split Tables
Adding a line comment inside a grouped Address or Word block also splits the table at that address.
Scopes¶
Shortcuts: R (create) · Del (remove at boundary) · Alt+Up / Alt+Down (nudge boundary)
Scopes wrap existing blocks in a lexical namespace so subroutines can reuse short local names (like l00 or loop) without global collisions.
Non-Destructive Grouping
Scopes do not alter block types—they wrap the underlying Code or Data blocks inside native assembler scope directives during export.
Places the scope label immediately before .block / .bend:
ACME does not support lexical scopes in Regenerator 2000 exports. The exporter omits scope wrappers when ACME is active.
Wraps scopes in { and } with the label above the opening brace:
Splitters and Auto-Merging¶
Shortcut: |
By default, Regenerator 2000 automatically merges adjacent blocks that share the exact same Block Type.
graph LR
A["`Byte Block A
$1000–$1FFF`"] -->|Auto-Merge| M["`Merged Byte Block
$1000–$2FFF`"]
B["`Byte Block B
$2000–$2FFF`"] --> M
Press | at an address to place a Splitter—this draws a visual separator line and stops the auto-merger from combining blocks across that boundary:
graph LR
A["`Lo/Hi Table 1
$C000–$C0FF`"] --- S(("Splitter |")) --- B["`Lo/Hi Table 2
$C100–$C1FF`"]
Always Split Adjacent Lo/Hi and Hi/Lo Tables
Split tables compute their midpoint (lo vs hi half) from the total length of the block. If two adjacent Lo/Hi tables merge into one, every paired 16-bit address is corrupted—insert a splitter (|) between them.
Collapsing Blocks¶
Shortcut: Ctrl+K
Folds a large data table or finished subroutine into a single summary line in the TUI without changing exported .asm output or secondary views: