emoemu 0.1.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.
- package/.claude/settings.local.json +77 -0
- package/.node-version +1 -0
- package/CLAUDE.md +435 -0
- package/README.md +404 -0
- package/TODO.md +655 -0
- package/dist/index.cjs +25108 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +25085 -0
- package/docs/building-libretro-cores-arm-mac.md +237 -0
- package/docs/config-file-format.md +488 -0
- package/docs/cores-trd.md +425 -0
- package/docs/headless-hardware-rendering-trd.md +676 -0
- package/docs/libretro-cores-trd.md +997 -0
- package/docs/mupen64-software-rendering-trd.md +751 -0
- package/docs/n64-support-trd.md +306 -0
- package/docs/native-rendering-trd.md +540 -0
- package/docs/native-ui-rendering-trd.md +1195 -0
- package/docs/netplay-trd.md +665 -0
- package/docs/retroarch-netplay-docs.md +277 -0
- package/docs/save-state-format.md +666 -0
- package/eslint.config.js +111 -0
- package/icon/icon.png +0 -0
- package/icon/icon.pxd +0 -0
- package/package.json +63 -0
- package/pnpm-workspace.yaml +10 -0
- package/src/Emulator/consts.ts +14 -0
- package/src/Emulator/index.ts +2496 -0
- package/src/Emulator/saveState/index.ts +155 -0
- package/src/Emulator/screenshot/index.ts +160 -0
- package/src/Emulator/terminalDimensions/index.ts +79 -0
- package/src/Emulator/types.ts +83 -0
- package/src/cli/commands/consts.ts +10 -0
- package/src/cli/commands/index.ts +462 -0
- package/src/cli/parseArgs/consts.ts +17 -0
- package/src/cli/parseArgs/index.ts +457 -0
- package/src/cli/parseArgs/types.ts +61 -0
- package/src/cli/runEmulator/index.ts +406 -0
- package/src/cli/runEmulator/types.ts +7 -0
- package/src/consts.ts +19 -0
- package/src/core/button/consts.ts +35 -0
- package/src/core/button/index.ts +123 -0
- package/src/core/core.ts +300 -0
- package/src/core/index.ts +19 -0
- package/src/cores/libretro/api/index.ts +334 -0
- package/src/cores/libretro/api/types.ts +148 -0
- package/src/cores/libretro/callbacks/consts.ts +41 -0
- package/src/cores/libretro/callbacks/index.ts +456 -0
- package/src/cores/libretro/consts.ts +45 -0
- package/src/cores/libretro/coreOptions/consts.ts +36 -0
- package/src/cores/libretro/coreOptions/index.ts +222 -0
- package/src/cores/libretro/environment/consts.ts +118 -0
- package/src/cores/libretro/environment/index.ts +1095 -0
- package/src/cores/libretro/index.ts +937 -0
- package/src/cores/libretro/loader/index.ts +496 -0
- package/src/cores/libretro/pixelFormat/consts.ts +43 -0
- package/src/cores/libretro/pixelFormat/index.ts +397 -0
- package/src/cores/libretro/types.ts +339 -0
- package/src/frontend/AudioManager/index.ts +420 -0
- package/src/frontend/SettingsManager/index.ts +250 -0
- package/src/frontend/config/index.ts +608 -0
- package/src/frontend/config/tests.ts +354 -0
- package/src/frontend/config/types.ts +36 -0
- package/src/frontend/consts.ts +114 -0
- package/src/frontend/coreBuilder/index.ts +644 -0
- package/src/frontend/coreBuilder/types.ts +15 -0
- package/src/frontend/coreDownloader/index.ts +620 -0
- package/src/frontend/coreDownloader/types.ts +17 -0
- package/src/frontend/corePreferences/index.ts +69 -0
- package/src/frontend/coreRegistry/index.ts +276 -0
- package/src/frontend/directoryCache/index.ts +75 -0
- package/src/frontend/index.ts +79 -0
- package/src/frontend/notifications/consts.ts +14 -0
- package/src/frontend/notifications/index.ts +250 -0
- package/src/frontend/playlist/consts.ts +168 -0
- package/src/frontend/playlist/index.ts +899 -0
- package/src/frontend/playlist/labelFormatter/consts.ts +15 -0
- package/src/frontend/playlist/labelFormatter/index.ts +155 -0
- package/src/frontend/playlist/labelFormatter/tests.ts +153 -0
- package/src/frontend/playlist/reader/index.ts +559 -0
- package/src/frontend/playlist/sync/index.ts +511 -0
- package/src/frontend/playlist/systemLookup/index.ts +233 -0
- package/src/frontend/playlist/utils/index.ts +50 -0
- package/src/frontend/romScanner/consts.ts +348 -0
- package/src/frontend/romScanner/index.ts +1957 -0
- package/src/frontend/saveServices/consts.ts +2 -0
- package/src/frontend/saveServices/index.ts +313 -0
- package/src/frontend/serviceProvider/index.ts +108 -0
- package/src/frontend/serviceProvider/types.ts +13 -0
- package/src/index.ts +428 -0
- package/src/input/Controller/consts.ts +50 -0
- package/src/input/Controller/index.ts +81 -0
- package/src/input/GamepadManager/consts.ts +22 -0
- package/src/input/GamepadManager/index.ts +418 -0
- package/src/input/InputManager/consts.ts +86 -0
- package/src/input/InputManager/index.ts +593 -0
- package/src/input/InputMapper/consts.ts +33 -0
- package/src/input/InputMapper/index.ts +436 -0
- package/src/input/consts.ts +410 -0
- package/src/input/gamepadProfiles/index.ts +1100 -0
- package/src/input/index.ts +38 -0
- package/src/input/inputUtils/index.ts +31 -0
- package/src/netplay/FrameBuffer/consts.ts +2 -0
- package/src/netplay/FrameBuffer/index.ts +364 -0
- package/src/netplay/FrameBuffer/tests.ts +286 -0
- package/src/netplay/InputBuffer/consts.ts +7 -0
- package/src/netplay/InputBuffer/index.ts +347 -0
- package/src/netplay/InputBuffer/tests.ts +166 -0
- package/src/netplay/NetplayClient/index.ts +976 -0
- package/src/netplay/NetplayConnection/index.ts +536 -0
- package/src/netplay/NetplayDiscovery/consts.ts +41 -0
- package/src/netplay/NetplayDiscovery/index.ts +525 -0
- package/src/netplay/NetplayServer/index.ts +1407 -0
- package/src/netplay/SyncManager/index.ts +984 -0
- package/src/netplay/SyncManager/tests.ts +419 -0
- package/src/netplay/consts.ts +371 -0
- package/src/netplay/crc32/consts.ts +14 -0
- package/src/netplay/crc32/index.ts +97 -0
- package/src/netplay/crc32/tests.ts +40 -0
- package/src/netplay/index.ts +41 -0
- package/src/netplay/netplayLogger/consts.ts +30 -0
- package/src/netplay/netplayLogger/index.ts +345 -0
- package/src/netplay/protocol/consts.ts +86 -0
- package/src/netplay/protocol/index.ts +1280 -0
- package/src/netplay/protocol/tests.ts +606 -0
- package/src/netplay/protocol/types.ts +20 -0
- package/src/netplay/types.ts +395 -0
- package/src/rendering/KittyRenderer/index.ts +616 -0
- package/src/rendering/NativeRenderer/index.ts +279 -0
- package/src/rendering/NativeRenderer/tests.ts +133 -0
- package/src/rendering/TerminalRenderer/index.ts +770 -0
- package/src/rendering/consts.ts +401 -0
- package/src/rendering/fonts/CozetteVector.ttf +0 -0
- package/src/rendering/index.ts +26 -0
- package/src/rendering/nativeUi/NativeWindowManager/index.ts +158 -0
- package/src/rendering/nativeUi/NativeWindowManager/tests.ts +81 -0
- package/src/rendering/nativeUi/consts.ts +6 -0
- package/src/rendering/nativeUi/index.ts +20 -0
- package/src/rendering/postProcessing/consts.ts +38 -0
- package/src/rendering/postProcessing/index.ts +923 -0
- package/src/rendering/shared/ansi/consts.ts +12 -0
- package/src/rendering/shared/ansi/index.ts +104 -0
- package/src/rendering/shared/consts.ts +2 -0
- package/src/rendering/shared/fitToTerminal/index.ts +67 -0
- package/src/ui/AddRomsPrompt/consts.ts +13 -0
- package/src/ui/AddRomsPrompt/index.tsx +781 -0
- package/src/ui/App/consts.ts +2 -0
- package/src/ui/App/index.tsx +456 -0
- package/src/ui/AppCapabilities/index.tsx +67 -0
- package/src/ui/ConfigContext/index.tsx +56 -0
- package/src/ui/CoreManager/consts.ts +11 -0
- package/src/ui/CoreManager/index.tsx +779 -0
- package/src/ui/CoreSelector/consts.ts +2 -0
- package/src/ui/CoreSelector/index.tsx +251 -0
- package/src/ui/DialogContainer/index.tsx +42 -0
- package/src/ui/DialogOptionsList/index.tsx +61 -0
- package/src/ui/DuplicateCrcPrompt/consts.ts +5 -0
- package/src/ui/DuplicateCrcPrompt/index.tsx +146 -0
- package/src/ui/GamepadContext/consts.ts +15 -0
- package/src/ui/GamepadContext/index.tsx +295 -0
- package/src/ui/NativeDialog/index.tsx +120 -0
- package/src/ui/NetplayDisconnectedDialog/index.tsx +93 -0
- package/src/ui/NetplayPauseMenu/consts.ts +2 -0
- package/src/ui/NetplayPauseMenu/index.tsx +97 -0
- package/src/ui/RomBrowser/NetplayPanel/consts.ts +24 -0
- package/src/ui/RomBrowser/NetplayPanel/index.tsx +520 -0
- package/src/ui/RomBrowser/SettingsPanel/index.tsx +478 -0
- package/src/ui/RomBrowser/consts.ts +61 -0
- package/src/ui/RomBrowser/index.tsx +1164 -0
- package/src/ui/RomBrowser/settingsConfig/index.ts +320 -0
- package/src/ui/RomBrowser/types.ts +67 -0
- package/src/ui/SaveStateDialog/consts.ts +2 -0
- package/src/ui/SaveStateDialog/index.tsx +225 -0
- package/src/ui/WarningDialog/index.tsx +113 -0
- package/src/ui/consts.ts +27 -0
- package/src/ui/hooks/useClearTerminal/consts.ts +2 -0
- package/src/ui/hooks/useClearTerminal/index.ts +37 -0
- package/src/ui/hooks/useDialogNavigation/index.ts +99 -0
- package/src/ui/hooks/useGamepad/consts.ts +21 -0
- package/src/ui/hooks/useGamepad/index.ts +194 -0
- package/src/ui/index.ts +27 -0
- package/src/utils/buffer/consts.ts +17 -0
- package/src/utils/buffer/index.ts +129 -0
- package/src/utils/color/consts.ts +58 -0
- package/src/utils/color/index.ts +183 -0
- package/src/utils/compression/consts.ts +50 -0
- package/src/utils/compression/index.ts +101 -0
- package/src/utils/consts.ts +2 -0
- package/src/utils/crc32/consts.ts +22 -0
- package/src/utils/crc32/index.ts +83 -0
- package/src/utils/ensureDirectory/index.ts +10 -0
- package/src/utils/format/consts.ts +8 -0
- package/src/utils/format/index.ts +53 -0
- package/src/utils/getErrorMessage/index.ts +10 -0
- package/src/utils/index.ts +113 -0
- package/src/utils/ini/index.ts +200 -0
- package/src/utils/kitty/consts.ts +13 -0
- package/src/utils/kitty/index.ts +181 -0
- package/src/utils/logger/consts.ts +35 -0
- package/src/utils/logger/index.ts +217 -0
- package/src/utils/paths/consts.ts +18 -0
- package/src/utils/paths/index.ts +151 -0
- package/src/utils/png/consts.ts +34 -0
- package/src/utils/png/index.ts +131 -0
- package/src/utils/readJsonFile/index.ts +16 -0
- package/src/utils/rotateLogFile/index.ts +44 -0
- package/src/utils/safeClose/index.ts +10 -0
- package/src/utils/terminal/consts.ts +8 -0
- package/src/utils/terminal/index.ts +102 -0
- package/src/utils/thumbnailRenderer/consts.ts +2 -0
- package/src/utils/thumbnailRenderer/index.ts +147 -0
- package/src/utils/typedError/index.ts +26 -0
- package/tsconfig.json +31 -0
- package/vitest.config.ts +13 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
# Nintendo 64 Support - Technical Requirements Document
|
|
2
|
+
|
|
3
|
+
This document describes the requirements and implementation approach for Nintendo 64 emulation in emoemu using libretro cores with software rendering.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
### Goals
|
|
8
|
+
|
|
9
|
+
1. **Software-Only Rendering**: Use CPU-based rendering that outputs a standard framebuffer compatible with emoemu's terminal renderers
|
|
10
|
+
2. **No GPU Requirements**: Avoid OpenGL/Vulkan dependencies that would require hardware acceleration
|
|
11
|
+
3. **RetroArch Compatibility**: Use existing Mupen64Plus-Next libretro core with appropriate plugin configuration
|
|
12
|
+
4. **Acceptable Performance**: Achieve playable framerates on modern multi-core CPUs
|
|
13
|
+
|
|
14
|
+
### Non-Goals
|
|
15
|
+
|
|
16
|
+
1. High-resolution rendering or graphical enhancements
|
|
17
|
+
2. Hardware-accelerated rendering (ParaLLEl RDP with Vulkan)
|
|
18
|
+
3. Native N64 core implementation (too complex, use libretro instead)
|
|
19
|
+
|
|
20
|
+
### Background: N64 Graphics Architecture
|
|
21
|
+
|
|
22
|
+
The N64's Reality Display Processor (RDP) is notoriously difficult to emulate. Most N64 emulators use one of two approaches:
|
|
23
|
+
|
|
24
|
+
| Approach | Description | GPU Required |
|
|
25
|
+
|----------|-------------|--------------|
|
|
26
|
+
| **HLE (High-Level Emulation)** | Interprets graphics commands and renders via OpenGL/Vulkan | Yes |
|
|
27
|
+
| **LLE (Low-Level Emulation)** | Emulates the RDP at the hardware level | No (software) or Yes (ParaLLEl) |
|
|
28
|
+
|
|
29
|
+
For emoemu, we need LLE with software rendering.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Recommended Core Configuration
|
|
34
|
+
|
|
35
|
+
### Core: Mupen64Plus-Next
|
|
36
|
+
|
|
37
|
+
The `mupen64plus_next_libretro` core supports multiple RDP and RSP plugins. For software-only rendering:
|
|
38
|
+
|
|
39
|
+
| Plugin Type | Recommended | Alternative | Notes |
|
|
40
|
+
|-------------|-------------|-------------|-------|
|
|
41
|
+
| **RDP (Graphics)** | Angrylion | - | Only software option |
|
|
42
|
+
| **RSP (Signal Processor)** | Parallel RSP | Cxd4 | Parallel is faster (dynarec) |
|
|
43
|
+
| **CPU** | New Dynarec | Interpreter | Dynarec for performance |
|
|
44
|
+
|
|
45
|
+
### Core Options
|
|
46
|
+
|
|
47
|
+
These options must be set via `RETRO_ENVIRONMENT_GET_VARIABLE`:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
mupen64plus-rdp-plugin = "angrylion"
|
|
51
|
+
mupen64plus-rsp-plugin = "parallel"
|
|
52
|
+
mupen64plus-cpucore = "dynamic_recompiler"
|
|
53
|
+
mupen64plus-angrylion-multithread = "all threads"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Angrylion RDP
|
|
59
|
+
|
|
60
|
+
### Overview
|
|
61
|
+
|
|
62
|
+
Angrylion is a pixel-accurate, low-level software renderer for the N64's RDP. Key characteristics:
|
|
63
|
+
|
|
64
|
+
- **CPU-only**: No GPU, OpenGL, or Vulkan required
|
|
65
|
+
- **Pixel-perfect**: Produces output identical to real N64 hardware
|
|
66
|
+
- **Multi-threaded**: Angrylion RDP Plus fork uses scan-line interleaving across CPU cores
|
|
67
|
+
- **No enhancements**: Native resolution only (typically 320x240)
|
|
68
|
+
|
|
69
|
+
### Performance Characteristics
|
|
70
|
+
|
|
71
|
+
| Factor | Impact |
|
|
72
|
+
|--------|--------|
|
|
73
|
+
| CPU cores | Linear scaling with Angrylion RDP Plus multi-threading |
|
|
74
|
+
| Clock speed | Significant impact on single-threaded bottlenecks |
|
|
75
|
+
| Resolution | Fixed at native N64 resolution |
|
|
76
|
+
| Game complexity | Some games are more demanding than others |
|
|
77
|
+
|
|
78
|
+
### Accuracy vs Performance Trade-off
|
|
79
|
+
|
|
80
|
+
Angrylion is the most accurate N64 graphics emulation available but at a significant CPU cost. For comparison:
|
|
81
|
+
|
|
82
|
+
| Renderer | Accuracy | Performance | GPU Required |
|
|
83
|
+
|----------|----------|-------------|--------------|
|
|
84
|
+
| GlideN64 (HLE) | Good | Fast | Yes (OpenGL) |
|
|
85
|
+
| ParaLLEl RDP | Pixel-perfect | Fast | Yes (Vulkan) |
|
|
86
|
+
| Angrylion | Pixel-perfect | Slow | No |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## RSP Plugin Selection
|
|
91
|
+
|
|
92
|
+
The Reality Signal Processor handles audio, physics, and some graphics tasks. Two software options:
|
|
93
|
+
|
|
94
|
+
### Parallel RSP (Recommended)
|
|
95
|
+
|
|
96
|
+
- Dynamic recompiler (dynarec)
|
|
97
|
+
- Significantly faster than interpreter
|
|
98
|
+
- Good compatibility
|
|
99
|
+
|
|
100
|
+
### Cxd4
|
|
101
|
+
|
|
102
|
+
- Pure interpreter
|
|
103
|
+
- Slower but potentially more compatible
|
|
104
|
+
- Fallback option if Parallel RSP has issues
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Implementation Requirements
|
|
109
|
+
|
|
110
|
+
### Core Options Support
|
|
111
|
+
|
|
112
|
+
emoemu's libretro wrapper must support setting core options. This requires handling `RETRO_ENVIRONMENT_GET_VARIABLE` in the environment callback:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
// In environment.ts
|
|
116
|
+
case RETRO_ENVIRONMENT.GET_VARIABLE: {
|
|
117
|
+
const variable = parseRetroVariable(data);
|
|
118
|
+
const value = this.coreOptions.get(variable.key);
|
|
119
|
+
if (value) {
|
|
120
|
+
writeStringToPointer(variable.value, value);
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Configuration File
|
|
128
|
+
|
|
129
|
+
Add N64-specific defaults to the config system:
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
// Core options for N64 software rendering
|
|
133
|
+
const N64_SOFTWARE_OPTIONS = {
|
|
134
|
+
'mupen64plus-rdp-plugin': 'angrylion',
|
|
135
|
+
'mupen64plus-rsp-plugin': 'parallel',
|
|
136
|
+
'mupen64plus-cpucore': 'dynamic_recompiler',
|
|
137
|
+
'mupen64plus-angrylion-multithread': 'all threads',
|
|
138
|
+
};
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Resolution Handling
|
|
142
|
+
|
|
143
|
+
N64 games typically output at these resolutions:
|
|
144
|
+
|
|
145
|
+
| Mode | Resolution | Aspect |
|
|
146
|
+
|------|------------|--------|
|
|
147
|
+
| Low-res | 320x240 | 4:3 |
|
|
148
|
+
| High-res | 640x480 | 4:3 |
|
|
149
|
+
| Widescreen hacks | Various | 16:9 |
|
|
150
|
+
|
|
151
|
+
The low native resolution is actually advantageous for terminal rendering, as it produces reasonable output even with Unicode half-blocks or ASCII rendering.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## BIOS Requirements
|
|
156
|
+
|
|
157
|
+
Mupen64Plus-Next does not require BIOS files for most games. However, some features may require:
|
|
158
|
+
|
|
159
|
+
| File | Purpose | Required |
|
|
160
|
+
|------|---------|----------|
|
|
161
|
+
| None | Basic operation | - |
|
|
162
|
+
| 64DD IPL | 64DD disk support | Only for 64DD games |
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Input Mapping
|
|
167
|
+
|
|
168
|
+
The N64 controller has a unique layout that must be mapped to the standard libretro joypad:
|
|
169
|
+
|
|
170
|
+
| N64 Button | Libretro ID | Notes |
|
|
171
|
+
|------------|-------------|-------|
|
|
172
|
+
| A | `RETRO_DEVICE_ID_JOYPAD_A` | |
|
|
173
|
+
| B | `RETRO_DEVICE_ID_JOYPAD_B` | |
|
|
174
|
+
| Z | `RETRO_DEVICE_ID_JOYPAD_L2` | Trigger |
|
|
175
|
+
| Start | `RETRO_DEVICE_ID_JOYPAD_START` | |
|
|
176
|
+
| D-Pad | `RETRO_DEVICE_ID_JOYPAD_UP/DOWN/LEFT/RIGHT` | |
|
|
177
|
+
| L | `RETRO_DEVICE_ID_JOYPAD_L` | Shoulder |
|
|
178
|
+
| R | `RETRO_DEVICE_ID_JOYPAD_R` | Shoulder |
|
|
179
|
+
| C-Up | `RETRO_DEVICE_ID_JOYPAD_X` | Or right analog |
|
|
180
|
+
| C-Down | `RETRO_DEVICE_ID_JOYPAD_Y` | Or right analog |
|
|
181
|
+
| C-Left | `RETRO_DEVICE_ID_JOYPAD_L` | Overloaded |
|
|
182
|
+
| C-Right | `RETRO_DEVICE_ID_JOYPAD_R` | Overloaded |
|
|
183
|
+
| Analog Stick | Analog axes | Requires analog support |
|
|
184
|
+
|
|
185
|
+
### Analog Stick Support
|
|
186
|
+
|
|
187
|
+
The N64 analog stick is critical for most games. This requires extending emoemu's input system to support analog axes via `RETRO_DEVICE_INDEX_ANALOG_*`.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Performance Considerations
|
|
192
|
+
|
|
193
|
+
### CPU Requirements
|
|
194
|
+
|
|
195
|
+
Angrylion is CPU-intensive. Estimated requirements:
|
|
196
|
+
|
|
197
|
+
| Tier | CPU | Expected Performance |
|
|
198
|
+
|------|-----|---------------------|
|
|
199
|
+
| Minimum | 4-core 2.5GHz | 30-40 FPS |
|
|
200
|
+
| Recommended | 6-core 3.5GHz | 50-60 FPS |
|
|
201
|
+
| Optimal | 8+ core 4.0GHz+ | Full speed |
|
|
202
|
+
|
|
203
|
+
### Terminal Rendering Impact
|
|
204
|
+
|
|
205
|
+
Terminal I/O adds overhead on top of emulation. Mitigation strategies:
|
|
206
|
+
|
|
207
|
+
1. **Frame skipping**: Skip terminal output for some frames while running emulation at full speed
|
|
208
|
+
2. **Resolution**: Native N64 resolution (320x240) is small enough for efficient terminal rendering
|
|
209
|
+
3. **Render mode**: Kitty graphics protocol is fastest; ASCII/emoji will be slower
|
|
210
|
+
|
|
211
|
+
### Memory Usage
|
|
212
|
+
|
|
213
|
+
| Component | Estimated Memory |
|
|
214
|
+
|-----------|-----------------|
|
|
215
|
+
| N64 RAM emulation | 4-8 MB |
|
|
216
|
+
| Framebuffer (32-bit) | ~1.2 MB (640x480x4) |
|
|
217
|
+
| Core state | Variable |
|
|
218
|
+
| Audio buffers | ~1 MB |
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Testing Strategy
|
|
223
|
+
|
|
224
|
+
### Test Games
|
|
225
|
+
|
|
226
|
+
Recommended games for testing compatibility and performance:
|
|
227
|
+
|
|
228
|
+
| Game | Why Test |
|
|
229
|
+
|------|----------|
|
|
230
|
+
| Super Mario 64 | Most compatible, good baseline |
|
|
231
|
+
| The Legend of Zelda: Ocarina of Time | Complex graphics, good stress test |
|
|
232
|
+
| GoldenEye 007 | Notorious for emulation issues |
|
|
233
|
+
| Mario Kart 64 | Tests various rendering features |
|
|
234
|
+
| Paper Mario | 2D/3D hybrid rendering |
|
|
235
|
+
|
|
236
|
+
### Validation Criteria
|
|
237
|
+
|
|
238
|
+
1. **Boots successfully**: Game reaches title screen
|
|
239
|
+
2. **Playable**: Responsive input, stable framerate
|
|
240
|
+
3. **Audio**: Sound effects and music play correctly
|
|
241
|
+
4. **Saves**: Battery saves and save states work
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Limitations
|
|
246
|
+
|
|
247
|
+
### Known Issues with Angrylion
|
|
248
|
+
|
|
249
|
+
1. **Performance**: Will not achieve full speed on all systems
|
|
250
|
+
2. **No upscaling**: Locked to native resolution
|
|
251
|
+
3. **No texture filtering**: Raw, unfiltered output (pixel-perfect but chunky)
|
|
252
|
+
|
|
253
|
+
### Games Requiring OpenGL
|
|
254
|
+
|
|
255
|
+
Some N64 games have rendering features that Angrylion handles differently than HLE renderers. Visual differences may occur but should not affect playability.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Implementation Phases
|
|
260
|
+
|
|
261
|
+
### Phase 1: Core Options Support
|
|
262
|
+
|
|
263
|
+
1. Extend environment callback to handle `GET_VARIABLE`/`SET_VARIABLES`
|
|
264
|
+
2. Add configuration for core-specific options
|
|
265
|
+
3. Test with existing libretro cores
|
|
266
|
+
|
|
267
|
+
### Phase 2: N64 Integration
|
|
268
|
+
|
|
269
|
+
1. Add N64 to supported systems list
|
|
270
|
+
2. Configure Mupen64Plus-Next with Angrylion defaults
|
|
271
|
+
3. Test basic game loading and rendering
|
|
272
|
+
|
|
273
|
+
### Phase 3: Input Enhancement
|
|
274
|
+
|
|
275
|
+
1. Add analog stick support to input system
|
|
276
|
+
2. Implement N64-specific button mapping
|
|
277
|
+
3. Test with games requiring analog input
|
|
278
|
+
|
|
279
|
+
### Phase 4: Optimization
|
|
280
|
+
|
|
281
|
+
1. Profile performance bottlenecks
|
|
282
|
+
2. Implement frame skipping if needed
|
|
283
|
+
3. Optimize terminal rendering for N64 resolution
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Resources
|
|
288
|
+
|
|
289
|
+
- [Mupen64Plus-Next - Libretro Docs](https://docs.libretro.com/library/mupen64plus/)
|
|
290
|
+
- [Angrylion RDP Plus - GitHub](https://github.com/ata4/angrylion-rdp-plus)
|
|
291
|
+
- [Mupen64Plus-Next 2.0 Release Notes](https://www.libretro.com/index.php/mupen64plus-next-2-0-64dd-support-angrylion-and-gliden64-in-one-build-parallel-rsp-support-and-android/)
|
|
292
|
+
- [Emulation General Wiki - N64 Plugins](https://emulation.gametechwiki.com/index.php/Recommended_N64_plugins)
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Appendix: Core Option Reference
|
|
297
|
+
|
|
298
|
+
Full list of relevant Mupen64Plus-Next options for software rendering:
|
|
299
|
+
|
|
300
|
+
| Option Key | Values | Default | Description |
|
|
301
|
+
|------------|--------|---------|-------------|
|
|
302
|
+
| `mupen64plus-rdp-plugin` | `gliden64`, `angrylion` | `gliden64` | RDP graphics plugin |
|
|
303
|
+
| `mupen64plus-rsp-plugin` | `hle`, `parallel`, `cxd4` | `hle` | RSP plugin |
|
|
304
|
+
| `mupen64plus-cpucore` | `pure_interpreter`, `cached_interpreter`, `dynamic_recompiler` | `dynamic_recompiler` | CPU emulation mode |
|
|
305
|
+
| `mupen64plus-angrylion-multithread` | `1`, `2`, `4`, `all threads` | `all threads` | Thread count for Angrylion |
|
|
306
|
+
| `mupen64plus-angrylion-overscan` | `disabled`, `enabled` | `disabled` | Show overscan area |
|