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

macOS support #2

Open
while-loop opened this issue Jun 12, 2018 · 5 comments
Open

macOS support #2

while-loop opened this issue Jun 12, 2018 · 5 comments
Labels

Comments

@while-loop
Copy link
Contributor

When starting any game, nothing gets written to the Java GUI.
I've turned all loggers to DEBUG and run the command:

$ java -cp target/java-gb-1.0-SNAPSHOT.jar Main > log.txt

This generated a 90MB file available to download via Google Drive.

The other file, log2.txt, is with CPU's logger turned to INFO.

I've tried with and without OpenGL with no luck.

I will compare linux vs mac and see where values are different. I'm not sure if it's a GUI or code problem yet.

@pmcanseco
Copy link
Owner

The project isn't set up correctly to use jar files. I've always just been running it with
java Main where the .class files are generated. Try just running the class files directly, does that work?

@pmcanseco
Copy link
Owner

pmcanseco commented Jun 12, 2018

log2.txt looks like you're running either tetris or dr.mario . You can see towards the end there's stray Us in the logs. I have the emulator logging everything that gets written to the gameboy's serial port, and for some reason tetris does that. Looks like the game is running but having a hard time bringing up the gui panel.

I'm trying to track down a OS X machine to do more testing and see what comes of it.

@pmcanseco pmcanseco added the bug label Jun 14, 2018
@pmcanseco
Copy link
Owner

pmcanseco commented Jun 14, 2018

So I went and made an OS X virtual machine and was able to reproduce the issue. Initial research suggests I might not be using a proper cross-platform way of painting the GUI components. It appears to be a GUI issue, but more troubleshooting is needed. This is probably the problematic spot:
https://github.com/pmcanseco/java-gb/blob/master/src/main/java/Display.java#L132 .

image

@while-loop
Copy link
Contributor Author

Nice! I also suspected it might be something to do with swing/awt, but never got the chance to debug it.

How is the macOS VM? I've tried once before, but it was super slow.

@pmcanseco
Copy link
Owner

Surprisingly usable tbh. I only gave it like 4GB ram and 3 vCPUs and the only real slowness was in launching stuff like chrome, but once chrome, terminal, or whatever is up and running it runs at full speed. Some animations have frame drops but no showstoppers.

I don't have much time lately to look into redoing the swing/awt stuff but I'll get to it eventually >.>

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

No branches or pull requests

2 participants