Upload Files

More info:
Also added Pocket SNES PCB by Niltonn
https://forum.arduino.cc/index.php?topic=158974.msg4381465#msg4381465
This commit is contained in:
sanni 2019-11-27 09:54:48 +01:00
parent b856459fee
commit b24f4c0b01
51 changed files with 241 additions and 234 deletions

View File

@ -2,15 +2,15 @@
Cartridge Reader for Arduino Mega2560
Author: sanni
Date: 12.11.2019
Version: 4.1
Date: 27.11.2019
Version: 4.2
SD lib: https://github.com/greiman/SdFat
LCD lib: https://github.com/adafruit/Adafruit_SSD1306
Clockgen: https://github.com/etherkit/Si5351Arduino
RGB Tools lib: https://github.com/joushx/Arduino-RGB-Tools
Compiled with Arduino 1.8.9 and Arduino AVR Boards Version 1.6.21
Compiled with Arduino 1.8.10
Thanks to:
MichlK - ROM-Reader for Super Nintendo
@ -43,7 +43,7 @@
**********************************************************************************/
#include <SdFat.h>
char ver[5] = "4.1";
char ver[5] = "4.2";
/******************************************
Options

View File

@ -2705,7 +2705,7 @@ void writeRAM() {
case 0: // 2K/4K
for (word address = 0x0; address < (0x800 * ramsize); address += 512) { // 2K/4K
sdFile.read(sdBuffer, 512);
for (int x = 0; x < 512; x++){
for (int x = 0; x < 512; x++) {
write_prg_byte(base + address + x, sdBuffer[x]); // SWITCH MUST BE IN OFF POSITION
}
}
@ -2737,7 +2737,7 @@ void writeRAM() {
write_prg_byte(0xA001, 0x30); // PRG RAM PROTECT - Enable reading/writing to RAM at $7000-$71FF
for (word address = 0x1000; address < 0x1200; address += 512) { // 512B
sdFile.read(sdBuffer, 512);
for (int x = 0; x < 512; x++){
for (int x = 0; x < 512; x++) {
write_wram_byte(base + address + x, sdBuffer[x]);
}
}
@ -2745,7 +2745,7 @@ void writeRAM() {
write_prg_byte(0xA001, 0xC0); // PRG RAM PROTECT - Enable reading/writing to RAM at $7200-$73FF
for (word address = 0x1200; address < 0x1400; address += 512) { // 512B
sdFile.read(sdBuffer, 512);
for (int x = 0; x < 512; x++){
for (int x = 0; x < 512; x++) {
write_wram_byte(base + address + x, sdBuffer[x]);
}
}
@ -2755,7 +2755,7 @@ void writeRAM() {
write_prg_byte(0xA001, 0x80); // PRG RAM CHIP ENABLE - Chip Enable, Allow Writes
for (word address = 0; address < 0x2000; address += 512) { // 8K
sdFile.read(sdBuffer, 512);
for (int x = 0; x < 512; x++){
for (int x = 0; x < 512; x++) {
write_prg_byte(base + address + x, sdBuffer[x]);
}
}
@ -2821,7 +2821,7 @@ void writeRAM() {
write_ram_byte(0xF800, 0x40); // PRG RAM WRITE ENABLE
for (word address = 0; address < 0x2000; address += 512) { // 8K
sdFile.read(sdBuffer, 512);
for (int x = 0; x < 512; x++){
for (int x = 0; x < 512; x++) {
write_prg_byte(base + address + x, sdBuffer[x]);
}
}
@ -2834,7 +2834,7 @@ void writeRAM() {
write_prg_byte(0x7EF9, 0xA3); // PRG RAM ENABLE 1
for (word address = 0x1F00; address < 0x2000; address += 512) { // PRG RAM 1K ($7F00-$7FFF)
sdFile.read(sdBuffer, 128);
for (int x = 0; x < 128; x++){
for (int x = 0; x < 128; x++) {
write_prg_byte(base + address + x, sdBuffer[x]);
}
}
@ -3139,7 +3139,7 @@ void NESmaker_ID() { // Read Flash ID
write_prg_byte(0xAAAA, 0x55);
write_prg_byte(0xC000, 0x01);
write_prg_byte(0x9555, 0xF0); // Software ID Exit
if(strcmp(flashID, "BFB7") == 0) // SST 39SF040
if (strcmp(flashID, "BFB7") == 0) // SST 39SF040
flashfound = 1;
}

View File

@ -163,7 +163,7 @@ uint8_t getCartInfo_WS()
dataIn_WS();
for (uint32_t i = 0; i < 16; i += 2)
*((uint16_t*)(sdBuffer + i)) = readWord_WS(0xffff0 + i);
* ((uint16_t*)(sdBuffer + i)) = readWord_WS(0xffff0 + i);
wsGameChecksum = *(uint16_t*)(sdBuffer + 14);
wsWitch = false;
@ -431,7 +431,7 @@ void readROM_WS(char *outPathBuf, size_t bufferSize)
PORTB ^= (1 << 4);
for (uint32_t w = 0; w < 512; w += 2)
*((uint16_t*)(sdBuffer + w)) = readWord_WS(0x20000 + addr + w);
* ((uint16_t*)(sdBuffer + w)) = readWord_WS(0x20000 + addr + w);
myFile.write(sdBuffer, 512);
}
@ -772,7 +772,9 @@ void writeEEPROM_WS()
pulseCLK_WS(1 + 32 + 3);
dataIn_WS();
do { pulseCLK_WS(128); }
do {
pulseCLK_WS(128);
}
while ((readByte_WSPort(0xc8) & 0x02) == 0x00);
}
}

View File

@ -12,7 +12,8 @@ Be sure to check the guides in the [Wiki](https://github.com/sanni/cartreader/wi
- Easy to modify open-source code, write your own extensions and share them with others
#### Supported Systems:
- Reads NES and Famicom cartridges
- Reads NES, Famicom and Family Basic cartridges including save
- Supports Mapper 30/NESmaker and flashes INL NM30 boards
- Reads SNES roms and reads/writes save games from and to the SNES cartridge
Supported cartridge types so far: LoRom, HiRom, ExHiRom, SuperFX, SuperFX2, SDD1, CX4, SPC7110, SA1 (last two chips need Adafruit Clock Generator)
- Reads and writes SNES Satellaview 8M Memory packs

View File

@ -1,34 +1,3 @@
#### cartreader.zip is the main PCB, if you order it from [JLCPCB](https://jlcpcb.com/quote) you usually get a coupon displayed during the checkout for buying parts [from lcsc.com](https://github.com/sanni/cartreader/wiki/Needed-Parts). [Default settings](https://www.dropbox.com/s/06dnus50ikmsmya/pcb16.jpg?dl=0) are fine, just select the color you prefer and off you go. If this is your first order from JLCPCB you should only pay $2 for 5 PCBs.
![image](https://dl.dropboxusercontent.com/s/ta7pjoxn9kirtan/v17pcb.png?dl=1)
#### nes_adapter.zip is an add-on for reading NES carts, [PCB thickness needs to be changed to 1.2mm](https://dl.dropboxusercontent.com/s/va1c72073cqfy90/pcb12.jpg?dl=1), this is very important or else it won't fit into the SNES slot. You can order a 2.5mm 72pin NES slot [here](https://www.aliexpress.com/item/32827561164.html).
![image](https://dl.dropboxusercontent.com/s/z2atlcly642sewj/nes_adapter.png?dl=1)
#### famicom_adapter.zip is an add-on for reading Famicom carts, [PCB thickness needs to be changed to 1.2mm](https://dl.dropboxusercontent.com/s/va1c72073cqfy90/pcb12.jpg?dl=1), this is very important or else it won't fit into the SNES slot. You can order a 2.54mm 60pin Famicom slot [here](https://www.aliexpress.com/item/32827561249.html).
![image](https://dl.dropboxusercontent.com/s/w89ivzvuzk6hf5b/famicom_adapter.png?dl=1)
#### sms_adapter.zip is an add-on for reading Sega Master System carts. You can order a 2.54mm 50pin SMS slot [here](https://www.aliexpress.com/item/32818469880.html). The adapter is based on the [design by Raphnet](https://www.raphnet.net/electronique/sms_to_smd/index_en.php). For use with the Cart Reader ignore the SMD footprints on the PCB, the adapter does not need any components. I only bridged R5 to connect the reset line, although I'm not sure if this is even needed.
![image](https://dl.dropboxusercontent.com/s/r6lavgoaccjtrz7/sms_adapter.png?dl=1)
#### wonderswan_adapter.zip is an add-on for reading WonderSwan carts. [PCB thickness needs to be changed to 1.2mm](https://dl.dropboxusercontent.com/s/755249v8smcuoft/wonderswan_adapter.png?dl=1), this is very important or else it won't fit into the SNES slot. (Optional) Install C1 and C2 with 10uF/16v 1210 package tantalum capacitor.
![image](https://dl.dropboxusercontent.com/s/755249v8smcuoft/wonderswan_adapter.png?dl=1)
#### flash_adapter.zip is an add-on for writing flashroms like the 29F032, 29L3211, 29LV160, [PCB thickness needs to be changed to 1.2mm](https://dl.dropboxusercontent.com/s/va1c72073cqfy90/pcb12.jpg?dl=1), this is very important or else it won't fit into the SNES slot.
![image](https://dl.dropboxusercontent.com/s/afrfmiuwvmvg9px/flash_adapter.png?dl=1)
#### eprom_adapter.zip is an add-on for writing an 27C322 eprom, [PCB thickness needs to be changed to 1.2mm](https://www.dropbox.com/s/va1c72073cqfy90/pcb12.jpg?dl=0), this is very important or else it won't fit into the SNES slot.
![image](https://dl.dropboxusercontent.com/s/ldmtkjv7xsgtwyg/27c322_adapter.png?dl=1)
#### With the sd_adapter PCB you can transform the microSD module from the parts list into a full size SD module by desoldering all the components and soldering them to this PCB. This is optional since you can also just mount the microSD module as is.
![image](https://dl.dropboxusercontent.com/s/jcse9iaxm3bbuu6/sd_adapter.pngg?dl=1)
For [Oshpark](https://oshpark.com/) you need to [rename filename.GML to filename.GKO](https://www.dropbox.com/s/0rcvhalgeu11sf8/rename.jpg?dl=0) or it won't find the board outline. Oshpark is great for ordering the smaller PCBs but very expensive for larger boards.

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

30
pcb/adapters/README.md Normal file
View File

@ -0,0 +1,30 @@
#### nes_adapter.zip is an add-on for reading NES carts, [PCB thickness needs to be changed to 1.2mm](https://dl.dropboxusercontent.com/s/va1c72073cqfy90/pcb12.jpg?dl=1), this is very important or else it won't fit into the SNES slot. You can order a 2.5mm 72pin NES slot [here](https://www.aliexpress.com/item/32827561164.html).
![image](https://dl.dropboxusercontent.com/s/z2atlcly642sewj/nes_adapter.png?dl=1)
#### famicom_adapter.zip is an add-on for reading Famicom carts, [PCB thickness needs to be changed to 1.2mm](https://dl.dropboxusercontent.com/s/va1c72073cqfy90/pcb12.jpg?dl=1), this is very important or else it won't fit into the SNES slot. You can order a 2.54mm 60pin Famicom slot [here](https://www.aliexpress.com/item/32827561249.html).
![image](https://dl.dropboxusercontent.com/s/w89ivzvuzk6hf5b/famicom_adapter.png?dl=1)
#### sms_adapter.zip is an add-on for reading Sega Master System carts. You can order a 2.54mm 50pin SMS slot [here](https://www.aliexpress.com/item/32818469880.html). The adapter is based on the [design by Raphnet](https://www.raphnet.net/electronique/sms_to_smd/index_en.php). For use with the Cart Reader ignore the SMD footprints on the PCB, the adapter does not need any components. I only bridged R5 to connect the reset line, although I'm not sure if this is even needed.
![image](https://dl.dropboxusercontent.com/s/r6lavgoaccjtrz7/sms_adapter.png?dl=1)
#### wonderswan_adapter.zip is an add-on for reading WonderSwan carts. [PCB thickness needs to be changed to 1.2mm](https://dl.dropboxusercontent.com/s/755249v8smcuoft/wonderswan_adapter.png?dl=1), this is very important or else it won't fit into the SNES slot. (Optional) Install C1 and C2 with 10uF/16v 1210 package tantalum capacitor.
![image](https://dl.dropboxusercontent.com/s/755249v8smcuoft/wonderswan_adapter.png?dl=1)
#### flash_adapter.zip is an add-on for writing flashroms like the 29F032, 29L3211, 29LV160, [PCB thickness needs to be changed to 1.2mm](https://dl.dropboxusercontent.com/s/va1c72073cqfy90/pcb12.jpg?dl=1), this is very important or else it won't fit into the SNES slot.
![image](https://dl.dropboxusercontent.com/s/afrfmiuwvmvg9px/flash_adapter.png?dl=1)
#### eprom_adapter.zip is an add-on for writing an 27C322 eprom, [PCB thickness needs to be changed to 1.2mm](https://www.dropbox.com/s/va1c72073cqfy90/pcb12.jpg?dl=0), this is very important or else it won't fit into the SNES slot.
![image](https://dl.dropboxusercontent.com/s/ldmtkjv7xsgtwyg/27c322_adapter.png?dl=1)
#### With the sd_adapter PCB you can transform the microSD module from the parts list into a full size SD module by desoldering all the components and soldering them to this PCB. This is optional since you can also just mount the microSD module as is.
![image](https://dl.dropboxusercontent.com/s/jcse9iaxm3bbuu6/sd_adapter.pngg?dl=1)
For [Oshpark](https://oshpark.com/) you need to [rename filename.GML to filename.GKO](https://www.dropbox.com/s/0rcvhalgeu11sf8/rename.jpg?dl=0) or it won't find the board outline. Oshpark is great for ordering the smaller PCBs but very expensive for larger boards.

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

View File

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

5
pcb/pocketsnes/README.md Normal file
View File

@ -0,0 +1,5 @@
#### pocketsnes.zip is a smaller variant of the Cart Reader PCB made by Niltonn. To order the PCB please refer to: https://docs.easyeda.com/en/PCB/Order-PCB
![image](https://dl.dropboxusercontent.com/s/g0bhixbcrzjuye8/pocketsnes.jpg?dl=1)
More info: https://forum.arduino.cc/index.php?topic=158974.msg4381465#msg4381465

Binary file not shown.