gemba 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. checksums.yaml +4 -4
  2. data/THIRD_PARTY_NOTICES +37 -2
  3. data/assets/placeholder_boxart.png +0 -0
  4. data/bin/gemba +2 -2
  5. data/ext/gemba/extconf.rb +24 -1
  6. data/ext/gemba/gemba_ext.c +436 -2
  7. data/ext/gemba/gemba_ext.h +2 -0
  8. data/gemba.gemspec +5 -3
  9. data/lib/gemba/achievements/achievement.rb +23 -0
  10. data/lib/gemba/achievements/backend.rb +186 -0
  11. data/lib/gemba/achievements/cache.rb +70 -0
  12. data/lib/gemba/achievements/credentials_presenter.rb +142 -0
  13. data/lib/gemba/achievements/fake_backend.rb +205 -0
  14. data/lib/gemba/achievements/null_backend.rb +11 -0
  15. data/lib/gemba/achievements/offline_backend.rb +168 -0
  16. data/lib/gemba/achievements/retro_achievements/backend.rb +453 -0
  17. data/lib/gemba/achievements/retro_achievements/cli_sync_requester.rb +64 -0
  18. data/lib/gemba/achievements/retro_achievements/ping_worker.rb +27 -0
  19. data/lib/gemba/achievements.rb +19 -0
  20. data/lib/gemba/achievements_window.rb +556 -0
  21. data/lib/gemba/app_controller.rb +1015 -0
  22. data/lib/gemba/bios.rb +54 -0
  23. data/lib/gemba/boxart_fetcher/libretro_backend.rb +39 -0
  24. data/lib/gemba/boxart_fetcher/null_backend.rb +12 -0
  25. data/lib/gemba/boxart_fetcher.rb +79 -0
  26. data/lib/gemba/bus_emitter.rb +13 -0
  27. data/lib/gemba/child_window.rb +24 -1
  28. data/lib/gemba/cli/commands/config_cmd.rb +83 -0
  29. data/lib/gemba/cli/commands/decode.rb +154 -0
  30. data/lib/gemba/cli/commands/patch.rb +78 -0
  31. data/lib/gemba/cli/commands/play.rb +78 -0
  32. data/lib/gemba/cli/commands/record.rb +114 -0
  33. data/lib/gemba/cli/commands/replay.rb +161 -0
  34. data/lib/gemba/cli/commands/retro_achievements.rb +213 -0
  35. data/lib/gemba/cli/commands/version.rb +22 -0
  36. data/lib/gemba/cli.rb +52 -364
  37. data/lib/gemba/config.rb +135 -1
  38. data/lib/gemba/data/gb_games.json +1 -0
  39. data/lib/gemba/data/gb_md5.json +1 -0
  40. data/lib/gemba/data/gba_games.json +1 -0
  41. data/lib/gemba/data/gba_md5.json +1 -0
  42. data/lib/gemba/data/gbc_games.json +1 -0
  43. data/lib/gemba/data/gbc_md5.json +1 -0
  44. data/lib/gemba/emulator_frame.rb +1060 -0
  45. data/lib/gemba/event_bus.rb +48 -0
  46. data/lib/gemba/frame_stack.rb +60 -0
  47. data/lib/gemba/game_index.rb +84 -0
  48. data/lib/gemba/game_picker_frame.rb +268 -0
  49. data/lib/gemba/gamepad_map.rb +103 -0
  50. data/lib/gemba/headless.rb +6 -5
  51. data/lib/gemba/headless_player.rb +33 -3
  52. data/lib/gemba/help_window.rb +61 -0
  53. data/lib/gemba/hotkey_map.rb +3 -1
  54. data/lib/gemba/input_recorder.rb +107 -0
  55. data/lib/gemba/input_replayer.rb +119 -0
  56. data/lib/gemba/keyboard_map.rb +90 -0
  57. data/lib/gemba/locales/en.yml +97 -5
  58. data/lib/gemba/locales/ja.yml +97 -5
  59. data/lib/gemba/main_window.rb +56 -0
  60. data/lib/gemba/modal_stack.rb +81 -0
  61. data/lib/gemba/patcher_window.rb +223 -0
  62. data/lib/gemba/platform/gb.rb +21 -0
  63. data/lib/gemba/platform/gba.rb +21 -0
  64. data/lib/gemba/platform/gbc.rb +23 -0
  65. data/lib/gemba/platform.rb +20 -0
  66. data/lib/gemba/platform_open.rb +19 -0
  67. data/lib/gemba/recorder.rb +4 -3
  68. data/lib/gemba/replay_player.rb +691 -0
  69. data/lib/gemba/rom_info.rb +57 -0
  70. data/lib/gemba/rom_info_window.rb +16 -3
  71. data/lib/gemba/rom_library.rb +106 -0
  72. data/lib/gemba/rom_overrides.rb +47 -0
  73. data/lib/gemba/rom_patcher/bps.rb +161 -0
  74. data/lib/gemba/rom_patcher/ips.rb +101 -0
  75. data/lib/gemba/rom_patcher/ups.rb +118 -0
  76. data/lib/gemba/rom_patcher.rb +109 -0
  77. data/lib/gemba/{rom_loader.rb → rom_resolver.rb} +7 -6
  78. data/lib/gemba/runtime.rb +59 -26
  79. data/lib/gemba/save_state_manager.rb +4 -7
  80. data/lib/gemba/save_state_picker.rb +17 -4
  81. data/lib/gemba/session_logger.rb +64 -0
  82. data/lib/gemba/settings/audio_tab.rb +77 -0
  83. data/lib/gemba/settings/gamepad_tab.rb +351 -0
  84. data/lib/gemba/settings/hotkeys_tab.rb +259 -0
  85. data/lib/gemba/settings/paths.rb +11 -0
  86. data/lib/gemba/settings/recording_tab.rb +83 -0
  87. data/lib/gemba/settings/save_states_tab.rb +91 -0
  88. data/lib/gemba/settings/system_tab.rb +362 -0
  89. data/lib/gemba/settings/video_tab.rb +318 -0
  90. data/lib/gemba/settings_window.rb +162 -1036
  91. data/lib/gemba/version.rb +1 -1
  92. data/lib/gemba/virtual_keyboard.rb +19 -0
  93. data/lib/gemba.rb +2 -12
  94. data/test/achievements_window/test_bulk_sync.rb +218 -0
  95. data/test/achievements_window/test_bus_events.rb +125 -0
  96. data/test/achievements_window/test_close_confirmation.rb +201 -0
  97. data/test/achievements_window/test_initial_state.rb +164 -0
  98. data/test/achievements_window/test_sorting.rb +227 -0
  99. data/test/achievements_window/test_tree_rendering.rb +133 -0
  100. data/test/fixtures/fake_bios.bin +0 -0
  101. data/test/fixtures/pong.gba +0 -0
  102. data/test/fixtures/test.gb +0 -0
  103. data/test/fixtures/test.gbc +0 -0
  104. data/test/fixtures/test_quicksave.ss +0 -0
  105. data/test/screenshots/no_focus.png +0 -0
  106. data/test/shared/teek_test_worker.rb +17 -1
  107. data/test/shared/tk_test_helper.rb +91 -4
  108. data/test/support/achievements_window_helpers.rb +18 -0
  109. data/test/support/fake_core.rb +25 -0
  110. data/test/support/fake_ra_runtime.rb +74 -0
  111. data/test/support/fake_requester.rb +68 -0
  112. data/test/support/player_helpers.rb +20 -5
  113. data/test/test_achievement.rb +32 -0
  114. data/test/{test_player.rb → test_app_controller.rb} +353 -85
  115. data/test/test_bios.rb +123 -0
  116. data/test/test_boxart_fetcher.rb +150 -0
  117. data/test/test_cli.rb +17 -265
  118. data/test/test_cli_config.rb +64 -0
  119. data/test/test_cli_decode.rb +97 -0
  120. data/test/test_cli_patch.rb +58 -0
  121. data/test/test_cli_play.rb +213 -0
  122. data/test/test_cli_ra.rb +175 -0
  123. data/test/test_cli_record.rb +69 -0
  124. data/test/test_cli_replay.rb +72 -0
  125. data/test/test_cli_sync_requester.rb +152 -0
  126. data/test/test_cli_version.rb +27 -0
  127. data/test/test_config.rb +2 -3
  128. data/test/test_config_ra.rb +69 -0
  129. data/test/test_core.rb +62 -1
  130. data/test/test_credentials_presenter.rb +192 -0
  131. data/test/test_event_bus.rb +100 -0
  132. data/test/test_fake_backend_achievements.rb +130 -0
  133. data/test/test_fake_backend_auth.rb +68 -0
  134. data/test/test_game_index.rb +77 -0
  135. data/test/test_game_picker_frame.rb +310 -0
  136. data/test/test_gamepad_map.rb +1 -3
  137. data/test/test_headless_player.rb +17 -3
  138. data/test/test_help_window.rb +82 -0
  139. data/test/test_hotkey_map.rb +22 -1
  140. data/test/test_input_recorder.rb +179 -0
  141. data/test/test_input_replay_determinism.rb +113 -0
  142. data/test/test_input_replayer.rb +162 -0
  143. data/test/test_keyboard_map.rb +1 -3
  144. data/test/test_libretro_backend.rb +41 -0
  145. data/test/test_locale.rb +1 -1
  146. data/test/test_logging.rb +123 -0
  147. data/test/test_null_backend.rb +42 -0
  148. data/test/test_offline_backend.rb +116 -0
  149. data/test/test_overlay_renderer.rb +1 -1
  150. data/test/test_platform.rb +149 -0
  151. data/test/test_ra_backend.rb +313 -0
  152. data/test/test_ra_backend_unlock_gate.rb +56 -0
  153. data/test/test_recorder.rb +0 -3
  154. data/test/test_replay_player.rb +316 -0
  155. data/test/test_rom_info.rb +149 -0
  156. data/test/test_rom_overrides.rb +86 -0
  157. data/test/test_rom_patcher.rb +382 -0
  158. data/test/{test_rom_loader.rb → test_rom_resolver.rb} +25 -26
  159. data/test/test_save_state_manager.rb +2 -4
  160. data/test/test_settings_audio.rb +107 -0
  161. data/test/test_settings_hotkeys.rb +83 -66
  162. data/test/test_settings_recording.rb +49 -0
  163. data/test/test_settings_save_states.rb +97 -0
  164. data/test/test_settings_system.rb +133 -0
  165. data/test/test_settings_video.rb +450 -0
  166. data/test/test_settings_window.rb +76 -507
  167. data/test/test_tip_service.rb +6 -6
  168. data/test/test_toast_overlay.rb +1 -1
  169. data/test/test_virtual_events.rb +156 -0
  170. data/test/test_virtual_keyboard.rb +1 -1
  171. data/vendor/rcheevos/CHANGELOG.md +495 -0
  172. data/vendor/rcheevos/LICENSE +21 -0
  173. data/vendor/rcheevos/Package.swift +33 -0
  174. data/vendor/rcheevos/README.md +67 -0
  175. data/vendor/rcheevos/include/module.modulemap +70 -0
  176. data/vendor/rcheevos/include/rc_api_editor.h +296 -0
  177. data/vendor/rcheevos/include/rc_api_info.h +280 -0
  178. data/vendor/rcheevos/include/rc_api_request.h +77 -0
  179. data/vendor/rcheevos/include/rc_api_runtime.h +417 -0
  180. data/vendor/rcheevos/include/rc_api_user.h +262 -0
  181. data/vendor/rcheevos/include/rc_client.h +877 -0
  182. data/vendor/rcheevos/include/rc_client_raintegration.h +101 -0
  183. data/vendor/rcheevos/include/rc_consoles.h +138 -0
  184. data/vendor/rcheevos/include/rc_error.h +59 -0
  185. data/vendor/rcheevos/include/rc_export.h +100 -0
  186. data/vendor/rcheevos/include/rc_hash.h +200 -0
  187. data/vendor/rcheevos/include/rc_runtime.h +148 -0
  188. data/vendor/rcheevos/include/rc_runtime_types.h +452 -0
  189. data/vendor/rcheevos/include/rc_util.h +51 -0
  190. data/vendor/rcheevos/include/rcheevos.h +8 -0
  191. data/vendor/rcheevos/src/rapi/rc_api_common.c +1379 -0
  192. data/vendor/rcheevos/src/rapi/rc_api_common.h +88 -0
  193. data/vendor/rcheevos/src/rapi/rc_api_editor.c +625 -0
  194. data/vendor/rcheevos/src/rapi/rc_api_info.c +587 -0
  195. data/vendor/rcheevos/src/rapi/rc_api_runtime.c +901 -0
  196. data/vendor/rcheevos/src/rapi/rc_api_user.c +483 -0
  197. data/vendor/rcheevos/src/rc_client.c +6941 -0
  198. data/vendor/rcheevos/src/rc_client_external.c +281 -0
  199. data/vendor/rcheevos/src/rc_client_external.h +177 -0
  200. data/vendor/rcheevos/src/rc_client_external_versions.h +171 -0
  201. data/vendor/rcheevos/src/rc_client_internal.h +409 -0
  202. data/vendor/rcheevos/src/rc_client_raintegration.c +566 -0
  203. data/vendor/rcheevos/src/rc_client_raintegration_internal.h +61 -0
  204. data/vendor/rcheevos/src/rc_client_types.natvis +396 -0
  205. data/vendor/rcheevos/src/rc_compat.c +251 -0
  206. data/vendor/rcheevos/src/rc_compat.h +121 -0
  207. data/vendor/rcheevos/src/rc_libretro.c +915 -0
  208. data/vendor/rcheevos/src/rc_libretro.h +98 -0
  209. data/vendor/rcheevos/src/rc_util.c +199 -0
  210. data/vendor/rcheevos/src/rc_version.c +11 -0
  211. data/vendor/rcheevos/src/rc_version.h +32 -0
  212. data/vendor/rcheevos/src/rcheevos/alloc.c +312 -0
  213. data/vendor/rcheevos/src/rcheevos/condition.c +754 -0
  214. data/vendor/rcheevos/src/rcheevos/condset.c +777 -0
  215. data/vendor/rcheevos/src/rcheevos/consoleinfo.c +1215 -0
  216. data/vendor/rcheevos/src/rcheevos/format.c +330 -0
  217. data/vendor/rcheevos/src/rcheevos/lboard.c +287 -0
  218. data/vendor/rcheevos/src/rcheevos/memref.c +805 -0
  219. data/vendor/rcheevos/src/rcheevos/operand.c +607 -0
  220. data/vendor/rcheevos/src/rcheevos/rc_internal.h +390 -0
  221. data/vendor/rcheevos/src/rcheevos/rc_runtime_types.natvis +541 -0
  222. data/vendor/rcheevos/src/rcheevos/rc_validate.c +1406 -0
  223. data/vendor/rcheevos/src/rcheevos/rc_validate.h +18 -0
  224. data/vendor/rcheevos/src/rcheevos/richpresence.c +922 -0
  225. data/vendor/rcheevos/src/rcheevos/runtime.c +852 -0
  226. data/vendor/rcheevos/src/rcheevos/runtime_progress.c +1073 -0
  227. data/vendor/rcheevos/src/rcheevos/trigger.c +344 -0
  228. data/vendor/rcheevos/src/rcheevos/value.c +935 -0
  229. data/vendor/rcheevos/src/rhash/aes.c +480 -0
  230. data/vendor/rcheevos/src/rhash/aes.h +49 -0
  231. data/vendor/rcheevos/src/rhash/cdreader.c +838 -0
  232. data/vendor/rcheevos/src/rhash/hash.c +1402 -0
  233. data/vendor/rcheevos/src/rhash/hash_disc.c +1340 -0
  234. data/vendor/rcheevos/src/rhash/hash_encrypted.c +566 -0
  235. data/vendor/rcheevos/src/rhash/hash_rom.c +426 -0
  236. data/vendor/rcheevos/src/rhash/hash_zip.c +460 -0
  237. data/vendor/rcheevos/src/rhash/md5.c +382 -0
  238. data/vendor/rcheevos/src/rhash/md5.h +91 -0
  239. data/vendor/rcheevos/src/rhash/rc_hash_internal.h +116 -0
  240. data/vendor/rcheevos/test/libretro.h +205 -0
  241. data/vendor/rcheevos/test/rapi/test_rc_api_common.c +941 -0
  242. data/vendor/rcheevos/test/rapi/test_rc_api_editor.c +931 -0
  243. data/vendor/rcheevos/test/rapi/test_rc_api_info.c +545 -0
  244. data/vendor/rcheevos/test/rapi/test_rc_api_runtime.c +2213 -0
  245. data/vendor/rcheevos/test/rapi/test_rc_api_user.c +998 -0
  246. data/vendor/rcheevos/test/rcheevos/mock_memory.h +32 -0
  247. data/vendor/rcheevos/test/rcheevos/test_condition.c +570 -0
  248. data/vendor/rcheevos/test/rcheevos/test_condset.c +5170 -0
  249. data/vendor/rcheevos/test/rcheevos/test_consoleinfo.c +203 -0
  250. data/vendor/rcheevos/test/rcheevos/test_format.c +112 -0
  251. data/vendor/rcheevos/test/rcheevos/test_lboard.c +746 -0
  252. data/vendor/rcheevos/test/rcheevos/test_memref.c +520 -0
  253. data/vendor/rcheevos/test/rcheevos/test_operand.c +692 -0
  254. data/vendor/rcheevos/test/rcheevos/test_rc_validate.c +502 -0
  255. data/vendor/rcheevos/test/rcheevos/test_richpresence.c +1564 -0
  256. data/vendor/rcheevos/test/rcheevos/test_runtime.c +1667 -0
  257. data/vendor/rcheevos/test/rcheevos/test_runtime_progress.c +1821 -0
  258. data/vendor/rcheevos/test/rcheevos/test_timing.c +166 -0
  259. data/vendor/rcheevos/test/rcheevos/test_trigger.c +2521 -0
  260. data/vendor/rcheevos/test/rcheevos/test_value.c +870 -0
  261. data/vendor/rcheevos/test/rcheevos-test.sln +46 -0
  262. data/vendor/rcheevos/test/rcheevos-test.vcxproj +239 -0
  263. data/vendor/rcheevos/test/rcheevos-test.vcxproj.filters +335 -0
  264. data/vendor/rcheevos/test/rhash/data.c +657 -0
  265. data/vendor/rcheevos/test/rhash/data.h +32 -0
  266. data/vendor/rcheevos/test/rhash/mock_filereader.c +236 -0
  267. data/vendor/rcheevos/test/rhash/mock_filereader.h +31 -0
  268. data/vendor/rcheevos/test/rhash/test_cdreader.c +920 -0
  269. data/vendor/rcheevos/test/rhash/test_hash.c +310 -0
  270. data/vendor/rcheevos/test/rhash/test_hash_disc.c +1450 -0
  271. data/vendor/rcheevos/test/rhash/test_hash_rom.c +899 -0
  272. data/vendor/rcheevos/test/rhash/test_hash_zip.c +551 -0
  273. data/vendor/rcheevos/test/test.c +113 -0
  274. data/vendor/rcheevos/test/test_framework.h +205 -0
  275. data/vendor/rcheevos/test/test_rc_client.c +10509 -0
  276. data/vendor/rcheevos/test/test_rc_client_external.c +2197 -0
  277. data/vendor/rcheevos/test/test_rc_client_raintegration.c +441 -0
  278. data/vendor/rcheevos/test/test_rc_libretro.c +952 -0
  279. data/vendor/rcheevos/test/test_types.natvis +9 -0
  280. data/vendor/rcheevos/validator/validator.c +658 -0
  281. data/vendor/rcheevos/validator/validator.vcxproj +152 -0
  282. data/vendor/rcheevos/validator/validator.vcxproj.filters +82 -0
  283. metadata +274 -11
  284. data/lib/gemba/input_mappings.rb +0 -214
  285. data/lib/gemba/player.rb +0 -1515
@@ -0,0 +1,382 @@
1
+ /*
2
+ Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
3
+
4
+ This software is provided 'as-is', without any express or implied
5
+ warranty. In no event will the authors be held liable for any damages
6
+ arising from the use of this software.
7
+
8
+ Permission is granted to anyone to use this software for any purpose,
9
+ including commercial applications, and to alter it and redistribute it
10
+ freely, subject to the following restrictions:
11
+
12
+ 1. The origin of this software must not be misrepresented; you must not
13
+ claim that you wrote the original software. If you use this software
14
+ in a product, an acknowledgment in the product documentation would be
15
+ appreciated but is not required.
16
+ 2. Altered source versions must be plainly marked as such, and must not be
17
+ misrepresented as being the original software.
18
+ 3. This notice may not be removed or altered from any source distribution.
19
+
20
+ L. Peter Deutsch
21
+ ghost@aladdin.com
22
+
23
+ */
24
+ /* $Id: md5.c,v 1.6 2002/04/13 19:20:28 lpd Exp $ */
25
+ /*
26
+ Independent implementation of MD5 (RFC 1321).
27
+
28
+ This code implements the MD5 Algorithm defined in RFC 1321, whose
29
+ text is available at
30
+ http://www.ietf.org/rfc/rfc1321.txt
31
+ The code is derived from the text of the RFC, including the test suite
32
+ (section A.5) but excluding the rest of Appendix A. It does not include
33
+ any code or documentation that is identified in the RFC as being
34
+ copyrighted.
35
+
36
+ The original and principal author of md5.c is L. Peter Deutsch
37
+ <ghost@aladdin.com>. Other authors are noted in the change history
38
+ that follows (in reverse chronological order):
39
+
40
+ 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order
41
+ either statically or dynamically; added missing #include <string.h>
42
+ in library.
43
+ 2002-03-11 lpd Corrected argument list for main(), and added int return
44
+ type, in test program and T value program.
45
+ 2002-02-21 lpd Added missing #include <stdio.h> in test program.
46
+ 2000-07-03 lpd Patched to eliminate warnings about "constant is
47
+ unsigned in ANSI C, signed in traditional"; made test program
48
+ self-checking.
49
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
50
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
51
+ 1999-05-03 lpd Original version.
52
+ */
53
+
54
+ #include "md5.h"
55
+ #include <stddef.h>
56
+ #include <string.h>
57
+
58
+ #undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
59
+ #ifdef ARCH_IS_BIG_ENDIAN
60
+ # define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1)
61
+ #else
62
+ # define BYTE_ORDER 0
63
+ #endif
64
+
65
+ #define T_MASK ((md5_word_t)~0)
66
+ #define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87)
67
+ #define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9)
68
+ #define T3 0x242070db
69
+ #define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111)
70
+ #define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050)
71
+ #define T6 0x4787c62a
72
+ #define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec)
73
+ #define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe)
74
+ #define T9 0x698098d8
75
+ #define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850)
76
+ #define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e)
77
+ #define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841)
78
+ #define T13 0x6b901122
79
+ #define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c)
80
+ #define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71)
81
+ #define T16 0x49b40821
82
+ #define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d)
83
+ #define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf)
84
+ #define T19 0x265e5a51
85
+ #define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855)
86
+ #define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2)
87
+ #define T22 0x02441453
88
+ #define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e)
89
+ #define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437)
90
+ #define T25 0x21e1cde6
91
+ #define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829)
92
+ #define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278)
93
+ #define T28 0x455a14ed
94
+ #define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa)
95
+ #define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07)
96
+ #define T31 0x676f02d9
97
+ #define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375)
98
+ #define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd)
99
+ #define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e)
100
+ #define T35 0x6d9d6122
101
+ #define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3)
102
+ #define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb)
103
+ #define T38 0x4bdecfa9
104
+ #define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f)
105
+ #define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f)
106
+ #define T41 0x289b7ec6
107
+ #define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805)
108
+ #define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a)
109
+ #define T44 0x04881d05
110
+ #define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6)
111
+ #define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a)
112
+ #define T47 0x1fa27cf8
113
+ #define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a)
114
+ #define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb)
115
+ #define T50 0x432aff97
116
+ #define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58)
117
+ #define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6)
118
+ #define T53 0x655b59c3
119
+ #define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d)
120
+ #define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82)
121
+ #define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e)
122
+ #define T57 0x6fa87e4f
123
+ #define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f)
124
+ #define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb)
125
+ #define T60 0x4e0811a1
126
+ #define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d)
127
+ #define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca)
128
+ #define T63 0x2ad7d2bb
129
+ #define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)
130
+
131
+
132
+ static void
133
+ md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
134
+ {
135
+ md5_word_t
136
+ a = pms->abcd[0], b = pms->abcd[1],
137
+ c = pms->abcd[2], d = pms->abcd[3];
138
+ md5_word_t t;
139
+ #if BYTE_ORDER > 0
140
+ /* Define storage only for big-endian CPUs. */
141
+ md5_word_t X[16];
142
+ #else
143
+ /* Define storage for little-endian or both types of CPUs. */
144
+ md5_word_t xbuf[16];
145
+ const md5_word_t *X;
146
+ #endif
147
+
148
+ {
149
+ #if BYTE_ORDER == 0
150
+ /*
151
+ * Determine dynamically whether this is a big-endian or
152
+ * little-endian machine, since we can use a more efficient
153
+ * algorithm on the latter.
154
+ */
155
+ static const int w = 1;
156
+
157
+ if (*((const md5_byte_t *)&w)) /* dynamic little-endian */
158
+ #endif
159
+ #if BYTE_ORDER <= 0 /* little-endian */
160
+ {
161
+ /*
162
+ * On little-endian machines, we can process properly aligned
163
+ * data without copying it.
164
+ */
165
+ if (!((ptrdiff_t)data & 3)) {
166
+ /* data are properly aligned */
167
+ X = (const md5_word_t *)data;
168
+ } else {
169
+ /* not aligned */
170
+ memcpy(xbuf, data, 64);
171
+ X = xbuf;
172
+ }
173
+ }
174
+ #endif
175
+ #if BYTE_ORDER == 0
176
+ else /* dynamic big-endian */
177
+ #endif
178
+ #if BYTE_ORDER >= 0 /* big-endian */
179
+ {
180
+ /*
181
+ * On big-endian machines, we must arrange the bytes in the
182
+ * right order.
183
+ */
184
+ const md5_byte_t *xp = data;
185
+ int i;
186
+
187
+ # if BYTE_ORDER == 0
188
+ X = xbuf; /* (dynamic only) */
189
+ # else
190
+ # define xbuf X /* (static only) */
191
+ # endif
192
+ for (i = 0; i < 16; ++i, xp += 4)
193
+ xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
194
+ }
195
+ #endif
196
+ }
197
+
198
+ #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
199
+
200
+ /* Round 1. */
201
+ /* Let [abcd k s i] denote the operation
202
+ a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
203
+ #define F(x, y, z) (((x) & (y)) | (~(x) & (z)))
204
+ #define SET(a, b, c, d, k, s, Ti)\
205
+ t = a + F(b,c,d) + X[k] + Ti;\
206
+ a = ROTATE_LEFT(t, s) + b
207
+ /* Do the following 16 operations. */
208
+ SET(a, b, c, d, 0, 7, T1);
209
+ SET(d, a, b, c, 1, 12, T2);
210
+ SET(c, d, a, b, 2, 17, T3);
211
+ SET(b, c, d, a, 3, 22, T4);
212
+ SET(a, b, c, d, 4, 7, T5);
213
+ SET(d, a, b, c, 5, 12, T6);
214
+ SET(c, d, a, b, 6, 17, T7);
215
+ SET(b, c, d, a, 7, 22, T8);
216
+ SET(a, b, c, d, 8, 7, T9);
217
+ SET(d, a, b, c, 9, 12, T10);
218
+ SET(c, d, a, b, 10, 17, T11);
219
+ SET(b, c, d, a, 11, 22, T12);
220
+ SET(a, b, c, d, 12, 7, T13);
221
+ SET(d, a, b, c, 13, 12, T14);
222
+ SET(c, d, a, b, 14, 17, T15);
223
+ SET(b, c, d, a, 15, 22, T16);
224
+ #undef SET
225
+
226
+ /* Round 2. */
227
+ /* Let [abcd k s i] denote the operation
228
+ a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
229
+ #define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
230
+ #define SET(a, b, c, d, k, s, Ti)\
231
+ t = a + G(b,c,d) + X[k] + Ti;\
232
+ a = ROTATE_LEFT(t, s) + b
233
+ /* Do the following 16 operations. */
234
+ SET(a, b, c, d, 1, 5, T17);
235
+ SET(d, a, b, c, 6, 9, T18);
236
+ SET(c, d, a, b, 11, 14, T19);
237
+ SET(b, c, d, a, 0, 20, T20);
238
+ SET(a, b, c, d, 5, 5, T21);
239
+ SET(d, a, b, c, 10, 9, T22);
240
+ SET(c, d, a, b, 15, 14, T23);
241
+ SET(b, c, d, a, 4, 20, T24);
242
+ SET(a, b, c, d, 9, 5, T25);
243
+ SET(d, a, b, c, 14, 9, T26);
244
+ SET(c, d, a, b, 3, 14, T27);
245
+ SET(b, c, d, a, 8, 20, T28);
246
+ SET(a, b, c, d, 13, 5, T29);
247
+ SET(d, a, b, c, 2, 9, T30);
248
+ SET(c, d, a, b, 7, 14, T31);
249
+ SET(b, c, d, a, 12, 20, T32);
250
+ #undef SET
251
+
252
+ /* Round 3. */
253
+ /* Let [abcd k s t] denote the operation
254
+ a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
255
+ #define H(x, y, z) ((x) ^ (y) ^ (z))
256
+ #define SET(a, b, c, d, k, s, Ti)\
257
+ t = a + H(b,c,d) + X[k] + Ti;\
258
+ a = ROTATE_LEFT(t, s) + b
259
+ /* Do the following 16 operations. */
260
+ SET(a, b, c, d, 5, 4, T33);
261
+ SET(d, a, b, c, 8, 11, T34);
262
+ SET(c, d, a, b, 11, 16, T35);
263
+ SET(b, c, d, a, 14, 23, T36);
264
+ SET(a, b, c, d, 1, 4, T37);
265
+ SET(d, a, b, c, 4, 11, T38);
266
+ SET(c, d, a, b, 7, 16, T39);
267
+ SET(b, c, d, a, 10, 23, T40);
268
+ SET(a, b, c, d, 13, 4, T41);
269
+ SET(d, a, b, c, 0, 11, T42);
270
+ SET(c, d, a, b, 3, 16, T43);
271
+ SET(b, c, d, a, 6, 23, T44);
272
+ SET(a, b, c, d, 9, 4, T45);
273
+ SET(d, a, b, c, 12, 11, T46);
274
+ SET(c, d, a, b, 15, 16, T47);
275
+ SET(b, c, d, a, 2, 23, T48);
276
+ #undef SET
277
+
278
+ /* Round 4. */
279
+ /* Let [abcd k s t] denote the operation
280
+ a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
281
+ #define I(x, y, z) ((y) ^ ((x) | ~(z)))
282
+ #define SET(a, b, c, d, k, s, Ti)\
283
+ t = a + I(b,c,d) + X[k] + Ti;\
284
+ a = ROTATE_LEFT(t, s) + b
285
+ /* Do the following 16 operations. */
286
+ SET(a, b, c, d, 0, 6, T49);
287
+ SET(d, a, b, c, 7, 10, T50);
288
+ SET(c, d, a, b, 14, 15, T51);
289
+ SET(b, c, d, a, 5, 21, T52);
290
+ SET(a, b, c, d, 12, 6, T53);
291
+ SET(d, a, b, c, 3, 10, T54);
292
+ SET(c, d, a, b, 10, 15, T55);
293
+ SET(b, c, d, a, 1, 21, T56);
294
+ SET(a, b, c, d, 8, 6, T57);
295
+ SET(d, a, b, c, 15, 10, T58);
296
+ SET(c, d, a, b, 6, 15, T59);
297
+ SET(b, c, d, a, 13, 21, T60);
298
+ SET(a, b, c, d, 4, 6, T61);
299
+ SET(d, a, b, c, 11, 10, T62);
300
+ SET(c, d, a, b, 2, 15, T63);
301
+ SET(b, c, d, a, 9, 21, T64);
302
+ #undef SET
303
+
304
+ /* Then perform the following additions. (That is increment each
305
+ of the four registers by the value it had before this block
306
+ was started.) */
307
+ pms->abcd[0] += a;
308
+ pms->abcd[1] += b;
309
+ pms->abcd[2] += c;
310
+ pms->abcd[3] += d;
311
+ }
312
+
313
+ void
314
+ md5_init(md5_state_t *pms)
315
+ {
316
+ pms->count[0] = pms->count[1] = 0;
317
+ pms->abcd[0] = 0x67452301;
318
+ pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476;
319
+ pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301;
320
+ pms->abcd[3] = 0x10325476;
321
+ }
322
+
323
+ void
324
+ md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
325
+ {
326
+ const md5_byte_t *p = data;
327
+ int left = nbytes;
328
+ int offset = (pms->count[0] >> 3) & 63;
329
+ md5_word_t nbits = (md5_word_t)(nbytes << 3);
330
+
331
+ if (nbytes <= 0)
332
+ return;
333
+
334
+ /* Update the message length. */
335
+ pms->count[1] += nbytes >> 29;
336
+ pms->count[0] += nbits;
337
+ if (pms->count[0] < nbits)
338
+ pms->count[1]++;
339
+
340
+ /* Process an initial partial block. */
341
+ if (offset) {
342
+ int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
343
+
344
+ memcpy(pms->buf + offset, p, copy);
345
+ if (offset + copy < 64)
346
+ return;
347
+ p += copy;
348
+ left -= copy;
349
+ md5_process(pms, pms->buf);
350
+ }
351
+
352
+ /* Process full blocks. */
353
+ for (; left >= 64; p += 64, left -= 64)
354
+ md5_process(pms, p);
355
+
356
+ /* Process a final partial block. */
357
+ if (left)
358
+ memcpy(pms->buf, p, left);
359
+ }
360
+
361
+ void
362
+ md5_finish(md5_state_t *pms, md5_byte_t digest[16])
363
+ {
364
+ static const md5_byte_t pad[64] = {
365
+ 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
366
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
367
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
368
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
369
+ };
370
+ md5_byte_t data[8];
371
+ int i;
372
+
373
+ /* Save the length before padding. */
374
+ for (i = 0; i < 8; ++i)
375
+ data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
376
+ /* Pad to 56 bytes mod 64. */
377
+ md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
378
+ /* Append the length. */
379
+ md5_append(pms, data, 8);
380
+ for (i = 0; i < 16; ++i)
381
+ digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
382
+ }
@@ -0,0 +1,91 @@
1
+ /*
2
+ Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved.
3
+
4
+ This software is provided 'as-is', without any express or implied
5
+ warranty. In no event will the authors be held liable for any damages
6
+ arising from the use of this software.
7
+
8
+ Permission is granted to anyone to use this software for any purpose,
9
+ including commercial applications, and to alter it and redistribute it
10
+ freely, subject to the following restrictions:
11
+
12
+ 1. The origin of this software must not be misrepresented; you must not
13
+ claim that you wrote the original software. If you use this software
14
+ in a product, an acknowledgment in the product documentation would be
15
+ appreciated but is not required.
16
+ 2. Altered source versions must be plainly marked as such, and must not be
17
+ misrepresented as being the original software.
18
+ 3. This notice may not be removed or altered from any source distribution.
19
+
20
+ L. Peter Deutsch
21
+ ghost@aladdin.com
22
+
23
+ */
24
+ /* $Id: md5.h,v 1.4 2002/04/13 19:20:28 lpd Exp $ */
25
+ /*
26
+ Independent implementation of MD5 (RFC 1321).
27
+
28
+ This code implements the MD5 Algorithm defined in RFC 1321, whose
29
+ text is available at
30
+ http://www.ietf.org/rfc/rfc1321.txt
31
+ The code is derived from the text of the RFC, including the test suite
32
+ (section A.5) but excluding the rest of Appendix A. It does not include
33
+ any code or documentation that is identified in the RFC as being
34
+ copyrighted.
35
+
36
+ The original and principal author of md5.h is L. Peter Deutsch
37
+ <ghost@aladdin.com>. Other authors are noted in the change history
38
+ that follows (in reverse chronological order):
39
+
40
+ 2002-04-13 lpd Removed support for non-ANSI compilers; removed
41
+ references to Ghostscript; clarified derivation from RFC 1321;
42
+ now handles byte order either statically or dynamically.
43
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
44
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
45
+ added conditionalization for C++ compilation from Martin
46
+ Purschke <purschke@bnl.gov>.
47
+ 1999-05-03 lpd Original version.
48
+ */
49
+
50
+ #ifndef md5_INCLUDED
51
+ # define md5_INCLUDED
52
+
53
+ /*
54
+ * This package supports both compile-time and run-time determination of CPU
55
+ * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
56
+ * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
57
+ * defined as non-zero, the code will be compiled to run only on big-endian
58
+ * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
59
+ * run on either big- or little-endian CPUs, but will run slightly less
60
+ * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
61
+ */
62
+
63
+ typedef unsigned char md5_byte_t; /* 8-bit byte */
64
+ typedef unsigned int md5_word_t; /* 32-bit word */
65
+
66
+ /* Define the state of the MD5 Algorithm. */
67
+ typedef struct md5_state_s {
68
+ md5_word_t count[2]; /* message length in bits, lsw first */
69
+ md5_word_t abcd[4]; /* digest buffer */
70
+ md5_byte_t buf[64]; /* accumulate block */
71
+ } md5_state_t;
72
+
73
+ #ifdef __cplusplus
74
+ extern "C"
75
+ {
76
+ #endif
77
+
78
+ /* Initialize the algorithm. */
79
+ void md5_init(md5_state_t *pms);
80
+
81
+ /* Append a string to the message. */
82
+ void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
83
+
84
+ /* Finish the message and return the digest. */
85
+ void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
86
+
87
+ #ifdef __cplusplus
88
+ } /* end extern "C" */
89
+ #endif
90
+
91
+ #endif /* md5_INCLUDED */
@@ -0,0 +1,116 @@
1
+ #ifndef RC_HASH_INTERNAL_H
2
+ #define RC_HASH_INTERNAL_H
3
+
4
+ #include "rc_hash.h"
5
+ #include "md5.h"
6
+
7
+ RC_BEGIN_C_DECLS
8
+
9
+ /* hash.c */
10
+
11
+ void* rc_file_open(const rc_hash_iterator_t* iterator, const char* path);
12
+ void rc_file_seek(const rc_hash_iterator_t* iterator, void* file_handle, int64_t offset, int origin);
13
+ int64_t rc_file_tell(const rc_hash_iterator_t* iterator, void* file_handle);
14
+ size_t rc_file_read(const rc_hash_iterator_t* iterator, void* file_handle, void* buffer, int requested_bytes);
15
+ void rc_file_close(const rc_hash_iterator_t* iterator, void* file_handle);
16
+ int64_t rc_file_size(const rc_hash_iterator_t* iterator, const char* path);
17
+
18
+
19
+ void rc_hash_iterator_verbose(const rc_hash_iterator_t* iterator, const char* message);
20
+ void rc_hash_iterator_verbose_formatted(const rc_hash_iterator_t* iterator, const char* format, ...);
21
+ int rc_hash_iterator_error(const rc_hash_iterator_t* iterator, const char* message);
22
+ int rc_hash_iterator_error_formatted(const rc_hash_iterator_t* iterator, const char* format, ...);
23
+
24
+
25
+ /* arbitrary limit to prevent allocating and hashing large files */
26
+ #define MAX_BUFFER_SIZE 64 * 1024 * 1024
27
+
28
+ void rc_hash_merge_callbacks(rc_hash_iterator_t* iterator, const rc_hash_callbacks_t* callbacks);
29
+ int rc_hash_finalize(const rc_hash_iterator_t* iterator, md5_state_t* md5, char hash[33]);
30
+
31
+ int rc_hash_buffer(char hash[33], const uint8_t* buffer, size_t buffer_size, const rc_hash_iterator_t* iterator);
32
+ void rc_hash_byteswap16(uint8_t* buffer, const uint8_t* stop);
33
+ void rc_hash_byteswap32(uint8_t* buffer, const uint8_t* stop);
34
+
35
+
36
+ const char* rc_path_get_filename(const char* path);
37
+ const char* rc_path_get_extension(const char* path);
38
+ int rc_path_compare_extension(const char* path, const char* ext);
39
+
40
+
41
+ typedef void (RC_CCONV* rc_hash_iterator_ext_handler_t)(rc_hash_iterator_t* iterator, int data);
42
+ typedef struct rc_hash_iterator_ext_handler_entry_t {
43
+ char ext[8];
44
+ rc_hash_iterator_ext_handler_t handler;
45
+ int data;
46
+ } rc_hash_iterator_ext_handler_entry_t;
47
+
48
+ const rc_hash_iterator_ext_handler_entry_t* rc_hash_get_iterator_ext_handlers(size_t* num_handlers);
49
+
50
+
51
+ typedef struct rc_hash_cdrom_track_t {
52
+ void* file_handle; /* the file handle for reading the track data */
53
+ const rc_hash_filereader_t* file_reader; /* functions to perform raw file I/O */
54
+ int64_t file_track_offset;/* the offset of the track data within the file */
55
+ int sector_size; /* the size of each sector in the track data */
56
+ int sector_header_size; /* the offset to the raw data within a sector block */
57
+ int raw_data_size; /* the amount of raw data within a sector block */
58
+ int track_first_sector; /* the first absolute sector associated to the track (includes pregap) */
59
+ int track_pregap_sectors; /* the number of pregap sectors */
60
+ #ifndef NDEBUG
61
+ uint32_t track_id; /* the index of the track */
62
+ #endif
63
+ } rc_hash_cdrom_track_t;
64
+
65
+
66
+ int rc_hash_whole_file(char hash[33], const rc_hash_iterator_t* iterator);
67
+ int rc_hash_buffered_file(char hash[33], uint32_t console_id, const rc_hash_iterator_t* iterator);
68
+
69
+ #ifndef RC_HASH_NO_ROM
70
+ /* hash_rom.c */
71
+ int rc_hash_7800(char hash[33], const rc_hash_iterator_t* iterator);
72
+ int rc_hash_arcade(char hash[33], const rc_hash_iterator_t* iterator);
73
+ int rc_hash_arduboy(char hash[33], const rc_hash_iterator_t* iterator);
74
+ int rc_hash_lynx(char hash[33], const rc_hash_iterator_t* iterator);
75
+ int rc_hash_nes(char hash[33], const rc_hash_iterator_t* iterator);
76
+ int rc_hash_n64(char hash[33], const rc_hash_iterator_t* iterator);
77
+ int rc_hash_nintendo_ds(char hash[33], const rc_hash_iterator_t* iterator);
78
+ int rc_hash_pce(char hash[33], const rc_hash_iterator_t* iterator);
79
+ int rc_hash_scv(char hash[33], const rc_hash_iterator_t* iterator);
80
+ int rc_hash_snes(char hash[33], const rc_hash_iterator_t* iterator);
81
+ #endif
82
+
83
+ #ifndef RC_HASH_NO_DISC
84
+ /* hash_disc.c */
85
+ void rc_hash_reset_iterator_disc(rc_hash_iterator_t* iterator);
86
+
87
+ int rc_hash_3do(char hash[33], const rc_hash_iterator_t* iterator);
88
+ int rc_hash_dreamcast(char hash[33], const rc_hash_iterator_t* iterator);
89
+ int rc_hash_gamecube(char hash[33], const rc_hash_iterator_t* iterator);
90
+ int rc_hash_jaguar_cd(char hash[33], const rc_hash_iterator_t* iterator);
91
+ int rc_hash_neogeo_cd(char hash[33], const rc_hash_iterator_t* iterator);
92
+ int rc_hash_pce_cd(char hash[33], const rc_hash_iterator_t* iterator);
93
+ int rc_hash_pcfx_cd(char hash[33], const rc_hash_iterator_t* iterator);
94
+ int rc_hash_psx(char hash[33], const rc_hash_iterator_t* iterator);
95
+ int rc_hash_ps2(char hash[33], const rc_hash_iterator_t* iterator);
96
+ int rc_hash_psp(char hash[33], const rc_hash_iterator_t* iterator);
97
+ int rc_hash_sega_cd(char hash[33], const rc_hash_iterator_t* iterator);
98
+ int rc_hash_wii(char hash[33], const rc_hash_iterator_t* iterator);
99
+ #endif
100
+
101
+ #ifndef RC_HASH_NO_ENCRYPTED
102
+ /* hash_encrypted.c */
103
+ void rc_hash_reset_iterator_encrypted(rc_hash_iterator_t* iterator);
104
+
105
+ int rc_hash_nintendo_3ds(char hash[33], const rc_hash_iterator_t* iterator);
106
+ #endif
107
+
108
+ #ifndef RC_HASH_NO_ZIP
109
+ /* hash_zip.c */
110
+ int rc_hash_ms_dos(char hash[33], const rc_hash_iterator_t* iterator);
111
+ int rc_hash_arduboyfx(char hash[33], const rc_hash_iterator_t* iterator);
112
+ #endif
113
+
114
+ RC_END_C_DECLS
115
+
116
+ #endif /* RC_HASH_INTERNAL_H */