Compare commits

...

4 Commits

Author SHA1 Message Date
Stephen Crane 972626cffd
Update README.md
remove dependency on PS2Keyboard
2023-08-30 17:01:04 +01:00
steve be80014d06 tiny bugfix 2023-08-30 14:38:41 +01:00
steve 12bed84629 debugging 2023-08-30 14:01:30 +01:00
steve 2273388b06 configure VGA resolution 2023-08-30 09:59:31 +01:00
4 changed files with 17 additions and 7 deletions

View File

@ -44,10 +44,6 @@ These are optional if the target board supports it (e.g., esp8266 or esp32 board
- [Rei Vilo's port](https://github.com/rei-vilo/SD_TM4C) of Adafruit/Sparkfun's [SD library](https://github.com/adafruit/SD),
- [My port](https://github.com/jscrane/SpiRAM) of Phil Stewart's [SpiRAM library](http://playground.arduino.cc/Main/SpiRAM)
Input
------
- [PS2Keyboard](https://github.com/jscrane/PS2Keyboard)
Hardware
---------
- A [Stellaris Launchpad](http://www.energia.nu/Guide_StellarisLaunchPad.html) _or_
@ -57,4 +53,3 @@ ESP32-based board, e.g., [Node32s](https://www.esp32.com/viewtopic.php?t=459),
- 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 PS/2 keyboard.

View File

@ -61,6 +61,11 @@ void Display::begin(colour_t bg, colour_t fg, orientation_t orient, unsigned dis
_yoff = (_dy - dispy) / 2;
_dx -= _xoff;
_dy -= _yoff;
#if defined(DEBUGGING)
Serial.printf("xoff %d yoff %d dx %d dy %d", _xoff, _yoff, _dx, _dy);
Serial.println();
#endif
}
void Display::begin(colour_t bg, colour_t fg, orientation_t orient) {
@ -92,7 +97,7 @@ void Display::begin(colour_t bg, colour_t fg, orientation_t orient) {
vga.end();
init = true;
vga.begin();
vga.setResolution(VGA_480x300_75Hz);
vga.setResolution(VGA_RESOLUTION);
canvas.setBrushColor(rgb(_bg));
canvas.clear();
@ -102,6 +107,12 @@ void Display::begin(colour_t bg, colour_t fg, orientation_t orient) {
_cx = canvas.getFontInfo()->width;
_dx = canvas.getWidth();
_dy = canvas.getHeight();
#if defined(DEBUGGING)
Serial.printf("w %d h %d", _dx, _dy);
Serial.println();
#endif
#endif
setColor(fg);

View File

@ -15,7 +15,7 @@ void hardware_init(class CPU &);
void hardware_checkpoint(class Stream &);
void hardware_restore(class Stream &);
#ifdef __PS2DRV_H__
#if defined(__PS2DRV_H__) && defined(USE_KBD)
extern class PS2Driver ps2;
#endif
#if defined(__SPIRAM_H__) && defined(USE_SPIRAM)

View File

@ -3,6 +3,10 @@
// Display
#define USE_VGA
#if !defined(VGA_RESOLUTION)
#define VGA_RESOLUTION VGA_480x300_75Hz
//#define VGA_RESOLUTION VGA_320x200_75HzRetro
#endif
// PS/2 Keyboard
#define USE_KBD