NDS bit off ma Thumb

Started by
3 comments, last by Ravuya 17 years, 5 months ago
I am just wondering, and I have for some time. Okay, GBA is ARM7/THUMB based and NDS is ARM7/ARM9 based. All GBA games, that work on the GBA, also work on the NDS... apparently even ones optimised to make use of the Thumb chip. Now one of the goals of one of my projects (you've all probably noticed I have many on the go at once... I try to combine them as much as possible), will be to emulate the NDS, and probably, as a side effect, emulate the GBA. I still don't know what goes on with the thumb chip on the NDS, and Homebrew on the NDS is still rather new. How new the NDS is to the Homebrew community sort of limits the documentation on the matter. I was wondering if anybody here knows the answer to this. Mostly because everywhere else I go, this seems to be, more or less, a nonissue.
[ Six Hour Game Contest | ( Thread | Blog | Wiki | 6hour Bio ) ][ Website | (Blog | Gallery ) ]
Advertisement
I can't seem to find a question in your post, but I gather you want to know about THUMB.

THUMB is not a seperate chip or processor. ARM processors can support two general purpose instruction set architectures, called ARM and THUMB, and can switch between them on the fly. The ARM ISA has 32bit instructions, can address 16 general purpose registers, can optionally shift operands as necessary, and can conditionally execute instructions. The THUMB ISA has 16bit instructions, can address 11 of the 16 registers, and can't do shifting or conditionals.

Normally you use THUMB mode when you need to save space, or have a 16bit bus, or both, but you can potentially do a lot more work per ARM instruction, so ARM mode is usually faster.
There's a couple of papers in the ACM now about mixing ARM and Thumb code to save on battery life while increasing performance. There are significant benefits to loading the smaller Thumb instructions.
Okay, got my answer, even though my question is not obvious.

New question:

Since Arm7 has both Arm and thumb instructions, how come GBA development notes itself as using ARM/Thumb whereas NDS development notes itself as being based on ARM7/ARM9.

Would this mean that NDS has four instructionsets whereas GBA has two?
[ Six Hour Game Contest | ( Thread | Blog | Wiki | 6hour Bio ) ][ Website | (Blog | Gallery ) ]
No, that's just misuse of a technical term, something you see a lot in homebrew console development.

I assure you that the ARM7 and ARM9 both support the THUMB instruction set.

From arm.com:
Quote:The ARM9 processor family is built around the ARM9TDMI processor and incorporates the 16-bit Thumb instruction set, which improves code density by as much as 35%


Quote:The ARM7 family is a range of low-power 32-bit RISC microprocessor cores optimized for cost and power-sensitive consumer applications. Offering up to 130MIPs (Dhrystone2.1), the ARM7 family incorporates the Thumb 16-bit instruction set - enabling 32-bit performance at 8/16-bit system cost.


If you're interested in learning more you can order a documentation CD from ARM; mine took about 6-10 weeks to arrive.

This topic is closed to new replies.

Advertisement