Advertisement
Guest User

Untitled

a guest
Apr 1st, 2012
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.39 KB | None | 0 0
  1. local delta=0x30-0x1A
  2. while true do
  3.     --memory.writebyte(0x8030E3,3)      --No enemies.
  4.    
  5.     if memory.readbyte(0x404024)>0 then     --If a shot's been fired...
  6.         for i=0,4 do
  7.             memory.writebyte(0x40401A+i*delta,memory.readbyte(0x40401A))
  8.             memory.writebyte(0x40401D+i*delta,memory.readbyte(0x40401D))
  9.         end
  10.     end
  11.  
  12.     while memory.readbyte(0x404024)>0 do
  13.         --memory.writebyte(0x8030E3,3)      --No enemies.
  14.  
  15.         local timer=memory.readbyte(0x404024)
  16.         for i=0,4 do
  17.             memory.writebyte(0x404024+i*delta,timer)
  18.             lastx=memory.readbyte(0x40401A+i*delta)
  19.             memory.writebyte(0x40401A+i*delta,math.min(math.max(lastx+i-2,0),255))
  20.             memory.writebyte(0x404016+i*delta,2)
  21.             memory.writebyte(0x40401E+i*delta,0)
  22.         end
  23.         emu.frameadvance()
  24.     end
  25.  
  26.     --memory.writebyte(0x4035E5,150)    --Also star's y position, but also gets confused
  27.     --memory.writebyte(0x403808,80)     --Also star's y position, but gets confused when other shots fired
  28.     memory.writebyte(0x40401D,150)      --Star's y position
  29.     --memory.writebyte(0x803072,120)        --No effect (?)
  30.     --memory.writebyte(0x404024,30)     --Counts down to star's disappearance
  31.     emu.frameadvance()
  32. end
  33.  
  34. --[[
  35. STAR 1
  36. ------
  37. x position:
  38. s0401A
  39.  
  40. y positions:
  41. s035E5
  42. s03808
  43. s0401D
  44.  
  45. countdown to disappearance:
  46. s04024
  47.  
  48. no effect?
  49. i03072
  50.  
  51. **************
  52. STAR 2
  53. ------
  54. x position:
  55. s04030
  56.  
  57. y position:
  58. s04033
  59.  
  60. **************
  61. Other addresses of interest:
  62. s04030
  63. ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement