Skip to content

Support large CD-ROMs in Windows 9x (MSF)#1586

Open
blixt wants to merge 1 commit into
copy:masterfrom
blixt:fix/cdrom
Open

Support large CD-ROMs in Windows 9x (MSF)#1586
blixt wants to merge 1 commit into
copy:masterfrom
blixt:fix/cdrom

Conversation

@blixt

@blixt blixt commented Jun 11, 2026

Copy link
Copy Markdown

I had issues mounting a 300 MB ISO in Windows 98, and after a bit of digging it turned out it was because Windows wants the leadout in minutes:seconds:frames (MSF) format but we were providing it as blocks, so the larger the image the more wrong it was, causing misbehavior from the OS. (Sidenote: Windows NT/2000 will work with LBA and does not have this bug.)

For reference QEMU also does this conversion.

This should improve #1556, but I'm not sure if it fixes all the issues there.

As a "bonus" this PR also makes the device report "not present" when remounting an image since this seems to improve Windows 98 behavior.

@chschnell

Copy link
Copy Markdown
Contributor

I tried this branch with Windows95b and it doesn't fix the problem described in #1556.

Could you please upload a short video demonstrating that you have a CD-ROM image > 255M working under Windows 98 (or is it 98 SE)?

We had already tried MSF encoding in #1556, and it didn't fix it for Win95 (I still have a branch atapi-toc-cmd). So it DOES fix it under Windows 98?

@blixt

blixt commented Jun 11, 2026

Copy link
Copy Markdown
Author

I tested many times with mounting the Office 97 ISO for Windows 98 (using your disk/state snapshot) and every time the OS didn't seem to recognize even the name of the disk and just became unresponsive when I tried to open D:, until I made the changes in this PR.

I have a some minor aesthetic custom HTML/CSS/JS on top of v86 running with the code in this PR in this recording:

vibe98-recording-github.mp4

The mount code I run is this:

async function mountCdrom(file: File) {
  const buffer = await file.arrayBuffer();
  emulator.eject_cdrom();
  await delay(1500);
  await emulator.set_cdrom({ buffer } as unknown as V86Image);
}

(It's an arrayBuffer() because I had some issues with lazy reads.)

@blixt

blixt commented Jun 11, 2026

Copy link
Copy Markdown
Author

And yes this is Windows 98 SE:
image

@copy copy requested review from Copilot and removed request for Copilot June 14, 2026 14:40
@copy

copy commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Happy to merge if @chschnell gives this a green checkbox.

@chschnell

Copy link
Copy Markdown
Contributor

Yes, this looks good to merge!

@copy

copy commented Jun 16, 2026

Copy link
Copy Markdown
Owner

(CI needs to be green though)

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