Skip to content
/ Oscar Public

The DATABAR Oscar was an optical bar code scanner used to input program code into computers such as Atari 1200XL/1400XL, Atari 400/600/800, Commodore Pet, Commodore VIC 20/64, TI99/4A, TRS 80.

License

Notifications You must be signed in to change notification settings

doegox/Oscar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oscar

The DATABAR Oscar was an optical bar code scanner used to input program code into computers such as Atari 1200XL/1400XL, Atari 400/600/800, Commodore Pet, Commodore VIC 20/64, TI99/4A and TRS 80.
Regarding the computer it acts as an ordinary cassette reader.

Writing a software decoder for databar sheets started with one posted in PoC||GTFO 12 as "puzzle".
See https://wiki.yobi.be/index.php/Databar_decoding for the write-up.

Links

Oscar

Atari Databar Magazine scans

TI99-4A Databar Magazine scans

Commodore 64 Databar Magazine scans

Tips

  • Extract images from pdf with pdfimages -all.

  • Crop to keep only databars with white margins around, no side borders, no title.

  • Use scans as larges as possible.

  • If needed you can enhance scans by

    • scaling up (x2, x4)
    • using unsharp mask
    • setting threshold manually

It may sound silly to scale up but it makes sense because the whole operation is to be seen as a conversion from luminosity to space, same as converting audio to 1-bit sampling at very high frequency.

Usage

oscar.py databar-000.png databar-001.png ...

You can set debuglevel to higher levels if needed.
Note that at the moment the script is full of assert so there is not much error handling and it'll break on the first issue ;)

TI99/4A

Databar reuses the Cassette tape records format (see here):

ff <64 bytes> cc0000000000000000

with cc being a checksum byte equal to the sum of the 64 bytes.

Data extraction: use post_ti994a.sh

Atari

Databar reuses the Cassette tape records format (see here):

5555fc <128 bytes> cc
...
5555fa <128 bytes> cc # last line

with cc being a checksum byte equal to the sum with endaround carry of the 131 bytes (so carry bits are added to the cc byte too).

fc indicates a full record; fa indicates a partial record, its size being recorded just before the cc byte.

Data extraction: use post_atari.sh

Commodore 64

Databar reuses the Cassette tape data block for SEQ file format (see here):

Extracted data look like:

89888786858483828102 <191 bytes> cc
  • Sync train 89 88 87 86 85 84 83 82 81 as for the first copy of a block.
  • file type = 02 : Data block for SEQ file
  • Data body : 171+20 bytes
  • Data checkbyte cc : checksum byte equal to the xor of all 192 bytes from file type byte (02) to the end.

Data extraction: use post_c64.sh

Commodore BASIC tokenized files can be converted with detox64 or CBM BASIC Lister.

The .txt files available in the results were produced by a version of detox64 slightly modified to convert unprintable chars by \xNN notation.

About

The DATABAR Oscar was an optical bar code scanner used to input program code into computers such as Atari 1200XL/1400XL, Atari 400/600/800, Commodore Pet, Commodore VIC 20/64, TI99/4A, TRS 80.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published