View Single Post
  #52  
Unread October 2nd, 2012, 06:13 PM
Jambo51's Avatar
Jambo51
Thinking about quitting...
 
Join Date: Jun 2009
Location: Livingston, Scotland
Gender: Male
Nature: Quiet
Quote:
Originally Posted by RichterSnipes View Post
Just through my various searches alone I would have never found out that a hack for it does exist, or if it had ever been posted, so this is great news!
I never released it, that's why.

Code:
.text
.align 2
.thumb
.thumb_func
.global battlemusichackleg

main:	push {r2,r3}
	ldr r0, tableloc
there:	ldrh r2, [r0, #0x0]
	cmp r1, r2
	beq loadmusic
	ldr r3, end
	cmp r2, r3
	beq loadnormal
	add r0, #0x4
	b there
loadnormal:	mov r1, #0xAA
	lsl r1, r1, #0x1
	add r1, #0x1
return:	pop {r2,r3}
	ldr r0, goback
	bx r0
loadmusic:	ldrh r1, [r0, #0x2]
	b return
.align
end:	.word 0x0000FEFE
goback:	.word 0x0807FA3F
tableloc:	.word 0x08FFFFFF
Change the code at 0x7F9F4 to:
Code:
01 1C 00 00 00 48 00 47 XX XX XX 08
Where, once again, your insert location + 1 replaces the XX's. Easy stuff. Now, using it means you have to create a new table in your ROM, the format for said table is:

Code:
[Pokémon Species - Half-Word][Song ID to Play - Half-Word]
With an FE FE 00 00 at the end of it to signify to the routine that the table is finished.

Then, point the tableloc to this new table, and you should be good to go. Remember, of course, to keep everything correctly aligned. Major note: I only tested this with special 0x138. It does NOT work with wildbattle or special 0x137.
__________________


Guys, please don't send me question which belong in the Simple Questions or Scripting Help threads. I don't mind the occasional question about ASM or something, though. And definitely don't send me PMs or VMs asking for help with your hack or requesting custom ASM. I will not answer.

Last edited by Jambo51; October 3rd, 2012 at 01:12 PM.
Reply With Quote