Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Original Gameboy (DMG) version? #5

Open
sttng opened this issue Mar 8, 2021 · 10 comments
Open

Original Gameboy (DMG) version? #5

sttng opened this issue Mar 8, 2021 · 10 comments

Comments

@sttng
Copy link

sttng commented Mar 8, 2021

Would it be possible to create an original Gameboy DMG version ?

@LIJI32
Copy link
Owner

LIJI32 commented Mar 8, 2021

It's possible, but very tricky considering the lower clock rate and reduced timer resolution (The DMG can't accurately trigger a timer interrupt every 114 M-cycles)

@sttng
Copy link
Author

sttng commented Mar 9, 2021

Yeah I understand this maybe quite a challenge given the color Gameboy has twice the clockspeed of the cpu, double the video ram and tripple the ram. Maybe if you reduce the framerate ?

@LIJI32
Copy link
Owner

LIJI32 commented Mar 9, 2021

RAM and VRAM aren't an issue, I hardly use them. Reducing the frame rate won't help either – GBVP plays video in a volatile way – it actively draws an image in real time as the LCD updates the frame.

@sttng
Copy link
Author

sttng commented Mar 11, 2021

In that sense the only challenge is the less accurate interrupt trigger on the DMG ? Which means you can't be sure to color the 8 (or 16) pixels correctly in each hblank ?

@T0biasCZe
Copy link

T0biasCZe commented Jul 15, 2021

@LIJI32 Gameboy has 160x144 screen, which is 20x18 tiles, which is 360tiles total. but gameboy has 256tiles limit. (and it can reuse tiles)
If it was only 20x12 tiles (160x96) it would be only 240tiles which would fit. there would be one filler tile for the borders on top and bottom, which would be 241 tiles total. so it would fit all at once into the screen without the mid scan interupt
example picture:
SonicGBGreem

@LIJI32
Copy link
Owner

LIJI32 commented Jul 15, 2021

As mentioned above, VRAM (and tile count) aren't an issue, GBVP (both 1 and 2) don't display data using tiles; GBVP2 only uses 2 different tiles. The issue is not having double speed mode on the original Game Boy – the halved CPU speed means we get half the horizontal resolution (it gets stretch though), as well as lose the ability to compress video. Additionally, we lose required timer precision, making the code more wasteful on CPU time as we need to take care of timing things ourselves. It's probably better to display DMG video in a different technique.

@T0biasCZe
Copy link

the halved CPU speed means we get half the horizontal resolution (it gets stretch though)

@LIJI32 well if its stretched back it doesnt matter since it wouldnt be visible on the 2.2" screen

as well as lose the ability to compress video.

The video is only 2bit it will not take a lot of space like the color video so it doesnt need the compression as much

@T0biasCZe
Copy link

Well i tried the original version of the GBVideoplayer, and it sort of works on the original gameboy...

@sttng
Copy link
Author

sttng commented Dec 2, 2021

You mean the stock released rom for V1 Player or did you modify the source ?

@Lucas-mother3
Copy link

Lucas-mother3 commented Jan 8, 2023

Well, I will revive the thread because of this:
https://github.com/Staacks/wifi-game-boy-cartridge/tree/master/gb/stream

It's from the GB Wifi cartridge source code, which is impressive by itself, I don't know much assembly myself, but I think it might be helpful.
(This is posted while I ran GBVideoPlayer2 on Termux)

Addendum: Here's also the color version: https://github.com/Staacks/wifi-game-boy-cartridge/tree/master/gb/color-stream

I don't know if these are compatible with most emulators instead of the already limited set of emulators that can run videos encoded on this program.

Addendum 2: Here's the details about how this guy worked on it: https://there.oughta.be/gta5-for-the-game-boy
https://youtu.be/pX1opw_gsBs - YouTube video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants