diff --git a/client/carts/kipperkart.s b/client/carts/kipperkart.s index 8995ab9..47f955f 100644 --- a/client/carts/kipperkart.s +++ b/client/carts/kipperkart.s @@ -69,7 +69,7 @@ .import dns_server_msg .import tftp_server_msg .import press_a_key_to_continue - + .import cfg_default_drive .import print_a .import print_cr .import print @@ -416,19 +416,13 @@ cmp #KEYCODE_F7 cmp #'+' bne @not_plus - inc io_device_no - bpl :+ - dec io_device_no -: + inc cfg_default_drive jmp @config_menu @not_plus: cmp #'-' bne @not_minus - dec io_device_no - bpl :+ - inc io_device_no -: + dec cfg_default_drive jmp @config_menu @not_minus: @@ -576,9 +570,11 @@ disk_boot: .import io_filename .import io_read_file .import io_load_address - lda #00 ;use default drive - sta io_device_no + lda cfg_default_drive + sec + sbc #7 + sta io_device_no ldax #directory_buffer jsr io_read_catalogue @@ -738,9 +734,7 @@ exit_ping: print_default_drive: ldax #default_drive jsr print_ascii_as_native - lda io_device_no - clc - adc #08 + lda cfg_default_drive jsr print_hex jmp print_cr diff --git a/client/carts/set_ip_config.rb b/client/carts/set_ip_config.rb index 425d5bd..fa1b748 100644 --- a/client/carts/set_ip_config.rb +++ b/client/carts/set_ip_config.rb @@ -4,8 +4,9 @@ # $22=netmask (4 bytes) # $26=gateway (4 bytes) # $2A=DNS (4 bytes) -# $2E=TFTP server (4 bytes) - +# $2E= DHCP server (4 bytes) (not changeable) +# $32=TFTP server (4 bytes) +# $36=drive (1 byte) @cartridge_offsets={ #symobol => offset, length @@ -14,7 +15,8 @@ :netmask=>[0x22,4], :gateway=>[0x26,4], :dns=>[0x2a,4], - :tftp=>[0x2e,4], + :tftp=>[0x32,4], + :drive=>[0x36,1] } @progname=File.basename($0) @@ -79,6 +81,8 @@ end end end packed_option=mac.pack("cccccc") + elsif option_length==1 then #it must be drive letter + packed_option=[value.to_i].pack("c") else #it must be an IP split_values=value.split(".") if (split_values.length!=4) || (split_values[3].nil?) then diff --git a/client/cfg/c64_16kcart.cfg b/client/cfg/c64_16kcart.cfg index 9262fc4..352bace 100644 --- a/client/cfg/c64_16kcart.cfg +++ b/client/cfg/c64_16kcart.cfg @@ -4,8 +4,8 @@ MEMORY { ZP: start = $02, size = $1A, type = rw ; IP65ZP: start = $20, size = $13, type = rw, define = yes; #this cart replaces BASIC so ok to use that space HEADER: start = $8000, size = $18, file = %O; - DEFAULTS: start = $8018, size = $1E, file = %O; - ROM: start = $8036, size = $3FCA, define = yes, file = %O; + DEFAULTS: start = $8018, size = $1F, file = %O; + ROM: start = $8037, size = $3FC9, define = yes, file = %O; RAM: start = $C010, size = $0fE0, define = yes; RAM2: start = $0334, size = $CB, define = yes; #extra scratch area - Tape I/O buffer RAM3: start = $0200, size = $58, define = yes; #extra scratch area - Tape I/O buffer diff --git a/client/cfg/c64_8kcart.cfg b/client/cfg/c64_8kcart.cfg index 30a123c..cd85017 100644 --- a/client/cfg/c64_8kcart.cfg +++ b/client/cfg/c64_8kcart.cfg @@ -4,8 +4,8 @@ MEMORY { IP65ZP: start = $A3, size = $0E, type = rw, define = yes; HEADER: start = $8000, size = $09, file = %O; - DEFAULTS: start = $8009, size = $1E, file = %O; - ROM: start = $8027, size = $1FCA, define = yes, file = %O; + DEFAULTS: start = $8009, size = $1F, file = %O; + ROM: start = $8028, size = $1FC9, define = yes, file = %O; RAM: start = $C010, size = $0fE0, define = yes; diff --git a/client/ip65/config.s b/client/ip65/config.s index 138911e..fca33f5 100644 --- a/client/ip65/config.s +++ b/client/ip65/config.s @@ -11,6 +11,7 @@ .export cfg_tftp_server .export cfg_get_configuration_ptr .export cfg_init + .export cfg_default_drive .export dhcp_server .import copymem .importzp copy_src @@ -50,6 +51,7 @@ cfg_gateway_default: .byte 192, 168, 1, 1 ;ip address of router on local network cfg_dns_default: .byte 0, 0, 0, 0; ip address of dns server to use (will be overwritten if dhcp_init is called) dhcp_server_default: .res 4 ;will be set address of dhcp server that configuration was obtained from cfg_tftp_server_default: .byte $ff,$ff,$ff,$ff ; ip address of server to send tftp requests to (can be a broadcast address) +cfg_default_drive_default: .byte 8 cfg_end_defaults: cfg_size=cfg_end_defaults-cfg_mac_default+1 @@ -63,6 +65,7 @@ cfg_gateway: .res 4 ;ip address of router on local network (will be overwritten cfg_dns: .res 4; ip address of dns server to use (will be overwritten if dhcp_init is called) dhcp_server: .res 4 ;will be set address of dhcp server that configuration was obtained from cfg_tftp_server: .res 4 ; ip address of server to send tftp requests to (can be a broadcast address) +cfg_default_drive: .res 0