Check for init failure

This commit is contained in:
Florian Reitz 2017-10-03 17:46:50 +02:00
parent 9c3b1c33ff
commit c438775789
4 changed files with 567 additions and 557 deletions

Binary file not shown.

View File

@ -1,64 +1,64 @@
:10000000A220A000A203863C2058FFBABD00018DAB
:10000000A220A000A203A0FF2058FFBABD00018DCE
:10001000F807290F853D0A0A0A0A852BAA2CFFCF6B
:1000200020B0CA9003A927002000C9C900F0010030
:1000200020AECA9003A927002000C9C900F0010032
:10003000A9018542A52BAA85436444A90885456486
:100040004664472CFFCF20D6CA4C0108D82058FF61
:100040004664472CFFCF20DDCA4C0108D82058FF5A
:10005000BABD00018DF807290F853D0A0A0A0A85F5
:100060002BAA2CFFCF20B0CA9004A927801BA980FF
:100060002BAA2CFFCF20AECA9004A927801BA98001
:100070003C83C0F022A542C900F010C901F00FC9AD
:1000800002F00EC903F00DA90138604CC8CA4CD665
:10009000CA4C44CB4CBACB2000C980D90000000028
:1000800002F00EC903F00DA90138604CC6CA4CDD60
:10009000CA4C4BCB4CC1CB2000C9B0ED80D700007F
:1000A0000000000000000000000000000000000050
:1000B0000000000000000000000000000000000040
:1000C0000000000000000000000000000000000030
:1000D0000000000000000000000000000000000020
:1000E0000000000000000000000000000000000010
:1000F0000000000000000000000000000000174C9D
:1000F000000000000000000000000000FFFF174C9F
:10010000D8A9039D81C0BD83C009019D83C0A907F3
:100110009D82C0A00AA9FF9D80C03C81C010FB88C1
:10012000D0F5BD83C029FE9D83C0A9BE8540A9CB63
:10013000854120F2C92006CAC901D039A9CA854023
:10014000A9CB854120F2C92021CAC901D02AA9D64C
:100150008540A9CB854120F2C92006CAA9DC85408B
:10016000A9CB854120F2C92006CAC901F0E0C90027
:10017000D0034CB2C94CE0C9A9D68540A9CB854172
:1001800020F2C9A9E28540A9CB854120F2C9200609
:10019000CAC901F0E3C900D0034CB2C9A9C4854063
:1001A000A9CB854120F2C92006CAC901F0F6C900D1
:1001B000D02EA9D08540A9CB854120F2C92006CAFE
:1001C000C900D01CA43DBD83C009809D83C0BD81F2
:1001D000C009049D81C018A000900838A028B00371
:1001E00038A027BD83C009019D83C0A9009D82C09E
:1001F00098605AA000B1409D80C03C81C010FBC8EF
:10020000C00690F17A60A9FF9D80C03C81C010FBC0
:10021000BD80C0853C2980D0EDA9FF9D80C0A53C54
:10022000602006CA485AA004A9FF9D80C03C81C036
:1002300010FBBD80C04888D0EFA43D6899F80568E0
:100240009978056899F804689978047AA9FF9D80DF
:10025000C06860DA5AA63DA5469DF805A5479D7879
:1002600005A9009DF8049D7804A9802443F005A900
:10027000019DF804A0091EF8053E78053EF8043EED
:10028000780488D0F17AFA605AA43D9D80C0B9788C
:10029000049D80C0B9F8049D80C0B978059D80C0D8
:1002A000B9F8059D80C0A9FF9D80C02006CA7A606C
:1002B00048A9403C83C018F00138686048A9203C38
:1002C00083C018F001386860A900A2FFA0FF20BC1D
:1002D000CA9002A92B6020B0CAB0642053CABD8363
:1002E000C029FE9D83C0A9512088CAC900D050A949
:1002F000FF9D80C0BD80C0C9FED0F4A002BD81C0FA
:1003000009109D81C0A9FF9D80C0643CBD80C09242
:1003100044E644D002E645E63CD0F188D0ECBD800E
:10032000C0BD80C0BD80C0BD81C029EF9D81C01807
:10033000A9000848BD83C009019D83C068286038B2
:10034000A92780EE20B0CAB06720BCCAB06720538E
:10035000CABD83C029FE9D83C0A9582088CAC90090
:10036000D04EA9FF9D80C0A9FE9D80C0A002643C24
:10037000B2449D80C0E644D002E645E63CD0F18818
:10038000D0EC9D80C09D80C09D80C0BD80C0291FD5
:10039000C905D01C18A9000848A9FF9D80C0BD80D0
:1003A000C0C900F0F4BD83C009019D83C068286006
:1003B00038A92780E238A92B80DD38A901604000E8
:1003C000000000954100000000F948000001AA87E4
:1003D0005000000200FF7700000000656940000047
:0803E00000776900000000FF36
:10012000D0F5BD83C029FE9D83C0A9C58540A9CB5C
:10013000854120F0C92004CAC901D039A9D1854020
:10014000A9CB854120F0C9201FCAC901D02AA9DD49
:100150008540A9CB854120F0C92004CAA9E3854088
:10016000A9CB854120F0C92004CAC901F0E0C9002B
:10017000D0034CB2C94CDEC9A9DD8540A9CB85416D
:1001800020F0C9A9E98540A9CB854120F0C9200408
:10019000CAC901F0E3C900D0034CB2C9A9CB85405C
:1001A000A9CB854120F0C92004CAC901F0F6C900D5
:1001B000D02CA9D78540A9CB854120F0C92004CAFD
:1001C000C900D01ABD83C009809D83C0BD81C0090C
:1001D000049D81C018A000900838A02FB00338A05B
:1001E00027BD83C009019D83C0A9009D82C098607E
:1001F0005AA000B1409D80C03C81C010FBC8C00621
:1002000090F17A60A9FF9D80C03C81C010FBBD8049
:10021000C0853C2980D0EDA9FF9D80C0A53C602011
:1002200004CA485AA004A9FF9D80C03C81C010FBAD
:10023000BD80C04888D0EFA43D6899F805689978DA
:10024000056899F804689978047AA9FF9D80C068C8
:1002500060DA5AA63DA5469DF805A5479D7805A9F3
:10026000009DF8049D7804A9802443F005A9019D10
:10027000F804A0091EF8053E78053EF8043E78040F
:1002800088D0F17AFA605AA43D9D80C0B978049D67
:1002900080C0B9F8049D80C0B978059D80C0B9F8C8
:1002A000059D80C0A9FF9D80C02004CA7A6048A92E
:1002B000403C83C018F00138686048A9203C83C0E6
:1002C00018F001386860A900A2FFA0FF20AECA9014
:1002D00004A92F800720BACA9002A92B6020AECAB9
:1002E000B0642051CABD83C029FE9D83C0A951209E
:1002F00086CAC900D050A9FF9D80C0BD80C0C9FE7C
:10030000D0F4A002BD81C009109D81C0A9FF9D80CD
:10031000C0643CBD80C09244E644D002E645E63C61
:10032000D0F188D0ECBD80C0BD80C0BD80C0BD8193
:10033000C029EF9D81C018A9000848BD83C00901EC
:100340009D83C068286038A92780EE20AECAB067B8
:1003500020BACAB0672051CABD83C029FE9D83C0A0
:10036000A9582086CAC900D04EA9FF9D80C0A9FE09
:100370009D80C0A002643CB2449D80C0E644D0028F
:10038000E645E63CD0F188D0EC9D80C09D80C09DC4
:1003900080C0BD80C0291FC905D01C18A90008480D
:1003A000A9FF9D80C0BD80C0C900F0F4BD83C00915
:1003B000019D83C068286038A92780E238A92B8076
:1003C000DD38A901604000000000954100000000F8
:1003D000F948000001AA875000000200FF770000E2
:0F03E0000000656940000000776900000000FF21
:00000001FF

File diff suppressed because it is too large Load Diff

View File

@ -54,7 +54,7 @@ INITED = $80
LDX #$20
LDY #$00
LDX #$03
STX WORK
LDY #$FF ; neither 5.25 nor Smartport
* find slot nr
@ -227,6 +227,7 @@ DRIVER CLD
:WRITE JMP WRITE
:FORMAT JMP FORMAT
:INIT JSR INIT
BCS :DONE ; init failure
BRA :CMD
@ -234,7 +235,7 @@ DRIVER CLD
DS \ ; fill with zeroes
DS -4 ; locate to $xxFC
DW $0000 ; use status request
DW $FFFF ; 65535 blocks
DB $17 ; Status bits
DB #<DRIVER ; LSB of driver
@ -247,7 +248,7 @@ DRIVER CLD
* Set - Error
* A $00 - No error
* $27 - I/O error - Init failed
* $28 - No card inserted
* $2F - No card inserted
*
********************************
@ -351,8 +352,7 @@ INIT CLD
CMP #$00
BNE :IOERROR ; error!
:END LDY SLOT
LDA SS,X
:END LDA SS,X
ORA #INITED ; initialized
STA SS,X
LDA CTRL,X
@ -362,7 +362,7 @@ INIT CLD
LDY #0
BCC :END1
:CDERROR SEC
LDY #$28 ; no card error
LDY #$2F ; no card error
BCS :END1
:IOERROR SEC
LDY #$27 ; init error
@ -563,9 +563,8 @@ WRPROT PHA
* C Clear - No error
* Set - Error
* A $00 - No error
* $27 - I/O error
* $28 - No card inserted / no init
* $2B - Card write protected
* $2F - No card inserted
* X - Blocks avail (low byte)
* Y - Blocks avail (high byte)
*
@ -575,7 +574,12 @@ STATUS LDA #0 ; no error
LDX #$FF ; 32 MB partition
LDY #$FF
JSR WRPROT
JSR CARDDET
BCC :WRPROT
LDA #$2F ; no card inserted
BRA :DONE
:WRPROT JSR WRPROT
BCC :DONE
LDA #$2B ; card write protected