2 #ifndef dreamcast_modules_H
3 #define dreamcast_modules_H 1
13 * Basic module structure defining the common operations across all
14 * modules, ie start, stop, reset, etc. Nothing here is time-sensitive.
16 typedef struct dreamcast_module {
19 * Perform all initial module setup (ie register / allocate any
20 * memory required, etc). Only called once during DreamOn startup
24 * Reset the module into it's initial system boot state. Will be called
25 * once after init(), as well as whenever the user requests a reset.
29 * Set the module into a running state (may be NULL)
33 * Set the module into a stopped state (may be NULL)
37 * Save the module state to the FILE stream. May be NULL, in which case
38 * the module is considered to have no state.
42 * Load the saved module state from the FILE stream. May be NULL, in which
43 * case reset() will be called instead.
44 * @return 0 on success, nonzero on failure.
47 } *dreamcast_module_t;
49 void dreamcast_register_module( dreamcast_module_t );
51 extern struct dreamcast_module mem_module;
52 extern struct dreamcast_module sh4_module;
53 extern struct dreamcast_module asic_module;
54 extern struct dreamcast_module pvr2_module;
55 extern struct dreamcast_module aica_module;
56 extern struct dreamcast_module ide_module;
57 extern struct dreamcast_module maple_module;
58 extern struct dreamcast_module pvr2_module;
59 extern struct dreamcast_module gui_module;
61 void fwrite_string( char *s, FILE *f );
62 int fread_string( char *s, int maxlen, FILE *f );
68 #endif /* !dreamcast_modules_H */
.