Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Shuffled stuff around

  • Loading branch information...
commit 69058feb6f8f52afe5393840180c22fc1b35cc19 1 parent bb8d7d7
Bryon Vandiver authored
Showing with 14 additions and 13 deletions.
  1. +1 −1  .gitignore
  2. +4 −2 README
  3. +3 −4 index.html
  4. +6 −6 src/chips/video/lcd.js
View
2  .gitignore
@@ -1,6 +1,6 @@
# ignore roms folder
roms
+gamelist
doc
-test
favicon.ico
.DS_Store
View
6 README
@@ -19,6 +19,7 @@ This emulator features a number of performance optimizations in order to keep
performance at a maximum; this includes interrupt prediction and the use of
memory i/o delegates for fast memory accesses.
+All the audio registers are simply ignored.
Usage
----------------------------------------
@@ -29,8 +30,9 @@ for speed considerations. Consult index.html for current implementation details
If you wish to use it as is, create a roms directory in the root project folder
and do this simple command to build the catalog:
- find roms -name "*.gb*" > roms/gamelist
+ find roms -name "*.gb*" > gamelist
please note that Chrome will not allow XMLHttpRequests on the local file system
-so you may need to run a lightweight http server to test there.
+so you may need to run a lightweight http server to run locally.
+
View
7 index.html
@@ -26,7 +26,7 @@
'double': 'regular',
'regular': 'double'
};
-
+
div.setAttribute('class', change[div.getAttribute('class')] );
}
@@ -90,7 +90,7 @@
var xml = new XMLHttpRequest();
- xml.open('GET', "roms/gamelist", false);
+ xml.open('GET', "gamelist", false);
xml.send();
if( xml.readyState != 4 || xml.status != 200 )
@@ -237,8 +237,7 @@
<body>
<div class='center'>
<div id='screenHolder'>
- <canvas id='screen' class='regular' width='160' height='144' onclick="resize(this)">
- </canvas>
+ <canvas id='screen' class='regular' width='160' height='144' onclick="resize(this)"></canvas>
<div id='Button_A'>X</div>
<div id='Button_B'>Z</div>
View
12 src/chips/video/lcd.js
@@ -9,16 +9,16 @@ var PALETTE_SHIFT = 2;
function jsboyLCD(context, palette)
{
- // --- Setup display
- context.fillStyle = 'white';
- context.fillRect( 0,0,160,144 );
-
- this.buffer = context.getImageData(0,0,160,144);
-
+ // --- Setup display
this.scanline = new Array(172);
this.context = context;
this.paletteMemory = palette;
+ this.context.fillStyle = 'white';
+ this.context.fillRect( 0,0,160,144 );
+
+ this.buffer = this.context.getImageData(0,0,160,144);
+
// --- Setup surface palette
this.colorTable = new Array(0x10000);
Please sign in to comment.
Something went wrong with that request. Please try again.