Skip to content

Commit 1b05785

Browse files
Add GSE to shootout (#90)
* Add GSE to shootout Currently, this is set to just download the currently latest CI build (which contains a CLI) * Switch over to GitHub releases
1 parent f6c8d92 commit 1b05785

4 files changed

Lines changed: 67 additions & 0 deletions

File tree

.github/workflows/ci-all.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ jobs:
8080
needs_chromedriver: false
8181
needs_audio: true
8282
extra_requirements: ''
83+
- emulator: GSE
84+
needs_chromedriver: false
85+
needs_audio: true
86+
extra_requirements: ''
8387
uses: ./.github/workflows/emulator-runner.yml
8488
with:
8589
emulator: ${{ matrix.emulator }}

.github/workflows/ci-gse.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI - GSE
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
run:
11+
uses: ./.github/workflows/emulator-runner.yml
12+
with:
13+
emulator: GSE
14+
needs_audio: true
15+
16+
deploy-pages:
17+
needs: run
18+
uses: ./.github/workflows/deploy-pages.yml

emulators/gse.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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")

main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ def _new_instance(module_name, class_name):
156156
'name': "docboy",
157157
'url': "https://github.com/Docheinstein/docboy",
158158
},
159+
{
160+
'factory': lambda: _new_instance("emulators.gse", "GSE"),
161+
'keywords': ["Game Boy Speedrun Emulator", "GSE", "gse"],
162+
'name': "GSE",
163+
'url': "https://github.com/CasualPokePlayer/GSE",
164+
},
159165
]
160166

161167

0 commit comments

Comments
 (0)