Search found 656 matches

by jedie
Fri Aug 16, 2013 3:31 pm
Forum: Hints and Tips
Topic: PyDC converter (was: dragon 32 cassette format ?)
Replies: 80
Views: 54153

Re: dragon 32 cassette format ?

Current state is on github. Last commit is: https://github.com/jedie/python-code-snippets/commit/4f930a98aae53fa8bdeaf6ec647e5d9b258cea6d I have insert a test, if i can found on binary level this: "HELLO WORLD!" This exists in both WAV files (also on github downloadable!) So i think the WAVE2bits de...
by jedie
Fri Aug 16, 2013 3:15 pm
Forum: Hints and Tips
Topic: PyDC converter (was: dragon 32 cassette format ?)
Replies: 80
Views: 54153

Re: dragon 32 cassette format ?

My origin BASIC test code is:

Code: Select all

10 FOR I = 1 TO 10
20 PRINT I;"HELLO WORLD!"
30 NEXT I
by jedie
Fri Aug 16, 2013 3:13 pm
Forum: Hints and Tips
Topic: PyDC converter (was: dragon 32 cassette format ?)
Replies: 80
Views: 54153

Re: dragon 32 cassette format ?

My destination is not to create a CAS file. I will get a plain text BAS file ;) Later i would like to implement a BAS2WAV converter. So you can edit a BASIC programm on PC in a normal Text editor. Change it and recreate the WAV file. A dictionary of the BASIC tokens have i made: BASIC_TOKENS = { 128...
by jedie
Fri Aug 16, 2013 1:52 pm
Forum: Hints and Tips
Topic: PyDC converter (was: dragon 32 cassette format ?)
Replies: 80
Views: 54153

Re: dragon 32 cassette format ?

I'm a step future! :D I can see this: ... 01000100 0x22 34 '"' 00010010 0x48 72 'H' 10100010 0x45 69 'E' 00110010 0x4c 76 'L' 00110010 0x4c 76 'L' 11110010 0x4f 79 'O' 00000100 0x20 32 ' ' 11101010 0x57 87 'W' 11110010 0x4f 79 'O' 01001010 0x52 82 'R' 00110010 0x4c 76 'L' 00100010 0x44 68 'D' 100001...
by jedie
Fri Aug 16, 2013 1:01 pm
Forum: Hints and Tips
Topic: PyDC converter (was: dragon 32 cassette format ?)
Replies: 80
Views: 54153

Re: dragon 32 cassette format ?

Are the binary data "Big Endian", "Little Endian" or "Middle Endian" ?
by jedie
Fri Aug 16, 2013 12:33 pm
Forum: Hints and Tips
Topic: PyDC converter (was: dragon 32 cassette format ?)
Replies: 80
Views: 54153

Re: dragon 32 cassette format ?

thanks for your help... Unfortunately, my knowledge about bits and bytes are bad... I found a interesting python code here: http://www.coco3.com/community/2010/12/converting-binary-files-to-coco2-cas-files/ Description is: converter binary files to .cas used on CoCo2 emulators like XRoar Origin code...
by jedie
Fri Aug 16, 2013 10:27 am
Forum: Hints and Tips
Topic: PyDC converter (was: dragon 32 cassette format ?)
Replies: 80
Views: 54153

Re: dragon 32 cassette format ?

That is easy, from array import * bits = array('B',[1,0,1,0,1,0,1,0]) byte = 0 for bit in range(8): byte = byte | (bits[bit] << bit) print '%#X' % byte Simpler: bits = [1,0,1,0,1,0,1,0] byte = 0 for no, bit in enumerate(bits): byte = byte | (bit << no) print byte, hex(byte), bin(byte) Output is: 85...
by jedie
Fri Aug 16, 2013 8:59 am
Forum: Hints and Tips
Topic: PyDC converter (was: dragon 32 cassette format ?)
Replies: 80
Views: 54153

Re: dragon 32 cassette format ?

Thanks! I have build a own ASCII table, with: for i in xrange(32,90): print "%-3s %r %s" % ( i, chr(i), bin(i) ) result: 32 ' ' 0b100000 33 '!' 0b100001 34 '"' 0b100010 35 '#' 0b100011 36 '$' 0b100100 37 '%' 0b100101 38 '&' 0b100110 39 "'" 0b100111 40 '(' 0b101000 41 ')' 0b101001 42 '*' 0b101010 43 ...
by jedie
Fri Aug 16, 2013 8:03 am
Forum: Hints and Tips
Topic: PyDC converter (was: dragon 32 cassette format ?)
Replies: 80
Views: 54153

Re: dragon 32 cassette format ?

Have try this, without success...

Maybe my binary data is wrong...

Exist somewhere a binary<->ascii table ?
by jedie
Thu Aug 15, 2013 5:36 pm
Forum: Hints and Tips
Topic: PyDC converter (was: dragon 32 cassette format ?)
Replies: 80
Views: 54153

Re: dragon 32 cassette format ?

A little bit future: HelloWorld1 origin.wav Numer of audio frames: 109923 read... Framerate: 44100 samplewidth: 2 channels: 1 struct_unpack_str: <h 2735 bits decoded. Start leader '01010101' found at position: 9 bits before header: 001000000 Block pos: 1016-192 len: 192bits rest: 1518bits ----------...