From 9f8144ec585f41142c98c366064e8b8138f81701 Mon Sep 17 00:00:00 2001 From: brandman211 Date: Fri, 18 May 2012 19:11:14 +0000 Subject: [PATCH] -Set the number of cycles per frame to 70224. -Inverted the colors; according to http://imrannazar.com/GameBoy-Emulation-in-JavaScript:-Graphics, 0 is white, 1 is light gray, 2 is dark gray, and 3 is black, which is the opposite of the norm. --- BizHawk.Emulation/Consoles/Gameboy/Gameboy.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/BizHawk.Emulation/Consoles/Gameboy/Gameboy.cs b/BizHawk.Emulation/Consoles/Gameboy/Gameboy.cs index 0d7239450b..f0d8289f72 100644 --- a/BizHawk.Emulation/Consoles/Gameboy/Gameboy.cs +++ b/BizHawk.Emulation/Consoles/Gameboy/Gameboy.cs @@ -704,12 +704,9 @@ namespace BizHawk.Emulation.Consoles.Gameboy public void FrameAdvance(bool render) { Controller.UpdateControls(Frame++); - - //40960 is not the right number. - for (int i = 0; i < 40960; i++) - { + + for (int i = 0; i < 70224; i++) SingleStepInto(); - } //to make sure input is working Console.WriteLine(Controller.IsPressed("Up")); @@ -737,7 +734,7 @@ namespace BizHawk.Emulation.Consoles.Gameboy RenderOBJLine(y, linebuf, true); for (int x = 0; x < 160; x++) { - int gray = linebuf[x]<<6; + int gray = (3 - linebuf[x]) << 6; gray |= (gray << 8) | (gray << 16); buf[i++] = unchecked(gray | (int)0xFF000000); }