mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 02:46:23 +00:00
neo geo pocket support
This commit is contained in:
parent
56e14790f3
commit
8e4950424e
3 changed files with 29 additions and 3 deletions
|
@ -28,6 +28,7 @@ class EmulatorJS {
|
||||||
'genesis_plus_gx': 'sega',
|
'genesis_plus_gx': 'sega',
|
||||||
'handy': 'lynx',
|
'handy': 'lynx',
|
||||||
'mame2003': 'mame2003',
|
'mame2003': 'mame2003',
|
||||||
|
'mednafen_ngp': 'ngp',
|
||||||
'mednafen_pce': 'pce',
|
'mednafen_pce': 'pce',
|
||||||
'mednafen_psx_hw': 'psx',
|
'mednafen_psx_hw': 'psx',
|
||||||
'melonds': 'nds',
|
'melonds': 'nds',
|
||||||
|
@ -71,7 +72,8 @@ class EmulatorJS {
|
||||||
'psx': 'pcsx_rearmed',
|
'psx': 'pcsx_rearmed',
|
||||||
'3do': 'opera',
|
'3do': 'opera',
|
||||||
'psp': 'ppsspp',
|
'psp': 'ppsspp',
|
||||||
'pce': 'mednafen_pce'
|
'pce': 'mednafen_pce',
|
||||||
|
'ngp': 'mednafen_ngp'
|
||||||
}
|
}
|
||||||
if (this.isSafari && this.isMobile && this.getCore(true) === "n64") {
|
if (this.isSafari && this.isMobile && this.getCore(true) === "n64") {
|
||||||
return "parallel_n64";
|
return "parallel_n64";
|
||||||
|
@ -89,6 +91,7 @@ class EmulatorJS {
|
||||||
'genesis_plus_gx': ['m3u', 'mdx', 'md', 'smd', 'gen', 'bin', 'cue', 'iso', 'chd', 'bms', 'sms', 'gg', 'sg', '68k', 'sgd'],
|
'genesis_plus_gx': ['m3u', 'mdx', 'md', 'smd', 'gen', 'bin', 'cue', 'iso', 'chd', 'bms', 'sms', 'gg', 'sg', '68k', 'sgd'],
|
||||||
'handy': ['lnx'],
|
'handy': ['lnx'],
|
||||||
'mame2003': ['zip'],
|
'mame2003': ['zip'],
|
||||||
|
'mednafen_ngp': ['ngp', 'ngc'],
|
||||||
'mednafen_pce': ['pce', 'cue', 'ccd', 'iso', 'img', 'bin', 'chd'],
|
'mednafen_pce': ['pce', 'cue', 'ccd', 'iso', 'img', 'bin', 'chd'],
|
||||||
'mednafen_psx': ['cue', 'toc', 'm3u', 'ccd', 'exe', 'pbp', 'chd'],
|
'mednafen_psx': ['cue', 'toc', 'm3u', 'ccd', 'exe', 'pbp', 'chd'],
|
||||||
'mednafen_psx_hw': ['cue', 'toc', 'm3u', 'ccd', 'exe', 'pbp', 'chd'],
|
'mednafen_psx_hw': ['cue', 'toc', 'm3u', 'ccd', 'exe', 'pbp', 'chd'],
|
||||||
|
@ -2073,6 +2076,16 @@ class EmulatorJS {
|
||||||
{id: 6, label: this.localization('LEFT')},
|
{id: 6, label: this.localization('LEFT')},
|
||||||
{id: 7, label: this.localization('RIGHT')},
|
{id: 7, label: this.localization('RIGHT')},
|
||||||
];
|
];
|
||||||
|
} else if ('ngp' === this.getControlScheme()) {
|
||||||
|
buttons = [
|
||||||
|
{id: 0, label: this.localization('A')},
|
||||||
|
{id: 8, label: this.localization('B')},
|
||||||
|
{id: 3, label: this.localization('OPTION')},
|
||||||
|
{id: 4, label: this.localization('UP')},
|
||||||
|
{id: 5, label: this.localization('DOWN')},
|
||||||
|
{id: 6, label: this.localization('LEFT')},
|
||||||
|
{id: 7, label: this.localization('RIGHT')},
|
||||||
|
];
|
||||||
} else {
|
} else {
|
||||||
buttons = [
|
buttons = [
|
||||||
{id: 0, label: this.localization('B')},
|
{id: 0, label: this.localization('B')},
|
||||||
|
@ -2797,6 +2810,14 @@ class EmulatorJS {
|
||||||
{"type":"button","text":"Select","id":"select","location":"center","left":-5,"fontSize":15,"block":true,"input_value":2}
|
{"type":"button","text":"Select","id":"select","location":"center","left":-5,"fontSize":15,"block":true,"input_value":2}
|
||||||
];
|
];
|
||||||
info.push(...speedControlButtons);
|
info.push(...speedControlButtons);
|
||||||
|
} else if ('ngp' === this.getControlScheme()) {
|
||||||
|
info = [
|
||||||
|
{"type":"button","text":"A","id":"a","location":"right","right":75,"top":70,"bold":true,"input_value":0},
|
||||||
|
{"type":"button","text":"B","id":"b","location":"right","right":5,"top":50,"bold":true,"input_value":8},
|
||||||
|
{"type":"dpad","location":"left","left":"50%","right":"50%","joystickInput":false,"inputValues":[4,5,6,7]},
|
||||||
|
{"type":"button","text":"Option","id":"option","location":"center","left":30,"fontSize":15,"block":true,"input_value":3}
|
||||||
|
];
|
||||||
|
info.push(...speedControlButtons);
|
||||||
} else {
|
} else {
|
||||||
info = [
|
info = [
|
||||||
{"type":"button","text":"Y","id":"y","location":"right","left":40,"bold":true,"input_value":9},
|
{"type":"button","text":"Y","id":"y","location":"right","left":40,"bold":true,"input_value":9},
|
||||||
|
|
2
data/emulator.min.js
vendored
2
data/emulator.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -108,6 +108,9 @@
|
||||||
if (["pce"].includes(ext))
|
if (["pce"].includes(ext))
|
||||||
return "pce"
|
return "pce"
|
||||||
|
|
||||||
|
if (["ngp", "ngc"].includes(ext))
|
||||||
|
return "ngp"
|
||||||
|
|
||||||
if (["nds", "gba", "gb", "z64", "n64"].includes(ext))
|
if (["nds", "gba", "gb", "z64", "n64"].includes(ext))
|
||||||
return ext
|
return ext
|
||||||
|
|
||||||
|
@ -131,7 +134,8 @@
|
||||||
"Sega Saturn": "segaSaturn",
|
"Sega Saturn": "segaSaturn",
|
||||||
"Atari 7800": "atari7800",
|
"Atari 7800": "atari7800",
|
||||||
"Atari 2600": "atari2600",
|
"Atari 2600": "atari2600",
|
||||||
"NEC TurboGrafx-16/SuperGrafx/PC Engine": "pce"
|
"NEC TurboGrafx-16/SuperGrafx/PC Engine": "pce",
|
||||||
|
"SNK NeoGeo Pocket": "ngp"
|
||||||
}
|
}
|
||||||
|
|
||||||
const button = document.createElement("button")
|
const button = document.createElement("button")
|
||||||
|
@ -172,6 +176,7 @@
|
||||||
window.EJS_core = core;
|
window.EJS_core = core;
|
||||||
window.EJS_pathtodata = "data/";
|
window.EJS_pathtodata = "data/";
|
||||||
window.EJS_startOnLoaded = true;
|
window.EJS_startOnLoaded = true;
|
||||||
|
// window.EJS_disableCue = true;
|
||||||
|
|
||||||
if (window.location.hostname === "demo.emulatorjs.org") {
|
if (window.location.hostname === "demo.emulatorjs.org") {
|
||||||
window.EJS_AdUrl = "https://ads.emulatorjs.org/";
|
window.EJS_AdUrl = "https://ads.emulatorjs.org/";
|
||||||
|
|
Loading…
Reference in a new issue