Jump to content
  • Advertisement
Sign in to follow this  
DakeDesu

Unity NDS bit off ma Thumb

This topic is 4321 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!