{"id":39354565,"url":"https://github.com/hchunhui/tiny386","last_synced_at":"2026-06-14T08:01:10.687Z","repository":{"id":242370535,"uuid":"806067176","full_name":"hchunhui/tiny386","owner":"hchunhui","description":"tiny 386 PC emulator; running win9x on esp32","archived":false,"fork":false,"pushed_at":"2026-04-05T08:42:20.000Z","size":738,"stargazers_count":529,"open_issues_count":11,"forks_count":50,"subscribers_count":14,"default_branch":"master","last_synced_at":"2026-04-05T10:18:55.849Z","etag":null,"topics":["emulator","esp32","x86"],"latest_commit_sha":null,"homepage":"https://hchunhui.github.io/tiny386","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hchunhui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-26T09:30:44.000Z","updated_at":"2026-04-05T08:37:26.000Z","dependencies_parsed_at":"2024-06-15T15:26:27.613Z","dependency_job_id":"c344ace6-d951-4a40-a59b-cc394f7c1ef1","html_url":"https://github.com/hchunhui/tiny386","commit_stats":null,"previous_names":["hchunhui/tiny386"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hchunhui/tiny386","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hchunhui%2Ftiny386","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hchunhui%2Ftiny386/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hchunhui%2Ftiny386/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hchunhui%2Ftiny386/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hchunhui","download_url":"https://codeload.github.com/hchunhui/tiny386/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hchunhui%2Ftiny386/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34313515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emulator","esp32","x86"],"created_at":"2026-01-18T02:35:43.250Z","updated_at":"2026-06-14T08:01:10.681Z","avatar_url":"https://github.com/hchunhui.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tiny386\n\n## Introduction\nTiny386 is an x86 PC emulator written in C99. The highlight of the project is its portability. It now boots Windows 9x/NT on MCU such as ESP32-S3.\n\nThe core of the project is a built-from-scratch, simple and stupid i386 cpu emulator. Some features are missing, e.g. debugging, hardware tasking and some permission checks, but it should be able to run most 16/32 bit software. To boot modern linux kernel and windows, some 486 and 586 instrutions are added. The cpu emulator is kept in ~6K LOC. There is also an optional x87 fpu emulator.\n\nTo assemble a complete PC system, we have ported many peripherals from TinyEMU and QEMU, it now includes:\n - 8259 PIC\n - 8254 PIT\n - 8042 Keyboard Controller\n - CMOS RTC\n - ISA VGA with Bochs VBE\n - IDE Disk Controller\n - NE2000 ISA Network Card\n - 8257 ISA DMA\n - PC Speaker\n - Adlib OPL2 (optional)\n - SoundBlaster 16\n\nFor firmware, the BIOS/VGABIOS comes from seabios. Tiny386 also supports booting linux kernel directly, without traditional BIOS. The idea comes from JSLinux, and it uses a small stub code called linuxstart.\n\n## Demo\nSee [here](https://hchunhui.github.io/tiny386)\n\n## Build\nLinux (with rawdraw): You need to install `libslirp` `libx11` and `libasound2` first, then type `make`.\n\nLinux (with SDL): You need to install `libslirp` `SDL1.2` (or `sdl12-compat`) first, then type `make USE_SDL=y`.\n\nFor other platforms, please refer to `.github/workflows/build.yml`.\n\nPre-built binaries: [here](https://github.com/hchunhui/tiny386/releases)\n\n## Usage\n\n- Prepare an ini file\n```ini\n[pc]\n; set path to BIOS and VGA BIOS\nbios = bios.bin\nvga_bios = vgabios.bin\n\n; set memory size and VGA memory size\nmem_size = 32M\nvga_mem_size = 2M\n\n; fda/fdb for floppy disks (optional)\nfda = floppy.img\n\n; hda/hdb/hdc/hdd for hard disks (optional)\n; cda/cdb/cdc/cdd for CD-ROM disks (optional)\nhda = win95.img\ncdb = win95_cd.iso\n\n; \"fill_cmos\" fixes \"MS-DOS compatibility mode\" in win9x, but it breaks winNT...\nfill_cmos = 1\n\n; force 8-dot mode (640 pixel wide in text mode) if set to 1\nvga_force_8dm = 0\n\n[display]\nwidth = 720\nheight = 480\n\n[cpu]\n; gen = 3/4/5/6, for 386/486/586/686\ngen = 3\n; fpu = 0/1, to disable/enable x87\nfpu = 0\n```\n- Run\n```sh\n./tiny386 config.ini\n./tiny386 -kvm config.ini  # run with KVM (build with `make USE_CPUABS=y`)\n```\n\nFor rawdraw and SDL port:\nPress \"Ctrl + ]\" to grab/ungrab the keyboard and mouse. Press \"Ctrl + [\" to show/hide OSD (On Screen Display). In OSD mode, the floppy/CD-ROM disk can be changed on the fly.\n\n## ESP32 port\nSupported boards:\n\nWith ESP-IDF 5.2.x:\n- JC3248W535 (ESP32-S3, 480x320)\n- [Elecrow CrowPanel Advance 7.0\" HMI](https://github.com/Elecrow-RD/CrowPanel-Advance-HMI-ESP32-AI-Display) (ESP32-S3, 800x480)\n\nWith ESP-IDF 6.0.x (experimental):\n- JC4880P443 (ESP32-P4 Rev1.3 360MHz, 800x480)\n\n### Build and Flash\nYou can find the pre-built flash image `esp/flash_image_JC3248W535.bin` from [here](https://github.com/hchunhui/tiny386/releases).\nThe pre-built image can be flashed directly to offset 0.\n\nOnline flasher for esp chips: https://espressif.github.io/esptool-js\n\nTo build and flash manually:\n```sh\nscripts/build.sh patch_idf  # apply patches to ESP-IDF 5.2.x\n#scripts/build.sh patch_idf_60  # apply patches to ESP-IDF 6.0.x\nmake prepare\ncd esp\nidf.py -DBOARD=jc3248w535 update-dependencies build  # or -DBOARD=elecrow7s3\nidf.py flash\n```\n\n### Configure\nAll files should be put in a SD card with FAT/exFAT file system. The ini file should be `tiny386.ini` and put in the root directory.\nPlease refer to `esp/tiny386.ini`.\n\nAlternative usage: `bios.bin` `vgabios.bin` `vmlinux.bin` and `linuxstart.bin` can be put in corresponding flash partition. Other files can be put in the `storage` flash partition. Please refer to `esp/partition.csv`.\n\n### Keyboard/Mouse Input\n\n- Forward over WIFI\n\n`wifikbd` is used to forward keyboard/mouse events to the dev board over WIFI:\n```\n(ESP32-S3 board: listen on TCP port 9999) \u003c--- WIFI ---\u003e AP \u003c--- WIFI/Wire ---\u003e (PC: ./wifikbd esp_board_addr 9999)\n```\n\n- USB hid (WIP)\n\nSee [here](https://github.com/hchunhui/tiny386/pull/4).\n\n## Troubleshooting\n\n### \"0 bytes of memory\" during Windows 95 setup\nUse \"setup /im\" to bypass memory check.\n\n### \"protection error\" during Windows 95 startup\nUse [patcher9x](https://github.com/JHRobotics/patcher9x).\n\n### NE2000 doesn't work\nManually set the IRQ to 9(or 2).\n\n### freeze during Windows NT4/2000/XP startup\nUse `fill_cmos = 0` in the config ini file.\n\n## License\nThe cpu emulator and the project as a whole are both licensed under the BSD-3-Clause license.\n\nAdlib emulation is an optional part of the project, and it requires the library fmopl which is licensed under the LGPL.\nUse `make USE_FMOPL=n` to build without adlib emulation.\n\nSeaBIOS is distributed under the GNU LGPL-3 license.\n\nSome parts ported from QEMU/TinyEMU are under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhchunhui%2Ftiny386","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhchunhui%2Ftiny386","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhchunhui%2Ftiny386/lists"}