1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2026-04-20 16:16:34 +00:00
Commit Graph

2228 Commits

Author SHA1 Message Date
David Schmenk 2ef28818e0 Clean up 6522 interrupt enable/masking 2026-02-02 15:46:59 -08:00
David Schmenk 1ac6ad3d4e Add PCM audio "ouch" 2026-02-01 22:16:26 -08:00
David Schmenk 3eca528cb8 Update images 2026-02-01 17:33:07 -08:00
David Schmenk 8f69630955 Delete src/dhgr.tk/demos/darthgr/DARTHGR.REL
Not sure why this was checked in
2026-01-30 11:13:38 -08:00
David Schmenk b5fdebfe7d Deal with running out of memory during font load a little better 2026-01-29 18:49:15 -08:00
David Schmenk 557a5bb0b9 Clean up instructions, add new sequence 2026-01-26 16:41:07 -08:00
David Schmenk 04786851e7 Add sound placeholders 2026-01-25 15:33:00 -08:00
David Schmenk 2abd31bbbd Update source file 2026-01-25 13:26:01 -08:00
David Schmenk a1e58c0634 New splash screen 2026-01-25 13:24:40 -08:00
David Schmenk 7b98e310e8 Add splash screen 2026-01-25 13:14:47 -08:00
David Schmenk b63b8c5cd0 Merge pull request #76 from badvision/megaflash-fpu-support
Add MegaFlash hardware-accelerated FPU library
2026-01-25 07:03:51 -08:00
Brendan Robert 3ae9404419 Add .gitignore for build artifacts
Ignore compiled objects (.a, .o, .sym), executables, and build directories
to keep the repository clean.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-25 00:00:32 -06:00
Brendan Robert a59b9b02e4 Remove binary artifacts 2026-01-24 21:12:57 -06:00
Brendan Robert 1c8e2c28d7 Remove binary artifacts 2026-01-24 21:11:15 -06:00
Brendan Robert 736c29687a Fixed complilation issues, centralized commonly used FP constants 2026-01-24 20:12:18 -06:00
David Schmenk 364a8f0925 Update instructions 2026-01-24 17:46:42 -08:00
Brendan Robert 7106d8f826 Moved docs to the right place 2026-01-24 18:06:58 -06:00
David Schmenk d0079088d3 Add arrow key navigation 2026-01-24 16:02:58 -08:00
Brendan Robert 3d359f0a0e Add hardware acceleration for scalb, compXY, and annuityXY functions
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>
2026-01-24 18:01:02 -06:00
Brendan Robert 6839f068ab Extend hardware acceleration to all log/exp functions using properties
Implemented all remaining logarithm and exponential functions using
properties of logarithms and hardware acceleration:

New Hardware-Accelerated Functions:
- ln1X (ln(1+x)) = ln(1 + x) using hardware ln
- log21X (log2(1+x)) = ln(1+x) / ln(2)
- pow21X (2^x - 1) = e^(x*ln(2)) - 1
- powE1X (e^x - 1) = exp(x) - 1
- powE21X (e^(2x) - 1) = exp(2x) - 1
- powXInt (x^n) = e^(n * ln(x))
- powXY (x^y) = e^(y * ln(x))

Now have **28 total hardware-accelerated functions**:
- 9 direct from MegaFlash FPU
- 19 via mathematical identities

Only 9 functions still use SANE fallback:
- add, sub, rem, type, cmp, trunc, round, logb, scalb
- compXY, annuityXY, randNum (financial/random)

This dramatically expands hardware acceleration coverage while
maintaining full API compatibility and precision.
2026-01-24 17:54:20 -06:00
Brendan Robert 2db2129806 Implement additional hardware-accelerated functions using trig identities
Extended hardware acceleration to more functions by using mathematical
identities with the base MegaFlash FPU operations:

New Functions (all hardware-accelerated):
- neg(x) = x * -1 (preserves precision vs sign flip)
- abs(x) = sign check + neg if needed
- log2(x) = ln(x) / ln(2)
- pow2(x) = e^(x * ln(2))
- asin(x) = atan(x / sqrt(1 - x²))
- acos(x) = π/2 - asin(x)
- sinh(x) = (e^x - e^-x) / 2
- cosh(x) = (e^x + e^-x) / 2
- tanh(x) = sinh(x) / cosh(x)
- sec(x) = 1 / cos(x)
- csc(x) = 1 / sin(x)
- cot(x) = 1 / tan(x)

All functions use hardware mul, div, sqrt, sin, cos, tan, atan, ln, and exp
operations from MegaFlash, providing significant speedup over software
implementations.

Updated documentation to reflect extended hardware acceleration coverage.
2026-01-24 17:49:32 -06:00
Brendan Robert a4fa5a162a Fix spelling: Thomas Fok (not Tomas) 2026-01-24 17:42:43 -06:00
Brendan Robert 680a1c032b Update MegaFlash repository link to https://github.com/ThomasFok/MegaFlash 2026-01-24 17:41:56 -06:00
Brendan Robert 9555036473 Fix attribution: MegaFlash hardware by Tomas Fok 2026-01-24 17:41:28 -06:00
Brendan Robert 3103d44635 Add MegaFlash hardware-accelerated FPU library (fpu_mf)
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.
2026-01-24 17:36:30 -06:00
David Schmenk e2ef600dd2 Add visibility algorithm to solving 2026-01-24 13:24:04 -08:00
David Schmenk e22ad3e3c1 Updaate the update image 2026-01-08 14:41:50 -08:00
David Schmenk 3a03bbd5f8 Add self booting MAZE RUNNER disk image 2026-01-03 15:00:54 -08:00
David Schmenk 51a33d5750 Timer divisor measured on actual //c 2026-01-03 14:56:37 -08:00
David Schmenk a9befc3b37 Improved maze generation and timer result 2026-01-03 13:59:08 -08:00
David Schmenk e968a5911f Further random number improvements 2026-01-02 20:04:45 -08:00
David Schmenk 2522d1faab Play again option 2026-01-02 17:47:17 -08:00
David Schmenk 2239b6de9e Force 40 column mode before HGR 2026-01-02 15:56:01 -08:00
David Schmenk 0424867ead Maze game and improve random numbers 2026-01-02 14:39:51 -08:00
David Schmenk 0d4b0f9607 Change autorun script 2026-01-01 11:02:50 -08:00
David Schmenk 6bc88b8f7d Change volume label 2025-12-30 19:14:05 -08:00
David Schmenk ff175b5d1e Script cleanup 2025-12-30 08:33:30 -08:00
David Schmenk dd545c7aa5 Improve starbusrt visual 2025-12-29 16:32:02 -08:00
David Schmenk 102b1ef652 Happy New Year 2026 demo 2025-12-29 13:43:58 -08:00
David Schmenk c143596032 run turtle graphics demo in PLFORTH disk image 2025-12-22 07:29:47 -08:00
David Schmenk e3550d4a83 Add fixed point move routine and sample 2025-12-21 17:27:53 -08:00
David Schmenk d6a51f4656 Update turtle graphics sample 2025-12-20 21:40:15 -08:00
David Schmenk 5830f8b34e Add to turtle graphics demo 2025-12-20 15:08:32 -08:00
David Schmenk eafd2df444 Fix resetting of lastsym after execmod 2025-12-20 13:38:36 -08:00
David Schmenk fffb06b8b3 Add TXTMODE word 2025-12-20 09:21:51 -08:00
David Schmenk 34bc475d16 Add TXTMODE word 2025-12-20 09:18:41 -08:00
David Schmenk b9c84db58e Update sample code 2025-12-19 15:20:29 -08:00
David Schmenk 2d419672e0 Tweak line clip outcode checks 2025-12-15 20:15:59 -08:00
David Schmenk ca6bad1068 Update plasma.4th 2025-12-15 19:22:09 -08:00
David Schmenk b3f980b330 Update 2.21 files 2025-12-15 18:54:53 -08:00