Post subject: Genpei Touma Den
Blazephlozard
He/Him
Banned User
Joined: 2/27/2013
Posts: 175
Location: Ohio
EZGames told me to make a thread here now that the Dream Team Contest is over (we won uwu) Our team managed a time very very close to 8 minutes (8:00.258), but it feels like even if we saved time somewhere, we'd end up losing that time somewhere else due to RNG/frame rules, so not sure if that time will get shaved down before a formal submission, have to check if the other teams found anything interesting. Our main time save was from a major route difference warping to the second half of the game, and it requires coin grinding and a death, so it's hard to compare times (due to our lower sword power and early coin grinding) Link to video http://tasvideos.org/userfiles/info/60731863423980453 I made a submission notes doc of sorts here with some explanation of tricks: https://docs.google.com/document/d/18jIL71LZHcg_U2I31Ycqkn2q1a2rjbMqhupOeVQrHsI/edit?usp=sharing lua script here: https://pastebin.com/46yA0x8F There's a ton of useful information on this site: https://strategywiki.org/wiki/Genpei_Touma_Den
Editor, Player (69)
Joined: 6/22/2005
Posts: 1050
Our team didn't finish, but here are some notes about our findings: Small Mode Horizontal movement is based on the formula x += 0x80 - ($17), where ($17) is the value of RAM address 0x17. Positive values move to the right and negative to the left. The value of 0x17 itself depends on player input (two bytes at 0x0A08 are the speed) and damage boosting (two bytes at 0xB7 are the speed and two bytes at 0xB9 are acceleration). Movement via controller input increases the speed by 1/16 of a pixel per frame (ppf) every frame, up to a max of 2 ppf. Damage boosting seems to depend on the type of enemy. The following code is relevant:
02:D050:  20  JSR $CEE1
02:CEE1:  DF  BBS5 $C9,26 ; Branch to CEFE if bit 5 of $C9 is set
02:CEE4:  B9  LDA $CF18,Y
02:CEE7:  85  STA $B7     ; x_subspeed
02:CEE9:  B9  LDA $CF1B,Y
02:CEEC:  85  STA $B8     ; x_speed
02:CEEE:  B9  LDA $CF1E,Y
02:CEF1:  85  STA $B9     ; x_subspeed_delta
02:CEF3:  B9  LDA $CF21,Y
02:CEF6:  85  STA $BA     ; x_speed_delta
02:CEF8:  B9  LDA $CF30,Y
02:CEFB:  85  STA $BB
02:CEFD:  60  RTS
02:CEFE:  B9  LDA $CF24,Y
02:CF01:  85  STA $B7     ; x_subspeed
02:CF03:  B9  LDA $CF27,Y
02:CF06:  85  STA $B8     ; x_speed
02:CF08:  B9  LDA $CF2A,Y
02:CF0B:  85  STA $B9     ; x_subspeed_delta
02:CF0D:  B9  LDA $CF2D,Y
02:CF10:  85  STA $BA     ; x_speed_delta
02:CF12:  B9  LDA $CF30,Y
02:CF15:  85  STA $BB
02:CF17:  60  RTS
I don't have any notes about the significance of bit 5, but $CF18 corresponds to 0x4F18 in the ROM file. You can see that the addresses are 3 bytes apart, which suggests that there are three types of enemies with regard to damage boosting. Big Mode x += ($1145) - A, where A is 0x40 if facing to the right and 0xC0 if facing to the left. Movement via controller input is at a constant speed of 2, while damage boosting is the same as in Small Mode. Hitboxes The following Lua script displays hitboxes for a number of things--enemies, barriers, player--as well as HP for enemies that have HP. I didn't figure out the hitboxes for some things, however, such as boss weapons.
Language: lua

memory.usememorydomain("Main Memory") -- RAM local addr_pc_x_hb_l = 0xA0 local addr_pc_x_hb_r = 0xA1 local addr_pc_y_hb_u = 0xA2 local addr_pc_y_hb_d = 0xA3 local addr_en_num = 0x001D local addr_en_actv = 0x0980 local addr_en_y_lo = 0x0FEA local addr_en_y_hi = 0x1060 local addr_en_x_lo = 0x10D6 local addr_en_x_hi = 0x114C local addr_en_type = 0x131D local addr_en_hp = 0x14D6 -- ROM local addr_en_y_len = 0x57A9 local addr_en_x_len = 0x56D3 local function draw_en_hitbox() local num_en = memory.readbyte(addr_en_num) for i = 0, num_en - 1 do local en_actv = memory.readbyte(addr_en_actv + i) local e = memory.readbyte(addr_en_type + en_actv) local e_y = memory.read_s8(addr_en_y_hi + en_actv) * 0x100 + memory.read_u8(addr_en_y_lo + en_actv) local e_y_len = memory.readbyte(addr_en_y_len + e, "ROM") local e_x = memory.read_s8(addr_en_x_hi + en_actv) * 0x100 + memory.read_u8(addr_en_x_lo + en_actv) local e_x_len = memory.readbyte(addr_en_x_len + e, "ROM") gui.drawBox(e_x - e_x_len, e_y - e_y_len, e_x + e_x_len, e_y + e_y_len) local en_hp = memory.readbyte(addr_en_hp + en_actv) if en_hp > 0 then gui.drawText(e_x, e_y, string.format("%2x", en_hp)) end end end local function draw_pc_hitbox() local x_hb_l = memory.readbyte(addr_pc_x_hb_l) local x_hb_r = memory.readbyte(addr_pc_x_hb_r) local y_hb_u = memory.readbyte(addr_pc_y_hb_u) local y_hb_d = memory.readbyte(addr_pc_y_hb_d) gui.drawBox(x_hb_l, y_hb_u, x_hb_r, y_hb_d) end while true do draw_pc_hitbox() draw_en_hitbox() emu.frameadvance() end
Current Projects: TAS: Wizards & Warriors III.
Skilled player (1024)
Joined: 1/9/2011
Posts: 231
Here's a map to help visualize things and to put actual names to levels. The arrows marked in red show the path that we took.
CoolHandMike
He/Him
Editor, Judge, Experienced player (897)
Joined: 3/9/2019
Posts: 729
Warhippy it is interesting how we both did something with the map. https://puu.sh/F1d7x/8cac8deaca.png I had realized the warp early, and then discounted it due to having to wait for the birds for orbs. Then the lack of sword of orbs made it slower. Should have gone back and tried it again. Anyway, here is some stuff DrD2k9 and I had found. ---------------- Extra Jump Height in Small Form - Jump with Turbo, basically alternating jump and not jump will allow extra height. Wall Jump in Small Form - On some vertical walls pressing L when you up against a wall will then allow you to jump. I suspect the left and right widths are not exact so if you switch quickly you embed yourself and the game thinks you are in the ground allowing an extra jump. Upward Vertical Wraparound in Small Form - If you are able to get enough height you can actually jump up and around vertically. Fall / Death Plane Bypass After Killing Flying Dragon in Small Form - Suspect this has something to do with lag from all the generated sprites. After killing the dragon and all the pieces break apart if you fall into the pit you will instead do the wraparound from the bottom. https://www.youtube.com/watch?v=9MMQIvT8TLQ&feature=youtu.be Jump into Edge of Moving Blocks in Small Form - You can do extra jump on the side of the moving block to gain extra height. In fact you can also do this for a time on the underside of the blocks...even though that makes no sense. Ex: if you jump up hit the bottom of the block with the turbo jumping you can still move forward while on the bottom of the moving block for a time. Damage Boosting through Blocks in Small Form - Think everyone found this. Enemies that move through the object and do not allow you to escape back out are ideal. Short Vertical Jump in Large View - Under some circumstances in Large Form your sprite will be half embedded in the floor. After getting damage boosted forward it is possible to get jump while half in the floor which can be used to boost of a couple enemies low to the ground more quickly. Roof Boost in Overhead View - While it did not seem any use it is possible jump into the white tiled roofs and then get boosted forward if you do not get stuck. These tiles are destroy able which might have something to do with the behavior. Yoshi Lure - If you hit him after he first appears he will much more quickly start spinning after you. Yoshitsune Double Bounce - This seemed to be faster than the single damage boosting, but the heights of Yoshi's jumps vary. Anyway with this you essentially smack Yoshi while he is on the right side at a certain height. This will make him jump higher. If you then position yourself correctly you can then do a damage boost, then an additional bounce that does not damage you further. Second form of Yoshi. Benkei skip? - DrD2k9 believed he had found a skip for this guy when he had the rod...but I think for some reason he lost the inputs. Kind of hesitant to put this here since it was up in the air if it was a legit skip or not. I had messed with trying to damage boost past him but was not able to get it to work.
discord: CoolHandMike#0352
Cyorter
He/Him
Editor, Player (249)
Joined: 2/8/2017
Posts: 138
Location: Venezuela
CoolHandMike wrote:
Wall Jump in Small Form - On some vertical walls pressing L when you up against a wall will then allow you to jump. I suspect the left and right widths are not exact so if you switch quickly you embed yourself and the game thinks you are in the ground allowing an extra jump.
This only works when you are at least falling one pixel, then press L and R+Jump.
CoolHandMike
He/Him
Editor, Judge, Experienced player (897)
Joined: 3/9/2019
Posts: 729
Ok had not known about the falling one pixel aspect. Good to know.
discord: CoolHandMike#0352
Memory
She/Her
Site Admin, Skilled player (1558)
Joined: 3/20/2014
Posts: 1767
Location: Dumpster
There is a way to collect the same sword orb twice in the three headed dragon boss: So when an orb normally falls it simply lands on the ground like here: However on this stage in particular it will then go to the height of the water in the background: If you run into it the frame it moves to the height of the water, it counts as collecting it twice. It's also possible to cancel your fall momentum by pressing against certain stalactites from the side for more than a frame (maybe 2). This can be combine with mashing jump to fly through the air a little. RNG is $4A 2 byte little endian hex. It gets set at the start of stages by the global timer:
Masterjun wrote:
global timer ($3F) is used, $4B is initialized by: timer XOR 0xFF; and $4A is initialized by that $4B OR 0x88
Otherwise RNG only advances when it is called. You lose a sword point if you cause the sword to clang and $4A (2 byte little endian hex) is is either 0xX0 or 0xX8 (= ends on 0 or 8). In any case all clangs cause RNG*5+0x3711 to be the new RNG. The bad guy in the background of the dev level with the mirror will move the fan in a random direction and for a random amount of time. It is determined by the following:
Masterjun wrote:
the game takes one byte of RNG ($4B) to determine the direction and how far the fan will go to the left/right from the middle (after the attack it returns to the middle) if 00-7F it will go to the left, if 80-FF it will go to the right afterwards it uses that same byte and ANDs it with 7 (getting the lower 3 bits), and uses it as an index to determine the duration of the left/right-movement (both at 4 pixels per frame), and the table is: 12 11 10 10 9 9 6 4 so a byte of 0x00 and the fan will go 12 frames to the left, 0x80 and it will go 12 frames to the right
Also I didn't realize that ALL gates were on a timer, I just figured the stage didn't let you skip the 3-headed dragon boss because the gate wasn't working. I managed to skip it otherwise. EDIT: Forgot to mention, for my TAS having the fan stay closest to center was the fastest possible setup, not sure if it still would be if you got the chest item but idk.
[16:36:31] <Mothrayas> I have to say this argument about robot drug usage is a lot more fun than whatever else we have been doing in the past two+ hours
[16:08:10] <BenLubar> a TAS is just the limit of a segmented speedrun as the segment length approaches zero
Cyorter
He/Him
Editor, Player (249)
Joined: 2/8/2017
Posts: 138
Location: Venezuela
In the Sword's Power, only the second digit matters. Sword Power 15 -> Actually 1 Sword Power 23 -> Actually 2 Sword Power 58 -> Actually 5 Sword Power 90 -> Actually 9
Blazephlozard
He/Him
Banned User
Joined: 2/27/2013
Posts: 175
Location: Ohio
Thanks to WarHippy improving our level 2 skeleton clip, we're currently over 30 frames ahead entering Kyoto 1, so sub 8 is almost definitely happening. We might also be killing one dragon head (and duping its power orb) to save hits on Benkei/final boss, and hopefully are more able to manipulate RNG now that we know how it works better (thanks to Memory) If anyone wants to join our team server and help, message me on Discord (i'm in the tasvideos discord)
Editor, Reviewer, Skilled player (1361)
Joined: 9/12/2016
Posts: 1646
Location: Italy
Blazephlozard wrote:
If anyone wants to join our team server and help, message me on Discord (i'm in the tasvideos discord)
Why not simply uploading the WIPs to userfiles?
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Skilled player (1024)
Joined: 1/9/2011
Posts: 231
Because Drag and Drop is far better than 1. Export to .bk2 2. Add to Archive 3. Open Tasvideos.org 4. Load submission page 5. Select from dialogue box 6. Copy/paste the link back into discord ... for every change
Blazephlozard
He/Him
Banned User
Joined: 2/27/2013
Posts: 175
Location: Ohio
A submission has been made: http://tasvideos.org/6633S.html Thank you for the help, especially with RNG and hitboxes.