Dumping of rare cartridges

Thanks very much for your help!

Probably I will need some more help later. I have to read a lot, order all the stuff and try it.

Ok. The address can come from Arduino pins if you have enough pins. Or you can use an Uno and send the address out to some 74HC595 shift registers.

I have read a bit more. However the more I read, the more confused.
Somehow I think it would be easier with a microcontroller.

So I need an Uno, a 2nd controller 1284, 3 shifters, SD slot or serial port connection, some electronics, breakboards and looots of wires.

Looks like it would be easier and cheaper without any controllers like this cart reader but I don't have detailed schematics and part list

http://web.archive.org/web/20071025063124/http://www.bripro.com/low/gameking/index.php?page=cartreader

Does it work better with an Arduino Due? 3V and more ports. Would I need a 1284 as well? Or are there other problems due to that architecture? I don't want to spend too much money. There is also no cart socket available so I either have to buy a 2nd console or somehow attach the wires. Maybe the whole thing is either too complicated or too expensive.

I'm not sure if I could handle all this including coding as I don't have an Arduino yet. Maybe I need an expert in my neighborhood who owns all the stuff or someone who can give me detailed instructions and schematics or even build that up for me. I have read about lots of problems like not enough mA for this or that (was it SD access?) I don't want to buy the wrong stuff.

Any other advice?

You can do this with a 3.3V 8 MHz Promini, 3 74HC595 shift registers,

and a 3.3V regulator for power to the cartridge.

Shift out 3 bytes of address info ( or 2 bytes and control 17th with an IO pin), sample the 8 outputs and create a data byte, send the byte to a PC.
Conceptually pretty simple.

On the PC side is put the data into a file. Don't know what's involved there.

At least much cheaper. Maybe I do it that way.
Not much easier though IMO, in fact the same as Ardumpino and need of many connections and 3 shifters as well. Doesn't have to be that cheap.

Is there already a project or where is that ROM reader pic coming from?
Coneptually everything is pretty simple for an expert.
Sure USB/serial adapter works at 3V? Where can I find more details for the data export.

I drew the picture.
kq2fd is programming something similar using ATmega1284 vs a Promini.
"data export" , you mean sending to PC? Many ways to read data from a couple of ports, assemble into a byte, send out serial port. You are into details of software design at that point.

Thanks for now.

I think I have to study it much more for some days and read more manuals and examples. (I doubt I could find anything more helpful in the near future).

Still don't know what is the best for me. And how easy or difficult is all that and the risk for damaging the cartridges, what resistors and caps to use if any for that project, hardware and voltage etc.
Yes and I don't know how to best program Arduinos. I read that there are many different ways and different and internal programming languages. Best would be a very very similar (detailed) project to adopt with minor changes in hardware and software but I haven't found any that close or versatile.

I could buy some cheap stuff and try it somehow but I don't know if I should dare that with my few knowledge.
Would be a wonder if I wouldn't make any mistakes and the risk for damaging the rare cartridges is probably too high.
No idea what kq2fd is.

Gamekin:
Thanks for now.

I think I have to study it much more for some days and read more manuals and examples. (I doubt I could find anything more helpful in the near future).

Still don't know what is the best for me. And how easy or difficult is all that and the risk for damaging the cartridges, what resistors and caps to use if any for that project, hardware and voltage etc.
Yes and I don't know how to best program Arduinos. I read that there are many different ways and different and internal programming languages. Best would be a very very similar (detailed) project to adopt with minor changes in hardware and software but I haven't found any that close or versatile.

I could buy some cheap stuff and try it somehow but I don't know if I should dare that with my few knowledge.
Would be a wonder if I wouldn't make any mistakes and the risk for damaging the rare cartridges is probably too high.
No idea what kq2fd is.

Well the true of matter is that an arduino is rarely a plug-and-play solution for any non-trivial project. To utilize an arduino effectively one needs to take the time to learn basic electronics and programming skills needed to take on any specific project.

This is rarely accomplished by starting off with a desired project in mind, but rather by building simple circuits and simple programs until one has gained the knowledge and experience to know if and how to take on the final desired project.

So unless you can find someone that has posted a finished project that does what you want and just follow their design both hardware and software you are probably better off putting the project on hold and start on your learning journey.

Now I've studied more.

I only have multigame carts which have 20 instead of 17 ADR lines. No problem as I need 3 shifting devices anyway.
This PCB rev has a slightly different pinout. But the slot still must be compatible to all carts.

I think I can use 2 Gameboy slots but I want to know the dumping speed with the given schematics as I don't kow how long I can keep the 2 slots attached stable.

I made a project with fritzing. Someone told it wouldn't work.
And I also wrote a code (someone told it should work) but I'm not sure about many things. Questions are in the code.
Can someone please have a look?

// Gameking cart reader ino sketch by Gamekin. Mostly snippets from other sources
//1 game carts have 17 Adress lines (128 K), 4in1 carts 20. So need to read up to 1 MB
//Some pin functions are unknown or unsure. So can only use CE, not OE. And use 3V.
//No RAM no EEPROMs just 1 ROM glob top. 3x74HC595, so I think I have to read 3 Bytes each loop.


#include "pins_arduino.h" 
//taken from Atariromreader unknown if needed

//Pin connected to ST_CP of 74HC595
int latchPin = 10; //Latch, SS ? might be changed, but ProMini has limited pins
//Pin connected to SH_CP of 74HC595
int clockPin = 13; //SCK
////Pin connected to DS of 74HC595
int dataPin = 11; // MOSI

int d0Pin = 2; //necessary ? most don't have this, but I have wired this
int d1Pin = 3;
int d2Pin = 4;
int d3Pin = 5;
int d4Pin = 6;
int d5Pin = 7;
int d6Pin = 8;
int d7Pin = 9;
//Arduino ProMini has internal pull-up resistors, also for data lines. Unsure if I should use them. 
//digitalWrite(d0Pin, HIGH); d0-7, digitalWrite(irqPin, HIGH); would activate them

//a buffer for bytes to burn
#define ROM_SIZE 1048576 
// in bytes
// byte buffer[ROM_SIZE];  -used by other sketch. Overflow in array dimension error with this value
int data = 0; //Used in counting up to the ROM's maximum byte
byte myByte = 0x00; // Used later as D0-D7 byte

//unknown if need more definitions like irqPin. What about CE (at the 74HC595) and SRCLR?


void setup(){
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);   // ---one code says INPUT, but maybe later
}
  void	data_bus_input() {
  pinMode(d0Pin, INPUT);
  pinMode(d1Pin, INPUT);
  pinMode(d2Pin, INPUT);
  pinMode(d3Pin, INPUT);
  pinMode(d4Pin, INPUT);
  pinMode(d5Pin, INPUT);
  pinMode(d6Pin, INPUT);
  pinMode(d7Pin, INPUT);
}

//switch IO lines of databus to OUTPUT state
void data_bus_output() {
  pinMode(d0Pin, OUTPUT);
  pinMode(d1Pin, OUTPUT);
  pinMode(d2Pin, OUTPUT);
  pinMode(d3Pin, OUTPUT);
  pinMode(d4Pin, OUTPUT);
  pinMode(d5Pin, OUTPUT);
  pinMode(d6Pin, OUTPUT);
  pinMode(d7Pin, OUTPUT);
}

//set databus to input and read a complete byte from the bus
//be sure to set data_bus to input before
byte read_data_bus(){


  Serial.begin(9600);   //unsure if speed can be higher, unknown if FTDI drivers needs other than serial, unsure if serial.begin before pinmode
}               


void loop() {
  while (Serial.available() <=0){
    delay (200);
  }
  
  //for (int i=0; i<24; i++){    // 3x8 bits ?? first attempt from other sketch
    //void shiftOut24bit(int clockPin, int latchPin, int dataPin, unsigned long value) {  //taken from sgcexplorer
	//digitalWrite(latchPin, LOW);
	//shiftOut(dataPin, clockPin, MSBFIRST, (value & 0x00FF0000) >> 16);
	//shiftOut(dataPin, clockPin, MSBFIRST, (value & 0x0000FF00) >> 8);
	//shiftOut(dataPin, clockPin, MSBFIRST, (value & 0x000000FF));
	//digitalWrite(latchPin, HIGH);

    
 
  digitalWrite(latchPin, LOW); //make shift reg listen 
  if (data < ROM_SIZE) {                          //Do I need to open a file and filename before?
    shiftOut(dataPin, clockPin, MSBFIRST, (data >> 16)); //read 3 Bytes and shift. binary output
    shiftOut(dataPin, clockPin, MSBFIRST, data >> 8);
    shiftOut(dataPin, clockPin, MSBFIRST, data);
    
    digitalWrite(latchPin, HIGH);
    delay(5);
    myByte = d7Pin  //originally called myDigitalRead (9), data pin 9-2
         | d6Pin <<1
         | d5Pin <<2
         | d4Pin <<3
         | d3Pin <<4
         | d2Pin <<5
         | d1Pin <<6
         | d0Pin <<7;
    Serial.write(myByte);
    data++;
    delay (5);
    //digitalWrite(latchPin, LOW);
    }
   }

Got the intended schematic?

It's yours.

I made a new schematic. Sorry if it's not the standard and I haven't wired all ADR lines. I haven't used fritzing before.

The question is, if the main logic is correct (how to wire CE, SRCLR) and if I can use pin 10 SS as latch pin, and (values of) resistors and capacitors.

Although 20 ADR lines, the multicarts should only use 512 K, Still the question for the dumping speed and if the code is correct or can be optimized.
How about coding with FTDI drivers and USB speed. Same code as for serial connection and internal conversion? Maximum speed for USB 2.0 or 1.1?

gameking-3a8schematics.png

Too big - can't scroll around a 7482 x 5646 image.
Scale it down to like 1200 wide max.

Smaller

One more try.

Can you say something about the dumping speed with the code I have given? I think I can use up to 57600 bauds with the PromIni
I need to dump 512 KB using FTDI drivers (USB 2.0).

I don't think I've seen any code?
USB 2 will support any speed the '328P can generate.
For instance:
[code]
digitalWrite (addressSS, LOW);
SPI.transfer (addByte0);
SPI.transfer(addByte1);
SPI.transfer(addByte2);
digitalWrite (addressSS, HIGH);
digitalWrite (cardOE, LOW);
digitalWrite (cardCE, LOW);
cardOut = PIND; // assuming the 8 bits can all come in this 1 port, for simplicity of example
digitalWrite (cardCE, HIGH);
digitalWrite (cardOE, HIGH);
Serial.write (cardOut);

Put that in a loop in a loop in a loop to create the three address bytes:

for (addByte2 = 0; addByte2 <16; addByte2 = addByte2 +1){ //4 upper address bits
   for (addByte1 = 0; addByte1 <=255; addByte1 = addByte1 + 1){ // middle 8
      for (addByte0 = 0; addByte0 <=255; addByte0 = addByte0 +1){ // lower 8
      // spi transfers above
      }
    }
  }

FTDI/USB will have no trouble keeping up with that.[/code]

The code is a few posts earlier

http://forum.arduino.cc/index.php?topic=207306.msg1548620#msg1548620

Still don't know about the dumping speed (I guess 1-2 minutes) and if the schematic and protoboard setup is correct.
Also unsure about the latch pin and other problems mentioned earlier.

For the HC595:
OE/ (sometimes named G), tie it Low.
SRCLR/ or MSTCLR/, tie it High.
SRCLK, rising edge moves data into the shift register - this would connect to SCK for SPI.transfer
RCLK, rising edge moves data to the output of the shift register. This is the SS, or Latch.

I have finally hooked it all up and tried to dump it. Uploading the sketch worked.

No output on the serial monitor.

Probably my code is wrong?

I tried 57600 and 9600 baud. What about parity settings, stop bits, flow control?