julioitha153

Biker Mice From Mars - .Lua

May 31st, 2021 (edited)
84
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Made by julioitha153
  2. --Beginner coding but works!
  3. --designed for SNES9X 1.51 v7.1
  4.  
  5. while true do
  6. mrb = memory.readbyte
  7. mrbs = memory.readbytesigned
  8. mrw = memory.readword
  9. mrws = memory.readwordsigned
  10. mrdw = memory.readdword
  11. mwb = memory.writebyte
  12. mww = memory.writeword
  13. mwws = memory.writewordsigned
  14.  
  15. map = mrb(0x00a0)
  16. round = mrb(0x00a2)
  17.  
  18. fund1 = mrws(0x0080)
  19. fund2 = mrws(0x0082)
  20.  
  21. player1a = mrws(0x0092)--?
  22.  
  23. superhardcode1 = mrws(0x03bc)
  24. superhardcode2 = mrws(0x7efe4a)
  25.  
  26. player1X = mrws(0x070a)
  27. player1Y = mrws(0x070e)
  28. player1Z = mrws(0x0714)
  29. player1 = mrb(0x0722)
  30. player1status = mrws(0x0724)
  31. player1Angle = mrws(0x0726)
  32.  
  33. player2X = mrws(0x075a)
  34. player2Y = mrws(0x075e)
  35. player2Z = mrws(0x0764)
  36. player2 = mrb(0x0772)
  37. player2status = mrws(0x0774)
  38. player2Angle = mrws(0x0776)
  39.  
  40. player3X = mrws(0x07aa)
  41. player3Y = mrws(0x07ae)
  42. player3Z = mrws(0x07B4)
  43. player3 = mrb(0x07c2)
  44. player3status = mrws(0x07C4)
  45. player3Angle = mrws(0x07C6)
  46.  
  47. player4X = mrws(0x07fa)
  48. player4Y = mrws(0x07fe)
  49. player4Z = mrws(0x0804)
  50. player4 = mrb(0x0812)
  51. player4status = mrws(0x0814)
  52. player4Angle = mrws(0x0816)
  53.  
  54. player5X = mrws(0x084a)
  55. player5Y = mrws(0x084e)
  56. player5Z = mrws(0x0854)
  57. player5 = mrb(0x0862)
  58. player5status = mrws(0x0864)
  59. player5Angle = mrws(0x0866)
  60.  
  61. player6X = mrws(0x089a)
  62. player6Y = mrws(0x089e)
  63. player6Z = mrws(0x08a4)
  64. player6 = mrb(0x08b2)
  65. player6status = mrws(0x08B4)
  66. player6Angle = mrws(0x08B6)
  67.  
  68. player1FredCountDown = mrws(0x091c)
  69. player1ShootingStarSpeed = mrws(0x0916)
  70. player1ShootingStar = mrws(0x0918) --0on Ground 1Go Up 2 Go down
  71.  
  72. player1b = mrws(0x0924)--?
  73.  
  74. player1place = mrws(0x0928)
  75. player2place = mrws(0x0978)
  76. player3place = mrws(0x09c8)
  77. player4place = mrws(0x0a18)
  78. player5place = mrws(0x0a68)
  79. player6place = mrws(0x0ab8)
  80.  
  81. camX = mrws(0x1bdc)
  82. camY = mrws(0x1be0)
  83. camZ = mrws(0x1bf2)
  84.  
  85. player1c = mrws(0xfe02)--?
  86.  
  87. player1acc1 = mrws(0x1790)
  88. player1StarCounter = mrws(0x1792)
  89. player1EarthquakeCounter = mrws(0x1794)
  90. player1health = mrws(0x179e)
  91. player1acc2 = mrws(0x17aa)
  92. player1ckp1 = mrws(0x17ae)
  93. player1ckp2 = mrws(0x17b0)
  94. player1lap = mrws(0x17b2)
  95. player1acc3a = mrb(0x17c0)
  96. player1acc3b = mrws(0x17c1)
  97. player1attackCounter = mrws(0x17c2)
  98. player1RaceEnd = mrws(0x17c5) --255
  99. player1attack = mrws(0x17c6)
  100. player1item = mrws(0x17ce)
  101. player1TurnForce = mrws(0x17d9)
  102.  
  103. player2acc1 = mrws(0x17e0)
  104. player2StarCounter = mrws(0x17e2)
  105. player2EarthquakeCounter = mrws(0x17e4)
  106. player2health = mrws(0x17ee)
  107. player2acc2 = mrws(0x17fa)
  108. player2ckp1 = mrws(0x17fe)
  109. player2ckp2 = mrws(0x1800)
  110. player2lap = mrws(0x1802)
  111. player2acc3a = mrb(0x1810)
  112. player2acc3b = mrws(0x1811)
  113. player2attackCounter = mrws(0x1812)
  114. player2RaceEnd = mrws(0x1815) --255
  115. player2attack = mrws(0x1816)
  116. player2item = mrws(0x181e)
  117. player2TurnForce = mrws(0x1829)
  118.  
  119. player3acc1 = mrws(0x1830)
  120. player3StarCounter = mrws(0x1832)
  121. player3EarthquakeCounter = mrws(0x1834)
  122. player3health = mrws(0x183E)
  123. player3acc2 = mrws(0x184a)
  124. player3ckp1 = mrws(0x184e)
  125. player3ckp2 = mrws(0x1850)
  126. player3lap = mrws(0x1852)
  127. player3acc3a = mrb(0x1860)
  128. player3acc3b = mrws(0x1861)
  129. player3attackCounter = mrws(0x1862)
  130. player3RaceEnd = mrws(0x1865) --255
  131. player3attack = mrws(0x1866)
  132. player3item = mrws(0x186e)
  133. player3TurnForce = mrws(0x1879)
  134.  
  135. player4acc1 = mrws(0x1880)
  136. player4StarCounter = mrws(0x1882)
  137. player4EarthquakeCounter = mrws(0x1884)
  138. player4health = mrws(0x188E)
  139. player4acc2 = mrws(0x189a)
  140. player4ckp1 = mrws(0x189e)
  141. player4ckp2 = mrws(0x18a0)
  142. player4lap = mrws(0x18a2)
  143. player4acc3a = mrb(0x18b0)
  144. player4acc3b = mrws(0x18b1)
  145. player4attackCounter = mrws(0x18b2)
  146. player4RaceEnd = mrws(0x18b5) --255
  147. player4attack = mrws(0x18b6)
  148. player4item = mrws(0x18be)
  149. player4TurnForce = mrws(0x18c9)
  150.  
  151. player5acc1 = mrws(0x18d0)
  152. player5StarCounter = mrws(0x18d2)
  153. player5EarthquakeCounter = mrws(0x18d4)
  154. player5health = mrws(0x18dE)
  155. player5acc2 = mrws(0x18ea)
  156. player5ckp1 = mrws(0x18ee)
  157. player5ckp2 = mrws(0x18f0)
  158. player5lap = mrws(0x18f2)
  159. player5acc3a = mrb(0x1900)
  160. player5acc3b = mrws(0x1901)
  161. player5attackCounter = mrws(0x1902)
  162. player5RaceEnd = mrws(0x1905) --255
  163. player5attack = mrws(0x1906)
  164. player5item = mrws(0x190e)
  165. player5TurnForce = mrws(0x1919)
  166.  
  167. player1cashearnedonrace = mrws(0x1b4e)
  168.  
  169. player6acc1 = mrws(0x1920)
  170. player6StarCounter = mrws(0x1922)
  171. player6EarthquakeCounter = mrws(0x1924)
  172. player6health = mrws(0x192e)
  173. player6acc2 = mrws(0x193a)
  174. player6ckp1 = mrws(0x193e)
  175. player6ckp2 = mrws(0x1940)
  176. player6lap = mrws(0x1942)
  177. player6acc3a = mrb(0x1950)
  178. player6acc3b = mrws(0x1951)
  179. player6attackCounter = mrws(0x1952)
  180. player6RaceEnd = mrws(0x1955) --255
  181. player6attack = mrws(0x1956)
  182. player6item = mrws(0x195e)
  183. player6TurnForce = mrws(0x1969)
  184.  
  185. display0X = mrws(0x0540)
  186. display0Y = mrws(0x0541)
  187. display0a = mrws(0x0542)
  188. display0b = mrws(0x0543)
  189.  
  190.  
  191. display1X = mrws(0x0544)
  192. display1Y = mrws(0x0545)
  193. display1a = mrws(0x0546)
  194. display1b = mrws(0x0547)
  195.  
  196. display2X = mrws(0x0548)
  197. display2Y = mrws(0x0549)
  198. display2a = mrws(0x054a)
  199. display2b = mrws(0x054b)
  200.  
  201. display3X = mrws(0x054c)
  202. display3Y = mrws(0x054d)
  203. display3a = mrws(0x054e)
  204. display3b = mrws(0x054f)
  205.  
  206. display4X = mrws(0x0550)
  207. display4Y = mrws(0x0551)
  208. display4a = mrws(0x0552)
  209. display4b = mrws(0x0553)
  210.  
  211. display5X = mrws(0x0554)
  212. display5Y = mrws(0x0555)
  213. display5a = mrws(0x0556)
  214. display5b = mrws(0x0557)
  215.  
  216. display6X = mrws(0x0558)
  217. display6Y = mrws(0x0559)
  218. display6a = mrws(0x055a)
  219. display6b = mrws(0x055b)
  220.  
  221. display7X = mrws(0x055c)
  222. display7Y = mrws(0x055d)
  223. display7a = mrws(0x055e)
  224. display7b = mrws(0x055f)
  225.  
  226. ScreenX = 256
  227. ScreenY = 225
  228.  
  229. player1cash = mrws(0x7efe30)
  230. player1cash2 = mrws(0x7efe31)
  231. player1engine = mrws(0x7efe38)
  232. player1tire = mrws(0x7efe3c)
  233. player1armor = mrws(0x7efe40)
  234. player1shot = mrws(0x7efe44)
  235.  
  236. player2cash = mrws(0x7efe32)
  237. player2engine = mrws(0x7efe40)
  238. player2tire = mrws(0x7efe3e)
  239. player2armor = mrws(0x7efe42)
  240. player2shot = mrws(0x7efe46)
  241.  
  242. AdrawningX = mrws(0x1c00)
  243. AdrawningY = mrws(0x1c02)
  244. BdrawningX = mrws(0x1c04)
  245. BdrawningY = mrws(0x1c06)
  246. CdrawningX = mrws(0x1c10)
  247. CdrawningY = mrws(0x1c12)
  248. DdrawningX = mrws(0x1c18)
  249. DdrawningY = mrws(0x1c1A)
  250. GUIX = mrws(0x1c08)
  251. GUIY = mrws(0x1C0A)
  252.  
  253. player2CPUOrNot = mrws(0x0090) -- 0 = cpu 2 = player2
  254. practicemode = mrws(0x0096) -- 2 practicemode
  255.  
  256. startingPosX = mrws(0x00a8)
  257. startingPosY = mrws(0x00aa)
  258.  
  259. curTimeMin = mrws(0x00af)
  260. curTimeSec = mrws(0x00ae)
  261. curTimeMil = mrws(0x00b1)
  262.  
  263. lap1TimeMin = mrws(0x1f21)
  264. lap1TimeSec = mrws(0x1f20)
  265. lap1TimeMil = mrws(0x1f23)
  266.  
  267. lap2TimeMin = mrws(0x1f25)
  268. lap2TimeSec = mrws(0x1f24)
  269. lap2TimeMil = mrws(0x1f27)
  270.  
  271. lap3TimeMin = mrws(0x1f29)
  272. lap3TimeSec = mrws(0x1f28)
  273. lap3TimeMil = mrws(0x1f2b)
  274.  
  275. lap4TimeMin = mrws(0x1f2d)
  276. lap4TimeSec = mrws(0x1f2c)
  277. lap4TimeMil = mrws(0x1f2f)
  278.  
  279. lap5TimeMin = mrws(0x1f31)
  280. lap5TimeSec = mrws(0x1f30)
  281. lap5TimeMil = mrws(0x1f33)
  282.  
  283. totTimeMin = mrws(0x1f34)
  284. totTimeSec = mrws(0x1f35)
  285. totTimeMil = mrws(0x1f37)
  286.  
  287. player1points = mrws(0x7efe24)
  288. player2points = mrws(0x7efe26)
  289. player3points = mrws(0x7efe28)
  290. player4points = mrws(0x7efe2a)
  291. player5points = mrws(0x7efe2c)
  292. player6points = mrws(0x7efe2e)
  293.  
  294. cpuSpeed = mrws(0x0098)
  295.  
  296. player1accel = mrws(0x1b5e)
  297. player2accel = mrws(0x1b60)
  298. player3accel = mrws(0x1b62)
  299. player4accel = mrws(0x1b64)
  300. player5accel = mrws(0x1b66)
  301. player6accel = mrws(0x1b68)
  302.  
  303. player1maxspeed = mrws(0x0914)
  304. player2maxspeed = mrws(0x0964)
  305. player3maxspeed = mrws(0x09b4)
  306. player4maxspeed = mrws(0x0a04)
  307. player5maxspeed = mrws(0x0a54)
  308. player6maxspeed = mrws(0x0aa4)
  309. player1vinnieattackspeed = mrws(0x0916)
  310.  
  311. mapselection = mrb(0x7e198c)
  312.  
  313. keys = input.get()
  314. mX = keys.xmouse
  315. mY = keys.ymouse
  316.  
  317. --Emu Screen Pos
  318. sX = 255
  319. sY = 225
  320.  
  321. --Show Checkpoints
  322. gui.text(sX-20,2,player1ckp2.."/"..player1ckp1)
  323.  
  324. --Show Speed
  325. speedmin = 1968
  326. speedmax = 2672
  327. if player1acc1<1968 then
  328. gui.rect(sX-4,sY-2,(sX-1),(sY-2)-(player1acc1/45),{0,0,0,0},"red")
  329. elseif player1acc1>=1968 and player1acc1<=2672 then
  330. gui.rect(sX-4,sY-2,(sX-1),(sY-2)-(player1acc1/45),{0,0,0,0},"white")
  331. elseif player1acc1>2673 then
  332. gui.rect(sX-4,sY-2,(sX-1),(sY-2)-(player1acc1/45),{0,0,0,0},"green")
  333. end
  334.  
  335.  
  336. if keys.up then
  337. memory.writeword(0x070a,player1X+10)
  338. elseif keys.down then
  339. memory.writeword(0x070e,player1Y+10)
  340. elseif keys.left then
  341. memory.writeword(0x070a,player1X-10)
  342. elseif keys.right then
  343. memory.writeword(0x070e,player1Y-10)
  344. end
  345.  
  346. gui.text(2,0,"Tela: "..fund1.." "..fund2.."\nMapa: "
  347. ..map.."\nVeloc: "..player1acc1.."\nBoost: "..player1acc2)
  348. textCX = 2
  349. textCY = sY-10
  350. if player1acc3b==1 then
  351. gui.text(textCX,textCY,"1")
  352. elseif player1acc3b==2 then
  353. gui.text(textCX,textCY,"2")
  354. elseif player1acc3b==3 then
  355. gui.text(textCX,textCY,"3")
  356. elseif player1acc3b==4 then
  357. gui.text(textCX,textCY,"4")
  358. elseif player1acc3b==128 then
  359. gui.text(textCX,textCY,player1acc3a,"red")
  360. else
  361. gui.text(textCX,textCY,player1acc3a)
  362. end
  363.  
  364. --CORES
  365. --2e00(01) Pista e alguns fundos
  366. --2e02(03) MiniMap e alguns textos
  367. --2e04(05) Char no Minimap e alguns textos
  368. --2e06(07) Inimigos no Minimap e alguns textos
  369. --2e08(09) ??
  370. --2e0a(0b) Alguns textos e GUI da corrida
  371. --2e0c(0d) Alguns textos e GUI da corrida
  372. --2e0e(0f) Alguns textos e GUI da corrida
  373. --2e10(11) ??
  374. --2e12(13) GUI armor
  375. --2e14(15) GUI armor
  376. --2e16(17) GUI armor
  377. --2e18(19) ??
  378. --2e1a(1b) Alguns textos e GUI da corrida
  379. --2e1c(1d) Alguns textos e GUI da corrida
  380. --2e1e(1f) Alguns textos e GUI da corrida
  381. --2e20(21) ??
  382. --2e22(23) texto em practice
  383. --2e24(25) texto em practice
  384. --2e26(27) texto em practice
  385. --2e28(29) ??
  386. --2e2a(2b) GUI da corrida, plateia e alguns textos
  387. --2e2c(2d) GUI da corrida e alguns textos
  388. --2e2e(2f) GUI da corrida e alguns textos
  389. --2e30(31) Estrelas em player select
  390. --2e32(33) Estrelas em player select
  391. --2e34(35) Estrelas em player select
  392. --2e36(37) Estrelas em player select
  393. --2e38(39) ??
  394. --2e3a(3b) Alguns textos
  395. --2e3c(3d) Alguns textos
  396. --2e3e(3f) Alguns textos
  397. --2e40(41) ??
  398. --2e42(43) canto da guia e lado dos prédios no mapviewer
  399. --2e44(45) canto da guia(e mais coisas) e rua+prédios do mapviewer
  400. --2e46(47) canto da guia(e mais coisas) e teto dos predios do mapviewer
  401. --2e48(49) rua e mais coisas
  402. --2e4a(4b) calçada e mais coisas
  403. --2e4c(4d) detalhes calçada
  404. --2e4e(4f) faixa da rua e mais coisas
  405. --2e50(51) fundo de algumas coisas aleatorias
  406. --2e52(53) fundo de algumas do practice screen
  407. --2e54(55) fundo de algumas do practice screen
  408. --2e56(57) fundo de algumas do practice screen
  409. --2e58(59) fundo de algumas do practice screen
  410. --2e5a(5b) plateia
  411. --2e5c(5d) plateia
  412. --2e5e(5f) COR de fundo da corrida
  413. --2e60(61) ??
  414. --2e62(63) detalhes fora da pista
  415. --2e64(65) detalhes fora da pista
  416. --2e66(67) detalhes fora da pista
  417. --2e68(69) detalhes fora da pista
  418. --2e6a(6b) detalhes fora da pista
  419. --2e6c(6d) detalhes fora da pista
  420. --2e6e(6f) detalhes fora da pista
  421. --2e70(71) detalhes fora da pista
  422. --2e72(73) detalhes fora da pista
  423. --2e74(75) detalhes fora da pista
  424. --2e76(77) detalhes fora da pista
  425. --2e78(79) detalhes plateia
  426. --2e7a(7b) detalhes plateia
  427. --2e7c(7d) detalhes plateia
  428. --2e7e(7f) detalhes fora da pista
  429. --2e80(81) ??
  430. --2e82(83) detalhes fora da pista
  431. --2e84(85) detalhes fora da pista
  432. --2e86(87) detalhes fora da pista
  433. --2e88(89) detalhes fora da pista
  434. --2e8a(8b) detalhes fora da pista
  435. --2e8c(8d) detalhes fora da pista
  436. --2e8e(8f) detalhes fora da pista
  437. --2e90(91) detalhes fora da pista
  438. --2e92(93) detalhes fora da pista
  439. --2e94(95) detalhes fora da pista
  440. --2e96(97) detalhes fora da pista
  441. --2e98(99) detalhes fora da pista
  442. --2e9a(9b) detalhes fora da pista
  443. --2e9c(9d) detalhes fora da pista
  444. --2e9e(9f) detalhes fora da pista
  445. --2f00(01) ??
  446. --2f02-2f1f Char1Colors
  447. --2f22-2f3f Char2Colors
  448. --2f42-2f5f Char3Colors
  449. --2f62-2f7f Char4Colors
  450. --2f82-2f9f Char5Colors
  451. --2fa2-2fbf Char6Colors
  452. --2fc0(c1)
  453.  
  454. emu.frameadvance()
  455. end
RAW Paste Data