How thanas-fuqi/brookshearmachine_py works
This repository is a Brookshear machine emulator plus raw-hex example programs, including interactive and visual demos. The main workflow is to create a Machine, load a hex program, and run its fetch/decode/execute loop; programs may register custom display opcodes that render machine state. The graph includes all indexed core programs and documented debug tools. Relationships are based on the excerpts and README; unsampled README-listed features are represented at their documented directory paths.
Main entry points: Machine_language_CORE.py Fetch and execute · Pong_ML.py Pong program · Snake_ML.py Snake program · ML_Hexadecimal.py 7-segment program
Components 22
Machine emulator
- Machine runtime
Machine_language_CORE.py - Hex loader
Machine_language_CORE.py - Fetch and execute
Machine_language_CORE.py - Instruction set
Machine_language_CORE.py - RAM and registers
Machine_language_CORE.py - Debug dumps
Machine_language_CORE.py
Visual demos
- 7-segment program
7_Segment_Display/ML_Hexadecimal.py - Conway's Life
Conways_Game_Of_Life/Cellular_Automata_ML.py - Sorting visualizer
Sort/Sort_ML.py - Wave animation
Wave_Animation/ML_Wave_Loop.py - Hex display capability
7_Segment_Display - Life capability
Conways_Game_Of_Life - Sort capability
Sort - Wave capability
Wave_Animation
Interactive games
- Pong program
Pong/Pong_ML.py - Snake program
Snake/Snake_ML.py - Pong capability
Pong - Snake capability
Snake
Example programs
- Basic diagnostic
Simple_Examples/Machine_language_BASIC.py
Other components
- Program runner
- Terminal
- Keyboard input
Connections 47
- Program runner → 7-segment program: runs
7_Segment_Display/ML_Hexadecimal.py - Program runner → Conway's Life: runs
Conways_Game_Of_Life/Cellular_Automata_ML.py - Program runner → Pong program: runs
Pong/Pong_ML.py - Program runner → Snake program: runs
Snake/Snake_ML.py - Program runner → Sorting visualizer: runs
Sort/Sort_ML.py - Program runner → Wave animation: runs
Wave_Animation/ML_Wave_Loop.py - Program runner → Basic diagnostic: runs
Simple_Examples/Machine_language_BASIC.py - 7-segment program → Hex loader: loads hex
7_Segment_Display/ML_Hexadecimal.py - Conway's Life → Hex loader: loads hex
Conways_Game_Of_Life/Cellular_Automata_ML.py - Pong program → Hex loader: loads hex
Pong/Pong_ML.py - Snake program → Hex loader: loads hex
Snake/Snake_ML.py - Sorting visualizer → Hex loader: loads hex
Sort/Sort_ML.py - Wave animation → Hex loader: loads hex
Wave_Animation/ML_Wave_Loop.py - Basic diagnostic → Hex loader: loads hex
Simple_Examples/Machine_language_BASIC.py - Hex loader → RAM and registers: writes program
Machine_language_CORE.py - 7-segment program → Machine runtime: creates and runs
7_Segment_Display/ML_Hexadecimal.py - Conway's Life → Machine runtime: creates and runs
Conways_Game_Of_Life/Cellular_Automata_ML.py - Pong program → Machine runtime: creates and runs
Pong/Pong_ML.py - Snake program → Machine runtime: creates and runs
Snake/Snake_ML.py - Sorting visualizer → Machine runtime: creates and runs
Sort/Sort_ML.py - Wave animation → Machine runtime: creates and runs
Wave_Animation/ML_Wave_Loop.py - Basic diagnostic → Machine runtime: creates and runs
Simple_Examples/Machine_language_BASIC.py - Machine runtime → Fetch and execute: runs
Machine_language_CORE.py - Fetch and execute → RAM and registers: fetches and updates
Machine_language_CORE.py - Fetch and execute → Instruction set: dispatches opcode
Machine_language_CORE.py - Machine runtime → Debug dumps: provides dumps
README.md - 7-segment program → Fetch and execute: registers display opcode
7_Segment_Display/ML_Hexadecimal.py - Conway's Life → Fetch and execute: registers display opcode
Conways_Game_Of_Life/Cellular_Automata_ML.py - Pong program → Fetch and execute: registers display opcode
Pong/Pong_ML.py - Snake program → Fetch and execute: registers display opcode
Snake/Snake_ML.py - Sorting visualizer → Fetch and execute: registers display opcode
Sort/Sort_ML.py - Wave animation → Fetch and execute: registers display opcode
Wave_Animation/ML_Wave_Loop.py - Fetch and execute → Terminal: logs output
Machine_language_CORE.py - 7-segment program → Terminal: renders frames
7_Segment_Display/ML_Hexadecimal.py - Conway's Life → Terminal: renders frames
Conways_Game_Of_Life/Cellular_Automata_ML.py - Pong program → Terminal: renders game
Pong/Pong_ML.py - Snake program → Terminal: renders game
Snake/Snake_ML.py - Sorting visualizer → Terminal: renders bars
Sort/Sort_ML.py - Wave animation → Terminal: renders frames
Wave_Animation/ML_Wave_Loop.py - Keyboard input → Pong program: provides keys
Pong/Pong_ML.py - Keyboard input → Snake program: provides keys
Snake/Snake_ML.py - 7-segment program → Hex display capability: implements
README.md - Conway's Life → Life capability: implements
README.md - Pong program → Pong capability: implements
README.md - Snake program → Snake capability: implements
README.md - Sorting visualizer → Sort capability: implements
README.md - Wave animation → Wave capability: implements
README.md