Post subject: Brave Fencer Musashi
Joined: 8/17/2007
Posts: 41
Does anyone know if this game is compatible with the current version?
Joined: 5/1/2015
Posts: 12
I was looking for a board on this game already, and this appears to be it. I'm currently running this game in real time and looking to delve a little deeper into the mechanics / movement / RNG in an attempt to figure a majority of it out. As a disclaimer I've never TAS'd before and I don't know a whole lot about it. I'll be looking in the newb and faq sections here to help myself out but was curious if anyone had any interest in assisting or pointing me in a positive direction? Thanks
Editor, Experienced player (570)
Joined: 11/8/2010
Posts: 4036
A good place to start in figuring out the movement and RNG is finding the memory addresses that track them and researching the game based on that. Start with this page on using RAM Search. You'll want to search a few times to narrow down the results until you've found an address that always changes when you move around or when something random happens.
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
Don’t even know what this game is but I may be able to help with the RNG. Usually the RNG behaves one of two ways: update every frame, or update only when something random happens. All RNGs I’ve found are 4 bytes big, so search for that data size. Do you have a vid of your RTA?
Joined: 5/1/2015
Posts: 12
I do have a vid of my RTA, you can find it here. It's far from perfect :D I'd love to do some work on my own as well, but obviously having some help from you guys who actually know what the hell is going on would be amazing. The game itself hasn't had much of anything done with it, although there is a WIP TAS on Youtube that is through Chapter 2. (There is 6 chapters total). Let me know if y'all need any info about the game or maybe we could discuss somethings over skype etc. once the time comes. I'll dig around that RAM search thread, thanks for the link coolkirby. Looking forward to finding out more about the inner workings of this one EDIT: Thought it would be helpful to mention the major RNG point in the game is towards the beginning when I'm playing the card game in the restaurant. This is needed to gain enough money for an item required later on for a skip, and if this could be consistent the run would be so much better
Spikestuff
They/Them
Editor, Publisher, Expert player (2642)
Joined: 10/12/2011
Posts: 6438
Location: The land down under.
How's about you show the better time. 2h 49m 51s
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
When in the vids is the card game? Movement seems kind of weird, it might be hard to optimize in a TAS.
Joined: 5/1/2015
Posts: 12
Spikestuff - I didn't show Sh0rt's time because I'm not him, and he's not here. The main thing was the card game so that shouldn't matter. The movement and platforming is a little wonky for sure, but the main things I'm curious about are traversing slopes (up and down) while running versus jumping and things of that nature, just to try and move around as quickly as possible. Macho's card game starts at 10:42 in the video. It's probably worth nothing I say fuck a lot haha
Joined: 5/1/2015
Posts: 12
So I started using PSXjin and found some addresses for the X and Y coordinates, but I'm still on the search for a few more. I'm going to dive into the Card game and see if I can decipher anything happening there
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
Good luck with that, it doesn’t look easy to understand. Also PSXjin’s RAM search sucks.
Joined: 5/1/2015
Posts: 12
Thanks, it's been a little spotty to say the least. The card game is a pain in the ass, found a couple values that change but they only do after an answer is selected and if it's correct they stay the same. Do you have a suggestion for an emu with a better RAM search? I also have one of the tricks I'm trying to figure out and it seems to have some strange conditions in order to make it work - I'd like to see if anyone wouldn't mind racking their brain with me to try to find a solution
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
Deuceler wrote:
Do you have a suggestion for an emu with a better RAM search?
There’s probably a better alternative but I don’t know any. When I used it for Tenchu I asked a friend to write up a few scripts in PHP which helped out. I don’t remember the specifics anymore.
Deuceler wrote:
I also have one of the tricks I'm trying to figure out and it seems to have some strange conditions in order to make it work - I'd like to see if anyone wouldn't mind racking their brain with me to try to find a solution
Well, what is it about?
Joined: 5/1/2015
Posts: 12
So the trick itself is called the misteria warp. Your enter a cave and hop across three moving platforms (all circling the room over water) to a central platform in order to collect a plant. When heading back you fall off the center platform into the water and instead of placing Musashi back on the ledge you fell from, it warps you to the entrance of the cave. I've tested to see if it was pixel dependent on the central platform but it doesn't appear to be. When the trick works you fall in to the water and the camera pans straight up, warping you to the entrance. If it doesn't work the camera pans diagonally up + right and places you up higher on the walkway of the central platform. I think it may depend on where you fall in the water but I'm not quite sure how to test it
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
Didn’t see that post for some reason. I don’t know much about this sort of thing but I’ll theorize anyway. The options could be two: either you have to jump in the water in a specific spot, so as to trigger a “checkpoint” that says you’re at the cave entrance, or when you go to collect the plant you have to do specific movements so as to not trigger a “you’re at the plant” checkpoint. Do you have a vid of this trick? Is it really confirmed that it does work? Mario Kart DS has had a “mystery shortcut” for a long time, some players claimed they could fall in the water in a certain spot and Lakitu brought them further ahead on the track. It turned out that this could only be achieved if you backtracked from further ahead already, and so is not really a shortcut as you have to go ahead and then backtrack to the water, losing a lot of time. If you just fell into the water as you arrived at it, you’d be placed back where you fell from.
Joined: 5/1/2015
Posts: 12
This is from one of my older PBs, because I abandoned more than 1 or 2 tries in recent runs. After I realized how random and shitty the trick is (as of now) I wanted to get something figured out before wasting time like this. Misteria Warp
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
Well from the vid it looks like you need to hit the water in a specific place. I’d rather expect it to be something like your Z position needs to be bigger/smaller than a specific value though, rather than actually having to hit a precise pixel in the water or something.
Spikestuff
They/Them
Editor, Publisher, Expert player (2642)
Joined: 10/12/2011
Posts: 6438
Location: The land down under.
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
Found the RNG. It’s 4 bytes at address 0x00078980. The game uses the default PlayStation bios RNG, which is explained here by p4wn3r:
p4wn3r wrote:
FFT uses the standard PSX bios RNG for everything, it's in the Python code below:
Language: Python

def rng(seed): seed = (((0x41c64e6d*seed)&0xffffffff) + 12345)&0xffffffff val = (seed >> 10)&0x7fff return (val, seed)
As said, the code above is in the PSX bios (more precisely scph1001), so it could be used by many other PSX games.
Translated for easier understanding:
def rng(seed):
      seed = (((1103515245 * seed) mod 2^32) + 12345) mod 2^32
      val = rounddown(seed / 1024) mod 2^15
      return (val, seed)
That makes 3 PS games that use the default RNG… FFT, Tenchu, and BFM. Anyway, since I had already made a Lua for Tenchu’s RNG, I ported it to BFM: http://tasvideos.org/userfiles/info/23959481256092449 Bad news Deuceler, it doesn’t look at all manipulable to me. There’s no reset point and both during overworld and when chatting to the bar girl, the RNG advances erratically in a way that would require you to be frame perfect to get any manipulation going. The actual card game IS pretty straightforward, the RNG only advances 1 step for each number it pulls out. So your best bet is to somehow figure out if it’s possible to determine what number will come out next based on what you’re given, but that requires mathematical skills of which I have none to figure out. Tried looking at the Misteria Warp but it doesn’t make any fucking sense to me. I did trigger it once at least. Edit: I got a savestate from which it’s pretty easy to trigger it, I’ll see if I can make an input file out of it so if anyone wants to look further into it they can recreate it easily. // Can’t figure out how to start an input file from a savestate so I only have a savestate: http://www.mediafire.com/download/1lrxrhx4xn2qu6l/SLUS00726+.003 From there you press up or down for 4 frames then do R1+down to trigger it. Mine’s completely different from the one Deuceler gets in his vid.
Joined: 5/1/2015
Posts: 12
Hey Spikestuff, thanks for the link to holyangel's TAS - I've actually been in contact with him for some time now and he discovered many of the glitches used during the run back in 2013. He isn't fluent in English, so it's difficult for him to communicate. We make it work however! Damn alaktorn, that's a bummer! Macho is luckily in the beginning of the run. I'll continue to mess with the Misteria Warp - I have a couple more theories to test out on it, but I REALLY appreciate your help with this! You were generous to give any of your time into the game.
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
Hey Deuceler, I’ve found a setup for the Misteria Warp. With a little practice you may even be able to get a 100% success rate. I’ve already gotten it 3 times in a row with this. Look: https://www.youtube.com/watch?v=6sDHNFwxlTQ (If you’re respawning) just press Left, then when you’re sort of in the middle of that piece of slanted terrain press down, then a little before you fall off hold down R1. I’d look into it a little further but I’m in > 30°C heat and my PC is making very scary sounds when I run PSXjin. Fucking Summer. Edit: Yeah it’s 100% free after a respawn. You have to be holding Left before the character appears, it needs to move first frame. Edit: I’ve only just noticed the spawn point depends on where you move beforehand, and I was testing this on the same savestate (same spawn point) each time. So maybe this setup won’t work for different spawn points. Edit: Pressing R1 earlier rather than later is better. The position you hit in the water is completely irrelevant, the important bit is probably the moment when you start falling. It doesn’t seem possible to trigger it without using R1. Something about falling off over that spot while holding down R1 makes it so the glitch triggers. // Hmm, I’ve just triggered it by jumping on the last frame before falling off. Maybe you don’t have to fall holding down R1, but just pass over that precise spot just before the fall. // Hmm maybe it has nothing to do with R1… I’ve done it while running now. It might just be a pixel-perfect falling spot you need to hit. OK I think I’ve figured it out. You need to hit a pixel-perfect spot at the falling spot, after that the glitch is already triggered, you can run around wherever you want and you can fall wherever you want. The only important thing is hitting that pixel-perfect position right before the fall. I’ve found the address that governs respawning… well, not exactly. 0x00126BF6 to FA (4 bytes) have to do with it, but I can’t pin-point which exactly it is. You can see it changing when going over that pixel before falling off, and that’s what triggers the warp. Man I got busy now. When I have more free time I’ll look into it better to figure out exactly which address it is and how it works, then make a Lua to visualize it and make a video to explain the Misteria Warp.
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
ALAKTORN wrote:
I’ve found the address that governs respawning… well, not exactly. 0x00126BF6 to FA (4 bytes) have to do with it, but I can’t pin-point which exactly it is. You can see it changing when going over that pixel before falling off, and that’s what triggers the warp.
Figured them out. All 2 bytes addresses. 0x00126BF0 = character X position (horizontal) 0x00126BF2 = character Y position (vertical) 0x00126BF4 = character Z position (depth) 0x00126BF8 = spawn point X coordinate 0x00126BFA = spawn point Y coordinate 0x00126BFC = spawn point Z coordinate The trick is actually really precise, might be (sub-)pixel perfect. All 3 coordinates need to align correctly, X seems to be (sub-)pixel perfect at 0x01E8, Y can be from 0xFEC3 to 0xFEC7, and Z can be from 0xFEBB to 0xFEBC. I didn’t test a lot, but these were the positions that worked for me. From there, I’m not 100% sure of why it happens, but it’s pretty obvious that the game does something like “this spawn point doesn’t exist, abort, reset to starting spawn position” and that’s how you get to the cave entrance. Edit: Oh actually I might have an idea of why it can’t spawn you there. When you spawn, you don’t spawn exactly in the spawn position, at least in this place in the game. I think due to the slanted terrain, when spawning you slip downhill a little, and if the game was trying to make you spawn above water because of that tiny slip due to (I think) the downhill, then it makes sense that it stops trying to and resets you to the starting spawn. Also I have no idea why that particular (sub-)pixel updates the spawn position in an area that’s not supposed to, but I’ll chalk that up to bad programming. There might be many other magical (sub-)pixels like this in the game. Made a video of my theory, plus a little bit of an explanation on how spawning works: https://www.youtube.com/watch?v=UzMIhO081Ik I’ve uploaded the Lua I made for that video here: http://tasvideos.org/userfiles/info/23982940676404891
Joined: 5/1/2015
Posts: 12
Awesome video Alaktorn!!! Definitely sheds some light on the way the trick works. Thank you very much for finding all those addresses as well they will prove to be very useful. I can't thank you enough for putting some work into the game for no reason other than my asking. I can't test until next week but I will be putting in some time for sure!
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
Your appreciation is appreciated. Don’t be afraid to ask if you need help with something else. I like looking into game mechanics, anyway. Edit: Was checking if you could avoid updating the spawn point at all during the Misteria bit, but it looks impossible. I found that you can delay the spawn point updating indefinitely if you jump and after landing start spamming attacks, but that gets you nowhere and as soon as you move/jump again the spawn point updates so it looks useless.
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
Been looking into a few more things on Deuceler’s request. Sadly, I couldn’t find any sort of setup or helpful manipulation for the bat jump. I found speed addresses, but the values are a bit weird and seem slightly inaccurate (RAM speed acts really weirdly while holding R1)… Anyway, jumping is faster, but you get 1 frame of landing lag so if you’re already at top speed it’s slower (only faster to jump to accelerate). Jumping uphill is faster, and downhill slower. I don’t know if it was known, but the game has VSC (Vertical Speed Conservation). Basically when you land your Y speed gets stored rather than reset to 0, and next time you run off a ledge you get that speed back, so you can fall faster than normal. In theory you could also get a jump without jumping if you previously jumped and landed with upwards momentum, but I don’t know if that’s actually possible to do in the game. Here’s a new Lua which should work in both USA and JPN versions, draws XYZ position/spawn, horizontal speed, calculated speed which should be a bit more accurate than the RAM one, and prints RNG/speed changes depending on which function you comment-out in the code (defaults to RNG commented out): http://tasvideos.org/userfiles/info/28000393615146258 (calculated speed going to 0 at every lag frame is normal). It was super bugged at first and I tried my best to make it better, but it may still have bugs or inaccuracies. Report them if you find any.
Joined: 4/2/2014
Posts: 32
ALAKTORN wrote:
That makes 3 PS games that use the default RNG… FFT, Tenchu, and BFM.
You can add FFIX to that list (used by Tetra Masters and other things)
alt: Froggy25