small cleanups

This commit is contained in:
steve 2023-11-18 20:08:16 +00:00
parent b2519c5ff0
commit 12f9989a1d
7 changed files with 20 additions and 9 deletions

View File

@ -11,6 +11,7 @@ Sample Applications
- [Pacman](https://github.com/jscrane/pacman) - [Pacman](https://github.com/jscrane/pacman)
- [Commodore PET](https://github.com/jscrane/PET) - [Commodore PET](https://github.com/jscrane/PET)
- [Compukit UK101](https://github.com/jscrane/UK101) - [Compukit UK101](https://github.com/jscrane/UK101)
- [Commodore Chessmate](https://github.com/jscrane/Chessmate)
Configuration for Arduino Configuration for Arduino
-------------- --------------
@ -51,5 +52,5 @@ ESP8266 board, e.g., [WeMOS](https://www.wemos.cc/en/latest/d1/d1_mini.html), _o
ESP32-based board, e.g., [Node32s](https://www.esp32.com/viewtopic.php?t=459), ESP32-based board, e.g., [Node32s](https://www.esp32.com/viewtopic.php?t=459),
- An SD drive to store programs (for Stellarpad), - An SD drive to store programs (for Stellarpad),
- A 23k256 SPI RAM chip (for Stellarpad, optional), - A 23k256 SPI RAM chip (for Stellarpad, optional),
- A supported TFT screen, such as [this one](http://forum.stellarisiti.com/topic/626-ssd1289-32-320x240-tft-16bit-parallel-interface-touch-libraries/), - A supported TFT screen (if not using a board with VGA),
- A PS/2 keyboard. - A PS/2 keyboard.

View File

@ -193,7 +193,7 @@ void Display::drawCircle(unsigned x, unsigned y, unsigned r, colour_t col) {
#elif defined(USE_ESPI) #elif defined(USE_ESPI)
espi.drawCircle(x, y, r, col); espi.drawCircle(x, y, r, col);
#elif defined(USE_VGA) #elif defined(USE_VGA)
canvas.setBrushColor(rgb(col)); canvas.setPenColor(rgb(col));
canvas.fillEllipse(x, y, r, r); canvas.fillEllipse(x, y, r, r);
#endif #endif
} }
@ -207,7 +207,7 @@ void Display::fillCircle(unsigned x, unsigned y, unsigned r, colour_t col) {
#elif defined(USE_ESPI) #elif defined(USE_ESPI)
espi.fillCircle(x, y, r, col); espi.fillCircle(x, y, r, col);
#elif defined(USE_VGA) #elif defined(USE_VGA)
canvas.setPenColor(rgb(col)); canvas.setBrushColor(rgb(col));
canvas.drawEllipse(x, y, r, r); canvas.drawEllipse(x, y, r, r);
#endif #endif
} }
@ -221,7 +221,7 @@ void Display::drawRectangle(unsigned x, unsigned y, unsigned w, unsigned h, colo
#elif defined(USE_ESPI) #elif defined(USE_ESPI)
espi.drawRect(x, y, w, h, col); espi.drawRect(x, y, w, h, col);
#elif defined(USE_VGA) #elif defined(USE_VGA)
canvas.setBrushColor(rgb(col)); canvas.setPenColor(rgb(col));
canvas.fillRectangle(x, y, x+w, y+h); canvas.fillRectangle(x, y, x+w, y+h);
#endif #endif
} }
@ -235,7 +235,7 @@ void Display::fillRectangle(unsigned x, unsigned y, unsigned w, unsigned h, colo
#elif defined(USE_ESPI) #elif defined(USE_ESPI)
espi.fillRect(x, y, w, h, col); espi.fillRect(x, y, w, h, col);
#elif defined(USE_VGA) #elif defined(USE_VGA)
canvas.setPenColor(rgb(col)); canvas.setBrushColor(rgb(col));
canvas.drawRectangle(x, y, x+w, y+h); canvas.drawRectangle(x, y, x+w, y+h);
#endif #endif
} }

View File

@ -22,10 +22,12 @@
#define KBD_DATA D4 #define KBD_DATA D4
// SPI-RAM // SPI-RAM
#if !defined(NO_SPIRAM)
#define USE_SPIRAM #define USE_SPIRAM
#define SPIRAM_DEV SPI #define SPIRAM_DEV SPI
#define SPIRAM_CS D0 #define SPIRAM_CS D0
#define SPIRAM_SIZE 0x8000u #define SPIRAM_SIZE 0x8000u
#endif
// flash storage // flash storage
#if !defined(NO_STORAGE) #if !defined(NO_STORAGE)

View File

@ -28,10 +28,12 @@
#define KBD_DATA 34 #define KBD_DATA 34
#define KBD_IRQ 35 #define KBD_IRQ 35
// storage // Storage
#if !defined(NO_STORAGE)
#undef USE_SD #undef USE_SD
#undef USE_LITTLEFS #undef USE_LITTLEFS
#define USE_SPIFFS #define USE_SPIFFS
#endif
// sound: dac and pwm // sound: dac and pwm
#define DAC_SOUND 25 #define DAC_SOUND 25

View File

@ -7,12 +7,15 @@
#define KBD_DATA PE_4 #define KBD_DATA PE_4
#define KBD_IRQ PE_5 #define KBD_IRQ PE_5
// "tape" storage... // Storage
#if !defined(NO_STORAGE)
#define USE_SD #define USE_SD
#define SD_CS PF_3 #define SD_CS PF_3
#define SD_SPI 1 #define SD_SPI 1
#endif
// 23k256 SPI-RAM // 23k256 SPI-RAM
#if !defined(NO_SPIRAM)
#define USE_SPIRAM #define USE_SPIRAM
#define SPI_CS PF_3 #define SPI_CS PF_3
#define SPIRAM_CS PE_0 #define SPIRAM_CS PE_0
@ -20,6 +23,7 @@
#define SPIRAM_MODULE 1 #define SPIRAM_MODULE 1
#define SPIRAM_CLKDIV 1 #define SPIRAM_CLKDIV 1
#define SPIRAM_SIZE 0x8000u #define SPIRAM_SIZE 0x8000u
#endif
// TFT display... // TFT display...
// NOTE: edit memorysaver.h to select the correct chip for your display! // NOTE: edit memorysaver.h to select the correct chip for your display!

View File

@ -20,7 +20,9 @@
#define DAC_SOUND 25 #define DAC_SOUND 25
#define PWM_SOUND 25 #define PWM_SOUND 25
// "tape" storage... // Storage
#if !defined(NO_STORAGE)
#undef USE_SD #undef USE_SD
#undef USE_LITTLEFS #undef USE_LITTLEFS
#define USE_SPIFFS #define USE_SPIFFS
#endif

View File

@ -3,9 +3,9 @@
#include "timed.h" #include "timed.h"
#include "sound_dac.h" #include "sound_dac.h"
#if defined(DAC_SOUND) && defined(ESP_PLATFORM)
static DAC *s; static DAC *s;
#if defined(DAC_SOUND) && defined(ESP_PLATFORM)
#include <driver/dac.h> #include <driver/dac.h>
static portMUX_TYPE mux = portMUX_INITIALIZER_UNLOCKED; static portMUX_TYPE mux = portMUX_INITIALIZER_UNLOCKED;