Michael Steil 1 month ago
parent
commit
ab77d3e0c1
3 changed files with 36 additions and 0 deletions
  1. 12
    0
      drv/drv1541.s
  2. 12
    0
      drv/drv1571.s
  3. 12
    0
      drv/drv1581.s

+ 12
- 0
drv/drv1541.s View File

@@ -571,7 +571,9 @@ __InitForIO:
571 571
 	sei
572 572
 	lda CPU_DATA
573 573
 	sta tmpCPU_DATA
574
+.ifndef bsw128
574 575
 	LoadB CPU_DATA, KRNL_IO_IN
576
+.endif
575 577
 	lda grirqen
576 578
 	sta tmpgrirqen
577 579
 	lda clkreg
@@ -585,11 +587,16 @@ __InitForIO:
585 587
 	sta cia2base+13
586 588
 	lda #>D_IRQHandler
587 589
 	sta irqvec+1
590
+.ifdef bsw128
591
+	sta nmivec+1
592
+.endif
588 593
 	lda #<D_IRQHandler
589 594
 	sta irqvec
595
+.ifndef bsw128
590 596
 	lda #>D_NMIHandler
591 597
 	sta nmivec+1
592 598
 	lda #<D_NMIHandler
599
+.endif
593 600
 	sta nmivec
594 601
 	lda #%00111111
595 602
 	sta cia2base+2
@@ -621,6 +628,9 @@ IniForIO0:
621 628
 	rts
622 629
 
623 630
 D_IRQHandler:
631
+.ifdef bsw128
632
+	PopB $ff00
633
+.endif
624 634
 	pla
625 635
 	tay
626 636
 	pla
@@ -639,8 +649,10 @@ __DoneWithIO:
639 649
 	lda cia2base+13
640 650
 	lda tmpgrirqen
641 651
 	sta grirqen
652
+.ifndef bsw128
642 653
 	lda tmpCPU_DATA
643 654
 	sta CPU_DATA
655
+.endif
644 656
 	lda tmpPS
645 657
 	pha
646 658
 	plp

+ 12
- 0
drv/drv1571.s View File

@@ -671,7 +671,9 @@ __InitForIO:
671 671
 	sei
672 672
 	lda CPU_DATA
673 673
 	sta tmpCPU_DATA
674
+.ifndef bsw128
674 675
 	LoadB CPU_DATA, KRNL_IO_IN
676
+.endif
675 677
 	lda grirqen
676 678
 	sta tmpgrirqen
677 679
 	lda clkreg
@@ -685,11 +687,16 @@ __InitForIO:
685 687
 	sta cia2base+13
686 688
 	lda #>D_IRQHandler
687 689
 	sta irqvec+1
690
+.ifdef bsw128
691
+	sta nmivec+1
692
+.endif
688 693
 	lda #<D_IRQHandler
689 694
 	sta irqvec
695
+.ifndef bsw128
690 696
 	lda #>D_NMIHandler
691 697
 	sta nmivec+1
692 698
 	lda #<D_NMIHandler
699
+.endif
693 700
 	sta nmivec
694 701
 	lda #%00111111
695 702
 	sta cia2base+2
@@ -728,6 +735,9 @@ IniForIO1:
728 735
 	rts
729 736
 
730 737
 D_IRQHandler:
738
+.ifdef bsw128
739
+	PopB $ff00
740
+.endif
731 741
 	pla
732 742
 	tay
733 743
 	pla
@@ -746,8 +756,10 @@ __DoneWithIO:
746 756
 	lda cia2base+13
747 757
 	lda tmpgrirqen
748 758
 	sta grirqen
759
+.ifndef bsw128
749 760
 	lda tmpCPU_DATA
750 761
 	sta CPU_DATA
762
+.endif
751 763
 	lda tmpPS
752 764
 	pha
753 765
 	plp

+ 12
- 0
drv/drv1581.s View File

@@ -670,7 +670,9 @@ __InitForIO:
670 670
 	sei
671 671
 	lda CPU_DATA
672 672
 	sta tmpCPU_DATA
673
+.ifdef bsw128
673 674
 	LoadB CPU_DATA, KRNL_IO_IN
675
+.endif
674 676
 	lda grirqen
675 677
 	sta tmpgrirqen
676 678
 	lda clkreg
@@ -684,11 +686,16 @@ __InitForIO:
684 686
 	sta cia2base+13
685 687
 	lda #>D_IRQHandler
686 688
 	sta irqvec+1
689
+.ifdef bsw128
690
+	sta nmivec+1
691
+.endif
687 692
 	lda #<D_IRQHandler
688 693
 	sta irqvec
694
+.ifndef bsw128
689 695
 	lda #>D_NMIHandler
690 696
 	sta nmivec+1
691 697
 	lda #<D_NMIHandler
698
+.endif
692 699
 	sta nmivec
693 700
 	lda #%00111111
694 701
 	sta cia2base+2
@@ -727,6 +734,9 @@ IniForIO1:
727 734
 	rts
728 735
 
729 736
 D_IRQHandler:
737
+.ifdef bsw128
738
+	PopB $ff00
739
+.endif
730 740
 	pla
731 741
 	tay
732 742
 	pla
@@ -745,8 +755,10 @@ __DoneWithIO:
745 755
 	lda cia2base+13
746 756
 	lda tmpgrirqen
747 757
 	sta grirqen
758
+.ifndef bsw128
748 759
 	lda tmpCPU_DATA
749 760
 	sta CPU_DATA
761
+.endif
750 762
 	lda tmpPS
751 763
 	pha
752 764
 	plp

Loading…
Cancel
Save