Closed CPColin closed 1 week ago
I don't recall exactly what the limit is (I think 0x200/512), but QUSB2SNES has a limit in the amount of memory that can be requested, so trying to get the memory locations of each individual peg might be a bit difficult. It might be best to go with the first option.
I think the main thing is we'd probably only want this check to run while on that screen to avoid making other auto tracking checks run less frequently.
Yeah, it's probably not worth adding the ASM we'd need in order to pack the peg states into three or five bytes or whatever. We could definitely enable the check on that screen only. Or maybe when the player says "we're going to Pegworld"? Or were you picturing that the player would no longer have to enable Pegworld first?
Honestly, while I hadn't thought about it, I do wonder if we could automatically enable pegworld similar to the shaktool mode due to the issues betus has with enabling pegworld mode.
I bet we could start checking that RAM location when the player enters that screen and automatically enable Pegworld as soon as the value is non-zero. That'd be pretty close to what happens now when Tracker hears "Hey Tracker, peg."
It also just occurred to me that, since this RAM value also changes when opening the TR portal, we could have Tracker rarely say something like, "Pop. Oops, wrong screen." when hammering those three pegs.
Good news: Tracker pronounces "pop", "popop", "popopop", etc., all the way up to "popopopopopopop", at least, how you'd expect, so we won't need to tinger with <prosody>
stuff!
Okay, initial implementation is in the two branches. I'm gonna sleep on it and see if I hate it later.
I was thinking about other stuff we could do with custom ASM and Matt suggested that Tracker could auto-track Pegworld. I found some RAM values via this project and some experimentation: https://github.com/walkingeyerobot/alttp-disassembly
The count of flattened pegs is stored as four bytes, starting at address
$04C8
. Tracker could watch this address and say "pop" for every value it increases by. We might have to find a way for Tracker to speak faster, so she could react to hammer-dashes.We could also watch the "Map16" data, which is two kilobytes of 16-bit values, starting at address
$7E2000
. The pegs all start with value0x021B
and end up as0x0DC5
when they're flattened. The specific RAM addresses for the tiles we care about are here:Tracker could watch these and update the display to accurately reflect the current state.