From: ian Date: Sun, 27 Apr 2008 12:19:09 +0000 (+0000) Subject: some debugging macros X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=419341a2ba8f9ddbea2168313853c61324353ce7;p=trains.git some debugging macros --- diff --git a/detpic/nmra-stream.asm b/detpic/nmra-stream.asm index ba5f399..035f13a 100644 --- a/detpic/nmra-stream.asm +++ b/detpic/nmra-stream.asm @@ -319,7 +319,7 @@ master_interrupt_high @ bra master_interrupt_high_notnmra ; timer0 interrupt - debug ',' ; write 'j' to serial port + debug ',' ; write ',' to serial port bc_fa INTCON,TMR0IF ; clear interrupt-set bit ifdef SLOW_VERSION @@ -438,11 +438,11 @@ advance_pointer ; currently on bit 7 of the byte, after having read rest of byte to ; track; check whether it is 1 or 0 -; if set, move to next buffer +; if clear, move to next buffer bt_fa_if0 INDF2,7 rcall advance_read_buffer -; if not set, move to next byte of samebuffer (increment totrack) +; if set, move to next byte of samebuffer (increment totrack) ; (will be on bit 7 at this point anyway so no need to change totrackbit) bt_fa_if1 INDF2,7 inc_fa totrack diff --git a/hostside/TODO b/hostside/TODO index edc3f07..f914927 100644 --- a/hostside/TODO +++ b/hostside/TODO @@ -10,6 +10,25 @@ bugs multiple motions handling is wrong: deadline miscalculated etc. deadline should be start deadline and we should sub length + had strange thing where polarity command caused pic to send + nmra completion messages or other strange messages: + +liberator:hostside> ../iwjpictest/hexterm /dev/ttyUSB0 + 0| 28 89 52 89 52 10 90 20 10 90 80 00 01 90 80 00 | (.R. R... .... .... | + ~~~~~ ~~ ~~~~~~~~~~~ ^^ ~~~~~~~~ + 10| 01 90 80 00 01 09 90 80 00 11 98 20 28 10 90 20 | .... .... .... (... | + ^^ ~~~~~~~~ ^^| ~~~~~~~~~~~~ ~~ + 20| 90 80 00 | ..._ | + +here ^^ are the unexpected messages, ~~ are things shown in bold +ie which I typed, and | means we switched to programming mode and +back (damn! should have dumped!) + + seems to be a pic bug + + in nmra-stream.asm:toggle_output should use LATC not PORTC? + + want to document commands [!]movfeat and speed stop all trains command ?