Tape Drive Emulation Unreliable
Hi there,
I'm finding tape emulation to be very unreliable and it's getting a tad frustrating.
I'm currently typing in a pretty large BASIC program in 8xxx series PET and because I cannot get the PET to work with any emulated disk drives I am having to resort to saving my progress on a .tap file. But when I try to load it back from tape, I have to try and load it about 5 or 6 times before it works.
Often it will either finish loading and the PET emulation will freeze or I will get a load error and the complete listing won't be there when I type LIST. If I try the same .tap file in VICE in Linux it will load first time, each time.
I am also finding loading VIC-20 game tape files (from TOSEC collection) to also be very problematic.
BMC64 is probably not writing back to the tape file unless you detach it from the tape drive (probably). That's just my guess though.
Can you try to save your program, then attach a different tape file, then attach the first tape again and see if that addresses the issue?
I don't recall having issues with disk drives. Let me find the drive files I had placed on my sdcard to check. I'm at work right now, so I'll have to do it later tonight. I'll send you the list of files that are expected.
On Sat, Mar 2, 2024 at 7:39 AM sean-skt @.***> wrote:
Hi there,
I'm finding tape emulation to be very unreliable and it's getting a tad frustrating.
I'm currently typing in a pretty large BASIC program in 8xxx series PET and because I cannot get it to work with any emulated disk drives I am having to resort to saving my progress on a .tap file. But when I try to load it back from tape, I have to try and load it about 5 or 6 times before it works.
Often it will either finish loading and the PET emulation will freeze or I will get a load error and the complete listing won't be there when I type LIST. If I try the same .tap file in VICE in Linux it will load first time, each time.
I am also finding loading VIC-20 game tape files (from TOSEC collection) to also be very problematic.
— Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/262, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKB3VLVWUY73CA25RGDYWHCABAVCNFSM6AAAAABEDCFPXWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3DINZZGE4TINA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Randy Rossi
- "There are only two things that are hard about computer science; Naming things, Cache Invalidation, and Off-by-one errors."
Under the [PET] section in vice.ini on your SD card, add the following:
DatasetteTapeWobble=0
Inexplicably, the VICE default for this setting introduces a bit of deliberate random skew to tape loads (and possibly saves?), which deliberately occasionally causes load errors "just like real life".
I'm all for realism and accuracy, but I wouldn't want a virtual head bang on a 1541 to actually wreck the emulated hardware. LOL I have no idea why it was set up this way by the VICE team, but there you have it.
It applies to ANY tape loading on ANY of the VICE systems, so feel free to add it to other sections as needed.
Under the [PET] section in vice.ini on your SD card, add the following:
DatasetteTapeWobble=0
Thanks rhester72!! That did the trick!
What masochist at VICE thought that this was ACTUALLY a GOOD IDEA to emulate this nonsense?? It has been nothing but a source of frustration!! I love this BMC64 project, feels really authentic, but I was banging my head against a wall trying to figure out why the hell I couldn't reliably load programs and it was really ruining my experience of this great project!
@randyrossi For the future it might be good idea to have the option that rhester72 suggested as default in vice.ini. And yes please, if you could let me know what disk drive you were using with PET, that would be awesome. Thanks so much!! :)
I don't recall having issues with disk drives. Let me find the drive files I had placed on my sdcard to check. I'm at work right now, so I'll have to do it later tonight. I'll send you the list of files that are expected.
Can you please post this under the previous issue that I posted a few days ago?
What masochist at VICE thought that this was ACTUALLY a GOOD IDEA to emulate this nonsense?? It has been nothing but a source of frustration!!
That was me. And no, the reason isn't to "deliberately occasionally cause load errors". Tape loaders (and in particular the kernal loader) are very robust against small deviations - and the error that is being introduced is likely smaller than that of a real c2n (and that is no problem either).
The actual reason for doing this was, that people started implementing and testing tape loaders on VICE - and then produced loaders that were relying on the perfect timing of the emulation, rather than taking the imperfect timing of a real c2n into account and compensating for it (like the kernal loader does). For the exact same reason, disk drive wobble has been emulated as well.
(Wobble only applies to reading, not writing, btw - this may or may not be a bug, but it works in practise)
However, in the old VICE release BMC64 is using, the tape-wobble was implemented rather naively and didn't work very well - which is what causes the problem you are seeing. This has been fixed in newer releases, and shouldn't cause any problems like this anymore.
BMC64 is probably not writing back to the tape file unless you detach it from the tape drive (probably). That's just my guess though.
.tap files are accessed directly, without buffering
@mrdudz Thank you for the explanation.
So while "DatasetteTapeWobble=0" does remove most of the load error issues, on occasion the emulation will still freeze when finishing loading the program from the .tap file.