Posts for TaoTao

Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
I finished 3-2 and saved 137 frames from the current run. In 3-2 boss fighting, at first I tried applying the input of the current run, but it desynced for some reason. But anyway I managed to save 4 frames at 3-2. I still did not use the wallzipping. Probably I will start to use it at 5-1 or later.
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
I am doing 3-1-1, but I am in trouble with manipulating purple enemies. After the movie above finished, the left purple enemy goes right and chases the hero. This will increase lags. On the other hand, the current run successfully let the enemy go left. Now I have no idea what controls this thing. I examined the code and found that $F6C0 determines the action of the enemy based on the distance between the hero and the enemy. But, in my wip, the enemy is spawned quite earlier than the current run. I still can not find how to manipulate the timing of enemy-spawning... EDIT (2016-12-16): I managed to resolve the purple enemy issue. It seems to be related to the timing you kill the first dog. If you kill the dog too early or too late, the purple enemy will be spawned early. Now I still do not know the mechanism behind it. But I noticed that the dog and the purple enemy have the same index in object list, and it might be the cause of this curious relationship. I might investigate further. EDIT (2016-12-16): X-subpixels of objects seems to be related to the timing other enemies are spawned afterward. I dumped RAMs of some movies and compared them, and I found that I get different results when I change x-subpixels with cheat.
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
Game: Vice: Project Doom Console: NES Author: TaoTao Progress: until 3-1-1 Thread: http://tasvideos.org/forum/viewtopic.php?t=1093 Movie: http://tasvideos.org/userfiles/info/35665265878548447 Link to video
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
I finished 2-2 and saved 80 frames from the current run. Link to video I am not satisfied with 2-1-3, but enemies on the last conveyor are solid bottleneck. If you could smoothly fall down to the last conveyor with a knockback, you will achieve a bit more improvement. But I could not do it. I glanced at the RNG code. This game has a random number table, and $94 is the index. $94 increments on every NMI interrupt and every call to RNG routine ($E9A0). I wasted 2 frames to manipulate the action of 2-2 boss. $94 is basically frame counter, and the RNG routine is never called in 2-1. So it will be difficult to manipulate $94 directly. But, sometimes 2-2 boss throws an iron frame at a different timing, depending on your previous action. So, it may be possible to manipulate it without any loss. But I could not do it. Note that $94 increments even while the game is paused. (it may not be so useful...)
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
As you might notice in casual plays, some kind of enemies occasionally vanish. In 2-1-3, a crawling man on the last conveyer may vanish. If you can cause this thing without large loss, it can lead to some improvement. But still I cannot find the way to do it...
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
XYZ wrote:
First WIP. Remind me Super Spy Hunter, but not so variable. Fast and interesting more upside of screen strategy. Are you tried all running movement at 2-1 now?
Now I am doing 2-1-3. I saved 5 frames at 2-1-1, and 4 frames at 2-1-2. And probably I will be able to save more than 10 frames at 2-1-3, but now I am struggling with subpixels. I found some useful facts: * Subpixels do not consider sign. I think this is the reason why your position is not calculated as expected when you go leftward or upward. * You can jump 5 pixels higher than usual when you press <select+A>. It increases initial y-speed. I call it "high-jump". * You can change your weapon with <select> while screen transition, and it often affects the amount of lags before the next screen starts. * If you attack at the moment you touch ladders, your velocity is remained for a while. This technique is already used in the current run (for example, 6-2-1 and 7-2-1).
XYZ wrote:
Long-long time ago I asked Sonikkustar about ducking and he said that not ducking is faster. DR is only looks like positive in velocity.
Still I have not confirmed that ducking affects your speed, but the mechanics of this game is strange (for example, sometimes you perform high-jump even if you press <select> 1 or 2 frames before you press <A>). So, it would not be surprising even if ducking may sometimes affect your speed. EDIT: I tried hex-editing to do ducking run for a while at the beginning of 2-1-1, then my movie desynced at the beginning of 2-1-3. So, even if ducking does not affect your position or velocity, it still may change the entire result.
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
I tried doing 1-1, and saved 28 frames from the current run (5 frames at opening, and 23 frames at 1-1). I will continue based on this movie. And feel free to use (or improve :) this movie. After you kill the 1-1 boss, your position seems to affect the amount of lags before 2-1 starts. And, subpixels are not reset even if next stage starts. Considering these, strict optimization will be hard...
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
XYZ wrote:
Btw, is ducking run really slowly? Pressing down and run.
No, as far as I have watched memory. But if you start running with <down+right> button, you will be delayed by 1 frame. You have to press <down> after you start running. Now I do not take lags into account. This game is laggy, so ducking (or not ducking) may lead to unexpected lags.
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
It seems that you can start the first stage faster than the current run. If you press A at frame 276 or after, the first stage starts 4 frames faster. I may be still overlooking something and there may be room to optimize more, so please tell me if you find something. I do not know whether original authors took this into account. But anyway, this game looks unfriendly to hex-editing, so I still cannot say whether it really saves time. EDIT:I could start the first stage 5 frames faster than the current run.
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
I analyzed this game roughly, so I put the result for reference (as you might already know). EDIT: I analyzed only about platforming levels. First, I put some memory addresses:
$05     U8      input_1         # ABSTUDLR
$06     U8      input_2
$07     U8      input_new_1
$08     U8      input_new_2
$09     U8      input_prev_not_1
$0A     U8      input_prev_not_2

$0B     U16     scroll_x
$0D     U8      scroll_y

$0E     U8      prg_id_saved(16k)

$93     U8      flags           # bit7:paused, bit0:cheat allowed

$EF     U8      weapon          # 0:whip, 1:gun, 2:grenade

$0100-$013F     U8[0x40]    stack

# objects
# -------
# the hero is always the first object.
# velocity and acceleration are signed-magnitude format.
# (i.e. bit7:sign, bit6-0:absolute value)

$0190-$019F     U8[16]      obj_accel_y
$01A0-$01AF     U8[16]      obj_vel_y
$01B0-$01BF     U8[16]      obj_pos_y_subpx     # 0..15
$01C0-$01CF     U8[16]      obj_accel_x
$01D0-$01DF     U8[16]      obj_vel_x
$01E0-$01EF     U8[16]      obj_pos_x_subpx     # 0..15
$01F0-$01FF     U8[16]      obj_pos_x_px_lo
$0200-$020F     U8[16]      obj_pos_x_px_hi
$0210-$021F     U8[16]      obj_pos_y_px_lo
$0220-$022F     U8[16]      obj_pos_y_px_hi

$0280-$028F     U8[16]      obj_hp

$035D   U8      time(frame)
$035E   U8      time(sec)
$035F   U8      bullet_num
$0360   U8      grenade_num
$0361   U8      coin_num        # 0..99
$0362   U8      life            # 0..9
$0363   U16     score           # 100x

$036F   U8      cheat:slow_motion

$0700-$07FF     Sprite[64]  sprite_buffer
For the cheat, see gamefaqs. I think 2P input is used only for the cheat. I wrote a HUD script to display position, velocity, acceleration, and HPs. As you may notice by using the HUD script, velocity value is actually not correct when you go leftward. For some reason, the actual velocity is oscillated when you go leftward. I suspect this might be the reason why you can perform the wallzipping only leftward. As the latest submission says, it seems that you can manipulate y-subpixel by pressing select at the moment you jump. For object position calculation code, see $06:88A0 and $06:891B (object index is passed via X register). Bank switching (16K, $8000-$BFFF) routine is at $DFC2, $DFC6. $DFC6 simply switches bank. $DFC2 saves the specified PRG-ID to $0E.
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
Tarbash wrote:
Sorry for the messy video, but I was just curious whether this trick would be worth anything for a TAS in this particular spot or elsewhere in the game. https://www.youtube.com/watch?v=3lm-9Sk75sE
I am not so familiar with this game, but I could easily reproduce this (and in another place). I could not perform this wallzipping when I jump rightward. I suspect you can perform it only when you jump leftward... EDIT: I am not sure but probably this will be useful here (or in some other places)?
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
In this game, Pachio deceletes so often that he looks slower than the Hedgehog. But I think this run manages to keep speed, and it is well thought out. Yes vote. FYI: There is a hard-mode run on nicovideo. As you may know, it is possible to jump on a spike once when you fall without jumping. But I don't know whether it helps to improve this run. The bit2 of $7E0798 seems to affect it. And the bit seems to be cleared when you hit an enemy in the air.
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
In 4-2, you can zip into the elephant. This pattern is not so rare, but it seems not easy to break through the elephant body. This hole is tough as I thought...
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
I still have not found a solution for 4-2, but I found some interesting phenomenons. In 4-2, with the elephant gimmick, the ball can move infinitely. I put the movie. When you hit the ball to the corner of wall precisely, the ball can zip through the wall and go out of bounds. I succeeded to do it in 1-2 and 1-4. (In the latter, the ball moves infinitely)
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
I updated the bot script. With the bot, I found a solution for 1-9. For now, I have found hole-in-one solutions for all holes except for 4-2. For 4-2, I think there is not likely a solution, but just in case, I will try attacking it with the bot.
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
For 1-9, I still can not achieve hole-in-one, but I could reproduce the wallzipping trick. I put the movie: http://dehacked.2y.net/microstorage.php/info/1678356289/1-9.fm2
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
Weather ($0545) seems to affect the friction. The friction parameter is probably $83-$86. I think we have no reason to choose weathers other than "fine". Probably it is possible to manipulate weather by adjusting timing to proceed to next hole. Except for weather, the parameters determining ball movement are: * Power ($054E) * Point of contact ($054D) * Cursor ($9B-$9C, $9D-$9E)
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
I am interested in this game, and sometimes I research it. Previously a movie was submitted, but it was rejected: http://tasvideos.org/5083S.html This movie plays only "traditional" course, and it gives up hole-in-one for 1-5, 1-9. As far as I know, it is still not known whether you can achieve hole-in-one for every holes. So, I will share my knowledge as possible. I wrote a quick-and-dirty bot to find solutions: http://pastebin.com/5XRDLFvB (This contains Japanese comments. sorry) For 1-5, I found a solution: http://dehacked.2y.net/microstorage.php/info/1866639337/1-5.fm2 For 1-9, if I remember correctly, you can zip through the wall by hitting the ball to the space between the wall and the gate. I still can not reproduce it, but I will try it using lua bot. I found a post about lua scripting in this game, so I put it for reference. http://tasvideos.org/forum/viewtopic.php?p=318541#318541 It seems that you can hit the ball faster when you hit the edge of the ball.
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
I tried to tas this game long ago, and I gave up because I could not achieve hole in one in 1-5 and 1-9. Anyway, I'm glad other people is trying tasing this game. In 1-5, I could reach very near the hole, but I could not achieve hole in one. And in 1-9, if I remember correctly, I could zip through the wall by hitting the ball to the space between the wall and the gate in a casual play. But I still can't reproduce it. This movie plays only "traditional" course? I want to see all courses.
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
feos wrote:
Since there's no stable to reproduce it, we can't tell what needs to be fixed in the code, but you can fix the file by disabling Adjust input according to lag (and enabling it back when you advance there). Somehow lag flag is broken for that last frame, and it crashes on vector manipulation, but not during input adjustment - it happens while doing the hotchanges stuff. Again, I can't know what exactly is wrong without reproducing it. Maybe you saved the bookmark while it was unpaused or something. Or it was trying to adjust nothing, as it was the last frame of the movie.
Thank you! I loaded the .fm3 and temporarily disabled "Auto-adjust Input according to lag" option, then FCEUX didn't crash. I saved the .fm3 and it seems to work well. TAS Editor saves me from a lot of routine. It's cool :)
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
On FCEUX interim build 3028 on Windows 7 x64, TAS Editor crashed and it crashes every time I reload the .fm3 which remained when it crashed first time. I don't remember exactly what I did when the crash happened, but I overwritten an existing bookmark just before the crash. I put the .fm3 causing the crash. The game is "Heisei Tensai Bakabon (J)" (md5 of headerless ROM: b1b94bbfddea3e2a40834919183c302d) http://www.mediafire.com/download/nd1f1nw60pobwf0/Bakabon-testrun.zip When I load the .fm3 and do a frame-advance, FCEUX crashes. "Save Compact" and "Export to FM2" work, so I tried saving a compact .fm3 including input/markers/bookmarks and reloading the compact .fm3, but FCEUX crashes again when I do a frame-advance. "Export to FM2" seems to export a valid .fm2.
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
FYI: I made a testrun long time ago. movie: http://dehacked.2y.net/microstorage.php/info/247852381/Sasa-17934F-Done.fm2 encode: http://www.nicovideo.jp/watch/sm8082772 info (memory, lua, ...): http://www6.atpages.jp/appsouko/work/TAS/game/AstroRoboSasa_FC/ Probably you can improve stage 10 with single-wallthrough glitch.
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
@zeromus Thank you for explaining about "pa=0|1" and setting svn:executable! I checked out the r1820, and I could build it without manipulating permission. For unofficial opcodes, I found a Puzznic run desyncs on BizHawk r1820. This game uses an unofficial NOP (0x89). BizHawk implements unofficial NOPs, but it seems to forget to increment the program counter. So I tried this patch:
Language: diff

*** Execute.cs.orig 2012-03-08 06:11:44.000000000 +0900 --- Execute.cs 2012-03-08 06:12:47.782625000 +0900 *************** *** 692,697 **** --- 692,698 ---- PendingCycles -= 2; TotalExecutedCycles += 2; break; case 0x89: // NOP #nn + ++PC; PendingCycles -= 2; TotalExecutedCycles += 2; break; case 0x8A: // TXA
With this patch, the Puzznic run syncs. Of course, other unofficial NOPs need to be fixed in the same way. (Strictly speaking, other unofficial NOPs may have to read memory operand, even though they are named "NOP")
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
zeromus wrote:
Thanks for teaching me that. I didn't ever think of it. I fixed it just now; itll be supported going forward.
I compiled r1808 and confirmed it verifies NES "Galaxian (J)" correctly. Thanks!
zeromus wrote:
How do you like the dump status report and rom quality icon? We wanted to make it easy to understand how things are getting detected and loaded.
I think the dump status report is easy to understand, if the reader has some knowledge about NES. But: * I think the strings "mir=0" and "pa=0|1" are not so easy to understand. At least, I want some documentation about them. * It would be nice if it also prints a MD5 hash for "PRG (8KB) + CHR" entry. For the icons, I like them and I think they have no problem :) ---- Some other reports: 1) In this post,
adelikat wrote:
THe DMA Cycle bug in FCEUX is not present in Bizhawk
But is the bug really fixed? I tested it with NES "Mahjong (J) (Rev B)", and I got the same hand as I got on FCEUX (about this issue, please refer to my post). Indeed, Exec_OAMDma() in Core.cs is as follows:
cpu.PendingCycles -= 512;
And I tried fixing the value to 513 from 512, then I got the same hand as I got on real console. 2) BizHawk does not seem to verify NES "Mahjong (J) (Rev B)" correctly. I guess the reason is written as the comment in BoardSystem.cs:
//notes: there can be multiple each of prg,chr,wram,vram
//we arent tracking the individual hashes yet.
It would be nice if this issue is fixed in the future :) 3) Could you set svn:executable property for *.exe, *.bat, *.dll files? I am using svn on Cygwin to checkout the source tree, and I have to set execute permission to these files to build successfully. 4) For now, it seems that BizHawk's 6502 core does not implement unofficial opcodes and some double read/write behavior. Do you have a plan to implement them in the future? Most of NES games don't use any unofficial opcodes, but some games do. And, if you use some memory-corruption glitch, some double read/write behavior may issue. Indeed, in my Double Moon Densetsu run, PPU registers are accessed via indirect-indexed addressing mode and some double read occur (about the double read, please refer to GetIYRD() macro of FCEUX).
Experienced Forum User, Published Author, Experienced player (871)
Joined: 9/18/2008
Posts: 148
Location: Japan
BizHawk does not verify NES "Galaxian (J)" ROM correctly. It says "Inferred from iNES header; potentially wrong" for a good dump. In dump status report, it says:
headerless rom hash: sha1:4180276C50DF9958DEDD6C6D19C9E7AEBB75A89F headerless rom hash: md5:015E59CDE3752FC54A7B9D586721247E Could not locate game in nescartdb
But the hash value is not correct. This ROM has only 8KB PRG, but the .nes file contains 16KB mirrored PRG due to the limitation of iNES format. So, you should treat this PRG as 8KB to verify this ROM correctly.