11 March 2016 - Forum Rules
Started by FernandoLemon, January 04, 2023, 01:20:47 PM
QuoteDuring the FMV intro, the wave channel is set to the wrong frequency, causing the streamed music to be glitched. The wave channel is set to the correct frequency everywhere else in the game.
Quote0xC000-0xCFFF is RAMNo wonder we saw different results. The RAM is getting dynamically updated with new code.
QuoteI did a bit of digging and found thisCode Select Expand12CA: FAFCCE ld a, [$CEFC]12CD: E01D ld [$FF1D], a12CF: FAFDCE ld a, [$CEFD]12D2: E01E ld [$FF1E], a12D4: 3E20 ld a, $2012D6: E01C ld [$FF1C], aThis is some driver code, where the game is using 0xCEFC and 0xCEFD to hold the wavelength values that need to be sent to the wave channelThe code around it, on the other hand, is entirely graphics codeBetween the structure of the code and the way TCRF says that it's an intro FMV, it looks like it's unpacking audio and graphics data out of the ROM into memory and then copying it into the video and audio registersWhich means that this isn't a code bug -- it's a data bug.The FMV was written into the ROM with the wrong wavelength values.And it would require a fair amount of reverse-engineering to figure out how to re-encode the data correctlyIt's reverse-engineering that it appears someone has done before because there's the TCRF clip and a YouTube video showing the corrected intro
12CA: FAFCCE ld a, [$CEFC]12CD: E01D ld [$FF1D], a12CF: FAFDCE ld a, [$CEFD]12D2: E01E ld [$FF1E], a12D4: 3E20 ld a, $2012D6: E01C ld [$FF1C], a
QuoteIt is, no doubt about thatBut the point is, the reverse-engineering had to be done to understand how the data was stored in the ROMIf you had that knowledge, you could figure out how to make a version of the data that didn't have the problem
Page created in 0.277 seconds with 19 queries.