Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;--------------------------------------------------------------------
  2. ;
  3. ;(C) tolkien / Goblins 2019.
  4. ;
  5. ;--------------------------------------------------------------------
  6.     opt c-,p=68000
  7.     section demophase,code
  8.  
  9. ;Activa o desactiva el canal DMA deseado
  10. COPPER      =   1  
  11. BLITTER     =   1
  12. SPRITE      =   0
  13. DISK        =   0
  14. NASTY       =   0   ;Activa Nasty Mode del Blitter
  15. TOPAZ       =   0   ;Usa Topaz
  16. VBI         =   0   ;activa VertivalBlankInterrupt
  17. CPI         =   0
  18.  
  19. NUMPLANES   =   4   ;16 colores
  20. Plane_Size  =   40*256
  21.  
  22. ;Este include contiene las rutinas asesinas del sistema
  23.         include includes/SkyInit.s 
  24.         include includes/GoblinsCustom.i
  25.                            
  26. ;-----------------------------------------------------------
  27. ; Precalculos de la demo. SinTables, etc.
  28. ; Invocada ANTES de tomar el sistema.
  29. ;-----------------------------------------------------------
  30. _Precalc:
  31.  
  32.  
  33.         rts
  34.    
  35.  
  36. ;-----------------------------------------------------------
  37. ; Seccion principal
  38. ; Invocada por SkyInit. La demo termina cuando se sale
  39. ; de esta rutina.
  40. ;-----------------------------------------------------------
  41. _Main: 
  42.         moveq   #NumPlanes-1,d1
  43.         move.l  #screen,d0  ;direccion de nuestra imagen
  44.         lea Planes,a1   ;registro de bitplanos en la copperlist
  45. .bp
  46.         move.w  d0,6(a1)
  47.         swap    d0
  48.         move.w  d0,2(a1)
  49.         swap    d0
  50.         add.l   #Plane_Size,d0
  51.         add.l   #8,a1       ;siguiente puntero a plano
  52.         dbra    d1,.bp
  53.  
  54.         ;Iniciamos nuestra copperlist
  55.         move.l  #copperlist,COP1LCH+CUSTOMBASE
  56.         clr.w   COPJMP1+CUSTOMBASE
  57.  
  58. _Wait
  59.         btst    #6,$bfe001
  60.         bne.s   _Wait
  61.         rts
  62.  
  63. ;-----------------------------------------------------------
  64. ; Finalizacion de la demo (respuesta a WB).
  65. ; Invocada tras la restauracion del sistema.
  66. ;-----------------------------------------------------------
  67. _Exit:
  68.    
  69.         rts
  70.  
  71.  
  72.  
  73. ;-----------------------------------------------------------
  74. ; Invocado por la interrupcion vblank. Se invoca 50 veces
  75. ; por segundo.
  76. ;-----------------------------------------------------------
  77. _Interrupt:
  78.  
  79.         rts
  80.  
  81.  
  82. ;SECCIONES EN MEMORIA CHIP PARA BITPLANOS Y COPPERLIST
  83.  
  84.         section bitplanes,data_c
  85. screen:
  86.         ;ds.b    40*256      ;40 bytes por linea * 256 lineas
  87.         incbin  "data/16colores.raw"
  88.    
  89.         section copperlist,data_c  
  90. ;------------------------------------------------------------------
  91. ;   MAIN COPPERLIST
  92. ;------------------------------------------------------------------
  93. copperlist:
  94.         DC.W    DiWStrt,$2C81,DiWStop,$2cC1,DdfStrt,$0038,DdfStop,$00D0
  95.         DC.W    BplCon0,$4200,BplCon3,$0000,AgaFMode,$0000
  96.         DC.W    BplCon1,$0000,BplCon2,$0000
  97.         DC.W    Bpl1Mod,$0000,Bpl2Mod,$0000
  98.  
  99.         ;LOS COLORES DE NUESTRA IMAGEN CONVERTIDOS CON PICCON O ARTPRO
  100.         dc.w    $0180,$0CCC,$0182,$0000,$0184,$0FFF,$0186,$0888
  101.         dc.w    $0188,$0A20,$018A,$0D50,$018C,$0EB0,$018E,$0080
  102.         dc.w    $0190,$06B0,$0192,$0170,$0194,$05BC,$0196,$0367
  103.         dc.w    $0198,$007B,$019A,$0048,$019C,$0E88,$019E,$0B55
  104.  
  105. Planes:
  106.         DC.W    Bpl1Pth,$0000,Bpl1Ptl,$0000     ;punteros del Bitplano 1
  107.         DC.W    Bpl2Pth,$0000,Bpl2Ptl,$0000     ;punteros del Bitplano 2
  108.         DC.W    Bpl3Pth,$0000,Bpl3Ptl,$0000     ;punteros del Bitplano 3
  109.         DC.W    Bpl4Pth,$0000,Bpl4Ptl,$0000     ;punteros del Bitplano 4
  110.  
  111.         dc.w    $ffff,$fffe         ;Fin de la copperlist
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement