Sand
He/Him
Player (133)
Joined: 6/26/2018
Posts: 174
Dacicus wrote:
Why did you pause at approximately 5:00? Was it related to the vertical camera recentering delays? Or RNG manipulation?
That's to wait for the disappearing blocks. I tried, but wasn't able to hit an earlier cycle. The blocks' cycle starts when you hit the checkpoint on top of the most recent conveyor belt, so it's hard to see getting there any faster. You must either wait at the beginning or wait while on the disappearing blocks, and I preferred to wait at the beginning and show off jumping from a block on the frame after it has disappeared. Even though I wait until the last possible frame before starting the crossing, I still have to wait for about 20 frames before the second-to-last jump for the final block to appear. There's not much to do in the space between the checkpoint and the disappearing blocks. I tried jumping across the pit, then back, then across again, but there's not quite enough time for that. Mega Man accelerates in units of 2 pixels, so if you start on an even pixel you stay even, and if you start odd you stay odd, unless you meet some external influence like running into a wall. I tried using the downtime to change my odd alignment to even alignment, and that actually puts you 1 pixel ahead after passing the disappearing blocks—but that becomes 1 pixel behind after the next turnaround, and in any case the difference of 1 pixel is wiped out when you clamp onto the long ladder near the end of the stage. I tried it both ways. The RNG does advance once per frame, but I was lucky enough not to have to use waiting for RNG manipulation anywhere. All the manipulation I needed could be done by killing enemies without slowing down. (Killing an enemy advances the RNG by one step, to determine what item will drop.)
Post subject: Re: TAS in 1:49.35
Sand
He/Him
Player (133)
Joined: 6/26/2018
Posts: 174
Sand wrote:
Known deficiencies and potential improvements:
  • The intervals between the stages (when the game is loading resources from disk) are slightly slower than in [2247] DOS Mega Man by DarkKobold in 02:23.55. My best guess is that this has something to do with putting C: on HDD rather than HDA. If so, then it would be better to go back to HDA: the time saved between stages would more than make up for a slightly slower boot.
I investigated this issue, and changing C: from HDD to HDA doesn't help. It makes the boot 27 frames slower, and later on, through parts of the game that access the disk, that 27-frame deficit remains unchanged, rather than diminishing as I had hoped. So I don't know what accounts for the difference in time: maybe DarkKobold's disk image arranges the files differently than mine does; or maybe it is a JPC-RR version difference (though I've tested that mine syncs on 11.6 and 11.2). I only tested it through the end of Sonic Man's stage; I decided to not go any further because there had already been several disk accesses (logo.sta, secur.scn, secur.blk, secur.frm, select.frm, sonic.scn, sonic.blk). The frame numbers in this table are absolute, not relative; i.e., the diff is not cumulative.
HDDHDAdiff
boot000
configuration menu6188+27
title screen visible144171+27
begin SECUR190217+27
stage select SVD616643+27
begin SONIC719746+27
Sonic Man health26202647+27
Sonic Man dead27202747+27
Sonic Man weapon screen29082935+27
Sonic Man weapon screen29582985+27
Post subject: Fourth-draft TAS (5 frames saved)
Sand
He/Him
Player (133)
Joined: 6/26/2018
Posts: 174
Sand wrote:
  • Against Dyna Man, use the Mega Buster until close enough to use the Force Field. The Buster does 2 HP of damage and the Force Field does 6, but you can't use the Force Field until you are close. The boss has 32 HP, so shooting him 4 times with the Buster saves 2 uses of the Force Field (2 frames). Using the Buster only matters in the first Dyna Man fight, because the only goal is to kill the boss as quickly as possible. In the refight, the goal is to kill the boss and cross the screen, so the Buster doesn't give an advantage because you are limited by Mega Man's running speed anyway.
While I was writing up a submission, I realized I was mistaken in my assumption that using the Buster doesn't help in the Dyna Man refight. Here is a revision that saves 5 frames in the fight. Click through to enable captions. Link to video Three things go into this improvement:
  • RNG manipulation to get a low, fast jump from Dyna Man (just like in the first fight). It's complicated because we also need to manipulate the Volt Man fight, and there is not much flexibility in altering the RNG sequence (the only way to do it is by killing/not killing enemies, and there are not many in this area). I had to settle for a Dyna Man jump speed of 6, rather than his maximum of 7. Sadly, the RNG manipulation loses 2 1-up drops.
  • Shooting with the Mega Buster before getting close.
  • Controlling the phase of the Force Field (the size of its hitbox varies with phase).
#2247first draftdiffsecond draftdiffthird draftdifffourth draftdiff
boot9159−32590590590
configuration menu32−1202020
title screen127129+2129012901290
intro stage386382−4376−637603760
stage select SVD146154+81540153−11530
Sonic Man stage20401928−1121902−261901−119010
Sonic Man111102−9100−210001000
stage select _VD352367+15368+1367−13670
Volt Man stage2125186−1939186018601860
Volt Man109100−998−2980980
stage select __D305314+93140313−13130
Dyna Man stage19881783−2051768−151767−117670
Dyna Man7757−2052−5520520
Wily title cards363374+113740373−13730
Wily stage17341686−481666−201667+11662−5
Wily10440−6438−2380380
Here's an explanation of why my reasoning was wrong. Normalize time so that 1 is the time it takes for Mega Man to run across the screen. Let ε represent the time of one frame. The total time required by one of the boss refights can be expressed as T = M + abs(x − 0.5) + ε isaligned(x) + (1 − x) + C where M is the minimum time required to kill the boss and x is Mega Man's horizontal position when the boss dies (also normalized to lie between 0 and 1). abs(x − 0.5) represents the horizontal camera centering delay (longer the farther Mega Man is from the center of the screen), ε isaligned(x) represents the additional 1-frame camera recentering penalty if your horizontal position is not a multiple of 8 pixels, (1 − x) is the time needed to run to the exit door, and C is any other fixed costs such as the vertical camera recentering delay. If we take M, the time required to kill the boss, to be a fixed constant, as it is in the Sonic Man and Volt Man refights, then we find that the x's cancel, meaning that Mega Man's position doesn't matter, as long as he is on the far side of the screen (the side nearest the exit door) and has good alignment:
  • if x < 0.5 (Mega Man is on the near side of the screen): T = M + ε isaligned(x) + C + 1.5 − 2x
  • if x ≥ 0.5 (Mega Man is on the far side of the screen): T = M + ε isaligned(x) + C + 0.5
But, in the Dyna Man fight, we should not take M to be a constant. It's possible to kill Dyna Man without stopping running, so we should take M = x; i.e., the time taken to kill the boss is equal to the time it takes to run to the position we're at when the boss dies. In this case, the x's do not cancel. Instead we have:
  • if x < 0.5 (Mega Man is on the near side of the screen): T = ε isaligned(x) + C + 1.0 + (0.5 − x)
  • if x ≥ 0.5 (Mega Man is on the far side of the screen): T = ε isaligned(x) + C + 1.0 + (x − 0.5)
In both cases, the time is less, the closer Mega Man is to the center of the screen; the screen recentering delay is the only consideration. This is why the Dyna Man refight is different than the other two, why Mega Man's horizontal position at the end of the fight matters. This doesn't mean that you should stop running only to end the fight in the center of the screen; but it means that if you can finish the fight without stopping running, then the closer to the center of the screen you can finish the fight, the better.
Post subject: Fifth-draft TAS (55 frames saved)
Sand
He/Him
Player (133)
Joined: 6/26/2018
Posts: 174
Sand wrote:
Sand wrote:
Known deficiencies and potential improvements:
  • The intervals between the stages (when the game is loading resources from disk) are slightly slower than in [2247] DOS Mega Man by DarkKobold in 02:23.55. My best guess is that this has something to do with putting C: on HDD rather than HDA. If so, then it would be better to go back to HDA: the time saved between stages would more than make up for a slightly slower boot.
I investigated this issue, and changing C: from HDD to HDA doesn't help. It makes the boot 27 frames slower, and later on, through parts of the game that access the disk, that 27-frame deficit remains unchanged, rather than diminishing as I had hoped. So I don't know what accounts for the difference in time: maybe DarkKobold's disk image arranges the files differently than mine does; or maybe it is a JPC-RR version difference (though I've tested that mine syncs on 11.6 and 11.2).
I figured out the cause of the increased load times. DarkKobold ran fdconfig.sys during boot and I didn't. That is, at the prompt:
Press F8 to trace or F5 to skip FDCONFIG.SYS/AUTOEXEC.BAT
I pressed F5 to skip, but DarkKobold pressed F8 and then:
dos=high[Y,n]?Y
lastdrive=z[Y,n]?Y
buffers=20[Y,n]?Y
files=40[Y,n]?Y
device=himem.exe[Y,n]?Y
shell=cmd80x86.com command.com /K autoexec.bat[Y,n]?N
A:\>\autoexec.bat [Yes=ENTER, No=ESC] ? n
It takes 5 frames to run fdconfig.sys, but it pays off in faster load times. In fact, it's already caught up by the time the title screen loads. So here is a fifth draft. The only difference is shorter load times. The gameplay is the same. It changes all the memory addresses so I had to update my scripts. Download link. Link to video
#2247first draftdiffsecond draftdiffthird draftdifffourth draftdifffifth draftdiff
boot9159−3259059059064+5
configuration menu32−120202020
title screen127129+2129012901290122−7
intro stage386382−4376−637603760375−1
stage select SVD146154+81540153−11530145−8
Sonic Man stage20401928−1121902−261901−11901019010
Sonic Man111102−9100−2100010001000
stage select _VD352367+15368+1367−13670351−16
Volt Man stage2125186−19391860186018601860
Volt Man109100−998−2980980980
stage select __D305314+93140313−13130301−12
Dyna Man stage19881783−2051768−151767−11767017670
Dyna Man7757−2052−5520520520
Wily title cards363374+113740373−13730357−16
Wily stage17341686−481666−201667+11662−516620
Wily10440−6438−2380380380
total100617663−23987586−777581−57676−57521−55
Comparing [2247] DOS Mega Man by DarkKobold in 02:23.55 and this most recent draft directly, for the first time, the new one is faster in every segment:
#2247fifth draftdiff
boot9164−27
configuration menu32−1
title screen127122−5
intro stage386375−11
stage select SVD146145−1
Sonic Man stage20401901−139
Sonic Man111100−11
stage select _VD352351−1
Volt Man stage2125186−1939
Volt Man10998−11
stage select __D305301−4
Dyna Man stage19881767−221
Dyna Man7752−25
Wily title cards363357−6
Wily stage17341662−72
Wily10438−66
total100617521−2540
Post subject: fdconfig.sys options
Sand
He/Him
Player (133)
Joined: 6/26/2018
Posts: 174
At Post #478684 we wondered why loading fdconfig.sys shortens load times. I did some experiments, and here's something weird: running fdconfig.sys saves time even if you say N to every line in it. In fact, saying N to every line starts the game 2 frames faster than saying Y to every line. For reference, here are the 6 fdconfig.sys prompts:
dos=high[Y,n]?
lastdrive=z[Y,n]?
buffers=20[Y,n]?
files=40[Y,n]?
device=himem.exe[Y,n]?
shell=cmd80x86.com command.com /K autoexec.bat[Y,n]?
Here are the tests I ran. I tried enabling every line but the autoexec.bat one. Each test took either 120 or 122 frames to show the title screen and start the game—if you skip fdconfig.sys, it takes 129 frames. The latest draft says Y to all and is slow at 122 frames. I've marked the slow rows with *.
dos=highlastdrive=zbuffers=20files=40device=himemshellfinish config menutitle screen visiblegame starts
YYYYYn66144188*
nnnnnn66143186
Ynnnnn66143186
nYnnnn66143186
nnYnnn66143186
nnnYnn66143186
nnnnYn66143186
YYYYnn66143186
nYYYYn66143186
YnnnYn66144188*
Saying N to every line is fast. Saying Y to each line individually is fast. I didn't try all 32 possibilities, but it looks like you get the slow behavior when you say Y to both dos=high and device=himem.exe. As for why loading fdconfig.sys and then not running any of it saves time, I have no idea. I looked inside fdconfig.sys and it doesn't contain any hidden commands other than what it prompts for. i only tested through the title screen—perhaps other differences would manifest later on.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4042
Very interesting. Maybe it's loading/caching something, causing that operation to be faster later?
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Post subject: Sixth-draft TAS (saves 25 frames)
Sand
He/Him
Player (133)
Joined: 6/26/2018
Posts: 174
Sand wrote:
At Post #478684 we wondered why loading fdconfig.sys shortens load times. I did some experiments, and here's something weird: running fdconfig.sys saves time even if you say N to every line in it. In fact, saying N to every line starts the game 2 frames faster than saying Y to every line.
I reworked the TAS with this change (loading fdconfig.sys but declining all the prompts). It saves 25 frames overall. As in the previous draft, there are no gameplay differences, only shorter load times. Download link. Link to video
#2247first draftdiffsecond draftdiffthird draftdifffourth draftdifffifth draftdiffsixth draftdiff
boot9159−3259059059064+5640
configuration menu32−12020202020
title screen127129+2129012901290122−7120−2
intro stage386382−4376−637603760375−13750
stage select SVD146154+81540153−11530145−8142−3
Sonic Man stage20401928−1121902−261901−1190101901019010
Sonic Man111102−9100−21000100010001000
stage select _VD352367+15368+1367−13670351−16344−7
Volt Man stage2125186−193918601860186018601860
Volt Man109100−998−2980980980980
stage select __D305314+93140313−13130301−12295−6
Dyna Man stage19881783−2051768−151767−1176701767017670
Dyna Man7757−2052−5520520520520
Wily title cards363374+113740373−13730357−16351−6
Wily stage17341686−481666−201667+11662−5166201661−1
Wily10440−6438−2380380380380
total100617663−23987586−777581−57676−57521−557496−25
Joined: 5/22/2024
Posts: 5
Do we have a resources page for Mega Man 3 DOS?
Sand
He/Him
Player (133)
Joined: 6/26/2018
Posts: 174
TheAllmightyStegosaurus wrote:
Do we have a resources page for Mega Man 3 DOS?
No, just Mega Man 1. There are some brief notes about Mega Man 3 at Talk: Mega Man 3 at the Cutting Room Floor. rainwarrior on that page has a profile here too and has worked on Mega Man 3. There's also S&F Prod.'s page with Megaman3stuff.zip with some utilities. BTW there is an existing topic for Mega Man 3 DOS at Thread #15702: Mega Man 3.