Skip to content

Commit

Permalink
2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
quinton-ashley committed Apr 27, 2024
1 parent 6973f38 commit f8a484b
Show file tree
Hide file tree
Showing 8 changed files with 2,840 additions and 444 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Nostlan can do it all!

_Systems supported: Arcade, DS, 3DS, GBA, N64, PS2, PS3, PSP, SNES, SEGA Mega Drive/Genesis, **Nintendo Switch**, Wii, Wii U, Xbox, and Xbox 360._

_Emulators supported: bsnes, Cemu, Citra, Cxbx-Reloaded, Dolphin, DeSmuME, DS Player, em-fceux, MAME, melonDS, mesen, mupen64plus, mGBA, PCSX2, PPSSPP, RPCS3, Ryujinx, Ryujinx-LDN, snes9x, VBA, webretro, xemu, Xenia, and **Yuzu**._
_Emulators supported: bsnes, Cemu, Citra, Cxbx-Reloaded, Dolphin, DeSmuME, DS Player, em-fceux, MAME, melonDS, mesen, mupen64plus, mGBA, PCSX2, PPSSPP, RPCS3, **Ryujinx**, Ryujinx-LDN, snes9x, VBA, webretro, xemu, Xenia, and Yuzu._

## Exclusive Features

Expand Down Expand Up @@ -62,7 +62,7 @@ _Emulators supported: bsnes, Cemu, Citra, Cxbx-Reloaded, Dolphin, DeSmuME, DS Pl

Click on an image to see it in full quality 4K resolution.

### Switch [Yuzu, Ryujinx]
### Switch [Ryujinx, Yuzu]

<p><a href="https://quinton-ashley.github.io/nostlan-screenshots/switch.png">
<img src="https://quinton-ashley.github.io/nostlan-screenshots/switch_LQ.png">
Expand Down Expand Up @@ -199,6 +199,4 @@ Nostlan is not affiliated with Nintendo, Sony, SEGA, or Microsoft. All trademark

MAME and the MAME Logo are Copyright © 1997-2024 MAMEDev and contributors. MAME® is a registered trademark of Gregory Ember. Use of the MAME name and logo is done so with the expressed written permission from the trademark owner. For more information, please visit <https://www.mamedev.org>.

Nostlan was created by Quinton Ashley Copyright © 2019-2024. The Nostlan logo images are licensed under [Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc-sa/4.0/). The template images found in the [nostlan-img repository](https://github.com/quinton-ashley/nostlan-img) are public domain images under the Public Domain License CC0. The Nostlan software itself is open sourced and licensed under the copyleft [GNU GPLv3 license](https://en.wikipedia.org/wiki/GNU_General_Public_License).

![GNU GPLv3 logo](https://www.gnu.org/graphics/gpl-v3-logo.svg)
Nostlan was created by Quinton Ashley Copyright © 2019-2024. The Nostlan logo images are licensed under [Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc-sa/4.0/). The template images found in the [nostlan-img repository](https://github.com/quinton-ashley/nostlan-img) are public domain images under the Public Domain License CC0. The Nostlan software itself is open sourced and licensed under the [GNU GPLv3 license](https://en.wikipedia.org/wiki/GNU_General_Public_License), which prohibits closed source commercial use.
221 changes: 0 additions & 221 deletions core/configUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ module.exports = async function (defaults) {
systemsDir = systemsDir.replace(/\\/g, '/');
}

if (semver.lt(ver, '1.25.0')) {
// delete old jsEmu app locations
delete cf.iodine;
delete cf['em-fceux'].app;
}

for (let _sys in systems) {
let _syst = systems[_sys];
if (!_syst.emus) continue;
Expand Down Expand Up @@ -62,219 +56,4 @@ module.exports = async function (defaults) {

if (cf.region.length == 1) cf.region = regions[cf.region] || 'USA';
}

if (semver.gt(ver, '1.26.0')) return;

if (mac) cf.cemu.cmd = ['${app}', '-g', '${game}', '-f'];

if (semver.gte(ver, '1.22.1')) return;

delete cf.chip_arch;

if (semver.gte(ver, '1.20.22')) return;

// force update user cf due to command name change
// from d3d12_resolution_scale to draw_resolution_scale
cf.xenia.cmd = emus.xenia.cmd;

if (semver.gte(ver, '1.20.17')) return;

for (let _sys in systems) {
let _syst = systems[_sys];
if (!_syst.emus) continue;
for (let _emu of _syst.emus) {
let props = ['app', 'cmd', 'saves'];
let obj = {};
for (let prop of props) {
obj[prop] = cf[_emu][prop];
}
cf[_emu] = obj;
}
}

if (semver.gte(ver, '1.16.4')) return;

if (linux) {
emus.mame.appDirs.linux = ['~/.mame'];
}

if (semver.gte(ver, '1.13.5')) return;

let controTypes = ['xbox', 'ps', 'nintendo', 'default'];
for (let type of controTypes) {
delete cf.ui.gamepad[type];
}
controTypes = ['xbox_ps', 'nintendo', 'other'];
for (let type of controTypes) {
cf.ui.gamepad[type] = {};
cf.ui.gamepad[type].profile = 'adaptive';
cf.ui.gamepad[type].map = {};
}

if (semver.gte(ver, '1.11.1')) return;

let arcadeImages = `${systemsDir}/arcade/images`;
if (await fs.exists(arcadeImages)) {
await fs.remove(arcadeImages);
}
// rpcs3 changed, before it was preferrable for games
// to be stored in the internal emu fs, now they can be
// stored anywhere. For previous users of Nostlan I chose
// to symlink that dir.
let ps3Games = `${systemsDir}/ps3/games`;
if (await fs.exists(ps3Games)) {
let files = await klaw(ps3Games);
if (!files.length) {
await fs.remove(ps3Games);
try {
await fs.symlink(`${systemsDir}/${sys}/rpcs3/dev_hdd0/game`, ps3Games, 'dir');
} catch (ror) {
er(ror);
}
}
}

// cf version added in v1.8.x
if (semver.gte(ver, '1.8.0')) return;
// if cf file is pre-v1.8.x
// update older versions of the cf file
if (cf.ui.gamepad.mapping) delete cf.ui.gamepad.mapping;
if (cf.ui.recheckImgs) delete cf.ui.recheckImgs;
if (cf.ui.gamepad.profile) {
cf.ui.gamepad.default.profile = cf.ui.gamepad.profile;
delete cf.ui.gamepad.profile;
}
if (cf.ui.gamepad.map) {
cf.ui.gamepad.default.map = cf.ui.gamepad.map;
delete cf.ui.gamepad.map;
}
if (cf['3ds']) cf.n3ds = cf['3ds'];
delete cf['3ds'];
if (cf.ui.maxRows) {
cf.ui.maxColumns = cf.ui.maxRows;
delete cf.ui.maxRows;
}
// move old bottlenose directory
if (cf.btlDir) {
cf.nlaDir = path.join(cf.btlDir, '..') + '/nostlan';
if (await fs.exists(cf.btlDir)) {
await fs.move(cf.btlDir, cf.nlaDir);
}
delete cf.btlDir;
systemsDir = path.join(cf.nlaDir, '..');
}
if (typeof cf.donor == 'boolean') cf.donor = {};
if (cf.saves) {
for (let save of cf.saves) {
if (!save.noSaveOnQuit) save.noSaveOnQuit = false;
}
}
for (let _sys in systems) {
if (cf[_sys]) {
delete cf[_sys].style;
if (cf[_sys].emu) cf[_sys].name = cf[_sys].emu;
delete cf[_sys].emu;
if (_sys == 'arcade') continue;
if (!cf[_sys].name) continue;
let _emu = cf[_sys].name.toLowerCase();
cf[_emu] = cf[_sys];
delete cf[_sys];
}
}

// only keeps the emu app path for the current os
for (let _sys in systems) {
let _syst = systems[_sys];
if (!_syst.emus) continue;
for (let _emu of _syst.emus) {
if (typeof cf[_emu].app == 'string') continue;
if (!cf[_emu].app) continue;
if (cf[_emu].app[osType]) {
cf[_emu].app = cf[_emu].app[osType];
} else {
delete cf[_emu].app;
}
}
for (let _emu of _syst.emus) {
if (cf[_emu].cmd[osType]) {
cf[_emu].cmd = cf[_emu].cmd[osType];
}
}
}

// in v1.8.x the file structure of systemsDir was changed
let errCount = 0;
for (let _sys in systems) {
let _syst = systems[_sys];
if (!_syst.emus) continue;
let _emu = _syst.emus[0];
let moveDirs = [
{
src: `${systemsDir}/${emus[_emu].name}`,
dest: `${systemsDir}/${_sys}`
},
{
src: `${systemsDir}/nostlan/${_sys}`,
dest: `${systemsDir}/${_sys}/images`
},
{
src: `${systemsDir}/${_sys}/BIN`,
dest: `${systemsDir}/${_sys}/${_emu}`
},
{
src: `${systemsDir}/${_sys}/GAMES`, // make lowercase
dest: `${systemsDir}/${_sys}/_games` // temp folder
},
{
src: `${systemsDir}/${_sys}/_games`,
dest: `${systemsDir}/${_sys}/games`
}
];
// remove old game lib files, rescanning must be done
await fs.remove(`${usrDir}/_usr/${_sys}Games.json`);

for (let moveDir of moveDirs) {
let srcExists = await fs.exists(moveDir.src);
let destExists = await fs.exists(moveDir.dest);

if (srcExists && !destExists) {
try {
await fs.move(moveDir.src, moveDir.dest);
} catch (ror) {
er(ror);
errCount++;
break;
}
await fs.remove(moveDir.src);
}
}
delete cf[_emu].libs;
if (cf[_emu].saves) {
delete cf[_emu].saves.dirs;
}
await fs.remove(`${systemsDir}/nostlan/${_sys}`);

if (cf[_emu].app) {
let emuApp = util.absPath(cf[_emu].app);
if (emuApp && !(await fs.exists(emuApp))) {
delete cf[_emu].app;
}
}
}

await this.save();

if (errCount > 0) {
await cui.err(
md(
'failed to automatically move some game library folders ' +
'to conform to the new template structure (introduced in v1.8.x). ' +
'You must change them manually. Read the ' +
'[update log](https://github.com/quinton-ashley/nostlan/wiki/Update-Log-v1.8.x) ' +
" on Nostlan's Github wiki to find out why these changes were made."
),
400,
'quit'
);
}
};
37 changes: 19 additions & 18 deletions core/launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ class Launcher {
this.game = game;
}

if (identify && sys == 'switch') {
emu = 'yuzu';
}

let emuApp = await this.getEmuApp();
if (!emuApp) {
cui.change('emuAppMenu');
Expand Down Expand Up @@ -471,31 +467,36 @@ class Launcher {
new Promise((resolve, reject) => {
let out = '';

let idGame = () => {
if (finished) return;
let m;
if (emu == 'yuzu' && (m = /title_id=(\w{16})/.exec(out))) {
game.tid = m[1];
} else {
return;
}
finished = true;
this.close();
resolve(game);
};
/*
* Since Yuzu will no longer be updated, nostlan should
* not rely on Yuzu to identify nintendo switch games.
*/

// let idGame = () => {
// if (finished) return;
// let m;
// if (emu == 'yuzu' && (m = /title_id=(\w{16})/.exec(out))) {
// game.tid = m[1];
// } else {
// return;
// }
// finished = true;
// this.close();
// resolve(game);
// };

let parseData = (data) => {
if (this.state == 'closing' || finished) return;
out += data.toString();
idGame();
// idGame();
};

this.child.stdout.on('data', parseData);
this.child.stderr.on('data', parseData);

this.child.on('close', (code) => {
this._close(code);
if (!finished) idGame();
// if (!finished) idGame();
if (!finished) reject();
});
}),
Expand Down
7 changes: 0 additions & 7 deletions core/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ class Themes {
};
this.gcn.getWiki = this.wii.getWiki;

// Error 403 website is down
// this.switch.getWiki = (game) => {
// let title = game.title.toLowerCase().replace(/ /g, '-');
// title = title.replace(/:/g, '');
// return `https://yuzu-emu.org/game/${title}/`;
// };

this.n3ds.getWiki = (game) => {
let title = game.title.toLowerCase().replace(/ /g, '-');
title = title.replace(/:/g, '');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,5 @@
"postversion": "git push",
"V": "npm version minor --force"
},
"version": "2.4.3"
"version": "2.5.0"
}
21 changes: 0 additions & 21 deletions sys/switch/emus.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
"name": "Yuzu",
"sys": "switch",
"site": "https://yuzu-emu.org/",
"patreon": "https://www.patreon.com/yuzuteam",
"discord": "https://discord.gg/u77vRWY",
"app": {
"linux": "org.yuzu_emu.yuzu"
},
Expand All @@ -65,25 +63,6 @@
"cmd": {
"linux": ["flatpak", "run", "${app}", "-g", "${game}", "-f"],
"win": ["${app}", "-g", "${game}", "-f"]
},
"install": {
"linux-x64": {
"pkgManager_flatpak": [
["flatpak", "remote-add", "--if-not-exists", "flathub", "https://flathub.org/repo/flathub.flatpakrepo"],
["flatpak", "install", "flathub", "org.yuzu_emu.yuzu"]
]
},
"win-x64": {
"prereqs": [
{
"installer": "https://aka.ms/vs/16/release/vc_redist.x64.exe"
}
],
"installer": "https://github.com/yuzu-emu/liftinstall/releases/download/1.9/yuzu_install.exe"
}
},
"update": {
"win": ["$home/AppData/Local/yuzu/maintenancetool.exe", "--launcher", "${app}"]
}
}
}
Loading

0 comments on commit f8a484b

Please sign in to comment.