Created
March 6, 2019 15:05
-
-
Save lpproj/323cb5121252f345e4a860321718ebef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/raspberrypi/rascsi.cpp b/src/raspberrypi/rascsi.cpp | |
--- a/src/raspberrypi/rascsi.cpp | |
+++ b/src/raspberrypi/rascsi.cpp | |
@@ -887,6 +887,19 @@ int main(int argc, char* argv[]) | |
// セレクション信号が無ければ無視 | |
bus->Aquire(); | |
+#if defined(USE_SEL_EVENT_ENABLE) | |
+ if (bus->GetSEL() && !bus->GetIO() && bus->GetBSY()) { | |
+ // アービトレーションフェーズ→セレクションフェーズへの入りかけ(?) | |
+ // BSYがまだアサートされている場合は0になるまで待つ | |
+ // (何かタイムアウト処理が必要かも…) | |
+ do { | |
+# if !defined(BAREMETAL) | |
+ usleep(0); | |
+# endif // !BAREMETAL | |
+ bus->Aquire(); | |
+ } while(bus->GetSEL() && !bus->GetIO() && bus->GetBSY()); | |
+ } | |
+#endif | |
if (!bus->GetSEL() || bus->GetBSY()) { | |
#if !defined(USE_SEL_EVENT_ENABLE) && !defined(BAREMETAL) | |
usleep(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment