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,111 @@
1
+ /* Z Kit - classes/base/Range.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_classes_base_Range_HPP_
9
+ #define _Z_classes_base_Range_HPP_
10
+
11
+ #include <Z/macros/type selection.hpp>
12
+ #include <Z/functions/base/value.hpp>
13
+
14
+ #if defined(Z_USE_NS_RANGE) && Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP)
15
+ # import <Foundation/NSRange.h>
16
+ #endif
17
+
18
+
19
+ namespace Zeta {template <class T> struct Range {
20
+ typedef typename ZTypeFixedNatural(ZRange, T) Base;
21
+ T index, size;
22
+
23
+ Z_INLINE Range() Z_DEFAULTED({})
24
+
25
+ Z_CT(CPP11) Range(T size) : index(0), size(size) {}
26
+ Z_CT(CPP11) Range(T index, T size) : index(index), size(size) {}
27
+ Z_CT(CPP11) Range(const Base &other) : index(other.index), size(other.size) {}
28
+
29
+ Z_CT(CPP11) operator Boolean() const {return !!size;}
30
+ Z_INLINE operator Base& () const {return *((Base *)this);}
31
+
32
+
33
+ Z_CT(CPP11) Boolean operator ==(const Range &rhs) const
34
+ {return index == rhs.index && size == rhs.size;}
35
+
36
+
37
+ Z_CT(CPP11) Boolean operator !=(const Range &rhs) const
38
+ {return index != rhs.index || size != rhs.size;}
39
+
40
+
41
+ Z_CT(CPP14) Range operator &(const Range &rhs) const
42
+ {
43
+ T index = (this->index > rhs.index) ? this->index : rhs.index;
44
+ T end = minimum<T>(end(), rhs.end());
45
+
46
+ return end > index ? Range(index, end - index) : Range(0);
47
+ }
48
+
49
+
50
+ Z_CT(CPP14) Range operator |(const Range &rhs) const
51
+ {
52
+ T index = (this->index < rhs.index) ? this->index : rhs.index,
53
+ a_end = end(),
54
+ b_end = rhs.end();
55
+
56
+ return Range(index, ((a_end > b_end) ? a_end : b_end) - index);
57
+ }
58
+
59
+
60
+ Z_INLINE Range &operator &=(const Range &rhs) {return *this = *this & rhs;}
61
+ Z_INLINE Range &operator |=(const Range &rhs) {return *this = *this | rhs;}
62
+
63
+ Z_CT(CPP11) T operator [](T index) const {return this->index + index;}
64
+
65
+
66
+ # if defined(Z_USE_NS_RANGE) && Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP)
67
+
68
+ Z_CT(CPP11) Range(const NSRange &range)
69
+ : index(range.location), size(range.length) {}
70
+
71
+
72
+ # if Z_LANGUAGE_HAS(CPP, INITIALIZER_LIST)
73
+ Z_CT(CPP11) operator NSRange() const
74
+ {return NSRange{NSUInteger(index), NSUInteger(size)};}
75
+ # else
76
+ Z_CT(CPP14) operator NSRange() const
77
+ {
78
+ NSRange result = {NSUInteger(index), NSUInteger(size)};
79
+ return result;
80
+ }
81
+ # endif
82
+
83
+ # endif
84
+
85
+
86
+ Z_CT(CPP11) Boolean contains(const Range &other) const
87
+ {return other.index >= index && other.end() <= end();}
88
+
89
+
90
+ Z_CT(CPP11) Boolean contains(T index) const
91
+ {return index >= this->index && index < end();}
92
+
93
+
94
+ Z_CT(CPP11) T end() const
95
+ {return index + size;}
96
+
97
+
98
+ Z_CT(CPP11) Boolean intersects(const Range &other) const
99
+ {return index < other.end() && other.index < end();}
100
+
101
+
102
+ Z_CT(CPP11) Boolean is_zero() const
103
+ {return !index && !size;}
104
+
105
+
106
+ Z_INLINE void swap(Range &other)
107
+ {Zeta::swap<Base>(this, &other);}
108
+ };}
109
+
110
+
111
+ #endif // _Z_classes_base_Range_HPP_
@@ -0,0 +1,66 @@
1
+ /* Z Kit - classes/base/SizedString.hpp
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2017 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_classes_base_SizedString_HPP_
9
+ #define _Z_classes_base_SizedString_HPP_
10
+
11
+ #include <Z/types/base.hpp>
12
+
13
+
14
+ namespace Zeta {namespace Detail {namespace SizedString {
15
+
16
+ template <USize I> class Element : public Element<I - 1> {
17
+ protected:
18
+ Char _character;
19
+
20
+ public:
21
+ Z_CT(CPP11) Element(const Char *string)
22
+ : Element<I - 1>(string), _character(string[I]) {}
23
+ };
24
+
25
+
26
+ template <> class Element<0> {
27
+ protected:
28
+ Char _character;
29
+
30
+ public:
31
+ Z_CT(CPP11) Element(const Char *string)
32
+ : _character(string[0]) {}
33
+ };
34
+ }}}
35
+
36
+
37
+ namespace Zeta {
38
+
39
+ template <USize S> class SizedString : public Detail::SizedString::Element<S - 1> {
40
+ protected:
41
+ Char _null_character;
42
+
43
+ public:
44
+ Z_CT(CPP11) SizedString(const Char *string)
45
+ : Detail::SizedString::Element<S - 1>(string), _null_character('\0') {}
46
+
47
+ Z_INLINE operator const Char *() const
48
+ {return &this->Detail::SizedString::Element<0>::_character;}
49
+ };
50
+
51
+
52
+ template <> class SizedString<0> {
53
+ protected:
54
+ Char _null_character;
55
+
56
+ public:
57
+ Z_CT(CPP11) SizedString(const Char *string)
58
+ : _null_character('\0') {}
59
+
60
+ Z_INLINE operator const Char *() const
61
+ {return &_null_character;}
62
+ };
63
+ }
64
+
65
+
66
+ #endif // _Z_classes_base_SizedString_HPP_
@@ -0,0 +1,89 @@
1
+ /* Z Kit - classes/base/Status.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_classes_base_Status_HPP_
9
+ #define _Z_classes_base_Status_HPP_
10
+
11
+ #include <Z/keys/status.h>
12
+ #include <Z/types/base.hpp>
13
+
14
+
15
+ namespace Zeta {struct Status {
16
+
17
+ enum { OK = Z_OK,
18
+ End = Z_END,
19
+ Updated = Z_UPDATED,
20
+ Unimplemented = Z_UNIMPLEMENTED
21
+ };
22
+
23
+ struct Error {enum {
24
+ Unknown = Z_ERROR_UNKNOWN,
25
+ AlreadyExists = Z_ERROR_ALREADY_EXISTS,
26
+ AlreadyInUse = Z_ERROR_ALREADY_IN_USE,
27
+ AlreadyOpen = Z_ERROR_ALREADY_OPEN,
28
+ AlreadyRunning = Z_ERROR_ALREADY_RUNNING,
29
+ Busy = Z_ERROR_BUSY,
30
+ Closed = Z_ERROR_CLOSED,
31
+ ClosedByPeer = Z_ERROR_CLOSED_BY_PEER,
32
+ Empty = Z_ERROR_EMPTY,
33
+ Exception = Z_ERROR_EXCEPTION,
34
+ Full = Z_ERROR_FULL,
35
+ LimitReached = Z_ERROR_LIMIT_REACHED,
36
+ Locked = Z_ERROR_LOCKED,
37
+ Loop = Z_ERROR_LOOP,
38
+ InvalidAddress = Z_ERROR_INVALID_ADDRESS,
39
+ InvalidArgument = Z_ERROR_INVALID_ARGUMENT,
40
+ InvalidData = Z_ERROR_INVALID_DATA,
41
+ InvalidFormat = Z_ERROR_INVALID_FORMAT,
42
+ InvalidIndex = Z_ERROR_INVALID_INDEX,
43
+ InvalidInterval = Z_ERROR_INVALID_INTERVAL,
44
+ InvalidIO = Z_ERROR_INVALID_IO,
45
+ InvalidProtocol = Z_ERROR_INVALID_PROTOCOL,
46
+ InvalidRange = Z_ERROR_INVALID_RANGE,
47
+ InvalidRatio = Z_ERROR_INVALID_RATIO,
48
+ InvalidSize = Z_ERROR_INVALID_SIZE,
49
+ InvalidType = Z_ERROR_INVALID_TYPE,
50
+ InvalidValue = Z_ERROR_INVALID_VALUE,
51
+ NotAvailable = Z_ERROR_NOT_AVAILABLE,
52
+ NotEnoughMemory = Z_ERROR_NOT_ENOUGH_MEMORY,
53
+ NotEnoughSpace = Z_ERROR_NOT_ENOUGH_SPACE,
54
+ NotEnoughResources = Z_ERROR_NOT_ENOUGH_RESOURCES,
55
+ NotExecutable = Z_ERROR_NOT_EXECUTABLE,
56
+ NotFinalized = Z_ERROR_NOT_FINALIZED,
57
+ NotFound = Z_ERROR_NOT_FOUND,
58
+ NotInitialized = Z_ERROR_NOT_INITIALIZED,
59
+ NotReadable = Z_ERROR_NOT_READABLE,
60
+ NotWritable = Z_ERROR_NOT_WRITABLE,
61
+ NotSupported = Z_ERROR_NOT_SUPPORTED,
62
+ RaceCondition = Z_ERROR_RACE_CONDITION,
63
+ Rejected = Z_ERROR_REJECTED,
64
+ StackOverflow = Z_ERROR_STACK_OVERFLOW,
65
+ Stalled = Z_ERROR_STALLED,
66
+ Terminated = Z_ERROR_TERMINATED,
67
+ TimeOut = Z_ERROR_TIME_OUT,
68
+ TooBig = Z_ERROR_TOO_BIG,
69
+ TooSmall = Z_ERROR_TOO_SMALL,
70
+ Unauthorized = Z_ERROR_UNAUTHORIZED,
71
+ Unreachable = Z_ERROR_UNREACHABLE
72
+ };};
73
+
74
+ ZStatus code;
75
+
76
+ Z_INLINE Status() Z_DEFAULTED({})
77
+
78
+ Z_CT(CPP11) Status(ZStatus code) : code(code) {}
79
+
80
+ Z_CT(CPP11) operator ZStatus() const {return code;}
81
+
82
+ Z_CT(CPP11) Boolean operator ==(ZStatus status) const {return code == status;}
83
+ Z_CT(CPP11) Boolean operator !=(ZStatus status) const {return code != status;}
84
+
85
+ Z_CT(CPP11) Boolean is_error() const {return code < 0;}
86
+ };}
87
+
88
+
89
+ #endif // _Z_classes_base_Status_HPP_
@@ -0,0 +1,39 @@
1
+ /* Z Kit - classes/base/Symbol.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_classes_base_Symbol_HPP_
9
+ #define _Z_classes_base_Symbol_HPP_
10
+
11
+ #include <Z/types/base.hpp>
12
+
13
+
14
+ namespace Zeta {struct Symbol {
15
+ UInt64 id;
16
+
17
+ Z_INLINE Symbol() Z_DEFAULTED({})
18
+
19
+ Z_CT(CPP11) Symbol(UInt64 id)
20
+ : id(id) {}
21
+
22
+ Z_CT(CPP14) Symbol(const Char *string)
23
+ : id(Z_UINT64(14695981039346656037))
24
+ {while (*string) id = (id ^ *string++) * Z_UINT64(109951162821);}
25
+
26
+ Z_CT(CPP11) operator UInt64() const {return id;}
27
+
28
+ Z_CT(CPP11) Boolean operator ==(UInt64 id) const {return this->id == id;}
29
+ Z_CT(CPP11) Boolean operator !=(UInt64 id) const {return this->id != id;}
30
+ };}
31
+
32
+
33
+ #ifdef Z_USE_SYMBOL_ABBREVIATION
34
+ # define $( string) Zeta::Symbol(#string)
35
+ # define $$(string) Zeta::Symbol( string)
36
+ #endif
37
+
38
+
39
+ #endif // _Z_classes_base_Symbol_HPP_
@@ -0,0 +1,111 @@
1
+ /* Z Kit - classes/base/Tuple.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_classes_base_Tuple_HPP_
9
+ #define _Z_classes_base_Tuple_HPP_
10
+
11
+ #include <Z/inspection/language.h>
12
+
13
+ #if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE_EXTENDED_PARAMETERS)
14
+
15
+ # include <Z/traits/Type.hpp>
16
+
17
+
18
+ namespace Zeta {namespace Detail {namespace Tuple {
19
+
20
+ template <class type_list> class Element;
21
+
22
+
23
+ template <class... T> struct Super {
24
+ typedef Element<typename TypeListRotateRight<TypeList<T...>, 1>::type> type;
25
+ };
26
+
27
+
28
+ template <class T0>
29
+ struct Element<TypeList<T0> > {
30
+ typedef T0 Value;
31
+
32
+ Value value;
33
+
34
+ Z_INLINE Element() Z_DEFAULTED({})
35
+
36
+ Z_CT(CPP11) Element(typename Zeta::Type<T0>::to_forwardable value)
37
+ : value(value) {}
38
+ };
39
+
40
+
41
+ template <class TN, class... T>
42
+ struct Element<TypeList<TN, T...> > : Super<T...>::type {
43
+ typedef TN Value;
44
+
45
+ Value value;
46
+
47
+ Z_INLINE Element() Z_DEFAULTED({})
48
+
49
+ Z_CT(CPP11) Element(
50
+ typename Zeta::Type<T >::to_forwardable... previous,
51
+ typename Zeta::Type<TN>::to_forwardable value
52
+ ) : Super<T...>::type(previous...), value(value) {}
53
+ };
54
+ }}}
55
+
56
+
57
+ namespace Zeta {template <class... T> class Tuple : public Detail::Tuple::Super<T...>::type {
58
+
59
+ private:
60
+ typedef typename Detail::Tuple::Super<T...>::type Super;
61
+
62
+ public:
63
+ template <UInt I> class At {
64
+
65
+ private:
66
+ enum {tail_size = TypeCount<T...>::value - (I + 1)};
67
+
68
+ public:
69
+ typedef Detail::Tuple::Element<typename TypeListRotateRight<
70
+ typename TypeListRemoveTail<TypeList<T...>, tail_size>::type, 1
71
+ >::type> Element;
72
+
73
+ typedef typename Element::Value type;
74
+ };
75
+
76
+
77
+ # if Z_LANGUAGE_HAS(CPP, INHERITING_CONSTRUCTORS)
78
+ using Super::Super;
79
+ # else
80
+ Z_INLINE Tuple() Z_DEFAULTED({})
81
+
82
+ Z_CT(CPP11) Tuple(typename Type<T>::to_forwardable... values)
83
+ : Super(values...) {}
84
+ # endif
85
+
86
+
87
+ template <UInt I>
88
+ Z_INLINE typename At<I>::type &at()
89
+ {return At<I>::Element::value;}
90
+
91
+
92
+ template <UInt I>
93
+ Z_CT(CPP11) typename Type<typename At<I>::type>::to_forwardable get() const
94
+ {return At<I>::Element::value;}
95
+
96
+
97
+ template <UInt I>
98
+ Z_INLINE Tuple &set(typename Type<typename At<I>::type>::to_forwardable value)
99
+ {
100
+ At<I>::Element::value = value;
101
+ return *this;
102
+ }
103
+ };}
104
+
105
+
106
+ # define Z_HAS_CLASS_Tuple TRUE
107
+ #else
108
+ # define Z_HAS_CLASS_Tuple FALSE
109
+ #endif
110
+
111
+ #endif // _Z_classes_base_Tuple_HPP_