creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Pasky13 wrote:
I was being rather silly, but his requirements are quite silly compared to other emulators.
byuu wrote:
It's because we have no known bugs. It gives a strong incentive for certain types to point out, "Aha! Look, bsnes does have bugs!" And, you know, it does. I never said it has no bugs. Zero bugs ≠ zero known bugs. I'm at zero known bugs because any time I find one, I fix it right away. But nine times out of ten, when bugs are reported around here, they are confirmed to also occur on hardware. bsnes is to the point where it faithfully recreates very minor glitches like a single 8x1 tile line blinking at the very bottom right of the screen in a game. I don't have an extraordinary amount of time, and I don't like wasting it chasing false bug reports. That's happened more times than I can count. As far as evidence to reproduce bugs: I want a picture of the game running on real hardware, yes. I've seen bugs caused by copiers and flash carts (eg Speedy Gonzales), other emulators avoid bugs (ZSNES and Dragon View is a good example), etc. And I also want a detailed description of how to trigger the bug. This information helps me to reproduce the issue, and to fix it. Once it's reported here, anyone on the forum can test and confirm/deny it. So the original submitter isn't required to go buy the game and get out the digital camera. Many people here are happy to help test bug reports.
</offtopic> :)
Player (37)
Joined: 2/16/2012
Posts: 282
For completeness, the wrong warp has now been verified on console. Check this video at the 3:02:00 mark. Final time was about an hour 17 minutes with an unoptimized route... a TAS might feasibly be under an hour?
PJ
He/Him
Joined: 2/1/2011
Posts: 182
Location: Western NY
A good TAS will definitely be under an hour. I had a run two days ago that go to the cutscene at a little over 1:09. I sadly missed the wrong warp, but that doesn't change my time getting there. I can probably cut another 3 minutes off that, and I collect some extra upgrades/items because I can't rely on health drops constantly. A TAS can definitely cut most of those trips out.
Player (54)
Joined: 11/20/2013
Posts: 103
Found a so-far-useless but fun little exploit in Dragon View while screwing around today, thought I'd share: https://www.youtube.com/watch?v=wM2rJ-oWe8w I've tried everything to get past the big firewall in the fire cave since that one obstacle makes you repeat 11 rooms. There doesn't seem to be a way past though, there's a solid wall that extends all the way to the ceiling after the fire. What I did manage to do though was overflow my height and drop down to the room below. By opening the menu repeatedly you can advance a couple frames at a time and either get hit repeatedly or not at all. The second time you get hit by the fire in the air you react like you took a hit on the ground, which leaves you walking on air so you can do the sword technique again. I'm pretty sure this is useless but I'm curious if there may be a way to climb back up from below in the fire, and if you're -extremely- lucky drop a serpent scale on the way. I wouldn't think it's possible except for one room in Sektra Temple later where you have to jump up to a screen above, I think it only happens there out of the whole game but it might possibly behave the same in the fire cave. I'll look into it, but anyways. Thought it was cool. EDIT: After lots of testing in the lower room, I can safely say you can't climb back up...
PJ
He/Him
Joined: 2/1/2011
Posts: 182
Location: Western NY
Oh cool! Nice find! This game has some real weird mechanics sometimes. I am reminded of the weird camera break that happened on that final mountain area: http://www.twitch.tv/pjdicesare/c/1757181 This is the only screen in the entire game I've been able to do this on. It is so stupid.
Player (54)
Joined: 11/20/2013
Posts: 103
That's... ridiculous. I've never seen that happen before, lol. I have yet to find anything at all useful though. I'm impressed with your original route PJ, I was initially sure that it would be easy to just cut whole minutes out of it but everything aligns so very well with that specific plan, the levels and so on. Still investigating. I'm trying one thing I've always wanted to test next though just for the fun of it - can you get all fire ring upgrades as soon as you get the ring? You're supposed to require fire boots from just about the very end of the game for the last upgrade in the desert, but I think with what I learned from that fire experiment I could force my way through. Still questionable whether fighting an entire boss in a room made of fire can be done but I wanna know. I believe you require a trigger to get the cutscene when you arrive in Miraj, but as far as I know you can go get the horn as soon as you're over Galys? Basically I'm just sick of TASing so I'm taking a weekend off to bug-test instead and hopefully, just maybe, find a new way to break things...
PJ
He/Him
Joined: 2/1/2011
Posts: 182
Location: Western NY
Yea I really like how the original route works out. Everything just comes together really nicely. Haha. I tried to get through the fire cave without boots a long long time ago and had no success at all. I tried doing really stupid things like doing an instant sword special to avoid the initial fire damage (like, hold the special button so you use it instantly when you land, and don't take damage), and then try to land on top of enemies after it. I just couldn't get through the cave. 3 potions isn't enough. I'd love to see what happens if you can though! I have no idea what triggers the sandworm quest. Seriously no idea. I am pretty sure I tried going directly to the sandworm quest without doing the ice temple, but I forget what stopped me. Maybe the old woman wasn't in the cave? I really don't remember. It's worth testing again for sure.
Player (54)
Joined: 11/20/2013
Posts: 103
Just tried to get to the horn woman directly after the fire cave and she's simply not there in her usual spot. I'll do some testing to see when she appears but I bet it's when you talk to Methraton at the end of Keire... On the way there, I also did some testing on the stupid rock blocking Galys Pass. You can totally abuse the same damage boost as in the fire cave, but it doesn't do you any good because the rock is twice as tall as it is: https://www.youtube.com/watch?v=R4BQpCaXUMQ EDIT: Woman is still not there after the Fortress boss. Also, Alex will use level 2 Fire Ring in the cutscene fight against Giza if you have it, but even if you cheat your ring to level 3 he won't use that. EDIT 2: Yup, talking to Methraton is the trigger for her to appear. I walked back from after the Giza confrontation and still empty.
PJ
He/Him
Joined: 2/1/2011
Posts: 182
Location: Western NY
Actually. Yea I do remember testing that now. Hahaha. Yea, I checked those same three times (before ice temple, after ice temple, after Giza) to make sure. Same outcome. It's a shame, really. :/ That rock video looks really cool! Shame it isn't useful. :(
Player (54)
Joined: 11/20/2013
Posts: 103
lol, I've found a lot of cool things that aren't at all useful lately... Anyway, fire ring level 3 confirmed possible as soon as the horn is available: http://youtu.be/cDCUFf9JbbA Menu abuse completely breaks this game, but unfortunately it takes 131 frames just to open and close it once so it's generally useless for speedruns, unless we can find some major skip with it. It's also pretty much TAS-only, you get a one or maaybe sometimes two frame window to avoid getting hit. I've been thinking all day but I haven't come up with one constructive use for this new tactic... P.S. Has anyone ever played Super Drakkhen, the Japanese version? There are a few differences immediately noticeable like a totally different title screen and at least one sound effect that's not in the U version (and my movies don't quite sync to it but I never expected that). I'm suddenly extremely curious if it has the same glitch at Ortah.
PJ
He/Him
Joined: 2/1/2011
Posts: 182
Location: Western NY
Hahaha that's so good! It's a shame it isn't terribly useful. Just for kicks, did you check the underworld cave? The one in the south/southeast desert that connects to the underworld and is covered in fire. I remember trying to go backwards through there but I don't remember what stopped me. Perhaps a blocked door? It's probably been over a year since I've tested these things and I have no notes, so please excuse my shoddy details. Hahaha. I haven't played Super Drakkhen but I do remember someone in my chat playing it and saying it had the same glitch at Ortah. It'd be worth double checking, though. After all, it does only take an hour to get there.
Player (54)
Joined: 11/20/2013
Posts: 103
Yeah, the underworld cave has a door that you need to trigger from the other side, it's just a dead end from the desert side. I've been lured into that suicide run more than once because I didn't remember. That screen glitch has me thinking though. Seems to me that because you jumped off the moving floor, maybe you were moving faster and slipped past the end-of-screen catch plane somehow, which would underflow your position to the other side. Doesn't seem useful, but IF we could trigger the same effect in a room with a locked door on one side, concievably you could wrap around and come in behind the locked door, and just maybe bypass it? I've had a similar thought regarding my height overflows getting underneath a breakable floor but that sounds even less likely to be useful. At the very least, if one were to do a 100% TAS they might just be able to cut most of a screen of walking time with your glitch. I can't think of anywhere these might come in handy, but my memory of everything after Ortah is pretty incomplete... Is there any room where you could save a lot of time by getting over a pit too far to jump? If there's an enemy there you could jump on them, get hit, fly up, jump, then sword tech for like a triple-jump, maybe make it. Possibly in Mt. Badsel somewhere? I wanted to get across the gap in "Landslide" so badly but there's nothing to get hit by and the stairs probably aren't stairs anyway... Anyways! Felt like doing some testing in the North Cave today. I have noticed before that you can walk through a door when you're not on the ground. This happens to me a lot in the very first room of Ortah, where if you jump-attack the warlock you'll often wind up standing on his head, and you can still walk through the door at that elevation. Was curious if maybe you could get past the statues blocking doors by standing on top of them but nope. Did manage another height overflow though, and an odd sword technique in midair. I've done that before but only by menu glitching to a standing position. This time I just jumped off something tall and was able to save myself before I fell in the pit. Not sure why. http://youtu.be/QmTKl6qL6io Also tried to get over ice pillars in the fortress, no success. I did manage to kinda-step on something kinda-glitchy like the galys pass rock mostly off the screen, but for the most part it's just a normal solid wall all the way up. One other thing I'm pretty sure of but need to test: Can you get through the illusion forest to badsel early? I think if you try without the "Blessing" the statue doesn't wake up and no cutscene and I'm pretty sure you can't just walk past, but not sure I've ever tried. EDIT: And if anyone can figure out the address responsible for the random "Jade Bounty" you sometimes get in overworld encounters, PLEASE let me know, it would be useful!
PJ
He/Him
Joined: 2/1/2011
Posts: 182
Location: Western NY
Khaz wrote:
That screen glitch has me thinking though. Seems to me that because you jumped off the moving floor, maybe you were moving faster and slipped past the end-of-screen catch plane somehow, which would underflow your position to the other side. Doesn't seem useful, but IF we could trigger the same effect in a room with a locked door on one side, concievably you could wrap around and come in behind the locked door, and just maybe bypass it? I've had a similar thought regarding my height overflows getting underneath a breakable floor but that sounds even less likely to be useful. At the very least, if one were to do a 100% TAS they might just be able to cut most of a screen of walking time with your glitch.
I tried this glitch in every single room in the game with this kind of screen transition (that is, an open edge as opposed to a door). I was unable to trigger the screen glitch anywhere except for that room in the mountain. It simply is not possible. :(
Khaz wrote:
I can't think of anywhere these might come in handy, but my memory of everything after Ortah is pretty incomplete... Is there any room where you could save a lot of time by getting over a pit too far to jump? If there's an enemy there you could jump on them, get hit, fly up, jump, then sword tech for like a triple-jump, maybe make it. Possibly in Mt. Badsel somewhere? I wanted to get across the gap in "Landslide" so badly but there's nothing to get hit by and the stairs probably aren't stairs anyway...
There is a place I used to damage boost over in 100%/"any% no game end glitch" in the Jade Mine. Normally you have you bomb through the floor and go through like 15 extra rooms, but if you damage boost across this gap by using one of the "arremer" enemies, you can skip all of that and go directly to the boss chamber. See this map for reference: http://www.gamefaqs.com/snes/588294-dragon-view/faqs/69301 You do the damage boost in room "7" in Basement 1. Then just proceed right and bomb the floor in "8" to get to the boss. This is the only useful gap I found worth boosting over. There MAYYY be some large gaps on Mt. Badsel but I don't know how the screen transitions work there. Another map for reference: http://www.gamefaqs.com/snes/588294-dragon-view/faqs/69329 If you can damage boost over the gap to the right of door 1, and then again below door 3, you can skip a bunch of rooms. No idea how that works, but it might be worth playing around with?
Khaz wrote:
Anyways! Felt like doing some testing in the North Cave today. I have noticed before that you can walk through a door when you're not on the ground. This happens to me a lot in the very first room of Ortah, where if you jump-attack the warlock you'll often wind up standing on his head, and you can still walk through the door at that elevation.
That is exactly where that happens to me too! I don't even sword attack, I just raw jump on his head as he is grounded, and then he rises and I walk through the wall to the next room. :P
Khaz wrote:
One other thing I'm pretty sure of but need to test: Can you get through the illusion forest to badsel early? I think if you try without the "Blessing" the statue doesn't wake up and no cutscene and I'm pretty sure you can't just walk past, but not sure I've ever tried.
Nope, you need the Blessing unfortunately. You never make it to the statue screen. It loops back to one of the previous rooms iirc. I don't remember exactly what happens (I think that's right though...), but I do know you have to get the Blessing. This game is surprisingly good at preventing sequence breaks. Except for, you know, that one that ends the game halfway through.
Player (54)
Joined: 11/20/2013
Posts: 103
PJ wrote:
I tried this glitch in every single room in the game with this kind of screen transition (that is, an open edge as opposed to a door). I was unable to trigger the screen glitch anywhere except for that room in the mountain. It simply is not possible. :(
Did you happen to experiment at all with jumping off other moving floors into screen transitions? I might give that a try some if I can find another spot with that setup. Thanks for the advice on the rest though, I'll be sure to look into those other gaps later. For now I'm driving myself nuts trying to figure out how loot is calculated in battle. I've pinned down a specific frame where it's calculated - if you (against a brown scorpion) press Y for one frame to do a standing attack, then advance 14 frames. At this moment what loot you get depends partially on what you're pressing on the controller for the next frame, you can change it by pressing different things. From a bit more messing around I found two addresses that will lock the outcome to one possibility if you freeze them both: $009473 and $009474. It seems so far that whenever you get the "jade bounty" $009473 comes out as $3F, but if you set it to $3F manually beforehand you just get one normal jade. However, I still don't know what else is actually involved in the calculation. I'm sifting through a trace log of that frame comparing a couple different loot outcomes but nnnnnnngh, 14520 lines of instructions for one frame? How can you find your way around in that. And because I'm bored, a couple other fun memory addresses I've found: -007028 - Alex's rate of change of height. Set to 00, he floats slowly upwards. Goes from 04 to FC when you jump. Standing on the ground it flips between FF and 00 every frame. Going to use this to fly around and test things. -006F9D - Alex's X position on screen in random encounters
Player (54)
Joined: 11/20/2013
Posts: 103
Last one of these for now: http://youtu.be/lS9nDfucri4 Just wanted to know for sure about the landslide, and yup it's nothing. You can also cross any gap in Mt. Badsel that doesn't involve a screen transition. Sadly you can't go across those screens. The HP upgrade jump and the one you mentioned before would definitely save time. Too bad it's slower to come out through the solid rock, would love to show that off. Abusing that $007028 is fun though. Anything 3 or less and you just float up and hit the roof, but if you set it to 04 you go fast enough to slip through and keep wrapping around upwards. Objects in town exist inconsistently. The shop counter is a solid wall but some tables you can drop right down inside, others you can land and walk around on. It seems to suggest they planned to give you the ability to jump in towns at one point? Also you can stay in the room before the fortress boss, you can float up and land on the ledges, walk around and drop down further to the right and land on top of him.
PJ
He/Him
Joined: 2/1/2011
Posts: 182
Location: Western NY
Dang. That's pretty much what I was afraid of. Screen transitions in this game are pretty....weird. Thanks for looking into it though!
Player (54)
Joined: 11/20/2013
Posts: 103
So I've spent the last couple days hunting down exactly how the enemy drops are calculated and it's a lot more painful than I expected. During that key frame I mentioned earlier, the last possible moment you have to influence the drop, this happens:
80e3c1 lda $2137     [802137] A:0080 X:0002 Y:f06c S:1ff5 D:0000 DB:80 NvMxdizc V:237 H: 256
80e3c4 lda $213c     [80213c] A:0021 X:0002 Y:f06c S:1ff5 D:0000 DB:80 nvMxdizc V:237 H: 280
80e3c7 pha                    A:0045 X:0002 Y:f06c S:1ff5 D:0000 DB:80 nvMxdizc V:237 H: 304
80e3c8 lda $213c     [80213c] A:0045 X:0002 Y:f06c S:1ff4 D:0000 DB:80 nvMxdizc V:237 H: 324
80e3cb pla                    A:0044 X:0002 Y:f06c S:1ff4 D:0000 DB:80 nvMxdizc V:237 H: 348
80e3cc adc $a5       [0000a5] A:0045 X:0002 Y:f06c S:1ff5 D:0000 DB:80 nvMxdizc V:237 H: 374
80e3ce sta $a5       [0000a5] A:0053 X:0002 Y:f06c S:1ff5 D:0000 DB:80 nvMxdizc V:237 H: 394
80e3d0 lda $213d     [80213d] A:0053 X:0002 Y:f06c S:1ff5 D:0000 DB:80 nvMxdizc V:237 H: 414
80e3d3 pha                    A:00ed X:0002 Y:f06c S:1ff5 D:0000 DB:80 NvMxdizc V:237 H: 438
80e3d4 lda $213d     [80213d] A:00ed X:0002 Y:f06c S:1ff4 D:0000 DB:80 NvMxdizc V:237 H: 458
80e3d7 bit #$01               A:00ec X:0002 Y:f06c S:1ff4 D:0000 DB:80 NvMxdizc V:237 H: 482
80e3d9 bne $e3e2     [80e3e2] A:00ec X:0002 Y:f06c S:1ff4 D:0000 DB:80 NvMxdiZc V:237 H: 494
80e3db pla                    A:00ec X:0002 Y:f06c S:1ff4 D:0000 DB:80 NvMxdiZc V:237 H: 506
80e3dc adc $a5       [0000a5] A:00ed X:0002 Y:f06c S:1ff5 D:0000 DB:80 NvMxdizc V:237 H: 532
80e3de sta $a5       [0000a5] A:0040 X:0002 Y:f06c S:1ff5 D:0000 DB:80 nvMxdizC V:237 H: 592
80e3e0 bra $e3e3     [80e3e3] A:0040 X:0002 Y:f06c S:1ff5 D:0000 DB:80 nvMxdizC V:237 H: 612
80e3e3 lda $a5       [0000a5] A:0040 X:0002 Y:f06c S:1ff5 D:0000 DB:80 nvMxdizC V:237 H: 630
80e3e5 plb                    A:0040 X:0002 Y:f06c S:1ff5 D:0000 DB:80 nvMxdizC V:237 H: 650
80e3e6 rtl                    A:0040 X:0002 Y:f06c S:1ff6 D:0000 DB:7e nvMxdizC V:237 H: 676
8198cd and #$3f               A:0040 X:0002 Y:f06c S:1ff9 D:0000 DB:7e nvMxdizC V:237 H: 718
8198cf beq $98db     [8198db] A:0000 X:0002 Y:f06c S:1ff9 D:0000 DB:7e nvMxdiZC V:237 H: 730
The first line seems to serve no purpose when it gets immediately overwritten. Also, does anyone else notice when it loads, pushes, then loads 80213c/d again, the value it gets from that address is different from the first time? How is that possible? From what I read the $80 bank is just supposed to be a mirror of $00? (At this point I should probably note I made these traces and started writing this post in Bizhawk 1.7.2, which had some problems.) Anyways. If the branch at the end of that block is taken (which is one major difference between traces that end in the bounty and those that don't), it runs this extra piece:
8198db lda #$0f               A:0000 X:0002 Y:f06c S:1ff9 D:0000 DB:7e nvMxdiZC V:237 H: 748
8198dd ldx $db       [0000db] A:000f X:0002 Y:f06c S:1ff9 D:0000 DB:7e nvMxdizC V:237 H: 760
8198df sta $7084,x   [7e7184] A:000f X:0100 Y:f06c S:1ff9 D:0000 DB:7e nvMxdizC V:237 H: 788
8198e2 bra $98f0     [8198f0] A:000f X:0100 Y:f06c S:1ff9 D:0000 DB:7e nvMxdizC V:237 H: 820
8198f0 sta $00       [000000] A:000f X:0100 Y:f06c S:1ff9 D:0000 DB:7e nvMxdizC V:237 H: 838
So the #$0f winds up in 000000 (it's a #$b4 if you don't go this branch) and that address 7e7184 being set later triggers another branch. As far as I can tell this is the trigger for the enemy drops, and if so it should give you the bounty whenever $0000a5 is $c0, $40, or $00 - I still need to test this. I have several traces that should be identical up to the final frame and diverge by one button at that point, some give the bounty some don't. Nowhere in these traces is 80213c or 80213d written to, but when those addresses are read from the outcome is different depending on which button you're holding, seemingly. From just screwing around I know this: What drop you get from an enemy depends both on time and what you're holding on the controller as it dies, and what's in $0000a5 determines it. The problem is $0000a5 seems to change randomly, sometimes when you move and sometimes when an enemy moves but nothing predictable. There also seem to be two different points where $0000a5 changes, right when you hit it and right when it starts to explode. I can't figure out the part of the equation that changes with time yet, I don't really know how different buttons factor in... It's just too much reading when I don't know what anything represents. Does anyone have any suggestions on a better way to go about this? If it takes this much digging for every little thing you want to understand I don't know how you can get anything done, I'm only learning anything at all after comparing about ten different traces together. If anyone happens to want to have a look themselves, here's a Bizhawk movie that leads straight to one. I've noticed that if you hold Y for two frames it works, but just one and it doesn't and if you hold Y down too long (past the decision point) it also doesn't work. http://www.mediafire.com/download/3n3v3abci7jl47j/Jadehunt.bk2
Player (37)
Joined: 2/16/2012
Posts: 282
$213C is a hardware register, specifically the horizontal scanline location. My guess is that it decrements every time it is read, but I'm not too familiar with the register interactions. Source: http://www.proprofs.com/flashcards/story.php?title=snes-registers If I'm reading the trace right it checks $A5 to see if any of the last 6 bits are set (and #$3F). Assuming that the possible values of $A5 cover the full byte space, you have 4/256 chance to hit the bounty, for values of $00, $40, $80, and $C0. It sounds like $A5 is the RNG, and it triggers on-call, meaning it will be static so long as you're not doing anything that uses randomness. What will be important is finding a trace with the RNG update subroutine to see where it grabs its entropy, which from what you say should involve a frame counter and/or user input. My advice is to watch $A5 and find a frame where it changes, and then use a trace of that frame to track it down.
Player (54)
Joined: 11/20/2013
Posts: 103
Omnigamer wrote:
Assuming that the possible values of $A5 cover the full byte space, you have 4/256 chance to hit the bounty, for values of $00, $40, $80, and $C0.
Note to self: If this turns out to be true, send kudos to The Admiral on GameFAQs. His FAQ says the "odds seem to be about 1/64". If 80213c/d are the horizontal and vertical scanline positions then everything makes a lot more sense. That explains, for one thing, why they never seem to change in RAM watch. Also probably explains how it can change between reads. I'll do some more looking but I may already have the whole picture: If a5 just has the scanline coordinates added in every time it's updated that would explain it - since that part comes after the controller-recognition interrupt block, different buttons will take different amounts of time to get there and thus change the scanline position. If so, we should have a deterministic situation where each additional button held will add a set amount to those counters (also factoring in the new-button-press-since-last-frame calculations. ($38, $39, $3e, $3f represent buttons that are currently pressed. $3a, $3b, $42, $43 represent buttons JUST pressed this frame. $3c, $3d, $40, $41 represent the previous frame's controller input) If this does turn out to be the generic RNG source for the game I'll be interested to see what else it influences along the way. It'll probably help a ton for TASing, since I'll be able to see exactly when it's making RNG-based decisions. I will look into it more. It would be nice if I can reproduce that at will.
Player (37)
Joined: 2/16/2012
Posts: 282
Yeah, for future reference RAM space is only mirrored the first 0x2000 addresses for any given bank, that is every address xx1FFF and below. There is more RAM space than that, but it is not addressable unless it explicitly loads from banks 7E or 7F. Which is to say that 7E4000 is a RAM address, but 804000 is not. If you see things changing that are outside of that range (such as 80213C) you can bet they are some special register.
Player (54)
Joined: 11/20/2013
Posts: 103
So it seems that $0000a5 always comes from the same two scanline counter variables. I'm confused about a few things though:
80e3d9 bne $e3e2     [80e3e2] A:0048 X:0005 Y:f06c S:1ff4 D:0000 DB:80 nvMxdiZc V: 74 H:  68
80e3db pla                    A:0048 X:0005 Y:f06c S:1ff4 D:0000 DB:80 nvMxdiZc V: 74 H:  80
80e3dc adc $a5       [0000a5] A:0049 X:0005 Y:f06c S:1ff5 D:0000 DB:80 nvMxdizc V: 74 H: 106
80e3de sta $a5       [0000a5] A:0000 X:0005 Y:f06c S:1ff5 D:0000 DB:80 nvMxdiZC V: 74 H: 126
80e3e0 bra $e3e3     [80e3e3] A:0000 X:0005 Y:f06c S:1ff5 D:0000 DB:80 nvMxdiZC V: 74 H: 146
80e3e3 lda $a5       [0000a5] A:0000 X:0005 Y:f06c S:1ff5 D:0000 DB:80 nvMxdiZC V: 74 H: 164
That's what happens if you don't take that bne $e3e2 branch in the first code I posted, and...
80e3d9 bne $e3e2     [80e3e2] A:0003 X:0050 Y:c963 S:1ff2 D:0000 DB:80 nvMxdizc V:259 H: 810
80e3e2 pla                    A:0003 X:0050 Y:c963 S:1ff2 D:0000 DB:80 nvMxdizc V:259 H: 828
80e3e3 lda $a5       [0000a5] A:0003 X:0050 Y:c963 S:1ff3 D:0000 DB:80 nvMxdizc V:259 H: 854
That's what happens if you do. So, can anyone explain to me what's at address 80e3e2? As I understand it, if you have BRA $e3e3 at 80e3e0 then your ROM looks like this: 80e3e0 - 80 (BRA) 80e3e1 - e3 80e3e2 - e3 Yet when we branch directly to 80e3e2 we get PLA, which is $68. Shouldn't it be a Stack Relative SBC ($e3)? Anyways. If you take that branch you simply skip the part where you add the vertical scanline counter to a5, ie/ you only add it if it's an even number. EDIT: Hey me from the past, it's me from the future. Yeah I can answer that: Branches are relative, so the $e3e3 isn't actually in the ROM. The ROM goes like 80 01 68. I still don't get how the counters work though. For example:
80e3c4 lda $213c     [80213c] A:0021 X:0050 Y:c963 S:1ff3 D:0000 DB:80 nvMxdizc V:259 H: 596
80e3c7 pha                    A:0094 X:0050 Y:c963 S:1ff3 D:0000 DB:80 NvMxdizc V:259 H: 620
80e3c8 lda $213c     [80213c] A:0094 X:0050 Y:c963 S:1ff2 D:0000 DB:80 NvMxdizc V:259 H: 640
80e3cb pla                    A:0094 X:0050 Y:c963 S:1ff2 D:0000 DB:80 NvMxdizc V:259 H: 664
Both reads return $94 which is 148, while H is at 596 and 640.
80e3d0 lda $213d     [80213d] A:00b7 X:0005 Y:f06c S:1ff5 D:0000 DB:80 NvMxdizc V: 73 H:1352
80e3d3 pha                    A:0049 X:0005 Y:f06c S:1ff5 D:0000 DB:80 nvMxdizc V: 74 H:  12
80e3d4 lda $213d     [80213d] A:0049 X:0005 Y:f06c S:1ff4 D:0000 DB:80 nvMxdizc V: 74 H:  32
80e3d7 bit #$01               A:0048 X:0005 Y:f06c S:1ff4 D:0000 DB:80 nvMxdizc V: 74 H:  56
In this one, first read of the vertical scanline counter returns $49 which is 73, okay. Second read, after it has incremented to 74, returns $48....
80e3d0 lda $213d     [80213d] A:0094 X:0050 Y:c963 S:1ff3 D:0000 DB:80 NvMxdizc V:259 H: 730
80e3d3 pha                    A:0003 X:0050 Y:c963 S:1ff3 D:0000 DB:80 nvMxdizc V:259 H: 754
80e3d4 lda $213d     [80213d] A:0003 X:0050 Y:c963 S:1ff2 D:0000 DB:80 nvMxdizc V:259 H: 774
80e3d7 bit #$01               A:0003 X:0050 Y:c963 S:1ff2 D:0000 DB:80 nvMxdizc V:259 H: 798
And when V is 259, reading 80213d gives 0003... As in 256+3? And the start of this block always has that useless read of 802137 "SLHV - Software Latch for H/V Counter" first. I'm guessing that's just some prerequisite for reading the counters? Anyways. I think you can forget my earlier optimism about this being easily predictable. Seems like it could be next to impossible to predict what part of what scanline this block will fall on... For the purposes of TASing at least I've got a variety of input combinations on and before the frame I need, so hopefully I can provoke one every time without having to sacrifice frames for it. I just really hope there's no artificial limitation put on it like it not happening twice inside the same battle or something. And just for the record I also know that 009473 and 009474 are involved somewhere down the line, since you can screw with the results by freezing them. If you freeze 9474 you can end up getting the bounty of drops but not just restricted to jade, and freezing them both tends to make the outcome stay the same.
Player (54)
Joined: 11/20/2013
Posts: 103
Another quick question:
92e76e lda $92fb9b,x [92fba3] A:0008 X:0008 Y:0002 S:1ffa D:0000 DB:80 nvMxdizc V:257 H:1126
92e772 sta $7e3d01   [7e3d01] A:00dd X:0008 Y:0002 S:1ffa D:0000 DB:80 NvMxdizc V:257 H:1156
Just trying to find out where $003d01 comes from and I see this, but I can't figure out where $92fba3 is... But this is fun though: $003CFF represents what room you're in. $003D19 and $003D35 seem to represent what room is to the left and right of you respectively. I was trying to find addresses for rooms above and below you, but since there can be multiple up and down choices per screen it's probably more complicated. This $003d01 though takes in a value corresponding to the room you're entering as soon as you start a screen transition. If you poke it to something else the moment it's written, you wind up in a different room. I've experimented a bit and found several already that just teleport you perfectly fine to another spot, and many more that take you to glitched up rooms, some with no floor, pallette-swapped enemies and you'll often suddenly die. I look forward to testing all 256 rooms just in case there's any real content that was simply not put in the game. :P
Player (37)
Joined: 2/16/2012
Posts: 282
If it's indexed by X, it usually means that it's just some data table in the ROM. I have absolutely no context on what is changing here, but my guess is that you'd find a table of values about 32 to 256 wide at position $92FB3B in the ROM. It helps you more to trace where the X comes from in this instance.
Player (54)
Joined: 11/20/2013
Posts: 103
Aha, there it is in the ROM: 92/FBA2: D9DDE0 cmp $E0DD,Y I tried earlier to just RAM-watch that address as a "CartROM" value in bizhawk, but it wasn't seeing the correct $DD that way. Anyway! At least I understand how that works now, thanks! Bit more information about the screen transitions: -If you want to test abusing the memory like I am, the best way is to poke the screen-to-the-left (or -right) address 003D19 (or 003D35) to something then just walk across. I've never seen the RoomToLeft variable be inaccurate but sometimes (in town) the RoomToRight one is 00 for no reason I can tell? -The value 00 corresponds to no screen transition, and the value FF makes you exit the current town or whatever you're in. -$006F9D and $006FA1 are Alex's X and Y coordinates within a room, you can just set them and appear in that spot. -You can't seem to come in behind a locked door and trigger a screen transition, you just get bumped back out of the wall and unlock the door normally. -Can't seem to trigger a screen transition without something to stand on... Tried the same thing I did on Mt. Badsel after setting the room to left manually but you just don't go across. EDIT: As usual, it's never as simple as I'd hope. Some rooms you seem to appear perfectly as normal, others just don't work right. The shop is defined as room 02 for example, but when you put in 02 to go there you get a bugged result depending on where you came from. If you were elsewhere in town, the shopkeeper will be there but the room will be bugged out, like the fire cave or something. If you were in a combat area, you'll appear inside the shop as normal but it'll be empty. It seems whether you are in combat or non-combat mode defines how the room around you is rendered, and a lot of variables must need to be set on initially entering a dungeon for it to appear right. If you glitch your way to a town from a dungeon the people will all be gone and often strange scripted events will happen, and if you go the other way around there will be people everywhere in the dungeons and things will generally be very crashy. Things are pretty crashy regardless. Still fun to screw around with. EDIT 2: ALRIGHTY THEN I've found that Wet Cavern room 1 and Qunos's house both correspond to room # 1B. Sooo, there's more to it than just one byte... Bleh I'll go trace diving again tomorrow.
Player (54)
Joined: 11/20/2013
Posts: 103
I believe I've resolved my screen transition thing and then some. 003CFF and 003D00 form a two-byte room number, with 3CFF covering the full 256 values (Including 00 = No Room and FF = Exit Dungeon) and 3D00 ranging from 00 to 03. I went and mapped the values to all known rooms in the game (though I'm sure I missed a few particularly in giza's palace). You can see the list here in .csv format: http://www.mediafire.com/download/90o22xtfuamy85b/Dragon+View+Rooms.csv I've observed that wide rooms actually count as two rooms, if you try to manually enter the right half of the room (the next address down) it appears as a glitched-up single screen room. I've logged 613 rooms with maybe 1/3 of them being wide, so that still leaves a lot of unused space. I plan to investigate all of it. From what I've seen so far most of them are just empty single rooms with no exits that look like the ice fortress (though graphics are often wrong when moving between rooms manually, so it could look different depending on where you enter from). More betterer information this time: -003D19 does indeed represent what room is to the left of the current screen. -003D1A, I think, specifies whether the room's left exit is blocked by a door. If it's closed, it's $80, if it's open, it's $00. -003D35 represents the room to the right of the current screen IF current screen is only a single screen wide. I'm sure there's another address that represents the same for wide rooms, haven't looked yet. -As I said before FF means exiting the current dungeon, but no matter where you teleport to you'll still come out of the last dungeon you legitimately went inside. -002011 is the switch for the annoying triggered door in the Desert Cave. If it's open it's $FF, closed it's $FD. So, the switch is just the second bit, I'm sure other switches are stored here too. -You can't get through the Illusion Forest early because you never reach the Statue room. When you should go through to the second-last room you just go back to the start again. -If you come into the Keire Giza cutscene from the wrong door, it will bug out when he shoots a projectile and it never connects with you, leaving you both stuck. This should totally count as beating the game as he remains there and can no longer do evil. -This I'm curious about: Starting at address $002138, right after the player's inventory, the RAM spells "S-DRAKKHEN". It's written there right after you chose player name and save slot, changing either doesn't affect it, and nothing seems screwed up without it. o.o I'm tired now.