Skip to content

Commit

Permalink
feat: update default retroarch-emscripten-build version to v1.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arianrhodsandlot committed Feb 4, 2024
1 parent 424ba1f commit 8e7b989
Show file tree
Hide file tree
Showing 41 changed files with 314 additions and 301 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- update default retroarch-emscripten-build version to v1.17.0

### Fixed
- fix export name when using ESM build of retroarch

## [0.7.0](https://github.com/arianrhodsandlot/nostalgist/compare/v0.6.0...v0.7.0) - 2024-01-28

Expand Down
8 changes: 4 additions & 4 deletions demo/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ async function launchFceummWithCoreConfig() {
})
}

async function launchFceummWithRaEsm() {
async function launchFceummWithRaLegacy() {
nostalgist = await Nostalgist.launch({
core: 'fceumm',
rom: 'flappybird.nes',
resolveCoreJs(core) {
return `https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@nightly-2023-11-06/retroarch/${core}_libretro.js`
return `https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.16.0/retroarch/${core}_libretro.js`
},
resolveCoreWasm(core) {
return `https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@nightly-2023-11-06/retroarch/${core}_libretro.wasm`
return `https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.16.0/retroarch/${core}_libretro.wasm`
},
})
}
Expand Down Expand Up @@ -108,7 +108,7 @@ document.body.addEventListener('click', async function listener({ target }) {
gbc,
launchNestopia,
launchFceummWithCoreConfig,
launchFceummWithRaEsm,
launchFceummWithRaLegacy,
launchCustomRom,
saveState,
loadState,
Expand Down
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h3>static methods</h3>
<button type="button">gbc</button>
<button type="button">launchNestopia</button>
<button type="button">launchFceummWithCoreConfig</button>
<button type="button">launchFceummWithRaEsm</button>
<button type="button">launchFceummWithRaLegacy</button>
<button type="button">launchCustomRom</button>
<h3>instance methods</h3>
<button type="button">saveState</button>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/apis/launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ const nostalgist = await Nostalgist.launch({
If you pass a `string` here, by default, we will lookup the corresponding core at this GitHub repository [retroarch-emscripten-build](https://github.com/arianrhodsandlot/retroarch-emscripten-build), which contains the official build cores from [libretro buildbot](https://buildbot.libretro.com/stable/) , and then the core will be loaded via jsDelivr, a public free CDN that can load files from GitHub with CORS support.

For example, if you pass `snes9x` here, these 2 files will be loaded:
+ [snes9x_libretro.js](https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.16.0/retroarch/snes9x_libretro.js)
+ [snes9x_libretro.wasm](https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.16.0/retroarch/snes9x_libretro.wasm)
+ [snes9x_libretro.js](https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.17.0/retroarch/snes9x_libretro.js)
+ [snes9x_libretro.wasm](https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.17.0/retroarch/snes9x_libretro.wasm)

That's because there is a default `resolveCoreJs` option that can resolve `string`s like `snes9x` to links above. By default, we support these cores from [retroarch-emscripten-build](https://github.com/arianrhodsandlot/retroarch-emscripten-build):
> 2048, arduous, bk, bluemsx, chailove, craft, ecwolf, fbalpha2012_cps1, fbalpha2012_cps2, fbalpha2012, fbalpha2012_neogeo, fceumm, freechaf, galaksija, gambatte, gearboy, gearcoleco, gearsystem, genesis_plus_gx, genesis_plus_gx_wide, gme, gong, gw, handy, jaxe, jumpnbump, lowresnx, lutro, mame2000, mame2003, mame2003_plus, mednafen_lynx, mednafen_ngp, mednafen_pce_fast, mednafen_vb, mednafen_wswan, mgba, minivmac, mrboom, mu, neocd, nestopia, numero, nxengine, o2em, opera, pcsx_rearmed, picodrive, pocketcdg, prboom, quasi88, quicknes, retro8, snes9x2002, snes9x2005, snes9x2010, snes9x, squirreljme, tgbdual, theodore, tic80, tyrquake, uw8, uzem, vaporspec, vba_next, vecx, vice_x128, vice_x64, vice_x64sc, vice_xcbm2, vice_xcbm5x0, vice_xpet, vice_xplus4, vice_xscpu64, vice_xvic, virtualxt, vitaquake2-rogue, vitaquake2-xatrix, vitaquake2-zaero, vitaquake2, wasm4, x1, xrick
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/guides/under-the-hood.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Nostalgist.js itself doesn't contain any emulators, but it has a resonable defau
[retrobrews](https://retrobrews.github.io/) project without additional configuration.

By default, cores will be loaded via [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) from [retroarch-emscripten-build](https://github.com/arianrhodsandlot/retroarch-emscripten-build) through [jsDelivr](https://www.jsdelivr.com). For example, the fceumm core, an NES emulator, will be loaded from these URLs:
+ https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.16.0/retroarch/fceumm_libretro.js
+ https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.16.0/retroarch/fceumm_libretro.wasm
+ https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.17.0/retroarch/fceumm_libretro.js
+ https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.17.0/retroarch/fceumm_libretro.wasm

Games from [retrobrews](https://retrobrews.github.io/) are loaded in a similar way too. And of course you can also load all the nessasary contents by yourself.

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@
},
"devDependencies": {
"@arianrhodsandlot/eslint-config": "0.8.5",
"@astrojs/starlight": "0.17.0",
"@playwright/test": "1.41.1",
"@astrojs/starlight": "0.17.2",
"@playwright/test": "1.41.2",
"@types/emscripten": "1.39.10",
"@types/ini": "4.1.0",
"@types/is-ci": "3.0.4",
"@types/wicg-file-system-access": "2023.10.4",
"astro": "4.2.6",
"astro": "4.3.2",
"browserfs": "1.4.3",
"eslint": "8.56.0",
"happy-dom": "13.3.1",
"happy-dom": "13.3.8",
"ini": "4.1.1",
"is-ci": "3.0.1",
"serve": "14.2.1",
Expand Down
Loading

0 comments on commit 8e7b989

Please sign in to comment.