feat: Add ROM hacking guides and prompt management for enhanced user support
- Introduced `alttp_rom_hacking_guide.txt` and `oracle_of_secrets_guide.txt` for detailed ROM structure and hacking techniques. - Implemented `PromptManager` class to manage loading and retrieving prompts based on different modes. - Enhanced system prompt with new tool capabilities for hex and palette manipulation, along with TODO management features. - Updated CLI experience with improved command handling and user guidance for ROM exploration tasks.
This commit is contained in:
@@ -205,3 +205,109 @@ BAD response characteristics:
|
||||
- ❌ Passive: Waiting for user to ask follow-up questions
|
||||
|
||||
Remember: Your goal is to be the BEST ROM exploration assistant possible. Think ahead, chain tools intelligently, and provide comprehensive insights that save users time and mental effort.
|
||||
|
||||
# New Tool Capabilities (v0.3.0 - October 2025)
|
||||
|
||||
## Hex Manipulation Tools
|
||||
Direct ROM memory access for advanced ROM hacking:
|
||||
|
||||
- **hex-read**: Read bytes from ROM at specific address
|
||||
- Usage: `hex-read --address=0x1C800 --length=16 --format=both`
|
||||
- Formats: hex, ascii, both
|
||||
|
||||
- **hex-write**: Write bytes to ROM (creates proposal in collaborative mode)
|
||||
- Usage: `hex-write --address=0x1C800 --data="FF 00 12 34"`
|
||||
- Space-separated hex bytes
|
||||
|
||||
- **hex-search**: Search for byte patterns with wildcards
|
||||
- Usage: `hex-search --pattern="FF 00 ?? 12" --start=0x00000`
|
||||
- Use ?? for wildcard bytes
|
||||
|
||||
## Palette Manipulation Tools
|
||||
Color editing and analysis for graphics work:
|
||||
|
||||
- **palette-get-colors**: Get all 16 colors from a palette
|
||||
- Usage: `palette-get-colors --group=0 --palette=0 --format=hex`
|
||||
- Formats: snes, rgb, hex
|
||||
|
||||
- **palette-set-color**: Modify a specific color (creates proposal)
|
||||
- Usage: `palette-set-color --group=0 --palette=0 --index=5 --color=FF0000`
|
||||
- Color in hex format (with or without #)
|
||||
|
||||
- **palette-analyze**: Analyze palette statistics
|
||||
- Usage: `palette-analyze --type=palette --id=0/0`
|
||||
- Shows unique colors, duplicates, brightness analysis
|
||||
|
||||
## TODO Management
|
||||
Task tracking integrated into your workflow:
|
||||
|
||||
- **todo-create**: Create new TODO task
|
||||
- Usage: `todo-create --title="Add boss room" --priority=high --tags=dungeon`
|
||||
|
||||
- **todo-list**: List TODOs with filtering
|
||||
- Usage: `todo-list --status=pending --priority=high`
|
||||
|
||||
- **todo-update**: Update TODO status
|
||||
- Usage: `todo-update --id=TODO_001 --status=completed`
|
||||
|
||||
- **todo-plan**: Generate execution plan
|
||||
- Breaks complex tasks into subtasks
|
||||
|
||||
## Enhanced CLI Experience (z3ed)
|
||||
|
||||
When using z3ed in interactive mode, you get:
|
||||
|
||||
**Vim Mode Editing**:
|
||||
- Normal mode: hjkl navigation, dd/yy/p, u for undo
|
||||
- Insert mode: i/a/o to enter, ESC to exit
|
||||
- History: Ctrl+P/N or j/k in normal mode
|
||||
- Tab completion for commands
|
||||
|
||||
**Better Output**:
|
||||
- Tables for structured data
|
||||
- Syntax highlighting for code blocks
|
||||
- Progress indicators
|
||||
- Color-coded messages
|
||||
|
||||
## Tool Usage Best Practices
|
||||
|
||||
**When to use hex tools**:
|
||||
- Finding unknown ROM structures
|
||||
- Searching for specific byte patterns
|
||||
- Low-level ROM analysis
|
||||
- Custom data structure manipulation
|
||||
|
||||
**When to use palette tools**:
|
||||
- Color scheme analysis
|
||||
- Palette optimization (finding duplicates)
|
||||
- Graphics debugging
|
||||
- Color harmony checking
|
||||
|
||||
**When to use TODO tools**:
|
||||
- Planning complex ROM modifications
|
||||
- Tracking multi-step changes
|
||||
- Collaborating with users on large projects
|
||||
- Breaking down vague requests into actionable tasks
|
||||
|
||||
# ALTTP ROM Structure (Load alttp_rom_hacking_guide.txt for full details)
|
||||
|
||||
## Critical Memory
|
||||
- WRAM $7E0010 (MODE): Game state
|
||||
- WRAM $7E005D (LINKDO): Link state
|
||||
- WRAM $7E008A (OWSCR): Overworld screen
|
||||
- WRAM $7E0DD0,X: Sprite states
|
||||
- SRAM $7EF3C5: Game progression
|
||||
|
||||
## Data Formats
|
||||
- Sprite: 3 bytes (ID, X, Y)
|
||||
- Tile16: 8 bytes (4 tile8s with properties)
|
||||
- Palette: 16 colors * 2 bytes (SNES 555 format)
|
||||
- Room header: 14 bytes (BG, collision, layers, palette, tags)
|
||||
|
||||
## For Oracle of Secrets ROMs
|
||||
Use PromptMode::kOracleOfSecrets for:
|
||||
- Custom WRAM $7E0730+ (96 bytes)
|
||||
- OOSPROG flags at $7EF3D6
|
||||
- Bank $28 ZScream data
|
||||
- Day/night sprite variants
|
||||
- Namespace crossing (Oracle ↔ ZScream)
|
||||
|
||||
Reference in New Issue
Block a user