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

util/bitstream: Adjust m_doffset based on m_dbitoffs when flushing #12060

Merged
merged 1 commit into from Feb 24, 2024

Conversation

987123879113
Copy link
Contributor

Found that in addition to forgetting to clear m_dbitoffs when flushing resulting in data being shifted incorrectly after a flush when m_dbitoffs was non-0, the variable m_doffset would go out of sync after flushing when m_dbitoffs was used so that needed to be adjusted as well.

I've tested with chdman info to check that the 175 CHDs I have on hand can still decompress the map data still, recreated the delta CHD (chdman copy -i ~/chd_test/gdj_aaa_2007071100.chd -op ~/chd_test/gdj_aaa_2007100800.chd -o ~/chd_test/newchild5.chd) and verified that all of the hashes validated, and then did various tests using the dlair laserdisc CHD including extracting using chdman extractld, recreating using chdman createld, and verifying that the SHA1 and Data SHA1 were the same in the original CHD and the recreated CHD.

@987123879113 987123879113 marked this pull request as draft February 24, 2024 18:27
@987123879113 987123879113 marked this pull request as ready for review February 24, 2024 18:35
@cuavas cuavas merged commit 657c28b into mamedev:release0263 Feb 24, 2024
4 of 5 checks passed
@cuavas
Copy link
Member

cuavas commented Feb 24, 2024

If anyone wants this in master before I do a merge myself, please use a merge commit rather than cherry-picking (i.e. git merge release0263 or whatever).

987123879113 referenced this pull request Feb 24, 2024
…ing and writing. (#12057)

* In some cases, bits would be dropped when writing if there wasn't enough space in the buffer.
* Fixes bad hunk maps being written to CHD files and incorrect hunk map data being read.
Mokona pushed a commit to Mokona/mame that referenced this pull request Feb 28, 2024
@987123879113 987123879113 deleted the fix_bitstream2 branch March 7, 2024 05:51
stonedDiscord pushed a commit to stonedDiscord/mame that referenced this pull request Apr 8, 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.

None yet

2 participants