ct6502 / apple2ts

Apple II Emulator in TypeScript
Creative Commons Attribution Share Alike 4.0 International
62 stars 10 forks source link

S6,D2 file selection loads into S6,D1 #62

Closed nutsnbytes closed 6 months ago

nutsnbytes commented 7 months ago

Describe the bug Clicking on the disk 2 floppy icon loads the chosen file correctly, but it loads into drive 1, overriding any previous image on drive 1.

To Reproduce Steps to reproduce the behavior:

  1. Run apple2ts online or from a local build
  2. Click on floppy drive 2 and select a disk image
  3. The image will load into drive 1 instead of drive 2

Expected behavior Loading a floppy drive image into drive 2 should load into drive 2

Screenshots Problem occurs at the "drive = isHardDriveImage (fname) ? 0 : 1" ternary in this else clause in fileinput.tsx:

else { // drive = isHardDriveImage(fname) ? 0 : 1 handleSetDiskData(drive, new Uint8Array(buffer), file.name) if (handleGetRunMode() === RUN_MODE.IDLE) { passSetRunMode(RUN_MODE.NEED_BOOT) } else { props.updateDisplay() } }

Desktop (please complete the following information):