losinggeneration

snes9x super fx ops

Jan 28th, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.04 KB | None | 0 0
  1. /***********************************************************************************
  2. Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
  3.  
  4. (c) Copyright 1996 - 2002 Gary Henderson ([email protected]),
  5. Jerremy Koot ([email protected])
  6.  
  7. (c) Copyright 2002 - 2004 Matthew Kendora
  8.  
  9. (c) Copyright 2002 - 2005 Peter Bortas ([email protected])
  10.  
  11. (c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
  12.  
  13. (c) Copyright 2001 - 2006 John Weidman ([email protected])
  14.  
  15. (c) Copyright 2002 - 2006 funkyass ([email protected]),
  16. Kris Bleakley ([email protected])
  17.  
  18. (c) Copyright 2002 - 2010 Brad Jorsch ([email protected]),
  19.  
  20. (c) Copyright 2002 - 2011 zones ([email protected])
  21.  
  22. (c) Copyright 2006 - 2007 nitsuja
  23.  
  24. (c) Copyright 2009 - 2011 BearOso,
  25. OV2
  26.  
  27.  
  28. BS-X C emulator code
  29. (c) Copyright 2005 - 2006 Dreamer Nom,
  30. zones
  31.  
  32. C4 x86 assembler and some C emulation code
  33. (c) Copyright 2000 - 2003 _Demo_ ([email protected]),
  34. Nach,
  35. zsKnight ([email protected])
  36.  
  37. C4 C++ code
  38. (c) Copyright 2003 - 2006 Brad Jorsch,
  39. Nach
  40.  
  41. DSP-1 emulator code
  42. (c) Copyright 1998 - 2006 _Demo_,
  43. Andreas Naive ([email protected]),
  44. Gary Henderson,
  45. John Weidman,
  46. Kris Bleakley,
  47. Matthew Kendora,
  48. Nach,
  49. neviksti ([email protected])
  50.  
  51. DSP-2 emulator code
  52. (c) Copyright 2003 John Weidman,
  53. Kris Bleakley,
  54. Lord Nightmare ([email protected]),
  55. Matthew Kendora,
  56. neviksti
  57.  
  58. DSP-3 emulator code
  59. (c) Copyright 2003 - 2006 John Weidman,
  60. Kris Bleakley,
  61. Lancer,
  62. z80 gaiden
  63.  
  64. DSP-4 emulator code
  65. (c) Copyright 2004 - 2006 Dreamer Nom,
  66. John Weidman,
  67. Kris Bleakley,
  68. Nach,
  69. z80 gaiden
  70.  
  71. OBC1 emulator code
  72. (c) Copyright 2001 - 2004 zsKnight,
  73. pagefault ([email protected]),
  74. Kris Bleakley
  75. Ported from x86 assembler to C by sanmaiwashi
  76.  
  77. SPC7110 and RTC C++ emulator code used in 1.39-1.51
  78. (c) Copyright 2002 Matthew Kendora with research by
  79. zsKnight,
  80. John Weidman,
  81. Dark Force
  82.  
  83. SPC7110 and RTC C++ emulator code used in 1.52+
  84. (c) Copyright 2009 byuu,
  85. neviksti
  86.  
  87. S-DD1 C emulator code
  88. (c) Copyright 2003 Brad Jorsch with research by
  89. Andreas Naive,
  90. John Weidman
  91.  
  92. S-RTC C emulator code
  93. (c) Copyright 2001 - 2006 byuu,
  94. John Weidman
  95.  
  96. ST010 C++ emulator code
  97. (c) Copyright 2003 Feather,
  98. John Weidman,
  99. Kris Bleakley,
  100. Matthew Kendora
  101.  
  102. Super FX x86 assembler emulator code
  103. (c) Copyright 1998 - 2003 _Demo_,
  104. pagefault,
  105. zsKnight
  106.  
  107. Super FX C emulator code
  108. (c) Copyright 1997 - 1999 Ivar,
  109. Gary Henderson,
  110. John Weidman
  111.  
  112. Sound emulator code used in 1.5-1.51
  113. (c) Copyright 1998 - 2003 Brad Martin
  114. (c) Copyright 1998 - 2006 Charles Bilyue'
  115.  
  116. Sound emulator code used in 1.52+
  117. (c) Copyright 2004 - 2007 Shay Green ([email protected])
  118.  
  119. SH assembler code partly based on x86 assembler code
  120. (c) Copyright 2002 - 2004 Marcus Comstedt ([email protected])
  121.  
  122. 2xSaI filter
  123. (c) Copyright 1999 - 2001 Derek Liauw Kie Fa
  124.  
  125. HQ2x, HQ3x, HQ4x filters
  126. (c) Copyright 2003 Maxim Stepin ([email protected])
  127.  
  128. NTSC filter
  129. (c) Copyright 2006 - 2007 Shay Green
  130.  
  131. GTK+ GUI code
  132. (c) Copyright 2004 - 2011 BearOso
  133.  
  134. Win32 GUI code
  135. (c) Copyright 2003 - 2006 blip,
  136. funkyass,
  137. Matthew Kendora,
  138. Nach,
  139. nitsuja
  140. (c) Copyright 2009 - 2011 OV2
  141.  
  142. Mac OS GUI code
  143. (c) Copyright 1998 - 2001 John Stiles
  144. (c) Copyright 2001 - 2011 zones
  145.  
  146.  
  147. Specific ports contains the works of other authors. See headers in
  148. individual files.
  149.  
  150.  
  151. Snes9x homepage: http://www.snes9x.com/
  152.  
  153. Permission to use, copy, modify and/or distribute Snes9x in both binary
  154. and source form, for non-commercial purposes, is hereby granted without
  155. fee, providing that this license information and copyright notice appear
  156. with all copies and any derived work.
  157.  
  158. This software is provided 'as-is', without any express or implied
  159. warranty. In no event shall the authors be held liable for any damages
  160. arising from the use of this software or it's derivatives.
  161.  
  162. Snes9x is freeware for PERSONAL USE only. Commercial users should
  163. seek permission of the copyright holders first. Commercial use includes,
  164. but is not limited to, charging money for Snes9x or software derived from
  165. Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
  166. using Snes9x as a promotion for your commercial product.
  167.  
  168. The copyright holders request that bug fixes and improvements to the code
  169. should be forwarded to them so everyone can benefit from the modifications
  170. in future versions.
  171.  
  172. Super NES and Super Nintendo Entertainment System are trademarks of
  173. Nintendo Co., Limited and its subsidiary companies.
  174. ***********************************************************************************/
  175. /*
  176. Codes used:
  177. rn = a GSU register (r0 - r15)
  178. #n = 4 bit immediate value
  179. #pp = 8 bit immediate value
  180. (yy) = 8 bit word address (0x0000 - 0x01fe)
  181. #xx = 16 bit immediate value
  182. (xx) = 16 bit address (0x0000 - 0xffff)
  183. */
  184. // OP HEX - instruction - description
  185. // 00 - stop - stop GSU execution (and maybe generate an IRQ)
  186. // 01 - nop - no operation
  187. // 02 - cache - reintialize GSU cache
  188. // 03 - lsr - logic shift right
  189. // 04 - rol - rotate left
  190. // 05 - bra - branch always
  191. // 06 - blt - branch on less than
  192. // 07 - bge - branch on greater or equals
  193. // 08 - bne - branch on not equal
  194. // 09 - beq - branch on equal
  195. // 0a - bpl - branch on plus
  196. // 0b - bmi - branch on minus
  197. // 0c - bcc - branch on carry clear
  198. // 0d - bcs - branch on carry set
  199. // 0e - bvc - branch on overflow clear
  200. // 0f - bvs - branch on overflow set
  201. // 10-1f - to rn - set register n as destination register
  202. // 10-1f (B) - move rn - move one register to another (if B flag is set)
  203. // 20-2f - to rn - set register n as source and destination register
  204. // 30-3b - stw (rn) - store word
  205. // 30-3b (ALT1) - stb (rn) - store byte
  206. // 3c - loop - decrement loop counter, and branch on not zero
  207. // 3d - alt1 - set alt1 mode
  208. // 3e - alt2 - set alt2 mode
  209. // 3f - alt3 - set alt3 mode
  210. // 40-4b - ldw (rn) - load word from RAM
  211. // 40-4b (ALT1) - ldb (rn) - load byte
  212. // 4c - plot - plot pixel with R1, R2 as x, y and the color register as the color
  213. // 4c (ALT1) - rpix - read color of the pixel with R1, R2 as x, y
  214. // 4c - plot - plot pixel with R1, R2 as x, y and the color register as the color
  215. // 4c (ALT1) - rpix - read color of the pixel with R1, R2 as x, y
  216. // 4c - plot - plot pixel with R1, R2 as x, y and the color register as the color
  217. // 4c (ALT1) - rpix - read color of the pixel with R1, R2 as x, y
  218. // 4c - plot - plot pixel with R1, R2 as x, y and the color register as the color
  219. // 4c (ALT1) - rpix - read color of the pixel with R1, R2 as x, y
  220. // 4d - swap - swap upper and lower byte of a register
  221. // 4e - color - copy source register to color register
  222. // 4e (ALT1) - cmode - set plot option register
  223. // 4f - not - perform exclusive exor with 1 on all bits
  224. // 50-5f - add rn - add, register + register
  225. // 50-5f (ALT1) - adc rn - add with carry, register + register
  226. // 50-5f (ALT2) - add #n - add, register + immediate
  227. // 50-5f (ALT3) - adc #n - add with carry, register + immediate
  228. // 60-6f - sub rn - subtract, register - register
  229. // 60-6f (ALT1) - sbc rn - subtract with carry, register - register
  230. // 60-6f (ALT2) - sub #n - subtract, register - immediate
  231. // 60-6f (ALT3) - cmp rn - compare, register, register
  232. // 70 - merge - R7 as upper byte, R8 as lower byte (used for texture-mapping)
  233. // 71-7f - and rn - reister & register
  234. // 71-7f (ALT1) - bic rn - reister & ~register
  235. // 71-7f (ALT2) - and #n - reister & immediate
  236. // 71-7f (ALT3) - bic #n - reister & ~immediate
  237. // 80-8f - mult rn - 8 bit to 16 bit signed multiply, register * register
  238. // 80-8f (ALT1) - umult rn - 8 bit to 16 bit unsigned multiply, register * register
  239. // 80-8f (ALT2) - mult #n - 8 bit to 16 bit signed multiply, register * immediate
  240. // 80-8f (ALT3) - umult #n - 8 bit to 16 bit unsigned multiply, register * immediate
  241. // 90 - sbk - store word to last accessed RAM address
  242. // 91-94 - link #n - R11 = R15 + immediate
  243. // 95 - sex - sign extend 8 bit to 16 bit
  244. // 96 - asr - aritmetric shift right by one
  245. // 96 (ALT1) - div2 - aritmetric shift right by one
  246. // 97 - ror - rotate right by one
  247. // 98-9d - jmp rn - jump to address of register
  248. // 98-9d (ALT1) - ljmp rn - set program bank to source register and jump to address of register
  249. // 9e - lob - set upper byte to zero (keep low byte)
  250. // 9f - fmult - 16 bit to 32 bit signed multiplication, upper 16 bits only
  251. // 9f (ALT1) - lmult - 16 bit to 32 bit signed multiplication
  252. // a0-af - ibt rn, #pp - immediate byte transfer
  253. // a0-af (ALT1) - lms rn, (yy) - load word from RAM (short address)
  254. // a0-af (ALT2) - sms (yy), rn - store word in RAM (short address)
  255. // b0-bf - from rn - set source register
  256. // b0-bf (B) - moves rn - move register to register, and set flags, (if B flag is set)
  257. // c0 - hib - move high-byte to low-byte
  258. // c1-cf - or rn
  259. // c1-cf (ALT1) - xor rn
  260. // c1-cf (ALT2) - or #n
  261. // c1-cf (ALT3) - xor #n
  262. // d0-de - inc rn - increase by one
  263. // df - getc - transfer ROM buffer to color register
  264. // df (ALT2) - ramb - set current RAM bank
  265. // df (ALT3) - romb - set current ROM bank
  266. // e0-ee - dec rn - decrement by one
  267. // ef - getb - get byte from ROM at address R14
  268. // ef (ALT1) - getbh - get high-byte from ROM at address R14
  269. // ef (ALT2) - getbl - get low-byte from ROM at address R14
  270. // ef (ALT3) - getbs - get sign extended byte from ROM at address R14
  271. // f0-ff - iwt rn, #xx - immediate word transfer to register
  272. // f0-ff (ALT1) - lm rn, (xx) - load word from RAM
  273. // f0-ff (ALT2) - sm (xx), rn - store word in RAM
Advertisement
Add Comment
Please, Sign In to add comment