Subject: RE: [stella] Maximum baud rate for sending? From: "Fred Quimby" <c9r@xxxxxxxxxxx> Date: Mon, 15 Aug 2005 00:01:31 -0400 |
I got it working at 115200 bps, and it works great! It sends the whole 4k cart in about 2 seconds. The timing is nearly dead-on. Plus, the delay loop has been removed, which freed up around 30 bytes, which could be used to add support for bankswitching, maybe... processor 6502 include "vcs.h" include "macro.h" BIT1 EQU 13 ; 1200 baud BIT2 EQU 13 ORG $0080 noreset lda SWCHB lsr iny sty COLUBK BCS noreset keepgoing ; ldy #20 ; jsr WSYNCY shit lda $f000,x pha lsr lsr lsr lsr jsr conv2hex pla jsr conv2hex lda #32 jsr OUT232 inc $f9 lda $f9 and #$0f sta $f9 bne noret lda #13 jsr OUT232 noret inc $fa ldx $fa bne keepgoing inc shit+2 bne keepgoing brk conv2hex and #$0f cmp #10 bcc noadd adc #6 noadd adc #48 OUT232 LDX #$FF ; output low for start bit STX SWCHA LDX #4 ; init count for 4 bit pairs EOR #$FF sleep 2 OUT232b STA SWCHA ROR ; rotate out next bit sleep 4 STA SWCHA ROR ; rotate out next bit DEX ; decrement counter BNE OUT232b ; loop until 8 bits sent STX SWCHA RTS echo ($f9-*)," bytes free" .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 start sei cld ldx #$FF txs lda #0 clearmem sta 0,x dex bne clearmem ldx #$7F loop2 lda $f000,x sta $80,x dex bpl loop2 lda #1 sta SWACNT lda #$00 sta SWCHA rerestart ldy #200 delay WSYNCY STY WSYNC ; wait a line DEY ; decrement line counter BNE WSYNCY ; loop until done ldx #0 jmp $0080 ORG $107C .word start+$f80 .word start+$f80 >One more thing, what would the delays have to be to >send data at the maximum the 2600 can do? So far I've >only been able to get it up to 2400 baud while doing >the WSYNC method of delay, otherwise the timing >doesn't correspond to a standard baud rate and I get >gibberish in my terminal program. > >I'd like to see how fast this can be pushed just as a >test. If we knew the proper delays then we could use >the SLEEP macro instead of the WSYNCs. I'm guessing >that the delay would have to be almost nothing since >you'd be mostly maxing out the 2600's CPU. > > > > > >____________________________________________________ >Start your day with Yahoo! - make it your home page >http://www.yahoo.com/r/hs > >Archives (includes files) at http://www.biglist.com/lists/stella/archives/ >Unsub & more at http://stella.biglist.com > Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://stella.biglist.com [demime 1.01d removed an attachment of type application/x-zip which had a name of dump115200.ZIP]
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [stella] Maximum baud rate for , Fred Quimby | Thread | RE: [stella] Maximum baud rate for , Glenn Saunders |
RE: [stella] Maximum baud rate for , Fred Quimby | Date | RE: [stella] Maximum baud rate for , Glenn Saunders |
Month |