OpenCores
URL https://opencores.org/ocsvn/tv80/tv80/trunk

Subversion Repositories tv80

[/] [tv80/] [branches/] [restruc1/] [tests/] [tvs80/] [build] - Rev 87

Go to most recent revision | Compare with Previous | Blame | View Log

#!/usr/bin/env python

import os

# Global config
tempfile = "dosbox.temp"
dosbox_home = "/scratch/ghutchis/tools/dosbox-0.60/src/"

def replace_mount (filename, path):
    rfh = open (filename, 'r')
    wfh = open (tempfile, 'w')

    rline = rfh.readline()

    while (rline != ''):
        if rline.find ("mount c") == 0:
            wfh.write ("mount c " + path + "\n")
        else:
            wfh.write (rline)
        rline = rfh.readline()

    rfh.close()
    wfh.close()
    os.rename (tempfile, filename)

here = os.getcwd()
replace_mount ("dosbox.conf", here)

os.system (dosbox_home + "dosbox")
os.rename ("TVS80TST.HEX", "../tvs80.ihx")
os.chdir ("..")
os.system ("../scripts/ihex2mem.py tvs80.ihx tvs80.vmem")

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.