This commit is contained in:
mileswa1q22 authored and GitHub committed 2024-05-11 22:05:28 +00:00
1 parent 29cbc7d33a
commit 50f83c12ae
9 files changed
+1790 -1

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
# binjgb
Fork of binji's Game Boy emulator built as a WebAssembly module.
It includes changes from [Daid's fork](https://github.com/daid/binjgb) and others to better support GB Studio.
## License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+21
View File
@@ -0,0 +1,21 @@
var Binjgb = (function() {
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
return (
function(Binjgb) {
Binjgb = Binjgb || {};
var Module=typeof Binjgb!=="undefined"?Binjgb:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=true;var ENVIRONMENT_IS_WORKER=false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=function(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!=="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heap,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heap[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str="";while(idx<endPtr){var u0=heap[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heap[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heap[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heap[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||16777216;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;__ATINIT__.push({func:function(){___wasm_call_ctors()}});function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencieLine truncated
return Binjgb.ready
}
);
})();
if (typeof exports === 'object' && typeof module === 'object')
module.exports = Binjgb;
else if (typeof define === 'function' && define['amd'])
define([], function() { return Binjgb; });
else if (typeof exports === 'object')
exports["Binjgb"] = Binjgb;
Binary file not shown.
+321
View File
@@ -0,0 +1,321 @@
body {
background: #031921;
color: #fff;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue",
Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
margin: 0;
padding: 0;
touch-action: none;
-webkit-touch-callout: none;
user-select: none;
-webkit-user-select: none;
overflow: hidden;
}
#game {
display: flex;
flex-direction: column;
position: absolute;
width: 100%;
height: 100%;
touch-action: none;
}
#game canvas {
object-fit: contain;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-crisp-edges;
image-rendering: pixelated;
image-rendering: crisp-edges;
height: 100%;
}
#controller {
display: none;
position: fixed;
bottom: 0px;
height: 210px;
width: 100%;
touch-action: none;
opacity: 0.8;
}
#controller_dpad {
position: absolute;
bottom: 20px;
left: 0px;
width: 184px;
height: 184px;
}
#controller_dpad:before {
content: "";
display: block;
width: 48px;
height: 48px;
background: #5c5c5c;
background: radial-gradient(
ellipse at center,
#5c5c5c 0%,
#555 59%,
#5c5c5c 60%
);
position: absolute;
left: 68px;
top: 68px;
}
#controller_left {
position: absolute;
left: 20px;
top: 68px;
width: 48px;
height: 48px;
background: #666;
background: radial-gradient(ellipse at center, #666 0%, #5c5c5c 80%);
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
#controller_right {
position: absolute;
left: 116px;
top: 68px;
width: 48px;
height: 48px;
background: #666;
background: radial-gradient(ellipse at center, #666 0%, #5c5c5c 80%);
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
#controller_up {
position: absolute;
left: 68px;
top: 20px;
width: 48px;
height: 48px;
background: #666;
background: radial-gradient(ellipse at center, #666 0%, #5c5c5c 80%);
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
#controller_down {
position: absolute;
left: 68px;
top: 116px;
width: 48px;
height: 48px;
background: #666;
background: radial-gradient(ellipse at center, #666 0%, #5c5c5c 80%);
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
#controller_a {
position: absolute;
bottom: 110px;
right: 20px;
}
#controller_b {
position: absolute;
bottom: 80px;
right: 100px;
}
.roundBtn {
display: flex;
justify-content: center;
align-items: center;
font-weight: bold;
font-size: 32px;
color: #440f1f;
line-height: 64px;
width: 64px;
height: 64px;
border-radius: 64px;
background: #870a4c;
background: radial-gradient(ellipse at center, #ab1465 0%, #8b1e57 100%);
box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.2);
}
.capsuleBtn {
font-weight: bold;
font-size: 10px;
color: #111;
display: flex;
justify-content: center;
align-items: center;
line-height: 40px;
text-transform: uppercase;
width: 64px;
height: 32px;
border-radius: 40px;
background: #222;
background: radial-gradient(ellipse at center, #666 0%, #555 100%);
box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.2);
}
#controller_start {
position: absolute;
bottom: 20px;
right: 15px;
}
#controller_select {
position: absolute;
bottom: 20px;
right: 100px;
}
.btnPressed {
opacity: 0.5;
}
.spinner {
height: 50px;
width: 50px;
margin: 0px auto;
-webkit-animation: rotation 0.8s linear infinite;
-moz-animation: rotation 0.8s linear infinite;
-o-animation: rotation 0.8s linear infinite;
animation: rotation 0.8s linear infinite;
border-left: 10px solid #306850;
border-right: 10px solid #306850;
border-bottom: 10px solid #306850;
border-top: 10px solid #88c070;
border-radius: 100%;
background-color: #031921;
}
@-webkit-keyframes rotation {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
@-moz-keyframes rotation {
from {
-moz-transform: rotate(0deg);
}
to {
-moz-transform: rotate(360deg);
}
}
@-o-keyframes rotation {
from {
-o-transform: rotate(0deg);
}
to {
-o-transform: rotate(360deg);
}
}
@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@media only screen and (max-width: 640px) {
#game canvas {
margin-top: 0px;
width: 100%;
max-width: 512px;
border: 0px;
border-radius: 0px;
}
}
@media only screen and (max-device-width: 812px) and (orientation: portrait) {
body {
margin: 0;
}
#game {
width: 100%;
position: fixed;
touch-action: none;
}
#game canvas {
margin: 0;
display: block;
width: 100% !important;
height: auto !important;
}
}
@media only screen and (max-device-width: 320px) and (orientation: portrait) {
#controller_dpad {
left: -5px;
bottom: -5px;
}
#controller_a {
right: 5px;
bottom: 95px;
}
#controller_b {
right: 80px;
}
#controller_start {
right: 5px;
}
#controller_select {
right: 80px;
}
}
@media only screen and (max-width: 500px) and (max-height: 400px) {
#controller {
display: none;
}
}
/* Small devices in landscape */
@media only screen and (max-device-width: 300px) and (orientation: landscape) {
html,
body {
height: 100%;
}
body {
display: flex;
justify-content: center;
align-items: center;
}
#game:after {
content: "PLEASE ROTATE ↻";
font-size: 24px;
font-weight: bold;
color: #fff;
}
#game canvas {
display: none;
max-width: 480px;
}
#controller {
display: none;
}
}
/* Devices large enough for landscape */
@media only screen and (min-width: 300px) and (orientation: landscape) {
#controller {
bottom: 50%;
transform: translateY(50%);
opacity: 0.5;
}
}
+34
View File
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="css/style.css" />
<title>miles game</title>
<meta name="author" content="miles" />
<style type="text/css"> body { background-color:#202850; }</style>
</head>
<body>
<div id="game">
<canvas id="mainCanvas" width="256" height="224">No Canvas Support</canvas>
</div>
<div id="controller">
<div id="controller_dpad">
<div id="controller_left"></div>
<div id="controller_right"></div>
<div id="controller_up"></div>
<div id="controller_down"></div>
</div>
<div id="controller_select" class="capsuleBtn">Select</div>
<div id="controller_start" class="capsuleBtn">Start</div>
<div id="controller_b" class="roundBtn">B</div>
<div id="controller_a" class="roundBtn">A</div>
</div>
<script>
const customControls = {}
</script>
<script src="binjgb.js"></script>
<script src="js/script.js"></script>
</body>
+1386
View File
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
Add your ROM here named as game.gb
Binary file not shown.
+2 -1
View File
@@ -36,7 +36,7 @@
<p></p>
<a href="https://hideip.network/aHR0cHM6Ly9naXRodWIuY29tL2hpZGVpcG5ldHdvcms=/hvtrs8%2F-gcmgs%2Ccpaxyeaoeq.aoo%2Fgn%5DUQ%2Fqtkcimcn%2Fpcriowr%2F3-ildgx%2Chvmn">Parkour game</a>
<a href="/games/Whopper! Friday Night Funkin.html">Whopper! Friday Night Funkin</a>
<a href="/games/Ice Crush.html"><img src="/imigesforgames/icecrush.png" style="width:500px;height:500px;">ice Crush</a>
<a href="/games/Ice Crush.html">ice Crush</a>
<a href="/games/[online]Paper Minecraft_オンラインマインクラフト.html">[online]Paper Minecraft</a>
<a href="/games/Kirby's Dreamland 3 Maker.html">Kirby's Dreamland 3</a>
<a href="/games/Online 3D Super Mario Kart english.html">Online 3D Super Mario Kart</a>
@@ -72,6 +72,7 @@
<a href="dino.html">The Dinosaur Game</a>
<a href="EaglercraftX_1_8_u27_Offline_Signed.html">the new mincraft 1.8</a>
<a href="/SnowRider3DUnblocked.github.io-main/SnowRider3DUnblocked.github.io-main/index.html">SnowRider3D</a>
<a href="/gdtest/index.html">new game coming soon</a>
</head>
</form>
<div id="disqus_thread"></div>