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.
NDS assembly reading from cartridges
Re: NDS assembly reading from cartridges
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
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
Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809
Re: NDS assembly reading from cartridges
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.
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.
Re: NDS assembly reading from cartridges
I've also been reading more on the NDS, its quite tricky. There's also something else I wanted to check with you guys.
The header seems to not be recognized by some flashcarts on real hardware, I think this may be because its lacking the title and description(plus icon data). It works fine on a soft modded dsi though.
The header seems to not be recognized by some flashcarts on real hardware, I think this may be because its lacking the title and description(plus icon data). It works fine on a soft modded dsi though.
Re: NDS assembly reading from cartridges
It's certainly possible, it works on emulators and my Classic NDS with flashcard, but I can't say for sure it will work on everything.
If you figure out how to make it work, let me know what you did and I will make corrections
If you figure out how to make it work, let me know what you did and I will make corrections
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
Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809