gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Making an alternative menu for the MK 2/3

#62268 - fernando-ytr - Mon Nov 28, 2005 9:24 pm

Hello everybody!

The NeoFlash Team has send the MK 2 to many coders, so... can anyone create an alternative menu for the MK 2/3? The menu from NeoFlash is a...

We have all the specs here:

http://www.neoflash.com/forum/index.php?action=dlattach;topic=1005.0;attach=234

And we need a CVS, no? SourceForge, maybe?

Thanks!

#62270 - Mollusk - Mon Nov 28, 2005 10:03 pm

The current menu is in version 0.1 ! Maybe you could wait a little, don't you think ?
_________________
PAlib official forum : http://www.palib.info
PAlib official tutorials: http://www.palib.info/wiki
Updates, help, code examples, tutorials, etc...

#62273 - fernando-ytr - Mon Nov 28, 2005 10:37 pm

Nope, the actual version are the 0.2 and still is the same as the v0.1.

And NeoFlash is very slowly releasing new versions of his menu.

I think that this can be the corrects steps to develop the loader:

1- We can create and interface for read/write the SD/MMC targets with the filesystems FAT 16/32.
2-Add suport to the intern memory of MK3.
3-Add a save manager.
3-Add "streaming mode" to execute .nds archives direct from the SD/MMC/intern memory
(I think that the M3 do anything like this but using a CF).
4-...

Of course, the formats of the loader will be .nds and .ds.gba.
I'm going to send e-mail to all developers that recived a fre MK 2 or 3.

PD:Sorry for my bad English.

#62303 - Mollusk - Tue Nov 29, 2005 8:21 am

I should recieve mine soon... I'll look at the current menu status and see what I can do too, then :)
_________________
PAlib official forum : http://www.palib.info
PAlib official tutorials: http://www.palib.info/wiki
Updates, help, code examples, tutorials, etc...

#62312 - rmco2003 - Tue Nov 29, 2005 2:36 pm

I think this would be a very worthwhile project, I hope it goes further.

#62320 - Extreme Coder - Tue Nov 29, 2005 4:50 pm

I already began working on a mk2/3 shell, but I just wish I knew how to access 11011011 for example on the nds cart:P

#62328 - revo - Tue Nov 29, 2005 6:03 pm

I wish neoflash will release actual menu source code ;)
_________________
[ sorry for all mistakes, but my english isn't as good as I wish it to be ]

#62333 - rmco2003 - Tue Nov 29, 2005 6:51 pm

I doubt he will, but the data sheets may be able to help in developing a new menu

#62340 - fernando-ytr - Tue Nov 29, 2005 8:15 pm

rmco2003 wrote:
I doubt he will, but the data sheets may be able to help in developing a new menu


Yes, but anyone knows how acces to, for example, 11011011, as Extreme Coder says?

Bye!

#62380 - cory1492 - Wed Nov 30, 2005 12:33 pm

as far as I understand it cart comms is controlled by setting something on the SPI bus and by using CARD_CR2 (card command register 2; register 1 should be EEPROM/FLASH) which is essentially where the MK2 is located - the card slot - but I have not gotten any useable results with this theory as of now.

#62383 - Extreme Coder - Wed Nov 30, 2005 1:31 pm

Last time I asked Dr.Neo, he said he'll be releasing sample source code to access data or whatever. The question is when:P?

#62386 - darkfader - Wed Nov 30, 2005 2:47 pm

That'd save us some work. If I weren't so lazy and had more time, I'd probably have a romloader already. (assuming it really can do what it's designed for)
Sigh... is there really a reason to use this device for homebrew?

#62389 - Extreme Coder - Wed Nov 30, 2005 3:43 pm

maybe for fun?:P
or because mario kart DS costs here $80:D
But where would you get the addresses from?
You know why the +65463195987 people at the neoflash forums are crying their asses for;)Just find a solution to shut them up:D

#62391 - revo - Wed Nov 30, 2005 4:23 pm

darkfader wrote:
Sigh... is there really a reason to use this device for homebrew?


Testing faster then ever before :) How? I don't know if it will work, but:

- http://www.everythingusb.com/sandisk_ultra_ii_sd_plus_1gb.html

what about cutting 'down' part (it looks on fotos, that there is no electronic there) of it and connecting it to usb extension lead (http://www.beststuff.co.uk/images/hama_usb_extension.jpg and ad power switch if needed)?

I don't have such a card (and no info about it compatibility at the moment), but what do you think about it? Simple sending file to 'removable drive', and it's ready for testing, without moving cart :] All we need it's menu that will boot file autorun.nds (or some other name) automatically from MK2/3.
_________________
[ sorry for all mistakes, but my english isn't as good as I wish it to be ]

#62427 - tepples - Wed Nov 30, 2005 9:11 pm

Extreme Coder wrote:
maybe for fun?:P
or because mario kart DS costs here $80:D

You haven't filled in your location, so I don't know what "dollar" means in your local language. Does Mario Kart cost 80 monetary units that are locally called "dollars", or is its local price actually equivalent to 80 U.S. dollars?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#62441 - Empyrean - Wed Nov 30, 2005 10:23 pm

Maybe it's Hong Kong dollars, in which case that'd be around US $10!

Heheh, but I'm assuming it's Australian dollars, which would equate to around US $60.
_________________
3 is not an "e",
7 is not a "t",
1 is not an "l",
And for the love of God,
Learn how to spell!

#62453 - cory1492 - Thu Dec 01, 2005 1:47 am

darkfader wrote:
That'd save us some work. If I weren't so lazy and had more time, I'd probably have a romloader already. (assuming it really can do what it's designed for)
Sigh... is there really a reason to use this device for homebrew?
Sure, having access to an SD card can make for alot of things, as with GBA MP... I thought you of all people would see at least a glimmer of potential for such a device to work with homebrew wrather than sticking to the limits of a GBA device.

#62461 - Extreme Coder - Thu Dec 01, 2005 5:30 am

no tepples, I converted it from saudi riyals( the currency here) to american dollars.

#62467 - Empyrean - Thu Dec 01, 2005 6:31 am

Hey, I was born in Saudi Arabia... Jeddah, to be exact!
_________________
3 is not an "e",
7 is not a "t",
1 is not an "l",
And for the love of God,
Learn how to spell!

#62470 - Extreme Coder - Thu Dec 01, 2005 7:09 am

I'm living there:)

#62472 - Empyrean - Thu Dec 01, 2005 7:57 am

Good stuff, man! Mar7aba!
_________________
3 is not an "e",
7 is not a "t",
1 is not an "l",
And for the love of God,
Learn how to spell!

#62487 - revo - Thu Dec 01, 2005 1:31 pm

New MK2/3 menu is out - my rPaint starts from MMC card without any problems :)
_________________
[ sorry for all mistakes, but my english isn't as good as I wish it to be ]

#63072 - kobewan - Thu Dec 08, 2005 1:01 pm

Heh, lots of Saudis here I guess.... from Jeddah, Saudi Arabia as well. I'm new here, but i can vouch for that $80 price. Its still a lot better than the N64 days, when cartridges would cost like $100-120, while PS games are being sold openly for $2 (boot legged of course). Won't find many Nintendo fans here, specially since even GameCube was so recently cracked...which still isn't that open here.

#63154 - Sintax - Fri Dec 09, 2005 5:01 am

So has anyone figured anything out yet? I'm already fed up with the menu, and although I'm sure they'll make new versions, I'm also sure they'll never do all the things we want it to.

#63186 - Extreme Coder - Fri Dec 09, 2005 2:09 pm

Did you try v0.3?
Until we get a clue about how to access stuff on the mk2/3, nothing's gonna happen.

#63782 - Sintax - Fri Dec 16, 2005 7:24 am

Yeah I was hoping someone got a clue. Perhaps I found some.

I did a lot of looking into it and deciphering broken english, based mostly on what cory said about using CARD_CR2 and the data sheet. I think you actually have to use CARD_CR1 at first, which the NDSTech Wiki refers to as CARD_SPI_CR, which seems to match up with the SPI commands in the data sheet, especially considering CARD_SPI_DATA has 8 bits for SPI data, which goes along with the 8 bits of data posted for each command on the sheet.

Now, you can't send any Game ROM commands before you use SPI #2 according to the data sheet. And you can't send any SPI commands before sending 'EMULATED EEPROM WRITE ENABLE'... according to the data sheet. I think this refers to SPI #11. So you put 1111101 or 0xF9 into CARD_EEPDATA (CARD_SPI_DATA on the tech wiki), and maybe then it works. I guess the MK3 takes data through it's EEPROM emulator. I've programmed this in, but I have no idea how to read data, so I can't tell if it's doing anything.


So that's all what I've gathered, I'm just putting it out there to hope that someone more skilled can use it, although I'm not sure it even makes sense. This device seems like it has potential and I'm just tired of waiting.

#63788 - Extreme Coder - Fri Dec 16, 2005 8:49 am

So did it work?

#63890 - Sintax - Sat Dec 17, 2005 8:12 am

Well, I did a bit more work and I think I got something. Following my theory finally paid off after I realized I had to set WAIT_CR to give the AMR9 access to the DS slot. Pertinent code (ie. excess cut out) so you can try yourself:

Code:

void waitCard () { while (CARD_CR1 & 0x80); }

void readNeoData (uint8 command, uint8 *data, uint32 length) {
   CARD_CR1 = /*Enable*/0x8000 | /*MODE*/0x40 | /*Continue*/0x2000;

   CARD_EEPDATA = command;
   waitCard();

   while (length > 0) {
      CARD_EEPDATA = 0;
      waitCard();
      *data++ = CARD_EEPDATA;
      length--;
   }
   CARD_CR1 = /*MODE*/0x40;
}

int main (void) {
   uint16 dataBuf =  0;

   WAIT_CR &= 0xF7FF;      //Permit AMR9 access to DS slot

   waitCard();
   
   //0xF2 is 11110010 - SPI #3 on datasheet
   readNeoData (0xF2, &dataBuf, 2);
   iprintf("Read MEM_CONFIG: %X\n", dataBuf);
}


Now what I get returned is 0x1032, which comes out to 0xFFFF if you don't have the MK in, or there is a DS game in the slot. ALSO, the last 8 bits of that evaluate to 00110010, where, if you look on the data sheet, matches up with the 'ZZZZZ0O0' where 'ZZZZZ' is EEPROM64k (00110-default) and 'O' is Save to MK2 ('1' - default I guess). So that's some strong proof that something is working, I'd say. If anyone can chime in with any useful SPI info or anything, please, God, help me.

#63983 - Sintax - Sun Dec 18, 2005 7:08 am

Ok well I think I got it, if anyone's interested. The readNeoData I posted above works (although the data comes out in reverse- that is byte 2 should be byte 1), it's just that the Memory Config is the only piece of data that comes setup already, it seems. Here is writeNeoData:

Code:
void writeNeoData (uint8 command, uint8 data1, uint8 data2) {
   CARD_CR1 = /*Enable*/0x8000 | /*MODE*/0x40 | /*Continue*/0x2000;
   CARD_EEPDATA = 0x06;   //set Write Enable Latch
   waitCard();
   CARD_CR1 = 0x40;

   CARD_CR1 = /*Enable*/0x8000 | /*MODE*/0x40 | /*Continue*/0x2000;
   CARD_EEPDATA = command;
   waitCard();
   
   CARD_EEPDATA = data1;
   waitCard();

   CARD_EEPDATA = data2;
   waitCard();

   CARD_CR1 = /*MODE*/0x40;
}


Command is column 1 on the data sheet, data 1+2 are columns 2+3. It works fine with SPI #9 to write MK2/3 Config values, but something is screwy with writing the Memory Config. I haven't tried anything else yet. But at this point you should be able to use SPI #2 to switch to game mode and use the game mode commands. That probably uses CARD_CR2, although I haven't gotten into that yet.

#64005 - Extreme Coder - Sun Dec 18, 2005 1:48 pm

So you got real responses without setting the EEPROM on the SPI #2?

#64045 - Sintax - Sun Dec 18, 2005 9:46 pm

SPI #2 is 'Switch to Game Mode,' I'm not sure what you mean. But as far as I can tell, you actually don't need to set anything before reading or writing the SPI commands.

#64093 - Sintax - Mon Dec 19, 2005 9:51 am

Boy, everyone seemed all gung-ho about this a while ago, but now that someone actually has something, I guess no one cares.

Here is a small demo/test program I made while trying to figure this all out, with source and compiled program, I don't think I'm going to put any more work into this effort:

http://digitalatrocity.com/DS/neotest.zip

My hope was to get access to the MMC/SD card so we should read and write to it and use all those programs that work with the GBAMP and all that. But reading and writing the SPI commands is as far as I got. Still 110% farther than anyone else, but not enough to do anything useful.

#64132 - fernando-ytr - Mon Dec 19, 2005 7:20 pm

Hey, Sintax!

Thanks for you program!I try your program in format .nds in the GBAMP, and it works!

Thanks!