mirror of
https://github.com/bobbimanners/emailler.git
synced 2025-01-06 08:31:19 +00:00
git-svn-id: http://svn.code.sf.net/p/netboot65/code@96 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
3d1ef900d8
commit
4da77b54bf
@ -1,4 +1,3 @@
|
|||||||
CC=cl65
|
|
||||||
AS=ca65
|
AS=ca65
|
||||||
LD=ld65
|
LD=ld65
|
||||||
CFLAGS=-Oirs -t $(TARGET)
|
CFLAGS=-Oirs -t $(TARGET)
|
||||||
@ -11,11 +10,6 @@ INCFILES=\
|
|||||||
../inc/menu.i\
|
../inc/menu.i\
|
||||||
../inc/nb65_constants.i\
|
../inc/nb65_constants.i\
|
||||||
|
|
||||||
%.o: %.c
|
|
||||||
$(CC) -c $(CFLAGS) $<
|
|
||||||
|
|
||||||
%.o: %.s $(INCFILES)
|
|
||||||
$(AS) $(AFLAGS) $<
|
|
||||||
|
|
||||||
IP65LIB=../ip65/ip65.lib
|
IP65LIB=../ip65/ip65.lib
|
||||||
|
|
||||||
@ -23,17 +17,30 @@ C64NETLIB=../drivers/c64net.lib
|
|||||||
APPLE2NETLIB=../drivers/apple2net.lib
|
APPLE2NETLIB=../drivers/apple2net.lib
|
||||||
|
|
||||||
BOOTA2.PG2=../../server/boot/BOOTA2.PG2
|
BOOTA2.PG2=../../server/boot/BOOTA2.PG2
|
||||||
|
|
||||||
|
|
||||||
all: \
|
all: \
|
||||||
rrnetboot.bin \
|
rrnetboot.bin \
|
||||||
utherboot.dsk \
|
utherboot.dsk \
|
||||||
|
64nicboot.bin \
|
||||||
$(BOOTA2.PG2) \
|
$(BOOTA2.PG2) \
|
||||||
|
|
||||||
|
rrnetboot.o: rrnetboot.s $(INCFILES)
|
||||||
|
$(AS) -DBANKSWITCH_SUPPORT=2 $(AFLAGS) $<
|
||||||
|
|
||||||
|
64nicboot.o: rrnetboot.s $(INCFILES)
|
||||||
|
$(AS) -DBANKSWITCH_SUPPORT=1 $(AFLAGS) -o 64nicboot.o $<
|
||||||
|
|
||||||
|
%.o: %.s $(INCFILES)
|
||||||
|
$(AS) $(AFLAGS) $<
|
||||||
|
|
||||||
rrnetboot.bin: rrnetboot.o $(IP65LIB) $(C64NETLIB) $(INCFILES) ../cfg/rrbin.cfg
|
rrnetboot.bin: rrnetboot.o $(IP65LIB) $(C64NETLIB) $(INCFILES) ../cfg/rrbin.cfg
|
||||||
$(LD) -m rrnetboot.map -vm -C ../cfg/rrbin.cfg -o rrnetboot.bin $< $(IP65LIB) $(C64NETLIB)
|
$(LD) -m rrnetboot.map -vm -C ../cfg/rrbin.cfg -o rrnetboot.bin $< $(IP65LIB) $(C64NETLIB)
|
||||||
ruby fix_cart.rb rrnetboot.bin
|
ruby fix_cart.rb rrnetboot.bin 8193
|
||||||
|
|
||||||
|
64nicboot.bin: 64nicboot.o $(IP65LIB) $(C64NETLIB) $(INCFILES) ../cfg/rrbin.cfg
|
||||||
|
$(LD) -C ../cfg/rrbin.cfg -o 64nicboot.bin $< $(IP65LIB) $(C64NETLIB)
|
||||||
|
ruby fix_cart.rb 64nicboot.bin 8192
|
||||||
|
|
||||||
utherboot.pg2: utherboot.o $(IP65LIB) $(APPLE2NETLIB) $(INCFILES) ../cfg/a2language_card.cfg
|
utherboot.pg2: utherboot.o $(IP65LIB) $(APPLE2NETLIB) $(INCFILES) ../cfg/a2language_card.cfg
|
||||||
$(LD) -m utherboot.map -C ../cfg/a2language_card.cfg -o utherboot.pg2 $< $(IP65LIB) $(APPLE2NETLIB)
|
$(LD) -m utherboot.map -C ../cfg/a2language_card.cfg -o utherboot.pg2 $< $(IP65LIB) $(APPLE2NETLIB)
|
||||||
|
|
||||||
@ -47,6 +54,7 @@ $(BOOTA2.PG2): bootmenu.o $(IP65LIB) $(APPLE2NETLIB) $(INCFILES) ../cfg/a2langua
|
|||||||
clean:
|
clean:
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
rm -f rrnetboot.bin rrnetboot.map
|
rm -f rrnetboot.bin rrnetboot.map
|
||||||
|
rm -f 64nicboot.bin 64nicboot.map
|
||||||
rm -f utherboot.pg2 utherboot.map utherboot.dsk
|
rm -f utherboot.pg2 utherboot.map utherboot.dsk
|
||||||
rm -f $(BOOTA2.PG2)
|
rm -f $(BOOTA2.PG2)
|
||||||
|
|
||||||
|
@ -3,18 +3,24 @@
|
|||||||
# so we want to make sure the bin file is an odd length - specifically 8193 bytes
|
# so we want to make sure the bin file is an odd length - specifically 8193 bytes
|
||||||
#
|
#
|
||||||
|
|
||||||
FILE_LENGTH=8193
|
|
||||||
PAD_BYTE=0xff.chr
|
PAD_BYTE=0xff.chr
|
||||||
filename=ARGV[0]
|
filename=ARGV[0]
|
||||||
|
|
||||||
if filename.nil? then
|
if filename.nil? then
|
||||||
puts "no filename specified"
|
puts "no filename specified"
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if ARGV[1].nil? then
|
||||||
|
puts "no padding length specified"
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
file_length=ARGV[1].to_i
|
||||||
|
|
||||||
infile=File.open(filename,"rb").read
|
infile=File.open(filename,"rb").read
|
||||||
puts "fixing length of #{filename} from #{infile.length} to #{FILE_LENGTH} bytes"
|
puts "fixing length of #{filename} from #{infile.length} to #{file_length} bytes"
|
||||||
outfile=File.open(filename,"wb")
|
outfile=File.open(filename,"wb")
|
||||||
outfile<<infile
|
outfile<<infile
|
||||||
outfile<<PAD_BYTE*(FILE_LENGTH-infile.length)
|
outfile<<PAD_BYTE*(file_length-infile.length)
|
||||||
outfile.close
|
outfile.close
|
@ -9,6 +9,15 @@
|
|||||||
; jonno@jamtronix.com - January 2009
|
; jonno@jamtronix.com - January 2009
|
||||||
;
|
;
|
||||||
|
|
||||||
|
;possible bankswitch values are:
|
||||||
|
;$00 = no bankswitching (i.e. NB65 API in RAM only)
|
||||||
|
;$01 = standard bankswitching (via HIRAM/LORAM)
|
||||||
|
;$02 = advanced bankswitching (via custom registers, e.g. $de00 on the Retro Replay cart)
|
||||||
|
|
||||||
|
.ifndef BANKSWITCH_SUPPORT
|
||||||
|
.error "must define BANKSWITCH_SUPPORT"
|
||||||
|
|
||||||
|
.endif
|
||||||
|
|
||||||
.macro print_failed
|
.macro print_failed
|
||||||
ldax #failed_msg
|
ldax #failed_msg
|
||||||
@ -59,8 +68,14 @@
|
|||||||
|
|
||||||
.data
|
.data
|
||||||
exit_cart:
|
exit_cart:
|
||||||
|
.if (BANKSWITCH_SUPPORT=$01)
|
||||||
lda #$02
|
lda #$02
|
||||||
sta $de00 ;turns off RR cartridge - obviously we need to execute this from RAM else we fall into never-never land :-)
|
sta $de00 ;turns off RR cartridge by modifying GROUND and EXROM
|
||||||
|
.elseif (BANKSWITCH_SUPPORT=$02)
|
||||||
|
lda #$36
|
||||||
|
sta $0001 ;turns off ordinary cartridge by modifying HIRAM/LORAM (this will also bank out BASIC)
|
||||||
|
.endif
|
||||||
|
|
||||||
call_downloaded_prg:
|
call_downloaded_prg:
|
||||||
jsr $0000 ;overwritten when we load a file
|
jsr $0000 ;overwritten when we load a file
|
||||||
jsr $c004 ;bank cartridge in again
|
jsr $c004 ;bank cartridge in again
|
||||||
@ -77,7 +92,7 @@ nb65_param_buffer: .res $20
|
|||||||
.byte $C3,$C2,$CD,$38,$30 ; "CBM80"
|
.byte $C3,$C2,$CD,$38,$30 ; "CBM80"
|
||||||
.byte $4E,$42,$36,$35 ; "NB65" - API signature
|
.byte $4E,$42,$36,$35 ; "NB65" - API signature
|
||||||
.byte $01 ;NB65_API_VERSION
|
.byte $01 ;NB65_API_VERSION
|
||||||
.byte $02 ;NB65_BANKSWITCH_SUPPORT
|
.byte BANKSWITCH_SUPPORT ;
|
||||||
jmp nb65_dispatcher ; NB65_DISPATCH_VECTOR : entry point for NB65 functions
|
jmp nb65_dispatcher ; NB65_DISPATCH_VECTOR : entry point for NB65 functions
|
||||||
jmp ip65_process ;NB65_PERIODIC_PROCESSING_VECTOR : routine to be periodically called to check for arrival of ethernet packects
|
jmp ip65_process ;NB65_PERIODIC_PROCESSING_VECTOR : routine to be periodically called to check for arrival of ethernet packects
|
||||||
jmp timer_vbl_handler ;NB65_VBL_VECTOR : routine to be called during each vertical blank interrupt
|
jmp timer_vbl_handler ;NB65_VBL_VECTOR : routine to be called during each vertical blank interrupt
|
||||||
@ -118,7 +133,14 @@ init:
|
|||||||
ldax #nb65_ram_stub_length
|
ldax #nb65_ram_stub_length
|
||||||
jsr copymem
|
jsr copymem
|
||||||
|
|
||||||
|
;if this is a 'normal' cart then we will end up swapping BASIC out, so copy it to the RAM under ROM
|
||||||
|
.if (BANKSWITCH_SUPPORT=$01)
|
||||||
|
ldax #$A000
|
||||||
|
stax copy_src
|
||||||
|
stax copy_dest
|
||||||
|
ldax #$2000
|
||||||
|
jsr copymem
|
||||||
|
.endif
|
||||||
|
|
||||||
ldax #startup_msg
|
ldax #startup_msg
|
||||||
jsr print
|
jsr print
|
||||||
@ -341,8 +363,15 @@ press_a_key_to_continue:
|
|||||||
|
|
||||||
nb65_ram_stub: ; this gets copied to $C000 so programs can bank in the cartridge
|
nb65_ram_stub: ; this gets copied to $C000 so programs can bank in the cartridge
|
||||||
.byte $4E,$42,$36,$35 ; "NB65" - API signature
|
.byte $4E,$42,$36,$35 ; "NB65" - API signature
|
||||||
|
|
||||||
|
.if (BANKSWITCH_SUPPORT=$01)
|
||||||
lda #$01
|
lda #$01
|
||||||
sta $de00 ;turns on RR cartridge (since it will have been banked out when exiting to BASIC)
|
sta $de00 ;turns on RR cartridge (since it will have been banked out when exiting to BASIC)
|
||||||
|
.elseif (BANKSWITCH_SUPPORT=$02)
|
||||||
|
lda #$37
|
||||||
|
sta $0001 ;turns on ordinary cartridge by modifying HIRAM/LORAM (this will also bank in BASIC)
|
||||||
|
.endif
|
||||||
|
|
||||||
rts
|
rts
|
||||||
nb65_ram_stub_end:
|
nb65_ram_stub_end:
|
||||||
nb65_ram_stub_length=nb65_ram_stub_end-nb65_ram_stub
|
nb65_ram_stub_length=nb65_ram_stub_end-nb65_ram_stub
|
@ -10,7 +10,10 @@
|
|||||||
MAX_DHCP_MESSAGES_SENT=12 ;timeout after sending 12 messages will be about 15 seconds (1+2+3...)/4
|
MAX_DHCP_MESSAGES_SENT=12 ;timeout after sending 12 messages will be about 15 seconds (1+2+3...)/4
|
||||||
|
|
||||||
.include "../inc/common.i"
|
.include "../inc/common.i"
|
||||||
|
.ifndef NB65_API_VERSION_NUMBER
|
||||||
|
.define EQU =
|
||||||
.include "../inc/nb65_constants.i"
|
.include "../inc/nb65_constants.i"
|
||||||
|
.endif
|
||||||
|
|
||||||
.export dhcp_init
|
.export dhcp_init
|
||||||
.import dhcp_server
|
.import dhcp_server
|
||||||
|
@ -3,7 +3,10 @@
|
|||||||
MAX_DNS_MESSAGES_SENT=8 ;timeout after sending 8 messages will be about 7 seconds (1+2+3+4+5+6+7+8)/4
|
MAX_DNS_MESSAGES_SENT=8 ;timeout after sending 8 messages will be about 7 seconds (1+2+3+4+5+6+7+8)/4
|
||||||
|
|
||||||
.include "../inc/common.i"
|
.include "../inc/common.i"
|
||||||
.include "../inc/nb65_constants.i"
|
.ifndef NB65_API_VERSION_NUMBER
|
||||||
|
.define EQU =
|
||||||
|
.include "../inc/nb65_constants.i"
|
||||||
|
.endif
|
||||||
|
|
||||||
.export dns_set_hostname
|
.export dns_set_hostname
|
||||||
.export dns_resolve
|
.export dns_resolve
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
TFTP_TIMER_MASK=$F8 ;mask lower two bits, means we wait for 8 x1/4 seconds
|
TFTP_TIMER_MASK=$F8 ;mask lower two bits, means we wait for 8 x1/4 seconds
|
||||||
|
|
||||||
.include "../inc/common.i"
|
.include "../inc/common.i"
|
||||||
|
.ifndef NB65_API_VERSION_NUMBER
|
||||||
|
.define EQU =
|
||||||
.include "../inc/nb65_constants.i"
|
.include "../inc/nb65_constants.i"
|
||||||
|
.endif
|
||||||
|
|
||||||
.exportzp tftp_filename
|
.exportzp tftp_filename
|
||||||
.export tftp_load_address
|
.export tftp_load_address
|
||||||
|
1
dist/make_dist.rb
vendored
1
dist/make_dist.rb
vendored
@ -16,6 +16,7 @@ end
|
|||||||
[
|
[
|
||||||
["client/clients/utherboot.dsk","client/"],
|
["client/clients/utherboot.dsk","client/"],
|
||||||
["client/clients/rrnetboot.bin","client/"],
|
["client/clients/rrnetboot.bin","client/"],
|
||||||
|
["client/clients/64nicboot.bin","client/"],
|
||||||
["server/lib/tftp_server.rb","lib"],
|
["server/lib/tftp_server.rb","lib"],
|
||||||
["server/bin/tftp_only_server.rb","bin/tftp_server.rb"],
|
["server/bin/tftp_only_server.rb","bin/tftp_server.rb"],
|
||||||
["server/bin/import_ags_games.rb","bin"],
|
["server/bin/import_ags_games.rb","bin"],
|
||||||
|
Loading…
Reference in New Issue
Block a user