Author Topic: Streaming level data from cassette  (Read 3744 times)

0 Members and 1 Guest are viewing this topic.

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 392
  • Likes Given: 60
Re: Streaming level data from cassette
« Reply #25 on: 03:38, 26 November 14 »
So it seems WinAPE has issues loading some of the more complicated CDTs

It shouldn't have any problems, but I think there is a problem with the CDT spec and resetting the output bit state between blocks. I tried both ways, either keep or reset the bit state, and both caused some CDTs to fail. I'm not 100% sure if this is the problem as it has been mentioned that using CDT2WAV seems to work with most (All?) CDTs.

Offline kelp7

  • CPC664
  • ***
  • Posts: 123
  • Country: gb
    • Sharp MZ-80A Secrets
  • Liked: 31
  • Likes Given: 56
Re: Streaming level data from cassette
« Reply #26 on: 13:56, 26 November 14 »
Those chips seem to be quite flexible, if you can program a dedicated interrupt for tape reading and actively adjust its time interval then the problems rafelroo mentioned could be overcome. This is a vage idea but you could use something like this:
GGGGGPPPGGGGG
      |
With G being a pilot wave and P being the bit(s) pulse, if you can freely program the interrupts you can synchronize at the beginning to enter some time before the pulse, then wait for it measuring the elapsed time, and re-adjust the next interrupt if needed, by delaying or advancing it.
This can't be done on the CPC because interrupts can only be delayed, and only within a frame. Every frame with the VBL signal the interrupt counter is always resetted by the hardware.


That does sound good but, yeah, as much as the 8253 is quite flexible, it's also tricky to code for as any change to the counters only happens after one 8253 clock cycle. Your code could trigger the change to the counter anywhere between the start or end of that clock cycle (a bit like when you wait for vsync using a bit of code where the vsync could happen anywhere in your lines of code which are carrying out the check).

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.919
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1132
  • Likes Given: 1902
Re: Streaming level data from cassette
« Reply #27 on: 10:58, 01 December 14 »
It shouldn't have any problems, but I think there is a problem with the CDT spec and resetting the output bit state between blocks. I tried both ways, either keep or reset the bit state, and both caused some CDTs to fail. I'm not 100% sure if this is the problem as it has been mentioned that using CDT2WAV seems to work with most (All?) CDTs.


Yes I converted the program with Firebird loader back to WAV format and loaded the program in WinApe without error. So say you suggest the CDT spec might have a problem, I haven't had problems on the standard stuff, so it perhaps suggests the more unusual loaders like Firebirds creates problems.
« Last Edit: 11:00, 01 December 14 by AMSDOS »
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3