xbox-scene.com archived forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

xbox-scene.com forum restored.  registration disabled.  thanks to xboxexpert for the db dump and netham45 for cleaning it up!

Author Topic: Psx Mod Chip  (Read 92 times)

LexManos

  • Guest
Psx Mod Chip
« on: May 12, 2010, 04:03:26 AM »


Alright, well I have a cool old PSX. I play quite often.
And my cds are getting horribly mangled. (I blame my roommates)

Anyways, I figured why not put a mod chip in it.
Did a little research online and came across the 'security' that the PSX uses. And it's really simple.

CODE
;
;  Data conversion example:
;
;  *) A single data string transmission looks like this:
;
;    72ms delay w/"data" pin low, then serial ASCII string 'SCEA'
;
;  *) Each byte in the string will be sent serially at 250 baud
;     with 1 start bit (low) and two stop bits (high).  It looks
;     like this in binary, from RIGHT to LEFT:
;        'A'           'E'           'C'           'S'
;    11 01000001 0 11 01000101 0 11 01000011 0 11 01010011 0
;
;  *) Now, since the serial data is inverted from the polarilty of
;     standard asynchronous serial data at logic-levels, all the bits
;     need to be complemented:
;
;    00 10111110 1 00 10111010 1 00 10111100 1 00 10101100 1
;
;  *) Regroup the bits in sets of 8.  The last group will only have 4,
;     so pad it with zeroes.
;
;    00101111 10100101 11010100 10111100 10010101 1001(0000)
;
;  *) Now, write the bit string in reverse.  This is needed because
;     standard serial data is sent LSB first, but the author's original
;     data is sent MSB first.  Reversing the string so that the last bit
;     becomes the first bit compensates for this:
;
;    00001001 10101001 00111101 00101011 10100101 11110100
;
;  *) Make them into hex bytes, and the conversion is complete:
;
;    09 A9 3D 2B A5 F4
;
;  This version of the data string is sent as follows:
;
;    56ms delay/w "data" pin low, then 09 A9 3D 2B A5 F4
;
;  The data is sent at 250 bits/sec with no start or stop bits added;
;  they are already there.  Data is sent MSB-first.
;
;  Note that the 6-byte data string is functionally equivalent to the
;  4-byte ASCII version once a bit of equation balancing is done.
;
;     --Crow  21-FEB-97
;

The problem is, all the sources I have found for the mod chips are in ASM, which I am still learning.
And are for old 6-pin pics (PIC12c508) And the PIC im working with is PIC16F684 because I have TONS of them lying around for various other projects.

Anyways, I followed this wiring guide and got a bunch of leads I can mess with:
IPB Image

Based off the docs I found online, and the simulations I've ran with the old code, I produced this code:
CODE
#include <htc.h>
#include "helper.h"

__CONFIG(WDTDIS & MCLRDIS);

#define DATA_INJECT TRISC0
#define DATA_BLOCK TRISC1

#ifndef _XTAL_FREQ
// This definition is required to calibrate __delay_us() and __delay_ms()
#define _XTAL_FREQ 8000000
#endif
signed char x;
void send_byte(unsigned char data);
void send_same(){
    DATA_INJECT = LOW;
    __delay_ms(56);
    send_byte(0x09);
    send_byte(0xA9);
    send_byte(0x3D);
    send_byte(0x2B);
    send_byte(0xA5);
    //0x09,0xA9,0x3D,0x2B,0xA5,0xF4  ;U.S./NTSC
    //0x09,0xA9,0x3D,0x2B,0xA5,0x74  ;European/PAL    
    //0x09,0xA9,0x3D,0x2B,0xA5,0xB4  ;Japanese/NTSC
}
void main(){
  bits_on(OSCCON, 0b01110000);
  /*********************************
   * Step 1: 50ms set Data pin low
   *********************************/
  __delay_ms(50);
  DATA_INJECT = LOW;

  /**********************************
   * Step 2: 850ms set Block pin low
   **********************************/
  for(x = 0; x < 17; x++)
      __delay_ms(50);
  DATA_BLOCK = LOW;
  DATA_INJECT = HIGH;

  /**********************************
   * Step 3: Wait 314ms
   **********************************/
  for(x = 0; x < 6; x++)
      __delay_ms(50);
  __delay_ms(14);
  
  /**********************************
   * Step 4: Spam away!
   **********************************/
  DATA_INJECT = OUTPUT;
  send_same(); send_byte(0xF4); //0xF4  ;U.S./NTSC
  send_same(); send_byte(0xB4); //0xB4  ;Japanese/NTSC
  send_same(); send_byte(0x74); //0x74  ;European/PAL
  DATA_INJECT = HIGH;
  DATA_BLOCK = HIGH;
  
}

void send_byte(unsigned char data){
  char x;
  for(x = 8; x > 0; x--){
    if((data & (1 << (x-1))) != 0){
      //DATA_INJECT = HIGH;
      RC0 = HIGH;
    }else{
      //DATA_INJECT = LOW;
      RC0 = LOW;
    }  
    DATA_BLOCK = LOW; //Just to make sure
    __delay_ms(4);
  }
}

Which produces the following serial data:
IPB Image
Which if you read, is perfect.. but thats in simulations.
When I actually wire it up, I get nothing.
Well, I get a 'Please Insert a Playstation™ CD-ROM" when I put a burnt game, and originals boot just fine.
I have it wired up like below, but I can change it however I need because this is just a dev setup.
VDD -> 1
VSS -> 8
C0 -> 5
C1 -> 6

Note: DO NOT tell me to just buy one, or use a swap trick. If I wanted to I would. But I think its fun to try and make this. Just.. starting to get frustrated...




Logged

gman060692

  • Guest
Psx Mod Chip
« Reply #1 on: June 16, 2010, 07:02:06 PM »


I modded my ps1 just last week with a PIC 12F629. I don't know if I can post the hex here so pm me if you want some more info. I also have the source code if you want to adapt it.




Edited by gman060692, 17 June 2010 - 03:05 AM.


Logged

jinn

  • Guest
Psx Mod Chip
« Reply #2 on: June 20, 2010, 06:53:16 PM »


I modded my ps1 just last week with a PIC 12F629. I don't know if I can post the hex here so pm me if you want some more info. I also have the source code if you want to adapt it.


I think you are using the hex from garyopa one of the members here.
Did you mod a psx or psone?
Can you play games that have anti-mod protection?





Logged

gman060692

  • Guest
Psx Mod Chip
« Reply #3 on: June 22, 2010, 09:18:43 AM »


it was a psx scph7502 and yes I did use garyopa's code. I don't believe it works with anti-mod games unless they're patched. Although I've only tried spyro the dragon and crash bandicoot.




Logged
 

Page created in 3.586 seconds with 15 queries.