User Tools

Site Tools


source_conversion

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
source_conversion [2015-04-17 04:35] – external edit 127.0.0.1source_conversion [2016-08-24 03:30] (current) michael_steil
Line 6: Line 6:
  
 There is a tool called [[http://style64.org/release/tmpview-v1.3-style|TMPview 1.3]], which converts the binary format of turbo assembler source files to ASCII text, without forcing the user to go through the intermediate step of first exporting the source files in Turbo Assembler on C64 to SEQ format and then convert the SEQ files (PETSCII) to ASCII files. There is a tool called [[http://style64.org/release/tmpview-v1.3-style|TMPview 1.3]], which converts the binary format of turbo assembler source files to ASCII text, without forcing the user to go through the intermediate step of first exporting the source files in Turbo Assembler on C64 to SEQ format and then convert the SEQ files (PETSCII) to ASCII files.
 +
 +===== VisAss & AssBlaster to ASCII conversion =====
 +
 +Use [[https://github.com/mist64/vis2ascii|vis2ascii]].
 +
 +===== Hypra-Ass to ASCII conversion =====
 +
 +The following bash script converts the encoded file to PETSCII using [[https://github.com/mist64/cbmbasic|cbmbasic]]:
 +
 +<code>printf "LOAD \"hypra_source.prg\"\nLIST\n"  | cbmbasic | tail -n +11 | sed '$d' | LANG=C cut -d " " -f 2- > source.s</code>
 +
 +You can do this manually, by typing this into the cbmbasic shell:
 +
 +<code>
 +LOAD"hypra source.prg"
 +LIST
 +</code>
 +
 +And redirecting or copy/pasting the output.
 +
 +As a second step, you need to convert the PETSCII output to ASCII (see below).
 +
 +And as a final step, use the following Python script to fix up the Hypra-Ass-specific indentation:
 +
 +<code>
 +lines = [line.rstrip('\n') for line in open(sys.argv[1])]
 +
 +for line in lines:
 + if line[0] == ';':
 + print line
 + else:
 + index = line.find(' ')
 + if index == 0:
 + print '\t' + line[1:4] + ' ' + line[4:]
 + elif index == -1:
 + print line
 + else:
 + print line[:index] + '\t' + line[index+1:index+4] + ' ' + line[index+4:]
 +</code>
  
 ===== PETSCII to ASCII conversion ===== ===== PETSCII to ASCII conversion =====
source_conversion.txt · Last modified: 2016-08-24 03:30 by michael_steil