* fixed terminal type negotiation bug

* changed colours


git-svn-id: http://svn.code.sf.net/p/netboot65/code@216 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
jonnosan 2009-11-13 11:27:47 +00:00
parent 34d06b9fae
commit 2399bd07aa
3 changed files with 36 additions and 33 deletions

View File

@ -89,18 +89,8 @@ cold_init:
warm_init:
;set some funky colours
jsr setup_screen
LDA #$04 ;purple
STA $D020 ;border
LDA #$00 ;black
STA $D021 ;background
lda #$05 ;petscii for white text
jsr print_a
lda #14
jsr print_a ;switch to lower case
;relocate our r/w data
ldax #__DATA_LOAD__
stax copy_src
@ -390,10 +380,26 @@ cfg_get_configuration_ptr:
ldax #cfg_mac
rts
exit_telnet:
exit_gopher:
setup_screen:
;make sure normal font
lda #$15
sta $d018
LDA #$06 ;blue
STA $D020 ;border
LDA #$00 ;black
STA $D021 ;background
lda #$05 ;petscii for white text
jsr print_a
lda #14
jmp print_a ;switch to lower case
exit_telnet:
exit_gopher:
jsr setup_screen
jmp main_menu
.rodata

View File

@ -88,14 +88,11 @@ telnet_connect:
lda telnet_line_mode
bne @main_polling_loop
;if we get here, we are in VT100 'char at a time mode'
;so tell the other end that
ldax #initial_telnet_options_length
stax tcp_send_data_len
ldax #initial_telnet_options
jsr tcp_send
; ldax #initial_telnet_options_length
; stax tcp_send_data_len
; ldax #initial_telnet_options
; jsr tcp_send
@main_polling_loop:
@ -284,6 +281,7 @@ telnet_callback:
@waiting_for_suboption_end:
txa
ldx iac_suboption_buffer_length
sta iac_suboption_buffer,x
inc iac_suboption_buffer_length
@ -295,7 +293,7 @@ telnet_callback:
lda iac_suboption_buffer
cmp #$18
bne @not_terminal_type
ldx #0
:
lda terminal_type_response,x
@ -329,10 +327,11 @@ telnet_callback:
sta telnet_state
jmp @byte_processed
@suboption:
lda #telnet_state_got_suboption
sta telnet_state
lda #0
sta iac_suboption_buffer
sta iac_suboption_buffer_length
jmp @byte_processed
@option:
@ -419,11 +418,9 @@ telnet_callback:
bne :-
lda #telnet_state_normal
sta telnet_state
jmp @byte_processed
lda #$fb ;WILL
jmp @add_iac_response
@do_terminaltype:
lda #$fb ;WILL
@ -462,11 +459,11 @@ closing_connection: .byte "CLOSING CONNECTION",13,0
disconnected: .byte 13,"CONNECTION CLOSED",13,0
transmission_error: .byte "ERROR WHILE SENDING ",0
initial_telnet_options:
.byte $ff,$fb,$1F ;IAC WILL NAWS
.byte $ff,$fb,$18 ;IAC WILL TERMINAL TYPE
;initial_telnet_options:
; .byte $ff,$fb,$1F ;IAC WILL NAWS
; .byte $ff,$fb,$18 ;IAC WILL TERMINAL TYPE
initial_telnet_options_length=*-initial_telnet_options
;initial_telnet_options_length=*-initial_telnet_options
terminal_type_response:
.byte $ff ; IAC

View File

@ -55,10 +55,10 @@ charmode_blink_underline = $0a
charmode_blink_underline_bold = $07
; text background
text_background_colour = col_gray_1
text_background_colour = col_black
; border colour
border_colour = col_gray_2
border_colour = col_blue
.segment "APP_SCRATCH"