orangeglo / PS2PSP

Board to connect a PS2 controller to a PSP 2000 (PSP Consolizer)
GNU General Public License v3.0
34 stars 2 forks source link

error compiling #2

Closed davidxgames closed 1 year ago

davidxgames commented 1 year ago

Thanks for sharing, I have some doubts, I am compiling with arduino ide, but it gives me an error for PS2X_lib.h, my question is where can I get that library?

epbarger commented 1 year ago

Hi, you need to install https://github.com/madsci1016/Arduino-PS2X into your arduino library

davidxgames commented 1 year ago

Thanks for answering, I already installed the library, but I have this error: "DDRE was not declared in this scope". Should I compile with some version of arduino ide?

EDIT: if i compile for arduino mega it compiles without errors.

epbarger commented 1 year ago

Yeah you need to make sure you're compiling for the 328PB, which has Port E. I recommend installing the MiniCore hardware package, it makes working with the bare chips much easier :)

epbarger commented 1 year ago

You'd select 328PB, internal 8mhz clock

davidxgames commented 1 year ago

so the mega328pu doesn't work in this project?

thanks for the help installing the MiniCore

epbarger commented 1 year ago

Assuming you mean the 328P-PU, that won't work with this code because the P variant doesn't have port E with the extra 4 inputs that the 328PB has. I haven't looked at this code in a while, but you may be able to modify it to get away with using a 328P by removing some features.

epbarger commented 1 year ago

PU is a manufacturing code btw, the only real variants I'm aware of are 328, 328P, and 328PB

davidxgames commented 1 year ago

Yes, I'm using an arduino nano that has ATMEGA328pu, I'll look for a separate MEGA328pb.

epbarger commented 1 year ago

It looks like the trigger for the HOME button is the only thing the code uses Port E for. If you're using an arduino nano you can probably change the code to move that to a different port yourself

davidxgames commented 1 year ago

Parece que el activador del botón INICIO es lo único para lo que el código usa el Puerto E. Si está utilizando un arduino nano, probablemente pueda cambiar el código para moverlo a un puerto diferente usted mismo

I'll try it, I'll post the results later.

EDIT: if I remove the E port, it compiles with no problem.

davidxgames commented 1 year ago

From what I checked, if I want to use the 328pu I will have to modify all the pins in the code, since the 328pb and the 329pu have a different pinout.

davidxgames commented 1 year ago

I think there is an error in the following:

define PS2_DAT 23

define PS2_CMD 4

define PS2_SEL 3

define PS2_CLK 2

pin 23 in the schematic goes to pin 4 of the center ribbon pin 4 goes to vcc

Sorry if I'm wrong, I'm a noob.

epbarger commented 1 year ago

Ah looks like I used Port E for the PS2_DAT, you'll need to change that too. The code was really written for the specific circuit board so some stuff will need to be adjusted to use with a regular arduino board

328PB https://europe1.discourse-cdn.com/arduino/optimized/4X/b/3/6/b362b3222b11ae632320538b09123c47c4fc6d32_2_428x500.jpeg

328P https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fpreview.redd.it%2Fbggdd9srui351.png%3Fauto%3Dwebp%26s%3D921ec4b761b0465685a39ff3ee45230ead62f877&f=1&nofb=1&ipt=702da2eba28fe79992f85c9a415ed4808fa3e7f37ff36d3c74e41ace69cc2e02&ipo=images

davidxgames commented 1 year ago

Ah, parece que usé el puerto E para PS2_DAT, también tendrás que cambiar eso. El código se escribió realmente para la placa de circuito específica, por lo que será necesario ajustar algunas cosas para usarlas con una placa arduino normal.

328 PB

328P https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fpreview.redd.it%2Fbggdd9srui351.png%3Fauto%3Dwebp%26s%3D921ec4b761b0465685a39ff3ee45230ead62f877&f=1&nofb=1&ipt=702da2eba28fe79992f85c9a415ed4808fa3e7f37ff36d3c74e41ace69cc2e02&ipo=images

In the end I used an esp32 and it worked fine, you have to modify the PS2X library to make it work on esp32.

epbarger commented 1 year ago

That's great, I'm glad you got it working!

Bma36 commented 1 year ago

can you share a tutorial on how you used esp32?