libretro / vice-libretro

Versatile Commodore 8-bit Emulator
GNU General Public License v2.0
40 stars 70 forks source link

C128D and 1571 floppy #528

Closed theflyingape closed 2 months ago

theflyingape commented 2 months ago

This is of small consequence, because turning off all the core drive options will "work" really fast at the expense of losing the nifty drive activity LEDs in the status bar and floppy sounds. But perhaps related to #526, regardless whether the core option is set for model type C128 or C128D or whether I pass #COMMAND:-drive8type 1571 or not, true drive emulation does not use 1571 mode.

The 1571 powers up in 1541 mode. However, it automatically shifts to 1571 mode upon the first of a fast serial transfer initiated by the host (the Commodore 128). The Commodore 64 and Plus 4 can't perform fast serial transfers on the serial bus, but you can shift from 1541 to 1571 mode by sending the following BASIC command: OPEN 1,8,15,"U0>Ml" I have tried manually switching, but does not transfer any faster.

Does/should the emulator follow what was taken from the drive manual? The possible combinations of modes with the Commodore 128 and 1571 are:

  1. C128/1571 modes: Turn on the drive, then turn on or reset the computer.
  2. C128/1541 modes: Turn on or reset the computer, and when the cursor appears, turn on the drive. In this case, the first disk access will switch the drive to 1571 mode.
  3. C64/1571 modes: Turn on the drive, then tum on or reset the computer and type: GO 64
  4. C64/1541 modes: Turn on the drive, then hold down the COMMODORE key while you turn on or reset the computer.
sonninnos commented 2 months ago

I don't know what you are actually asking. That sounds more like a question for the actual emulator and not this repo. So if what you want does not work in standalone, it won't work here either.

All C128 models default to 1571, and launching d64 disks won't change the drive type on startup to 1541, but it will change when changing disks manually afterwards, so I fixed it so that it defaults back to 1571 without pointless reseting.

Did that command thing work differently before that change or not?

theflyingape commented 2 months ago

Ah, I am using a media m3u playlist to eject/next/prev/insert floppies which includes my nibbled g64 Merlin 128 original and other d64/d71 files. Your explanation of a manual assertion forcing a change to drive type must be the issue.

I tried it off standalone, attaching the g64 image after startup, and power/cycle the machine to BOOT and it takes 11.5 seconds its menu. On this core, after inserting the g64 image and entering BOOT, it takes 67 seconds (in true drive emulation mode). But as I said, I could also just drop the true drive emulation feature and skip the LED / sounds, whereas it takes only 3.5 seconds. :100: