Developing an emulator, help with tape WAVs?
Posted: Fri Jan 18, 2019 1:53 am
Hi all, new here. I'm writing a Spectrum emulator, and I'm currently trying to implement the tape interface with WAV file input.
I'm returning with bit 6 of port 0xFE set if the current sample is high. I'm using value 192 as the threshold with 8-bit samples. So, if (tapebyte > 192) then the bit is set. I at least seem to be on the right path, because after issuing a LOAD "" command, I get this:
So it is apparently understanding the tape data correctly.
Then after a few seconds the screen goes blank again, and the tape file gets completely inputted... but then nothing. Just a grey/white screen forever.
What am I missing here? I never actually owned a real Spectrum, so maybe I'm just doing something wrong usage-wise.
I also maybe missing some other hardware that needs to be emulated, but the system seems pretty simple from what I've been reading. I've got the video, keyboard input and port 0xFE input, as well as doing a vblank interrupt every frame. Anything else required for the basics?
I'm returning with bit 6 of port 0xFE set if the current sample is high. I'm using value 192 as the threshold with 8-bit samples. So, if (tapebyte > 192) then the bit is set. I at least seem to be on the right path, because after issuing a LOAD "" command, I get this:
So it is apparently understanding the tape data correctly.
Then after a few seconds the screen goes blank again, and the tape file gets completely inputted... but then nothing. Just a grey/white screen forever.
What am I missing here? I never actually owned a real Spectrum, so maybe I'm just doing something wrong usage-wise.
I also maybe missing some other hardware that needs to be emulated, but the system seems pretty simple from what I've been reading. I've got the video, keyboard input and port 0xFE input, as well as doing a vblank interrupt every frame. Anything else required for the basics?