Vic 20 Basicode

You need an actual VIC.

Moderator: Moderators

Malcohol
Vic 20 Drifter
Posts: 30
Joined: Mon Apr 04, 2011 4:04 pm
Location: Ireland

Vic 20 Basicode

Post by Malcohol »

Hi there.

I recently discovered Basicode (https://en.wikipedia.org/wiki/BASICODE), which was an attempt to define a subset of basic compatible with multiple 8-bit machines. I'd like to try it out, and while I've managed to download the software for several 8-bit machines, I've failed to locate a working version for the Vic 20.

The following wav file carries the audio for several Basicode loaders, including "loading" and "saving" programs for Vic-20 (they start around 15m15s and 16m45s, respectively): https://archive.org/download/World_of_S ... e1.wav.zip

I've converting the vic-20 audio to tap files using both wav-prg and wav2tap. However, the resulting tap file just will not load into the Vice emulator.

I wonder if anyone on this forum could help me here, as I'm not very familiar with the tools.

Thanks for any help or advice.

Malcohol
User avatar
srowe
Vic 20 Scientist
Posts: 1432
Joined: Mon Jun 16, 2014 3:19 pm

Re: Vic 20 Basicode

Post by srowe »

Have you tried using minimodem

https://github.com/kamalmostafa/minimodem

Alternatively I've got some Python tools that might be able to process the .tap file.
Malcohol
Vic 20 Drifter
Posts: 30
Joined: Mon Apr 04, 2011 4:04 pm
Location: Ireland

Re: Vic 20 Basicode

Post by Malcohol »

Thanks for your suggestion. Are there specific settings I should use with minimodem for vic-20 tape data?
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Vic 20 Basicode

Post by nippur72 »

I tried to load it on the FPGA (where I have the sound monitor) via a car-audio cassette adapter but I did not succeed. I tried also to load the C64 versions (on the C64) but with the same result :( . I tested normal and "inverted" waveforms, but nothing seemed to work. I was only able to get a scrambled "FOUND" with the CBM 3000 version, but nothing else.

The recording seems rather "clean", but there is some kind of problem with the volume: at the start of the tape on the VIC20 the "sync" signal level goes repeatedly to zero, which IMO is what causes the "FOUND" to miss.
User avatar
srowe
Vic 20 Scientist
Posts: 1432
Joined: Mon Jun 16, 2014 3:19 pm

Re: Vic 20 Basicode

Post by srowe »

Malcohol wrote: Mon Dec 07, 2020 2:52 pm Thanks for your suggestion. Are there specific settings I should use with minimodem for vic-20 tape data?
Not used it personally, the wikipedia page suggests

Code: Select all

minimodem --rx 1200 -q -S 1200 -M 2400 --stopbits 2 -f basicode.wav
The article also states that the top bit needs to be stripped off.
Malcohol
Vic 20 Drifter
Posts: 30
Joined: Mon Apr 04, 2011 4:04 pm
Location: Ireland

Re: Vic 20 Basicode

Post by Malcohol »

@srowe: I've realized that your suggestion applies to decoding a basicode program on the vic 20. In fact, I haven't even gotten that far. I'm still trying to load the vic 20 program which enables basicode support. Thank you though.

@nippur72: Thanks for trying. It seems that the recording isn't usable. That's a real shame, as this utility seems almost impossible to find elsewhere.

If I manage to find a working copy, I'll report back, since it would be nice to have it archived somewhere.

Malcolm
User avatar
srowe
Vic 20 Scientist
Posts: 1432
Joined: Mon Jun 16, 2014 3:19 pm

Re: Vic 20 Basicode

Post by srowe »

Could I have the .tap file? I'll try to process it with some tools I have.
Malcohol
Vic 20 Drifter
Posts: 30
Joined: Mon Apr 04, 2011 4:04 pm
Location: Ireland

Re: Vic 20 Basicode

Post by Malcohol »

> Could I have the .tap file? I'll try to process it with some tools I have.

Thanks for your offer. I used the following command with wav2prg:

Code: Select all

./wav2prg --machine vic -t basicodeLoader.tap vic20Load.wav
and I got this tap file:
https://drive.google.com/file/d/1TMbaym ... sp=sharing

Malcolm
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Vic 20 Basicode

Post by nippur72 »

if there's anything we can do, we have to do it before the WAV to TAP conversion. TAP is a 1-bit encoding where all the useful amplitude information is lost.
User avatar
Noizer
Vic 20 Devotee
Posts: 295
Joined: Tue May 15, 2018 12:00 pm
Location: Europa

Re: Vic 20 Basicode

Post by Noizer »

nippur72 wrote: Tue Dec 08, 2020 4:06 am if there's anything we can do, we have to do it before the WAV to TAP conversion. TAP is a 1-bit encoding where all the useful amplitude information is lost.
That’s right. The wave file could be „repaired“ with a decent processing tool.
Valid rule today as earlier: 1 Byte = 8 Bits
-._/classes instead of masses\_.-
Malcohol
Vic 20 Drifter
Posts: 30
Joined: Mon Apr 04, 2011 4:04 pm
Location: Ireland

Re: Vic 20 Basicode

Post by Malcohol »

Hi again.

I have good-ish news. I managed to source a much better audio file of the vic-20 loader:
https://drive.google.com/file/d/1iy7F3h ... sp=sharing

I got in touch with the developer of the "BASICODE in the browser" interpreter: https://robhagemans.github.io/basicode/
They still had a copy of the audio from one of the BASICODE cassettes from when they were working on that project.

The waveform looks pretty clean to me, but I haven't quite managed to get a working tap file from it. By applying a high-pass filter at 100Hz, I could make one which almost loads. It can see a file called "vicloadbasicode" but then gives an error when it hits the end of the tape.

Malcolm
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Vic 20 Basicode

Post by nippur72 »

this is a very clean recording. It did load on the FPGA on the very first attempt.

Here is the .D64 containing it ("vicloadbasicode", discard the rest):

https://drive.google.com/file/d/1EtMyDW ... sp=sharing
Malcohol
Vic 20 Drifter
Posts: 30
Joined: Mon Apr 04, 2011 4:04 pm
Location: Ireland

Re: Vic 20 Basicode

Post by Malcohol »

Hurray! It works! Thank you so much for that! It makes me really happy to know these things are not lost.

For completeness, here's audio of the corresponding saving program (although that's less important since BASICODE programs can be created on any number of platforms):
https://drive.google.com/file/d/1Fot0-N ... sp=sharing

Is there somewhere these can be uploaded for posterity?

Malcolm
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Vic 20 Basicode

Post by nippur72 »

The saving program also loaded flawlessly on the first attempt:

Here is a floppy image containing the two, LOAD and SAVE:

https://drive.google.com/file/d/1oXPJCH ... sp=sharing
Malcohol
Vic 20 Drifter
Posts: 30
Joined: Mon Apr 04, 2011 4:04 pm
Location: Ireland

Re: Vic 20 Basicode

Post by Malcohol »

Thank you again. It works perfectly. Also, having the two programs neatly on one disk is very convenient.

I have a vague plan to write a BASICODE program, so it'll be nice to know it works on the Vic-20 (a machine I'm particularly fond of).

Malcolm
Post Reply