Core commit. Compile and run on the OpenPandora
[mupen64plus-pandora.git] / source / mupen64plus-core / doc / emuwiki-api-doc / Mupen64Plus_v2.0_Design_Proposal_3.txt
CommitLineData
451ab91e 1[http://mupen64plus.retrouprising.com Project page]
2
3== Primary Goal ==
4
5The primary goal of this re-architecture is to split this large project into smaller projects which may proceed to be developed independently of each other. The advantages of the new architecture are:
6* The build system can be greatly simplified
7* Each module can use its own build system. For example, the Qt GUI might switch to cmake for better Qt integration.
8* Porting the emulator core to other platforms (namely Win32) will be greatly simplified by removing the most platform-specific pieces.
9* Making releases for each package will be simpler and faster
10* Mupen64Plus may be included into the Debian/Ubuntu repositories since glN64 (with its 'unknown' license) will be a separate project
11
12== Topography ==
13
14This re-architecture will force us to lay boundaries with well-defined APIs between different parts of the emulator. Here are some initial suggestions for the new layout of the modules:
15
16# Mupen64plus-core
17#* To simplify porting to other platforms, the core needs to be as lean as possible
18#* For this reason, the GUI interfaces, the ROM cache, and the zip/lzma/7zip decompressors will be removed
19#* The core will contain the code for:
20#** Emulating the R4300 main CPU and memory systems
21#** Loading and configuring plugins
22#** Reading, parsing, and writing all configuration files for the core + plugins
23#** Parsing and returning information about ROM images
24#** Core user interface for keyboard and LIRC input
25#** Savestates and screenshots
26#** An on-screen display
27#** Cheat and debugger core functions
28#** 'Dummy' plugins
29# Mupen64plus-console, Mupen64plus-gtk, Mupen64plus-qt
30#* Command-line only, GTK, and Qt front-end interfaces
31#* Each front-end for the core library will be a separate project
32#* The ROM cache code will be forked and included into both GUIs
33#* The front-ends will be responsible for finding and loading the core library and the plugins
34#* The dynamic library handle of the core will be passed to all the plugins, and the dynamic library handle of the plugins will be passed to the core
35#* The front-ends will be responsible for loading and decompressing the ROM image, and passing a pointer to the core
36# Plugins (RiceVideo, glN64, glide64, Blight Input, JTTL Audio)
37#* The plugins will be spun off into separate projects
38#* The plugin API will change, and will be incompatible with the old Zilmar spec
39
40== Project Owners ==
41Richard42 will retain ownership of the Mupen64plus-core and Mupen64plus-console modules. I will recommend that Slougi take ownership of the Qt GUI. The plugins and GTK GUI are up for grabs.
42
43== Work To Do ==
44Tasks which have been completed will be marked with the <s>strikethrough</s> format.
45
46=== Prior to starting on the code ===
47# <s>Write design document for Core API</s>
48#* Front-end + debugger + cheat
49#* Configuration interface
50#* Video plugin
51#* Audio plugin
52#* Input plugin
53#* RSP plugin
54# <s>Set up new Mercurial repository for project</s>
55=== Coding tasks ===
56# <s>First steps</s>
57#* <s>Split & fork the source files into new structure</s>
58# Core
59#* <s>Refactor/simplify makefiles</s>
60#* <s>Remove #include statements from header files</s>
61#* <s>Write new configuration load/parse/save functionality</s>
62#* <s>Separate event loop out of main.c into new source file</s>
63#* <s>Fix broken WM_KeyDown/WM_KeyUp commands sent to input plugin</s>
64#* <s>Remove main() function</s>
65#* <s>Remove main/winlnxdefs.h</s>
66#* <s>Add new shared library interface (Must be thread-safe and re-entrant where necessary)</s>
67#** <s>api/callbacks.c</s>
68#** <s>api/common.c</s>
69#** <s>api/config.c</s>
70#** <s>api/debugger.c</s>
71#** <s>api/frontend.c</s>
72#** <s>api/vidext.c</s>
73#* <s>Refactor core code for new debug info interface (instead of printf(), send back to front-end)</s>
74#* <s>Modify plugin-handling code to use new plugin API</s>
75#* <s>Fix 64-bit dynamic recompiler for dynamic lib</s>
76#* <s>Update translate.c file handling and translations</s>
77#* <s>Update cheat.c cheat code handling</s>
78#* <s>Remove compare_core.c, add core comparison feature to console-ui</s>
79#* <s>Generate versioned core library</s>
80#* <s>Simplify makefile / pre.mk</s>
81#* <s>Refactor install.sh</s>
82#* Go through google code issue list, apply patches and close issue reports
83# Front-ends
84#* <s>Refactor/simplify makefiles</s>
85## <s>CLI</s>
86##* <s>Write from scratch, based on main.c</s>
87##* Update man page
88## GUI-Qt
89##* Adapt from previous mupen64puls Qt GUI code, pulling code from CLI front-end (Slougi)
90## GUI-GTK
91##* Adapt from previous mupen64puls GTK GUI code, pulling code from CLI front-end (TBD)
92# <s>Plug-ins</s>
93#* For each plug-in:
94#** <s>m64p-rsp-hle</s>
95#** <s>m64p-audio-sdl</s>
96#** <s>m64p-video-rice</s>
97#** <s>m64p-input-sdl</s>
98#* Remove existing configuration read/write code
99#* Add Deadzone and Scaling parameters to Blight Input plugin
100#* Refactor to use new configuration interface through core library
101#* Refactor for changes in core plugin API
102#* Refactor for new debug info interface (instead of printf(), send back to front-end)
103