mirror of
https://github.com/jscrane/Apple1.git
synced 2024-11-26 03:49:29 +00:00
changes for LilyGO
This commit is contained in:
parent
3dad91194e
commit
0700d2c1b8
20
Makefile
20
Makefile
@ -21,14 +21,24 @@ LIBRARIES := UTFT SD SpiRAM
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($t, esp32)
|
ifeq ($t, esp32)
|
||||||
BOARD := node32s
|
|
||||||
UPLOAD_SPEED := 921600
|
UPLOAD_SPEED := 921600
|
||||||
FS_DIR := programs
|
FS_DIR := programs
|
||||||
CPPFLAGS = -DDEBUGGING -DCPU_DEBUG \
|
CPPFLAGS = -DDEBUGGING -DCPU_DEBUG -DTERMINAL_SPEED=$(TERMINAL_SPEED)
|
||||||
-DUSER_SETUP_LOADED -DILI9341_DRIVER -DTFT_CS=5 -DTFT_DC=2 \
|
LIBRARIES = FS SPIFFS
|
||||||
|
|
||||||
|
ifeq ($b, lilygo)
|
||||||
|
BOARD := ttgo-t7-v14-mini32
|
||||||
|
SERIAL_PORT := /dev/ttyACM0
|
||||||
|
CPPFLAGS += -DHARDWARE_H=\"hw/lilygo-vga32.h\"
|
||||||
|
LIBRARIES += FabGL WiFi
|
||||||
|
|
||||||
|
else
|
||||||
|
BOARD := node32s
|
||||||
|
CPPFLAGS += -DUSER_SETUP_LOADED -DILI9341_DRIVER -DTFT_CS=5 -DTFT_DC=2 \
|
||||||
-DTFT_RST=-1 -DSPI_FREQUENCY=40000000 -DLOAD_GLCD \
|
-DTFT_RST=-1 -DSPI_FREQUENCY=40000000 -DLOAD_GLCD \
|
||||||
-DHARDWARE_H=\"hw/esp32-espi.h\" -DTERMINAL_SPEED=$(TERMINAL_SPEED)
|
-DHARDWARE_H=\"hw/esp32-espi.h\"
|
||||||
LIBRARIES = TFT_eSPI FS SPIFFS
|
LIBRARIES += TFT_eSPI
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $t.mk
|
include $t.mk
|
||||||
|
10
config.h
10
config.h
@ -18,13 +18,15 @@
|
|||||||
|
|
||||||
#define CPU_INSTRUCTIONS 1000
|
#define CPU_INSTRUCTIONS 1000
|
||||||
|
|
||||||
#define TFT_FG GREEN
|
#define FG_COLOUR GREEN
|
||||||
#define TFT_BG BLACK
|
#define BG_COLOUR BLACK
|
||||||
|
|
||||||
#if defined(USE_UTFT)
|
#if defined(USE_UTFT)
|
||||||
#define TFT_ORIENT landscape
|
#define ORIENT landscape
|
||||||
#elif defined(USE_ESPI)
|
#elif defined(USE_ESPI)
|
||||||
#define TFT_ORIENT reverse_landscape
|
#define ORIENT reverse_landscape
|
||||||
|
#elif defined(USE_VGA)
|
||||||
|
#define ORIENT landscape
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_SD)
|
#if defined(USE_SD)
|
||||||
|
4
io.cpp
4
io.cpp
@ -1,7 +1,7 @@
|
|||||||
#include <Stream.h>
|
#include <Stream.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include <tftdisplay.h>
|
#include <display.h>
|
||||||
#include <serialio.h>
|
#include <serialio.h>
|
||||||
#include <filer.h>
|
#include <filer.h>
|
||||||
#include <keyboard.h>
|
#include <keyboard.h>
|
||||||
@ -18,7 +18,7 @@ static unsigned r, c;
|
|||||||
static char screen[ROWS][COLS];
|
static char screen[ROWS][COLS];
|
||||||
|
|
||||||
void io::reset() {
|
void io::reset() {
|
||||||
TFTDisplay::begin(TFT_BG, TFT_FG, TFT_ORIENT);
|
Display::begin(BG_COLOUR, FG_COLOUR, ORIENT);
|
||||||
clear();
|
clear();
|
||||||
_cy += 2;
|
_cy += 2;
|
||||||
|
|
||||||
|
2
io.h
2
io.h
@ -2,7 +2,7 @@
|
|||||||
#define _IO_H
|
#define _IO_H
|
||||||
|
|
||||||
// http://mamedev.org/source/src/mess/machine/apple1.c.html
|
// http://mamedev.org/source/src/mess/machine/apple1.c.html
|
||||||
class io: public TFTDisplay, Keyboard, public pia {
|
class io: public Display, Keyboard, public pia {
|
||||||
public:
|
public:
|
||||||
io(filer &files): files(files) {}
|
io(filer &files): files(files) {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user