Development "getting started"? #886
-
Is there any document available in any format (video, text, web page, drawings, storyboards, forum posts?...) that gives an overview of the Stella project internals? Things like: how the emulator is organized, its high-level architecture, dataflows, etc.? I'm attempting to deduce this kind of knowledge "from the bottom up", but so far without much success. Even some hints like: "start with module/class C and follow what happens when methods m1, m2, m3 are called" would be amazingly useful. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
Unfortunately no such documentation exist. All documentation is in the code (sometimes only the code itself). But if you are asking specific questions, I am sure, one of the team member can help you out. There are quit a lot of areas to cover, and a lot of stuff is only fully understood by one of us. |
Beta Was this translation helpful? Give feedback.
-
Once upon a time, I ran some sort of program on the codebase that generated a diagram of the class dependencies, etc. I forget what app I used, but I think I can figure it out by looking through some old docs. I think that alone would be a great help to see how it all works together. IIRC, the app generated method documentation (by inspecting the Javadoc-like commenting we use), and then also generated a basic UML diagram of the inheritance hierarchy. |
Beta Was this translation helpful? Give feedback.
-
Regarding the previous comment, it was always my intent to put this info on the main webpage. However, due to lack of time (as usual), I never got around to doing it. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the prompt answer. Currently, I think my most pressing question is "where is the code that 'drives' the emulation" (if that question even makes sense)? I think I understood the role of most of the classes, but I am still looking for some "loop" that coordinates the entire thing. Maybe there isn't one? Maybe more explicitly: is there a "conductor" that ensures that the emulation takes place in the correct order and timing? |
Beta Was this translation helpful? Give feedback.
-
The loop you are looking for is in The actual emulation runs on a separate thread. If the main thread blocks too long while rendering the current frame it will emulate the next frame while the main thread is still blocking. |
Beta Was this translation helpful? Give feedback.
The loop you are looking for is in
OSystem::mainLoop
andOSystem::dispatchEmulation
. The main loop dispatches theEmulationWorker
to emulate a single frame and then renders it to the screen. After that, it sleeps until the virtual clock has caught up with the real one and then goes on to render the next frame.The actual emulation runs on a separate thread. If the main thread blocks too long while rendering the current frame it will emulate the next frame while the main thread is still blocking.