mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-10-11 17:23:39 +00:00
allow default drive to be changed in cart image
git-svn-id: http://svn.code.sf.net/p/netboot65/code@218 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
157e5c1a08
commit
6983d9c0b8
@ -69,7 +69,7 @@
|
|||||||
.import dns_server_msg
|
.import dns_server_msg
|
||||||
.import tftp_server_msg
|
.import tftp_server_msg
|
||||||
.import press_a_key_to_continue
|
.import press_a_key_to_continue
|
||||||
|
.import cfg_default_drive
|
||||||
.import print_a
|
.import print_a
|
||||||
.import print_cr
|
.import print_cr
|
||||||
.import print
|
.import print
|
||||||
@ -416,19 +416,13 @@ cmp #KEYCODE_F7
|
|||||||
|
|
||||||
cmp #'+'
|
cmp #'+'
|
||||||
bne @not_plus
|
bne @not_plus
|
||||||
inc io_device_no
|
inc cfg_default_drive
|
||||||
bpl :+
|
|
||||||
dec io_device_no
|
|
||||||
:
|
|
||||||
jmp @config_menu
|
jmp @config_menu
|
||||||
@not_plus:
|
@not_plus:
|
||||||
|
|
||||||
cmp #'-'
|
cmp #'-'
|
||||||
bne @not_minus
|
bne @not_minus
|
||||||
dec io_device_no
|
dec cfg_default_drive
|
||||||
bpl :+
|
|
||||||
inc io_device_no
|
|
||||||
:
|
|
||||||
jmp @config_menu
|
jmp @config_menu
|
||||||
|
|
||||||
@not_minus:
|
@not_minus:
|
||||||
@ -576,9 +570,11 @@ disk_boot:
|
|||||||
.import io_filename
|
.import io_filename
|
||||||
.import io_read_file
|
.import io_read_file
|
||||||
.import io_load_address
|
.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
|
ldax #directory_buffer
|
||||||
jsr io_read_catalogue
|
jsr io_read_catalogue
|
||||||
|
|
||||||
@ -738,9 +734,7 @@ exit_ping:
|
|||||||
print_default_drive:
|
print_default_drive:
|
||||||
ldax #default_drive
|
ldax #default_drive
|
||||||
jsr print_ascii_as_native
|
jsr print_ascii_as_native
|
||||||
lda io_device_no
|
lda cfg_default_drive
|
||||||
clc
|
|
||||||
adc #08
|
|
||||||
jsr print_hex
|
jsr print_hex
|
||||||
jmp print_cr
|
jmp print_cr
|
||||||
|
|
||||||
|
@ -4,8 +4,9 @@
|
|||||||
# $22=netmask (4 bytes)
|
# $22=netmask (4 bytes)
|
||||||
# $26=gateway (4 bytes)
|
# $26=gateway (4 bytes)
|
||||||
# $2A=DNS (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={
|
@cartridge_offsets={
|
||||||
#symobol => offset, length
|
#symobol => offset, length
|
||||||
@ -14,7 +15,8 @@
|
|||||||
:netmask=>[0x22,4],
|
:netmask=>[0x22,4],
|
||||||
:gateway=>[0x26,4],
|
:gateway=>[0x26,4],
|
||||||
:dns=>[0x2a,4],
|
:dns=>[0x2a,4],
|
||||||
:tftp=>[0x2e,4],
|
:tftp=>[0x32,4],
|
||||||
|
:drive=>[0x36,1]
|
||||||
}
|
}
|
||||||
|
|
||||||
@progname=File.basename($0)
|
@progname=File.basename($0)
|
||||||
@ -79,6 +81,8 @@ end
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
packed_option=mac.pack("cccccc")
|
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
|
else #it must be an IP
|
||||||
split_values=value.split(".")
|
split_values=value.split(".")
|
||||||
if (split_values.length!=4) || (split_values[3].nil?) then
|
if (split_values.length!=4) || (split_values[3].nil?) then
|
||||||
|
@ -4,8 +4,8 @@ MEMORY {
|
|||||||
ZP: start = $02, size = $1A, type = rw ;
|
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
|
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;
|
HEADER: start = $8000, size = $18, file = %O;
|
||||||
DEFAULTS: start = $8018, size = $1E, file = %O;
|
DEFAULTS: start = $8018, size = $1F, file = %O;
|
||||||
ROM: start = $8036, size = $3FCA, define = yes, file = %O;
|
ROM: start = $8037, size = $3FC9, define = yes, file = %O;
|
||||||
RAM: start = $C010, size = $0fE0, define = yes;
|
RAM: start = $C010, size = $0fE0, define = yes;
|
||||||
RAM2: start = $0334, size = $CB, define = yes; #extra scratch area - Tape I/O buffer
|
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
|
RAM3: start = $0200, size = $58, define = yes; #extra scratch area - Tape I/O buffer
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
MEMORY {
|
MEMORY {
|
||||||
IP65ZP: start = $A3, size = $0E, type = rw, define = yes;
|
IP65ZP: start = $A3, size = $0E, type = rw, define = yes;
|
||||||
HEADER: start = $8000, size = $09, file = %O;
|
HEADER: start = $8000, size = $09, file = %O;
|
||||||
DEFAULTS: start = $8009, size = $1E, file = %O;
|
DEFAULTS: start = $8009, size = $1F, file = %O;
|
||||||
ROM: start = $8027, size = $1FCA, define = yes, file = %O;
|
ROM: start = $8028, size = $1FC9, define = yes, file = %O;
|
||||||
RAM: start = $C010, size = $0fE0, define = yes;
|
RAM: start = $C010, size = $0fE0, define = yes;
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
.export cfg_tftp_server
|
.export cfg_tftp_server
|
||||||
.export cfg_get_configuration_ptr
|
.export cfg_get_configuration_ptr
|
||||||
.export cfg_init
|
.export cfg_init
|
||||||
|
.export cfg_default_drive
|
||||||
.export dhcp_server
|
.export dhcp_server
|
||||||
.import copymem
|
.import copymem
|
||||||
.importzp copy_src
|
.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)
|
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
|
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_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_end_defaults:
|
||||||
cfg_size=cfg_end_defaults-cfg_mac_default+1
|
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)
|
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
|
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_tftp_server: .res 4 ; ip address of server to send tftp requests to (can be a broadcast address)
|
||||||
|
cfg_default_drive: .res 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user