1
0
mirror of https://github.com/rzzzwilson/pymlac.git synced 2025-06-10 09:32:41 +00:00

Debugging lc16sd bootstrap+blockloader

This commit is contained in:
Ross Wilson 2016-03-10 17:41:44 +07:00
parent 37d3cbbe72
commit 240b88263b
5 changed files with 18 additions and 6 deletions

View File

@ -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:

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -8,4 +8,4 @@ end hlt ;
org 0200 ;
hlt ;
;-------------------------------
end
end start