Communicating from Arduino to DS via slot 2

Post Reply
Derrik
Posts: 63
Joined: Wed Aug 14, 2013 8:28 pm

Communicating from Arduino to DS via slot 2

Post by Derrik » Mon Feb 03, 2014 9:40 pm

I want to have my Arduino send values to my DS through slot 2; much like how the DS Paddle, Guitar Grip or the Trainer Toolkit work.

I opened the DS dust cover, drilled some holes and tried soldering some wires based on the little information available on the internet.

http://s2.postimg.org/63ri4f0cp/HNI_0023.jpg

Specifically this page:

http://files.darkfader.net/gba/files/cartridge.txt

I then did a small test by connecting the VCC and GND to an LED, and sure enough:

http://s27.postimg.org/rwrx6sksj/HNI_0020.jpg

So now the tricky part... receiving data.

I soldered wires to ~RD and AD1, though I'm not sure that these are the ones I need, and I will probably need more.

I connected AD1 to a 10k OHM resistor and then to GND of the Arduino. I connected ~RD to A0 of the Arduino.

My DS now recognises the GBA Slot as an Option Pak:

http://s2.postimg.org/o24pl95mx/HNI_0024.jpg

I then uploaded this sketch to my Arduino:

Code: Select all

const int analogOutPin = A0;

void setup() {
  Serial.begin(9600); 
}

int i = 0;

void loop() {
  i++;
  analogWrite(analogOutPin, i);
  delay(100);
}
It should be writing a number which increases every 10'th of a second to the DS.

I then tried reading values in RAM from 0x08000000 and onward on the DS, looking hopefully for a steadily increasing value, but alas I of course couldn't find anything.

http://s2.postimg.org/6dcytmtvt/HNI_0025.jpg

I suspect that I have soldered the wrong wires, or need more connections to communicate anything at all.

I know this isn't really libnds, but hopefully someone knows which connections I need to make and can give some addresses in RAM which could be where to look.

Thanks.

WinterMute
Site Admin
Posts: 1845
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Communicating from Arduino to DS via slot 2

Post by WinterMute » Mon Mar 17, 2014 2:11 pm

All the pins on the GBA cart slot are digital, you can't get analog in without an ADC. The best way to transfer values is probably through the SRAM interface.

Normally a 16bit address is output through AD0-AD15, then 8 bits of data are transferred through A16-A23 - see http://problemkaputt.de/gbatek.htm#auxgbagamepakbus

I haven't tried this but if you connect A16-A23 to 8 IO pins on the Arduino, configuring them as digital outputs ( and make absolutely sure your Arduino board is supplying 3V or you have a suitable level converter) then you should be able to see the pin states by reading from 0x0E000000-0x0E00FFFF.

Please don't blow up your DS.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests