SpankyToot / PSXTAL-L

Lightened version of VajSkids/L10N37's PSXTAL project
1 stars 0 forks source link

Hi :) #1

Open L10N37 opened 2 years ago

L10N37 commented 2 years ago

You only need to call the checkvideomode function which is just a separate function for code neatness, as it could be part of the loop function that is repeated over and over (this is typically called main() in C++ outside of Arduino, arduino call it loop)

You can delete the SPI stuff, which is for IGR :)

void loop() {

checkvideomode();

}

I am also amateur, but learned enough during covid lock-downs to put together some cool projects :) Will post that PCB/XTAL this arvo.

L10N37 commented 2 years ago

Also see in brackets .

include (you won't need this library included)

define sensepin 2 // PIN 2 NOW DETECTS REGION OF GAME FOR VIDEOMODE

define NTSCpin 15 // NTSC XTAL pin to PSXTAL PCB (A1)

define PALpin 16 // PAL XTAL pin to PSXTAL PCB (A2)

volatile byte buffer = 0x00; (you won't need this, this is just storage space for combo keys for IGR, it's initialised as zero, thats just hex, equivalent is a plain zero) int counter = 0; String NTSC_MODE = "LAUNCH";

SpankyToot commented 2 years ago

That means I should be able to also remove this?

SPCR = 0xCB; // SPI setup, 250khz, MSB (as slave), clock idle high, read on rising edge, SPI / SPI interrupts on, delay (500); //Serial.print("Combo Received from Controller: "); // dev stuff //Serial.println(buffer, BIN); digitalWrite (SPE, 0); // disable SPI