NDS assembly reading from cartridges

Programming for the Gameboy Advance, Nintendo DS... GP32 and other arm systems
Post Reply
kaleido
Posts: 1
Joined: Thu Aug 20, 2020 1:55 am

NDS assembly reading from cartridges

Post by kaleido » Tue Sep 15, 2020 12:32 am

Hi. I've been watching the arm assembly series and its pretty darn great to see something that delves into the actual hardware and is not C or library based.
Wanted to ask about reading cartridges, AFAIK the ROM starts at the 8mb mark but reading the GBATEK documentation is not really clear how does one go about it(am not familiar with console programming).
Is it just dma'd into the main memory area?

Anyways thanks for the tutorials, they're really cool.

User avatar
akuyou
Posts: 430
Joined: Mon Apr 22, 2019 3:19 am
Contact:

Re: NDS assembly reading from cartridges

Post by akuyou » Thu Sep 17, 2020 12:16 am

I'm afraid I'm heavily relying on the GBATek documentation to write the tutorials as well, and the truth is I'm not sure.

I would assume you're correct, it seems the data is being transferred from ROM to the specified location in RAM, but I don't know any more than that.

I'd like to look further into the GBA/NDS, but unfortunately, I really can't look further into it at the moment, as working on the 8/16 bit tutorials is taking all the time i have
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

laoong
Posts: 9
Joined: Thu Aug 08, 2019 10:51 am

Re: NDS assembly reading from cartridges

Post by laoong » Sun Sep 20, 2020 2:47 pm

Hi!

I was delving in to the matter a little. And it's very interesting topic.
I'm afraid you're confusing NDS with GBA.
Only GBA has up-to 32MB of memory-mapped ROM in address space 08000000-09FFFFFF.
NDS is a different beast. It has no memory-mapped ROM but 4 MB of RAM and serial drive similar to Atari Lynx.
Firmware at boot time reads cartridge image header. There is information how much of image has to be loaded for ARM7 and ARM9 CPUs and where. It is then loaded and control is passed to specified code for these processors.
Additional data from cartridge can be accessed by writing special 8-byte commands to Gamecard bus 8-byte Command Out and then read from Gamecard bus 4-byte Data In (R) using cartridge protocol. The protocol is quite complicated though and I don't understand it fully.

Post Reply

Return to “ARM Assembly Programming”