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

More debug and testing

This commit is contained in:
Ross Wilson 2016-03-03 23:19:14 +07:00
parent 614bd2d226
commit f6ddcf0772
3 changed files with 10 additions and 6 deletions

View File

@ -8,7 +8,7 @@ test:
#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,077:03700,03751:03754,03757:03762,03777 -r 040
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

@ -71,11 +71,12 @@ class Memory(object):
0002040, # rsf ;46 skip if TTY has data
0010046, # jmp .-1 ;47 wait until there is data
0001031, # rrb ;50 read TTY -> AC
#0001033, # rrc ;50 read TTY -> AC, clear TTY flag
0074075, # sam 75 ;51 first non-zero must be 02
0010044, # jmp 044 ;52 wait until TTY return == 02
0002040, # loop rsf ;53 skip if TTY has data
0010053, # jmp .-1 ;54 wait until there is data
0001033, # rrc ;55 read TTY -> AC
0010053, # jmp .-1 ;54 wait until there is data
0001033, # rrc ;55 read TTY -> AC, clear TTY flag
0003003, # ral 3 ;56 move TTY byte into high AC
0003003, # ral 3 ;57
0003002, # ral 2 ;60
@ -92,8 +93,10 @@ class Memory(object):
0000000, # data 0 ;73
0000000, # data 0 ;74
0000002, # data 2 ;75
0037700, # go word 037700 ;76 block loader base address
0037677 # base word 037677 ;77 init value for 010 auto inc
#0037700, # go word 037700 ;76 block loader base address
0003700, # go word 003700 ;76 block loader base address
#0037677 # base word 037677 ;77 init value for 010 auto inc
0003677 # base word 003677 ;77 init value for 010 auto inc
]
# class instance variables

View File

@ -16,7 +16,8 @@ class TtyIn(object):
DEVICE_NOT_READY = 0
DEVICE_READY = 1
TTYIN_CHARS_PER_SECOND = 1000
DEVICE_READY_CYCLES = int(CYCLES_PER_SECOND / TTYIN_CHARS_PER_SECOND)
# DEVICE_READY_CYCLES = int(CYCLES_PER_SECOND / TTYIN_CHARS_PER_SECOND)
DEVICE_READY_CYCLES = 200
def __init__(self):