Go Down

Topic: Dumping of rare cartridges (Read 11449 times) previous topic - next topic

Gamekin

Dec 29, 2013, 02:06 pm Last Edit: Dec 29, 2013, 02:09 pm by Gamekin Reason: 1
Hi.
I don't have an Arduino yet and need some advice what Arduino I should buy (if any).

I want to dump cartridges for the rare Gameking game console.

They are similar to a Gameboy but have 2x30 pins. Pinout is known (some pin functions are yet unknown).
There are 17 address lines and 8 data lines. They shall need 3V only (5V should be too much).

I found some dumping projects (mostly for Gameboy) but that has fewer lines. One project called Ardumpino for a Sega Genesis sounds more close but is different (16 bit, 5V, other pinout etc). I don't know if it would be easy by just changing some minor parts of that code. My skills are limited.

There are 2 guys in the world who managed dumping them. There is no working emulator available. Someone built a cart reader without a microcontroller but that needs additional electronics and voltage conversion and thelike. No complete schematics available, only tiny pics.
The system should be quite easy without encryption and bank switching. However there might be different multigame cartridges.

Any advice or is there even somebody who can help me? Maybe it's too complicated. Or someone even have tried. First problem is to get a 2x30 pin socket or to somehow attach the wires.

CrossRoads

Reading should be similar to writing:
http://forum.arduino.cc/index.php?topic=202792.0
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Gamekin

Thanks for the quick anwer. But that doesn't help me much.

Looks to me like the Ardumpino project is much more close.
He didn't even used an Arduino, so I still don't know what to buy best. Both using different voltage.

Although I have some experience with (different) controllers, I think I'll need someone who explains it to me much more detailed.
I don't want to crash either controller or rare cartridges.

CrossRoads

Crack one open, see what the chip is inside.
17 address, 8 data, likely also find Chip Enable, Output Enable, Write Enable. Power, Gnd, then make 30 pins.
Wire up similar to the suggested post to a 8 MHz, 3.3V powered '1284.
Add in SD card for data storage of you read out.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Gamekin

There is no ROM package inside but a glob.
As said there is a pinout description. CE, Power, GND but obviously no OE, WE.

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

65C02 console CPU runs at 6Mhz.
Anything else I need or have to pay attention for?

CrossRoads

You can tie CE/ low. The data will be output and stable some time after the address is stable.
Apply an address, wait a clock cycle or two or three, latch in the data for that address.

Can send the address & data to the serial port, let your PC store it.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Gamekin

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.

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Gamekin

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?

CrossRoads

You can do this with a 3.3V 8 MHz Promini, 3 74HC595 shift registers,
http://www.digikey.com/product-detail/en/SN74HC595N/296-1600-5-ND/277246
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.

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Gamekin

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.

CrossRoads

https://www.sparkfun.com/products/9873
https://www.sparkfun.com/products/11114

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

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.

retrolefty


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.

Gamekin

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?

Code: [Select]
// 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);
    }
   }

Go Up