Ignore compiled objects (.a, .o, .sym), executables, and build directories
to keep the repository clean.
Co-Authored-By: Claude <noreply@anthropic.com>
Implemented hardware-accelerated versions of three additional functions:
- scalb(x, n): Binary scale operation (x * 2^n) using pow2X and mul
- compXY(rate, periods): Compound interest ((1+rate)^periods) using powXY
- annuityXY(rate, periods): Annuity calculation using powXY
This brings the total hardware-accelerated functions from 28 to 31 out of
40 total SANE operations (78% coverage). These functions leverage the
existing hardware-accelerated powXY implementation, combined with
mathematical identities to avoid SANE fallback.
All functions maintain full API compatibility and automatically fall back
to SANE if MegaFlash hardware is not available.
Updated documentation to reflect new accelerated function count and
reorganized function categories.
Co-Authored-By: Claude <noreply@anthropic.com>
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.