1
0
mirror of https://github.com/kalymos/PsNee.git synced 2026-05-09 16:46:23 +00:00
Commit Graph

219 Commits

Author SHA1 Message Date
kalymos
83125594f3 Update BIOS_patching.h
@greptile
2026-03-14 23:23:41 +01:00
kalymos
d0ab3f4322 Merge branch 'PSNee-8.7.0' of https://github.com/kalymos/PsNee into PSNee-8.7.0 2026-03-14 22:45:02 +01:00
kalymos
4a7a429a92 Refactor BIOS patching logic and clean up codebase
New 2-phase sync (Stabilization + Silence detection).
Refactored GPIO macros for faster execution.
Cleaned up SCPH model definitions and fixed backslash warnings.
Removed unused global variables to save RAM.
2026-03-14 22:44:57 +01:00
kalymos
1d7548b027 test BIOS patching functionality 2026-03-08 12:01:12 +01:00
kalymos
6fd0f51cfa replace fixed BOOT_OFFSET_MS with Target Memory Window detection
Improved boot synchronization reliability
2026-03-05 22:59:53 +01:00
kalymos
371db21eae Implement silence detection in BIOS patching
Replaced fixed delay with silence detection mechanism to improve responsiveness.
2026-03-05 20:46:27 +01:00
kalymos
062e6023c0 refactor: fine-tune BIOS patch 2026-03-04 21:27:50 +01:00
kalymos
669ec1f52f SCPH_5500 BOOT_OFFSET 76.04 2026-03-03 12:51:27 +01:00
kalymos
8f9483cd5d corection currentLogic(isDataSector); 2026-03-03 00:01:01 +01:00
kalymos
0065df0110 mor test 2026-03-02 22:25:04 +01:00
kalymos
0ff2612c7c Refactor: Optimization of board detection, injection logic, and global nomenclature
- Board Detection: Added 300ms stabilization delay to filter PU-7/20
  power-up noise and sync with PU-22+ oscillating signals.
- Injection: Added conditional break to allow single-region selection
  and updated WFCK modulation for 7.3/14.6 kHz compatibility.
- Logic: Optimized sector filtering using bitmask (0xD0) and improved
  hysteresis tracking for Standard and SCPH-5903 models.
- Code Quality: Standardized nomenclature (subqBuffer, hysteresis,
  pulseCounter) and added comprehensive English documentation.
- Performance: Reduced binary size by optimizing loops and variable types.
2026-03-01 19:03:32 +01:00
kalymos
11299a9c34 obtimisation 2026-02-28 19:46:25 +01:00
kalymos
9fcaeb719c Optimized Sector Filtering: 2026-02-25 22:26:48 +01:00
kalymos
0077acf94f refactor: optimize sector filtering and unify system initialization
- Core logic: Optimized 'isDataSector' using a single 0xD0 bitwise mask for faster 0x41 sector detection.
- Architecture: Moved 'board_detection()' into 'Init()' for a cleaner entry point in 'main()'.
- Settings: Updated 'settings.h' with improved constant definitions and macro organization.
- Performance: Reduced instruction count in the main loop and improved peripheral power management.
2026-02-25 21:56:05 +01:00
kalymos
2cc73133c4 optimize digital input reading with boolean normalization
- Updated all input read macros (PIN_SQCK_READ, PIN_SUBQ_READ, etc.) to use double logical NOT (!!) operators.
- This ensures bitwise masks are normalized to a pure 0 or 1 boolean value.
- Optimization: Allows the compiler to use faster AVR branch instructions (SBIC/SBIS) and improves compatibility with direct equality tests.
- Updated inline documentation for better clarity on bitwise operations.
2026-02-24 22:45:22 +01:00
kalymos
6f7974ad04 Cleaning up comments and diagrams 2026-02-23 21:57:24 +01:00
kalymos
16ffbf284e Update changelog 2026-02-23 19:48:31 +01:00
kalymos
10d2310103 The BIOS patch functionality changes will be deferred to a later version. 2026-02-23 19:21:29 +01:00
kalymos
ab6d029d48 refactor: optimize core detection and injection logic for performance and size
- board_detection: Added early exit for newer boards and tightened the sampling loop to reduce CPU overhead.
- captureSubQ: Simplified clock-edge synchronization and localized buffers to improve register allocation.
- performInjectionSequence: Replaced bit-calculation math with a streamlined byte-shift approach. Refined WFCK modulation to ensure zero-jitter phase locking.
- logic_Standard/5903: Refactored pattern matching into a decision tree. Factorized redundant buffer checks (scbuf[1]/[6]) and replaced multiple equality tests with range comparisons.

Optimization results:
- Reduced Flash memory footprint (smaller binary size).
- Improved execution speed by removing redundant logical operations.
- Increased signal stability during the critical injection phase.
2026-02-21 18:35:47 +01:00
kalymos
c9b76ed325 BIOS patche neo SCPH-3000 SCPH-1000
I finally completed the value conversion for the BIOS patch without IRS
2026-02-20 21:45:08 +01:00
kalymos
045a7ca532 BIOS patch neo SCPH-5000 SCPH-3500 2026-02-18 21:39:48 +01:00
kalymos
32e3f26712 BIOS patche neo for SCPH-9000_7500 SCPH-7000 SCPH-5500 2026-02-17 22:09:30 +01:00
kalymos
64539aac03 BIOS patch simplification
Removal of ISR and reduction of code in the BIOS patch, for improved portability and robustness.

For now it is only available for the SCPH-100 and 102.
2026-02-16 20:47:07 +01:00
kalymos
fc86f8b951 Refactor pulse counting logic for jitter reduction 2026-02-15 21:24:31 +01:00
kalymos
89dfc829ee test neo BIOS patch 2026-02-15 20:52:21 +01:00
kalymos
b29ea35d15 test refactor: optimize PS1 patch for SCPH-100 using zero-latency polling
Ported the BIOS patch from ISR to manual polling to achieve cycle-accurate
precision for 33.86MHz bus timing.
2026-02-12 22:06:03 +01:00
kalymos
f7bf40ea6b refactor: optimize BIOS patching sequence with refined timing nomenclature
Refined the BIOS patching and standardized
timing nomenclature for better technical clarity.

Changes:
- Ad technical documentation within the code.
- Standardized timing variables for better clarity:
    - BOOT_OFFSET: Replaces initial checkpoint.
    - FOLLOWUP_OFFSET: Replaces initial checkpoint2.
    - PULSE_COUNT: Replaces trigger .
    - BIT_OFFSET: Replaces hold .
    - OVERRIDE: Replaces patching.
2026-02-12 18:49:02 +01:00
kalymos
f9344e5b7e opti BIOS patch SCPH-3000, SCPH-100. 2026-02-08 17:51:24 +01:00
kalymos
6a56f38a96 opti bios patch SCPH-1000 2026-02-07 16:47:02 +01:00
kalymos
e290580411 opti patch bios 3500 2026-02-06 21:48:12 +01:00
kalymos
d1cee29d08 BIOS patch obtimisation 2025-12-29 21:07:19 +01:00
kalymos
b86f4c8ab6 Optimization
Optimization of the performInjectionSequence function
BIOS patch verification (work in progress)
and general code cleanup
2025-12-28 21:05:28 +01:00
kalymos
d2c30ac22e Optimization
performInjectionSequence(): Deep refactor with a cleaner.
captureSubQ(): Faster bit-banging and improved timing accuracy.
board_detection(): Optimized logic .
General Cleanup: Fixed all warnings and minimized memory footprint.
2025-12-27 20:59:10 +01:00
kalymos
1074336cdb Breaking down the main function into smaller modules.
Modular breakdown: Separated main logic into
 - captureSubQ,
 - logic_SCPH_5903,
 - logic_Standard,
 - performInjectionSequence.

Added support for SCPH-5903 by RepairBox

Co-Authored-By: RepairBox <33960601+danielfergisz@users.noreply.github.com>
2025-12-26 20:03:28 +01:00
kalymos
87a7b9d314 timer optimization 2025-12-22 21:36:19 +01:00
kalymos
a070304c34 Update PSNee.ino
Implementing a dedicated board_detection function with optimized logic.
Remodeling the inject_SCEX function.
2025-12-22 12:48:03 +01:00
kalymos
a4cbbcb66b removal of the TIMER
removal of the ISR(CTC_TIMER_VECTOR) function, and all its dependencies.

- Timer_Start
- Timer_Stop

modification
- Board detection
- inject_SCEX
- BIOS_PATCH
- MCU
- Setting
2025-12-21 19:30:30 +01:00
kalymos
080f9e4bc0 some comment cleaning 2025-09-11 20:45:55 +02:00
kalymos
e56fc1dd42 added compilation message 2025-09-10 20:56:24 +02:00
kalymos
bc9e75b5b1 serial debug cleaning 2025-09-08 21:22:27 +02:00
kalymos
2bb458c5e3 Update PSNee.ino 2025-09-07 21:02:13 +02:00
kalymos
15e619f1db creation of debug functions, and cleaning 2025-09-07 20:55:25 +02:00
kalymos
4381eef181 debug mesga 2025-09-07 19:17:45 +02:00
kalymos
50713d84d7 ad debug mode 2025-08-23 20:39:36 +02:00
kalymos
9c5b91feba clining 2025-08-23 19:13:17 +02:00
kalymos
4959bbe2c7 Layout modification 2025-05-09 16:40:22 +02:00
kalymos
b34eea696a Cleaning the selection area
Redesign of the selection area, and addition of the SCPH_hyma mode equivalent to the legacy mode with the difference of a hysteresis of 25
2025-05-06 18:04:13 +02:00
kalymos
2b8499717e SCPH_102A bios patch WIP 2025-04-23 12:31:49 +02:00
kalymos
687c5575f4 Ad bios patch 102A, and correct some images. 2025-04-22 17:39:36 +02:00
kalymos
8c35f3d852 optimization on regin injection 2025-04-21 15:13:33 +02:00