From e08689cbbe03ea57e0a65cbbaed9ed706324763f Mon Sep 17 00:00:00 2001 From: sanni Date: Thu, 1 Jun 2017 08:54:21 +0200 Subject: [PATCH] V25A: Update to newest versions of the libraries --- Cart_Reader/Cart_Reader.ino | 12 +++--------- Cart_Reader/NP.ino | 10 ++++------ Cart_Reader/SNES.ino | 10 ++++------ 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index 0b81d3f..fa5bac2 100644 --- a/Cart_Reader/Cart_Reader.ino +++ b/Cart_Reader/Cart_Reader.ino @@ -2,8 +2,8 @@ Cartridge Reader for Arduino Mega2560 Author: sanni - Date: 2017-05-30 - Version: V25 + Date: 2017-06-01 + Version: V25A SD lib: https://github.com/greiman/SdFat LCD lib: https://github.com/adafruit/Adafruit_SSD1306 @@ -34,7 +34,7 @@ YamaArashi - GBA flashrom bank switch command **********************************************************************************/ -char ver[5] = "V25"; +char ver[5] = "V25A"; /****************************************** Define Output @@ -105,7 +105,6 @@ typedef enum COLOR_T { // SD Card (Pin 50 = MISO, Pin 51 = MOSI, Pin 52 = SCK, Pin 53 = SS) #include -#include #define chipSelectPin 53 SdFat sd; SdFile myFile; @@ -572,11 +571,6 @@ void setup() { Serial.println(F("Cartridge Reader")); Serial.println(F("2017 sanni")); Serial.println(""); - - // Print available RAM - Serial.print(F("Free Ram: ")); - Serial.print(FreeRam()); - Serial.println(F("Bytes")); } // Init SD card diff --git a/Cart_Reader/NP.ino b/Cart_Reader/NP.ino index a596750..a6362a4 100644 --- a/Cart_Reader/NP.ino +++ b/Cart_Reader/NP.ino @@ -577,17 +577,15 @@ void setup_SFM() { DDRG &= ~(1 << 0); // Adafruit Clock Generator - //clockgen.set_correction(-29000); - clockgen.set_correction(0); - clockgen.init(SI5351_CRYSTAL_LOAD_8PF, 0); + clockgen.init(SI5351_CRYSTAL_LOAD_8PF, 0, 0); clockgen.set_pll(SI5351_PLL_FIXED, SI5351_PLLA); clockgen.set_pll(SI5351_PLL_FIXED, SI5351_PLLB); // Half Clock - //clockgen.set_freq(1073863600ULL, SI5351_PLL_FIXED, SI5351_CLK0); + //clockgen.set_freq(1073863600ULL, SI5351_CLK0); // Full Clock - clockgen.set_freq(2147727200ULL, SI5351_PLL_FIXED, SI5351_CLK0); + clockgen.set_freq(2147727200ULL, SI5351_CLK0); // CIC Clock - //clockgen.set_freq(307200000ULL, SI5351_PLL_FIXED, SI5351_CLK2); + //clockgen.set_freq(307200000ULL, SI5351_CLK2); clockgen.output_enable(SI5351_CLK0, 1); clockgen.output_enable(SI5351_CLK1, 0); clockgen.output_enable(SI5351_CLK2, 0); diff --git a/Cart_Reader/SNES.ino b/Cart_Reader/SNES.ino index ceb26d3..bba6a56 100644 --- a/Cart_Reader/SNES.ino +++ b/Cart_Reader/SNES.ino @@ -213,13 +213,11 @@ void setup_Snes() { DDRG &= ~(1 << 0); // Adafruit Clock Generator - //clockgen.set_correction(-29000); - clockgen.set_correction(0); - clockgen.init(SI5351_CRYSTAL_LOAD_8PF, 0); + clockgen.init(SI5351_CRYSTAL_LOAD_8PF, 0, 0); clockgen.set_pll(SI5351_PLL_FIXED, SI5351_PLLA); clockgen.set_pll(SI5351_PLL_FIXED, SI5351_PLLB); - clockgen.set_freq(2147727200ULL, SI5351_PLL_FIXED, SI5351_CLK0); - clockgen.set_freq(307200000ULL, SI5351_PLL_FIXED, SI5351_CLK2); + clockgen.set_freq(2147727200ULL, SI5351_CLK0); + clockgen.set_freq(307200000ULL, SI5351_CLK2); clockgen.output_enable(SI5351_CLK0, 1); clockgen.output_enable(SI5351_CLK1, 0); clockgen.output_enable(SI5351_CLK2, 1); @@ -963,7 +961,7 @@ void writeSRAM (boolean browseFile) { long lastByte = (long(sramSize) * 0x80); // Enable CPU Clock - clockgen.set_freq(357954500ULL, SI5351_PLL_FIXED, SI5351_CLK1); + clockgen.set_freq(357954500ULL, SI5351_CLK1); clockgen.output_enable(SI5351_CLK1, 1); // Direct writes to BW-RAM (SRAM) in banks 0x40-0x43 don't work