|
| 1 | +from util import * |
| 2 | +from emulator import Emulator |
| 3 | +from test import * |
| 4 | + |
| 5 | + |
| 6 | +class GSE(Emulator): |
| 7 | + def __init__(self): |
| 8 | + super().__init__("GSE", "https://github.com/CasualPokePlayer/GSE", startup_time=4.5, features=(PCM,)) |
| 9 | + |
| 10 | + self.title_check = lambda title: "GSE" in title |
| 11 | + |
| 12 | + def setup(self): |
| 13 | + downloadGithubRelease("CasualPokePlayer/GSE", "downloads/GSE.zip", filter=lambda n: "win-x64" in n and n.endswith(".zip")) |
| 14 | + extract("downloads/GSE.zip", "emu/GSE") |
| 15 | + download("https://gbdev.gg8.se/files/roms/bootroms/cgb_boot.bin", "emu/GSE/cgb_boot.bin") |
| 16 | + download("https://gbdev.gg8.se/files/roms/bootroms/dmg_boot.bin", "emu/GSE/dmg_boot.bin") |
| 17 | + download("https://gbdev.gg8.se/files/roms/bootroms/sgb2_boot.bin", "emu/GSE/sgb2_boot.bin") |
| 18 | + setDPIScaling("emu/GSE/GSE.exe") |
| 19 | + |
| 20 | + open("emu/GSE/portable.txt", "w").close() |
| 21 | + |
| 22 | + def startProcess(self, rom, *, model, required_features): |
| 23 | + gb_platform = {DMG: "GB", CGB: "GBC", SGB: "SGB2"}.get(model) |
| 24 | + self.startup_time = 6.0 if model == DMG else 4.0 |
| 25 | + return subprocess.Popen([ |
| 26 | + "emu/GSE/GSE.exe", |
| 27 | + os.path.abspath(rom), |
| 28 | + "--gb-bios", os.path.abspath("emu/GSE/dmg_boot.bin"), |
| 29 | + "--gbc-bios", os.path.abspath("emu/GSE/cgb_boot.bin"), |
| 30 | + "--sgb2-bios", os.path.abspath("emu/GSE/sgb2_boot.bin"), |
| 31 | + "--gb-platform", gb_platform, |
| 32 | + "--apply-color-correction", "false", |
| 33 | + "--hide-sgb-border", "true", |
| 34 | + "--hide-status-bar", "true", |
| 35 | + "--hide-menu-bar-on-unpause", "true", |
| 36 | + "--software-renderer", |
| 37 | + "--window-scale", "1", |
| 38 | + "--disable-win11-round-corners", "true" |
| 39 | + ], cwd="emu/GSE") |
0 commit comments