From 8ee43f1bd29d8d32dd9caa0a09d81189239c08fb Mon Sep 17 00:00:00 2001 From: risk510 <52795698+risk510@users.noreply.github.com> Date: Fri, 3 Jan 2020 18:09:42 -0800 Subject: [PATCH 1/9] Update PiPROM.c --- PiPROM.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PiPROM.c b/PiPROM.c index 615f3fd..ae1e462 100644 --- a/PiPROM.c +++ b/PiPROM.c @@ -15,6 +15,8 @@ #include #include #include "XboxI2C.h" +#include +#include #define MODE_READ 1 #define MODE_WRITE 2 From 8a6fe7081b3500078923573b7ffd92dc16654632 Mon Sep 17 00:00:00 2001 From: risk510 <52795698+risk510@users.noreply.github.com> Date: Fri, 3 Jan 2020 18:11:41 -0800 Subject: [PATCH 2/9] Update makefile --- makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index ace4f03..1acd4cd 100644 --- a/makefile +++ b/makefile @@ -26,8 +26,9 @@ PiPROM.a: $(OBJ) p1: CFLAGS+= -DRASPI_1 p1b: CFLAGS+= -DRASPI_BPLUS p2: CFLAGS+= -DRASPI_2 +p3: CFLAGS+= -DRASPI_2 -p1 p1b p2: PiPROM.a +p1 p1b p2 p3: PiPROM.a clean: rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~ From f94ff62d7355d64c9bef7d6f2fc9d416c6616316 Mon Sep 17 00:00:00 2001 From: risk510 <52795698+risk510@users.noreply.github.com> Date: Fri, 3 Jan 2020 18:14:24 -0800 Subject: [PATCH 3/9] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b70186..0de79f4 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,12 @@ sudo make install ``` Next we are going to download the latest source for PiPROM and compile it. Run the following commands which will move you back into the PiPROM folder and download the latest source code for it. + + *The following added to reflect this fork 1/3/2020* + ``` cd .. - git clone https://github.com/grimdoomer/PiPROM.git + git clone https://github.com/risk510/PiPROM.git cd ./PiPROM ``` From 519353bb8c41e503804e0403802ed5e73e92975a Mon Sep 17 00:00:00 2001 From: risk510 <52795698+risk510@users.noreply.github.com> Date: Fri, 3 Jan 2020 18:16:32 -0800 Subject: [PATCH 4/9] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0de79f4..b0f3061 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ sudo make install v1 | ```make p1``` v1 B+ | ```make p1b``` v2 B | ```make p2``` + v3 B | ```make p3``` If everything went smoothly you should see no compiler errors in the output. To check run the ```ls``` command, and there should be a file called "PiPROM.a" in the current folder. If PiPROM.a exists then you successfully compiled PiPROM, if it doesn't then I guess I messed up somewhere... You can send me an email and I can try to see where things went wrong for you. From 73434efec133f5b2cac546d8f3d00e2812b6ad60 Mon Sep 17 00:00:00 2001 From: risk510 <52795698+risk510@users.noreply.github.com> Date: Fri, 3 Jan 2020 18:29:40 -0800 Subject: [PATCH 5/9] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index b0f3061..5bd1572 100644 --- a/README.md +++ b/README.md @@ -54,11 +54,9 @@ sudo make install Next we are going to download the latest source for PiPROM and compile it. Run the following commands which will move you back into the PiPROM folder and download the latest source code for it. - *The following added to reflect this fork 1/3/2020* - ``` cd .. - git clone https://github.com/risk510/PiPROM.git + git clone https://github.com/grimdoomer/PiPROM.git cd ./PiPROM ``` From 3faba8e087df5d4b45524990928b1bad384c167b Mon Sep 17 00:00:00 2001 From: risk510 <52795698+risk510@users.noreply.github.com> Date: Fri, 10 Jan 2020 19:48:17 -0800 Subject: [PATCH 6/9] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 5bd1572..8da2f98 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,14 @@ sudo make install Next we are going to download the latest source for PiPROM and compile it. Run the following commands which will move you back into the PiPROM folder and download the latest source code for it. + ``` + I added my own line into this. Use mine until the original OP fixes/merges my changes. + cd .. + git clone https://github.com/risk510/PiPROM.git + cd ./PiPROM + ``` + + (Dont follow this unless OP merges my changes) ``` cd .. git clone https://github.com/grimdoomer/PiPROM.git From 70d18a6dd7b9e9f0e711ab4ee4f5183dd652957b Mon Sep 17 00:00:00 2001 From: risk510 <52795698+risk510@users.noreply.github.com> Date: Fri, 10 Jan 2020 19:50:54 -0800 Subject: [PATCH 7/9] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8da2f98..6141a37 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,10 @@ sudo make install ``` Next we are going to download the latest source for PiPROM and compile it. Run the following commands which will move you back into the PiPROM folder and download the latest source code for it. - + +I added my own line into this. Use mine until the original OP fixes/merges my changes. + ``` - I added my own line into this. Use mine until the original OP fixes/merges my changes. cd .. git clone https://github.com/risk510/PiPROM.git cd ./PiPROM From 35b757d3b17198842143e22c631f93152bec7053 Mon Sep 17 00:00:00 2001 From: Isaiah Love Date: Mon, 27 Dec 2021 11:01:43 -0500 Subject: [PATCH 8/9] update instructions for use with rpi4 and 1.6 note: you may also have to bridge 9 and 15 to use ground, if you need me to verify i can (its not in here just making a note in the additional details section) the pinout for 1.6 is the same however the window for messing with the eeprom is basically non-existant --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6141a37..4f92b77 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ PiPROM allows your Raspberry Pi to interface with I2C based xbox EEPROM chips. Y You will need to connect the two I2C pins on your Raspberry Pi to the I2C pins on your xbox/I2C chip, as well as a ground wire between the two. The ground wire is very important! It acts as a reference line for the Pi to tell when a GPIO is high or low. If your Pi doesn't have the same ground reference as your xbox your results may be sporatic. The wiring chart below outlines the connections you need to make to connect your Pi to an xbox console. The numbers refer to the RAW pin numbers on the Pi, and the LPC pins on an xbox motherboard. Note that the pins are the same on all versions of the Raspberry Pi (V1, B+, V2). - Pin | Pi | Xbox v1.0 - 1.5 + Pin | Pi | Xbox v1.0 - 1.6 --- | --- | --- SDA | 3 | 14 SCL | 5 | 13 @@ -25,12 +25,15 @@ GND | 6 | 2 sudo apt-get install python-smbus sudo apt-get install i2c-tools ``` - Once the tools are installed you will need to power up your xbox console or EEPROM chip, yes, the console needs to physically be turned on. Don't worry, as long as you're not doing anything on your console at the same time that PiPROM is reading/writing to the xbox EEPROM it won't harm anything. If your xbox console frags at boot, or throws a system error, you will only have ~3 minutes to work before it will auto power off. This will be plenty of time for PiPROM to read/write the EEPROM chip. + Once the tools are installed you will need to power up your xbox console or EEPROM chip, yes, the console needs to physically be turned on. Don't worry, as long as you're not doing anything on your console at the same time that PiPROM is reading/writing to the xbox EEPROM it won't harm anything. If your xbox console frags at boot, or throws a system error, you will only have ~3 minutes to work before it will auto power off. This will be plenty of time for PiPROM to read/write the EEPROM chip. Unless you are using a 1.6 version motherboard then the timing is extremely reduced. From a command line on the Pi run `sudo i2cdetect -y 1` and you should see something similar to the following (output taken from my Pi connected to an xbox console): - ![alt text](/images/i2c_xbox.png?raw=true) + Note: on a 1.6 console alot of this will not be available however enough to mess with the eeprom will be you will also only be able to mess with the console with a timing window of "you press power button and enter at basically the same time" give or take + ![alt text](/images/i2c_xbox.png?raw=true) + + The EEPROM on the xbox console is located at address 0x54, but PiPROM already knows this! If your Pi is connected to your xbox console and you don't see output from i2cdetect that looks like the image above then something is wrong. Check your wires, and make sure you have a ground wire between your Pi and xbox console. If your Pi is connected directly to an I2C EEPROM chip you should only see one address listed in the output from i2cdetect. This is the I2C address you will later plug into PiPROM to override the default I2C address of the xbox EEPROM. @@ -41,7 +44,7 @@ GND | 6 | 2 cd ./PiPROM ``` - Next we will setup bcm2835, a C library for the broadcom processor the Raspberry Pi uses. It is what PiPROM is built on and you will need to it compile PiPROM. Run the following commands to download and install bcm2835 v1.42. If you run into trouble please refer to the [bcm2835 website](http://www.airspayce.com/mikem/bcm2835/index.html). + Next we will setup bcm2835, a C library for the broadcom processor the Raspberry Pi uses. It is what PiPROM is built on and you will need to it compile PiPROM. If you have a Raspberry Pi 4 please use the second set of instructions instead. Run the following commands to download and install bcm2835 v1.42. If you run into trouble please refer to the [bcm2835 website](http://www.airspayce.com/mikem/bcm2835/index.html). ``` wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.42.tar.gz tar zxvf bcm2835-1.42.tar.gz @@ -51,7 +54,17 @@ make sudo make check sudo make install ``` - + +For Raspberry Pi 4 +``` +wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.62.tar.gz +tar zxvf bcm2835-1.62.tar.gz +cd bcm2835-1.62 +make +sudo make check +sudo make install +``` + Next we are going to download the latest source for PiPROM and compile it. Run the following commands which will move you back into the PiPROM folder and download the latest source code for it. I added my own line into this. Use mine until the original OP fixes/merges my changes. @@ -77,6 +90,7 @@ I added my own line into this. Use mine until the original OP fixes/merges my ch v1 B+ | ```make p1b``` v2 B | ```make p2``` v3 B | ```make p3``` + v4 | ```make p3``` If everything went smoothly you should see no compiler errors in the output. To check run the ```ls``` command, and there should be a file called "PiPROM.a" in the current folder. If PiPROM.a exists then you successfully compiled PiPROM, if it doesn't then I guess I messed up somewhere... You can send me an email and I can try to see where things went wrong for you. From 05208bbbaba605f89df3b510e360d69514407390 Mon Sep 17 00:00:00 2001 From: Isaiah Love Date: Mon, 27 Dec 2021 11:14:40 -0500 Subject: [PATCH 9/9] update instructions for use with rpi4 and 1.6 --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4f92b77..ab16dea 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ PiPROM allows your Raspberry Pi to interface with I2C based xbox EEPROM chips. Y ### Getting Started 1. The first step in getting PiPROM running is to enable the I2C interface on your Raspberry Pi. Adafruit has a very nice [tutorial](https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c) on how to do this. -2. Once you have the I2C interface up and running on your Raspberry Pi it's time to get it connected to your xbox console. For xbox versions 1.0 - 1.5 it will require 3 wires to be soldered to the LPC port on your xbox motherboard, for version 1.6 it will require a few more connections that are a bit tricky. +2. Once you have the I2C interface up and running on your Raspberry Pi it's time to get it connected to your xbox console. For xbox versions 1.0 - 1.6 it will require 3 wires to be soldered to the LPC port on your xbox motherboard. - You will need to connect the two I2C pins on your Raspberry Pi to the I2C pins on your xbox/I2C chip, as well as a ground wire between the two. The ground wire is very important! It acts as a reference line for the Pi to tell when a GPIO is high or low. If your Pi doesn't have the same ground reference as your xbox your results may be sporatic. The wiring chart below outlines the connections you need to make to connect your Pi to an xbox console. The numbers refer to the RAW pin numbers on the Pi, and the LPC pins on an xbox motherboard. Note that the pins are the same on all versions of the Raspberry Pi (V1, B+, V2). + You will need to connect the two I2C pins on your Raspberry Pi to the I2C pins on your xbox/I2C chip, as well as a ground wire between the two. The ground wire is very important! It acts as a reference line for the Pi to tell when a GPIO is high or low. If your Pi doesn't have the same ground reference as your xbox your results may be sporatic. The wiring chart below outlines the connections you need to make to connect your Pi to an xbox console. The numbers refer to the RAW pin numbers on the Pi, and the LPC pins on an xbox motherboard. Note that the pins are the same on all versions of the Raspberry Pi (V1, B+, V2, V3, V4). Pin | Pi | Xbox v1.0 - 1.6 --- | --- | --- @@ -60,6 +60,7 @@ For Raspberry Pi 4 wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.62.tar.gz tar zxvf bcm2835-1.62.tar.gz cd bcm2835-1.62 +./configure make sudo make check sudo make install