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

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

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

revision 1025 by dbug, Sun Dec 15 11:47:51 2013 UTC revision 1035 by dbug, Sun Dec 15 15:35:39 2013 UTC
# Line 32  Initialize Line 32  Initialize
32    
33  StartUp  StartUp
34          ;jmp StartUp          ;jmp StartUp
         jsr SetUpIrqHandlers      
35          jsr SoftHiresWithCopyCharset          jsr SoftHiresWithCopyCharset
36    
37          ;ldx #LOADER_FIRST_PICTURE          ;ldx #LOADER_FIRST_PICTURE
# Line 54  loop_forever_demo_finished Line 53  loop_forever_demo_finished
53          jmp loop_forever_demo_finished          jmp loop_forever_demo_finished
54                    
55                    
 ClearZeroPage  
 .(  
         lda #0  
         tax  
 loop  
         sta $00,x  
         dex  
         bne loop          
         rts      
 .)        
   
           
 SetUpIrqHandlers  
         sei  
                   
         ; Make sure the microdisc IRQ is disabled        
         jsr WaitCompletion  
           
         ;lda #%10000100                         ; Disable the FDC (Eprom select + FDC Interrupt request)  
         ;sta MICRODISC  
   
         ;jsr WaitCompletion  
   
         rts      
56                                    
57  IrqHandler  IrqHandler
58          sta irq_save_a          sta irq_save_a
# Line 244  microdisc_read_data Line 219  microdisc_read_data
219      bmi microdisc_read_data      bmi microdisc_read_data
220    
221          lda $313          lda $313
222  __auto_write_address          sta $200,y              ; Store the byte in page 2
         sta $c000,y  
223          iny          iny
224    
225          bne microdisc_read_data          bne microdisc_read_data
# Line 253  __auto_write_address Line 227  __auto_write_address
227          lda FDC_status_register          lda FDC_status_register
228          and #$1C          and #$1C
229    
230          ; Try to let time to an IRQ to play          ; Try to let time to an IRQ to play, and during that time copy the sector to the final location
231          cli          cli
232    
233            ldy #0
234    loop_copy
235            lda $200,y                      ; Load the byte from page 2
236    __auto_write_address
237            sta $c000,y             ; Store it to the final location
238            iny
239            bne loop_copy
240    
241          nop          nop
242          nop          nop
243          sei          sei
# Line 264  __auto_write_address Line 247  __auto_write_address
247          dec sectors_to_go          dec sectors_to_go
248          bne read_sectors_loop          bne read_sectors_loop
249    
250            jsr WaitCompletion
251    
252          ; Data successfully loaded (we hope), so we restore the interrupts          ; Data successfully loaded (we hope), so we restore the interrupts
253          cli          cli
254          rts          rts
255                    
256  ExecuteData      ExecuteData    
         jsr SetUpIrqHandlers  
         jsr ClearZeroPage  
257  __auto_execute_address  __auto_execute_address
258          jsr $a000          jmp $a000
         jsr SetUpIrqHandlers  
         rts  
259    
260    
261  WaitCompletion  WaitCompletion

Legend:
Removed from v.1025  
changed lines
  Added in v.1035

  ViewVC Help
Powered by ViewVC 1.1.26