1
0
mirror of https://github.com/kalymos/PsNee.git synced 2026-05-09 00:32:52 +00:00
Files
kalymos.PsNee/changelog
kalymos 0d2290aa68 Merge V9.0 into Main (#111)
* MUC-MCU

Fixed the MUC-MCU file name.
Fixed a bug that prevented additional MCUs from being compiled.
Modified the clock registers for ATtiny 48-88s; the TCCROB register is missing in these MUCs.

* Too many things to summarize

Refactoring of the setting file, to be able to have settings specifying the HYSTERESIS_MAX variable.
Renamed precompilation variable in BIOS_patching file.
Changing console selection in .ino file

* Renaming files to make updating easier

* Update README.md

* logo 8.7

* optimization on regin injection

* Ad bios patch 102A, and correct some images.

* SCPH_102A bios patch WIP

* 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

* Layout modification

* clining

* ad debug mode

* debug mesga

* creation of debug functions, and cleaning

* Update PSNee.ino

* serial debug cleaning

* added compilation message

* some comment cleaning

* 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

* Update PSNee.ino

Implementing a dedicated board_detection function with optimized logic.
Remodeling the inject_SCEX function.

* timer optimization

* 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>

* 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.

* Optimization

Optimization of the performInjectionSequence function
BIOS patch verification (work in progress)
and general code cleanup

* BIOS patch obtimisation

* opti patch bios 3500

* opti bios patch SCPH-1000

* opti BIOS patch SCPH-3000, SCPH-100.

* 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.

* 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.

* test neo BIOS patch

* Refactor pulse counting logic for jitter reduction

* 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.

* BIOS patche neo for SCPH-9000_7500 SCPH-7000 SCPH-5500

* BIOS patch neo SCPH-5000 SCPH-3500

* BIOS patche neo SCPH-3000 SCPH-1000

I finally completed the value conversion for the BIOS patch without IRS

* 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.

* PSNee v9.0 Update

New PSNeeCore v2: Completely rewritten core engine for all supported MCUs.
Auto-MCU Detection: Manual board selection removed. Automatically detects ATmega (328/168/128/PB), 32U4, and ATtiny families at compile time.
Deep Init Optimization: Hard-shutdown of unused internal modules (ADC, DAC, Timers) to minimize power draw and electrical noise.
Native PB Support: Full compatibility for 128PB and 328PB (PRR2 registers and extra Ports).

* PSNee v9.0 Update

New PSNeeCore v2: Completely rewritten core engine for all supported MCUs.
Auto-MCU Detection: Manual board selection removed. Automatically detects ATmega (328/168/128/PB), 32U4, and ATtiny families at compile time.
Deep Init Optimization: Hard-shutdown of unused internal modules (ADC, DAC, Timers) to minimize power draw and electrical noise.
Native PB Support: Full compatibility for 128PB and 328PB (PRR2 registers and extra Ports).
logo



---------

Co-authored-by: RepairBox <33960601+danielfergisz@users.noreply.github.com>
2026-04-19 19:31:47 +02:00

195 lines
10 KiB
Plaintext

Update: April 19, 2026
- Total code refactor, division into functions.
- Elimination of the patchbios file.
- MCU optimization improvements.
- Bios_Patching: function improvement by eliminating the initial timer and replacing it with a wait for silence on the AX pin;
elimination of timers in ISRs by replacing them with NOPs.
- BoardDetection: function optimization.
- FilterSUBQSamples: logic optimization.
- PerformInjectionSequence: logic optimization and addition of a mode for synchronization with the WFCK clock.
- Init & Main: code cleanup.
-------------------------------------------------------------
Update:mars 2025
-Added led support for ATtiny
-Added card support to simplify fuse management
-------------------------------------------------------------
Update:july 2024
-Reimplementation of support for MUCs ATtiny25/45/85, Atmega32u4
-------------------------------------------------------------
Update: 9 oct 2023
-Added support by brill & postal2201 of the bios patch for japanese consoles https://github.com/postal2201/PSNee_V8
--------------------------------------------------------------
Update: 16 August 2017
-changed the timing for the PAL PM-41 patch to make it more reliable (I had it failing occasionally).
Also I added a warning for people not to use 5V.
--------------------------------------------------------------
Update: 16 July 2017
-The BIOS patch works!
For now it only supports Arduino boards (ATmega chips).
Also, the Arduino must either be powered on first or have no bootloader present (flashed using SPI) since I expect a signal ~1 second after power on.
8Mhz boards are also supported.
--------------------------------------------------------------
Update: 10 July 2017
- finished porting to ATtinyX5 (25,45,85 although the 25 has too little resources. for now.)
- store the licensing symbols in flash again, frees a lot of RAM
- bit retrieval code lifted from AttyNee (Nice work guys!)
- extra RAM allows SoftwareSerial debugging prints on an ATtiny45!
- nicer intro readme ;p
---------------------------------------------------------------
Update 9 July 2017
Sure. Consider it work in progress quality ;)
Main changes:
- figured out ATtiny pin assignments :p
- RAM use reduced by only storing the "SCE" part of the license string once. Using a somewhat farfetched method. Maybe someone can make it nicer, without the recursion and over engineering? :p
- tried getting debug prints but it doesn't look like it'll happen (on ATtiny45), too little RAM > the chip crashes
- SUBQ sampling timing reverted to sample while clock is low, instead of right after it goes high
-------------------------------------------------------------
Updat 29 June 2017
- final modchip function I / Os: SQCK, SCLK, data, gate_wfck
- hysteresis for injections, fixes anti-mod occasionally triggering when using worn drives
- optimized injection timing for multi-region, multi BIOS versions (Sony added more protection checks over time)
- first attempt to make it more portable to other Arduino variants
- auto console detection works reliably, with and without Arduino bootloader present
- pin assignments changed for practical / installation reasons (ICSP capability, wire routing)
- so many changes, it surely contains all new bugs ;)
Pin assignments are finalized. We can start producing final installation images / help!
As always, I appreciate code reviews and bug fixes. I'm sorry some of it got so messy ;p
psxdev
------------------------------------------------------------
Update 4 June 2017
- unified SCEX injection function / easier to read code
- PU-22+ now work without the WFCK wire (but depends on tight timings, tested on 8 and 16Mhz mcu)
- interrupts disabled while sampling SUBQ > much better performance capturing all events correctly
- now blinks the built-in LED on injections for debugging
psxdev
------------------------------------------------------------
Update 31st May 2017
- supports all motherboard versions except PU-41 (PAL) (will get to it!)
- WFCK modulated injection method for PU-22 and up, just like the last multimode 3 chips
- minimized CD controller interference: PsNee only ever speaks when it has to (also: full stealth)
- not relying on BIOS delays: perfect boot disregarding extension cards etc
- might not be bug free! I'm just one guy and testing on a dozen consoles takes time ;)
psxdev
-------------------------------------------------------------
Update 27th of May 2017
This version is compatible with 8Mhz and 16Mhz ATmega328 / Arduino boards.
It uses polling to grab the SUBQ packets. This works better than relying on interrupts.
I even have a few cycles to spare on a 8Mhz chip!
psxdev
--------------------------------------------------------------
Update 15th of May 2017
PSNee now watches the subchannel data and looks at the position information contained within.
This allows deterministic SCEX injections. It knows (almost) exactly when to inject the SCEX string.
Therefore it is now a stealth modchip :)
Required connections: GND, VCC, data, gate, SQCL, SUBQ
No more need to watch the PSX reset or lid open signals or any other typical modchip points (like "sync")
WIP! Only tested on PU-18 board. Should work fine on PU-7, PU-8, PU-18 and PU-20.
Will need adaption for PU-22 to PU-41 (SCPH-750x, 900x and PSOne).
Note: Once this is installed in a PSX, mind the Pin13 LED that many Arduino boards have. Do not upload new sketches while the PSX is on!
(If the PSX is on while uploading a sketch (making the LED blink), a voltage will be fed back into the SCLK pin on the HC-05 in the PSX.
This didn't break my PSX in testing but it does stun the chip and halt CD operation. I'm thinking of a better method to do this but for now I need Arduino pin13..)
Very much recommended to install a 3.3V chip!
psxdev
-------------------------------------------------------------
Update 7th of May 2017
Branched and tweaked for use with the Position 0 switch on a PSX laser.
(Requires a bit of sticky tape at the point where the switch touches the laser assembly.)
This allows deterministic SCEX injections, without relying on timing. Also gets rid of connection wires for LID and RESET.
WIP!
psxdev
--------------------------------------------------------------
New in this version! V6
--------------------------------------------------------------
A lot!
- The PAL SCPH-102 NTSC BIOS-patch works flawlessly! For speed reasons this is implemented in bare
AVR C. It is functionally identical to the OneChip modchip, this modchip firmware was disassembled,
documented (available on request, but written in Dutch...) and analyzed with a logic analyzer to
make sure PsNee works just as well.
- The code now is segmented in functions which make the program a lot more maintable and readable
- Timing is perfected, all discs (both backups and originals of PAL and NTSC games) now work in the
PAL SCPH-102 test machine
- It was found out that the gate signal doesn't havbe to be hooked up to a PAL SCPH-102 Playstation
to circumvent the copy protection. This is not tested on other Playstation models so the signal still
is available
- The /xlat signal is no longer required to time the PAL SCPH-102 NTSC BIOS-patch
- Only AVR PORTB is used for compatibility reasons (almost all the AVR chips available have PORTB)
-------------------------------------------------------------
A minor detail: The lid detection is missing its digitalRead() ;p
psxdev
-------------------------------------------------
VERSION 2! :D
-------------------------------------------------
What has changed?
- Thanks to TriMesh, the gate-pin is now also used to determine in which model of
Playstation PsNee is installed. The modchip algorithm thus can be optimized for
optimal performance on specific Playstation revisions. This works by monitoring
whether a clock signal is present on this pin - when there is one, the modchip is
installed in a PU-22, PU-23 or PSOne Playstation, else it is installed in an older
model Playstation. In this version of PsNee, nothing is actually done with this information.
- Thanks to -again- TriMesh, NTSC support for PAL SCPH-102 Playstations is added! This uses
the same method the OneChip modchip used for achieving this:
1. Monitor the XLAT signal from the CD mechanism controller chip. This requires
another connection to the Playstation. When this signal is 0, the first CD copy
protection is passed! After this, there is another one.
2. After this, watch the Address18-pin (pin 31) on the BIOS-chip. When this signal
is high, this means the second CD copy protection is about to run.
3. Wait a short time.
4. Pull the Data2-pin (pin 15) on the BIOS-chip to 0. This effectively blocks the
execution of the region check of the inserted disc.
5. The Playstation plays the inserted disc and doesn't care whether it's PAL or NTSC!
6. Release the 0 of the Data2-pin.
To correctly output a PAL video color signal for a PAL TV on a PAL PSOne with an NTSC disc
inserted, Pin 3 of IC502 must be grounded with an external switch. The modchip also could do
this, although we would need a device with more pins available.
- The outputted data signal is now "sliced up" to improve (or less distort) the tracking
signal from the CD mechanism: later Playstations use the CD tracking signal for transmitting
the SCEx-string to the Playstation instead of using a seperate connection, so when the modchip
forces a 0 on the data-pin, the tracking signal also is gone temporarily. By slicing the data-
signal up in little pieces at least some of the tracking signal remains and the Playstation can
read discs more easily.
- The two big for-loops are combined into one with an OR-statement describing the two conditions
modchip should be active: when flagFirstCycle = 0 or when flagFirstCycle = 1 and the lid is opened
and closed again. This makes code maintenance easier.
- The pin-out of the modchip is changed slightly to be able to use an interrupt for the PAL=>NTSC
BIOS-patch for PAL SCPH-102. Please use the revised pin-out found below with this code.
~TheFrietMan, The Netherlands