Git Product home page Git Product logo

khedgb's People

Contributors

khedoros avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jakibaki

khedgb's Issues

Timer and Div are inaccurate

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

No audio has been added. There's a skeleton, but the registers don't react properly, and no output is generated.

Bad timing related to vblank

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).

Add camera support

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;
}

Always renders when it receives a command a line 143

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.