diff --git a/pyasm/pyasm b/pyasm/pyasm index 204fecb..aca097a 100755 --- a/pyasm/pyasm +++ b/pyasm/pyasm @@ -1327,8 +1327,10 @@ def main(): if loader not in ['C8LDS', 'LC16SD']: usage("-b options expects either C8LDS or LC16SD param") if loader == 'C8LDS': + print('BlockLoader=BlockLoader_C8LDS') BlockLoader = BlockLoader_C8LDS else: + print('BlockLoader=BlockLoader_LC16SD') BlockLoader = BlockLoader_LC16SD if len(args) != 2: diff --git a/pymlac/Makefile b/pymlac/Makefile index f3d16d0..24b47a5f 100644 --- a/pymlac/Makefile +++ b/pymlac/Makefile @@ -4,12 +4,10 @@ # test: - #pymlac -b ptr -c -ptr dumpmem_test.ptp -t 0100,0110:03700,03761:03766,03777 -r 040 -r 0100 - pymlac -b ptr -c -ptr dumpmem_test.ptp -t 040,045:050,052:055,060:065,066:071,077 -r 040 + #pymlac -b ptr -c -ptr dumpmem_test_c8lds.ptp -t 040,045:050,052:055,060:065,066:071,077:0100,0110:03700,03761:03766,03777 -r 040 -r 0100 + pymlac -b ptr -c -ptr dumpmem_test_lc16sd.ptp -t 0100,0110:03700,03761:03766,03777 -r 040 + #pymlac -b ptr -c -ptr dumpmem_test.ptp -t 040,045:050,052:055,060:065,066:071,077 -r 040 -t 03700,03777 -r 0100 #pymlac -b tty -c -ttyin dumpmem_test.ptp -t 0100,0110:03700,03751:03754,03757:03762,03777 -r 040 -r 0100 - #pymlac -b tty -c -ttyin dumpmem_test.ptp -t 0100,0110:03700,03751:03754,03757:03762,03777 -r 040 - #pymlac -b tty -c -ttyin dumpmem_test.ptp -t 03700,03751:03754,03757:03762,03777 -r 040 -r 0100 - #pymlac -b tty -c -ttyin dumpmem_test.ptp -t 040,045:050,052:055,060:063,077:03700,03751:03754,03757:03762,03777 -r 040 test_debug: rm -f test.ptr test.ptp CPU.test.trace test_CPU.log pymlac.trace diff --git a/pymlac/Memory.py b/pymlac/Memory.py index 9d31d6b..ae6ef04 100644 --- a/pymlac/Memory.py +++ b/pymlac/Memory.py @@ -182,6 +182,7 @@ class Memory(object): def set_PTR_ROM(self): """Set addresses 040 to 077 as PTR ROM.""" + log('seting PTR bootstrap into ROM') i = self.ROM_START for ptr_value in self.PTR_ROM_IMAGE: self.memory[i] = ptr_value @@ -190,6 +191,7 @@ class Memory(object): def set_TTY_ROM(self): """Set addresses 040 to 077 as TTY ROM.""" + log('seting TTY bootstrap into ROM') i = self.ROM_START for tty_value in self.TTY_ROM_IMAGE: #for tty_value in self.TTY_ROM_IMAGE_TEST: diff --git a/pymlac/PtrPtp.py b/pymlac/PtrPtp.py index 62e09e6..add8dde 100644 --- a/pymlac/PtrPtp.py +++ b/pymlac/PtrPtp.py @@ -11,6 +11,8 @@ the PTR/PTP object how many CPU cycles have passed (tick()). import struct from Globals import * +import log +log = log.Log('test.log', log.Log.DEBUG) class PtrPtp(object): @@ -77,6 +79,8 @@ class PtrPtp(object): if self.device_use == self.InUsePTP: raise RuntimeError("ptr_mount: Can't mount PTR file, being used as PTP") + log("Mounting '%s' onto PTR" % fname) + self.device_use = self.InUsePTR self.device_motor_on = False self.device_filename = fname @@ -92,6 +96,8 @@ class PtrPtp(object): if self.device_use == self.InUsePTP: raise RuntimeError("ptr_dismount: Can't dismount PTR file, being used as PTP") + log("Dismounting '%s' onto PTR" % self.device_filename) + if self.device_filename: self.device_open_file.close() @@ -103,6 +109,8 @@ class PtrPtp(object): if self.device_use == self.InUsePTP: raise RuntimeError("start: Can't start PTR motor, being used as PTP") + log("Starting PTR") + self.device_use = self.InUsePTR self.device_motor_on = True self.device_ready = False @@ -114,6 +122,8 @@ class PtrPtp(object): if self.device_use == self.InUsePTP: raise RuntimeError("stop: Can't stop PTR motor, being used as PTP") + log("Stopping PTR") + self.device_motor_on = False self.device_ready = False self.device_cycle_count = self.PtrReadyCycles diff --git a/pymlac/dumpmem_test.asm b/pymlac/dumpmem_test.asm index 8ca47d8..0e7054b 100755 --- a/pymlac/dumpmem_test.asm +++ b/pymlac/dumpmem_test.asm @@ -8,4 +8,4 @@ end hlt ; org 0200 ; hlt ; ;------------------------------- - end + end start