mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-13 08:25:05 +01:00
V25A: Update to newest versions of the libraries
This commit is contained in:
parent
4efd789cbb
commit
e08689cbbe
@ -2,8 +2,8 @@
|
|||||||
Cartridge Reader for Arduino Mega2560
|
Cartridge Reader for Arduino Mega2560
|
||||||
|
|
||||||
Author: sanni
|
Author: sanni
|
||||||
Date: 2017-05-30
|
Date: 2017-06-01
|
||||||
Version: V25
|
Version: V25A
|
||||||
|
|
||||||
SD lib: https://github.com/greiman/SdFat
|
SD lib: https://github.com/greiman/SdFat
|
||||||
LCD lib: https://github.com/adafruit/Adafruit_SSD1306
|
LCD lib: https://github.com/adafruit/Adafruit_SSD1306
|
||||||
@ -34,7 +34,7 @@
|
|||||||
YamaArashi - GBA flashrom bank switch command
|
YamaArashi - GBA flashrom bank switch command
|
||||||
|
|
||||||
**********************************************************************************/
|
**********************************************************************************/
|
||||||
char ver[5] = "V25";
|
char ver[5] = "V25A";
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Define Output
|
Define Output
|
||||||
@ -105,7 +105,6 @@ typedef enum COLOR_T {
|
|||||||
|
|
||||||
// SD Card (Pin 50 = MISO, Pin 51 = MOSI, Pin 52 = SCK, Pin 53 = SS)
|
// SD Card (Pin 50 = MISO, Pin 51 = MOSI, Pin 52 = SCK, Pin 53 = SS)
|
||||||
#include <SdFat.h>
|
#include <SdFat.h>
|
||||||
#include <SdFatUtil.h>
|
|
||||||
#define chipSelectPin 53
|
#define chipSelectPin 53
|
||||||
SdFat sd;
|
SdFat sd;
|
||||||
SdFile myFile;
|
SdFile myFile;
|
||||||
@ -572,11 +571,6 @@ void setup() {
|
|||||||
Serial.println(F("Cartridge Reader"));
|
Serial.println(F("Cartridge Reader"));
|
||||||
Serial.println(F("2017 sanni"));
|
Serial.println(F("2017 sanni"));
|
||||||
Serial.println("");
|
Serial.println("");
|
||||||
|
|
||||||
// Print available RAM
|
|
||||||
Serial.print(F("Free Ram: "));
|
|
||||||
Serial.print(FreeRam());
|
|
||||||
Serial.println(F("Bytes"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init SD card
|
// Init SD card
|
||||||
|
@ -577,17 +577,15 @@ void setup_SFM() {
|
|||||||
DDRG &= ~(1 << 0);
|
DDRG &= ~(1 << 0);
|
||||||
|
|
||||||
// Adafruit Clock Generator
|
// Adafruit Clock Generator
|
||||||
//clockgen.set_correction(-29000);
|
clockgen.init(SI5351_CRYSTAL_LOAD_8PF, 0, 0);
|
||||||
clockgen.set_correction(0);
|
|
||||||
clockgen.init(SI5351_CRYSTAL_LOAD_8PF, 0);
|
|
||||||
clockgen.set_pll(SI5351_PLL_FIXED, SI5351_PLLA);
|
clockgen.set_pll(SI5351_PLL_FIXED, SI5351_PLLA);
|
||||||
clockgen.set_pll(SI5351_PLL_FIXED, SI5351_PLLB);
|
clockgen.set_pll(SI5351_PLL_FIXED, SI5351_PLLB);
|
||||||
// Half Clock
|
// Half Clock
|
||||||
//clockgen.set_freq(1073863600ULL, SI5351_PLL_FIXED, SI5351_CLK0);
|
//clockgen.set_freq(1073863600ULL, SI5351_CLK0);
|
||||||
// Full Clock
|
// Full Clock
|
||||||
clockgen.set_freq(2147727200ULL, SI5351_PLL_FIXED, SI5351_CLK0);
|
clockgen.set_freq(2147727200ULL, SI5351_CLK0);
|
||||||
// CIC Clock
|
// 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_CLK0, 1);
|
||||||
clockgen.output_enable(SI5351_CLK1, 0);
|
clockgen.output_enable(SI5351_CLK1, 0);
|
||||||
clockgen.output_enable(SI5351_CLK2, 0);
|
clockgen.output_enable(SI5351_CLK2, 0);
|
||||||
|
@ -213,13 +213,11 @@ void setup_Snes() {
|
|||||||
DDRG &= ~(1 << 0);
|
DDRG &= ~(1 << 0);
|
||||||
|
|
||||||
// Adafruit Clock Generator
|
// Adafruit Clock Generator
|
||||||
//clockgen.set_correction(-29000);
|
clockgen.init(SI5351_CRYSTAL_LOAD_8PF, 0, 0);
|
||||||
clockgen.set_correction(0);
|
|
||||||
clockgen.init(SI5351_CRYSTAL_LOAD_8PF, 0);
|
|
||||||
clockgen.set_pll(SI5351_PLL_FIXED, SI5351_PLLA);
|
clockgen.set_pll(SI5351_PLL_FIXED, SI5351_PLLA);
|
||||||
clockgen.set_pll(SI5351_PLL_FIXED, SI5351_PLLB);
|
clockgen.set_pll(SI5351_PLL_FIXED, SI5351_PLLB);
|
||||||
clockgen.set_freq(2147727200ULL, SI5351_PLL_FIXED, SI5351_CLK0);
|
clockgen.set_freq(2147727200ULL, SI5351_CLK0);
|
||||||
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_CLK0, 1);
|
||||||
clockgen.output_enable(SI5351_CLK1, 0);
|
clockgen.output_enable(SI5351_CLK1, 0);
|
||||||
clockgen.output_enable(SI5351_CLK2, 1);
|
clockgen.output_enable(SI5351_CLK2, 1);
|
||||||
@ -963,7 +961,7 @@ void writeSRAM (boolean browseFile) {
|
|||||||
long lastByte = (long(sramSize) * 0x80);
|
long lastByte = (long(sramSize) * 0x80);
|
||||||
|
|
||||||
// Enable CPU Clock
|
// Enable CPU Clock
|
||||||
clockgen.set_freq(357954500ULL, SI5351_PLL_FIXED, SI5351_CLK1);
|
clockgen.set_freq(357954500ULL, SI5351_CLK1);
|
||||||
clockgen.output_enable(SI5351_CLK1, 1);
|
clockgen.output_enable(SI5351_CLK1, 1);
|
||||||
|
|
||||||
// Direct writes to BW-RAM (SRAM) in banks 0x40-0x43 don't work
|
// Direct writes to BW-RAM (SRAM) in banks 0x40-0x43 don't work
|
||||||
|
Loading…
Reference in New Issue
Block a user