diff --git a/.gitignore b/.gitignore index d8fe4fa..16e441b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ /.project +# Ignore macOS system files +.DS_Store +**/.DS_Store diff --git a/drivers/duofile/.gitignore b/drivers/duofile/.gitignore new file mode 100644 index 0000000..78a0e8a --- /dev/null +++ b/drivers/duofile/.gitignore @@ -0,0 +1 @@ +df1.driver_code_0x2000_cc65 diff --git a/drivers/duofile/DUOFILE.DRVR b/drivers/duofile/DUOFILE.DRVR new file mode 100644 index 0000000..16c4502 Binary files /dev/null and b/drivers/duofile/DUOFILE.DRVR differ diff --git a/drivers/duofile/README.md b/drivers/duofile/README.md new file mode 100644 index 0000000..98b890f --- /dev/null +++ b/drivers/duofile/README.md @@ -0,0 +1,6 @@ +# Apple /// driver for Duofile +Unifile/Duofile drivers have surfaced; this is the beginning of their disassembly and documentation. + +The code for the driver (`df1.driver_code_0x2000`) was extracted from a working disk using Rob Justice's a3driverutil +project: https://github.com/robjustice/a3driverutil . +The disassembly and reassembly can be reproduced with Andy McFadden's `6502Bench` tool: https://6502bench.com/ . diff --git a/drivers/duofile/df1.driver_code_0x2000 b/drivers/duofile/df1.driver_code_0x2000 new file mode 100644 index 0000000..95d0320 Binary files /dev/null and b/drivers/duofile/df1.driver_code_0x2000 differ diff --git a/drivers/duofile/df1.driver_code_0x2000.dis65 b/drivers/duofile/df1.driver_code_0x2000.dis65 new file mode 100644 index 0000000..0f507d3 --- /dev/null +++ b/drivers/duofile/df1.driver_code_0x2000.dis65 @@ -0,0 +1,1622 @@ +### 6502bench SourceGen dis65 v1.0 ### +{ +"_ContentVersion":5, +"FileDataLength":1962, +"FileDataCrc32":978910765, +"ProjectProps":{ +"CpuName":"6502", +"IncludeUndocumentedInstr":false, +"TwoByteBrk":true, +"EntryFlags":32702671, +"AutoLabelStyle":"Simple", +"AnalysisParams":{ +"AnalyzeUncategorizedData":true, +"DefaultTextScanMode":"LowHighAscii", +"MinCharsForString":4, +"SeekNearbyTargets":true, +"UseRelocData":false, +"SmartPlpHandling":false, +"SmartPlbHandling":true}, + +"PlatformSymbolFileIdentifiers":["RT:Apple/A3-ROM.sym65", +"RT:Apple/A3-IO.sym65", +"RT:Apple/SOS.sym65"], +"ExtensionScriptFileIdentifiers":["RT:Apple/SOS.cs"], +"ProjectSyms":{ +"AllocSIR":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"AllocSIR", +"Value":6419, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"CSList":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"CSList", +"Value":195, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"CtlStat":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"CtlStat", +"Value":194, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"QtyRead":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"QtyRead", +"Value":200, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"ReqCnt":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"ReqCnt", +"Value":196, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"ReqCode":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"ReqCode", +"Value":192, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"SIR_Len":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"SIR_Len", +"Value":5, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"SOS_Unit":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"SOS_Unit", +"Value":193, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"SosBlk":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"SosBlk", +"Value":198, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"SosBuf":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"SosBuf", +"Value":194, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"SysErr":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"SysErr", +"Value":6440, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"XBADOP":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XBADOP", +"Value":38, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}, + +"XBLKNUM":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XBLKNUM", +"Value":45, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}, + +"XBYTECNT":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XBYTECNT", +"Value":44, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}, + +"XCTLCODE":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XCTLCODE", +"Value":33, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}, + +"XNODRIVE":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XNODRIVE", +"Value":40, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}, + +"XNORESRC":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XNORESRC", +"Value":37, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}, + +"XREQCODE":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XREQCODE", +"Value":32, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}}}, + +"AddressMap":[{ +"Offset":0, +"Addr":8192, +"Length":1962, +"PreLabel":"", +"IsRelative":false}], +"TypeHints":[{ +"Low":0, +"High":0, +"Hint":"Code"}, + +{ +"Low":136, +"High":136, +"Hint":"Code"}, + +{ +"Low":222, +"High":222, +"Hint":"Code"}, + +{ +"Low":898, +"High":898, +"Hint":"Code"}, + +{ +"Low":993, +"High":993, +"Hint":"Code"}, + +{ +"Low":1020, +"High":1020, +"Hint":"Code"}, + +{ +"Low":1048, +"High":1052, +"Hint":"InlineData"}, + +{ +"Low":1138, +"High":1138, +"Hint":"InlineData"}, + +{ +"Low":1172, +"High":1174, +"Hint":"InlineData"}, + +{ +"Low":1686, +"High":1690, +"Hint":"InlineData"}, + +{ +"Low":1752, +"High":1755, +"Hint":"InlineData"}, + +{ +"Low":1776, +"High":1781, +"Hint":"InlineData"}, + +{ +"Low":1782, +"High":1782, +"Hint":"Code"}, + +{ +"Low":1811, +"High":1811, +"Hint":"Code"}, + +{ +"Low":1906, +"High":1906, +"Hint":"Code"}, + +{ +"Low":1914, +"High":1914, +"Hint":"Code"}, + +{ +"Low":1930, +"High":1930, +"Hint":"Code"}, + +{ +"Low":1942, +"High":1942, +"Hint":"Code"}], +"StatusFlagOverrides":{ +}, + +"Comments":{ +"0":"Link pointer to next DIB", +"2":"Entry pointer", +"4":"Name length byte", +"5":"Device name", +"20":"Active, no page alignment", +"21":"Slot number", +"22":"Unit number", +"23":"Type", +"24":"Subtype", +"25":"Filler", +"26":"# Blocks in device", +"28":"Manufacturer", +"30":"Driver version", +"32":"DCB length followed by DCB", +"39":"Link pointer to next DIB", +"41":"Entry pointer", +"43":"Name length byte", +"44":"Device name", +"59":"Active, no page alignment", +"60":"Slot number", +"61":"Unit number", +"62":"Type", +"63":"Subtype", +"64":"Filler", +"65":"# Blocks in device", +"67":"Manufacturer", +"69":"Driver version", +"71":"DCB length followed by DCB", +"187":"Bad request code!", +"192":"Invalid operation!", +"197":"Drive not connected", +"202":"0 Read request", +"204":"1 Write request", +"206":"2 Status request", +"208":"3 Control request", +"210":"4 Unused", +"212":"5 Unused", +"214":"6 Unused", +"216":"7 Unused", +"218":"8 Init request", +"220":"9 Repeat last read or write request", +"295":"Drive not connected", +"299":"Resource not available", +"307":"Zero # bytes read", +"404":"I/O error", +"516":"Block number to large", +"523":"Byte count not a multiple of 512", +"694":"setup buffer pointer one", +"698":"now setup 3 more pointers, in $80 increments", +"717":"setup the xbyte for the pointers", +"915":"Invalid control/status code", +"1020":"CtlStat", +"1022":"Format the device", +"1048":"Reset device?", +"1770":"these look familiar for low level disk nibbles"}, + +"LongComments":{ +"-2147483647":{ +"Text":"6502bench SourceGen v1.8.1", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"0":{ +"Text":" UNIFILE / DUOFILE SOS Driver\r\n \r\n Device identification Block (DIB) #1\r\n \r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"39":{ +"Text":"\r\n Device identification Block (DIB) #2\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"192":{ +"Text":"\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"197":{ +"Text":"\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"202":{ +"Text":"\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"307":{ +"Text":"\r\nD_READ call processing\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"409":{ +"Text":"\r\nD_WRITE call processing\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"898":{ +"Text":"\r\nD_STATUS call processing\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1020":{ +"Text":"\r\nD_CONTROL call processing\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"993":{ +"Text":"\r\nD_REPEAT - repeat the last D_READ or D_WRITE call\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1048":{ +"Text":"\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1782":{ +"Text":"\r\ncontrol code $01\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"73":{ +"Text":"\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"101":{ +"Text":"\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1058":{ +"Text":"control code $fe\r\nformat disk??\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1138":{ +"Text":"maybe Z8 code to do the formatting of the disk", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1914":{ +"Text":"\r\ncontrol code $00\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1930":{ +"Text":"\r\ncontrol code $02\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1942":{ +"Text":"\r\ncontrol code $03\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1811":{ +"Text":"\r\ncontrol code $04\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"972":{ +"Text":"\r\nstatus code $01\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"690":{ +"Text":"Sets up 4 zero page pointers ca, cc, ce, d0 to be able to copy the 512 bytes\r\nof data in four 128 byte chunks\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"222":{ +"Text":"\r\nD_INIT call processing\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}}, + +"Notes":{ +}, + +"UserLabels":{ +"0":{ +"Label":"DIB1", +"Value":8192, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"39":{ +"Label":"DIB2", +"Value":8231, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"136":{ +"Label":"Entry", +"Value":8328, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"307":{ +"Label":"DRead", +"Value":8499, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"409":{ +"Label":"DWrite", +"Value":8601, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"898":{ +"Label":"DStatus", +"Value":9090, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1020":{ +"Label":"DControl", +"Value":9212, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"187":{ +"Label":"BadReq", +"Value":8379, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"192":{ +"Label":"BadOp", +"Value":8384, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"222":{ +"Label":"DInit", +"Value":8414, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"993":{ +"Label":"DRepeat", +"Value":9185, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"202":{ +"Label":"DoTable", +"Value":8394, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"404":{ +"Label":"IO_Error", +"Value":8596, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1914":{ +"Label":"T277A", +"Value":10106, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"Generated"}, + +"1782":{ +"Label":"T26F6", +"Value":9974, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"Generated"}, + +"1930":{ +"Label":"T278A", +"Value":10122, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"Generated"}, + +"1942":{ +"Label":"T2796", +"Value":10134, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"Generated"}, + +"1811":{ +"Label":"T2713", +"Value":10003, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"Generated"}, + +"21":{ +"Label":"DIB1_Slot", +"Value":8213, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"26":{ +"Label":"DIB1_Blks", +"Value":8218, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"101":{ +"Label":"SIR_Addr", +"Value":8293, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}}, + +"OperandFormats":{ +"0":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DIB2", +"Part":"Low"}}, + +"2":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"Entry", +"Part":"Low"}}, + +"26":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"28":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"30":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"32":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"39":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"41":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"Entry", +"Part":"Low"}}, + +"65":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"67":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"69":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"71":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"187":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"XREQCODE", +"Part":"Low"}}, + +"192":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"XBADOP", +"Part":"Low"}}, + +"197":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"XNODRIVE", +"Part":"Low"}}, + +"202":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DRead", +"Part":"Low"}}, + +"204":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DWrite", +"Part":"Low"}}, + +"206":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DStatus", +"Part":"Low"}}, + +"208":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DControl", +"Part":"Low"}}, + +"210":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"BadReq", +"Part":"Low"}}, + +"212":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"BadReq", +"Part":"Low"}}, + +"214":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"BadOp", +"Part":"Low"}}, + +"216":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"BadOp", +"Part":"Low"}}, + +"218":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DInit", +"Part":"Low"}}, + +"220":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DRepeat", +"Part":"Low"}}, + +"240":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SIR_Len", +"Part":"Low"}}, + +"295":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"XNODRIVE", +"Part":"Low"}}, + +"299":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"XNORESRC", +"Part":"Low"}}, + +"499":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"ReqCnt", +"Part":"Low"}}, + +"511":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SosBlk", +"Part":"Low"}}, + +"516":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"XBLKNUM", +"Part":"Low"}}, + +"523":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"XBYTECNT", +"Part":"Low"}}, + +"635":{ +"Length":6, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"645":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"ReqCnt", +"Part":"Low"}}, + +"661":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SosBlk", +"Part":"Low"}}, + +"685":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SosBlk", +"Part":"Low"}}, + +"690":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SosBuf", +"Part":"Low"}}, + +"692":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SosBuf", +"Part":"Low"}}, + +"696":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SosBufTmp", +"Part":"Low"}}, + +"915":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"XCTLCODE", +"Part":"Low"}}, + +"1048":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"T277A", +"Part":"Low"}}, + +"1050":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"T26F6", +"Part":"Low"}}, + +"1052":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"T278A", +"Part":"Low"}}, + +"1054":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"T2796", +"Part":"Low"}}, + +"1056":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"T2713", +"Part":"Low"}}, + +"1138":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1146":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1154":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1162":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1170":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1178":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1186":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1194":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1202":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1210":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1218":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1226":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1234":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1242":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1250":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1258":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1266":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1274":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1282":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1290":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1298":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1306":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1314":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1322":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1330":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1338":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1346":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1354":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1362":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1370":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1378":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1386":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1394":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1402":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1410":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1418":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1426":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1434":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1442":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1450":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1458":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1466":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1474":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1482":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1490":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1498":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1506":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1514":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1522":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1530":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1538":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1546":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1554":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1562":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1570":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1578":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1586":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1594":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1602":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1610":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1618":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1626":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1634":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1642":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1650":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1658":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1666":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1674":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1682":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1690":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1698":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1706":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1714":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1722":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1730":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1738":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1746":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1754":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1762":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1770":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1778":{ +"Length":4, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}}, + +"LvTables":{ +}, + +"Visualizations":[], +"VisualizationAnimations":[], +"VisualizationSets":{ +}, + +"RelocList":{ +}, + +"DbrValues":{ +}} diff --git a/drivers/duofile/df1.driver_code_0x2000_cc65.cfg b/drivers/duofile/df1.driver_code_0x2000_cc65.cfg new file mode 100644 index 0000000..b6613f2 --- /dev/null +++ b/drivers/duofile/df1.driver_code_0x2000_cc65.cfg @@ -0,0 +1,9 @@ +# 6502bench SourceGen generated linker script for df1.driver_code_0x2000 +MEMORY { + MAIN: file=%O, start=%S, size=65536; +} +SEGMENTS { + CODE: load=MAIN, type=rw; +} +FEATURES {} +SYMBOLS {} diff --git a/drivers/duofile/df1.driver_code_0x2000_cc65.s b/drivers/duofile/df1.driver_code_0x2000_cc65.s new file mode 100644 index 0000000..95e0943 --- /dev/null +++ b/drivers/duofile/df1.driver_code_0x2000_cc65.s @@ -0,0 +1,818 @@ +; Target assembler: cc65 v2.18.0 [--target none -C df1.driver_code_0x2000_cc65.cfg] +; 6502bench SourceGen v1.8.1 + .setcpu "6502" +XREQCODE = $20 +XCTLCODE = $21 +XNORESRC = $25 +XBADOP = $26 +XNODRIVE = $28 +XBYTECNT = $2c +XBLKNUM = $2d + +SIR_Len = $05 +ReqCode = $c0 +SOS_Unit = $c1 +CtlStat = $c2 +SosBuf = $c2 +CSList = $c3 +ReqCnt = $c4 +SosBlk = $c6 +QtyRead = $c8 +AllocSIR = $1913 +SysErr = $1928 +MOTOROFF = $c088 +Q6L = $c08c + +; UNIFILE / DUOFILE SOS Driver +; +; Device identification Block (DIB) #1 +; + .org $2000 +DIB1: .word DIB2 ;Link pointer to next DIB + .word Entry ;Entry pointer + .byte $04 ;Name length byte + .byte ".DF1" ;Device name + .res 11,$00 + .byte $80 ;Active, no page alignment +DIB1_Slot: + .byte $01 ;Slot number + .byte $00 ;Unit number + .byte $f1 ;Type + .byte $03 ;Subtype + .byte $00 ;Filler +DIB1_Blks: + .word $06a6 ;# Blocks in device + .word $0001 ;Manufacturer + .word $101a ;Driver version + .word $0005 ;DCB length followed by DCB +L2022: .byte $00 +L2023: .byte $ff +L2024: .byte $02 +L2025: .byte $06 + .byte $00 +; +; Device identification Block (DIB) #2 +; +DIB2: .word $0000 ;Link pointer to next DIB + .word Entry ;Entry pointer + .byte $04 ;Name length byte + .byte ".DF2" ;Device name + .res 11,$00 + .byte $80 ;Active, no page alignment + .byte $01 ;Slot number + .byte $01 ;Unit number + .byte $f1 ;Type + .byte $03 ;Subtype + .byte $00 ;Filler + .word $06a6 ;# Blocks in device + .word $0001 ;Manufacturer + .word $101a ;Driver version + .word $0000 ;DCB length followed by DCB +; + .byte "(C) APPLE COMPUTER INC. 1982" +; +SIR_Addr: + .byte $67 + .byte $20 + .byte $10 + .byte $00 + .byte $00 + .byte $00 + .byte $00 +L206C: .byte $00 +L206D: .byte $00 +L206E: .byte $00 +L206F: .byte $00 +L2070: .byte $00 +L2071: .byte $00 +L2072: .byte $00 +L2073: .byte $00 +L2074: .byte $00 +L2075: .byte $00 +L2076: .byte $00 +L2077: .byte $00 +L2078: .byte $00 +L2079: .byte $00 + .byte $00 +L207B: .res 8,$00 +L2083: .byte $00 +L2084: .byte $00 +L2085: .byte $00 +L2086: .byte $00 + .byte $17 + +Entry: lda ReqCode + cmp #$08 + beq @L2093 + lda L206C + bne L20BD +@L2093: lda ReqCode + cmp #$09 + beq @L209C + sta L2077 +@L209C: jsr @L20AA + lda #$96 + jsr L230F + lda #$00 + jsr $1922 + rts + +@L20AA: lda ReqCode + cmp #$0a + bcs BadReq + asl A + tay + lda DoTable+1,y + pha + lda DoTable,y + pha + rts + +BadReq: lda #XREQCODE ;Bad request code! +L20BD: jsr SysErr +; +BadOp: lda #XBADOP ;Invalid operation! + jsr SysErr +; + lda #XNODRIVE ;Drive not connected + jsr SysErr +; +; +DoTable: .word DRead-1 ;0 Read request + .word DWrite-1 ;1 Write request + .word DStatus-1 ;2 Status request + .word DControl-1 ;3 Control request + .word BadReq-1 ;4 Unused + .word BadReq-1 ;5 Unused + .word BadOp-1 ;6 Unused + .word BadOp-1 ;7 Unused + .word DInit-1 ;8 Init request + .word DRepeat-1 ;9 Repeat last read or write request + +; +; D_INIT call processing +; +DInit: bit L2083 + bmi @L2123 + dec L2083 + lda DIB1_Slot + clc + adc SIR_Addr+2 + sta SIR_Addr+2 + lda #SIR_Len + ldx SIR_Addr + ldy SIR_Addr+1 + jsr AllocSIR + bcs @L212B + lda DIB1_Slot + asl A + asl A + asl A + asl A + sta L206D + lda #$01 + jsr L22E0 + bcc @L2118 + jsr L2323 + lda #$01 + jsr L22E0 + bcs @L2127 +@L2118: lda $ca28 + cmp #$d5 + beq @L2123 + cmp #$ad + bne @L2127 +@L2123: jsr L277D + rts + +@L2127: lda #XNODRIVE ;Drive not connected + bne @L212D + +@L212B: lda #XNORESRC ;Resource not available +@L212D: sta L206C + jsr SysErr +; +; D_READ call processing +; +DRead: lda #$00 ;Zero # bytes read + tay + sta (QtyRead),y + iny + sta (QtyRead),y + jsr L21E4 +L213E: jsr L2229 + jsr L22DD + bcs IO_Error +L2146: lda #$08 + jsr L232A + lda #$aa + jsr L230F + jsr L22DD + bcs IO_Error +L2155: jsr L2246 + beq @L216A + bcc @L215F + jsr SysErr +@L215F: dec L206E + ldx L206E + bpl L2146 + jsr SysErr +@L216A: ldx #$7f + ldy #$00 +@L216E: lda $c980,x + sta ($ca),y + lda $c900,x + sta ($cc),y + lda $c880,x + sta ($ce),y + lda $c800,x + sta ($d0),y + dex + iny + bpl @L216E + lda #$02 + ldy #$01 + adc (QtyRead),y + sta (QtyRead),y + jsr L2210 + bne L213E + rts + +IO_Error: + lda #$27 ;I/O error + jsr SysErr +; +; D_WRITE call processing +; +DWrite: jsr L21E4 +@L219C: jsr L22DD + bcs IO_Error + lda #$05 + jsr L232A + ldy #$7f +@L21A8: lda ($ca),y + sta $c80c,y + lda ($cc),y + sta $c88c,y + lda ($ce),y + sta $c90c,y + lda ($d0),y + sta $c98c,y + dey + bpl @L21A8 + lda #$aa + jsr L230F + jsr L22DD + bcs IO_Error + jsr L2246 + beq @L21DE + bcc @L21D3 + jsr SysErr +@L21D3: dec L206E + ldx L206E + bpl @L219C + jsr SysErr +@L21DE: jsr L2210 + bne @L219C + rts + +L21E4: lda SOS_Unit + sta L2076 + lda L2022 + sta L206E + lda ReqCnt + bne @L21FA + lda ReqCnt+1 + bne @L21FA +@L21F7: jmp SysErr + +@L21FA: lda SosBlk + cmp DIB1_Blks + lda SosBlk+1 + sbc DIB1_Blks+1 + lda #XBLKNUM ;Block number to large + bcs @L21F7 + jsr L2281 + lda #XBYTECNT ;Byte count not a multiple of 512 + bcc @L21F7 + rts + +L2210: ldx #$06 +@L2212: inc $cb,x + inc $cb,x + dex + dex + bpl @L2212 + inc L2072 + bne @L2222 + inc L2073 +@L2222: jsr L2229 + dec L206F + rts + +L2229: lda $cb + cmp #$82 + bcc @L2245 + ldx $14cb + bpl @L2245 + cpx #$8f + bcs @L2245 + ldx #$08 +@L223A: inc $14c9,x + asl $c9,x + lsr $c9,x + dex + dex + bne @L223A +@L2245: rts + +L2246: ldx #$06 +@L2248: lda $ca29,x + sta L207B,x + dex + bpl @L2248 + sec + lda $ca29 + bpl @L2272 + and #$70 + sta L2074 + ldx #$05 +@L225E: lda @L227B,x + bit L2074 + bne @L226D + dex + dex + bpl @L225E +@L226A: lda #$27 + rts + +@L226D: dex + lda @L227B,x + rts + +@L2272: lda $ca2a + clc + bmi @L226A + lda #$00 + rts + +@L227B: .byte $2e,$10,$27,$20,$2b,$40 + +L2281: lda ReqCnt + bne @L22DB + lda ReqCnt+1 + lsr A + bcs @L22DB + sta L206F + clc + adc SosBlk + sta L2074 + lda #$00 + adc SosBlk+1 + sta L2075 + lda DIB1_Blks + cmp L2074 + lda DIB1_Blks+1 + sbc L2075 + bcc @L22DB + lda SosBlk + sta L2072 + lda SosBlk+1 + sta L2073 +; Sets up 4 zero page pointers ca, cc, ce, d0 to be able to copy the 512 bytes +; of data in four 128 byte chunks + lda SosBuf + ldx SosBuf+1 + sta $ca ;setup buffer pointer one + stx $cb + ldy #$02 ;now setup 3 more pointers, in $80 increments +@L22BC: clc + adc #$80 + sta $00ca,y + bcc @L22C5 + inx +@L22C5: stx $cb,y + iny + iny + cpy #$08 + bne @L22BC + lda $14c3 ;setup the xbyte for the pointers + ldx #$06 +@L22D2: sta $14cb,x + dex + dex + bpl @L22D2 + sec + rts + +@L22DB: clc + rts + +L22DD: lda L2023 +L22E0: sta L2071 +@L22E3: jsr @L22EE + bcc @L22ED + dec L2071 + bne @L22E3 +@L22ED: rts + +@L22EE: lda #$a0 + sta L2070 + ldy #$00 + ldx L206D +@L22F8: lda Q6L,x + bmi @L2307 + dey + bne @L22F8 + dec L2070 + bne @L22F8 + sec + rts + +@L2307: clc + lda DIB1_Slot + jsr $1922 + rts + +L230F: sta $ca28 + ldx L206D + ldy #$00 +@L2317: lda MOTOROFF,x + bpl @L2321 + dey + bne @L2317 + sec + rts + +@L2321: clc + rts + +L2323: ldx L206D + lda $c084,x + rts + +L232A: tay + sta $ca20 + lda L2084 + sta $ca24 + lda L2085 + sta $ca25 + lda SOS_Unit + sta $ca23 + lda L2072 + sta $ca22 + lda L2073 + sta $ca21 + lda Entry-1 + sta $ca26 + lda L2086 + sta $ca27 + cpy #$06 + bne @L2370 + lda #$00 + sta $ca24 + lda #$13 + sta $ca26 + lda #$00 + sta $ca27 + ldx L2024 + stx $ca21 +@L2370: cpy #$03 + bne @L2381 + ldy #$00 + lda (CSList),y + sta $ca26 + iny + lda (CSList),y + sta $ca27 +@L2381: rts + +; +; D_STATUS call processing +; +DStatus: ldx #$01 + cpx CtlStat + beq @L23CC + dex + cpx CtlStat + beq @L2398 + dex + dex + cpx CtlStat + beq @L23D7 + lda #XCTLCODE ;Invalid control/status code + jsr SysErr +@L2398: jsr L22DD + bcc @L23A0 +@L239D: jmp IO_Error + +@L23A0: lda #$01 + jsr L232A + lda #$aa + jsr L230F + jsr L22DD + bcs @L239D + lda $ca29 + sta L2074 + lda #$40 + ldy #$05 +@L23B9: lsr L2074 + bcc @L23C1 + eor @L23C7-1,y +@L23C1: dey + bne @L23B9 + sta (CSList),y + rts + +@L23C7: .byte $04 + .byte $20 + .byte $40 + .byte $00 + .byte $02 + +; +; status code $01 +; +@L23CC: ldy #$06 +@L23CE: lda L207B,y + sta (CSList),y + dey + bpl @L23CE + rts + +@L23D7: ldy #$00 + lda #$ff + sta (CSList),y + iny + sta (CSList),y + rts + +; +; D_REPEAT - repeat the last D_READ or D_WRITE call +; +DRepeat: lda L2076 + cmp SOS_Unit + bne @L23F9 + lda L2077 + sta ReqCode + bne @L23F2 + jmp DRead + +@L23F2: cmp #$02 + bcs @L23F9 + jmp DWrite + +@L23F9: jmp BadOp + +; +; D_CONTROL call processing +; +DControl: + lda CtlStat ;CtlStat + cmp #$fe ;Format the device + beq @L2422 + lda CtlStat + cmp #$05 + bcs @L2413 + asl A + tay + lda @L2418+1,y + pha + lda @L2418,y + pha + rts + +@L2413: lda #$21 + jsr SysErr +; +@L2418: .word T277A-1 ;Reset device? + .word T26F6-1 + .word T278A-1 + .word T2796-1 + .word T2713-1 + +; control code $fe +; format disk?? +@L2422: jsr L22DD + bcc @L242A +@L2427: jmp IO_Error + +@L242A: ldy #$00 +@L242C: lda @L2472,y + sta $cb00,y + lda @L2572,y + sta $cc00,y + lda @L2672,y + sta $cd00,y + lda L2772,y + sta $ce00,y + iny + bne @L242C + lda #$06 + jsr L232A + lda #$aa + jsr L230F + lda #$00 + jsr L22E0 + bcc @L2465 + lda #$00 + jsr L22E0 + bcc @L2465 + jsr L2323 + jmp @L2427 + +@L2465: lda $ca29 + bmi @L246B + rts + +@L246B: cmp #$90 + bcc @L2427 + jmp L2155 + +; maybe Z8 code to do the formatting of the disk +@L2472: .byte $8b,$04,$97,$01,$02,$00,$8f,$e6 + .byte $39,$80,$e6,$04,$10,$e6,$05,$4b + .byte $d6,$00,$18,$31,$10,$b0,$12,$56 + .byte $33,$01,$e6,$31,$3f,$e6,$04,$10 + .byte $e6,$05,$4e,$d6,$00,$18,$d6,$13 + .byte $ed,$d6,$13,$bd,$7b,$2a,$d6,$13 + .byte $f3,$6b,$05,$d6,$13,$bc,$7b,$20 + .byte $d6,$13,$59,$7b,$1b,$20,$31,$56 + .byte $31,$3f,$a6,$31,$2e,$eb,$e7,$06 + .byte $33,$02,$20,$12,$a6,$12,$02,$1b + .byte $c9,$e4,$1a,$3b,$b0,$39,$b0,$3a + .byte $af,$31,$10,$0c,$05,$e4,$1a,$0d + .byte $d6,$14,$0a,$d6,$13,$76,$fb,$0d + .byte $d6,$13,$76,$fb,$08,$d6,$13,$ec + .byte $31,$10,$0a,$ec,$df,$af,$31,$10 + .byte $8c,$16,$38,$eb,$4c,$ff,$d6,$13 + .byte $b3,$31,$10,$1c,$81,$7b,$1b,$98 + .byte $0e,$92,$48,$31,$10,$3a,$ef,$9c + .byte $00,$38,$eb,$1c,$82,$82,$48,$a6 + .byte $e4,$ff,$eb,$06,$a0,$e8,$3a,$f5 + .byte $cf,$af,$31,$10,$38,$12,$e0,$e3 + .byte $44,$31,$e3,$e4,$11,$39,$e4,$13 + .byte $3a,$df,$af,$e6,$04,$10,$e6,$05 + .byte $33,$8d,$00,$18,$af,$e6,$1a,$38 + .byte $d6,$14,$0a,$d6,$13,$76,$31,$00 + .byte $fb,$15,$d6,$13,$76,$31,$00,$fb + .byte $0e,$26,$1a,$02,$a6,$1a,$18,$9b + .byte $e7,$e6,$11,$85,$8d,$13,$a2,$26 + .byte $1a,$02,$ac,$13,$bc,$05,$c8,$1a + .byte $92,$ca,$cf,$af,$af,$e4,$00,$1e + .byte $e6,$1b,$17,$31,$20,$e6,$04,$10 + .byte $e6,$05,$3c,$d6,$00,$18,$a4,$1e +@L2572: .byte $45,$6b,$05,$e4,$45,$1e,$00,$1b + .byte $af,$af,$e4,$1a,$0d,$d6,$15,$02 + .byte $d6,$15,$17,$31,$20,$e4,$1b,$07 + .byte $56,$e4,$7f,$92,$48,$31,$00,$b0 + .byte $f6,$46,$e3,$40,$46,$e0,$c0,$4c + .byte $01,$5c,$f4,$e6,$0a,$0a,$f0,$0c + .byte $2c,$ff,$d6,$14,$09,$80,$e4,$eb + .byte $f2,$a0,$e4,$80,$e4,$2c,$a9,$00 + .byte $ea,$6b,$05,$44,$33,$33,$8b,$f1 + .byte $ff,$f0,$0a,$f0,$0a,$4c,$0b,$82 + .byte $ce,$28,$ec,$a0,$ee,$00,$e4,$6b + .byte $04,$f0,$e5,$8b,$f2,$e6,$04,$05 + .byte $d6,$14,$fd,$44,$33,$33,$ff,$4c + .byte $04,$82,$ce,$28,$ec,$00,$e4,$6b + .byte $06,$a0,$ee,$f0,$05,$8b,$f2,$4c + .byte $02,$5c,$bf,$ff,$ff,$44,$33,$33 + .byte $ff,$2c,$96,$e6,$0f,$82,$80,$e4 + .byte $6b,$02,$8b,$f1,$f0,$05,$4c,$02 + .byte $82,$ce,$28,$ec,$a0,$ee,$00,$e4 + .byte $6b,$04,$f0,$05,$8b,$f2,$a0,$e8 + .byte $82,$68,$e4,$06,$0b,$b4,$1f,$eb + .byte $b4,$12,$eb,$ac,$01,$c2,$ca,$ac + .byte $15,$bc,$7a,$92,$ca,$2c,$ff,$e6 + .byte $0a,$01,$b8,$e6,$c2,$ca,$e6,$0a + .byte $15,$bc,$77,$92,$ca,$bc,$81,$92 + .byte $ca,$2c,$ff,$48,$ed,$fc,$73,$d6 + .byte $14,$f1,$f0,$ea,$d6,$14,$fd,$f0 + .byte $04,$ff,$00,$e7,$ed,$14,$4d,$44 + .byte $33,$33,$e6,$f6,$ff,$56,$e0,$3f + .byte $31,$20,$46,$e4,$80,$92,$48,$31 + .byte $00,$af,$44,$33,$33,$44,$33,$33 + .byte $f0,$05,$d6,$15,$01,$2c,$ff,$4a +@L2672: .byte $f1,$af,$e6,$04,$10,$e6,$05,$2a + .byte $d6,$00,$18,$e6,$04,$10,$e6,$05 + .byte $5a,$d6,$00,$18,$31,$10,$af,$31 + .byte $00,$78,$1b,$d6,$15,$4f,$ec,$15 + .byte $fc,$76,$58,$31,$4c,$01,$c2,$c4 + .byte $92,$ce,$fe,$ac,$96,$92,$ae,$fe + .byte $58,$12,$c2,$c4,$92,$ce,$58,$31 + .byte $b6,$e5,$00,$59,$1f,$b4,$12,$e5 + .byte $c2,$c4,$fc,$7a,$92,$ce,$fc,$81 + .byte $92,$ae,$fc,$73,$ec,$15,$af,$a8 + .byte $e7,$b8,$e7,$be,$d0,$eb,$9c,$00 + .byte $8c,$16,$b0,$e5,$92,$58,$a0,$e8 + .byte $02,$5b,$92,$58,$a0,$e8,$22,$5b + .byte $5e,$26,$ea,$02,$ab,$ee,$9c,$00 + .byte $8c,$16,$af,$d5,$aa,$96,$ab,$ab + .byte $ab,$96,$ab,$de,$aa,$ff,$d5,$aa ;these look familiar for low level disk nibbles + .byte $ad,$ab,$de,$aa +; +; control code $01 +; +T26F6: jsr L22DD + bcc L26FE +L26FB: jmp IO_Error + +L26FE: lda #$03 + jsr L232A + lda #$aa + jsr L230F + jsr L22DD + bcs L26FB + lda $ca2a + bmi L26FB + rts + +; +; control code $04 +; +T2713: jsr L22DD + bcs L26FB + lda #$02 + jsr L232A + ldy #$00 + jsr L27A2 + stx $d8 + sta $d9 + lda (CSList),y + sta $14d9 + iny + jsr L27A2 + pha + txa + clc + adc $d8 + sta L2078 + pla + adc $d9 + sta L2079 + jsr L27A2 + stx $da + stx $ca27 + sta $ca26 + clc + adc #$b8 + sta $db + jsr @L275B + lda #$aa + jsr L230F +@L2755: jsr L22DD + bcs @L2755 + rts + +@L275B: ldy #$00 +L275D: lda ($d8),y + sta ($da),y + inc $d8 + bne @L2767 + inc $d9 +@L2767: inc $da + bne @L276D + inc $db +@L276D: lda $d8 + cmp L2078 +L2772: lda $d9 + sbc L2079 + bcc L275D + rts + +; +; control code $00 +; +T277A: jsr L2323 +L277D: lda L2025 + sta L2084 + lda DIB2-1 + sta L2085 + rts + +; +; control code $02 +; +T278A: ldy #$00 + jsr L27A2 + stx L2086 + sta Entry-1 + rts + +; +; control code $03 +; +T2796: ldy #$00 + jsr L27A2 + stx L2084 + sta L2085 + rts + +L27A2: lda (CSList),y + iny + tax + lda (CSList),y + iny + rts + diff --git a/drivers/unifile/.gitignore b/drivers/unifile/.gitignore new file mode 100644 index 0000000..78a0e8a --- /dev/null +++ b/drivers/unifile/.gitignore @@ -0,0 +1 @@ +df1.driver_code_0x2000_cc65 diff --git a/drivers/unifile/README.md b/drivers/unifile/README.md new file mode 100644 index 0000000..8ed6fc7 --- /dev/null +++ b/drivers/unifile/README.md @@ -0,0 +1,7 @@ +# Apple /// driver for Unifile + +Unifile/Duofile drivers have surfaced; this is the beginning of their disassembly and documentation. + +The code for the driver (`df1.driver_code_0x2000`) was extracted from a working disk using Rob Justice's a3driverutil +project: https://github.com/robjustice/a3driverutil . +The disassembly and reassembly can be reproduced with Andy McFadden's `6502Bench` tool: https://6502bench.com/ . diff --git a/drivers/unifile/UNIFILE.DRVR b/drivers/unifile/UNIFILE.DRVR new file mode 100644 index 0000000..f64f2cc Binary files /dev/null and b/drivers/unifile/UNIFILE.DRVR differ diff --git a/drivers/unifile/df1.driver_code_0x2000 b/drivers/unifile/df1.driver_code_0x2000 new file mode 100644 index 0000000..c1a9f7a Binary files /dev/null and b/drivers/unifile/df1.driver_code_0x2000 differ diff --git a/drivers/unifile/df1.driver_code_0x2000.dis65 b/drivers/unifile/df1.driver_code_0x2000.dis65 new file mode 100644 index 0000000..8e32f32 --- /dev/null +++ b/drivers/unifile/df1.driver_code_0x2000.dis65 @@ -0,0 +1,2142 @@ +### 6502bench SourceGen dis65 v1.0 ### +{ +"_ContentVersion":5, +"FileDataLength":1942, +"FileDataCrc32":-580850467, +"ProjectProps":{ +"CpuName":"6502", +"IncludeUndocumentedInstr":false, +"TwoByteBrk":true, +"EntryFlags":32702671, +"AutoLabelStyle":"Simple", +"AnalysisParams":{ +"AnalyzeUncategorizedData":false, +"DefaultTextScanMode":"LowHighAscii", +"MinCharsForString":4, +"SeekNearbyTargets":true, +"UseRelocData":false, +"SmartPlpHandling":false, +"SmartPlbHandling":true}, + +"PlatformSymbolFileIdentifiers":["RT:Apple/A3-ROM.sym65", +"RT:Apple/A3-IO.sym65", +"RT:Apple/SOS.sym65"], +"ExtensionScriptFileIdentifiers":["RT:Apple/SOS.cs"], +"ProjectSyms":{ +"AllocSIR":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"AllocSIR", +"Value":6419, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"CSList":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"CSList", +"Value":195, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"CtlStat":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"CtlStat", +"Value":194, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"Ph2Off":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"Ph2Off", +"Value":49284, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"QtyRead":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"QtyRead", +"Value":200, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"ReqCnt":{ +"DataDescriptor":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":true, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"ReqCnt", +"Value":196, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"ReqCode":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"ReqCode", +"Value":192, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"SelC800":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"SelC800", +"Value":6434, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"SIR_Len":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"SIR_Len", +"Value":5, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"SOS_Unit":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"SOS_Unit", +"Value":193, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"SosBlk":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"SosBlk", +"Value":198, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"SosBuf":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"SosBuf", +"Value":194, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"SysErr":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"SysErr", +"Value":6440, +"Source":"Project", +"Type":"ExternalAddr", +"LabelAnno":"None"}, + +"XBADOP":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XBADOP", +"Value":38, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}, + +"XBLKNUM":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XBLKNUM", +"Value":45, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}, + +"XBYTECNT":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XBYTECNT", +"Value":44, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}, + +"XCTLCODE":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XCTLCODE", +"Value":33, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}, + +"XNODRIVE":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XNODRIVE", +"Value":40, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}, + +"XNORESRC":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XNORESRC", +"Value":37, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}, + +"XREQCODE":{ +"DataDescriptor":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"Comment":"", +"HasWidth":false, +"Direction":"ReadWrite", +"MultiMask":null, +"Label":"XREQCODE", +"Value":32, +"Source":"Project", +"Type":"Constant", +"LabelAnno":"None"}}}, + +"AddressMap":[{ +"Offset":0, +"Addr":8192, +"Length":1942, +"PreLabel":"", +"IsRelative":false}], +"TypeHints":[{ +"Low":0, +"High":1, +"Hint":"InlineData"}, + +{ +"Low":37, +"High":37, +"Hint":"InlineData"}, + +{ +"Low":134, +"High":134, +"Hint":"Code"}, + +{ +"Low":136, +"High":136, +"Hint":"Code"}, + +{ +"Low":200, +"High":200, +"Hint":"Data"}, + +{ +"Low":220, +"High":220, +"Hint":"Code"}, + +{ +"Low":630, +"High":630, +"Hint":"Code"}, + +{ +"Low":893, +"High":893, +"Hint":"Code"}, + +{ +"Low":898, +"High":898, +"Hint":"Code"}, + +{ +"Low":988, +"High":988, +"Hint":"Code"}, + +{ +"Low":993, +"High":993, +"Hint":"Code"}, + +{ +"Low":1015, +"High":1015, +"Hint":"Code"}, + +{ +"Low":1043, +"High":1043, +"Hint":"Data"}, + +{ +"Low":1048, +"High":1052, +"Hint":"InlineData"}, + +{ +"Low":1133, +"High":1776, +"Hint":"InlineData"}, + +{ +"Low":1777, +"High":1777, +"Hint":"Code"}, + +{ +"Low":1778, +"High":1779, +"Hint":"InlineData"}, + +{ +"Low":1780, +"High":1780, +"Hint":"Code"}, + +{ +"Low":1781, +"High":1781, +"Hint":"InlineData"}, + +{ +"Low":1782, +"High":1782, +"Hint":"Code"}, + +{ +"Low":1806, +"High":1806, +"Hint":"Code"}, + +{ +"Low":1811, +"High":1811, +"Hint":"Code"}, + +{ +"Low":1906, +"High":1906, +"Hint":"Code"}, + +{ +"Low":1909, +"High":1909, +"Hint":"Code"}, + +{ +"Low":1914, +"High":1914, +"Hint":"Code"}, + +{ +"Low":1921, +"High":1921, +"Hint":"Code"}, + +{ +"Low":1930, +"High":1930, +"Hint":"Code"}], +"StatusFlagOverrides":{ +}, + +"Comments":{ +"0":"Link pointer to next DIB", +"2":"Entry pointer", +"4":"Name length byte", +"5":"Device name", +"20":"Active, no page alignment", +"21":"Slot number", +"22":"Unit number", +"23":"Type", +"24":"Subtype", +"25":"Filler", +"26":"# Blocks in device", +"28":"Manufacturer", +"30":"Driver version", +"32":"DCB length followed by DCB", +"37":"Link pointer to next DIB", +"39":"Entry pointer", +"41":"Name length byte", +"42":"Device name", +"57":"Active, no page alignment", +"58":"Slot number", +"59":"Unit number", +"60":"Type", +"61":"Subtype", +"62":"Filler", +"63":"# Blocks in device", +"65":"Manufacturer", +"67":"Driver version", +"69":"DCB length followed by DCB", +"185":"Bad request code!", +"190":"Invalid operation!", +"193":"Drive not connected", +"200":"0 Read request", +"202":"1 Write request", +"204":"2 Status request", +"206":"3 Control request", +"208":"4 Unused", +"210":"5 Unused", +"212":"6 Unused", +"214":"7 Unused", +"216":"8 Init request", +"218":"9 Repeat last read or write request", +"290":"Drive not connected", +"294":"Resource not available", +"302":"Zero # bytes read", +"399":"I/O error", +"492":"Positive request count, continue", +"496":"Positive request count, continue", +"511":"Block number too large", +"518":"Byte count not a multiple of 512", +"579":"Copy 7 Control/Status list bytes from device", +"689":"set up buffer pointer one", +"693":"now set up 3 more pointers, in $80 increments", +"712":"set up the xbyte for the pointers", +"910":"Invalid control/status code", +"1015":"CtlStat", +"1017":"Format the device", +"1081":"This would be pulling data from beyond the Z8 block???", +"1765":"these look familiar for low level disk nibbles"}, + +"LongComments":{ +"-2147483647":{ +"Text":"6502bench SourceGen v1.8.1", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"0":{ +"Text":" UNIFILE / DUOFILE SOS Driver Version 1.00A\r\n \r\n Device identification Block (DIB) #0\r\n \r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"37":{ +"Text":"\r\n Device identification Block (DIB) #1\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"200":{ +"Text":"\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"190":{ +"Text":"\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"195":{ +"Text":"\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"409":{ +"Text":"\r\nD_WRITE call processing\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"967":{ +"Text":"\r\nstatus code $01\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1806":{ +"Text":"\r\ncontrol code $04\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"71":{ +"Text":" ", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1053":{ +"Text":"\r\ncontrol code $fe\r\nformat disk??\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1133":{ +"Text":"maybe Z8 code to do the formatting of the disk", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1909":{ +"Text":"\r\ncontrol code $02\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1930":{ +"Text":"\r\ncontrol code $02\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"988":{ +"Text":"\r\nD_REPEAT - repeat the last D_READ or D_WRITE call\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"685":{ +"Text":"Sets up 4 zero page pointers ca, cc, ce, d0 to be able to copy the 512 bytes\r\nof data in four 128 byte chunks\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"220":{ +"Text":"\r\nD_INIT call processing\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"99":{ +"Text":" ", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"302":{ +"Text":"\r\nD_READ call processing\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"404":{ +"Text":"\r\nD_WRITE call processing\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"893":{ +"Text":"\r\nD_STATUS call processing\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1015":{ +"Text":"\r\nD_CONTROL call processing\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1043":{ +"Text":"\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"1777":{ +"Text":"\r\ncontrol code $01\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"798":{ +"Text":"\r\ncontrol code $00\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}, + +"978":{ +"Text":"\r\nstatus code fe\r\n\r\n", +"BoxMode":false, +"MaxWidth":80, +"BackgroundColor":0}}, + +"Notes":{ +}, + +"UserLabels":{ +"0":{ +"Label":"DIB0", +"Value":8192, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"37":{ +"Label":"DIB1", +"Value":8229, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"134":{ +"Label":"Entry", +"Value":8326, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"404":{ +"Label":"DWrite", +"Value":8596, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"893":{ +"Label":"DStatus", +"Value":9085, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1015":{ +"Label":"DControl", +"Value":9207, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"185":{ +"Label":"BadReq", +"Value":8377, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"190":{ +"Label":"BadOp", +"Value":8382, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"220":{ +"Label":"DInit", +"Value":8412, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"988":{ +"Label":"DRepeat", +"Value":9180, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"200":{ +"Label":"DoTable", +"Value":8392, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"399":{ +"Label":"IO_Error", +"Value":8591, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"21":{ +"Label":"DIB0_Slot", +"Value":8213, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"26":{ +"Label":"DIB0_Blks", +"Value":8218, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"99":{ +"Label":"SIR_Addr", +"Value":8291, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"302":{ +"Label":"DRead", +"Value":8494, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"133":{ +"Label":"Var21", +"Value":8325, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"101":{ +"Label":"Var01", +"Value":8293, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"102":{ +"Label":"Var02", +"Value":8294, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"103":{ +"Label":"Var03", +"Value":8295, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"104":{ +"Label":"Var04", +"Value":8296, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"105":{ +"Label":"Var05", +"Value":8297, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"106":{ +"Label":"LastError", +"Value":8298, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"107":{ +"Label":"SlotNum", +"Value":8299, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"108":{ +"Label":"Var08", +"Value":8300, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"109":{ +"Label":"Var09", +"Value":8301, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"110":{ +"Label":"Var0A", +"Value":8302, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"111":{ +"Label":"Var0B", +"Value":8303, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"112":{ +"Label":"Var0C", +"Value":8304, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"113":{ +"Label":"Var0D", +"Value":8305, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"114":{ +"Label":"Var0E", +"Value":8306, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"115":{ +"Label":"Var0F", +"Value":8307, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"116":{ +"Label":"LastUnit", +"Value":8308, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"121":{ +"Label":"StatusList", +"Value":8313, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"129":{ +"Label":"InitStatus", +"Value":8321, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"130":{ +"Label":"Var1E", +"Value":8322, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"131":{ +"Label":"Var1F", +"Value":8323, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"132":{ +"Label":"Var20", +"Value":8324, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1777":{ +"Label":"DCtrl01", +"Value":9969, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1806":{ +"Label":"DCtrl04", +"Value":9998, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1909":{ +"Label":"DCtrl02", +"Value":10101, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"798":{ +"Label":"DCtrl00", +"Value":8990, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1043":{ +"Label":"CtrlDispatch", +"Value":9235, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1921":{ +"Label":"DCtrl03", +"Value":10113, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1053":{ +"Label":"CtrlFE", +"Value":9245, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1038":{ +"Label":"BadCtl", +"Value":9230, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"967":{ +"Label":"DStat01", +"Value":9159, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"915":{ +"Label":"DStat00", +"Value":9107, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"978":{ +"Label":"DStatFE", +"Value":9170, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1782":{ +"Label":"DCtrlErr", +"Value":9974, +"Source":"User", +"Type":"NonUniqueLocalAddr", +"LabelAnno":"None"}, + +"1785":{ +"Label":"DCtrlOk", +"Value":9977, +"Source":"User", +"Type":"NonUniqueLocalAddr", +"LabelAnno":"None"}, + +"290":{ +"Label":"InitNoDrive", +"Value":8482, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"294":{ +"Label":"InitNoResource", +"Value":8486, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"34":{ +"Label":"DCB_Bytes", +"Value":8226, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"498":{ +"Label":"WriteError", +"Value":8690, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"289":{ +"Label":"DInitDone", +"Value":8481, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"744":{ +"Label":"Done", +"Value":8936, +"Source":"User", +"Type":"NonUniqueLocalAddr", +"LabelAnno":"None"}, + +"892":{ +"Label":"Done", +"Value":9084, +"Source":"User", +"Type":"NonUniqueLocalAddr", +"LabelAnno":"None"}, + +"1133":{ +"Label":"Z8Block1", +"Value":9325, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1389":{ +"Label":"Z8Block2", +"Value":9581, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1645":{ +"Label":"Z8Block3", +"Value":9837, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"117":{ +"Label":"LastReq", +"Value":8309, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1012":{ +"Label":"DRepeatErr", +"Value":9204, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"1005":{ +"Label":"Write", +"Value":9197, +"Source":"User", +"Type":"NonUniqueLocalAddr", +"LabelAnno":"None"}, + +"118":{ +"Label":"Var12", +"Value":8310, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"119":{ +"Label":"Var13", +"Value":8311, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"120":{ +"Label":"Var14", +"Value":8312, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"128":{ +"Label":"Var1C", +"Value":8320, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}, + +"579":{ +"Label":"CpyCSList", +"Value":8771, +"Source":"User", +"Type":"GlobalAddr", +"LabelAnno":"None"}}, + +"OperandFormats":{ +"0":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DIB1", +"Part":"Low"}}, + +"2":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"Entry", +"Part":"Low"}}, + +"5":{ +"Length":4, +"Format":"StringGeneric", +"SubFormat":"Ascii", +"SymbolRef":null}, + +"9":{ +"Length":11, +"Format":"Fill", +"SubFormat":"None", +"SymbolRef":null}, + +"24":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"25":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"26":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"28":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"30":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"32":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"37":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"39":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"Entry", +"Part":"Low"}}, + +"41":{ +"Length":1, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"42":{ +"Length":4, +"Format":"StringGeneric", +"SubFormat":"Ascii", +"SymbolRef":null}, + +"46":{ +"Length":11, +"Format":"Fill", +"SubFormat":"None", +"SymbolRef":null}, + +"63":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"65":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"67":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"69":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"71":{ +"Length":28, +"Format":"StringGeneric", +"SubFormat":"Ascii", +"SymbolRef":null}, + +"99":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"None", +"SymbolRef":null}, + +"121":{ +"Length":7, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"164":{ +"Length":3, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SelC800", +"Part":"Low"}}, + +"185":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SOS_BADREQCODE", +"Part":"Low"}}, + +"190":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SOS_BADOP", +"Part":"Low"}}, + +"195":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"XNODRIVE", +"Part":"Low"}}, + +"200":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DRead", +"Part":"Low"}}, + +"202":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DWrite", +"Part":"Low"}}, + +"204":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DStatus", +"Part":"Low"}}, + +"206":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DControl", +"Part":"Low"}}, + +"208":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"BadReq", +"Part":"Low"}}, + +"210":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"BadReq", +"Part":"Low"}}, + +"212":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"BadOp", +"Part":"Low"}}, + +"214":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"BadOp", +"Part":"Low"}}, + +"216":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DInit", +"Part":"Low"}}, + +"218":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DRepeat", +"Part":"Low"}}, + +"238":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SIR_Len", +"Part":"Low"}}, + +"290":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"XNODRIVE", +"Part":"Low"}}, + +"294":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SOS_NORESC", +"Part":"Low"}}, + +"399":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SOS_IOERR", +"Part":"Low"}}, + +"506":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SosBlk", +"Part":"Low"}}, + +"511":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SOS_BLKNUM", +"Part":"Low"}}, + +"518":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SOS_BYTECNT", +"Part":"Low"}}, + +"523":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Hex", +"SymbolRef":null}, + +"656":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SosBlk", +"Part":"Low"}}, + +"680":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SosBlk", +"Part":"Low"}}, + +"685":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SosBuf", +"Part":"Low"}}, + +"687":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"SosBuf", +"Part":"Low"}}, + +"801":{ +"Length":3, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"Ph2Off", +"Part":"Low"}}, + +"910":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"XCTLCODE", +"Part":"Low"}}, + +"988":{ +"Length":3, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"LastUnit", +"Part":"Low"}}, + +"993":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DRepeatErr", +"Part":"Low"}}, + +"1038":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"XCTLCODE", +"Part":"Low"}}, + +"1043":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DCtrl00", +"Part":"Low"}}, + +"1045":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DCtrl01", +"Part":"Low"}}, + +"1047":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DCtrl02", +"Part":"Low"}}, + +"1049":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DCtrl03", +"Part":"Low"}}, + +"1051":{ +"Length":2, +"Format":"NumericLE", +"SubFormat":"Symbol", +"SymbolRef":{ +"Label":"DCtrl04", +"Part":"Low"}}, + +"1133":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1141":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1149":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1157":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1165":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1173":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1181":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1189":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1197":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1205":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1213":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1221":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1229":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1237":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1245":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1253":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1261":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1269":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1277":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1285":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1293":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1301":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1309":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1317":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1325":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1333":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1341":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1349":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1357":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1365":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1373":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1381":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1389":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1397":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1405":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1413":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1421":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1429":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1437":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1445":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1453":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1461":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1469":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1477":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1485":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1493":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1501":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1509":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1517":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1525":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1533":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1541":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1549":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1557":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1565":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1573":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1581":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1589":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1597":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1605":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1613":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1621":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1629":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1637":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1645":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1653":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1661":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1669":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1677":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1685":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1693":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1701":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1709":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1717":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1725":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1733":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1741":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1749":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1757":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1765":{ +"Length":8, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1773":{ +"Length":4, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}, + +"1941":{ +"Length":1, +"Format":"Dense", +"SubFormat":"None", +"SymbolRef":null}}, + +"LvTables":{ +}, + +"Visualizations":[], +"VisualizationAnimations":[], +"VisualizationSets":{ +}, + +"RelocList":{ +}, + +"DbrValues":{ +}} diff --git a/drivers/unifile/df1.driver_code_0x2000_cc65.cfg b/drivers/unifile/df1.driver_code_0x2000_cc65.cfg new file mode 100644 index 0000000..b6613f2 --- /dev/null +++ b/drivers/unifile/df1.driver_code_0x2000_cc65.cfg @@ -0,0 +1,9 @@ +# 6502bench SourceGen generated linker script for df1.driver_code_0x2000 +MEMORY { + MAIN: file=%O, start=%S, size=65536; +} +SEGMENTS { + CODE: load=MAIN, type=rw; +} +FEATURES {} +SYMBOLS {} diff --git a/drivers/unifile/df1.driver_code_0x2000_cc65.s b/drivers/unifile/df1.driver_code_0x2000_cc65.s new file mode 100644 index 0000000..7f4bc58 --- /dev/null +++ b/drivers/unifile/df1.driver_code_0x2000_cc65.s @@ -0,0 +1,828 @@ +; Target assembler: cc65 v2.18.0 [--target none -C df1.driver_code_0x2000_cc65.cfg] +; 6502bench SourceGen v1.8.1 + .setcpu "6502" +SOS_BADREQCODE = $20 +XCTLCODE = $21 +SOS_NORESC = $25 +SOS_BADOP = $26 +SOS_IOERR = $27 +XNODRIVE = $28 +SOS_BYTECNT = $2c +SOS_BLKNUM = $2d + +SIR_Len = $05 +ReqCode = $c0 +SOS_Unit = $c1 +CtlStat = $c2 +SosBuf = $c2 +CSList = $c3 +ReqCnt = $c4 +SosBlk = $c6 +QtyRead = $c8 +AllocSIR = $1913 +SelC800 = $1922 +SysErr = $1928 +Ph2Off = $c084 +MOTOROFF = $c088 +Q6L = $c08c + +; UNIFILE / DUOFILE SOS Driver Version 1.00A +; +; Device identification Block (DIB) #0 +; + .org $2000 +DIB0: .word DIB1 ;Link pointer to next DIB + .word Entry ;Entry pointer + .byte $04 ;Name length byte + .byte ".DF1" ;Device name + .res 11,$00 + .byte $80 ;Active, no page alignment +DIB0_Slot: + .byte $02 ;Slot number + .byte $00 ;Unit number + .byte $f1 ;Type + .byte $03 ;Subtype + .byte $00 ;Filler +DIB0_Blks: + .word $06a6 ;# Blocks in device + .word $0001 ;Manufacturer + .word $100a ;Driver version + .word $0003 ;DCB length followed by DCB +DCB_Bytes: + .byte $00 + .byte $ff + .byte $02 +; +; Device identification Block (DIB) #1 +; +DIB1: .word $0000 ;Link pointer to next DIB + .word Entry ;Entry pointer + .byte $04 ;Name length byte + .byte ".DF2" ;Device name + .res 11,$00 + .byte $00 ;Active, no page alignment + .byte $02 ;Slot number + .byte $01 ;Unit number + .byte $f1 ;Type + .byte $03 ;Subtype + .byte $00 ;Filler + .word $06a6 ;# Blocks in device + .word $0001 ;Manufacturer + .word $100a ;Driver version + .word $0000 ;DCB length followed by DCB +; + .byte "(C) APPLE COMPUTER INC. 1982" +; +SIR_Addr: + .word $2065 +Var01: .byte $10 +Var02: .byte $00 +Var03: .byte $00 +Var04: .byte $00 +Var05: .byte $00 +LastError: + .byte $00 +SlotNum: .byte $00 +Var08: .byte $00 +Var09: .byte $00 +Var0A: .byte $00 +Var0B: .byte $00 +Var0C: .byte $00 +Var0D: .byte $00 +Var0E: .byte $00 +Var0F: .byte $00 +LastUnit: + .byte $00 +LastReq: .byte $00 +Var12: .byte $00 +Var13: .byte $00 +Var14: .byte $00 +StatusList: + .byte $00,$00,$00,$00,$00,$00,$00 +Var1C: .byte $00 +InitStatus: + .byte $00 +Var1E: .byte $06 +Var1F: .byte $00 +Var20: .byte $00 +Var21: .byte $17 + +Entry: lda ReqCode + cmp #$08 + beq @L2091 + lda LastError + bne L20BB +@L2091: lda ReqCode + cmp #$09 + beq @L209A + sta LastReq +@L209A: jsr @L20A8 + lda #$96 + jsr L230A + lda #$00 + jsr SelC800 + rts + +@L20A8: lda ReqCode + cmp #$0a + bcs BadReq + asl A + tay + lda DoTable+1,y + pha + lda DoTable,y + pha + rts + +BadReq: lda #SOS_BADREQCODE ;Bad request code! +L20BB: jsr SysErr +; +BadOp: lda #SOS_BADOP ;Invalid operation! + jsr SysErr +; + lda #XNODRIVE + jsr SysErr +; +; +DoTable: .word DRead-1 ;0 Read request + .word DWrite-1 ;1 Write request + .word DStatus-1 ;2 Status request + .word DControl-1 ;3 Control request + .word BadReq-1 ;4 Unused + .word BadReq-1 ;5 Unused + .word BadOp-1 ;6 Unused + .word BadOp-1 ;7 Unused + .word DInit-1 ;8 Init request + .word DRepeat-1 ;9 Repeat last read or write request + +; +; D_INIT call processing +; +DInit: bit InitStatus + bmi DInitDone + dec InitStatus + lda DIB0_Slot + clc + adc Var01 + sta Var01 + lda #SIR_Len + ldx SIR_Addr + ldy SIR_Addr+1 + jsr AllocSIR + bcs InitNoResource + lda DIB0_Slot + asl A + asl A + asl A + asl A + sta SlotNum + lda #$01 + jsr L22DB + bcc @L2116 + jsr DCtrl00 + lda #$01 + jsr L22DB + bcs InitNoDrive +@L2116: lda $ca28 + cmp #$d5 + beq DInitDone + cmp #$ad + bne InitNoDrive +DInitDone: + rts + +InitNoDrive: + lda #XNODRIVE ;Drive not connected + bne L2128 + +InitNoResource: + lda #SOS_NORESC ;Resource not available +L2128: sta LastError + jsr SysErr +; +; D_READ call processing +; +DRead: lda #$00 ;Zero # bytes read + tay + sta (QtyRead),y + iny + sta (QtyRead),y + jsr L21DF +L2139: jsr L2224 + jsr L22D8 + bcs IO_Error +L2141: lda #$08 + jsr L2325 + lda #$aa + jsr L230A + jsr L22D8 + bcs IO_Error +L2150: jsr L2241 + beq @L2165 + bcc @L215A + jsr SysErr +@L215A: dec Var08 + ldx Var08 + bpl L2141 + jsr SysErr +@L2165: ldx #$7f + ldy #$00 +@L2169: lda $c980,x + sta ($ca),y + lda $c900,x + sta ($cc),y + lda $c880,x + sta ($ce),y + lda $c800,x + sta ($d0),y + dex + iny + bpl @L2169 + lda #$02 + ldy #$01 + adc (QtyRead),y + sta (QtyRead),y + jsr L220B + bne L2139 + rts + +IO_Error: + lda #SOS_IOERR ;I/O error + jsr SysErr +; +; D_WRITE call processing +; +DWrite: jsr L21DF +@L2197: jsr L22D8 + bcs IO_Error + lda #$05 + jsr L2325 + ldy #$7f +@L21A3: lda ($ca),y + sta $c80c,y + lda ($cc),y + sta $c88c,y + lda ($ce),y + sta $c90c,y + lda ($d0),y + sta $c98c,y + dey + bpl @L21A3 + lda #$aa + jsr L230A + jsr L22D8 + bcs IO_Error + jsr L2241 + beq @L21D9 + bcc @L21CE + jsr SysErr +@L21CE: dec Var08 + ldx Var08 + bpl @L2197 + jsr SysErr +@L21D9: jsr L220B + bne @L2197 + rts + +L21DF: lda SOS_Unit + sta LastUnit + lda DCB_Bytes + sta Var08 + lda ReqCnt + bne L21F5 ;Positive request count, continue + lda ReqCnt+1 + bne L21F5 ;Positive request count, continue +WriteError: + jmp SysErr + +L21F5: lda SosBlk + cmp DIB0_Blks + lda SosBlk+1 + sbc DIB0_Blks+1 + lda #SOS_BLKNUM ;Block number too large + bcs WriteError + jsr L227C + lda #SOS_BYTECNT ;Byte count not a multiple of 512 + bcc WriteError + rts + +L220B: ldx #$06 +@L220D: inc $cb,x + inc $cb,x + dex + dex + bpl @L220D + inc Var0C + bne @L221D + inc Var0D +@L221D: jsr L2224 + dec Var09 + rts + +L2224: lda $cb + cmp #$82 + bcc @L2240 + ldx $14cb + bpl @L2240 + cpx #$8f + bcs @L2240 + ldx #$08 +@L2235: inc $14c9,x + asl $c9,x + lsr $c9,x + dex + dex + bne @L2235 +@L2240: rts + +L2241: ldx #$06 +CpyCSList: + lda $ca29,x ;Copy 7 Control/Status list bytes from device + sta StatusList,x + dex + bpl CpyCSList + sec + lda $ca29 + bpl @L226D + and #$70 + sta Var0E + ldx #$05 +@L2259: lda @L2276,x + bit Var0E + bne @L2268 + dex + dex + bpl @L2259 +@L2265: lda #$27 + rts + +@L2268: dex + lda @L2276,x + rts + +@L226D: lda $ca2a + clc + bmi @L2265 + lda #$00 + rts + +@L2276: rol DCtrl04+2 + jsr $402b +L227C: lda ReqCnt + bne @L22D6 + lda ReqCnt+1 + lsr A + bcs @L22D6 + sta Var09 + clc + adc SosBlk + sta Var0E + lda #$00 + adc SosBlk+1 + sta Var0F + lda DIB0_Blks + cmp Var0E + lda DIB0_Blks+1 + sbc Var0F + bcc @L22D6 + lda SosBlk + sta Var0C + lda SosBlk+1 + sta Var0D +; Sets up 4 zero page pointers ca, cc, ce, d0 to be able to copy the 512 bytes +; of data in four 128 byte chunks + lda SosBuf + ldx SosBuf+1 + sta $ca ;set up buffer pointer one + stx $cb + ldy #$02 ;now set up 3 more pointers, in $80 increments +@L22B7: clc + adc #$80 + sta $00ca,y + bcc @L22C0 + inx +@L22C0: stx $cb,y + iny + iny + cpy #$08 + bne @L22B7 + lda $14c3 ;set up the xbyte for the pointers + ldx #$06 +@L22CD: sta $14cb,x + dex + dex + bpl @L22CD + sec + rts + +@L22D6: clc + rts + +L22D8: lda DCB_Bytes+1 +L22DB: sta Var0B +@L22DE: jsr @L22E9 + bcc @Done + dec Var0B + bne @L22DE +@Done: rts + +@L22E9: lda #$a0 + sta Var0A + ldy #$00 + ldx SlotNum +@L22F3: lda Q6L,x + bmi @L2302 + dey + bne @L22F3 + dec Var0A + bne @L22F3 + sec + rts + +@L2302: clc + lda DIB0_Slot + jsr SelC800 + rts + +L230A: sta $ca28 + ldx SlotNum + ldy #$00 +@L2312: lda MOTOROFF,x + bpl @L231C + dey + bne @L2312 + sec + rts + +@L231C: clc + rts + +; +; control code $00 +; +DCtrl00: ldx SlotNum + lda Ph2Off,x + rts + +L2325: tay + sta $ca20 + lda Var1E + sta $ca24 + lda Var1F + sta $ca25 + lda SOS_Unit + sta $ca23 + lda Var0C + sta $ca22 + lda Var0D + sta $ca21 + lda Var21 + sta $ca26 + lda Var20 + sta $ca27 + cpy #$06 + bne @L236B + lda #$00 + sta $ca24 + lda #$13 + sta $ca26 + lda #$00 + sta $ca27 + ldx DCB_Bytes+2 + stx $ca21 +@L236B: cpy #$03 + bne @Done + ldy #$00 + lda (CSList),y + sta $ca26 + iny + lda (CSList),y + sta $ca27 +@Done: rts + +; +; D_STATUS call processing +; +DStatus: ldx #$01 + cpx CtlStat + beq DStat01 + dex + cpx CtlStat + beq DStat00 + dex + dex + cpx CtlStat + beq DStatFE + lda #XCTLCODE ;Invalid control/status code + jsr SysErr +DStat00: jsr L22D8 + bcc @L239B +@L2398: jmp IO_Error + +@L239B: lda #$01 + jsr L2325 + lda #$aa + jsr L230A + jsr L22D8 + bcs @L2398 + lda $ca29 + sta Var0E + lda #$40 + ldy #$05 +@L23B4: lsr Var0E + bcc @L23BC + eor @L23C2-1,y +@L23BC: dey + bne @L23B4 + sta (CSList),y + rts + +@L23C2: .byte $04 + .byte $20 + .byte $40 + .byte $00 + .byte $02 + +; +; status code $01 +; +DStat01: ldy #$06 +@L23C9: lda StatusList,y + sta (CSList),y + dey + bpl @L23C9 + rts + +; +; status code fe +; +DStatFE: ldy #$00 + lda #$ff + sta (CSList),y + iny + sta (CSList),y + rts + +; +; D_REPEAT - repeat the last D_READ or D_WRITE call +; +DRepeat: lda LastUnit + cmp SOS_Unit + bne DRepeatErr + lda LastReq + sta ReqCode + bne @Write + jmp DRead + +@Write: cmp #$02 + bcs DRepeatErr + jmp DWrite + +DRepeatErr: + jmp BadOp + +; +; D_CONTROL call processing +; +DControl: + lda CtlStat ;CtlStat + cmp #$fe ;Format the device + beq CtrlFE + lda CtlStat + cmp #$05 + bcs BadCtl + asl A + tay + lda CtrlDispatch+1,y + pha + lda CtrlDispatch,y + pha + rts + +BadCtl: lda #XCTLCODE + jsr SysErr +; +CtrlDispatch: + .word DCtrl00-1 + .word DCtrl01-1 + .word DCtrl02-1 + .word DCtrl03-1 + .word DCtrl04-1 +; +; control code $fe +; format disk?? +CtrlFE: jsr L22D8 + bcc @L2425 +@L2422: jmp IO_Error + +@L2425: ldy #$00 +@L2427: lda Z8Block1,y + sta $cb00,y + lda Z8Block2,y + sta $cc00,y + lda Z8Block3,y + sta $cd00,y + lda L276D,y ;This would be pulling data from beyond the Z8 block??? + sta $ce00,y + iny + bne @L2427 + lda #$06 + jsr L2325 + lda #$aa + jsr L230A + lda #$00 + jsr L22DB + bcc @L2460 + lda #$00 + jsr L22DB + bcc @L2460 + jsr DCtrl00 + jmp @L2422 + +@L2460: lda $ca29 + bmi @L2466 + rts + +@L2466: cmp #$90 + bcc @L2422 + jmp L2150 + +; maybe Z8 code to do the formatting of the disk +Z8Block1: + .byte $8b,$04,$97,$01,$02,$00,$8f,$e6 + .byte $39,$80,$e6,$04,$10,$e6,$05,$4b + .byte $d6,$00,$18,$31,$10,$b0,$12,$56 + .byte $33,$01,$e6,$31,$3f,$e6,$04,$10 + .byte $e6,$05,$4e,$d6,$00,$18,$d6,$13 + .byte $ed,$d6,$13,$bd,$7b,$2a,$d6,$13 + .byte $f3,$6b,$05,$d6,$13,$bc,$7b,$20 + .byte $d6,$13,$59,$7b,$1b,$20,$31,$56 + .byte $31,$3f,$a6,$31,$2e,$eb,$e7,$06 + .byte $33,$02,$20,$12,$a6,$12,$02,$1b + .byte $c9,$e4,$1a,$3b,$b0,$39,$b0,$3a + .byte $af,$31,$10,$0c,$05,$e4,$1a,$0d + .byte $d6,$14,$0a,$d6,$13,$76,$fb,$0d + .byte $d6,$13,$76,$fb,$08,$d6,$13,$ec + .byte $31,$10,$0a,$ec,$df,$af,$31,$10 + .byte $8c,$16,$38,$eb,$4c,$ff,$d6,$13 + .byte $b3,$31,$10,$1c,$81,$7b,$1b,$98 + .byte $0e,$92,$48,$31,$10,$3a,$ef,$9c + .byte $00,$38,$eb,$1c,$82,$82,$48,$a6 + .byte $e4,$ff,$eb,$06,$a0,$e8,$3a,$f5 + .byte $cf,$af,$31,$10,$38,$12,$e0,$e3 + .byte $44,$31,$e3,$e4,$11,$39,$e4,$13 + .byte $3a,$df,$af,$e6,$04,$10,$e6,$05 + .byte $33,$8d,$00,$18,$af,$e6,$1a,$38 + .byte $d6,$14,$0a,$d6,$13,$76,$31,$00 + .byte $fb,$15,$d6,$13,$76,$31,$00,$fb + .byte $0e,$26,$1a,$02,$a6,$1a,$18,$9b + .byte $e7,$e6,$11,$85,$8d,$13,$a2,$26 + .byte $1a,$02,$ac,$13,$bc,$05,$c8,$1a + .byte $92,$ca,$cf,$af,$af,$e4,$00,$1e + .byte $e6,$1b,$17,$31,$20,$e6,$04,$10 + .byte $e6,$05,$3c,$d6,$00,$18,$a4,$1e +Z8Block2: + .byte $45,$6b,$05,$e4,$45,$1e,$00,$1b + .byte $af,$af,$e4,$1a,$0d,$d6,$15,$02 + .byte $d6,$15,$17,$31,$20,$e4,$1b,$07 + .byte $56,$e4,$7f,$92,$48,$31,$00,$b0 + .byte $f6,$46,$e3,$40,$46,$e0,$c0,$4c + .byte $01,$5c,$f4,$e6,$0a,$0a,$f0,$0c + .byte $2c,$ff,$d6,$14,$09,$80,$e4,$eb + .byte $f2,$a0,$e4,$80,$e4,$2c,$a9,$00 + .byte $ea,$6b,$05,$44,$33,$33,$8b,$f1 + .byte $ff,$f0,$0a,$f0,$0a,$4c,$0b,$82 + .byte $ce,$28,$ec,$a0,$ee,$00,$e4,$6b + .byte $04,$f0,$e5,$8b,$f2,$e6,$04,$05 + .byte $d6,$14,$fd,$44,$33,$33,$ff,$4c + .byte $04,$82,$ce,$28,$ec,$00,$e4,$6b + .byte $06,$a0,$ee,$f0,$05,$8b,$f2,$4c + .byte $02,$5c,$bf,$ff,$ff,$44,$33,$33 + .byte $ff,$2c,$96,$e6,$0f,$82,$80,$e4 + .byte $6b,$02,$8b,$f1,$f0,$05,$4c,$02 + .byte $82,$ce,$28,$ec,$a0,$ee,$00,$e4 + .byte $6b,$04,$f0,$05,$8b,$f2,$a0,$e8 + .byte $82,$68,$e4,$06,$0b,$b4,$1f,$eb + .byte $b4,$12,$eb,$ac,$01,$c2,$ca,$ac + .byte $15,$bc,$7a,$92,$ca,$2c,$ff,$e6 + .byte $0a,$01,$b8,$e6,$c2,$ca,$e6,$0a + .byte $15,$bc,$77,$92,$ca,$bc,$81,$92 + .byte $ca,$2c,$ff,$48,$ed,$fc,$73,$d6 + .byte $14,$f1,$f0,$ea,$d6,$14,$fd,$f0 + .byte $04,$ff,$00,$e7,$ed,$14,$4d,$44 + .byte $33,$33,$e6,$f6,$ff,$56,$e0,$3f + .byte $31,$20,$46,$e4,$80,$92,$48,$31 + .byte $00,$af,$44,$33,$33,$44,$33,$33 + .byte $f0,$05,$d6,$15,$01,$2c,$ff,$4a +Z8Block3: + .byte $f1,$af,$e6,$04,$10,$e6,$05,$2a + .byte $d6,$00,$18,$e6,$04,$10,$e6,$05 + .byte $5a,$d6,$00,$18,$31,$10,$af,$31 + .byte $00,$78,$1b,$d6,$15,$4f,$ec,$15 + .byte $fc,$76,$58,$31,$4c,$01,$c2,$c4 + .byte $92,$ce,$fe,$ac,$96,$92,$ae,$fe + .byte $58,$12,$c2,$c4,$92,$ce,$58,$31 + .byte $b6,$e5,$00,$59,$1f,$b4,$12,$e5 + .byte $c2,$c4,$fc,$7a,$92,$ce,$fc,$81 + .byte $92,$ae,$fc,$73,$ec,$15,$af,$a8 + .byte $e7,$b8,$e7,$be,$d0,$eb,$9c,$00 + .byte $8c,$16,$b0,$e5,$92,$58,$a0,$e8 + .byte $02,$5b,$92,$58,$a0,$e8,$22,$5b + .byte $5e,$26,$ea,$02,$ab,$ee,$9c,$00 + .byte $8c,$16,$af,$d5,$aa,$96,$ab,$ab + .byte $ab,$96,$ab,$de,$aa,$ff,$d5,$aa ;these look familiar for low level disk nibbles + .byte $ad,$ab,$de,$aa +; +; control code $01 +; +DCtrl01: jsr L22D8 + bcc DCtrlOk +DCtrlErr: + jmp IO_Error + +DCtrlOk: lda #$03 + jsr L2325 + lda #$aa + jsr L230A + jsr L22D8 + bcs DCtrlErr + lda $ca2a + bmi DCtrlErr + rts + +; +; control code $04 +; +DCtrl04: jsr L22D8 + bcs DCtrlErr + lda #$02 + jsr L2325 + ldy #$00 + jsr L278D + stx $d8 + sta $d9 + lda (CSList),y + sta $14d9 + iny + jsr L278D + pha + txa + clc + adc $d8 + sta Var12 + pla + adc $d9 + sta Var13 + jsr L278D + stx $da + stx $ca27 + sta $ca26 + clc + adc #$b8 + sta $db + jsr @L2756 + lda #$aa + jsr L230A +@L2750: jsr L22D8 + bcs @L2750 + rts + +@L2756: ldy #$00 +L2758: lda ($d8),y + sta ($da),y + inc $d8 + bne @L2762 + inc $d9 +@L2762: inc $da + bne @L2768 + inc $db +@L2768: lda $d8 + cmp Var12 +L276D: lda $d9 + sbc Var13 + bcc L2758 + rts + +; +; control code $02 +; +DCtrl02: ldy #$00 + jsr L278D + stx Var20 + sta Var21 + rts + +DCtrl03: ldy #$00 + jsr L278D + stx Var1E + sta Var1F + rts + +L278D: lda (CSList),y + iny + tax + lda (CSList),y + iny + rts + + .byte $00