daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Jun 4th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. **** BEGIN LOGGING AT Mon Jul 12 11:30:43 2010
  2.  
  3. Jul 12 11:30:43  Now talking on #asm
  4. Jul 12 11:30:43 *   irc.caffie.net sets mode +n #asm
  5. **** ENDING LOGGING AT Mon Jul 12 11:31:08 2010
  6.  
  7. **** BEGIN LOGGING AT Mon Jul 12 11:31:23 2010
  8.  
  9. Jul 12 11:31:23  Now talking on #asm
  10. Jul 12 11:31:24 <MarioEdit> fuck
  11. Jul 12 11:31:25 <Selin> Hello?
  12. Jul 12 11:31:25 <MarioEdit> shit
  13. Jul 12 11:31:28 <Selin> Lol
  14. Jul 12 11:31:33  Selin (seliniphon@FC74DAB4.2D629580.452B6A9D.IP) has left #asm
  15. Jul 12 11:31:33  Selin (seliniphon@FC74DAB4.2D629580.452B6A9D.IP) has joined #asm
  16. Jul 12 11:31:40 <MarioEdit> damnit
  17. Jul 12 11:31:43  You have left channel #asm
  18. **** ENDING LOGGING AT Mon Jul 12 11:31:43 2010
  19.  
  20. **** BEGIN LOGGING AT Mon Jul 12 11:31:43 2010
  21.  
  22. Jul 12 11:31:43  Now talking on #asm
  23. Jul 12 11:31:46 <Selin> Lol
  24. Jul 12 11:31:51 <MarioEdit> oh well
  25. Jul 12 11:31:51 <Selin> Both leave
  26. Jul 12 11:31:54 Bad arguments for user command.
  27. Jul 12 11:31:56 <Selin> Eh
  28. Jul 12 11:31:57  You have left channel #asm (Leaving)
  29. **** ENDING LOGGING AT Mon Jul 12 11:31:57 2010
  30.  
  31. **** BEGIN LOGGING AT Mon Jul 12 11:31:58 2010
  32.  
  33. Jul 12 11:31:58  Now talking on #asm
  34. Jul 12 11:32:01  Selin (seliniphon@FC74DAB4.2D629580.452B6A9D.IP) has left #asm
  35. Jul 12 11:32:04  You have left channel #asm
  36. **** ENDING LOGGING AT Mon Jul 12 11:32:04 2010
  37.  
  38. **** BEGIN LOGGING AT Mon Jul 12 11:32:04 2010
  39.  
  40. Jul 12 11:32:04  Now talking on #asm
  41. Jul 12 11:32:04 *   irc.caffie.net sets mode +n #asm
  42. Jul 12 11:32:05  Selin (seliniphon@FC74DAB4.2D629580.452B6A9D.IP) has joined #asm
  43. Jul 12 11:32:10 <Selin> K
  44. Jul 12 11:32:10 *   MarioEdit sets mode +v Selin
  45. Jul 12 11:32:13 <MarioEdit> okay
  46. Jul 12 11:32:18 <MarioEdit> so what do you know already?
  47. Jul 12 11:32:31 <Selin> LDA
  48. Jul 12 11:32:33 <Selin> STA
  49. Jul 12 11:32:39 <Selin> BEQ
  50. Jul 12 11:32:41 <Selin> RTL
  51. Jul 12 11:32:44 <Selin> uhm
  52. Jul 12 11:32:46 <MarioEdit> and CMP?
  53. Jul 12 11:32:49 <Selin> CMP
  54. Jul 12 11:32:52 <Selin> yes
  55. Jul 12 11:32:54 <MarioEdit> alright
  56. Jul 12 11:32:56 <MarioEdit> first things first
  57. Jul 12 11:32:57 <Selin> also
  58. Jul 12 11:33:00 <Selin> Freespace
  59. Jul 12 11:33:03 <Selin> And db
  60. Jul 12 11:33:05 <Selin> Lol
  61. Jul 12 11:33:10 <MarioEdit> do you have at least a half hour?
  62. Jul 12 11:33:15 <Selin> Uhm
  63. Jul 12 11:33:16 <Selin> Yes
  64. Jul 12 11:33:19 <MarioEdit> alright
  65. Jul 12 11:33:26 <Selin> I'm tired
  66. Jul 12 11:33:35 <MarioEdit> now, there are more branch opcodes than BEQ
  67. Jul 12 11:33:40 <Selin> So it could take much longer
  68. Jul 12 11:33:42 <MarioEdit> first up, is BNE
  69. Jul 12 11:33:43 <Selin> Uh huh
  70. Jul 12 11:33:55 <MarioEdit> it will branch if it is NOT equal
  71. Jul 12 11:33:56 <Selin> Branch not equal
  72. Jul 12 11:33:59 <MarioEdit> so, let's say
  73. Jul 12 11:34:00 <Selin> I do know that
  74. Jul 12 11:34:02 <Selin> Sorry
  75. Jul 12 11:34:05 <MarioEdit> f
  76. Jul 12 11:34:07 <Selin> I know some stuff
  77. Jul 12 11:34:08 <MarioEdit> BCS
  78. Jul 12 11:34:12 <Selin> I forget ts name
  79. Jul 12 11:34:16 <Selin> *it's
  80. Jul 12 11:34:19 <MarioEdit> so
  81. Jul 12 11:34:22 <MarioEdit> BCS means
  82. Jul 12 11:34:25 <Selin> No, don't know that bgs
  83. Jul 12 11:34:29 <Selin> *bcs
  84. Jul 12 11:34:30 <MarioEdit> it will branch if it's greater than, or equal to
  85. Jul 12 11:34:36 <Selin> Uh huh
  86. Jul 12 11:34:39 <MarioEdit> so, let's say we have LDA $13
  87. Jul 12 11:34:42 <MarioEdit> CMP #$20
  88. Jul 12 11:34:45 <MarioEdit> BCS Label
  89. Jul 12 11:34:48 <Selin> Uh huh
  90. Jul 12 11:34:50 <MarioEdit> if $13 is 20, or more
  91. Jul 12 11:34:53 <MarioEdit> it will branch
  92. Jul 12 11:34:55 <Selin> K
  93. Jul 12 11:35:01 <Selin> So
  94. Jul 12 11:35:01 <MarioEdit> understand?
  95. Jul 12 11:35:07 <MarioEdit> so let's say
  96. Jul 12 11:35:08 <MarioEdit> LDA $19
  97. Jul 12 11:35:12 <MarioEdit> CMP #$01
  98. Jul 12 11:35:15 <MarioEdit> BCS Label
  99. Jul 12 11:35:16 <Selin> You could use that for marios powerups
  100. Jul 12 11:35:28 <Selin> If your not small mario, it branches
  101. Jul 12 11:35:32 <MarioEdit> yep
  102. Jul 12 11:35:35 <Selin> :P
  103. Jul 12 11:35:36 <Selin> K
  104. Jul 12 11:35:38 <MarioEdit> now
  105. Jul 12 11:35:46 <MarioEdit> BCC is branch if less than (carry clear)
  106. Jul 12 11:35:54 <Selin> K
  107. Jul 12 11:35:55 <MarioEdit> you don't have to understand Carry flag yet
  108. Jul 12 11:36:01 <Selin> Yep
  109. Jul 12 11:36:01 <Selin> K
  110. Jul 12 11:36:02 <MarioEdit> so
  111. Jul 12 11:36:03 <MarioEdit> LDA $13
  112. Jul 12 11:36:05 <MarioEdit> CMP #$20
  113. Jul 12 11:36:07 <MarioEdit> BCC Label
  114. Jul 12 11:36:15 <MarioEdit> will branch if $13 is LESS than 20
  115. Jul 12 11:36:19 <MarioEdit> in hex
  116. Jul 12 11:36:24 <Selin> Yep
  117. Jul 12 11:36:27 <MarioEdit> so let's say
  118. Jul 12 11:36:29 <Selin> I know hex
  119. Jul 12 11:36:32 <MarioEdit> LDA $0DBF (coins)
  120. Jul 12 11:36:36 <MarioEdit> CMP #$10
  121. Jul 12 11:36:44 <Selin> Uh huh
  122. Jul 12 11:36:44 <MarioEdit> BCC Return
  123. Jul 12 11:36:51 <MarioEdit> that could check if you have less than 10 coins.
  124. Jul 12 11:37:02 <MarioEdit> which means
  125. Jul 12 11:37:04 <MarioEdit> you could use it
  126. Jul 12 11:37:05 <Selin> K
  127. Jul 12 11:37:08 <MarioEdit> in a shop block
  128. Jul 12 11:37:10 <MarioEdit> of some sorts
  129. Jul 12 11:37:12 <Selin> But
  130. Jul 12 11:37:23 <MarioEdit> yes?
  131. Jul 12 11:37:28 <Selin> Wouldn't that be 17 coins?
  132. Jul 12 11:37:34 <Selin> Cause it's hex, right?
  133. Jul 12 11:37:37 <MarioEdit> yes
  134. Jul 12 11:37:44 <MarioEdit> I'm not putting $'s in front of everything
  135. Jul 12 11:37:57 <MarioEdit> understand?
  136. Jul 12 11:38:01 <Selin> You'd need the hex value for everything
  137. Jul 12 11:38:02 <Selin> K
  138. Jul 12 11:38:08 <MarioEdit> now
  139. Jul 12 11:38:12 <MarioEdit> there is BMI, and BPL
  140. Jul 12 11:38:19 <Selin> Uh huh
  141. Jul 12 11:38:21 <MarioEdit> BMI will branch if the value is negative
  142. Jul 12 11:38:23 <MarioEdit> which means
  143. Jul 12 11:38:27 <MarioEdit> $80-$FF
  144. Jul 12 11:38:31 <Selin> K
  145. Jul 12 11:38:35 <MarioEdit> so
  146. Jul 12 11:38:37 <MarioEdit> LDA $7D
  147. Jul 12 11:38:39 <MarioEdit> BMI Label
  148. Jul 12 11:38:45 <MarioEdit> will branch if he's going up
  149. Jul 12 11:38:51 <Selin> Alright
  150. Jul 12 11:38:58 <MarioEdit> now
  151. Jul 12 11:39:03 <MarioEdit> BPL
  152. Jul 12 11:39:08 <MarioEdit> will branch if it's positive
  153. Jul 12 11:39:18 <MarioEdit> so it will branch if it's $00-$7F
  154. Jul 12 11:39:22 <Selin> Uh huh
  155. Jul 12 11:39:29 <MarioEdit> now, here's the tricky part
  156. Jul 12 11:39:40 <MarioEdit> if you have a CMP before the BMI/BPL
  157. Jul 12 11:39:44 <MarioEdit> let's say, ten
  158. Jul 12 11:39:45 <MarioEdit> then
  159. Jul 12 11:39:48 <MarioEdit> LDA $7D
  160. Jul 12 11:39:49 <MarioEdit> CMP #$10
  161. Jul 12 11:39:52 <Selin> Uh huh
  162. Jul 12 11:39:53 <MarioEdit> BPL Label
  163. Jul 12 11:39:59 <MarioEdit> will branch if the value
  164. Jul 12 11:40:02 <Selin> It branches below that?
  165. Jul 12 11:40:03 <MarioEdit> is from 10 - 8F
  166. Jul 12 11:40:10 <Selin> Oh
  167. Jul 12 11:40:11 <Selin> K
  168. Jul 12 11:40:17 <MarioEdit> and BMI
  169. Jul 12 11:40:26 <MarioEdit> will branch if it's 90 - 0F
  170. Jul 12 11:40:27 <Selin> So whatever number you had
  171. Jul 12 11:40:38 <Selin> Becomes the minimum
  172. Jul 12 11:40:40 <Selin> I guess
  173. Jul 12 11:40:49 <MarioEdit> you just add 10 to all of the limits
  174. Jul 12 11:40:53 <MarioEdit> so 80 + 10 = 90
  175. Jul 12 11:40:58 <MarioEdit> FF + 10 = 0F
  176. Jul 12 11:40:59 <Selin> Yep
  177. Jul 12 11:41:00 <Selin> K
  178. Jul 12 11:41:06 <MarioEdit> got it?
  179. Jul 12 11:41:11 <Selin> Yea
  180. Jul 12 11:41:22 <MarioEdit> there's also BVC and BVS
  181. Jul 12 11:41:27 <MarioEdit> but no need for that now
  182. Jul 12 11:41:28 <Selin> Can you save this Convo when it's dine
  183. Jul 12 11:41:32 <MarioEdit> yes
  184. Jul 12 11:41:32 <Selin> *done
  185. Jul 12 11:41:36 <MarioEdit> I have logs
  186. Jul 12 11:41:36 <Selin> And send to me vis pm
  187. Jul 12 11:41:40 <Selin> *via
  188. Jul 12 11:41:46 <MarioEdit> anyways
  189. Jul 12 11:41:49 <MarioEdit> on to math!
  190. Jul 12 11:41:53 <Selin> Cause I'm currently on my iPhone
  191. Jul 12 11:42:02 <Selin> I need logs so I can refer back
  192. Jul 12 11:42:03 <Selin> Ok
  193. Jul 12 11:42:06 <Selin> Math is food
  194. Jul 12 11:42:09 <MarioEdit> INC will increment A by one
  195. Jul 12 11:42:12 <Selin> *good
  196. Jul 12 11:42:16 <MarioEdit> so
  197. Jul 12 11:42:17 <Selin> Uh huh
  198. Jul 12 11:42:18 <MarioEdit> INC $0DBF
  199. Jul 12 11:42:23 <Selin> I know that
  200. Jul 12 11:42:24 <MarioEdit> will increase mario's coins
  201. Jul 12 11:42:25 <MarioEdit> by one
  202. Jul 12 11:42:27 <Selin> I think
  203. Jul 12 11:42:31 <MarioEdit> and DEC is decrement
  204. Jul 12 11:42:36 <Selin> K
  205. Jul 12 11:42:40 <MarioEdit> so DEC $0DBF will decrease mario's coins by one
  206. Jul 12 11:42:45 <MarioEdit> BUT
  207. Jul 12 11:42:48 <MarioEdit> what if
  208. Jul 12 11:42:52 <MarioEdit> you wanted to really add?
  209. Jul 12 11:43:04 <Selin> Add more than one
  210. Jul 12 11:43:05 <MarioEdit> you can't just use tons of INCs, right?
  211. Jul 12 11:43:12 <MarioEdit> if you wanted to add #$10
  212. Jul 12 11:43:12 <Selin> Nope
  213. Jul 12 11:43:15 <MarioEdit> why would you use
  214. Jul 12 11:43:23 <MarioEdit> #$10 INCs
  215. Jul 12 11:43:25 <Selin> 10 ins
  216. Jul 12 11:43:26 <MarioEdit> it's a waste of space
  217. Jul 12 11:43:28 <Selin> I know
  218. Jul 12 11:43:34 <Selin> *INCS
  219. Jul 12 11:43:35 <MarioEdit> so, there's CLC and ADC for that
  220. Jul 12 11:43:48 <Selin> uh hug
  221. Jul 12 11:43:49 <MarioEdit> CLC clears the carry flag (ignore)
  222. Jul 12 11:43:51 <Selin> *huh
  223. Jul 12 11:43:53 <MarioEdit> ADC adds with carry
  224. Jul 12 11:43:54 <Selin> K
  225. Jul 12 11:44:02 <MarioEdit> so
  226. Jul 12 11:44:04 <MarioEdit> LDA $0DBF
  227. Jul 12 11:44:06 <MarioEdit> CLC
  228. Jul 12 11:44:08 <MarioEdit> ADC #$10
  229. Jul 12 11:44:10 <MarioEdit> STA $0DBF
  230. Jul 12 11:44:18 <Selin> Alright
  231. Jul 12 11:44:24 <MarioEdit> you almost always will have to have CLC before the ADC
  232. Jul 12 11:44:29 <Selin> K
  233. Jul 12 11:44:33 <MarioEdit> except
  234. Jul 12 11:44:37 <Selin> So
  235. Jul 12 11:44:40 <Selin> That code
  236. Jul 12 11:44:42 <MarioEdit> if you use ADC #$00
  237. Jul 12 11:44:48 <MarioEdit> which will prevent overflow
  238. Jul 12 11:45:00 <MarioEdit> of the high byte of something
  239. Jul 12 11:45:06 <Selin> Loaded the coins, then cleared he carry
  240. Jul 12 11:45:06 <MarioEdit> for instance, Mario's X position
  241. Jul 12 11:45:14 <MarioEdit> yes
  242. Jul 12 11:45:16 <MarioEdit> then it adds 10
  243. Jul 12 11:45:17 <Selin> Then added 10 to the coins
  244. Jul 12 11:45:21 <Selin> Then saved it
  245. Jul 12 11:45:23 <Selin> :)
  246. Jul 12 11:45:23 <MarioEdit> and stores back to $0DBF
  247. Jul 12 11:45:27 <Selin> Yea
  248. Jul 12 11:45:27 <MarioEdit> awesome, right?
  249. Jul 12 11:45:33 <Selin> I'm starting to get this
  250. Jul 12 11:45:38 <MarioEdit> anyways
  251. Jul 12 11:45:44 <Selin> It's like learning another language
  252. Jul 12 11:45:49 <MarioEdit> if you want to move Mario #$10 pixels
  253. Jul 12 11:45:52 <MarioEdit> you can't just
  254. Jul 12 11:45:54 <MarioEdit> LDA $94
  255. Jul 12 11:45:55 <MarioEdit> CLC
  256. Jul 12 11:45:57 <MarioEdit> ADC #$10
  257. Jul 12 11:45:59 <MarioEdit> STA $94
  258. Jul 12 11:46:04 <Selin> K
  259. Jul 12 11:46:05 <MarioEdit> it will screw up
  260. Jul 12 11:46:11 <MarioEdit> the high byte
  261. Jul 12 11:46:15 <Selin> You gotta use x and y?
  262. Jul 12 11:46:17 <MarioEdit> nope
  263. Jul 12 11:46:21 <MarioEdit> you have to change $95
  264. Jul 12 11:46:22 <MarioEdit> as well
  265. Jul 12 11:46:25 <Selin> K
  266. Jul 12 11:46:29 <MarioEdit> otherwise, mario will go offscreen
  267. Jul 12 11:46:37 <Selin> Alright
  268. Jul 12 11:46:37 <MarioEdit> at some positions
  269. Jul 12 11:46:39 <MarioEdit> so
  270. Jul 12 11:46:43 <MarioEdit> you can fix it
  271. Jul 12 11:46:46 <MarioEdit> with LDA $95
  272. Jul 12 11:46:48 <MarioEdit> ADC #$00
  273. Jul 12 11:46:50 <MarioEdit> STA $95
  274. Jul 12 11:47:06 <MarioEdit> (don't ask why; it's complicated)
  275. Jul 12 11:47:11 <Selin> K
  276. Jul 12 11:47:16 <MarioEdit> now
  277. Jul 12 11:47:19 <MarioEdit> with subtraction
  278. Jul 12 11:47:29 <MarioEdit> if you want to subtract, you replace CLC with SEC
  279. Jul 12 11:47:32 <MarioEdit> which sets the carry flag
  280. Jul 12 11:47:36 <MarioEdit> and ADC with SBC
  281. Jul 12 11:47:43 <Selin> Uh huh
  282. Jul 12 11:47:50 <MarioEdit> so
  283. Jul 12 11:48:01 <MarioEdit> you can sort of make a shop block
  284. Jul 12 11:48:09 <MarioEdit> with that
  285. Jul 12 11:48:20 <MarioEdit> for instance
  286. Jul 12 11:48:23 <MarioEdit> LDA $0DBF
  287. Jul 12 11:48:25 <MarioEdit> CMP #$10
  288. Jul 12 11:48:27 <MarioEdit> BCC Return
  289. Jul 12 11:48:31 <MarioEdit> SEC
  290. Jul 12 11:48:34 <MarioEdit> SBC #$10
  291. Jul 12 11:48:36 <MarioEdit> STA $0DBF
  292. Jul 12 11:48:39 <Selin> Uh huh
  293. Jul 12 11:48:42 <MarioEdit> etc etc
  294. Jul 12 11:48:45 <Selin> Cool
  295. Jul 12 11:48:58 <MarioEdit> now
  296. Jul 12 11:49:03 <MarioEdit> to do multiplication
  297. Jul 12 11:49:05 <MarioEdit> there's two ways
  298. Jul 12 11:49:08 <MarioEdit> one, is a loop
  299. Jul 12 11:49:13 <Selin> K
  300. Jul 12 11:49:17 <MarioEdit> and the other is writing to a hardware register
  301. Jul 12 11:49:26 <Selin> Uh huh
  302. Jul 12 11:49:33 <MarioEdit> which I will explain in a second
  303. Jul 12 11:49:40 <Selin> K
  304. Jul 12 11:49:47 <MarioEdit> ok
  305. Jul 12 11:49:54 <MarioEdit> you store the values you want
  306. Jul 12 11:49:56 <MarioEdit> to $420B
  307. Jul 12 11:49:59 <MarioEdit> and the second one
  308. Jul 12 11:50:02 <MarioEdit> to $420C
  309. Jul 12 11:50:06 <MarioEdit> er
  310. Jul 12 11:50:09 <MarioEdit> $4202
  311. Jul 12 11:50:11 <MarioEdit> and $4203
  312. Jul 12 11:50:18 <Selin> I gotta sleep soon
  313. Jul 12 11:50:19 <MarioEdit> now
  314. Jul 12 11:50:24 <MarioEdit> it will take some cycles to process
  315. Jul 12 11:50:28 <Selin> In about 10 mins
  316. Jul 12 11:50:31 <Selin> Uh huh
  317. Jul 12 11:50:32 <MarioEdit> which is usually around 4-6
  318. Jul 12 11:50:35 <MarioEdit> so
  319. Jul 12 11:50:39 <MarioEdit> you can use NOP #4
  320. Jul 12 11:50:51 <MarioEdit> which will wait until it has enough time
  321. Jul 12 11:51:02 <MarioEdit> then, you can read the high part of the result
  322. Jul 12 11:51:04 <Selin> K
  323. Jul 12 11:51:07 <MarioEdit> from $4216
  324. Jul 12 11:51:10 <MarioEdit> and the low part
  325. Jul 12 11:51:12 <MarioEdit> from $4217
  326. Jul 12 11:51:33 <MarioEdit> so, uh
  327. Jul 12 11:51:36 <MarioEdit> LDA #$10
  328. Jul 12 11:51:39 <MarioEdit> STA $4202
  329. Jul 12 11:51:44 <MarioEdit> LDA #$20
  330. Jul 12 11:51:46 <MarioEdit> STA $4203
  331. Jul 12 11:51:48 <MarioEdit> NOP #4
  332. Jul 12 11:51:53 <MarioEdit> LDA $4216
  333. Jul 12 11:52:01 <MarioEdit> STA $00
  334. Jul 12 11:52:04 <MarioEdit> LDA $4217
  335. Jul 12 11:52:06 <MarioEdit> STA $01
  336. Jul 12 11:52:08 <MarioEdit> now
  337. Jul 12 11:52:16 <MarioEdit> $00 and $01 will contain the product
  338. Jul 12 11:52:21 <Selin> K
  339. Jul 12 11:52:38 <MarioEdit> and there's also division
  340. Jul 12 11:52:42 <MarioEdit> but let's get to that
  341. Jul 12 11:52:43 <MarioEdit> later
  342. Jul 12 11:52:47 <Selin> Oh god
  343. Jul 12 11:52:51 <Selin> K
  344. Jul 12 11:52:57 <MarioEdit> anyways
  345. Jul 12 11:53:02 <MarioEdit> there's a really simple way
  346. Jul 12 11:53:06 <MarioEdit> to multiply by 2
  347. Jul 12 11:53:09 <MarioEdit> or divide by 2
  348. Jul 12 11:53:17 <MarioEdit> ASL
  349. Jul 12 11:53:19 <MarioEdit> and LSR
  350. Jul 12 11:53:23 <Selin> Alright
  351. Jul 12 11:53:24 <MarioEdit> what do they do?
  352. Jul 12 11:53:24 <Selin> K
  353. Jul 12 11:53:25 <MarioEdit> see
  354. Jul 12 11:53:33 <MarioEdit> ASL shifts the numbers (in binary)
  355. Jul 12 11:53:35 <MarioEdit> to the left once
  356. Jul 12 11:53:37 <MarioEdit> so...
  357. Jul 12 11:53:41 <MarioEdit> 0100
  358. Jul 12 11:53:45 <MarioEdit> becomes 1000
  359. Jul 12 11:53:56 <MarioEdit> and since binary goes in powers of 2...
  360. Jul 12 11:54:00 <MarioEdit> it multiplies it by 2
  361. Jul 12 11:54:07 <Selin> K
  362. Jul 12 11:54:12 <MarioEdit> LSR will change 0100
  363. Jul 12 11:54:14 <MarioEdit> to 0010
  364. Jul 12 11:54:26 <MarioEdit> rounded down
  365. Jul 12 11:54:39 <Selin> K
  366. Jul 12 11:54:44 <MarioEdit> so LSR divides by 2, but rounded down
  367. Jul 12 11:55:15 <MarioEdit> now, there's also ROL
  368. Jul 12 11:55:17 <MarioEdit> and ROR
  369. Jul 12 11:55:21 <MarioEdit> but that's too far
  370. Jul 12 11:55:22 <Selin> Uh huh
  371. Jul 12 11:55:25 <Selin> K
  372. Jul 12 11:55:43 <MarioEdit> so
  373. Jul 12 11:55:45 <MarioEdit> review
  374. Jul 12 11:55:46 <Selin> Anything else?
  375. Jul 12 11:55:52 <Selin> Cause I'm getting tired
  376. Jul 12 11:55:54 <MarioEdit> how do you add by 20?
  377. Jul 12 11:55:58 <Selin> And I can't think straight
  378. Jul 12 11:56:09 <MarioEdit> erm, uh
  379. Jul 12 11:56:10 <MarioEdit> ok
  380. Jul 12 11:56:28 <MarioEdit> I'll talk when you get back on later
  381. Jul 12 11:56:30 <MarioEdit> k?
  382. Jul 12 11:56:45 <Selin> ADC #$20
  383. Jul 12 11:56:53 <MarioEdit> you have to put CLC before it
  384. Jul 12 11:56:55 <Selin> Which is in hex though
  385. Jul 12 11:56:57 <Selin> Yea
  386. Jul 12 11:57:02 <Selin> Was going to say that
  387. Jul 12 11:57:07 <Selin> Alright
  388. Jul 12 11:57:08 <Selin> Night
  389. Jul 12 11:57:12 <MarioEdit> night
  390. Jul 12 11:57:37  Selin (seliniphon@FC74DAB4.2D629580.452B6A9D.IP) has left #asm
  391. **** ENDING LOGGING AT Mon Jul 12 11:57:51 2010
  392.  
  393. **** BEGIN LOGGING AT Tue Jul 13 07:27:43 2010
  394.  
  395. Jul 13 07:27:43  Now talking on #asm
  396. Jul 13 07:27:51 <MarioEdit> ok
  397. Jul 13 07:27:52 <MarioEdit> so
  398. Jul 13 07:28:03 <MarioEdit> now, we're at some opcodes
  399. Jul 13 07:28:08 <Selin> Alright
  400. Jul 13 07:28:10 <MarioEdit> BRA, JMP, and JML
  401. Jul 13 07:28:16 <Selin> Can you just hold on a second
  402. Jul 13 07:28:21 <MarioEdit> alright
  403. Jul 13 07:28:42[MarioEdit] (MarioE@caffie-A86EB986.dynamic.ip.windstream.net): ??
  404. Jul 13 07:28:42[MarioEdit] is connecting from *@h125.203.21.98.dynamic.ip.windstream.net 98.21.203.125
  405. Jul 13 07:28:42[MarioEdit] is a registered nick
  406. Jul 13 07:28:42[MarioEdit] #asm &#dummies #serioushax +#finishthatsentence #smwc #ProjectGalaxy
  407. Jul 13 07:28:42[MarioEdit] irc.caffie.net :CaffieNET
  408. Jul 13 07:28:42[MarioEdit] idle 00:00:21, signon: Mon Jul 12 16:39:51
  409. Jul 13 07:28:42[MarioEdit] End of WHOIS list.
  410. Jul 13 07:28:59 <Selin> Back
  411. Jul 13 07:29:04 <MarioEdit> ok
  412. Jul 13 07:29:19 <MarioEdit> those commands are used to "jump" around
  413. Jul 13 07:29:27 <MarioEdit> BRA will always branch to somewhere
  414. Jul 13 07:29:27 <Selin> Ok
  415. Jul 13 07:29:42 <MarioEdit> and JMP can jump to anywhere in the current bank
  416. Jul 13 07:29:49 <MarioEdit> which
  417. Jul 13 07:29:56 <MarioEdit> is a limit of 8000 bytes
  418. Jul 13 07:30:07 <Selin> k
  419. Jul 13 07:30:08 <MarioEdit> and starts at xx8000
  420. Jul 13 07:30:20 <MarioEdit> is this getting to complicated?
  421. Jul 13 07:30:23 <MarioEdit> too*
  422. Jul 13 07:30:31 <Selin> no
  423. Jul 13 07:30:34 <MarioEdit> ok
  424. Jul 13 07:30:40 <MarioEdit> and JML can go anywhere it wants
  425. Jul 13 07:30:44 <MarioEdit> in the whole ROM
  426. Jul 13 07:30:44 <Selin> i'll tell you if I dont get it
  427. Jul 13 07:30:52 <Selin> k
  428. Jul 13 07:31:06 <MarioEdit> next up, is JSL and JSR
  429. Jul 13 07:31:15 <Selin> k
  430. Jul 13 07:31:19 <MarioEdit> JSR basically goes to some code
  431. Jul 13 07:31:24 <MarioEdit> HOWEVER
  432. Jul 13 07:31:38 <MarioEdit> it runs the code, and continues back where it left off
  433. Jul 13 07:31:45 <MarioEdit> so,
  434. Jul 13 07:31:50 <MarioEdit> JSR TestCode
  435. Jul 13 07:31:58 <MarioEdit> LDA #$10
  436. Jul 13 07:32:01 <MarioEdit> STA $0DBE
  437. Jul 13 07:32:03 <MarioEdit> RTL
  438. Jul 13 07:32:06 <MarioEdit> TestCode:
  439. Jul 13 07:32:08 <MarioEdit> RTS
  440. Jul 13 07:32:16 <MarioEdit> will continue after that point
  441. Jul 13 07:32:30 <Selin> k
  442. Jul 13 07:32:39 <MarioEdit> and, keep in mind that if it's accessed with JSR
  443. Jul 13 07:32:43 <MarioEdit> it must end with JSL
  444. Jul 13 07:32:49 <MarioEdit> er
  445. Jul 13 07:32:50 <Selin> k
  446. Jul 13 07:32:51 <MarioEdit> RTS
  447. Jul 13 07:32:54 <MarioEdit> lol
  448. Jul 13 07:33:09 <MarioEdit> JSR has a limit of 8000 bytes
  449. Jul 13 07:33:17 <Selin> Alright
  450. Jul 13 07:33:19 <MarioEdit> JSL, however, can go anywhere it wants
  451. Jul 13 07:33:22 <MarioEdit> in the whole ROM
  452. Jul 13 07:33:27 <Selin> Alright
  453. Jul 13 07:33:30 <MarioEdit> however, it must end in RTL
  454. Jul 13 07:33:38 <MarioEdit> (the place you JSL'd to)
  455. Jul 13 07:33:44 <Selin> yep
  456. Jul 13 07:33:45 <Selin> Ok
  457. Jul 13 07:33:51 <MarioEdit> so, uh, look up the rom map
  458. Jul 13 07:33:54 <MarioEdit> at smwcentral
  459. Jul 13 07:34:02 <MarioEdit> and figure out how to kill mario
  460. Jul 13 07:34:12 <Selin> rom or ram
  461. Jul 13 07:34:16 <MarioEdit> ROM
  462. Jul 13 07:34:43 <Selin> 07806   $00:F606    35 bytes    Subroutine  Death Subroutine (JSL to it to kill Mario). x7807 controls the speed at which the player jumps up ($7E007D format). x780B controls which music is played when Mario dies. x781C controls the amount of time Mario stays on screen before dying.
  463. Jul 13 07:34:56 <Selin> if you JSL to that position
  464. Jul 13 07:34:57 <Selin> It kills mario
  465. Jul 13 07:35:01 <MarioEdit> yep
  466. Jul 13 07:35:15 <MarioEdit> so, uh, get it?
  467. Jul 13 07:35:20 <Selin> Yep
  468. Jul 13 07:35:45 <MarioEdit> now, we're on to the stack
  469. Jul 13 07:35:59 <MarioEdit> which can be used to temporarily store a value
  470. Jul 13 07:36:16 <MarioEdit> we can use the opcode PHA to push the current "A" onto the "stack"
  471. Jul 13 07:36:22 <MarioEdit> which can preserve the value
  472. Jul 13 07:36:30 <MarioEdit> in case it gets overwritten
  473. Jul 13 07:36:35 <MarioEdit> BUT
  474. Jul 13 07:36:43 <MarioEdit> if you don't pull it back with PLA
  475. Jul 13 07:36:47 <MarioEdit> it WILL crash
  476. Jul 13 07:36:51 <Selin> k
  477. Jul 13 07:36:55 <MarioEdit> as the return address is on the stack
  478. Jul 13 07:37:00 <MarioEdit> and if you don't pull,
  479. Jul 13 07:37:05 <MarioEdit> it'll get the wrong return address
  480. Jul 13 07:37:11 <MarioEdit> and lead to code that may crash!
  481. Jul 13 07:37:35 <MarioEdit> now
  482. Jul 13 07:37:47 <MarioEdit> there are some more stack commands
  483. Jul 13 07:37:51 <MarioEdit> care to learn them?
  484. Jul 13 07:38:01 <Selin> k
  485. Jul 13 07:38:21 <MarioEdit> alright
  486. Jul 13 07:38:23 <MarioEdit> now
  487. Jul 13 07:38:33 <MarioEdit> PEA will push a 16-bit value directly onto the stack
  488. Jul 13 07:38:42 <MarioEdit> PEA $0A03
  489. Jul 13 07:38:52 <MarioEdit> will push "0A03" onto the stack
  490. Jul 13 07:38:54 <MarioEdit> simple, right?
  491. Jul 13 07:38:57 <Selin> Ok
  492. Jul 13 07:39:00 <Selin> Yea
  493. Jul 13 07:39:03 <MarioEdit> now
  494. Jul 13 07:39:10 <MarioEdit> the next opcode is crossing the line
  495. Jul 13 07:39:10 <Selin> Even if I dont fully understand it
  496. Jul 13 07:39:17 <MarioEdit> at addressing modes
  497. Jul 13 07:39:19 <Selin> I can go back over it in the logs
  498. Jul 13 07:39:21 <MarioEdit> still want to learn it?
  499. Jul 13 07:39:26 <Selin> Sure
  500. Jul 13 07:39:28 <MarioEdit> ok
  501. Jul 13 07:39:39 <MarioEdit> PEI pushes the "ineffective" address onto the stack
  502. Jul 13 07:39:48 <Selin> Uh huh
  503. Jul 13 07:39:50 <MarioEdit> which can be said as a "pointer" of some sort
  504. Jul 13 07:39:51 <MarioEdit> so
  505. Jul 13 07:39:58 <MarioEdit> PEI ($00)
  506. Jul 13 07:40:05 <MarioEdit> will push the value at $00
  507. Jul 13 07:40:07 <MarioEdit> and $01
  508. Jul 13 07:40:12 <Selin> k
  509. Jul 13 07:40:22 <MarioEdit> next, there is PER
  510. Jul 13 07:40:33 <MarioEdit> which is mainly used to push a return address
  511. Jul 13 07:40:40 <Selin> PER, whats that do?
  512. Jul 13 07:40:42 <MarioEdit> in case a subroutine you want
  513. Jul 13 07:40:43 <Selin> lol
  514. Jul 13 07:40:47 <Selin> k
  515. Jul 13 07:40:55 <MarioEdit> that's basically what it does
  516. Jul 13 07:40:56 <MarioEdit> lol
  517. Jul 13 07:41:00 <MarioEdit> in case a subroutine you want
  518. Jul 13 07:41:04 <MarioEdit> ends with RTS
  519. Jul 13 07:41:10 <Selin> k
  520. Jul 13 07:41:13 <MarioEdit> in this case, you will have to do some stuff
  521. Jul 13 07:41:23 <MarioEdit> and then push the earliest RTS
  522. Jul 13 07:41:28 <MarioEdit> RTL*
  523. Jul 13 07:41:42 <MarioEdit> PHB pushes the current code bank
  524. Jul 13 07:41:44 <MarioEdit> that's all
  525. Jul 13 07:41:49 <MarioEdit> and PLB pulls it back
  526. Jul 13 07:41:56 <Selin> k
  527. Jul 13 07:42:04 <MarioEdit> PHD pulls the direct page
  528. Jul 13 07:42:10 <Selin> what do you mean by "current Code Bank"
  529. Jul 13 07:42:16 <MarioEdit> well
  530. Jul 13 07:42:25 <MarioEdit> it just pushes the bank that the code is running from
  531. Jul 13 07:42:33 <Selin> Oh!
  532. Jul 13 07:42:34 <Selin> Ok
  533. Jul 13 07:42:42 <MarioEdit> uh, let's skip PHD
  534. Jul 13 07:42:48 <MarioEdit> it's far out of this
  535. Jul 13 07:42:52 <Selin> Also, if I can just butt in for a sec
  536. Jul 13 07:42:55 <Selin> I talked to roy
  537. Jul 13 07:43:07 <Selin> He's going to make me the fultter jump
  538. Jul 13 07:43:07 <Selin> =D
  539. Jul 13 07:43:10 <MarioEdit> awesome
  540. Jul 13 07:43:11 <MarioEdit> :)
  541. Jul 13 07:43:12 <Selin> Ok
  542. Jul 13 07:43:14 <Selin> Lets go on
  543. Jul 13 07:43:15 <Selin> =D
  544. Jul 13 07:43:15 <MarioEdit> anyways
  545. Jul 13 07:43:28 <MarioEdit> PHP pushes the current processor bits
  546. Jul 13 07:43:37 <MarioEdit> (don't learn it now)
  547. Jul 13 07:43:43 <MarioEdit> and PLP pushes it back
  548. Jul 13 07:43:46 <MarioEdit> ...
  549. Jul 13 07:43:48 <Selin> k]
  550. Jul 13 07:43:49 <MarioEdit> pulles*
  551. Jul 13 07:43:52 <MarioEdit> ...
  552. Jul 13 07:43:54 <MarioEdit> pulls**
  553. Jul 13 07:43:56 <Selin> Isnt PHP also a computer language?
  554. Jul 13 07:43:58 <Selin> LOL
  555. Jul 13 07:44:00 <MarioEdit> yes
  556. Jul 13 07:44:01 <MarioEdit> lol
  557. Jul 13 07:44:07 <Selin> heh
  558. Jul 13 07:44:10 <Selin> Anyway
  559. Jul 13 07:44:13 <Selin> Kepe going
  560. Jul 13 07:44:15 <MarioEdit> now, here is a list
  561. Jul 13 07:44:29 <Selin> *keep
  562. Jul 13 07:44:52 <MarioEdit> Binary commands, transfer stuff, processor stuff
  563. Jul 13 07:44:56 <MarioEdit> which do you want to do
  564. Jul 13 07:45:10 <Selin> Uhm
  565. Jul 13 07:45:15 <Selin> Well, I dont know
  566. Jul 13 07:45:20 <MarioEdit> pick randomly
  567. Jul 13 07:45:22 <Selin> I'm not sure whats the advantage of either one
  568. Jul 13 07:45:29 <MarioEdit> I'd choose the first
  569. Jul 13 07:45:33 <MarioEdit> if I were you
  570. Jul 13 07:45:34 <Selin> Binary?
  571. Jul 13 07:45:35 <Selin> Ok
  572. Jul 13 07:45:43 <MarioEdit> ...
  573. Jul 13 07:45:44 <MarioEdit> ok
  574. Jul 13 07:45:47 <MarioEdit> this might be long
  575. Jul 13 07:45:49 <MarioEdit> very long
  576. Jul 13 07:45:53 <Selin> Ok
  577. Jul 13 07:45:56 <Selin> If its very lonmg
  578. Jul 13 07:45:59 <MarioEdit> now, there is an opcode called "AND"
  579. Jul 13 07:45:59 <Selin> We might have to cut it here
  580. Jul 13 07:46:07 <Selin> *long
  581. Jul 13 07:46:17 <MarioEdit> what time is it for you?
  582. Jul 13 07:46:29 <Selin> 9:16
  583. Jul 13 07:46:30 <Selin> pm
  584. Jul 13 07:46:35 <Selin> But I want to work on my hack
  585. Jul 13 07:46:38 <MarioEdit> aww
  586. Jul 13 07:46:42 <Selin> And my new site
  587. Jul 13 07:46:46 <MarioEdit> at least 9:30
  588. Jul 13 07:46:48 <Selin> Sorry
  589. Jul 13 07:46:48 <MarioEdit> ok?
  590. Jul 13 07:46:52 <Selin> Ok
  591. Jul 13 07:46:54 <Selin> 15 minutes
  592. Jul 13 07:46:58 <MarioEdit> anyways
  593. Jul 13 07:47:01 <Selin> You were talking about AND
  594. Jul 13 07:47:02 <MarioEdit> take windows calculator
  595. Jul 13 07:47:10 <MarioEdit> and convert "20" to binary
  596. Jul 13 07:47:16 <MarioEdit> and post it here
  597. Jul 13 07:47:35 <Selin> k
  598. Jul 13 07:48:02 <Selin> 10100
  599. Jul 13 07:48:14 <MarioEdit> ok
  600. Jul 13 07:48:19 <MarioEdit> and take 25
  601. Jul 13 07:48:21 <MarioEdit> and convert it
  602. Jul 13 07:48:24 <Selin> uh huh
  603. Jul 13 07:48:34 <Selin> 11001
  604. Jul 13 07:48:48 <MarioEdit> alright
  605. Jul 13 07:48:51 <MarioEdit> 10100
  606. Jul 13 07:48:53 <MarioEdit> 11001
  607. Jul 13 07:49:02 <MarioEdit> ok
  608. Jul 13 07:49:11 <MarioEdit> look at it
  609. Jul 13 07:49:20 <MarioEdit> if you AND it
  610. Jul 13 07:49:23 <Selin> Yep
  611. Jul 13 07:49:26 <MarioEdit> 1 and 1 will become 1
  612. Jul 13 07:49:28 <Selin> K
  613. Jul 13 07:49:30 <MarioEdit> 1 and 0 become 0
  614. Jul 13 07:49:35 <MarioEdit> 0 and 1 become 0
  615. Jul 13 07:49:39 <MarioEdit> and 0 and 0 become 0
  616. Jul 13 07:49:46 <MarioEdit> so, what is the answer
  617. Jul 13 07:49:48 <MarioEdit> if you and it?
  618. Jul 13 07:50:09 <MarioEdit> also don't use windows calc
  619. Jul 13 07:50:09 <Selin> Uhm.
  620. Jul 13 07:50:17 <Selin> 10000
  621. Jul 13 07:50:21 <MarioEdit> ow
  622. Jul 13 07:50:22 <MarioEdit> wow
  623. Jul 13 07:50:22 <Selin> I think
  624. Jul 13 07:50:23 <MarioEdit> you got it
  625. Jul 13 07:50:24 <MarioEdit> :D
  626. Jul 13 07:50:27 <Selin> =D
  627. Jul 13 07:50:28 <Selin> Listen
  628. Jul 13 07:50:37 <Selin> Its like 2 positives make a positive
  629. Jul 13 07:50:47 <Selin> Hold
  630. Jul 13 07:50:48 <Selin> One
  631. Jul 13 07:50:56 <Selin> Wtf am I  going on about
  632. Jul 13 07:51:00 <MarioEdit> anyways
  633. Jul 13 07:51:01 <Selin> Lets just keep going
  634. Jul 13 07:51:03 <Selin> o_O
  635. Jul 13 07:51:05 <MarioEdit> now, there's ORA
  636. Jul 13 07:51:14 <MarioEdit> 1 and 1 become 1
  637. Jul 13 07:51:18 <MarioEdit> 1 and 0 become 1
  638. Jul 13 07:51:22 <MarioEdit> 0 and 1 become 1
  639. Jul 13 07:51:25 <MarioEdit> 0 and 0 become 0
  640. Jul 13 07:51:32 <MarioEdit> so if there's at least a 1
  641. Jul 13 07:51:35 <MarioEdit> it'll be one
  642. Jul 13 07:51:37 <MarioEdit> at the result
  643. Jul 13 07:51:43 <Selin> k
  644. Jul 13 07:51:51 <MarioEdit> so, ORA those values
  645. Jul 13 07:52:02 <Selin> 11101
  646. Jul 13 07:52:08 <MarioEdit> yep
  647. Jul 13 07:52:13 <MarioEdit> now, there's another one
  648. Jul 13 07:52:15 <MarioEdit> EOR
  649. Jul 13 07:52:20 <MarioEdit> which is exclusive OR
  650. Jul 13 07:52:26 <MarioEdit> 1 and 1 become 0
  651. Jul 13 07:52:30 <MarioEdit> 1 and 0 become 1
  652. Jul 13 07:52:34 <MarioEdit> 0 and 1 become 1
  653. Jul 13 07:52:37 <MarioEdit> 0 and 0 become 0
  654. Jul 13 07:52:51 <Selin> 01101
  655. Jul 13 07:53:00 <MarioEdit> yep
  656. Jul 13 07:53:11 <MarioEdit> ok
  657. Jul 13 07:53:20 <MarioEdit> ROR rotates the values to the right, one
  658. Jul 13 07:53:28 <Selin> k
  659. Jul 13 07:53:35 <MarioEdit> and may or may not rotate back around
  660. Jul 13 07:53:37 <MarioEdit> so
  661. Jul 13 07:53:39 <MarioEdit> 01101
  662. Jul 13 07:53:42 <MarioEdit> if you ROR it
  663. Jul 13 07:53:50 <MarioEdit> you get 10110
  664. Jul 13 07:53:58 <MarioEdit> IIRC
  665. Jul 13 07:53:58 <Selin> My only question
  666. Jul 13 07:54:04 <Selin> Is where does binary come into SMW?
  667. Jul 13 07:54:10 <MarioEdit> well
  668. Jul 13 07:54:15 <MarioEdit> look at $77
  669. Jul 13 07:54:18 <MarioEdit> RAM Map
  670. Jul 13 07:54:29 <Selin> Yea
  671. Jul 13 07:54:38 <MarioEdit> and $15
  672. Jul 13 07:54:40 <MarioEdit> and $16
  673. Jul 13 07:54:46 <MarioEdit> and $17
  674. Jul 13 07:54:47 <MarioEdit> and $18
  675. Jul 13 07:54:50 <Selin> Uh huh
  676. Jul 13 07:55:00 <Selin> I'm looking at them
  677. Jul 13 07:55:09 <MarioEdit> it's a way to use more "values" per ram address
  678. Jul 13 07:55:16 <Selin> Uh huh
  679. Jul 13 07:55:16 <MarioEdit> like
  680. Jul 13 07:55:27 <MarioEdit> without using tons and tons of other addresses
  681. Jul 13 07:55:30 <MarioEdit> of combinations
  682. Jul 13 07:55:35 <MarioEdit> just put them into one!
  683. Jul 13 07:55:42 <MarioEdit> so
  684. Jul 13 07:55:57 <Selin> K
  685. Jul 13 07:56:02 <MarioEdit> you can easily set it
  686. Jul 13 07:56:04 <MarioEdit> with TSB
  687. Jul 13 07:56:06 <MarioEdit> and TRB
  688. Jul 13 07:56:08 <MarioEdit> and ORA
  689. Jul 13 07:56:22 <MarioEdit> and not have to worry
  690. Jul 13 07:56:22 <Selin> k
  691. Jul 13 07:56:30 <MarioEdit> speaking of which
  692. Jul 13 07:56:38 <MarioEdit> TSB is kinda complicated
  693. Jul 13 07:56:45 <MarioEdit> it's a short version of
  694. Jul 13 07:56:46 <Selin> Ok
  695. Jul 13 07:56:50 <MarioEdit> LDA $77
  696. Jul 13 07:56:52 <MarioEdit> ORA #$04
  697. Jul 13 07:56:53 <MarioEdit> STA $77
  698. Jul 13 07:56:56 <MarioEdit> etc
  699. Jul 13 07:57:00 <MarioEdit> which can be shortened to
  700. Jul 13 07:57:03 <MarioEdit> LDA #$04
  701. Jul 13 07:57:05 <MarioEdit> TSB $77
  702. Jul 13 07:57:11 <Selin> k
  703. Jul 13 07:57:16 <MarioEdit> now
  704. Jul 13 07:57:20 <MarioEdit> TRB
  705. Jul 13 07:57:24 <MarioEdit> shortens
  706. Jul 13 07:57:26 <MarioEdit> LDA $77
  707. Jul 13 07:57:31 <MarioEdit> AND #$04
  708. Jul 13 07:57:33 <MarioEdit> EOR #$FF
  709. Jul 13 07:57:34 <Selin> k
  710. Jul 13 07:57:36 <MarioEdit> STA $77
  711. Jul 13 07:57:40 <MarioEdit> into LDA #$04
  712. Jul 13 07:57:42 <MarioEdit> TRB $77
  713. Jul 13 07:57:51 <MarioEdit> so
  714. Jul 13 07:58:01 <MarioEdit> TRB basically "resets" the values
  715. Jul 13 07:58:02 <MarioEdit> that match
  716. Jul 13 07:58:10 <MarioEdit> i.e. if a and the address both have one
  717. Jul 13 07:58:15 <MarioEdit> it changes them into 0
  718. Jul 13 07:58:36 <MarioEdit> anyways
  719. Jul 13 07:58:46 <MarioEdit> there's one left
  720. Jul 13 07:58:50 <MarioEdit> I don't know if there's enough time
  721. Jul 13 07:58:52 <Selin> ok
  722. Jul 13 07:59:00 <Selin> I can wait extra time
  723. Jul 13 07:59:00 <MarioEdit> ok
  724. Jul 13 07:59:02 <MarioEdit> there's BIT
  725. Jul 13 07:59:09 <Selin> God, its not like i'm sleeping
  726. Jul 13 07:59:09 <MarioEdit> which basically, is a bit test
  727. Jul 13 07:59:11 <Selin> Ok
  728. Jul 13 07:59:11 <MarioEdit> =P
  729. Jul 13 07:59:13 <MarioEdit> so
  730. Jul 13 07:59:18 <MarioEdit> if you do BIT #$01
  731. Jul 13 07:59:22 <MarioEdit> it checks the 1st bit
  732. Jul 13 07:59:28 <MarioEdit> and if you do BNE after that
  733. Jul 13 07:59:35 <Selin> Ok
  734. Jul 13 07:59:37 <MarioEdit> it branchs if it is equal to 1
  735. Jul 13 07:59:42 <MarioEdit> however
  736. Jul 13 07:59:48 <MarioEdit> BIT doesn't change "A"
  737. Jul 13 07:59:51 <MarioEdit> at all
  738. Jul 13 07:59:57 <Selin> ok
  739. Jul 13 08:00:02 <MarioEdit> so
  740. Jul 13 08:00:07 <MarioEdit> here's some useful applications
  741. Jul 13 08:00:11 <MarioEdit> in fact, VERY
  742. Jul 13 08:00:16 <MarioEdit> ok
  743. Jul 13 08:00:25 <MarioEdit> 1. How do I check if somebody is holding right?
  744. Jul 13 08:00:40 <Selin> Hmm
  745. Jul 13 08:00:45 <MarioEdit> hint:
  746. Jul 13 08:00:48 <MarioEdit> you use AND
  747. Jul 13 08:00:55 <MarioEdit> why?
  748. Jul 13 08:01:02 <MarioEdit> AND stays 1 if both values are 1
  749. Jul 13 08:01:03 <MarioEdit> so...
  750. Jul 13 08:01:16 <Selin> Oh.
  751. Jul 13 08:01:17 <Selin> Ok
  752. Jul 13 08:02:04 <MarioEdit> and if you and 0...
  753. Jul 13 08:02:08 <MarioEdit> it will always be 0
  754. Jul 13 08:02:13 <MarioEdit> see where I'm getting?
  755. Jul 13 08:02:24 <Selin> Yeo
  756. Jul 13 08:02:28 <MarioEdit> so
  757. Jul 13 08:02:35 <MarioEdit> what number do you AND it with
  758. Jul 13 08:03:12 <Selin> For right>
  759. Jul 13 08:03:19 <MarioEdit> yep
  760. Jul 13 08:03:25 <Selin> Wouldnt it be 1
  761. Jul 13 08:03:30 <Selin> 01
  762. Jul 13 08:03:33 <Selin> sorry, 01
  763. Jul 13 08:03:41 <MarioEdit> yep
  764. Jul 13 08:03:43 <MarioEdit> :D
  765. Jul 13 08:03:55 <Selin> Ok
  766. Jul 13 08:03:55 <Selin> =D
  767. Jul 13 08:04:01 <MarioEdit> last one
  768. Jul 13 08:04:03 <Selin> Alright
  769. Jul 13 08:04:10 <Selin> Make sure its the last one
  770. Jul 13 08:04:16 <Selin> I want to work on my new SMW hacking site
  771. Jul 13 08:04:20 <MarioEdit> force the player to let go of "right"
  772. Jul 13 08:04:22 <Selin> Maybe you might want to join
  773. Jul 13 08:04:25 <Selin> :D
  774. Jul 13 08:04:37 <MarioEdit> hint: use TRB
  775. Jul 13 08:05:07 <Selin> LDA #$00
  776. Jul 13 08:05:19 <Selin> TRB $15
  777. Jul 13 08:05:23 <MarioEdit> close
  778. Jul 13 08:05:25 <MarioEdit> it's not 00
  779. Jul 13 08:05:28 <MarioEdit> :P
  780. Jul 13 08:05:35 <MarioEdit> what is the value for right?
  781. Jul 13 08:05:39 <Selin> 01
  782. Jul 13 08:05:43 <MarioEdit> so...
  783. Jul 13 08:05:47 <Selin> Oh!
  784. Jul 13 08:05:47 <MarioEdit> what do you do?
  785. Jul 13 08:06:02 <Selin> Its either call on the right value, or the left one
  786. Jul 13 08:06:24 <Selin> LDA #$02?
  787. Jul 13 08:06:29 <MarioEdit> right
  788. Jul 13 08:06:32 <MarioEdit> as in
  789. Jul 13 08:06:34 <MarioEdit> "right"
  790. Jul 13 08:06:39 <Selin> Oh
  791. Jul 13 08:06:39 <Selin> K
  792. Jul 13 08:06:43 <Selin> LODA #$01 then
  793. Jul 13 08:06:45 <Selin> *LDA
  794. Jul 13 08:06:46 <MarioEdit> yep
  795. Jul 13 08:06:57 <MarioEdit> next up, is addressing modes
  796. Jul 13 08:06:59 <MarioEdit> but let's
  797. Jul 13 08:07:01 <MarioEdit> not do that
  798. Jul 13 08:07:02 <MarioEdit> now
  799. Jul 13 08:07:08 <Selin> Yea
  800. Jul 13 08:07:21 <Selin> You should join my new SMW hacking site
  801. Jul 13 08:07:27 <Selin> #FireFlight
  802. Jul 13 08:07:31 <Selin> Is the channel
  803. Jul 13 08:07:34 <Selin> :D
  804. Jul 13 08:07:45  Selin (Tomster_21@FC74DAB4.2D629580.452B6A9D.IP) has left #asm
  805. **** ENDING LOGGING AT Tue Jul 13 08:08:09 2010
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top