Posts for adelikat

adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
meh
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
the slowest game would have to be dragon warrior since you have to talk to the king, get the treasure chest, open the door and walk outside, and even then it will take a while to be killed by a slime for fastest death - zanac might be a good candidate
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
Yay! If you can make this you will save me sooooooooo many tedious frustrating hours!
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
Making a luckbot wouldn't be that hard, heres specifically what I would need from the current point in the movie (or particular savestate), the bot would need to systematically check every combinations of button pushes of all the buttons for 5 frames. After each combination it would check to see if a critical occured, if so then stop (and hopefully display which button combo it used). If after checking all possible all possible combination and still no critical it would notify that it was done and failed, that way I could advance 1 frame and re-run the luckbot. the combination of button would need to be all button except start. and only 1 button pushes at a time. The 1st frame should always be a button push, but the remaining frames could be null The advantage of the bot over a battle simulator is that all it needs to do is check the ram address that tells when a critical hit has occured rather than trying to reconstruct the process. Also in the future, changing the ram address that it checks, The bot could be changed to find treasure drops.
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
Silas wrote:
I could help with or do the programming if needed (if you say you already got the ram offset and values, I think it would be pretty easy to do). What do you actually need? Something to play the game until a critical hit or two is done (bisqbot) or something that will tell you which button to press and when to get a critical (easier to do)?
YYEESS!! please do either method will be fine, all I need is for it to a) play the game until 1 critical hit happens or tell me which buttons to push to get the critical This is some info someone emailed me: For my terrific blows GG code, the offset in the ROM is $0457DB, which is CPU address $97CB. If you've used the debugger for FCEU and want to see what's happening, you might want to put an execution breakpoint at address $97C8. This is inside the code for player critical hits only (monsters sold separately.. er, wait a minute :). What my code does is force the game to accept any random number as "good enough" to trigger a critical. It does that by diverting a "failure" result into the critical-hit code, instead of skipping over it. The actual game code goes back further, but unfortunately this game uses the BRK (opcode 00) instructions, which seems pretty unusual [none of the other DW games uses them, as far as I know, nor does FF1]. I read once somewhere that the 6502 generally doesn't like them. :) It's a software interrupt, usually used for debugging, or so I understand. In this game, BRK instructions are used as general-purpose functions for very common tasks, usually accessing data or calling code that's in a different bank (handles all of the mapper / bank-switching messiness). So, if you trace through these calls, you'll notice that it takes a long time because there's alot of overhead before and after the actual function, which can be quite confusing. I've tried traced through some of it before, but due to the complexity, I haven't mapped it all out. The BRK calls used by the critical-hit code were unknown to me, but through further tracing, I've gotten a better understanding of these ones. I can't be certain I've got it all figured out, but I'm pretty confident. I'll try to give a summary here of that particular code. The first things it does are to check for special modifiers for critical hit probabilities. The first modifier it checks for is if critical hits for the attacker are disabled.. that would happen if certain weapons like the poison needle are equipped, which cannot critical. Also, a character under the influence of the BiKill spell cannot critical, I believe. In this case, it skips the critical-hit code altogether. The other modifier it checks is if the auto-critical flag is set, wich means all hits are guaranteed to be critical. The Chance spell's "morale boost" will trigger this.. not sure if anything else will. This causes the game to go directly to the critical hit code, bypassing all randomness checking, etc. Once past those checks, it will set the threshold for a critical hit. The default is 4 (out of 256).. pretty slim. It will then find out the identity of who's turn it is.. it seems more complex than it needs to be, but I trust the programmers had good reason. :) It does all of this to find out if it's Alena's turn.. if so, it calls a function to get her level, which then replaces the default threshold. That translates to just under 0.4% chance per level. At level 99, her chances would be 99/256, which is a little over 38.5%.. pretty nice, of course that's out of the question for a time attack. =} It may be there are exceptions to her threshold being equal to her level (haven't tested enough), but it really doesn't seem like it. Once the critical-chance threshold is finalized, it calls a function to get a "random" number. This seems to be similar to what DW2 uses for randomness. As far as I can tell, it's based on a CRC16 checksum (usually used to verify that saved games haven't been corrupted by battery failure). Each time it's called, it uses the previous output. The randomness uses only 1 of the 2 bytes generated (the low-byte) and adds a modifier that's increased by 1 each time through.. this final result is the actual "random" number that's returned. If this number is the same as, or higher, than the threshold it will not be a critical hit.. that will happen only if it's less than the threshold value. (If you want to trace through the random-number making process, set a breakpoint at $C891.. by the time it reaches $C8AC, the value in the A register will be the "random" value used. It's recommended to set a breakpoint at $97C5 first. Once that gets triggered, set the $C891 breakpoint... that way, you'll be sure that it's related to the critical-hit randomness checking instead of other randomness.) Now, this is only called when needed. However, the low part of the crc value is modified seemingly every frame, so that's where the frame-level of randomness comes through as a result. It seems to be increased by 1 each time and is limited to 8 bits (which means it rolls over to 0 after 255 and doesn't affect anything else). The CRC values are in locations $12 and $13, with the CRC modifier at $050D, which you'll see if you decide to trace through it. 97A4: AD E7 72 LDA $72E7 ; Some battle flags.. (bit-wise) 97A7: 29 08 AND #$08 ; Check if critical hits allowed. 97A9: F0 2C BEQ $97D7 ; If not, skip critical-hit code. ("BiKill", poison needle, etc.) 97AB: AD E4 72 LDA $72E4 ; More battle flags.. (bit-wise) 97AE: 29 08 AND #$08 ; Check if always critical. (Chance spell effect "Morale boosted") 97B0: D0 1A BNE $97CC ; If so, bypass critical-hit probability tests. 97B2: A9 04 LDA #$04 ; The following part is used in determining the random chance of critical. 97B4: 85 00 STA $00 ; Start with value $04 into location $00. Base chance = 4/256 (= 1/64) 97B6: 00 06 BRK $06 ; A black-box function call.. seems to lookup the index of which character's turn it is. 97B8: 1F .DB $1F ; (extra data for the BRK instruction) 97B9: 00 2B BRK $2B ; Use index to lookup character data.. in this case, gets their character number. 97BB: 53 .DB $53 ; (extra BRK data) 97BC: C9 07 CMP #$07 ; Is it Alena? (is character number a match for Alena's number?) 97BE: D0 05 BNE $97C5 ; if not, skip over Alena's special handling. 97C0: 00 0F BRK $0F ; Get Alena's level. 97C2: 53 .DB $53 ; (extra BRK data) 97C3: 85 00 STA $00 ; Set the critical chance threshold. 97C5: 00 1B BRK $1B ; Get random value that will be critical chance. 97C7: 0F .DB $0F ; (extra BRK data) 97C8: C5 00 CMP $00 ; Compare it to threshold. 97CA: B0 0B BCS $97D7 ; Is it at least as high? If so, no critical hit (skip next part). (My GG code changed branch destination to next instruction) 97CC: 20 16 99 JSR $9916 ; Critical-hit related code follows. 97CF: 20 2E BF JSR $BF2E 97D2: 88 DEY 97D3: 00 F2 BRK $F2 97D5: D3 .DB $D3 97D6: 04 .DB $04 97D7: 20 8B A7 JSR $A78B ; Regular hits skip to here.
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
ditto, this seems to be a good rough draft but should be redone. This can certainly be done faster the 65 re-records is rather low even for a minute long movie.
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
nitsuja wrote:
much better would be to have BisqBot optimize each hit individually, and only roll back all the way if it can't find any input that works at all for one of the later hits (or if it succeeds in killing the boss and wants to try again). That's what I had in mind when suggesting to try it in boss battles, that the segmented nature of the battle be taken advantage of to speed up the search. (I'm talking about boss battle optimizations in general so maybe I'm overlooking something specific to Gutsman here...)
for bigger events, the only potential problem with this method is that is would eliminate the possibilty of skipping the "goal" entirely. for instance if you were to try to make this play the wily stage of mm1 and one of the goals was to get to cutman as soon as possible it would never "discover" how to bypass the boss entirely.
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
I agree with coolbumbty's last comment. The glitches are now so over my head I can't contribute anything substantial. I'll I can do is sit here and gawk at the mpg's
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
but only after bisqwit spends a year making the 30 second version
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
*picks up jaw off of floor* :o I bet bisqwit thought all the hard work was over ;)
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
lol, I knew it wasn't over! More improvements Couldn't the method used in these .mpg's be used in other areas as well?
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
dont matter how you look at it, the user will have to know the relevant ram addresses. In many cases these are already known (either from people here or searching gamefaqs, etc) How about making it so that when you run the "bot" that it requires manually entering the ram address and 2 value ranges (one for succesfull one for failed) and then how many frames to run for. Of course this method would be specifically for luck manipulation so randomly trying all combinations of button presses would be perfectly fine. To further optimize it perhaps you could toggle which buttons would be used in the random searches (for instance in DW4, select and start always have the same seed) Finding earliest frame that sprite x would appear would require a different type of code. Maybe it could evovle into different kinds of bots like luckbot, speed bot, etc? All user friendly and easily adaptable for different games.
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
well, here it is http://dehacked.2y.net/microstorage.php/info/184/Dragon_Warrior_4_%28U%29.fcm anybody who wants to mess around with it, good luck. univbee: thanks for the compliments. and if you do decide to take up dw3 or dw2, I'll be glad to help out. I'll really want to see run of these games too.
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
Unfortunately no progress, but not from lack of effort. I'm stuck trying to get a critical with alena on the chameleon fight. there's only a 1/256 chance of success and I have to do 2 of them! I got the 1st one and the 2nd one just doesn't want to happen. I've done approx 1300-1400 re-records on this one spot and still nothing. Either that's really rotten luck or something doesn't work the way I think it does so I will need to look into it. Anybody who follows this thread who hasn't read bisqwits post in the megaman 1 thread should do so immediately. He has created his "bisqbot" to play portions of his run. The code is posted. This has very BIG potential for RPG runs, especially DW4. If anyone knows how to program in C and is interested in seeing this run completed, they should look into adapting this code for finding critical hits for DW4. The required ram address is already known as well as the values needed. I will post them for anyone who would be interested in doing this. If no one else can do this I will attempt to do so. Having said that, I know NOTHING about c! (any help would be greatly appreciated) So it may be awhile before I am able to do it myself.
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
thanks
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
Bisqwit wrote:
Michael Fried wrote:
Voted yes, but I'm wondering if this movie is a little too glitched. Maybe it would be of some benefit to have a non-glitched movie in addition to this one?
Nah, if you're going to limit creativity, I suggest you go with TG rules then and make it non-tool-assisted, in which case it's not on the focus of this site. You could watch Morimoto's original movie for reference. The reason these updates are interesting is not because N frames was squeezed from jump 551, but because new strategies have been discovered.
I Couldn't have said it better myself!
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
I measured the 2nd enemy group at the point were both enemies are lying on the ground and you are 2 frames faster regardless of any frame rule. Good job I've given up on this game at this point, good luck with your run I should be alot faster if you are up by 54 frames in only 2 fights! EDIT: It would be a good idea to figure out how the frame rule works. There maybe situations where defeating an enemy group is slower doesn't cost you any frames. In those situations you might have time to get in an extra punch or kick and get more points. You only need a few more to get the 6th heart before fighting the last linda's. You could then use the elbow move on them immediately (which kills them immediately).
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
Ok here are my calulations: place phil mytest comments intro 598 578 +20 measures from 1st frame that "mission 1" appears 1st grp 1540 1531 +9 apparently I lost 11 frames this time :( 2nd grp 2161 2173 +38 gained 29 frames in this group the enemy groups are measures from the 1st frame you see the "thumbs up" sprite
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
I have the .fcm file that I used for the calculations of the title screen and 1st 2 enemy groups. I can send it to you if you want, let me know on IRC. I don't want to post here because I'm lazy and it would take effort ;)
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
Phil wrote:
adelikat wrote:
title screen = 20frame improvement
I don't think it is possible to do the title screen in 9 frames. In my famtasia movie, it lasts 28 frames. It could be to start from reset instead of power on. Double Dragon is like MTPO. When you use soft reset, it skips the intro. And even so, I've just tried it with soft reset and it doesn't give 20 frames faster. Only 11 (14 due to some frame rule like in SMB).
maybe I mis-caluclated somewhere, though I'm including the "Mission1" screen in there too (if by some chance that has something to do with it). The 1st frame that the level starts is where I was counting from. Most likely I have a mis-calculation I doulbe check BTW, are you officially working on this run now?
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
doh!
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
And of course, you need to come up with an algorithm that generates realistic button presses. In Rockman's case, it is realistic to hold certain buttons down for certain times, and to shoot occassionally.[/quote] only because time is a factor (too many choices for the computer to try quickly lead to ridiculous calculation time) what might be more useful more more micro option (approx 20 frames) would be on option in tell the program which button to use in the process. For instance, the section of megaman you are testing would only need the left, right, b, and a buttons. In other situations, you might eliminate more. perhaps to make it more useful it could have an option that certain buttons are held down the entire time (like if it were certain that the character must always move to the right during x frames) I'm just thinking of a more generic program options that could be implemented on other games rather than game specific algorithims. Could you post your code? This seems to be potentially a very valuable tool for other TAS's! ESPECIALLY my DW4 run!
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
Do you think this bisqbot could become usuable for other games. It seems that the only required pieces of inormation would be a ram address and a target value range for that address. Maybe this could be a program where you type in the RAM address, value range, and number of frames past savestate x you wish to search? Also, the possiblity of a null frame range between the last frame tested and the RAM address check. That would be helpful for RPG's since the tartget action is calculated some frames after the user input.
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
I agree with Truncated, very interested but speechless. The implementation of Bisqbot is a jaw-dropper. Seems unprecendented to have a computer "solve" sections of a TAS!
It's hard to look this good. My TAS projects
adelikat
He/Him
Emulator Coder, Published Author, Site Developer, Site Owner, Expert player (3602)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
Interesting, I do the EXACT same method as Bisqwit.
It's hard to look this good. My TAS projects