Skip to content
Release v0.2.0 - Milestone 3: APU Complete

This release marks the completion of Milestone 3, delivering a complete and hardware-accurate implementation of the Nintendo Entertainment System's 2A03 Audio Processing Unit (APU). All five audio channels are fully functional with cycle-accurate timing and non-linear mixing matching original hardware behavior.

- **5 Audio Channels**: Pulse 1, Pulse 2, Triangle, Noise, and DMC
- **Frame Counter**: Dual-mode sequencer (4-step and 5-step) with IRQ generation
- **Hardware Accuracy**: Non-linear mixer matching NES hardware characteristics
- **Sample Rate Conversion**: Configurable resampler with optional low-pass filtering
- **Zero Unsafe Code**: 100% safe Rust implementation with #![forbid(unsafe_code)]

- **Envelope Generator**: ADSR envelope with constant volume mode
- **Length Counter**: Hardware-accurate length table and halt functionality
- **Sweep Unit**: Frequency sweeping with ones' complement negation for Pulse 1
- **Linear Counter**: 32-step counter for Triangle channel
- **LFSR Noise**: 15-bit shift register with dual feedback modes
- **DMC Sampler**: Delta modulation with DMA interface and IRQ support

- **APU Clock**: 1,789,773 Hz (NTSC)
- **Frame Rates**: 240 Hz (4-step) / 192 Hz (5-step) quarter frames
- **Sample Rate**: 48,000 Hz default (configurable)
- **Mixer Range**: 0.0 to ~2.0 (hardware-accurate non-linear)
- **Register Interface**: Complete $4000-$4017 memory-mapped implementation

- **150 Tests Total**: 136 unit tests + 14 documentation tests
- **100% Pass Rate**: All tests passing across all APU components
- **Comprehensive Validation**: Frame counter, envelope, length counter, sweep, all channels, mixer, resampler
- **Test ROM Integration**: Blargg APU test suite and additional APU test ROMs included

- **Zero Unsafe Code**: Safe Rust throughout entire implementation
- **100% Clippy Compliance**: All pedantic lints passing in library code
- **Comprehensive Documentation**: Full rustdoc coverage of public APIs
- **Type Safety**: Extensive use of newtype patterns for hardware registers

None. This is the first APU release.

- Pulse Channel 1 with sweep unit ($4000-$4003)
- Pulse Channel 2 without sweep ($4004-$4007)
- Triangle Channel with linear counter ($4008-$400B)
- Noise Channel with LFSR ($400C-$400F)
- DMC Channel with sample playback ($4010-$4013)

- Non-linear mixer matching hardware lookup tables
- Resampler with configurable sample rate
- Optional low-pass filter for audio smoothing
- Frame counter with 4-step and 5-step modes
- IRQ generation support

- Complete APU register implementation ($4000-$4017)
- Status register read ($4015)
- Frame counter control ($4017)
- All channel control registers

- **Version**: 0.2.0
- **Release Date**: 2025-12-19
- **Milestone**: M3 - APU Complete
- **Phase**: Phase 1 (MVP Development)
- **Target Date**: December 2025 ✅ On schedule

- `rustynes-apu`: 0.2.0 (new)
- `rustynes-cpu`: 0.2.0 (updated)
- `rustynes-ppu`: 0.2.0 (updated)
- Workspace: 0.2.0

- Total Tests: 150 (136 unit + 14 doc tests)
- Pass Rate: 100%
- Test Files: 11 modules
- Total Lines: ~2,800+ (APU crate only)
- Project Total: 279 tests across 3 crates

- `VERSION-PLAN.md` - Comprehensive versioning strategy through v1.0.0
- `CHANGELOG.md` - Updated with v0.2.0 release notes
- `test-roms/apu/README.md` - APU test ROM acquisition guide
- Sprint completion markers for Milestone 3

- Blargg APU Test Suite (blargg_apu_2005.07.30) - 11 test ROMs
- APU Additional Tests (apu_test) - 8 test ROMs
- DMC Tests - 4 test ROMs

```bash
git clone https://github.com/doublegate/RustyNES.git
cd RustyNES
git checkout v0.2.0
cargo build --release
```

```bash
cargo test --workspace          # Run all tests
cargo test -p rustynes-apu     # APU tests only
```

Target: Q1 2026
- NROM (0), MMC1 (1), UxROM (2), CNROM (3), MMC3 (4)
- 80% game compatibility
- Mapper framework and trait system

- v0.4.0 (M5): Integration/Core Complete
- v0.5.0 (M6): Desktop GUI - MVP Release
- v1.0.0 (M18): 100% TASVideos Accuracy

- **New Crate**: rustynes-apu (complete APU implementation)
- **Test Coverage**: +150 tests (129 → 279 total)
- **Lines of Code**: +2,800 lines (APU only)
- **Files Added**: 88 new files
- **Audio System**: Complete 5-channel APU with hardware-accurate mixing
- **Documentation**: VERSION-PLAN.md, updated CHANGELOG.md, APU test guide

- APU-CPU integration pending (Milestone 5)
- No audio output to speakers yet (requires desktop GUI from Milestone 6)
- PAL timing not yet implemented (NTSC only)
- Expansion audio not yet implemented (Milestone 12)

- Rust 1.75+ (MSRV)
- Any platform supported by Rust standard library

- **Architecture Reference**: NESdev Wiki, Mesen2, Visual2C02
- **Test ROMs**: Blargg's test suite, nesdev community
- **Implementation**: RustyNES Contributors

- **Repository**: https://github.com/doublegate/RustyNES
- **Documentation**: https://docs.rs/rustynes
- **Issue Tracker**: https://github.com/doublegate/RustyNES/issues
- **Changelog**: https://github.com/doublegate/RustyNES/blob/main/CHANGELOG.md
- **Roadmap**: https://github.com/doublegate/RustyNES/blob/main/ROADMAP.md
- **Version Plan**: https://github.com/doublegate/RustyNES/blob/main/VERSION-PLAN.md

See [CHANGELOG.md](https://github.com/doublegate/RustyNES/blob/v0.2.0/CHANGELOG.md#020---2025-12-19) for complete details.

**Compare**: https://github.com/doublegate/RustyNES/compare/v0.1.0...v0.2.0

---

**Released**: 2025-12-19
**Milestone**: M3 (APU Complete) ✅
**Next**: M4 (Mappers) - Target Q1 2026