Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Generation I Glitch Discussion

Using 8F to produce music. - Page 1

Using 8F to produce music.

Posted by: ravioli
Date: 2016-08-09 22:40:04
Are there any documentations for this? All I have heard about this is: https://www.youtube.com/watch?v=bP00FPrvPRU from TehFroggest but he hasn't responded to me on any platform. Anybody know about this?

Re: Using 8F to produce music.

Posted by: Aldrasio
Date: 2016-08-10 20:30:13
It looks like he didn't actually use 8F to generate the music, he just used it to redirect the music pointers into an area of RAM where he'd inserted the song.

The RBY music format has been touched on here and there are tools such as this one that you can use to import your own songs. It says in the video that he used a save editor, so he may have used those tools and then written it into his game's SRAM.

Re: Using 8F to produce music.

Posted by: ravioli
Date: 2016-08-10 23:02:52

It looks like he didn't actually use 8F to generate the music, he just used it to redirect the music pointers into an area of RAM where he'd inserted the song.

The RBY music format has been touched on here and there are tools such as this one that you can use to import your own songs. It says in the video that he used a save editor, so he may have used those tools and then written it into his game's SRAM.


How do you write it into SRAM? I thought it could only be written in RAM? Am I just stupid? I thought that tool only had use for ROMs.

This is also from his description.

''Basically, 8F is a glitch item, it jumps PC to WRAM, and you can make ASM routines with items. By doing so, and loading a song into pokemon box 1, and saving, it can be played without any external device''

Is this stuff really not documented?

Re: Using 8F to produce music.

Posted by: naf102
Date: 2016-08-11 06:49:43

It looks like he didn't actually use 8F to generate the music, he just used it to redirect the music pointers into an area of RAM where he'd inserted the song.

The RBY music format has been touched on here and there are tools such as this one that you can use to import your own songs. It says in the video that he used a save editor, so he may have used those tools and then written it into his game's SRAM.
From what I'm reading in that first link, can't you theoretically access the music header of an existing song (for example Pallet Town's music header is 822E-8236) and manually overwrite each byte of RAM that represents a note on the scale with 8F? Then you can edit the loop points and etc. If possible with 8F, I can imagine it taking an exorbitant amount of time.

Re: Using 8F to produce music.

Posted by: Aldrasio
Date: 2016-08-11 08:30:24
From what I'm reading in that first link, can't you theoretically access the music header of an existing song (for example Pallet Town's music header is 822E-8236) and manually overwrite each byte of RAM that represents a note on the scale with 8F? Then you can edit the loop points and etc. If possible with 8F, I can imagine it taking an exorbitant amount of time.


No, because that isn't actually in RAM. It's in the ROM bank 2, which is read-only.

How do you write it into SRAM? I thought it could only be written in RAM? Am I just stupid? I thought that tool only had use for ROMs.

This is also from his description.

''Basically, 8F is a glitch item, it jumps PC to WRAM, and you can make ASM routines with items. By doing so, and loading a song into pokemon box 1, and saving, it can be played without any external device''

Is this stuff really not documented?


SRAM is a part of the RAM, specifically the part of RAM that contains the save file. He wrote the song over his Pokemon Box 1 data, which was loaded into the game's WRAM when he loaded his game. Then he used 8F to redirect the music pointers.

The reason this isn't really documented is because it's a few different tricks combined together. We know that the music pointers are in the RAM range C006-C015 (if you use BGB's memory viewer, you can see the pointers change in real-time), we know that 8F can be used to write over those music pointers, we know how the music in Pokemon RBY is formatted, and we know that the Pokemon Box 1 data can be overwritten. Putting all that together, you get what was in the video.

Re: Using 8F to produce music.

Posted by: naf102
Date: 2016-08-11 14:15:46
Ah, I see now thanks for the clarification. So basically he made the song using a hex editor and inserted the song where Pokemon Box 1 is, then used 8F to access it and play it?

Re: Using 8F to produce music.

Posted by: Aldrasio
Date: 2016-08-11 16:38:14
Yep, that's what he did. He could've used 8F to write the music into the box 1 data, but it would've taken forever.

Re: Using 8F to produce music.

Posted by: ravioli
Date: 2016-08-11 18:33:45
Ah I see. Thanks for clearing that up!

Re: Using 8F to produce music.

Posted by: naf102
Date: 2016-08-12 06:34:30

Yep, that's what he did. He could've used 8F to write the music into the box 1 data, but it would've taken forever.
How could he have done this? I'm interested.

Re: Using 8F to produce music.

Posted by: Aldrasio
Date: 2016-08-12 14:36:06
How could he have done this? I'm interested.


Check the 8F sticky, there are a few item loadouts you can use to sequentially write to RAM.