Advertisement
yugorin

hires anim next step

May 3rd, 2017
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import "helpers.asm"
  2.  
  3. :BasicUpstart2(main)
  4.  
  5. //----------------------------------------------------------
  6. // Code for creating the breakpoint file sent to Vice/C64Debugger
  7. //----------------------------------------------------------
  8. .var _useBinFolderForBreakpoints = cmdLineVars.get("usebin") == "true"
  9. .var _createDebugFiles = cmdLineVars.get("afo") == "true"
  10. .print "File creation " + [_createDebugFiles
  11.     ? "enabled (creating breakpoint file)"
  12.     : "disabled (no breakpoint file created)"]
  13. .var brkFile
  14. .if(_createDebugFiles) {
  15.     .if(_useBinFolderForBreakpoints)
  16.         .eval brkFile = createFile("bin/breakpoints.txt")
  17.     else
  18.         .eval brkFile = createFile("breakpoints.txt")
  19. }
  20.  
  21. .macro break() {
  22. .if(_createDebugFiles) {
  23.     .eval brkFile.writeln("break " + toHexString(*))
  24.     }
  25. }
  26.  
  27. // For C64Debugger v0.54 (2016/09/03)
  28. .macro setbkg(color) {
  29. .if(_createDebugFiles) {
  30.     .eval brkFile.writeln("setbkg " + toHexString(*) + " " + color)
  31.     }
  32. }
  33.  
  34. //Because Kick Assembler has to be run with the -afo switch to be able to write breakpoints to a file, we can use this to enable "debugger" specific code when build with Shift-F7 or Shift-F5, ie:
  35.  
  36. .const debug = cmdLineVars.get("afo") == "true"
  37.  
  38. .if (debug) {
  39.   inc $d020
  40. }
  41.  
  42.  
  43. main:
  44.   lda screen_contror_register
  45.   ora #%00100000
  46.   sta screen_contror_register
  47.  
  48.   lda #DARK_GRAY
  49.   sta border_color
  50.  
  51.   :choose_screen_memory(3)
  52.  
  53.   :choose_bitmap_memory(1)
  54.  
  55. begin:
  56. lda #$ff
  57. ldx #$00
  58. ldy #$ff
  59.  
  60. //*=$0d00
  61. poczatek:
  62.  
  63.  
  64.    
  65. :delay(200,40)
  66. //:break()
  67.  
  68.   sta $2000+4*(8*40)+18*8,x
  69.  
  70.  
  71.   cpx #$07
  72.   beq !end+
  73.   inx
  74.  
  75.  
  76.   bne !fakejmp+
  77.  
  78.  
  79. !fakejmp:
  80.   jmp poczatek
  81.  
  82.  
  83. !end:
  84. //:break()
  85.   clc
  86.   rol $2000+4*(8*40)+18*8
  87.   clc
  88. :delay(200,40)
  89.     rol $2000+4*(8*40)+18*8
  90. :delay(200,40)
  91.  
  92. clc
  93. :delay(200,40)
  94.  
  95.       rol $2000+4*(8*40)+18*8
  96. :delay(200,40)
  97.  
  98.   clc
  99. :delay(200,40)
  100.  
  101.   rol $2000+4*(8*40)+18*8+1
  102. :delay(200,40)
  103.  
  104.   clc
  105. :delay(200,40)
  106.  
  107.   rol $2000+4*(8*40)+18*8+1
  108. :delay(200,40)
  109.  
  110.   clc
  111. :delay(200,40)
  112.  
  113.   rol $2000+4*(8*40)+18*8+2
  114.   clc
  115.   //rol $2000+4*(8*40)+18*8+3
  116.   //clc
  117.   //rol $2000+4*(8*40)+18*8+4
  118.   //clc
  119. :delay(200,40)
  120.  
  121.   rol $2000+4*(8*40)+18*8+5
  122. :delay(200,40)
  123.  
  124.   clc
  125. :delay(200,40)
  126.  
  127.   rol $2000+4*(8*40)+18*8+6
  128. :delay(200,40)
  129.  
  130.   clc
  131. :delay(200,40)
  132.  
  133.   rol $2000+4*(8*40)+18*8+6
  134. :delay(200,40)
  135.  
  136.   clc
  137.  
  138. :delay(200,40)
  139.   rol $2000+4*(8*40)+18*8+7
  140. :delay(200,40)
  141.  
  142. clc
  143. :delay(200,40)
  144.  
  145.   rol $2000+4*(8*40)+18*8+7
  146. :delay(200,40)
  147.  
  148.  clc
  149. :delay(200,40)
  150.  
  151.   rol $2000+4*(8*40)+18*8+7
  152.  
  153.   //rol $2000+4*(8*40)+18*8
  154. //:break()  
  155. prawo:
  156.   lda $2000+4*(8*40)+18*8
  157.   ora #$04
  158.   sta $2000+4*(8*40)+18*8
  159. :delay(200,40)
  160. //:break()
  161.   ora #$06
  162.   sta $2000+4*(8*40)+18*8
  163. :delay(200,40)
  164. //:break()
  165.   ora #$07
  166.   sta $2000+4*(8*40)+18*8
  167.  
  168.  
  169.  
  170.  
  171.   jmp begin
  172.  
  173.  
  174.  
  175.  
  176.  
  177. * = screen_memory(3) "cos"
  178. .fill 1000, GRAY << 1 | LIGHT_GRAY
  179.  
  180. * = bitmap_memory(1) "Wypelnij mape bitowa"
  181. .fill 8192, 0
  182. /*.for (var y = 0; y < 25; y++) {
  183.   .for (var x = 0; x < 40; x++) {
  184.     .var number = 25*y + x
  185.     .for (var i = 7; i >= 0; i--) {
  186.       .byte number >> i
  187.     }
  188.   }
  189. }
  190. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement