2018-06-03 08:11:58 +00:00
|
|
|
// Pi1541 - A Commodore 1541 disk drive emulator
|
|
|
|
// Copyright(C) 2018 Stephen White
|
|
|
|
//
|
|
|
|
// This file is part of Pi1541.
|
|
|
|
//
|
|
|
|
// Pi1541 is free software : you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// Pi1541 is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Pi1541. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
#ifndef SCREENLCD_H
|
|
|
|
#define SCREENLCD_H
|
|
|
|
|
|
|
|
#include "ScreenBase.h"
|
|
|
|
#include "SSD1306.h"
|
|
|
|
|
|
|
|
class ScreenLCD : public ScreenBase
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
ScreenLCD()
|
|
|
|
: ScreenBase()
|
|
|
|
, ssd1306(0)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-06-21 23:31:13 +00:00
|
|
|
void Open(u32 width, u32 height, u32 colourDepth, int BSCMaster, int LCDAddress, int LCDFlip, int LCDType);
|
2018-06-03 08:11:58 +00:00
|
|
|
|
|
|
|
void ClearArea(u32 x1, u32 y1, u32 x2, u32 y2, RGBA colour);
|
|
|
|
void Clear(RGBA colour);
|
|
|
|
|
2018-06-22 12:32:54 +00:00
|
|
|
void SetContrast(u8 value);
|
|
|
|
|
2018-06-03 08:11:58 +00:00
|
|
|
void ScrollArea(u32 x1, u32 y1, u32 x2, u32 y2);
|
|
|
|
|
|
|
|
void WriteChar(bool petscii, u32 x, u32 y, unsigned char c, RGBA colour);
|
|
|
|
u32 PrintText(bool petscii, u32 xPos, u32 yPos, char *ptr, RGBA TxtColour = RGBA(0xff, 0xff, 0xff, 0xff), RGBA BkColour = RGBA(0, 0, 0, 0xFF), bool measureOnly = false, u32* width = 0, u32* height = 0);
|
|
|
|
u32 MeasureText(bool petscii, char *ptr, u32* width = 0, u32* height = 0);
|
|
|
|
|
|
|
|
void PlotPixel(u32 x, u32 y, RGBA colour);
|
|
|
|
|
|
|
|
void PlotImage(u32* image, int x, int y, int w, int h);
|
|
|
|
|
2018-07-03 11:26:01 +00:00
|
|
|
void PlotRawImage(const u8* image, int x, int y, int w, int h);
|
|
|
|
|
2018-06-03 08:11:58 +00:00
|
|
|
u32 GetFontHeight();
|
|
|
|
|
|
|
|
void SwapBuffers();
|
2018-07-03 11:26:01 +00:00
|
|
|
void RefreshScreen();
|
2018-06-03 08:11:58 +00:00
|
|
|
|
2018-06-06 09:09:13 +00:00
|
|
|
void RefreshRows(u8 start, u8 amountOfRows);
|
|
|
|
|
2018-06-03 08:11:58 +00:00
|
|
|
private:
|
|
|
|
SSD1306* ssd1306 = 0;
|
|
|
|
};
|
|
|
|
|
2018-06-07 09:00:39 +00:00
|
|
|
#endif
|