Skip to content

Commit

Permalink
updated for GameBoy Printer Emulator V3
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas committed Mar 31, 2021
1 parent 5e24bb2 commit fd78a40
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ hs_err_pid*
# include libraries
!/libs/*
/target/
.idea
.DS_Store
15 changes: 15 additions & 0 deletions GameboyPrinterReceiver.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.fazecast:jSerialComm:2.6.2" level="project" />
<orderEntry type="library" name="gameboy-camera-lib" level="project" />
</component>
</module>
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
[![forthebadge](https://forthebadge.com/images/badges/contains-technical-debt.svg)](https://forthebadge.com)

This small Java application connects to a GameBoy Printer Emulator (see https://github.com/mofosyne/arduino-gameboy-printer-emulator) and waits for images. Once you print an image from your GameBoy Camera, the app will decode the image and save it to your computer as a PNG at a resolution of 160 by 144 pixels. This application runs in the command line and has no GUI.

## Important Note
Currently, this Java application only works with GameBoy Printer Emulator V1 and V2. I will update thie repository in the future to support V3.
It has been updated for V3 of the GameBoy Printer Emulator.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion src/printer/PrinterEmulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void receiveChunk(String chunk) {
startImage();
if (chunk.contains("\"command\":\"PRNT\""))
finishImage();
if (!chunk.startsWith("#") && !chunk.startsWith("!"))
if (!chunk.startsWith("//") && !chunk.startsWith("{") && !chunk.startsWith("!") && !chunk.startsWith("#"))
addData(chunk);
}

Expand Down

0 comments on commit fd78a40

Please sign in to comment.