How nemewt10/atmega32-zl3avr-emulator works
ZL3AVR is an educational browser emulator for the ATmega32-based ZL3AVR board. A student edits C code, compiles it to Intel HEX, loads it into the simulated MCU, wires board pins and peripherals, and observes execution through the board and serial terminal; a Python “PC” can communicate over the simulated serial connection. The graph also retains the documented guide, reference material, and timer calculator. Paths for those documented capabilities use their enclosing directories because their internals were not sampled.
Main entry points: App.tsx Application shell · Simulator.ts Simulation engine · SimulationContext.tsx Simulation context · mcu.ts ATmega32 model
Components 27
Application
- Application shell
apps/web/src/App.tsx - Workspace state
apps/web/src/workspace.ts - Serial terminal
apps/web/src/views/TerminalView.tsx - Python PC
apps/web/src/views/PcView.tsx - Python host
apps/web/src/pc/PythonHost.ts - Python runtime
apps/web/src/pc/python.worker.ts
Code workflow
- C editor
apps/web/src/views/IdeView.tsx - Project files
apps/web/src/ide/project.ts - AVR compiler
apps/web/src/ide/toolchain.ts - WASM toolchain
apps/web/src/ide/wasm/toolchain.worker.ts
Emulation
- Simulator view
apps/web/src/views/SimulatorView.tsx - Simulation engine
apps/web/src/sim/Simulator.ts - Simulation context
apps/web/src/sim/SimulationContext.tsx - ATmega32 model
packages/avr-core/src/mcu.ts - AVR CPU
packages/avr-core/src/cpu.ts - MCU peripherals
packages/avr-core/src/peripherals - Fuse bits
packages/avr-core/src/fuses.ts - Intel HEX
packages/avr-core/src/hex.ts
Board interface
- Board view
apps/web/src/views/BoardView.tsx - Board model
packages/board/src/board.ts - Wires and connectors
packages/board/src/wiring.ts - Board peripherals
packages/board/src/parts - Wire rendering
apps/web/src/board-view/route.ts
Learning tools
- User guide
apps/web/src/views/GuideView.tsx - AVR reference
apps/web/src/views/KompendiumView.tsx - Timer calculator
apps/web/src/views/KalkulatorView.tsx
Other components
- Student
Connections 32
- Student → Application shell: uses
- Application shell → C editor: shows
- Application shell → Simulator view: shows
- Application shell → Board view: shows
- Application shell → Serial terminal: shows
- Application shell → Python PC: shows
- Application shell → User guide: shows
- Application shell → AVR reference: shows
- Application shell → Timer calculator: shows
- Application shell → Workspace state: saves and restores
- C editor → Project files: edits
- C editor → AVR compiler: compiles with
- AVR compiler → WASM toolchain: dispatches
- WASM toolchain → Intel HEX: produces
- Application shell → Simulation context: provides
- Simulation context → Simulation engine: owns
- Simulator view → Simulation context: observes
- Board view → Simulation context: observes
- Simulation engine → ATmega32 model: runs
- Simulation engine → Board model: updates
- ATmega32 model → AVR CPU: executes on
- ATmega32 model → MCU peripherals: models
- ATmega32 model → Fuse bits: uses
- Simulation engine → Intel HEX: loads program
- Board view → Board model: interacts with
- Board model → Wires and connectors: tracks connections
- Board model → Board peripherals: models
- Board view → Wire rendering: renders wires with
- Serial terminal → Simulation context: observes serial
- Python PC → Python host: controls
- Python host → Python runtime: starts runtime
- Python runtime → Simulation engine: exchanges serial data