Adds ICCA 1.7.0 ish support, along with encrypted polling
Description
Certain games such as popn? and IIDX require encrypted polling when the card reader is version 1.7.0 in order for the card reader to work
How Has This Been Tested?
Tested booting up IIDX, and verified that key exchange occurs, and card polling works via the encrypted polling method
In GitLab by @xyen on Jun 14, 2020, 06:55
_Merges icca_170 -> master_
## Summary
Adds ICCA 1.7.0 ish support, along with encrypted polling
## Description
Certain games such as popn? and IIDX require encrypted polling when the card reader is version 1.7.0 in order for the card reader to work
## How Has This Been Tested?
Tested booting up IIDX, and verified that key exchange occurs, and card polling works via the encrypted polling method
Do you know how the game checks this version? I would assume it just checks and does something along the lines if (current_version < reader_version) updateReaders();. I was thinking about rather old games like iidx 13 which introduced these types of readers and if the default version there is fine.
Do you know how the game checks this version? I would assume it just checks and does something along the lines `if (current_version < reader_version) updateReaders();`. I was thinking about rather old games like iidx 13 which introduced these types of readers and if the default version there is fine.
It depends per game, I set it to 1.6.0, since that's what we were previously emulating, I added 1.5.0 as an option, since later on we want to merge in the ICCB code probably (for jubeat) which is currently pretending to be 1.5.0.
In GitLab by @xyen on Jun 14, 2020, 12:03
Commented on [src/main/acioemu/icca.c line 72](https://github.com/djhackersdev/bemanitools/compare/1656feccd1c3b67c49480588de657e604a339753..8eaeac7f2c33f211901c213260678beff7752b81#diff-affab87058fe7f10f8cdc694a83c62e0R72)
It depends per game, I set it to 1.6.0, since that's what we were previously emulating, I added 1.5.0 as an option, since later on we want to merge in the ICCB code probably (for jubeat) which is currently pretending to be 1.5.0.
In GitLab by @xyen on Jun 14, 2020, 12:03
Commented on [src/main/util/crc.c line 65](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..5dd5266b9d6a2f77aa35237df2972e756df835c3#diff-aba04262f5cf3155ff0e83c5d1b06743R65)
Copied from the above code.
I don't think you can answer this, but is there a newer version than v170 that also uses encryption? I have a feeling this should be icca->version >= v170. If you don't know that (yet), I would leave a comment, something like: v170 is the latest known version but this might be used with future versions as well.
I don't think you can answer this, but is there a newer version than v170 that also uses encryption? I have a feeling this should be `icca->version >= v170`. If you don't know that (yet), I would leave a comment, something like: `v170 is the latest known version but this might be used with future versions as well`.
Since I don't see a reason to allow ptr being NULL for both functions, I suggest we include this assert because it catches such programming mistakes and logs it instead of the application just crashing.
Since I don't see a reason to allow `ptr` being NULL for both functions, I suggest we include this assert because it catches such programming mistakes and logs it instead of the application just crashing.
icca->version is an enum, not a version number technically.
Also 1.6.0 also supports encryption, the 1.7.0 changes are unrelated technically to the encryption support.
In GitLab by @xyen on Jun 14, 2020, 13:56
Commented on [src/main/acioemu/icca.c line 371](https://github.com/djhackersdev/bemanitools/compare/1656feccd1c3b67c49480588de657e604a339753..8eaeac7f2c33f211901c213260678beff7752b81#diff-affab87058fe7f10f8cdc694a83c62e0R371)
`icca->version` is an enum, not a version number technically.
Also 1.6.0 also supports encryption, the 1.7.0 changes are unrelated technically to the encryption support.
In GitLab by @xyen on Jun 14, 2020, 14:01
Commented on [src/main/acioemu/icca.c line 439](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..c934d652e1fd8f20429f184289ae7985783d613d#diff-affab87058fe7f10f8cdc694a83c62e0R439)
changed this line in [version 2 of the diff](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1235&start_sha=c934d652e1fd8f20429f184289ae7985783d613d#afe0e349cab0b6e39bf4435fdcb044da5be5b82e_439_436)
In GitLab by @xyen on Jun 14, 2020, 14:01
Commented on [src/main/acioemu/icca.c line 443](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..c934d652e1fd8f20429f184289ae7985783d613d#diff-affab87058fe7f10f8cdc694a83c62e0R443)
changed this line in [version 2 of the diff](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1235&start_sha=c934d652e1fd8f20429f184289ae7985783d613d#afe0e349cab0b6e39bf4435fdcb044da5be5b82e_443_442)
In GitLab by @xyen on Jun 14, 2020, 14:01
Commented on [src/main/acioemu/icca.c line 493](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..c934d652e1fd8f20429f184289ae7985783d613d#diff-affab87058fe7f10f8cdc694a83c62e0R493)
changed this line in [version 2 of the diff](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1235&start_sha=c934d652e1fd8f20429f184289ae7985783d613d#afe0e349cab0b6e39bf4435fdcb044da5be5b82e_493_492)
In GitLab by @xyen on Jun 14, 2020, 14:01
added 1 commit
<ul><li>7b3e7b3a - acioemu: add support for 1.7.0 and encrypted polls</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1235&start_sha=c934d652e1fd8f20429f184289ae7985783d613d)
Realistically speaking, leaving it static is fine, since the host key is randomized anyways.
In GitLab by @xyen on Jun 14, 2020, 14:02
Commented on [src/main/acioemu/icca.c line 504](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..5dd5266b9d6a2f77aa35237df2972e756df835c3#diff-affab87058fe7f10f8cdc694a83c62e0R504)
Realistically speaking, leaving it static is fine, since the host key is randomized anyways.
In GitLab by @xyen on Jun 17, 2020, 01:00
Commented on [src/main/acioemu/icca.c line 254](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..7b3e7b3a4dc412dbbbc3f78ac04d1a3cb01e3cfa#diff-affab87058fe7f10f8cdc694a83c62e0R254)
changed this line in [version 3 of the diff](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1237&start_sha=7b3e7b3a4dc412dbbbc3f78ac04d1a3cb01e3cfa#afe0e349cab0b6e39bf4435fdcb044da5be5b82e_254_254)
In GitLab by @xyen on Jun 17, 2020, 01:00
added 1 commit
<ul><li>5dd5266b - acioemu: add support for 1.7.0 and encrypted polls</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1237&start_sha=7b3e7b3a4dc412dbbbc3f78ac04d1a3cb01e3cfa)
Pop'n does not necessarily require 1.7.0 to negotiate, but it does use the key exchange and poll encrypted method on reader firmware 1.5.1.
I have a reader that was pulled from a pop'n cab.
In GitLab by @Felix on Jun 17, 2020, 23:50
Pop'n does not necessarily require 1.7.0 to negotiate, but it does use the key exchange and poll encrypted method on reader firmware 1.5.1.
I have a reader that was pulled from a pop'n cab.
In GitLab by @xyen on Jun 25, 2020, 02:57
Commented on [src/main/util/crc.c line 65](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..5dd5266b9d6a2f77aa35237df2972e756df835c3#diff-aba04262f5cf3155ff0e83c5d1b06743R65)
changed this line in [version 4 of the diff](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1240&start_sha=5dd5266b9d6a2f77aa35237df2972e756df835c3#3bde62773116be859790a5393bc6fff47b2607b7_65_65)
In GitLab by @xyen on Jun 25, 2020, 02:57
added 1 commit
<ul><li>0f2e2381 - acioemu: add support for 1.7.0 and encrypted polls</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1240&start_sha=5dd5266b9d6a2f77aa35237df2972e756df835c3)
In GitLab by @xyen on Jun 25, 2020, 02:57
Commented on [src/main/acioemu/icca.c line 504](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..5dd5266b9d6a2f77aa35237df2972e756df835c3#diff-affab87058fe7f10f8cdc694a83c62e0R504)
changed this line in [version 4 of the diff](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1240&start_sha=5dd5266b9d6a2f77aa35237df2972e756df835c3#afe0e349cab0b6e39bf4435fdcb044da5be5b82e_504_504)
In GitLab by @xyen on Jun 25, 2020, 02:58
added 2 commits
<ul><li>1656fecc - 1 commit from branch <code>master</code></li><li>8eaeac7f - acioemu: add support for 1.7.0 and encrypted polls</li></ul>
[Compare with previous version](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1241&start_sha=0f2e2381f2b8218e44191f5fc93d0d31580557be)
Also yeah @Felix that's why I didn't tie the key / poll behaviour to version.
In GitLab by @xyen on Jun 25, 2020, 02:58
Addressed prior comments, and got the ok offline.
Also yeah @Felix that's why I didn't tie the key / poll behaviour to version.
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 @xyen on Jun 14, 2020, 06:55
Merges icca_170 -> master
Summary
Adds ICCA 1.7.0 ish support, along with encrypted polling
Description
Certain games such as popn? and IIDX require encrypted polling when the card reader is version 1.7.0 in order for the card reader to work
How Has This Been Tested?
Tested booting up IIDX, and verified that key exchange occurs, and card polling works via the encrypted polling method
Do you know how the game checks this version? I would assume it just checks and does something along the lines
if (current_version < reader_version) updateReaders();. I was thinking about rather old games like iidx 13 which introduced these types of readers and if the default version there is fine.Nit: Line break before (and after) control blocks.
Why is this removed?
Since this defaults, I would add a comment here that this is an optional call on initialization.
How crucial is it leaving this a constant? Otherwise, I suggest add a new function
crypto_gen_random32to thecryptomodule and use it here.In GitLab by @xyen on Jun 14, 2020, 12:03
Commented on src/main/acioemu/icca.c line 72
It depends per game, I set it to 1.6.0, since that's what we were previously emulating, I added 1.5.0 as an option, since later on we want to merge in the ICCB code probably (for jubeat) which is currently pretending to be 1.5.0.
In GitLab by @xyen on Jun 14, 2020, 12:03
Commented on src/main/util/crc.c line 65
Copied from the above code.
I don't think you can answer this, but is there a newer version than v170 that also uses encryption? I have a feeling this should be
icca->version >= v170. If you don't know that (yet), I would leave a comment, something like:v170 is the latest known version but this might be used with future versions as well.Magic number 18. This looks like it can be derived from some stucture using
sizeof?Magic number 16, same question as above.
Magic number.
Since I don't see a reason to allow
ptrbeing NULL for both functions, I suggest we include this assert because it catches such programming mistakes and logs it instead of the application just crashing.In GitLab by @xyen on Jun 14, 2020, 13:56
Commented on src/main/acioemu/icca.c line 371
icca->versionis an enum, not a version number technically.Also 1.6.0 also supports encryption, the 1.7.0 changes are unrelated technically to the encryption support.
In GitLab by @xyen on Jun 14, 2020, 14:01
Commented on src/main/acioemu/icca.c line 439
changed this line in version 2 of the diff
In GitLab by @xyen on Jun 14, 2020, 14:01
Commented on src/main/acioemu/icca.c line 443
changed this line in version 2 of the diff
In GitLab by @xyen on Jun 14, 2020, 14:01
Commented on src/main/acioemu/icca.c line 493
changed this line in version 2 of the diff
In GitLab by @xyen on Jun 14, 2020, 14:01
added 1 commit
Compare with previous version
In GitLab by @xyen on Jun 14, 2020, 14:02
Commented on src/main/acioemu/icca.c line 504
Realistically speaking, leaving it static is fine, since the host key is randomized anyways.
In GitLab by @xyen on Jun 14, 2020, 14:02
resolved all threads
Ok, can you add that note as a comment there replacing the
// should probably RNG this?Instead of "probably should do this", do it, do it!!! ;)
I suggest warning level.
In GitLab by @xyen on Jun 17, 2020, 01:00
Commented on src/main/acioemu/icca.c line 254
changed this line in version 3 of the diff
In GitLab by @xyen on Jun 17, 2020, 01:00
added 1 commit
Compare with previous version
In GitLab by @xyen on Jun 17, 2020, 01:00
resolved all threads
In GitLab by @Felix on Jun 17, 2020, 23:50
Pop'n does not necessarily require 1.7.0 to negotiate, but it does use the key exchange and poll encrypted method on reader firmware 1.5.1.
I have a reader that was pulled from a pop'n cab.
In GitLab by @xyen on Jun 25, 2020, 02:57
Commented on src/main/util/crc.c line 65
changed this line in version 4 of the diff
In GitLab by @xyen on Jun 25, 2020, 02:57
added 1 commit
Compare with previous version
In GitLab by @xyen on Jun 25, 2020, 02:57
Commented on src/main/acioemu/icca.c line 504
changed this line in version 4 of the diff
In GitLab by @xyen on Jun 25, 2020, 02:58
added 2 commits
1656fecc- 1 commit from branchmaster8eaeac7f- acioemu: add support for 1.7.0 and encrypted pollsCompare with previous version
In GitLab by @xyen on Jun 25, 2020, 02:58
Addressed prior comments, and got the ok offline.
Also yeah @Felix that's why I didn't tie the key / poll behaviour to version.
In GitLab by @xyen on Jun 25, 2020, 02:58
merged