src/mess/machine/c1581.c
| r7279 | r7280 | |
| 9 | 9 | |
| 10 | 10 | /* |
| 11 | 11 | |
| 12 | http://www.unusedino.de/ec64/technical/aay/c1581/ro81main.htm |
| 13 | |
| 12 | 14 | TODO: |
| 13 | 15 | |
| 14 | | - floppy access |
| 15 | | - disk change |
| 16 | - fast serial on C128 |
| 17 | - CRC error after reading DAM |
| 18 | |
| 19 | patch these to make loading work: |
| 20 | cd31: 60 |
| 21 | cfa9: ea ea |
| 22 | |
| 23 | |
| 24 | routine at 84AE returns error -> 74 drive not ready |
| 25 | |
| 26 | Drive initialisieren, LED einschalten ($c3ca) Initialize Drive, turn on LED ($ c3ca) |
| 27 | |
| 28 | Einsprung von $82B9 , $868E , $9702 , $993F : Leaping from $ 82B9, $ 868E, $ 9702, $ 993F: |
| 29 | |
| 30 | 82A2: A9 00 LDA #$00 82A2: A9 00 LDA # $ 00 |
| 31 | 82A4: 85 40 STA $40 (keine sichtbare Verwendung) 82A4: 85 40 STA $ 40 (no apparent use) |
| 32 | 82A6: 8D A4 02 STA $02A4 (Drivenummer ?) 82A6: 8D A4 02 STA $ 02A4 (drive number?) |
| 33 | |
| 34 | 82A9: 8D A3 02 STA $02A3 Anzahl Laufwerke = 0 (= 1 Laufwerk) 82A9: 8D A3 02 STA $ 02A3 Drive count = 0 (= 1 drive) |
| 35 | 82AC: 20 AE 84 JSR $84AE ggf. Partition initialisieren 82AC: 20 AE initialize 84 JSR $ 84AE partition if necessary |
| 36 | 82AF: F0 05 BEQ $82B6 OK. 82AF: F0 05 BEQ $ 82B6 OK. ==> ==> |
| 37 | 82B1: A9 74 LDA #$74 74, DRIVE NOT READY 82B1: A9 74 LDA # $ 74 74, DRIVE NOT READY |
| 38 | 82B3: 20 7C 80 JSR $807C Ende 82B3: 20 7C 80 JSR $ 807C End |
| 39 | |
| 40 | Einsprung von $82AF: Leaping from $ 82AF: |
| 41 | |
| 42 | 82B6: 4C F6 81 JMP $81F6 Drive-LED-Flag setzen 82B6: set 4C F6 81 JMP $ 81F6 Drive LED flag |
| 43 | |
| 16 | 44 | - power LED |
| 17 | 45 | - activity LED |
| 18 | 46 | |
| r7279 | r7280 | |
| 237 | 265 | /* device number */ |
| 238 | 266 | data |= c1581->address << 3; |
| 239 | 267 | |
| 240 | | /* TODO disk change */ |
| 241 | | //data |= 0x80; |
| 268 | /* disk change */ |
| 269 | data |= floppy_dskchg_r(c1581->image) << 7; |
| 242 | 270 | |
| 243 | 271 | return data; |
| 244 | 272 | } |