{"id":43266645,"url":"https://github.com/albertus82/vbesvga-oemsetup","last_synced_at":"2026-02-01T15:11:17.644Z","repository":{"id":295458365,"uuid":"990170928","full_name":"albertus82/vbesvga-oemsetup","owner":"albertus82","description":"oemsetup.inf generator for vbesvga.drv","archived":false,"fork":false,"pushed_at":"2025-09-21T08:26:39.000Z","size":172,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-21T10:18:06.991Z","etag":null,"topics":["gw-basic","qbasic"],"latest_commit_sha":null,"homepage":"","language":"BASIC","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/albertus82.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-05-25T16:39:41.000Z","updated_at":"2025-09-21T08:26:42.000Z","dependencies_parsed_at":"2025-06-10T16:21:20.206Z","dependency_job_id":"f0dc2137-4613-4210-8073-2d143da10eac","html_url":"https://github.com/albertus82/vbesvga-oemsetup","commit_stats":null,"previous_names":["albertus82/vbesvga-oemsetup","albertus82/vbesvga.drv-oemsetup.inf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/albertus82/vbesvga-oemsetup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertus82%2Fvbesvga-oemsetup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertus82%2Fvbesvga-oemsetup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertus82%2Fvbesvga-oemsetup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertus82%2Fvbesvga-oemsetup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/albertus82","download_url":"https://codeload.github.com/albertus82/vbesvga-oemsetup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertus82%2Fvbesvga-oemsetup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28980857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T13:38:33.235Z","status":"ssl_error","status_checked_at":"2026-02-01T13:38:32.912Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gw-basic","qbasic"],"created_at":"2026-02-01T15:11:17.177Z","updated_at":"2026-02-01T15:11:17.632Z","avatar_url":"https://github.com/albertus82.png","language":"BASIC","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oemsetup.inf for vbesvga.drv\n\n`OEMSETUP.INF` generator for [vbesvga.drv](https://github.com/PluMGMK/vbesvga.drv), obviously written in an obsolete programming language so that it can be easily executed from DOS.\n\n### Prerequisites\n\n* Setup Windows 3.1x with the default VGA driver (640x480x16)\n* Make sure you have a BASIC interpreter like **GW-BASIC** or **QBasic**\n* Have your Windows installation disks handy (usually disk 2)\n\n### Usage\n\n1. Place [`OEMSETUP.BAS`](OEMSETUP.BAS) file in the same directory that contains the driver files, including `VIDMODES.COM`\n2. Run one of the following commands depending on the BASIC interpreter you have:\n   #### GW-BASIC\n   ```\n   GWBASIC OEMSETUP\n   ```\n   #### QBASIC\n   ```\n   QBASIC /RUN OEMSETUP\n   ```\n3. Start Windows 3.1x\n4. ***Main*** \u003e ***Windows Setup***\n5. ***Options*** \u003e ***Change system settings...***\n6. ***Display*** \u003e ***Other display (Requires disk from OEM)...***\n7. Provide the path where the driver files are located\n8. Select the desired video mode\n\n### Troubleshooting\n\n#### Out-of-memory error in DOS mode setup\n\nSometimes the generated `OEMSETUP.INF` cannot be used from Windows Setup in DOS mode (`%WINDIR%\\SETUP.EXE`) because it's too large.\n\nIf you're stuck in DOS mode due to video driver issues and cannot change the driver from `%WINDIR%\\SETUP.EXE` due to out-of-memory errors, delete the `%WINDIR%\\SYSTEM\\OEMn.INF` file corresponding to this driver (check inside with `EDIT` or similar beforehand), then launch `%WINDIR%\\SETUP.EXE` again and select **VGA**.\n\n---\n\n# Explanation by Copilot\n\nThis GW-BASIC/QBasic program, OEMSETUP.BAS, is an automatic generator for an OEMSETUP.INF file used to install the PluMGMK VBE SVGA driver in Windows 3.x. It analyzes available video modes and writes the necessary installer entries. Here’s a detailed breakdown:\n\n---\n\n## What does this program do?\n\n- **Purpose:**  \n  It reads video modes supported by your system, filters them for Windows compatibility, and auto-generates a Windows 3.x OEMSETUP.INF installer script for the custom SVGA driver.\n\n---\n\n## Step-by-step explanation\n\n### 1. **Initialize video mode storage**\n```basic\n120 DIM MO(255, 2)  ' Array to store up to 256 video modes: width, height, depth\n```\n\n### 2. **Collect valid video modes**\n```basic\n140 SHELL \"vidmodes \u003e vidmodes.out\"                    ' Runs vidmodes utility, saves output\n150 OPEN \"I\", 1, \"vidmodes.out\"                        ' Opens output for reading\n160 WHILE A$ \u003c\u003e \"Available VBE video modes:\" ... WEND  ' Skips lines until mode list begins\n```\n- **It uses an external utility (vidmodes) to list available video modes and writes them to a file.**\n- **It skips lines until it finds \"Available VBE video modes:\".**\n\n```basic\n200 WHILE NOT EOF(1) AND A$ \u003c\u003e \"\"\n210 LINE INPUT #1, A$\n220 GOSUB 620  ' Parse and store valid video mode\n230 WEND\n```\n- **For each mode line, it calls a parsing subroutine (see below) to extract mode details.**\n\n### 3. **Parsing and filtering video modes**\n```basic\n620 REM Begin of the routine that collects valid video modes\n630 IF LEN(A$) = 0 OR INSTR(A$, \"NG for VBESVGA.DRV\") \u003c\u003e 0 THEN RETURN  ' Skip blanks and unsupported modes\n640 WI% = ... ' Extract width\n650 HE% = ... ' Extract height\n660 IF WI% \u003c 640 OR HE% \u003c 480 THEN RETURN  ' Only keep at least 640x480\n670 DE% = ... ' Extract color depth\n680 IF DE% \u003e 24 THEN DE% = 24  ' Max depth is 24-bit\n690 FOR J = 0 TO I\n700 IF MO(J, 0) = WI% AND MO(J, 1) = HE% AND MO(J, 2) = DE% THEN RETURN  ' No duplicates\n710 NEXT J\n720 I = I + 1\n730 MO(I, 0) = WI% : MO(I, 1) = HE% : MO(I, 2) = DE%\n760 RETURN\n```\n- **Skips blank lines and modes flagged as “no good”.**\n- **Parses width, height, and depth.**\n- **Ignores low-res and duplicate modes.**\n- **Stores valid, unique, Windows-compatible modes.**\n\n### 4. **Generate OEMSETUP.INF**\n```basic\n270 OPEN \"O\", 2, \"oemsetup.inf\"  ' Open output file\n```\n**Writes setup sections:**\n- `[disks]`  \n  Defines driver disks.\n\n- `[display]`  \n  For each video mode and font size (small/large), writes an entry that identifies the display driver and settings.\n\n```basic\n350 FOR J = 0 TO I\n360 FOR FS = 96 TO 120 STEP 24  ' For each font size (96=Small, 120=Large)\n370 K$ = ...                    ' Unique key for mode+font combo\n380 PRINT #2, ...               ' Writes display entry with mode details\n...\n460 NEXT FS, J\n```\n\n- **For each mode and both font sizes, writes a display install line with the right parameters and friendly name.**\n\n- **Settings sections:**  \n  For each mode/font, writes a section with the required `system.ini` settings: width, height, depth, fontsize.\n\n---\n\n## Key features \u0026 details\n\n- **Avoids Duplicates:** Only unique width/height/depth combinations are included.\n- **Mode Filtering:** Only modes with at least 640x480 resolution and up to 24-bit color are kept.\n- **Font Size Handling:** Generates entries for both small (96) and large (120) fonts.\n- **Automation:** Eliminates need for manual INF editing—makes driver installation easier and more reliable.\n\n---\n\n## Example output (simplified)\nThe resulting `oemsetup.inf` will include sections like:\n```\n[disks]\nV=. ,\"PluMGMK VBE SVGA driver path\",diskV\n...\n\n[display]\nvbe0s=V:vbesvga.drv,\"VBE SVGA 640x480x256 Small fonts\",...\nvbe0l=V:vbesvga.drv,\"VBE SVGA 640x480x256 Large fonts\",...\n...\n\n[vbe0s]\n,,system.ini,vbesvga.drv,\"width=\",\"width=640\"\n,,system.ini,vbesvga.drv,\"height=\",\"height=480\"\n...\n```\n---\n\n## Summary\n\n**This is a utility to auto-generate a Windows 3.x installation script for a custom SVGA driver, by scanning available video modes and producing all needed installer entries in OEMSETUP.INF.**  \nIt ensures only valid, non-redundant, and Windows-compatible modes are included, with support for both large and small system font setups.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertus82%2Fvbesvga-oemsetup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbertus82%2Fvbesvga-oemsetup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertus82%2Fvbesvga-oemsetup/lists"}