Fixed bug in Write Block

This commit is contained in:
freitz85 2017-07-16 23:29:09 +02:00
parent 624bd4e9a7
commit 7391fa7cbc
2 changed files with 276 additions and 247 deletions

View File

@ -10,7 +10,7 @@
10 *
11 ********************************
12
16-JUL-17 15:06
16-JUL-17 23:22
14
15 XC ; enable 65C02 code
16 DEBUG = 1
@ -185,10 +185,10 @@
807F: A9 01 179 LDA #$01
8081: 60 180 RTS
181
8082: 4C B8 82 182 :STATUS JMP STATUS
8085: 4C C0 82 183 :READ JMP READ
8088: 4C 06 83 184 :WRITE JMP WRITE
808B: 4C 47 83 185 :FORMAT JMP FORMAT
8082: 4C A8 82 182 :STATUS JMP STATUS
8085: 4C B0 82 183 :READ JMP READ
8088: 4C FA 82 184 :WRITE JMP WRITE
808B: 4C 8A 83 185 :FORMAT JMP FORMAT
186
187 * Signature bytes
188
@ -259,7 +259,7 @@
811F: A9 0E 223 LDA #SS0 ; set CS low
8121: 9D 83 C0 224 STA SS,X
225
8124: A9 4B 226 LDA #<CMD0 ; send CMD0
8124: A9 8E 226 LDA #<CMD0 ; send CMD0
8126: 85 40 227 STA CMDLO
8128: A9 83 228 LDA #>CMD0
812A: 85 41 229 STA CMDHI
@ -268,7 +268,7 @@
8132: C9 01 232 CMP #$01
8134: D0 39 233 BNE :ERROR1 ; error!
234
8136: A9 57 235 LDA #<CMD8 ; send CMD8
8136: A9 9A 235 LDA #<CMD8 ; send CMD8
8138: 85 40 236 STA CMDLO
813A: A9 83 237 LDA #>CMD8
813C: 85 41 238 STA CMDHI
@ -278,13 +278,13 @@
8146: D0 2A 242 BNE :SDV1 ; may be SD Ver. 1
243
244 * check for $01aa match!
8148: A9 63 245 :SDV2 LDA #<CMD55
8148: A9 A6 245 :SDV2 LDA #<CMD55
814A: 85 40 246 STA CMDLO
814C: A9 83 247 LDA #>CMD55
814E: 85 41 248 STA CMDHI
8150: 20 D7 81 249 JSR CMD
8153: 20 EB 81 250 JSR GETR1
8156: A9 69 251 LDA #<ACMD4140
8156: A9 AC 251 LDA #<ACMD4140
8158: 85 40 252 STA CMDLO
815A: A9 83 253 LDA #>ACMD4140
815C: 85 41 254 STA CMDHI
@ -302,12 +302,12 @@
264
816F: 4C C8 81 265 :ERROR1 JMP :IOERROR ; needed for far jump
266
8172: A9 63 267 :SDV1 LDA #<CMD55
8172: A9 A6 267 :SDV1 LDA #<CMD55
8174: 85 40 268 STA CMDLO
8176: A9 83 269 LDA #>CMD55
8178: 85 41 270 STA CMDHI
817A: 20 D7 81 271 JSR CMD ; ignore response
817D: A9 6F 272 LDA #<ACMD410
817D: A9 B2 272 LDA #<ACMD410
817F: 85 40 273 STA CMDLO
8181: A9 83 274 LDA #>ACMD410
8183: 85 41 275 STA CMDHI
@ -320,7 +320,7 @@
282 * SD Ver. 1 initialized!
8193: 4C AC 81 283 JMP :BLOCKSZ
284
8196: A9 51 285 :MMC LDA #<CMD1
8196: A9 94 285 :MMC LDA #<CMD1
8198: 85 40 286 STA CMDLO
819A: A9 83 287 LDA #>CMD1
819C: 85 41 288 STA CMDHI
@ -332,7 +332,7 @@
81AA: D0 1C 294 BNE :IOERROR ; error!
295 * MMC Ver. 3 initialized!
296
81AC: A9 5D 297 :BLOCKSZ LDA #<CMD16
81AC: A9 A0 297 :BLOCKSZ LDA #<CMD16
81AE: 85 40 298 STA CMDLO
81B0: A9 83 299 LDA #>CMD16
81B2: 85 41 300 STA CMDHI
@ -446,138 +446,138 @@
404 *
405 ********************************
406
8238: 5A 407 BLOCK PHY ; save Y
8239: A4 3D 408 LDY SLOT
823B: A5 46 409 LDA $46 ; store block num
823D: 99 F8 05 410 STA R33,Y ; in R30-R33
8240: A5 47 411 LDA $47
8242: 99 78 05 412 STA R32,Y
8245: A9 00 413 LDA #0
8247: 99 F8 04 414 STA R31,Y
824A: 99 78 04 415 STA R30,Y
416
824D: DA 417 PHX
824E: A0 09 418 LDY #9
8250: A6 3D 419 LDX SLOT ; ASL can't be done with Y
8252: 1E F8 05 420 :LOOP ASL R33,X ; mul block num
8255: 3E 78 05 421 ROL R32,X ; by 512 to get
8258: 3E F8 04 422 ROL R31,X ; real address
825B: 3E 78 04 423 ROL R30,X
825E: 88 424 DEY
825F: D0 F1 425 BNE :LOOP
8261: FA 426 PLX
8262: 7A 427 PLY ; restore Y
8263: 60 428 RTS
8238: DA 407 BLOCK PHX ; save X
8239: 5A 408 PHY ; save Y
823A: A6 3D 409 LDX SLOT
823C: A5 46 410 LDA $46 ; store block num
823E: 9D F8 05 411 STA R33,X ; in R30-R33
8241: A5 47 412 LDA $47
8243: 9D 78 05 413 STA R32,X
8246: A9 00 414 LDA #0
8248: 9D F8 04 415 STA R31,X
824B: 9D 78 04 416 STA R30,X
417
824E: A0 09 418 LDY #9 ; ASL can't be used with Y
8250: 1E F8 05 419 :LOOP ASL R33,X ; mul block num
8253: 3E 78 05 420 ROL R32,X ; by 512 to get
8256: 3E F8 04 421 ROL R31,X ; real address
8259: 3E 78 04 422 ROL R30,X
825C: 88 423 DEY
825D: D0 F1 424 BNE :LOOP
825F: 7A 425 PLY ; restore Y
8260: FA 426 PLX ; restore X
8261: 60 427 RTS
428
429
430
430 ********************************
===== Page 9 =====
431 ********************************
432 *
433 * Send SD command
434 * Cmd is in A
435 *
436 ********************************
437
8264: 7A 438 COMMAND PLY ; save Y
8265: A4 3D 439 LDY SLOT
8267: 9D 80 C0 440 STA DATA,X ; send command
826A: 3C 81 C0 441 :WAIT BIT CTRL,X
826D: 10 FB 442 BPL :WAIT
826F: B9 78 04 443 :ARG LDA R30,Y ; get arg from R30 on
8272: 9D 80 C0 444 STA DATA,X
8275: 3C 81 C0 445 :WAIT1 BIT CTRL,X
8278: 10 FB 446 BPL :WAIT1
827A: B9 F8 04 447 LDA R31,Y
827D: 9D 80 C0 448 STA DATA,X
8280: 3C 81 C0 449 :WAIT11 BIT CTRL,X
8283: 10 FB 450 BPL :WAIT11
8285: B9 78 05 451 LDA R32,Y
8288: 9D 80 C0 452 STA DATA,X
828B: 3C 81 C0 453 :WAIT12 BIT CTRL,X
828E: 10 FB 454 BPL :WAIT12
8290: B9 F8 05 455 LDA R33,Y
8293: 9D 80 C0 456 STA DATA,X
8296: 3C 81 C0 457 :WAIT13 BIT CTRL,X
8299: 10 FB 458 BPL :WAIT13
829B: A9 FF 459 LDA #DUMMY
829D: 9D 80 C0 460 STA DATA,X ; dummy crc
82A0: 3C 81 C0 461 :WAIT2 BIT CTRL,X
82A3: 10 FB 462 BPL :WAIT2
82A5: A9 FF 463 :GETR1 LDA #DUMMY
82A7: 9D 80 C0 464 STA DATA,X ; get R1
82AA: 3C 81 C0 465 :WAIT3 BIT CTRL,X
82AD: 10 FB 466 BPL :WAIT3
82AF: BD 80 C0 467 LDA DATA,X ; get response
431 *
432 * Send SD command
433 * Cmd is in A
434 *
435 ********************************
436
8262: 5A 437 COMMAND PHY ; save Y
8263: A4 3D 438 LDY SLOT
8265: 9D 80 C0 439 STA DATA,X ; send command
8268: 3C 81 C0 440 :WAIT BIT CTRL,X
826B: 10 FB 441 BPL :WAIT
826D: B9 78 04 442 :ARG LDA R30,Y ; get arg from R30 on
8270: 9D 80 C0 443 STA DATA,X
8273: 3C 81 C0 444 :WAIT1 BIT CTRL,X
8276: 10 FB 445 BPL :WAIT1
8278: B9 F8 04 446 LDA R31,Y
827B: 9D 80 C0 447 STA DATA,X
827E: 3C 81 C0 448 :WAIT11 BIT CTRL,X
8281: 10 FB 449 BPL :WAIT11
8283: B9 78 05 450 LDA R32,Y
8286: 9D 80 C0 451 STA DATA,X
8289: 3C 81 C0 452 :WAIT12 BIT CTRL,X
828C: 10 FB 453 BPL :WAIT12
828E: B9 F8 05 454 LDA R33,Y
8291: 9D 80 C0 455 STA DATA,X
8294: 3C 81 C0 456 :WAIT13 BIT CTRL,X
8297: 10 FB 457 BPL :WAIT13
8299: A9 FF 458 LDA #DUMMY
829B: 9D 80 C0 459 STA DATA,X ; dummy crc
829E: 3C 81 C0 460 :WAIT2 BIT CTRL,X
82A1: 10 FB 461 BPL :WAIT2
82A3: 20 EB 81 462 JSR GETR1
82A6: 7A 463 PLY ; restore Y
82A7: 60 464 RTS
465
466
467 ********************************
468 *
469 * TODO: check for error!
470 *
82B2: C9 FE 471 CMP #$FE
82B4: D0 EF 472 BNE :GETR1 ; wait for $FE
82B6: 7A 473 PLY ; restore Y
82B7: 60 474 RTS
475
476
477 ********************************
478 *
479 * Status request
480 * $43 Unit number DSSS000
481 * $44-45 Unused
482 * $46-47 Unused
483 *
484 * C Clear - No error
485 * Set - Error
486 * A $00 - No error
487 * $27 - I/O error
469 * Status request
470 * $43 Unit number DSSS000
471 * $44-45 Unused
472 * $46-47 Unused
473 *
474 * C Clear - No error
475 * Set - Error
476 * A $00 - No error
477 * $27 - I/O error
478 * $28 - No card inserted / no init
479 * $2B - Card write protected
480 * x - Blocks avail (low byte)
481 * y - Blocks avail (high byte)
482 *
483 ********************************
484
82A8: 18 485 STATUS CLC ; no error
82A9: A9 00 486 LDA #0
82AB: A2 FF 487 LDX #$FF ; 32 MB partition
===== Page 10 =====
488 * $28 - No card inserted / no init
489 * $2B - Card write protected
490 * x - Blocks avail (low byte)
491 * y - Blocks avail (high byte)
492 *
493 ********************************
494
82B8: 18 495 STATUS CLC ; no error
82B9: A9 00 496 LDA #0
82BB: A2 FF 497 LDX #$FF ; 32 MB partition
82BD: A0 FF 498 LDY #$FF
82BF: 60 499 RTS
500
501 * TODO: check for card detect and write protect!
502
503
504 ********************************
505 *
506 * Read 512 byte block
507 * $43 Unit number DSSS0000
508 * $44-45 Address (LO/HI) of buffer
509 * $46-47 Block number (LO/HI)
510 *
511 * C Clear - No error
512 * Set - Error
513 * A $00 - No error
514 * $27 - Bad block number
515 * $28 - No card inserted
516 *
517 ********************************
518
519 * TODO: check for card detect!
520
82C0: 20 38 82 521 READ JSR BLOCK ; calc block address
522
82C3: A9 0E 523 LDA #SS0 ; enable /CS
82C5: 9D 83 C0 524 STA SS,X
82C8: A9 51 525 LDA #$51 ; send CMD17
82CA: 20 64 82 526 JSR COMMAND ; send command
527
82CD: 5A 528 PHY
82AD: A0 FF 488 LDY #$FF
82AF: 60 489 RTS
490
491 * TODO: check for card detect and write protect!
492
493
494 ********************************
495 *
496 * Read 512 byte block
497 * $43 Unit number DSSS0000
498 * $44-45 Address (LO/HI) of buffer
499 * $46-47 Block number (LO/HI)
500 *
501 * C Clear - No error
502 * Set - Error
503 * A $00 - No error
504 * $27 - Bad block number
505 * $28 - No card inserted
506 *
507 ********************************
508
509 * TODO: check for card detect!
510
82B0: 20 38 82 511 READ JSR BLOCK ; calc block address
512
82B3: A9 0E 513 LDA #SS0 ; enable /CS
82B5: 9D 83 C0 514 STA SS,X
82B8: A9 51 515 LDA #$51 ; send CMD17
82BA: 20 62 82 516 JSR COMMAND ; send command
517
82BD: A9 FF 518 :GETTOK LDA #DUMMY ; get data token
82BF: 9D 80 C0 519 STA DATA,X
82C2: 3C 81 C0 520 :WAIT BIT CTRL,X
82C5: 10 FB 521 BPL :WAIT
82C7: BD 80 C0 522 LDA DATA,X ; get response
523 *
524 * TODO: check for error!
525 *
82CA: C9 FE 526 CMP #$FE
82CC: D0 EF 527 BNE :GETTOK ; wait for $FE
528
82CE: A0 02 529 LDY #2 ; read data from card
82D0: 64 3C 530 :LOOPY STZ WORK
82D2: A9 FF 531 :LOOPW LDA #DUMMY
82D4: 9D 80 C0 532 STA DATA,X
82D7: 3C 81 C0 533 :WAIT4 BIT CTRL,X
82DA: 10 FB 534 BPL :WAIT4
82D7: 3C 81 C0 533 :WAIT1 BIT CTRL,X
82DA: 10 FB 534 BPL :WAIT1
82DC: BD 80 C0 535 LDA DATA,X
82DF: 92 44 536 STA ($44)
82E1: E6 44 537 INC $44
@ -587,128 +587,157 @@
82E9: D0 E7 541 BNE :LOOPW
82EB: 88 542 DEY
82EC: D0 E2 543 BNE :LOOPY
82EE: 7A 544 PLY
544
===== Page 11 =====
545
82EF: 20 06 82 546 JSR GETR3 ; read 2 bytes crc
82F2: A9 0F 547 LDA #SSNONE
82F4: 9D 83 C0 548 STA SS,X ; disable /CS
82F7: 18 549 CLC ; no error
82F8: A9 00 550 LDA #$00
82FA: 7A 551 PLY ; restore Y
82FB: 60 552 RTS
553
82FC: A9 0F 554 :ERROR LDA #SSNONE
82FE: 9D 83 C0 555 STA SS,X ; disable /CS
8301: 38 556 SEC ; an error occured
8302: A9 27 557 LDA #$27
8304: 7A 558 PLY ; restore Y
8305: 60 559 RTS
560
561
562 ********************************
563 *
564 * Write 512 byte block
565 * $43 Unit number DSSS000
566 * $44-45 Address (LO/HI) of buffer
567 * $46-47 Block number (LO/HI)
568 *
569 * C Clear - No error
570 * Set - Error
571 * A $00 - No error
572 * $27 - Bad block number
573 * $28 - No card inserted
574 *
575 ********************************
576
577 * TODO: check for card detect and write protect!
578
8306: 20 38 82 579 WRITE JSR BLOCK ; calc block address
580
8309: A9 0E 581 LDA #SS0 ; enable /CS
830B: 9D 83 C0 582 STA SS,X
830E: A9 58 583 LDA #$58 ; send CMD24
8310: 20 64 82 584 JSR COMMAND ; send command
585
8313: 5A 586 PHY
8314: A0 02 587 LDY #2 ; send data to card
8316: 64 3C 588 :LOOPY STZ WORK
8318: B2 44 589 :LOOPW LDA ($44)
831A: 9D 80 C0 590 STA DATA,X
831D: 3C 81 C0 591 :WAIT4 BIT CTRL,X
8320: 10 FB 592 BPL :WAIT4
8322: E6 44 593 INC $44
8324: D0 02 594 BNE :INW
8326: E6 45 595 INC $45 ; inc msb on page boundary
8328: E6 3C 596 :INW INC WORK
832A: D0 EC 597 BNE :LOOPW
832C: 88 598 DEY
832D: D0 E7 599 BNE :LOOPY
82EE: 20 06 82 545 JSR GETR3 ; read 2 bytes crc
82F1: A9 0F 546 LDA #SSNONE
82F3: 9D 83 C0 547 STA SS,X ; disable /CS
82F6: 18 548 CLC ; no error
82F7: A9 00 549 LDA #$00
82F9: 60 550 RTS
551
552
553 ********************************
554 *
555 * Write 512 byte block
556 * $43 Unit number DSSS000
557 * $44-45 Address (LO/HI) of buffer
558 * $46-47 Block number (LO/HI)
559 *
560 * C Clear - No error
561 * Set - Error
562 * A $00 - No error
563 * $27 - I/O error or bad block number
564 * $28 - No card inserted
565 * $2B - Card write protected
566 *
567 ********************************
568
569 * TODO: check for card detect and write protect!
570
82FA: 20 38 82 571 WRITE JSR BLOCK ; calc block address
572
82FD: A9 0E 573 LDA #SS0 ; enable /CS
82FF: 9D 83 C0 574 STA SS,X
8302: A9 58 575 LDA #$58 ; send CMD24
8304: 20 62 82 576 JSR COMMAND ; send command
577
8307: A9 FF 578 LDA #DUMMY
8309: 9D 80 C0 579 STA DATA,X ; send dummy
830C: 3C 81 C0 580 :WAIT1 BIT CTRL,X
830F: 10 FB 581 BPL :WAIT1
8311: A9 FE 582 LDA #$FE
8313: 9D 80 C0 583 STA DATA,X ; send data token
8316: 3C 81 C0 584 :WAIT2 BIT CTRL,X
8319: 10 FB 585 BPL :WAIT2
586
831B: A0 02 587 LDY #2 ; send data to card
831D: 64 3C 588 :LOOPY STZ WORK
831F: B2 44 589 :LOOPW LDA ($44)
8321: 9D 80 C0 590 STA DATA,X
8324: 3C 81 C0 591 :WAIT3 BIT CTRL,X
8327: 10 FB 592 BPL :WAIT3
8329: E6 44 593 INC $44
832B: D0 02 594 BNE :INW
832D: E6 45 595 INC $45 ; inc msb on page boundary
832F: E6 3C 596 :INW INC WORK
8331: D0 EC 597 BNE :LOOPW
8333: 88 598 DEY
8334: D0 E7 599 BNE :LOOPY
600
832F: A0 02 601 LDY #2 ; send 2 dummy crc bytes
8336: A0 02 601 LDY #2 ; send 2 dummy crc bytes
===== Page 12 =====
8331: 9D 80 C0 602 :CRC STA DATA,X
8334: 3C 81 C0 603 :WAIT5 BIT CTRL,X
8337: 10 FB 604 BPL :WAIT5
8339: 88 605 DEY
833A: D0 F5 606 BNE :CRC
833C: 7A 607 PLY
608
833D: A9 0F 609 LDA #SSNONE ; disable /CS
833F: 9D 83 C0 610 STA SS,X
8342: 18 611 CLC ; no error
8343: A9 00 612 LDA #0
8345: 7A 613 PLY
8346: 60 614 RTS
615
8338: 9D 80 C0 602 :CRC STA DATA,X
833B: 3C 81 C0 603 :WAIT4 BIT CTRL,X
833E: 10 FB 604 BPL :WAIT4
8340: 88 605 DEY
8341: D0 F5 606 BNE :CRC
607
8343: A9 FF 608 LDA #DUMMY ; get data response
8345: 9D 80 C0 609 STA DATA,X
8348: 3C 81 C0 610 :WAIT5 BIT CTRL,X
834B: 10 FB 611 BPL :WAIT5
834D: BD 80 C0 612 LDA DATA,X
8350: 29 1F 613 AND #$1F
8352: C9 05 614 CMP #$05
8354: D0 1A 615 BNE :ERROR ; check for write error
616
617 ********************************
618 *
619 * Format
620 * not supported!
621 *
622 ********************************
623
8347: 38 624 FORMAT SEC
8348: A9 01 625 LDA #$01 ; invalid command
834A: 60 626 RTS
627
628
834B: 40 00 00 629 CMD0 HEX 400000
834E: 00 00 95 630 HEX 000095
8351: 41 00 00 631 CMD1 HEX 410000
8354: 00 00 F9 632 HEX 0000F9
8357: 48 00 00 633 CMD8 HEX 480000
835A: 01 AA 87 634 HEX 01AA87
835D: 50 00 00 635 CMD16 HEX 500000
8360: 02 00 FF 636 HEX 0200FF
8363: 77 00 00 637 CMD55 HEX 770000
8366: 00 00 65 638 HEX 000065
8369: 69 40 00 639 ACMD4140 HEX 694000
836C: 00 00 77 640 HEX 000077
836F: 69 00 00 641 ACMD410 HEX 690000
8372: 00 00 FF 642 HEX 0000FF
8356: A9 FF 617 :WAIT6 LDA #DUMMY ; wait for write cycle
8358: 9D 80 C0 618 STA DATA,X ; to complete
835B: 3C 81 C0 619 :WAIT61 BIT CTRL,X
835E: 10 FB 620 BPL :WAIT61
8360: BD 80 C0 621 LDA DATA,X
8363: C9 00 622 CMP #$00
8365: F0 EF 623 BEQ :WAIT6
624
8367: A9 0F 625 LDA #SSNONE ; disable /CS
8369: 9D 83 C0 626 STA SS,X
836C: 18 627 CLC ; no error
836D: A9 00 628 LDA #0
836F: 60 629 RTS
630
631 :ERROR
8370: A9 FF 632 :WAIT7 LDA #DUMMY ; wait for write cycle
8372: 9D 80 C0 633 STA DATA,X ; to complete
8375: 3C 81 C0 634 :WAIT71 BIT CTRL,X
8378: 10 FB 635 BPL :WAIT71
837A: BD 80 C0 636 LDA DATA,X
837D: C9 00 637 CMP #$00
837F: F0 EF 638 BEQ :WAIT7
8381: A9 0F 639 LDA #SSNONE
8383: 9D 83 C0 640 STA SS,X ; disable /CS
8386: 38 641 SEC ; an error occured
8387: A9 27 642 LDA #$27
8389: 60 643 RTS
644
645
646 ********************************
647 *
648 * Format
649 * not supported!
650 *
651 ********************************
652
838A: 38 653 FORMAT SEC
838B: A9 01 654 LDA #$01 ; invalid command
838D: 60 655 RTS
656
657
838E: 40 00 00 658 CMD0 HEX 400000
===== Page 13 =====
8391: 00 00 95 659 HEX 000095
8394: 41 00 00 660 CMD1 HEX 410000
8397: 00 00 F9 661 HEX 0000F9
839A: 48 00 00 662 CMD8 HEX 480000
839D: 01 AA 87 663 HEX 01AA87
83A0: 50 00 00 664 CMD16 HEX 500000
83A3: 02 00 FF 665 HEX 0200FF
83A6: 77 00 00 666 CMD55 HEX 770000
83A9: 00 00 65 667 HEX 000065
83AC: 69 40 00 668 ACMD4140 HEX 694000
83AF: 00 00 77 669 HEX 000077
83B2: 69 00 00 670 ACMD410 HEX 690000
83B5: 00 00 FF 671 HEX 0000FF
--End assembly, 885 bytes, Errors: 0
--End assembly, 952 bytes, Errors: 0
Symbol table - alphabetical order:
ACMD410 =$836F ACMD4140=$8369 BLOCK =$8238 CMD =$81D7
CMD0 =$834B CMD1 =$8351 CMD16 =$835D CMD55 =$8363
CMD8 =$8357 CMDHI =$41 CMDLO =$40 COMMAND =$8264
ACMD410 =$83B2 ACMD4140=$83AC BLOCK =$8238 CMD =$81D7
CMD0 =$838E CMD1 =$8394 CMD16 =$83A0 CMD55 =$83A6
CMD8 =$839A CMDHI =$41 CMDLO =$40 COMMAND =$8262
CTRL =$C081 CURSLOT =$07F8 DATA =$C080 DEBUG =$01
DIV =$C082 DRIVER =$805A DUMMY =$FF FORMAT =$8347
DIV =$C082 DRIVER =$805A DUMMY =$FF FORMAT =$838A
GETR1 =$81EB GETR3 =$8206 INIT =$8100 INSLP =$801F
INSLP2 =$8038 INSOUT =$8059 R30 =$0478 R31 =$04F8
R32 =$0578 R33 =$05F8 READ =$82C0 SLOT =$3D
SLOT16 =$2B SS =$C083 SS0 =$0E SSNONE =$0F
===== Page 13 =====
STATUS =$82B8 WORK =$3C WRITE =$8306
R32 =$0578 R33 =$05F8 READ =$82B0 SLOT =$3D
SLOT16 =$2B SS =$C083 SS0 =$0E SSNONE =$0F
STATUS =$82A8 WORK =$3C WRITE =$82FA
Symbol table - numerical order:
@ -718,9 +747,9 @@ Symbol table - numerical order:
DUMMY =$FF R30 =$0478 R31 =$04F8 R32 =$0578
R33 =$05F8 CURSLOT =$07F8 INSLP =$801F INSLP2 =$8038
INSOUT =$8059 DRIVER =$805A INIT =$8100 CMD =$81D7
GETR1 =$81EB GETR3 =$8206 BLOCK =$8238 COMMAND =$8264
STATUS =$82B8 READ =$82C0 WRITE =$8306 FORMAT =$8347
CMD0 =$834B CMD1 =$8351 CMD8 =$8357 CMD16 =$835D
CMD55 =$8363 ACMD4140=$8369 ACMD410 =$836F DATA =$C080
GETR1 =$81EB GETR3 =$8206 BLOCK =$8238 COMMAND =$8262
STATUS =$82A8 READ =$82B0 WRITE =$82FA FORMAT =$838A
CMD0 =$838E CMD1 =$8394 CMD8 =$839A CMD16 =$83A0
CMD55 =$83A6 ACMD4140=$83AC ACMD410 =$83B2 DATA =$C080
CTRL =$C081 DIV =$C082 SS =$C083

View File

@ -435,7 +435,7 @@ BLOCK PHY ; save Y
*
********************************
COMMAND PLY ; save Y
COMMAND PHY ; save Y
LDY SLOT
STA DATA,X ; send command
:WAIT BIT CTRL,X