mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-07-26 06:28:58 +00:00
added support for VIC 20 / RR-NET
git-svn-id: http://svn.code.sf.net/p/netboot65/code@301 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
4137648a56
commit
1f47cd7faa
Binary file not shown.
Binary file not shown.
23
client/cfg/vic20prg.cfg
Normal file
23
client/cfg/vic20prg.cfg
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#assumes a fully expanded VIC 20
|
||||||
|
MEMORY {
|
||||||
|
ZP: start = $02, size = $1A, type = rw ;
|
||||||
|
IP65ZP: start = $5f, size = $10, type = rw;
|
||||||
|
RAM: start = $11FF, size = $6e00, file = %O;
|
||||||
|
}
|
||||||
|
SEGMENTS {
|
||||||
|
STARTUP: load = RAM, type = ro ,define = yes, optional=yes;
|
||||||
|
CODE: load = RAM, type = ro,define = yes;
|
||||||
|
DATA: load = RAM, type = rw,define = yes;
|
||||||
|
SELF_MODIFIED_CODE: load = RAM, type = rw,define = yes, optional=yes;
|
||||||
|
VIC_DATA: load = RAM, type = rw,align = $800, optional=yes;
|
||||||
|
RODATA: load = RAM, type = ro,define = yes, optional=yes;
|
||||||
|
IP65_DEFAULTS: load = RAM, type = rw,define = yes, optional=yes;
|
||||||
|
BSS: load = RAM, type = bss, optional=yes;
|
||||||
|
# SAFE_BSS: load = RAM3000, type = bss, optional=yes;
|
||||||
|
APP_SCRATCH: load = RAM, type = bss, optional=yes;
|
||||||
|
ZEROPAGE: load = ZP, type = zp, optional=yes;
|
||||||
|
IP65ZP: load = IP65ZP, type = zp, optional=yes;
|
||||||
|
TCP_VARS: load = RAM, type = bss, optional=yes;
|
||||||
|
HTTP_VARS: load = RAM, type = bss, optional=yes;
|
||||||
|
|
||||||
|
}
|
@ -15,6 +15,7 @@ DRIVERS=\
|
|||||||
apple2prog.lib \
|
apple2prog.lib \
|
||||||
c64rrnet.lib \
|
c64rrnet.lib \
|
||||||
c64wiznet.lib \
|
c64wiznet.lib \
|
||||||
|
vic20rrnet.lib \
|
||||||
|
|
||||||
|
|
||||||
all: $(DRIVERS)
|
all: $(DRIVERS)
|
||||||
@ -29,6 +30,9 @@ c64rrnet.lib: c64print.o rr-net.o c64timer.o c64kernal.o c64inputs.o c64_disk_ac
|
|||||||
c64wiznet.lib: w5100.o c64print.o c64timer.o c64kernal.o c64inputs.o c64_disk_access.o c64charconv.o c64_vt100.o
|
c64wiznet.lib: w5100.o c64print.o c64timer.o c64kernal.o c64inputs.o c64_disk_access.o c64charconv.o c64_vt100.o
|
||||||
ar65 a $@ $^
|
ar65 a $@ $^
|
||||||
|
|
||||||
|
vic20rrnet.lib: c64print.o vic20-rr-net.o vic20timer.o c64kernal.o c64inputs.o c64_disk_access.o c64charconv.o cs8900a.o
|
||||||
|
ar65 a $@ $^
|
||||||
|
|
||||||
|
|
||||||
# ar65 a $@ $^
|
# ar65 a $@ $^
|
||||||
|
|
||||||
|
@ -157,6 +157,7 @@ io_read_file_with_callback:
|
|||||||
jsr set_drive_id
|
jsr set_drive_id
|
||||||
lda #$02 ; file number 2
|
lda #$02 ; file number 2
|
||||||
ldx drive_id
|
ldx drive_id
|
||||||
|
|
||||||
ldy #02 ; secondary address 2
|
ldy #02 ; secondary address 2
|
||||||
jsr SETLFS
|
jsr SETLFS
|
||||||
jsr OPEN
|
jsr OPEN
|
||||||
|
56
client/drivers/vic20-rr-net.s
Normal file
56
client/drivers/vic20-rr-net.s
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
; RR-Net driver, as seen on a VIC-20 (i.e. using a MasC=uerade adapter)
|
||||||
|
|
||||||
|
|
||||||
|
.export cs_init
|
||||||
|
|
||||||
|
.export cs_packet_page
|
||||||
|
.export cs_packet_data
|
||||||
|
.export cs_rxtx_data
|
||||||
|
.export cs_tx_cmd
|
||||||
|
.export cs_tx_len
|
||||||
|
.export eth_driver_name
|
||||||
|
|
||||||
|
|
||||||
|
rr_ctl = $9801 ;address of 'control' port on Retro-Replay
|
||||||
|
cs_packet_page = $9802 ;address of 'packet page' port on RR-Net
|
||||||
|
cs_packet_data = $9804;address of 'packet data' port on RR-Net
|
||||||
|
cs_rxtx_data = $9808 ;address of 'recieve/transmit data' port on RR-Net
|
||||||
|
cs_tx_cmd = $980c;address of 'transmit command' port on RR-Net
|
||||||
|
cs_tx_len = $980e;address of 'transmission length' port on RR-Net
|
||||||
|
|
||||||
|
|
||||||
|
.code
|
||||||
|
|
||||||
|
;initialise Retro Replay so we can access the network adapter
|
||||||
|
;inputs: none
|
||||||
|
;outputs: none
|
||||||
|
cs_init:
|
||||||
|
lda rr_ctl
|
||||||
|
ora #1
|
||||||
|
sta rr_ctl
|
||||||
|
rts
|
||||||
|
|
||||||
|
.rodata
|
||||||
|
eth_driver_name:
|
||||||
|
.asciiz "VIC20 RR-NET"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;-- LICENSE FOR vic20-rr-net.s --
|
||||||
|
; 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
|
||||||
|
; http://www.mozilla.org/MPL/
|
||||||
|
;
|
||||||
|
; Software distributed under the License is distributed on an "AS IS"
|
||||||
|
; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
; License for the specific language governing rights and limitations
|
||||||
|
; under the License.
|
||||||
|
;
|
||||||
|
; The Original Code is ip65.
|
||||||
|
;
|
||||||
|
; The Initial Developer of the Original Code is Jonno Downes,
|
||||||
|
; jonno@jamtronix.com.
|
||||||
|
; Portions created by the Initial Developer are Copyright (C) 2009
|
||||||
|
; Jonno Downes. All Rights Reserved.
|
||||||
|
; -- LICENSE END --
|
81
client/drivers/vic20timer.s
Normal file
81
client/drivers/vic20timer.s
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
; timer routines
|
||||||
|
;
|
||||||
|
; the timer should be a 16-bit counter that's incremented by about
|
||||||
|
; 1000 units per second. it doesn't have to be particularly accurate.
|
||||||
|
; this VIC20 implementation requires the routine timer_vbl_handler be called 60 times per second
|
||||||
|
|
||||||
|
.include "../inc/common.i"
|
||||||
|
|
||||||
|
|
||||||
|
.export timer_init
|
||||||
|
.export timer_read
|
||||||
|
|
||||||
|
IRQ_VECTOR=$314
|
||||||
|
|
||||||
|
.bss
|
||||||
|
current_time_value: .res 2
|
||||||
|
|
||||||
|
.data
|
||||||
|
jmp_old_handler:
|
||||||
|
.byte $4c ;JMP
|
||||||
|
old_handler:
|
||||||
|
.word $00
|
||||||
|
|
||||||
|
.code
|
||||||
|
|
||||||
|
;reset timer to 0
|
||||||
|
;inputs: none
|
||||||
|
;outputs: none
|
||||||
|
timer_init:
|
||||||
|
lda old_handler
|
||||||
|
bne @handler_installed
|
||||||
|
ldax IRQ_VECTOR
|
||||||
|
stax old_handler
|
||||||
|
ldax #timer_vbl_handler
|
||||||
|
stax IRQ_VECTOR
|
||||||
|
@handler_installed:
|
||||||
|
ldax #0
|
||||||
|
stax current_time_value
|
||||||
|
rts
|
||||||
|
|
||||||
|
;read the current timer value
|
||||||
|
; inputs: none
|
||||||
|
; outputs: AX = current timer value (roughly equal to number of milliseconds since the last call to 'timer_init')
|
||||||
|
timer_read:
|
||||||
|
ldax current_time_value
|
||||||
|
rts
|
||||||
|
|
||||||
|
; tick over the current timer value - should be called 60 times per second
|
||||||
|
; inputs: none
|
||||||
|
; outputs: none (all registers preserved, by carry flag can be modified)
|
||||||
|
timer_vbl_handler:
|
||||||
|
pha
|
||||||
|
lda #$11 ; 60 HZ =~ 17 ms per 'tick'
|
||||||
|
:
|
||||||
|
adc current_time_value
|
||||||
|
sta current_time_value
|
||||||
|
bcc :+
|
||||||
|
inc current_time_value+1
|
||||||
|
:
|
||||||
|
pla
|
||||||
|
jmp jmp_old_handler
|
||||||
|
|
||||||
|
|
||||||
|
;-- LICENSE FOR c64timer_nb65.s --
|
||||||
|
; 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
|
||||||
|
; http://www.mozilla.org/MPL/
|
||||||
|
;
|
||||||
|
; Software distributed under the License is distributed on an "AS IS"
|
||||||
|
; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
; License for the specific language governing rights and limitations
|
||||||
|
; under the License.
|
||||||
|
;
|
||||||
|
; The Original Code is ip65.
|
||||||
|
;
|
||||||
|
; The Initial Developer of the Original Code is Jonno Downes,
|
||||||
|
; jonno@jamtronix.com.
|
||||||
|
; Portions created by the Initial Developer are Copyright (C) 2009
|
||||||
|
; Jonno Downes. All Rights Reserved.
|
||||||
|
; -- LICENSE END --
|
@ -1,3 +1,8 @@
|
|||||||
|
.ifndef SCREEN_WIDTH
|
||||||
|
SCREEN_WIDTH = 40
|
||||||
|
.endif
|
||||||
|
|
||||||
|
|
||||||
.ifndef KPR_API_VERSION_NUMBER
|
.ifndef KPR_API_VERSION_NUMBER
|
||||||
.define EQU =
|
.define EQU =
|
||||||
.include "../inc/kipper_constants.i"
|
.include "../inc/kipper_constants.i"
|
||||||
@ -316,6 +321,8 @@ print_errorcode:
|
|||||||
hexdigits:
|
hexdigits:
|
||||||
.byte "0123456789ABCDEF"
|
.byte "0123456789ABCDEF"
|
||||||
|
|
||||||
|
.if SCREEN_WIDTH >=30
|
||||||
|
|
||||||
interface_type:
|
interface_type:
|
||||||
.byte "Interface : ",0
|
.byte "Interface : ",0
|
||||||
|
|
||||||
@ -339,6 +346,25 @@ dhcp_server_msg:
|
|||||||
|
|
||||||
tftp_server_msg:
|
tftp_server_msg:
|
||||||
.byte "TFTP Server : ", 0
|
.byte "TFTP Server : ", 0
|
||||||
|
.else ;for small width screens e.g. VIC 20
|
||||||
|
interface_type:
|
||||||
|
.byte "Interface",10,0
|
||||||
|
mac_address_msg:
|
||||||
|
.byte "MAC Address",10,0
|
||||||
|
ip_address_msg:
|
||||||
|
.byte "IP Address",10,0
|
||||||
|
netmask_msg:
|
||||||
|
.byte "Netmask",10,0
|
||||||
|
gateway_msg:
|
||||||
|
.byte "Gateway",10,0
|
||||||
|
dns_server_msg:
|
||||||
|
.byte "DNS Server",10,0
|
||||||
|
dhcp_server_msg:
|
||||||
|
.byte "DHCP Server",10,0
|
||||||
|
tftp_server_msg:
|
||||||
|
.byte "TFTP Server",10,0
|
||||||
|
|
||||||
|
.endif
|
||||||
|
|
||||||
dhcp_msg:
|
dhcp_msg:
|
||||||
.byte "DHCP",0
|
.byte "DHCP",0
|
||||||
|
@ -102,9 +102,6 @@ init:
|
|||||||
sta $01 ;turn off BASIC
|
sta $01 ;turn off BASIC
|
||||||
jsr setup_screen
|
jsr setup_screen
|
||||||
|
|
||||||
lda $ba
|
|
||||||
sta cfg_default_drive
|
|
||||||
|
|
||||||
ldax #menu_header_msg
|
ldax #menu_header_msg
|
||||||
jsr print_ascii_as_native
|
jsr print_ascii_as_native
|
||||||
ldax #init_msg+1
|
ldax #init_msg+1
|
||||||
@ -132,6 +129,9 @@ print_main_menu:
|
|||||||
|
|
||||||
init_ok:
|
init_ok:
|
||||||
|
|
||||||
|
lda $ba
|
||||||
|
sta cfg_default_drive
|
||||||
|
|
||||||
main_menu:
|
main_menu:
|
||||||
jsr print_main_menu
|
jsr print_main_menu
|
||||||
jsr print_ip_config
|
jsr print_ip_config
|
||||||
|
@ -12,6 +12,7 @@ C64RRNETLIB=../drivers/c64rrnet.lib
|
|||||||
C64WIZNETLIB=../drivers/c64wiznet.lib
|
C64WIZNETLIB=../drivers/c64wiznet.lib
|
||||||
IP65WIZNETLIB=../ip65/ip65_wiznet.lib
|
IP65WIZNETLIB=../ip65/ip65_wiznet.lib
|
||||||
APPLE2PROGLIB=../drivers/apple2prog.lib
|
APPLE2PROGLIB=../drivers/apple2prog.lib
|
||||||
|
VIC20RRNETLIB=../drivers/vic20rrnet.lib
|
||||||
|
|
||||||
INCFILES=\
|
INCFILES=\
|
||||||
../inc/common.i\
|
../inc/common.i\
|
||||||
@ -34,7 +35,7 @@ all: \
|
|||||||
testdottedquad.prg \
|
testdottedquad.prg \
|
||||||
test_tcp.prg \
|
test_tcp.prg \
|
||||||
test_xmodem.prg \
|
test_xmodem.prg \
|
||||||
# test_xmodem.d64 \
|
test_vic20.prg \
|
||||||
test_httpd.prg \
|
test_httpd.prg \
|
||||||
test_parser.prg \
|
test_parser.prg \
|
||||||
test_ping.prg \
|
test_ping.prg \
|
||||||
@ -42,6 +43,7 @@ all: \
|
|||||||
test_get_url.prg \
|
test_get_url.prg \
|
||||||
test_wiznet.prg \
|
test_wiznet.prg \
|
||||||
test_parse_querystring.prg \
|
test_parse_querystring.prg \
|
||||||
|
# test_xmodem.d64 \
|
||||||
# httpd_test.d64 \
|
# httpd_test.d64 \
|
||||||
# ip65test.dsk \
|
# ip65test.dsk \
|
||||||
# test_disk_io.d64 \
|
# test_disk_io.d64 \
|
||||||
@ -53,9 +55,6 @@ ip65:
|
|||||||
drivers:
|
drivers:
|
||||||
make -C ../drivers all
|
make -C ../drivers all
|
||||||
|
|
||||||
%.o: %.c
|
|
||||||
$(CC) -c $(CFLAGS) $<
|
|
||||||
|
|
||||||
%.o: %.s
|
%.o: %.s
|
||||||
$(AS) $(AFLAGS) $<
|
$(AS) $(AFLAGS) $<
|
||||||
|
|
||||||
@ -64,7 +63,6 @@ drivers:
|
|||||||
$(LD) -m $*.map -vm -C ../cfg/c64prg.cfg -o $*.prg $(AFLAGS) $< $(IP65LIB) $(C64RRNETLIB)
|
$(LD) -m $*.map -vm -C ../cfg/c64prg.cfg -o $*.prg $(AFLAGS) $< $(IP65LIB) $(C64RRNETLIB)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
test_tcp.prg: test_tcp.o $(IP65TCPLIB) $(C64RRNETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
test_tcp.prg: test_tcp.o $(IP65TCPLIB) $(C64RRNETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
||||||
$(LD) -m test_tcp.map -vm -C ../cfg/c64prg.cfg -o test_tcp.prg $(AFLAGS) $< $(IP65TCPLIB) $(C64RRNETLIB)
|
$(LD) -m test_tcp.map -vm -C ../cfg/c64prg.cfg -o test_tcp.prg $(AFLAGS) $< $(IP65TCPLIB) $(C64RRNETLIB)
|
||||||
|
|
||||||
@ -94,6 +92,8 @@ test_wiznet.prg: test_wiznet.o $(C64WIZNETLIB) $(IP65WIZNETLIB) $(INCFILES) ../c
|
|||||||
test_cifs.prg: test_cifs.o $(IP65TCPLIB) $(C64RRNETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
test_cifs.prg: test_cifs.o $(IP65TCPLIB) $(C64RRNETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
||||||
$(LD) -m test_cifs.map -vm -C ../cfg/c64prg.cfg -o test_cifs.prg $(AFLAGS) $< $(IP65TCPLIB) $(C64RRNETLIB)
|
$(LD) -m test_cifs.map -vm -C ../cfg/c64prg.cfg -o test_cifs.prg $(AFLAGS) $< $(IP65TCPLIB) $(C64RRNETLIB)
|
||||||
|
|
||||||
|
test_vic20.prg: test_vic20.o $(IP65TCPLIB) $(VIC20RRNETLIB) $(INCFILES) ../cfg/vic20prg.cfg
|
||||||
|
$(LD) -m test_vic20.map -vm -C ../cfg/vic20prg.cfg -o test_vic20.prg $(AFLAGS) $< $(IP65TCPLIB) $(VIC20RRNETLIB)
|
||||||
|
|
||||||
%.pg2: %.o $(IP65LIB) $(APPLE2PROGLIB) $(INCFILES) ../cfg/a2bin.cfg
|
%.pg2: %.o $(IP65LIB) $(APPLE2PROGLIB) $(INCFILES) ../cfg/a2bin.cfg
|
||||||
$(LD) -C ../cfg/a2bin.cfg -o $*.pg2 $(AFLAGS) $< $(IP65LIB) $(APPLE2PROGLIB)
|
$(LD) -C ../cfg/a2bin.cfg -o $*.pg2 $(AFLAGS) $< $(IP65LIB) $(APPLE2PROGLIB)
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user