diff --git a/PSNee/MCU.h b/PSNee/MCU.h index 029337a..054cb64 100644 --- a/PSNee/MCU.h +++ b/PSNee/MCU.h @@ -1,6 +1,6 @@ // ***************************************************************************************************************** -// Configuration for different microcontrollers (MCU) to ensure compatibility with the code: -// - Defines the clock speed, timers, and interrupts for each MCU. +// Configuration for different microcontrollers (MUC) to ensure compatibility with the code: +// - Defines the clock speed, timers, and interrupts for each MUC. // - Configures I/O pins for data, clocks, and switches according to the requirements. // - Enables pull-up resistors on input pins where needed. // - Manages external interrupts and LED outputs for system feedback. @@ -8,89 +8,219 @@ // ***************************************************************************************************************** //****************************************************************************************************************** -// Configuring the clock speed and associated registers. The formula for calculating +// Configuring the clock speed and associated registers. The formula for calculating // the clock frequency is F_CPU / (TCCR0B |= (1<). It points to the specific memory address in the microcontroller's flash memory where the +// Interrupt Service Routine (ISR) for the INT0 event must reside. +// +// When you write ISR(INT0_vect) { ... }, you are telling the compiler: "Place this block of code at the +// location the CPU jumps to when a hardware signal is detected on the INT0 pin." +// +// In Arduino code, this identifier is hidden from the user and managed internally by the +// attachInterrupt() function. +// +//****************************************************************************************************************** + + #pragma once diff --git a/PSNee/PSNee.ino b/PSNee/PSNee.ino index 7408b7a..cd41205 100644 --- a/PSNee/PSNee.ino +++ b/PSNee/PSNee.ino @@ -82,10 +82,12 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX /* Fuses - MCU | High | Low | Extended + MCU | High | Low | Extended -------------------------------------------------- - ATmega | DF | EE | FF - ATtiny | DF | E2 | FF + ATmega 328/168 | DF | EE | FD + ATmega32U4_16U4 | DF | EE | FB + ATtiny | DF | E2 | FF + ATmega 328PB | DF | EE | F5 Pinout Arduino | PSNee | @@ -130,8 +132,12 @@ uint8_t wfck_mode = 0; // --- Prototypes (Forward declarations) --- // These tell the compiler that the functions exist later in the code. -void logic_Standard(uint8_t isDataSector); + +//#ifdef SCPH_5903 void logic_SCPH_5903(uint8_t isDataSector); +//#else +void logic_Standard(uint8_t isDataSector); +//#endif // Function pointer type definition for the console detection logic. // This allows switching between 'Standard' and 'SCPH-5903' heuristics dynamically. @@ -167,7 +173,7 @@ uint8_t hysteresis = 0; Traditionally, the WFCK signal was called GATE. This is because, on early models, modchips acted like a gate that would open to pull the signal down - at the exact moment the region code was being passed (which is still the case today). + at the exact moment the region code was being passed (which is still the case today). During the initialization and region protection zone reading phases, the WFCK clock frequency is approximately 7.3 kHz. diff --git a/images/motherboard/PM-41 2.png b/images/motherboard/PM-41 2.png index 0e67a35..d8819b8 100644 Binary files a/images/motherboard/PM-41 2.png and b/images/motherboard/PM-41 2.png differ diff --git a/images/motherboard/PU-16.png b/images/motherboard/PU-16.png new file mode 100644 index 0000000..b06da32 Binary files /dev/null and b/images/motherboard/PU-16.png differ diff --git a/images/motherboard/PU-22-A.png b/images/motherboard/PU-22-A.png index 7028e4b..c41017b 100644 Binary files a/images/motherboard/PU-22-A.png and b/images/motherboard/PU-22-A.png differ diff --git a/images/motherboard/pu-8a.png b/images/motherboard/pu-8a.png index b83e8e4..fd08fb1 100644 Binary files a/images/motherboard/pu-8a.png and b/images/motherboard/pu-8a.png differ diff --git a/images/schemat/PIN_SWITCH.png b/images/schemat/PIN_SWITCH.png index 28b7ef8..3a2492e 100644 Binary files a/images/schemat/PIN_SWITCH.png and b/images/schemat/PIN_SWITCH.png differ