From 8348d6d2dc903eae36536c2a20b9e829e6bea603 Mon Sep 17 00:00:00 2001 From: Florian Reitz Date: Tue, 29 May 2018 22:08:17 +0200 Subject: [PATCH] Status00 call updated --- AppleIISd.bin | Bin 2048 -> 2048 bytes AppleIISd.hex | 48 +++++++++++++++++++++++----------------------- README.md | 21 +++++++++++++++++--- src/AppleIISd.inc | 2 ++ src/Smartport.s | 21 ++++++++++++++++++-- 5 files changed, 63 insertions(+), 29 deletions(-) diff --git a/AppleIISd.bin b/AppleIISd.bin index 4212df197ca6d350b210275c7b73afb6c560b517..d0021111a726a2fe663be4dcb732af8b6c2d4466 100644 GIT binary patch delta 164 zcmZn=Xb{*inT7G)(mEkpr(}!5|bTS#rf*aOkhk{ zX1B!Nr|y(O-Q+aZcDH{-S>101valXPc6BrYg*)6g6sXL`mIJua$ vT`l}f%9%rFw9lMBa}x;f0-=CoK!A^HY;>@T0t7HI2yHfGJI^@TflUqo@N7RD diff --git a/AppleIISd.hex b/AppleIISd.hex index f2f7318..2483e72 100644 --- a/AppleIISd.hex +++ b/AppleIISd.hex @@ -71,32 +71,32 @@ :10046000F9BABD0D0185481869039D0D01BD0E0146 :10047000854969009D0E01A001B1488542C8B14877 :10048000AAC8B14885498648A901A642E00AB01A1F -:10049000B248DDE1CCD027A001B148A43F9978064D +:10049000B248DDEECCD027A001B148A43F99780640 :1004A0008A0AAA20C2CBB002A900AAA00068994873 :1004B00000C8C00590F78AA002A200C90160A90483 -:1004C00080E87CEBCC2046CCA43FB97806D00EA5C2 -:1004D0004CF004A9213860A904924A1860A64CF097 -:1004E00016CAF008CACAF00FA9213860A901924AB9 -:1004F000A8A900914A1860A9E8A63E203FCAB00208 -:100500000910204BCA90020904924AA001A9FF9148 -:100510004AC8914AC8A900914AA54CF00CA004B958 -:10052000FBCC914AC8C01990F618602046CCA64C66 -:10053000F00FCAF00CCAF006CAF007CAF003A921EE -:100540003860A91F3860A002B148854AC8B1488503 -:100550004BC8B148854C602071CC900160A63EA488 -:100560003F4C7ECA2071CC900160A63EA43F4CE770 -:10057000CAB97806F044C901F00EC902F00EC903E9 -:10058000F010C904F0118032A53E8010A53E09800C -:10059000800AA53E3A8005A53E3A09808543A0021F -:1005A000B1488544C8B1488545C8B1488546C8B1F9 -:1005B000488547C8B148D0061860A9113860A92DF0 -:1005C0003860B97806F004A9001860A9113860B93C -:1005D000780618F003A9113860A9013860A92738F6 -:1005E0006003030301030101010404C5CB57CC647C -:1005F000CCC2CC2BCCCFCCD9CCD9CCDDCCDDCC1063 -:100600004150504C455D5B53442020202020202049 -:1006100002001200000000000000000000000000C6 -:1006200000000000000000000000000000000000CA +:1004C00080E87CF8CC2053CCA43FB97806D018A59E +:1004D0004CF004A9213860A904924AA007B90BCDB9 +:1004E000914A88D0F81860A64CF016CAF008CACA1B +:1004F000F00FA9213860A901924AA8A900914A18D1 +:1005000060A9E8A63E203FCAB0020910204BCA905D +:10051000020904924AA001A9FF914AC8914AC8A9B8 +:1005200000914AA54CF00CA004B90FCD914AC8C067 +:100530001990F618602053CCA64CF00FCAF00CCAE4 +:10054000F006CAF00ACAF003A92138A9001860A968 +:100550001F3860A002B148854AC8B148854BC8B170 +:1005600048854C60207ECC900160A63EA43F4C7E26 +:10057000CA207ECC900160A63EA43F4CE7CAB97861 +:1005800006F044C901F00EC902F00EC903F010C90B +:1005900004F0118032A53E8010A53E0980800AA596 +:1005A0003E3A8005A53E3A09808543A002B14885C0 +:1005B00044C8B1488545C8B1488546C8B148854753 +:1005C000C8B148D0061860A9113860A92D3860B9A3 +:1005D0007806F004A9001860A9113860B9780618E7 +:1005E000F003A9113860A9013860A9273860030316 +:1005F0000301030101010404C5CB64CC71CCCFCC51 +:1006000035CCDCCCE6CCE6CCEACCEACC4000000B26 +:10061000120000104150504C455D5B534420202097 +:100620002020202002000B1200000000000000002B :1006300000000000000000000000000000000000BA :1006400000000000000000000000000000000000AA :10065000000000000000000000000000000000009A diff --git a/README.md b/README.md index 7bbb50d..498be55 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ The assembler sources are written for CC65. The [schematics](AppleIISd.pdf) are ## Features * works with ProDOS and GS/OS -* up to 64MB storage space (2x 65535 blocks) -* ProDOS driver in ROM +* up to 128MB storage space (4x 65535 blocks) +* ProDOS and Smartport driver in ROM * Auto boot * Access LED * Card detect and write protect sensing @@ -27,6 +27,21 @@ The AppleIISd requires an enhanced IIe or IIgs computer. The ROM code uses some When a 2732 type ROM is used, the binary image has to be programmed at offset 0x800, because A11 is always high for compatibility with 2716 type ROMs. +## Smartport drive remapping +The AppleIISd features Smartport drivers in ROM to provide more than two drives in both GS/OS and ProDOS. + +As ProDOS supports only two drives per slot, additional drives on a Smartport device are mapped to 'phantom slots'. Version prior to version 2 supported only the remapping of drives when the card was in slot 5. Starting with version 2, the remapping seems to work on all slots. The following list shows the assignments as slot/drive, when no other devices are attached: + +* Slot 7: 7/1, 7/2, 4/1, 4/2 +* Slot 6: 6/1, 6/2, 4/1, 4/1 +* Slot 5: 5/1, 5/2, 2/1, 2/1 +* Slot 4: 4/1, 4/2, 1/1, 1/2 +* Slot 3: 80 col HW, not usable +* Slot 2: 2/1, 2/2, 4/1, 4/2 +* Slot 1: 1/1, 1/2, 4/1, 4/2 + +When more devices are connected, things get a little confusing ;-) + ## Building the sources Be sure to have the newest version of CC65 (V2.16) and some kind of Make instaled, then type one of the following comands: ``` @@ -73,7 +88,7 @@ LDA $C0C0 ## TODOs * Much more testing * SRAM option (may never work, though) -* Enable 4 or 6 volumes under GS/OS +* Enable more than 4 volumes under GS/OS * Use 28 pin socket to support other EPROMS than 2716 and 2732 ## Known Bugs diff --git a/src/AppleIISd.inc b/src/AppleIISd.inc index 3d38824..5659e3e 100644 --- a/src/AppleIISd.inc +++ b/src/AppleIISd.inc @@ -61,6 +61,8 @@ WP = $20 CD = $40 INITED = $80 +SMDRIVERVER = $120B ; Version 1.2 Beta + ; Error codes NO_ERR = $00 ERR_BADCMD = $01 diff --git a/src/Smartport.s b/src/Smartport.s index 85d82c4..da41235 100644 --- a/src/Smartport.s +++ b/src/Smartport.s @@ -122,8 +122,15 @@ SMSTATUS: JSR GETCSLIST SEC RTS +; TODO support partitions based on card size @STATUS00: LDA #4 ; support 4 partitions STA (SMCMDLIST) + + LDY #7 +@LOOP00: LDA STATUS00DATA-1,Y + STA (SMCMDLIST),Y + DEY + BNE @LOOP00 CLC RTS @@ -200,7 +207,9 @@ SMCONTROL: JSR GETCSLIST SEC @RESET: @SETDCB: -@EJECT: RTS +@EJECT: LDA #NO_ERR ; only return OK + CLC + RTS @IRQ: LDA #ERR_NOINT ; interrupts not supported SEC @@ -390,10 +399,18 @@ SPDISPATCH: .word SMREADCHAR .word SMWRITECHAR +; Status 00 command data +STATUS00DATA: + .byt $40 ; no interrupts + .word $0000 ; unknown vendor + .word SMDRIVERVER ; driver version + .byt $00, $00 ; reserved + .assert(*-STATUS00DATA)=7, error, "STATUS00DATA must be 7 bytes long" + ; Status 3 command data STATUS3DATA: .byt 16, "APPLE][SD " ; ID length and string, padded .byt $02 ; hard disk .byt $00 ; removable hard disk - .word $0012 ; driver version + .word SMDRIVERVER ; driver version .assert (*-STATUS3DATA)=21, error, "STATUS3DATA must be 21 bytes long"