GithubHelp home page GithubHelp logo

zenaro147 / neogb-printer Goto Github PK

View Code? Open in Web Editor NEW
122.0 2.0 6.0 21.62 MB

An open-source and standalone Gameboy Printer emulator 100% compatible with all officially released games (110 in total) that support the accessory. Just print and save the images as BMP

License: GNU General Public License v3.0

C++ 15.59% C 82.66% HTML 1.02% MATLAB 0.74%
esp32 emulator esp32-arduino gameboy emulators gameboy-printer gameboy-printer-emulator sd-card bmp-image bmp

neogb-printer's People

Contributors

6d64 avatar cristofercruz avatar raphael-boichot avatar zenaro147 avatar

Stargazers

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

Watchers

 avatar  avatar

neogb-printer's Issues

Help or advices wanted

Things that can be improved in the future (or not... but feel free to contribute):

  • A better/responsive Web interface. Since the actual is pretty simple.

  • A direct PNG file encoder without using a core BMP encoder first. We were too lazy to write one after the BMP encoder was OK, the PNG encoding being a real pain, it was made starting from a BMP image as separate function rather than integrated it into the emulator core. BMP step could be skipped to gain some time.

  • The ESP is forced to run at 80 MHz instead of its native 240 MHz during serial protocol. At full speed we experienced protocol unstability with few games. We did not investigate what was the reason (faulty boards sold on Aliexpress ? Need for a magic cap on serial line ?). I someone feels qualified to investigate...

  • An embedded image display in 4 shades of gray ?

SD card keeps corrupting

This happens randomly when transfering images from my gameboy camera to the ESP32. The oled screen would be stuck at the printer idle screen where it hangs and pressing the button does not do anyth unless i restart the ESP32.

It would then boot into either access point webserver mode with a 404 webpage on its IP and the usual gbprinter.local on the oled would be replaced by just .local.

OR

It would boot into the dumping screen with either 0 dumps or some impossibly large number. I can still transfer images but i would be stuck back at the printer idle screen with unresponsive buttons.

Am using a TTGO T8 1.7.1 with integrated sd card reader. Wired everything up properly as per my config file below:

/*********************************
 * GAMEBOY LINK CABLE DEFINITIONS
 *********************************/
// Note: Serial Clock Pin must be attached to an interrupt pin of the arduino (Pins 1 and 4 are not used)
//  ___________
// |  6  4  2  |
//  \_5__3__1_/   (at cable)
//
#define ESP_MOSI_PIN 23
#define ESP_MISO_PIN 19
#define ESP_CLK_PIN 18
#define INVERT_SERIAL_PINS //Invert pin 2 and 3 order, since the pin 2 goes o 3 in the other side of the cable, and 3 goes to 2. This is useful if you are using a breakout board for the link cable

/*****************************
 * SD CARD MODULE DEFINITIONS 
 *****************************/
//Define the SD Card Module Pins
#define SD_CS   13
#define SD_SCK  14
#define SD_MOSI 15
#define SD_MISO 2

/************************************
 * PUSH BUTTON AND IMAGE DEFINITIONS 
 ************************************/
#define BTN_PUSH 34             // Define a PushButton to use to Force a new file/Generate the images.
//#define BTN_INVERT            //Define to use the LOW state instead HIGH state. Useful for the TTGO board.
#define BMP_UPSCALE_FACTOR 1    //Set the Upscale factor for the BMP output (Set 0 to disable)
#define PNG_UPSCALE_FACTOR 1    //Set the Upscale factor for the PNG output (Set 0 to disable)

/***************************
 * OLED DISPLAY DEFINITIONS
 ***************************/
#define USE_OLED        //Enable OLED

//Uncomment this if you are using SSD1306 display driver (I2C)
#define USE_SSD1306
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_COMPINS 1 //If you have some issues with the image, try to change this with values between 1 and 4

//Uncomment this if you are using SSD1331 display driver (SPI)
//#define USE_SSD1331
//#define OLED_SCLK 14
//#define OLED_MOSI 13
//#define OLED_MISO 12
//#define OLED_CS   15
//#define OLED_DC   16
//#define OLED_RST   4

//Set your display dimensions
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 32
//#define OLED_ROTATE   //Rotate the display by 180°

/*************************
 * LED STATUS DEFINITIONS
 *************************/
// Standard LED Definitions
#define LED_STATUS_PIN    1       // LED blink on packet reception (2 is internal LED)

// RGB LED Definitions
//#define LED_STATUS_BLUE  17
//#define LED_STATUS_RED   16
//#define LED_STATUS_GREEN 4
//#define COMMON_ANODE
//#define COMMON_CATHODE

/*************************
 * WEB SERVER DEFINITIONS
 *************************/
#define ENABLE_WEBSERVER
#define WIFI_CONNECT_TIMEOUT 10000              //Connection Timeout in ms

/*************************
 * RTC DEFINITIONS
 *************************/
 #define RTC_TIMEZONE -3 //Define your timezone
 #define RTC_TIMEDIFF 0 //Define the time difference between the NTP server and the real time

Issues with SD card access on ESP32 board versions 2.0.0, 2.0.1 and 2.0.2

I could not get the SD card mounting on my ESP32 when compiled using ESP32 board version 2.0.0 and above. It took me a while to work out what the issue was, until everything suddenly started working when I soldered an SD card to VSPI pins.

This is not an issue in NeoGB-Printer itself though - there are several upstream issues in ESP32 libraries with SD card access via HSPI, I found at least these three:

I believe that 2.0.3-RC1 includes some of these fixes, and I had some success running NeoGB-Printer on that version, but I found that 1.0.6 worked the best.

I think it would be great to update the Software Setup wiki page to suggest using 1.0.6, at least until 2.0.3 is released.

Level shifter?

I hope I just missed it: how is the level shifter involved?

Is there a schematic of the entire project? If not, I’m happy to draw one.

Issue with Pokemon Pinball Score

Apparently, after some while, the game checks the printer connection sending some "init commands'

No bin file is saved, but this causes some bugs on printer, like wrong File count and some corrupted score print bins.

Redunding command

This commands in config.h.txt
#define BMP_UPSCALE_FACTOR 1 //Set the Upscale factor for the BMP output (Set 0 to disable)
#define PNG_UPSCALE_FACTOR 1 //Set the Upscale factor for the PNG output (Set 0 to disable)

Is redunding with:

"bmpimage": {
"scale":1
},
"pngimage": {
"scale":1
}

In conf.json

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.