RE: [stella] Maximum baud rate for sending?

Subject: RE: [stella] Maximum baud rate for sending?
From: "Fred Quimby" <c9r@xxxxxxxxxxx>
Date: Mon, 15 Aug 2005 01:30:22 -0400
>This one didn't work for me.  I just got a lot of
>high-ascii characters.

The obvious answer is the out-of-spec signaling, but of course at this 
speed, cabling becomes really important regardless if the signals are in 
spec or not.  I'm using about 2 feet of thick, stranded copper wires.  Not 
sure if cabling will help.

I don't think it's the timing.  The timing is pretty good - at 10.329 cycles 
per bit and 10 bits to send per character, you need 9 of these delays 
between bits or 92.97 cycles, and I'm using 93.  The delays between bits are 
10,10,11,10,11,10,11,10,10 cycles, which I think is pretty ideal.  Of 
course, this assumes that the 2600 runs at *exactly* 1.19 Mhz... How 
accurate is the 2600's clock?

I'd like to hear if anyone else gets it to work at 115200.

Regardless, if anyone has one of those fancy TTL converters, here's a 
modified version of the 115200 bps program that should work with one:

  processor  6502
  include  "vcs.h"
  include  "macro.h"


  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	#0		;  output  low  for  start  bit
	STX	SWCHA
	LDX	#3		;  init  count  for  4  bit  pairs
;	EOR	#$FF
  sleep  4
OUT232b
	STA	SWCHA
	ROR			;  rotate  out  next  bit
  sleep  4
	STA	SWCHA
	ROR			;  rotate  out  next  bit
	DEX			;  decrement  counter
	BPL	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


Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://stella.biglist.com

Current Thread