HXTape

From Outcasts
Jump to: navigation, search

I'll try the short version:

  • you'll need PHP 5, which is not available in many Linuxes anymore, but is available for Windows at https://windows.php.net/download/#php-5.6-nts-VC11-x64
  • there will still be errors about mb_strlen(), because multibyte strings need to be enabled in php.ini; you can either figure out how to do that, or merely change instances of mb_strlen($Variable, '8-bit') into simply strlen($Variable), as that seems to make no difference on Windows
  • /dev/dsp isn't usable anymore as you said, and definitely not usable on Windows, but that can be worked around by using the "--device=" option and provide a *file* instead of a device; that file is going to contain raw unsigned 8-bit little-endian audio at 8000 Hz, which you can record and play back using for example Audacity (File / Import or Export / Raw audio)
  • there are also some undefined variables, mostly $Bit, which may or may not be a problem depending on the PHP version; they don't seem to be a problem for me with the version I linked, but in any case, defining $Bit as 0 at the start of the function may bypass the issue, at least for hxload.php

Command lines that have worked for me have been:

  • php hxload.php -d=recorded-audio.raw (to load from the HX-20)
  • php hxbasic.php FILENAME FILENAME.BAS (to convert a BASIC binary-coded file that hxload.php created into ASCII)
  • php hxsave.php FILENAME.BAS -t=ASCII-BASIC --d=output-audio.raw (to recreate audio loadable on the HX-20 from the ASCII BASIC file)