/[projet1]/public/oric/demos/OricTech/code/loader.asm
Defence Force logotype

Diff of /public/oric/demos/OricTech/code/loader.asm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1397 by dbug, Sun Apr 9 10:42:35 2017 UTC revision 1398 by Jede, Sun Apr 9 18:38:29 2017 UTC
# Line 387  end_change_track Line 387  end_change_track
387    
388          lda current_sector          lda current_sector
389  __fdc_sector_1    __fdc_sector_1  
390            .dsb ((FDC_sector_register&3)-((*+3)&3))&3,$ea
391          sta FDC_sector_register          sta FDC_sector_register
392          inc current_sector          inc current_sector
393                                    
394          lda current_track                        ; Check if the drive is on the correct track                    lda current_track                        ; Check if the drive is on the correct track          
395  __fdc_track_1    __fdc_track_1  
396            .dsb ((FDC_track_register&3)-((*+3)&3))&3,$ea
397          cmp FDC_track_register          cmp FDC_track_register
398          beq stay_on_the_track          beq stay_on_the_track
399                                                    
400  __fdc_data_1      __fdc_data_1    
401            .dsb ((FDC_data&3)-((*+3)&3))&3,$ea
402          sta FDC_data                             ; Set the new track          sta FDC_data                             ; Set the new track
403                                    
404          lda #CMD_Seek          lda #CMD_Seek
405  __fdc_command_1  __fdc_command_1
406            .dsb ((FDC_command_register&3)-((*+3)&3))&3,$ea
407          sta FDC_command_register                  sta FDC_command_register        
408          jsr WaitCompletion          jsr WaitCompletion
409  stay_on_the_track  stay_on_the_track
# Line 412  __fdc_flags_2 Line 416  __fdc_flags_2
416  __fdc_readsector  __fdc_readsector
417          lda #CMD_ReadSector          lda #CMD_ReadSector
418  __fdc_command_2  __fdc_command_2
419            .dsb ((FDC_command_register&3)-((*+3)&3))&3,$ea
420          sta FDC_command_register          sta FDC_command_register
421    
422          jsr WaitCommand          jsr WaitCommand
# Line 420  __fdc_command_2 Line 425  __fdc_command_2
425          ldx #0          ldx #0
426  loop_read_sector  loop_read_sector
427  __fdc_drq_1  __fdc_drq_1
428            .dsb ((FDC_drq&3)-((*+3)&3))&3,$ea
429          lda FDC_drq          lda FDC_drq
430      bmi loop_read_sector      bmi loop_read_sector
431  __fdc_data_2      __fdc_data_2
432            .dsb ((FDC_data&3)-((*+3)&3))&3,$ea    
433          lda FDC_data          lda FDC_data
434          sta LOADER_SECTOR_BUFFER,x              ; Store the byte in the sector buffer          sta LOADER_SECTOR_BUFFER,x              ; Store the byte in the sector buffer
435          inx          inx
436          bne loop_read_sector          bne loop_read_sector
437    
438  __fdc_status_1  __fdc_status_1
439            .dsb ((FDC_status_register&3)-((*+3)&3))&3,$ea
440          lda FDC_status_register          lda FDC_status_register
441          and #$1C          and #$1C
442    
# Line 463  r_wait_completion Line 471  r_wait_completion
471    
472  r2_wait_completion  r2_wait_completion
473  __fdc_status_2  __fdc_status_2
474            .dsb ((FDC_status_register&3)-((*+3)&3))&3,$ea
475          lda FDC_status_register          lda FDC_status_register
476          lsr          lsr
477          bcs r2_wait_completion          bcs r2_wait_completion

Legend:
Removed from v.1397  
changed lines
  Added in v.1398

  ViewVC Help
Powered by ViewVC 1.1.26