# HG changeset patch # User aaronwolfe # Date 1265926752 0 # Node ID 65541e2444dcd1418674f87758abd583d6e2370d # Parent 7710f25f2efe7dbacc40581641ae4ad46b022675 use dwinit to become compatible with dw3 server diff -r 7710f25f2efe -r 65541e2444dc level1/modules/dw3.asm --- a/level1/modules/dw3.asm Fri Feb 05 02:41:22 2010 +0000 +++ b/level1/modules/dw3.asm Thu Feb 11 22:19:12 2010 +0000 @@ -131,22 +131,32 @@ * send OP_DWINIT ; setup DWsub command pshs u + ldb #1 ; DRIVER VERSION lda #OP_DWINIT ; load command - pshs a ; command store on stack + pshs d ; command store on stack leax ,s ; point X to stack - ldy #1 ; 1 byte to send + ldy #2 ; 1 byte to send ifgt Level-1 ldu D.DWSubAddr endc jsr 6,u ; call DWrite - leas 1,s ; clean 1 DWsub arg from stack - puls u + leas 1,s ; leave one byte on stack for response + + ; read protocol version response, 1 byte + leax ,s ; point X to stack head + ldy #1 ; 1 byte to retrieve + jsr 3,u ; call DWRead + beq InstIRQ ; branch if no error + leas 3,s ; error, cleanup stack (u and 1 byte from read) + lbra InitEx ; don't install IRQ handler * install ISR InstIRQ - ifgt Level-1 + puls a,u ; a has proto version from server.. not used yet + + ifgt Level-1 ldx D.DWStat