This page (revision-7) was last changed on 03-Feb-2023 15:21 by Carsten Strotmann 

This page was created on 27-Dec-2010 17:44 by Carsten Strotmann

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
7 03-Feb-2023 15:21 41 KB Carsten Strotmann to previous
6 27-Dec-2010 17:51 41 KB Carsten Strotmann to previous | to last
5 27-Dec-2010 17:50 32 KB Carsten Strotmann to previous | to last
4 27-Dec-2010 17:49 32 KB Carsten Strotmann to previous | to last
3 27-Dec-2010 17:48 32 KB Carsten Strotmann to previous | to last
2 27-Dec-2010 17:46 21 KB Carsten Strotmann to previous | to last
1 27-Dec-2010 17:44 21 KB Carsten Strotmann to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 5 removed 2 lines
[{Image src='atari000.png' }]
At line 1,216 removed 315 lines
!!DSKSYS.ASM
{{{
00010 ------------------------------
00020 ************
00030 ** DSKSYS **
00040 ************
00050 ------------------------------
00060 ;
00070 ; LAUFWERK TESTEN OB HIGH-SPEED
00080 ; MOEGLICH IST
00090 ;
00100 HSCHK STA DUNIT DRIVE NR.
00110 LDA #$3F COMMAND 3F
00120 STA DCOMND
00130 LDX #0
00140 INX
00150 STX DBYTLO 1 BYTE
00160 LDA #$40
00170 STA DSTATS GETBYTE
00180 JSR SETBUF BUF.=LOMEM
00190 JSR US SIO...
00200 TYA OK
00210 BPL .2
00220 CMP #$8B NO DRIVE?
00230 BEQ .1
00240 INC DUNIT DRIVE+1
00250 LDA DUNIT
00260 CMP #5 DRIVE5?
00270 BCC HSCHK WEITER...
00280 SEC
00290 RTS
00300 .1 LDY #0
00310 CLC
00320 RTS
00330 ;
00340 .2 LDA LOMEM HIGH-SPEED
00350 LDY DUNIT
00360 STA SPTBL-1,Y MERKEN
00370 LDY #$FF
00380 CLC
00390 RTS
00400 ------------------------------
00410 ;
00420 ; UNIVERSELLE SIO-ROUTINE
00430 ;
00440 US LDY DUNIT DRIVE NR.
00450 TYA
00460 ORA #$30
00470 STA $23A
00480 LDA DCOMND KOMMANDO
00490 STA $23B
00500 LDA DSECLO SEKTOR LO
00510 STA $23C
00520 LDA DSECHI SEKTOR HI
00530 STA $23D
00540 LDA SPTBL-1,Y SPEED IN
00550 STA $D204 AUDF3
00560 LDA #0
00570 STA $D206 AUDF6
00580 TSX STACK
00590 STX $318 RETTEN
00600 ;
00610 IO11 LDA RETRY VERSUCHE
00620 STA $36 SETZEN
00630 IO12 LDA #0
00640 STA $30
00650 STA $319
00660 LDA #$3A
00670 STA $32 BUFFER $23A
00680 LDA #2
00690 STA $33
00700 LDA #4
00710 STA $34
00720 LDA #$34 COMMAND=
00730 STA $D303 LOW
00740 JSR SEND1 COM. SENDEN
00750 LDA DBUFLO
00760 STA $32 BUFFER
00770 LDA DBUFHI SETZEN
00780 STA $33
00790 LDA DBYTLO LAENGE
00800 STA $34
00810 BIT DSTATS
00820 BPL IO2 SENDEN?
00830 JSR SEND1
00840 IO2 DEC $319
00850 JSR SETTI1 TIMEOUT
00860 BIT DSTATS SETZEN
00870 BVC IO3 EMPFANGEN?
00880 JSR GET1
00890 IO3 LDA #$A0
00900 STA $D207 SOUND AUS
00910 LDA $10
00920 STA $D20E
00930 JSR CLRTI TIMEOUT
00940 LDY $30 LOESCHEN
00950 STY DSTATS STATUS
00960 RTS
00970 ------------------------------
00980 SEND1 LDX #$80
00990 .1 DEX
01000 BNE .1
01010 LDA #$23 FUNKTION=
01020 JSR POKEY SENDEN
01030 LDY #0
01040 LDA ($32),Y
01050 STA $31
01060 STA $D20D BYTE SENDEN
01070 .2 INY
01080 CPY $34 ENDE?
01090 BEQ SENOUT
01100 LDA ($32),Y BUFFER
01110 JSR PUTBYT SENDEN
01120 JSR CHKSUM
01130 JMP .2 WEITER...
01140 ;
01150 SENOUT LDA $31 CHECKSUMME
01160 JSR PUTBYT SENDEN
01170 .1 LDA $D20E
01180 AND #8
01190 BNE .1
01200 LDX #0
01210 LDY #3 TIMEOUT
01220 JSR STOUT SETZEN
01230 LDA #$C0 IRQ-STATUS
01240 STA $D20E SETZEN
01250 JMP RECEIV WARTEN...
01260 ------------------------------
01270 GET1 LDA #0 CHECKSUMME
01280 STA $31 LOESCHEN
01290 LDY #0
01300 .1 JSR GETBYT DATENBLOCK
01310 STA ($32),Y EMPFANGEN
01320 JSR CHKSUM
01330 INY
01340 CPY $34
01350 BNE .1
01360 JSR GETBYT CHECKSUMME
01370 CMP $31
01380 BNE ERR8A ERROR
01390 RTS
01400 ;
01410 ERR8A LDA #$8A FEHLER
01420 ERRO1 STA $30 AUSGEBEN
01430 LDX $318
01440 TXS
01450 BIT $319 RETRY?
01460 BMI .1
01470 DEC $36
01480 BEQ .1
01490 JMP IO12 WEITER
01500 .1 JMP IO3 ENDE
01510 ------------------------------
01520 ;
01530 ; TIME-OUT SETZEN UND AUF
01540 ; RUECKMELDUNG WARTEN
01550 ;
01560 SETTI1 LDX DCOMND COMMAND
01570 CPX #$50 =FORMAT
01580 BCS SETTI2
01590 LDX #10 CA.1 MIN.
01600 BNE SETTI3
01610 SETTI2 LDX #1
01620 SETTI3 LDY #$60 CA.7 MIN
01630 JSR STOUT TIMEOUT
01640 * SETZEN
01650 RECEIV LDA #$13 LESEN
01660 JSR POKEY
01670 LDA #$3C
01680 STA $D303 AUF BYTE
01690 JSR GETBYT WARTEN
01700 CMP #$41 "A"
01710 BEQ CLRTI
01720 CMP #$43 "C"
01730 BEQ CLRTI
01740 CMP #$45 "E"
01750 BEQ ERR90
01760 LDA #$8B "N"
01770 BNE ERRO1 FEHLER 139
01780 ERR90 LDA #$90 FEHLER 144
01790 STA $30
01800 *
01810 CLRTI LDY #0 TIME-OUT
01820 LDX #0 LOESCHEN
01830 STOUT LDA #ERR8A TIMER 1
01840 STA $226 VEKTOR
01850 LDA /ERR8A SETZEN
01860 STA $227
01870 *
01880 TXA
01890 LDX #3
01900 .1 STA $D40A
01910 DEX
01920 BNE .1 TIMER 1
01930 STA $219 WERT
01940 STY $218 SETZEN
01950 RTS
01960 ------------------------------
01970 CHKSUM CLC CHECKSUMME
01980 ADC $31 ADDIEREN
01990 ADC #0
02000 STA $31
02010 RTS
02020 ------------------------------
02030 ;
02040 ; BYTE VOM LAUFWERK EMPFANGEN
02050 ;
02060 GETBYT LDA $D20E BYTE DA?
02070 AND #$20
02080 BNE GETBYT
02090 LDA #$DF CLEAR
02100 STA $D20E IRQ-FLAG
02110 LDA #$F8
02120 STA $D20E
02130 LDA $D20F
02140 STA $D20A I/O-ERROR
02150 BPL JERR
02160 AND #$20
02170 BEQ JERR
02180 LDA $D20D BYTE IN A
02190 RTS
02200 JERR JMP ERR8A
02210 ------------------------------
02220 ;
02230 ; BYTE AN LAUFWERK SENDEN
02240 ;
02250 PUTBYT PHA
02260 PUT1 LDA $D20E POKEY
02270 AND #$10 BEREIT?
02280 BNE PUT1
02290 LDA #$EF IRQ-FLAG
02300 STA $D20E SETZEN
02310 LDA #$F8
02320 STA $D20E
02330 PLA
02340 STA $D20D BYTE SENDEN
02350 RTS
02360 ------------------------------
02370 ;
02380 ; POKEY FUER EIN- UND AUSGABE
02390 ; VORBEREITEN
02400 ;
02410 POKEY STA $D20F SKCTL
02420 STA $D20A
02430 LDA #$28
02440 STA $D208 AUDCTL
02450 LDA #$A8
02460 STA $D207 SOUNDREG.
02470 LDA #$F8
02480 STA $D20E IRQ-ENABLE
02490 RTS
02500 ------------------------------
02510 ************
02520 ** SYSTEM **
02530 ************
02540 ------------------------------
02550 ;
02560 ; DA KEIN BETRIEBSSYSTEM VOR-
02570 ; HANDEN IST, MUESSEN DIE
02580 ; INTERRUPTS SELBST BEHANDELT
02590 ; WERDEN.
02600 ; NMI-ROUTINE:
02610 ;
02620 PNMI PHA
02630 LDA $D40F RESET
02640 AND #$20 (OLDRUNNER)
02650 BEQ .1
02660 JMP $100 ZUM COPY
02670 ;
02680 .1 TXA REGISTER
02690 PHA RETTEN
02700 TYA
02710 PHA
02720 STA $D40F NMI-STATUS
02730 ;
02740 ; TIMER 1 AUF NULL UEBERPRUEFEN
02750 ; WENN ABGELAUFEN IN TIMER-
02760 ; ROUTINE SPRINGEN
02770 ;
02780 NMIVEC LDY $218
02790 BNE .1
02800 LDY $219
02810 BEQ .2 TIMER 1=0
02820 DEC $219
02830 .1 DEC $218 TIMER -1
02840 BNE .2
02850 LDY $219
02860 BNE .2
02870 JSR NMIIND TIMEOUT...
02880 .2 LDA #8
02890 STA $D01F
02900 PLA REGISTER
02910 TAY ZURUECK
02920 PLA
02930 TAX
02940 PLA
02950 RTI NMI ENDE
02960 ------------------------------
02970 NMIIND JMP ($226) TIMER1 VEC.
02980 ------------------------------
02990 ;
03000 ; IRQ-VECTOR
03010 ;
03020 RETIRQ PHA
03030 LDA $D20E IRQ-FLAG
03040 EOR #$FF LOESCHEN
03050 STA $D20E
03060 LDA #0
03070 STA $D20E
03080 PLA
03090 RTI IRQ ENDE
03100 ------------------------------
}}}