You normally avoid instructions like this with I/O devices because there's an extra write operation (read current value, write current value, write new value). But in this case there's no unwanted side-effect of that.
You normally avoid instructions like this with I/O devices because there's an extra write operation (read current value, write current value, write new value). But in this case there's no unwanted side-effect of that.
Yeah, that's working great! I've gotten pretty good at intentionally bouncing the C2N switches, so I could reliably cause the messages when relying on the wait alone.
I've done a bunch of saves and loads in VICE and real hardware. Between the interface control provided by Mike's method, and your data direction override method, I think I have pretty robust tape support for this game.
I would check with @Mike or someone that understands the VIA at an electronic level better than me.
Under normal situations the line is configured as an input, it has an internal pull-up resistor so that the value is 1 until the switch in the cassette connects it to ground. I don't think there is any harm in configuring it to an output with a level of 0 and then the switch connecting it to ground.
srowe wrote: ↑Wed Aug 11, 2021 12:25 pm
I would check with @Mike or someone that understands the VIA at an electronic level better than me.
Under normal situations the line is configured as an input, it has an internal pull-up resistor so that the value is 1 until the switch in the cassette connects it to ground. I don't think there is any harm in configuring it to an output with a level of 0 and then the switch connecting it to ground.
I suppose if Mike comes back and says, "Oh my god don't do that you're going to destroy everyone's VIC-20!" then I might reconsider the approach.
From a reliability standpoint, I haven't seen any problems.
But, of course, it's always nice to hear other opinions. At this point, there's no barrier to going back to CHROUT > /dev/null