mirror of
https://github.com/bobbimanners/emailler.git
synced 2025-04-07 21:37:06 +00:00
drivers now display base I/O address
git-svn-id: http://svn.code.sf.net/p/netboot65/code@310 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
8fcf5e476e
commit
82259443a8
Binary file not shown.
Binary file not shown.
@ -33,6 +33,7 @@ all: ip65 drivers\
|
||||
kippergo.prg \
|
||||
kippergo_rr.bin \
|
||||
kipperdisk.d64 \
|
||||
netbootwiz.bin \
|
||||
|
||||
kipperkart.o: kipperkart.s $(INCFILES) ../inc/ping.i ../inc/disk_transfer.i ../inc/sidplay.i ../inc/config_menu.i
|
||||
$(AS) $(AFLAGS) -o $@ $<
|
||||
@ -114,6 +115,10 @@ kkwiz.bin: kipperkart.o $(IP65WIZNETLIB) $(C64WIZNETLIB) $(INCFILES) ../cfg/c64_
|
||||
ruby fix_cart.rb $@ 16384
|
||||
# ruby set_ip_config.rb $@ mac auto
|
||||
|
||||
netbootwiz.bin: netboot.o $(IP65WIZNETLIB) $(C64WIZNETLIB) $(INCFILES) ../cfg/c64_8kcart.cfg
|
||||
$(LD) -m netboot.map -vm -C ../cfg/c64_8kcart.cfg -o $@ $< $(IP65WIZNETLIB) $(C64WIZNETLIB)
|
||||
ruby fix_cart.rb $@ 8192
|
||||
|
||||
|
||||
|
||||
d64_upload.d64: d64_upload.prg
|
||||
|
@ -115,9 +115,9 @@ warm_init:
|
||||
|
||||
ldax #menu_header_msg
|
||||
jsr print_ascii_as_native
|
||||
ldax #init_msg+1
|
||||
jsr print_ascii_as_native
|
||||
|
||||
; ldax #init_msg+1
|
||||
; jsr print_ascii_as_native
|
||||
print_driver_init
|
||||
jsr ip65_init
|
||||
bcs init_failed
|
||||
jsr dhcp_init
|
||||
|
@ -166,7 +166,7 @@ warm_init:
|
||||
ldax #menu_header_msg
|
||||
jsr print_ascii_as_native
|
||||
ldax #init_msg+1
|
||||
jsr print_ascii_as_native
|
||||
jsr print_ascii_as_native
|
||||
|
||||
kippercall #KPR_INITIALIZE
|
||||
bcc init_ok
|
||||
|
@ -130,7 +130,7 @@ warm_init:
|
||||
ldax #menu_header_msg
|
||||
jsr print_ascii_as_native
|
||||
ldax #init_msg+1
|
||||
jsr print_ascii_as_native
|
||||
jsr print_ascii_as_native
|
||||
|
||||
jsr ip65_init
|
||||
bcs init_failed
|
||||
|
@ -68,12 +68,19 @@ get_value_of_axy: ;some more self-modifying code
|
||||
.word init ;cold start vector
|
||||
.word $FE47 ;warm start vector
|
||||
.byte $C3,$C2,$CD,$38,$30 ; "CBM80"
|
||||
.byte $0,$0,$0 ;reserved for future use
|
||||
.byte $0,$0,$0 ;reserved for future use
|
||||
.byte $0,$0,$0 ;reserved for future use
|
||||
.byte $0,$0,$0 ;reserved for future use
|
||||
.byte $0,$0,$0 ;reserved for future use
|
||||
|
||||
.code
|
||||
|
||||
|
||||
|
||||
init:
|
||||
|
||||
|
||||
;first let the kernal do a normal startup
|
||||
sei
|
||||
jsr $fda3 ;initialize CIA I/O
|
||||
@ -107,22 +114,31 @@ init:
|
||||
stax copy_dest
|
||||
ldax #__DATA_SIZE__
|
||||
jsr copymem
|
||||
|
||||
ldax #__SELF_MODIFIED_CODE_LOAD__
|
||||
stax copy_src
|
||||
ldax #__SELF_MODIFIED_CODE_RUN__
|
||||
stax copy_dest
|
||||
ldax #__SELF_MODIFIED_CODE_SIZE__
|
||||
jsr copymem
|
||||
|
||||
|
||||
ldax #netboot_msg
|
||||
jsr print
|
||||
ldax #init_msg+1
|
||||
jsr print
|
||||
jsr print_ascii_as_native
|
||||
|
||||
print_driver_init
|
||||
|
||||
|
||||
jsr ip65_init
|
||||
|
||||
|
||||
|
||||
bcs @init_failed
|
||||
jsr dhcp_init
|
||||
bcc init_ok
|
||||
jsr ip65_init ;if DHCP failed, then reinit the IP stack (which will reset IP address etc that DHCP messed with to cartridge default values)
|
||||
bcc init_ok
|
||||
@init_failed:
|
||||
|
||||
print_failed
|
||||
jsr print_errorcode
|
||||
jsr wait_for_keypress
|
||||
@ -130,6 +146,9 @@ init:
|
||||
|
||||
|
||||
init_ok:
|
||||
|
||||
|
||||
|
||||
ldx #$03
|
||||
:
|
||||
lda cfg_tftp_server,x
|
||||
@ -199,7 +218,7 @@ get_tftp_directory_listing:
|
||||
stax tftp_load_address
|
||||
|
||||
ldax #getting_dir_listing_msg
|
||||
jsr print
|
||||
jsr print_ascii_as_native
|
||||
|
||||
jsr tftp_download
|
||||
|
||||
@ -253,7 +272,7 @@ get_tftp_directory_listing:
|
||||
|
||||
@dir_failed:
|
||||
ldax #dir_listing_fail_msg
|
||||
jsr print
|
||||
jsr print_ascii_as_native
|
||||
jsr print_errorcode
|
||||
jsr print_cr
|
||||
|
||||
@ -262,7 +281,7 @@ get_tftp_directory_listing:
|
||||
|
||||
@no_files_on_server:
|
||||
ldax #no_files
|
||||
jsr print
|
||||
jsr print_ascii_as_native
|
||||
|
||||
jmp tftp_boot_failed
|
||||
|
||||
@ -279,9 +298,9 @@ download: ;AX should point at filename to download
|
||||
stax tftp_load_address
|
||||
|
||||
ldax #downloading_msg
|
||||
jsr print
|
||||
jsr print_ascii_as_native
|
||||
ldax tftp_filename
|
||||
jsr print
|
||||
jsr print_ascii_as_native
|
||||
jsr print_cr
|
||||
|
||||
jsr tftp_download
|
||||
@ -289,20 +308,20 @@ download: ;AX should point at filename to download
|
||||
bcc :+
|
||||
|
||||
ldax #tftp_download_fail_msg
|
||||
jsr print
|
||||
jsr print_ascii_as_native
|
||||
jsr print_errorcode
|
||||
sec
|
||||
rts
|
||||
|
||||
:
|
||||
ldax #tftp_download_ok_msg
|
||||
jsr print
|
||||
jsr print_ascii_as_native
|
||||
clc
|
||||
rts
|
||||
|
||||
wait_for_keypress:
|
||||
ldax #press_a_key_to_continue
|
||||
jsr print
|
||||
jsr print_ascii_as_native
|
||||
@loop:
|
||||
jsr $ffe4
|
||||
beq @loop
|
||||
@ -318,30 +337,26 @@ get_key:
|
||||
.rodata
|
||||
|
||||
netboot_msg:
|
||||
.byte 13,"NETBOOT - V"
|
||||
.byte 14,10,"NETBOOT - V"
|
||||
.include "../inc/version.i"
|
||||
.byte 13,0
|
||||
downloading_msg: .byte "DOWN"
|
||||
loading_msg: .asciiz "LOADING "
|
||||
.byte 10,0
|
||||
downloading_msg: .byte "down"
|
||||
loading_msg: .asciiz "loading "
|
||||
|
||||
getting_dir_listing_msg: .byte "FETCHING DIRECTORY",13,0
|
||||
getting_dir_listing_msg: .byte "fetching directory",10,0
|
||||
|
||||
dir_listing_fail_msg:
|
||||
.byte "DIR FAILED",13,0
|
||||
.byte "dir failed",10,0
|
||||
|
||||
tftp_download_fail_msg:
|
||||
.byte "DOWNLOAD FAILED", 13, 0
|
||||
.byte "download failed", 10, 0
|
||||
|
||||
tftp_download_ok_msg:
|
||||
.byte "DOWN"
|
||||
.byte "down"
|
||||
load_ok_msg:
|
||||
.byte "LOAD OK", 13, 0
|
||||
.byte "load OK", 10, 0
|
||||
|
||||
current:
|
||||
.byte "CURRENT ",0
|
||||
|
||||
new:
|
||||
.byte"NEW ",0
|
||||
|
||||
tftp_dir_filemask:
|
||||
.asciiz "$/*.prg"
|
||||
@ -350,7 +365,12 @@ tftp_file:
|
||||
.asciiz "BOOTC64.PRG"
|
||||
|
||||
no_files:
|
||||
.byte "NO FILES",13,0
|
||||
.byte "No files",10,0
|
||||
|
||||
|
||||
;we need a 'dummy' segment here - some drivers use this segment (e.g. wiznet), some don't (e.g. rr-net)
|
||||
;if we don't declare this, we get an 'undefined segment' error when linking to a driver that doesn't use it.
|
||||
.segment "SELF_MODIFIED_CODE"
|
||||
|
||||
;-- LICENSE FOR netboot.s --
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
|
@ -16,7 +16,7 @@
|
||||
.export eth_rx
|
||||
.export eth_tx
|
||||
.export eth_driver_name
|
||||
|
||||
.export eth_driver_io_base
|
||||
.import eth_inp
|
||||
.import eth_inp_len
|
||||
.import eth_outp
|
||||
@ -443,7 +443,9 @@ lan_self_modify:
|
||||
.rodata
|
||||
eth_driver_name:
|
||||
.asciiz "LANceGS (91C96)"
|
||||
|
||||
eth_driver_io_base=fixlan01+1
|
||||
|
||||
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
; compliance with the License. You may obtain a copy of the License at
|
||||
|
@ -9,13 +9,16 @@
|
||||
.export cs_tx_cmd
|
||||
.export cs_tx_len
|
||||
.export eth_driver_name
|
||||
|
||||
rr_ctl = $de01 ;address of 'control' port on Retro-Replay
|
||||
cs_packet_page = $de02 ;address of 'packet page' port on RR-Net
|
||||
cs_packet_data = $de04;address of 'packet data' port on RR-Net
|
||||
cs_rxtx_data = $de08 ;address of 'recieve/transmit data' port on RR-Net
|
||||
cs_tx_cmd = $de0c;address of 'transmit command' port on RR-Net
|
||||
cs_tx_len = $de0e;address of 'transmission length' port on RR-Net
|
||||
.export eth_driver_io_base
|
||||
|
||||
IO_BASE=$de00
|
||||
;IO_BASE=$df00
|
||||
rr_ctl = IO_BASE+1 ;address of 'control' port on Retro-Replay
|
||||
cs_packet_page = IO_BASE+2 ;address of 'packet page' port on RR-Net
|
||||
cs_packet_data = IO_BASE+4;address of 'packet data' port on RR-Net
|
||||
cs_rxtx_data = IO_BASE+8 ;address of 'recieve/transmit data' port on RR-Net
|
||||
cs_tx_cmd = IO_BASE+$0c;address of 'transmit command' port on RR-Net
|
||||
cs_tx_len = IO_BASE+$0e;address of 'transmission length' port on RR-Net
|
||||
|
||||
|
||||
.code
|
||||
@ -31,8 +34,13 @@ cs_init:
|
||||
|
||||
.rodata
|
||||
eth_driver_name:
|
||||
.asciiz "RR-NET"
|
||||
|
||||
.if IO_BASE=$de00
|
||||
.byte "RR-NET",0
|
||||
.else
|
||||
.byte "64NIC+",0
|
||||
.endif
|
||||
eth_driver_io_base:
|
||||
.word IO_BASE
|
||||
|
||||
|
||||
;-- LICENSE FOR rr-net.s --
|
||||
|
@ -9,8 +9,9 @@
|
||||
.export cs_rxtx_data
|
||||
.export cs_tx_cmd
|
||||
.export cs_tx_len
|
||||
.export eth_driver_name
|
||||
|
||||
.export eth_driver_name
|
||||
.export eth_driver_io_base
|
||||
|
||||
cs_rxtx_data = $c0b0 ;address of 'recieve/transmit data' port on Uthernet
|
||||
cs_tx_cmd = $c0b4;address of 'transmit command' port on Uthernet
|
||||
cs_tx_len = $c0b6;address of 'transmission length' port on Uthernet
|
||||
@ -27,6 +28,8 @@ cs_init:
|
||||
.rodata
|
||||
eth_driver_name:
|
||||
.byte "UTHERNET",0
|
||||
eth_driver_io_base:
|
||||
.word cs_rxtx_data
|
||||
|
||||
|
||||
;-- LICENSE FOR uthernet.s --
|
||||
|
@ -8,8 +8,8 @@
|
||||
.export cs_rxtx_data
|
||||
.export cs_tx_cmd
|
||||
.export cs_tx_len
|
||||
.export eth_driver_name
|
||||
|
||||
.export eth_driver_name
|
||||
.export eth_driver_io_base
|
||||
|
||||
rr_ctl = $9801 ;address of 'control' port on Retro-Replay
|
||||
cs_packet_page = $9802 ;address of 'packet page' port on RR-Net
|
||||
@ -33,7 +33,8 @@ cs_init:
|
||||
.rodata
|
||||
eth_driver_name:
|
||||
.asciiz "VIC20 RR-NET"
|
||||
|
||||
eth_driver_io_base:
|
||||
.word rr_ctl-1
|
||||
|
||||
|
||||
;-- LICENSE FOR vic20-rr-net.s --
|
||||
|
@ -10,14 +10,16 @@
|
||||
|
||||
.include "w5100.i"
|
||||
|
||||
DEFAULT_W5100_BASE = $DF20
|
||||
;DEFAULT_W5100_BASE = $DF20
|
||||
|
||||
DEFAULT_W5100_BASE = $DE04
|
||||
|
||||
;DEBUG = 1
|
||||
.export eth_init
|
||||
.export eth_rx
|
||||
.export eth_tx
|
||||
.export eth_driver_name
|
||||
|
||||
.export eth_driver_io_base
|
||||
.import eth_inp
|
||||
.import eth_inp_len
|
||||
.import eth_outp
|
||||
@ -77,6 +79,8 @@ DEFAULT_W5100_BASE = $DF20
|
||||
;w5100 aware apps can use w5100_init and pass in a different
|
||||
;base address
|
||||
eth_init:
|
||||
|
||||
|
||||
ldax #DEFAULT_W5100_BASE
|
||||
|
||||
;initialize the w5100 ethernet adaptor
|
||||
@ -950,6 +954,9 @@ read_reg_and_inc:
|
||||
.rodata
|
||||
eth_driver_name:
|
||||
.asciiz "WIZNET 5100"
|
||||
|
||||
eth_driver_io_base=read_mode_reg+1
|
||||
|
||||
w5100_config_data:
|
||||
.byte $00 ;no interrupts
|
||||
.byte $0f ;400ms retry (default)
|
||||
@ -1007,10 +1014,10 @@ inc_hi:
|
||||
|
||||
|
||||
read_mode_reg:
|
||||
lda $FFFF ;WIZNET_BASE
|
||||
lda DEFAULT_W5100_BASE ;WIZNET_BASE
|
||||
rts
|
||||
write_mode_reg:
|
||||
sta $FFFF ;WIZNET_BASE
|
||||
sta DEFAULT_W5100_BASE ;WIZNET_BASE
|
||||
rts
|
||||
|
||||
next_eth_packet_byte:
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
|
||||
.import eth_driver_name
|
||||
.import eth_driver_io_base
|
||||
.importzp copy_src
|
||||
.import cfg_tftp_server
|
||||
;reuse the copy_src zero page var
|
||||
@ -45,8 +46,19 @@ temp_ptr: .res 2
|
||||
.macro print_driver_init
|
||||
ldax #eth_driver_name
|
||||
jsr print_ascii_as_native
|
||||
lda #'('
|
||||
jsr print_a
|
||||
lda #'$'
|
||||
jsr print_a
|
||||
lda eth_driver_io_base+1
|
||||
jsr print_hex
|
||||
lda eth_driver_io_base
|
||||
jsr print_hex
|
||||
lda #')'
|
||||
jsr print_a
|
||||
|
||||
ldax #init_msg
|
||||
jsr print_ascii_as_native
|
||||
jsr print_ascii_as_native
|
||||
.endmacro
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ kipperterm2.o: kipperterm2.s $(INCFILES) ../inc/telnet.i ../inc/config_menu.i ..
|
||||
|
||||
kt2wiz.prg: kipperterm2.o $(IP65WIZNETLIB) $(C64WIZNETLIB) $(INCFILES) ../cfg/c64fullprg.cfg
|
||||
$(LD) -m kt2wiz.map -vm -C ../cfg/c64fullprg.cfg -o kt2wiz.prg $(AFLAGS) $< $(IP65WIZNETLIB) $(C64WIZNETLIB)
|
||||
# cp kt2wiz.prg ../../server/boot/autoexec.prg
|
||||
cp kt2wiz.prg ../../server/boot
|
||||
|
||||
|
||||
kipperterm2.d64: kipperterm2.prg kt2wiz.prg addresses.txt abe.bas
|
||||
|
@ -106,7 +106,16 @@ init:
|
||||
jsr print_ascii_as_native
|
||||
ldax #init_msg+1
|
||||
jsr print_ascii_as_native
|
||||
|
||||
ldax #eth_driver_name
|
||||
jsr print_ascii_as_native
|
||||
lda #' '
|
||||
jsr print_a
|
||||
lda eth_driver_io_base+1
|
||||
jsr print_hex
|
||||
lda eth_driver_io_base
|
||||
jsr print_hex
|
||||
lda #' '
|
||||
jsr print_a
|
||||
jsr ip65_init
|
||||
bcs init_failed
|
||||
jsr dhcp_init
|
||||
|
@ -1 +1 @@
|
||||
.byte "2011-01-29"
|
||||
.byte "2011-05-22"
|
||||
|
@ -53,6 +53,12 @@ basicstub:
|
||||
|
||||
init:
|
||||
|
||||
ldax #starting
|
||||
jsr print
|
||||
@loop:
|
||||
inc $d020
|
||||
jmp @loop
|
||||
|
||||
|
||||
ldax #$DE00
|
||||
jsr probe_for_w5100
|
||||
@ -402,6 +408,7 @@ get_next_byte:
|
||||
|
||||
|
||||
.rodata
|
||||
starting: .byte "STARTING",13,0
|
||||
ms: .byte " MS",13,0
|
||||
pinging: .byte "PINGING ",0
|
||||
connecting: .byte "CONNECTING ",0
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user