Skip to content

b2kdaman/pc98

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PC-98 Catalog Launcher

Small Windows launcher for a local PC-98 emulator setup. It scans a user-owned RAR/ZIP catalog, extracts selected games into a local cache, launches Neko Project 21/W, and opens a local GGUF-powered translation overlay.

This repository intentionally does not include emulator binaries, BIOS ROMs, commercial game archives, disk images, extracted media, screenshots, or local play history.

GGUF RAM Warning

Warning: The local translation model is memory-hungry. For GGUF translation, 16 GB RAM is recommended; 8 GB may work poorly or fail depending on runtime settings and what else is running.

Local Layout

Create or keep these folders next to the scripts:

emulator/      Neko Project 21/W files, including np21x64w.exe and np21x64w.ini
games-rard/    Your legally obtained .rar/.zip game catalog
disks/         Local extraction cache and your own disk images
models/        Local GGUF model cache

The root game-launcher.bat is the PC-98 catalog entrypoint. The root universal-launcher.bat attaches the translator to any visible standalone Windows game/app window. Implementation scripts live under scripts/.

Current Emulator Folder Tree

The local emulator/ folder is ignored by git except for .gitkeep. A working local setup currently looks like this:

emulator/
|-- .gitkeep
|-- fdosboot.hdi
|-- font.tmp
|-- np2.chm
|-- np21w.exe
|-- np21w.ini
|-- np21x64w.exe
|-- np21x64w.ini
|-- np2w.exe
|-- np2x64w.exe
|-- readme-starter.txt
|-- language/
|   |-- np2_1252.dll
|   |-- np2_932.dll
|   |-- np2x64_1252.dll
|   |-- np2x64_932.dll
|   `-- readme.txt
|-- LICENSES/
|   |-- LICENSE*.TXT
|   |-- fmgen/
|   |-- mamebsd/
|   `-- softfloat3/
`-- share/
    |-- AUTOEXEC.BAT
    |-- COMMAND.COM
    |-- COUNTRY.SYS
    |-- KERNEL.SYS
    |-- KWC18632.SYS
    |-- KWC8616.SYS
    |-- README.BAT
    |-- READMEJA.HTM
    |-- FDOS/
    |   |-- BIN/
    |   |-- DOC/
    |   |-- HELP/
    |   |-- NLS/
    |   `-- SOURCE/
    |-- NP2TOOLS/
    |   |-- NPCC/
    |   |-- NPCG/
    |   |-- NPCPCI/
    |   `-- NPCS/
    |-- OPT/
    |   |-- BIN/
    |   |-- DOC/
    |   |-- HELP/
    |   `-- SOURCE/
    `-- VZ/
        |-- 30BIOS/
        |-- J31/
        |-- MISC/
        |-- SRC/
        `-- WIN/

Run

Browse and launch games from games-rard/:

.\game-launcher.bat

Controls:

  • Up/Down: move through menus and game lists
  • Left/Right: page through game lists
  • Space: mark/unmark the highlighted game as a favorite
  • Enter: select or launch
  • Esc/Backspace: go back

The catalog launcher:

  • scans .rar and .zip files recursively under games-rard/
  • displays names without the archive suffix
  • stores recent play history and favorites in launcher-state.json
  • extracts selected archives into disks\catalog\
  • mounts detected PC-98 disk images through scripts\run-pc98.ps1
  • starts scripts\translate-screenshot.py --watch

Universal Window Translation

Attach the translation overlay to any visible standalone Windows game or app:

.\universal-launcher.bat

Controls:

  • Up/Down: move through visible windows
  • Left/Right: page through the window list
  • R: refresh the window list
  • Enter: attach the translation watcher to the selected window
  • Esc/Backspace: quit

The universal launcher starts the same local GGUF translation runtime, then runs scripts\translate-screenshot.py --watch --hwnd <window-handle>. Right-click inside the selected target window to translate. The overlay follows the selected window and closes when that window is closed.

Translation Overlay

LM Studio is not required. On game launch, the app checks for llama-server, installs llama.cpp with winget if needed, downloads the Gemma Q4_K_M GGUF model plus its multimodal projection file into models/, starts a local OpenAI-compatible server, and opens the translation overlay.

The first game launch may download about 6.33 GB:

HauhauCS/Gemma-4-E4B-Uncensored-HauhauCS-Aggressive
Gemma-4-E4B-Uncensored-HauhauCS-Aggressive-Q4_K_M.gguf
mmproj-Gemma-4-E4B-Uncensored-HauhauCS-Aggressive-f16.gguf

The overlay attaches below the emulator window. Right-click over the emulator window to translate the current emulator screen. The right-click event is consumed so the emulator does not also receive that click. The translation overlay has its own scrollbar; scrolling the overlay only moves the translated text and does not trigger a new translation.

Screenshots are kept in memory and are not saved to disk.

Optional local LLM settings:

set LOCAL_LLM_BASE_URL=http://127.0.0.1:8080/v1
set LOCAL_LLM_MODEL=local-gemma-gguf
set LOCAL_LLM_SERVER_PATH=C:\path\to\cuda\llama-server.exe
set LOCAL_LLM_MODEL_PATH=C:\path\to\model.gguf
set LOCAL_LLM_MMPROJ_PATH=C:\path\to\mmproj.gguf
set LOCAL_LLM_DEVICE=Vulkan0
set LOCAL_LLM_GPU_LAYERS=all
set LOCAL_LLM_SERVER_ARGS=--ctx-size 4096
python scripts\translate-screenshot.py --watch

By default, the launcher asks llama-server for available devices and starts with GPU offload when one is available. It prefers CUDA devices when the installed binary exposes them, then NVIDIA/Vulkan devices, then the first reported GPU device. If runtimes\llama-cuda\llama-server.exe exists, it is preferred over the winget binary. The winget llama.cpp package may expose Vulkan devices instead of CUDA devices; set LOCAL_LLM_SERVER_PATH to another CUDA-enabled llama-server.exe if you want to override the local runtime. Set LOCAL_LLM_DEVICE=none to force CPU mode.

The launcher binds a managed llama-server only to loopback hosts by default. Set LOCAL_LLM_ALLOW_REMOTE_BIND=1 only if you intentionally want to expose the local LLM API outside this machine. Downloaded GGUF files are checked against pinned SHA256 hashes.

Manual runtime checks:

python scripts\local_llm.py status
python scripts\local_llm.py download --dry-run
python scripts\local_llm.py ensure
python scripts\translate-screenshot.py --once --no-popup --image .\path\to\screenshot.png

The local LLM request uses structured JSON with:

  • sourceLanguage
  • targetLanguage
  • sourceText
  • translatedText
  • style.backgroundColor
  • style.textColor
  • notes

The translation overlay applies the detected text-box colors when the model returns valid #RRGGBB values.

Direct Emulator Launch

Launch the emulator with no image:

.\scripts\run-pc98.ps1

Launch with a hard disk or floppy image:

.\scripts\run-pc98.ps1 .\disks\game.hdi
.\scripts\run-pc98.ps1 .\disks\disk1.d88 .\disks\disk2.d88

If script execution is blocked:

powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\run-pc98.ps1

Supported image extensions include .hdi, .nhd, .hdd, .hdn, .vhd, .d88, .fdi, .hdm, .xdf, .fdd, .2hd, .img, and .ima.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors