Skip to content

Commit

Permalink
Merge pull request #4 from ESPboy-edu/master
Browse files Browse the repository at this point in the history
ESPboy names, logo, excluded ch8
  • Loading branch information
corax89 authored Jun 30, 2019
2 parents 4dc1ba5 + d8612ae commit 2d03dc8
Show file tree
Hide file tree
Showing 37 changed files with 120 additions and 1 deletion.
Binary file added .DS_Store
Binary file not shown.
50 changes: 50 additions & 0 deletions ESPboyLogo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
const uint8_t ESPboyLogo[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0,
0x01, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0xFC,
0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x83, 0x1F, 0xFC, 0x00, 0x00, 0x00,
0x00, 0x00, 0xD0, 0xC3, 0x3F, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0,
0xE3, 0x7F, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xE1, 0x7F, 0x78,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xA0, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xA0, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7F, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x41, 0x3E, 0x78, 0x00, 0x00, 0x00,
0x00, 0x00, 0xF0, 0x83, 0x1F, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
0x03, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0x03, 0x00, 0xF4,
0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x03, 0x0F, 0xEC, 0x00, 0x00, 0x00,
0x00, 0x00, 0xE0, 0x81, 0x1F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1E, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1D, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xE0, 0x01, 0x0F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
0x03, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0xFC,
0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0x03, 0x0F, 0xF4, 0x00, 0x00, 0x00,
0x00, 0x00, 0xB0, 0x83, 0x1F, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0,
0x81, 0x1F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1E, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1D, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1E, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xC0, 0x0F,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xC0, 0x0F, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x3D, 0x40, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3B, 0xC0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x80, 0x07,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x07, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0,
0x0F, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x7E,
0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x0F, 0x00, 0x7A, 0x00, 0x00, 0x00,
0x00, 0x00, 0xC0, 0x0E, 0x00, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x07, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00,
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xE0, 0xE7, 0xF7, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF7,
0xF7, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x30, 0x30, 0xF6, 0xF1,
0xCC, 0x00, 0x00, 0x00, 0xE0, 0xF3, 0x31, 0xF6, 0xFB, 0xCD, 0x00, 0x00,
0x00, 0xE0, 0xE3, 0xF3, 0x37, 0x9B, 0xCD, 0x00, 0x00, 0x00, 0xE0, 0xC0,
0xF7, 0x33, 0x9B, 0xCD, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x36, 0x30, 0x9B,
0xCD, 0x00, 0x00, 0x00, 0xE0, 0xF7, 0x37, 0xF0, 0xFB, 0xFD, 0x00, 0x00,
0x00, 0xE0, 0xF7, 0x33, 0xF0, 0xF1, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00,
};
9 changes: 9 additions & 0 deletions ESP_ILI9341_game_engine.ino → ESPboy_little_game_engine.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#include <coos.h>
#include <FS.h>
#include <TFT_eSPI.h>
#include "ESPboyLogo.h"
#include "settings.h"

ADC_MODE(ADC_VCC);

// Use hardware SPI
Expand Down Expand Up @@ -263,6 +265,13 @@ void setup() {
mcp.digitalWrite(csTFTMCP23017pin, LOW);
tft.init(); // initialize LCD
tft.setRotation(0);
tft.fillScreen(0x0000);
tft.setTextSize(1);
tft.drawXBitmap(30, 24, ESPboyLogo, 68, 64, 0xFFE0);
tft.setTextColor(0xFFE0);
tft.setCursor(10,102);
tft.print ("Little game engine");
delay (2000);
#else
Wire.begin(D2, D1);
geti2cAdress();
Expand Down
62 changes: 61 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,63 @@
# ESPboy_little_game_engine

Port of wonderful Igor's ESP little game engine (ESP-LGE) to ESPboy,
thanks Igor!

Original ESP-LGE:
https://github.com/corax89/esp8266_game_engine

Games sources:
https://github.com/corax89/game_engine_for_esp8266_with_compiler/tree/master/example

Hackaday:
https://hackaday.io/project/164205-esp-little-game-engine

Article:
https://hackaday.com/2019/03/11/esp8266-gets-its-game-on-with-open-source-engine/

User Guide:
https://corax89.github.io/esp8266Game/user_guide/index.html

Online ESP-LGE SDK, compiler, emulator:
https://corax89.github.io/esp8266Game/index.html

How to compile for ESPboy:
1. Install Arduino IDE
2. Clone and download "ESPboy_little_game_engine" and rename the folder "ESPboy_little_game_engine-master" to "ESPboy_little_game_engine"
3. Unpack two libraries (a_coos and TFT_eSPI) from file "libraries.7z" to the Arduino/Libraries folder
4. Change settings in file «User_Setup.h» of TFT_eSPI library
- 50 #define TFT_WIDTH 128
- 53 #define TFT_HEIGHT 128
- 67 #define ST7735_GREENTAB3
- 149 #define TFT_CS -1
- 150 #define TFT_DC PIN_D8
- 152 #define TFT_RST -1
- 224 #define LOAD_GLCD
- 255 #define SPI_FREQUENCY 27000000
5. Open "esp8266_game_engine.ino" in Arduino IDE and compile it for "Lolin/WeMos D1 mini ESP8266" board
6. Upload the games to your ESPboy SPIFFS
7. Enjoy )

How to upload games to SPIFFS:
https://www.youtube.com/watch?v=25eLIdLKgHs


How to recompile CHIP8 games:
1. Use source file https://github.com/corax89/game_engine_for_esp8266_with_compiler/blob/master/example/chip8.c
2. Put your CHIP8 bit code to char "Memory[3583] = {};" at string №58
3. Check buttons remap at strings №9-20
4. Compile this .c to .bin with "Online ESP-LGE SDK, compiler, emulator" https://corax89.github.io/esp8266Game/index.html
5. Upload .bit to your ESPboy SPIFFS


Games in package:

1. Original ESP-LGE by Igor: FourInaRow, NinjaEscape, 1916, WormBlast, ESProgue, Galaxies, CityRunner, Memories, MarsAttack, Columns, Mines, Breackout, TowerDefense,
...




![logo](/logo.png)
# esp8266_little_game_engine
Used ili9341. Contains a virtual machine running games from RAM.
Expand All @@ -14,4 +74,4 @@ Online emulator with compiler:

Video:

[![video](http://img.youtube.com/vi/roOQHuXNVoI/0.jpg)](https://www.youtube.com/watch?v=roOQHuXNVoI "ESP8266 game engine")
[![video](http://img.youtube.com/vi/roOQHuXNVoI/0.jpg)](https://www.youtube.com/watch?v=roOQHuXNVoI "ESP8266 game engine")
Binary file added data/.DS_Store
Binary file not shown.
Binary file removed data/2048_ch8.bin
Binary file not shown.
Binary file removed data/airplane_ch8.bin
Binary file not shown.
Binary file removed data/badapplex16.bin
Binary file not shown.
Binary file removed data/blinky_ch8.bin
Binary file not shown.
Binary file removed data/brainf.bin
Binary file not shown.
Empty file modified data/calculator.bin
100644 → 100755
Empty file.
Binary file removed data/collision.bin
Binary file not shown.
Empty file modified data/columns.bin
100644 → 100755
Empty file.
Binary file removed data/down8_ch8.bin
Binary file not shown.
Binary file removed data/dragonfractal.bin
Binary file not shown.
File renamed without changes.
Empty file modified data/esprogue.bin
100644 → 100755
Empty file.
Empty file modified data/fourinarow.bin
100644 → 100755
Empty file.
File renamed without changes.
Binary file removed data/gravedigger_ch8.bin
Binary file not shown.
Binary file removed data/invaders_ch8.bin
Binary file not shown.
File renamed without changes.
File renamed without changes.
Empty file modified data/memories.bin
100644 → 100755
Empty file.
Empty file modified data/mines.bin
100644 → 100755
Empty file.
File renamed without changes.
Binary file removed data/pi.bin
Binary file not shown.
Binary file removed data/puzzle_ch8.bin
Binary file not shown.
File renamed without changes.
Binary file removed data/slipperyslope_ch8.bin
Binary file not shown.
Empty file modified data/snake.bin
100644 → 100755
Empty file.
Binary file removed data/soacejam_ch8.bin
Binary file not shown.
Binary file removed data/submarine_ch8.bin
Binary file not shown.
File renamed without changes.
Binary file removed data/tetris12me21_ch8.bin
Binary file not shown.
File renamed without changes.
Empty file modified data/wormblast.bin
100644 → 100755
Empty file.

0 comments on commit 2d03dc8

Please sign in to comment.