PSNee further development

General information to do with the PlayStation 1 Hardware. Including modchips, pinouts, rare or obscure development equipment, etc.
Gnosis
What is PSXDEV?
What is PSXDEV?
Posts: 1
Joined: Feb 18, 2021

Post by Gnosis » February 18th, 2021, 7:57 pm

Hello.
I'm really thankful for PSXdev team for PSNee, but it's seems overkill to use entire arduino (or even ATTiny25) for this purpose, so I ported this code to ATTiny10 (6pin SOT-23!). It's only for PU22 boards, but code can be modified for older boards support.
Probably, this is smallest modchip!
Source: gist.github.com/a-sakharov/44b80c37c243891d1ec0cb4942668cdd
Last edited by Gnosis on June 14th, 2024, 10:53 pm, edited 2 times in total.

neotendo
What is PSXDEV?
What is PSXDEV?
Posts: 1
Joined: May 18, 2021

Post by neotendo » May 18th, 2021, 4:38 pm

Hello Team,

1st many thanks for your awesome work.

I ported the code over to the ATtiny2313 MCU, here is the code.
You can add a LED on pin PD0 if you want.
The ATtiny2313 has still little room for adding some other stuff like switching internal memory cards.

Hope anyone can use it.

Code: Select all

// PsNee / psxdev.net version
// For Arduino and ATtiny
//
// Quick start: Select your hardware via the #defines, compile + upload the code, install in PSX.
// There are some pictures in the development thread ( http://www.psxdev.net/forum/viewtopic.php?f=47&t=1262&start=120 )
// Beware to use the PSX 3.5V / 3.3V power, *NOT* 5V! The installation pictures include an example.
//
// Arduinos:
//  - Arduino Pro Mini @8Mhz and @16Mhz (supported, tested)
//  - Arduino Uno @8Mhz and @16Mhz (supported, tested)
//  - Arduino Pro Micro has a different pin assignment and needs some easy porting. (ToDo)
//  - Use #define ARDUINO_BOARD
// ATtiny:
//  - ATtiny85: Should work the same as ATtiny45 (supported, untested)
//  - ATtiny45: LFUSE 0xE2  HFUSE 0xDF > internal oscillator, full 8Mhz speed (supported, tested)
//  - ATtiny25: Should work the same as ATtiny45 but doesn't have enough Flash nor RAM for PSNEEDEBUG (supported, untested)
//  - Use #define ATTINY_X5
//
// ATtiny 2313:
//  - Use #define ATTINY_2313 (8Mhz, no Bootloader), tested on PAL SCPH-7502 PU-22
//
// To use ATtiny with the Arduino environment, an ATtiny core has to be installed.
//
// PAL PM-41 consoles are supported with #define APPLY_PSONE_PAL_BIOS_PATCH,
// but only on boards with ATmega chips (Arduinos).
// Also, the Arduino must be flashed using SPI (deleting the bootloader), since I expect a signal ~1 second after power on.
//
// This code defaults to multi-region, meaning it will unlock PAL, NTSC-U and NTSC-J machines.
// You can optimize boot times for your console further. See "// inject symbols now" in the main loop.

//+-------------------------------------------------------------------------------------------+
//|                                  Choose your hardware!                                    |
//+-------------------------------------------------------------------------------------------+
// 2 main branches available:
//  - ATmega based > easy to use, fast and nice features for development, recommended
//  - ATtiny based > for minimal installs

#undef LED_BUILTIN

#define ATTINY_2313      // Experimental 
//#define ARDUINO_BOARD
//#define ATTINY_X5

//#define APPLY_PSONE_PAL_BIOS_PATCH
#define DEBUG_LED
//#define PSNEEDEBUG

#include <avr/pgmspace.h>




#if defined(ARDUINO_BOARD)
// board pins (code requires porting to reflect any changes)
#if defined(APPLY_PSONE_PAL_BIOS_PATCH)
#define BIOS_A18 4          // connect to PSOne BIOS A18 (pin 31 on that chip)
#define BIOS_D2  5          // connect to PSOne BIOS D2 (pin 15 on that chip)
#endif
#define sqck 6          // connect to PSX HC-05 SQCK pin
#define subq 7          // connect to PSX HC-05 SUBQ pin
#define data 8          // connect to point 6 in old modchip diagrams
#define gate_wfck 9     // connect to point 5 in old modchip diagrams
// MCU I/O definitions
#define SUBQPORT PIND       // MCU port for the 2 SUBQ sampling inputs
#define SQCKBIT 6           // PD6 "SQCK" < Mechacon pin 26 (PU-7 and early PU-8 Mechacons: pin 41)
#define SUBQBIT 7           // PD7 "SUBQ" < Mechacon pin 24 (PU-7 and early PU-8 Mechacons: pin 39)
#define GATEWFCKPORT PINB   // MCU port for the gate input (used for WFCK)
#define DATAPORT PORTB      // MCU port for the gate input (used for WFCK)
#define GATEWFCKBIT 1       // PB1
#define DATABIT 0           // PB0
#define LED_BUILTIN 13
#if defined(APPLY_PSONE_PAL_BIOS_PATCH)
#define BIOSPATCHPORTIN  PIND
#define BIOSPATCHPORTOUT PORTD
#define BIOSPATCHDDR     DDRD
#define BIOS_A18_BIT 4
#define BIOS_D2_BIT  5
#endif

#elif defined(ATTINY_X5) // ATtiny 25/45/85
// extras
#define USINGSOFTWARESERIAL
// board pins (Do not change. Changing pins requires adjustments to MCU I/O definitions)
#define sqck 0
#define subq 1
#define data 2
#define gate_wfck 4
#define debugtx 3
// MCU I/O definitions
#define SUBQPORT PINB
#define SQCKBIT 0
#define SUBQBIT 1
#define GATEWFCKPORT PINB
#define DATAPORT PORTB
#define GATEWFCKBIT 4
#define DATABIT 2
#if defined(APPLY_PSONE_PAL_BIOS_PATCH)
#error "ATtiny does not support PAL PSOne patch yet!"
#endif
 
#elif defined(ATTINY_2313)    // ATTINY 2313
// extras
#ifdef PSNEEDEBUG
  #error "ATtiny 2313 has not enough space for Debuging!"
#endif

// board pins (Do not change. Changing pins requires adjustments to MCU I/O definitions)
#define sqck 9
#define subq 10
#define data 11
#define gate_wfck 13
// MCU I/O definitions
#define SUBQPORT PINB       // MCU port for the 2 SUBQ sampling inputs
#define SQCKBIT 0 //9           // PB0 "SQCK" < Mechacon pin 26 (PU-7 and early PU-8 Mechacons: pin 41)
#define SUBQBIT 1 //10           // PB1 "SUBQ" < Mechacon pin 24 (PU-7 and early PU-8 Mechacons: pin 39)
#define GATEWFCKPORT PINB   // MCU port for the gate input (used for WFCK)
#define DATAPORT PORTB      // MCU port for the gate input (used for WFCK)
#define GATEWFCKBIT 4 //13       // PB4
#define DATABIT 2 //11           // PB2
#define LED_BUILTIN 0         // PD0

#if defined(APPLY_PSONE_PAL_BIOS_PATCH)
  #error "ATtiny does not support PAL PSOne patch yet!"
#endif
#else
  #error "Select a board!"
#endif


#if defined(PSNEEDEBUG) && defined(USINGSOFTWARESERIAL)
#include <SoftwareSerial.h>
SoftwareSerial mySerial(-1, 3); // RX, TX. (RX -1 = off)
#define DEBUG_PRINT(x)     mySerial.print(x)
#define DEBUG_PRINTHEX(x)  mySerial.print(x, HEX)
#define DEBUG_PRINTLN(x)   mySerial.println(x)
#define DEBUG_FLUSH        mySerial.flush()
#elif defined(PSNEEDEBUG) && !defined(USINGSOFTWARESERIAL)
#define DEBUG_PRINT(x)     Serial.print(x)
#define DEBUG_PRINTHEX(x)  Serial.print(x, HEX)
#define DEBUG_PRINTLN(x)   Serial.println(x)
#define DEBUG_FLUSH        Serial.flush()
#else
#define DEBUG_PRINT(x)
#define DEBUG_PRINTHEX(x)
#define DEBUG_PRINTLN(x)
#define DEBUG_FLUSH
#endif

#define NOP __asm__ __volatile__ ("nop\n\t")

// Setup() detects which (of 2) injection methods this PSX board requires, then stores it in pu22mode.
boolean pu22mode;

//Timing
const int delay_between_bits = 4000;      // 250 bits/s (microseconds) (ATtiny 8Mhz works from 3950 to 4100)
const int delay_between_injections = 90;  // 72 in oldcrow. PU-22+ work best with 80 to 100 (milliseconds)

// borrowed from AttyNee. Bitmagic to get to the SCEX strings stored in flash (because Harvard architecture)
bool readBit(int index, const unsigned char *ByteSet)
{
  int byte_index = index >> 3;
  byte bits = pgm_read_byte(&(ByteSet[byte_index]));
  int bit_index = index & 0x7; // same as (index - byte_index<<3) or (index%8)
  byte mask = 1 << bit_index;
  return (0 != (bits & mask));
}

void inject_SCEX(char region)
{
  //SCEE: 1 00110101 00, 1 00111101 00, 1 01011101 00, 1 01011101 00
  //SCEA: 1 00110101 00, 1 00111101 00, 1 01011101 00, 1 01111101 00
  //SCEI: 1 00110101 00, 1 00111101 00, 1 01011101 00, 1 01101101 00
  //const boolean SCEEData[44] = {1,0,0,1,1,0,1,0,1,0,0,1,0,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,1,0,1,0,0,1,0,1,0,1,1,1,0,1,0,0};
  //const boolean SCEAData[44] = {1,0,0,1,1,0,1,0,1,0,0,1,0,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,1,0,1,0,0,1,0,1,0,1,1,1,0,1,0,0};
  //const boolean SCEIData[44] = {1,0,0,1,1,0,1,0,1,0,0,1,0,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,1,0,1,0,0,1,0,1,0,1,1,1,0,1,0,0};
  static const PROGMEM unsigned char SCEEData[] = {0b01011001, 0b11001001, 0b01001011, 0b01011101, 0b11101010, 0b00000010};
  static const PROGMEM unsigned char SCEAData[] = {0b01011001, 0b11001001, 0b01001011, 0b01011101, 0b11111010, 0b00000010};
  static const PROGMEM unsigned char SCEIData[] = {0b01011001, 0b11001001, 0b01001011, 0b01011101, 0b11011010, 0b00000010};

  // pinMode(data, OUTPUT) is used more than it has to be but that's fine.
  for (byte bit_counter = 0; bit_counter < 44; bit_counter++)
  {
    if (readBit(bit_counter, region == 'e' ? SCEEData : region == 'a' ? SCEAData : SCEIData) == 0)
    {
      pinMode(data, OUTPUT);
      bitClear(GATEWFCKPORT, DATABIT); // data low
      delayMicroseconds(delay_between_bits);
    }
    else
    {
      if (pu22mode) {
        pinMode(data, OUTPUT);
        unsigned long now = micros();
        do {
          bool wfck_sample = bitRead(GATEWFCKPORT, GATEWFCKBIT);
          bitWrite(DATAPORT, DATABIT, wfck_sample); // output wfck signal on data pin
        }
        while ((micros() - now) < delay_between_bits);
      }
      else { // PU-18 or lower mode
        pinMode(data, INPUT);
        delayMicroseconds(delay_between_bits);
      }
    }
  }

  pinMode(data, OUTPUT);
  bitClear(GATEWFCKPORT, DATABIT); // pull data low
  delay(delay_between_injections);
}

void NTSC_fix() {
#if defined(APPLY_PSONE_PAL_BIOS_PATCH)
  pinMode(BIOS_A18, INPUT);
  pinMode(BIOS_D2, INPUT);

  delay(100); // this is right after SQCK appeared. wait a little to avoid noise
  while (!bitRead(BIOSPATCHPORTIN, BIOS_A18_BIT))
  {
    ;  //wait for stage 1 A18 pulse
  }
  delay(1350); //wait through stage 1 of A18 activity

  noInterrupts(); // start critical section
  while (!bitRead(BIOSPATCHPORTIN, BIOS_A18_BIT))
  {
    ;  //wait for priming A18 pulse
  }
  delayMicroseconds(17); // max 17us for 16Mhz ATmega (maximize this when tuning!)
  bitClear(BIOSPATCHPORTOUT, BIOS_D2_BIT); // store a low
  bitSet(BIOSPATCHDDR, BIOS_D2_BIT); // D2 = output. drags line low now
  delayMicroseconds(4); // min 2us for 16Mhz ATmega, 8Mhz requires 3us (minimize this when tuning, after maximizing first us delay!)
  bitClear(DDRD, BIOS_D2_BIT); // D2 = input / high-z
  interrupts(); // end critical section

  // not necessary but I want to make sure these pins are now high-z again
  pinMode(BIOS_A18, INPUT);
  pinMode(BIOS_D2, INPUT);
#endif
}

//--------------------------------------------------
//     Setup
//--------------------------------------------------

void setup()
{
  pinMode(data, INPUT);
  pinMode(gate_wfck, INPUT);
  pinMode(subq, INPUT); // PSX subchannel bits
  pinMode(sqck, INPUT); // PSX subchannel clock

#if defined(PSNEEDEBUG) && defined(USINGSOFTWARESERIAL)
  pinMode(debugtx, OUTPUT); // software serial tx pin
  mySerial.begin(115200); // 13,82 bytes in 12ms, max for softwareserial. (expected data: ~13 bytes / 12ms) // update: this is actually quicker
#elif defined(PSNEEDEBUG) && !defined(USINGSOFTWARESERIAL)
  //Serial.begin(500000); // 60 bytes in 12ms (expected data: ~26 bytes / 12ms) // update: this is actually quicker
  Serial.begin(9600); // 60 bytes in 12ms (expected data: ~26 bytes / 12ms) // update: this is actually quicker
  DEBUG_PRINT("MCU frequency: "); DEBUG_PRINT(F_CPU); DEBUG_PRINTLN(" Hz");
  DEBUG_PRINTLN("Waiting for SQCK..");
#endif

#if defined(ARDUINO_BOARD) || defined(DEBUG_LED)
  pinMode(LED_BUILTIN, OUTPUT); // Blink on injection / debug.
  digitalWrite(LED_BUILTIN, HIGH); // mark begin of setup
#endif

  // wait for console power on and stable signals
  while (!digitalRead(sqck));
  while (!digitalRead(gate_wfck));

  // if enabled: patches PAL PSOne consoles so they start all region games
  NTSC_fix();

  // Board detection
  //
  // GATE: __-----------------------  // this is a PU-7 .. PU-20 board!
  //
  // WFCK: __-_-_-_-_-_-_-_-_-_-_-_-  // this is a PU-22 or newer board!

  unsigned int highs = 0, lows = 0;
  unsigned long now = millis();
  do {
    if (digitalRead(gate_wfck) == 1) highs++;
    if (digitalRead(gate_wfck) == 0) lows++;
    delayMicroseconds(200);   // good for ~5000 reads in 1s
  }
  while ((millis() - now) < 1000); // sample 1s

  // typical readouts
  // PU-22: highs: 2449 lows: 2377
  if (lows > 100) {
    pu22mode = 1;
  }
  else {
    pu22mode = 0;
  }

//#ifdef ATTINY_X5
#if defined(ATTINY_X5) || defined(ATTINY_2313)
  DEBUG_PRINT("m "); DEBUG_PRINTLN(pu22mode);
#else
  DEBUG_PRINT("highs: "); DEBUG_PRINT(highs); DEBUG_PRINT(" lows: "); DEBUG_PRINTLN(lows);
  DEBUG_PRINT("pu22mode: "); DEBUG_PRINTLN(pu22mode);
  // Power saving
  // Disable the ADC by setting the ADEN bit (bit 7)  of the ADCSRA register to zero.
  ADCSRA = ADCSRA & B01111111;
  // Disable the analog comparator by setting the ACD bit (bit 7) of the ACSR register to one.
  ACSR = B10000000;
  // Disable digital input buffers on all analog input pins by setting bits 0-5 of the DIDR0 register to one.
  DIDR0 = DIDR0 | B00111111;
#endif

#if defined(ARDUINO_BOARD) || defined(DEBUG_LED)
  digitalWrite(LED_BUILTIN, LOW); // setup complete
#endif

  DEBUG_FLUSH; // empty serial transmit buffer
}

void loop()
{
  static byte scbuf [12] = { 0 }; // We will be capturing PSX "SUBQ" packets, there are 12 bytes per valid read.
  static unsigned int timeout_clock_counter = 0;
  static byte bitbuf = 0;   // SUBQ bit storage
  static bool sample = 0;
  static byte bitpos = 0;
  byte scpos = 0;           // scbuf position


  // start with a small delay, which can be necessary in cases where the MCU loops too quickly
  // and picks up the laster SUBQ trailing end
  delay(1); 
  
 noInterrupts(); // start critical section
start:
  // Capture 8 bits for 12 runs > complete SUBQ transmission
  bitpos = 0;
  for (; bitpos < 8; bitpos++) {
    while (bitRead(SUBQPORT, SQCKBIT) == 1) {
      
      // wait for clock to go low..
      // a timeout resets the 12 byte stream in case the PSX sends malformatted clock pulses, as happens on bootup
      timeout_clock_counter++;
      if (timeout_clock_counter > 1000) {
        scpos = 0;  // reset SUBQ packet stream
        timeout_clock_counter = 0;
        bitbuf = 0;
        goto start;
      }
    }

    // wait for clock to go high..
    while ((bitRead(SUBQPORT, SQCKBIT)) == 0);

    sample = bitRead(SUBQPORT, SUBQBIT);
    bitbuf |= sample << bitpos;

    timeout_clock_counter = 0; // no problem with this bit
  }

  // one byte done
  scbuf[scpos] = bitbuf;
  scpos++;
  bitbuf = 0;

  // repeat for all 12 bytes
  if (scpos < 12) {
    goto start;
  }
  interrupts(); // end critical section

  // log SUBQ packets. We only have 12ms to get the logs written out. Slower MCUs get less formatting.
#if defined(ATTINY_X5) || defined(ATTINY_2313)
  if (!(scbuf[0] == 0 && scbuf[1] == 0 && scbuf[2] == 0 && scbuf[3] == 0)) { // a bad sector read is all 0 except for the CRC fields. Don't log it.
    for (int i = 0; i < 12; i++) {
      if (scbuf[i] < 0x10) {
        DEBUG_PRINT("0"); // padding
      }
      DEBUG_PRINTHEX(scbuf[i]);
    }
    DEBUG_PRINTLN("");
  }
#else
  if (!(scbuf[0] == 0 && scbuf[1] == 0 && scbuf[2] == 0 && scbuf[3] == 0)) {
    for (int i = 0; i < 12; i++) {
      if (scbuf[i] < 0x10) {
        DEBUG_PRINT("0"); // padding
      }
      DEBUG_PRINTHEX(scbuf[i]);
      DEBUG_PRINT(" ");
    }
    DEBUG_PRINTLN("");
  }
#endif

  // check if read head is in wobble area
  // We only want to unlock game discs (0x41) and only if the read head is in the outer TOC area.
  // We want to see a TOC sector repeatedly before injecting (helps with timing and marginal lasers).
  // All this logic is because we don't know if the HC-05 is actually processing a getSCEX() command.
  // Hysteresis is used because older drives exhibit more variation in read head positioning.
  // While the laser lens moves to correct for the error, they can pick up a few TOC sectors.
  static byte hysteresis  = 0;
  boolean isDataSector = (((scbuf[0] & 0x40) == 0x40) && (((scbuf[0] & 0x10) == 0) && ((scbuf[0] & 0x80) == 0)));
  
  if (
    (isDataSector &&  scbuf[1] == 0x00 &&  scbuf[6] == 0x00) &&   // [0] = 41 means psx game disk. the other 2 checks are garbage protection
    (scbuf[2] == 0xA0 || scbuf[2] == 0xA1 || scbuf[2] == 0xA2 ||      // if [2] = A0, A1, A2 ..
     (scbuf[2] == 0x01 && (scbuf[3] >= 0x98 || scbuf[3] <= 0x02) ) )   // .. or = 01 but then [3] is either > 98 or < 02
  ) {
    hysteresis++;
  }
  else if ( hysteresis > 0 &&
            ((scbuf[0] == 0x01 || isDataSector) && (scbuf[1] == 0x00 /*|| scbuf[1] == 0x01*/) &&  scbuf[6] == 0x00)
          ) {  // This CD has the wobble into CD-DA space. (started at 0x41, then went into 0x01)
    hysteresis++;
  }
  else if (hysteresis > 0) {
    hysteresis--; // None of the above. Initial detection was noise. Decrease the counter.
  }

  // hysteresis value "optimized" using very worn but working drive on ATmega328 @ 16Mhz
  // should be fine on other MCUs and speeds, as the PSX dictates SUBQ rate
  if (hysteresis >= 14) {
    // If the read head is still here after injection, resending should be quick.
    // Hysteresis naturally goes to 0 otherwise (the read head moved).
    hysteresis = 11;

#if defined(ATTINY_X5) || defined(ATTINY_2313)
    DEBUG_PRINTLN("!");
#else
    DEBUG_PRINTLN("INJECT!INJECT!INJECT!INJECT!INJECT!INJECT!");
#endif
#if defined(ARDUINO_BOARD) || defined(DEBUG_LED)
    digitalWrite(LED_BUILTIN, HIGH);
#endif

    pinMode(data, OUTPUT);
    digitalWrite(data, 0); // pull data low
    if (!pu22mode) {
      pinMode(gate_wfck, OUTPUT);
      digitalWrite(gate_wfck, 0);
    }

    // HC-05 waits for a bit of silence (pin low) before it begins decoding.
    delay(delay_between_injections);
    // inject symbols now. 2 x 3 runs seems optimal to cover all boards
    for (byte loop_counter = 0; loop_counter < 2; loop_counter++)
    {
      inject_SCEX('e'); // e = SCEE, a = SCEA, i = SCEI
      inject_SCEX('a'); // injects all 3 regions by default
      inject_SCEX('i'); // optimize boot time by sending only your console region letter (all 3 times per loop)
    }

    if (!pu22mode) {
      pinMode(gate_wfck, INPUT); // high-z the line, we're done
    }
    pinMode(data, INPUT); // high-z the line, we're done
#if defined(ARDUINO_BOARD) || defined(DEBUG_LED)
    digitalWrite(LED_BUILTIN, LOW);
#endif
  }
  // keep catching SUBQ packets forever
}
psnee_diag.jpg
You do not have the required permissions to view the files attached to this post.

Ewiko
What is PSXDEV?
What is PSXDEV?
Posts: 3
Joined: Sep 02, 2021

Post by Ewiko » September 2nd, 2021, 4:57 pm

Hello I installed PSnee on a PSONE (PM41-2), how to know if the NTSC patch works? I removed the comment in the .ino file before putting it in the Arduino, but I saw that it had to upload it in a special way in the bootloader so I do not know if it works

digi
Interested PSXDEV User
Interested PSXDEV User
Posts: 8
Joined: Jun 16, 2022
PlayStation Model: 5500
Location: US

Post by digi » June 29th, 2022, 2:02 pm

Hello, if I have an eprom programmer that can program ATtiny45/85, is there a hex file somewhere for psnee? I'm an Arduino noob and would rather not have to buy the Arduino Uno just to program the ATtiny45 if my eprom programmer can do the same thing.. ty in advance.

Nextria
Curious PSXDEV User
Curious PSXDEV User
Posts: 17
Joined: Mar 10, 2019

Post by Nextria » June 29th, 2022, 9:04 pm

digi wrote: June 29th, 2022, 2:02 pm Hello, if I have an eprom programmer that can program ATtiny45/85, is there a hex file somewhere for psnee? I'm an Arduino noob and would rather not have to buy the Arduino Uno just to program the ATtiny45 if my eprom programmer can do the same thing.. ty in advance.
Hey, I am not sure but I think you can export the code in arduino ide to a hex file.
Read the info in the psnee code for the right fuses and define your chip.

Also maybe first try it in a socket, so you can remove it easily and try again.

I am home next week, and maybe look into this

digi
Interested PSXDEV User
Interested PSXDEV User
Posts: 8
Joined: Jun 16, 2022
PlayStation Model: 5500
Location: US

Post by digi » June 30th, 2022, 12:49 am

Nextria wrote: June 29th, 2022, 9:04 pm
digi wrote: June 29th, 2022, 2:02 pm Hello, if I have an eprom programmer that can program ATtiny45/85, is there a hex file somewhere for psnee? I'm an Arduino noob and would rather not have to buy the Arduino Uno just to program the ATtiny45 if my eprom programmer can do the same thing.. ty in advance.
Hey, I am not sure but I think you can export the code in arduino ide to a hex file.
Read the info in the psnee code for the right fuses and define your chip.

Also maybe first try it in a socket, so you can remove it easily and try again.

I am home next week, and maybe look into this
Hi Nextria! I'll hold off until you're back home. I don't know how to check the code for the fuses or my chip, sorry. Thanks for the response. :)

kylemn
What is PSXDEV?
What is PSXDEV?
Posts: 2
Joined: Jul 07, 2022
PlayStation Model: SCPH 1001
Location: Brazil

Post by kylemn » July 9th, 2022, 4:33 am

Hi friend.
can you send me the schema so i can use an lcd where i can see the information? it would be very important to me. where can I find solder schematics on the boards and what is the best board to use? thanks. Health and peace.

thepolish
What is PSXDEV?
What is PSXDEV?
Posts: 1
Joined: Dec 28, 2022
PlayStation Model: SCPH-7501
Location: US

Post by thepolish » December 29th, 2022, 5:54 am

neotendo wrote: May 18th, 2021, 4:38 pm Hello Team,

1st many thanks for your awesome work.

I ported the code over to the ATtiny2313 MCU, here is the code.
You can add a LED on pin PD0 if you want.
The ATtiny2313 has still little room for adding some other stuff like switching internal memory cards.

Hope anyone can use it.

Thank you! Confirmed this works on NTSC 7501, life saver as my copy of Tekken 2 finally wont load (and no one in my area resurfaces discs either) so I bit the bullet to try this with some leftover ATTINY 2313As I had laying around from when I was making myself some bluetooth controllers. Worked perfectly.

For anyone that might be struggling though this, the attiny 2313A fuse bits should be High 0xE4, low 0xDF, extended and lockbit both 0xFF. I just exported your code out of here into arduino ide, exported as hex and uploaded using a MiniPro TL866 and it's software.

User avatar
Administrator
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2689
Joined: Dec 31, 2012
I am a: Shadow
PlayStation Model: H2000/5502

Post by Administrator » December 29th, 2022, 8:25 am

thepolish wrote: December 29th, 2022, 5:54 am
neotendo wrote: May 18th, 2021, 4:38 pm Hello Team,

1st many thanks for your awesome work.

I ported the code over to the ATtiny2313 MCU, here is the code.
You can add a LED on pin PD0 if you want.
The ATtiny2313 has still little room for adding some other stuff like switching internal memory cards.

Hope anyone can use it.

my copy of Tekken 2 finally wont load (and no one in my area resurfaces discs either)
Use a semi-light grade car 'cut and polish' (IE: paint correction) compound. It's typically a white creamy paste and it can be used to polish polycarbonate to remove scratches. I recommend putting a little on a microfiber towel on a table and then gliding the disc over it in a criss-cross pattern. The disc won't have a factory perfect finish after, but it should fix the boot issue to get Tekken 2 working again for you.

Another idea is to just buy a "CD/DVD Repair Machine - Motorized Cleaning and Polishing" (search for that title) from eBay. They run about $50 USD and again, I just used the cut and polish paste designed for cars (I only used their included light polishing compound after I polished my disc with my car cut and polish compound because I needed a heavier cut first because you do need to polish the polycarbonate from semi-light to light). The idea with this machine is it gives a much more uniform and level reading playfield on the disc polycarbonate, and it has proper polishing wheels to ensure even distribution of the cutting compound. You can remove very deep scratches if you run the machine about 30 times with the semi-light car cut and polish compound and then of course lastly run the light compound on a new/different polishing wheel which the machine came with (which is what I did to fix a hard to find DVD movie).

If that doesn't fix the issue then it's your laser deck assembly in the console.
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

Hyuma
What is PSXDEV?
What is PSXDEV?
Posts: 1
Joined: Dec 29, 2023
PlayStation Model: SCPH-5552

Post by Hyuma » December 29th, 2023, 4:03 am

Hey, I'm trying to modify my two psx SCPH-5552 and 7502 with the PSNee by using an ATTiny13. I'm using this code:

https://github.com/kalymos/PsNee/blob/master/PsNee.ino

As the Pinout of ATTiny13 and ATTiny25 is the same, I would like to ask you if any of you had success with using the ATTiny13, because on my two PSX doesn't work at all. It shows me on the PSX menu the CD player. As the code asks I've uncommented the line 46 to have it works with tiny25/13.

//#define ARDUINO_328_BOARD
//#define ARDUINO_32UX_BOARD
define ATTINY_X5

The only differences I noticed with ATTiny13 is the clock speed. The tiny25 works at 8mhz and the tiny13 at 9.6mhz. That could be the issue? Thanks in advance!

User avatar
nuclear
What is PSXDEV?
What is PSXDEV?
Posts: 1
Joined: Feb 29, 2024
I am a: hacker
PlayStation Model: SCPH-7502
Discord: jtsiomb
Location: Greece
Contact:

Post by nuclear » February 29th, 2024, 2:11 pm

Just wanted to say thanks!

I used an old ATTiny45 I bought back in 2008 and never found any use for it so far, to replace the old PIC modchip I found in the console I bought last week (SCPH-7502/PU-18), and which wasn't working. I suspect the gate_wfck pad was ripped during shipping, because it came off with the wire of the old modchip when I desoldered it, and I had to use an alternative point on the resistor nearby instead.

I grabbed the hex file from the arduino tmp directory, and wrote it to the attiny with a minipro TL866 programmer before installation. Everything worked out fine and now it goes straight to the black playstation logo screen every time. The cdrom often struggles to read the cds fast enough, and stutters during FMVs. I'll probably have to replace it at some point. But that's got nothing to do with PsNee.

Here's a couple of pictures of the previous modchip and the PsNee install I just did.
ps1_oldmodchip.jpg
ps1_newmodchip.jpg
You do not have the required permissions to view the files attached to this post.

Ewiko
What is PSXDEV?
What is PSXDEV?
Posts: 3
Joined: Sep 02, 2021

Post by Ewiko » May 30th, 2024, 2:48 am

Hello, I wanted to flash an Arduino Nano

But in the comments of the .ino it says "Also, the Arduino must be flashed using SPI (deleting the bootloader), since I expect a signal ~1 second after power on."

I have an Arduino Uno flashed with ArduinoISP, will it be enough if I flash the Arduino Nano with the "Flash using a programmer" option? Or are there more things to do?

I don't know if I should use the "Burn bootloader" option.

kalymnos77
Curious PSXDEV User
Curious PSXDEV User
Posts: 26
Joined: Jun 06, 2017

Post by kalymnos77 » July 24th, 2024, 9:34 pm

Hello everybody.
It's been a while since I've been here again, but I have good news to tell you, I took the PSNeev8 code, I added support for ATtinny25/45/85, and ATmega32u4. I also added a folder for card management to be able to compile directly with the right options, and put the fuses in the right state using the bootloader injection command.
I haven't updated the documentation yet, I still have to do some tests to see if the compatibility is good with the different PS1s.
In the link the address of the most advanced version for the moment https://github.com/kalymos/PSNee_V8/tree/test2

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests