Jump to content

svens

Members
  • Posts

    0
  • Joined

  • Last visited

    Never

Everything posted by svens

  1. i've created http://www.midibox.org/dokuwiki/doku.php?id=compiling_the_midibox_source_on_linux a few minutes ago, comments/improvements/suggestions are of course welcome 8)
  2. Good idea, i'll add that to the wiki over the weekend. I think the sed script could also be improved, thats only "the-first-version-that-works-for-me". Greetings, Sven.
  3. Since i faced the same problem this week, i wrote some small sed script that replaces the problematic MACROs in the source code: replace-macros.sed -------------------------------------------------------8<------------------------------------------------------------ 1i;hey emacs, this is -*- asm -*- /^[ \t]*;/b #skip commented line /^\s*\w*\s*MACRO/b #skip macro definitions s/\<BIFSET\s*\([^,]*\)\s*,\s*\([^,]*\),\s*\([^,]*\)\s*,\s*\(.*\)/btfsc \1, \2, \3\n\t\4/g s/\<BIFCLR\s*\([^,]*\)\s*,\s*\([^,]*\),\s*\([^,]*\)\s*,\s*\(.*\)/btfss \1, \2, \3\n\t\4/g s/\<IFSET\s*\([^,]*\)\s*,\s*\([^,]*\),\s*\(.*\)/btfsc \1, \2\n\t\3/g s/\<IFCLR\s*\([^,]*\)\s*,\s*\([^,]*\),\s*\(.*\)/btfss \1, \2\n\t\3/g s/\<IFNEQ\s*\([^,]*\)\s*,\s*\([^,]*\),\s*\(.*\)/cpfseq \1, \2\n\t\3/g s/\<IFLEQ\s*\([^,]*\)\s*,\s*\([^,]*\),\s*\(.*\)/cpfsgt \1, \2\n\t\3/g s/\<IFGEQ\s*\([^,]*\)\s*,\s*\([^,]*\),\s*\(.*\)/cpfslt \1, \2\n\t\3/g -------------------------------------------------------8<------------------------------------------------------------ fix-gpasm.sh: -------------------------------------------------------8<------------------------------------------------------------ #!/bin/sh for i in src/*.inc src/*.asm src/*.h;do tr -d '\r' < $i|sed -f replace-macros.sed >${i}_ && mv ${i}_ $i done -------------------------------------------------------8<------------------------------------------------------------ Now i just have to copy the new src/ directory if there is a new version, run fix-gpasm.sh and can compile the source native on linux with gpasm :) Greetings, Sven.
×
×
  • Create New...