mattgodbolt/jsbeeb

Unable to specify a disc1 image on URL params

Closed this issue · 4 comments

If an image for drive 1 is specified in the URL , both drive 0 and drive take the same image.
For example,
https://bbc.godbolt.org/?disc1=Welcome.ssd&disc2=elite.ssd

Both drive 0 and drive 1 contain Elite.

I've tried to debug this but not got very far. The images seem to be loaded correctly into the fdc.drives[] array.
??????

Oh yikes: goods spot. I wonder if the emulation itself is broke rather than the image loader!

This is now fixed! thakns for the report! :)

Ah, so the drives were sharing the same BaseDisc ?

sort of somehow.. I actually didn't get to the bottom of it, but the mixture of old and new Javascript plus the rules about what this meant were all crossed. Rather than work out exactly what was going on (I debugged a bit and saw this change meaning as I single-stepped); I just converted it to the contemporary style of JS.