Commit Graph

13 Commits

Author SHA1 Message Date
Jose Luis Montañes
18c753cae1 Fix waveform: tick-based rendering + always-follow auto-scroll
- timeStep increments by 1 per tick (not by simSpeed ms)
- waveZoom = pixels per step directly (zoom changes wave width)
- Speed control only changes real-time interval between ticks
- Auto-scroll always follows latest data regardless of zoom level

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 22:35:41 +01:00
JosLe
6eb4b75446 Merge pull request 'Fix waveform: timeStep increments by 1 per tick, waveZoom = px/step' (#1) from master into main
Reviewed-on: #1
2026-03-19 21:32:49 +00:00
Jose Luis Montañes
93b8981418 Fix waveform: timeStep increments by 1 per tick, waveZoom = px/step
Each simulation tick now advances timeStep by 1 instead of by simSpeed ms.
waveZoom directly controls pixels per step, so changing clock speed
(the real-time interval) doesn't affect visual wave width, but zooming does.
This matches GTKWave behavior where the x-axis represents clock cycles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 22:18:45 +01:00
Jose Luis Montañes
c162adb1df feat: waveform uses real time (ms) - clock speed affects wave width
- Slow clock (1000ms) = wider pulses
- Fast clock (100ms) = narrower pulses
- Timeline shows ms/s labels
- Zoom controls scale the time axis
2026-03-19 22:13:41 +01:00
Jose Luis Montañes
d471b0adb3 fix: waveform zoom buttons - use 1.5x multiplier, show zoom level, remove wheel zoom 2026-03-19 22:10:44 +01:00
Jose Luis Montañes
7c58174f5f fix: remove alert(), fix waveform zoom, add waveform scroll (wheel + ctrl+wheel) 2026-03-19 22:08:26 +01:00
Jose Luis Montañes
d5de328898 feat: CLK toggles on Step, add pan/zoom (arrows, +/-, wheel, 0=reset) 2026-03-19 22:06:03 +01:00
Jose Luis Montañes
7409a96cf1 refactor: modularize into ES6 modules
Split monolithic index.html into:
- js/constants.js - gate config, colors, dimensions
- js/state.js     - shared application state
- js/gates.js     - evaluation logic, port geometry
- js/renderer.js  - canvas drawing
- js/waveform.js  - GTKWave-style signal viewer
- js/simulation.js - clock tick engine
- js/events.js    - mouse, keyboard, UI handlers
- js/app.js       - entry point
- css/style.css   - all styles
2026-03-19 22:00:02 +01:00
Jose Luis Montañes
aa97b37f0a trigger webhook 2026-03-19 19:44:41 +01:00
Jose Luis Montañes
6fbc6e4896 Add CLOCK gate with automatic simulation
- CLOCK gate auto-toggles 0→1→0 during simulation
- Run/Stop button in waveform toolbar
- Adjustable speed (50ms to 2000ms per tick)
- Click CLOCK to toggle manually when sim is stopped
- Waveform auto-opens when sim starts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 19:42:46 +01:00
Jose Luis Montañes
41f15c474b test: webhook auto-deploy 2026-03-19 19:37:42 +01:00
Jose Luis Montañes
a5ca5fdaa2 Add GTKWave-style waveform viewer
- Signal recording panel with per-gate waveforms
- Record/pause, step, zoom, clear controls
- Auto-scroll to latest signals
- Resizable panel with drag handle
- Color-coded signals matching gate types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 19:35:05 +01:00
Jose Luis Montañes
1f95b1a97a Initial commit: logic gate simulator 2026-03-19 18:37:39 +01:00