Kodewerx

Our culture has advanced beyond all that you could possibly comprehend with one hundred percent of your brain.
It is currently Sat Sep 06, 2025 6:14 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Arctan SWI Help
PostPosted: Fri May 25, 2007 9:06 am 
Offline
Komrade
Komrade

Joined: Tue Mar 27, 2007 10:18 am
Posts: 1328
Google isn't giving me the results I want for an ARM 9 assembler.

My ARM 7 assembler assembled the aim bot I wrote for Metroid just fine except for the damned mul instructions. Even the software interrupts assembled right, but no, not the muls.

Rather than waste time on googling, I'd rather ask professional opinion on which ARM 9 assembler is preferred, after which I can Google its name for better results and get this aim bot debugged (I can't debug it at the moment because the ARM 7 muls assemble as undefined and it's kind of hard to debug a crashed system).

In the meantime, if someone could point me to an ARM 9 opcode doc, I could just hand assemble the mul instructions >.>

_________________
Image


Last edited by Hextator on Sat May 26, 2007 9:19 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: ARM 9 Assembler
PostPosted: Fri May 25, 2007 9:23 am 
Offline
Kommunist
Kommunist

Joined: Tue Oct 10, 2006 9:32 am
Posts: 445
If you have no$gba debugger, just type your instruction in there and it'll assembled (for exemple go at 0x02000000, and type the instruction you wanna assemble).
That's what I do all the time to make my asm hacks.


Last edited by kenobi on Fri May 25, 2007 9:30 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: ARM 9 Assembler
PostPosted: Fri May 25, 2007 9:26 am 
Offline
Komrade
Komrade

Joined: Tue Mar 27, 2007 10:18 am
Posts: 1328
Psh, and here I thought I was resourceful. Thanks for that suggestion (dunno why I didn't think of it myself ;_;)

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: ARM 9 Assembler
PostPosted: Fri May 25, 2007 9:30 am 
Offline
Kommunist
Kommunist

Joined: Tue Oct 10, 2006 9:32 am
Posts: 445
You can also check no$gba's gbatek's infos to see how to compile opcodes 'manually', in case the debugger is failing (gbatek also have a lot of technical infos on the NDS/GBA).


Top
 Profile  
Reply with quote  
 Post subject: Re: ARM 9 Assembler
PostPosted: Fri May 25, 2007 9:35 am 
Offline
Komrade
Komrade

Joined: Tue Mar 27, 2007 10:18 am
Posts: 1328
I go to GBATEK all the time >.>

I looked at the hex of the opcodes after assembling them in No$GBA and they're exactly the same (like they're supposed to be; ARM does a good job making the processors reverse compatible).

The Trainer Toolkit shows the mul instructions as ":", which I was certain meant that the instructions were undefined. Why aren't they working?

Or maybe they are even though it doesn't show them, and the real problem is that my software interrupts are fouling up due to bad input. I won't know until I'm certain that the mul instructions are working right...

Edit: I nop'd the muls to see if it would stop crashing and it did, so it seems the mul instructions are indeed the issue. No$GBA assembled them as ARM7 I guess; I wish the TT allowed for assembling. I don't know how to tell No$GBA to assembled as ARM 9 (I even tried assembling while running a DS game).

Edit: I nop'd just the software interrupts and now it still works. Looks like the TT simply doesn't display the mul instructions right, but they ARE working.

But without the trigonometric software interrupts working I can't make the aim bot do its job...I need a way to debug why the software interrupts aren't working...

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: ARM 9 Assembler
PostPosted: Sat May 26, 2007 9:18 pm 
Offline
Komrade
Komrade

Joined: Tue Mar 27, 2007 10:18 am
Posts: 1328
I'm just going to use this as my help thread instead of making a whole new topic, but no one will see my post if I don't double post. Sorry about this.

Anyhow, I'm reading GBATEK's documentation on the Arctan 2 software interrupt, and I don't quite understand the format of the input variables.

Can someone explain it to me in more detail? I'm not sure what to do with the "integral part" bit. :\ I trust that the lower 14 bits are the proportionate change in Y or X...

Edit: I found a better documentation; now the problem seems to be converting the output from the arctan 2 function into MP:H's angle format. I also have to copy the entire arctan 2 function, because the stupid NDS has no arctan2 function (or even an arctan1 function) in its BIOS.

_________________
Image


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 51 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group