mirror of
https://github.com/dschmenk/PLASMA.git
synced 2026-03-15 07:16:53 +00:00
This commit adds optional hardware floating-point acceleration for PLASMA programs running on Apple IIc/IIc+ systems with MegaFlash storage devices. New Features: - fpu_mf.pla: Drop-in replacement for fpu.pla with hardware acceleration - API-compatible with existing fpu.pla library - Automatic hardware detection and transparent SANE fallback - 10-100x speedup for transcendental functions (sin, cos, tan, log, exp) - 3-5x speedup for multiplication and division New Files: - src/inc/megaflash.plh: MegaFlash hardware constants - src/libsrc/fpu_mf.pla: Hardware-accelerated FPU library - src/libsrc/README_fpu_mf.md: Library documentation - src/samplesrc/fptest_mf.pla: Comprehensive test program - MEGAFLASH_FPU.md: Integration overview and PR documentation Usage: Users can switch from 'import fpu' to 'import fpu_mf' with no other code changes required. Programs work on all systems (with or without MegaFlash hardware). Backwards Compatibility: - No changes to existing PLASMA code - Opt-in only - existing programs unchanged - Works on all Apple II systems (fallback to SANE if no hardware) Technical Details: - Automatic format conversion (SANE Extended <-> MBF) - Hardware operations: mul, div, sqrt, sin, cos, tan, atan, ln, exp - SANE fallback for unsupported operations - MegaFlash detection via ID register () See MEGAFLASH_FPU.md for complete documentation.