Tutorial Stella
Tutorial Stella
82 Retrogames (Winter/2014)
Tutorial on Stella
Atari 2600
Emulator
Daniel de Castro
February 1, 2014
Meet the console
Meet the emulator
3
Meet the Debugger
4
Meet the Debugger: Prompt area
5
Meet the Debugger: TIA (Display, Info and Zoom)
6
Meet the Debugger: CPU Registers
7
Meet the Debugger: RAM
8
Meet the Debugger: Disassembly
9
Before we continue...
10
Let's hack Pac Man
11
Where are my lives?
Manual method
Look at the RAM (128 bytes, it's not too hard)
More difficult if you had extra memory
Dynamic method
Search for value
Force the value to change (Kill Pac Man)
Compare
Unfortunately, it seems to be buggy! :(
12
Adding documentation
define labels
Pro: Updates the disassembled code
Con: It's not persistent
Making notes
Use your favorite text editor
Simple and persistent solution
Special file: <game name>.sym,
Where <game name> is given by Stella
Works as labels
Reload using loadsym (removed in 3.9.1)
13
Hacking the code
Manual approach
Save the disassembled code: savedis
Stella 3.9.3 for Windows requires that the file already exists(!?)
Search for it
Dynamic approach
Let the Debugger find it for you
(Breakpoints, Watchpoints and Traps)
14
Stopping the code
Breakpoints
Stops when PC gets there (break)
Conditional: Stops when something happens
(breakif)
Watches
Evaluate and prints expression before prompt
(watch)
Trap
Stops when a memory is read (trapread), written
(trapwrite) or accessed (trap)
15
Breakpoint/Trap Status
16
Let's hack it!
17
Summary
18
Appendix A Some Assembly instructions
19