Zophar's Message Domain

Go Back   Zophar's Message Domain > Emulation Talk > Rom Hack

Reply
 
Thread Tools Display Modes
Old 08-09-2005, 11:25 PM   #11
Spikeman
Regular Member
 
Join Date: Jun 2005
Posts: 34
Default Re: GBA Assembly

I'm having a problem. I finally figured out how to get the opcode for BL (the instruction that jumps to a subroutine) to work and I made it jump to the place where I put the exact code it replaced and then return but the game freezes up. I think the problem may be with the instruction I used to return which was: mov pc, lr. Can anyone familiar with gba assembly tell me why it might not be working?
Spikeman is offline   Reply With Quote
Old 08-10-2005, 02:31 AM   #12
MooglyGuy
Senior Member
 
Join Date: Mar 2002
Location: Albany, NY
Posts: 4,014
Default Re: GBA Assembly

> I'm having a problem. I finally figured out how to get the
> opcode for BL (the instruction that jumps to a subroutine)
> to work and I made it jump to the place where I put the
> exact code it replaced and then return but the game freezes
> up.

Well, why not step through the code in the debugger to see if it is, in fact, returning to the link register? Perhaps the link register is getting destroyed between the calling of the subroutine and returning from the subroutine?
MooglyGuy is offline   Reply With Quote
Old 08-11-2005, 12:37 AM   #13
Spikeman
Regular Member
 
Join Date: Jun 2005
Posts: 34
Default Re: GBA Assembly

> Well, why not step through the code in the debugger to see
> if it is, in fact, returning to the link register?

I had no way to stop it at the right point so I would have to step through a ton of code. But I did figure it out. The problem was that I just figured out the opcode from this reference sheet I got and put it in with a hex editor and I had the opcode wrong but the disassembler said it was right so I was confused. I fixed it by looking through the technical reference on the processor. So know I have the DTE hack all working and its pretty awesome that I got this to work. The only thing is now I don't know what to do because I am still learning Japanese so I can't translate much yet.
Spikeman is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:18 PM.

Contact Us - Zophar's Domain - Archive - Top

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.