Skip to content

Commit

Permalink
feat: update default retroarch-emscripten-build version to v1.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
arianrhodsandlot committed Jul 24, 2024
1 parent 610b5ef commit e113f08
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 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.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)
+ [snes9x_libretro.js](https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.19.1/retroarch/snes9x_libretro.js)
+ [snes9x_libretro.wasm](https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.19.1/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 All @@ -91,12 +91,12 @@ const nostalgist = await Nostalgist.launch({
You can also pass an `Object` instead of a `string` to use a loaded a custom url as the core. Here's an example.
```js
await Nostalgist.launch({
rom: 'https://example.com/roms/super metriod.sfc',
core: {
name: 'snes9x',
core: 'https://example.com/cores/snes9x.js',
name: 'snes9x',
wasm: 'https://example.com/cores/snes9x.wasm',
}
},
rom: 'https://example.com/roms/super metriod.sfc'
})
```
The `core.wasm` option can be an `ArrayBuffer` as well.
Expand All @@ -113,8 +113,8 @@ const nostalgist = await Nostalgist.launch({
There is a default `resolveRom` mechanism that can load free ROMs from [retrobrews](https://retrobrews.github.io/), a project hosting lots of free homebrew ROMs. For example,
```js
await Nostalgist.launch({
rom: 'flappybird.nes',
core: 'fceumm'
core: 'fceumm',
rom: 'flappybird.nes'
})
```
This will load `flappybird.nes` from the repository [retrobrews/nes-games](https://github.com/retrobrews/nes-games).
Expand Down Expand Up @@ -244,10 +244,10 @@ const nostalgist = await Nostalgist.launch({
```js
const nostalgist = await Nostalgist.launch({
core: 'fceumm',
rom: 'flappybird.nes',
retroarchCoreConfig: {
fceumm_turbo_enable: 'Both',
},
rom: 'flappybird.nes',
})
```
Expand All @@ -274,12 +274,12 @@ const nostalgist = await Nostalgist.launch({
```js
const nostalgist = await Nostalgist.launch({
core: 'fceumm',
rom: 'flappybird.nes',
emscriptenModule: {
printErr(str) {
yourLogger.error(str)
}
}
},
rom: 'flappybird.nes'
})
```
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.17.0/retroarch/fceumm_libretro.js
+ https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.17.0/retroarch/fceumm_libretro.wasm
+ https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.19.1/retroarch/fceumm_libretro.js
+ https://cdn.jsdelivr.net/gh/arianrhodsandlot/retroarch-emscripten-build@v1.19.1/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
2 changes: 1 addition & 1 deletion src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const defaultRetroarchConfig: RetroArchConfig = {
const cdnBaseUrl = 'https://cdn.jsdelivr.net/gh'

const coreRepo = 'arianrhodsandlot/retroarch-emscripten-build'
const coreVersion = 'v1.17.0'
const coreVersion = 'v1.19.1'
const coreDirectory = 'retroarch'

const shaderRepo = 'libretro/glsl-shaders'
Expand Down

0 comments on commit e113f08

Please sign in to comment.