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! * Cricket!
* Applied Engineering DClock * Applied Engineering DClock
* ROMX Real-Time Clock * ROMX Real-Time Clock
* FujiNet Clock
* RAM Disk drivers * RAM Disk drivers
* RAMWorks Driver by Glen E. Bredon * RAMWorks Driver by Glen E. Bredon
* Quit dispatcher/selector (`BYE` routines) * 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/) * `PRODOS` - the operating system, e.g. [ProDOS 2.4](https://prodos8.com/)
* `NS.CLOCK.SYSTEM` - install No-Slot clock driver, if present * `NS.CLOCK.SYSTEM` - install No-Slot clock driver, if present
* `ROMXRTC.SYSTEM` - install ROMX 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 * `DCLOCK.SYSTEM` - install DClock clock driver, if present
* `CRICKET.SYSTEM` - install Cricket! clock driver, if present * `CRICKET.SYSTEM` - install Cricket! clock driver, if present
* `RAM.DRV.SYSTEM` - install RamWorks RAM disk 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 .byte 'P' ; Get datetime in ProDDOS format
.endproc .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 .proc detect_fujinet_clock
;; Serch for smartport cards ;; Search for smartport cards
ldx #$C7 ; Start the search from slot 7 ldx #$C7 ; Start the search from slot 7
search_slot: search_slot:
jsr find_smartport jsr find_smartport
@ -92,7 +91,7 @@ search_slot:
jsr device_count jsr device_count
cpx #$0 cpx #$0
beq continue_slot_search; no devices in the slot beq continue_slot_search; no devices in the slot
search_unit: search_unit:
jsr unit_type jsr unit_type
cmp #FN_CLOCK_DEVICE_TYPE cmp #FN_CLOCK_DEVICE_TYPE
@ -150,7 +149,7 @@ not_found:
;; Copy code ;; Copy code
lda RWRAM1 lda RWRAM1
lda RWRAM1 lda RWRAM1
ldy #sizeof_driver-1 ldy #.sizeof(driver)-1
loop: lda driver,y loop: lda driver,y
sta (ptr),y sta (ptr),y

View File

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