mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-11-18 06:08:04 +00:00
git-svn-id: http://svn.code.sf.net/p/netboot65/code@72 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
38c474bbef
commit
27df47e41a
@ -4,11 +4,11 @@ NB65_API_VERSION=$0001
|
|||||||
|
|
||||||
;offsets in NB65 configuration structure
|
;offsets in NB65 configuration structure
|
||||||
NB65_CFG_MAC = $00 ;6 byte MAC address
|
NB65_CFG_MAC = $00 ;6 byte MAC address
|
||||||
NB65_CFG_IP = NB65_CFG_MAC+$06 ;4 byte local IP address (will be overwritten by DHCP)
|
NB65_CFG_IP = $06 ;4 byte local IP address (will be overwritten by DHCP)
|
||||||
NB65_CFG_NETMASK = NB65_CFG_IP+$04 ;4 byte local netmask (will be overwritten by DHCP)
|
NB65_CFG_NETMASK = $0A ;4 byte local netmask (will be overwritten by DHCP)
|
||||||
NB65_CFG_GATEWAY = NB65_CFG_NETMASK+$04 ;4 byte local gateway (will be overwritten by DHCP)
|
NB65_CFG_GATEWAY = $0D ;4 byte local gateway (will be overwritten by DHCP)
|
||||||
NB65_CFG_DNS_SERVER = NB65_CFG_GATEWAY+$04 ;4 byte IP address of DNS server (will be overwritten by DHCP)
|
NB65_CFG_DNS_SERVER = $12 ;4 byte IP address of DNS server (will be overwritten by DHCP)
|
||||||
NB65_CFG_DHCP_SERVER = NB65_CFG_DNS_SERVER+$04 ;4 byte IP address of DHCP server (will only be set by DHCP initialisation)
|
NB65_CFG_DHCP_SERVER = $16 ;4 byte IP address of DHCP server (will only be set by DHCP initialisation)
|
||||||
|
|
||||||
;offsets in TFTP paramater structure
|
;offsets in TFTP paramater structure
|
||||||
NB65_TFTP_CALL_MODE = $00 ;1 byte for 'mode' : $00 means read/write from RAM, (and TFTP_POINTER is address to read from
|
NB65_TFTP_CALL_MODE = $00 ;1 byte for 'mode' : $00 means read/write from RAM, (and TFTP_POINTER is address to read from
|
||||||
@ -20,6 +20,12 @@ NB65_TFTP_POINTER = $07 ;2 byte pointer to memory location
|
|||||||
|
|
||||||
|
|
||||||
;function numbers
|
;function numbers
|
||||||
|
;to make a function call:
|
||||||
|
; Y = function number
|
||||||
|
; AX = pointer to paramater buffer (for functions that take paramaters)
|
||||||
|
; then JSR NB65_DISPATCH_VECTOR
|
||||||
|
; on return, carry flag is set if there is an error, or clear otherwise
|
||||||
|
; some functions return results in AX directly, others will update the paramater buffer they were called with.
|
||||||
NB65_GET_API_VERSION =$00 ;no inputs, outputs X=major version number, A=minor version number
|
NB65_GET_API_VERSION =$00 ;no inputs, outputs X=major version number, A=minor version number
|
||||||
NB65_GET_DRIVER_NAME =$01 ;no inputs, outputs AX=pointer to asciiz driver name
|
NB65_GET_DRIVER_NAME =$01 ;no inputs, outputs AX=pointer to asciiz driver name
|
||||||
NB65_GET_IP_CONFIG_PTR =$02 ;no inputs, outputs AX=pointer to IP configuration structure (which can be modified)
|
NB65_GET_IP_CONFIG_PTR =$02 ;no inputs, outputs AX=pointer to IP configuration structure (which can be modified)
|
||||||
|
6
dist/make_dist.rb
vendored
6
dist/make_dist.rb
vendored
@ -8,7 +8,7 @@ require 'ftools'
|
|||||||
|
|
||||||
WORKING_DIR=File.expand_path(File.dirname(__FILE__)+"/netboot65")
|
WORKING_DIR=File.expand_path(File.dirname(__FILE__)+"/netboot65")
|
||||||
SRC_DIR=File.expand_path(File.dirname(__FILE__)+"/../")
|
SRC_DIR=File.expand_path(File.dirname(__FILE__)+"/../")
|
||||||
["","client","lib","bin","boot",].each do |dir_suffix|
|
["","client","lib","bin","boot","doc"].each do |dir_suffix|
|
||||||
dir_path="#{WORKING_DIR}/#{dir_suffix}"
|
dir_path="#{WORKING_DIR}/#{dir_suffix}"
|
||||||
Dir.mkdir(dir_path) unless File.exist?(dir_path)
|
Dir.mkdir(dir_path) unless File.exist?(dir_path)
|
||||||
end
|
end
|
||||||
@ -20,7 +20,9 @@ end
|
|||||||
["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"],
|
||||||
["server/boot/BOOTA2.PG2","boot"],
|
["server/boot/BOOTA2.PG2","boot"],
|
||||||
["doc/README.*.txt",""],
|
["doc/README.*.txt","doc"],
|
||||||
|
["doc/netboot65_api.txt","doc"],
|
||||||
|
["client/inc/nb65_constants.i","doc"],
|
||||||
].each do |args|
|
].each do |args|
|
||||||
dest="#{WORKING_DIR}/#{args[1]}"
|
dest="#{WORKING_DIR}/#{args[1]}"
|
||||||
Dir["#{SRC_DIR}/#{args[0]}"].each do |src|
|
Dir["#{SRC_DIR}/#{args[0]}"].each do |src|
|
||||||
|
20
doc/netboot65_api.txt
Normal file
20
doc/netboot65_api.txt
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
The purpose of this API is to allow applications to be developed that use network functionality in a netboo65 cartridge/card.
|
||||||
|
|
||||||
|
The API is a jump table that lives at a fixed location within the cartridge/card.
|
||||||
|
The jump table entries and their location in a C64 cartridge are:
|
||||||
|
|
||||||
|
NB65_DISPATCH_VECTOR = $800d
|
||||||
|
NB65_PERIODIC_PROCESSING_VECTOR =$8010
|
||||||
|
NB65_VBL_VECTOR =$8013
|
||||||
|
|
||||||
|
Immediately before this jump table are the bytes "NB65" (so an app can check the API is available to it)
|
||||||
|
|
||||||
|
To use the API, an app should do the following:
|
||||||
|
|
||||||
|
1) set up a custom IRQ handler that will call the NB65_VBL_VECTOR routine 60 times a second - (this routine ends with a RTS not RTI). All this routine does is count clock ticks, so it uses very little raster time
|
||||||
|
|
||||||
|
2) use whatever network functions are desired, by setting up an appropriate buffer of parameters, then setting the function number of the desired function into Y, setting AX to point to the buffer of paramaters, and then calling (via JSR) NB65_DISPATCH_VECTOR. Every function uses the carry flag to indicate errors (set on error, clear otherwise). Some functions return values, either in A, AX, or by updating the buffer that was originally passed in.
|
||||||
|
|
||||||
|
3) it is necessary to call the NB65_PERIODIC_PROCESSING_VECTOR several times a second to check for any inbound packets. If a packet has arrived, it will be processed, and potentially a callback handler may create and send an outbound message in response. This means processing time can vary, and ocassionaly be quite long. Therefore this routine should not be called inside time critical code e..g. an interrupt service routine.
|
||||||
|
|
||||||
|
Functions are defined in the file nb65_constants.i
|
Loading…
Reference in New Issue
Block a user