Skip to content

Commit

Permalink
Level3-v1.31 / FileStore-v1.31 / FileServer v1.31 baseline
Browse files Browse the repository at this point in the history
Individual code sets for Level3 and FileStore and the merged code base under FileServer.
  • Loading branch information
mark-usher committed May 15, 2023
1 parent 870e953 commit 06132eb
Show file tree
Hide file tree
Showing 300 changed files with 63,215 additions and 2,178 deletions.
Binary file added FileServer/Binary Files/FS3-131
Binary file not shown.
1 change: 1 addition & 0 deletions FileServer/Binary Files/FS3-131.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$.FS3-131 00000400 00000400
Binary file added FileServer/Binary Files/FS3-131d
Binary file not shown.
1 change: 1 addition & 0 deletions FileServer/Binary Files/FS3-131d.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$.FS3-131d 00000400 00000400
Binary file added FileServer/Binary Files/FS3-131dp
Binary file not shown.
1 change: 1 addition & 0 deletions FileServer/Binary Files/FS3-131dp.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$.FS3-131dp 00000400 00000400
Binary file added FileServer/Binary Files/FS3-131p
Binary file not shown.
1 change: 1 addition & 0 deletions FileServer/Binary Files/FS3-131p.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$.FS3-131p 00000400 00000400
Binary file added FileServer/Binary Files/FSR-131
Binary file not shown.
Binary file added FileServer/Binary Files/FSR-131p
Binary file not shown.
1 change: 1 addition & 0 deletions FileServer/SRC/!BOOT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MODE0*DIR $*LIB $.LIBRARY*CBCH."START"
Expand Down
1 change: 1 addition & 0 deletions FileServer/SRC/!BOOT.INF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$.!BOOT 00000000 00000000 0000002B 19 A242 060E14 A155 2B1715
1 change: 1 addition & 0 deletions FileServer/SRC/FSASM
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*|Assembly sequence for FileStore FS > FSAsm*|By Jes 3/9/84, Updated by Glenn 8/5/85*|Updated by Mark Usher 7/4/21*DIR $.FileServer*LIB $.LIBRARY*TurMasm*OPT 1 1STOP ONASM FileStore*CBCH."$.FSmake"
Expand Down
1 change: 1 addition & 0 deletions FileServer/SRC/FSASM.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$.FSASM 00000000 00000000 000000D2 19 A548 101D0B A24D 331317
Binary file added FileServer/SRC/FSmake
Binary file not shown.
1 change: 1 addition & 0 deletions FileServer/SRC/FSmake.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$.FSmake 00000800 0000B823 00000674 33 A54C 193A12 A24D 331317
14 changes: 14 additions & 0 deletions FileServer/SRC/FileServer/FileStore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
OPT 2 ;> <FileServerSource>.FileStore
TTL File server. Initial variable setup for FileStore variant.

ORG &200

GBLL $Level3
GBLL $CMOS

$Level3 SETL 1=0 ; False
$CMOS SETL 1=1 ; True

CPU 1

LNK Uade01
173 changes: 62 additions & 111 deletions FileStore/SRC/FileStore/Form00.6502 → FileServer/SRC/FileServer/Form00
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
OPT Form00 ;File > Form00
TTL File server file FORM00

[ $CMOS ; whole file is Filestore only

;**********
;* FORMAT *
;**********
Expand All @@ -13,38 +15,17 @@ Fgpptr * Mpmbpt
Fgprpt * Mapent

FMform ROUT
JSR SPACES
CMPIM &34 ;First allowed disc number (one digit)
JSR NMdisr ;**22/5/88** read disc no & name
CMPIM 4 ;First allowed disc number (one digit)
BCC #03
CMPIM &36
BCS #03
ANDIM 7
STA Drivno ;Save for later
LSRA ;Put drive number into dscb
RORA
RORA
RORA
STA Dsccb+Cmd+1

;v1.23
INY
JSR RDTITL
BNE #04
LDXIM &FF
LDAIM &D

00
INX
CMPAX TXTBUF
BNE #00
CPXIM 0
BEQ #03
CPXIM &10
BCS #03
JSR FMackn

;v1.31
; JSR FMackn ;reply to caller now, lest he time out
JSR FMackn ;reply to caller now, lest he time out

LDAIM &0F ;Format command
STA Dsccb+Cmd
Expand All @@ -60,11 +41,9 @@ FMform ROUT
BEQ #05 ;Br if Ok so far
JMP #50 ;Else report error

03 LDAIM WOTERR ;Bad disc number
03 LDAIM Numerr ;Bad disc number
JMP Error

;v1.23
04 JMP COMRTS

; Now have the disc in the state where every sector looks like the bitmap
; for an empty track. Only the first sector of each cylinder is actually
Expand Down Expand Up @@ -100,30 +79,12 @@ FMform ROUT
STA FMdat1+1
STA FMdat2+1
STA FMdat3+1
;v1.23
LDXIM 0

;v1.31
; LDXIM Dnamln-1 ;Now build disc names
LDXIM Dnamln-1 ;Now build disc names
06 LDAAX Txtbuf
;v1.23
CMPIM &D
BEQ #07
STAAX FMdnm1
STAAX FMdnm2
INX
BRA #06

07 CPXIM &10
BCS #10
LDAIM &20
STAAX FMdnm1
STAAX FMdnm2
INX
BRA #07

08 JMP FMVok

DEX
BPL #06
10 LDX Freptr ;get address of work buffer
LDY Freptr+1
STX Fgpptr ;set up to build next sector group
Expand All @@ -133,7 +94,7 @@ FMform ROUT
STZ DSCCB+TRadd+2
STZ DSCCB+TRadd+3
JSR #95 ;get number of sectors
BEQ #08 ;go exit if all done
BEQ #24 ;go exit if all done
STA DSCCB+CMD+4 ;else set sector count in DSCB
12 PHA
LDXIM 0
Expand Down Expand Up @@ -171,6 +132,8 @@ FMform ROUT
STA Fgprpt+1
BRA #22

24 BRA FMvok ;done, go say OK

25 JSR #95 ;copy string to sector image
JSR #90
DEX
Expand Down Expand Up @@ -200,12 +163,10 @@ FMform ROUT

FMVerr
50 JSR Looker ;put error msg at MIDTX
55 LDA DRIVNO
JSR RDDATA
LDA CBstid ;copy caller station
STA Ccode
55 LDA CBstid ;copy caller station
STA Txbuf
LDA CBstid+1 ;and net
STA RTcode
STA Txbuf+1
LDA TXbuf-1 ;borrow a byte
PHA
LDAIM 1
Expand All @@ -225,6 +186,8 @@ FMVok
STA Midtx+1
LDAIM CR
STA Midtx+2
LDA Drivno ;seek disc to home
JSR Rddata ;(a good a way as any - ignore errors)
BRA #55

; Routine to store value in constructed image & step ptr
Expand Down Expand Up @@ -281,67 +244,49 @@ FMmaps ROUT
& 0 ;cylinder 0 sector 0 has first disc info ptr; also ADFS free map
= 1, FDsecs*FDside ;ADFS free space - cylinder 1
= Szoff-1 ;offset

;v1.23
= 1, 2*FDside-2 ;first disc info sector
; = 1, FDsecs*FDside-2 ;first disc info sector

= 1, FDsecs*FDside-2 ;first disc info sector
= 5 ;offset to 252
= 1, FDsecs*FDside ;ADFS disc size (1 cylinder!)
= 2 ;offset to checksum

;v1.23
= 1, &42
; = 1, FDsecs*FDside+FDsecs*FDside-2+FDsecs*FDside ;checksum
= 1, FDsecs*FDside+FDsecs*FDside-2+FDsecs*FDside ;checksum
= 0,0 ;end sector

= 1
& 1 ;cylinder 0 sector 1 has second disc info ptr; also ADFS free sizes
[ FDside = 1
= 1,FDsecs-9 ;ADFS free length
|
;v1.23
= 1, 0
; = 1,FDsecs-7 ;ADFS free length
= 1,FDsecs-7 ;ADFS free length
]
= Szoff-1 ;offset

;v1.23
= 1, 2*FDside-1 ;second disc info sector
; = 1, FDsecs*FDside-1 ;second disc info sector
= 1, FDsecs*FDside-1 ;second disc info sector
= 8 ;offset
[ FDside = 1
= 1, FDsecs*FDside-9+FDsecs*FDside-1 ;checksum
|
;v1.23
= 1, 2*FDside-1 ;checksum ;checksum
; = 1, FDsecs*FDside-7+FDsecs*FDside-1 ;checksum
= 1, FDsecs*FDside-7+FDsecs*FDside-1 ;checksum
]
= 0,0 ;end sector

; = 5
; & 2 ;cylinder 0 sectors 2-6 have ADFS root directory
; = 5,0,"Hugo" ;Master sequence + dir id
; = 250,1,0 ;5-&FF
; = 255,1,0 ;&100-&1FF
; = 255,1,0 ;&200-&2FF
; = 255,1,0 ;&300-&3FF
; = &CC,2,"$",CR ;Directory name
; = 9,1,2 ;Parent pointer
; = 3,2,"$",CR ;Directory title
; = 32,4,"Hugo" ;Dir id
; = 0,0 ;end sectors
= 5
& 2 ;cylinder 0 sectors 2-6 have ADFS root directory
= 5,0,"Hugo" ;Master sequence + dir id
= 250,1,0 ;5-&FF
= 255,1,0 ;&100-&1FF
= 255,1,0 ;&200-&2FF
= 255,1,0 ;&300-&3FF
= &CC,2,"$",CR ;Directory name
= 9,1,2 ;Parent pointer
= 3,2,"$",CR ;Directory title
= 32,4,"Hugo" ;Dir id
= 0,0 ;end sectors

= 1
;v1.23
& 2*FDside-2 ;cylinder 0 sector last-2 has 1st disc info
; & FDsecs*FDside-2 ;cylinder 0 sector last-2 has 1st disc info
& FDsecs*FDside-2 ;cylinder 0 sector last-2 has 1st disc info
= #20-#10 ;length of all next guff
10 = "AFS0"
FMdnm1 = "Fileserver disc0" ;overwritten by users name
& FDcyls ;cylinders per disc

;v1.23
& FDsecs*FDside*FDcyls ;sectors per disc
= 0 ;... continued
= 1 ;number of discs
Expand All @@ -357,9 +302,7 @@ FMdat1 & 0 ;overwritten by date of root
20 = 0,0 ;end sector

= 1
;v1.23
& 2*FDside-1 ;cylinder 0 sector last-2 has 1st disc info
; & FDsecs*FDside-1 ;cylinder 0 sector last-1 has 2nd disc info
& FDsecs*FDside-1 ;cylinder 0 sector last-1 has 2nd disc info
= #40-#30 ;length of all next guff
30 = "AFS0"
FMdnm2 = "Fileserver disc0" ;overwritten by users name
Expand Down Expand Up @@ -477,20 +420,19 @@ $Mbtot SETA $Mbtot-$Mbcnt
;;
;; This is the old source
;;
80
= 0,2 ;first chain word
& 0 ;marks end of free list
= 24,2 ;offset and next chain word
& &11
= 24,2
;; 80 = 0,2 ;first chain word
;; & 0 ;marks end of free list
;; = 24,2 ;offset and next chain word
;; & &11
;; = 24,2
;;
;; This is the new source (matches the dumped ROMS)
;;
;; = &ff, &ff
;;80
;; = 21, 2
;; & &22
;; = 27, 2
= &ff, &ff
80
= 21, 2
& &22
= 27, 2
;;
;; And then the existing source continues
;;
Expand Down Expand Up @@ -568,12 +510,7 @@ FMdat3 & 0 ;to be filled in

VERIFY ROUT
LDAIM &2F ;Winchester verify command code
BRA #00

CERTIFY
LDAIM &E2

00 STA Tempa ;preset command
STA Tempa ;preset command
JSR Spaces ;find arguments
CMPIM "0" ;first is disc number (one digit)
BCC #20
Expand Down Expand Up @@ -678,12 +615,26 @@ CERTIFY
80 DEC Brega+2
BRA #60

] ; end of filestore only

FNSH
LEFT * FRESTR-. ;get free store
[ LEFT > 0 ;must not overflow workspace
[ LEFT >= 0 ;must not overflow workspace
|
! 0,"FRESTR incorrect"
]

[ $CMOS
; The original ROM has some junk at the end.
; but don't add if Psuedo = Yes
[ Pseudods = No
= &87, &D0, &02, &E6, &88, &C6
= &89, &80, &CB, &D0, &02, &E6, &88, &C6
= &89, &80, &CB, &80, &CB, &90, &03, &EE
= &60, &81, &E6, &87, &D0, &02, &E6, &88
= &C6, &89, &80, &CB, &14, &3F, &A5, &B4
]
]

;** T H E E N D ***
END
1 change: 1 addition & 0 deletions FileServer/SRC/FileServer/Level3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OPT 2 ;> <FileServerSource>.Level3 TTL File server. Initial variable setup for Level 3 variant. File => Level3 ORG &400 GBLL $Level3 GBLL $CMOS$Level3 SETL 1=1 ; True$CMOS SETL 1=0 ; False CPU 0 LNK Uade01
Expand Down
Loading

0 comments on commit 06132eb

Please sign in to comment.