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

Add support for HFE v3 OPCODE_RAND (for Sherston games) #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

philpem
Copy link

@philpem philpem commented Jul 24, 2023

Add support for weak sector emulation when using HFE images as the source.

Fixes Sherston games with weak sector protection

These still won't work from SCP source images - chances are those probably need to have images of multiple revolutions and Arculator will need to play them in sequence. For now it's easier to just use HFEs.

src/disc_hfe.c Outdated
@@ -289,7 +289,8 @@ static void process_v3_track(mfm_t *mfm, int side)
break;

case HFE_V3_OPCODE_RAND:
/*Not currently implemented, just add a byte of zeroes*/
/* Insert random byte - used for 'weak sector' protection on e.g. Sherston */
mfm->track_data[side][wp >> 3] = rand() & 0xFF;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wp might not be 8-bit aligned at this point.

@philpem
Copy link
Author

philpem commented Jan 27, 2024

That should fix the alignment issue, @sarah-walker-pcem - sorry for the delay, I've had this fixed locally but forgot to push the fix!

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.

2 participants