This adds cassette save support to the IBM 5150. Patch is against the latest commit, faf5d64.
It works in simple test cases, but a test with a larger file failed. I'm probably hooking the wrong bit of the PPI / PIT - it's currently reacting to changes in ppispeakon. In the simple test cases that toggles at the expected ~2355 ticks for a '1' bit, but if I load and then try to save a large program the level in a '1' bit seems to toggle every ~34 ticks.
ETA: It seems to be caused by cassette loading. Type a listing and save it - ppispeakon toggles at the expected rate. Load a listing and save it - ppispeakon toggles at the faster rate.
Here's the state of play at the moment. As far as I can see it isn't possible for the emulator to determine automatically whether the 5150 is trying to load or save - since, unlike on (say) the Spectrum, it uses the PIT to generate the output waveform rather than the CPU bit-banging it directly. So the user is responsible for selecting play or record - just as on a real PC they'd be responsible for pressing the 'record' or 'play' buttons on the tape recorder.
Post new patches here!
1 post • Page 1 of 1