From 66adab8463c5010b23c3902a10e6efcca1185b44 Mon Sep 17 00:00:00 2001 From: TheEmeraldStarr <46467239+Epicloudygamer@users.noreply.github.com> Date: Wed, 7 Oct 2020 20:51:19 -0700 Subject: [PATCH] Updated Gameboy Page --- public/assets/js/config.js | 10 + public/assets/js/{gameboy.js => gb.js} | 0 public/m.html | 249 +++++++------------------ 3 files changed, 82 insertions(+), 177 deletions(-) create mode 100644 public/assets/js/config.js rename public/assets/js/{gameboy.js => gb.js} (100%) diff --git a/public/assets/js/config.js b/public/assets/js/config.js new file mode 100644 index 00000000..f4acf11f --- /dev/null +++ b/public/assets/js/config.js @@ -0,0 +1,10 @@ + // configuration + var opts = { + romReaders: [ + new GameboyJS.RomFileReader(), + new GameboyJS.RomDropFileReader(document.getElementById('dropzone')) + ] + }; + var g = new GameboyJS.Gameboy(document.getElementById('canvas'), opts); + g.setSoundEnabled(document.getElementById('sound-enable').checked); + g.setScreenZoom(document.getElementById('screen-zoom').value); \ No newline at end of file diff --git a/public/assets/js/gameboy.js b/public/assets/js/gb.js similarity index 100% rename from public/assets/js/gameboy.js rename to public/assets/js/gb.js diff --git a/public/m.html b/public/m.html index 4e34932b..215eb84f 100644 --- a/public/m.html +++ b/public/m.html @@ -9,202 +9,97 @@ - - - - - - - - - - -
- -
-

Gameboy Emulator

-
Your browser does not seem to support canvas.
+
+

Gameboy Emulator

+
-

- - -

-

- -

-

-

+ +
Your browser does not seem to support canvas.
+ +

+ + +

+

+ +

+

+ -

+

-

- -

-

+

+ +

+

-
-
- -
- -
-
-

- Or drop a ROM file here -

-
-
+
+
+
-
-

Current keyboard mapping:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Gameboy padKeyboard mapping
AG
BB
STARTH
SELECTN
Directional padArrow keys
-
- - - - +
+

Current keyboard mapping:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Gameboy PadKeyboard Mapping
AG
BB
STARTH
SELECTN
Directional padArrow keys
+
- + - +
+ + + + \ No newline at end of file