Wiznet makers

josephsr

Published June 29, 2026 ©

130 UCC

13 WCC

13 VAR

0 Contests

0 Followers

0 Following

Original Link

Windows CE Dreamcast Community Edition with Experimental Ethernet Link Shim

A self-contained Dreamcast Windows CE image that exposes a desktop shell and experiments with BBA/W5500 Ethernet through a custom mppp.dll link adapter.

COMPONENTS Hardware components

Sega Corporation - Sega Dreamcast

x 1


Sega Corporation - Sega Dreamcast Broadband Adapter / BBA

x 1


WIZnet - W5500

x 1

Software Apps and online services

Microsoft / Sega Dreamcast - Windows CE for Dreamcast

x 1


PROJECT DESCRIPTION

Overview

Windows CE Dreamcast Community Edition is a research-oriented rebuild of the Windows CE runtime environment used on Sega Dreamcast discs. Instead of treating Windows CE only as a hidden game runtime, the project turns it into a visible, windowed desktop system with built-in applications, a bootable Dreamcast disc image pipeline, and an experimental Ethernet networking layer. The repository describes the system as a real Windows CE desktop running on Dreamcast hardware and states that it builds into a standard bootable disc.gdi.

The project is not just a visual shell demo. It combines three technical areas: a DCWin desktop shell, a self-contained SH-4 Windows CE build pipeline, and a replacement network link layer that tries to make the stock Windows CE networking components operate over Ethernet instead of the original dial-up-oriented path. The README explicitly notes that the networking path is still in progress and that both Broadband Adapter and W5500/MACRAW backends are not yet working end-to-end.

What the Project Builds

The build output can be seen as three layers.

First, the repository builds SH-4 Windows CE modules such as dcspi.dll, mppp.dll, dcshell.exe, and the DCWin applications. Second, it packages those modules into a Windows CE OS image, 0winceos.bin. Third, it wraps that OS image into a bootable Dreamcast GDI disc image. The documented build targets are all, image, and gdi, where gdi completes the chain from modules to disc.gdi.

This matters because the project removes much of the usual legacy tooling friction. The repository vendors the SH-4 compiler, Windows CE 2.12 SDK files, image tools, OS modules, and kernels. The build documentation states that it does not require an external SDK, C:\wcedreamcast, or setenv.bat; CMake drives the old compiler and image pipeline through explicit custom commands.

System Structure

The repository is organized around clear subsystems.

  • shell/ contains the DCWin desktop shell, graphics compositor, input handling, and client applications.
  • net/netif/ contains the universal mppp.dll replacement link shim for Ethernet-oriented networking.
  • drivers/dcspi/ contains reusable SPI transport code for W5500 access.
  • toolchain/ contains the PowerShell scripts and image-wrapping tools used to generate Dreamcast boot images.
  • vendor/sh-toolchain/ and vendor/wcesdk/ contain the vendored compiler, headers, libraries, image tools, OS modules, and kernels.

Desktop and Application Layer

The desktop layer is called DCWin. It provides a Windows-like shell with a teal desktop, shortcut icons, a taskbar, a Start menu, window movement, resizing, minimizing, maximizing, and process launching. The shell source describes each application as a separate windowed process drawn by the compositor, including Explorer, Calculator, Clock, Task Manager, and Network test tools.

Client applications communicate with the shell through a shared memory section. The dcwlib.c client library maps the shared section, claims one window slot, and marshals draw commands and input events. This design lets each application run as its own CE process while the shell remains responsible for composing their windows into a single desktop frame.

The graphics layer uses Direct3D / PVR2 hardware composition rather than a pure software framebuffer. The compositor uses hardware quads for fills, bevels, icons, and text, then presents the scene through Direct3D and DirectDraw. This is important on Dreamcast because it keeps UI rendering aligned with the console’s tile-based graphics hardware instead of forcing every frame through CPU-side pixel copying.

Networking Layer

The networking concept is the most technically interesting part of the project.

The stock Dreamcast Windows CE networking path expects a dial-up-style PPP module named mppp.dll. This project replaces that module with a universal link adapter. The replacement mppp.dll exposes the expected entry points, but internally selects a physical or emulated link backend. The detection ladder is W5500 first, then Dreamcast Broadband Adapter, then modem, then a null loopback-safe backend.

The link shim handles Ethernet framing, ARP, DHCP, and DNS handoff because the stock microstk stack expects raw IP rather than raw Ethernet frames. Inbound Ethernet frames are parsed by the shim: ARP is handled locally, IPv4 packets are passed into microstk, and DHCP replies configure the interface.

This design is practical because it avoids rewriting the entire CE network stack. Instead, the project inserts a compatibility layer at the old PPP boundary and makes Ethernet look acceptable to the existing Windows CE stack. That is the clever part. The tragic part, because every old platform must demand tribute, is that the shim must also emulate enough RAS behavior for dial-up-era software to believe that a connection exists. The RAS stubs report successful dialing and maintain registry-backed phonebook behavior so older titles do not fail at the “no dialup properties” stage.

WIZnet W5500 Role

The W5500 role in this project is not normal socket-mode TCP/IP offload. The W5500 is used as a raw Ethernet backend through MACRAW mode. The source explicitly states that MACRAW causes the chip to send and receive raw Ethernet frames, while ARP, DHCP, and DNS remain handled by netif.c; it also states that the W5500’s own TCP/IP engine is bypassed.

This distinction is critical. W5500 is normally known as a hardwired TCP/IP Ethernet controller with an integrated TCP/IP stack and SPI host interface. However, this project intentionally avoids the socket-style offload model and uses the chip closer to a raw Ethernet transport. That makes W5500 useful as a physical Ethernet bridge for Dreamcast CE experiments, but it also means the project’s networking complexity moves back into the host-side shim.

TOE Usage

TOE usage: No, not in the usual WIZnet sense.

Although W5500 includes a hardwired TCP/IP stack, this project uses W5500 in MACRAW mode and explicitly bypasses the chip’s own TCP/IP engine. The host-side netif.c code handles ARP, DHCP, DNS configuration, raw Ethernet framing, and IP packet delivery into the Windows CE microstk stack.

So the correct classification is:

  • W5500 present: yes.
  • W5500 used as TCP/IP offload engine: no.
  • W5500 used as raw Ethernet MAC/PHY transport over SPI: yes.
  • TCP/IP stack location: stock Windows CE microstk plus custom link shim, not W5500 socket mode.

Hybrid Network Classification

Hybrid wired/wireless simultaneous networking: No.

The project supports multiple possible link backends, but it does not operate wired and wireless paths simultaneously. The link shim selects one backend through a detection ladder: W5500, BBA, modem, or null fallback. There is no Wi-Fi backend and no concurrent wired/wireless bridge behavior.

A more accurate label is multi-backend Ethernet link shim, not hybrid networking.

Technical Value

The project’s value comes from three points.

First, it makes Dreamcast Windows CE observable and interactive. The desktop shell turns a hidden game runtime into something closer to a usable OS environment. That gives developers a way to inspect processes, files, memory, and basic application behavior directly on the console.

Second, it preserves and automates a difficult legacy build chain. The repository vendors the SH-4 compiler and CE image tools, then wraps them under CMake and PowerShell scripts. For a platform where toolchain setup can be more painful than the actual engineering, this is a meaningful contribution.

Third, it explores a practical way to graft Ethernet onto an old dial-up-centered Windows CE stack. Rather than replacing Winsock or rewriting microstk, it replaces the expected mppp.dll boundary and adapts raw Ethernet into the shape the OS expects.

Design Constraints and Failure Points

The project is tightly coupled to real Dreamcast hardware behavior.

The BBA backend must protect G2 bus access because the G2 bus is shared with AICA sound and DMA activity. The source notes that interleaved G2 access can corrupt or lock the bus on real silicon, so the driver masks interrupts, suspends DMA, drains FIFOs, and keeps locked windows short to avoid starving Maple controller polling.

The W5500 backend also includes hardware-specific safeguards. It is disabled unless explicitly configured through HKLM\Comm\Netif\W5500Bus, because probing SPI paths can disturb the debug console or port pins. The code supports SCI hardware SPI, SCIF bit-bang SPI, and an auto-probe mode that tries SCI before SCIF.

The W5500 initialization path also handles reset timing, PHY auto-negotiation, RX/TX buffer allocation, and MACRAW socket opening. These are not decorative details. If the chip is configured like a normal socket-mode W5500 application, the project’s raw Ethernet path would not work.

Practical Adoption Conditions

This project is best suited for developers interested in:

  • Dreamcast homebrew and Windows CE runtime research
  • legacy OS image generation
  • Ethernet adaptation on constrained or obsolete systems
  • W5500 MACRAW experimentation
  • compatibility-layer design around existing TCP/IP stacks

It is not a ready-made networking product. The repository itself says the Ethernet networking path is still being brought up and is not yet working end-to-end. It should be treated as a technically valuable research project, not a finished networking stack.

Summary

Windows CE Dreamcast Community Edition is a rare kind of project: it is part retro computing, part OS reconstruction, part embedded networking experiment. Its strongest contribution is not simply that it shows a Windows-like desktop on Dreamcast, but that it attempts to make the old CE runtime buildable, bootable, inspectable, and network-capable through a carefully placed link shim.

The W5500 portion is especially notable because it does not use the chip in the common TOE/socket mode. Instead, W5500 is used as a MACRAW Ethernet transport so the project can keep the Windows CE networking model in control. That choice makes the design harder, but also more interesting.


개요

wince-dc는 Sega Dreamcast에서 사용되던 Windows CE 런타임을 다시 꺼내어, 실제로 조작 가능한 데스크톱 환경과 실험적 이더넷 네트워크 계층을 구성하는 프로젝트다. 저장소 설명에 따르면 Dreamcast는 Windows CE 2.12 기반 런타임을 게임 실행용으로 사용했지만, 이 프로젝트는 그 런타임을 창 기반 데스크톱, 기본 앱, 네트워크 테스트 환경, 그리고 부팅 가능한 Dreamcast GDI 이미지로 재구성한다.

핵심은 “Dreamcast에서 Windows CE 화면을 띄웠다”가 아니다. 이 프로젝트는 다음 세 가지를 동시에 다룬다.

  1. DCWin이라는 자체 데스크톱 셸
  2. SH-4 Windows CE 모듈과 OS 이미지를 만드는 자체 포함 빌드 체인
  3. 기존 PPP 중심 Windows CE 네트워크 경로를 Ethernet 백엔드로 우회시키는 mppp.dll 링크 어댑터

이 중 네트워크 부분은 아직 완성품이 아니다. README는 Broadband Adapter와 W5500/MACRAW 백엔드가 아직 end-to-end로 동작하지 않는 상태라고 명시한다.

프로젝트의 한 줄 정의

Dreamcast용 Windows CE 런타임을 부팅 가능한 데스크톱 OS 이미지로 재구성하고, 기존 PPP 기반 네트워크 경계에 이더넷 링크 어댑터를 삽입하는 레트로 콘솔 OS/네트워킹 실험 프로젝트다.

권장 카테고리

레트로 콘솔 네트워킹

보조 분류:

  • 임베디드 OS 포팅
  • 레트로 컴퓨팅
  • Windows CE 런타임 분석
  • W5500 MACRAW 실험
  • Dreamcast Homebrew

시스템 구성

영역역할
shell/DCWin 데스크톱 셸, PVR2/D3D 컴포지터, 기본 앱
net/netif/mppp.dll 대체 링크 어댑터, BBA/W5500 백엔드, ARP/DHCP/DNS 처리
drivers/dcspi/W5500 접근용 SPI 전송 DLL
toolchain/OS 이미지 래핑, GDI 생성, PowerShell 기반 디스크 이미지 도구
vendor/sh-toolchain/SH-4 PE 컴파일러와 CE 헤더
vendor/wcesdk/Windows CE 2.12 SDK, 이미지 도구, OS 모듈, 커널

빌드 흐름

이 프로젝트는 외부 Platform Builder나 별도 Dreamcast SDK 설치에 의존하지 않는다. 저장소 내부에 SH-4 컴파일러, Windows CE SDK, 이미지 도구, OS 모듈, 커널을 포함하고 있으며, CMake는 이 오래된 툴체인을 직접 호출하는 방식으로 동작한다.

빌드 흐름은 다음과 같다.

Source
  ↓
SH-4 CE modules
  - dcspi.dll
  - mppp.dll
  - dcshell.exe
  - dcw* apps
  ↓
Windows CE image
  - NK.bin
  - 0winceos.bin
  ↓
Dreamcast boot disc
  - disc.gdi

cmake --build build는 모듈을 만들고, image 타깃은 0winceos.bin을 만들며, gdi 타깃은 최종 부팅 가능한 disc.gdi까지 만든다.

데스크톱 셸 구조

DCWin 셸은 Dreamcast 위에서 Windows 9x 계열처럼 보이는 데스크톱을 제공한다. 소스 주석 기준으로, 셸은 바탕화면, 바로가기 아이콘, 작업 표시줄, 시작 메뉴를 제공하고 Explorer, Calculator, Clock 같은 앱을 각각 별도 프로세스로 실행한다.

클라이언트 앱은 dcwlib.c를 통해 공유 메모리 섹션에 접근한다. 각 앱은 하나의 윈도우 슬롯을 할당받고, 그 슬롯에 그리기 명령과 입력 이벤트를 주고받는다. 셸은 이 윈도우 슬롯들을 모아 최종 화면으로 합성한다.

그래픽 합성은 단순 소프트웨어 프레임버퍼 복사가 아니라 Dreamcast의 PVR2/Direct3D 경로를 사용한다. dcgfx.c는 UI를 하드웨어 quad로 렌더링하고, 텍스트와 아이콘은 VRAM atlas에 올린 뒤 Direct3D/DirectDraw로 화면에 표시하는 구조를 설명한다.

이 구조의 의미는 분명하다. Dreamcast의 SH-4 CPU로 모든 UI 픽셀을 매 프레임 복사하는 방식이 아니라, 콘솔의 그래픽 하드웨어 특성을 최대한 이용해 데스크톱 UI를 그리려는 시도다.

네트워크 구조

이 프로젝트의 네트워크 구조는 상당히 독특하다. Windows CE 쪽에서는 원래 microstk.exewinsock.dll이 네트워크 기능을 담당하지만, Dreamcast CE 환경에서는 PPP/모뎀 기반 흐름이 기본 전제에 가깝다. 이 프로젝트는 그 지점에서 mppp.dll을 대체한다.

netif.c 주석에 따르면, microstkLoadLibraryW("mppp.dll")InterfaceInitialize를 통해 링크 계층을 붙인다. 이 프로젝트는 그 mppp.dll을 교체하여 W5500, BBA, modem, null backend 중 하나를 선택하는 구조를 만든다.

탐지 순서는 다음과 같다.

W5500
  ↓ 없으면
Dreamcast Broadband Adapter / RTL8139
  ↓ 없으면
Modem
  ↓ 없으면
Null backend / loopback-safe boot

여기서 중요한 점은 null backend다. 링크 장치가 없어도 OS 부팅이 죽지 않도록 네트워크는 down 상태로 두고 루프백 수준에서 stack을 살려둔다. 이런 안전장치가 없으면 microstk가 null interface에서 멈추며 셸 부팅 자체가 망가질 수 있다고 소스 주석은 설명한다.

ARP / DHCP / DNS 처리

이 프로젝트의 링크 어댑터는 단순히 프레임을 전달하는 수준이 아니다. Ethernet 백엔드가 raw Ethernet frame을 주고받기 때문에, netif.c는 ARP 캐시, ARP request/reply, DHCP discover/request/ack, DNS 서버 레지스트리 기록까지 처리한다.

DHCP lease를 받으면 IPInterfaceConfigure를 호출해 microstk에 IP와 netmask를 전달하고, DNS 서버는 HKLM\CommDnsServers 값에 기록한다. DNS 서버 우선순위는 DHCP option 6, Dreamcast flash ISP 설정, 공용 DNS fallback 순서로 구성된다.

이 구조는 “Windows CE의 Winsock은 살리고, 링크 계층만 속인다”에 가깝다. 참 교묘하다. 오래된 OS를 다룰 때는 정면 돌파보다 이런 얌체 같은 접합부 공략이 더 현실적이다.

W5500 적용 방식

이 프로젝트에서 W5500은 MACRAW 모드 기반 raw Ethernet 백엔드로 사용된다. w5500.c는 W5500이 raw Ethernet frame을 송수신하고, ARP/DHCP/DNS는 netif.c에서 그대로 처리된다고 설명한다. 또한 W5500 자체 TCP/IP 엔진은 우회된다고 명시한다.

W5500은 일반적으로 TCP/IP stack, 10/100 Ethernet MAC, PHY를 내장한 hardwired TCP/IP Ethernet controller다. 하지만 이 프로젝트에서는 그 장점을 정석적으로 쓰지 않는다. W5500의 socket API나 TCP/UDP offload를 쓰는 대신, Dreamcast Windows CE의 기존 네트워크 구조에 raw Ethernet transport를 붙이는 쪽을 선택했다.

TOE 적용 여부

TOE 적용 여부: 미적용

정확히 말하면, W5500 칩 자체는 TOE 성격의 hardwired TCP/IP 기능을 갖고 있지만, 이 프로젝트에서는 그 기능을 사용하지 않는다. 소스 주석에서 W5500의 TCP/IP engine이 bypass된다고 직접 설명하고, MACRAW 모드에서 raw Ethernet frame을 주고받는다고 되어 있다.

정리하면 다음과 같다.

항목판단
W5500 사용 여부사용 시도 있음
W5500 TCP/IP Offload 사용아님
W5500 MACRAW 사용맞음
TCP/IP 처리 위치Windows CE microstk + custom mppp.dll shim
ARP/DHCP/DNS 처리host-side netif.c
분류MACRAW 기반 Ethernet link backend

따라서 WIZnet 관점에서 이 프로젝트의 포인트는 “W5500의 socket offload 활용 사례”가 아니라, W5500을 raw Ethernet 링크 장치처럼 사용해 오래된 OS 네트워크 계층에 접합하는 사례다.

Hybrid Network 여부

Hybrid NW 여부: N

여기서 말하는 hybrid가 유선/무선 동시 사용이라면 해당하지 않는다. Wi-Fi 백엔드가 없고, 유선 Ethernet 경로도 동시에 여러 개를 병렬 운용하는 구조가 아니다. netif.c는 W5500, BBA, modem, null 중 하나를 선택하는 detection ladder 구조다.

정확한 표현은 다음이 맞다.

  • Hybrid wired/wireless networking: 아님
  • Multi-backend link selection: 맞음
  • Ethernet bridge: 아님
  • Raw Ethernet adapter shim: 맞음

BBA 백엔드와 실제 하드웨어 대응

Dreamcast Broadband Adapter 쪽은 RTL8139C 기반 BBA를 G2 bus를 통해 다룬다. bba_hw.c는 G2 bus가 AICA 사운드와 DMA 엔진과 공유되기 때문에, 잘못된 PIO burst가 실제 하드웨어에서 bus corruption이나 lock을 유발할 수 있다고 설명한다. 그래서 G2 접근마다 interrupt mask, DMA suspend, FIFO drain이 필요하다.

이 부분은 프로젝트의 질을 판단하는 좋은 근거다. 단순 에뮬레이터 기준으로 코드를 짠 것이 아니라, 실제 Dreamcast silicon에서 발생하는 bus arbitration 문제를 의식하고 있다. 특히 긴 packet copy 동안 IRQ를 너무 오래 막으면 Maple controller polling이 굶어 입력 문제가 생길 수 있기 때문에, 32-byte 단위로 작은 lock window를 유지하는 설계가 들어가 있다.

W5500 백엔드의 현실적 제약

W5500 probe는 기본적으로 꺼져 있다. HKLM\Comm\NetifW5500Bus 값이 설정되어야만 동작한다. 값은 1이면 SCI hardware SPI, 2이면 SCIF bit-bang SPI, 3이면 auto probe다. 코드 주석은 SCIF probe가 debug console을 빼앗을 수 있으므로 SCI를 먼저 시도한다고 설명한다.

초기화에서는 다음 처리가 들어간다.

  • soft reset 후 reset bit clear 대기
  • PHY auto negotiation 강제
  • 모든 socket buffer를 먼저 0으로 초기화
  • socket 0에 RX/TX 16KB 할당
  • socket 0을 MACRAW mode로 open
  • PHY link bit 확인
  • TX free size와 RX received size를 안정적으로 읽기 위한 반복 read 처리

이런 세부 처리는 그냥 “W5500 붙이면 Ethernet 된다” 수준이 아니다. 특히 모든 socket buffer를 먼저 0으로 만든 뒤 socket 0에 16KB를 주는 처리는 MACRAW 단일 소켓 운용에서 중요하다. 기본값을 방치하면 전체 버퍼 요구량이 W5500 내부 메모리보다 커져 overlapping 문제가 생길 수 있다고 주석이 설명한다.

이 프로젝트의 기술적 가치

첫째, Dreamcast Windows CE 런타임을 실제로 관찰 가능한 환경으로 바꾼다. 바탕화면, 시작 메뉴, 작업 관리자, Explorer, Clock, Calculator, Network tester 같은 기본 앱이 들어가므로 단순 부팅 확인을 넘어 OS처럼 다룰 수 있다.

둘째, 레거시 툴체인 복원을 자동화한다. 오래된 SH-4 Windows CE 컴파일러와 이미지 도구를 CMake/PowerShell 흐름으로 묶어 disc.gdi까지 생성한다. 이건 발표에서 충분히 강조할 만하다. 오래된 개발 환경 복원은 보통 개발보다 환경 세팅이 더 고통스럽다. 인류는 늘 같은 돌에 발을 찧고, 이번에는 그 돌 이름이 Platform Builder다.

셋째, 네트워크 적용 방식이 흥미롭다. Windows CE의 winsock.dllmicrostk를 전면 교체하지 않고, mppp.dll 경계에서 Ethernet을 끼워 넣는다. 기존 시스템의 기대 인터페이스는 유지하면서 실제 물리 링크만 바꾸는 방식이다.

넷째, W5500을 socket offload controller가 아니라 MACRAW Ethernet adapter처럼 사용하는 드문 사례다. 일반적인 W5500 큐레이션과 달리 “TCP/IP offload로 쉽게 네트워크 구현”이라는 홍보성 문장으로 설명하면 틀린다. 이 프로젝트의 의미는 오히려 W5500의 하드웨어 TCP/IP 기능을 쓰지 않고 raw frame transport로 제한해 기존 OS stack과 맞물리게 한 점에 있다.

적용 조건

이 프로젝트가 유용한 대상은 다음과 같다.

  • Dreamcast homebrew 개발자
  • Windows CE 2.x 런타임 구조를 분석하려는 개발자
  • 레거시 콘솔용 OS 이미지 생성 흐름에 관심 있는 개발자
  • 오래된 PPP 중심 네트워크 stack에 Ethernet을 접합하려는 개발자
  • W5500 MACRAW 모드와 raw Ethernet 처리에 관심 있는 개발자
  • BBA, G2 bus, SH-4, PVR2 같은 Dreamcast 하드웨어 세부 구조를 다루는 개발자

반대로 다음 목적으로는 부적합하다.

  • 완성된 네트워크 스택을 기대하는 경우
  • W5500 socket API 사용 예제를 찾는 경우
  • 일반 MCU + W5500 TCP/UDP offload 예제를 찾는 경우
  • Wi-Fi/Ethernet hybrid bridge 프로젝트를 찾는 경우
  • 즉시 제품화 가능한 네트워크 솔루션을 찾는 경우

저자 / 저장소 정보

  • GitHub owner: maximqaxd
  • GitHub profile 기준 공개 저장소 수: 37개
  • 주요 pinned repository에는 Dreamcast 관련 xash3d-fwgs_dc, hlsdk-portable_dc, nuquake_enhanced, wince-dc 등이 보인다. 즉, 공개 프로필 기준으로 Dreamcast 포팅과 레트로 콘솔 개발에 관심이 강한 개발자로 볼 수 있다.
  • wince-dc 저장소는 Windows CE Dreamcast Community Edition을 설명하며, 주 언어는 C로 표시된다.
Documents
  • wince-dc

Comments Write