From 1d2cde5915f27a0dd1a8f97f1a8fd1e4b5f77ffd Mon Sep 17 00:00:00 2001 From: Michael Green <84688932+michael-j-green@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:50:43 +1100 Subject: [PATCH] Add VICE cores for C64, C128, VIC20, Plus/4, and PET (#758) * Add VICE cores for C64, C128, VIC20, Plus/4, and PET * Added core options to emulator.js file * Removed extra space * Disable cue creation for new VICE cores * Cores are now sorted at run time * Debug mode can now be enabled by appending ?debug=1 to the URL --- .gitignore | 1 + data/emulator.js | 21 +++++++++++++++++---- index.html | 31 ++++++++++++++++++++++++++++--- 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 8cae234..435a7c3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ yarn.lock roms/ data/emulator.min.js data/emulator.min.css +data/cores diff --git a/data/emulator.js b/data/emulator.js index c8dfe07..0834e87 100644 --- a/data/emulator.js +++ b/data/emulator.js @@ -1,5 +1,5 @@ class EmulatorJS { - version = 11; //Increase by 1 when cores are updated + version = 12; //Increase by 1 when cores are updated getCore(generic) { const core = this.config.system; /*todo: @@ -48,7 +48,11 @@ class EmulatorJS { 'virtualjaguar': 'jaguar', 'yabause': 'segaSaturn', 'puae': 'amiga', - 'vice_x64': 'c64' + 'vice_x64sc': 'c64', + 'vice_x128': 'c128', + 'vice_xpet': 'pet', + 'vice_xplus4': 'plus4', + 'vice_xvic': 'vic20' } return options[core] || core; } @@ -82,7 +86,11 @@ class EmulatorJS { 'ws': 'mednafen_wswan', 'coleco': 'gearcoleco', 'amiga': 'puae', - 'c64': 'vice_x64' + 'c64': 'vice_x64sc', + 'c128': 'vice_x128', + 'pet': 'vice_xpet', + 'plus4': 'vice_xplus4', + 'vic20': 'vice_xvic' } if (this.isSafari && this.isMobile && this.getCore(true) === "n64") { return "parallel_n64"; @@ -124,6 +132,11 @@ class EmulatorJS { 'snes9x': ['smc', 'sfc', 'swc', 'fig', 'bs', 'st'], 'stella2014': ['a26', 'bin', 'zip'], 'vice_x64': ['d64', 'd6z', 'd71', 'd7z', 'd80', 'd81', 'd82', 'd8z', 'g64', 'g6z', 'g41', 'g4z', 'x64', 'x6z', 'nib', 'nbz', 'd2m', 'd4m', 't64', 'tap', 'tcrt', 'prg', 'p00', 'crt', 'bin', 'cmd', 'm3u', 'vfl', 'vsf', 'zip', '7z', 'gz', '20', '40', '60', 'a0', 'b0', 'rom'], + 'vice_x64sc': ['d64', 'd6z', 'd71', 'd7z', 'd80', 'd81', 'd82', 'd8z', 'g64', 'g6z', 'g41', 'g4z', 'x64', 'x6z', 'nib', 'nbz', 'd2m', 'd4m', 't64', 'tap', 'tcrt', 'prg', 'p00', 'crt', 'bin', 'cmd', 'm3u', 'vfl', 'vsf', 'zip', '7z', 'gz', '20', '40', '60', 'a0', 'b0', 'rom'], + 'vice_x128': ['d64', 'd6z', 'd71', 'd7z', 'd80', 'd81', 'd82', 'd8z', 'g64', 'g6z', 'g41', 'g4z', 'x64', 'x6z', 'nib', 'nbz', 'd2m', 'd4m', 't64', 'tap', 'tcrt', 'prg', 'p00', 'crt', 'bin', 'cmd', 'm3u', 'vfl', 'vsf', 'zip', '7z', 'gz', '20', '40', '60', 'a0', 'b0', 'rom'], + 'vice_xpet': ['d64', 'd6z', 'd71', 'd7z', 'd80', 'd81', 'd82', 'd8z', 'g64', 'g6z', 'g41', 'g4z', 'x64', 'x6z', 'nib', 'nbz', 'd2m', 'd4m', 't64', 'tap', 'tcrt', 'prg', 'p00', 'crt', 'bin', 'cmd', 'm3u', 'vfl', 'vsf', 'zip', '7z', 'gz', '20', '40', '60', 'a0', 'b0', 'rom'], + 'vice_xplus4': ['d64', 'd6z', 'd71', 'd7z', 'd80', 'd81', 'd82', 'd8z', 'g64', 'g6z', 'g41', 'g4z', 'x64', 'x6z', 'nib', 'nbz', 'd2m', 'd4m', 't64', 'tap', 'tcrt', 'prg', 'p00', 'crt', 'bin', 'cmd', 'm3u', 'vfl', 'vsf', 'zip', '7z', 'gz', '20', '40', '60', 'a0', 'b0', 'rom'], + 'vice_xvic': ['d64', 'd6z', 'd71', 'd7z', 'd80', 'd81', 'd82', 'd8z', 'g64', 'g6z', 'g41', 'g4z', 'x64', 'x6z', 'nib', 'nbz', 'd2m', 'd4m', 't64', 'tap', 'tcrt', 'prg', 'p00', 'crt', 'bin', 'cmd', 'm3u', 'vfl', 'vsf', 'zip', '7z', 'gz', '20', '40', '60', 'a0', 'b0', 'rom'], 'virtualjaguar': ['j64', 'jag', 'rom', 'abs', 'cof', 'bin', 'prg'], 'yabause': ['cue', 'iso', 'ccd', 'mds', 'chd', 'zip', 'm3u'] } @@ -920,7 +933,7 @@ class EmulatorJS { const altName = this.getBaseFileName(true); let disableCue = false; - if (['pcsx_rearmed', 'genesis_plus_gx', 'picodrive', 'mednafen_pce', 'vice_x64'].includes(this.getCore()) && this.config.disableCue === undefined) { + if (['pcsx_rearmed', 'genesis_plus_gx', 'picodrive', 'mednafen_pce', 'vice_x64', 'vice_x64sc', 'vice_x128', 'vice_xvic', 'vice_xplus4', 'vice_xpet'].includes(this.getCore()) && this.config.disableCue === undefined) { disableCue = true; } else { disableCue = this.config.disableCue; diff --git a/index.html b/index.html index a8d5d40..912b70e 100644 --- a/index.html +++ b/index.html @@ -106,6 +106,18 @@