[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-76363":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":14,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":17,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":27,"discoverSource":28},76363,"WinCE64","ThroatyMumbo\u002FWinCE64","ThroatyMumbo","Windows CE 2.11 for N64!","",null,"C",152,6,1,2,0,3,56,51.64,"MIT License",false,"main",[],"2026-06-12 04:01:21","# Windows CE 2.11 on the Nintendo 64\n\nStock Microsoft Windows CE 2.11 running on a real Nintendo 64. A custom\nHAL drops the unmodified `nk.lib` kernel onto VR4300, brings up the CE\n2.11 GWES desktop and shell, mounts the EverDrive-64 X7's SD card under\n`\\SDCard`, treats the N64 controller as a mouse, plays sound through the\nN64 AI hardware via the standard CE wave stack, and runs third-party CE\n2.11 EXEs straight off the SD card.\n\nThis is a hobby reverse-engineering project: there is no official CE 2.11\nport to N64 from Microsoft. Everything below the unmodified `nk.lib`\n(HAL, OAL, display driver, FSD, kbd\u002Fmouse PDD, wave PDD, RDP-accelerated\nGDI fill, ed64-X7 driver) is part of this repo.\n\nFeatured in https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=eGS9su_inBY\n\n## Status\n\nBoots fully on real N64 + EverDrive-64 X7. Working:\n\n- Desktop, taskbar, file browser; window drag, close-X, modal dialogs\n- N64 controller drives a visible cursor; A = left click, B = right click\n- `\\SDCard\\*` mounted via FatFS over X7 cartridge SD\n- Wave audio through `sndPlaySoundW` \u002F `waveOutOpen` → N64 AI\n- Third-party CE 2.11 EXEs launchable from the SD card (e.g. `BeziersCE`)\n- RDP-accelerated 3D demo (`cube3d.exe`) rasterising flat-shaded\n  triangles directly through the RDP\n\n## Architecture\n\n![Architecture](docs\u002Farchitecture.png)\n\nThe unmodified `nk.lib` is the trunk: it owns PSL dispatch, scheduling\nand TLB. Around it the standard CE 2.11 user-mode modules\n(`coredll.dll`, `gwes.exe`, `filesys.exe`, `device.exe`, `shell.exe`)\nload unchanged from the ROM image. The custom pieces are:\n\n- **HAL \u002F OAL** (`bsp\u002Fhal\u002F`) — boot, exception vectors, MIPS startup,\n  timer, USB debug, two LE-mode RDRAM partial-word quirk workarounds.\n- **Display driver** (`bsp\u002Fdrivers\u002Fdisplay\u002F`) — VI framebuffer + RDP\n  fill acceleration + a software cursor compositor that fills the gap\n  CE 2.11's split `CURSOR.LIB` \u002F `MCURSOR.LIB` leaves on non-overlay\n  hardware.\n- **Mouse \u002F keyboard PDD** (`bsp\u002Fdrivers\u002Fkbdmouse\u002F`) — SI Joybus poll,\n  decodes both the N64 controller and the official N64 mouse.\n- **SD filesystem** (`bsp\u002Fdrivers\u002Fsdfsd\u002F`) — FatFS-backed FSD that\n  registers under `\\SDCard`. Replaces libdragon's libcart with a\n  PI-DMA-based EverDrive-X7 driver (`edx_x7.c`) to dodge a real-HW\n  cart-bus read-after-write quirk that's invisible in emulation.\n- **Wave PDD** (`bsp\u002Fdrivers\u002Fwavedev\u002F`) — polling-mode AI driver that\n  layers under the stock `waveapi.dll`. Polling instead of interrupts\n  because `MI_INTR_MASK_AI` stalls the SysAD bus on real HW.\n- **`commctrl.dll`** (`bsp\u002Fdrivers\u002Fcommctrl\u002F`) — a tiny `DllMain` that\n  CE 2.11's commctrl.lib forgot to ship, so spinner controls (the\n  `msctls_updown32` class) actually register.\n- **Shell** (`bsp\u002Fshell\u002F`) — Win9x-style desktop, taskbar, file browser.\n- **RDP 3D library** (`bsp\u002Flib\u002Frdp3d\u002F`) — minimal triangle rasteriser\n  for user EXEs; used by `bsp\u002Fapps\u002Fcube3d\u002F`.\n\nFor the long debugging history (cache quirks, TLB walks, GWES bring-up,\nCE-side wave stack idiosyncrasies, etc.) see the source-level comments\nin each driver.\n\n## You will need\n\nThis repo deliberately does **not** ship anything Microsoft- or\nNintendo-proprietary. You have to provide the external trees yourself\nand place them next to this directory (or symlink them in):\n\n| Path                  | What                                                                 | Where                                                                                       |\n| --------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |\n| `wince211_sdk\u002F`       | Microsoft Windows CE 2.11 Platform Builder \u002F Embedded Toolkit        | Long out of print, but can be found online. |\n| `libdragon\u002F`          | N64 homebrew toolchain (`mips64-elf-gcc`, `n64.mk`) + FatFS sources  | https:\u002F\u002Fgithub.com\u002FDragonMinded\u002Flibdragon — clone and run its install script so `$N64_INST` points at the toolchain.                                         |\n| EverDrive-64 X7       | Cart for actual hardware deployment                                  | https:\u002F\u002Fkrikzz.com. Plus a copy of the official EverDrive firmware on the SD card.                                         |\n\nTooling on the host side:\n\n- **Wine** — the SDK's `CLMIPS.EXE` \u002F `LINK.EXE` \u002F `RC.EXE` \u002F `ROMIMAGE.EXE`\n  all run under Wine. Tested on Linux.\n- **Python 3** with **Pillow**\n- **`mips64-elf-gcc`** from libdragon's toolchain (for the bootloader ROM).\n- **libftdi1** if you want to upload over USB to a real X7 — required to\n  build `diag\u002Fed64_upload`.\n\n## Building\n\nAfter placing `wince211_sdk\u002F` and `libdragon\u002F` next to this directory:\n\n```bash\nbash bsp\u002Fbuild.sh\n```\n\nThis compiles the HAL + every driver DLL, runs `LINK.EXE` and\n`ROMIMAGE.EXE` under Wine to produce `bsp\u002Fbuild\u002Fnk.bin` (the stock CE\nROM image), then chains into `bootloader\u002FMakefile` to wrap it in a\nlibdragon IPL3 trampoline. Output: `bootloader\u002Fn64ce.z64` (≈3.5 MB,\nloadable directly by an X7).\n\nA typical clean build runs in ~30s on modern hardware; the dominant\ncost is Wine cold-start, which the build script amortises by keeping a\nsingle `wineserver` alive for the whole run.\n\n## Running\n\n### On real N64 + EverDrive-64 X7\n\nBuild the USB uploader once:\n\n```bash\ncd diag && make ed64_upload\n```\n\nThen upload + boot:\n\n```bash\ndiag\u002Fed64_upload bootloader\u002Fn64ce.z64       # write + boot\ndiag\u002Fed64_upload --listen bootloader\u002Fn64ce.z64   # also stream USB debug\n```\n\n`--listen` keeps the FTDI handle open after the upload so no debug\noutput is dropped.\n\n### Emulation\n\nEarlier development used Ares with a small local patch for the LE-mode\nRDRAM partial-word quirk. However that gradually led to this turning into a\n\"let's improve Ares\" project rather than just testing on real hardware.\nGetting this to work on Ares is a deeper rabbit hole that I'm not interested\nin tackling. Have not tested in any other emulators.\n\n## Repository layout\n\n```\nbsp\u002F             N64 BSP: HAL, OAL, drivers, shell, apps, ROM image\n  hal\u002F             Custom HAL on top of stock nk.lib\n  drivers\u002F         Display, kbd\u002Fmouse, sdfsd (FatFS), wavedev, commctrl\n  lib\u002Frdp3d\u002F       Triangle rasteriser used by user apps\n  apps\u002F            cube3d, paint, notez (linked into the ROM)\n  shell\u002F           Desktop, taskbar, file browser, icons\n  build.sh         The whole build\n  ce.bib           ROMIMAGE build-info file (memory map + module list)\n\nbootloader\u002F      libdragon IPL3 trampoline that loads nk.bin from cart\ndiag\u002F            Bare-metal diagnostic ROMs (LE-mode quirk tests,\n                 audio test, USB uploader, ed64 reboot)\ndocs\u002F            Architecture diagram, HW debugging notes, N64 quirks\n\n(external, not in this repo)\nlibdragon\u002F         → clone of DragonMinded\u002Flibdragon\nwince211_sdk\u002F      → CE 2.11 SDK from the MS Embedded Toolkit\ned64-x-pub\u002F        → krikzz\u002Fed64-x-pub (reference; not built against)\n```\n\n## FAQ\n\n**Why?**\n\nGreat question! I got the idea from the IBM Workpad Z50, which uses a very similar\nMIPS CPU as the N64 (VR4121 vs. the N64's VR4300). There's really no practical reason to run Windows on your N64,\nso this was more of a programming challenge.\n\n**Where do I get the prebuilt ROM?**\n\nYou can't — there isn't one, and I won't be publishing one. Build it\nyourself with `bash bsp\u002Fbuild.sh`. The resulting `n64ce.z64` links in\nMicrosoft's CE 2.11 binaries (`nk.exe`, `coredll.dll`, `gwes.exe`,\n`filesys.exe`, `ddi.dll`'s MGDI \u002F GPE libs, etc.) from the SDK's static\nlibraries; shipping a finished ROM would mean redistributing those,\nwhich I have no license to do. My own source files in this repo are\nMIT — the *output* of the build is not, and never will be.\n\n**Can I just buy a copy of the SDK?**\n\nNo, not for ~20 years. The Microsoft Windows CE 2.11 Platform Builder\n(shipped inside the *Microsoft Embedded Toolkit for Visual C++ 6.0*) was\nlast sold in the very early 2000s and quietly retired around 2004–2005.\nMicrosoft never re-released it, open-sourced it, or replaced it on their\ndownload site. The EULA it originally shipped under was a per-developer\n*development* license: you could build embedded software with it and\nship the resulting binaries inside an embedded device, but you couldn't\nredistribute the SDK itself or its static libraries on their own.\nArchived ISOs of the toolkit circulate online; tracking one down is\nleft as an exercise.\n\n**Will it run in an emulator?**\n\nMaybe? See the \"Running → Emulation\" note above. Real HW is the\ntestbed; I'm not maintaining an emulator path.\n\n**Can I run my own CE 2.11 MIPS EXEs?**\n\nYes. Drop them on the SD card and launch from the file browser.\n[BeziersCE](https:\u002F\u002Fgithub.com\u002FThroatyMumbo\u002FBeziersCE) is confirmed working end-to-end, including its commctrl\nspinner dialog. Apps that need hardware CE doesn't expose on the N64\n(network stack, real keyboard, GAPI, etc.) will fail.\n\n**Why do the icons look weird?**\n\nTwo reasons:\n- The CE 2.11 SDK doesn't include any icons (other than some stray EXE icons)\n- I can't add the classic Win9x icons to this repo for legal reasons\n\nYou can easily swap the ugly icons under `bsp\u002Fshell\u002Ficons` with some more authentic ones and it should work just fine.\n\n**How much of this is custom?**\n\nA lot. The CE 2.11 SDK \u002F Platform Builder gives you the kernel\n(`nk.lib`), `coredll.dll`, `gwes.exe`, `filesys.exe`, `device.exe`,\ncommon controls, MGDI \u002F GPE display abstractions, and the Win32 API\nsurface. What it does **not** ship is the *desktop shell* — no\nExplorer, no taskbar, no Start menu, no Desktop window, no file\nbrowser. OEMs were expected to build their own shell on top of the\nplain GWES window-manager API. Microsoft did sell H\u002FPC Pro devices\nwith a pre-built shell on them, but a reference shell source didn't\nappear in Platform Builder until CE 3.0+ (the IESAMPLE \u002F EXPLORER\nsamples). For 2.11 you're on your own.\n\nSo `bsp\u002Fshell\u002F` — the Win9x-style desktop, taskbar with clock + Start\nbutton, file browser that walks `\\SDCard\\` via `FindFirstFileW`, modal\ndialogs with working commctrl spinners — is all original code written\nagainst the standard CE 2.11 GWES API. Likewise for everything below\nGWES: CE 2.11 ships the *interfaces* and expects the OEM to write the\ndevice-specific driver underneath, so the HAL\u002FOAL, display driver,\nkbd\u002Fmouse PDD, SD FSD, wave PDD, RDP-fill code, ed64-X7 cartridge\ndriver, and the commctrl `DllMain` are all custom for the N64 target.\n\n## License\n\nMIT, see `LICENSE`. The MIT scope is **only** the source files in this\nrepository. The Microsoft Windows CE 2.11 SDK \u002F Platform Builder\nbinaries (which the build links against) carry their own license; you\nmust source them legitimately.\n","该项目实现了在真实的任天堂N64游戏机上运行未修改的Microsoft Windows CE 2.11系统。其核心功能包括通过自定义硬件抽象层（HAL）将`nk.lib`内核部署到VR4300处理器，启动CE 2.11图形用户界面，并支持从SD卡读取和执行第三方应用程序。技术特点涵盖利用N64控制器作为鼠标、通过标准CE波形堆栈播放声音以及直接在RDP上渲染3D图形。适用于对经典游戏机进行逆向工程改造或希望探索嵌入式操作系统移植可能性的技术爱好者。","2026-06-11 03:54:58","CREATED_QUERY"]