zemu 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (285) hide show
  1. checksums.yaml +7 -0
  2. data/lib/zemu/config.rb +312 -0
  3. data/lib/zemu/instance.rb +179 -0
  4. data/lib/zemu.rb +172 -0
  5. data/src/debug.c +118 -0
  6. data/src/debug.h +30 -0
  7. data/src/external/Z/API/Z/ABIs/generic/allocator.h +36 -0
  8. data/src/external/Z/API/Z/ABIs/generic/cipher.h +47 -0
  9. data/src/external/Z/API/Z/ABIs/generic/data codec.h +33 -0
  10. data/src/external/Z/API/Z/ABIs/generic/emulation.h +103 -0
  11. data/src/external/Z/API/Z/ABIs/generic/hash function.h +33 -0
  12. data/src/external/Z/API/Z/ABIs/generic/module.h +33 -0
  13. data/src/external/Z/API/Z/ABIs/generic/wave codec.h +40 -0
  14. data/src/external/Z/API/Z/classes/base/InitializerList.hpp +34 -0
  15. data/src/external/Z/API/Z/classes/base/OpaqueFunctionPointer.hpp +26 -0
  16. data/src/external/Z/API/Z/classes/base/OpaqueMemberFunctionPointer.hpp +26 -0
  17. data/src/external/Z/API/Z/classes/base/Pair.hpp +46 -0
  18. data/src/external/Z/API/Z/classes/base/Range.hpp +111 -0
  19. data/src/external/Z/API/Z/classes/base/SizedString.hpp +66 -0
  20. data/src/external/Z/API/Z/classes/base/Status.hpp +89 -0
  21. data/src/external/Z/API/Z/classes/base/Symbol.hpp +39 -0
  22. data/src/external/Z/API/Z/classes/base/Tuple.hpp +111 -0
  23. data/src/external/Z/API/Z/classes/base/Value2D.hpp +389 -0
  24. data/src/external/Z/API/Z/classes/base/Value3D.hpp +368 -0
  25. data/src/external/Z/API/Z/classes/buffering/RingBuffer.hpp +93 -0
  26. data/src/external/Z/API/Z/classes/buffering/TripleBuffer.hpp +68 -0
  27. data/src/external/Z/API/Z/classes/functional/Functor.hpp +265 -0
  28. data/src/external/Z/API/Z/classes/functional/MemberFunction.hpp +98 -0
  29. data/src/external/Z/API/Z/classes/functional/ObjectMemberFunction.hpp +172 -0
  30. data/src/external/Z/API/Z/classes/functional/ObjectSelector.hpp +219 -0
  31. data/src/external/Z/API/Z/classes/functional/Selector.hpp +146 -0
  32. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABB.hpp +81 -0
  33. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABR.hpp +685 -0
  34. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Box.hpp +219 -0
  35. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Circle.hpp +80 -0
  36. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line2D.hpp +93 -0
  37. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line3D.hpp +80 -0
  38. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Rectangle.hpp +675 -0
  39. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Sphere.hpp +0 -0
  40. data/src/external/Z/API/Z/classes/memory/Shared.hpp +90 -0
  41. data/src/external/Z/API/Z/constants/base.h +35 -0
  42. data/src/external/Z/API/Z/constants/chemical elements.h +6385 -0
  43. data/src/external/Z/API/Z/constants/numbers.h +963 -0
  44. data/src/external/Z/API/Z/constants/version.h +15 -0
  45. data/src/external/Z/API/Z/formats/character set/ASCII.h +158 -0
  46. data/src/external/Z/API/Z/formats/character set/DOS CP437.h +159 -0
  47. data/src/external/Z/API/Z/formats/character set/DOS CP737.h +159 -0
  48. data/src/external/Z/API/Z/formats/character set/DOS CP775.h +159 -0
  49. data/src/external/Z/API/Z/formats/character set/DOS CP850.h +159 -0
  50. data/src/external/Z/API/Z/formats/character set/DOS CP852.h +159 -0
  51. data/src/external/Z/API/Z/formats/character set/DOS CP855.h +159 -0
  52. data/src/external/Z/API/Z/formats/character set/DOS CP857.h +159 -0
  53. data/src/external/Z/API/Z/formats/character set/DOS CP858.h +159 -0
  54. data/src/external/Z/API/Z/formats/character set/DOS CP860.h +159 -0
  55. data/src/external/Z/API/Z/formats/character set/DOS CP861.h +159 -0
  56. data/src/external/Z/API/Z/formats/character set/DOS CP862.h +159 -0
  57. data/src/external/Z/API/Z/formats/character set/DOS CP863.h +159 -0
  58. data/src/external/Z/API/Z/formats/character set/DOS CP864.h +159 -0
  59. data/src/external/Z/API/Z/formats/character set/DOS CP865.h +159 -0
  60. data/src/external/Z/API/Z/formats/character set/DOS CP866.h +159 -0
  61. data/src/external/Z/API/Z/formats/character set/DOS CP869.h +159 -0
  62. data/src/external/Z/API/Z/formats/character set/DOS CP872.h +159 -0
  63. data/src/external/Z/API/Z/formats/character set/DOS CP874.h +159 -0
  64. data/src/external/Z/API/Z/formats/character set/Unicode.h +30119 -0
  65. data/src/external/Z/API/Z/formats/data model/I16LP32.h +19 -0
  66. data/src/external/Z/API/Z/formats/data model/ILP32.h +19 -0
  67. data/src/external/Z/API/Z/formats/data model/ILP64.h +19 -0
  68. data/src/external/Z/API/Z/formats/data model/IP16L32.h +19 -0
  69. data/src/external/Z/API/Z/formats/data model/LLP64.h +19 -0
  70. data/src/external/Z/API/Z/formats/data model/LP32.h +19 -0
  71. data/src/external/Z/API/Z/formats/data model/LP64.h +19 -0
  72. data/src/external/Z/API/Z/formats/data model/SILP64.h +19 -0
  73. data/src/external/Z/API/Z/formats/file system/FAT12.h +61 -0
  74. data/src/external/Z/API/Z/formats/floating-point/IEEE 754.h +141 -0
  75. data/src/external/Z/API/Z/formats/floating-point/x87.h +74 -0
  76. data/src/external/Z/API/Z/formats/image/ICNS.h +39 -0
  77. data/src/external/Z/API/Z/formats/keymap/Mac OS.h +284 -0
  78. data/src/external/Z/API/Z/formats/keymap/Z.h +141 -0
  79. data/src/external/Z/API/Z/formats/multimedia/Creative Voice.h +106 -0
  80. data/src/external/Z/API/Z/formats/multimedia/Microsoft Wave.h +49 -0
  81. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ACH.h +44 -0
  82. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/FRZ.h +54 -0
  83. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/PRG.h +33 -0
  84. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SEM.h +46 -0
  85. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SIT.h +34 -0
  86. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNA.h +117 -0
  87. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNP.h +37 -0
  88. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SP.h +62 -0
  89. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/Z80.h +117 -0
  90. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX.h +56 -0
  91. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX82.h +70 -0
  92. data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/UNIF.h +26 -0
  93. data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/iNES.h +76 -0
  94. data/src/external/Z/API/Z/formats/storage medium image/audio/TAP.h +25 -0
  95. data/src/external/Z/API/Z/formats/storage medium image/audio/TZX.h +1185 -0
  96. data/src/external/Z/API/Z/formats/storage medium image/audio/Warajevo TAP.h +32 -0
  97. data/src/external/Z/API/Z/formats/storage medium image/floppy disk/FDI.h +45 -0
  98. data/src/external/Z/API/Z/functions/base/Z2D.h +583 -0
  99. data/src/external/Z/API/Z/functions/base/Z3D.h +712 -0
  100. data/src/external/Z/API/Z/functions/base/ZRange.h +137 -0
  101. data/src/external/Z/API/Z/functions/base/all.h +16 -0
  102. data/src/external/Z/API/Z/functions/base/casting.hpp +37 -0
  103. data/src/external/Z/API/Z/functions/base/character.h +38 -0
  104. data/src/external/Z/API/Z/functions/base/constructors.h +326 -0
  105. data/src/external/Z/API/Z/functions/base/structure.hpp +26 -0
  106. data/src/external/Z/API/Z/functions/base/type.hpp +60 -0
  107. data/src/external/Z/API/Z/functions/base/value.h +1901 -0
  108. data/src/external/Z/API/Z/functions/base/value.hpp +112 -0
  109. data/src/external/Z/API/Z/functions/buffering/ZRingBuffer.h +85 -0
  110. data/src/external/Z/API/Z/functions/buffering/ZTripleBuffer.h +65 -0
  111. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z2DLine.h +179 -0
  112. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z3DLine.h +168 -0
  113. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABB.h +361 -0
  114. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABR.h +1081 -0
  115. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZBox.h +340 -0
  116. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZCircle.h +142 -0
  117. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZRectangle.h +1267 -0
  118. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZSphere.h +156 -0
  119. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/all.h +18 -0
  120. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/constructors.h +620 -0
  121. data/src/external/Z/API/Z/functions/time/date.h +29 -0
  122. data/src/external/Z/API/Z/hardware/CPU/architecture/6502.h +90 -0
  123. data/src/external/Z/API/Z/hardware/CPU/architecture/Z80.h +245 -0
  124. data/src/external/Z/API/Z/hardware/CPU/architecture/i4004.h +37 -0
  125. data/src/external/Z/API/Z/hardware/PSG/General Instrument/AY-3-891x.h +180 -0
  126. data/src/external/Z/API/Z/hardware/VDC/Ricoh/RP2C0x.h +625 -0
  127. data/src/external/Z/API/Z/hardware/bus/AGP.h +24 -0
  128. data/src/external/Z/API/Z/hardware/bus/USB.h +510 -0
  129. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Inves Spectrum +.h +47 -0
  130. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Pentagon.h +13 -0
  131. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Scorpion.h +13 -0
  132. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum + 128K.h +158 -0
  133. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +.h +82 -0
  134. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2.h +13 -0
  135. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2A.h +13 -0
  136. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +3.h +13 -0
  137. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum.h +109 -0
  138. data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (NTSC).h +29 -0
  139. data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (PAL).h +29 -0
  140. data/src/external/Z/API/Z/hardware/machine/platform/computer/ZX Spectrum.h +405 -0
  141. data/src/external/Z/API/Z/hardware/machine/platform/console/Game Boy.h +49 -0
  142. data/src/external/Z/API/Z/hardware/machine/platform/console/Nintendo Entertainment System.h +350 -0
  143. data/src/external/Z/API/Z/hardware/storage medium/ROM cartridge/SNES Game Pak.h +238 -0
  144. data/src/external/Z/API/Z/inspection/C/completion.h +178 -0
  145. data/src/external/Z/API/Z/inspection/C/modules/C11.h +41 -0
  146. data/src/external/Z/API/Z/inspection/C/modules/C18.h +13 -0
  147. data/src/external/Z/API/Z/inspection/C/modules/C89.h +19 -0
  148. data/src/external/Z/API/Z/inspection/C/modules/C90.h +13 -0
  149. data/src/external/Z/API/Z/inspection/C/modules/C94.h +15 -0
  150. data/src/external/Z/API/Z/inspection/C/modules/C99.h +29 -0
  151. data/src/external/Z/API/Z/inspection/C/modules/KR C.h +19 -0
  152. data/src/external/Z/API/Z/inspection/C++/completion.h +512 -0
  153. data/src/external/Z/API/Z/inspection/C++/modules/C++03.h +15 -0
  154. data/src/external/Z/API/Z/inspection/C++/modules/C++11.h +80 -0
  155. data/src/external/Z/API/Z/inspection/C++/modules/C++14.h +26 -0
  156. data/src/external/Z/API/Z/inspection/C++/modules/C++17.h +55 -0
  157. data/src/external/Z/API/Z/inspection/C++/modules/C++85.h +11 -0
  158. data/src/external/Z/API/Z/inspection/C++/modules/C++89.h +13 -0
  159. data/src/external/Z/API/Z/inspection/C++/modules/C++98.h +17 -0
  160. data/src/external/Z/API/Z/inspection/C++.h +78 -0
  161. data/src/external/Z/API/Z/inspection/C.h +79 -0
  162. data/src/external/Z/API/Z/inspection/CPU/completion.h +56 -0
  163. data/src/external/Z/API/Z/inspection/CPU/detection.h +714 -0
  164. data/src/external/Z/API/Z/inspection/CPU/modules/6502.h +25 -0
  165. data/src/external/Z/API/Z/inspection/CPU/modules/AArch32.h +32 -0
  166. data/src/external/Z/API/Z/inspection/CPU/modules/AArch64.h +32 -0
  167. data/src/external/Z/API/Z/inspection/CPU/modules/Z80.h +26 -0
  168. data/src/external/Z/API/Z/inspection/CPU/modules/x86-32.h +31 -0
  169. data/src/external/Z/API/Z/inspection/CPU/modules/x86-64.h +312 -0
  170. data/src/external/Z/API/Z/inspection/CPU.h +209 -0
  171. data/src/external/Z/API/Z/inspection/OS/completion.h +36 -0
  172. data/src/external/Z/API/Z/inspection/OS/detection.h +768 -0
  173. data/src/external/Z/API/Z/inspection/OS/modules/Linux.h +22 -0
  174. data/src/external/Z/API/Z/inspection/OS/modules/MS-DOS.h +16 -0
  175. data/src/external/Z/API/Z/inspection/OS/modules/Mac OS X.h +23 -0
  176. data/src/external/Z/API/Z/inspection/OS/modules/Windows.h +19 -0
  177. data/src/external/Z/API/Z/inspection/OS/modules/iPhone OS.h +23 -0
  178. data/src/external/Z/API/Z/inspection/OS.h +236 -0
  179. data/src/external/Z/API/Z/inspection/Objective-C/completion.h +8 -0
  180. data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v1.0.h +11 -0
  181. data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v2.0.h +15 -0
  182. data/src/external/Z/API/Z/inspection/Objective-C.h +51 -0
  183. data/src/external/Z/API/Z/inspection/Z.h +19 -0
  184. data/src/external/Z/API/Z/inspection/build.h +22 -0
  185. data/src/external/Z/API/Z/inspection/character set.h +66 -0
  186. data/src/external/Z/API/Z/inspection/compiler/completion.h +2885 -0
  187. data/src/external/Z/API/Z/inspection/compiler/modules/Apple LLVM.h +26 -0
  188. data/src/external/Z/API/Z/inspection/compiler/modules/Clang.h +1664 -0
  189. data/src/external/Z/API/Z/inspection/compiler/modules/GCC.h +1366 -0
  190. data/src/external/Z/API/Z/inspection/compiler/modules/SCCZ80.h +473 -0
  191. data/src/external/Z/API/Z/inspection/compiler/modules/Visual C++.h +606 -0
  192. data/src/external/Z/API/Z/inspection/compiler/modules/cc65.h +529 -0
  193. data/src/external/Z/API/Z/inspection/compiler/modules/generic.h +13 -0
  194. data/src/external/Z/API/Z/inspection/compiler/modules/template.h +650 -0
  195. data/src/external/Z/API/Z/inspection/compiler.h +299 -0
  196. data/src/external/Z/API/Z/inspection/data model/completion.h +128 -0
  197. data/src/external/Z/API/Z/inspection/data model/deduction.h +9 -0
  198. data/src/external/Z/API/Z/inspection/data model/detection.h +45 -0
  199. data/src/external/Z/API/Z/inspection/data model.h +362 -0
  200. data/src/external/Z/API/Z/inspection/floating-point/completion.h +50 -0
  201. data/src/external/Z/API/Z/inspection/floating-point.h +324 -0
  202. data/src/external/Z/API/Z/inspection/language.h +163 -0
  203. data/src/external/Z/API/Z/inspection/platform/detection.h +9 -0
  204. data/src/external/Z/API/Z/inspection/platform.h +29 -0
  205. data/src/external/Z/API/Z/keys/C++.h +27 -0
  206. data/src/external/Z/API/Z/keys/C.h +29 -0
  207. data/src/external/Z/API/Z/keys/CPU.h +80 -0
  208. data/src/external/Z/API/Z/keys/OS.h +182 -0
  209. data/src/external/Z/API/Z/keys/Objective-C.h +17 -0
  210. data/src/external/Z/API/Z/keys/chemistry.h +26 -0
  211. data/src/external/Z/API/Z/keys/compiler.h +178 -0
  212. data/src/external/Z/API/Z/keys/data model.h +32 -0
  213. data/src/external/Z/API/Z/keys/endianness.h +24 -0
  214. data/src/external/Z/API/Z/keys/language.h +21 -0
  215. data/src/external/Z/API/Z/keys/layout.h +20 -0
  216. data/src/external/Z/API/Z/keys/mathematics/geometry.h +29 -0
  217. data/src/external/Z/API/Z/keys/mathematics/number.h +21 -0
  218. data/src/external/Z/API/Z/keys/order.h +18 -0
  219. data/src/external/Z/API/Z/keys/platform.h +87 -0
  220. data/src/external/Z/API/Z/keys/program.h +39 -0
  221. data/src/external/Z/API/Z/keys/science/chemical elements.h +200 -0
  222. data/src/external/Z/API/Z/keys/science/electricity.h +18 -0
  223. data/src/external/Z/API/Z/keys/science/magnetism.h +19 -0
  224. data/src/external/Z/API/Z/keys/status.h +69 -0
  225. data/src/external/Z/API/Z/keys/text.h +27 -0
  226. data/src/external/Z/API/Z/keys/value.h +88 -0
  227. data/src/external/Z/API/Z/macros/arguments.h +25 -0
  228. data/src/external/Z/API/Z/macros/casting.h +22 -0
  229. data/src/external/Z/API/Z/macros/character.h +159 -0
  230. data/src/external/Z/API/Z/macros/date.h +14 -0
  231. data/src/external/Z/API/Z/macros/key.h +20 -0
  232. data/src/external/Z/API/Z/macros/language.h +126 -0
  233. data/src/external/Z/API/Z/macros/language.hpp +81 -0
  234. data/src/external/Z/API/Z/macros/members.h +86 -0
  235. data/src/external/Z/API/Z/macros/pasting.h +308 -0
  236. data/src/external/Z/API/Z/macros/pointer.h +33 -0
  237. data/src/external/Z/API/Z/macros/repetition.h +283 -0
  238. data/src/external/Z/API/Z/macros/structure.h +104 -0
  239. data/src/external/Z/API/Z/macros/templating.h +407 -0
  240. data/src/external/Z/API/Z/macros/tokens.h +14 -0
  241. data/src/external/Z/API/Z/macros/type enumeration.h +43 -0
  242. data/src/external/Z/API/Z/macros/type selection.hpp +76 -0
  243. data/src/external/Z/API/Z/macros/value.h +489 -0
  244. data/src/external/Z/API/Z/macros/variadic pasting.h +21 -0
  245. data/src/external/Z/API/Z/macros/variadic selection.h +56 -0
  246. data/src/external/Z/API/Z/macros/variadic.h +46 -0
  247. data/src/external/Z/API/Z/macros/version.h +17 -0
  248. data/src/external/Z/API/Z/network/3/IP.h +36 -0
  249. data/src/external/Z/API/Z/network/4/TCP.h +24 -0
  250. data/src/external/Z/API/Z/network/4/UDP.h +26 -0
  251. data/src/external/Z/API/Z/network/7/ED2K.h +104 -0
  252. data/src/external/Z/API/Z/network/7/HTTP.h +100 -0
  253. data/src/external/Z/API/Z/traits/SelectType.hpp +71 -0
  254. data/src/external/Z/API/Z/traits/TernaryType.hpp +20 -0
  255. data/src/external/Z/API/Z/traits/Type.hpp +4516 -0
  256. data/src/external/Z/API/Z/traits/TypeCount.hpp +52 -0
  257. data/src/external/Z/API/Z/traits/TypeList.hpp +376 -0
  258. data/src/external/Z/API/Z/traits/base.hpp +19 -0
  259. data/src/external/Z/API/Z/traits/filtering.hpp +30 -0
  260. data/src/external/Z/API/Z/traits/mathematics.hpp +48 -0
  261. data/src/external/Z/API/Z/types/arguments.h +19 -0
  262. data/src/external/Z/API/Z/types/base.h +1655 -0
  263. data/src/external/Z/API/Z/types/base.hpp +169 -0
  264. data/src/external/Z/API/Z/types/buffering.h +27 -0
  265. data/src/external/Z/API/Z/types/mathematics.h +135 -0
  266. data/src/external/Z/API/Z/types/time.h +23 -0
  267. data/src/external/Z/COPYING.LESSER +165 -0
  268. data/src/external/Z/development/Qt Creator/Z.pro +253 -0
  269. data/src/external/Z/distribution/CocoaPods/Zeta.podspec +18 -0
  270. data/src/external/Z/distribution/Gentoo Linux/Zeta-0.1.ebuild +22 -0
  271. data/src/external/Z/distribution/Gentoo Linux/metadata.xml +8 -0
  272. data/src/external/Z/distribution/Homebrew/Zeta.rb +11 -0
  273. data/src/external/z80/API/emulation/CPU/Z80.h +201 -0
  274. data/src/external/z80/README.md +229 -0
  275. data/src/external/z80/building/premake4.lua +33 -0
  276. data/src/external/z80/development/Xcode/Z80.xcodeproj/project.pbxproj +520 -0
  277. data/src/external/z80/sources/Z80.c +1660 -0
  278. data/src/interrupt.c +6 -0
  279. data/src/interrupt.h +3 -0
  280. data/src/io.c.erb +115 -0
  281. data/src/io.h.erb +18 -0
  282. data/src/main.c +69 -0
  283. data/src/memory.c.erb +43 -0
  284. data/src/memory.h.erb +9 -0
  285. metadata +329 -0
@@ -0,0 +1,137 @@
1
+ /* Z Kit - functions/base/ZRange.h
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_functions_base_ZRange_H_
9
+ #define _Z_functions_base_ZRange_H_
10
+
11
+ #include <Z/functions/base/constructors.h>
12
+ #include <Z/functions/base/value.h>
13
+
14
+
15
+ /* MARK: - Implementation */
16
+
17
+
18
+ #define Z_IMPLEMENTATION(Type, type) \
19
+ \
20
+ static Z_INLINE \
21
+ zboolean z_range_##type##_are_equal(ZRange##Type a, ZRange##Type b) \
22
+ {return a.index == b.index && a.size == b.size;} \
23
+ \
24
+ \
25
+ static Z_INLINE \
26
+ zboolean z_range_##type##_contains(ZRange##Type object, ZRange##Type other) \
27
+ { \
28
+ return object.index <= other.index && \
29
+ object.index + object.size >= other.index + other.size; \
30
+ } \
31
+ \
32
+ \
33
+ static Z_INLINE \
34
+ zboolean z_range_##type##_contains_index(ZRange##Type object, z##type index) \
35
+ {return index >= object.index && index < object.index + object.size;} \
36
+ \
37
+ \
38
+ static Z_INLINE \
39
+ zusize z_range_##type##_end(ZRange##Type object) \
40
+ {return object.index + object.size;} \
41
+ \
42
+ \
43
+ static Z_INLINE \
44
+ ZRange##Type z_range_##type##_from_indices(z##type a, z##type b) \
45
+ {return a < b ? z_range_##type(a, b - a) : z_range_##type(b, a - b);} \
46
+ \
47
+ \
48
+ static Z_INLINE \
49
+ zboolean z_range_##type##_intersect(ZRange##Type a, ZRange##Type b) \
50
+ {return a.index < b.index + b.size && b.index < a.index + a.size;} \
51
+ \
52
+ \
53
+ static Z_INLINE \
54
+ ZRange##Type z_range_##type##_intersection(ZRange##Type a, ZRange##Type b) \
55
+ { \
56
+ z##type index = (a.index > b.index) ? a.index : b.index, \
57
+ end = z_##type##_minimum(a.index + a.size, b.index + b.size); \
58
+ \
59
+ return end > index ? z_range_##type(index, end - index) : z_range_##type##_zero; \
60
+ } \
61
+ \
62
+ \
63
+ static Z_INLINE \
64
+ void z_range_##type##_swap(ZRange##Type *a, ZRange##Type *b) \
65
+ { \
66
+ ZRange##Type t = *a; \
67
+ \
68
+ *a = *b; *b = t; \
69
+ } \
70
+ \
71
+ \
72
+ static Z_INLINE \
73
+ ZRange##Type z_range_##type##_union(ZRange##Type a, ZRange##Type b) \
74
+ { \
75
+ z##type index = (a.index < b.index) ? a.index : b.index, \
76
+ a_end = a.index + a.size, \
77
+ b_end = b.index + b.size; \
78
+ \
79
+ return z_range_##type(index, ((a_end > b_end) ? a_end : b_end) - index); \
80
+ } \
81
+ \
82
+ \
83
+ static Z_INLINE \
84
+ zboolean z_range_##type##_is_zero(ZRange##Type object) \
85
+ {return object.index == 0 && object.size == 0;}
86
+
87
+
88
+ #define z_range_type_are_equal( TYPE) Z_INSERT_##TYPE##_fixed_type(z_range_, _are_equal )
89
+ #define z_range_type_contains( TYPE) Z_INSERT_##TYPE##_fixed_type(z_range_, _contains )
90
+ #define z_range_type_contains_index(TYPE) Z_INSERT_##TYPE##_fixed_type(z_range_, _contains_index)
91
+ #define z_range_type_end( TYPE) Z_INSERT_##TYPE##_fixed_type(z_range_, _end )
92
+ #define z_range_type_from_indices( TYPE) Z_INSERT_##TYPE##_fixed_type(z_range_, _from_indices )
93
+ #define z_range_type_intersect( TYPE) Z_INSERT_##TYPE##_fixed_type(z_range_, _intersect )
94
+ #define z_range_type_intersection( TYPE) Z_INSERT_##TYPE##_fixed_type(z_range_, _intersection )
95
+ #define z_range_type_is_zero( TYPE) Z_INSERT_##TYPE##_fixed_type(z_range_, _is_zero )
96
+ #define z_range_type_swap( TYPE) Z_INSERT_##TYPE##_fixed_type(z_range_, _swap )
97
+ #define z_range_type_union( TYPE) Z_INSERT_##TYPE##_fixed_type(z_range_, _union )
98
+
99
+
100
+ /* MARK: - Implementation expansions */
101
+
102
+
103
+ Z_IMPLEMENTATION(UInt8, uint8 )
104
+ Z_IMPLEMENTATION(UInt16, uint16)
105
+ Z_IMPLEMENTATION(UInt32, uint32)
106
+
107
+ #ifdef Z_UINT64
108
+ Z_IMPLEMENTATION(UInt64, uint64)
109
+ #endif
110
+
111
+ #ifdef Z_UINT128
112
+ Z_IMPLEMENTATION(UInt128, uint128)
113
+ #endif
114
+
115
+
116
+ /* MARK: - Cleanup */
117
+
118
+
119
+ #undef Z_IMPLEMENTATION
120
+
121
+
122
+ /* MARK: - Default type definitions */
123
+
124
+
125
+ #define z_range_are_equal z_range_type_are_equal (USIZE)
126
+ #define z_range_contains z_range_type_contains (USIZE)
127
+ #define z_range_contains_index z_range_type_contains_index(USIZE)
128
+ #define z_range_end z_range_type_end (USIZE)
129
+ #define z_range_from_indices z_range_type_from_indices (USIZE)
130
+ #define z_range_intersect z_range_type_intersect (USIZE)
131
+ #define z_range_intersection z_range_type_intersection (USIZE)
132
+ #define z_range_is_zero z_range_type_is_zero (USIZE)
133
+ #define z_range_swap z_range_type_swap (USIZE)
134
+ #define z_range_union z_range_type_union (USIZE)
135
+
136
+
137
+ #endif /* _Z_functions_base_ZRange_H_ */
@@ -0,0 +1,16 @@
1
+ /* Z Kit - functions/base/all.h
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_functions_base_all_H_
9
+ #define _Z_functions_base_all_H_
10
+
11
+ #include <Z/functions/base/character.h>
12
+ #include <Z/functions/base/Z2DValue.h>
13
+ #include <Z/functions/base/Z3DValue.h>
14
+ #include <Z/functions/base/ZRange.h>
15
+
16
+ #endif /* _Z_functions_base_all_H_ */
@@ -0,0 +1,37 @@
1
+ /* Z Kit - functions/base/casting.hpp
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_functions_base_casting_HPP_
9
+ #define _Z_functions_base_casting_HPP_
10
+
11
+ #include <Z/traits/Type.hpp>
12
+
13
+ #if Z_LANGUAGE_HAS(CPP, RVALUE_REFERENCE)
14
+
15
+ namespace Zeta {
16
+
17
+
18
+ template <class T>
19
+ static Z_CT(CPP14) T &&forwardable(typename Type<T>::remove_reference &what) Z_NO_EXCEPTION
20
+ {return static_cast<T &&>(what);}
21
+
22
+
23
+ template <class T>
24
+ static Z_CT(CPP14) T &&forwardable(typename Type<T>::remove_reference &&what) Z_NO_EXCEPTION
25
+ {return static_cast<T &&>(what);}
26
+
27
+
28
+ template <class T>
29
+ static Z_CT(CPP14) typename Type<T>::remove_reference &&movable(T &&what) Z_NO_EXCEPTION
30
+ {return static_cast<typename Type<T>::remove_reference &&>(what);}
31
+
32
+
33
+ }
34
+
35
+ #endif
36
+
37
+ #endif // _Z_functions_base_casting_HPP_
@@ -0,0 +1,38 @@
1
+ /* Z Kit - functions/base/character.h
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_functions_base_character_H_
9
+ #define _Z_functions_base_character_H_
10
+
11
+ #include <Z/types/base.h>
12
+ #include <Z/macros/character.h>
13
+
14
+
15
+ #define Z_IMPLEMENTATION_CHARACTER(export, prefix, type) \
16
+ \
17
+ export zboolean prefix##type##_is_alphanumeric (z##type character) {return Z_CHARACTER_IS_ALPHANUMERIC (character);} \
18
+ export zboolean prefix##type##_is_ascii (z##type character) {return Z_CHARACTER_IS_ASCII (character);} \
19
+ export zboolean prefix##type##_is_base_2_digit (z##type character) {return Z_CHARACTER_IS_BASE_2_DIGIT (character);} \
20
+ export zboolean prefix##type##_is_base_8_digit (z##type character) {return Z_CHARACTER_IS_BASE_8_DIGIT (character);} \
21
+ export zboolean prefix##type##_is_base_10_digit (z##type character) {return Z_CHARACTER_IS_BASE_10_DIGIT (character);} \
22
+ export zboolean prefix##type##_is_base_16_digit (z##type character) {return Z_CHARACTER_IS_BASE_16_DIGIT (character);} \
23
+ export zboolean prefix##type##_is_base_16_lowercase_digit(z##type character) {return Z_CHARACTER_IS_BASE_16_LOWERCASE_DIGIT(character);} \
24
+ export zboolean prefix##type##_is_base_16_uppercase_digit(z##type character) {return Z_CHARACTER_IS_BASE_16_UPPERCASE_DIGIT(character);} \
25
+ export zboolean prefix##type##_is_blank (z##type character) {return Z_CHARACTER_IS_BLANK (character);} \
26
+ export zboolean prefix##type##_is_control (z##type character) {return Z_CHARACTER_IS_CONTROL (character);} \
27
+ export zboolean prefix##type##_is_graphical (z##type character) {return Z_CHARACTER_IS_GRAPHICAL (character);} \
28
+ export zboolean prefix##type##_is_lowercase_letter (z##type character) {return Z_CHARACTER_IS_LOWERCASE_LETTER (character);} \
29
+ export zboolean prefix##type##_is_printable (z##type character) {return Z_CHARACTER_IS_PRINTABLE (character);} \
30
+ export zboolean prefix##type##_is_uppercase_letter (z##type character) {return Z_CHARACTER_IS_UPPERCASE_LETTER (character);} \
31
+ export z##type prefix##type##_lowercase (z##type character) {return Z_CHARACTER_UPPERCASE (character);} \
32
+ export z##type prefix##type##_uppercase (z##type character) {return Z_CHARACTER_UPPERCASE (character);}
33
+
34
+
35
+ Z_IMPLEMENTATION_CHARACTER(static Z_INLINE, z_, char)
36
+
37
+
38
+ #endif /* _Z_functions_base_character_H_ */
@@ -0,0 +1,326 @@
1
+ /* Z Kit - functions/base/constructors.h
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_functions_base_constructors_H_
9
+ #define _Z_functions_base_constructors_H_
10
+
11
+ #include <Z/types/base.h>
12
+
13
+ #if Z_LANGUAGE_HAS(C, COMPOUND_LITERAL)
14
+
15
+ # define z_2d_uint8(x, y) ((Z2DUInt8 ){x, y} )
16
+ # define z_3d_uint8(x, y, z) ((Z3DUInt8 ){x, y, z} )
17
+ # define z_4d_uint8(x, y, z, w) ((Z4DUInt8 ){x, y, z, w} )
18
+ # define z_range_uint8(index, size) ((ZRangeUInt8 ){index, size})
19
+ # define z_2d_sint8(x, y) ((Z2DSInt8 ){x, y} )
20
+ # define z_3d_sint8(x, y, z) ((Z3DSInt8 ){x, y, z} )
21
+ # define z_4d_sint8(x, y, z, w) ((Z4DSInt8 ){x, y, z, w} )
22
+ # define z_2d_uint16(x, y) ((Z2DUInt16 ){x, y} )
23
+ # define z_3d_uint16(x, y, z) ((Z3DUInt16 ){x, y, z} )
24
+ # define z_4d_uint16(x, y, z, w) ((Z4DUInt16 ){x, y, z, w} )
25
+ # define z_range_uint16(index, size) ((ZRangeUInt16){index, size})
26
+ # define z_2d_sint16(x, y) ((Z2DSInt16 ){x, y} )
27
+ # define z_3d_sint16(x, y, z) ((Z3DSInt16 ){x, y, z} )
28
+ # define z_4d_sint16(x, y, z, w) ((Z4DSInt16 ){x, y, z, w} )
29
+ # define z_2d_uint32(x, y) ((Z2DUInt32 ){x, y} )
30
+ # define z_3d_uint32(x, y, z) ((Z3DUInt32 ){x, y, z} )
31
+ # define z_4d_uint32(x, y, z, w) ((Z4DUInt32 ){x, y, z, w} )
32
+ # define z_range_uint32(index, size) ((ZRangeUInt32){index, size})
33
+ # define z_2d_sint32(x, y) ((Z2DSInt32 ){x, y} )
34
+ # define z_3d_sint32(x, y, z) ((Z3DSInt32 ){x, y, z} )
35
+ # define z_4d_sint32(x, y, z, w) ((Z4DSInt32 ){x, y, z, w} )
36
+
37
+ # ifdef Z_UINT64
38
+ # define z_2d_uint64(x, y) ((Z2DUInt64 ){x, y} )
39
+ # define z_3d_uint64(x, y, z) ((Z3DUInt64 ){x, y, z} )
40
+ # define z_4d_uint64(x, y, z, w) ((Z4DUInt64 ){x, y, z, w} )
41
+ # define z_range_uint64(index, size) ((ZRangeUInt64){index, size})
42
+ # endif
43
+
44
+ # ifdef Z_SINT64
45
+ # define z_2d_sint64(x, y) ((Z2DSInt64){x, y} )
46
+ # define z_3d_sint64(x, y, z) ((Z3DSInt64){x, y, z} )
47
+ # define z_4d_sint64(x, y, z, w) ((Z4DSInt64){x, y, z, w})
48
+ # endif
49
+
50
+ # ifdef Z_UINT128
51
+ # define z_2d_uint128(x, y) ((Z2DUInt128 ){x, y} )
52
+ # define z_3d_uint128(x, y, z) ((Z3DUInt128 ){x, y, z} )
53
+ # define z_4d_uint128(x, y, z, w) ((Z4DUInt128 ){x, y, z, w} )
54
+ # define z_range_uint128(index, size) ((ZRangeUInt128){index, size})
55
+ # endif
56
+
57
+ # ifdef Z_SINT128
58
+ # define z_2d_sint128(x, y) ((Z2DSInt128){x, y} )
59
+ # define z_3d_sint128(x, y, z) ((Z3DSInt128){x, y, z} )
60
+ # define z_4d_sint128(x, y, z, w) ((Z4DSInt128){x, y, z, w})
61
+ # endif
62
+
63
+ # ifdef Z_FLOAT16
64
+ # define z_2d_float16(x, y) ((Z2DFloat32){x, y} )
65
+ # define z_3d_float16(x, y, z) ((Z3DFloat32){x, y, z} )
66
+ # define z_4d_float16(x, y, z, w) ((Z4DFloat32){x, y, z, w})
67
+ # endif
68
+
69
+ # ifdef Z_FLOAT32
70
+ # define z_2d_float32(x, y) ((Z2DFloat32){x, y} )
71
+ # define z_3d_float32(x, y, z) ((Z3DFloat32){x, y, z} )
72
+ # define z_4d_float32(x, y, z, w) ((Z4DFloat32){x, y, z, w})
73
+ # endif
74
+
75
+ # ifdef Z_FLOAT64
76
+ # define z_2d_float64(x, y) ((Z2DFloat64){x, y} )
77
+ # define z_3d_float64(x, y, z) ((Z3DFloat64){x, y, z} )
78
+ # define z_4d_float64(x, y, z, w) ((Z4DFloat64){x, y, z, w})
79
+ # endif
80
+
81
+ # ifdef Z_FLOAT128
82
+ # define z_2d_float128(x, y) ((Z2DFloat128){x, y} )
83
+ # define z_3d_float128(x, y, z) ((Z3DFloat128){x, y, z} )
84
+ # define z_4d_float128(x, y, z, w) ((Z4DFloat128){x, y, z, w})
85
+ # endif
86
+
87
+ # ifdef Z_FLOAT80_X87
88
+ # define z_2d_float80_x87(x, y) ((Z2DFloat80_x87){x, y} )
89
+ # define z_3d_float80_x87(x, y, z) ((Z3DFloat80_x87){x, y, z} )
90
+ # define z_4d_float80_x87(x, y, z, w) ((Z4DFloat80_x87){x, y, z, w})
91
+ # endif
92
+
93
+ # ifdef Z_FLOAT96_X87
94
+ # define z_2d_float96_x87(x, y) ((Z2DFloat96_x87){x, y} )
95
+ # define z_3d_float96_x87(x, y, z) ((Z3DFloat96_x87){x, y, z} )
96
+ # define z_4d_float96_x87(x, y, z, w) ((Z4DFloat96_x87){x, y, z, w})
97
+ # endif
98
+
99
+ # ifdef Z_FLOAT128_X87
100
+ # define z_2d_float128_x87(x, y) ((Z2DFloat128_x87){x, y} )
101
+ # define z_3d_float128_x87(x, y, z) ((Z3DFloat128_x87){x, y, z} )
102
+ # define z_4d_float128_x87(x, y, z, w) ((Z4DFloat128_x87){x, y, z, w})
103
+ # endif
104
+
105
+ #else
106
+
107
+ # define Z_IMPLEMENTATION_ZND_CONSTRUCTORS(Type, type) \
108
+ \
109
+ static Z_INLINE \
110
+ Z2D##Type z_2d_##type(z##type x, z##type y) \
111
+ { \
112
+ Z2D##Type object; \
113
+ \
114
+ object.x = x; \
115
+ object.y = y; \
116
+ return object; \
117
+ } \
118
+ \
119
+ \
120
+ static Z_INLINE \
121
+ Z3D##Type z_3d_##type(z##type x, z##type y, z##type z) \
122
+ { \
123
+ Z3D##Type object; \
124
+ \
125
+ object.x = x; \
126
+ object.y = y; \
127
+ object.z = z; \
128
+ return object; \
129
+ } \
130
+ \
131
+ \
132
+ static Z_INLINE \
133
+ Z4D##Type z_4d_##type(z##type x, z##type y, z##type z, z##type w) \
134
+ { \
135
+ Z4D##Type object; \
136
+ \
137
+ object.x = x; \
138
+ object.y = y; \
139
+ object.z = z; \
140
+ object.w = w; \
141
+ return object; \
142
+ }
143
+
144
+
145
+ # define Z_IMPLEMENTATION_ZRange_CONSTRUCTOR(Type, type) \
146
+ \
147
+ static Z_INLINE \
148
+ ZRange##Type z_range_##type(z##type index, z##type size) \
149
+ { \
150
+ ZRange##Type object; \
151
+ \
152
+ object.index = index; \
153
+ object.size = size; \
154
+ return object; \
155
+ }
156
+
157
+
158
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS (UInt8, uint8 )
159
+ Z_IMPLEMENTATION_ZRange_CONSTRUCTOR(UInt8, uint8 )
160
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS (SInt8, sint8 )
161
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS (UInt16, uint16)
162
+ Z_IMPLEMENTATION_ZRange_CONSTRUCTOR(UInt16, uint16)
163
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS (SInt16, sint16)
164
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS (UInt32, uint32)
165
+ Z_IMPLEMENTATION_ZRange_CONSTRUCTOR(UInt32, uint32)
166
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS (SInt32, sint32)
167
+
168
+ # ifdef Z_UINT64
169
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS (UInt64, uint64)
170
+ Z_IMPLEMENTATION_ZRange_CONSTRUCTOR(UInt64, uint64)
171
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS (SInt64, sint64)
172
+ # endif
173
+
174
+ # ifdef Z_UINT128
175
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS (UInt128, uint128)
176
+ Z_IMPLEMENTATION_ZRange_CONSTRUCTOR(UInt128, uint128)
177
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS (SInt128, sint128)
178
+ # endif
179
+
180
+ # ifdef Z_FLOAT16
181
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS(Float16, float16)
182
+ # endif
183
+
184
+ # ifdef Z_FLOAT32
185
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS(Float32, float32)
186
+ # endif
187
+
188
+ # ifdef Z_FLOAT64
189
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS(Float64, float64)
190
+ # endif
191
+
192
+ # ifdef Z_FLOAT128
193
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS(Float128, float128)
194
+ # endif
195
+
196
+ # ifdef Z_FLOAT80_X87
197
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS(Float80_x87, float80_x87)
198
+ # endif
199
+
200
+ # ifdef Z_FLOAT96_X87
201
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS(Float96_x87, float96_x87)
202
+ # endif
203
+
204
+ # ifdef Z_FLOAT128_X87
205
+ Z_IMPLEMENTATION_ZND_CONSTRUCTORS(Float128_x87, float128_x87)
206
+ # endif
207
+
208
+ # undef Z_IMPLEMENTATION_ZND_CONSTRUCTORS
209
+ # undef Z_IMPLEMENTATION_ZRange_CONSTRUCTOR
210
+
211
+ #endif
212
+
213
+ #define z_2d_uint8_zero z_2d_uint8 (0, 0)
214
+ #define z_3d_uint8_zero z_3d_uint8 (0, 0, 0)
215
+ #define z_4d_uint8_zero z_4d_uint8 (0, 0, 0, 0)
216
+ #define z_range_uint8_zero z_range_uint8 (0, 0)
217
+ #define z_2d_sint8_zero z_2d_sint8 (0, 0)
218
+ #define z_3d_sint8_zero z_3d_sint8 (0, 0, 0)
219
+ #define z_4d_sint8_zero z_4d_sint8 (0, 0, 0, 0)
220
+ #define z_2d_uint16_zero z_2d_uint16 (0, 0)
221
+ #define z_3d_uint16_zero z_3d_uint16 (0, 0, 0)
222
+ #define z_4d_uint16_zero z_4d_uint16 (0, 0, 0, 0)
223
+ #define z_range_uint16_zero z_range_uint16(0, 0)
224
+ #define z_2d_sint16_zero z_2d_sint16 (0, 0)
225
+ #define z_3d_sint16_zero z_3d_sint16 (0, 0, 0)
226
+ #define z_4d_sint16_zero z_4d_sint16 (0, 0, 0, 0)
227
+ #define z_2d_uint32_zero z_2d_uint32 (0, 0)
228
+ #define z_3d_uint32_zero z_3d_uint32 (0, 0, 0)
229
+ #define z_4d_uint32_zero z_4d_uint32 (0, 0, 0, 0)
230
+ #define z_range_uint32_zero z_range_uint32(0, 0)
231
+ #define z_2d_sint32_zero z_2d_sint32 (0, 0)
232
+ #define z_3d_sint32_zero z_3d_sint32 (0, 0, 0)
233
+ #define z_4d_sint32_zero z_4d_sint32 (0, 0, 0, 0)
234
+
235
+ #ifdef Z_UINT64
236
+ # define z_2d_uint64_zero z_2d_uint64 (0, 0)
237
+ # define z_3d_uint64_zero z_3d_uint64 (0, 0, 0)
238
+ # define z_4d_uint64_zero z_4d_uint64 (0, 0, 0, 0)
239
+ # define z_range_uint64_zero z_range_uint64(0, 0)
240
+ #endif
241
+
242
+ #ifdef Z_SINT64
243
+ # define z_2d_sint64_zero z_2d_sint64(0, 0)
244
+ # define z_3d_sint64_zero z_3d_sint64(0, 0, 0)
245
+ # define z_4d_sint64_zero z_4d_sint64(0, 0, 0, 0)
246
+ #endif
247
+
248
+ #ifdef Z_UINT128
249
+ # define z_2d_uint128_zero z_2d_uint128 (0, 0)
250
+ # define z_3d_uint128_zero z_3d_uint128 (0, 0, 0)
251
+ # define z_4d_uint128_zero z_4d_uint128 (0, 0, 0, 0)
252
+ # define z_range_uint128_zero z_range_uint128(0, 0)
253
+ #endif
254
+
255
+ #ifdef Z_SINT128
256
+ # define z_2d_sint128_zero z_2d_sint128(0, 0)
257
+ # define z_3d_sint128_zero z_3d_sint128(0, 0, 0)
258
+ # define z_4d_sint128_zero z_4d_sint128(0, 0, 0, 0)
259
+ #endif
260
+
261
+ #ifdef Z_FLOAT16
262
+ # define z_2d_float16_zero z_2d_float16(0.0, 0.0)
263
+ # define z_3d_float16_zero z_3d_float16(0.0, 0.0, 0.0)
264
+ # define z_4d_float16_zero z_4d_float16(0.0, 0.0, 0.0, 0.0)
265
+ #endif
266
+
267
+ #ifdef Z_FLOAT32
268
+ # define z_2d_float32_zero z_2d_float32(0.0, 0.0)
269
+ # define z_3d_float32_zero z_3d_float32(0.0, 0.0, 0.0)
270
+ # define z_4d_float32_zero z_4d_float32(0.0, 0.0, 0.0, 0.0)
271
+ #endif
272
+
273
+ #ifdef Z_FLOAT64
274
+ # define z_2d_float64_zero z_2d_float64(0.0, 0.0)
275
+ # define z_3d_float64_zero z_3d_float64(0.0, 0.0, 0.0)
276
+ # define z_4d_float64_zero z_4d_float64(0.0, 0.0, 0.0, 0.0)
277
+ #endif
278
+
279
+ #ifdef Z_FLOAT128
280
+ # define z_2d_float128_zero z_2d_float128(0.0, 0.0)
281
+ # define z_3d_float128_zero z_3d_float128(0.0, 0.0, 0.0)
282
+ # define z_4d_float128_zero z_4d_float128(0.0, 0.0, 0.0, 0.0)
283
+ #endif
284
+
285
+ #ifdef Z_FLOAT80_X87
286
+ # define z_2d_float80_x87_zero z_2d_float80_x87(0.0, 0.0)
287
+ # define z_3d_float80_x87_zero z_3d_float80_x87(0.0, 0.0, 0.0)
288
+ # define z_4d_float80_x87_zero z_4d_float80_x87(0.0, 0.0, 0.0, 0.0)
289
+ #endif
290
+
291
+ #ifdef Z_FLOAT96_X87
292
+ # define z_2d_float96_x87_zero z_2d_float96_x87(0.0, 0.0)
293
+ # define z_3d_float96_x87_zero z_3d_float96_x87(0.0, 0.0, 0.0)
294
+ # define z_4d_float96_x87_zero z_4d_float96_x87(0.0, 0.0, 0.0, 0.0)
295
+ #endif
296
+
297
+ #ifdef Z_FLOAT128_X87
298
+ # define z_2d_float128_x87_zero z_2d_float128_x87(0.0, 0.0)
299
+ # define z_3d_float128_x87_zero z_3d_float128_x87(0.0, 0.0, 0.0)
300
+ # define z_4d_float128_x87_zero z_4d_float128_x87(0.0, 0.0, 0.0, 0.0)
301
+ #endif
302
+
303
+ #define z_2d_type( TYPE) Z_APPEND_##TYPE##_fixed_type(z_2d_ )
304
+ #define z_3d_type( TYPE) Z_APPEND_##TYPE##_fixed_type(z_3d_ )
305
+ #define z_4d_type( TYPE) Z_APPEND_##TYPE##_fixed_type(z_4d_ )
306
+ #define z_range_type( TYPE) Z_APPEND_##TYPE##_fixed_type(z_range_)
307
+ #define z_2d_type_zero( TYPE) Z_INSERT_##TYPE##_fixed_type(z_2d_, _zero)
308
+ #define z_3d_type_zero( TYPE) Z_INSERT_##TYPE##_fixed_type(z_3d_, _zero)
309
+ #define z_4d_type_zero( TYPE) Z_INSERT_##TYPE##_fixed_type(z_4d_, _zero)
310
+ #define z_range_type_zero(TYPE) Z_INSERT_##TYPE##_fixed_type(z_range_, _zero)
311
+
312
+ /* MARK: - Default real type definitions */
313
+
314
+ #ifdef Z_REAL
315
+ # define z_2d z_2d_type (REAL)
316
+ # define z_3d z_3d_type (REAL)
317
+ # define z_4d z_4d_type (REAL)
318
+ # define z_2d_zero z_2d_type_zero(REAL)
319
+ # define z_3d_zero z_3d_type_zero(REAL)
320
+ # define z_4d_zero z_4d_type_zero(REAL)
321
+ #endif
322
+
323
+ #define z_range z_range_type (USIZE)
324
+ #define z_range_zero z_range_type_zero(USIZE)
325
+
326
+ #endif /* _Z_functions_base_constructors_H_ */
@@ -0,0 +1,26 @@
1
+ /* Z Kit - functions/base/structure.hpp
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_functions_base_structure_HPP_
9
+ #define _Z_functions_base_structure_HPP_
10
+
11
+ #include <Z/types/base.hpp>
12
+
13
+ namespace Zeta {
14
+
15
+
16
+ template <class T, class C>
17
+ static Z_CT(CPP11) USize offset_of(T C::*member)
18
+ {
19
+ return (&reinterpret_cast<const UInt8 &>(reinterpret_cast<const C *>(1)->*member) -
20
+ reinterpret_cast<const UInt8 *>(1));
21
+ }
22
+
23
+
24
+ }
25
+
26
+ #endif // _Z_functions_base_structure_HPP_
@@ -0,0 +1,60 @@
1
+ /* Z Kit - functions/base/type.hpp
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_functions_base_type_HPP_
9
+ #define _Z_functions_base_type_HPP_
10
+
11
+ #include <Z/classes/base/SizedString.hpp>
12
+
13
+ #if Z_COMPILER_HAS_MAGIC_CONSTANT(MANGLED_FUNCTION_NAME)
14
+
15
+ namespace Zeta {
16
+
17
+ # if Z_COMPILER == Z_COMPILER_GCC || \
18
+ Z_COMPILER == Z_COMPILER_CLANG || \
19
+ Z_COMPILER == Z_COMPILER_APPLE_LLVM
20
+
21
+
22
+ template <class T>
23
+ static Z_CT(CPP14) USize type_string_size()
24
+ {
25
+ const Char *input = __PRETTY_FUNCTION__;
26
+ USize size = 0;
27
+ USize bracket_count = 0;
28
+
29
+ while (*input++ != '=');
30
+ while (*++input != ']' || bracket_count)
31
+ {
32
+ if (*input == '[') bracket_count++;
33
+ else if (*input == ']') bracket_count--;
34
+
35
+ size++;
36
+ }
37
+
38
+ return size;
39
+ }
40
+
41
+
42
+ template <class T, USize S = type_string_size<T>()>
43
+ static Z_CT(CPP14) SizedString<S> type_string()
44
+ {
45
+ const Char *input = __PRETTY_FUNCTION__;
46
+
47
+ while (*input++ != '=');
48
+ return SizedString<S>(input + 1);
49
+ }
50
+
51
+
52
+ # elif Z_COMPILER == Z_COMPILER_VISUAL_CPP
53
+
54
+ # endif
55
+
56
+ }
57
+
58
+ #endif
59
+
60
+ #endif // _Z_functions_base_type_HPP_