Tidy following previous

This commit is contained in:
Joshua Bell 2022-11-15 20:36:19 -08:00
parent ac4b655661
commit c4c14419fe
3 changed files with 22 additions and 21 deletions

View File

@ -30,6 +30,7 @@ This repo includes the following drivers/modifications:
* Cricket!
* Applied Engineering DClock
* ROMX Real-Time Clock
* FujiNet Clock
* RAM Disk drivers
* RAMWorks Driver by Glen E. Bredon
* Quit dispatcher/selector (`BYE` routines)
@ -55,6 +56,7 @@ The intent is that you use a tool like Copy II Plus or [Apple II DeskTop](https:
* `PRODOS` - the operating system, e.g. [ProDOS 2.4](https://prodos8.com/)
* `NS.CLOCK.SYSTEM` - install No-Slot clock driver, if present
* `ROMXRTC.SYSTEM` - install ROMX clock driver, if present
* `FN.CLOCK.SYSTEM` - install FujiNet clock driver, if present
* `DCLOCK.SYSTEM` - install DClock clock driver, if present
* `CRICKET.SYSTEM` - install Cricket! clock driver, if present
* `RAM.DRV.SYSTEM` - install RamWorks RAM disk driver, if present

View File

@ -72,8 +72,7 @@ port: .byte $00 ; Smartport device
.byte 'P' ; Get datetime in ProDDOS format
.endproc
sizeof_driver := .sizeof(driver)
.assert sizeof_driver <= 125, error, "Clock code must be <= 125 bytes"
.assert .sizeof(driver) <= 125, error, "Clock code must be <= 125 bytes"
;;; ------------------------------------------------------------
@ -81,7 +80,7 @@ port: .byte $00 ; Smartport device
.proc detect_fujinet_clock
;; Serch for smartport cards
;; Search for smartport cards
ldx #$C7 ; Start the search from slot 7
search_slot:
jsr find_smartport
@ -92,7 +91,7 @@ search_slot:
jsr device_count
cpx #$0
beq continue_slot_search; no devices in the slot
search_unit:
jsr unit_type
cmp #FN_CLOCK_DEVICE_TYPE
@ -150,7 +149,7 @@ not_found:
;; Copy code
lda RWRAM1
lda RWRAM1
ldy #sizeof_driver-1
ldy #.sizeof(driver)-1
loop: lda driver,y
sta (ptr),y

View File

@ -2,11 +2,11 @@
;;; Smartport access functions
;;; Derived from: http://mirrors.apple2.org.za/ground.icaen.uiowa.edu/MiscInfo/Programming/smartport.statusexample
;;This function scans the slots to locate a SmartPort.
;;On entry, X=$Cx, where x is the first slot to be checked.
;;On exit, X=$Cy, where y is the highest numbered slot less than or
;;equal to x which contains SmartPort firmware. If no SmartPort
;;is found, C=1 and A=$00.
;;; This function scans the slots to locate a SmartPort.
;;; On entry, X=$Cx, where x is the first slot to be checked.
;;; On exit, X=$Cy, where y is the highest numbered slot less than or
;;; equal to x which contains SmartPort firmware. If no SmartPort
;;; is found, C=1 and A=$00.
ptr := $A5 ; Generic pointer
.proc find_smartport
@ -43,26 +43,26 @@ not_here:
RTS
.endproc
;; This function sets up the SP_CALL function for calling the
;; SmartPort driver. On entry, X=$Cx, where x is the slot number
;; containing a SmartPort driver. This should be checked via
;; FIND_SMARTPORT if necessary - don't assume there is a SmartPort
;; device in slot 5, for example!
;;; This function sets up the SP_CALL function for calling the
;;; SmartPort driver. On entry, X=$Cx, where x is the slot number
;;; containing a SmartPort driver. This should be checked via
;;; FIND_SMARTPORT if necessary - don't assume there is a SmartPort
;;; device in slot 5, for example!
.proc setup_smartport
LDA #$00
STA ptr ; Set up the pointer
STX ptr+1
LDY #$FF
LDA (ptr),Y ; Get the ProDOS driver entry point
CLC
CLC
ADC #$03 ; Get the SmartPort driver entry point
STA sp_call_lo ; Store in the JSR
STX sp_call_hi ; also store the high byte
RTS
.endproc
;; This function return in X the number of devices available
;; on a SmartPort
;;; This function return in X the number of devices available
;;; on a SmartPort
.proc device_count
LDA #$00
STA st_unit
@ -76,7 +76,7 @@ device_count_error:
RTS
.endproc
;; This function returns in A the device type for a unit in X
;;; This function returns in A the device type for a unit in X
.proc unit_type
STX st_unit
LDA #$03
@ -94,7 +94,7 @@ unit_type_error:
;; Status command parameters
;;; Status command parameters
sp_call: JSR $0000
sp_call_hi = *-1
sp_call_lo = *-2
@ -103,7 +103,7 @@ params_address:
.word st_params
RTS
st_params:
st_params:
.byte $3 ; Parameter count
st_unit:.byte $0
.word st_list