TetrisGYM
TetrisGYM copied to clipboard
[Feature request] Mode for training maintaing and gaining DAS
The video NES Tetris DAS: Tools to understand it and improve your skill has some interesting tools for training with DAS. Specifically here (NESTetrisDASExplainer) and here (NESTetrisDASTrainer). It does not need to be exactly as shown in the video, but something that resembles it would be a good idea in my opinion.
yea this would be nice
The NESTetrisDASExplainer or the NESTetrisDASTrainer? (or maybe both?)
I asked Tom Lokovic (the person that made those plugins) if it would be okay to directly use the code of the plugins as inspirations and he said yes (it is okay)!
If you're not familiar already then I suggest checking out jazzthief81's DAS Trainer or rlnilsen's Simple DAS Trainer. They are both great hacks to help with DAS until these features get implemented in Gym.
Thanks for the suggestions! I have already found DAS Trainer, did not know about Simple DAS Trainer. The reason I have for not using them was that I couldn't find out how to use these hacks with RetroArch.
Also imo, they are great hacks, but I think that these plugins are even better and when I know a really good solution is possible I find it difficult to use the other plugins. That is why I went this route first, opening a issue here. I have half a mind to try implement them myself but it will take a while since I need to first learn Assembly and TetrisGYM development. I have only experience with C, C++ and Python from my masters (which I need to finish, another reason why it will take a good while if I try to do it myself).
https://github.com/user-attachments/assets/a0c7c5d3-0da8-47d7-b81f-c7faf8ac63c7
I made a romhack for this purpose (not including the plugin stats and info), for the original NTSC US ROM. (I can't attach .bps here, but if you want it, you can dm me on Discord luphoria).
Basically it forces you to do smart drops instead of wall charge. Personally I rely almost completely on wall charge and it's made me not worry at all about efficiency/finesse, so I think this trainer will help force me on the right path. I figured it could help someone else too 🙂.
It only works with the original USA NTSC rom, i'm not totally sure how to make it work with Gym.
The whole diff between the original and my patch is
00000A16 A9 EA
00000A17 10 EA
00000A18 85 EA
00000A19 46 EA
but that pattern (A9108546) doesn't even appear in the Tetris Gym rom, so i'm not sure where i need to apply the nops. So if someone more knowledgeable could help out with that (i.e. a maintainer), that would be sick.
BTW: Here is a more stripped down and combined version of both FCEUX plugins mentioned above (also shown in video). https://gist.github.com/luphoria/20402f13c6a1a9aa926412d96ac5bfea/
@luphoria
https://github.com/kirjavascript/TetrisGYM/blob/aad48e307c78d75fc6b4d05888c1529da4deeb9f/src/playstate/active.asm#L496-L497
This is the equivalent code. It reads from a byte in memory to support both NTSC and PAL instead of the NTSC constant, that's why it's a different byte sequence.
TetrisGYM/src/playstate/active.asm
Lines 496 to 497 in aad48e3
lda dasValueDelay sta autorepeatX This is the equivalent code. It reads from a byte in memory to support both NTSC and PAL instead of the NTSC constant, that's why it's a different byte sequence.
Thank you!!! Here's a bps patch to do the same for Gym: https://github.com/luphoria/TetrisGYM/releases/tag/v6-no-wall-charge
I'll see what I can do when i've got free time to maybe make a version where it's added as a setting, but if there's more than some assembly required, then it's probably above my pay grade. :-)