mirror of
https://github.com/sanni/cartreader.git
synced 2024-12-18 00:51:49 +01:00
V2.8: Fix GBA Sram issue
Thanks to Cyber_Akuma
This commit is contained in:
parent
9f3d408fc1
commit
94a0d9ed1d
@ -2,8 +2,8 @@
|
|||||||
Cartridge Reader for Arduino Mega2560
|
Cartridge Reader for Arduino Mega2560
|
||||||
|
|
||||||
Author: sanni
|
Author: sanni
|
||||||
Date: 31-01-2019
|
Date: 18-02-2019
|
||||||
Version: 2.7
|
Version: 2.8
|
||||||
|
|
||||||
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
|
||||||
@ -37,7 +37,7 @@
|
|||||||
vogelfreiheit - N64 flashram fix
|
vogelfreiheit - N64 flashram fix
|
||||||
|
|
||||||
**********************************************************************************/
|
**********************************************************************************/
|
||||||
char ver[5] = "2.7";
|
char ver[5] = "2.8";
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Define Starting Point
|
Define Starting Point
|
||||||
|
@ -547,21 +547,21 @@ void setup_GBA() {
|
|||||||
Low level functions
|
Low level functions
|
||||||
*****************************************/
|
*****************************************/
|
||||||
void setROM_GBA() {
|
void setROM_GBA() {
|
||||||
// Set address/data pins to OUTPUT
|
// CS_SRAM(PH0)
|
||||||
|
DDRH |= (1 << 0); PORTH |= (1 << 0);
|
||||||
|
// CS_ROM(PH3)
|
||||||
|
DDRH |= (1 << 3); PORTH |= (1 << 3);
|
||||||
|
// WR(PH5)
|
||||||
|
DDRH |= (1 << 5); PORTH |= (1 << 5);
|
||||||
|
// RD(PH6)
|
||||||
|
DDRH |= (1 << 6); PORTH |= (1 << 6);
|
||||||
// AD0-AD7
|
// AD0-AD7
|
||||||
DDRF = 0xFF;
|
DDRF = 0xFF;
|
||||||
// AD8-AD15
|
// AD8-AD15
|
||||||
DDRK = 0xFF;
|
DDRK = 0xFF;
|
||||||
// AD16-AD23
|
// AD16-AD23
|
||||||
DDRC = 0xFF;
|
DDRC = 0xFF;
|
||||||
|
// Wait
|
||||||
// Set Control Pins to Output CS_SRAM(PH0) CS_ROM(PH3) WR(PH5) RD(PH6)
|
|
||||||
// CLK is N/C and IRQ is conected to GND inside the cartridge
|
|
||||||
DDRH |= (1 << 0) | (1 << 3) | (1 << 5) | (1 << 6);
|
|
||||||
// Output a high signal on CS_SRAM(PH0) CS_ROM(PH3) WR(PH5) RD(PH6)
|
|
||||||
// At power-on all the control lines are high/disabled
|
|
||||||
PORTH |= (1 << 0) | (1 << 3) | (1 << 5) | (1 << 6);
|
|
||||||
|
|
||||||
delay(500);
|
delay(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user