Kodewerx
https://www.kodewerx.org/forum/

Arctan SWI Help
https://www.kodewerx.org/forum/viewtopic.php?f=5&t=2183
Page 1 of 1

Author:  Hextator [ Fri May 25, 2007 9:06 am ]
Post subject:  Arctan SWI Help

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 >.>

Author:  kenobi [ Fri May 25, 2007 9:23 am ]
Post subject:  Re: ARM 9 Assembler

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.

Author:  Hextator [ Fri May 25, 2007 9:26 am ]
Post subject:  Re: ARM 9 Assembler

Psh, and here I thought I was resourceful. Thanks for that suggestion (dunno why I didn't think of it myself ;_;)

Author:  kenobi [ Fri May 25, 2007 9:30 am ]
Post subject:  Re: ARM 9 Assembler

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).

Author:  Hextator [ Fri May 25, 2007 9:35 am ]
Post subject:  Re: ARM 9 Assembler

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...

Author:  Hextator [ Sat May 26, 2007 9:18 pm ]
Post subject:  Re: ARM 9 Assembler

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.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/