Added nearly full support for the USB memory device. This code works in X up to latest DDR (only tested A for later games).
Description
A large majority of the DDR 12-16 code is reused so I moved that code to ddrhook-util. The major changes to the shared code are the addition of a new initializer for the p3io code that is used to enable the plug emulation and the USB memory implementation.
I also added a new parameter for ddrhook, -m which can be used to specify the path for the USB memory data. By default for ddrhook and ddrhookx, the default path is usbmem in the same folder as the launcher. The subfolders usbmem\p1 and usbmem\p2 will be automatically created if they don't exist. The data for each individual drive goes inside the p1 and p2 folders. DDR X2 through DDR 2014 are untested as I do not have the data for it but I presume it works since DDR A reads and accepts the edit data files just fine.
For the USB memory emulation, currently writing files is unsupported. I haven't seen it used in-game (but I'm not knowledgeable about modern DDR tbh) but the functionality exists.
Please note that DDR X game has an issue with arrows that apparently also affects DDR X2: the arrows are mostly gray. I have absolutely no idea how to fix that so it can just be hex patched on the user's end similar to what people do for X2 apparently. It won't be fixed by this PR.
USB memory support as tested in DDR X:
Related Issue
How Has This Been Tested?
By launching and playing the game. Also tested to make sure DDR A still boots as expected.
Tested relative and absolute paths for the USB memory paths in both DDR X's conf and through DDR 12-16's -m parameter.
Checklist
Implemented (unit) test(s) which prove that the introduced changes are working as expected.
Tested with the following games:
DDR X JAA
DDR X UAA
DDR A
Followed the developer (style) guidelines.
Updated existing doc of or add new doc to README file(s).
Updated development documentation.
In GitLab by @33c17f40 on May 14, 2022, 13:41
_Merges add_ddr_x_support -> master_
## Summary
<!--- Provide a general summary of your changes in the Title above -->
- Added support for DDR X.
- Added nearly full support for the USB memory device. This code works in X up to latest DDR (only tested A for later games).
## Description
<!--- Describe your changes in detail -->
A large majority of the DDR 12-16 code is reused so I moved that code to ddrhook-util. The major changes to the shared code are the addition of a new initializer for the p3io code that is used to enable the plug emulation and the USB memory implementation.
I also added a new parameter for ddrhook, `-m` which can be used to specify the path for the USB memory data. By default for ddrhook and ddrhookx, the default path is `usbmem` in the same folder as the launcher. The subfolders `usbmem\p1` and `usbmem\p2` will be automatically created if they don't exist. The data for each individual drive goes inside the p1 and p2 folders. DDR X2 through DDR 2014 are untested as I do not have the data for it but I presume it works since DDR A reads and accepts the edit data files just fine.
Edit data can be easily found online for testing: http://dgddru.blog.fc2.com/blog-category-2.html
For the USB memory emulation, currently writing files is unsupported. I haven't seen it used in-game (but I'm not knowledgeable about modern DDR tbh) but the functionality exists.
Please note that DDR X game has an issue with arrows that apparently also affects DDR X2: the arrows are mostly gray. I have absolutely no idea how to fix that so it can just be hex patched on the user's end similar to what people do for X2 apparently. It won't be fixed by this PR.
USB memory support as tested in DDR X:


## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
By launching and playing the game. Also tested to make sure DDR A still boots as expected.
Tested relative and absolute paths for the USB memory paths in both DDR X's conf and through DDR 12-16's `-m` parameter.
## Checklist
<!-- Make sure you covered all items, which apply, of the checklist below. -->
<!-- Strikethrough items that do not apply and provide a brief description why. -->
* [ ] Implemented (unit) test(s) which prove that the introduced changes are working as expected.
* Tested with the following games:
* [x] DDR X JAA
* [x] DDR X UAA
* [x] DDR A
* [x] Followed the developer (style) guidelines.
* [x] Updated existing doc of or add new doc to README file(s).
* [ ] Updated development documentation.
In GitLab by @33c17f40 on May 14, 2022, 18:00
added 1 commit
<ul><li>369c628a - Fix DDR X2 and X3 not booting</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2462&start_sha=8f7b84ec665aa57142d509744b2fe32cf6c2b39a)
In GitLab by @33c17f40 on May 14, 2022, 18:01
Fix for https://dev.s-ul.net/djhackers/bemanitools/-/issues/83 has been pushed.
https://dev.s-ul.net/djhackers/bemanitools/-/merge_requests/113/diffs?commit_id=369c628a27e85965bcf2b8b5d3773786d111136c
In GitLab by @33c17f40 on May 14, 2022, 18:28
added 1 commit
<ul><li>02976621 - Use process_hijack_startup instead of hooking an early function</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2464&start_sha=369c628a27e85965bcf2b8b5d3773786d111136c)
In GitLab by @33c17f40 on May 17, 2022, 04:50
added 1 commit
<ul><li>1095ac3e - Update README</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2467&start_sha=029766210168831dd64a8d6b2461e9c61e685e0f)
Naming-wise, I was expecting ddrhook1 instead of ddrhookx or simply ddrhook if there is only a single hook module we need at this point. Why ddrhookx?
Naming-wise, I was expecting `ddrhook1` instead of `ddrhookx` or simply `ddrhook` if there is only a single hook module we need at this point. Why `ddrhookx`?
Nit: I would expect to have this in the config-gfx module as it doesn't require anything of this hook module. Same applies to ddrhookx_d3d9_init_config
Nit: I would expect to have this in the `config-gfx` module as it doesn't require anything of this hook module. Same applies to `ddrhookx_d3d9_init_config`
Ok, I just noticed here that this hook is for DDR X only. To stick to BT5's naming scheme, I suggest to rename this one to ddrhook1 and the other hook supporting 12 to 16 to ddrhook2.
Ok, I just noticed here that this hook is for DDR X only. To stick to BT5's naming scheme, I suggest to rename this one to `ddrhook1` and the other hook supporting 12 to 16 to `ddrhook2`.
That part isn't entirely clear to me. Does this imply that the bootstrapping for DDR X is different compared to most other bemani games that are currently supported by BT5? If yes, do you mind pointed out those differences in the comment?
That part isn't entirely clear to me. Does this imply that the bootstrapping for DDR X is different compared to most other bemani games that are currently supported by BT5? If yes, do you mind pointed out those differences in the comment?
I suppose that's the "earliest entry point" you could use to bootstrapping hooking as early in the main program flow as possible? If applicable, do you mind pointing that out with a comment?
I suppose that's the "earliest entry point" you could use to bootstrapping hooking as early in the main program flow as possible? If applicable, do you mind pointing that out with a comment?
Remark regarding my review: I did my best to understand the changes and questioning if these make sense (based on my experience with other bemani titles). However, the whole usbmem module is just one big mystery to me and I skipped most of it. If there are still specific parts you want me to look at, please point them out and I try my best to review them.
Does this need additional QA before you would want to merge the changes and have them released? If yes, which games and what type of environments/setups would you require?
Streamrolling changeset. Amazing work.
Remark regarding my review: I did my best to understand the changes and questioning if these make sense (based on my experience with other bemani titles). However, the whole `usbmem` module is just one big mystery to me and I skipped most of it. If there are still specific parts you want me to look at, please point them out and I try my best to review them.
Does this need additional QA before you would want to merge the changes and have them released? If yes, which games and what type of environments/setups would you require?
No, DDR X is pre-XML configuration so these hooks are required.
In GitLab by @33c17f40 on May 19, 2022, 03:15
Commented on [src/main/ddrhookx/avs-boot.c line 127](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-8774e6c7192c60c529850366e395e47eR127)
No, DDR X is pre-XML configuration so these hooks are required.
That comment is copypasted directly from ddrhook's master.c. I didn't really put too much thought into why they did that honestly.
In GitLab by @33c17f40 on May 19, 2022, 03:17
Commented on [src/main/ddrhookx/master.c line 57](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-9bf56737ebf7ac310dbfaef7be6e6161R57)
That comment is copypasted directly from ddrhook's master.c. I didn't really put too much thought into why they did that honestly.
Cruft from the original code. standard_def and _15khz are defined as extern in ddrhook-util/p3io.c and defined in the dllmain.c. Speaking of which, I forgot to expose _15khz in the configuration it seems.
In GitLab by @33c17f40 on May 19, 2022, 03:20
Commented on [src/main/ddrhookx/dllmain.c line 111](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-fc064fbbc41b76f0ceafc260b984f3fbR111)
Cruft from the original code. `standard_def` and `_15khz` are defined as `extern` in `ddrhook-util/p3io.c` and defined in the dllmain.c. Speaking of which, I forgot to expose `_15khz` in the configuration it seems.
Forgot to revert it. I automatically have it unzipping the ddr-11.zip into my game directory after builds for testing so I defaulted it to windowed or else the game would resize everything.
In GitLab by @33c17f40 on May 19, 2022, 03:21
Commented on [dist/ddr/ddr-11-us.conf line 23](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-be8da7851a6ab8c4f58aa9a0e5b14a41R23)
Forgot to revert it. I automatically have it unzipping the ddr-11.zip into my game directory after builds for testing so I defaulted it to windowed or else the game would resize everything.
Does this need additional QA before you would want to merge the changes and have them released? If yes, which games and what type of environments/setups would you require?
I gave a quick go through all of the DDR games to make sure I didn't break anything but ideally if someone else could give a quick run through of important games + verify the usbmem changes work, that would be reassuring.
For usbmem: launch the game once to create directories (or create the structure usbmem/p1 and usbmem/p2), run the USB memory under I/O test menu and it should say "NO DATA", extract the contents of the edit data (http://file.blog.fc2.com/dgddru/DDR_EDIT_3REN.zip) into the p1 or p2 folder (file path should become usbmem/p1/DDR_EDIT/DDR_EDIT_J.DAT for example), then run the USB memory test again and it should say "OK" this time. If you go in-game you should see the edit data show up as a new category in DDR X, X2, X3, and 2013 (I think they changed to e-amuse for 2014?).
A series games are also affected by usbmem changes but there's no active uses of it afaik so testing that is optional. As long as it boots it's fine, but it exists in I/O test menu too.
In GitLab by @33c17f40 on May 19, 2022, 03:31
I'll do the code changes later today.
>Does this need additional QA before you would want to merge the changes and have them released? If yes, which games and what type of environments/setups would you require?
I gave a quick go through all of the DDR games to make sure I didn't break anything but ideally if someone else could give a quick run through of important games + verify the usbmem changes work, that would be reassuring.
For usbmem: launch the game once to create directories (or create the structure `usbmem/p1` and `usbmem/p2`), run the USB memory under I/O test menu and it should say "NO DATA", extract the contents of the edit data (http://file.blog.fc2.com/dgddru/DDR_EDIT_3REN.zip) into the p1 or p2 folder (file path should become `usbmem/p1/DDR_EDIT/DDR_EDIT_J.DAT` for example), then run the USB memory test again and it should say "OK" this time. If you go in-game you should see the edit data show up as a new category in DDR X, X2, X3, and 2013 (I think they changed to e-amuse for 2014?).
A series games are also affected by usbmem changes but there's no active uses of it afaik so testing that is optional. As long as it boots it's fine, but it exists in I/O test menu too.
I chose ddrhookx because it was only ever used by DDR X. I am fine with ddrhook1 though. This can't be merged with ddrhook due to all of the extra requirements (.conf configuration, manually hooking libavs/ea3 for booting, etc).
In GitLab by @33c17f40 on May 19, 2022, 04:02
Commented on [src/main/ddrhookx/Module.mk line 1](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-4139305b9fb44de58d25cbb0cc02344eR1)
I chose ddrhookx because it was only ever used by DDR X. I am fine with ddrhook1 though. This can't be merged with ddrhook due to all of the extra requirements (.conf configuration, manually hooking libavs/ea3 for booting, etc).
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [src/main/ddrhookx/Module.mk line 1](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-4139305b9fb44de58d25cbb0cc02344eR1)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#450cba41adc8729c76870b56640e86c24ced341a_1_0)
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [src/main/ddrhookx/avs-boot.c line 127](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-8774e6c7192c60c529850366e395e47eR127)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#477b29c740c77ff14ea26486e3722886d81b081d_127_0)
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [src/main/ddrhookx/d3d9.c line 1](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-4bbc994fb4a12348ce6c282022bf4aadR1)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#6d1865dc4aaf8ef59516bed5b55fcc9e42037073_1_0)
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [src/main/ddrhookx/d3d9.c line 139](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-4bbc994fb4a12348ce6c282022bf4aadR139)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#6d1865dc4aaf8ef59516bed5b55fcc9e42037073_139_0)
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [src/main/ddrhookx/master.c line 57](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-9bf56737ebf7ac310dbfaef7be6e6161R57)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#e6f954093953fafe513dc804bb581a2c7535c0f4_57_0)
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [src/main/ddrhookx/master.h line 6](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-61389530abfadb3d53da8a830436cb91R6)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#3a2dd16d53444f9950df9934a938457c18c18ff5_6_0)
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [src/main/ddrhookx/master.h line 2](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-61389530abfadb3d53da8a830436cb91R2)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#3a2dd16d53444f9950df9934a938457c18c18ff5_2_0)
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [src/main/ddrhookx/filesystem.h line 4](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-f2e8ce8fc38f031dbf5db39182bcd324R4)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#31e0a0b587d7b6c6832c634e6b05c43463a0625a_4_0)
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [src/main/ddrhookx/filesystem.h line 6](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-f2e8ce8fc38f031dbf5db39182bcd324R6)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#31e0a0b587d7b6c6832c634e6b05c43463a0625a_6_0)
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [src/main/ddrhookx/filesystem.c line 31](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-cc98a78b2dd7ee0cdcb63787b8718a28R31)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#4bf5d57e8bfe7fdea803227a8781e2bf3dd299c7_31_0)
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [src/main/ddrhookx/dllmain.c line 111](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-fc064fbbc41b76f0ceafc260b984f3fbR111)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#bfe7d19aa6f596425e7f4824204a1862d02c6d47_111_0)
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [src/main/ddrhookx/dllmain.c line 49](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-fc064fbbc41b76f0ceafc260b984f3fbR49)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#bfe7d19aa6f596425e7f4824204a1862d02c6d47_49_0)
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on [dist/ddr/ddr-11-us.conf line 23](https://github.com/djhackersdev/bemanitools/compare/93832d9e380bf6ab21318b983e34730f17f639bf..1095ac3e6d20227468021c6dd8c6a36fd2671b5e#diff-be8da7851a6ab8c4f58aa9a0e5b14a41R23)
changed this line in [version 5 of the diff](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e#a786b3c5da5a57610b74365c6758d41cbba04f3e_23_26)
In GitLab by @33c17f40 on May 19, 2022, 04:24
added 1 commit
<ul><li>45952858 - Fixes based on PR feedback</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2472&start_sha=1095ac3e6d20227468021c6dd8c6a36fd2671b5e)
I will think about how I want to clean up the d3d9 stuff. I originally wanted to avoid making changes to ddr-12-to-16.zip as much as possible since it reduced the amount of testing needed, but from my limited testing the other day, I think some of the changes I made in ddrhook1/d3d9.c also apply to ddr-12-to-16.zip (such as fixing the window size when using windowed mode).
In GitLab by @33c17f40 on May 19, 2022, 04:27
I think I addressed all of the requested changes except the d3d9 changes with https://dev.s-ul.net/djhackers/bemanitools/-/merge_requests/113/diffs?commit_id=4595285881f0f699a6d681ec3a821f7a30dccce9.
I will think about how I want to clean up the d3d9 stuff. I originally wanted to avoid making changes to ddr-12-to-16.zip as much as possible since it reduced the amount of testing needed, but from my limited testing the other day, I think some of the changes I made in ddrhook1/d3d9.c also apply to ddr-12-to-16.zip (such as fixing the window size when using windowed mode).
In GitLab by @33c17f40 on May 19, 2022, 05:35
added 1 commit
<ul><li>f9f52e7b - Refactor d3d9</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2474&start_sha=4595285881f0f699a6d681ec3a821f7a30dccce9)
https://dev.s-ul.net/djhackers/bemanitools/-/merge_requests/113/diffs?commit_id=f9f52e7b2fcd923562644e5f2b4af27a60a4e52c
I moved ddrhook1/d3d9.c to ddrhook-util/gfx.c since it had a hook for create device already, and moved out some graphical hooks from ddrhook-util/misc.c since the same was already done in gfx.c. I left the CreateWindow hooks in misc.c because I don't really know what they accomplish (DDR A doesn't have a frame with window mode) and I don't need them for DDR X and don't want to break things.
Also fixed some misc things I overlooked when doing mass renaming in the last commit. I think this covers everything unless there are any regressions in the other DDR games.
In GitLab by @33c17f40 on May 19, 2022, 05:40
https://dev.s-ul.net/djhackers/bemanitools/-/merge_requests/113/diffs?commit_id=f9f52e7b2fcd923562644e5f2b4af27a60a4e52c
I moved ddrhook1/d3d9.c to ddrhook-util/gfx.c since it had a hook for create device already, and moved out some graphical hooks from ddrhook-util/misc.c since the same was already done in gfx.c. ~~I left the CreateWindow hooks in misc.c because I don't really know what they accomplish (DDR A doesn't have a frame with window mode) and I don't need them for DDR X and don't want to break things.~~
Also fixed some misc things I overlooked when doing mass renaming in the last commit. I think this covers everything unless there are any regressions in the other DDR games.
In GitLab by @33c17f40 on May 19, 2022, 06:29
added 1 commit
<ul><li>030717b4 - ddr: Fix windowed mode regressions</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2477&start_sha=f9f52e7b2fcd923562644e5f2b4af27a60a4e52c)
In GitLab by @33c17f40 on May 19, 2022, 06:30
added 1 commit
<ul><li>3b4fa5db - ddr: Fix windowed mode regressions</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2480&start_sha=030717b47a60f90a54a0c76df71ae806026168e5)
In GitLab by @33c17f40 on May 19, 2022, 06:45
added 1 commit
<ul><li>4526788a - Fix ddr-16-x64.zip build</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2486&start_sha=3b4fa5dbdd46334b91ad4db23e5a1eedf5474089)
DDR X, X2, X3 don't like to have CreateWindow hooked (2013, 2014, A are fine) so I hid it behind a flag for modern games
ddr-16-x64.zip stopped building because of changes to roundplugs, should be fixed now.
I think I've been able to test all games now and they all seem to be booting as expected now. PTAL
In GitLab by @33c17f40 on May 19, 2022, 06:48
Regressions fixed.
- DDR X, X2, X3 don't like to have CreateWindow hooked (2013, 2014, A are fine) so I hid it behind a flag for modern games
- ddr-16-x64.zip stopped building because of changes to roundplugs, should be fixed now.
I think I've been able to test all games now and they all seem to be booting as expected now. PTAL
In GitLab by @33c17f40 on May 19, 2022, 12:15
added 1 commit
<ul><li>60cf4a26 - Fix typo in README</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2488&start_sha=4526788a0ac8dbf46e2c1801401d7089a252ac78)
In GitLab by @33c17f40 on May 19, 2022, 13:21
added 1 commit
<ul><li>43073828 - ddr: Disable cursor during fullscreen</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2490&start_sha=60cf4a26090bf07a85d1f7b855cf89150a3a8b94)
In GitLab by @33c17f40 on May 19, 2022, 13:25
added 1 commit
<ul><li>f0a699a0 - ddr: Disable cursor during fullscreen</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2492&start_sha=43073828eaf25a39e4e9e74b3a676ae1c53dffb9)
Sorry for more last minute additional commits. I got feedback that 64bit builds show a cursor during fullscreen mode. Apparently it was an existing issue unrelated to this PR but I checked and indeed the cursor showed up during fullscreen, so I threw in a code to disable the cursor if it's creating a fullscreen device.
In GitLab by @33c17f40 on May 19, 2022, 13:26
Sorry for more last minute additional commits. I got feedback that 64bit builds show a cursor during fullscreen mode. Apparently it was an existing issue unrelated to this PR but I checked and indeed the cursor showed up during fullscreen, so I threw in a code to disable the cursor if it's creating a fullscreen device.
Having a separate hook to the still current ddrhook is fine. I am concerned with creating a release though as we had two occasions in the past when we had to re-arrange the hook names. If possible, I would like to avoid doing that too often as it confused people a lot.
I am fine merging the MR as it is with ddrhookx and ddrhook but would like to follow-up with aligning to ddrhook1 and ddrhook2 before packing a release.
Having a separate hook to the still current ddrhook is fine. I am concerned with creating a release though as we had two occasions in the past when we had to re-arrange the hook names. If possible, I would like to avoid doing that too often as it confused people a lot.
I am fine merging the MR as it is with `ddrhookx` and `ddrhook` but would like to follow-up with aligning to `ddrhook1` and `ddrhook2` before packing a release.
Wasn't aware this was part of ddrhook as I haven't really worked on that part at all. Taking back my request then and give it a "well done copy-paste" approval.
Wasn't aware this was part of `ddrhook` as I haven't really worked on that part at all. Taking back my request then and give it a "well done copy-paste" approval.
this should probably be exposed in the config-gfx.h
In GitLab by @xyen on May 20, 2022, 05:40
Commented on [src/main/ddrhook-util/gfx.c line 230](https://github.com/djhackersdev/bemanitools/compare/ccfe6f7923bd94552d23a1384ec194c3aa444d0e..3eaf0d13f798d4052b0b0a791e40c3dd3037a9d6#diff-9928b355f2e1c0e52af8d5c93c8a31dbR230)
this should probably be exposed in the `config-gfx.h`
This can happen in a later MR, but config-gfx should probably be moved to ddrhook-util, also a minor nit about ShowCursor not being exposed as a setting instead. Otherwise, looks good to me, will leave accepting it up to icex2.
In GitLab by @xyen on May 20, 2022, 05:40
This can happen in a later MR, but config-gfx should probably be moved to ddrhook-util, also a minor nit about ShowCursor not being exposed as a setting instead. Otherwise, looks good to me, will leave accepting it up to icex2.
config-gfx should probably be moved to ddrhook-util
Unless ddrhook/ddrhook2 also starts using the .conf files then I don't think there's a need to move config-gfx to ddrhook-util. ddrhook/ddrhook2 currently just uses command line arguments for the few configuration settings it needs.
In GitLab by @33c17f40 on May 20, 2022, 11:03
>config-gfx should probably be moved to ddrhook-util
Unless ddrhook/ddrhook2 also starts using the .conf files then I don't think there's a need to move config-gfx to ddrhook-util. ddrhook/ddrhook2 currently just uses command line arguments for the few configuration settings it needs.
In GitLab by @33c17f40 on May 21, 2022, 22:40
added 1 commit
<ul><li>faa51402 - Be more careful about USB memory errors</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2500&start_sha=f0a699a040e5a9a0fbedc4ab132090e98fdda958)
Hold off on merging this until I can get some more fixes in. I think X2 and X3 might need proper p3io coin support but I need to do more research tomorrow to determine for sure.
I pushed a fix to stop the USB memory check from getting stuck in an error loop. I also made the USB memory emulation toggleable because it adds more time to a startup for a feature that most people honestly probably won't use. I defaulted it to disabled so that it functions the same as before (enough to pass checks but doesn't do anything in-game). Set usbmem_enabled to true to enable the USB stick device emulation for DDR X, and specify a path with -m <usbmem path> to enable it for X2 and later. If the game requests a file that doesn't exist (it only ever requests one file) then it will disable that specific USB stick until the game is restarted so as to not get stuck in the read loop. Ideally this would probably be exposed as a keybind like carding in, but I don't think it's worth the effort to redo the config UI stuff right now for a feature I don't think will be too popular.
In GitLab by @33c17f40 on May 21, 2022, 22:45
Hold off on merging this until I can get some more fixes in. I think X2 and X3 might need proper p3io coin support but I need to do more research tomorrow to determine for sure.
I pushed a fix to stop the USB memory check from getting stuck in an error loop. I also made the USB memory emulation toggleable because it adds more time to a startup for a feature that most people honestly probably won't use. I defaulted it to disabled so that it functions the same as before (enough to pass checks but doesn't do anything in-game). Set `usbmem_enabled` to `true` to enable the USB stick device emulation for DDR X, and specify a path with `-m <usbmem path>` to enable it for X2 and later. If the game requests a file that doesn't exist (it only ever requests one file) then it will disable that specific USB stick until the game is restarted so as to not get stuck in the read loop. Ideally this would probably be exposed as a keybind like carding in, but I don't think it's worth the effort to redo the config UI stuff right now for a feature I don't think will be *too* popular.
In GitLab by @33c17f40 on May 21, 2022, 23:32
added 1 commit
<ul><li>cd46fe0d - Fix window mode for X2 and X3</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2502&start_sha=faa514025baad079dc51617171aa467451d08426)
In GitLab by @33c17f40 on May 21, 2022, 23:46
added 1 commit
<ul><li>b47780e2 - Fix bemanitools.zip build</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2505&start_sha=cd46fe0da13f4782874d129fa85af1be242313b7)
Tried on my Windows 11 laptop with Ryzen 7 5800H and its integrated Radeon Vega graphics and it works as expected, except the hold arrows look grey and the credit texts look scrambled like on non-AMD graphics; this is odd considering the graphics I'm using is an AMD one.
Also, while it works on Windows 11, it doesn't work on Windows XP (regardless of SP2 or SP3). Tried on both VMWare virtual machine and real machine to no avail and just boots up to an I/O error. Considering that most people would want to run this on a XP-based cab, a fix for XP would be nice.
In GitLab by @konmai69 on May 22, 2022, 16:59

Tried on my Windows 11 laptop with Ryzen 7 5800H and its integrated Radeon Vega graphics and it works as expected, except the hold arrows look grey and the credit texts look scrambled like on non-AMD graphics; this is odd considering the graphics I'm using is an AMD one.

Also, while it works on Windows 11, it doesn't work on Windows XP (regardless of SP2 or SP3). Tried on both VMWare virtual machine and real machine to no avail and just boots up to an I/O error. Considering that most people would want to run this on a XP-based cab, a fix for XP would be nice.
In GitLab by @33c17f40 on May 23, 2022, 24:42
added 1 commit
<ul><li>09f1477e - Add in more filesystem hooks</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2507&start_sha=b47780e29d117de23354ae47cf27cc1bb6546576)
In GitLab by @33c17f40 on May 23, 2022, 24:53
added 1 commit
<ul><li>dbb530e8 - Add in check for updates folder too</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2508&start_sha=09f1477e41e98d183d63dcc274eba2becdb15720)
In GitLab by @33c17f40 on May 23, 2022, 02:26
added 1 commit
<ul><li>5450aa30 - Split USB memory path configurations</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2509&start_sha=dbb530e80915b70b9996a2386ca5e877e1b165ff)
In GitLab by @33c17f40 on May 23, 2022, 02:27
added 1 commit
<ul><li>dd03176e - Fix conf description string</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2510&start_sha=5450aa303554cb9ecc1150281d8be85af3bb4231)
In GitLab by @33c17f40 on May 24, 2022, 03:39
added 1 commit
<ul><li>99f15d2e - revert: Use process_hijack_startup instead of hooking an early function</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2518&start_sha=dd03176e26419e9c0c055f05a0d5424ba8cfce80)
re: Graphics
Graphical issues are already known and not something I'm looking to fix in the tools unless it can be proven that it's something in the tools causing the issue.
re: WinXP
That's odd. I just booted up the WinXP VM to test using tools and I can reproduce it. But this looks like a capnhook issue. I've reverted the change that made the hook use process_hijack_startup.
cc @icex2 process_hijack_startup doesn't work on WinXP so avoid using it for anything that might reasonably be run on WinXP I guess.
In GitLab by @33c17f40 on May 24, 2022, 03:41
re: Graphics
Graphical issues are already known and not something I'm looking to fix in the tools unless it can be proven that it's something in the tools causing the issue.
re: WinXP
That's odd. I just booted up the WinXP VM to test using tools and I can reproduce it. But this looks like a capnhook issue. I've reverted the change that made the hook use `process_hijack_startup`.
cc @icex2 `process_hijack_startup` doesn't work on WinXP so avoid using it for anything that might reasonably be run on WinXP I guess.
In GitLab by @33c17f40 on May 25, 2022, 02:04
added 1 commit
<ul><li>45eba62c - Force game to always think a debugger isn't present</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2530&start_sha=99f15d2ec63a6377614e05c37439c857886fc353)
Bug fix for an issue someone reported: "Noticed something weird with the 2009063000 datacode though... seems to always play the same video (a one that looks like someone driving) instead of the actual video for a song. fway.m2v or fway.mpg, I think (they look like the same video anyway). Doesn't seem to do it on other datacodes."
The game has a check for debuggers and something (inject.exe?) is triggering IsDebuggerPresent(). If IsDebuggerPresent() returns true then it forces the game to always load fway.mpg instead of the normal video.
Additional note, DDR X uses CLVSD.ax and not k-clvsd.dll like more modern DDR games. If your game crashes on boot (if the log says something like xEXCEPTION_ACCESS_VIOLATION 0x338251D3) then you must use CLVSD.ax. It may require you to unregister k-clvsd.dll first to detect CLVSD.ax.
In GitLab by @33c17f40 on May 25, 2022, 02:10
Bug fix for an issue someone reported: "Noticed something weird with the 2009063000 datacode though... seems to always play the same video (a one that looks like someone driving) instead of the actual video for a song. fway.m2v or fway.mpg, I think (they look like the same video anyway). Doesn't seem to do it on other datacodes."
The game has a check for debuggers and something (inject.exe?) is triggering IsDebuggerPresent(). If IsDebuggerPresent() returns true then it forces the game to always load fway.mpg instead of the normal video.
Additional note, DDR X uses CLVSD.ax and not k-clvsd.dll like more modern DDR games. If your game crashes on boot (if the log says something like `xEXCEPTION_ACCESS_VIOLATION 0x338251D3`) then you must use CLVSD.ax. It may require you to unregister k-clvsd.dll first to detect CLVSD.ax.
Should be fixed with the latest commit based on my testing: https://dev.s-ul.net/djhackers/bemanitools/-/merge_requests/113/diffs?commit_id=45eba62c15ce19dde40062d2a9f54ee7903d1202
In GitLab by @33c17f40 on May 26, 2022, 13:45
added 1 commit
<ul><li>ff9addc6 - Add support for DDR X2 US</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2532&start_sha=45eba62c15ce19dde40062d2a9f54ee7903d1202)
In GitLab by @33c17f40 on May 26, 2022, 14:29
added 1 commit
<ul><li>3cad9dcc - Add ddr-12-us.zip to bemanitools.zip</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2534&start_sha=ff9addc620ddc75669263787f3a6512542d28775)
In GitLab by @33c17f40 on May 26, 2022, 14:32
added 1 commit
<ul><li>f897b882 - Clean up old variables</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2536&start_sha=3cad9dcc151420317d6a4c56949f3ed04e407c8e)
In GitLab by @33c17f40 on May 26, 2022, 14:47
added 1 commit
<ul><li>2dfb1573 - Add ddr-12 EU support</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2538&start_sha=f897b882c28715a0e66851bf2514277296cd6ce6)
DDR X2 US/EU support added. I am not sure what the difference between US and EU but both seem to be booting.
In GitLab by @33c17f40 on May 26, 2022, 14:48
DDR X2 US/EU support added. I am not sure what the difference between US and EU but both seem to be booting.
In GitLab by @33c17f40 on May 30, 2022, 04:00
added 32 commits
<ul><li>2dfb1573...ccfe6f79 - 8 commits from branch <code>djhackers:master</code></li><li>350e84b3 - Add support for DDR X</li><li>34b3b405 - Nearly complete USB memory support</li><li>9cfc6ee8 - Fix DDR X2 and X3 not booting</li><li>348fbb15 - Use process_hijack_startup instead of hooking an early function</li><li>cd449f7e - Update README</li><li>d4a03bcd - Fixes based on PR feedback</li><li>bdf62988 - Refactor d3d9</li><li>d9f71727 - ddr: Fix windowed mode regressions</li><li>7bec8619 - Fix ddr-16-x64.zip build</li><li>10a2949e - Fix typo in README</li><li>f9e3113e - ddr: Disable cursor during fullscreen</li><li>90d3b111 - Be more careful about USB memory errors</li><li>c3b33d5f - Fix window mode for X2 and X3</li><li>b92e0155 - Fix bemanitools.zip build</li><li>5058b97d - Add in more filesystem hooks</li><li>2e890363 - Add in check for updates folder too</li><li>a36ad402 - Split USB memory path configurations</li><li>905a5fcc - Fix conf description string</li><li>0484bd92 - revert: Use process_hijack_startup instead of hooking an early function</li><li>c69e26ba - Force game to always think a debugger isn't present</li><li>885de752 - Add support for DDR X2 US</li><li>ee39f526 - Add ddr-12-us.zip to bemanitools.zip</li><li>fc128b53 - Clean up old variables</li><li>3eaf0d13 - Add ddr-12 EU support</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/113/diffs?diff_id=2555&start_sha=2dfb15738bf77c130375b7937c2594b3a425227c)
Several testers reported back with positive feedback about this at the current stage. Documentation updates will be followed up before the actual next BT5 release. Any further patches can be forward fixes at this stage.
Thanks again for this amazing contribution and all the effort that went into this.
Several testers reported back with positive feedback about this at the current stage. Documentation updates will be followed up before the actual next BT5 release. Any further patches can be forward fixes at this stage.
Thanks again for this amazing contribution and all the effort that went into this.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
In GitLab by @33c17f40 on May 14, 2022, 13:41
Merges add_ddr_x_support -> master
Summary
Description
A large majority of the DDR 12-16 code is reused so I moved that code to ddrhook-util. The major changes to the shared code are the addition of a new initializer for the p3io code that is used to enable the plug emulation and the USB memory implementation.
I also added a new parameter for ddrhook,
-mwhich can be used to specify the path for the USB memory data. By default for ddrhook and ddrhookx, the default path isusbmemin the same folder as the launcher. The subfoldersusbmem\p1andusbmem\p2will be automatically created if they don't exist. The data for each individual drive goes inside the p1 and p2 folders. DDR X2 through DDR 2014 are untested as I do not have the data for it but I presume it works since DDR A reads and accepts the edit data files just fine.Edit data can be easily found online for testing: http://dgddru.blog.fc2.com/blog-category-2.html
For the USB memory emulation, currently writing files is unsupported. I haven't seen it used in-game (but I'm not knowledgeable about modern DDR tbh) but the functionality exists.
Please note that DDR X game has an issue with arrows that apparently also affects DDR X2: the arrows are mostly gray. I have absolutely no idea how to fix that so it can just be hex patched on the user's end similar to what people do for X2 apparently. It won't be fixed by this PR.
USB memory support as tested in DDR X:


Related Issue
How Has This Been Tested?
By launching and playing the game. Also tested to make sure DDR A still boots as expected.
Tested relative and absolute paths for the USB memory paths in both DDR X's conf and through DDR 12-16's
-mparameter.Checklist
In GitLab by @33c17f40 on May 14, 2022, 13:47
@icex2 In case you see this PR before the PM, check your PMs on sows in regards to this PR.
In GitLab by @33c17f40 on May 14, 2022, 18:00
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 14, 2022, 18:01
Fix for https://dev.s-ul.net/djhackers/bemanitools/-/issues/83 has been pushed.
https://dev.s-ul.net/djhackers/bemanitools/-/merge_requests/113/diffs?commit_id=369c628a27e85965bcf2b8b5d3773786d111136c
In GitLab by @33c17f40 on May 14, 2022, 18:28
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 17, 2022, 04:50
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 17, 2022, 04:51
marked the checklist item Updated existing doc of or add new doc to README file(s). as completed
Naming-wise, I was expecting
ddrhook1instead ofddrhookxor simplyddrhookif there is only a single hook module we need at this point. Whyddrhookx?Does DDRX have an external xml config like any recent bemani games? Wondering if the hook here is required.
IIRC someone posted on the pig stall that this is related to some shader code that is not working/compatible on nvidia cards.
Nit: I would expect to have this in the
config-gfxmodule as it doesn't require anything of this hook module. Same applies toddrhookx_d3d9_init_configOk, I just noticed here that this hook is for DDR X only. To stick to BT5's naming scheme, I suggest to rename this one to
ddrhook1and the other hook supporting 12 to 16 toddrhook2.That part isn't entirely clear to me. Does this imply that the bootstrapping for DDR X is different compared to most other bemani games that are currently supported by BT5? If yes, do you mind pointed out those differences in the comment?
Naming nit:
ddrhookx_master_insert_hooksto scope it to the module and make it easier to identify in symbol tables for debugging purposes.Explains the purpose of this function nicely. Want to move that to the definition in the header file? Increases visibility for that imo.
I suppose that's the "earliest entry point" you could use to bootstrapping hooking as early in the main program flow as possible? If applicable, do you mind pointing that out with a comment?
Appears to be unused? Searching for that variable doesn't show any read usage and this being the only write.
This one also seems to be unused.
How's that part of USB support and/or why change the default? Same for
ddr-11.conf.Resolved once I got to the commit that changes this to hijack main.
Streamrolling changeset. Amazing work.
Remark regarding my review: I did my best to understand the changes and questioning if these make sense (based on my experience with other bemani titles). However, the whole
usbmemmodule is just one big mystery to me and I skipped most of it. If there are still specific parts you want me to look at, please point them out and I try my best to review them.Does this need additional QA before you would want to merge the changes and have them released? If yes, which games and what type of environments/setups would you require?
In GitLab by @33c17f40 on May 19, 2022, 03:15
Commented on src/main/ddrhookx/avs-boot.c line 127
No, DDR X is pre-XML configuration so these hooks are required.
In GitLab by @33c17f40 on May 19, 2022, 03:17
Commented on src/main/ddrhookx/master.c line 57
That comment is copypasted directly from ddrhook's master.c. I didn't really put too much thought into why they did that honestly.
In GitLab by @33c17f40 on May 19, 2022, 03:20
Commented on src/main/ddrhookx/dllmain.c line 111
Cruft from the original code.
standard_defand_15khzare defined asexterninddrhook-util/p3io.cand defined in the dllmain.c. Speaking of which, I forgot to expose_15khzin the configuration it seems.In GitLab by @33c17f40 on May 19, 2022, 03:21
Commented on dist/ddr/ddr-11-us.conf line 23
Forgot to revert it. I automatically have it unzipping the ddr-11.zip into my game directory after builds for testing so I defaulted it to windowed or else the game would resize everything.
In GitLab by @33c17f40 on May 19, 2022, 03:31
I'll do the code changes later today.
I gave a quick go through all of the DDR games to make sure I didn't break anything but ideally if someone else could give a quick run through of important games + verify the usbmem changes work, that would be reassuring.
For usbmem: launch the game once to create directories (or create the structure
usbmem/p1andusbmem/p2), run the USB memory under I/O test menu and it should say "NO DATA", extract the contents of the edit data (http://file.blog.fc2.com/dgddru/DDR_EDIT_3REN.zip) into the p1 or p2 folder (file path should becomeusbmem/p1/DDR_EDIT/DDR_EDIT_J.DATfor example), then run the USB memory test again and it should say "OK" this time. If you go in-game you should see the edit data show up as a new category in DDR X, X2, X3, and 2013 (I think they changed to e-amuse for 2014?).A series games are also affected by usbmem changes but there's no active uses of it afaik so testing that is optional. As long as it boots it's fine, but it exists in I/O test menu too.
In GitLab by @33c17f40 on May 19, 2022, 04:02
Commented on src/main/ddrhookx/Module.mk line 1
I chose ddrhookx because it was only ever used by DDR X. I am fine with ddrhook1 though. This can't be merged with ddrhook due to all of the extra requirements (.conf configuration, manually hooking libavs/ea3 for booting, etc).
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on src/main/ddrhookx/Module.mk line 1
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on src/main/ddrhookx/avs-boot.c line 127
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on src/main/ddrhookx/d3d9.c line 1
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on src/main/ddrhookx/d3d9.c line 139
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on src/main/ddrhookx/master.c line 57
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on src/main/ddrhookx/master.h line 6
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on src/main/ddrhookx/master.h line 2
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on src/main/ddrhookx/filesystem.h line 4
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on src/main/ddrhookx/filesystem.h line 6
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on src/main/ddrhookx/filesystem.c line 31
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on src/main/ddrhookx/dllmain.c line 111
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on src/main/ddrhookx/dllmain.c line 49
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
Commented on dist/ddr/ddr-11-us.conf line 23
changed this line in version 5 of the diff
In GitLab by @33c17f40 on May 19, 2022, 04:24
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 19, 2022, 04:27
I think I addressed all of the requested changes except the d3d9 changes with https://dev.s-ul.net/djhackers/bemanitools/-/merge_requests/113/diffs?commit_id=4595285881f0f699a6d681ec3a821f7a30dccce9.
I will think about how I want to clean up the d3d9 stuff. I originally wanted to avoid making changes to ddr-12-to-16.zip as much as possible since it reduced the amount of testing needed, but from my limited testing the other day, I think some of the changes I made in ddrhook1/d3d9.c also apply to ddr-12-to-16.zip (such as fixing the window size when using windowed mode).
In GitLab by @33c17f40 on May 19, 2022, 05:35
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 19, 2022, 05:40
https://dev.s-ul.net/djhackers/bemanitools/-/merge_requests/113/diffs?commit_id=f9f52e7b2fcd923562644e5f2b4af27a60a4e52c
I moved ddrhook1/d3d9.c to ddrhook-util/gfx.c since it had a hook for create device already, and moved out some graphical hooks from ddrhook-util/misc.c since the same was already done in gfx.c.
I left the CreateWindow hooks in misc.c because I don't really know what they accomplish (DDR A doesn't have a frame with window mode) and I don't need them for DDR X and don't want to break things.Also fixed some misc things I overlooked when doing mass renaming in the last commit. I think this covers everything unless there are any regressions in the other DDR games.
In GitLab by @33c17f40 on May 19, 2022, 06:29
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 19, 2022, 06:30
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 19, 2022, 06:45
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 19, 2022, 06:48
Regressions fixed.
I think I've been able to test all games now and they all seem to be booting as expected now. PTAL
In GitLab by @33c17f40 on May 19, 2022, 12:15
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 19, 2022, 13:21
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 19, 2022, 13:25
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 19, 2022, 13:26
Sorry for more last minute additional commits. I got feedback that 64bit builds show a cursor during fullscreen mode. Apparently it was an existing issue unrelated to this PR but I checked and indeed the cursor showed up during fullscreen, so I threw in a code to disable the cursor if it's creating a fullscreen device.
Having a separate hook to the still current ddrhook is fine. I am concerned with creating a release though as we had two occasions in the past when we had to re-arrange the hook names. If possible, I would like to avoid doing that too often as it confused people a lot.
I am fine merging the MR as it is with
ddrhookxandddrhookbut would like to follow-up with aligning toddrhook1andddrhook2before packing a release.Wasn't aware this was part of
ddrhookas I haven't really worked on that part at all. Taking back my request then and give it a "well done copy-paste" approval.Well, I guess that's fine again and well done copy-pasting whatever works.
Checking your commits, you actually addressed this already. Thanks.
In GitLab by @xyen on May 20, 2022, 05:40
Commented on src/main/ddrhook-util/gfx.c line 230
this should probably be exposed in the
config-gfx.hIn GitLab by @xyen on May 20, 2022, 05:40
This can happen in a later MR, but config-gfx should probably be moved to ddrhook-util, also a minor nit about ShowCursor not being exposed as a setting instead. Otherwise, looks good to me, will leave accepting it up to icex2.
In GitLab by @33c17f40 on May 20, 2022, 11:03
Unless ddrhook/ddrhook2 also starts using the .conf files then I don't think there's a need to move config-gfx to ddrhook-util. ddrhook/ddrhook2 currently just uses command line arguments for the few configuration settings it needs.
In GitLab by @33c17f40 on May 21, 2022, 22:40
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 21, 2022, 22:45
Hold off on merging this until I can get some more fixes in. I think X2 and X3 might need proper p3io coin support but I need to do more research tomorrow to determine for sure.
I pushed a fix to stop the USB memory check from getting stuck in an error loop. I also made the USB memory emulation toggleable because it adds more time to a startup for a feature that most people honestly probably won't use. I defaulted it to disabled so that it functions the same as before (enough to pass checks but doesn't do anything in-game). Set
usbmem_enabledtotrueto enable the USB stick device emulation for DDR X, and specify a path with-m <usbmem path>to enable it for X2 and later. If the game requests a file that doesn't exist (it only ever requests one file) then it will disable that specific USB stick until the game is restarted so as to not get stuck in the read loop. Ideally this would probably be exposed as a keybind like carding in, but I don't think it's worth the effort to redo the config UI stuff right now for a feature I don't think will be too popular.In GitLab by @33c17f40 on May 21, 2022, 23:32
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 21, 2022, 23:46
added 1 commit
Compare with previous version
In GitLab by @konmai69 on May 22, 2022, 16:59
Tried on my Windows 11 laptop with Ryzen 7 5800H and its integrated Radeon Vega graphics and it works as expected, except the hold arrows look grey and the credit texts look scrambled like on non-AMD graphics; this is odd considering the graphics I'm using is an AMD one.
Also, while it works on Windows 11, it doesn't work on Windows XP (regardless of SP2 or SP3). Tried on both VMWare virtual machine and real machine to no avail and just boots up to an I/O error. Considering that most people would want to run this on a XP-based cab, a fix for XP would be nice.
In GitLab by @33c17f40 on May 23, 2022, 24:42
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 23, 2022, 24:53
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 23, 2022, 02:26
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 23, 2022, 02:27
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 24, 2022, 03:39
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 24, 2022, 03:41
re: Graphics
Graphical issues are already known and not something I'm looking to fix in the tools unless it can be proven that it's something in the tools causing the issue.
re: WinXP
That's odd. I just booted up the WinXP VM to test using tools and I can reproduce it. But this looks like a capnhook issue. I've reverted the change that made the hook use
process_hijack_startup.cc @icex2
process_hijack_startupdoesn't work on WinXP so avoid using it for anything that might reasonably be run on WinXP I guess.In GitLab by @33c17f40 on May 25, 2022, 02:04
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 25, 2022, 02:10
Bug fix for an issue someone reported: "Noticed something weird with the 2009063000 datacode though... seems to always play the same video (a one that looks like someone driving) instead of the actual video for a song. fway.m2v or fway.mpg, I think (they look like the same video anyway). Doesn't seem to do it on other datacodes."
The game has a check for debuggers and something (inject.exe?) is triggering IsDebuggerPresent(). If IsDebuggerPresent() returns true then it forces the game to always load fway.mpg instead of the normal video.
Additional note, DDR X uses CLVSD.ax and not k-clvsd.dll like more modern DDR games. If your game crashes on boot (if the log says something like
xEXCEPTION_ACCESS_VIOLATION 0x338251D3) then you must use CLVSD.ax. It may require you to unregister k-clvsd.dll first to detect CLVSD.ax.Should be fixed with the latest commit based on my testing: https://dev.s-ul.net/djhackers/bemanitools/-/merge_requests/113/diffs?commit_id=45eba62c15ce19dde40062d2a9f54ee7903d1202
In GitLab by @33c17f40 on May 26, 2022, 13:45
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 26, 2022, 14:29
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 26, 2022, 14:32
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 26, 2022, 14:47
added 1 commit
Compare with previous version
In GitLab by @33c17f40 on May 26, 2022, 14:48
DDR X2 US/EU support added. I am not sure what the difference between US and EU but both seem to be booting.
In GitLab by @33c17f40 on May 30, 2022, 04:00
added 32 commits
djhackers:master350e84b3- Add support for DDR X34b3b405- Nearly complete USB memory support9cfc6ee8- Fix DDR X2 and X3 not booting348fbb15- Use process_hijack_startup instead of hooking an early functioncd449f7e- Update READMEd4a03bcd- Fixes based on PR feedbackbdf62988- Refactor d3d9d9f71727- ddr: Fix windowed mode regressions7bec8619- Fix ddr-16-x64.zip build10a2949e- Fix typo in READMEf9e3113e- ddr: Disable cursor during fullscreen90d3b111- Be more careful about USB memory errorsc3b33d5f- Fix window mode for X2 and X3b92e0155- Fix bemanitools.zip build5058b97d- Add in more filesystem hooks2e890363- Add in check for updates folder tooa36ad402- Split USB memory path configurations905a5fcc- Fix conf description string0484bd92- revert: Use process_hijack_startup instead of hooking an early functionc69e26ba- Force game to always think a debugger isn't present885de752- Add support for DDR X2 USee39f526- Add ddr-12-us.zip to bemanitools.zipfc128b53- Clean up old variables3eaf0d13- Add ddr-12 EU supportCompare with previous version
resolved all threads
approved this merge request
Several testers reported back with positive feedback about this at the current stage. Documentation updates will be followed up before the actual next BT5 release. Any further patches can be forward fixes at this stage.
Thanks again for this amazing contribution and all the effort that went into this.