How to set up higan1/20/2023 ![]() LDA #$01 \ We set the track number to track 1 LDA $2002 \ Checks the first letter of the MSU IDĬMP #$53 |it should be 'S' which is hex 53.īNE #$13 / If it isn't, we skip over the MSU-1 code. ![]() Combining code from the section about checking for the MSU-1's presence and the section about playing an audio track, we get this assembly: ![]() The next thing to do is to convert the code in the Kawa document to something we can use. The first four bytes are a JSL jump to our unused space in the ROM where we're going to write our function, and the last byte is a NOP in order to not disturb the code around the hijack point. Here's the code I'm using presently to replace those 5 bytes: 22 1C EC 04 Together, the LDA and STA there already use 5 bytes, so we have to make sure our own code matches. We start at 0004F6A6 in the ROM (which is 09F4A6 in LoROM). So our first step is to jump to a subroutine at that location. There is some unused space in the ROM at 04EC1C where we can write our own function to play our music. This is the point where we need to hijack the code to play our own MSU-1 fairy theme. ![]() This plays the fairy theme at the file select. In Zelda 3, for example, at 09F4A6 in RAM (LoROM I think?) we get the code to load value 0B into the accumulator and then store that value to $012C.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |