mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-08-20 17:29:45 +00:00
Allow all test programs to run on the VIC20:
- Added exit_to_basic symbol. - Aligned linker config with C64 linker config. - Made switch to lower charset compatible. Allow all test programs to run with LANceGS card. Aligned C64 input file name.
This commit is contained in:
parent
4a695f97cc
commit
79028c849b
@ -1,23 +1,28 @@
|
|||||||
#assumes a fully expanded VIC 20
|
# Memory configuration for the VIC20 with 32K RAM Cartridge
|
||||||
|
SYMBOLS {
|
||||||
|
__LOADADDR__: type = import;
|
||||||
|
__EXEHDR__: type = import;
|
||||||
|
}
|
||||||
MEMORY {
|
MEMORY {
|
||||||
ZP: start = $02, size = $1A, type = rw ;
|
ZP: start = $02, size = $1A;
|
||||||
IP65ZP: start = $5f, size = $10, type = rw;
|
IP65ZP: start = $5F, size = $10;
|
||||||
RAM: start = $11FF, size = $6e00, file = %O;
|
LOADADDR: start = $11FF, size = $02, file = %O;
|
||||||
|
HEADER: start = $1201, size = $0C, file = %O;
|
||||||
|
RAM: start = $120D, size = $6DF3, file = %O;
|
||||||
}
|
}
|
||||||
SEGMENTS {
|
SEGMENTS {
|
||||||
STARTUP: load = RAM, type = ro ,define = yes, optional=yes;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
CODE: load = RAM, type = ro,define = yes;
|
IP65ZP: load = IP65ZP, type = zp, optional = yes;
|
||||||
DATA: load = RAM, type = rw,define = yes;
|
LOADADDR: load = LOADADDR, type = ro;
|
||||||
SELF_MODIFIED_CODE: load = RAM, type = rw,define = yes, optional=yes;
|
EXEHDR: load = HEADER, type = ro;
|
||||||
VIC_DATA: load = RAM, type = rw,align = $800, optional=yes;
|
STARTUP: load = RAM, type = ro, define = yes;
|
||||||
RODATA: load = RAM, type = ro,define = yes, optional=yes;
|
CODE: load = RAM, type = ro;
|
||||||
IP65_DEFAULTS: load = RAM, type = rw,define = yes, optional=yes;
|
RODATA: load = RAM, type = ro, optional = yes;
|
||||||
BSS: load = RAM, type = bss, optional=yes;
|
DATA: load = RAM, type = rw;
|
||||||
# SAFE_BSS: load = RAM3000, type = bss, optional=yes;
|
SELF_MODIFIED_CODE: load = RAM, type = rw, optional = yes;
|
||||||
APP_SCRATCH: load = RAM, type = bss, optional=yes;
|
IP65_DEFAULTS: load = RAM, type = rw, optional = yes;
|
||||||
ZEROPAGE: load = ZP, type = zp, optional=yes;
|
BSS: load = RAM, type = bss;
|
||||||
IP65ZP: load = IP65ZP, type = zp, optional=yes;
|
APP_SCRATCH: load = RAM, type = bss, optional = yes;
|
||||||
TCP_VARS: load = RAM, type = bss, optional=yes;
|
TCP_VARS: load = RAM, type = bss, optional = yes;
|
||||||
HTTP_VARS: load = RAM, type = bss, optional=yes;
|
HTTP_VARS: load = RAM, type = bss, optional = yes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
AS=ca65
|
AS = ca65
|
||||||
LD=ld65
|
LD = ld65
|
||||||
AFLAGS=
|
AFLAGS =
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(CC) -c $(CFLAGS) $<
|
||||||
@ -8,34 +8,34 @@ AFLAGS=
|
|||||||
%.o: %.s
|
%.o: %.s
|
||||||
$(AS) $(AFLAGS) $<
|
$(AS) $(AFLAGS) $<
|
||||||
|
|
||||||
# a2uther.lib : Apple //, with an Uthernet card (cs8900a chipset) in slot #3
|
|
||||||
# a2lancegs.lib : Apple //, with a LANceGS card (lan91c96)
|
|
||||||
# c64rrnet.lib : C64 with RR-NET or clone at $de0x
|
# c64rrnet.lib : C64 with RR-NET or clone at $de0x
|
||||||
# c64wiznet.lib : C64 with Wiznet W5100 addressed at $df2x
|
# c64wiznet.lib : C64 with Wiznet W5100 addressed at $df2x
|
||||||
# vic20rrnet.lib : C64 with RR-NET or clone at $980x
|
# a2uther.lib : Apple ][ with Uthernet in slot #3
|
||||||
|
# a2lancegs.lib : Apple ][ with LANceGS
|
||||||
|
# vic20rrnet.lib : VIC20 with RR-NET or clone at $980x
|
||||||
|
|
||||||
DRIVERS=\
|
DRIVERS=\
|
||||||
a2uther.lib \
|
|
||||||
a2lancegs.lib \
|
|
||||||
c64rrnet.lib \
|
c64rrnet.lib \
|
||||||
c64wiznet.lib \
|
c64wiznet.lib \
|
||||||
|
a2uther.lib \
|
||||||
|
a2lancegs.lib \
|
||||||
vic20rrnet.lib
|
vic20rrnet.lib
|
||||||
|
|
||||||
all: $(DRIVERS)
|
all: $(DRIVERS)
|
||||||
|
|
||||||
a2lancegs.lib: a2print.o lan91c96.o a2timer.o a2kernal.o a2input.o a2charconv.o a2_zero_page.o
|
c64rrnet.lib: rr-net.o cs8900a.o c64print.o c64timer.o c64kernal.o c64input.o petscii_charconv.o generic_zero_page.o
|
||||||
ar65 a $@ $^
|
ar65 a $@ $^
|
||||||
|
|
||||||
a2uther.lib: a2print.o uthernet.o a2timer.o a2kernal.o a2input.o a2charconv.o cs8900a.o a2_zero_page.o
|
c64wiznet.lib: w5100.o c64print.o c64timer.o c64kernal.o c64input.o petscii_charconv.o generic_zero_page.o
|
||||||
ar65 a $@ $^
|
ar65 a $@ $^
|
||||||
|
|
||||||
c64rrnet.lib: c64print.o rr-net.o c64timer.o c64kernal.o c64inputs.o petscii_charconv.o cs8900a.o generic_zero_page.o
|
a2lancegs.lib: lan91c96.o a2print.o a2timer.o a2kernal.o a2input.o a2charconv.o a2_zero_page.o
|
||||||
ar65 a $@ $^
|
ar65 a $@ $^
|
||||||
|
|
||||||
c64wiznet.lib: w5100.o c64print.o c64timer.o c64kernal.o c64inputs.o petscii_charconv.o generic_zero_page.o
|
a2uther.lib: uthernet.o cs8900a.o a2print.o a2timer.o a2kernal.o a2input.o a2charconv.o a2_zero_page.o
|
||||||
ar65 a $@ $^
|
ar65 a $@ $^
|
||||||
|
|
||||||
vic20rrnet.lib: vic20print.o vic20-rr-net.o vic20timer.o vic20input.o petscii_charconv.o cs8900a.o generic_zero_page.o
|
vic20rrnet.lib: vic20-rr-net.o cs8900a.o vic20print.o vic20timer.o vic20kernal.o vic20input.o petscii_charconv.o generic_zero_page.o
|
||||||
ar65 a $@ $^
|
ar65 a $@ $^
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -179,7 +179,7 @@ GOTINPUT: .res 40
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
; -- LICENSE FOR c64inputs.s --
|
; -- LICENSE FOR c64input.s --
|
||||||
; The contents of this file are subject to the Mozilla Public License
|
; 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
|
; 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
|
; compliance with the License. You may obtain a copy of the License at
|
29
drivers/vic20kernal.s
Normal file
29
drivers/vic20kernal.s
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
.export exit_to_basic
|
||||||
|
|
||||||
|
|
||||||
|
.code
|
||||||
|
|
||||||
|
; jump to BASIC interpreter loop
|
||||||
|
exit_to_basic:
|
||||||
|
jmp $c7ae
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; -- LICENSE FOR vic20kernal.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,19 +1,31 @@
|
|||||||
CC=cl65
|
# Build for Cirrus Logic CS8900A based devices:
|
||||||
AS=ca65
|
# make
|
||||||
LD=ld65
|
|
||||||
CFLAGS=-Oirs -t $(TARGET)
|
|
||||||
AFLAGS=
|
|
||||||
|
|
||||||
IP65LIB=../ip65/ip65.lib
|
# Build for Standard Microsystems LAN91C96 based devices:
|
||||||
IP65TCPLIB=../ip65/ip65_tcp.lib
|
# make eth=sm
|
||||||
C64RRNETLIB=../drivers/c64rrnet.lib
|
|
||||||
C64WIZNETLIB=../drivers/c64wiznet.lib
|
|
||||||
IP65WIZNETLIB=../ip65/ip65_wiznet.lib
|
|
||||||
A2UTHERLIB=../drivers/a2uther.lib
|
|
||||||
A2LANCEGSLIB=../drivers/a2lancegs.lib
|
|
||||||
VIC20RRNETLIB=../drivers/vic20rrnet.lib
|
|
||||||
|
|
||||||
INCFILES=\
|
# Build for WIZnet W5100 based devices:
|
||||||
|
# make eth=wn
|
||||||
|
|
||||||
|
CC = cl65
|
||||||
|
AS = ca65
|
||||||
|
LD = ld65
|
||||||
|
CFLAGS = -Oirs -t $(TARGET)
|
||||||
|
AFLAGS =
|
||||||
|
|
||||||
|
ifeq ($(eth),sm)
|
||||||
|
A2DRIVERLIB = ../drivers/a2lancegs.lib
|
||||||
|
else ifeq ($(eth),wn)
|
||||||
|
else
|
||||||
|
C64DRIVERLIB = ../drivers/c64rrnet.lib
|
||||||
|
A2DRIVERLIB = ../drivers/a2uther.lib
|
||||||
|
VICDRIVERLIB = ../drivers/vic20rrnet.lib
|
||||||
|
endif
|
||||||
|
|
||||||
|
IP65LIB = ../ip65/ip65.lib
|
||||||
|
IP65TCPLIB = ../ip65/ip65_tcp.lib
|
||||||
|
|
||||||
|
INCFILES = \
|
||||||
../inc/common.i\
|
../inc/common.i\
|
||||||
../inc/commonprint.i\
|
../inc/commonprint.i\
|
||||||
../inc/net.i\
|
../inc/net.i\
|
||||||
@ -32,9 +44,7 @@ prg: \
|
|||||||
ping_tcp.prg \
|
ping_tcp.prg \
|
||||||
sntp.prg \
|
sntp.prg \
|
||||||
tcp_tcp.prg \
|
tcp_tcp.prg \
|
||||||
tftp.prg \
|
tftp.prg
|
||||||
# vic20.prg \
|
|
||||||
wiznet.prg
|
|
||||||
|
|
||||||
bin: \
|
bin: \
|
||||||
ip65 \
|
ip65 \
|
||||||
@ -50,6 +60,20 @@ bin: \
|
|||||||
tcp_tcp.bin \
|
tcp_tcp.bin \
|
||||||
tftp.bin
|
tftp.bin
|
||||||
|
|
||||||
|
vicprg: \
|
||||||
|
ip65 \
|
||||||
|
drivers \
|
||||||
|
cifs_tcp.vicprg \
|
||||||
|
dns.vicprg \
|
||||||
|
dottedquad.vicprg \
|
||||||
|
geturl_tcp.vicprg \
|
||||||
|
parsequerystring.vicprg \
|
||||||
|
parser_tcp.vicprg \
|
||||||
|
ping_tcp.vicprg \
|
||||||
|
sntp.vicprg \
|
||||||
|
tcp_tcp.vicprg \
|
||||||
|
tftp.vicprg
|
||||||
|
|
||||||
ip65:
|
ip65:
|
||||||
make -C ../ip65 all
|
make -C ../ip65 all
|
||||||
|
|
||||||
@ -63,17 +87,23 @@ dsk: ip65.dsk
|
|||||||
%.o: %.s
|
%.o: %.s
|
||||||
$(AS) $(AFLAGS) $<
|
$(AS) $(AFLAGS) $<
|
||||||
|
|
||||||
%.prg: %.o $(IP65LIB) $(C64RRNETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
%.prg: %.o $(IP65LIB) $(C64DRIVERLIB) $(INCFILES) ../cfg/c64prg.cfg
|
||||||
$(LD) -o $*.prg -C ../cfg/c64prg.cfg -m $*.c64.map -vm $< $(IP65LIB) $(C64RRNETLIB) c64.lib
|
$(LD) -o $*.prg -C ../cfg/c64prg.cfg -m $*.c64.map -vm $< $(IP65LIB) $(C64DRIVERLIB) c64.lib
|
||||||
|
|
||||||
%_tcp.prg: %.o $(IP65TCPLIB) $(C64RRNETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
%_tcp.prg: %.o $(IP65TCPLIB) $(C64DRIVERLIB) $(INCFILES) ../cfg/c64prg.cfg
|
||||||
$(LD) -o $(subst _tcp,,$*).prg -C ../cfg/c64prg.cfg -m $(subst _tcp,,$*).c64.map -vm $< $(IP65TCPLIB) $(C64RRNETLIB) c64.lib
|
$(LD) -o $(subst _tcp,,$*).prg -C ../cfg/c64prg.cfg -m $(subst _tcp,,$*).c64.map -vm $< $(IP65TCPLIB) $(C64DRIVERLIB) c64.lib
|
||||||
|
|
||||||
%.bin: %.o $(IP65LIB) $(A2UTHERLIB) $(INCFILES) ../cfg/a2bin.cfg
|
%.bin: %.o $(IP65LIB) $(A2DRIVERLIB) $(INCFILES) ../cfg/a2bin.cfg
|
||||||
$(LD) -o $*.bin -C ../cfg/a2bin.cfg -m $*.a2.map -vm $< $(IP65LIB) $(A2UTHERLIB) apple2.lib
|
$(LD) -o $*.bin -C ../cfg/a2bin.cfg -m $*.a2.map -vm $< $(IP65LIB) $(A2DRIVERLIB) apple2.lib
|
||||||
|
|
||||||
%_tcp.bin: %.o $(IP65TCPLIB) $(A2UTHERLIB) $(INCFILES) ../cfg/a2bin.cfg
|
%_tcp.bin: %.o $(IP65TCPLIB) $(A2DRIVERLIB) $(INCFILES) ../cfg/a2bin.cfg
|
||||||
$(LD) -o $(subst _tcp,,$*).bin -C ../cfg/a2bin.cfg -m $(subst _tcp,,$*).a2.map -vm $< $(IP65TCPLIB) $(A2UTHERLIB) apple2.lib
|
$(LD) -o $(subst _tcp,,$*).bin -C ../cfg/a2bin.cfg -m $(subst _tcp,,$*).a2.map -vm $< $(IP65TCPLIB) $(A2DRIVERLIB) apple2.lib
|
||||||
|
|
||||||
|
%.vicprg: %.o $(IP65LIB) $(VICDRIVERLIB) $(INCFILES) ../cfg/vic20prg.cfg
|
||||||
|
$(LD) -o $*.vicprg -C ../cfg/vic20prg.cfg -m $*.vic.map -vm $< $(IP65LIB) $(VICDRIVERLIB) vic20.lib
|
||||||
|
|
||||||
|
%_tcp.vicprg: %.o $(IP65TCPLIB) $(VICDRIVERLIB) $(INCFILES) ../cfg/vic20prg.cfg
|
||||||
|
$(LD) -o $(subst _tcp,,$*).vicprg -C ../cfg/vic20prg.cfg -m $(subst _tcp,,$*).vic.map -vm $< $(IP65TCPLIB) $(VICDRIVERLIB) vic20.lib
|
||||||
|
|
||||||
ip65.d64: prg
|
ip65.d64: prg
|
||||||
$(C1541) -format ip65,00 d64 $@
|
$(C1541) -format ip65,00 d64 $@
|
||||||
@ -98,7 +128,7 @@ ip65.dsk: bin
|
|||||||
java -jar $(AC) -cc65 $@ tftp bin 0 < tftp.bin
|
java -jar $(AC) -cc65 $@ tftp bin 0 < tftp.bin
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f *.o *.bin *.prg *.map
|
-rm -f *.o *.prg *.bin *.vicprg *.map
|
||||||
-rm -f ip65.d64 ip65.dsk
|
-rm -f ip65.d64 ip65.dsk
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
@ -12,8 +12,10 @@
|
|||||||
|
|
||||||
.segment "STARTUP"
|
.segment "STARTUP"
|
||||||
|
|
||||||
lda #$0E ; change to lower case
|
; switch to lower case charset
|
||||||
|
lda #14
|
||||||
jsr print_a
|
jsr print_a
|
||||||
|
|
||||||
jsr print_cr
|
jsr print_cr
|
||||||
init_ip_via_dhcp
|
init_ip_via_dhcp
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
.segment "STARTUP"
|
.segment "STARTUP"
|
||||||
|
|
||||||
; switch to lower case charset
|
; switch to lower case charset
|
||||||
lda #23
|
lda #14
|
||||||
sta $d018
|
jsr print_a
|
||||||
|
|
||||||
jsr print_cr
|
jsr print_cr
|
||||||
jsr print_ip_config
|
jsr print_ip_config
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
.segment "STARTUP"
|
.segment "STARTUP"
|
||||||
|
|
||||||
; switch to lower case charset
|
; switch to lower case charset
|
||||||
lda #23
|
lda #14
|
||||||
sta $d018
|
jsr print_a
|
||||||
|
|
||||||
jsr print_cr
|
jsr print_cr
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ temp_buff = copy_dest
|
|||||||
.segment "STARTUP"
|
.segment "STARTUP"
|
||||||
|
|
||||||
; switch to lower case charset
|
; switch to lower case charset
|
||||||
lda #23
|
lda #14
|
||||||
sta $d018
|
jsr print_a
|
||||||
|
|
||||||
init_ip_via_dhcp
|
init_ip_via_dhcp
|
||||||
jsr print_ip_config
|
jsr print_ip_config
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
.segment "STARTUP"
|
.segment "STARTUP"
|
||||||
|
|
||||||
; switch to lower case charset
|
; switch to lower case charset
|
||||||
lda #23
|
lda #14
|
||||||
sta $d018
|
jsr print_a
|
||||||
|
|
||||||
ldax #query_1
|
ldax #query_1
|
||||||
jsr test_querystring
|
jsr test_querystring
|
||||||
|
@ -22,8 +22,8 @@ temp_buff = copy_dest
|
|||||||
.segment "STARTUP"
|
.segment "STARTUP"
|
||||||
|
|
||||||
; switch to lower case charset
|
; switch to lower case charset
|
||||||
lda #23
|
lda #14
|
||||||
sta $d018
|
jsr print_a
|
||||||
|
|
||||||
init_ip_via_dhcp
|
init_ip_via_dhcp
|
||||||
jsr print_ip_config
|
jsr print_ip_config
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
.segment "STARTUP"
|
.segment "STARTUP"
|
||||||
|
|
||||||
; switch to lower case charset
|
; switch to lower case charset
|
||||||
lda #23
|
lda #14
|
||||||
sta $d018
|
jsr print_a
|
||||||
|
|
||||||
jsr print_cr
|
jsr print_cr
|
||||||
init_ip_via_dhcp
|
init_ip_via_dhcp
|
||||||
|
@ -37,8 +37,8 @@
|
|||||||
.segment "STARTUP"
|
.segment "STARTUP"
|
||||||
|
|
||||||
; switch to lower case charset
|
; switch to lower case charset
|
||||||
lda #23
|
lda #14
|
||||||
sta $d018
|
jsr print_a
|
||||||
|
|
||||||
ldax #$1234
|
ldax #$1234
|
||||||
stax acc16
|
stax acc16
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
.segment "STARTUP"
|
.segment "STARTUP"
|
||||||
|
|
||||||
; switch to lower case charset
|
; switch to lower case charset
|
||||||
lda #23
|
lda #14
|
||||||
sta $d018
|
jsr print_a
|
||||||
|
|
||||||
jsr print_cr
|
jsr print_cr
|
||||||
init_ip_via_dhcp
|
init_ip_via_dhcp
|
||||||
|
Loading…
Reference in New Issue
Block a user