Creating WAV files for physical NewBrain

Home Forums Emulator Software Creating WAV files for physical NewBrain

Viewing 3 reply threads
  • Author
    Posts
    • #3262
      Theo NiemeijerTheo Niemeijer
      Participant
      • Topics: 1
      • Replies: 4
      • Total posts: 5
        Up
        0
        Down
        ::

        Hello, I thought I could as well make a post here. I have restored a NewBrain to working order and made a cable for the cassette tape connector. I uses the two plugs from a broken headphone with microphone) and made the connector with a 6 pin DuPont socket.  I use a digital voice recorder (from Amazon) that can record (using line-input) and play WAV files.

        This worked for small type-in BASIC programs, only problem was dat the recorder WAV sound was not loud enough so I had to amplify it (a lot) using Audicity on my laptop. But the NewBrain was able to load the file when played back on the voice recorder (played with maximum volume).

        But I did not want to type in lots of BASIC, so I wanted to use the programs available in the emulator. These seemed to have a special binary format that maybe could be converted to WAV files.

        I found a Python program on github (gylles38 / newbrain-bin-wav /  beepgenerator.py) that enabled me to convert the emulator BASIC tape files to WAV files. With some small changes in that code I was able to load even the larger BASIC files succesfully on the physical NewBrain using a digital voice-recorder that can play WAV files. It seems to work for most of the files, it failed on just a few (with err 132 checksum error).

        I also found that in the emulator I can save typed-in BASIC files from the emulator to the tape folder, and then convert these to WAV and load on the physical NewBrain.

        Because it is possible in the emulator to save BASIC listings to the PrintDevice (a file) it is also possible to then read that listing back in using  “Import From TextFile”.  This is very slow and not very robust (and the keyboard must not be set to “English Keyboard”). But it does work when the text file is prepared well (no special characters and no wrapped lines).

        So all in all I now have a nice collection of usable WAV files of BASIC programs that work on my physical (unexpanded) NewBrain.

         

      • #3263
        Christos DespoinidisCDesp
        Keymaster
        • Topics: 9
        • Replies: 8
        • Total posts: 17
          Up
          0
          Down
          ::

          The simplest way to transfer files from the PC to the real Newbrain is through serial rs232.

          Then you can send the files from the NB Emulator, using device 9 (serial rs232), Use poke 19,9 to have this as your primary storage device.

          Load a program to the emulator. then type load to the real newbrain and save to the emulator (on that order) and it should load the program from the emulator.

          If you want to have the programs on tapes you can then save the files to a tape from the real newbrain. (poke 19,1 to restore tape storage)

          More on serial cable see here https://newbrainemu.eu/new/download/newbrain-serial-cable/

        • #3266
          Theo NiemeijerTheo Niemeijer
          Participant
          Topic Author
          • Topics: 1
          • Replies: 4
          • Total posts: 5
            Up
            0
            Down
            ::

            Thank you for the tips. I will try to make a serial cable and make that work.

          • #3341
            Gary ClarkGary Clark
            Participant
            • Topics: 2
            • Replies: 2
            • Total posts: 4
              Up
              0
              Down
              ::
              On Theo Niemeijer said

              So all in all I now have a nice collection of usable WAV files of BASIC programs that work on my physical (unexpanded) NewBrain.

               

              Would you be willing to share the WAV files ?

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.