New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Emulate Infinity Base #11546
Feature: Emulate Infinity Base #11546
Conversation
|
Looked like bit shifting on Windows wasn't trusted, changed all the instances of unsigned long to u32/u64 depending on their length |
|
For a blank infinity figure file to be able to be used in game, it needs the 7 byte UID (which is known for most figures) and block 1 of the 20 block file (where each block is 16 bytes). This UID can be randomly generated and still work, so the CreateFigure method I have created uses a 7 byte random number when creating blanks. In the 1st block of the file, there is key information about the figure that the game caches and stores so that it is known what Infinity figure/power disc/play set is in each slot, and this block is read only, so is never written to. An example of what a block 1 (decrypted) looks like can be seen below: 00 0F 42 4C 10 0C 1E 00 00 01 D1 1F A7 3F 78 60 This block represents Barbosa from the Pirates of the Caribbean, and the byte breakdown is as follows: The first 2 bytes (00 0F) are the same for every character in the game as far as I can tell. The 3rd and 4th byte (42 4C) is the Id of the character itself, so every Barbosa will be 42 4C etc. The 3rd and 4th bytes are the only ones that need to be included in the list, as a u16.
The next 4 bytes (00 01 D1 1F) are consistent across every figure type in the same series, so play sets, power discs, characters and toy box customisations all have this sequence for infinity 1.0. Noting here that this probably stands for 1.0 Disney Infinity or something similar. Series 2 toys are 00 02 D1 1F, and Series 3 are 00 03 D1 1F. The last 4 bytes are a crc32 checksum of the prior 12 bytes. |
|
The second to last commit says Skylanders |
|
@mandar1jn oops just a typo, should say Infinity Figures |
0569594
to
bcf844a
Compare
9a3ff20
to
dec8c0b
Compare
|
@dolphin-emu-bot rebuild |
|
FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:
automated-fifoci-reporter |
Source/Core/DolphinQt/MainWindow.cpp
Outdated
| { | ||
| if (!m_infinity_window) | ||
| { | ||
| m_infinity_window = new InfinityBaseWindow; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be given a parent, like:
| m_infinity_window = new InfinityBaseWindow; | |
| m_infinity_window = new InfinityBaseWindow(this); |
otherwise this could leak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied this from the FIFO Window - which also is not given a parent. Should it also have this referenced? (The Skylander Portal Window has this missing as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qt will automatically reparent widgets in some cases (when you add a widget to a layout for instance). In this case (and for the Skylander window too), you're just creating a window and I don't think there's any automatic reparenting being done here so you should probably give it a parent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
73a7d3f
to
f2cc823
Compare
|
Changes made as above - I should note that some of the changes here may also apply to the Skylanders Qt Window, like QStringLiterals, would like to keep it consistent and map that across in a future PR. |
de6e0ed
to
e330226
Compare
c28d544
to
a071d26
Compare
adafb05
to
2610827
Compare
3c8af20
to
79f67fe
Compare
|
A little bit more research has meant that there is no need for the 2 structs that I had defined in the header file, just a u32 for the figure number (found here). The bytes that I thought were figure specific were just the manufacture date of the toy, so I have set this to the date Disney Infinity 1.0 was released. |
|
Is there anything left blocking this? Would like to have it in for the progress report. |
|
Nothing from an implementation standpoint - @leoetlino @AdmiralCurtiss any other review comments? |
|
Sorry for the delay, I'll give this another review asap (tonight or tomorrow) |
Create, Load and Clear Infinity figures on an emulated base in the UI
0aaec18
to
2725ed1
Compare
|
@leoetlino thanks heaps - hopefully that is everything. Have also slightly modified the Host.cpp file to reflect latest changes with the EmulationKernel(). Fingers crossed I haven't missed anything there! |
|
Yeah go ahead and push the lint fixes. |
2725ed1
to
75a4d0f
Compare
75a4d0f
to
529d0a1
Compare
|
Just restored a Qt change with the filepath after testing it and remembering why I had included the change in the first place - still ready for build and test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Untested and I don't know whether the actual algorithms are correct, but this looks fine to me now.

Description
This PR introduces the ability to emulate the Infinity Base within Dolphin, another Wii peripheral device that can be a hassle to set up, and is currently unavailable for use on MacOS (without sudo) or Android. Where the Skylanders portal was a port from RPCS3, the Infinity code was written from scratch based on reverse engineering done with an Infinity 1.0 Base, and other pieces of research found online. Here's a video of the functionality in action
Tasks
Currently Working:
Nice to Haves:
Proper Color structures - similar to the Skylander Portal. Requires investigation.
Hopefully this might inspire a developer to look in to seeing how we can optimise Infinity within Dolphin😄