Coder Social home page Coder Social logo

is it possible to load a .gb file? about gbsplay HOT 8 OPEN

mmitch avatar mmitch commented on September 26, 2024
is it possible to load a .gb file?

from gbsplay.

Comments (8)

mmitch avatar mmitch commented on September 26, 2024

No, because gbsplay only supports the sound hardware of a Gameboy. Nothing related to screen or buttons is included (well, I think we have vsync/hsync, but that is timing only).
Also, gbsplay does a file format check and will only accept GBS files (they include a special header). I don't know if a full .gb dump and a .gbs are the same file format or not.

You should look for a "real" Gameboy emulator that emulates the whole Gameboy like VisualboyAdvance-M or Gnuboy.

from gbsplay.

cyberic99 avatar cyberic99 commented on September 26, 2024

Thx

I thought it was possible, because ot his commit:
a8aec38

I have been able to accomplish that with Sameboy.

from gbsplay.

mmitch avatar mmitch commented on September 26, 2024

Ok, I don't know anything about that in detail. @ranma?

from gbsplay.

ranma avatar ranma commented on September 26, 2024

There is rudimentary support for .gb roms, but I only really tested it with one of the Pokemon roms, YMMV.
As mmitch said, there is no emulation for input or the graphics hardware, but if you're lucky the title screen music should work.

from gbsplay.

cyberic99 avatar cyberic99 commented on September 26, 2024

Thank you for your replies

there is no emulation for input

Would it be possible to press a button, using a custom plugin?

it seems that the gameboy only reads a register at FF00 to know if somme buttons are depressed

from gbsplay.

aaaaaa123456789 avatar aaaaaa123456789 commented on September 26, 2024

I don't know if a full .gb dump and a .gbs are the same file format or not.

They aren't. A .gb file is raw ROM data; the header is part of the ROM itself, not some separate header. It has a fixed entry point ($0100) and it starts executing from there.

it seems that the gameboy only reads a register at FF00 to know if somme buttons are depressed

It's a bit more complicated than that:

  1. Set $FF00 to either $20 or $10 to respectively indicate that you want to read the D-Pad or the buttons
  2. Wait 3us
  3. Read the data for the selected inputs in the lower four bits of $FF00
  4. Now set $FF00 to the value you didn't use in step 1
  5. Wait another 3us
  6. Read the data for the remaining inputs in the lower four bits of $FF00
  7. Combine the values obtained in steps 3 and 6 for a full input read-out

Not to mention that it's not just input that you'd need to emulate. You'd have to emulate the whole state of the device up to the point when the first track plays. GBS files have their own special cut-down routines for playing a selected song after being given an ID externally. An actual ROM would attempt to initialize most of the GB's hardware, and most likely fail at it.

from gbsplay.

ranma avatar ranma commented on September 26, 2024

Some examples of GB roms that work:
http://www.pouet.net/prod.php?which=56367
http://www.pouet.net/prod.php?which=82460
and probably others from http://www.pouet.net/prodlist.php?platform%5B%5D=Gameboy

VGM files converted from VGM into a GB rom with https://vgmrips.net/wiki/Dmvgm

(For some you need to override the default silence timeout)

from gbsplay.

cyberic99 avatar cyberic99 commented on September 26, 2024

great, thanks for your answers and the progress on this issue

from gbsplay.

Related Issues (20)

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.