Giter Club home page Giter Club logo

cs107e-gb-emulator's People

Contributors

angeris avatar eniasebiomo avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

cs107e-gb-emulator's Issues

ROM Testing

Test against well-known open source emulators.

Test non-MBC games (e.g. Tetris) and then test a full ROM of the Pokèmon game.

The following checklist might be of use (and lets us see progress!):

  • Find a working emulator which passes all of the tests. Do this by just running the rom, which will print out a message to the emulator screen, if it doesn't fail.
  • Add a print-to-file statement any time an opcode is executed (probably in the main loop) to dump all of the registers and the current PC into a line (there may be some trouble if there are interrupts, but in this case you should just message me, diff should just report that we added a crapload of lines in between cases, so I think we should be fine).
  • Print each executed instruction of our emulator into screen, then dump the entire screen session into a file (I would recommend doing all of this inside of the make-install).
  • Diff out between files and then see what opcodes have caused failures.
  • Go and correct those failures and re-dump the screen.
  • do while(err)

All of the documentation for testing I've written can be found here!

Pokemon not working

Hi all,

I tried playing pokemon on this and it didn't work. does anyone know why?

Is the controller fast enough for pulsing without interrupts?

Additionally, you should add a system timer interrupt for every 60th of a second, as per this site on the SNES controller. Do this on a separate file that we can both use as I also have to draw every 60th of a second!

In particular:

Every 16.67ms (or about 60Hz), the SNES CPU sends out a 12us wide, positive going data latch pulse on pin 3. This instructs the ICs in the controller to latch the state of all buttons internally. Six microsenconds after the fall of the data latch pulse, the CPU sends out 16 data clock pulses on pin 2. These are 50% duty cycle with 12us per full cycle. The controllers serially shift the latched button states out pin 4 on every rising edge of the clock, and the CPU samples the data on every falling edge.

But nice work on the controller so far!

Finish GPU tiling

Final step to finishing up the GPU and getting everything running together!

Print GPU lines, individually

Implement a function that can map the given tiles to each line in the screen. Additionally, figure out how we want to interrupt the GB rom on this given case (e.g. do we interrupt on the vblank every 60Hz? This sounds like the best idea, personally, which is what we might go with, if there are no other ones. I believe this is the general implementation of most GB emulators).

Finish up memory access

Finish up the memory access code with the exclusion of the GPU registers (just write directly to memory). Additionally, finish up MBC3 extension in order to be able to read Pokèmon's ROM.

Finish GPU timings

Make sure to get the entirety of the GPU timings before starting to get fancy.

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.