From f6ddcf07720b100bca4870603fcda36c54084cc9 Mon Sep 17 00:00:00 2001 From: Ross Wilson Date: Thu, 3 Mar 2016 23:19:14 +0700 Subject: [PATCH] More debug and testing --- pymlac/Makefile | 2 +- pymlac/Memory.py | 11 +++++++---- pymlac/TtyIn.py | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pymlac/Makefile b/pymlac/Makefile index dba258a..5dbbe11 100644 --- a/pymlac/Makefile +++ b/pymlac/Makefile @@ -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 diff --git a/pymlac/Memory.py b/pymlac/Memory.py index 3e9e32f..96d966c 100644 --- a/pymlac/Memory.py +++ b/pymlac/Memory.py @@ -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 diff --git a/pymlac/TtyIn.py b/pymlac/TtyIn.py index 70985c6..48ecc62 100644 --- a/pymlac/TtyIn.py +++ b/pymlac/TtyIn.py @@ -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):