Skip to content
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

Adding Webassembly support #204

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open

Adding Webassembly support #204

wants to merge 33 commits into from

Conversation

Lockl00p
Copy link

@Lockl00p Lockl00p commented Oct 20, 2024

I’m done! There are a few caveats to this (saving doesn’t work on Firefox, and the audio can get pretty glitchy) but it works!

bit-hack and others added 11 commits November 18, 2023 21:05
Dword_51F018 is a 256 element arry with 16 bit values ranging from
65535 - -65535. Elements 0-127 are all positive 16bit values where
as elements 128-255 are all negative 16bit values. getOffset() takes
in an unsigned 16bit value, gets the signed representation of the
lower 8 bits and adds it to the result of the Dword_51F018[] array
after indexing

Return type is capped at 16bits incase of an intentional overflow
so the offset calculation does not exceed dest ptr of the memcpy()
call during the decompression stage of the video.

Not 100% on this fix as I have not fully reversed the decompression
function to ensure the behavior of getOffset() and the decompression
function are proper in tune with each other. However I have verified
that this fixes both the intro cinematic and the vat explosion
cutscene near the end of the game.

Credit goes to @Northfear for their vita fork for pointing me in the
right direction on where to start with this issue. See commit
00c1269 on their fallout1-ce-vita
fork for their fix. Due to the inconsistancy of the C STD library,
I performed further verification of the fix because the bit width
of int has no guarntees. This can lead to platform->platform issues
as each compiler and triple target could assign int to be whatever
bit width most suits it.
@Lockl00p
Copy link
Author

I figured out the button issue. Now I’ll deal with saving.

@Lockl00p
Copy link
Author

Aand now I have to deal with hold clicking

@Lockl00p Lockl00p changed the title Adding Webassembly support (Currently Incomplete) Adding Webassembly support Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants