khedoros / khedgb Goto Github PK
View Code? Open in Web Editor NEWExperiments in Game Boy emulation
License: MIT License
Experiments in Game Boy emulation
License: MIT License
Div is a 16-bit value that I'm currently emulating as 8-bit, because the bottom 8 bits aren't visible in a register. This is causing difficulties with the timer register increments; the timer increments when specific bits of div transition 1->0.
There may also be another case where the timer transitions 0->1; I haven't seen it documented, but the Blargg instruction timing test seems to rely on it (seen with the behavior of BGB, too).
No audio has been added. There's a skeleton, but the registers don't react properly, and no output is generated.
I have the same sound card in my netbooks as mentioned in this post: https://elementaryos.stackexchange.com/questions/14923/asus-e200h-intel-hdmi-for-internal-speakers-fix
There is no audio coming from the netbook speakers and the headphone jack. how can I fix it. Please help.
Looking at DKL2, vblank activates display of sprites, and then other code almost immediately disables them (reliably 10 instructions between those two events). This applies to the save selection screen and in the levels, but not at the title screen, or during level selection.
In the VBLANK handler, there's this:
PC: 0041 A: df B: 03 C: 41 D: 81 E: 80 H: df L: f7 SP: dff7 F: 80 LD HL, $ff40
PC: 0044 A: df B: 03 C: 41 D: 81 E: 80 H: ff L: 40 SP: dff7 F: 80 SET 01, (HL)
then this right after exiting:
PC: 3581 A: 00 B: 03 C: 41 D: 81 E: 80 H: df L: f7 SP: dff5 F: a0 LD HL, $ff40
PC: 3584 A: 00 B: 03 C: 41 D: 81 E: 80 H: ff L: 40 SP: dff5 F: a0 RES 01, (HL)
Although, there's also sporadic corruption in the window at the bottom of the screen during level selection (where it displays the game level).
I want to support the GameBoy Camera as a peripheral. I'm leaving this as a note for information on the easiest way to read the webcam, turn the video into a graymap, and save a copy of the image as a jpeg:
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/imgproc/imgproc.hpp>
#include<iostream>
#include<string>
int main(int argc, char ** argv) {
cv::Mat image;
cv::Mat gray_image;
cv::VideoCapture cap(0);
cap.open(true);
int num=0;
while(num<10) {
cap>>image;
//cv::cvtColor( image, gray_image, CV_BGR2GRAY );
std::string filename = std::string("image-") + std::to_string(num) + ".jpg";
//cv::imwrite( filename.c_str(), gray_image );
cv::imwrite( filename.c_str(), image );
num++;
//cv::namedWindow( "Display window", cv::WINDOW_AUTOSIZE );
//cv::imshow("Webcam capture test", image);
//cv::waitKey(0);
}
return 0;
}
The graphics test writes some test data to vram+oam, and renders one frame of a scene. At least, that's the intention. The PPU currently renders a frame for each cycle in line 143 that ::render is called on, as long as it's after cycle 62 (estimated end of transferring data to LCD).
I probably need to decompose the starting+ending cycle into frame+line+cycle triplets to make my line-drawing decisions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.