velxio/frontend/src/simulation
David Montero 3f23a7950c fix(sim): emulate AVR EEPROM (fixes #203)
AVRSimulator never instantiated avr8js's AVREEPROM peripheral, so any
EEPROM.read/write/update hung the sketch: the Arduino EEPROM library spins
on `while (EECR & (1<<EEPE))` waiting for the write-complete bit to clear,
and with no peripheral driving EECR that bit never cleared (issue #203 —
EEPROM.update(0,123) + EEPROM.read(0) hangs instead of printing 123).

Wire AVREEPROM to the CPU in both loadHex() and reset() via a new
attachEeprom() helper. The EEPROMMemoryBackend is created once per
simulator instance and reused across firmware reloads and resets, so a
value written in one run is still readable on the next boot — matching
real hardware, where re-flashing leaves EEPROM intact. Sizes per variant
(Uno 1024 B, Mega2560 4096 B, ATtiny85 512 B); ATtiny85 gets its own
register map (EECR 0x3C / EEDR 0x3D / EEARL 0x3E / EEARH 0x3F) since
avr8js's default eepromConfig targets the ATmega328P.

Adds eeprom.test.ts: drives the EEPROM register protocol against the
production AVRSimulator (loadHex + step), asserting a byte round-trips,
the EEPE poll terminates (no hang), and contents survive a reset.
2026-06-16 04:18:51 +02:00
..
customChips feat(chipbus): Galaksija keyboard - type BASIC over the bus 2026-06-05 14:37:42 -03:00
digital feat(digital-gate-engine): 4-bit ripple counter gallery example + sequential controller fix 2026-06-05 21:58:42 -03:00
displays feat(epaper): decode the UC8179/GD7965 7.5" panel + fix its BUSY polarity 2026-06-04 23:45:37 -03:00
parts fix(sim): correct NTC temperature sensor divider + reset to default on restart 2026-06-15 23:21:36 +02:00
spice fix(sim): correct NTC temperature sensor divider + reset to default on restart 2026-06-15 23:21:36 +02:00
verify
AVRSimulator.ts fix(sim): emulate AVR EEPROM (fixes #203) 2026-06-16 04:18:51 +02:00
Esp32Bridge.ts feat(microsd): SD-over-SPI card storage for AVR, RP2040 and ESP32 2026-06-11 03:59:53 +02:00
Esp32C3Simulator.ts fix(spice+pipeline): LED visualization, INPUT_PULLUP, ESP32-C3, PWM fade, examples 2026-05-18 21:52:07 -03:00
Esp32MicroPythonLoader.ts
HD44780Decoder.ts
I2CBusManager.ts
Interconnect.ts feat: STM32 (Blue Pill / Black Pill) QEMU emulation + Pro board gating 2026-05-30 19:06:14 -03:00
LogicFamilies.ts
MicroPythonLoader.ts feat(opencore): extract Pico W WiFi to a pluggable PIO peripheral seam 2026-06-15 08:33:28 +02:00
PinManager.ts fix(sim): keep PwmCallback 2-arg compatible via arity dispatch 2026-06-11 03:29:44 -03:00
PinResolver.ts
PioPeripheral.ts feat(opencore): extract Pico W WiFi to a pluggable PIO peripheral seam 2026-06-15 08:33:28 +02:00
RP2040Simulator.ts fix(rp2040): Pico W always boots the W firmware (no `import network` crash) 2026-06-15 18:55:13 +02:00
RaspberryPi3Bridge.ts fix(sim): desktop QEMU sims use injected sidecar URL; fix nano-button-led wiring 2026-06-02 03:24:19 +02:00
RiscVCore.ts
RiscVSimulator.ts fix(spice+pipeline): LED visualization, INPUT_PULLUP, ESP32-C3, PWM fade, examples 2026-05-18 21:52:07 -03:00
SensorUpdateRegistry.ts
SignalRouter.ts
SpiBus.ts
Stm32Bridge.ts fix(sim): desktop QEMU sims use injected sidecar URL; fix nano-button-led wiring 2026-06-02 03:24:19 +02:00
esp32-signals.ts
piSlaveScanner.ts feat(pi): pluggable slave handler + canvas wire detection for I2C/SPI/UART 2026-05-18 16:26:37 +02:00
rp2040-bootrom.ts
sensorControlConfig.ts