Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. clr.l -(a7)
  2. move.w #32,-(a7)
  3. trap #1
  4. addq.l #6,a7
  5. move.l d0,old_stack
  6.  
  7. movem.l $ffff8240,d0-d7
  8. movem.l d0-d7,old_palette
  9.  
  10.  
  11.  
  12. bsr initialise
  13.  
  14. movem.l sunset+2,d0-d7
  15. movem.l d0-d7,$ffff8240
  16.  
  17. move.l #buffer,d0
  18. add.l #255,d0
  19. clr.b d0
  20. move.l d0,display ;display now on 256 boundary
  21.  
  22.  
  23. move.l display,a1
  24. move.l a1,d1
  25. move.l #sunset+34,a0
  26.  
  27. move.l #7999,d0
  28. copy_buffer:
  29. move.l (a0)+,(a1)+
  30. subi.l #1,d0
  31. bne copy_buffer
  32.  
  33. movem.l clear_regs,d0-d7
  34.  
  35. move.l #buffer2,d0
  36. add.l #256,d0
  37. clr.b d0
  38. move.l d0,display2
  39.  
  40. move.l display2,d1 ;display 2 is blank
  41. ;display 1 contains picture
  42.  
  43.  
  44. move.l display,d0
  45. add.l #31840,d0
  46. move.l d0,a1 ;end of picture=a1
  47. move.l display2,a0 ;blankscreen=a0
  48.  
  49.  
  50. clr.l d2
  51. move.l #40,d7
  52. move.l #200,d6
  53. clr.l d5
  54. move.l #200,d4
  55.  
  56. clr.l d3
  57. bsr v_sync
  58. bsr disp_it
  59.  
  60. whole_pic:
  61.  
  62. one_scan:
  63. move.l (a1)+,(a0)+
  64. sub.l #1,d7
  65. cmp.l d7,d2
  66. bne one_scan
  67.  
  68. move.l d0,a1
  69. sub.l #1,d6
  70. move.l #40,d7
  71. cmp.l d6,d2
  72. bne whole_pic
  73.  
  74.  
  75.  
  76. move.l display,d0
  77. add.l #31840,d0
  78. add.l #160,d5
  79. sub.l d5,d0
  80. move.l d0,a1
  81. move.l display2,a0
  82. sub.l #1,d4
  83.  
  84. move.l d4,d6
  85. cmp.l d4,d2
  86. bne whole_pic
  87.  
  88.  
  89. key cmp.b #$39,$fffffc02
  90. bne key
  91.  
  92. quit
  93. bsr restore
  94.  
  95. movem.l old_palette,d0-d7
  96. movem.l d0-d7,$ffff8240
  97.  
  98. move.l old_stack,-(a7)
  99. move.w #32,-(a7)
  100. trap #1
  101. addq.l #6,a7
  102.  
  103. clr.l -(a7)
  104. trap #1
  105.  
  106. *******************************************************************************
  107. *
  108. * Display the screen
  109. *
  110. *******************************************************************************
  111. disp_it:
  112. movem.l d0-d7/a0-a6,-(sp)
  113. clr.b $ffff820d.w
  114. lsr.l #8,d1
  115. move.b d1,$ffff8203.w
  116. lsr.w #8,d1
  117. move.b d1,$ffff8201.w
  118. movem.l (sp)+,d0-d7/a0-a6
  119. rts
  120.  
  121. include 'b:\init.s'
  122.  
  123. sunset: incbin 'B:\data\sunset.pi1'
  124.  
  125. buffer: ds.b 32000
  126. ds.b 256
  127. buffer2: ds.b 32000
  128. ds.b 256
  129. old_stack: ds.l 1
  130. old_palette: ds.l 8
  131. display ds.l 1
  132. display2 ds.l 1
  133. clear_regs: ds.l 8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement