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:

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:

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