Compare commits
36 Commits
mp-2025_10
...
0.0.22
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
636fc026aa | ||
|
|
06f006ee42 | ||
|
|
f9a6e4b1d7 | ||
|
|
9e8a7c338d | ||
|
|
202439b8b6 | ||
|
|
077e5cbedb | ||
|
|
3083b433a3 | ||
|
|
dbba5617c7 | ||
|
|
d8058dc711 | ||
|
|
db6d28b869 | ||
|
|
b520ccb165 | ||
|
|
059654b16f | ||
|
|
5dcb48d671 | ||
|
|
f6e852be74 | ||
|
|
defd869c26 | ||
|
|
ceaf0e0ee5 | ||
|
|
35557d7b22 | ||
|
|
102f4e65e3 | ||
|
|
fbcfd65e7f | ||
|
|
520f371560 | ||
|
|
f8c914538a | ||
|
|
049d651fec | ||
|
|
ece4fe824a | ||
|
|
03f794b253 | ||
|
|
29f74c0eae | ||
|
|
e82c1cbe5c | ||
|
|
9a37bae20d | ||
|
|
783815427a | ||
|
|
9300e515e7 | ||
|
|
660f2502c1 | ||
|
|
5b72686904 | ||
|
|
e58e9b846c | ||
|
|
b4fee78ad8 | ||
|
|
06d287b53d | ||
|
|
7c5abc0f3b | ||
|
|
1b0145c97d |
2
0BUILD
2
0BUILD
@@ -2,7 +2,7 @@
|
||||
|
||||
<gwbuild>
|
||||
|
||||
<project name="aqhome" version="0.0.19" so_current="0" so_age="0" so_revision="19" write_config_h="TRUE">
|
||||
<project name="aqhome" version="0.0.22" so_current="0" so_age="0" so_revision="22" write_config_h="TRUE">
|
||||
<setVar name="package">$(project_name)</setVar>
|
||||
<setVar name="version">
|
||||
$(project_vmajor).$(project_vminor).$(project_vpatchlevel)
|
||||
|
||||
@@ -17,6 +17,14 @@
|
||||
|
||||
#include <gwenhywfar/debug.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
@@ -680,5 +688,133 @@ AQH_USER_LIST *AQH_ModService_LoadRawUsers(AQH_MODULE *m)
|
||||
|
||||
|
||||
|
||||
void AQH_ModService_EscapeToBuffer(const char *src, GWEN_BUFFER *buf)
|
||||
{
|
||||
while (*src) {
|
||||
unsigned char x;
|
||||
|
||||
x=(unsigned char)*src;
|
||||
if (!(
|
||||
(x>='A' && x<='Z') ||
|
||||
(x>='a' && x<='z') ||
|
||||
(x>='0' && x<='9') ||
|
||||
NULL!=strchr("-_", x)
|
||||
)) {
|
||||
unsigned char c;
|
||||
|
||||
GWEN_Buffer_AppendByte(buf, '%');
|
||||
c=(((unsigned char)(*src))>>4)&0xf;
|
||||
if (c>9)
|
||||
c+=7;
|
||||
c+='0';
|
||||
GWEN_Buffer_AppendByte(buf, c);
|
||||
c=((unsigned char)(*src))&0xf;
|
||||
if (c>9)
|
||||
c+=7;
|
||||
c+='0';
|
||||
GWEN_Buffer_AppendByte(buf, c);
|
||||
}
|
||||
else
|
||||
GWEN_Buffer_AppendByte(buf, *src);
|
||||
|
||||
src++;
|
||||
} /* while */
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AQH_ModService_UnescapeToBuffer(const char *src, GWEN_BUFFER *buf)
|
||||
{
|
||||
while (*src) {
|
||||
int charHandled=0;
|
||||
|
||||
if (*src=='%') {
|
||||
if (strlen(src)>2) {
|
||||
unsigned char d1, d2;
|
||||
unsigned char c;
|
||||
|
||||
if (isxdigit((int)src[1]) && isxdigit((int)src[2])) {
|
||||
/* skip '%' */
|
||||
src++;
|
||||
/* read first digit */
|
||||
d1=(unsigned char)(toupper(*src));
|
||||
|
||||
/* get second digit */
|
||||
src++;
|
||||
d2=(unsigned char)(toupper(*src));
|
||||
/* compute character */
|
||||
d1-='0';
|
||||
if (d1>9)
|
||||
d1-=7;
|
||||
c=(d1<<4)&0xf0;
|
||||
d2-='0';
|
||||
if (d2>9)
|
||||
d2-=7;
|
||||
c+=(d2&0xf);
|
||||
/* store character */
|
||||
GWEN_Buffer_AppendByte(buf, (char)c);
|
||||
charHandled=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!charHandled)
|
||||
GWEN_Buffer_AppendByte(buf, *src);
|
||||
src++;
|
||||
} /* while */
|
||||
}
|
||||
|
||||
|
||||
|
||||
int AQH_ModService_FileIsCurrent(const char *sPath, int seconds)
|
||||
{
|
||||
struct stat sb;
|
||||
time_t t1;
|
||||
|
||||
if (lstat(sPath, &sb)==-1) {
|
||||
DBG_ERROR(NULL, "Error on lstat(%s): %s (%d)", sPath, strerror(errno), errno);
|
||||
return 0;
|
||||
}
|
||||
t1=time(0);
|
||||
if ((t1-sb.st_mtime)<(time_t) seconds) {
|
||||
DBG_DEBUG(NULL, "File %s is current", sPath);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int AQH_ModService_RespondWithMimeFile(AQCGI_REQUEST *rq, const char *sFilename, const char *sMimeType, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
GWEN_BUFFER *ibuf;
|
||||
int rv;
|
||||
|
||||
ibuf=GWEN_Buffer_new(0, 1024, 0, 1);
|
||||
/* read file */
|
||||
rv=GWEN_SyncIo_Helper_ReadFile(sFilename, ibuf);
|
||||
if (rv<0) {
|
||||
DBG_ERROR(NULL, "Error reading \"%s\" (%d)", sFilename, rv);
|
||||
return rv;
|
||||
}
|
||||
else {
|
||||
GWEN_Buffer_Reset(dbuf);
|
||||
GWEN_Buffer_AppendBytes(dbuf, GWEN_Buffer_GetStart(ibuf), GWEN_Buffer_GetUsedBytes(ibuf));
|
||||
|
||||
if (sMimeType && *sMimeType) {
|
||||
GWEN_BUFFER *tbuf;
|
||||
|
||||
tbuf=GWEN_Buffer_new(0, 256, 0, 1);
|
||||
GBAA(tbuf, "Content-type: %s", sMimeType);
|
||||
AQCGI_Request_AddResponseHeaderData(rq, GWEN_Buffer_GetStart(tbuf));
|
||||
GWEN_Buffer_free(tbuf);
|
||||
}
|
||||
AQCGI_Request_AddFlags(rq, AQH_MODSERVICE_RQFLAGS_RAWFILE);
|
||||
}
|
||||
GWEN_Buffer_free(ibuf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -80,6 +80,12 @@ void AQH_ModService_SetLoadSubModuleFn(AQH_MODULE *m, AQH_MODSERVICE_LOADSUBMODU
|
||||
void AQH_ModService_SetAddHeaderFn(AQH_MODULE *m, AQH_MODSERVICE_ADDHEADER_FN fn);
|
||||
void AQH_ModService_SetAddFooterFn(AQH_MODULE *m, AQH_MODSERVICE_ADDFOOTER_FN fn);
|
||||
|
||||
void AQH_ModService_EscapeToBuffer(const char *src, GWEN_BUFFER *buf);
|
||||
void AQH_ModService_UnescapeToBuffer(const char *src, GWEN_BUFFER *buf);
|
||||
|
||||
int AQH_ModService_FileIsCurrent(const char *sPath, int seconds);
|
||||
|
||||
int AQH_ModService_RespondWithMimeFile(AQCGI_REQUEST *rq, const char *sFilename, const char *sMimeType, GWEN_BUFFER *dbuf);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
mdevices_vgraph.h
|
||||
mdevices_device.h
|
||||
mdevices_setdevice.h
|
||||
mdevices_page.h
|
||||
</headers>
|
||||
|
||||
|
||||
@@ -81,6 +82,7 @@
|
||||
mdevices_vgraph.c
|
||||
mdevices_device.c
|
||||
mdevices_setdevice.c
|
||||
mdevices_page.c
|
||||
</sources>
|
||||
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "aqhome-cgi/modules/devices/mdevices_vgraph.h"
|
||||
#include "aqhome-cgi/modules/devices/mdevices_device.h"
|
||||
#include "aqhome-cgi/modules/devices/mdevices_setdevice.h"
|
||||
#include "aqhome-cgi/modules/devices/mdevices_page.h"
|
||||
#include "aqhome-cgi/service/module.h"
|
||||
#include "aqhome-cgi/modules/mdataclient.h"
|
||||
|
||||
@@ -61,6 +62,11 @@ static void _handleRqSetDataPost(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *
|
||||
static void _handleRqGraphGet(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, GWEN_BUFFER *dbuf);
|
||||
static void _handleRqDeviceGet(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, GWEN_BUFFER *dbuf);
|
||||
static void _handleRqDevicePost(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, GWEN_BUFFER *dbuf);
|
||||
static void _handleRqPageGet(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, GWEN_BUFFER *dbuf);
|
||||
static void _handleRqPagePost(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, GWEN_BUFFER *dbuf);
|
||||
static void _handleRqPageGraphGet(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, GWEN_BUFFER *dbuf);
|
||||
|
||||
static AQDG_GRAPH_DATAPAIR_LIST *_createDataPairListFromDataPoints(const uint64_t *dataPoints, uint64_t numValues);
|
||||
|
||||
static void _addValueActionToForm(const AQH_VALUE *value, GWEN_BUFFER *dbuf);
|
||||
static void _addLastValueToForm(AQH_DATACLIENT *dc, const AQH_VALUE *value, GWEN_BUFFER *dbuf);
|
||||
@@ -81,6 +87,9 @@ static AQH_MODSERVICE_HANDLER_ENTRY _requestTable[]={
|
||||
{"value.html", AQCGI_REQUEST_METHOD_GET, P_DEVICEREAD | P_VALUEREAD, _handleRqValueGet},
|
||||
{"setdata.html", AQCGI_REQUEST_METHOD_POST, P_VALUEWRITE, _handleRqSetDataPost},
|
||||
{"graph.html", AQCGI_REQUEST_METHOD_GET, P_DEVICEREAD | P_VALUEREAD, _handleRqGraphGet},
|
||||
{"page.html", AQCGI_REQUEST_METHOD_GET, P_DEVICEREAD | P_VALUEREAD, _handleRqPageGet},
|
||||
{"page.html", AQCGI_REQUEST_METHOD_POST, P_VALUEWRITE, _handleRqPagePost},
|
||||
{"pgraph.html", AQCGI_REQUEST_METHOD_GET, P_DEVICEREAD | P_VALUEREAD, _handleRqPageGraphGet},
|
||||
{NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -171,6 +180,26 @@ void _handleRqDevicePost(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session,
|
||||
|
||||
|
||||
|
||||
void _handleRqPageGet(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
AQH_ModDataClient_HandleRequest(m, rq, session, AQH_ModDevices_RunPageGet, dbuf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _handleRqPagePost(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
AQH_ModDataClient_HandleRequest(m, rq, session, AQH_ModDevices_RunPagePost, dbuf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _handleRqPageGraphGet(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
AQH_ModDataClient_HandleRequest(m, rq, session, AQH_ModDevices_RunPageGraph, dbuf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -227,6 +256,44 @@ uint32_t AQH_ModDevices_RgbwToHtmlColor(uint32_t colorIn)
|
||||
|
||||
|
||||
|
||||
uint32_t AQH_ModDevices_RgbwFromComponents(int r, int g, int b, int w)
|
||||
{
|
||||
uint32_t colorOut;
|
||||
|
||||
colorOut=((r & 0xff)<<16) | ((g & 0xff)<<24) | (b & 0xff) | ((w & 0xff)<<8);
|
||||
return colorOut;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int AQH_ModDevices_RgbwGetR(uint32_t color)
|
||||
{ /* GGRRWWBB */
|
||||
return (color & 0x00ff0000)>>16;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int AQH_ModDevices_RgbwGetG(uint32_t color)
|
||||
{ /* GGRRWWBB */
|
||||
return (color & 0xff000000)>>24;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int AQH_ModDevices_RgbwGetB(uint32_t color)
|
||||
{ /* GGRRWWBB */
|
||||
return (color & 0x000000ff);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int AQH_ModDevices_RgbwGetW(uint32_t color)
|
||||
{ /* GGRRWWBB */
|
||||
return (color & 0x0000ff00)>>8;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _addValueActionToForm(const AQH_VALUE *value, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
const char *sValueName;
|
||||
@@ -392,4 +459,107 @@ AQH_DEVICE *AQH_ModDevices_GetDevice(AQH_DATACLIENT *dc, const char *sDeviceName
|
||||
|
||||
|
||||
|
||||
int AQH_ModDevices_ValueGetLastDataAsInt(AQH_DATACLIENT *dc, const AQH_VALUE *value, int defaultValue)
|
||||
{
|
||||
const char *sValueSystemName;
|
||||
uint64_t dataPoints[2];
|
||||
uint64_t recvdNum;
|
||||
// uint64_t timestamp;
|
||||
union {double f; uint64_t i;} u;
|
||||
int intVal;
|
||||
|
||||
sValueSystemName=AQH_Value_GetNameForSystem(value);
|
||||
recvdNum=AQH_DataClient_GetLastData(dc, sValueSystemName, &dataPoints[0], 1);
|
||||
if (recvdNum>0) {
|
||||
// timestamp=dataPoints[0];
|
||||
u.i=dataPoints[1];
|
||||
intVal=(int) u.f;
|
||||
}
|
||||
else {
|
||||
DBG_INFO(NULL, "No last value for \"%s\"", sValueSystemName);
|
||||
intVal=defaultValue;
|
||||
}
|
||||
|
||||
return intVal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
uint32_t AQH_ModDevices_ValueGetLastDataAsUint32(AQH_DATACLIENT *dc, const AQH_VALUE *value, uint32_t defaultValue)
|
||||
{
|
||||
const char *sValueSystemName;
|
||||
uint64_t dataPoints[2];
|
||||
uint64_t recvdNum;
|
||||
// uint64_t timestamp;
|
||||
union {double f; uint64_t i;} u;
|
||||
uint32_t uintVal;
|
||||
|
||||
sValueSystemName=AQH_Value_GetNameForSystem(value);
|
||||
recvdNum=AQH_DataClient_GetLastData(dc, sValueSystemName, &dataPoints[0], 1);
|
||||
if (recvdNum>0) {
|
||||
// timestamp=dataPoints[0];
|
||||
u.i=dataPoints[1];
|
||||
uintVal=(uint32_t) u.f;
|
||||
DBG_ERROR(NULL, "Transformed value %.2f -> %08x", u.f, uintVal);
|
||||
}
|
||||
else {
|
||||
DBG_INFO(NULL, "No last value for \"%s\"", sValueSystemName);
|
||||
uintVal=defaultValue;
|
||||
}
|
||||
|
||||
return uintVal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
AQDG_GRAPH_DATAPAIR_LIST *AQH_ModDevices_RequestDataPairList(AQH_DATACLIENT *dc, const char *systemValueName,
|
||||
uint64_t tsBegin, uint64_t tsEnd, uint64_t num)
|
||||
{
|
||||
uint64_t *dataPoints;
|
||||
uint64_t recvdNum;
|
||||
|
||||
dataPoints=malloc(num*sizeof(uint64_t)*2);
|
||||
|
||||
recvdNum=AQH_DataClient_GetPeriodData(dc, systemValueName, dataPoints, num, tsBegin, tsEnd);
|
||||
if (recvdNum>0) {
|
||||
AQDG_GRAPH_DATAPAIR_LIST *dpList;
|
||||
|
||||
dpList=_createDataPairListFromDataPoints(dataPoints, recvdNum);
|
||||
free(dataPoints);
|
||||
return dpList;
|
||||
}
|
||||
else {
|
||||
DBG_ERROR(NULL, "No data received for %s", systemValueName);
|
||||
free(dataPoints);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
AQDG_GRAPH_DATAPAIR_LIST *_createDataPairListFromDataPoints(const uint64_t *dataPoints, uint64_t numValues)
|
||||
{
|
||||
AQDG_GRAPH_DATAPAIR_LIST *dpList;
|
||||
uint64_t i;
|
||||
|
||||
DBG_DEBUG(NULL, "Got %d datapoints", (int) numValues);
|
||||
dpList=AQDG_Graph_DataPair_List_new();
|
||||
for(i=0; i<numValues; i++) {
|
||||
AQDG_GRAPH_DATAPAIR *dp;
|
||||
double timestamp;
|
||||
union {double f; uint64_t i;} u;
|
||||
|
||||
timestamp=(double)(*(dataPoints++));
|
||||
u.i=*(dataPoints++);
|
||||
dp=AQDG_Graph_DataPair_new();
|
||||
AQDG_Graph_DataPair_SetValueX(dp, timestamp);
|
||||
AQDG_Graph_DataPair_SetValueY(dp, u.f);
|
||||
AQDG_Graph_DataPair_List_Add(dp, dpList);
|
||||
}
|
||||
AQDG_Graph_DataPair_List_SortByValueX(dpList, 1);
|
||||
return dpList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
#include <aqcgi/request.h>
|
||||
|
||||
#include <aqdiagram/graph/datapair.h>
|
||||
|
||||
#include <gwenhywfar/buffer.h>
|
||||
|
||||
|
||||
@@ -44,9 +46,23 @@ int AQH_ModDevices_Create(AQH_SERVICE *sv);
|
||||
uint32_t AQH_ModDevices_ColorFromHexString(const char *s);
|
||||
uint32_t AQH_ModDevices_HtmlColorToValueRGBW(uint32_t colorIn);
|
||||
uint32_t AQH_ModDevices_RgbwToHtmlColor(uint32_t colorIn);
|
||||
uint32_t AQH_ModDevices_RgbwFromComponents(int r, int g, int b, int w);
|
||||
|
||||
int AQH_ModDevices_RgbwGetR(uint32_t color);
|
||||
int AQH_ModDevices_RgbwGetG(uint32_t color);
|
||||
int AQH_ModDevices_RgbwGetB(uint32_t color);
|
||||
int AQH_ModDevices_RgbwGetW(uint32_t color);
|
||||
|
||||
|
||||
|
||||
|
||||
AQH_VALUE *AQH_ModDevices_GetValueForDevice(AQH_DATACLIENT *dc, const char *sDeviceName, const char *sValueName);
|
||||
AQH_DEVICE *AQH_ModDevices_GetDevice(AQH_DATACLIENT *dc, const char *sDeviceName);
|
||||
int AQH_ModDevices_ValueGetLastDataAsInt(AQH_DATACLIENT *dc, const AQH_VALUE *value, int defaultValue);
|
||||
uint32_t AQH_ModDevices_ValueGetLastDataAsUint32(AQH_DATACLIENT *dc, const AQH_VALUE *value, uint32_t defaultValue);
|
||||
|
||||
AQDG_GRAPH_DATAPAIR_LIST *AQH_ModDevices_RequestDataPairList(AQH_DATACLIENT *dc, const char *systemValueName,
|
||||
uint64_t tsBegin, uint64_t tsEnd, uint64_t num);
|
||||
|
||||
|
||||
|
||||
|
||||
961
apps/aqhome-cgi/modules/devices/mdevices_page.c
Normal file
961
apps/aqhome-cgi/modules/devices/mdevices_page.c
Normal file
@@ -0,0 +1,961 @@
|
||||
/****************************************************************************
|
||||
* This file is part of the project AqHome.
|
||||
* AqHome (c) by 2025 Martin Preuss, all rights reserved.
|
||||
*
|
||||
* The license for this file can be found in the file COPYING which you
|
||||
* should have received along with this file.
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "./mdevices_page.h"
|
||||
|
||||
#include "aqhome-cgi/service/module.h"
|
||||
#include "aqhome-cgi/modules/mdataclient.h"
|
||||
|
||||
#include <aqdiagram/graph/timegraph.h>
|
||||
#include <aqdiagram/graph/w_graph.h>
|
||||
#include <aqdiagram/draw/context_cairo.h>
|
||||
|
||||
#include <gwenhywfar/debug.h>
|
||||
#include <gwenhywfar/timestamp.h>
|
||||
#include <gwenhywfar/text.h>
|
||||
#include <gwenhywfar/directory.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* defs and enums
|
||||
* ------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define GBAS GWEN_Buffer_AppendString
|
||||
#define GBAA GWEN_Buffer_AppendArgs
|
||||
|
||||
|
||||
enum {
|
||||
MY_LAYOUT_NONE=0,
|
||||
MY_LAYOUT_HORIZONTAL,
|
||||
MY_LAYOUT_VERTICAL
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* forward declarations
|
||||
* ------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void _writePage(AQH_MODULE *m, AQH_DATACLIENT *dc, GWEN_XMLNODE *nPage, GWEN_BUFFER *dbuf);
|
||||
static void _writeItem(AQH_MODULE *m, AQH_DATACLIENT *dc, const char *sPageId, GWEN_XMLNODE *nItem, GWEN_BUFFER *dbuf);
|
||||
static void _writeActor(AQH_DATACLIENT *dc, const char *sPageId, GWEN_XMLNODE *n, int layout, GWEN_BUFFER *dbuf);
|
||||
static void _writeGraph(const char *sPageId, GWEN_XMLNODE *n, int layout, GWEN_BUFFER *dbuf);
|
||||
|
||||
static void _handlePageActor(AQCGI_REQUEST *rq, AQH_DATACLIENT *dc, const char *sActorId, GWEN_XMLNODE *nActor);
|
||||
static void _handlePageGraph(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_DATACLIENT *dc, const char *sGraphId, GWEN_XMLNODE *nGraph, GWEN_BUFFER *dbuf);
|
||||
static void _genPageGraph(AQH_DATACLIENT *dc, const char *sGraphId, const char *sFilename, GWEN_XMLNODE *nGraph);
|
||||
static void _addCurves(AQH_DATACLIENT *dc, AQDG_GRAPH *g, GWEN_XMLNODE *nGraph, uint64_t tsBegin, uint64_t tsEnd);
|
||||
static AQDG_GRAPH_DATAPAIR_LIST *_readCurveData(AQH_DATACLIENT *dc, GWEN_XMLNODE *nCurve, uint64_t tsBegin, uint64_t tsEnd);
|
||||
static uint64_t _parseTime(const char *s);
|
||||
static GWEN_XMLNODE *_getSubItemNode(GWEN_XMLNODE *nPage, const char *sId, const char *sElementName);
|
||||
static void _mkPathForGraph(AQH_MODULE *m, const char *sGraphId, GWEN_BUFFER *dbuf);
|
||||
static void _addGraphLink(const char *sPageId, const char *sGraphId, int w, int h, GWEN_BUFFER *dbuf);
|
||||
static void _writeRgbwToForm(const char *sValueName, uint32_t color, GWEN_BUFFER *dbuf);
|
||||
static void _writeOnOffToForm(const char *sValueName, int intVal, GWEN_BUFFER *dbuf);
|
||||
static void _writeOnOffAutoToForm(const char *sValueName, int intVal, GWEN_BUFFER *dbuf);
|
||||
static void _setRgbwData(AQH_DATACLIENT *dc, GWEN_DB_NODE *dbPost, const char *sValueName, const AQH_VALUE *value);
|
||||
static int _getColorComponent(GWEN_DB_NODE *dbPost, const char *sValueName, const char *sComponent, int defaultValue);
|
||||
static void _setOnOffData(AQH_DATACLIENT *dc, const AQH_VALUE *value, const char *sValue);
|
||||
static void _setOnOffAutoData(AQH_DATACLIENT *dc, const AQH_VALUE *value, const char *sValue);
|
||||
|
||||
static void _sendPageList(AQH_MODULE *m, GWEN_BUFFER *dbuf);
|
||||
static GWEN_STRINGLIST *_listPageFiles(AQH_MODULE *m);
|
||||
static GWEN_XMLNODE *_readPage(AQH_MODULE *m, const char *sPageName);
|
||||
static GWEN_XMLNODE *_readPageFile(const char *sFilename);
|
||||
static int _layoutFromString(const char *s);
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* code
|
||||
* ------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void AQH_ModDevices_RunPageGet(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, AQH_DATACLIENT *dc, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
GWEN_DB_NODE *dbQuery;
|
||||
const char *sPageId;
|
||||
|
||||
DBG_INFO(NULL, "RunPageGet");
|
||||
dbQuery=AQCGI_Request_GetDbQuery(rq);
|
||||
sPageId=dbQuery?GWEN_DB_GetCharValue(dbQuery, "page", 0, NULL):NULL;
|
||||
if (sPageId && *sPageId) {
|
||||
GWEN_XMLNODE *fileNode;
|
||||
|
||||
fileNode=_readPage(m, sPageId);
|
||||
if (fileNode) {
|
||||
GWEN_XMLNODE *nPage;
|
||||
|
||||
nPage=GWEN_XMLNode_FindFirstTag(fileNode, "page", NULL, NULL);
|
||||
if (nPage) {
|
||||
_writePage(m, dc, nPage, dbuf);
|
||||
AQCGI_Request_AddResponseHeaderData(rq, "Refresh: 120");
|
||||
}
|
||||
else {
|
||||
DBG_ERROR(NULL, "No page element in file for \"%s\"", sPageId);
|
||||
}
|
||||
GWEN_XMLNode_free(fileNode);
|
||||
}
|
||||
else {
|
||||
DBG_INFO(NULL, "here");
|
||||
}
|
||||
}
|
||||
else {
|
||||
DBG_ERROR(NULL, "Reading page list");
|
||||
_sendPageList(m, dbuf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AQH_ModDevices_RunPageGraph(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, AQH_DATACLIENT *dc, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
GWEN_DB_NODE *dbQuery;
|
||||
const char *sPageId;
|
||||
const char *sGraphId;
|
||||
|
||||
DBG_INFO(NULL, "RunPageGraphGet");
|
||||
dbQuery=AQCGI_Request_GetDbQuery(rq);
|
||||
sPageId=GWEN_DB_GetCharValue(dbQuery, "page", 0, NULL);
|
||||
sGraphId=GWEN_DB_GetCharValue(dbQuery, "graph", 0, NULL);
|
||||
if (sPageId && *sPageId && sGraphId && *sGraphId) {
|
||||
GWEN_XMLNODE *fileNode;
|
||||
|
||||
fileNode=_readPage(m, sPageId);
|
||||
if (fileNode) {
|
||||
GWEN_XMLNODE *nPage;
|
||||
GWEN_XMLNODE *nGraph;
|
||||
|
||||
nPage=GWEN_XMLNode_FindFirstTag(fileNode, "page", "id", sPageId);
|
||||
nGraph=_getSubItemNode(nPage, sGraphId, "graph");
|
||||
if (nPage && nGraph)
|
||||
_handlePageGraph(m, rq, dc, sGraphId, nGraph, dbuf);
|
||||
else {
|
||||
DBG_ERROR(NULL, "Graph %s/%s not found", sPageId, sGraphId);
|
||||
}
|
||||
GWEN_XMLNode_free(fileNode);
|
||||
}
|
||||
else {
|
||||
DBG_INFO(NULL, "here");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AQH_ModDevices_RunPagePost(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, AQH_DATACLIENT *dc, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
GWEN_DB_NODE *dbPost;
|
||||
const char *sPageId;
|
||||
const char *sActorId;
|
||||
|
||||
DBG_INFO(NULL, "RunPagePost");
|
||||
dbPost=AQCGI_Request_GetDbPostBody(rq);
|
||||
sPageId=GWEN_DB_GetCharValue(dbPost, "page", 0, NULL);
|
||||
sActorId=GWEN_DB_GetCharValue(dbPost, "actor", 0, NULL);
|
||||
if (sPageId && *sPageId && sActorId && *sActorId) {
|
||||
GWEN_XMLNODE *fileNode;
|
||||
|
||||
fileNode=_readPage(m, sPageId);
|
||||
if (fileNode) {
|
||||
GWEN_XMLNODE *nPage;
|
||||
GWEN_XMLNODE *nActor;
|
||||
|
||||
nPage=GWEN_XMLNode_FindFirstTag(fileNode, "page", "id", sPageId);
|
||||
nActor=_getSubItemNode(nPage, sActorId, "actor");
|
||||
if (nPage && nActor) {
|
||||
_handlePageActor(rq, dc, sActorId, nActor);
|
||||
}
|
||||
else {
|
||||
DBG_ERROR(NULL, "Actor %s/%s not found", sPageId, sActorId);
|
||||
}
|
||||
GWEN_XMLNode_free(fileNode);
|
||||
}
|
||||
else {
|
||||
DBG_INFO(NULL, "here");
|
||||
}
|
||||
}
|
||||
|
||||
if (sPageId && *sPageId) {
|
||||
GWEN_BUFFER *pbuf;
|
||||
|
||||
pbuf=GWEN_Buffer_new(0, 256, 0, 1);
|
||||
GBAS(pbuf, "Location: page.html?page=");
|
||||
GWEN_Text_EscapeToBuffer(sPageId, pbuf);
|
||||
AQCGI_Request_AddResponseHeaderData(rq, GWEN_Buffer_GetStart(pbuf));
|
||||
GWEN_Buffer_free(pbuf);
|
||||
}
|
||||
AQCGI_Request_SetResponseCode(rq, 303);
|
||||
AQCGI_Request_SetResponseText(rq, "See other");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _handlePageActor(AQCGI_REQUEST *rq, AQH_DATACLIENT *dc, const char *sActorId, GWEN_XMLNODE *nActor)
|
||||
{
|
||||
GWEN_DB_NODE *dbPost;
|
||||
const char *sDeviceName;
|
||||
const char *sValueName;
|
||||
|
||||
dbPost=AQCGI_Request_GetDbPostBody(rq);
|
||||
sDeviceName=GWEN_XMLNode_GetProperty(nActor, "device", NULL);
|
||||
sValueName=GWEN_XMLNode_GetProperty(nActor, "value", NULL);
|
||||
|
||||
if (sDeviceName && *sDeviceName && sValueName && *sValueName) {
|
||||
AQH_VALUE *value;
|
||||
|
||||
value=AQH_ModDevices_GetValueForDevice(dc, sDeviceName, sValueName);
|
||||
if (value) {
|
||||
const char *sSystemValueName;
|
||||
|
||||
sSystemValueName=AQH_Value_GetNameForSystem(value);
|
||||
if (sSystemValueName) {
|
||||
const char *sData;
|
||||
|
||||
sData=GWEN_DB_GetCharValue(dbPost, sActorId, 0, NULL);
|
||||
DBG_INFO(NULL, "Setting value %s to %s", sSystemValueName, sData?sData:"empty/no value");
|
||||
switch(AQH_Value_GetModality(value)) {
|
||||
case AQH_ValueModality_RGBW: _setRgbwData(dc, dbPost, sActorId, value); break;
|
||||
case AQH_ValueModality_OnOff: _setOnOffData(dc, value, sData); break;
|
||||
case AQH_ValueModality_OnOffAuto: _setOnOffAutoData(dc, value, sData); break;
|
||||
default:
|
||||
break;
|
||||
} /* switch */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _handlePageGraph(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_DATACLIENT *dc, const char *sGraphId, GWEN_XMLNODE *nGraph, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
GWEN_BUFFER *fbuf;
|
||||
int refreshTime;
|
||||
|
||||
refreshTime=GWEN_XMLNode_GetIntProperty(nGraph, "refreshTime", 120);
|
||||
fbuf=GWEN_Buffer_new(0, 256, 0, 1);
|
||||
_mkPathForGraph(m, sGraphId, fbuf);
|
||||
if (!AQH_ModService_FileIsCurrent(GWEN_Buffer_GetStart(fbuf), refreshTime)) {
|
||||
_genPageGraph(dc, sGraphId, GWEN_Buffer_GetStart(fbuf), nGraph);
|
||||
}
|
||||
AQH_ModService_RespondWithMimeFile(rq, GWEN_Buffer_GetStart(fbuf), "image/png", dbuf);
|
||||
GWEN_Buffer_free(fbuf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _genPageGraph(AQH_DATACLIENT *dc, const char *sGraphId, const char *sFilename, GWEN_XMLNODE *nGraph)
|
||||
{
|
||||
const char *s;
|
||||
const char *sTitle;
|
||||
int w;
|
||||
int h;
|
||||
int precision;
|
||||
uint64_t tsBegin;
|
||||
uint64_t tsEnd;
|
||||
AQDG_GRAPH *g;
|
||||
AQDG_DRAW_CONTEXT *drawContext;
|
||||
AQDG_OBJECT *graphObject;
|
||||
uint32_t tickFlags=0;
|
||||
double upperLimit;
|
||||
double lowerLimit;
|
||||
|
||||
sTitle=GWEN_XMLNode_GetProperty(nGraph, "title", "untitled");
|
||||
w=GWEN_XMLNode_GetIntProperty(nGraph, "width", AQH_MODDEVICES_GRAPH_WIDTH);
|
||||
h=GWEN_XMLNode_GetIntProperty(nGraph, "height", AQH_MODDEVICES_GRAPH_HEIGHT);
|
||||
precision=GWEN_XMLNode_GetIntProperty(nGraph, "precision", 2);
|
||||
tsBegin=_parseTime(GWEN_XMLNode_GetProperty(nGraph, "begin", "-4h"));
|
||||
tsEnd=_parseTime(GWEN_XMLNode_GetProperty(nGraph, "end", "0"));
|
||||
|
||||
s=GWEN_XMLNode_GetProperty(nGraph, "lowerLimit", NULL);
|
||||
if (s && *s) {
|
||||
if (1==sscanf(s, "%lf", &lowerLimit))
|
||||
tickFlags|=AQDG_TIMEGRAPH_SETUPTICKS_FLAGS_MINY;
|
||||
else {
|
||||
DBG_ERROR(NULL, "Ignoring invalid lowerLimit (%s)", s);
|
||||
}
|
||||
}
|
||||
|
||||
s=GWEN_XMLNode_GetProperty(nGraph, "upperLimit", NULL);
|
||||
if (s && *s) {
|
||||
if (1==sscanf(s, "%lf", &upperLimit))
|
||||
tickFlags|=AQDG_TIMEGRAPH_SETUPTICKS_FLAGS_MAXY;
|
||||
else {
|
||||
DBG_ERROR(NULL, "Ignoring invalid upperLimit (%s)", s);
|
||||
}
|
||||
}
|
||||
|
||||
g=AQDG_TimeGraph_new(sTitle, NULL, "Value", NULL, precision);
|
||||
_addCurves(dc, g, nGraph, tsBegin, tsEnd);
|
||||
AQDG_TimeGraph_SetupTicks(g, tickFlags, lowerLimit, upperLimit);
|
||||
|
||||
DBG_DEBUG(NULL, "Draw graph for %s", sGraphId);
|
||||
drawContext=AQDG_Draw_ContextCairo_Png_new(sFilename, w, h);
|
||||
graphObject=AQDG_GraphWidget_new(NULL, AQDG_OBJECT_OPTIONS_STRETCHX | AQDG_OBJECT_OPTIONS_STRETCHY, drawContext);
|
||||
AQDG_Object_SetWidth(graphObject, w);
|
||||
AQDG_Object_SetHeight(graphObject, h);
|
||||
|
||||
AQDG_GraphWidget_SetupDefaultPens(graphObject);
|
||||
AQDG_GraphWidget_SetupDefaultFonts(graphObject);
|
||||
|
||||
AQDG_GraphWidget_FinishWithGraph(graphObject, g);
|
||||
|
||||
AQDG_Object_free(graphObject);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _addCurves(AQH_DATACLIENT *dc, AQDG_GRAPH *g, GWEN_XMLNODE *nGraph, uint64_t tsBegin, uint64_t tsEnd)
|
||||
{
|
||||
GWEN_XMLNODE *nCurve;
|
||||
|
||||
nCurve=GWEN_XMLNode_FindFirstTag(nGraph, "curve", NULL, NULL);
|
||||
while(nCurve) {
|
||||
const char *sModifier;
|
||||
|
||||
sModifier=GWEN_XMLNode_GetProperty(nCurve, "modifier", NULL);
|
||||
if (sModifier && *sModifier) {
|
||||
AQDG_GRAPH_DATAPAIR_LIST *dpList;
|
||||
|
||||
dpList=_readCurveData(dc, nCurve, tsBegin, tsEnd);
|
||||
if (dpList) {
|
||||
const char *sCurveLabel;
|
||||
|
||||
sCurveLabel=GWEN_XMLNode_GetProperty(nCurve, "title", NULL);
|
||||
DBG_DEBUG(NULL, "Adding data for %s", sCurveLabel?sCurveLabel:"<no title>");
|
||||
AQDG_TimeGraph_ModifyDataAndAddCurve(g, sCurveLabel?sCurveLabel:"<no title>", sModifier, dpList);
|
||||
}
|
||||
}
|
||||
nCurve=GWEN_XMLNode_FindNextTag(nCurve, "curve", NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
AQDG_GRAPH_DATAPAIR_LIST *_readCurveData(AQH_DATACLIENT *dc, GWEN_XMLNODE *nCurve, uint64_t tsBegin, uint64_t tsEnd)
|
||||
{
|
||||
const char *sDeviceName;
|
||||
const char *sValueName;
|
||||
|
||||
sDeviceName=GWEN_XMLNode_GetProperty(nCurve, "device", NULL);
|
||||
sValueName=GWEN_XMLNode_GetProperty(nCurve, "value", NULL);
|
||||
|
||||
if (sDeviceName && *sDeviceName && sValueName && *sValueName) {
|
||||
AQDG_GRAPH_DATAPAIR_LIST *dpList;
|
||||
GWEN_BUFFER *vbuf;
|
||||
|
||||
vbuf=GWEN_Buffer_new(0, 64, 0, 1);
|
||||
GBAA(vbuf, "%s/%s", sDeviceName, sValueName);
|
||||
dpList=AQH_ModDevices_RequestDataPairList(dc, GWEN_Buffer_GetStart(vbuf), tsBegin, tsEnd, 100000);
|
||||
if (dpList) {
|
||||
GWEN_Buffer_free(vbuf);
|
||||
return dpList;
|
||||
}
|
||||
GWEN_Buffer_free(vbuf);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO: move to aqhome.{c,h}
|
||||
uint64_t _parseTime(const char *s)
|
||||
{
|
||||
if (s && *s) {
|
||||
if (*s=='-') {
|
||||
uint64_t x=0;
|
||||
uint64_t now=time(NULL);
|
||||
|
||||
s++;
|
||||
while(*s && isdigit(*s)) {
|
||||
unsigned int i;
|
||||
|
||||
i=*(s++)-'0';
|
||||
x*=10;
|
||||
x+=i;
|
||||
}
|
||||
if (*s) {
|
||||
switch(*s) {
|
||||
case 0:
|
||||
case 'm': x*=60; break;
|
||||
case 'h': x*=(60*60); break;
|
||||
case 'd': x*=(60*60*24); break;
|
||||
case 'w': x*=(60*60*24*7); break;
|
||||
case 'M': x*=(60*60*24*30); break;
|
||||
case 'y': x*=(60*60*24*365); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
return (now-x);
|
||||
}
|
||||
if (*s=='@') {
|
||||
int y, m, d, H, M, S;
|
||||
|
||||
if (6==sscanf(s+1, "%d/%d/%d-%d:%d:%d", &y, &m, &d, &H, &M, &S)) {
|
||||
GWEN_TIMESTAMP *ts;
|
||||
uint64_t x=0;
|
||||
|
||||
ts=GWEN_Timestamp_new(y, m, d, H, M, S);
|
||||
x=GWEN_Timestamp_toTimeT(ts);
|
||||
GWEN_Timestamp_free(ts);
|
||||
return x;
|
||||
}
|
||||
else {
|
||||
DBG_ERROR(NULL, "Invalid timespec [%s], expected: @YYYY/MM/DD-HH:MM:SS", s);
|
||||
return (uint64_t) (-1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
unsigned long int x;
|
||||
|
||||
if (1!=sscanf(s, "%lu", &x)) {
|
||||
DBG_ERROR(NULL, "ERROR: Invalid timestamp");
|
||||
return (uint64_t) (-1);
|
||||
}
|
||||
return (uint64_t) x;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
GWEN_XMLNODE *_getSubItemNode(GWEN_XMLNODE *nPage, const char *sId, const char *sElementName)
|
||||
{
|
||||
GWEN_XMLNODE *nItem;
|
||||
|
||||
nItem=GWEN_XMLNode_FindFirstTag(nPage, "item", NULL, NULL);
|
||||
while(nItem) {
|
||||
GWEN_XMLNODE *nGraph;
|
||||
|
||||
nGraph=GWEN_XMLNode_FindFirstTag(nItem, sElementName, "id", sId);
|
||||
if (nGraph)
|
||||
return nGraph;
|
||||
nItem=GWEN_XMLNode_FindNextTag(nItem, "item", NULL, NULL);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _mkPathForGraph(AQH_MODULE *m, const char *sGraphId, GWEN_BUFFER *buf)
|
||||
{
|
||||
AQH_SERVICE *sv;
|
||||
const char *s;
|
||||
|
||||
sv=AQH_ModService_GetService(m);
|
||||
s=AQH_Service_GetCacheFolder(sv);
|
||||
GBAA(buf, "%s%s%s", s, GWEN_DIR_SEPARATOR_S, sGraphId);
|
||||
AQH_ModService_EscapeToBuffer(s, buf);
|
||||
GBAS(buf, ".png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _writePage(AQH_MODULE *m, AQH_DATACLIENT *dc, GWEN_XMLNODE *nPage, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
const char *sPageId;
|
||||
GWEN_XMLNODE *nItem;
|
||||
int layout;
|
||||
const char *s;
|
||||
|
||||
sPageId=GWEN_XMLNode_GetProperty(nPage, "id", NULL);
|
||||
|
||||
/* title */
|
||||
s=GWEN_XMLNode_GetProperty(nPage, "title", NULL);
|
||||
if (s && *s)
|
||||
GBAA(dbuf, "<h1>%s</h1>\n", s);
|
||||
|
||||
layout=_layoutFromString(GWEN_XMLNode_GetProperty(nPage, "layout", "none"));
|
||||
if (layout!=MY_LAYOUT_NONE)
|
||||
GBAS(dbuf, "<table class=\"pageTable\">\n");
|
||||
if (layout==MY_LAYOUT_HORIZONTAL)
|
||||
GBAS(dbuf, "<tr>\n");
|
||||
nItem=GWEN_XMLNode_FindFirstTag(nPage, "item", NULL, NULL);
|
||||
while(nItem) {
|
||||
if (layout==MY_LAYOUT_VERTICAL)
|
||||
GBAS(dbuf, "<tr>\n");
|
||||
|
||||
if (layout!=MY_LAYOUT_NONE)
|
||||
GBAS(dbuf, "<td>");
|
||||
_writeItem(m, dc, sPageId, nItem, dbuf);
|
||||
if (layout!=MY_LAYOUT_NONE)
|
||||
GBAS(dbuf, "</td>");
|
||||
|
||||
if (layout==MY_LAYOUT_VERTICAL)
|
||||
GBAS(dbuf, "</tr>\n");
|
||||
nItem=GWEN_XMLNode_FindNextTag(nItem, "item", NULL, NULL);
|
||||
} /* while */
|
||||
if (layout==MY_LAYOUT_HORIZONTAL)
|
||||
GBAS(dbuf, "</tr>\n");
|
||||
if (layout!=MY_LAYOUT_NONE)
|
||||
GBAS(dbuf, "</table> <!-- pageTable -->\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _writeItem(AQH_MODULE *m, AQH_DATACLIENT *dc, const char *sPageId, GWEN_XMLNODE *nItem, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
GWEN_XMLNODE *n;
|
||||
uint32_t perms;
|
||||
int layout;
|
||||
|
||||
perms=AQH_ModService_GetUserPerms(m);
|
||||
layout=_layoutFromString(GWEN_XMLNode_GetProperty(nItem, "layout", "none"));
|
||||
if (layout!=MY_LAYOUT_NONE)
|
||||
GBAS(dbuf, "<table class=\"itemTable\">\n");
|
||||
if (layout==MY_LAYOUT_HORIZONTAL)
|
||||
GBAS(dbuf, "<tr>\n");
|
||||
n=GWEN_XMLNode_GetFirstTag(nItem);
|
||||
while(n) {
|
||||
const char *sName;
|
||||
|
||||
if (layout==MY_LAYOUT_VERTICAL)
|
||||
GBAS(dbuf, "<tr>\n");
|
||||
sName=GWEN_XMLNode_GetData(n);
|
||||
if (sName && *sName) {
|
||||
if (strcasecmp(sName, "actor")==0) {
|
||||
if (perms && AQH_MODDEVICES_PERMS_VALUEWRITE)
|
||||
_writeActor(dc, sPageId, n, layout, dbuf);
|
||||
else {
|
||||
DBG_ERROR(NULL, "No permissions to write values");
|
||||
}
|
||||
|
||||
}
|
||||
else if (strcasecmp(sName, "graph")==0)
|
||||
_writeGraph(sPageId, n, layout, dbuf);
|
||||
else {
|
||||
DBG_ERROR(NULL, "Ignoring element \"%s\"", sName);
|
||||
}
|
||||
}
|
||||
if (layout==MY_LAYOUT_VERTICAL)
|
||||
GBAS(dbuf, "</tr>\n");
|
||||
n=GWEN_XMLNode_GetNextTag(n);
|
||||
}
|
||||
if (layout==MY_LAYOUT_HORIZONTAL)
|
||||
GBAS(dbuf, "</tr>\n");
|
||||
if (layout!=MY_LAYOUT_NONE)
|
||||
GBAS(dbuf, "</table> <!-- itemTable -->\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _writeActor(AQH_DATACLIENT *dc, const char *sPageId, GWEN_XMLNODE *n, int layout, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
const char *sActorId;
|
||||
const char *sDeviceName;
|
||||
const char *sValueName;
|
||||
const char *sLabel;
|
||||
|
||||
sActorId=GWEN_XMLNode_GetProperty(n, "id", NULL);
|
||||
sLabel=GWEN_XMLNode_GetProperty(n, "label", NULL);
|
||||
sDeviceName=GWEN_XMLNode_GetProperty(n, "device", NULL);
|
||||
sValueName=GWEN_XMLNode_GetProperty(n, "value", NULL);
|
||||
if (sActorId && *sActorId && sDeviceName && *sDeviceName && sValueName && *sValueName) {
|
||||
AQH_VALUE *value;
|
||||
|
||||
value=AQH_ModDevices_GetValueForDevice(dc, sDeviceName, sValueName);
|
||||
if (value) {
|
||||
uint32_t lastData;
|
||||
|
||||
if (layout!=MY_LAYOUT_NONE)
|
||||
GBAS(dbuf, "<td>\n");
|
||||
lastData=AQH_ModDevices_ValueGetLastDataAsUint32(dc, value, 0);
|
||||
GBAS(dbuf,"<form action=\"page.html\" method=\"post\">\n");
|
||||
GBAA(dbuf, "<input type=\"hidden\" name=\"page\" value=\"%s\">\n", sPageId);
|
||||
GBAA(dbuf, "<input type=\"hidden\" name=\"actor\" value=\"%s\">\n", sActorId);
|
||||
|
||||
DBG_INFO(NULL, "Adding actor");
|
||||
if (sLabel && *sLabel)
|
||||
GBAA(dbuf,"<label for=\"%s\">%s</label>", sActorId, sLabel);
|
||||
if (layout!=MY_LAYOUT_NONE) {
|
||||
GBAS(dbuf, "</td>\n");
|
||||
GBAS(dbuf, "<td>\n");
|
||||
}
|
||||
switch(AQH_Value_GetModality(value)) {
|
||||
case AQH_ValueModality_RGBW: _writeRgbwToForm(sActorId, lastData, dbuf); break;
|
||||
case AQH_ValueModality_OnOff: _writeOnOffToForm(sActorId, lastData, dbuf); break;
|
||||
case AQH_ValueModality_OnOffAuto: _writeOnOffAutoToForm(sActorId, lastData, dbuf); break;
|
||||
default: GBAA(dbuf, "%d", lastData); break;
|
||||
} /* switch */
|
||||
if (layout!=MY_LAYOUT_NONE) {
|
||||
GBAS(dbuf, "</td>\n");
|
||||
GBAS(dbuf, "<td>\n");
|
||||
}
|
||||
GBAS(dbuf,"<input type=\"submit\" name=\"action\" value=\"Send\"/>");
|
||||
GBAS(dbuf, "</form>\n\n");
|
||||
if (layout!=MY_LAYOUT_NONE)
|
||||
GBAS(dbuf, "</td>\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _writeGraph(const char *sPageId, GWEN_XMLNODE *n, int layout, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
const char *sGraphId;
|
||||
int w;
|
||||
int h;
|
||||
|
||||
w=GWEN_XMLNode_GetIntProperty(n, "width", AQH_MODDEVICES_GRAPH_WIDTH);
|
||||
h=GWEN_XMLNode_GetIntProperty(n, "height", AQH_MODDEVICES_GRAPH_HEIGHT);
|
||||
sGraphId=GWEN_XMLNode_GetProperty(n, "id", NULL);
|
||||
if (layout!=MY_LAYOUT_NONE)
|
||||
GBAS(dbuf, "<td colspan=\"3\">\n");
|
||||
if (sGraphId && *sGraphId)
|
||||
_addGraphLink(sPageId, sGraphId, w, h, dbuf);
|
||||
if (layout!=MY_LAYOUT_NONE)
|
||||
GBAS(dbuf, "</td>\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void _addGraphLink(const char *sPageId, const char *sGraphId, int w, int h, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
GBAS(dbuf, "<img src=\"pgraph.html?page=");
|
||||
AQH_ModService_EscapeToBuffer(sPageId, dbuf);
|
||||
GBAS(dbuf, "&graph=");
|
||||
AQH_ModService_EscapeToBuffer(sGraphId, dbuf);
|
||||
GBAA(dbuf, "\" alt=\"%s\" width=\"%d\" height=\"%d\"", sGraphId, w, h);
|
||||
GBAS(dbuf, "/>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void _writeRgbwToForm(const char *sValueName, uint32_t color, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
#if 1
|
||||
DBG_ERROR(NULL, "Color=%08x (%d, %d, %d, %d)",
|
||||
color,
|
||||
AQH_ModDevices_RgbwGetR(color),
|
||||
AQH_ModDevices_RgbwGetG(color),
|
||||
AQH_ModDevices_RgbwGetB(color),
|
||||
AQH_ModDevices_RgbwGetW(color));
|
||||
GBAA(dbuf, "<label for=\"%s_r\">R:</label>", sValueName);
|
||||
GBAA(dbuf, "<input type=\"number\" min=\"0\" max=\"255\" name=\"%s_r\" id=name=\"%s_r\" value=\"%d\">",
|
||||
sValueName, sValueName, AQH_ModDevices_RgbwGetR(color));
|
||||
|
||||
GBAA(dbuf, "<label for=\"%s_g\">G:</label>", sValueName);
|
||||
GBAA(dbuf, "<input type=\"number\" min=\"0\" max=\"255\" name=\"%s_g\" id=name=\"%s_g\" value=\"%d\">",
|
||||
sValueName, sValueName, AQH_ModDevices_RgbwGetG(color));
|
||||
|
||||
GBAA(dbuf, "<label for=\"%s_b\">B:</label>", sValueName);
|
||||
GBAA(dbuf, "<input type=\"number\" min=\"0\" max=\"255\" name=\"%s_b\" id=name=\"%s_b\" value=\"%d\">",
|
||||
sValueName, sValueName, AQH_ModDevices_RgbwGetB(color));
|
||||
|
||||
GBAA(dbuf, "<label for=\"%s_w\">W:</label>", sValueName);
|
||||
GBAA(dbuf, "<input type=\"number\" min=\"0\" max=\"255\" name=\"%s_w\" id=name=\"%s_w\" value=\"%d\">",
|
||||
sValueName, sValueName, AQH_ModDevices_RgbwGetW(color));
|
||||
|
||||
#else
|
||||
GBAA(dbuf, "<input type=\"text\" name=\"%s\" id=\"%s\" value=\"#%08x\"/>", sValueName, sValueName, color);
|
||||
// else
|
||||
GBAA(dbuf, "<input type=\"color\" name=\"%s\" id=\"%s\" value=\"#%08x\"/>#%08x (#%08x)",
|
||||
sValueName, sValueName,
|
||||
AQH_ModDevices_RgbwToHtmlColor(color),
|
||||
AQH_ModDevices_RgbwToHtmlColor(color),
|
||||
color);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _setRgbwData(AQH_DATACLIENT *dc, GWEN_DB_NODE *dbPost, const char *sValueName, const AQH_VALUE *value)
|
||||
{
|
||||
const char *sValueSystemName;
|
||||
uint32_t color;
|
||||
int rv;
|
||||
|
||||
sValueSystemName=AQH_Value_GetNameForSystem(value);
|
||||
DBG_INFO(NULL, "Set value %s", sValueName);
|
||||
color=AQH_ModDevices_RgbwFromComponents(_getColorComponent(dbPost, sValueName, "r", 0),
|
||||
_getColorComponent(dbPost, sValueName, "g", 0),
|
||||
_getColorComponent(dbPost, sValueName, "b", 0),
|
||||
_getColorComponent(dbPost, sValueName, "w", 0));
|
||||
DBG_INFO(NULL, "Send value [#%08x] to %s", color, sValueSystemName);
|
||||
rv=AQH_DataClient_SetData(dc, value, (double) color);
|
||||
if (rv<0) {
|
||||
DBG_INFO(NULL, "Error sending data: %d", rv);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int _getColorComponent(GWEN_DB_NODE *dbPost, const char *sValueName, const char *sComponent, int defaultValue)
|
||||
{
|
||||
GWEN_BUFFER *buf;
|
||||
const char *sData;
|
||||
int result;
|
||||
|
||||
buf=GWEN_Buffer_new(0, 64, 0, 1);
|
||||
GBAA(buf, "%s_%s", sValueName, sComponent);
|
||||
DBG_INFO(NULL, "Read value %s", GWEN_Buffer_GetStart(buf));
|
||||
sData=GWEN_DB_GetCharValue(dbPost, GWEN_Buffer_GetStart(buf), 0, NULL);
|
||||
GWEN_Buffer_free(buf);
|
||||
if (sData) {
|
||||
if (1==sscanf(sData, "%u", &result))
|
||||
return result;
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _writeOnOffToForm(const char *sValueName, int intVal, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
GBAA(dbuf, "<select name=\"%s\" id=\"%s\">" "<option value=\"unchanged\" >unchanged</option>", sValueName, sValueName);
|
||||
GBAA(dbuf, "<option value=\"off\" %s>off</option>", (intVal==0)?"selected":"");
|
||||
GBAA(dbuf, "<option value=\"on\" %s>on</option>", (intVal==1)?"selected":"");
|
||||
GBAS(dbuf, "</select>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _setOnOffData(AQH_DATACLIENT *dc, const AQH_VALUE *value, const char *sValue)
|
||||
{
|
||||
if (sValue) {
|
||||
const char *sValueSystemName;
|
||||
int rv;
|
||||
|
||||
sValueSystemName=AQH_Value_GetNameForSystem(value);
|
||||
if (strcasecmp(sValue, "unchanged")==0) {
|
||||
DBG_INFO(NULL, "Value %s unchanged", sValueSystemName);
|
||||
}
|
||||
else if (strcasecmp(sValue, "on")==0) {
|
||||
DBG_INFO(NULL, "Send value 1 to %s", sValueSystemName);
|
||||
rv=AQH_DataClient_SetData(dc, value, 1.0);
|
||||
if (rv<0) {
|
||||
DBG_INFO(NULL, "Error sending data: %d", rv);
|
||||
}
|
||||
}
|
||||
else if (strcasecmp(sValue, "off")==0) {
|
||||
DBG_INFO(NULL, "Send value 0 to %s", sValueSystemName);
|
||||
rv=AQH_DataClient_SetData(dc, value, 0.0);
|
||||
if (rv<0) {
|
||||
DBG_INFO(NULL, "Error sending data: %d", rv);
|
||||
}
|
||||
}
|
||||
else {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _writeOnOffAutoToForm(const char *sValueName, int intVal, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
GBAA(dbuf, "<select name=\"%s\" id=\"%s\" >" "<option value=\"unchanged\" >unchanged</option>", sValueName, sValueName);
|
||||
GBAA(dbuf, "<option value=\"off\" %s>off</option>", (intVal==0)?"selected":"");
|
||||
GBAA(dbuf, "<option value=\"on\" %s>on</option>", (intVal==1)?"selected":"");
|
||||
GBAA(dbuf, "<option value=\"auto\" %s>auto</option>", (intVal==2)?"selected":"");
|
||||
GBAS(dbuf, "</select>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _setOnOffAutoData(AQH_DATACLIENT *dc, const AQH_VALUE *value, const char *sValue)
|
||||
{
|
||||
if (sValue) {
|
||||
const char *sValueSystemName;
|
||||
int rv;
|
||||
|
||||
sValueSystemName=AQH_Value_GetNameForSystem(value);
|
||||
if (strcasecmp(sValue, "unchanged")==0) {
|
||||
DBG_INFO(NULL, "Value %s unchanged", sValueSystemName);
|
||||
}
|
||||
else if (strcasecmp(sValue, "on")==0) {
|
||||
DBG_INFO(NULL, "Send value 1 to %s", sValueSystemName);
|
||||
rv=AQH_DataClient_SetData(dc, value, 1.0);
|
||||
if (rv<0) {
|
||||
DBG_INFO(NULL, "Error sending data: %d", rv);
|
||||
}
|
||||
}
|
||||
else if (strcasecmp(sValue, "off")==0) {
|
||||
DBG_INFO(NULL, "Send value 0 to %s", sValueSystemName);
|
||||
rv=AQH_DataClient_SetData(dc, value, 0.0);
|
||||
if (rv<0) {
|
||||
DBG_INFO(NULL, "Error sending data: %d", rv);
|
||||
}
|
||||
}
|
||||
else if (strcasecmp(sValue, "auto")==0) {
|
||||
DBG_INFO(NULL, "Send value 2 to %s", sValueSystemName);
|
||||
rv=AQH_DataClient_SetData(dc, value, 2.0);
|
||||
if (rv<0) {
|
||||
DBG_INFO(NULL, "Error sending data: %d", rv);
|
||||
}
|
||||
}
|
||||
else {
|
||||
DBG_INFO(NULL, "Invalid value [%s] for %s", sValue, sValueSystemName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _sendPageList(AQH_MODULE *m, GWEN_BUFFER *dbuf)
|
||||
{
|
||||
GWEN_STRINGLIST *sl;
|
||||
|
||||
GBAS(dbuf, "<h1>Page List</h1>\n");
|
||||
sl=_listPageFiles(m);
|
||||
if (sl) {
|
||||
GWEN_STRINGLISTENTRY *se;
|
||||
|
||||
GBAS(dbuf,
|
||||
"<table class=\"datatable\">\n"
|
||||
"<thead><tr><th>Page</th><th>Title</th></tr></thead>\n"
|
||||
"<tbody>\n");
|
||||
se=GWEN_StringList_FirstEntry(sl);
|
||||
while(se) {
|
||||
const char *filename;
|
||||
|
||||
filename=GWEN_StringListEntry_Data(se);
|
||||
if (filename && *filename) {
|
||||
GWEN_XMLNODE *node;
|
||||
|
||||
DBG_ERROR(NULL, "Reading file \"%s\"", filename);
|
||||
node=_readPageFile(filename);
|
||||
if (node) {
|
||||
GWEN_XMLNODE *nPage;
|
||||
|
||||
nPage=GWEN_XMLNode_FindFirstTag(node, "page", NULL, NULL);
|
||||
if (nPage) {
|
||||
const char *sId;
|
||||
const char *sTitle;
|
||||
|
||||
sId=GWEN_XMLNode_GetProperty(nPage, "id", NULL);
|
||||
sTitle=GWEN_XMLNode_GetProperty(nPage, "title", sId);
|
||||
if (sId && *sId)
|
||||
GBAA(dbuf, "<tr><td><a href=\"page.html?page=%s\">%s</a></td><td>%s</td></tr>\n", sId, sId, sTitle);
|
||||
}
|
||||
GWEN_XMLNode_free(node);
|
||||
}
|
||||
}
|
||||
se=GWEN_StringListEntry_Next(se);
|
||||
}
|
||||
GBAS(dbuf, "</tbody></table>");
|
||||
GWEN_StringList_free(sl);
|
||||
}
|
||||
else {
|
||||
GBAS(dbuf, "No pages.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
GWEN_STRINGLIST *_listPageFiles(AQH_MODULE *m)
|
||||
{
|
||||
GWEN_BUFFER *fbuf;
|
||||
AQH_SERVICE *sv;
|
||||
GWEN_STRINGLIST *sl;
|
||||
int rv;
|
||||
|
||||
sv=AQH_ModService_GetService(m);
|
||||
fbuf=GWEN_Buffer_new(0, 256, 0, 1);
|
||||
GBAA(fbuf, "%s%spages", AQH_Service_GetRuntimeFolder(sv), GWEN_DIR_SEPARATOR_S);
|
||||
sl=GWEN_StringList_new();
|
||||
rv=GWEN_Directory_GetMatchingFilesRecursively(GWEN_Buffer_GetStart(fbuf), sl, "*.xml");
|
||||
if (rv<0) {
|
||||
DBG_INFO(NULL, "Error reading pages (%d)", rv);
|
||||
GWEN_StringList_free(sl);
|
||||
GWEN_Buffer_free(fbuf);
|
||||
return NULL;
|
||||
}
|
||||
if (GWEN_StringList_Count(sl)<1) {
|
||||
GWEN_StringList_free(sl);
|
||||
GWEN_Buffer_free(fbuf);
|
||||
return NULL;
|
||||
}
|
||||
GWEN_Buffer_free(fbuf);
|
||||
|
||||
return sl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
GWEN_XMLNODE *_readPage(AQH_MODULE *m, const char *sPageName)
|
||||
{
|
||||
GWEN_BUFFER *fbuf;
|
||||
AQH_SERVICE *sv;
|
||||
GWEN_XMLNODE *fileNode;
|
||||
|
||||
sv=AQH_ModService_GetService(m);
|
||||
fbuf=GWEN_Buffer_new(0, 256, 0, 1);
|
||||
GBAA(fbuf, "%s%spages%s", AQH_Service_GetRuntimeFolder(sv), GWEN_DIR_SEPARATOR_S, GWEN_DIR_SEPARATOR_S);
|
||||
AQH_ModService_EscapeToBuffer(sPageName, fbuf);
|
||||
GBAS(fbuf, ".xml");
|
||||
|
||||
fileNode=_readPageFile(GWEN_Buffer_GetStart(fbuf));
|
||||
if (fileNode==NULL) {
|
||||
DBG_INFO(NULL, "here");
|
||||
GWEN_Buffer_free(fbuf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GWEN_Buffer_free(fbuf);
|
||||
return fileNode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
GWEN_XMLNODE *_readPageFile(const char *sFilename)
|
||||
{
|
||||
GWEN_XMLNODE *fileNode;
|
||||
int rv;
|
||||
|
||||
fileNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, sFilename);
|
||||
rv=GWEN_XML_ReadFile(fileNode, sFilename, GWEN_XML_FLAGS_DEFAULT);
|
||||
if (rv<0) {
|
||||
DBG_ERROR(NULL, "Error reading \"%s\": %s (%d)", sFilename?sFilename:"<no name>", strerror(errno), errno);
|
||||
GWEN_XMLNode_free(fileNode);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return fileNode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int _layoutFromString(const char *s)
|
||||
{
|
||||
if (s && *s) {
|
||||
if (strcasecmp(s, "none")==0)
|
||||
return MY_LAYOUT_NONE;
|
||||
else if (strcasecmp(s, "horizontal")==0)
|
||||
return MY_LAYOUT_HORIZONTAL;
|
||||
else if (strcasecmp(s, "vertical")==0)
|
||||
return MY_LAYOUT_VERTICAL;
|
||||
}
|
||||
return MY_LAYOUT_NONE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
29
apps/aqhome-cgi/modules/devices/mdevices_page.h
Normal file
29
apps/aqhome-cgi/modules/devices/mdevices_page.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/****************************************************************************
|
||||
* This file is part of the project AqHome.
|
||||
* AqHome (c) by 2025 Martin Preuss, all rights reserved.
|
||||
*
|
||||
* The license for this file can be found in the file COPYING which you
|
||||
* should have received along with this file.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef AQHOME_CGI_MDEVICES_PAGE_H
|
||||
#define AQHOME_CGI_MDEVICES_PAGE_H
|
||||
|
||||
|
||||
#include "aqhome-cgi/modules/devices/mdevices.h"
|
||||
|
||||
#include "aqhome/aqhome.h"
|
||||
#include "aqhome/dataclient/client.h"
|
||||
|
||||
#include <aqcgi/request.h>
|
||||
|
||||
#include <gwenhywfar/buffer.h>
|
||||
|
||||
|
||||
|
||||
void AQH_ModDevices_RunPageGet(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, AQH_DATACLIENT *dc, GWEN_BUFFER *dbuf);
|
||||
void AQH_ModDevices_RunPagePost(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, AQH_DATACLIENT *dc, GWEN_BUFFER *dbuf);
|
||||
void AQH_ModDevices_RunPageGraph(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, AQH_DATACLIENT *dc, GWEN_BUFFER *dbuf);
|
||||
|
||||
|
||||
#endif
|
||||
@@ -86,13 +86,13 @@ void AQH_ModDevices_RunSetData(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *se
|
||||
|
||||
pbuf=GWEN_Buffer_new(0, 256, 0, 1);
|
||||
if (sValueName && *sValueName) {
|
||||
GBAS(pbuf, "Location: /aqbt/devices/value.html?device=");
|
||||
GBAS(pbuf, "Location: value.html?device=");
|
||||
GWEN_Text_EscapeToBuffer(sDeviceName, pbuf);
|
||||
GBAS(pbuf, "&value=");
|
||||
GWEN_Text_EscapeToBuffer(sValueName, pbuf);
|
||||
}
|
||||
else {
|
||||
GBAS(pbuf, "Location: /aqbt/devices/values.html?device=");
|
||||
GBAS(pbuf, "Location: values.html?device=");
|
||||
GWEN_Text_EscapeToBuffer(sDeviceName, pbuf);
|
||||
}
|
||||
AQCGI_Request_AddResponseHeaderData(rq, GWEN_Buffer_GetStart(pbuf));
|
||||
|
||||
@@ -80,7 +80,7 @@ void AQH_ModDevices_RunSetDevice(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *
|
||||
GWEN_BUFFER *pbuf;
|
||||
|
||||
pbuf=GWEN_Buffer_new(0, 256, 0, 1);
|
||||
GBAS(pbuf, "Location: /aqbt/devices/device.html?device=");
|
||||
GBAS(pbuf, "Location: device.html?device=");
|
||||
GWEN_Text_EscapeToBuffer(sDeviceName, pbuf);
|
||||
AQCGI_Request_AddResponseHeaderData(rq, GWEN_Buffer_GetStart(pbuf));
|
||||
GWEN_Buffer_free(pbuf);
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
#include <gwenhywfar/timestamp.h>
|
||||
#include <gwenhywfar/text.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
@@ -42,17 +38,6 @@
|
||||
|
||||
|
||||
|
||||
enum {
|
||||
VALUEGRAPH_PERIOD_4H=1,
|
||||
VALUEGRAPH_PERIOD_1D,
|
||||
VALUEGRAPH_PERIOD_1W,
|
||||
VALUEGRAPH_PERIOD_1M,
|
||||
VALUEGRAPH_PERIOD_6M,
|
||||
VALUEGRAPH_PERIOD_12M,
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* vars
|
||||
* ------------------------------------------------------------------------------------------------
|
||||
@@ -97,12 +82,8 @@ static void _createGraph(AQH_DATACLIENT *dc,
|
||||
const MY_GRAPH_PARAMS *graphParams,
|
||||
const char *graphTitle, int precision, const char *curveLabel,
|
||||
const char *sImgFile, int imgWidth, int imgHeight, uint64_t numDataPoints);
|
||||
static int _fileIsCurrent(const char *sPath, int seconds);
|
||||
static AQDG_GRAPH *_mkGraphObjectWithTitle(const char *graphTitle, const MY_GRAPH_PARAMS *graphParams, int precision);
|
||||
static void _mkPathForValueAndPeriod(AQH_MODULE *m, const AQH_VALUE *v, const MY_GRAPH_PARAMS *graphParams, GWEN_BUFFER *dbuf);
|
||||
static AQDG_GRAPH_DATAPAIR_LIST *_requestDataPairList(AQH_DATACLIENT *dc, const char *valueName,
|
||||
uint64_t tsBegin, uint64_t tsEnd, uint64_t num);
|
||||
static AQDG_GRAPH_DATAPAIR_LIST *_createDataPairListFromDataPoints(const uint64_t *dataPoints, uint64_t numValues);
|
||||
static const MY_GRAPH_PARAMS *_getParamsByName(const char *s);
|
||||
|
||||
|
||||
@@ -167,11 +148,10 @@ void _runGraphValueWithArgs(AQH_MODULE *m,
|
||||
value=AQH_ModDevices_GetValueForDevice(dc, sDeviceName, sValueName);
|
||||
if (value) {
|
||||
GWEN_BUFFER *fbuf;
|
||||
int rv;
|
||||
|
||||
fbuf=GWEN_Buffer_new(0, 256, 0, 1);
|
||||
_mkPathForValueAndPeriod(m, value, graphParams, fbuf);
|
||||
if (!_fileIsCurrent(GWEN_Buffer_GetStart(fbuf), graphParams->acceptedAgeInSeconds)) {
|
||||
if (!AQH_ModService_FileIsCurrent(GWEN_Buffer_GetStart(fbuf), graphParams->acceptedAgeInSeconds)) {
|
||||
DBG_DEBUG(NULL, "Creating graph");
|
||||
_createGraph(dc,
|
||||
value,
|
||||
@@ -184,23 +164,7 @@ void _runGraphValueWithArgs(AQH_MODULE *m,
|
||||
100000);
|
||||
}
|
||||
|
||||
if (1) {
|
||||
GWEN_BUFFER *ibuf;
|
||||
|
||||
ibuf=GWEN_Buffer_new(0, 1024, 0, 1);
|
||||
// return file
|
||||
rv=GWEN_SyncIo_Helper_ReadFile(GWEN_Buffer_GetStart(fbuf), ibuf);
|
||||
if (rv<0) {
|
||||
DBG_ERROR(NULL, "Error reading \"%s\" (%d)", GWEN_Buffer_GetStart(fbuf), rv);
|
||||
}
|
||||
else {
|
||||
GWEN_Buffer_Reset(dbuf);
|
||||
GWEN_Buffer_AppendBytes(dbuf, GWEN_Buffer_GetStart(ibuf), GWEN_Buffer_GetUsedBytes(ibuf));
|
||||
AQCGI_Request_AddResponseHeaderData(rq, "Content-type: image/png");
|
||||
AQCGI_Request_AddFlags(rq, AQH_MODSERVICE_RQFLAGS_RAWFILE);
|
||||
}
|
||||
GWEN_Buffer_free(ibuf);
|
||||
}
|
||||
AQH_ModService_RespondWithMimeFile(rq, GWEN_Buffer_GetStart(fbuf), "image/png", dbuf);
|
||||
|
||||
GWEN_Buffer_free(fbuf);
|
||||
AQH_Value_free(value);
|
||||
@@ -212,25 +176,6 @@ void _runGraphValueWithArgs(AQH_MODULE *m,
|
||||
|
||||
|
||||
|
||||
int _fileIsCurrent(const char *sPath, int seconds)
|
||||
{
|
||||
struct stat sb;
|
||||
time_t t1;
|
||||
|
||||
if (lstat(sPath, &sb)==-1) {
|
||||
DBG_ERROR(NULL, "Error on lstat(%s): %s (%d)", sPath, strerror(errno), errno);
|
||||
return 0;
|
||||
}
|
||||
t1=time(0);
|
||||
if ((t1-sb.st_mtime)<(time_t) seconds) {
|
||||
DBG_DEBUG(NULL, "File %s is current", sPath);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _createGraph(AQH_DATACLIENT *dc,
|
||||
const AQH_VALUE *v,
|
||||
@@ -252,7 +197,7 @@ void _createGraph(AQH_DATACLIENT *dc,
|
||||
tsBegin=time(0)-(graphParams->startTimeDiff);
|
||||
g=_mkGraphObjectWithTitle(graphTitle, graphParams, precision);
|
||||
|
||||
dpList=_requestDataPairList(dc, sValue, tsBegin, tsEnd, numDataPoints);
|
||||
dpList=AQH_ModDevices_RequestDataPairList(dc, sValue, tsBegin, tsEnd, numDataPoints);
|
||||
if (dpList) {
|
||||
DBG_DEBUG(NULL, "Adding data for %s", sValue);
|
||||
AQDG_TimeGraph_ModifyDataAndAddCurve(g, curveLabel?curveLabel:sValue, graphParams->modifiers, dpList);
|
||||
@@ -309,63 +254,13 @@ void _mkPathForValueAndPeriod(AQH_MODULE *m, const AQH_VALUE *v, const MY_GRAPH_
|
||||
|
||||
/* var name */
|
||||
s=AQH_Value_GetNameForSystem(v);
|
||||
GWEN_Text_EscapeToBuffer(s, dbuf);
|
||||
AQH_ModService_EscapeToBuffer(s, dbuf);
|
||||
|
||||
GBAA(dbuf, "-%s.png", graphParams->name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
AQDG_GRAPH_DATAPAIR_LIST *_requestDataPairList(AQH_DATACLIENT *dc, const char *valueName,
|
||||
uint64_t tsBegin, uint64_t tsEnd, uint64_t num)
|
||||
{
|
||||
uint64_t *dataPoints;
|
||||
uint64_t recvdNum;
|
||||
|
||||
dataPoints=malloc(num*sizeof(uint64_t)*2);
|
||||
|
||||
recvdNum=AQH_DataClient_GetPeriodData(dc, valueName, dataPoints, num, tsBegin, tsEnd);
|
||||
if (recvdNum>0) {
|
||||
AQDG_GRAPH_DATAPAIR_LIST *dpList;
|
||||
|
||||
dpList=_createDataPairListFromDataPoints(dataPoints, recvdNum);
|
||||
free(dataPoints);
|
||||
return dpList;
|
||||
}
|
||||
else {
|
||||
DBG_ERROR(NULL, "No data received for %s", valueName);
|
||||
free(dataPoints);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
AQDG_GRAPH_DATAPAIR_LIST *_createDataPairListFromDataPoints(const uint64_t *dataPoints, uint64_t numValues)
|
||||
{
|
||||
AQDG_GRAPH_DATAPAIR_LIST *dpList;
|
||||
uint64_t i;
|
||||
|
||||
DBG_DEBUG(NULL, "Got %d datapoints", (int) numValues);
|
||||
dpList=AQDG_Graph_DataPair_List_new();
|
||||
for(i=0; i<numValues; i++) {
|
||||
AQDG_GRAPH_DATAPAIR *dp;
|
||||
double timestamp;
|
||||
union {double f; uint64_t i;} u;
|
||||
|
||||
timestamp=(double)(*(dataPoints++));
|
||||
u.i=*(dataPoints++);
|
||||
dp=AQDG_Graph_DataPair_new();
|
||||
AQDG_Graph_DataPair_SetValueX(dp, timestamp);
|
||||
AQDG_Graph_DataPair_SetValueY(dp, u.f);
|
||||
AQDG_Graph_DataPair_List_Add(dp, dpList);
|
||||
}
|
||||
AQDG_Graph_DataPair_List_SortByValueX(dpList, 1);
|
||||
return dpList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
const MY_GRAPH_PARAMS *_getParamsByName(const char *s)
|
||||
{
|
||||
const MY_GRAPH_PARAMS *p;
|
||||
|
||||
@@ -15,11 +15,12 @@
|
||||
</head>
|
||||
|
||||
<ul class="mainmenu" >
|
||||
<li><a href="/aqbt/devices/index.html">Devices</a></li>
|
||||
<li><a href="/aqbt/admin/index.html">Admin</a></li>
|
||||
<li><a href="/aqhome/devices/index.html">Devices</a></li>
|
||||
<li><a href="/aqhome/devices/page.html">Pages</a></li>
|
||||
<li><a href="/aqhome/admin/index.html">Admin</a></li>
|
||||
<li><a href="#news">News</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
<li style="float:right"><a href="/aqbt/login">Login</a></li>
|
||||
<li style="float:right"><a href="/aqhome/login">Login</a></li>
|
||||
</ul>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -79,7 +79,8 @@ static int _handleNewClient(AQH_OBJECT *o, AQH_OBJECT *clientEndpoint);
|
||||
static int _handleClientDown(AQH_OBJECT *o, AQH_OBJECT *clientEndpoint);
|
||||
static void _handleMsgsFromClient(AQH_OBJECT *o, AQHOME_SERVER *xo, AQH_OBJECT *ep);
|
||||
static void _handleMsgFromClient(AQH_OBJECT *o, AQH_OBJECT *ep, const AQH_MESSAGE *msg);
|
||||
static void _createValue(AQHOME_SERVER *xo, AQH_OBJECT *epDriver, const char *deviceName, const AQH_VALUE *valueTemplate);
|
||||
static void _createValue(AQHOME_SERVER *xo, AQH_OBJECT *epDriver,
|
||||
const char *deviceName, const char *valueNameForSystem, const AQH_VALUE *valueTemplate);
|
||||
static void _updateValue(AQHOME_SERVER *xo, AQH_VALUE *v, const char *deviceName, const AQH_VALUE *valueTemplate);
|
||||
static AQH_DEVICE *_getOrCreateDeviceForDriver(AQHOME_SERVER *xo, AQH_OBJECT *epDriver, const char *deviceName);
|
||||
static int _createPidFile(const char *pidFilename);
|
||||
@@ -655,7 +656,7 @@ AQH_VALUE *AqHomeDataServer_GetOrCreateValueForDriverWithTemplate(AQH_OBJECT *o,
|
||||
v=AQH_Storage_GetValueByNameForSystem(xo->storage, GWEN_Buffer_GetStart(buf));
|
||||
if (v==NULL) {
|
||||
if (AQH_Endpoint_GetPermissions(epDriver) & AQH_ENDPOINT_PERMS_ADDVALUE)
|
||||
_createValue(xo, epDriver, GWEN_Buffer_GetStart(buf), valueTemplate);
|
||||
_createValue(xo, epDriver, deviceName, GWEN_Buffer_GetStart(buf), valueTemplate);
|
||||
else {
|
||||
DBG_ERROR(AQH_LOGDOMAIN, "No permissions to create value \"%s\"", GWEN_Buffer_GetStart(buf));
|
||||
GWEN_Buffer_free(buf);
|
||||
@@ -672,20 +673,25 @@ AQH_VALUE *AqHomeDataServer_GetOrCreateValueForDriverWithTemplate(AQH_OBJECT *o,
|
||||
|
||||
|
||||
|
||||
void _createValue(AQHOME_SERVER *xo, AQH_OBJECT *epDriver, const char *deviceName, const AQH_VALUE *valueTemplate)
|
||||
void _createValue(AQHOME_SERVER *xo, AQH_OBJECT *epDriver,
|
||||
const char *deviceName, const char *valueNameForSystem, const AQH_VALUE *valueTemplate)
|
||||
{
|
||||
AQH_DEVICE *device;
|
||||
const char *serviceName;
|
||||
const char *valueName;
|
||||
AQH_VALUE *v;
|
||||
|
||||
DBG_INFO(AQH_LOGDOMAIN, "Creating value \"%s\"", deviceName);
|
||||
serviceName=AQH_Endpoint_GetServiceName(epDriver);
|
||||
valueName=AQH_Value_GetName(valueTemplate);
|
||||
device=(deviceName && *deviceName)?_getOrCreateDeviceForDriver(xo, epDriver, deviceName):NULL;
|
||||
|
||||
DBG_ERROR(AQH_LOGDOMAIN,
|
||||
"Creating value: service=\"%s\", device=\"%s\", value \"%s\"",
|
||||
serviceName?serviceName:"<no service>", deviceName?deviceName:"<no device>", valueName?valueName:"<no value>");
|
||||
v=AQH_Value_new();
|
||||
AQH_Value_SetDriver(v, serviceName);
|
||||
AQH_Value_SetName(v, AQH_Value_GetName(valueTemplate));
|
||||
AQH_Value_SetNameForSystem(v, deviceName);
|
||||
AQH_Value_SetNameForSystem(v, valueNameForSystem);
|
||||
AQH_Value_SetValueUnits(v, AQH_Value_GetValueUnits(valueTemplate));
|
||||
AQH_Value_SetValueType(v, AQH_Value_GetValueType(valueTemplate));
|
||||
AQH_Value_SetModality(v, AQH_Value_GetModality(valueTemplate));
|
||||
@@ -755,7 +761,7 @@ AQH_DEVICE *_getOrCreateDeviceForDriver(AQHOME_SERVER *xo, AQH_OBJECT *epDriver,
|
||||
device=AQH_Storage_GetDeviceByNameForSystem(xo->storage, GWEN_Buffer_GetStart(buf));
|
||||
if (device==NULL) {
|
||||
if (AQH_Endpoint_GetPermissions(epDriver) & AQH_ENDPOINT_PERMS_ADDDEVICE) {
|
||||
DBG_INFO(AQH_LOGDOMAIN, "Creating device \"%s\"", GWEN_Buffer_GetStart(buf));
|
||||
DBG_ERROR(AQH_LOGDOMAIN, "Creating device \"%s\"", GWEN_Buffer_GetStart(buf));
|
||||
device=AQH_Device_new();
|
||||
AQH_Device_SetDriver(device, serviceName);
|
||||
AQH_Device_SetName(device, deviceName);
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
aqhome
|
||||
aqhtool_nodes
|
||||
aqhtool_data
|
||||
aqhtool_image
|
||||
</useTargets>
|
||||
|
||||
<libraries>
|
||||
@@ -61,6 +62,7 @@
|
||||
<subdirs>
|
||||
nodes
|
||||
data
|
||||
image
|
||||
</subdirs>
|
||||
|
||||
|
||||
|
||||
62
apps/aqhome-tool/image/0BUILD
Normal file
62
apps/aqhome-tool/image/0BUILD
Normal file
@@ -0,0 +1,62 @@
|
||||
<?xml?>
|
||||
|
||||
<gwbuild>
|
||||
|
||||
<target type="ConvenienceLibrary" name="aqhtool_image" >
|
||||
|
||||
<includes type="c" >
|
||||
$(gwenhywfar_cflags)
|
||||
-I$(topsrcdir)
|
||||
-I$(topbuilddir)
|
||||
</includes>
|
||||
|
||||
<includes type="tm2" >
|
||||
--include=$(builddir)
|
||||
--include=$(srcdir)
|
||||
</includes>
|
||||
|
||||
<setVar name="local/cflags">$(visibility_cflags)</setVar>
|
||||
|
||||
<setVar name="tm2flags" >
|
||||
</setVar>
|
||||
|
||||
<setVar name="local/typefiles" >
|
||||
</setVar>
|
||||
|
||||
<setVar name="local/built_sources" >
|
||||
</setVar>
|
||||
|
||||
<setVar name="local/built_headers_pub">
|
||||
</setVar>
|
||||
|
||||
<setVar name="local/built_headers_priv" >
|
||||
</setVar>
|
||||
|
||||
<headers dist="true" >
|
||||
readbmp.h
|
||||
</headers>
|
||||
|
||||
<sources>
|
||||
$(local/typefiles)
|
||||
|
||||
readbmp.c
|
||||
</sources>
|
||||
|
||||
<useTargets>
|
||||
</useTargets>
|
||||
|
||||
<libraries>
|
||||
</libraries>
|
||||
|
||||
<subdirs>
|
||||
</subdirs>
|
||||
|
||||
|
||||
<extradist>
|
||||
</extradist>
|
||||
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
</gwbuild>
|
||||
523
apps/aqhome-tool/image/readbmp.c
Normal file
523
apps/aqhome-tool/image/readbmp.c
Normal file
@@ -0,0 +1,523 @@
|
||||
/****************************************************************************
|
||||
* This file is part of the project AqHome.
|
||||
* AqHome (c) by 2025 Martin Preuss, all rights reserved.
|
||||
*
|
||||
* The license for this file can be found in the file COPYING which you
|
||||
* should have received along with this file.
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "./readbmp.h"
|
||||
|
||||
#include <gwenhywfar/i18n.h>
|
||||
#include <gwenhywfar/debug.h>
|
||||
#include <gwenhywfar/text.h>
|
||||
#include <gwenhywfar/args.h>
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* defs
|
||||
* ------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define I18S(msg) msg
|
||||
#define I18N(msg) GWEN_I18N_Translate(PACKAGE, msg)
|
||||
|
||||
#define A_ARG GWEN_ARGS_FLAGS_HAS_ARGUMENT
|
||||
#define A_END (GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST)
|
||||
#define A_CHAR GWEN_ArgsType_Char
|
||||
#define A_INT GWEN_ArgsType_Int
|
||||
|
||||
|
||||
#define BMP_FILE_OFFS_FILEHEADER 0
|
||||
#define BMP_FILE_OFFS_IMAGEHEADER 14
|
||||
|
||||
#define BMP_FILEHEADER_OFFS_TYPE 0 /* 2 bytes ("BM") */
|
||||
#define BMP_FILEHEADER_OFFS_FSIZE 2 /* 4 bytes */
|
||||
#define BMP_FILEHEADER_OFFS_RESERVED1 6 /* 2 bytes */
|
||||
#define BMP_FILEHEADER_OFFS_RESERVED2 8 /* 2 bytes */
|
||||
#define BMP_FILEHEADER_OFFS_PIXELOFFS 10 /* 4 bytes offset to begin of pixel data */
|
||||
#define BMP_FILEHEADER_SIZE 14
|
||||
|
||||
|
||||
#define BMP_IMAGEHEADER_OFFS_HSIZE 0 /* 4 bytes header size */
|
||||
#define BMP_IMAGEHEADER_OFFS_WIDTH 4 /* 4 bytes */
|
||||
#define BMP_IMAGEHEADER_OFFS_HEIGHT 8 /* 4 bytes */
|
||||
#define BMP_IMAGEHEADER_OFFS_PLANES 12 /* 2 bytes (1) */
|
||||
#define BMP_IMAGEHEADER_OFFS_BPP 14 /* 2 bytes bit per pixel */
|
||||
#define BMP_IMAGEHEADER_OFFS_COMPR 16 /* 4 bytes (0=uncompressed) */
|
||||
#define BMP_IMAGEHEADER_OFFS_IMGSIZE 20 /* 4 bytes (may be 0 for uncompressed data) */
|
||||
#define BMP_IMAGEHEADER_OFFS_XPPM 24 /* 4 bytes X pixel per meter */
|
||||
#define BMP_IMAGEHEADER_OFFS_YPPM 28 /* 4 bytes Y pixel per meter */
|
||||
#define BMP_IMAGEHEADER_OFFS_COLORMAPENTRIES 32 /* 4 bytes number of color map entries actually used */
|
||||
#define BMP_IMAGEHEADER_OFFS_IMPORTANT 36 /* 4 bytes number of significant colors */
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* forward declarations
|
||||
* ------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static int AQH_Tool_ReadAndDumpBmpFile(const char *fname);
|
||||
static int AQH_Tool_ExportBmpFile(const char *fname);
|
||||
|
||||
static int _exportBmp_1bpp(const BMP_FILE *bf);
|
||||
static int _exportBmp_gray8bpp(const BMP_FILE *bf);
|
||||
|
||||
static BMP_FILEHEADER *_fileHeader_new();
|
||||
static void _fileHeader_free(BMP_FILEHEADER *fh);
|
||||
|
||||
static BMP_IMAGEHEADER *_imageHeader_new();
|
||||
static void _imageHeader_free(BMP_IMAGEHEADER *ih);
|
||||
|
||||
static void _dumpBmpFileHeader(const BMP_FILEHEADER *fh);
|
||||
static void _dumpBmpImageHeader(const BMP_IMAGEHEADER *ih);
|
||||
static BMP_FILEHEADER *_readFileHeaderAt(const uint8_t *ptrBuffer, uint32_t lenBuffer, uint32_t offset);
|
||||
static BMP_IMAGEHEADER *_readImageHeaderAt(const uint8_t *ptrBuffer, uint32_t lenBuffer, uint32_t offset);
|
||||
|
||||
static uint16_t _readUint16At(const uint8_t *ptrBuffer, uint32_t lenBuffer, uint32_t offset, uint16_t defaultValue);
|
||||
static uint32_t _readUint32At(const uint8_t *ptrBuffer, uint32_t lenBuffer, uint32_t offset, uint32_t defaultValue);
|
||||
static int32_t _readInt32At(const uint8_t *ptrBuffer, uint32_t lenBuffer, uint32_t offset, int32_t defaultValue);
|
||||
|
||||
static GWEN_BUFFER *_readFileIntoBuffer(const char *fname);
|
||||
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* code
|
||||
* ------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
|
||||
int AQH_Tool_DumpBmpFile(GWEN_DB_NODE *dbGlobalArgs, int argc, char **argv)
|
||||
{
|
||||
GWEN_DB_NODE *dbLocalArgs;
|
||||
int rv;
|
||||
const char *sFilename;
|
||||
const GWEN_ARGS args[]= {
|
||||
/* flags type name min max s long short_descr, long_descr */
|
||||
{ A_ARG, A_CHAR, "bmpFile", 1, 1, "i", "bmpFile", I18S("BMP file to read"), NULL},
|
||||
{ A_END, A_INT, "help", 0, 0, "h", "help", I18S("Show this help screen"), NULL}
|
||||
};
|
||||
|
||||
dbLocalArgs=GWEN_DB_GetGroup(dbGlobalArgs, GWEN_DB_FLAGS_DEFAULT, "local");
|
||||
rv=GWEN_Args_Check(argc, argv, 1, GWEN_ARGS_MODE_ALLOW_FREEPARAM, args, dbLocalArgs);
|
||||
if (rv==GWEN_ARGS_RESULT_ERROR) {
|
||||
fprintf(stderr, "ERROR: Could not parse arguments\n");
|
||||
return 1;
|
||||
}
|
||||
else if (rv==GWEN_ARGS_RESULT_HELP) {
|
||||
GWEN_BUFFER *ubuf;
|
||||
|
||||
ubuf=GWEN_Buffer_new(0, 1024, 0, 1);
|
||||
if (GWEN_Args_Usage(args, ubuf, GWEN_ArgsOutType_Txt)) {
|
||||
fprintf(stderr, "ERROR: Could not create help string\n");
|
||||
return 1;
|
||||
}
|
||||
fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(ubuf));
|
||||
GWEN_Buffer_free(ubuf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
sFilename=GWEN_DB_GetCharValue(dbLocalArgs, "bmpFile", 0, NULL);
|
||||
if (!(sFilename && *sFilename)) {
|
||||
fprintf(stderr, "Missing file name\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
//return AQH_Tool_ReadAndDumpBmpFile(sFilename);
|
||||
return AQH_Tool_ExportBmpFile(sFilename);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int AQH_Tool_ReadAndDumpBmpFile(const char *fname)
|
||||
{
|
||||
BMP_FILE *bf;
|
||||
|
||||
bf=BMP_File_fromFile(fname);
|
||||
if (bf) {
|
||||
_dumpBmpFileHeader(bf->fileHeader);
|
||||
_dumpBmpImageHeader(bf->imageHeader);
|
||||
BMP_File_free(bf);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int AQH_Tool_ExportBmpFile(const char *fname)
|
||||
{
|
||||
BMP_FILE *bf;
|
||||
|
||||
bf=BMP_File_fromFile(fname);
|
||||
if (bf) {
|
||||
int rv;
|
||||
|
||||
_dumpBmpFileHeader(bf->fileHeader);
|
||||
_dumpBmpImageHeader(bf->imageHeader);
|
||||
if (bf->imageHeader->bitsPerPixel==1)
|
||||
rv=_exportBmp_1bpp(bf);
|
||||
else if (bf->imageHeader->bitsPerPixel==8)
|
||||
rv=_exportBmp_gray8bpp(bf);
|
||||
else {
|
||||
fprintf(stderr, "Invalid bits per pixel (%d)", bf->imageHeader->bitsPerPixel);
|
||||
rv=2;
|
||||
}
|
||||
|
||||
BMP_File_free(bf);
|
||||
return rv;
|
||||
}
|
||||
return 2;;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int _exportBmp_1bpp(const BMP_FILE *bf)
|
||||
{
|
||||
const uint8_t *ptrBuffer;
|
||||
uint32_t lenBuffer;
|
||||
uint32_t offsPixels;
|
||||
const uint8_t *ptrPixels;
|
||||
int imageWidth;
|
||||
int imageHeight;
|
||||
int rowWidthInBytes;
|
||||
int columns;
|
||||
int y;
|
||||
|
||||
ptrBuffer=(const uint8_t *) GWEN_Buffer_GetStart(bf->buffer);
|
||||
lenBuffer=GWEN_Buffer_GetUsedBytes(bf->buffer);
|
||||
offsPixels=bf->fileHeader->offsPixels;
|
||||
ptrPixels=ptrBuffer+offsPixels;
|
||||
imageWidth=bf->imageHeader->imgWidth;
|
||||
imageHeight=bf->imageHeader->imgHeight;
|
||||
columns=imageWidth/8;
|
||||
rowWidthInBytes=4*((columns+3)/4); /* BMPs have multiple of 4 bytes per row! */
|
||||
fprintf(stdout, "imgData: \n");
|
||||
fprintf(stdout, " .dw %d, %d\n", imageWidth, imageHeight);
|
||||
|
||||
for (y=imageHeight-1; y>=0; y--) {
|
||||
const uint8_t *rowPtr;
|
||||
int x;
|
||||
|
||||
fprintf(stdout, " .db ");
|
||||
rowPtr=ptrPixels+(y*rowWidthInBytes);
|
||||
for (x=0; x<columns; x++) {
|
||||
if (x)
|
||||
fprintf(stdout, ", ");
|
||||
fprintf(stdout, "0x%02x", rowPtr[x]^0xff);
|
||||
}
|
||||
fprintf(stdout, "\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int _exportBmp_gray8bpp(const BMP_FILE *bf)
|
||||
{
|
||||
const uint8_t *ptrBuffer;
|
||||
uint32_t lenBuffer;
|
||||
uint32_t offsPixels;
|
||||
const uint8_t *ptrPixels;
|
||||
int imageWidth;
|
||||
int imageHeight;
|
||||
int rowWidthInBytes;
|
||||
int columns;
|
||||
int y;
|
||||
|
||||
ptrBuffer=(const uint8_t *) GWEN_Buffer_GetStart(bf->buffer);
|
||||
lenBuffer=GWEN_Buffer_GetUsedBytes(bf->buffer);
|
||||
offsPixels=bf->fileHeader->offsPixels;
|
||||
ptrPixels=ptrBuffer+offsPixels;
|
||||
imageWidth=bf->imageHeader->imgWidth;
|
||||
imageHeight=bf->imageHeader->imgHeight;
|
||||
columns=imageWidth;
|
||||
rowWidthInBytes=4*((columns+3)/4); /* BMPs have multiple of 4 bytes per row! */
|
||||
fprintf(stdout, "imgData: \n");
|
||||
fprintf(stdout, " .dw %d, %d\n", imageWidth, imageHeight);
|
||||
|
||||
for (y=imageHeight-1; y>=0; y--) {
|
||||
const uint8_t *rowPtr;
|
||||
int x;
|
||||
uint8_t currentByte=0;
|
||||
int writtenBytes=0;
|
||||
int packedPixels=0;
|
||||
|
||||
fprintf(stdout, " .db ");
|
||||
rowPtr=ptrPixels+(y*rowWidthInBytes);
|
||||
for (x=0; x<columns; x++) {
|
||||
uint8_t pixel;
|
||||
uint8_t newPix;
|
||||
|
||||
pixel=rowPtr[x];
|
||||
switch(pixel) {
|
||||
case 0x00: newPix=0b01; break; /* outline color */
|
||||
case 0x60: newPix=0b10; break; /* color 1 */
|
||||
case 0xc0: newPix=0b11; break; /* color 2 */
|
||||
case 0xff: newPix=0b00; break; /* background color */
|
||||
default: newPix=0b00; break; /* background color */
|
||||
}
|
||||
currentByte<<=2;
|
||||
currentByte|=newPix;
|
||||
packedPixels++;
|
||||
if (packedPixels==4) {
|
||||
if (writtenBytes)
|
||||
fprintf(stdout, ", ");
|
||||
fprintf(stdout, "0x%02x", currentByte);
|
||||
writtenBytes++;
|
||||
packedPixels=0;
|
||||
currentByte=0;
|
||||
}
|
||||
}
|
||||
fprintf(stdout, "\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BMP_FILE *BMP_File_new(const char *fname)
|
||||
{
|
||||
BMP_FILE *bf;
|
||||
|
||||
GWEN_NEW_OBJECT(BMP_FILE, bf);
|
||||
bf->filename=fname?strdup(fname):NULL;
|
||||
return bf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BMP_File_free(BMP_FILE *bf)
|
||||
{
|
||||
if (bf) {
|
||||
free(bf->filename);
|
||||
_imageHeader_free(bf->imageHeader);
|
||||
_fileHeader_free(bf->fileHeader);
|
||||
GWEN_Buffer_free(bf->buffer);
|
||||
GWEN_FREE_OBJECT(bf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
BMP_FILE *BMP_File_fromFile(const char *fname)
|
||||
{
|
||||
BMP_FILE *bf;
|
||||
const uint8_t *ptrBuffer;
|
||||
uint32_t lenBuffer;
|
||||
|
||||
bf=BMP_File_new(fname);
|
||||
bf->buffer=_readFileIntoBuffer(fname);
|
||||
if (bf->buffer==NULL) {
|
||||
fprintf(stderr, "Error reading bmp file \"%s\"\n", fname);
|
||||
BMP_File_free(bf);
|
||||
return NULL;
|
||||
}
|
||||
ptrBuffer=(const uint8_t *) GWEN_Buffer_GetStart(bf->buffer);
|
||||
lenBuffer=GWEN_Buffer_GetUsedBytes(bf->buffer);
|
||||
|
||||
bf->fileHeader=_readFileHeaderAt(ptrBuffer, lenBuffer, 0);
|
||||
if (bf->fileHeader==NULL) {
|
||||
fprintf(stderr, "Error reading bmp file header from \"%s\"\n", fname);
|
||||
BMP_File_free(bf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bf->imageHeader=_readImageHeaderAt(ptrBuffer, lenBuffer, BMP_FILE_OFFS_IMAGEHEADER);
|
||||
if (bf->imageHeader==NULL) {
|
||||
fprintf(stderr, "Error reading bmp image header from \"%s\"\n", fname);
|
||||
BMP_File_free(bf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return bf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BMP_FILEHEADER *_fileHeader_new()
|
||||
{
|
||||
BMP_FILEHEADER *fh;
|
||||
|
||||
GWEN_NEW_OBJECT(BMP_FILEHEADER, fh);
|
||||
return fh;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _fileHeader_free(BMP_FILEHEADER *fh)
|
||||
{
|
||||
if (fh) {
|
||||
GWEN_FREE_OBJECT(fh);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
BMP_IMAGEHEADER *_imageHeader_new()
|
||||
{
|
||||
BMP_IMAGEHEADER *ih;
|
||||
|
||||
GWEN_NEW_OBJECT(BMP_IMAGEHEADER, ih);
|
||||
return ih;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _imageHeader_free(BMP_IMAGEHEADER *ih)
|
||||
{
|
||||
if (ih) {
|
||||
GWEN_FREE_OBJECT(ih);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _dumpBmpFileHeader(const BMP_FILEHEADER *fh)
|
||||
{
|
||||
fprintf(stderr, "BMP File Header:\n");
|
||||
fprintf(stderr, "- file type: %d\n", fh->fileType);
|
||||
fprintf(stderr, "- file size: %d\n", fh->fileSize);
|
||||
fprintf(stderr, "- Pixels at: %08x\n", fh->offsPixels);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _dumpBmpImageHeader(const BMP_IMAGEHEADER *ih)
|
||||
{
|
||||
fprintf(stderr, "BMP Image Header:\n");
|
||||
fprintf(stderr, "- dims : %d x %d (%d planes, %d bpp)\n", ih->imgWidth, ih->imgHeight, ih->imgPlanes, ih->bitsPerPixel);
|
||||
fprintf(stderr, "- compression : %d\n", ih->compression);
|
||||
fprintf(stderr, "- image size : %d\n", ih->imgSize);
|
||||
fprintf(stderr, "- resolution : %d x %d per meter\n", ih->imgXPixelsPerMeter, ih->imgYPixelsPerMeter);
|
||||
fprintf(stderr, "- used colormap: %d entries (%d important)\n", ih->colorMapUsedEntries, ih->colorMapImportantColors);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BMP_FILEHEADER *_readFileHeaderAt(const uint8_t *ptrBuffer, uint32_t lenBuffer, uint32_t offset)
|
||||
{
|
||||
BMP_FILEHEADER *fh;
|
||||
|
||||
if (lenBuffer<(offset+BMP_FILEHEADER_SIZE)) {
|
||||
DBG_ERROR(NULL, "Offset 0x%08x out of boundary", offset);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fh=_fileHeader_new();
|
||||
fh->fileType=_readUint16At(ptrBuffer, lenBuffer, offset+BMP_FILEHEADER_OFFS_TYPE, 0);
|
||||
fh->fileSize=_readUint32At(ptrBuffer, lenBuffer, offset+BMP_FILEHEADER_OFFS_FSIZE, 0);
|
||||
fh->offsPixels=_readUint32At(ptrBuffer, lenBuffer, offset+BMP_FILEHEADER_OFFS_PIXELOFFS, 0xffffffff);
|
||||
|
||||
return fh;
|
||||
}
|
||||
|
||||
|
||||
|
||||
BMP_IMAGEHEADER *_readImageHeaderAt(const uint8_t *ptrBuffer, uint32_t lenBuffer, uint32_t offset)
|
||||
{
|
||||
BMP_IMAGEHEADER *ih;
|
||||
uint32_t hsize;
|
||||
|
||||
hsize=_readUint32At(ptrBuffer, lenBuffer, BMP_FILE_OFFS_IMAGEHEADER, 0xffffffff);
|
||||
if (lenBuffer<(offset+hsize)) {
|
||||
DBG_ERROR(NULL, "Offset 0x%08x out of boundary", offset);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ih=_imageHeader_new();
|
||||
ih->imgWidth=_readInt32At(ptrBuffer, lenBuffer, offset+BMP_IMAGEHEADER_OFFS_WIDTH, 0);
|
||||
ih->imgHeight=_readInt32At(ptrBuffer, lenBuffer, offset+BMP_IMAGEHEADER_OFFS_HEIGHT, 0);
|
||||
ih->imgPlanes=_readUint16At(ptrBuffer, lenBuffer, offset+BMP_IMAGEHEADER_OFFS_PLANES, 0);
|
||||
ih->bitsPerPixel=_readUint16At(ptrBuffer, lenBuffer, offset+BMP_IMAGEHEADER_OFFS_BPP, 0);
|
||||
ih->compression=_readInt32At(ptrBuffer, lenBuffer, offset+BMP_IMAGEHEADER_OFFS_COMPR, 0);
|
||||
ih->imgSize=_readInt32At(ptrBuffer, lenBuffer, offset+BMP_IMAGEHEADER_OFFS_IMGSIZE, 0);
|
||||
ih->imgXPixelsPerMeter=_readInt32At(ptrBuffer, lenBuffer, offset+BMP_IMAGEHEADER_OFFS_XPPM, 0);
|
||||
ih->imgYPixelsPerMeter=_readInt32At(ptrBuffer, lenBuffer, offset+BMP_IMAGEHEADER_OFFS_YPPM, 0);
|
||||
ih->colorMapUsedEntries=_readInt32At(ptrBuffer, lenBuffer, offset+BMP_IMAGEHEADER_OFFS_COLORMAPENTRIES, 0);
|
||||
ih->colorMapImportantColors=_readInt32At(ptrBuffer, lenBuffer, offset+BMP_IMAGEHEADER_OFFS_IMPORTANT, 0);
|
||||
|
||||
return ih;
|
||||
}
|
||||
|
||||
|
||||
|
||||
uint16_t _readUint16At(const uint8_t *ptrBuffer, uint32_t lenBuffer, uint32_t offset, uint16_t defaultValue)
|
||||
{
|
||||
uint16_t v;
|
||||
|
||||
if (lenBuffer<(offset+2)) {
|
||||
DBG_ERROR(NULL, "Offset 0x%08x out of boundary", offset);
|
||||
return defaultValue;
|
||||
}
|
||||
v=ptrBuffer[offset]+(ptrBuffer[offset+1]<<8);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
|
||||
uint32_t _readUint32At(const uint8_t *ptrBuffer, uint32_t lenBuffer, uint32_t offset, uint32_t defaultValue)
|
||||
{
|
||||
uint32_t v;
|
||||
|
||||
if (lenBuffer<(offset+4)) {
|
||||
DBG_ERROR(NULL, "Offset 0x%08x out of boundary", offset);
|
||||
return defaultValue;
|
||||
}
|
||||
v=ptrBuffer[offset]+(ptrBuffer[offset+1]<<8)+(ptrBuffer[offset+2]<<16)+(ptrBuffer[offset+2]<<16);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int32_t _readInt32At(const uint8_t *ptrBuffer, uint32_t lenBuffer, uint32_t offset, int32_t defaultValue)
|
||||
{
|
||||
uint32_t v;
|
||||
|
||||
if (lenBuffer<(offset+4)) {
|
||||
DBG_ERROR(NULL, "Offset 0x%08x out of boundary", offset);
|
||||
return defaultValue;
|
||||
}
|
||||
v=ptrBuffer[offset]+(ptrBuffer[offset+1]<<8)+(ptrBuffer[offset+2]<<16)+(ptrBuffer[offset+2]<<16);
|
||||
return (int32_t) v;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
GWEN_BUFFER *_readFileIntoBuffer(const char *fname)
|
||||
{
|
||||
GWEN_BUFFER *buf;
|
||||
int rv;
|
||||
|
||||
buf=GWEN_Buffer_new(0, 1024, 0, 1);
|
||||
rv=GWEN_SyncIo_Helper_ReadFile(fname, buf);
|
||||
if (rv<0) {
|
||||
DBG_ERROR(NULL, "Error reading file \"%s\": %d", fname?fname:"<empty>", rv);
|
||||
GWEN_Buffer_free(buf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
69
apps/aqhome-tool/image/readbmp.h
Normal file
69
apps/aqhome-tool/image/readbmp.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/****************************************************************************
|
||||
* This file is part of the project AqHome.
|
||||
* AqHome (c) by 2023 Martin Preuss, all rights reserved.
|
||||
*
|
||||
* The license for this file can be found in the file COPYING which you
|
||||
* should have received along with this file.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef AQHOME_TOOL_READBMP_H
|
||||
#define AQHOME_TOOL_READBMP_H
|
||||
|
||||
|
||||
#include <gwenhywfar/db.h>
|
||||
#include <gwenhywfar/endpoint.h>
|
||||
|
||||
#include <aqhome/data/value.h>
|
||||
#include <aqhome/data/device.h>
|
||||
|
||||
#include <aqhome/events2/eventloop.h>
|
||||
#include <aqhome/events2/object.h>
|
||||
#include <aqhome/ipc2/message.h>
|
||||
|
||||
|
||||
|
||||
typedef struct BMP_FILEHEADER BMP_FILEHEADER;
|
||||
struct BMP_FILEHEADER {
|
||||
uint16_t fileType;
|
||||
uint32_t fileSize;
|
||||
uint32_t offsPixels;
|
||||
};
|
||||
|
||||
|
||||
typedef struct BMP_IMAGEHEADER BMP_IMAGEHEADER;
|
||||
struct BMP_IMAGEHEADER {
|
||||
int32_t imgWidth;
|
||||
int32_t imgHeight;
|
||||
uint16_t imgPlanes; /* 1 */
|
||||
uint16_t bitsPerPixel;
|
||||
uint32_t compression;
|
||||
uint32_t imgSize;
|
||||
uint32_t imgXPixelsPerMeter;
|
||||
uint32_t imgYPixelsPerMeter;
|
||||
uint32_t colorMapUsedEntries;
|
||||
uint32_t colorMapImportantColors;
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef struct BMP_FILE BMP_FILE;
|
||||
struct BMP_FILE {
|
||||
char *filename;
|
||||
BMP_FILEHEADER *fileHeader;
|
||||
BMP_IMAGEHEADER *imageHeader;
|
||||
|
||||
GWEN_BUFFER *buffer;
|
||||
};
|
||||
|
||||
|
||||
int AQH_Tool_DumpBmpFile(GWEN_DB_NODE *dbGlobalArgs, int argc, char **argv);
|
||||
|
||||
|
||||
BMP_FILE *BMP_File_new(const char *fname);
|
||||
void BMP_File_free(BMP_FILE *bf);
|
||||
BMP_FILE *BMP_File_fromFile(const char *fname);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "./data/watch.h"
|
||||
#include "./data/devicestate.h"
|
||||
#include "./data/imgperioddata.h"
|
||||
#include "./image/readbmp.h"
|
||||
|
||||
#include <aqhome/api.h>
|
||||
#include <aqhome/aqhome.h>
|
||||
@@ -105,6 +106,7 @@ int main(int argc, char **argv)
|
||||
GWEN_FE_DAH("watch", AQH_Tool_Watch, I18N("Watch and print changes of values on the data server")),
|
||||
GWEN_FE_DAH("devicestate", AQH_Tool_DeviceState, I18N("Show state of devices")),
|
||||
GWEN_FE_DAH("imgperioddata", AQH_Tool_ImgPeriodData, I18N("Create diagram of datapoints from a date range")),
|
||||
GWEN_FE_DAH("dumpbmp", AQH_Tool_DumpBmpFile, I18N("Dump headers of BMP file")),
|
||||
GWEN_FE_END(),
|
||||
};
|
||||
const GWEN_FUNCS *func;
|
||||
|
||||
@@ -117,6 +117,16 @@ AppReportSensors_OnEverySecond_store:
|
||||
breq AppReportSensors_OnEverySecond_sendBrightness
|
||||
#endif
|
||||
|
||||
#ifdef APPS_DOOR
|
||||
cpi r16, 100
|
||||
breq AppReportSensors_OnEverySecond_sendDoorValue
|
||||
#endif
|
||||
|
||||
#ifdef APPS_MOTION
|
||||
cpi r16, 108
|
||||
breq AppReportSensors_OnEverySecond_sendMotionValue
|
||||
#endif
|
||||
|
||||
ret
|
||||
|
||||
#ifdef MODULES_SI7021
|
||||
@@ -162,6 +172,16 @@ AppReportSensors_OnEverySecond_sendBrightness:
|
||||
rjmp Brightness_Send
|
||||
#endif
|
||||
|
||||
#ifdef APPS_DOOR
|
||||
AppReportSensors_OnEverySecond_sendDoorValue:
|
||||
rjmp appDoorSendValue
|
||||
#endif
|
||||
|
||||
#ifdef APPS_MOTION
|
||||
AppReportSensors_OnEverySecond_sendMotionValue:
|
||||
rjmp appMotionSendValue
|
||||
#endif
|
||||
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
tree_t.asm
|
||||
eeprom-r.asm
|
||||
eeprom-w.asm
|
||||
ressource.asm
|
||||
</extradist>
|
||||
|
||||
</gwbuild>
|
||||
|
||||
64
avr/common/ressource.asm
Normal file
64
avr/common/ressource.asm
Normal file
@@ -0,0 +1,64 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_COMMON_RESSOURCE_H
|
||||
#define AQH_AVR_COMMON_RESSOURCE_H
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; defs
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine RES_GetRessource
|
||||
;
|
||||
; The Ressource table has one entry for every ressource handled by this table.
|
||||
; The first entry contains the number of ressource entries in the table.
|
||||
; All following entries contain byte pointer addresses (for LPM) to ressources.
|
||||
; Ressource ids start with zero.
|
||||
;
|
||||
; @param r17:r16 ressource id (starting with 0)
|
||||
; @param Z pointer to start of ressources in FLASH (byte address)
|
||||
; @return CF set if ressource found, cleared otherwise
|
||||
; @return Z if CF set: pointer to ressource (byte address)
|
||||
; @clobbers r16, r17, r18
|
||||
|
||||
RES_GetRessource:
|
||||
lpm r18, Z+ ; first entry: number of entries in table
|
||||
cp r16, r18 ; id must be < num entries
|
||||
lpm r18, Z+ ; Z points to first entry now
|
||||
cpc r17, r18
|
||||
brcc RES_GetRessource_ret
|
||||
RES_GetRessource_getRessource:
|
||||
lsl r16 ; byte address, so we need to add ressource id twice (i.e. *2)
|
||||
rol r17
|
||||
add zl, r16
|
||||
add zh, r17
|
||||
lpm r16, Z+
|
||||
lpm r17, Z+
|
||||
mov zl, r16
|
||||
mov zh, r17
|
||||
sec
|
||||
RES_GetRessource_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
all
|
||||
c01
|
||||
c02
|
||||
c03
|
||||
n14
|
||||
n16
|
||||
n21
|
||||
|
||||
@@ -247,12 +247,18 @@
|
||||
|
||||
#ifdef MODULES_ILI9341
|
||||
.include "modules/lcd2/ili9341/defs.asm"
|
||||
.include "modules/lcd2/ili9341/colors.asm"
|
||||
.include "modules/lcd2/ili9341/images.asm"
|
||||
.include "modules/lcd2/ili9341/main.asm"
|
||||
.include "modules/lcd2/ili9341/io_spi.asm"
|
||||
.include "modules/lcd2/ili9341/graphops.asm"
|
||||
.include "modules/lcd2/ili9341/text.asm"
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_XPT2046
|
||||
.include "modules/lcd2/xpt2046/main.asm"
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_FONT
|
||||
.include "modules/lcd2/font/defs.asm"
|
||||
.include "modules/lcd2/font/main.asm"
|
||||
@@ -268,6 +274,14 @@
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef MODULES_GUI
|
||||
.include "modules/lcd2/gui/defs.asm"
|
||||
.include "modules/lcd2/gui/main.asm"
|
||||
.include "modules/lcd2/gui/window.asm"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef MODULES_FONT_8X8
|
||||
.include "modules/lcd2/font/defs.asm"
|
||||
.include "modules/lcd2/font/font8x8.asm"
|
||||
|
||||
@@ -179,6 +179,15 @@ onSystemTimerTick:
|
||||
bigcall Brightness_Every100ms
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_GUI
|
||||
bigcall GUI_Every100ms
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_XPT2046
|
||||
bigcall XPT2046_Every100ms
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef APPS_NETWORK
|
||||
ldi yl, LOW(netInterfaceData)
|
||||
ldi yh, HIGH(netInterfaceData)
|
||||
@@ -196,7 +205,7 @@ onSystemTimerTick:
|
||||
#ifdef APPS_MA_LIGHT
|
||||
bigcall AppMotionLight_Every100ms
|
||||
#endif
|
||||
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
@@ -193,6 +193,14 @@ initModules:
|
||||
bigcall ILI9341_Init
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_XPT2046
|
||||
bigcall XPT2046_Init
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_GUI
|
||||
bigcall GUI_Init
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_BRIGHTNESS
|
||||
bigcall Brightness_Init
|
||||
#endif
|
||||
|
||||
@@ -137,8 +137,7 @@ main:
|
||||
.include "modules/flash/defs.asm"
|
||||
.include "modules/flash/eeprom.asm"
|
||||
.include "modules/flash/io.asm"
|
||||
.include "modules/flash/io_attn.asm"
|
||||
.include "modules/flash/io_bitbang.asm"
|
||||
.include "modules/flash/io_com2w.asm"
|
||||
.include "modules/flash/flash1pmega.asm"
|
||||
.include "modules/flash/flashxp.asm"
|
||||
.include "modules/flash/flashprocess.asm"
|
||||
|
||||
@@ -72,15 +72,15 @@
|
||||
.equ COM_DATA_OUTPUT = PORTD
|
||||
.equ COM_DATA_PIN = PORTD0
|
||||
|
||||
.equ COM_ATTN_DDR = DDRD
|
||||
.equ COM_ATTN_INPUT = PIND
|
||||
.equ COM_ATTN_OUTPUT = PORTD
|
||||
.equ COM_ATTN_PIN = PORTD2
|
||||
.equ COM_CLK_DDR = DDRD
|
||||
.equ COM_CLK_INPUT = PIND
|
||||
.equ COM_CLK_OUTPUT = PORTD
|
||||
.equ COM_CLK_PIN = PORTD2
|
||||
|
||||
.equ COM_IRQ_ADDR_ATTN = EIMSK
|
||||
.equ COM_IRQ_BIT_ATTN = INT0
|
||||
.equ COM_IRQ_GIFR_ATTN = INTF0
|
||||
;.equ COM_IRQ_GIMSK_ATTN = PCIE0
|
||||
.equ COM_IRQ_ADDR_CLK = EIMSK
|
||||
.equ COM_IRQ_BIT_CLK = INT0
|
||||
.equ COM_IRQ_GIFR_CLK = INTF0
|
||||
;.equ COM_IRQ_GIMSK_CLK = PCIE0
|
||||
|
||||
|
||||
|
||||
@@ -127,9 +127,12 @@
|
||||
; ---------------------------------------------------------------------------
|
||||
; ILI9341 module
|
||||
|
||||
.equ DISPLAY_WIDTH = 320
|
||||
.equ DISPLAY_HEIGHT = 240
|
||||
|
||||
.equ ILI9341_DEVICENUM = 0
|
||||
.equ ILI9341_DSP_WIDTH = 320
|
||||
.equ ILI9341_DSP_HEIGHT = 240
|
||||
.equ ILI9341_DSP_WIDTH = DISPLAY_WIDTH
|
||||
.equ ILI9341_DSP_HEIGHT = DISPLAY_HEIGHT
|
||||
|
||||
.equ ILI9341_RESET_DDR = DDRB
|
||||
.equ ILI9341_RESET_OUTPUT = PORTB
|
||||
@@ -148,6 +151,13 @@
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; XPT2046 module
|
||||
|
||||
.equ XPT2046_DEVICENUM = 1
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; ComOnUart module
|
||||
|
||||
|
||||
@@ -47,16 +47,18 @@
|
||||
; #define MODULES_TIMER
|
||||
#define MODULES_CLOCK
|
||||
;#define MODULES_XRAM
|
||||
#define MODULES_HEAP
|
||||
;#define MODULES_HEAP
|
||||
#define MODULES_LED_SIMPLE
|
||||
#define MODULES_NETWORK
|
||||
;#define MODULES_COMONUART0
|
||||
;#define MODULES_UART_HW
|
||||
#define MODULES_UART_BITBANG
|
||||
;#define MODULES_UART_BITBANG
|
||||
#define MODULES_COM2W
|
||||
#define MODULES_SPI_HW
|
||||
#define MODULES_ILI9341
|
||||
#define MODULES_XPT2046
|
||||
#define MODULES_FONT
|
||||
#define MODULES_WIN
|
||||
#define MODULES_GUI
|
||||
;#define MODULES_TWI_MASTER
|
||||
;#define MODULES_LCD
|
||||
;#define LCD_MINIMAL_FONT
|
||||
@@ -112,7 +114,7 @@
|
||||
; ---------------------------------------------------------------------------
|
||||
; Reset and interrupt vectors
|
||||
jmp BOOTLOADER_ADDR ; 1: Reset vector RESET
|
||||
jmp UART_BitBang_PcintIsr ; 2: INT0 External Interrupt Request 0
|
||||
jmp com2wPcintIsr ; 2: INT0 External Interrupt Request 0
|
||||
jmp irqNotSet ; 3: INT1 External Interrupt Request 1
|
||||
jmp irqNotSet ; 4: INT2 External Interrupt Request 2
|
||||
jmp irqNotSet ; 5: PCINT0 Pin Change Interrupt Request 0
|
||||
@@ -168,6 +170,8 @@ irqNotSet:
|
||||
; @routine onSystemStart
|
||||
|
||||
onSystemStart:
|
||||
clr r16
|
||||
sts statsUpdateTimer, r16
|
||||
bigcall test
|
||||
ret
|
||||
; @end
|
||||
@@ -192,7 +196,6 @@ onMessageReceived:
|
||||
; Called every 100ms. Add your routine calls here. No arguments, no results.
|
||||
|
||||
onEvery100ms:
|
||||
onEverySecond:
|
||||
onEveryMinute:
|
||||
onEveryHour:
|
||||
onEveryDay:
|
||||
@@ -200,6 +203,22 @@ onEveryDay:
|
||||
; @end
|
||||
|
||||
|
||||
onEverySecond:
|
||||
#ifdef MODULES_GUI
|
||||
lds r16, statsUpdateTimer
|
||||
inc r16
|
||||
cpi r16, 5
|
||||
brcc onEverySecond_updateStats
|
||||
sts statsUpdateTimer, r16
|
||||
ret
|
||||
onEverySecond_updateStats:
|
||||
bigcall WinNetStats_Update
|
||||
clr r16
|
||||
sts statsUpdateTimer, r16
|
||||
#endif
|
||||
ret
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine onEveryLoop
|
||||
@@ -212,6 +231,15 @@ onEveryLoop:
|
||||
|
||||
|
||||
|
||||
test:
|
||||
#ifdef MODULES_GUI
|
||||
bigcall WinNetStats_Init
|
||||
bigcall WinNetStats_Show
|
||||
#endif
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
@@ -222,227 +250,34 @@ onEveryLoop:
|
||||
|
||||
;.include "common/debug.asm"
|
||||
|
||||
.include "modules/lcd2/gui/titlewindow2.asm"
|
||||
;.include "modules/lcd2/font/font2.asm"
|
||||
;.include "modules/lcd2/font/font3.asm"
|
||||
;.include "modules/lcd2/font/font16x26.asm"
|
||||
;.include "modules/lcd2/font/font4.asm"
|
||||
;.include "modules/lcd2/font/font12x16.asm"
|
||||
.include "modules/lcd2/font/font5.asm"
|
||||
.include "modules/lcd2/font/font12x20.asm"
|
||||
.include "modules/lcd2/ili9341/font12x20.asm"
|
||||
.include "modules/lcd2/ili9341/font12x20_1.asm"
|
||||
;.include "common/list_t.asm"
|
||||
.include "common/tree_t.asm"
|
||||
;.include "common/tree_t.asm"
|
||||
.include "common/divide.asm"
|
||||
|
||||
.include "modules/lcd2/gui/style.asm"
|
||||
.include "win_netstats.asm"
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; defines for network interface
|
||||
|
||||
;.equ netInterfaceData = netUartIface
|
||||
.equ netInterfaceData = uart_bitbang_iface
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; @param %0 X
|
||||
; @param %1 Y
|
||||
; @param %2 W
|
||||
; @param %3 H
|
||||
.macro M_FILL_RECT
|
||||
ldi r16, LOW(@0) ; X0
|
||||
mov r4, r16
|
||||
ldi r16, HIGH(@0)
|
||||
mov r5, r16
|
||||
|
||||
ldi r16, LOW(@1) ; Y0
|
||||
mov r6, r16
|
||||
ldi r16, HIGH(@1)
|
||||
mov r7, r16
|
||||
|
||||
ldi r16, LOW(@2) ; W
|
||||
mov r8, r16
|
||||
ldi r16, HIGH(@2)
|
||||
mov r9, r16
|
||||
|
||||
ldi r16, LOW(@3) ; H
|
||||
mov r10, r16
|
||||
ldi r16, HIGH(@3)
|
||||
mov r11, r16
|
||||
|
||||
bigcall ILI9341_FillRect
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
|
||||
test:
|
||||
; set foreground (r3:r2)
|
||||
; 0bRRRRRGGGGGGBBBBB
|
||||
ldi r16, 0b11111111
|
||||
mov r3, r16
|
||||
ldi r16, 0b11111111 ; white
|
||||
mov r2, r16
|
||||
M_FILL_RECT 0, 0, 319, 239
|
||||
|
||||
; set foreground (r3:r2)
|
||||
ldi r16, 0b00000000
|
||||
mov r3, r16
|
||||
ldi r16, 0b00011111 ; blue
|
||||
mov r2, r16
|
||||
M_FILL_RECT 0, 0, 319, 32
|
||||
|
||||
; set background (r1:r0)
|
||||
mov r0, r2
|
||||
mov r1, r3
|
||||
|
||||
; set foreground (r3:r2)
|
||||
ldi r16, 0b11111111
|
||||
mov r3, r16
|
||||
ldi r16, 0b11111111 ; white
|
||||
mov r2, r16
|
||||
|
||||
; set Xpos
|
||||
ldi r16, LOW(10)
|
||||
mov r4, r16
|
||||
ldi r16, HIGH(10)
|
||||
mov r5, r16
|
||||
|
||||
; setYpos
|
||||
ldi r16, LOW(3)
|
||||
mov r6, r16
|
||||
ldi r16, HIGH(3)
|
||||
mov r7, r16
|
||||
|
||||
; set font
|
||||
; ldi zl, LOW(font3_16x26*2)
|
||||
; ldi zh, HIGH(font3_16x26*2)
|
||||
ldi zl, LOW(font5_12x20*2)
|
||||
ldi zh, HIGH(font5_12x20*2)
|
||||
|
||||
; set buffer
|
||||
ldi xl, LOW(glyphBuffer)
|
||||
ldi xh, HIGH(glyphBuffer)
|
||||
|
||||
; write characters
|
||||
ldi r16, 'A'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
ldi r16, 'Q'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
ldi r16, 'H'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
ldi r16, 'O'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
ldi r16, 'M'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
ldi r16, 'E'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
#if 0
|
||||
push xl
|
||||
push xh
|
||||
rcall listTest1
|
||||
pop xh
|
||||
pop xl
|
||||
brcc test_error
|
||||
ldi r16, '!'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
push xl
|
||||
push xh
|
||||
rcall listTest2
|
||||
pop xh
|
||||
pop xl
|
||||
brcc test_error
|
||||
ldi r16, '!'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
push xl
|
||||
push xh
|
||||
rcall listTest3
|
||||
pop xh
|
||||
pop xl
|
||||
brcc test_error
|
||||
ldi r16, '!'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
push xl
|
||||
push xh
|
||||
rcall listTest4
|
||||
pop xh
|
||||
pop xl
|
||||
brcc test_error
|
||||
ldi r16, '!'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
#endif
|
||||
|
||||
|
||||
#if 1
|
||||
push xl
|
||||
push xh
|
||||
rcall treeTest1
|
||||
pop xh
|
||||
pop xl
|
||||
brcc test_error
|
||||
ldi r16, '!'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
push xl
|
||||
push xh
|
||||
rcall treeTest2
|
||||
pop xh
|
||||
pop xl
|
||||
brcc test_error
|
||||
ldi r16, '!'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
push xl
|
||||
push xh
|
||||
rcall treeTest3
|
||||
pop xh
|
||||
pop xl
|
||||
brcc test_error
|
||||
ldi r16, '!'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
push xl
|
||||
push xh
|
||||
rcall treeTest4
|
||||
pop xh
|
||||
pop xl
|
||||
brcc test_error
|
||||
ldi r16, '!'
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
ret
|
||||
|
||||
test_error:
|
||||
ldi r17, '0'
|
||||
add r16, r17
|
||||
bigcall ili9341_WriteCharacterX1At
|
||||
|
||||
|
||||
ret
|
||||
|
||||
|
||||
|
||||
helloWorld: .db "Hello World", 0
|
||||
|
||||
|
||||
|
||||
|
||||
;.equ netInterfaceData = uart_bitbang_iface
|
||||
.equ netInterfaceData = com2w_iface
|
||||
|
||||
|
||||
.dseg
|
||||
|
||||
glyphBuffer: .byte 1024
|
||||
statsUpdateTimer: .byte 1
|
||||
|
||||
heapStart:
|
||||
|
||||
|
||||
|
||||
187
avr/devices/c02/main/win_netstats.asm
Normal file
187
avr/devices/c02/main/win_netstats.asm
Normal file
@@ -0,0 +1,187 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_DEVICE_C02_WIN_NETSTATS_ASM
|
||||
#define AQH_AVR_DEVICE_C02_WIN_NETSTATS_ASM
|
||||
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
WinNetStats_Init:
|
||||
clr r16
|
||||
sts winNetstatsUpdateNum, r16
|
||||
sts winNetstatsUpdateNum+1, r16
|
||||
|
||||
; setup
|
||||
ldi yl, LOW(winNetstats)
|
||||
ldi yh, HIGH(winNetstats)
|
||||
bigcall TitleWindow_Init
|
||||
|
||||
ldi zl, LOW(STYLE_WIN_FONT*2)
|
||||
ldi zh, HIGH(STYLE_WIN_FONT*2)
|
||||
std Y+WIN_OFFS_FONT_LO, zl
|
||||
std Y+WIN_OFFS_FONT_HI, zh
|
||||
|
||||
bigcall TitleWindow_SetFullSize
|
||||
bigcall TitleWindow_SetStyleColors
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; @param @0 Y
|
||||
; @param @1 label addr
|
||||
|
||||
.macro WINNETSTATS_PRINTLABEL
|
||||
; packets in
|
||||
ldi zl, LOW(@1 * 2)
|
||||
ldi zh, HIGH(@1 * 2)
|
||||
ldi r16, 2 ; X
|
||||
mov r4, r16
|
||||
clr r5
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT+@0) ; Y
|
||||
mov r6, r16
|
||||
ldi r16, HIGH(STYLE_WIN_TITLE_HEIGHT+@0)
|
||||
mov r7, r16
|
||||
bigcall Window_DrawTextFlash
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
; @param @0 X
|
||||
; @param @1 Y
|
||||
; @param @2 data address
|
||||
|
||||
.macro WINNETSTATS_PRINTDATA
|
||||
ldi r16, @0 ; X
|
||||
mov r4, r16
|
||||
clr r5
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT+@1) ; Y
|
||||
mov r6, r16
|
||||
ldi r16, HIGH(@1)
|
||||
mov r7, r16
|
||||
lds r16, @2 ; data
|
||||
lds r17, @2+1
|
||||
bigcall Window_WriteHexWordAt
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
WinNetStats_Show:
|
||||
; draw title window basics (with title)
|
||||
ldi yl, LOW(winNetstats)
|
||||
ldi yh, HIGH(winNetstats)
|
||||
ldi zl, LOW(winNetstats_title*2)
|
||||
ldi zh, HIGH(winNetstats_title*2)
|
||||
bigcall TitleWindow_DrawTitle
|
||||
|
||||
bigcall TitleWindow_ClearContentArea
|
||||
|
||||
; packets in
|
||||
WINNETSTATS_PRINTLABEL 2, winNetstats_lPacketsIn
|
||||
; packets out
|
||||
WINNETSTATS_PRINTLABEL 24, winNetstats_lPacketsOut
|
||||
; eContent
|
||||
WINNETSTATS_PRINTLABEL 46, winNetstats_lContentErr
|
||||
; eIO
|
||||
WINNETSTATS_PRINTLABEL 68, winNetstats_lIoErr
|
||||
; eMsgSize
|
||||
WINNETSTATS_PRINTLABEL 90, winNetstats_lMsgSizeErr
|
||||
|
||||
; draw horizontal line
|
||||
ldi r16, STYLE_WIN_TITLE_HEIGHT+112
|
||||
mov r6, r16
|
||||
clr r7
|
||||
clr r4
|
||||
clr r5
|
||||
ldi r16, LOW(DISPLAY_WIDTH)
|
||||
mov r8, r16
|
||||
ldi r16, HIGH(DISPLAY_WIDTH)
|
||||
mov r9, r16
|
||||
clr r2
|
||||
clr r3
|
||||
bigcall Display_DrawHLine
|
||||
|
||||
; X
|
||||
WINNETSTATS_PRINTLABEL 114, winNetstats_lX
|
||||
; Y
|
||||
WINNETSTATS_PRINTLABEL 136, winNetstats_lY
|
||||
; Z
|
||||
WINNETSTATS_PRINTLABEL 158, winNetstats_lZ
|
||||
; update num
|
||||
WINNETSTATS_PRINTLABEL 180, winNetstats_lUpdate
|
||||
|
||||
rcall WinNetStats_Update
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
WinNetStats_Update:
|
||||
lds r16, winNetstatsUpdateNum
|
||||
inc r16
|
||||
sts winNetstatsUpdateNum, r16
|
||||
|
||||
ldi yl, LOW(winNetstats)
|
||||
ldi yh, HIGH(winNetstats)
|
||||
|
||||
; packets in
|
||||
WINNETSTATS_PRINTDATA 160, 2, netInterfaceData+NET_IFACE_OFFS_PACKETSIN_LOW
|
||||
; packets out
|
||||
WINNETSTATS_PRINTDATA 160, 24, netInterfaceData+NET_IFACE_OFFS_PACKETSOUT_LOW
|
||||
; eContent
|
||||
WINNETSTATS_PRINTDATA 160, 46, netInterfaceData+NET_IFACE_OFFS_ERR_CONTENT_LOW
|
||||
; eIO
|
||||
WINNETSTATS_PRINTDATA 160, 68, netInterfaceData+NET_IFACE_OFFS_ERR_IO_LOW
|
||||
; eMsgSize
|
||||
WINNETSTATS_PRINTDATA 160, 90, netInterfaceData+NET_IFACE_OFFS_ERR_MSGSIZE_LOW
|
||||
|
||||
; X
|
||||
WINNETSTATS_PRINTDATA 160, 114, xpt2046CurrentX
|
||||
WINNETSTATS_PRINTDATA 240, 114, xpt2046RawX
|
||||
; Y
|
||||
WINNETSTATS_PRINTDATA 160, 136, xpt2046CurrentY
|
||||
WINNETSTATS_PRINTDATA 240, 136, xpt2046RawY
|
||||
; Z
|
||||
WINNETSTATS_PRINTDATA 160, 158, xpt2046CurrentZ
|
||||
; update num
|
||||
WINNETSTATS_PRINTDATA 160, 180, winNetstatsUpdateNum
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
winNetstats_title: .db "Network Statistics", 0, 0
|
||||
|
||||
winNetstats_lPacketsIn: .db "Pkgs In :", 0
|
||||
winNetstats_lPacketsOut: .db "Pkgs Out:", 0
|
||||
winNetstats_lContentErr: .db "eContent:", 0
|
||||
winNetstats_lIoErr: .db "eIO :", 0
|
||||
winNetstats_lMsgSizeErr: .db "eMsgSize:", 0
|
||||
winNetstats_lX: .db "X :", 0
|
||||
winNetstats_lY: .db "Y :", 0
|
||||
winNetstats_lZ: .db "Z :", 0
|
||||
winNetstats_lUpdate: .db "Update :", 0
|
||||
.dseg
|
||||
|
||||
winNetstats:
|
||||
.byte WIN_SIZE
|
||||
|
||||
|
||||
|
||||
.dseg
|
||||
|
||||
winNetstatsUpdateNum: .byte 2
|
||||
|
||||
|
||||
#endif
|
||||
2
avr/devices/c03/.gitignore
vendored
Normal file
2
avr/devices/c03/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.eep.hex
|
||||
*.obj
|
||||
18
avr/devices/c03/0BUILD
Normal file
18
avr/devices/c03/0BUILD
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml?>
|
||||
|
||||
<gwbuild>
|
||||
|
||||
<subdirs>
|
||||
boot
|
||||
main
|
||||
</subdirs>
|
||||
|
||||
<extradist>
|
||||
defs.asm
|
||||
README
|
||||
</extradist>
|
||||
|
||||
|
||||
</gwbuild>
|
||||
|
||||
|
||||
10
avr/devices/c03/README
Normal file
10
avr/devices/c03/README
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
C01
|
||||
===
|
||||
|
||||
- Role: Controller with Display
|
||||
- MCU: AtMega 644P
|
||||
- Connection: RJ45
|
||||
- Periphery:
|
||||
- Display with SPI
|
||||
|
||||
32
avr/devices/c03/boot/0BUILD
Normal file
32
avr/devices/c03/boot/0BUILD
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml?>
|
||||
|
||||
<gwbuild>
|
||||
|
||||
<target type="AvrHexFile" name="c03_boot" >
|
||||
|
||||
<includes type="avrasm" >
|
||||
-I $(builddir)
|
||||
-I $(srcdir)
|
||||
-I $(topsrcdir)/avr
|
||||
-I $(topbuilddir)/avr
|
||||
</includes>
|
||||
|
||||
|
||||
<sources type="avrasm" >
|
||||
boot.asm
|
||||
</sources>
|
||||
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<subdirs>
|
||||
</subdirs>
|
||||
|
||||
<extradist>
|
||||
</extradist>
|
||||
|
||||
|
||||
</gwbuild>
|
||||
|
||||
|
||||
159
avr/devices/c03/boot/boot.asm
Normal file
159
avr/devices/c03/boot/boot.asm
Normal file
@@ -0,0 +1,159 @@
|
||||
; ***************************************************************************
|
||||
; Source file for base system node on AtMega 644P
|
||||
;
|
||||
; This is for the maintenance system (i.e. the flash loader).
|
||||
;
|
||||
; All definitions and changes should go into this file.
|
||||
; ***************************************************************************
|
||||
|
||||
.equ clock=8000000 ; Define the clock frequency
|
||||
|
||||
.nolist
|
||||
.include "include/m644Pdef.inc" ; Define device ATmega8515
|
||||
.list
|
||||
|
||||
.include "../defs.asm"
|
||||
.include "devices/all/defs.asm"
|
||||
|
||||
.include "common/calls.asm"
|
||||
.include "common/utils_wait.asm"
|
||||
.include "common/utils_io.asm"
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; defines
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; generic
|
||||
|
||||
|
||||
.equ NET_BUFFERS_NUM = 6
|
||||
.equ NET_BUFFERS_SIZE = 32
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; firmware settings
|
||||
|
||||
.equ FIRMWARE_VERSION_MAJOR = 0
|
||||
.equ FIRMWARE_VERSION_MINOR = 0
|
||||
.equ FIRMWARE_VERSION_PATCHLEVEL = 1
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; LED
|
||||
|
||||
.equ LED_DDR = DDRB
|
||||
.equ LED_PORT = PORTB
|
||||
.equ LED_PIN = PINB
|
||||
.equ LED_PINNUM = PORTB0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code segment
|
||||
|
||||
.cseg
|
||||
.org 0x0000
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Reset and interrupt vectors
|
||||
jmp main ; 1: Reset vector RESET
|
||||
jmp irqNotSet ; 2: INT0 External Interrupt Request 0
|
||||
jmp irqNotSet ; 3: INT1 External Interrupt Request 1
|
||||
jmp irqNotSet ; 4: INT2 External Interrupt Request 2
|
||||
jmp irqNotSet ; 5: PCINT0 Pin Change Interrupt Request 0
|
||||
jmp irqNotSet ; 6: PCINT1 Pin Change Interrupt Request 1
|
||||
jmp irqNotSet ; 7: PCINT2 Pin Change Interrupt Request 2
|
||||
jmp irqNotSet ; 8: PCINT3 Pin Change Interrupt Request 3
|
||||
jmp irqNotSet ; 9: WDT Watchdog Time-out Interrupt
|
||||
jmp irqNotSet ; 10: TIMER2_COMPA Timer/Counter2 Compare Match A
|
||||
jmp irqNotSet ; 11: TIMER2_COMPB Timer/Counter2 Compare Match B
|
||||
jmp irqNotSet ; 12: TIMER2_OVF Timer/Counter2 Overflow
|
||||
jmp irqNotSet ; 13: TIMER1_CAPT Timer/Counter1 Capture Event
|
||||
jmp irqNotSet ; 14: TIMER1_COMPA Timer/Counter1 Compare Match A
|
||||
jmp irqNotSet ; 15: TIMER1_COMPB Timer/Counter1 Compare Match B
|
||||
jmp irqNotSet ; 16: TIMER1_OVF Timer/Counter1 Overflow
|
||||
jmp irqNotSet ; 17: TIMER0_COMPA Timer/Counter0 Compare Match A
|
||||
jmp irqNotSet ; 18: TIMER0_COMPB Timer/Counter0 Compare Match B
|
||||
jmp irqNotSet ; 19: TIMER0_OVF Timer/Counter0 Overflow
|
||||
jmp irqNotSet ; 20: SPI_STC Serial Transfer Complete
|
||||
jmp irqNotSet ; 21: USART0_RXC USART0 Rx Complete
|
||||
jmp irqNotSet ; 22: USART0_UDRE USART0 Data Register Empty
|
||||
jmp irqNotSet ; 23: USART0_TXC USART0 Tx Complete
|
||||
jmp irqNotSet ; 24: ANA_COMP Analog Comparator
|
||||
jmp irqNotSet ; 25: ADC ADC Conversion Complete
|
||||
jmp irqNotSet ; 26: EE_RDY EEPROM Ready
|
||||
jmp irqNotSet ; 27: TWI 2-Wire Interface
|
||||
jmp irqNotSet ; 28: SPM_RDY Store Program Memory Ready
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Device Info Block
|
||||
|
||||
devInfoBlock: ; 12 bytes
|
||||
devInfoManufacturer: .db 'A', 'Q', 'U', 'A'
|
||||
devInfoId: .db DEVICEINFO_ID, 0
|
||||
devInfoVersion: .db DEVICEINFO_VERSION, DEVICEINFO_REVISION ; version, revision
|
||||
firmwareVersion: .db FIRMWARE_VARIANT_BOOT, FIRMWARE_VERSION_MAJOR
|
||||
.db FIRMWARE_VERSION_MINOR, FIRMWARE_VERSION_PATCHLEVEL
|
||||
|
||||
firmwareStart:
|
||||
jmp main ; will be overwritten when flashing
|
||||
|
||||
irqNotSet:
|
||||
reti
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; main code
|
||||
|
||||
|
||||
.org BOOTLOADER_ADDR
|
||||
|
||||
|
||||
main:
|
||||
; ldi r16, 0xb0 ; orig: a0
|
||||
; out OSCCAL, r16
|
||||
jmp bootLoader ; this routine is in modules/bootloader/main.asm
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; includes
|
||||
|
||||
.include "common/wait_10us.asm"
|
||||
.include "common/utils_copy_from_flash.asm"
|
||||
.include "common/utils_copy_sdram.asm"
|
||||
|
||||
.include "modules/flash/defs.asm"
|
||||
.include "modules/flash/eeprom.asm"
|
||||
.include "modules/flash/io.asm"
|
||||
.include "modules/flash/io_com2w.asm"
|
||||
.include "modules/flash/flash1pmega.asm"
|
||||
.include "modules/flash/flashxp.asm"
|
||||
.include "modules/flash/flashprocess.asm"
|
||||
.include "modules/flash/wait.asm"
|
||||
.include "modules/bootloader/main.asm"
|
||||
.include "modules/network/msg/defs.asm"
|
||||
.include "modules/network/msg/crc.asm"
|
||||
|
||||
;.include "common/debug.asm"
|
||||
|
||||
|
||||
|
||||
systemSetSpeed:
|
||||
; speed not changeable at runtime on this device
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
197
avr/devices/c03/defs.asm
Normal file
197
avr/devices/c03/defs.asm
Normal file
@@ -0,0 +1,197 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
;
|
||||
; AtMega644
|
||||
; --------
|
||||
; LED PB0 1 40 PA0 DEV0
|
||||
; DC PB1 2 39 PA1 DEV1
|
||||
; INT2 PB2 3 38 PA2 DEV2
|
||||
; DSPRES PB3 4 37 PA3 PA3
|
||||
; SS PB4 5 36 PA4 PA4
|
||||
; MOSI PB5 6 35 PA5
|
||||
; MISO PB6 7 34 PA6
|
||||
; SCK PB7 8 33 PA7
|
||||
; /RESET 9 32 AREF
|
||||
; VCC 10 31 GND
|
||||
; GND 11 30 AVCC
|
||||
; XTAL2 12 29 PC7
|
||||
; XTAL1 13 28 PC6
|
||||
; RXD PD0 14 27 PC5
|
||||
; TXD PD1 15 26 PC4
|
||||
; PD2 16 25 PC3
|
||||
; INT1 PD3 17 24 PC2
|
||||
; AUX_PD4 PD4 18 23 PC1
|
||||
; DSPLED PD5 19 22 PC0
|
||||
; PD6 20 21 PD7
|
||||
; --------
|
||||
;
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
|
||||
.equ BOOTLOADER_ADDR = 0x7c00
|
||||
|
||||
.equ RESSOURCE_ADDR = 0x4000
|
||||
|
||||
.equ FIRMWARE_VARIANT_BOOT = 0
|
||||
.equ FIRMWARE_VARIANT_TEMP_WINDOW = 1
|
||||
|
||||
.equ DEVICEINFO_ID = 'C'
|
||||
.equ DEVICEINFO_VERSION = 3
|
||||
.equ DEVICEINFO_REVISION = 0
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; LED module
|
||||
|
||||
.equ LED_SIMPLE_ONTIME = 1 ; shorter
|
||||
.equ LED_SIMPLE_OFFTIME = 50 ; longer
|
||||
.equ LED_SIMPLE_DDR = DDRB
|
||||
.equ LED_SIMPLE_PORT = PORTB
|
||||
.equ LED_SIMPLE_PORTIN = PINB
|
||||
.equ LED_SIMPLE_PINNUM = PORTB0
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; COM module
|
||||
|
||||
.equ COM_BIT_LENGTH = 52000 ; 104000ns=9600, 52000ns=19200, 26000ns=38400
|
||||
.equ COM_HALFBIT_LENGTH = 26000 ; see https://de.wikipedia.org/wiki/Universal_Asynchronous_Receiver_Transmitter
|
||||
|
||||
.equ COM_DATA_DDR = DDRA
|
||||
.equ COM_DATA_INPUT = PINA
|
||||
.equ COM_DATA_OUTPUT = PORTA
|
||||
.equ COM_DATA_PIN = PORTA6
|
||||
|
||||
.equ COM_CLK_DDR = DDRA
|
||||
.equ COM_CLK_INPUT = PINA
|
||||
.equ COM_CLK_OUTPUT = PORTA
|
||||
.equ COM_CLK_PIN = PORTA7
|
||||
|
||||
; pin change interrupt register and bit
|
||||
.equ COM_IRQ_ADDR_CLK = PCMSK0
|
||||
.equ COM_IRQ_BIT_CLK = PCINT7 ; PA7
|
||||
|
||||
; interrupt control register
|
||||
.equ COM_IRQ_ICR_ADDR = PCICR ; PCICR on AtMega644P, GIMSK on AtTiny
|
||||
.equ COM_IRQ_ICR_BIT = PCIE0
|
||||
|
||||
; interrupt flag/mask register
|
||||
.equ COM_IRQ_IFR_ADDR = PCIFR ; PCIFR on AtMega644P, GIFR on AtTiny
|
||||
.equ COM_IRQ_IFR_BIT = PCIF0
|
||||
|
||||
.equ COM_IRQ_GIFR_CLK = INTF0
|
||||
;.equ COM_IRQ_GIMSK_CLK = PCIE0
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; SPI hardware module
|
||||
|
||||
.equ SPIHW_SS_DDR = DDRB
|
||||
.equ SPIHW_SS_INPUT = PINB
|
||||
.equ SPIHW_SS_OUTPUT = PORTB
|
||||
.equ SPIHW_SS_PIN = PORTB4
|
||||
|
||||
.equ SPIHW_MOSI_DDR = DDRB
|
||||
.equ SPIHW_MOSI_INPUT = PINB
|
||||
.equ SPIHW_MOSI_OUTPUT = PORTB
|
||||
.equ SPIHW_MOSI_PIN = PORTB5
|
||||
|
||||
.equ SPIHW_MISO_DDR = DDRB
|
||||
.equ SPIHW_MISO_INPUT = PINB
|
||||
.equ SPIHW_MISO_OUTPUT = PORTB
|
||||
.equ SPIHW_MISO_PIN = PORTB6
|
||||
|
||||
.equ SPIHW_SCK_DDR = DDRB
|
||||
.equ SPIHW_SCK_INPUT = PINB
|
||||
.equ SPIHW_SCK_OUTPUT = PORTB
|
||||
.equ SPIHW_SCK_PIN = PORTB7
|
||||
|
||||
.equ SPIHW_SS0_DDR = DDRA
|
||||
.equ SPIHW_SS0_OUTPUT = PORTA
|
||||
.equ SPIHW_SS0_INPUT = PORTA
|
||||
.equ SPIHW_SS0_PIN = PORTA0
|
||||
|
||||
.equ SPIHW_SS1_DDR = DDRA
|
||||
.equ SPIHW_SS1_OUTPUT = PORTA
|
||||
.equ SPIHW_SS1_INPUT = PORTA
|
||||
.equ SPIHW_SS1_PIN = PORTA1
|
||||
|
||||
.equ SPIHW_SS2_DDR = DDRA
|
||||
.equ SPIHW_SS2_OUTPUT = PORTA
|
||||
.equ SPIHW_SS2_INPUT = PORTA
|
||||
.equ SPIHW_SS2_PIN = PORTA2
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; ILI9341 module
|
||||
|
||||
.equ DISPLAY_WIDTH = 320
|
||||
.equ DISPLAY_HEIGHT = 240
|
||||
|
||||
.equ ILI9341_DEVICENUM = 0
|
||||
.equ ILI9341_DSP_WIDTH = DISPLAY_WIDTH
|
||||
.equ ILI9341_DSP_HEIGHT = DISPLAY_HEIGHT
|
||||
|
||||
.equ ILI9341_RESET_DDR = DDRB
|
||||
.equ ILI9341_RESET_OUTPUT = PORTB
|
||||
.equ ILI9341_RESET_INPUT = PORTB
|
||||
.equ ILI9341_RESET_PIN = PORTB3
|
||||
|
||||
.equ ILI9341_DC_DDR = DDRB
|
||||
.equ ILI9341_DC_OUTPUT = PORTB
|
||||
.equ ILI9341_DC_INPUT = PORTB
|
||||
.equ ILI9341_DC_PIN = PORTB1
|
||||
|
||||
.equ ILI9341_LED_DDR = DDRD
|
||||
.equ ILI9341_LED_OUTPUT = PORTD
|
||||
.equ ILI9341_LED_INPUT = PORTD
|
||||
.equ ILI9341_LED_PIN = PORTD5
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; XPT2046 module
|
||||
|
||||
.equ XPT2046_DEVICENUM = 1
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; ComOnUart module
|
||||
|
||||
;.equ USART0_DATAREG = UDR
|
||||
;.equ UCSR0A = UCSRA
|
||||
;.equ UCSR0B = UCSRB
|
||||
;.equ UCSR0C = UCSRC
|
||||
;.equ UBRR0L = UBRRL
|
||||
;.equ UBRR0H = UBRRH
|
||||
|
||||
;.equ UCSZ00 = UCSZ0
|
||||
;.equ UCSZ01 = UCSZ1
|
||||
;.equ UDRE0 = UDRE
|
||||
;.equ RXC0 = RXC
|
||||
;.equ TXC0 = TXC
|
||||
;.equ FE0 = FE
|
||||
;.equ DOR0 = DOR
|
||||
;.equ UPE0 = UPE
|
||||
;.equ RXEN0 = RXEN
|
||||
;.equ TXEN0 = TXEN
|
||||
;.equ USBS0 = USBS
|
||||
;.equ RXCIE0 = RXCIE
|
||||
;.equ UDRIE0 = UDRIE
|
||||
|
||||
|
||||
52
avr/devices/c03/main/0BUILD
Normal file
52
avr/devices/c03/main/0BUILD
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml?>
|
||||
|
||||
<gwbuild>
|
||||
|
||||
<target type="AvrHexFile" name="c03_firmware" >
|
||||
|
||||
<includes type="avrasm" >
|
||||
-I $(builddir)
|
||||
-I $(srcdir)
|
||||
-I $(topsrcdir)/avr
|
||||
-I $(topbuilddir)/avr
|
||||
</includes>
|
||||
|
||||
|
||||
<sources type="avrasm" >
|
||||
main.asm
|
||||
</sources>
|
||||
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<target type="AvrHexFile" name="c03_ressources" >
|
||||
|
||||
<includes type="avrasm" >
|
||||
-I $(builddir)
|
||||
-I $(srcdir)
|
||||
-I $(topsrcdir)/avr
|
||||
-I $(topbuilddir)/avr
|
||||
</includes>
|
||||
|
||||
|
||||
<sources type="avrasm" >
|
||||
ressources.asm
|
||||
</sources>
|
||||
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
|
||||
<subdirs>
|
||||
</subdirs>
|
||||
|
||||
<extradist>
|
||||
data.asm
|
||||
</extradist>
|
||||
|
||||
|
||||
</gwbuild>
|
||||
|
||||
|
||||
14
avr/devices/c03/main/data.asm
Normal file
14
avr/devices/c03/main/data.asm
Normal file
@@ -0,0 +1,14 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
|
||||
.dseg
|
||||
|
||||
|
||||
307
avr/devices/c03/main/dlg_netstats.asm
Normal file
307
avr/devices/c03/main/dlg_netstats.asm
Normal file
@@ -0,0 +1,307 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_DEVICE_C03_DLG_NETSTATS_ASM
|
||||
#define AQH_AVR_DEVICE_C03_DLG_NETSTATS_ASM
|
||||
|
||||
.equ DLG_NETSTATS_TIMER_100ms = 50
|
||||
|
||||
.equ DLG_NETSTATS_FLAGS_BUTTON_DOWN_BIT = 0
|
||||
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
|
||||
DlgNetStats_Init:
|
||||
ldi yl, LOW(dlgNetstats)
|
||||
ldi yh, HIGH(dlgNetstats)
|
||||
bigcall Dialog_Init
|
||||
; set handler
|
||||
ldi r16, LOW(DlgNetStats_Handler)
|
||||
std Y+DIALOG_OFFS_HANDLER_LO, r16
|
||||
ldi r16, HIGH(DlgNetStats_Handler)
|
||||
std Y+DIALOG_OFFS_HANDLER_HI, r16
|
||||
|
||||
; clear vars
|
||||
clr r16
|
||||
sts dlgNetstatsUpdateNum, r16
|
||||
sts dlgNetstatsUpdateNum+1, r16
|
||||
sts dlgNetstatsTimer, r16
|
||||
sts dlgNetstatsFlags, r16
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
DlgNetStats_Handler:
|
||||
cpi r23, (DIALOG_FN_TIMER+1)
|
||||
brcc DlgNetStats_Handler_ret
|
||||
ldi zl, LOW(DlgNetStats_Handler_Fns)
|
||||
ldi zh, HIGH(DlgNetStats_Handler_Fns)
|
||||
add zl, r23
|
||||
adc zh, r23
|
||||
sub zh, r23
|
||||
ijmp
|
||||
DlgNetStats_Handler_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
DlgNetStats_Handler_Fns:
|
||||
rjmp dlgNetStatsOnInit
|
||||
rjmp dlgNetStatsOnFini
|
||||
rjmp dlgNetStatsOnShow
|
||||
rjmp dlgNetStatsOnHide
|
||||
rjmp dlgNetStatsOnTouch
|
||||
rjmp dlgNetStatsOnTimer
|
||||
|
||||
|
||||
|
||||
dlgNetStatsOnInit:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
dlgNetStatsOnFini:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
dlgNetStatsOnShow:
|
||||
push yl
|
||||
push yh
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
rcall DlgNetStats_Show
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
|
||||
|
||||
|
||||
dlgNetStatsOnHide:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
dlgNetStatsOnTouch:
|
||||
mov r16, r18
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
|
||||
; check close button
|
||||
push r18
|
||||
rcall dlgNetStatsCheckCloseButton
|
||||
pop r18
|
||||
brcs dlgNetStatsOnTouch_closeActivated
|
||||
rjmp dlgNetStatsTouch_ret
|
||||
dlgNetStatsOnTouch_closeActivated:
|
||||
; close activated, TODO
|
||||
|
||||
dlgNetStatsTouch_ret:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
dlgNetStatsCheckCloseButton:
|
||||
ldi zl, LOW(dlgNetstats_CloseBtn*2)
|
||||
ldi zh, HIGH(dlgNetstats_CloseBtn*2)
|
||||
clr r19
|
||||
lds r16, dlgNetstatsFlags
|
||||
sbrc r16, DLG_NETSTATS_FLAGS_BUTTON_DOWN_BIT
|
||||
sbr r19, (1<<BUTTON_STATE_DOWN_BIT)
|
||||
bigcall Button_HandleTouch
|
||||
|
||||
lds r16, dlgNetstatsFlags
|
||||
cbr r16, (1<<DLG_NETSTATS_FLAGS_BUTTON_DOWN_BIT)
|
||||
sbrc r19, 0
|
||||
sbr r16, (1<<DLG_NETSTATS_FLAGS_BUTTON_DOWN_BIT)
|
||||
sts dlgNetstatsFlags, r16
|
||||
clc
|
||||
sbrs r19, BUTTON_STATE_ACTIVATED_BIT
|
||||
rjmp dlgNetStatsCheckCloseButton_ret
|
||||
; button activated
|
||||
sec
|
||||
dlgNetStatsCheckCloseButton_ret:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
dlgNetStatsOnTimer:
|
||||
ldd r16, Y+DIALOG_OFFS_OPTIONS
|
||||
andi r16, (1<<DIALOG_OPT_ACTIVE_BIT)
|
||||
breq dlgNetStatsTimer_ret ; not visible, hold timer
|
||||
lds r16, dlgNetstatsTimer
|
||||
inc r16
|
||||
sts dlgNetstatsTimer, r16
|
||||
cpi r16, DLG_NETSTATS_TIMER_100ms
|
||||
brcs dlgNetStatsTimer_ret
|
||||
push yl
|
||||
push yh
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
rcall DlgNetStats_Update
|
||||
pop yh
|
||||
pop yl
|
||||
clr r16
|
||||
sts dlgNetstatsTimer, r16
|
||||
dlgNetStatsTimer_ret:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
; @param @0 Y
|
||||
; @param @1 label addr
|
||||
|
||||
.macro DLGNETSTATS_PRINTLABEL
|
||||
; packets in
|
||||
ldi zl, LOW(@1 * 2)
|
||||
ldi zh, HIGH(@1 * 2)
|
||||
ldi r16, 2 ; X
|
||||
mov r4, r16
|
||||
clr r5
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT+@0) ; Y
|
||||
mov r6, r16
|
||||
ldi r16, HIGH(STYLE_WIN_TITLE_HEIGHT+@0)
|
||||
mov r7, r16
|
||||
bigcall Window_DrawTextFlash
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
; @param @0 X
|
||||
; @param @1 Y
|
||||
; @param @2 data address
|
||||
|
||||
.macro DLGNETSTATS_PRINTDATA
|
||||
ldi r16, @0 ; X
|
||||
mov r4, r16
|
||||
clr r5
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT+@1) ; Y
|
||||
mov r6, r16
|
||||
ldi r16, HIGH(@1)
|
||||
mov r7, r16
|
||||
lds r16, @2 ; data
|
||||
lds r17, @2+1
|
||||
bigcall Window_WriteHexWordAt
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
DlgNetStats_Show:
|
||||
; draw title window basics (with title)
|
||||
ldi zl, LOW(dlgNetstats_title*2)
|
||||
ldi zh, HIGH(dlgNetstats_title*2)
|
||||
bigcall TitleWindow_DrawTitle
|
||||
|
||||
bigcall TitleWindow_ClearContentArea
|
||||
|
||||
; packets in
|
||||
DLGNETSTATS_PRINTLABEL 2, dlgNetstats_lPacketsIn
|
||||
; packets out
|
||||
DLGNETSTATS_PRINTLABEL 1*(2+STYLE_WIN_FONT_HEIGHT), dlgNetstats_lPacketsOut
|
||||
; eContent
|
||||
DLGNETSTATS_PRINTLABEL 2*(2+STYLE_WIN_FONT_HEIGHT), dlgNetstats_lContentErr
|
||||
; eIO
|
||||
DLGNETSTATS_PRINTLABEL 3*(2+STYLE_WIN_FONT_HEIGHT), dlgNetstats_lIoErr
|
||||
; eMsgSize
|
||||
DLGNETSTATS_PRINTLABEL 4*(2+STYLE_WIN_FONT_HEIGHT), dlgNetstats_lMsgSizeErr
|
||||
|
||||
; update num
|
||||
DLGNETSTATS_PRINTLABEL 5*(2+STYLE_WIN_FONT_HEIGHT), dlgNetstats_lUpdate
|
||||
|
||||
; draw horizontal line
|
||||
ldi r16, 4 ; x
|
||||
mov r4, r16
|
||||
clr r5
|
||||
ldi r16, LOW((DISPLAY_HEIGHT-8)-(STYLE_WIN_FONT_HEIGHT+4))
|
||||
mov r6, r16 ; y
|
||||
ldi r16, HIGH((DISPLAY_HEIGHT-8)-(STYLE_WIN_FONT_HEIGHT+4))
|
||||
mov r7, r16
|
||||
ldi r16, LOW(DISPLAY_WIDTH-8)
|
||||
mov r8, r16 ; w
|
||||
ldi r16, HIGH(DISPLAY_WIDTH-8)
|
||||
mov r9, r16
|
||||
ldi r16, LOW(STYLE_WIN_FOREGROUND)
|
||||
mov r2, r16 ; color
|
||||
ldi r16, HIGH(STYLE_WIN_FOREGROUND)
|
||||
mov r3, r16
|
||||
bigcall Display_DrawHLine
|
||||
|
||||
; draw "close" button
|
||||
ldi zl, LOW(dlgNetstats_CloseBtn*2)
|
||||
ldi zh, HIGH(dlgNetstats_CloseBtn*2)
|
||||
bigcall Button_Draw_Up
|
||||
|
||||
; show values
|
||||
rcall DlgNetStats_Update
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
DlgNetStats_Update:
|
||||
lds r16, dlgNetstatsUpdateNum
|
||||
inc r16
|
||||
sts dlgNetstatsUpdateNum, r16
|
||||
|
||||
; packets in
|
||||
DLGNETSTATS_PRINTDATA (12*STYLE_WIN_FONT_WIDTH), 2, netInterfaceData+NET_IFACE_OFFS_PACKETSIN_LOW
|
||||
; packets out
|
||||
DLGNETSTATS_PRINTDATA (12*STYLE_WIN_FONT_WIDTH), 1*(2+STYLE_WIN_FONT_HEIGHT), netInterfaceData+NET_IFACE_OFFS_PACKETSOUT_LOW
|
||||
; eContent
|
||||
DLGNETSTATS_PRINTDATA (12*STYLE_WIN_FONT_WIDTH), 2*(2+STYLE_WIN_FONT_HEIGHT), netInterfaceData+NET_IFACE_OFFS_ERR_CONTENT_LOW
|
||||
; eIO
|
||||
DLGNETSTATS_PRINTDATA (12*STYLE_WIN_FONT_WIDTH), 3*(2+STYLE_WIN_FONT_HEIGHT), netInterfaceData+NET_IFACE_OFFS_ERR_IO_LOW
|
||||
; eMsgSize
|
||||
DLGNETSTATS_PRINTDATA (12*STYLE_WIN_FONT_WIDTH), 4*(2+STYLE_WIN_FONT_HEIGHT), netInterfaceData+NET_IFACE_OFFS_ERR_MSGSIZE_LOW
|
||||
|
||||
DLGNETSTATS_PRINTDATA (12*STYLE_WIN_FONT_WIDTH), 5*(2+STYLE_WIN_FONT_HEIGHT), dlgNetstatsUpdateNum
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
dlgNetstats_title: .db "Network Statistics", 0, 0
|
||||
|
||||
dlgNetstats_lPacketsIn: .db "Pkgs In :", 0
|
||||
dlgNetstats_lPacketsOut: .db "Pkgs Out:", 0
|
||||
dlgNetstats_lContentErr: .db "eContent:", 0
|
||||
dlgNetstats_lIoErr: .db "eIO :", 0
|
||||
dlgNetstats_lMsgSizeErr: .db "eMsgSize:", 0
|
||||
dlgNetstats_lUpdate: .db "Update :", 0
|
||||
dlgNetstats_lClose: .db "Close", 0
|
||||
|
||||
|
||||
dlgNetstats_CloseBtn:
|
||||
; .dw ((DISPLAY_WIDTH-((5*STYLE_WIN_FONT_WIDTH)+4))/2) ; 5 = string length ("close")
|
||||
.dw ((DISPLAY_WIDTH-4-((5*STYLE_WIN_FONT_WIDTH)+4))) ; 5 = string length ("close"), align right
|
||||
.dw ((DISPLAY_HEIGHT-4)-(STYLE_WIN_FONT_HEIGHT+4))
|
||||
.dw (5*STYLE_WIN_FONT_WIDTH)+4 ; 5 = string length ("close")
|
||||
.dw (STYLE_WIN_FONT_HEIGHT+4)
|
||||
.dw (dlgNetstats_lClose*2)
|
||||
|
||||
|
||||
|
||||
.dseg
|
||||
|
||||
dlgNetstats: .byte DIALOG_SIZE
|
||||
dlgNetstatsUpdateNum: .byte 2
|
||||
dlgNetstatsTimer: .byte 1
|
||||
dlgNetstatsFlags: .byte 1
|
||||
|
||||
|
||||
#endif ; AQH_AVR_DEVICE_C03_DLG_NETSTATS_ASM
|
||||
|
||||
281
avr/devices/c03/main/main.asm
Normal file
281
avr/devices/c03/main/main.asm
Normal file
@@ -0,0 +1,281 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
;.equ clock=1000000 ; Define the clock frequency
|
||||
.equ clock=8000000 ; Define the clock frequency
|
||||
|
||||
|
||||
|
||||
.nolist
|
||||
.include "include/m644Pdef.inc" ; Define device ATmega644P
|
||||
.list
|
||||
|
||||
.include "version.asm"
|
||||
.include "../defs.asm"
|
||||
.include "./data.asm"
|
||||
|
||||
.include "devices/all/defs.asm"
|
||||
.include "common/calls.asm"
|
||||
.include "common/utils_wait.asm"
|
||||
.include "common/utils_io.asm"
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; defines
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; generic
|
||||
|
||||
.equ STACK_SIZE = 256
|
||||
|
||||
.equ NET_BUFFERS_NUM = 8
|
||||
.equ NET_MSGNUMINBUF_SIZE = 8 ; max buffer nums in ringbuffer (global incoming)
|
||||
.equ NET_IFACE_OUTMSGBUF_SIZE = 8 ; max buffer nums in ringbuffer (per interface outbound)
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; firmware settings including list of modules used
|
||||
|
||||
; #define MODULES_TIMER
|
||||
#define MODULES_CLOCK
|
||||
;#define MODULES_XRAM
|
||||
;#define MODULES_HEAP
|
||||
#define MODULES_LED_SIMPLE
|
||||
#define MODULES_NETWORK
|
||||
;#define MODULES_COMONUART0
|
||||
;#define MODULES_UART_HW
|
||||
;#define MODULES_UART_BITBANG
|
||||
#define MODULES_COM2W
|
||||
#define MODULES_SPI_HW
|
||||
#define MODULES_ILI9341
|
||||
#define MODULES_XPT2046
|
||||
#define MODULES_FONT
|
||||
#define MODULES_GUI
|
||||
;#define MODULES_TWI_MASTER
|
||||
;#define MODULES_LCD
|
||||
;#define LCD_MINIMAL_FONT
|
||||
;#define MODULES_SI7021
|
||||
;#define MODULES_SGP30
|
||||
;#define MODULES_SGP40
|
||||
;#define MODULES_STATS
|
||||
;#define MODULES_OWI_MASTER
|
||||
;#define MODULES_DS18B20
|
||||
;#define MODULES_MOTION
|
||||
;#define MODULES_CCS811
|
||||
|
||||
#define APPS_NETWORK
|
||||
;#define APPS_MOTION
|
||||
;#define APPS_REPORTSENSORS
|
||||
#define APPS_STATS
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; defines for values
|
||||
|
||||
.equ VALUE_ID_SI7021_TEMP = 0x01
|
||||
.equ VALUE_ID_SI7021_HUM = 0x02
|
||||
|
||||
.equ VALUE_ID_ADC = 0x03
|
||||
;.equ VALUE_ID_DS18B20_TEMP = 0x06
|
||||
.equ VALUE_ID_MOTION = 0x07
|
||||
|
||||
.equ VALUE_ID_SGP40_TVOC = 0x08
|
||||
|
||||
.equ VALUE_ID_SGP30_TVOC = 0x09
|
||||
.equ VALUE_ID_SGP30_CO2 = 0x0a
|
||||
|
||||
;.equ VALUE_ID_REED_CONF = 0x81
|
||||
|
||||
.equ VALUE_ID_DEBUG = 0x7f
|
||||
|
||||
.equ VALUE_ID_LEDSIMPLE_TIMING = 0x88
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code segment
|
||||
|
||||
.cseg
|
||||
.org 000000
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Reset and interrupt vectors
|
||||
jmp BOOTLOADER_ADDR ; 1: Reset vector RESET
|
||||
jmp irqNotSet ; 2: INT0 External Interrupt Request 0
|
||||
jmp irqNotSet ; 3: INT1 External Interrupt Request 1
|
||||
jmp irqNotSet ; 4: INT2 External Interrupt Request 2
|
||||
jmp com2wPcintIsr ; 5: PCINT0 Pin Change Interrupt Request 0
|
||||
jmp irqNotSet ; 6: PCINT1 Pin Change Interrupt Request 1
|
||||
jmp irqNotSet ; 7: PCINT2 Pin Change Interrupt Request 2
|
||||
jmp irqNotSet ; 8: PCINT3 Pin Change Interrupt Request 3
|
||||
jmp irqNotSet ; 9: WDT Watchdog Time-out Interrupt
|
||||
jmp irqNotSet ; 10: TIMER2_COMPA Timer/Counter2 Compare Match A
|
||||
jmp irqNotSet ; 11: TIMER2_COMPB Timer/Counter2 Compare Match B
|
||||
jmp irqNotSet ; 12: TIMER2_OVF Timer/Counter2 Overflow
|
||||
jmp irqNotSet ; 13: TIMER1_CAPT Timer/Counter1 Capture Event
|
||||
jmp irqNotSet ; 14: TIMER1_COMPA Timer/Counter1 Compare Match A
|
||||
jmp irqNotSet ; 15: TIMER1_COMPB Timer/Counter1 Compare Match B
|
||||
jmp irqNotSet ; 16: TIMER1_OVF Timer/Counter1 Overflow
|
||||
jmp baseTimerIrqOC0A ; 17: TIMER0_COMPA Timer/Counter0 Compare Match A
|
||||
jmp irqNotSet ; 18: TIMER0_COMPB Timer/Counter0 Compare Match B
|
||||
jmp irqNotSet ; 19: TIMER0_OVF Timer/Counter0 Overflow
|
||||
jmp irqNotSet ; 20: SPI_STC Serial Transfer Complete
|
||||
jmp irqNotSet ; 21: USART0_RXC USART0 Rx Complete
|
||||
jmp irqNotSet ; 22: USART0_UDRE USART0 Data Register Empty
|
||||
jmp irqNotSet ; 23: USART0_TXC USART0 Tx Complete
|
||||
jmp irqNotSet ; 24: ANA_COMP Analog Comparator
|
||||
jmp irqNotSet ; 25: ADC ADC Conversion Complete
|
||||
jmp irqNotSet ; 26: EE_RDY EEPROM Ready
|
||||
jmp irqNotSet ; 27: TWI 2-Wire Interface
|
||||
jmp irqNotSet ; 28: SPM_RDY Store Program Memory Ready
|
||||
|
||||
|
||||
|
||||
devInfoBlock: ; 12 bytes
|
||||
devInfoManufacturer: .db 'A', 'Q', 'U', 'A'
|
||||
devInfoId: .db DEVICEINFO_ID, 0
|
||||
devInfoVersion: .db DEVICEINFO_VERSION, DEVICEINFO_REVISION ; version, revision
|
||||
firmwareVersion: .db FIRMWARE_VARIANT_TEMP_WINDOW, FIRMWARE_VERSION_MAJOR
|
||||
.db FIRMWARE_VERSION_MINOR, FIRMWARE_VERSION_PATCHLEVEL
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine firmwareStart @global
|
||||
|
||||
firmwareStart:
|
||||
rjmp main
|
||||
; @end
|
||||
|
||||
|
||||
irqNotSet:
|
||||
reti
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine onSystemStart
|
||||
|
||||
onSystemStart:
|
||||
bigcall test
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine onMessageReceived
|
||||
;
|
||||
; Called on every message received
|
||||
|
||||
onMessageReceived:
|
||||
clc
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine onEvery100ms
|
||||
;
|
||||
; Called every 100ms. Add your routine calls here. No arguments, no results.
|
||||
|
||||
onEvery100ms:
|
||||
bigcall DialogMgr_Every100ms
|
||||
ret
|
||||
|
||||
onEveryMinute:
|
||||
onEveryHour:
|
||||
onEveryDay:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
onEverySecond:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine onEveryLoop
|
||||
;
|
||||
; Called on every loop (i.e. after awakening from sleep).
|
||||
;
|
||||
onEveryLoop:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
test:
|
||||
bigcall DialogMgr_Init
|
||||
bigcall DlgNetStats_Init
|
||||
bigcall DialogMgr_PushDialog
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; includes
|
||||
|
||||
.include "devices/all/hw_m644p.asm"
|
||||
.include "devices/all/includes.asm"
|
||||
|
||||
.include "common/debug.asm"
|
||||
|
||||
.include "modules/lcd2/gui/titlewindow2.asm"
|
||||
.include "modules/lcd2/gui/dialog.asm"
|
||||
.include "modules/lcd2/gui/button.asm"
|
||||
;.include "modules/lcd2/font/font2.asm"
|
||||
;.include "modules/lcd2/font/font3.asm"
|
||||
;.include "modules/lcd2/font/font16x26.asm"
|
||||
;.include "modules/lcd2/font/font4.asm"
|
||||
;.include "modules/lcd2/font/font12x16.asm"
|
||||
.include "modules/lcd2/ili9341/font12x16.asm"
|
||||
.include "modules/lcd2/ili9341/font12x16_1.asm"
|
||||
;.include "modules/lcd2/ili9341/font12x20.asm"
|
||||
;.include "modules/lcd2/ili9341/font12x20_1.asm"
|
||||
;.include "common/list_t.asm"
|
||||
;.include "common/tree_t.asm"
|
||||
.include "common/divide.asm"
|
||||
.include "common/ressource.asm"
|
||||
|
||||
.include "modules/lcd2/gui/style.asm"
|
||||
.include "dlg_netstats.asm"
|
||||
.include "ressources.inc"
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; defines for network interface
|
||||
|
||||
;.equ netInterfaceData = netUartIface
|
||||
;.equ netInterfaceData = uart_bitbang_iface
|
||||
.equ netInterfaceData = com2w_iface
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.dseg
|
||||
|
||||
|
||||
heapStart:
|
||||
|
||||
.equ HEAP_START = heapStart
|
||||
.equ HEAP_SIZE = (SRAM_SIZE-STACK_SIZE)-HEAP_START
|
||||
|
||||
95
avr/devices/c03/main/ressources.asm
Normal file
95
avr/devices/c03/main/ressources.asm
Normal file
@@ -0,0 +1,95 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_DEVICE_C03_RESSOURCES_ASM
|
||||
#define AQH_AVR_DEVICE_C03_RESSOURCES_ASM
|
||||
|
||||
.nolist
|
||||
.include "include/m644Pdef.inc" ; Define device ATmega644P
|
||||
.list
|
||||
|
||||
.include "../defs.asm"
|
||||
.include "modules/lcd2/ili9341/colors.asm"
|
||||
.include "modules/lcd2/ili9341/images.asm"
|
||||
|
||||
|
||||
.cseg
|
||||
|
||||
.org RESSOURCE_ADDR
|
||||
|
||||
RessourceTable:
|
||||
.dw 1
|
||||
.dw (resImageNetwork*2) ; RESSSOURCE_IMG_NETWORK
|
||||
|
||||
|
||||
|
||||
|
||||
resImageNetwork:
|
||||
.dw DISPLAY_IMAGETYPE_IDX2
|
||||
.dw 48, 48
|
||||
.dw (resImageNetworkColorMap*2)
|
||||
.dw (resImageNetworkPixels*2)
|
||||
resImageNetworkColorMap:
|
||||
.dw 4
|
||||
.dw 0, DISPLAY_COLOR_BLACK, DISPLAY_COLOR_LIGHTGREY, DISPLAY_COLOR_LIGHTGREY
|
||||
resImageNetworkPixels:
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x40, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x40, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x40, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x40, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x40, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x40, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x40, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x40, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x40, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x40
|
||||
.db 0x00, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x40
|
||||
.db 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x05, 0x55, 0x54, 0x00, 0x00, 0x05, 0x55, 0x54, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00, 0x07, 0xff, 0xf4, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x05, 0x55, 0x54, 0x00, 0x00, 0x05, 0x55, 0x54, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
18
avr/devices/c03/main/ressources.inc
Normal file
18
avr/devices/c03/main/ressources.inc
Normal file
@@ -0,0 +1,18 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_DEVICE_C03_RESSOURCES_INC
|
||||
#define AQH_AVR_DEVICE_C03_RESSOURCES_INC
|
||||
|
||||
|
||||
.equ RESSSOURCE_IMG_NETWORK = 0
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_DEVICE_C03_RESSOURCES_INC
|
||||
187
avr/devices/c03/main/win_netstats.asm
Normal file
187
avr/devices/c03/main/win_netstats.asm
Normal file
@@ -0,0 +1,187 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_DEVICE_C02_WIN_NETSTATS_ASM
|
||||
#define AQH_AVR_DEVICE_C02_WIN_NETSTATS_ASM
|
||||
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
WinNetStats_Init:
|
||||
clr r16
|
||||
sts winNetstatsUpdateNum, r16
|
||||
sts winNetstatsUpdateNum+1, r16
|
||||
|
||||
; setup
|
||||
ldi yl, LOW(winNetstats)
|
||||
ldi yh, HIGH(winNetstats)
|
||||
bigcall TitleWindow_Init
|
||||
|
||||
ldi zl, LOW(STYLE_WIN_FONT*2)
|
||||
ldi zh, HIGH(STYLE_WIN_FONT*2)
|
||||
std Y+WIN_OFFS_FONT_LO, zl
|
||||
std Y+WIN_OFFS_FONT_HI, zh
|
||||
|
||||
bigcall TitleWindow_SetFullSize
|
||||
bigcall TitleWindow_SetStyleColors
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; @param @0 Y
|
||||
; @param @1 label addr
|
||||
|
||||
.macro WINNETSTATS_PRINTLABEL
|
||||
; packets in
|
||||
ldi zl, LOW(@1 * 2)
|
||||
ldi zh, HIGH(@1 * 2)
|
||||
ldi r16, 2 ; X
|
||||
mov r4, r16
|
||||
clr r5
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT+@0) ; Y
|
||||
mov r6, r16
|
||||
ldi r16, HIGH(STYLE_WIN_TITLE_HEIGHT+@0)
|
||||
mov r7, r16
|
||||
bigcall Window_DrawTextFlash
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
; @param @0 X
|
||||
; @param @1 Y
|
||||
; @param @2 data address
|
||||
|
||||
.macro WINNETSTATS_PRINTDATA
|
||||
ldi r16, @0 ; X
|
||||
mov r4, r16
|
||||
clr r5
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT+@1) ; Y
|
||||
mov r6, r16
|
||||
ldi r16, HIGH(@1)
|
||||
mov r7, r16
|
||||
lds r16, @2 ; data
|
||||
lds r17, @2+1
|
||||
bigcall Window_WriteHexWordAt
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
WinNetStats_Show:
|
||||
; draw title window basics (with title)
|
||||
ldi yl, LOW(winNetstats)
|
||||
ldi yh, HIGH(winNetstats)
|
||||
ldi zl, LOW(winNetstats_title*2)
|
||||
ldi zh, HIGH(winNetstats_title*2)
|
||||
bigcall TitleWindow_DrawTitle
|
||||
|
||||
bigcall TitleWindow_ClearContentArea
|
||||
|
||||
; packets in
|
||||
WINNETSTATS_PRINTLABEL 2, winNetstats_lPacketsIn
|
||||
; packets out
|
||||
WINNETSTATS_PRINTLABEL 24, winNetstats_lPacketsOut
|
||||
; eContent
|
||||
WINNETSTATS_PRINTLABEL 46, winNetstats_lContentErr
|
||||
; eIO
|
||||
WINNETSTATS_PRINTLABEL 68, winNetstats_lIoErr
|
||||
; eMsgSize
|
||||
WINNETSTATS_PRINTLABEL 90, winNetstats_lMsgSizeErr
|
||||
|
||||
; draw horizontal line
|
||||
ldi r16, STYLE_WIN_TITLE_HEIGHT+112
|
||||
mov r6, r16
|
||||
clr r7
|
||||
clr r4
|
||||
clr r5
|
||||
ldi r16, LOW(DISPLAY_WIDTH)
|
||||
mov r8, r16
|
||||
ldi r16, HIGH(DISPLAY_WIDTH)
|
||||
mov r9, r16
|
||||
clr r2
|
||||
clr r3
|
||||
bigcall Display_DrawHLine
|
||||
|
||||
; X
|
||||
WINNETSTATS_PRINTLABEL 114, winNetstats_lX
|
||||
; Y
|
||||
WINNETSTATS_PRINTLABEL 136, winNetstats_lY
|
||||
; Z
|
||||
WINNETSTATS_PRINTLABEL 158, winNetstats_lZ
|
||||
; update num
|
||||
WINNETSTATS_PRINTLABEL 180, winNetstats_lUpdate
|
||||
|
||||
rcall WinNetStats_Update
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
WinNetStats_Update:
|
||||
lds r16, winNetstatsUpdateNum
|
||||
inc r16
|
||||
sts winNetstatsUpdateNum, r16
|
||||
|
||||
ldi yl, LOW(winNetstats)
|
||||
ldi yh, HIGH(winNetstats)
|
||||
|
||||
; packets in
|
||||
WINNETSTATS_PRINTDATA 160, 2, netInterfaceData+NET_IFACE_OFFS_PACKETSIN_LOW
|
||||
; packets out
|
||||
WINNETSTATS_PRINTDATA 160, 24, netInterfaceData+NET_IFACE_OFFS_PACKETSOUT_LOW
|
||||
; eContent
|
||||
WINNETSTATS_PRINTDATA 160, 46, netInterfaceData+NET_IFACE_OFFS_ERR_CONTENT_LOW
|
||||
; eIO
|
||||
WINNETSTATS_PRINTDATA 160, 68, netInterfaceData+NET_IFACE_OFFS_ERR_IO_LOW
|
||||
; eMsgSize
|
||||
WINNETSTATS_PRINTDATA 160, 90, netInterfaceData+NET_IFACE_OFFS_ERR_MSGSIZE_LOW
|
||||
|
||||
; X
|
||||
WINNETSTATS_PRINTDATA 160, 114, xpt2046CurrentX
|
||||
WINNETSTATS_PRINTDATA 240, 114, xpt2046RawX
|
||||
; Y
|
||||
WINNETSTATS_PRINTDATA 160, 136, xpt2046CurrentY
|
||||
WINNETSTATS_PRINTDATA 240, 136, xpt2046RawY
|
||||
; Z
|
||||
WINNETSTATS_PRINTDATA 160, 158, xpt2046CurrentZ
|
||||
; update num
|
||||
WINNETSTATS_PRINTDATA 160, 180, winNetstatsUpdateNum
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
winNetstats_title: .db "Network Statistics", 0, 0
|
||||
|
||||
winNetstats_lPacketsIn: .db "Pkgs In :", 0
|
||||
winNetstats_lPacketsOut: .db "Pkgs Out:", 0
|
||||
winNetstats_lContentErr: .db "eContent:", 0
|
||||
winNetstats_lIoErr: .db "eIO :", 0
|
||||
winNetstats_lMsgSizeErr: .db "eMsgSize:", 0
|
||||
winNetstats_lX: .db "X :", 0
|
||||
winNetstats_lY: .db "Y :", 0
|
||||
winNetstats_lZ: .db "Z :", 0
|
||||
winNetstats_lUpdate: .db "Update :", 0
|
||||
.dseg
|
||||
|
||||
winNetstats:
|
||||
.byte WIN_SIZE
|
||||
|
||||
|
||||
|
||||
.dseg
|
||||
|
||||
winNetstatsUpdateNum: .byte 2
|
||||
|
||||
|
||||
#endif
|
||||
@@ -51,8 +51,6 @@
|
||||
.equ NET_MSGNUMINBUF_SIZE = 8 ; max buffer nums in ringbuffer (global incoming)
|
||||
.equ NET_IFACE_OUTMSGBUF_SIZE = 8 ; max buffer nums in ringbuffer (per interface outbound)
|
||||
|
||||
.equ PROGRAM_SENSOR_INTERVAL_SECS = 60
|
||||
.equ PROGRAM_STATS_INTERVAL_MINS = 10
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<extradist>
|
||||
defs.asm
|
||||
README
|
||||
enclosure.scad
|
||||
</extradist>
|
||||
|
||||
</gwbuild>
|
||||
|
||||
183
avr/devices/n28/enclosure.scad
Normal file
183
avr/devices/n28/enclosure.scad
Normal file
@@ -0,0 +1,183 @@
|
||||
$fn = 50;
|
||||
|
||||
width = 24;
|
||||
length = 119;
|
||||
height = 22;
|
||||
|
||||
corner_radius = 2;
|
||||
wall_thickness = 2;
|
||||
post_diameter = 8;
|
||||
post_height = 0;
|
||||
|
||||
hole_diameter = 3;
|
||||
lid_thickness = 1.9;
|
||||
lid_lip = 1 ;
|
||||
lid_tolerance = .25;
|
||||
|
||||
hook_thickness = 0.75;
|
||||
hook_tolerance = .25;
|
||||
|
||||
|
||||
|
||||
module posts(x, y, z, h, r){
|
||||
translate([x, y, z])
|
||||
cylinder(r = r, h = h);
|
||||
|
||||
translate([-x, y, z])
|
||||
cylinder(r = r, h = h);
|
||||
|
||||
translate([-x, -y, z])
|
||||
cylinder(r = r, h = h);
|
||||
|
||||
translate([x, -y, z])
|
||||
cylinder(r = r, h = h);
|
||||
}
|
||||
|
||||
|
||||
difference() {
|
||||
// box
|
||||
hull() {
|
||||
posts(
|
||||
x=(width/2 - corner_radius),
|
||||
y=(length/2 - corner_radius),
|
||||
z=0,
|
||||
h=height,
|
||||
r=corner_radius);
|
||||
}
|
||||
|
||||
// hollow
|
||||
hull() {
|
||||
posts(
|
||||
x=(width/2 - corner_radius - wall_thickness),
|
||||
y=(length/2 - corner_radius - wall_thickness),
|
||||
z=wall_thickness,
|
||||
h=height,
|
||||
r=corner_radius);
|
||||
}
|
||||
|
||||
// lip inside box
|
||||
hull() {
|
||||
posts(
|
||||
x=(width/2 - corner_radius - lid_lip),
|
||||
y=(length/2 - corner_radius - lid_lip),
|
||||
z=(height - lid_thickness),
|
||||
h=(lid_thickness + 1),
|
||||
r=corner_radius);
|
||||
}
|
||||
|
||||
// ventilation slits left 1
|
||||
for(i = [(wall_thickness+post_height+3):4:(height-5)]) {
|
||||
translate([(-width/2)-wall_thickness, (-length/2)+25, i])
|
||||
cube([10, length/5, 2], center=true);
|
||||
}
|
||||
|
||||
// ventilation slits left 2
|
||||
for(i = [(wall_thickness+post_height+3):4:(height-5)]) {
|
||||
translate([(-width/2)-wall_thickness, (length/2)-25, i])
|
||||
cube([10, length/5, 2], center=true);
|
||||
}
|
||||
|
||||
// ventilation slits right 1
|
||||
for(i = [(wall_thickness+post_height+3):4:(height-5)]) {
|
||||
translate([(width/2)-wall_thickness, (-length/2)+25, i])
|
||||
cube([10, length/5, 2], center=true);
|
||||
}
|
||||
|
||||
// ventilation slits right 2
|
||||
for(i = [(wall_thickness+post_height+3):4:(height-5)]) {
|
||||
translate([(width/2)-wall_thickness, (length/2)-25, i])
|
||||
cube([10, length/5, 2], center=true);
|
||||
}
|
||||
|
||||
// network connector hole 1
|
||||
translate([0, (length/2), wall_thickness+2+10])
|
||||
cube([17, 6, 20], center=true);
|
||||
|
||||
// network connector hole 2
|
||||
translate([0, (-length/2), wall_thickness+2+10])
|
||||
cube([17, 6, 20], center=true);
|
||||
|
||||
// sensor hole
|
||||
translate([(width/2), -7, wall_thickness+2+6])
|
||||
cube([5, 10, 7], center=true);
|
||||
|
||||
translate([0, -9, -wall_thickness])
|
||||
cylinder(r = 5.5/2, h = 6);
|
||||
|
||||
|
||||
// slits for hooks
|
||||
// upward facing side
|
||||
translate([-((width/2)-(wall_thickness/2)), length/8, (height-lid_thickness)+1])
|
||||
cube([3, 6, hook_thickness+hook_tolerance], center=true);
|
||||
translate([-((width/2)-(wall_thickness/2)), -length/8, (height-lid_thickness)+1])
|
||||
cube([3, 6, hook_thickness+hook_tolerance], center=true);
|
||||
|
||||
// downward facing side
|
||||
translate([(width/2)-(wall_thickness/2), 0, (height-lid_thickness)+1])
|
||||
cube([3, 6, hook_thickness+hook_tolerance], center=true);
|
||||
translate([(width/2)-(wall_thickness/2), length/4, (height-lid_thickness)+1])
|
||||
cube([3, 6, hook_thickness+hook_tolerance], center=true);
|
||||
translate([(width/2)-(wall_thickness/2), -length/4, (height-lid_thickness)+1])
|
||||
cube([3, 6, hook_thickness+hook_tolerance], center=true);
|
||||
|
||||
}
|
||||
|
||||
/* lid */
|
||||
translate([0, 0, 40]) {
|
||||
difference() {
|
||||
union() {
|
||||
hull() {
|
||||
posts(
|
||||
x=(width/2 - corner_radius - lid_lip - lid_tolerance),
|
||||
y=(length/2 - corner_radius - lid_lip - lid_tolerance),
|
||||
z=0,
|
||||
h=lid_thickness+1.0,
|
||||
r=corner_radius);
|
||||
}
|
||||
|
||||
// upward facing side
|
||||
translate([-((width/2)-lid_lip), length/8, 1])
|
||||
cube([2, 5, hook_thickness], center=true);
|
||||
translate([-((width/2)-lid_lip), -length/8, 1])
|
||||
cube([2, 5, hook_thickness], center=true);
|
||||
|
||||
// downward facing side
|
||||
translate([(width/2)-lid_lip, 0, 1])
|
||||
cube([2, 5, hook_thickness], center=true);
|
||||
translate([(width/2)-lid_lip, length/4, 1])
|
||||
cube([2, 5, hook_thickness], center=true);
|
||||
translate([(width/2)-lid_lip, -length/4, 1])
|
||||
cube([2, 5, hook_thickness], center=true);
|
||||
|
||||
}
|
||||
|
||||
// drilling holes
|
||||
translate([0, (length/8), -lid_thickness])
|
||||
cylinder(r = hole_diameter, h = 6);
|
||||
|
||||
translate([0, -(length/8), -lid_thickness])
|
||||
cylinder(r = hole_diameter, h = 6);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// support posts for pcb
|
||||
/*difference() {
|
||||
translate([0, length/4, wall_thickness])
|
||||
cylinder(r = post_diameter/2, h = post_height);
|
||||
|
||||
translate([0, length/4, wall_thickness])
|
||||
cylinder(r = hole_diameter/2, h = post_height+3);
|
||||
}
|
||||
|
||||
|
||||
difference() {
|
||||
translate([0, -length/4, wall_thickness])
|
||||
cylinder(r = post_diameter/2, h = post_height);
|
||||
|
||||
translate([0, -length/4, wall_thickness])
|
||||
cylinder(r = hole_diameter/2, h = post_height+3);
|
||||
}
|
||||
*/
|
||||
@@ -46,6 +46,44 @@
|
||||
|
||||
|
||||
|
||||
.macro M_COM2WSETUPINT0
|
||||
inr r16, MCUCR
|
||||
cbr r16, (1<<ISC01) | (1<<ISC00)
|
||||
sbr r16, (1<<ISC01) | (0<<ISC00) ; falling edge of ATTN
|
||||
outr MCUCR, r16
|
||||
; sbr r16, (0<<ISC01) | (0<<ISC00) ; low level triggers
|
||||
inr r16, COM_IRQ_ADDR_CLK ; enable irq for ATTN line
|
||||
sbr r16, (1<<COM_IRQ_BIT_CLK)
|
||||
outr COM_IRQ_ADDR_CLK, r16
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
.macro M_COM2WSETUPPCI
|
||||
sbi COM_IRQ_ADDR_CLK, COM_IRQ_BIT_CLK ; enable pin change irq for CLK line
|
||||
in r16, GIMSK ; enable pin change irq PCIE0 or PCIE1
|
||||
ori r16, (1<<COM_IRQ_GIMSK_CLK)
|
||||
out GIMSK, R16
|
||||
ldi r16, (1<<COM_IRQ_GIFR_CLK) ; clear pending irq by writing 1 to CLK bit
|
||||
out GIFR, r16
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
.macro M_COM2WSETUPPCICR
|
||||
inr r16, COM_IRQ_ADDR_CLK ; enable pin change irq for CLK line
|
||||
ori r16, (1<<COM_IRQ_BIT_CLK)
|
||||
outr COM_IRQ_ADDR_CLK, r16
|
||||
|
||||
inr r16, COM_IRQ_ICR_ADDR ; enable pin change irq in PCICR
|
||||
ori r16, (1<<COM_IRQ_ICR_BIT)
|
||||
outr COM_IRQ_ICR_ADDR, R16
|
||||
ldi r16, (1<<COM_IRQ_IFR_BIT) ; clear pending irq by writing 1 to CLK bit
|
||||
out COM_IRQ_IFR_ADDR, r16
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.dseg
|
||||
@@ -91,6 +129,23 @@ COM2W_Init:
|
||||
; setup pin-change interrupt for CLK
|
||||
rcall com2wEnableClkIrq
|
||||
|
||||
; enable IRQ
|
||||
.ifdef COM_IRQ_ICR_ADDR
|
||||
M_COM2WSETUPPCICR
|
||||
.else
|
||||
.ifdef INT0
|
||||
.if COM_IRQ_BIT_CLK == INT0
|
||||
M_COM2WSETUPINT0
|
||||
.else
|
||||
M_COM2WSETUPPCI
|
||||
.endif
|
||||
.else
|
||||
M_COM2WSETUPPCI
|
||||
.endif
|
||||
.endif
|
||||
|
||||
|
||||
#if 0
|
||||
inr r16, COM_IRQ_ADDR_CLK
|
||||
sbr r16, (1<<COM_IRQ_BIT_CLK) ; enable pin change irq for ATTN line
|
||||
outr COM_IRQ_ADDR_CLK, r16
|
||||
@@ -100,6 +155,7 @@ COM2W_Init:
|
||||
outr GIMSK, r16
|
||||
ldi r16, (1<<COM_IRQ_GIFR_CLK) ; clear pending irq by writing 1 to ATTN bit
|
||||
outr GIFR, r16
|
||||
#endif
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
13
avr/modules/lcd2/0BUILD
Normal file
13
avr/modules/lcd2/0BUILD
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml?>
|
||||
|
||||
<gwbuild>
|
||||
|
||||
<subdirs>
|
||||
font
|
||||
gui
|
||||
ili9341
|
||||
xpt2046
|
||||
</subdirs>
|
||||
|
||||
</gwbuild>
|
||||
|
||||
@@ -4,16 +4,6 @@
|
||||
|
||||
<extradist>
|
||||
defs.asm
|
||||
font8x8.asm
|
||||
font6x8.asm
|
||||
font12x16.asm
|
||||
font12x20.asm
|
||||
font16x26.asm
|
||||
font1.asm
|
||||
font2.asm
|
||||
font3.asm
|
||||
font4.asm
|
||||
font5.asm
|
||||
main.asm
|
||||
</extradist>
|
||||
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AVR_MODULES_FONT_DEFS
|
||||
#define AVR_MODULES_FONT_DEFS
|
||||
#ifndef AQH_AVR_FONT_DEFS_ASM
|
||||
#define AQH_AVR_FONT_DEFS_ASM
|
||||
|
||||
|
||||
.equ FONT_OFFS_HANDLERFN_LOW = 0
|
||||
|
||||
.equ FONT_OFFS_HANDLERFN_LOW = 0 ; pointer to handler fn (word address!)
|
||||
.equ FONT_OFFS_HANDLERFN_HI = 1
|
||||
.equ FONT_OFFS_DATASIZE = 2 ; one byte used, one byte reserved
|
||||
.equ FONT_OFFS_WIDTH = 4
|
||||
@@ -30,6 +31,7 @@
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif ; AQH_AVR_FONT_DEFS_ASM
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; This is a font from the project LCD_fonts at
|
||||
; https://github.com/basti79/LCD-fonts.git
|
||||
; which in turn is based on a post by Benedikt K. in a forum post on
|
||||
; https://www.mikrocontroller.net/topic/54860
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
|
||||
font1_8x8:
|
||||
; header
|
||||
.dw font6x8MonoHandlerFn ; handlerFn
|
||||
.db 128, 0 ; needed buffer size
|
||||
.db 8, 8 ; width, height of chars
|
||||
.db 32, 64 ; first char, num of chars in font
|
||||
; data (8x8_horizontal_LSB_2)
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x20
|
||||
.db 0x0C,0x1E,0x1E,0x0C,0x0C,0x00,0x0C,0x00, ; 0x21
|
||||
.db 0x36,0x36,0x36,0x00,0x00,0x00,0x00,0x00, ; 0x22
|
||||
.db 0x36,0x36,0x7F,0x36,0x7F,0x36,0x36,0x00, ; 0x23
|
||||
.db 0x0C,0x3E,0x03,0x1E,0x30,0x1F,0x0C,0x00, ; 0x24
|
||||
.db 0x00,0x63,0x33,0x18,0x0C,0x66,0x63,0x00, ; 0x25
|
||||
.db 0x1C,0x36,0x1C,0x6E,0x3B,0x33,0x6E,0x00, ; 0x26
|
||||
.db 0x06,0x06,0x03,0x00,0x00,0x00,0x00,0x00, ; 0x27
|
||||
.db 0x18,0x0C,0x06,0x06,0x06,0x0C,0x18,0x00, ; 0x28
|
||||
.db 0x06,0x0C,0x18,0x18,0x18,0x0C,0x06,0x00, ; 0x29
|
||||
.db 0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00, ; 0x2A
|
||||
.db 0x00,0x0C,0x0C,0x3F,0x0C,0x0C,0x00,0x00, ; 0x2B
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x0E,0x0C,0x06, ; 0x2C
|
||||
.db 0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00, ; 0x2D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x00, ; 0x2E
|
||||
.db 0x60,0x30,0x18,0x0C,0x06,0x03,0x01,0x00, ; 0x2F
|
||||
.db 0x1E,0x33,0x3B,0x3F,0x37,0x33,0x1E,0x00, ; 0x30
|
||||
.db 0x0C,0x0F,0x0C,0x0C,0x0C,0x0C,0x3F,0x00, ; 0x31
|
||||
.db 0x1E,0x33,0x30,0x1C,0x06,0x33,0x3F,0x00, ; 0x32
|
||||
.db 0x1E,0x33,0x30,0x1C,0x30,0x33,0x1E,0x00, ; 0x33
|
||||
.db 0x38,0x3C,0x36,0x33,0x7F,0x30,0x30,0x00, ; 0x34
|
||||
.db 0x3F,0x03,0x1F,0x30,0x30,0x33,0x1E,0x00, ; 0x35
|
||||
.db 0x1C,0x06,0x03,0x1F,0x33,0x33,0x1E,0x00, ; 0x36
|
||||
.db 0x3F,0x33,0x30,0x18,0x0C,0x06,0x06,0x00, ; 0x37
|
||||
.db 0x1E,0x33,0x33,0x1E,0x33,0x33,0x1E,0x00, ; 0x38
|
||||
.db 0x1E,0x33,0x33,0x3E,0x30,0x18,0x0E,0x00, ; 0x39
|
||||
.db 0x00,0x00,0x0C,0x0C,0x00,0x0C,0x0C,0x00, ; 0x3A
|
||||
.db 0x00,0x00,0x0C,0x0C,0x00,0x0E,0x0C,0x06, ; 0x3B
|
||||
.db 0x18,0x0C,0x06,0x03,0x06,0x0C,0x18,0x00, ; 0x3C
|
||||
.db 0x00,0x00,0x3F,0x00,0x3F,0x00,0x00,0x00, ; 0x3D
|
||||
.db 0x06,0x0C,0x18,0x30,0x18,0x0C,0x06,0x00, ; 0x3E
|
||||
.db 0x1E,0x33,0x30,0x18,0x0C,0x00,0x0C,0x00, ; 0x3F
|
||||
.db 0x3E,0x63,0x7B,0x7B,0x7B,0x03,0x1E,0x00, ; 0x40
|
||||
.db 0x0C,0x1E,0x33,0x33,0x3F,0x33,0x33,0x00, ; 0x41
|
||||
.db 0x3F,0x66,0x66,0x3E,0x66,0x66,0x3F,0x00, ; 0x42
|
||||
.db 0x3C,0x66,0x03,0x03,0x03,0x66,0x3C,0x00, ; 0x43
|
||||
.db 0x3F,0x36,0x66,0x66,0x66,0x36,0x3F,0x00, ; 0x44
|
||||
.db 0x7F,0x46,0x16,0x1E,0x16,0x46,0x7F,0x00, ; 0x45
|
||||
.db 0x7F,0x46,0x16,0x1E,0x16,0x06,0x0F,0x00, ; 0x46
|
||||
.db 0x3C,0x66,0x03,0x03,0x73,0x66,0x7C,0x00, ; 0x47
|
||||
.db 0x33,0x33,0x33,0x3F,0x33,0x33,0x33,0x00, ; 0x48
|
||||
.db 0x1E,0x0C,0x0C,0x0C,0x0C,0x0C,0x1E,0x00, ; 0x49
|
||||
.db 0x78,0x30,0x30,0x30,0x33,0x33,0x1E,0x00, ; 0x4A
|
||||
.db 0x67,0x66,0x36,0x1E,0x36,0x66,0x67,0x00, ; 0x4B
|
||||
.db 0x0F,0x06,0x06,0x06,0x46,0x66,0x7F,0x00, ; 0x4C
|
||||
.db 0x63,0x77,0x7F,0x6B,0x63,0x63,0x63,0x00, ; 0x4D
|
||||
.db 0x63,0x67,0x6F,0x7B,0x73,0x63,0x63,0x00, ; 0x4E
|
||||
.db 0x1C,0x36,0x63,0x63,0x63,0x36,0x1C,0x00, ; 0x4F
|
||||
.db 0x3F,0x66,0x66,0x3E,0x06,0x06,0x0F,0x00, ; 0x50
|
||||
.db 0x1E,0x33,0x33,0x33,0x3B,0x1E,0x38,0x00, ; 0x51
|
||||
.db 0x3F,0x66,0x66,0x3E,0x1E,0x36,0x67,0x00, ; 0x52
|
||||
.db 0x1E,0x33,0x07,0x1C,0x38,0x33,0x1E,0x00, ; 0x53
|
||||
.db 0x3F,0x2D,0x0C,0x0C,0x0C,0x0C,0x1E,0x00, ; 0x54
|
||||
.db 0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x00, ; 0x55
|
||||
.db 0x33,0x33,0x33,0x33,0x33,0x1E,0x0C,0x00, ; 0x56
|
||||
.db 0x63,0x63,0x63,0x6B,0x7F,0x77,0x63,0x00, ; 0x57
|
||||
.db 0x63,0x63,0x36,0x1C,0x36,0x63,0x63,0x00, ; 0x58
|
||||
.db 0x33,0x33,0x33,0x1E,0x0C,0x0C,0x1E,0x00, ; 0x59
|
||||
.db 0x7F,0x33,0x19,0x0C,0x46,0x63,0x7F,0x00, ; 0x5A
|
||||
.db 0x1E,0x06,0x06,0x06,0x06,0x06,0x1E,0x00, ; 0x5B
|
||||
.db 0x03,0x06,0x0C,0x18,0x30,0x60,0x40,0x00, ; 0x5C
|
||||
.db 0x1E,0x18,0x18,0x18,0x18,0x18,0x1E,0x00, ; 0x5D
|
||||
.db 0x08,0x1C,0x36,0x63,0x00,0x00,0x00,0x00, ; 0x5E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF ; 0x5F
|
||||
|
||||
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font12x16MonoHandlerFn
|
||||
;
|
||||
; Handler for 12x16 Mono Fonts
|
||||
;
|
||||
|
||||
font12x16MonoHandlerFn:
|
||||
cpi r23, FONT_FN_RENDER
|
||||
breq font12x16MonoRenderCharacter
|
||||
rjmp FONT_GenericHandler
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font12x16RenderCharacter
|
||||
|
||||
; @param R16 character to write
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param Z pointer to font
|
||||
; @param X pointer to RAM to store data to
|
||||
; @param r18 char width in pixel
|
||||
; @param r19 char height in pixel
|
||||
; @clobbers r17, r18, r23, r24, r25, x
|
||||
|
||||
font12x16MonoRenderCharacter:
|
||||
push zl
|
||||
push zh
|
||||
rcall font12x16GetCharPosInFont ; (r17, r24, r25, z)
|
||||
ldi r25, 16 ; 16 bytes height
|
||||
font12x16MonoRenderCharacter_loop1:
|
||||
ldi r24, 12 ; 16 bits
|
||||
ldi r23, 8
|
||||
lpm r17, Z+
|
||||
font12x16MonoRenderCharacter_loop2:
|
||||
dec r23
|
||||
brne font12x16MonoRenderCharacter_haveByte
|
||||
lpm r17, Z+
|
||||
ldi r23, 8
|
||||
font12x16MonoRenderCharacter_haveByte:
|
||||
lsr r17
|
||||
brcs font12x16MonoRenderCharacter_writeForeground
|
||||
st X+, r0
|
||||
st X+, r1
|
||||
rjmp font12x16MonoRenderCharacter_loop2end
|
||||
font12x16MonoRenderCharacter_writeForeground:
|
||||
st X+, r2
|
||||
st X+, r3
|
||||
font12x16MonoRenderCharacter_loop2end:
|
||||
dec r24
|
||||
brne font12x16MonoRenderCharacter_loop2
|
||||
dec r25
|
||||
brne font12x16MonoRenderCharacter_loop1
|
||||
ldi r18, 12
|
||||
ldi r19, 16
|
||||
pop zh
|
||||
pop zl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font12x16GetCharPosInFont
|
||||
|
||||
; @param R16 character to write
|
||||
; @param Z pointer to font
|
||||
; @return Z pointer to begin of char data
|
||||
; @clobbers r17, r24, r25, z
|
||||
|
||||
font12x16GetCharPosInFont:
|
||||
mov r24, r16
|
||||
adiw zh:zl, FONT_OFFS_FIRSTCHAR
|
||||
lpm r24, Z+ ; first char num
|
||||
lpm r25, Z+ ; num of chars
|
||||
sub r16, r24
|
||||
brcs font12x16GetCharPosInFont_ret
|
||||
cp r16, r25
|
||||
brcc font12x16GetCharPosInFont_ret
|
||||
mov r25, r16 ; x256
|
||||
clr r24
|
||||
|
||||
lsr r25 ; x128
|
||||
ror r24
|
||||
|
||||
lsr r25 ; x64
|
||||
ror r24
|
||||
|
||||
lsr r25 ; x32
|
||||
ror r24
|
||||
|
||||
add zl, r24
|
||||
adc zh, r25
|
||||
font12x16GetCharPosInFont_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font16x26MonoHandlerFn
|
||||
;
|
||||
; Handler for 16x26 Mono Fonts
|
||||
;
|
||||
|
||||
font16x26MonoHandlerFn:
|
||||
cpi r23, FONT_FN_RENDER
|
||||
breq font16x26MonoRenderCharacter
|
||||
rjmp FONT_GenericHandler
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font16x26RenderCharacter
|
||||
|
||||
; @param R16 character to write
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param Z pointer to font
|
||||
; @param X pointer to RAM to store data to
|
||||
; @param r18 char width in pixel
|
||||
; @param r19 char height in pixel
|
||||
; @clobbers r17, r18, r24, r25, x
|
||||
|
||||
font16x26MonoRenderCharacter:
|
||||
push zl
|
||||
push zh
|
||||
rcall font16x26GetCharPosInFont ; (r17, r24, r25, z)
|
||||
ldi r25, 26 ; 26 bytes height
|
||||
font16x26MonoRenderCharacter_loop1:
|
||||
ldi r24, 16 ; 16 bits
|
||||
font16x26MonoRenderCharacter_loop2:
|
||||
mov r23, r24
|
||||
andi r23, 7
|
||||
brne font16x26MonoRenderCharacter_haveByte
|
||||
lpm r17, Z+
|
||||
font16x26MonoRenderCharacter_haveByte:
|
||||
lsr r17
|
||||
brcs font16x26MonoRenderCharacter_writeForeground
|
||||
st X+, r0
|
||||
st X+, r1
|
||||
rjmp font16x26MonoRenderCharacter_loop2end
|
||||
font16x26MonoRenderCharacter_writeForeground:
|
||||
st X+, r2
|
||||
st X+, r3
|
||||
font16x26MonoRenderCharacter_loop2end:
|
||||
dec r24
|
||||
brne font16x26MonoRenderCharacter_loop2
|
||||
dec r25
|
||||
brne font16x26MonoRenderCharacter_loop1
|
||||
ldi r18, 16
|
||||
ldi r19, 26
|
||||
pop zh
|
||||
pop zl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font16x26GetCharPosInFont
|
||||
|
||||
; @param R16 character to write
|
||||
; @param Z pointer to font
|
||||
; @return Z pointer to begin of char data
|
||||
; @clobbers r17, r24, r25, z
|
||||
|
||||
font16x26GetCharPosInFont:
|
||||
mov r24, r16
|
||||
adiw zh:zl, FONT_OFFS_FIRSTCHAR
|
||||
lpm r24, Z+ ; first char num
|
||||
lpm r25, Z+ ; num of chars
|
||||
sub r16, r24
|
||||
brcs font16x26GetCharPosInFont_ret
|
||||
cp r16, r25
|
||||
brcc font16x26GetCharPosInFont_ret
|
||||
mov r24, r16
|
||||
clr r25
|
||||
lsl r24 ; x2
|
||||
rol r25
|
||||
add r24, r16 ; x3
|
||||
adc r25, r16
|
||||
sub r25, r16
|
||||
lsl r24 ; x6
|
||||
rol r25
|
||||
lsl r24 ; x12
|
||||
rol r25
|
||||
add r24, r16 ; x13
|
||||
adc r25, r16
|
||||
sub r25, r16
|
||||
lsl r24 ; x26
|
||||
rol r25
|
||||
lsl r24 ; x52
|
||||
rol r25
|
||||
|
||||
add zl, r24
|
||||
adc zh, r25
|
||||
font16x26GetCharPosInFont_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
@@ -1,257 +0,0 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; This is a font from the project LCD_fonts at
|
||||
; https://github.com/basti79/LCD-fonts.git
|
||||
; which in turn is based on a post by Benedikt K. in a forum post on
|
||||
; https://www.mikrocontroller.net/topic/54860
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
|
||||
font3_16x26:
|
||||
; header
|
||||
.dw font16x26MonoHandlerFn ; handlerFn
|
||||
.dw 832 ; needed buffer size
|
||||
.db 16, 26 ; width, height of chars
|
||||
.db 32, 224 ; first char, num of chars in font
|
||||
; data (16x26_horizontal_LSB_2)
|
||||
.db 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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x20
|
||||
.db 0x00,0x00,0x00,0x00,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x21
|
||||
.db 0x00,0x00,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x10,0x04,0x10,0x04,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, ; 0x22
|
||||
.db 0x00,0x00,0x00,0x00,0x80,0x31,0x80,0x31,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xFC,0x7F,0xFC,0x7F,0x60,0x0C,0x60,0x06,0x30,0x06,0xFE,0x3F,0xFE,0x3F,0x18,0x03,0x18,0x03,0x18,0x03,0x18,0x03,0x8C,0x01,0x8C,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x23
|
||||
.db 0x00,0x03,0x00,0x03,0xC0,0x1F,0xF0,0x3F,0x70,0x23,0x38,0x03,0x38,0x03,0x38,0x03,0x78,0x03,0xF0,0x03,0xE0,0x03,0x80,0x07,0x00,0x1F,0x00,0x1F,0x00,0x3B,0x00,0x3B,0x00,0x3B,0x00,0x3B,0x18,0x1B,0xF8,0x1F,0xE0,0x0F,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x24
|
||||
.db 0x00,0x00,0x00,0x00,0x3C,0xC0,0x66,0x60,0xC3,0x30,0xC3,0x18,0xC3,0x18,0xC3,0x0C,0xC3,0x06,0x66,0x03,0x3C,0x03,0x80,0x01,0xC0,0x3C,0xC0,0x66,0x60,0xC3,0x30,0xC3,0x18,0xC3,0x18,0xC3,0x0C,0xC3,0x06,0x66,0x03,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x25
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x03,0xF0,0x07,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x06,0x70,0x07,0xF0,0x01,0xF8,0x00,0xFC,0xE0,0xCE,0xE1,0xC7,0xE3,0x87,0x63,0x07,0x67,0x07,0x7E,0x0F,0x3E,0x1E,0x3C,0xFC,0x7F,0xF0,0xF3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x26
|
||||
.db 0x00,0x00,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0x80,0x00,0x80,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, ; 0x27
|
||||
.db 0x00,0x00,0x00,0x18,0x00,0x1E,0x00,0x0F,0x80,0x03,0xC0,0x01,0xE0,0x00,0xE0,0x00,0xE0,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x00,0xC0,0x01,0x80,0x03,0x00,0x0F,0x00,0x1E,0x00,0x18,0x00,0x00, ; 0x28
|
||||
.db 0x00,0x00,0x0C,0x00,0x3C,0x00,0x78,0x00,0xE0,0x00,0xC0,0x01,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x80,0x03,0x80,0x03,0x80,0x03,0xC0,0x01,0xE0,0x00,0x78,0x00,0x3C,0x00,0x0C,0x00,0x00,0x00, ; 0x29
|
||||
.db 0x00,0x00,0x00,0x00,0x80,0x03,0x80,0x03,0x80,0x03,0x98,0x1B,0x7C,0x3E,0x30,0x0C,0x40,0x02,0xE0,0x07,0x70,0x0E,0x38,0x1C,0x20,0x04,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, ; 0x2A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xFE,0x7F,0xFE,0x7F,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2B
|
||||
.db 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,0xC0,0x03,0xC0,0x03,0xC0,0x03,0xC0,0x03,0x00,0x03,0x80,0x03,0x80,0x01,0xC0,0x00,0x00,0x00, ; 0x2C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x1F,0xF8,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2D
|
||||
.db 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,0xC0,0x03,0xC0,0x03,0xC0,0x03,0xC0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2E
|
||||
.db 0x00,0x00,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0x06,0x00,0x06,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0x06,0x00,0x00,0x00, ; 0x2F
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x03,0xF0,0x07,0x38,0x0E,0x1C,0x1C,0x1C,0x1C,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1C,0x1C,0x1C,0x1C,0x38,0x0E,0xF0,0x07,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x30
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x03,0xE0,0x03,0xFC,0x03,0x8C,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0xFC,0x7F,0xFC,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x31
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x03,0xFC,0x07,0x0C,0x0E,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x0E,0x00,0x0E,0x00,0x07,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x30,0x00,0x38,0x00,0x1C,0x00,0xFC,0x1F,0xFC,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x32
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x03,0xF8,0x0F,0x08,0x1E,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x0C,0x00,0x06,0xE0,0x03,0xE0,0x07,0x00,0x0F,0x00,0x1E,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1E,0x08,0x0F,0xF8,0x07,0xF8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x33
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x0F,0x80,0x0F,0x80,0x0F,0xC0,0x0E,0xE0,0x0E,0x60,0x0E,0x30,0x0E,0x18,0x0E,0x18,0x0E,0x0C,0x0E,0x06,0x0E,0xFE,0x7F,0xFE,0x7F,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x34
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x3F,0xF0,0x3F,0xF0,0x3F,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xF0,0x03,0xF0,0x0F,0x00,0x1E,0x00,0x3C,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x3C,0x10,0x1E,0xF0,0x0F,0xF0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x35
|
||||
.db 0x00,0x00,0x00,0x00,0x80,0x1F,0xE0,0x3F,0xF0,0x20,0x70,0x00,0x38,0x00,0x38,0x00,0x1C,0x00,0x9C,0x0F,0xDC,0x1F,0x7C,0x3C,0x3C,0x78,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x38,0x70,0x38,0x38,0x70,0x38,0xF0,0x1F,0xC0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x36
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0x06,0x00,0x02,0x00,0x03,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x70,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x37
|
||||
.db 0x00,0x00,0x00,0x00,0xC0,0x07,0xF0,0x0F,0x78,0x1E,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x78,0x0C,0xF0,0x0F,0xE0,0x03,0xF0,0x0F,0x38,0x1F,0x18,0x1E,0x1C,0x3C,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x38,0x1C,0xF0,0x0F,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x38
|
||||
.db 0x00,0x00,0x00,0x00,0xC0,0x07,0xF0,0x1F,0x38,0x1C,0x38,0x38,0x1C,0x38,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x3C,0x78,0x78,0x7C,0xF0,0x77,0xE0,0x73,0x00,0x70,0x00,0x38,0x00,0x38,0x00,0x1C,0x08,0x1E,0xF8,0x0F,0xF0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x39
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x03,0xC0,0x03,0xC0,0x03,0xC0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x03,0xC0,0x03,0xC0,0x03,0xC0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x03,0xC0,0x03,0xC0,0x03,0xC0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x03,0xC0,0x03,0xC0,0x03,0xC0,0x03,0x00,0x03,0x80,0x03,0x80,0x01,0xC0,0x00,0x00,0x00, ; 0x3B
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x70,0x00,0x3C,0x00,0x0F,0xC0,0x03,0xF0,0x00,0x3C,0x00,0x3C,0x00,0xF0,0x00,0xC0,0x03,0x00,0x0F,0x00,0x3C,0x00,0x70,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x7F,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x7F,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x0E,0x00,0x3C,0x00,0xF0,0x00,0xC0,0x03,0x00,0x0F,0x00,0x3C,0x00,0x3C,0x00,0x0F,0xC0,0x03,0xF0,0x00,0x3C,0x00,0x0E,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3E
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x07,0xFC,0x1F,0x0C,0x3C,0x0C,0x38,0x00,0x38,0x00,0x38,0x00,0x1C,0x00,0x1E,0x00,0x0F,0x80,0x07,0x80,0x03,0xC0,0x01,0xC0,0x01,0xC0,0x01,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x01,0xC0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3F
|
||||
.db 0x00,0x00,0x00,0x00,0xC0,0x0F,0xE0,0x1F,0x70,0x38,0x18,0x30,0x1C,0x3E,0x0C,0x31,0x8E,0x31,0xC6,0x30,0xC6,0x30,0xC6,0x38,0xC6,0x38,0xC6,0x3C,0xC6,0x34,0x8E,0xF7,0x8C,0xF3,0x1C,0x00,0x38,0x08,0xF0,0x0F,0xC0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x40
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x03,0xE0,0x03,0x60,0x07,0x60,0x07,0x70,0x06,0x30,0x0E,0x38,0x0E,0x38,0x1C,0x18,0x1C,0xFC,0x3F,0xFC,0x3F,0x0E,0x38,0x0E,0x70,0x0E,0x70,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x41
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x0F,0x1C,0x1E,0x1C,0x1C,0x1C,0x1C,0x1C,0x0E,0xFC,0x07,0xFC,0x07,0x1C,0x1E,0x1C,0x3C,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x3C,0xFC,0x1F,0xFC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x42
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x1F,0xF0,0x3F,0x78,0x30,0x3C,0x00,0x1C,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x1C,0x00,0x3C,0x00,0x78,0x20,0xF0,0x3F,0xC0,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x43
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x0F,0x1C,0x3C,0x1C,0x38,0x1C,0x78,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x38,0x1C,0x38,0x1C,0x1E,0xFC,0x0F,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x44
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x3F,0xF8,0x3F,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x1F,0xF8,0x1F,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x7F,0xF8,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x45
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x7F,0xF8,0x7F,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x3F,0xF8,0x3F,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x46
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x1F,0xF0,0x3F,0x78,0x30,0x3C,0x00,0x1C,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x3F,0x0E,0x3F,0x0E,0x38,0x1C,0x38,0x3C,0x38,0x78,0x38,0xF0,0x3F,0xC0,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x47
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0xFC,0x3F,0xFC,0x3F,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x48
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x1F,0xFC,0x1F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xFC,0x1F,0xFC,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x49
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x0F,0xF8,0x0F,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x04,0x07,0xFC,0x03,0xFC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x78,0x1C,0x3C,0x1C,0x1E,0x1C,0x0F,0x1C,0x07,0x9C,0x03,0xDC,0x01,0xFC,0x00,0xDC,0x01,0xDC,0x03,0x9C,0x07,0x1C,0x0F,0x1C,0x1E,0x1C,0x3C,0x1C,0x78,0x1C,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4B
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x3F,0xF8,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x38,0x1E,0x3C,0x1E,0x3C,0x1E,0x3C,0x36,0x36,0x36,0x36,0x36,0x36,0x66,0x32,0x66,0x33,0x66,0x33,0xC6,0x31,0xC6,0x31,0xC6,0x31,0x06,0x30,0x06,0x30,0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x30,0x1C,0x30,0x3C,0x30,0x7C,0x30,0x7C,0x30,0xFC,0x30,0xEC,0x31,0xCC,0x31,0xCC,0x33,0x8C,0x37,0x0C,0x3F,0x0C,0x3E,0x0C,0x3E,0x0C,0x3C,0x0C,0x38,0x0C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0xF0,0x0F,0x38,0x1C,0x1C,0x38,0x1C,0x38,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x1C,0x38,0x1C,0x38,0x38,0x1C,0xF0,0x0F,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4F
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x1F,0xF8,0x3F,0x38,0x78,0x38,0x70,0x38,0x70,0x38,0x70,0x38,0x78,0x38,0x3C,0xF8,0x1F,0xF8,0x07,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x50
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0xF0,0x0F,0x38,0x1C,0x1C,0x38,0x1C,0x38,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x1C,0x38,0x1C,0x38,0x38,0x1C,0xF0,0x0F,0xE0,0x07,0x00,0x1E,0x00,0x78,0x00,0xF0,0x00,0x40,0x00,0x00, ; 0x51
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x0F,0x1C,0x1E,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x0E,0xFC,0x07,0xFC,0x03,0x9C,0x07,0x1C,0x07,0x1C,0x0F,0x1C,0x1E,0x1C,0x3C,0x1C,0x38,0x1C,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x52
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x0F,0xF8,0x1F,0x3C,0x18,0x1C,0x00,0x1C,0x00,0x3C,0x00,0xF8,0x00,0xF0,0x07,0xC0,0x1F,0x00,0x3E,0x00,0x38,0x00,0x38,0x00,0x38,0x0C,0x1C,0xFC,0x1F,0xF0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x53
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x7F,0xFF,0x7F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x54
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x3C,0x78,0x38,0x38,0xF0,0x1F,0xE0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x55
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x0E,0x70,0x0E,0x70,0x1C,0x70,0x1C,0x38,0x3C,0x38,0x38,0x38,0x38,0x1C,0x70,0x1C,0x70,0x0C,0xE0,0x0E,0xE0,0x0E,0xE0,0x07,0xC0,0x07,0xC0,0x07,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x56
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x03,0xC0,0x07,0xC0,0x86,0x61,0xC6,0x63,0xC6,0x63,0xC6,0x63,0xC6,0x63,0x4E,0x76,0x6C,0x36,0x6C,0x36,0x6C,0x36,0x2C,0x3E,0x3C,0x3C,0x3C,0x1C,0x3C,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x57
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0xE0,0x3C,0x70,0x78,0x38,0x78,0x1C,0xF0,0x0E,0xE0,0x07,0xC0,0x03,0xC0,0x03,0xC0,0x07,0xE0,0x07,0x60,0x0F,0x30,0x1E,0x18,0x3C,0x1C,0x38,0x0E,0x78,0x07,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x58
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x0E,0x70,0x1C,0x30,0x1C,0x18,0x38,0x1C,0x78,0x0E,0x70,0x07,0xE0,0x03,0xE0,0x03,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x59
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x3F,0xFC,0x3F,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x07,0x80,0x03,0x80,0x01,0xC0,0x00,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0xFE,0x3F,0xFE,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x5A
|
||||
.db 0x00,0x00,0xC0,0x3F,0xC0,0x3F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x3F,0xC0,0x3F,0x00,0x00, ; 0x5B
|
||||
.db 0x00,0x00,0x06,0x00,0x0C,0x00,0x0C,0x00,0x18,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x60,0x00,0x60,0x00,0xC0,0x00,0xC0,0x00,0x80,0x01,0x80,0x01,0x00,0x03,0x00,0x03,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0x0C,0x00,0x18,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x60,0x00,0x00, ; 0x5C
|
||||
.db 0x00,0x00,0xFC,0x03,0xFC,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0xFC,0x03,0xFC,0x03,0x00,0x00, ; 0x5D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x80,0x03,0x80,0x03,0xC0,0x03,0xC0,0x06,0xE0,0x06,0x60,0x0C,0x30,0x0C,0x30,0x18,0x18,0x18,0x18,0x18,0x0C,0x30,0x0C,0x30,0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x5E
|
||||
.db 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,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x5F
|
||||
.db 0xC0,0x01,0x80,0x03,0x00,0x07,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,0x00,0x00,0x00, ; 0x60
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0xF8,0x0F,0x18,0x1E,0x00,0x1C,0x00,0x1C,0xE0,0x1F,0xF0,0x1F,0x38,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x3C,0x1E,0xF8,0x7B,0xF0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x61
|
||||
.db 0x00,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x9C,0x07,0xDC,0x1F,0x7C,0x1C,0x3C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x1C,0x3C,0x1E,0xFC,0x0F,0xCC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x62
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x1F,0xF0,0x3F,0x78,0x20,0x38,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x3C,0x00,0x38,0x00,0xF8,0x20,0xF0,0x3F,0xC0,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x63
|
||||
.db 0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0xC0,0x73,0xF0,0x7F,0x78,0x7C,0x38,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x3C,0x78,0x38,0x7C,0xF0,0x77,0xE0,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x64
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x07,0xF0,0x0F,0x78,0x1C,0x38,0x38,0x1C,0x38,0x1C,0x38,0xFC,0x3F,0xFC,0x3F,0x1C,0x00,0x1C,0x00,0x38,0x00,0x78,0x20,0xF0,0x3F,0xC0,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x65
|
||||
.db 0x00,0x00,0x00,0xFF,0x80,0xFF,0xC0,0x03,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xFC,0x7F,0xFC,0x7F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x66
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x73,0xF0,0x7F,0x78,0x7C,0x38,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x3C,0x78,0x38,0x7C,0xF0,0x77,0xE0,0x73,0x00,0x70,0x00,0x38,0x18,0x3C,0xF8,0x1F,0xF0,0x07, ; 0x67
|
||||
.db 0x00,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x0F,0xDC,0x1F,0x7C,0x3C,0x3C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x68
|
||||
.db 0x00,0x00,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x69
|
||||
.db 0x00,0x00,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x0F,0xF8,0x0F,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x04,0x07,0xFC,0x07,0xF8,0x01, ; 0x6A
|
||||
.db 0x00,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x3C,0x38,0x1E,0x38,0x0E,0x38,0x0F,0xB8,0x07,0xB8,0x03,0xF8,0x03,0xB8,0x03,0xB8,0x07,0x38,0x0F,0x38,0x0E,0x38,0x1E,0x38,0x3C,0x38,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6B
|
||||
.db 0x00,0x00,0xF8,0x07,0xF8,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCE,0x31,0xEE,0x79,0xFE,0x7F,0x9E,0x77,0x9E,0x73,0x8E,0x73,0x8E,0x73,0x8E,0x73,0x8E,0x73,0x8E,0x73,0x8E,0x73,0x8E,0x73,0x8E,0x73,0x8E,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x0F,0xDC,0x1F,0x7C,0x3C,0x3C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x0F,0x3C,0x1E,0x1C,0x1C,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1C,0x1C,0x3C,0x1E,0xF8,0x0F,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6F
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9C,0x07,0xDC,0x1F,0x7C,0x1C,0x3C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x1C,0x3C,0x1E,0xFC,0x0F,0x9C,0x07,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00, ; 0x70
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x39,0xF8,0x3F,0x3C,0x3E,0x1C,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1E,0x3C,0x1C,0x3E,0xF8,0x3B,0xF0,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38, ; 0x71
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x3E,0x70,0x3F,0xF0,0x31,0xF0,0x30,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x72
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x0F,0xF0,0x1F,0x78,0x10,0x38,0x00,0x38,0x00,0xF8,0x01,0xF0,0x07,0x80,0x1F,0x00,0x3C,0x00,0x38,0x00,0x38,0x18,0x3C,0xF8,0x1F,0xF0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x73
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0xE0,0x00,0xFC,0x3F,0xFC,0x3F,0xE0,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x01,0xC0,0x3F,0x80,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x74
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x3C,0x3C,0x3E,0xF8,0x3B,0xF0,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x75
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x70,0x1C,0x38,0x1C,0x38,0x3C,0x38,0x38,0x18,0x38,0x1C,0x70,0x1C,0x70,0x0C,0xE0,0x0E,0xE0,0x0E,0xE0,0x06,0xC0,0x07,0xC0,0x07,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x76
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x87,0xC3,0x87,0x43,0xC6,0x63,0xC6,0x63,0x46,0x62,0x6E,0x66,0x6E,0x26,0x6C,0x36,0x2C,0x36,0x3C,0x3C,0x3C,0x3C,0x3C,0x1C,0x18,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x77
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x30,0x3C,0x18,0x78,0x0C,0x70,0x0E,0xF0,0x06,0xE0,0x03,0xC0,0x03,0xC0,0x03,0xE0,0x07,0x70,0x0F,0x30,0x0E,0x38,0x1E,0x1C,0x3C,0x0E,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x78
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x70,0x1C,0x30,0x1C,0x38,0x38,0x18,0x38,0x1C,0x78,0x1C,0x70,0x0E,0xF0,0x0E,0xE0,0x07,0xE0,0x07,0xC0,0x03,0xC0,0x03,0xC0,0x01,0x80,0x01,0xC0,0x01,0xC0,0x00,0xE0,0x00,0x7C,0x00,0x3C,0x00, ; 0x79
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x3F,0xFC,0x3F,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x07,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0xFC,0x3F,0xFC,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7A
|
||||
.db 0x00,0x00,0x00,0x1F,0x80,0x1F,0xC0,0x03,0xC0,0x01,0xC0,0x01,0xC0,0x01,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0xC0,0x01,0xF8,0x00,0xF8,0x00,0xC0,0x01,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x03,0x80,0x1F,0x00,0x1F,0x00,0x00, ; 0x7B
|
||||
.db 0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00, ; 0x7C
|
||||
.db 0x00,0x00,0x7C,0x00,0xFC,0x00,0xE0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xE0,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x00,0xC0,0x01,0x80,0x0F,0x80,0x0F,0xC0,0x01,0xE0,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x00,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xE0,0x01,0xFC,0x00,0x7C,0x00,0x00,0x00, ; 0x7D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x60,0xFC,0x63,0xC6,0x3F,0x06,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x0F,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0xF8,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7F
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x1F,0xF0,0x3F,0x78,0x30,0x3C,0x00,0x1C,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x1C,0x00,0x3C,0x00,0x78,0x20,0xF0,0x3F,0xC0,0x1F,0x00,0x02,0x00,0x07,0x00,0x0C,0x00,0x0C,0x80,0x07, ; 0x80
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x06,0x30,0x06,0x00,0x00,0x00,0x00,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x3C,0x3C,0x3E,0xF8,0x3B,0xF0,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x81
|
||||
.db 0x00,0x00,0x00,0x0C,0x00,0x06,0x00,0x03,0x80,0x01,0x00,0x00,0x00,0x00,0xC0,0x07,0xF0,0x0F,0x78,0x1C,0x38,0x38,0x1C,0x38,0x1C,0x38,0xFC,0x3F,0xFC,0x3F,0x1C,0x00,0x1C,0x00,0x38,0x00,0x78,0x20,0xF0,0x3F,0xC0,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x82
|
||||
.db 0x00,0x00,0xC0,0x01,0x60,0x03,0x30,0x06,0x18,0x0C,0x00,0x00,0x00,0x00,0xE0,0x07,0xF8,0x0F,0x18,0x1E,0x00,0x1C,0x00,0x1C,0xE0,0x1F,0xF0,0x1F,0x38,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x3C,0x1E,0xF8,0x7B,0xF0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x83
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x0C,0x60,0x0C,0x00,0x00,0x00,0x00,0xE0,0x07,0xF8,0x0F,0x18,0x1E,0x00,0x1C,0x00,0x1C,0xE0,0x1F,0xF0,0x1F,0x38,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x3C,0x1E,0xF8,0x7B,0xF0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x84
|
||||
.db 0x00,0x00,0x30,0x00,0x60,0x00,0xC0,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0xE0,0x07,0xF8,0x0F,0x18,0x1E,0x00,0x1C,0x00,0x1C,0xE0,0x1F,0xF0,0x1F,0x38,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x3C,0x1E,0xF8,0x7B,0xF0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x85
|
||||
.db 0xC0,0x01,0x20,0x02,0x20,0x02,0x20,0x02,0xC0,0x01,0x00,0x00,0x00,0x00,0xE0,0x07,0xF8,0x0F,0x18,0x1E,0x00,0x1C,0x00,0x1C,0xE0,0x1F,0xF0,0x1F,0x38,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x3C,0x1E,0xF8,0x7B,0xF0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x86
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x1F,0xF0,0x3F,0x78,0x20,0x38,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x3C,0x00,0x38,0x00,0xF8,0x20,0xF0,0x3F,0xC0,0x1F,0x00,0x01,0x80,0x03,0x00,0x06,0x00,0x06,0xC0,0x03, ; 0x87
|
||||
.db 0x00,0x00,0xC0,0x01,0x60,0x03,0x30,0x06,0x18,0x0C,0x00,0x00,0x00,0x00,0xC0,0x07,0xF0,0x0F,0x78,0x1C,0x38,0x38,0x1C,0x38,0x1C,0x38,0xFC,0x3F,0xFC,0x3F,0x1C,0x00,0x1C,0x00,0x38,0x00,0x78,0x20,0xF0,0x3F,0xC0,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x88
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x0C,0x60,0x0C,0x00,0x00,0x00,0x00,0xC0,0x07,0xF0,0x0F,0x78,0x1C,0x38,0x38,0x1C,0x38,0x1C,0x38,0xFC,0x3F,0xFC,0x3F,0x1C,0x00,0x1C,0x00,0x38,0x00,0x78,0x20,0xF0,0x3F,0xC0,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x89
|
||||
.db 0x00,0x00,0x30,0x00,0x60,0x00,0xC0,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0xC0,0x07,0xF0,0x0F,0x78,0x1C,0x38,0x38,0x1C,0x38,0x1C,0x38,0xFC,0x3F,0xFC,0x3F,0x1C,0x00,0x1C,0x00,0x38,0x00,0x78,0x20,0xF0,0x3F,0xC0,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x8A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x06,0x30,0x06,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x8B
|
||||
.db 0x00,0x00,0x80,0x03,0xC0,0x06,0x60,0x0C,0x30,0x18,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x8C
|
||||
.db 0x00,0x00,0x60,0x00,0xC0,0x00,0x80,0x01,0x00,0x03,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x8D
|
||||
.db 0x30,0x0C,0x30,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x03,0xE0,0x03,0x60,0x07,0x60,0x07,0x70,0x06,0x30,0x0E,0x38,0x0E,0x38,0x1C,0x18,0x1C,0xFC,0x3F,0xFC,0x3F,0x0E,0x38,0x0E,0x70,0x0E,0x70,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x8E
|
||||
.db 0x80,0x03,0x40,0x04,0x40,0x04,0x40,0x04,0x80,0x03,0x80,0x03,0xC0,0x07,0xC0,0x07,0xE0,0x06,0x60,0x0E,0x60,0x0E,0x70,0x0C,0x30,0x1C,0x38,0x1C,0x38,0x38,0xFC,0x3F,0xFC,0x3F,0x1C,0x70,0x0E,0x70,0x0E,0x70,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x8F
|
||||
.db 0x00,0x0E,0x00,0x07,0x80,0x03,0x00,0x00,0x00,0x00,0xF8,0x3F,0xF8,0x3F,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x1F,0xF8,0x1F,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x7F,0xF8,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x90
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x3C,0xFC,0x7F,0x80,0x67,0x80,0xE3,0x80,0xE3,0xF0,0xFF,0xFC,0xFF,0x9C,0x03,0x8E,0x03,0x8E,0x03,0x8E,0x03,0x9E,0x87,0xFC,0xFF,0x78,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x91
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0xC0,0x3F,0xC0,0x07,0xE0,0x07,0x60,0x07,0x60,0x07,0x70,0x07,0x30,0x3F,0x38,0x3F,0x18,0x07,0x1C,0x07,0xFC,0x07,0xFC,0x07,0x06,0x07,0x06,0x7F,0x03,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x92
|
||||
.db 0x00,0x00,0xC0,0x01,0x60,0x03,0x30,0x06,0x18,0x0C,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x0F,0x3C,0x1E,0x1C,0x1C,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1C,0x1C,0x3C,0x1E,0xF8,0x0F,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x93
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x06,0x30,0x06,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x0F,0x3C,0x1E,0x1C,0x1C,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1C,0x1C,0x3C,0x1E,0xF8,0x0F,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x94
|
||||
.db 0x00,0x00,0x30,0x00,0x60,0x00,0xC0,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x0F,0x3C,0x1E,0x1C,0x1C,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1C,0x1C,0x3C,0x1E,0xF8,0x0F,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x95
|
||||
.db 0x00,0x00,0xC0,0x01,0x60,0x03,0x30,0x06,0x18,0x0C,0x00,0x00,0x00,0x00,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x3C,0x3C,0x3E,0xF8,0x3B,0xF0,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x96
|
||||
.db 0x00,0x00,0x30,0x00,0x60,0x00,0xC0,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x3C,0x3C,0x3E,0xF8,0x3B,0xF0,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x97
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x06,0x30,0x06,0x00,0x00,0x00,0x00,0x1E,0x70,0x1C,0x30,0x1C,0x38,0x38,0x18,0x38,0x1C,0x78,0x1C,0x70,0x0E,0xF0,0x0E,0xE0,0x07,0xE0,0x07,0xC0,0x03,0xC0,0x03,0xC0,0x01,0x80,0x01,0xC0,0x01,0xC0,0x00,0xE0,0x00,0x7C,0x00,0x3C,0x00, ; 0x98
|
||||
.db 0x30,0x0C,0x30,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0xF0,0x0F,0x38,0x1C,0x1C,0x38,0x1C,0x38,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x1C,0x38,0x1C,0x38,0x38,0x1C,0xF0,0x0F,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x99
|
||||
.db 0x60,0x18,0x60,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x3C,0x78,0x38,0x38,0xF0,0x1F,0xE0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x9A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x33,0xF8,0x1F,0x3C,0x1E,0x1C,0x1E,0x0E,0x3B,0x0E,0x39,0x8E,0x39,0xCE,0x38,0x6E,0x38,0x6E,0x38,0x3C,0x1C,0x3C,0x1E,0xFC,0x0F,0xE6,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x9B
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x3E,0x80,0x3F,0x80,0x03,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xF0,0x0F,0xF0,0x0F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xE0,0x00,0x70,0x00,0xF8,0x3F,0xF8,0x3F,0xF8,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x9C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x67,0xF0,0x3F,0x38,0x1C,0x1C,0x3C,0x1C,0x3C,0x0E,0x76,0x0E,0x73,0x8E,0x71,0x8E,0x71,0xCE,0x70,0x6E,0x70,0x3C,0x38,0x3C,0x38,0x38,0x1C,0xFC,0x0F,0xE6,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x9D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x20,0x0E,0x70,0x1C,0x38,0x38,0x1C,0x70,0x0E,0xE0,0x07,0xC0,0x03,0xC0,0x03,0xE0,0x07,0x70,0x0E,0x38,0x1C,0x1C,0x38,0x0E,0x70,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x9E
|
||||
.db 0x00,0x00,0x00,0x3F,0x80,0x3F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xF8,0x1F,0xF8,0x1F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xFE,0x00,0x7E,0x00, ; 0x9F
|
||||
.db 0x00,0x00,0x00,0x06,0x00,0x03,0x80,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0xF8,0x0F,0x18,0x1E,0x00,0x1C,0x00,0x1C,0xE0,0x1F,0xF0,0x1F,0x38,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x3C,0x1E,0xF8,0x7B,0xF0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA0
|
||||
.db 0x00,0x00,0x00,0x06,0x00,0x03,0x80,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA1
|
||||
.db 0x00,0x00,0x00,0x06,0x00,0x03,0x80,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x0F,0x3C,0x1E,0x1C,0x1C,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1C,0x1C,0x3C,0x1E,0xF8,0x0F,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA2
|
||||
.db 0x00,0x00,0x00,0x06,0x00,0x03,0x80,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x3C,0x3C,0x3E,0xF8,0x3B,0xF0,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA3
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x0C,0xF0,0x0F,0x30,0x07,0x00,0x00,0x00,0x00,0x1C,0x0F,0xDC,0x1F,0x7C,0x3C,0x3C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA4
|
||||
.db 0xE0,0x0C,0xF0,0x0F,0x30,0x07,0x00,0x00,0x00,0x00,0x1C,0x30,0x1C,0x30,0x3C,0x30,0x7C,0x30,0x7C,0x30,0xFC,0x30,0xEC,0x31,0xCC,0x31,0xCC,0x33,0x8C,0x37,0x0C,0x3F,0x0C,0x3E,0x0C,0x3E,0x0C,0x3C,0x0C,0x38,0x0C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA5
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x03,0xF0,0x07,0x10,0x06,0xE0,0x07,0xF0,0x07,0x38,0x06,0x18,0x06,0x18,0x07,0xF8,0x1F,0xF0,0x1C,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, ; 0xA6
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x07,0xF0,0x0F,0x38,0x1C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x38,0x1C,0xF0,0x0F,0xE0,0x07,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, ; 0xA7
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x80,0x03,0x80,0x03,0x80,0x03,0xC0,0x01,0xE0,0x01,0xF0,0x00,0x78,0x00,0x38,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x30,0x3C,0x30,0xF8,0x3F,0xE0,0x1F, ; 0xA8
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x03,0x10,0x04,0xE8,0x09,0x24,0x12,0x24,0x12,0xE4,0x11,0x24,0x11,0x24,0x11,0x28,0x0B,0x10,0x04,0xE0,0x03,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, ; 0xA9
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x7F,0xFE,0x7F,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAA
|
||||
.db 0x00,0x00,0x00,0x00,0x1F,0x0C,0x1F,0x06,0x1C,0x06,0x1C,0x03,0x1C,0x03,0x9C,0x01,0x9C,0x01,0xDC,0x00,0xDC,0x00,0x7C,0x3C,0x30,0xFE,0x30,0xE0,0x18,0xE0,0x18,0x70,0x0C,0x38,0x0C,0x0C,0x06,0x06,0x06,0xFE,0x03,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAB
|
||||
.db 0x00,0x00,0x00,0x00,0x1F,0x18,0x1F,0x0C,0x1C,0x0C,0x1C,0x06,0x1C,0x06,0x1C,0x03,0x1C,0x03,0x9C,0x01,0x9C,0x01,0xDC,0x38,0x60,0x3C,0x60,0x3A,0x30,0x39,0xB0,0x39,0xD8,0x38,0xD8,0xFF,0x0C,0x38,0x0C,0x38,0x06,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAC
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x01,0xC0,0x01,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01, ; 0xAD
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0xE0,0x38,0x70,0x1C,0x38,0x0E,0x1C,0x07,0x0C,0x03,0x8E,0x03,0x1C,0x07,0x38,0x0E,0x70,0x1C,0xE0,0x38,0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAE
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x01,0x9C,0x03,0x38,0x07,0x70,0x0E,0xE0,0x1C,0xC0,0x39,0xC0,0x18,0xE0,0x1C,0x70,0x0E,0x38,0x07,0x9C,0x03,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAF
|
||||
.db 0xE7,0x1C,0xE7,0x1C,0xE7,0x1C,0x00,0x00,0x00,0x00,0xE7,0x1C,0xE7,0x1C,0xE7,0x1C,0x00,0x00,0x00,0x00,0xE7,0x1C,0xE7,0x1C,0xE7,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0xE7,0x1C,0xE7,0x1C,0xE7,0x1C,0x00,0x00,0x00,0x00,0xE7,0x1C,0xE7,0x1C,0xE7,0x1C,0x00,0x00,0x00,0x00, ; 0xB0
|
||||
.db 0x38,0xE7,0x38,0xE7,0x38,0xE7,0xE7,0x1C,0xE7,0x1C,0xFF,0xFF,0x38,0xE7,0x38,0xE7,0xE7,0x1C,0xE7,0x1C,0xFF,0xFF,0x38,0xE7,0x38,0xE7,0xE7,0x1C,0xE7,0x1C,0xE7,0x1C,0x38,0xE7,0x38,0xE7,0xFF,0xFF,0xE7,0x1C,0xE7,0x1C,0x38,0xE7,0x38,0xE7,0xFF,0xFF,0xE7,0x1C,0xE7,0x1C, ; 0xB1
|
||||
.db 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE7,0x1C,0xE7,0x1C,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE7,0x1C,0xE7,0x1C,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE7,0x1C,0xE7,0x1C,0xE7,0x1C,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE7,0x1C,0xE7,0x1C,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE7,0x1C,0xE7,0x1C, ; 0xB2
|
||||
.db 0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01, ; 0xB3
|
||||
.db 0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xFF,0x01,0xFF,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01, ; 0xB4
|
||||
.db 0x00,0x07,0x80,0x03,0xC0,0x01,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x03,0xE0,0x03,0x60,0x07,0x60,0x07,0x70,0x06,0x30,0x0E,0x38,0x0E,0x38,0x1C,0x18,0x1C,0xFC,0x3F,0xFC,0x3F,0x0E,0x38,0x0E,0x70,0x0E,0x70,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xB5
|
||||
.db 0xE0,0x03,0x70,0x07,0x38,0x0E,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x03,0xE0,0x03,0x60,0x07,0x60,0x07,0x70,0x06,0x30,0x0E,0x38,0x0E,0x38,0x1C,0x18,0x1C,0xFC,0x3F,0xFC,0x3F,0x0E,0x38,0x0E,0x70,0x0E,0x70,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xB6
|
||||
.db 0xE0,0x00,0xC0,0x01,0x80,0x03,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x03,0xE0,0x03,0x60,0x07,0x60,0x07,0x70,0x06,0x30,0x0E,0x38,0x0E,0x38,0x1C,0x18,0x1C,0xFC,0x3F,0xFC,0x3F,0x0E,0x38,0x0E,0x70,0x0E,0x70,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xB7
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x0F,0xF0,0x1F,0x38,0x38,0x1C,0x70,0x8C,0x6F,0xEE,0xEF,0x66,0xC8,0x36,0xC0,0x36,0xC0,0x36,0xC0,0x36,0xC0,0x36,0xC0,0x66,0xC8,0xEE,0xEF,0x8C,0x67,0x1C,0x70,0x38,0x38,0xF0,0x1F,0xE0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xB8
|
||||
.db 0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x7F,0x06,0x7F,0x06,0x00,0x06,0x00,0x06,0x7F,0x06,0x7F,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06, ; 0xB9
|
||||
.db 0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06, ; 0xBA
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x07,0xFF,0x07,0x00,0x06,0x00,0x06,0x7F,0x06,0x7F,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06, ; 0xBB
|
||||
.db 0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x7F,0x06,0x7F,0x06,0x00,0x06,0x00,0x06,0xFF,0x07,0xFF,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xBC
|
||||
.db 0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0xC0,0x0F,0xF0,0x0F,0xB8,0x09,0xB8,0x01,0x9C,0x01,0x9C,0x01,0x9C,0x01,0x9C,0x01,0x9C,0x01,0x9C,0x01,0x9C,0x01,0xB8,0x01,0xF8,0x09,0xF0,0x0F,0xE0,0x07,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xBD
|
||||
.db 0x00,0x00,0x00,0x00,0x0E,0xE0,0x1C,0x60,0x38,0x30,0x38,0x30,0x70,0x18,0xE0,0x0C,0xE0,0x0C,0xC0,0x07,0x80,0x03,0xF8,0x3F,0xF8,0x3F,0x80,0x03,0x80,0x03,0x80,0x03,0xF8,0x3F,0xF8,0x3F,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xBE
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x01,0xFF,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01, ; 0xBF
|
||||
.db 0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0xFF,0x80,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC0
|
||||
.db 0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC1
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01, ; 0xC2
|
||||
.db 0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0xFF,0x80,0xFF,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01, ; 0xC3
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC4
|
||||
.db 0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xFF,0xFF,0xFF,0xFF,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01, ; 0xC5
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x0C,0xF0,0x0F,0x30,0x07,0x00,0x00,0x00,0x00,0xE0,0x07,0xF8,0x0F,0x18,0x1E,0x00,0x1C,0x00,0x1C,0xE0,0x1F,0xF0,0x1F,0x38,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x3C,0x1E,0xF8,0x7B,0xF0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC6
|
||||
.db 0xE0,0x0C,0xF0,0x0F,0x30,0x07,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x03,0xE0,0x03,0x60,0x07,0x60,0x07,0x70,0x06,0x30,0x0E,0x38,0x0E,0x38,0x1C,0x18,0x1C,0xFC,0x3F,0xFC,0x3F,0x0E,0x38,0x0E,0x70,0x0E,0x70,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC7
|
||||
.db 0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0xFE,0x60,0xFE,0x60,0x00,0x60,0x00,0xE0,0xFF,0xE0,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC8
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xFF,0xE0,0xFF,0x60,0x00,0x60,0x00,0x60,0xFE,0x60,0xFE,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06, ; 0xC9
|
||||
.db 0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x7F,0xFE,0x7F,0xFE,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xCA
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x7F,0xFE,0x7F,0xFE,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06, ; 0xCB
|
||||
.db 0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0xFE,0x60,0xFE,0x60,0x00,0x60,0x00,0x60,0xFE,0x60,0xFE,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06, ; 0xCC
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xCD
|
||||
.db 0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x7F,0xFE,0x7F,0xFE,0x00,0x00,0x00,0x00,0x7F,0xFE,0x7F,0xFE,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06, ; 0xCE
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x20,0xCC,0x33,0xF8,0x1F,0x30,0x0C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x30,0x0C,0xF8,0x1F,0xCC,0x33,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xCF
|
||||
.db 0x00,0x00,0x1E,0x03,0xFE,0x03,0xF0,0x01,0xF0,0x03,0x18,0x07,0x00,0x0E,0xE0,0x0F,0xF8,0x1F,0x3C,0x1E,0x1C,0x3C,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1C,0x1C,0x3C,0x1E,0xF8,0x0F,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD0
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x0F,0x1C,0x3C,0x1C,0x38,0x1C,0x78,0x1C,0x70,0x1C,0x70,0xFF,0x70,0xFF,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x38,0x1C,0x38,0x1C,0x1E,0xFC,0x0F,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD1
|
||||
.db 0xC0,0x07,0xE0,0x0E,0x70,0x1C,0x00,0x00,0x00,0x00,0xF8,0x3F,0xF8,0x3F,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x1F,0xF8,0x1F,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x7F,0xF8,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD2
|
||||
.db 0x60,0x18,0x60,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x3F,0xF8,0x3F,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x1F,0xF8,0x1F,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x7F,0xF8,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD3
|
||||
.db 0xC0,0x01,0x80,0x03,0x00,0x07,0x00,0x00,0x00,0x00,0xF8,0x3F,0xF8,0x3F,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x1F,0xF8,0x1F,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x7F,0xF8,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD4
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD5
|
||||
.db 0x00,0x07,0x80,0x03,0xC0,0x01,0x00,0x00,0x00,0x00,0xFC,0x1F,0xFC,0x1F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xFC,0x1F,0xFC,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD6
|
||||
.db 0xE0,0x03,0x70,0x07,0x38,0x0E,0x00,0x00,0x00,0x00,0xFC,0x1F,0xFC,0x1F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xFC,0x1F,0xFC,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD7
|
||||
.db 0x30,0x0C,0x30,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x1F,0xFC,0x1F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xFC,0x1F,0xFC,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD8
|
||||
.db 0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xFF,0x01,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD9
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x80,0xFF,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01, ; 0xDA
|
||||
.db 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, ; 0xDB
|
||||
.db 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,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, ; 0xDC
|
||||
.db 0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00, ; 0xDD
|
||||
.db 0xE0,0x00,0xC0,0x01,0x80,0x03,0x00,0x00,0x00,0x00,0xFC,0x1F,0xFC,0x1F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xFC,0x1F,0xFC,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xDE
|
||||
.db 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,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, ; 0xDF
|
||||
.db 0x00,0x07,0x80,0x03,0xC0,0x01,0x00,0x00,0x00,0x00,0xE0,0x07,0xF0,0x0F,0x38,0x1C,0x1C,0x38,0x1C,0x38,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x1C,0x38,0x1C,0x38,0x38,0x1C,0xF0,0x0F,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE0
|
||||
.db 0x00,0x00,0xF0,0x03,0xF8,0x07,0x3C,0x0E,0x1C,0x0E,0x1C,0x0E,0x1C,0x06,0x1C,0x07,0x9C,0x03,0x9C,0x03,0x9C,0x03,0x9C,0x07,0x1C,0x0F,0x1C,0x1E,0x1C,0x3C,0x1C,0x78,0x1C,0x70,0x1C,0x70,0x9C,0x70,0x9C,0x3F,0x1C,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE1
|
||||
.db 0xE0,0x03,0x70,0x07,0x38,0x0E,0x00,0x00,0x00,0x00,0xE0,0x07,0xF0,0x0F,0x38,0x1C,0x1C,0x38,0x1C,0x38,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x1C,0x38,0x1C,0x38,0x38,0x1C,0xF0,0x0F,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE2
|
||||
.db 0xE0,0x00,0xC0,0x01,0x80,0x03,0x00,0x00,0x00,0x00,0xE0,0x07,0xF0,0x0F,0x38,0x1C,0x1C,0x38,0x1C,0x38,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x1C,0x38,0x1C,0x38,0x38,0x1C,0xF0,0x0F,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE3
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x0C,0xF0,0x0F,0x30,0x07,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x0F,0x3C,0x1E,0x1C,0x1C,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1C,0x1C,0x3C,0x1E,0xF8,0x0F,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE4
|
||||
.db 0xE0,0x0C,0xF0,0x0F,0x30,0x07,0x00,0x00,0x00,0x00,0xE0,0x07,0xF0,0x0F,0x38,0x1C,0x1C,0x38,0x1C,0x38,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x1C,0x38,0x1C,0x38,0x38,0x1C,0xF0,0x0F,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE5
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x3C,0x3C,0x7C,0x3E,0xFC,0x3B,0xDC,0x7B,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00, ; 0xE6
|
||||
.db 0x00,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x9C,0x07,0xDC,0x1F,0x7C,0x1C,0x3C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x1C,0x3C,0x1E,0xFC,0x0F,0x9C,0x07,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00, ; 0xE7
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0xF8,0x1F,0xF8,0x3F,0x38,0x78,0x38,0x70,0x38,0x70,0x38,0x70,0x38,0x78,0x38,0x3C,0xF8,0x1F,0xF8,0x07,0x38,0x00,0x38,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE8
|
||||
.db 0x00,0x07,0x80,0x03,0xC0,0x01,0x00,0x00,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x3C,0x78,0x38,0x38,0xF0,0x1F,0xE0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE9
|
||||
.db 0xE0,0x03,0x70,0x07,0x38,0x0E,0x00,0x00,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x3C,0x78,0x38,0x38,0xF0,0x1F,0xE0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xEA
|
||||
.db 0xE0,0x00,0xC0,0x01,0x80,0x03,0x00,0x00,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x3C,0x78,0x38,0x38,0xF0,0x1F,0xE0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xEB
|
||||
.db 0x00,0x00,0x00,0x06,0x00,0x03,0x80,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x1E,0x70,0x1C,0x30,0x1C,0x38,0x38,0x18,0x38,0x1C,0x78,0x1C,0x70,0x0E,0xF0,0x0E,0xE0,0x07,0xE0,0x07,0xC0,0x03,0xC0,0x03,0xC0,0x01,0x80,0x01,0xC0,0x01,0xC0,0x00,0xE0,0x00,0x7C,0x00,0x3C,0x00, ; 0xEC
|
||||
.db 0x00,0x07,0x80,0x03,0xC0,0x01,0x00,0x00,0x00,0x00,0x07,0xE0,0x0E,0x70,0x1C,0x30,0x1C,0x18,0x38,0x1C,0x78,0x0E,0x70,0x07,0xE0,0x03,0xE0,0x03,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xED
|
||||
.db 0xFF,0xFF,0xFF,0xFF,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,0x00,0x00,0x00,0x00,0x00, ; 0xEE
|
||||
.db 0x80,0x03,0xC0,0x01,0xE0,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,0x00,0x00,0x00,0x00, ; 0xEF
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x1F,0xF8,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF0
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xFE,0x7F,0xFE,0x7F,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0xFE,0x7F,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF1
|
||||
.db 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,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0xFF,0xFF, ; 0xF2
|
||||
.db 0x00,0x00,0x00,0x00,0x7E,0xE0,0xFE,0x70,0xE0,0x38,0xE0,0x38,0x3C,0x1C,0x7C,0x1C,0xE0,0x0E,0xE0,0x07,0xFE,0x07,0xBE,0x3B,0xC0,0x3D,0xC0,0x3B,0xE0,0x39,0xF0,0x39,0xF0,0x38,0xF8,0xFF,0x38,0x38,0x1C,0x38,0x0E,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF3
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x1F,0xFC,0x1F,0xFE,0x18,0xFE,0x18,0xFE,0x18,0xFE,0x18,0xFE,0x18,0xFC,0x18,0xF8,0x18,0xF0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0xC0,0x18,0x00,0x00, ; 0xF4
|
||||
.db 0x00,0x00,0x00,0x00,0xC0,0x1F,0xF0,0x1F,0x78,0x10,0x38,0x00,0x38,0x00,0x78,0x00,0xF0,0x01,0xE0,0x07,0xF0,0x0F,0x30,0x1E,0x38,0x3C,0x38,0x38,0x78,0x38,0xF0,0x19,0xE0,0x0F,0x80,0x0F,0x00,0x1E,0x00,0x3C,0x00,0x38,0x00,0x38,0x18,0x3C,0xF8,0x1F,0xE0,0x07,0x00,0x00, ; 0xF5
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x01,0xC0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x3F,0xFE,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0xC0,0x01,0xC0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF6
|
||||
.db 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,0x01,0x80,0x03,0x00,0x06,0x00,0x06,0xC0,0x03, ; 0xF7
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x00,0x10,0x01,0x10,0x01,0x10,0x01,0xE0,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, ; 0xF8
|
||||
.db 0x30,0x0C,0x30,0x0C,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,0x00,0x00,0x00,0x00,0x00, ; 0xF9
|
||||
.db 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,0xC0,0x01,0xC0,0x01,0xC0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xFA
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x03,0xE0,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,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, ; 0xFB
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x0F,0xF0,0x1F,0x10,0x1C,0x00,0x1C,0xC0,0x07,0xC0,0x0F,0x00,0x1C,0x00,0x1C,0xF0,0x1F,0xF0,0x07,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, ; 0xFC
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x07,0xF0,0x1F,0x10,0x1C,0x00,0x1C,0x00,0x0E,0x80,0x07,0xC0,0x01,0x70,0x00,0xF0,0x1F,0xF0,0x1F,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, ; 0xFD
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xFE
|
||||
.db 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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 0xFF
|
||||
@@ -1,258 +0,0 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; This is a font from the project LCD_fonts at
|
||||
; https://github.com/basti79/LCD-fonts.git
|
||||
; which in turn is based on a post by Benedikt K. in a forum post on
|
||||
; https://www.mikrocontroller.net/topic/54860
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
|
||||
font4_12x16:
|
||||
; header
|
||||
.dw font12x16MonoHandlerFn ; handlerFn
|
||||
.dw 384 ; needed buffer size
|
||||
.db 12, 16 ; width, height of chars
|
||||
.db 32, 224 ; first char, num of chars in font
|
||||
; data (12x16_horizontal_LSB_2)
|
||||
.db 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, ; 0x20
|
||||
.db 0x60,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x21
|
||||
.db 0x00,0x00,0x00,0x00,0x98,0x01,0x98,0x01,0x98,0x01,0x98,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x22
|
||||
.db 0x00,0x00,0x60,0x06,0x60,0x06,0x60,0x06,0xFC,0x0F,0x30,0x03,0x30,0x03,0x98,0x01,0x98,0x01,0xFE,0x03,0xCC,0x00,0xCC,0x00,0xCC,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x23
|
||||
.db 0x60,0x00,0x60,0x00,0xF8,0x01,0xFC,0x03,0x6C,0x00,0x6C,0x00,0xFC,0x01,0xF8,0x03,0x60,0x03,0x60,0x03,0xFC,0x03,0xF8,0x01,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x24
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x08,0x1C,0x0C,0x1C,0x0E,0x1C,0x07,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x07,0x0E,0x07,0x06,0x07,0x00,0x00,0x00,0x00, ; 0x25
|
||||
.db 0x00,0x00,0xE0,0x00,0xB0,0x01,0x98,0x01,0x98,0x01,0xD8,0x00,0x70,0x00,0x78,0x00,0x7C,0x00,0xCC,0x06,0xCC,0x03,0x8C,0x01,0xDC,0x03,0x78,0x06,0x00,0x00,0x00,0x00, ; 0x26
|
||||
.db 0x70,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x27
|
||||
.db 0xC0,0x01,0x60,0x00,0x70,0x00,0x30,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x30,0x00,0x70,0x00,0x60,0x00,0xC0,0x01,0x00,0x00,0x00,0x00, ; 0x28
|
||||
.db 0x38,0x00,0x60,0x00,0xE0,0x00,0xC0,0x00,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x00,0xE0,0x00,0x60,0x00,0x38,0x00,0x00,0x00,0x00,0x00, ; 0x29
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x6C,0x03,0x6C,0x03,0xF8,0x01,0xF0,0x00,0xFC,0x03,0xF0,0x00,0xF8,0x01,0x6C,0x03,0x6C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFC,0x03,0xFC,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2B
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x30,0x00, ; 0x2C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00, ; 0x2E
|
||||
.db 0x00,0x00,0x00,0x08,0x00,0x0C,0x00,0x0E,0x00,0x07,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2F
|
||||
.db 0xF0,0x01,0xFC,0x07,0x0C,0x06,0x06,0x0E,0x06,0x0F,0x86,0x0D,0xC6,0x0C,0x66,0x0C,0x36,0x0C,0x1E,0x0C,0x0E,0x0C,0x0C,0x06,0xFC,0x07,0xF0,0x01,0x00,0x00,0x00,0x00, ; 0x30
|
||||
.db 0xC0,0x00,0xE0,0x00,0xF8,0x00,0xF8,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xF8,0x07,0xF8,0x07,0x00,0x00,0x00,0x00, ; 0x31
|
||||
.db 0xF8,0x03,0xFC,0x07,0x0E,0x0E,0x06,0x0C,0x06,0x0E,0x00,0x07,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0xFE,0x0F,0xFE,0x0F,0x00,0x00,0x00,0x00, ; 0x32
|
||||
.db 0xF8,0x03,0xFC,0x07,0x0E,0x0E,0x06,0x0C,0x00,0x0C,0x00,0x0E,0xF0,0x07,0xF0,0x03,0x00,0x06,0x00,0x0C,0x06,0x0C,0x0E,0x0E,0xFC,0x07,0xF8,0x03,0x00,0x00,0x00,0x00, ; 0x33
|
||||
.db 0x80,0x03,0xC0,0x03,0xE0,0x03,0x70,0x03,0x38,0x03,0x1C,0x03,0x0E,0x03,0x06,0x03,0xFE,0x0F,0xFE,0x0F,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00, ; 0x34
|
||||
.db 0xFE,0x0F,0xFE,0x0F,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x03,0xFC,0x07,0x00,0x0E,0x00,0x0C,0x00,0x0C,0x06,0x0C,0x0E,0x0E,0xFC,0x07,0xF8,0x03,0x00,0x00,0x00,0x00, ; 0x35
|
||||
.db 0xC0,0x03,0xE0,0x03,0x70,0x00,0x38,0x00,0x1C,0x00,0x0C,0x00,0xFE,0x03,0xFE,0x07,0x0E,0x0E,0x06,0x0C,0x06,0x0C,0x0E,0x0E,0xFC,0x07,0xF8,0x03,0x00,0x00,0x00,0x00, ; 0x36
|
||||
.db 0xFE,0x0F,0xFE,0x0F,0x00,0x06,0x00,0x06,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00, ; 0x37
|
||||
.db 0xF0,0x01,0xF8,0x03,0x1C,0x07,0x0C,0x06,0x0C,0x06,0x1C,0x07,0xF8,0x03,0xFC,0x07,0x0E,0x0E,0x06,0x0C,0x06,0x0C,0x0E,0x0E,0xFC,0x07,0xF8,0x03,0x00,0x00,0x00,0x00, ; 0x38
|
||||
.db 0xF8,0x03,0xFC,0x07,0x0E,0x0E,0x06,0x0C,0x06,0x0C,0x0E,0x0E,0xFC,0x0F,0xF8,0x0F,0x00,0x06,0x00,0x07,0x80,0x03,0xC0,0x01,0xF8,0x00,0x78,0x00,0x00,0x00,0x00,0x00, ; 0x39
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x30,0x00, ; 0x3B
|
||||
.db 0x00,0x03,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x1C,0x00,0x38,0x00,0x70,0x00,0xE0,0x00,0xC0,0x01,0x80,0x03,0x00,0x03,0x00,0x00,0x00,0x00, ; 0x3C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3D
|
||||
.db 0x0C,0x00,0x1C,0x00,0x38,0x00,0x70,0x00,0xE0,0x00,0xC0,0x01,0x80,0x03,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00, ; 0x3E
|
||||
.db 0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x07,0x80,0x03,0xC0,0x01,0xE0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x3F
|
||||
.db 0xF8,0x03,0xFC,0x07,0x0C,0x06,0xE6,0x0D,0xF6,0x0D,0xB6,0x0D,0xB6,0x0D,0xB6,0x0D,0xB6,0x0D,0xF6,0x07,0xE6,0x03,0x0E,0x00,0xFC,0x03,0xF0,0x03,0x00,0x00,0x00,0x00, ; 0x40
|
||||
.db 0x60,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0x98,0x01,0x98,0x01,0x98,0x01,0x0C,0x03,0xFC,0x03,0xFC,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x41
|
||||
.db 0xFE,0x00,0xFE,0x01,0x86,0x03,0x06,0x03,0x06,0x03,0x86,0x03,0xFE,0x01,0xFE,0x03,0x06,0x07,0x06,0x06,0x06,0x06,0x06,0x07,0xFE,0x03,0xFE,0x01,0x00,0x00,0x00,0x00, ; 0x42
|
||||
.db 0xF0,0x01,0xF8,0x03,0x1C,0x07,0x0C,0x06,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0C,0x06,0x1C,0x07,0xF8,0x03,0xF0,0x01,0x00,0x00,0x00,0x00, ; 0x43
|
||||
.db 0xFE,0x00,0xFE,0x01,0x86,0x03,0x06,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x03,0x86,0x03,0xFE,0x01,0xFE,0x00,0x00,0x00,0x00,0x00, ; 0x44
|
||||
.db 0xFE,0x07,0xFE,0x07,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x01,0xFE,0x01,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00, ; 0x45
|
||||
.db 0xFE,0x07,0xFE,0x07,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x01,0xFE,0x01,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00, ; 0x46
|
||||
.db 0xF0,0x03,0xF8,0x07,0x1C,0x06,0x0C,0x00,0x06,0x00,0x06,0x00,0xC6,0x07,0xC6,0x07,0x06,0x06,0x06,0x06,0x0C,0x06,0x1C,0x06,0xF8,0x07,0xF0,0x07,0x00,0x00,0x00,0x00, ; 0x47
|
||||
.db 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0xFE,0x07,0xFE,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x48
|
||||
.db 0xF8,0x01,0xF8,0x01,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x49
|
||||
.db 0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x06,0x06,0x06,0x06,0x0E,0x03,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x4A
|
||||
.db 0x06,0x06,0x06,0x07,0x86,0x03,0xC6,0x01,0xE6,0x00,0x76,0x00,0x3E,0x00,0x3E,0x00,0x76,0x00,0xE6,0x00,0xC6,0x01,0x86,0x03,0x06,0x07,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x4B
|
||||
.db 0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00, ; 0x4C
|
||||
.db 0x06,0x06,0x0E,0x07,0x0E,0x07,0x9E,0x07,0x9E,0x07,0xF6,0x06,0xF6,0x06,0x66,0x06,0x66,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x4D
|
||||
.db 0x06,0x06,0x0E,0x06,0x0E,0x06,0x1E,0x06,0x36,0x06,0x36,0x06,0x66,0x06,0x66,0x06,0xC6,0x06,0xC6,0x06,0x86,0x07,0x06,0x07,0x06,0x07,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x4E
|
||||
.db 0xF0,0x00,0xF8,0x01,0x9C,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0x9C,0x03,0xF8,0x01,0xF0,0x00,0x00,0x00,0x00,0x00, ; 0x4F
|
||||
.db 0xFE,0x01,0xFE,0x03,0x06,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x07,0xFE,0x03,0xFE,0x01,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00, ; 0x50
|
||||
.db 0xF0,0x00,0xF8,0x01,0x9C,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0xC6,0x06,0xCC,0x03,0x9C,0x03,0xF8,0x07,0xF0,0x06,0x00,0x00,0x00,0x00, ; 0x51
|
||||
.db 0xFE,0x01,0xFE,0x03,0x06,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x07,0xFE,0x03,0xFE,0x01,0xE6,0x00,0xC6,0x01,0x86,0x03,0x06,0x07,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x52
|
||||
.db 0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x00,0x0E,0x00,0xFC,0x01,0xF8,0x03,0x00,0x07,0x00,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x53
|
||||
.db 0xFC,0x03,0xFC,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x54
|
||||
.db 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x55
|
||||
.db 0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x56
|
||||
.db 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x06,0x66,0x06,0xF6,0x06,0x9E,0x07,0x0E,0x07,0x0E,0x07,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x57
|
||||
.db 0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0x98,0x01,0xF0,0x00,0x60,0x00,0x60,0x00,0xF0,0x00,0x98,0x01,0x0C,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x58
|
||||
.db 0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x59
|
||||
.db 0xFE,0x07,0xFE,0x07,0x00,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00, ; 0x5A
|
||||
.db 0xF8,0x01,0xF8,0x01,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x5B
|
||||
.db 0x00,0x00,0x02,0x00,0x06,0x00,0x0E,0x00,0x1C,0x00,0x38,0x00,0x70,0x00,0xE0,0x00,0xC0,0x01,0x80,0x03,0x00,0x07,0x00,0x0E,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x5C
|
||||
.db 0xF8,0x01,0xF8,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x5D
|
||||
.db 0x40,0x00,0xE0,0x00,0xF0,0x01,0xB8,0x03,0x1C,0x07,0x0E,0x0E,0x06,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x5E
|
||||
.db 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,0xFE,0x0F,0xFE,0x0F, ; 0x5F
|
||||
.db 0x00,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x00,0x60,0x00,0x60,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x60
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x03,0xFC,0x07,0x00,0x06,0xF8,0x07,0xFC,0x07,0x06,0x06,0x06,0x06,0xFE,0x07,0xFC,0x07,0x00,0x00,0x00,0x00, ; 0x61
|
||||
.db 0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xF6,0x01,0xFE,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x07,0xFE,0x03,0xFE,0x01,0x00,0x00,0x00,0x00, ; 0x62
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x06,0x06,0x00,0x06,0x00,0x06,0x00,0x0E,0x06,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x63
|
||||
.db 0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0xF8,0x06,0xFC,0x07,0x8E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x06,0xFC,0x07,0xF8,0x07,0x00,0x00,0x00,0x00, ; 0x64
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x06,0xFE,0x07,0xFE,0x03,0x06,0x00,0x0E,0x00,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x65
|
||||
.db 0xE0,0x01,0xF0,0x01,0x38,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0xFE,0x00,0xFE,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00, ; 0x66
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x07,0xFC,0x07,0x0E,0x06,0x06,0x06,0x0E,0x07,0xFC,0x07,0xF8,0x06,0x00,0x06,0x00,0x07,0xFC,0x03,0xFC,0x01, ; 0x67
|
||||
.db 0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xF6,0x00,0xFE,0x01,0x8E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00, ; 0x68
|
||||
.db 0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x69
|
||||
.db 0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x00,0x00,0xC0,0x01,0xC0,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x98,0x01,0xF8,0x01,0xF0,0x00, ; 0x6A
|
||||
.db 0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x8C,0x01,0xCC,0x01,0xEC,0x00,0x7C,0x00,0x7C,0x00,0xEC,0x00,0xCC,0x01,0x8C,0x03,0x0C,0x03,0x00,0x00,0x00,0x00, ; 0x6B
|
||||
.db 0x70,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x6C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9A,0x01,0xFE,0x03,0xFE,0x07,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x00,0x00,0x00,0x00, ; 0x6D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0xFC,0x03,0x0C,0x07,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x00,0x00,0x00,0x00, ; 0x6E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x6F
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x01,0xFE,0x03,0x06,0x07,0x06,0x06,0x06,0x06,0x0E,0x07,0xFE,0x03,0xF6,0x01,0x06,0x00,0x06,0x00,0x06,0x00, ; 0x70
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x07,0xFC,0x07,0x0E,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x07,0xF8,0x06,0x00,0x06,0x00,0x06,0x00,0x06, ; 0x71
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xEC,0x03,0xFC,0x07,0x1C,0x06,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00, ; 0x72
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFE,0x01,0x06,0x00,0xFE,0x00,0xFC,0x01,0x80,0x01,0x80,0x01,0xFE,0x01,0xFC,0x00,0x00,0x00,0x00,0x00, ; 0x73
|
||||
.db 0x00,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0xFE,0x00,0xFE,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0xF8,0x01,0xF0,0x01,0x00,0x00,0x00,0x00, ; 0x74
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x07,0xF8,0x06,0x00,0x00,0x00,0x00, ; 0x75
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x76
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0xF6,0x06,0xFC,0x03,0x9C,0x03,0x08,0x01,0x00,0x00,0x00,0x00, ; 0x77
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x8E,0x03,0xDC,0x01,0xF8,0x00,0x70,0x00,0xF8,0x00,0xDC,0x01,0x8E,0x03,0x06,0x03,0x00,0x00,0x00,0x00, ; 0x78
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00, ; 0x79
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0xFE,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0xFE,0x03,0xFE,0x03,0x00,0x00,0x00,0x00, ; 0x7A
|
||||
.db 0xC0,0x03,0xE0,0x03,0x70,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x38,0x00,0x1C,0x00,0x38,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x70,0x00,0xE0,0x03,0xC0,0x03,0x00,0x00, ; 0x7B
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x7C
|
||||
.db 0x3C,0x00,0x7C,0x00,0xE0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x01,0x80,0x03,0xC0,0x01,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xE0,0x00,0x7C,0x00,0x3C,0x00,0x00,0x00, ; 0x7D
|
||||
.db 0x00,0x00,0x00,0x00,0x38,0x06,0x6C,0x03,0xC6,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0xF0,0x00,0x98,0x01,0x0C,0x03,0x06,0x06,0x06,0x06,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7F
|
||||
.db 0xF0,0x01,0xF8,0x03,0x1C,0x07,0x0C,0x06,0x06,0x06,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0C,0x06,0x1C,0x07,0xF8,0x03,0xF0,0x01,0x60,0x00,0x78,0x00,0x78,0x00, ; 0x80
|
||||
.db 0x00,0x00,0x00,0x00,0x98,0x01,0x98,0x01,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x07,0xF8,0x06,0x00,0x00,0x00,0x00, ; 0x81
|
||||
.db 0x00,0x00,0x80,0x01,0xC0,0x00,0x60,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x06,0xFE,0x07,0xFE,0x07,0x06,0x00,0x0E,0x00,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x82
|
||||
.db 0x00,0x00,0x60,0x00,0xF0,0x00,0x98,0x01,0x00,0x00,0xF8,0x03,0xFC,0x07,0x00,0x06,0xF8,0x07,0xFC,0x07,0x06,0x06,0x06,0x06,0xFE,0x07,0xFC,0x07,0x00,0x00,0x00,0x00, ; 0x83
|
||||
.db 0x00,0x00,0x00,0x00,0x98,0x01,0x98,0x01,0x00,0x00,0xF8,0x03,0xFC,0x07,0x00,0x06,0xF8,0x07,0xFC,0x07,0x06,0x06,0x06,0x06,0xFE,0x07,0xFC,0x07,0x00,0x00,0x00,0x00, ; 0x84
|
||||
.db 0x00,0x00,0x30,0x00,0x60,0x00,0xC0,0x00,0x00,0x00,0xF8,0x03,0xFC,0x07,0x00,0x06,0xF8,0x07,0xFC,0x07,0x06,0x06,0x06,0x06,0xFE,0x07,0xFC,0x07,0x00,0x00,0x00,0x00, ; 0x85
|
||||
.db 0x00,0x00,0x60,0x00,0x90,0x00,0x60,0x00,0x00,0x00,0xF8,0x03,0xFC,0x07,0x00,0x06,0xF8,0x07,0xFC,0x07,0x06,0x06,0x06,0x06,0xFE,0x07,0xFC,0x07,0x00,0x00,0x00,0x00, ; 0x86
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x00,0x06,0x00,0x06,0x00,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x60,0x00,0x78,0x00, ; 0x87
|
||||
.db 0x00,0x00,0x60,0x00,0xF0,0x00,0x98,0x01,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x06,0xFE,0x07,0xFE,0x07,0x06,0x00,0x06,0x00,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x88
|
||||
.db 0x00,0x00,0x00,0x00,0x98,0x01,0x98,0x01,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x06,0xFE,0x07,0xFE,0x07,0x06,0x00,0x06,0x00,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x89
|
||||
.db 0x00,0x00,0x30,0x00,0x60,0x00,0xC0,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x06,0xFE,0x07,0xFE,0x07,0x06,0x00,0x06,0x00,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x8A
|
||||
.db 0x00,0x00,0x00,0x00,0xD8,0x00,0xD8,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x8B
|
||||
.db 0x00,0x00,0x60,0x00,0xF0,0x00,0x98,0x01,0x00,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x8C
|
||||
.db 0x00,0x00,0x30,0x00,0x60,0x00,0xC0,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x8D
|
||||
.db 0x98,0x01,0x98,0x01,0x00,0x00,0x60,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0x98,0x01,0x98,0x01,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x8E
|
||||
.db 0x60,0x00,0x90,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0x98,0x01,0x98,0x01,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x8F
|
||||
.db 0x80,0x01,0xC0,0x00,0x60,0x00,0xFE,0x07,0xFE,0x07,0x06,0x00,0x06,0x00,0xFE,0x01,0xFE,0x01,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00, ; 0x90
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBC,0x03,0x66,0x06,0x60,0x06,0xFC,0x03,0x66,0x00,0x66,0x00,0x66,0x06,0xDC,0x03,0x00,0x00,0x00,0x00, ; 0x91
|
||||
.db 0xE0,0x07,0xE0,0x07,0xF0,0x00,0xF0,0x00,0xF8,0x00,0xD8,0x00,0xD8,0x03,0xCC,0x03,0xCC,0x00,0xFC,0x00,0xFE,0x00,0xC6,0x00,0xC6,0x07,0xC6,0x07,0x00,0x00,0x00,0x00, ; 0x92
|
||||
.db 0x00,0x00,0x60,0x00,0xF0,0x00,0x98,0x01,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x93
|
||||
.db 0x00,0x00,0x00,0x00,0x98,0x01,0x98,0x01,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x94
|
||||
.db 0x00,0x00,0x30,0x00,0x60,0x00,0xC0,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x95
|
||||
.db 0x00,0x00,0x60,0x00,0xF0,0x00,0x98,0x01,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x07,0xF8,0x06,0x00,0x00,0x00,0x00, ; 0x96
|
||||
.db 0x00,0x00,0x30,0x00,0x60,0x00,0xC0,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x07,0xF8,0x06,0x00,0x00,0x00,0x00, ; 0x97
|
||||
.db 0x00,0x00,0x00,0x00,0x98,0x01,0x98,0x01,0x00,0x00,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00, ; 0x98
|
||||
.db 0x98,0x01,0x98,0x01,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x99
|
||||
.db 0x00,0x00,0x00,0x00,0x98,0x01,0x98,0x01,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x07,0xF8,0x06,0x00,0x00,0x00,0x00, ; 0x9A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x06,0xFC,0x03,0x8E,0x07,0xC6,0x06,0x66,0x06,0x36,0x06,0x1E,0x07,0xFC,0x03,0xF6,0x01,0x00,0x00,0x00,0x00, ; 0x9B
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x01,0xF0,0x03,0x30,0x03,0x30,0x00,0x30,0x00,0xF8,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0xFC,0x07,0xDC,0x03,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x9C
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x06,0xFC,0x03,0x8E,0x07,0xC6,0x06,0xC6,0x06,0x66,0x06,0x66,0x06,0x36,0x06,0x36,0x06,0x1E,0x07,0xFC,0x03,0xF6,0x01,0x00,0x00,0x00,0x00, ; 0x9D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x03,0x98,0x01,0xF0,0x00,0x60,0x00,0xF0,0x00,0x98,0x01,0x0C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x9E
|
||||
.db 0xC0,0x01,0xE0,0x03,0x60,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x6C,0x00,0x7C,0x00,0x38,0x00,0x00,0x00, ; 0x9F
|
||||
.db 0x00,0x00,0xC0,0x00,0x60,0x00,0x30,0x00,0x00,0x00,0xF8,0x03,0xFC,0x07,0x00,0x06,0xF8,0x07,0xFC,0x07,0x06,0x06,0x06,0x06,0xFE,0x07,0xFC,0x07,0x00,0x00,0x00,0x00, ; 0xA0
|
||||
.db 0x00,0x00,0xC0,0x00,0x60,0x00,0x30,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xA1
|
||||
.db 0x00,0x00,0xC0,0x00,0x60,0x00,0x30,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xA2
|
||||
.db 0x00,0x00,0xC0,0x00,0x60,0x00,0x30,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x07,0xF8,0x06,0x00,0x00,0x00,0x00, ; 0xA3
|
||||
.db 0x00,0x00,0x00,0x00,0x70,0x03,0xD8,0x01,0x00,0x00,0xFC,0x01,0xFC,0x03,0x0C,0x07,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x00,0x00,0x00,0x00, ; 0xA4
|
||||
.db 0x70,0x03,0xD8,0x01,0x00,0x00,0x06,0x06,0x0E,0x06,0x1E,0x06,0x3E,0x06,0x76,0x06,0xE6,0x06,0xC6,0x07,0x86,0x07,0x06,0x07,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0xA5
|
||||
.db 0xF8,0x03,0xFC,0x07,0x00,0x06,0xFC,0x07,0xFE,0x07,0x06,0x06,0xFE,0x07,0xFC,0x07,0x00,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA6
|
||||
.db 0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA7
|
||||
.db 0x60,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xA8
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x03,0xFC,0x07,0x0E,0x0E,0xF6,0x0C,0xB6,0x0D,0xF6,0x0C,0xB6,0x0D,0xB6,0x0D,0x0E,0x0E,0xFC,0x07,0xF8,0x03,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA9
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x07,0xFF,0x07,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAA
|
||||
.db 0x00,0x00,0x00,0x00,0x0C,0x00,0x0E,0x00,0x0C,0x03,0x8C,0x01,0xDE,0x00,0x60,0x00,0xB0,0x03,0x18,0x06,0x0C,0x03,0x80,0x01,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAB
|
||||
.db 0x00,0x00,0x00,0x00,0x0C,0x00,0x0E,0x00,0x0C,0x03,0x8C,0x01,0xDE,0x00,0x60,0x00,0xB0,0x06,0xD8,0x06,0xCC,0x07,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAC
|
||||
.db 0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0xAD
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x03,0x8C,0x01,0xC6,0x00,0x8C,0x01,0x18,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAE
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC6,0x00,0x8C,0x01,0x18,0x03,0x8C,0x01,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAF
|
||||
.db 0x11,0x01,0x44,0x04,0x11,0x01,0x44,0x04,0x11,0x01,0x44,0x04,0x11,0x01,0x44,0x04,0x11,0x01,0x44,0x04,0x11,0x01,0x44,0x04,0x11,0x01,0x44,0x04,0x11,0x01,0x44,0x04, ; 0xB0
|
||||
.db 0xAA,0x0A,0x55,0x05,0xAA,0x0A,0x55,0x05,0xAA,0x0A,0x55,0x05,0xAA,0x0A,0x55,0x05,0xAA,0x0A,0x55,0x05,0xAA,0x0A,0x55,0x05,0xAA,0x0A,0x55,0x05,0xAA,0x0A,0x55,0x05, ; 0xB1
|
||||
.db 0xEE,0x0E,0xBB,0x0B,0xEE,0x0E,0xBB,0x0B,0xEE,0x0E,0xBB,0x0B,0xEE,0x0E,0xBB,0x0B,0xEE,0x0E,0xBB,0x0B,0xEE,0x0E,0xBB,0x0B,0xEE,0x0E,0xBB,0x0B,0xEE,0x0E,0xBB,0x0B, ; 0xB2
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xB3
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x7F,0x00,0x7F,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xB4
|
||||
.db 0xC0,0x00,0x60,0x00,0x30,0x00,0x60,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0x98,0x01,0x98,0x01,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0xB5
|
||||
.db 0x60,0x00,0xF0,0x00,0x98,0x01,0x60,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0x98,0x01,0x98,0x01,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0xB6
|
||||
.db 0x30,0x00,0x60,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0x98,0x01,0x98,0x01,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0xB7
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x03,0xFC,0x07,0x0E,0x0E,0xE6,0x0C,0xB6,0x0D,0x36,0x0C,0xB6,0x0D,0xE6,0x0C,0x0E,0x0E,0xFC,0x07,0xF8,0x03,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xB8
|
||||
.db 0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6F,0x00,0x6F,0x00,0x60,0x00,0x6F,0x00,0x6F,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00, ; 0xB9
|
||||
.db 0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00, ; 0xBA
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x7F,0x00,0x60,0x00,0x6F,0x00,0x6F,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00, ; 0xBB
|
||||
.db 0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6F,0x00,0x6F,0x00,0x60,0x00,0x7F,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xBC
|
||||
.db 0x00,0x00,0x60,0x00,0x60,0x00,0xF0,0x01,0xF8,0x03,0x7C,0x03,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x7C,0x03,0xF8,0x03,0xF0,0x01,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0xBD
|
||||
.db 0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0xFC,0x03,0x60,0x00,0xFC,0x03,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0xBE
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x7F,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xBF
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x0F,0xE0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC0
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC1
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xC2
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x0F,0xE0,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xC3
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC4
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFF,0x0F,0xFF,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xC5
|
||||
.db 0x00,0x00,0x00,0x00,0x70,0x03,0xD8,0x01,0x00,0x00,0xF8,0x03,0xFC,0x07,0x00,0x06,0xF8,0x07,0xFC,0x07,0x06,0x06,0x06,0x06,0xFE,0x07,0xFC,0x07,0x00,0x00,0x00,0x00, ; 0xC6
|
||||
.db 0x70,0x03,0xD8,0x01,0x00,0x00,0x60,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0x98,0x01,0x98,0x01,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0xC7
|
||||
.db 0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0xEC,0x0F,0xEC,0x0F,0x0C,0x00,0xFC,0x0F,0xFC,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC8
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x0F,0xFC,0x0F,0x0C,0x00,0xEC,0x0F,0xEC,0x0F,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00, ; 0xC9
|
||||
.db 0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0xEF,0x0F,0xEF,0x0F,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xCA
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0xEF,0x0F,0xEF,0x0F,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00, ; 0xCB
|
||||
.db 0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0xEC,0x0F,0xEC,0x0F,0x0C,0x00,0xEC,0x0F,0xEC,0x0F,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00, ; 0xCC
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xCD
|
||||
.db 0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0xEF,0x0F,0xEF,0x0F,0x00,0x00,0xEF,0x0F,0xEF,0x0F,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00,0x6C,0x00, ; 0xCE
|
||||
.db 0x00,0x00,0x06,0x06,0xF6,0x06,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF6,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xCF
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x00,0xF8,0x01,0x18,0x01,0x18,0x00,0x38,0x00,0x70,0x00,0xE0,0x00,0xF0,0x01,0x98,0x01,0x98,0x01,0xF8,0x01,0xF0,0x00,0x00,0x00,0x00,0x00, ; 0xD0
|
||||
.db 0xFC,0x00,0xFC,0x01,0x8C,0x03,0x0C,0x03,0x0C,0x06,0x0C,0x06,0x1E,0x06,0x1E,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x03,0x8C,0x03,0xFC,0x01,0xFC,0x00,0x00,0x00,0x00,0x00, ; 0xD1
|
||||
.db 0x60,0x00,0xF0,0x00,0x98,0x01,0xFE,0x07,0xFE,0x07,0x06,0x00,0x06,0x00,0xFE,0x01,0xFE,0x01,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00, ; 0xD2
|
||||
.db 0x98,0x01,0x98,0x01,0x00,0x00,0xFE,0x07,0xFE,0x07,0x06,0x00,0x06,0x00,0xFE,0x01,0xFE,0x01,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00, ; 0xD3
|
||||
.db 0x18,0x00,0x30,0x00,0x60,0x00,0xFE,0x07,0xFE,0x07,0x06,0x00,0x06,0x00,0xFE,0x01,0xFE,0x01,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00, ; 0xD4
|
||||
.db 0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD5
|
||||
.db 0x80,0x01,0xC0,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xD6
|
||||
.db 0x60,0x00,0xF0,0x00,0x98,0x01,0xF8,0x01,0xF8,0x01,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xD7
|
||||
.db 0x98,0x01,0x98,0x01,0x00,0x00,0xF8,0x01,0xF8,0x01,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xD8
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x7F,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD9
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x0F,0xE0,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xDA
|
||||
.db 0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F, ; 0xDB
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F, ; 0xDC
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0xDD
|
||||
.db 0x18,0x00,0x30,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xDE
|
||||
.db 0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xDF
|
||||
.db 0x80,0x01,0xC0,0x00,0x60,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xE0
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x98,0x01,0x0C,0x03,0x0C,0x03,0xFC,0x01,0x8C,0x03,0x0C,0x03,0x0C,0x03,0x8C,0x03,0xFC,0x01,0x0C,0x00,0x0C,0x00, ; 0xE1
|
||||
.db 0x60,0x00,0xF0,0x00,0x98,0x01,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xE2
|
||||
.db 0x18,0x00,0x30,0x00,0x60,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xE3
|
||||
.db 0x00,0x00,0x00,0x00,0xB8,0x01,0xEC,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xE4
|
||||
.db 0x70,0x03,0xD8,0x01,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xE5
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFE,0x03,0x7E,0x03,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00, ; 0xE6
|
||||
.db 0x00,0x00,0x00,0x00,0x3C,0x00,0x3C,0x00,0x18,0x00,0xF8,0x01,0xF8,0x03,0x18,0x03,0x18,0x03,0xF8,0x03,0xF8,0x01,0x18,0x00,0x3C,0x00,0x3C,0x00,0x00,0x00,0x00,0x00, ; 0xE7
|
||||
.db 0x3C,0x00,0x3C,0x00,0x18,0x00,0xF8,0x01,0xF8,0x03,0x18,0x03,0x18,0x03,0x18,0x03,0x18,0x03,0xF8,0x03,0xF8,0x01,0x18,0x00,0x3C,0x00,0x3C,0x00,0x00,0x00,0x00,0x00, ; 0xE8
|
||||
.db 0x80,0x01,0xC0,0x00,0x60,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xE9
|
||||
.db 0x60,0x00,0xF0,0x00,0x98,0x01,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xEA
|
||||
.db 0x18,0x00,0x30,0x00,0x60,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0xEB
|
||||
.db 0x00,0x00,0x00,0x00,0x80,0x01,0xC0,0x00,0x60,0x00,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00, ; 0xEC
|
||||
.db 0x80,0x01,0xC0,0x00,0x60,0x00,0x06,0x06,0x0C,0x03,0x98,0x01,0xF0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0xED
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x01,0xE0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xEE
|
||||
.db 0xC0,0x00,0x60,0x00,0x30,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, ; 0xEF
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF0
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x60,0x00,0x60,0x00,0x00,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF1
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF2
|
||||
.db 0x00,0x00,0x00,0x00,0x0E,0x00,0x18,0x00,0x0C,0x03,0x98,0x01,0xCE,0x00,0x60,0x00,0xB0,0x06,0xD8,0x06,0xCC,0x07,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF3
|
||||
.db 0x00,0x00,0xF8,0x07,0x6C,0x03,0x66,0x03,0x66,0x03,0x66,0x03,0x6C,0x03,0x78,0x03,0x60,0x03,0x60,0x03,0x60,0x03,0x60,0x03,0x60,0x03,0x60,0x03,0x00,0x00,0x00,0x00, ; 0xF4
|
||||
.db 0x00,0x00,0xF8,0x01,0x0C,0x03,0x0C,0x00,0x0C,0x00,0xF8,0x01,0x0C,0x03,0x0C,0x03,0xF8,0x01,0x00,0x03,0x00,0x03,0x0C,0x03,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF5
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF6
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC8,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF7
|
||||
.db 0xF0,0x00,0xF8,0x01,0x98,0x01,0x98,0x01,0xF8,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF8
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x01,0x9C,0x03,0x9C,0x03,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF9
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0xE0,0x00,0xE0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xFA
|
||||
.db 0x18,0x00,0x1C,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xFB
|
||||
.db 0x3C,0x00,0x60,0x00,0x38,0x00,0x60,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xFC
|
||||
.db 0x3C,0x00,0x60,0x00,0x38,0x00,0x0C,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xFD
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xFE
|
||||
.db 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 ; 0xFF
|
||||
|
||||
@@ -1,258 +0,0 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; This is a font from the project LCD_fonts at
|
||||
; https://github.com/basti79/LCD-fonts.git
|
||||
; which in turn is based on a post by Benedikt K. in a forum post on
|
||||
; https://www.mikrocontroller.net/topic/54860
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
|
||||
font5_12x20:
|
||||
; header
|
||||
.dw font12x20MonoHandlerFn ; handlerFn
|
||||
.dw 480 ; needed buffer size
|
||||
.db 12, 20 ; width, height of chars
|
||||
.db 32, 224 ; first char, num of chars in font
|
||||
; data (16x20_horizontal_LSB_2)
|
||||
.db 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, ; 0x20
|
||||
.db 0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x21
|
||||
.db 0x00,0x00,0x8C,0x01,0x8C,0x01,0x8C,0x01,0x8C,0x01,0x8C,0x01,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, ; 0x22
|
||||
.db 0x00,0x00,0x00,0x00,0x20,0x02,0x20,0x02,0x10,0x01,0x10,0x01,0x10,0x01,0xFE,0x0F,0x88,0x00,0x88,0x00,0x88,0x00,0xFE,0x07,0x44,0x00,0x44,0x00,0x22,0x00,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x23
|
||||
.db 0x00,0x00,0x40,0x00,0xF0,0x01,0xF8,0x03,0x4C,0x02,0x4C,0x00,0x4C,0x00,0x78,0x00,0x70,0x00,0xC0,0x01,0xC0,0x01,0x40,0x03,0x40,0x03,0x44,0x03,0xFC,0x01,0xF8,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x24
|
||||
.db 0x00,0x00,0x00,0x00,0x1E,0x08,0x33,0x04,0x33,0x02,0x33,0x01,0xB3,0x00,0xB3,0x00,0x5E,0x00,0xA0,0x07,0xD0,0x0C,0xD0,0x0C,0xC8,0x0C,0xC4,0x0C,0xC2,0x0C,0x81,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x25
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x00,0xF8,0x01,0x98,0x01,0x98,0x01,0xD8,0x00,0x70,0x00,0x3C,0x00,0x66,0x0C,0xE3,0x0C,0xC3,0x0C,0x83,0x07,0x87,0x07,0xFE,0x07,0xFC,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x26
|
||||
.db 0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,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, ; 0x27
|
||||
.db 0x00,0x00,0x00,0x03,0xC0,0x03,0xE0,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x60,0x00,0xE0,0x00,0xC0,0x03,0x00,0x03,0x00,0x00, ; 0x28
|
||||
.db 0x00,0x00,0x0C,0x00,0x3C,0x00,0x70,0x00,0x60,0x00,0xC0,0x00,0xC0,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x70,0x00,0x3C,0x00,0x0C,0x00,0x00,0x00, ; 0x29
|
||||
.db 0x00,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x36,0x03,0xCE,0x03,0x00,0x00,0xD8,0x00,0x9C,0x01,0x88,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFE,0x07,0xFE,0x07,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2B
|
||||
.db 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,0x70,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x00,0x00, ; 0x2C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2D
|
||||
.db 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,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2E
|
||||
.db 0x00,0x00,0x00,0x06,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0x06,0x00,0x00,0x00, ; 0x2F
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x00,0xF8,0x01,0x0C,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0xF8,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x30
|
||||
.db 0x00,0x00,0x00,0x00,0x60,0x00,0x7C,0x00,0x66,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x31
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x00,0xFC,0x01,0x84,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x32
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x00,0xFC,0x03,0x04,0x03,0x00,0x03,0x80,0x01,0xF8,0x00,0xF8,0x00,0x80,0x01,0x00,0x03,0x00,0x03,0x00,0x03,0x84,0x03,0xFC,0x01,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x33
|
||||
.db 0x00,0x00,0x00,0x00,0x80,0x01,0xC0,0x01,0xE0,0x01,0xA0,0x01,0x90,0x01,0x98,0x01,0x8C,0x01,0x84,0x01,0xFE,0x07,0xFE,0x07,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x34
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x03,0xF8,0x03,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0xF8,0x00,0xF8,0x01,0x80,0x03,0x00,0x03,0x00,0x03,0x80,0x03,0xF8,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x35
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x00,0xF8,0x01,0x1C,0x01,0x0C,0x00,0x06,0x00,0xE6,0x00,0xF6,0x01,0x8E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8C,0x03,0xFC,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x36
|
||||
.db 0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x00,0x06,0x00,0x03,0x00,0x01,0x80,0x01,0xC0,0x00,0x40,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x37
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x01,0x8C,0x01,0x8C,0x01,0x9C,0x01,0xF8,0x00,0x70,0x00,0xEC,0x01,0x86,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x38
|
||||
.db 0x00,0x00,0x00,0x00,0x78,0x00,0xFC,0x01,0x8E,0x01,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0x7C,0x03,0x38,0x03,0x00,0x03,0x80,0x01,0xC4,0x01,0xFC,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x39
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x00,0x00, ; 0x3B
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x07,0xC0,0x03,0xE0,0x00,0x38,0x00,0x0E,0x00,0x38,0x00,0xE0,0x00,0xC0,0x03,0x00,0x07,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x0E,0x00,0x3C,0x00,0x70,0x00,0xC0,0x01,0x00,0x07,0xC0,0x01,0x70,0x00,0x3C,0x00,0x0E,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3E
|
||||
.db 0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x03,0x82,0x03,0x00,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3F
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x01,0x18,0x03,0x0C,0x06,0xC6,0x07,0x63,0x06,0x33,0x06,0x33,0x06,0x33,0x07,0x33,0x07,0xF3,0x06,0x66,0x0E,0x06,0x00,0x0C,0x00,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x40
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xD0,0x00,0x98,0x01,0x98,0x01,0x8C,0x03,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x41
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x01,0x86,0x01,0x86,0x01,0xC6,0x00,0x7E,0x00,0xFE,0x00,0x86,0x01,0x06,0x03,0x06,0x03,0x06,0x03,0xFE,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x42
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x07,0x1C,0x04,0x0C,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0x3C,0x04,0xF8,0x07,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x43
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x01,0x86,0x03,0x06,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x03,0x86,0x03,0xFE,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x44
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x45
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x46
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x07,0x1C,0x04,0x0C,0x00,0x06,0x00,0x06,0x00,0x86,0x07,0x86,0x07,0x06,0x06,0x0C,0x06,0x1C,0x06,0xF8,0x07,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x47
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0xFE,0x03,0xFE,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x48
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x01,0xFE,0x01,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xFE,0x01,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x49
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xF8,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xC0,0x01,0xFC,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x07,0x86,0x03,0xC6,0x01,0xE6,0x00,0x66,0x00,0x36,0x00,0x3E,0x00,0x76,0x00,0xE6,0x00,0xC6,0x01,0x86,0x03,0x06,0x07,0x06,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4B
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x8F,0x07,0x8B,0x06,0x8B,0x06,0xDB,0x06,0x53,0x06,0x53,0x06,0x73,0x06,0x23,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x06,0x0E,0x06,0x1E,0x06,0x1E,0x06,0x36,0x06,0x76,0x06,0x66,0x06,0xE6,0x06,0xC6,0x06,0x86,0x07,0x86,0x07,0x06,0x07,0x06,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xFC,0x01,0x8E,0x03,0x07,0x07,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x07,0x07,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4F
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0xFC,0x03,0x0C,0x07,0x0C,0x06,0x0C,0x06,0x0C,0x07,0xFC,0x03,0xFC,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x50
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xFC,0x01,0x8E,0x03,0x07,0x07,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x06,0x03,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x80,0x03,0x00,0x0F,0x00,0x04,0x00,0x00, ; 0x51
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0xFE,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0xC6,0x01,0xFE,0x00,0x7E,0x00,0xE6,0x00,0xC6,0x01,0x86,0x03,0x06,0x07,0x06,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x52
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xFC,0x01,0x06,0x01,0x06,0x00,0x0E,0x00,0x3C,0x00,0xF8,0x00,0xC0,0x03,0x00,0x03,0x00,0x03,0x86,0x03,0xFE,0x01,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x53
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x54
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x55
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0C,0x06,0x06,0x06,0x06,0x0E,0x06,0x0C,0x03,0x0C,0x03,0x1C,0x03,0x98,0x01,0xB8,0x01,0xB0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x56
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x03,0x0C,0x03,0x0C,0x62,0x04,0x62,0x04,0xE2,0x06,0xF6,0x06,0x96,0x06,0x96,0x06,0x96,0x03,0x9C,0x03,0x9C,0x03,0x0C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x57
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0E,0x0E,0x06,0x0C,0x03,0x98,0x01,0xF8,0x00,0xF0,0x00,0x60,0x00,0xF0,0x00,0xD8,0x01,0x98,0x01,0x0C,0x03,0x06,0x07,0x03,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x58
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0C,0x06,0x06,0x0C,0x03,0x1C,0x03,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x59
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x06,0x00,0x03,0x80,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x5A
|
||||
.db 0x00,0x00,0xF0,0x03,0xF0,0x03,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xF0,0x03,0xF0,0x03,0x00,0x00, ; 0x5B
|
||||
.db 0x00,0x00,0x06,0x00,0x0C,0x00,0x0C,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x60,0x00,0x60,0x00,0xC0,0x00,0xC0,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x03,0x00,0x03,0x00,0x06,0x00,0x00, ; 0x5C
|
||||
.db 0x00,0x00,0xFC,0x00,0xFC,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xFC,0x00,0xFC,0x00,0x00,0x00, ; 0x5D
|
||||
.db 0x00,0x00,0x00,0x00,0x40,0x00,0x40,0x00,0xE0,0x00,0xA0,0x00,0xB0,0x00,0xB0,0x01,0x18,0x01,0x18,0x03,0x0C,0x03,0x0C,0x02,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x5E
|
||||
.db 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,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0x00,0x00, ; 0x5F
|
||||
.db 0x60,0x00,0xC0,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, ; 0x60
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x04,0x03,0x00,0x03,0x00,0x03,0xF8,0x03,0x0C,0x03,0x06,0x03,0x86,0x03,0xFE,0x0F,0x7C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x61
|
||||
.db 0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xE6,0x00,0xF6,0x01,0x9E,0x03,0x0E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x01,0xFE,0x01,0xF6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x62
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xFC,0x03,0x1C,0x02,0x0E,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0E,0x00,0x1C,0x00,0xFC,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x63
|
||||
.db 0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x78,0x03,0xFC,0x03,0x8C,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x03,0x38,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x64
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x01,0x8C,0x03,0x06,0x03,0xFE,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x0C,0x02,0xFC,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x65
|
||||
.db 0x00,0x00,0xE0,0x07,0xF0,0x07,0x30,0x00,0x30,0x00,0xFE,0x07,0xFE,0x07,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x66
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x03,0xFC,0x03,0x8C,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x03,0x78,0x03,0x00,0x03,0x84,0x03,0xFC,0x01,0xF8,0x00, ; 0x67
|
||||
.db 0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xE6,0x01,0xF6,0x03,0x1E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x68
|
||||
.db 0x00,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFC,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x69
|
||||
.db 0x00,0x00,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0xF8,0x01,0xF8,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xC0,0x01,0xFC,0x00,0x7C,0x00, ; 0x6A
|
||||
.db 0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x07,0x8C,0x03,0xCC,0x01,0xEC,0x00,0x6C,0x00,0x7C,0x00,0xEC,0x00,0xCC,0x01,0x8C,0x03,0x0C,0x07,0x0C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6B
|
||||
.db 0x00,0x00,0xFC,0x00,0xFC,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9B,0x03,0xFF,0x07,0x77,0x06,0x33,0x06,0x33,0x06,0x33,0x06,0x33,0x06,0x33,0x06,0x33,0x06,0x33,0x06,0x33,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE6,0x01,0xF6,0x03,0x1E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6F
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF6,0x00,0xFE,0x01,0x8E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x01,0xFE,0x01,0xF6,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00, ; 0x70
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x03,0xFC,0x03,0x8C,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0x7C,0x03,0x38,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03, ; 0x71
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0x03,0xEC,0x03,0x3C,0x02,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x72
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x01,0x0C,0x00,0x0C,0x00,0x3C,0x00,0xF0,0x01,0x80,0x03,0x00,0x03,0x04,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x73
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0xFE,0x07,0xFE,0x07,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xF0,0x07,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x74
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0xC6,0x03,0x7E,0x03,0x3C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x75
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x0C,0x02,0x0C,0x03,0x0C,0x03,0x18,0x01,0x98,0x01,0x98,0x01,0xB0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x76
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x63,0x0C,0x63,0x0C,0xE2,0x04,0xF6,0x04,0x96,0x04,0x96,0x06,0x96,0x07,0x9C,0x03,0x0C,0x03,0x0C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x77
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x07,0x0C,0x03,0x98,0x01,0xB8,0x00,0xF0,0x00,0x60,0x00,0xF0,0x00,0xD8,0x01,0x98,0x01,0x0C,0x03,0x06,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x78
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x0C,0x02,0x0C,0x03,0x1C,0x03,0x98,0x01,0x98,0x01,0xB0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x3C,0x00,0x1C,0x00, ; 0x79
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0xFE,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0xFE,0x03,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7A
|
||||
.db 0x00,0x00,0xC0,0x03,0xE0,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x3C,0x00,0x3C,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x03,0xC0,0x03,0x00,0x00, ; 0x7B
|
||||
.db 0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00, ; 0x7C
|
||||
.db 0x00,0x00,0x3C,0x00,0x7C,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xC0,0x03,0xC0,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x7C,0x00,0x3C,0x00,0x00,0x00, ; 0x7D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x04,0xFE,0x07,0xC2,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7F
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x07,0x1C,0x04,0x0C,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0x3C,0x04,0xF8,0x07,0xE0,0x03,0x40,0x00,0xE0,0x00,0x80,0x01,0xE0,0x00, ; 0x80
|
||||
.db 0x00,0x00,0x98,0x01,0x98,0x01,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0xC6,0x03,0x7E,0x03,0x3C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x81
|
||||
.db 0x80,0x01,0xC0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x01,0x8C,0x03,0x06,0x03,0xFE,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x0C,0x02,0xFC,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x82
|
||||
.db 0xE0,0x00,0xB0,0x01,0x18,0x03,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x04,0x03,0x00,0x03,0x00,0x03,0xF8,0x03,0x0C,0x03,0x06,0x03,0x86,0x03,0xFE,0x0F,0x7C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x83
|
||||
.db 0x00,0x00,0x98,0x01,0x98,0x01,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x04,0x03,0x00,0x03,0x00,0x03,0xF8,0x03,0x0C,0x03,0x06,0x03,0x86,0x03,0xFE,0x0F,0x7C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x84
|
||||
.db 0x18,0x00,0x30,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x04,0x03,0x00,0x03,0x00,0x03,0xF8,0x03,0x0C,0x03,0x06,0x03,0x86,0x03,0xFE,0x0F,0x7C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x85
|
||||
.db 0x90,0x00,0x90,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x04,0x03,0x00,0x03,0x00,0x03,0xF8,0x03,0x0C,0x03,0x06,0x03,0x86,0x03,0xFE,0x0F,0x7C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x86
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xFC,0x03,0x1C,0x02,0x0E,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0E,0x00,0x1C,0x00,0xFC,0x03,0xF0,0x01,0x20,0x00,0x70,0x00,0xC0,0x00,0x70,0x00, ; 0x87
|
||||
.db 0xE0,0x00,0xB0,0x01,0x18,0x03,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x01,0x8C,0x03,0x06,0x03,0xFE,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x0C,0x02,0xFC,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x88
|
||||
.db 0x00,0x00,0x30,0x03,0x30,0x03,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x01,0x8C,0x03,0x06,0x03,0xFE,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x0C,0x02,0xFC,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x89
|
||||
.db 0x30,0x00,0x60,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x01,0x8C,0x03,0x06,0x03,0xFE,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x0C,0x02,0xFC,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x8A
|
||||
.db 0x00,0x00,0x98,0x01,0x98,0x01,0x00,0x00,0x00,0x00,0xFC,0x00,0xFC,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x8B
|
||||
.db 0xC0,0x01,0x60,0x03,0x30,0x06,0x00,0x00,0x00,0x00,0xFC,0x00,0xFC,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x8C
|
||||
.db 0x30,0x00,0x60,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFC,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x8D
|
||||
.db 0x8C,0x01,0x8C,0x01,0x00,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xD0,0x00,0x98,0x01,0x98,0x01,0x8C,0x03,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x8E
|
||||
.db 0x60,0x00,0x90,0x00,0xF0,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xD0,0x00,0x98,0x01,0x98,0x01,0x8C,0x03,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x8F
|
||||
.db 0xC0,0x00,0x60,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x90
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBE,0x03,0xFE,0x07,0xE0,0x0C,0x60,0x0C,0x60,0x0C,0xFC,0x0F,0xE6,0x0F,0x63,0x00,0x63,0x00,0xFF,0x0F,0x9E,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x91
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x0F,0xE0,0x0F,0xE0,0x00,0xF0,0x00,0xD0,0x00,0xD8,0x07,0xC8,0x07,0xCC,0x00,0xFC,0x00,0xFC,0x00,0xC6,0x00,0xC2,0x0F,0xC3,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x92
|
||||
.db 0xE0,0x00,0xB0,0x01,0x18,0x03,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x93
|
||||
.db 0x00,0x00,0x98,0x01,0x98,0x01,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x94
|
||||
.db 0x18,0x00,0x30,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x95
|
||||
.db 0xE0,0x00,0xB0,0x01,0x18,0x03,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0xC6,0x03,0x7E,0x03,0x3C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x96
|
||||
.db 0x18,0x00,0x30,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0xC6,0x03,0x7E,0x03,0x3C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x97
|
||||
.db 0x00,0x00,0x98,0x01,0x98,0x01,0x00,0x00,0x00,0x00,0x06,0x06,0x0C,0x02,0x0C,0x03,0x1C,0x03,0x98,0x01,0x98,0x01,0xB0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x3C,0x00,0x1C,0x00, ; 0x98
|
||||
.db 0x8C,0x01,0x8C,0x01,0x00,0x00,0xF8,0x00,0xFC,0x01,0x8E,0x03,0x07,0x07,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x07,0x07,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x99
|
||||
.db 0x8C,0x01,0x8C,0x01,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x9A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x06,0xFC,0x03,0x0C,0x03,0x86,0x07,0xC6,0x06,0x66,0x06,0x36,0x06,0x1E,0x06,0x0C,0x03,0xFC,0x03,0xF6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x9B
|
||||
.db 0x00,0x00,0x00,0x00,0xE0,0x03,0xF0,0x03,0x30,0x00,0x30,0x00,0x30,0x00,0xFC,0x00,0xFC,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x9C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x06,0xFC,0x03,0x8E,0x03,0x87,0x03,0xC3,0x06,0x43,0x06,0x23,0x06,0x13,0x06,0x1B,0x06,0x0E,0x07,0x8E,0x03,0xFE,0x01,0xFB,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x9D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x07,0x07,0x8E,0x03,0xDC,0x01,0xF8,0x00,0x70,0x00,0xF8,0x00,0xDC,0x01,0x8E,0x03,0x07,0x07,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x9E
|
||||
.db 0xC0,0x07,0xE0,0x07,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x03,0xF8,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x7E,0x00,0x3E,0x00, ; 0x9F
|
||||
.db 0x80,0x01,0xC0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x04,0x03,0x00,0x03,0x00,0x03,0xF8,0x03,0x0C,0x03,0x06,0x03,0x86,0x03,0xFE,0x0F,0x7C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA0
|
||||
.db 0x80,0x01,0xC0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFC,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA1
|
||||
.db 0x80,0x01,0xC0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA2
|
||||
.db 0x80,0x01,0xC0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0xC6,0x03,0x7E,0x03,0x3C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA3
|
||||
.db 0x00,0x00,0x70,0x02,0xC8,0x01,0x00,0x00,0x00,0x00,0xE6,0x01,0xF6,0x03,0x1E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA4
|
||||
.db 0x70,0x02,0xC8,0x01,0x00,0x00,0x0E,0x06,0x0E,0x06,0x1E,0x06,0x1E,0x06,0x36,0x06,0x76,0x06,0x66,0x06,0xE6,0x06,0xC6,0x06,0x86,0x07,0x86,0x07,0x06,0x07,0x06,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA5
|
||||
.db 0x00,0x00,0x00,0x00,0xFC,0x00,0x84,0x01,0x80,0x01,0xF8,0x01,0x8C,0x01,0x8C,0x01,0xF8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA6
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x00,0x98,0x01,0x0C,0x03,0x0C,0x03,0x0C,0x03,0x98,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA7
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x06,0x00,0x0E,0x02,0xFC,0x03,0xF8,0x03, ; 0xA8
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x00,0x8C,0x01,0x76,0x03,0x52,0x02,0x72,0x02,0x32,0x02,0x56,0x03,0x8C,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xA9
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x07,0xFF,0x07,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAA
|
||||
.db 0x00,0x00,0x00,0x00,0x07,0x03,0x86,0x01,0x86,0x01,0xC6,0x00,0x66,0x00,0x66,0x00,0xB6,0x07,0x30,0x0C,0x18,0x0C,0x18,0x0C,0x0C,0x06,0x06,0x03,0x86,0x01,0x83,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAB
|
||||
.db 0x00,0x00,0x00,0x00,0x07,0x03,0x86,0x01,0x86,0x01,0xC6,0x00,0x66,0x00,0x66,0x00,0x36,0x06,0x30,0x07,0x98,0x06,0x58,0x06,0x2C,0x06,0xE6,0x0F,0x06,0x06,0x03,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAC
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xAD
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x06,0x18,0x03,0x8C,0x01,0xC6,0x00,0x63,0x00,0xC6,0x00,0x8C,0x01,0x18,0x03,0x30,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAE
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x00,0xC6,0x00,0x8C,0x01,0x18,0x03,0x30,0x06,0x18,0x03,0x8C,0x01,0xC6,0x00,0x63,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xAF
|
||||
.db 0x33,0x03,0x33,0x03,0x00,0x00,0x00,0x00,0x33,0x03,0x33,0x03,0x00,0x00,0x00,0x00,0x33,0x03,0x33,0x03,0x00,0x00,0x00,0x00,0x33,0x03,0x33,0x03,0x00,0x00,0x00,0x00,0x33,0x03,0x33,0x03,0x00,0x00,0x00,0x00, ; 0xB0
|
||||
.db 0xCC,0x0C,0xCC,0x0C,0x33,0x03,0x33,0x03,0xCC,0x0C,0xCC,0x0C,0x33,0x03,0x33,0x03,0xCC,0x0C,0xCC,0x0C,0x33,0x03,0x33,0x03,0xCC,0x0C,0xCC,0x0C,0x33,0x03,0x33,0x03,0xCC,0x0C,0xCC,0x0C,0x33,0x03,0x33,0x03, ; 0xB1
|
||||
.db 0xFF,0x0F,0xFF,0x0F,0x33,0x03,0x33,0x03,0xFF,0x0F,0xFF,0x0F,0x33,0x03,0x33,0x03,0xFF,0x0F,0xFF,0x0F,0x33,0x03,0x33,0x03,0xFF,0x0F,0xFF,0x0F,0x33,0x03,0x33,0x03,0xFF,0x0F,0xFF,0x0F,0x33,0x03,0x33,0x03, ; 0xB2
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xB3
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x7F,0x00,0x7F,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xB4
|
||||
.db 0xC0,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xD0,0x00,0x98,0x01,0x98,0x01,0x8C,0x03,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xB5
|
||||
.db 0x70,0x00,0x88,0x00,0x00,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xD0,0x00,0x98,0x01,0x98,0x01,0x8C,0x03,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xB6
|
||||
.db 0x30,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xD0,0x00,0x98,0x01,0x98,0x01,0x8C,0x03,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xB7
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x00,0x04,0x01,0x02,0x02,0xF3,0x06,0x09,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x09,0x04,0xF3,0x06,0x02,0x02,0x04,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xB8
|
||||
.db 0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xBF,0x01,0xBF,0x01,0x80,0x01,0xBF,0x01,0xBF,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01, ; 0xB9
|
||||
.db 0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01, ; 0xBA
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x01,0xFF,0x01,0x80,0x01,0xBF,0x01,0xBF,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01, ; 0xBB
|
||||
.db 0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xBF,0x01,0xBF,0x01,0x80,0x01,0xFF,0x01,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xBC
|
||||
.db 0x00,0x00,0x00,0x00,0x40,0x00,0x40,0x00,0xF0,0x03,0xF8,0x03,0x5C,0x02,0x4C,0x00,0x4C,0x00,0x4C,0x00,0x4C,0x00,0x5C,0x00,0xF8,0x03,0xF0,0x01,0x40,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xBD
|
||||
.db 0x00,0x00,0x00,0x00,0x07,0x0C,0x0E,0x06,0x0C,0x03,0x1C,0x03,0xB8,0x01,0xF0,0x00,0x60,0x00,0xFC,0x03,0x60,0x00,0x60,0x00,0xFC,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xBE
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x7F,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xBF
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x0F,0xE0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC0
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC1
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xC2
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x0F,0xE0,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xC3
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC4
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFF,0x0F,0xFF,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xC5
|
||||
.db 0x00,0x00,0x70,0x02,0xC8,0x01,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x04,0x03,0x00,0x03,0x00,0x03,0xF8,0x03,0x0C,0x03,0x06,0x03,0x86,0x03,0xFE,0x0F,0x7C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC6
|
||||
.db 0x70,0x02,0xC8,0x01,0x00,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xD0,0x00,0x98,0x01,0x98,0x01,0x8C,0x03,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC7
|
||||
.db 0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x0F,0xB0,0x0F,0x30,0x00,0xF0,0x0F,0xF0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xC8
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x0F,0xF0,0x0F,0x30,0x00,0xB0,0x0F,0xB0,0x0F,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01, ; 0xC9
|
||||
.db 0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xBF,0x0F,0xBF,0x0F,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xCA
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0xBF,0x0F,0xBF,0x0F,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01, ; 0xCB
|
||||
.db 0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x0F,0xB0,0x0F,0x30,0x00,0xB0,0x0F,0xB0,0x0F,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01, ; 0xCC
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xCD
|
||||
.db 0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xBF,0x0F,0xBF,0x0F,0x00,0x00,0xBF,0x0F,0xBF,0x0F,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01,0xB0,0x01, ; 0xCE
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x04,0xF4,0x02,0xFC,0x03,0x9C,0x03,0x0C,0x03,0x0C,0x03,0x9C,0x03,0xFC,0x03,0xF4,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xCF
|
||||
.db 0x00,0x00,0xDE,0x00,0x7E,0x00,0xF0,0x00,0xC8,0x01,0xF0,0x03,0xFC,0x03,0x0C,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD0
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x01,0x86,0x03,0x06,0x07,0x06,0x06,0x1F,0x06,0x1F,0x06,0x06,0x06,0x06,0x06,0x06,0x03,0x86,0x03,0xFE,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD1
|
||||
.db 0xE0,0x00,0x10,0x01,0x00,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD2
|
||||
.db 0x18,0x03,0x18,0x03,0x00,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD3
|
||||
.db 0x60,0x00,0xC0,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD4
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFC,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD5
|
||||
.db 0xC0,0x00,0x60,0x00,0x00,0x00,0xFE,0x01,0xFE,0x01,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xFE,0x01,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD6
|
||||
.db 0x70,0x00,0x88,0x00,0x00,0x00,0xFE,0x01,0xFE,0x01,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xFE,0x01,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD7
|
||||
.db 0x8C,0x01,0x8C,0x01,0x00,0x00,0xFE,0x01,0xFE,0x01,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xFE,0x01,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD8
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x7F,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xD9
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x0F,0xE0,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, ; 0xDA
|
||||
.db 0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F, ; 0xDB
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F, ; 0xDC
|
||||
.db 0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00, ; 0xDD
|
||||
.db 0x30,0x00,0x60,0x00,0x00,0x00,0xFE,0x01,0xFE,0x01,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xFE,0x01,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xDE
|
||||
.db 0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xDF
|
||||
.db 0xC0,0x00,0x60,0x00,0x00,0x00,0xF8,0x00,0xFC,0x01,0x8E,0x03,0x07,0x07,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x07,0x07,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE0
|
||||
.db 0x00,0x00,0xFC,0x00,0xFE,0x01,0x86,0x01,0x86,0x01,0xC6,0x00,0xC6,0x00,0x66,0x00,0xE6,0x00,0xC6,0x01,0x86,0x03,0x06,0x07,0x06,0x06,0x26,0x06,0xE6,0x07,0xC6,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE1
|
||||
.db 0x70,0x00,0x88,0x00,0x00,0x00,0xF8,0x00,0xFC,0x01,0x8E,0x03,0x07,0x07,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x07,0x07,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE2
|
||||
.db 0x30,0x00,0x60,0x00,0x00,0x00,0xF8,0x00,0xFC,0x01,0x8E,0x03,0x07,0x07,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x07,0x07,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE3
|
||||
.db 0x00,0x00,0x70,0x02,0xC8,0x01,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE4
|
||||
.db 0x70,0x02,0xC8,0x01,0x00,0x00,0xF8,0x00,0xFC,0x01,0x8E,0x03,0x07,0x07,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x07,0x07,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE5
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFE,0x03,0x76,0x03,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00, ; 0xE6
|
||||
.db 0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xE6,0x00,0xF6,0x01,0x8E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x01,0xFE,0x01,0xF6,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00, ; 0xE7
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x00,0xFE,0x01,0x86,0x03,0x06,0x03,0x06,0x03,0x86,0x03,0xFE,0x01,0x7E,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE8
|
||||
.db 0xC0,0x00,0x60,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xE9
|
||||
.db 0x70,0x00,0x88,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xEA
|
||||
.db 0x30,0x00,0x60,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xEB
|
||||
.db 0x80,0x01,0xC0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x0C,0x02,0x0C,0x03,0x1C,0x03,0x98,0x01,0x98,0x01,0xB0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x3C,0x00,0x1C,0x00, ; 0xEC
|
||||
.db 0xC0,0x00,0x60,0x00,0x00,0x00,0x07,0x0C,0x06,0x06,0x0C,0x03,0x1C,0x03,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xED
|
||||
.db 0xFF,0x0F,0xFF,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, ; 0xEE
|
||||
.db 0x60,0x00,0x30,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, ; 0xEF
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF0
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFE,0x07,0xFE,0x07,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF1
|
||||
.db 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,0xFF,0x0F,0x00,0x00,0xFF,0x0F,0x00,0x00, ; 0xF2
|
||||
.db 0x00,0x00,0x00,0x00,0x0F,0x0C,0x18,0x06,0x18,0x03,0x86,0x03,0x98,0x01,0xD8,0x00,0x6F,0x07,0x60,0x07,0xB0,0x06,0x58,0x06,0x3C,0x06,0xEC,0x0F,0x06,0x06,0x03,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF3
|
||||
.db 0x00,0x00,0x00,0x00,0xFC,0x03,0x3E,0x02,0x3E,0x02,0x3E,0x02,0x3E,0x02,0x3C,0x02,0x38,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x00,0x00, ; 0xF4
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x01,0xF8,0x01,0x0C,0x00,0x0C,0x00,0x1C,0x00,0xF0,0x00,0xC8,0x01,0x8C,0x03,0x0C,0x03,0x1C,0x03,0xF8,0x01,0xE0,0x01,0x80,0x03,0x00,0x03,0x04,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00, ; 0xF5
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xF6
|
||||
.db 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,0x20,0x00,0x70,0x00,0xC0,0x00,0x70,0x00, ; 0xF7
|
||||
.db 0x00,0x00,0x00,0x00,0x30,0x00,0x48,0x00,0x48,0x00,0x30,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, ; 0xF8
|
||||
.db 0x8C,0x01,0x8C,0x01,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, ; 0xF9
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xFA
|
||||
.db 0x00,0x00,0x00,0x00,0x78,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xFB
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x00,0x88,0x01,0x80,0x01,0xF0,0x00,0x80,0x01,0x80,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xFC
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x01,0x00,0x03,0x00,0x03,0x80,0x01,0x60,0x00,0x18,0x00,0xF8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xFD
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0xFE,0x07,0xFE,0x07,0xFE,0x07,0xFE,0x07,0xFE,0x07,0xFE,0x07,0xFE,0x07,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0xFE
|
||||
.db 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 ; 0xFF
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font8x8MonoHandlerFn
|
||||
;
|
||||
; Handler for 8x8 Mono Fonts
|
||||
;
|
||||
|
||||
font8x8MonoHandlerFn:
|
||||
cpi r23, FONT_FN_RENDER
|
||||
breq font8x8MonoRenderCharacter
|
||||
rjmp FONT_GenericHandler
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font8x8RenderCharacter
|
||||
|
||||
; @param R16 character to write
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param Z pointer to font
|
||||
; @param X pointer to RAM to store data to
|
||||
; @param r18 char width in pixel
|
||||
; @param r19 char height in pixel
|
||||
; @clobbers r17, r24, r25, x
|
||||
|
||||
font8x8MonoRenderCharacter:
|
||||
push zl
|
||||
push zh
|
||||
rcall font8x8GetCharPosInFont8x8 ; (r17, r24, r25, z)
|
||||
ldi r25, 8 ; 8 bytes
|
||||
font8x8MonoRenderCharacter_loop1:
|
||||
ldi r24, 8 ; 8 bits
|
||||
lpm r17, Z+
|
||||
font8x8MonoRenderCharacter_loop2:
|
||||
lsr r17
|
||||
brcs font8x8MonoRenderCharacter_writeForeground
|
||||
st X+, r0
|
||||
st X+, r1
|
||||
rjmp font8x8MonoRenderCharacter_loop2end
|
||||
font8x8MonoRenderCharacter_writeForeground:
|
||||
st X+, r2
|
||||
st X+, r3
|
||||
font8x8MonoRenderCharacter_loop2end:
|
||||
dec r24
|
||||
brne font8x8MonoRenderCharacter_loop2
|
||||
dec r25
|
||||
brne font8x8MonoRenderCharacter_loop1
|
||||
ldi r18, 8
|
||||
ldi r19, 8
|
||||
pop zh
|
||||
pop zl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font8x8GetCharPosInFont8x8
|
||||
|
||||
; @param R16 character to write
|
||||
; @param Z pointer to font
|
||||
; @return Z pointer to begin of char data
|
||||
; @clobbers r17, r24, r25, z
|
||||
|
||||
font8x8GetCharPosInFont8x8:
|
||||
mov r24, r16
|
||||
adiw zh:zl, FONT_OFFS_FIRSTCHAR
|
||||
lpm r24, Z+ ; first char num
|
||||
lpm r25, Z+ ; num of chars
|
||||
sub r16, r24
|
||||
brcs font8x8GetCharPosInFont8x8_ret
|
||||
cp r16, r25
|
||||
brcc font8x8GetCharPosInFont8x8_ret
|
||||
mov r24, r16
|
||||
clr r25
|
||||
lsl r24 ; x2
|
||||
rol r25
|
||||
lsl r24 ; x4
|
||||
rol r25
|
||||
lsl r24 ; x8
|
||||
rol r25
|
||||
add zl, r24
|
||||
adc zh, r25
|
||||
font8x8GetCharPosInFont8x8_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_FONT_MAIN_ASM
|
||||
#define AQH_AVR_FONT_MAIN_ASM
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
@@ -24,8 +27,8 @@
|
||||
; @param R3:R2 foreground color
|
||||
; @param Z pointer to font
|
||||
; @param X pointer to RAM to store data to
|
||||
; @param r18 char width in pixel
|
||||
; @param r19 char height in pixel
|
||||
; @return r18 char width in pixel
|
||||
; @return r19 char height in pixel
|
||||
; @clobbers any, !Z
|
||||
|
||||
FONT_RenderChar:
|
||||
@@ -40,6 +43,7 @@ FONT_RenderChar:
|
||||
; @routine FONT_GetCharWidth
|
||||
|
||||
; @param Z pointer to font
|
||||
; @param R16 character for which to determine size
|
||||
; @return R16 character width for given character set
|
||||
; @clobbers any, !Z
|
||||
|
||||
@@ -65,11 +69,11 @@ FONT_GetCharHeight:
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine FONT_GetStringWidth
|
||||
; @routine FONT_GetStringWidthFlash
|
||||
|
||||
; @param Z pointer to font
|
||||
; @param X pointer to null-terminated string in flash
|
||||
; @return R16 character width for given character set
|
||||
; @param Z pointer to font
|
||||
; @param X pointer to null-terminated string in flash
|
||||
; @return R17:R16 character width for given character set (in pixel)
|
||||
; @clobbers any, !Z
|
||||
|
||||
FONT_GetStringWidthFlash:
|
||||
@@ -80,14 +84,14 @@ FONT_GetStringWidthFlash:
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine FONT_GetStringHeight
|
||||
; @routine FONT_GetStringHeightFlash
|
||||
|
||||
; @param Z pointer to font
|
||||
; @param X pointer to null-terminated string in flash
|
||||
; @return R16 character width for given character set
|
||||
; @clobbers any, !Z
|
||||
|
||||
FONT_GetStringHeight:
|
||||
FONT_GetStringHeightFlash:
|
||||
ldi r23, FONT_FN_GETSTRINGHEIGHT
|
||||
rjmp fontCallHandler
|
||||
; @end
|
||||
@@ -130,38 +134,47 @@ FONT_GenericHandler:
|
||||
cpi r23, FONT_FN_GETSTRINGHEIGHT
|
||||
breq fontGenericFnGetStringHeight
|
||||
ret
|
||||
|
||||
fontGenericFnGetCharWidth:
|
||||
adiw zh:zl, FONT_OFFS_WIDTH
|
||||
ld r16, X
|
||||
lpm r16, Z
|
||||
sbiw zh:zl, FONT_OFFS_WIDTH
|
||||
ret
|
||||
|
||||
fontGenericFnGetCharHeight:
|
||||
adiw zh:zl, FONT_OFFS_HEIGHT
|
||||
ld r16, X
|
||||
lpm r16, Z
|
||||
sbiw zh:zl, FONT_OFFS_HEIGHT
|
||||
ret
|
||||
|
||||
fontGenericFnGetStringWidth:
|
||||
clr r16 ; sum (LOW)
|
||||
clr r17 ; sum (HIGH)
|
||||
adiw zh:zl, FONT_OFFS_WIDTH
|
||||
ld r17, X
|
||||
lpm r19, Z
|
||||
sbiw zh:zl, FONT_OFFS_WIDTH
|
||||
clr r16
|
||||
push zl
|
||||
push zh
|
||||
mov zl, xl
|
||||
mov zh, xh
|
||||
fontGenericFnGetStringWidth_loop:
|
||||
lpm r18, Z+
|
||||
lpm r18, Z+ ; current byte in string
|
||||
tst r18
|
||||
breq fontGenericFnGetStringWidth_loopEnd
|
||||
add r16, r17
|
||||
add r16, r19 ; add char width to sum
|
||||
adc r17, r19
|
||||
sub r17, r19
|
||||
rjmp fontGenericFnGetStringWidth_loop
|
||||
fontGenericFnGetStringWidth_loopEnd:
|
||||
pop zh
|
||||
pop zl
|
||||
ret
|
||||
|
||||
fontGenericFnGetStringHeight:
|
||||
rjmp fontGenericFnGetCharHeight ; for now monospace fonts only
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_FONT_MAIN_ASM
|
||||
|
||||
|
||||
16
avr/modules/lcd2/gui/0BUILD
Normal file
16
avr/modules/lcd2/gui/0BUILD
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml?>
|
||||
|
||||
<gwbuild>
|
||||
|
||||
<extradist>
|
||||
defs.asm
|
||||
dialog.asm
|
||||
main.asm
|
||||
style.asm
|
||||
titlewindow.asm
|
||||
window.asm
|
||||
</extradist>
|
||||
|
||||
</gwbuild>
|
||||
|
||||
|
||||
262
avr/modules/lcd2/gui/button.asm
Normal file
262
avr/modules/lcd2/gui/button.asm
Normal file
@@ -0,0 +1,262 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_GUI_BUTTON_ASM
|
||||
#define AQH_AVR_GUI_BUTTON_ASM
|
||||
|
||||
|
||||
.equ BUTTON_STATE_DOWN_BIT = 0
|
||||
.equ BUTTON_STATE_ACTIVATED_BIT = 1
|
||||
|
||||
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Button_Draw_Up @global
|
||||
;
|
||||
; Draw button in state "UP".
|
||||
;
|
||||
; @param Y pointer to window in SDRAM
|
||||
; @param Z pointer to button data in FLASH (byte address for LPM)
|
||||
; @clobbers any, !Y
|
||||
|
||||
Button_Draw_Up:
|
||||
clr r14
|
||||
rjmp buttonDraw
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Button_Draw_Down @global
|
||||
;
|
||||
; Draw button in state "DOWN".
|
||||
;
|
||||
; @param Y pointer to window in SDRAM
|
||||
; @param Z pointer to button data in FLASH (byte address for LPM)
|
||||
; @clobbers any, !Y
|
||||
|
||||
Button_Draw_Down:
|
||||
ldi r16, 1
|
||||
mov r14, r16
|
||||
rjmp buttonDraw
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Button_HandleTouch @global
|
||||
;
|
||||
; @param r18 flags
|
||||
; @param r19 current state of button (bit 0: pressed, bit 1: activated)
|
||||
; @param r5:r4 x
|
||||
; @param r7:r6 Y
|
||||
; @param Z pointer to button data in FLASH
|
||||
; @return r19 new state of button (0=normal, 1=pressed)
|
||||
|
||||
Button_HandleTouch:
|
||||
cbr r19, (1<<BUTTON_STATE_ACTIVATED_BIT) ; clear activated bit
|
||||
; check for press change event
|
||||
mov r17, r18
|
||||
andi r17, (1<<DISPLAY_IFLAGS_CHGPRESS_BIT)
|
||||
breq Button_HandleTouch_ret
|
||||
; press changed
|
||||
mov r17, r18
|
||||
andi r17, (1<<DISPLAY_IFLAGS_PRESSED_BIT)
|
||||
breq Button_HandleTouch_up
|
||||
; touch came down
|
||||
push zl
|
||||
push zh
|
||||
push r19
|
||||
bigcall Window_IsPointInRect
|
||||
pop r19
|
||||
pop zh
|
||||
pop zl
|
||||
brcc Button_HandleTouch_ret
|
||||
tst r19
|
||||
brne Button_HandleTouch_ret ; already down, jmp
|
||||
sbr r19, (1<<BUTTON_STATE_DOWN_BIT) ; button now down
|
||||
push zl
|
||||
push zh
|
||||
push r19
|
||||
rcall Button_Draw_Down
|
||||
pop r19
|
||||
pop zh
|
||||
pop zl
|
||||
rjmp Button_HandleTouch_ret
|
||||
Button_HandleTouch_up:
|
||||
; touch came up
|
||||
tst r19
|
||||
breq Button_HandleTouch_ret ; already up, jmp
|
||||
cbr r19, (1<<BUTTON_STATE_DOWN_BIT)
|
||||
push zl
|
||||
push zh
|
||||
push r19
|
||||
rcall Button_Draw_Up
|
||||
pop r19
|
||||
pop zh
|
||||
pop zl
|
||||
push zl
|
||||
push zh
|
||||
push r19
|
||||
bigcall Window_IsPointInRect
|
||||
pop r19
|
||||
pop zh
|
||||
pop zl
|
||||
brcc Button_HandleTouch_ret
|
||||
; touch ended over button
|
||||
sbr r19, (1<<BUTTON_STATE_ACTIVATED_BIT) ; set activated bit
|
||||
Button_HandleTouch_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine buttonDraw
|
||||
;
|
||||
; @param Y pointer to window in SDRAM
|
||||
; @param Z pointer to button data in FLASH (byte address for LPM)
|
||||
; @param r14 0 if normal, 1 if pressed state
|
||||
; @clobbers any, !Y
|
||||
|
||||
buttonDraw:
|
||||
lpm r4, Z+ ; X
|
||||
lpm r5, Z+
|
||||
lpm r6, Z+ ; Y
|
||||
lpm r7, Z+
|
||||
lpm r8, Z+ ; W
|
||||
lpm r9, Z+
|
||||
lpm r10, Z+ ; H
|
||||
lpm r11, Z+
|
||||
lpm r12, Z+ ; text
|
||||
lpm r13, Z+
|
||||
|
||||
rcall buttonClearBackground
|
||||
rcall buttonDrawBorder
|
||||
rcall buttonDrawText
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine buttonClearBackground
|
||||
;
|
||||
; @param Y pointer to window in SDRAM
|
||||
; @param r5:r4 X
|
||||
; @param r7:r6 Y
|
||||
; @param r9:r8 W
|
||||
; @param r11:r10 H
|
||||
; @param r14 0 if normal, 1 if pressed state
|
||||
; @clobbers any, !Y, !Z
|
||||
|
||||
buttonClearBackground:
|
||||
tst r14
|
||||
brne buttonClearBackground_bgDown
|
||||
ldi r16, LOW(STYLE_BUTTON_COL_BG_NORM)
|
||||
mov r2, r16
|
||||
ldi r16, HIGH(STYLE_BUTTON_COL_BG_NORM)
|
||||
mov r3, r16
|
||||
rjmp buttonClearBackground_bgFill
|
||||
buttonClearBackground_bgDown:
|
||||
ldi r16, LOW(STYLE_BUTTON_COL_BG_PRESSED)
|
||||
mov r2, r16
|
||||
ldi r16, HIGH(STYLE_BUTTON_COL_BG_PRESSED)
|
||||
mov r3, r16
|
||||
buttonClearBackground_bgFill:
|
||||
bigcall Display_FillRect
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine buttonDrawBorder
|
||||
;
|
||||
; @param Y pointer to window in SDRAM
|
||||
; @param r5:r4 X
|
||||
; @param r7:r6 Y
|
||||
; @param r9:r8 W
|
||||
; @param r11:r10 H
|
||||
; @param r14 0 if normal, 1 if pressed state
|
||||
; @clobbers any, !Y, !Z
|
||||
|
||||
buttonDrawBorder:
|
||||
ldi r16, LOW(STYLE_BUTTON_COL_BORDER)
|
||||
mov r2, r16
|
||||
ldi r16, HIGH(STYLE_BUTTON_COL_BORDER)
|
||||
mov r3, r16
|
||||
bigcall Display_DrawRect
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine buttonDrawText
|
||||
;
|
||||
; @param Y pointer to window in SDRAM
|
||||
; @param r5:r4 X
|
||||
; @param r7:r6 Y
|
||||
; @param r9:r8 W
|
||||
; @param r11:r10 H
|
||||
; @param r13:r12 Text in FLASH
|
||||
; @param r14 0 if normal, 1 if pressed state
|
||||
; @clobbers any, !Y, !Z
|
||||
|
||||
buttonDrawText:
|
||||
ldi r16, 2
|
||||
clr r17
|
||||
add r4, r16 ; x+=2
|
||||
adc r5, r17
|
||||
add r6, r16 ; y+=2
|
||||
adc r7, r17
|
||||
|
||||
; set text colors
|
||||
tst r14
|
||||
brne buttonDrawText_down
|
||||
; set background color
|
||||
ldi r16, LOW(STYLE_BUTTON_COL_BG_NORM)
|
||||
mov r0, r16
|
||||
ldi r16, HIGH(STYLE_BUTTON_COL_BG_NORM)
|
||||
mov r1, r16
|
||||
; set foreground color
|
||||
ldi r16, LOW(STYLE_BUTTON_COL_FG_NORM)
|
||||
mov r2, r16
|
||||
ldi r16, HIGH(STYLE_BUTTON_COL_FG_NORM)
|
||||
mov r3, r16
|
||||
rjmp buttonDrawText_draw
|
||||
buttonDrawText_down:
|
||||
; set background color
|
||||
ldi r16, LOW(STYLE_BUTTON_COL_BG_PRESSED)
|
||||
mov r0, r16
|
||||
ldi r16, HIGH(STYLE_BUTTON_COL_BG_PRESSED)
|
||||
mov r1, r16
|
||||
|
||||
; set foreground color
|
||||
ldi r16, LOW(STYLE_BUTTON_COL_FG_PRESSED)
|
||||
mov r2, r16
|
||||
ldi r16, HIGH(STYLE_BUTTON_COL_FG_PRESSED)
|
||||
mov r3, r16
|
||||
buttonDrawText_draw:
|
||||
mov zl, r12
|
||||
mov zh, r13
|
||||
bigcall Window_DrawColorTextFlash
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -7,31 +7,46 @@
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_GUI_H
|
||||
#define AQH_AVR_GUI_H
|
||||
#ifndef AQH_AVR_GUI_DEFS_ASM
|
||||
#define AQH_AVR_GUI_DEFS_ASM
|
||||
|
||||
|
||||
.equ WINRECT_OFFS_X_LO = 0
|
||||
.equ WINRECT_OFFS_X_HI = 1
|
||||
.equ WINRECT_OFFS_Y_LO = 2
|
||||
.equ WINRECT_OFFS_Y_HI = 3
|
||||
.equ WINRECT_OFFS_WIDTH_LO = 4
|
||||
.equ WINRECT_OFFS_WIDTH_HI = 5
|
||||
.equ WINRECT_OFFS_HEIGHT_LO = 6
|
||||
.equ WINRECT_OFFS_HEIGHT_HI = 7
|
||||
.equ WINRECT_SIZE = 8
|
||||
|
||||
|
||||
|
||||
.equ SCR_OFFS_HANDLER_LO = 0
|
||||
.equ SCR_OFFS_HANDLER_HI = 1
|
||||
.equ SCR_OFFS_X_LO = 2
|
||||
.equ SCR_OFFS_X_HI = 3
|
||||
.equ SCR_OFFS_Y_LO = 4
|
||||
.equ SCR_OFFS_Y_HI = 5
|
||||
.equ SCR_OFFS_WIDTH_LO = 6
|
||||
.equ SCR_OFFS_WIDTH_HI = 7
|
||||
.equ SCR_OFFS_HEIGHT_LO = 8
|
||||
.equ SCR_OFFS_HEIGHT_HI = 9
|
||||
.equ SCR_OFFS_BG_COL_LO = 10
|
||||
.equ SCR_OFFS_BG_COL_HI = 11
|
||||
.equ SCR_OFFS_FG_COL_LO = 12
|
||||
.equ SCR_OFFS_FG_COL_HI = 13
|
||||
.equ SCR_OFFS_FONT_LO = 14
|
||||
.equ SCR_OFFS_FONT_HI = 15
|
||||
.equ SCR_SIZE = 16
|
||||
.equ WIN_OFFS_X_LO = 0
|
||||
.equ WIN_OFFS_X_HI = 1
|
||||
.equ WIN_OFFS_Y_LO = 2
|
||||
.equ WIN_OFFS_Y_HI = 3
|
||||
.equ WIN_OFFS_WIDTH_LO = 4
|
||||
.equ WIN_OFFS_WIDTH_HI = 5
|
||||
.equ WIN_OFFS_HEIGHT_LO = 6
|
||||
.equ WIN_OFFS_HEIGHT_HI = 7
|
||||
.equ WIN_OFFS_BG_COL_LO = 8
|
||||
.equ WIN_OFFS_BG_COL_HI = 9
|
||||
.equ WIN_OFFS_FG_COL_LO = 10
|
||||
.equ WIN_OFFS_FG_COL_HI = 11
|
||||
.equ WIN_OFFS_FONT_LO = 12 ;byte address!
|
||||
.equ WIN_OFFS_FONT_HI = 13
|
||||
.equ WIN_SIZE = 14
|
||||
|
||||
|
||||
|
||||
.equ WIN_EVENT_DESTROY = 1
|
||||
.equ WIN_EVENT_SHOW = 2
|
||||
.equ WIN_EVENT_HIDE = 3
|
||||
.equ WIN_EVENT_DRAW = 4
|
||||
.equ WIN_EVENT_TIMER = 5
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
314
avr/modules/lcd2/gui/dialog.asm
Normal file
314
avr/modules/lcd2/gui/dialog.asm
Normal file
@@ -0,0 +1,314 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQHOME_AVR_MODS_GUI_DIALOG_ASM
|
||||
#define AQHOME_AVR_MODS_GUI_DIALOG_ASM
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; defines
|
||||
|
||||
.equ DIALOG_MAX_ACTIVE = 8
|
||||
|
||||
.equ DIALOG_OFFS_HANDLER_LO = 0
|
||||
.equ DIALOG_OFFS_HANDLER_HI = 1
|
||||
.equ DIALOG_OFFS_OPTIONS = 2
|
||||
.equ DIALOG_OFFS_COUNTER = 3
|
||||
.equ DIALOG_SIZE = 4
|
||||
|
||||
|
||||
.equ DIALOG_OPT_ACTIVE_BIT = 7
|
||||
|
||||
|
||||
.equ DIALOG_FN_INIT = 0
|
||||
.equ DIALOG_FN_FINI = 1
|
||||
.equ DIALOG_FN_SHOW = 2
|
||||
.equ DIALOG_FN_HIDE = 3
|
||||
.equ DIALOG_FN_TOUCH = 4
|
||||
.equ DIALOG_FN_TIMER = 5
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; data
|
||||
|
||||
.dseg
|
||||
|
||||
dialogCurrent: .byte 2
|
||||
dialogStack: .byte DIALOG_MAX_ACTIVE*2
|
||||
dialogStackPos: .byte 1
|
||||
|
||||
dialogWindow: .byte WIN_SIZE
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine GraphApp_Init @global
|
||||
;
|
||||
|
||||
DialogMgr_Init:
|
||||
clr r16
|
||||
sts dialogStackPos, r16
|
||||
sts dialogCurrent, r16
|
||||
sts dialogCurrent+1, r16
|
||||
|
||||
ldi yl, LOW(dialogWindow)
|
||||
ldi yh, HIGH(dialogWindow)
|
||||
bigcall TitleWindow_Init
|
||||
|
||||
ldi zl, LOW(STYLE_WIN_FONT*2)
|
||||
ldi zh, HIGH(STYLE_WIN_FONT*2)
|
||||
std Y+WIN_OFFS_FONT_LO, zl
|
||||
std Y+WIN_OFFS_FONT_HI, zh
|
||||
|
||||
bigcall TitleWindow_SetFullSize
|
||||
bigcall TitleWindow_SetStyleColors
|
||||
|
||||
bigcall Window_Clear
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine DialogMgr_Every100ms @global
|
||||
;
|
||||
; Handle display touch events
|
||||
; Send timer event to every app in the stack (started with last added app).
|
||||
|
||||
DialogMgr_Every100ms:
|
||||
; check for touch input changes
|
||||
rcall Display_InputGetState ; r16=flags, r5:r4=x, r7:r6=y
|
||||
mov r17, r16
|
||||
andi r17, (1<<DISPLAY_IFLAGS_CHGCOORD_BIT) | (1<<DISPLAY_IFLAGS_CHGPRESS_BIT)
|
||||
breq DialogMgr_Every100ms_sendTimer
|
||||
mov r18, r16
|
||||
ldi r23, DIALOG_FN_TOUCH
|
||||
rcall DialogMgr_CallCurrentHandler
|
||||
DialogMgr_Every100ms_sendTimer:
|
||||
; send timer event to all dialogs in stack
|
||||
ldi xl, LOW(dialogStack)
|
||||
ldi xh, HIGH(dialogStack)
|
||||
|
||||
lds r16, dialogStackPos
|
||||
mov r17, r16
|
||||
add r16, r16
|
||||
add xl, r16
|
||||
adc xh, r16
|
||||
sub xh, r16
|
||||
|
||||
DialogMgr_Every100ms_loop:
|
||||
tst r17
|
||||
breq DialogMgr_Every100ms_ret
|
||||
ld yh, -X
|
||||
ld yl, -X
|
||||
push xl
|
||||
push xh
|
||||
push r17
|
||||
ldi r23, DIALOG_FN_TIMER
|
||||
rcall DialogMgr_CallHandler
|
||||
pop r17
|
||||
pop xh
|
||||
pop xl
|
||||
dec r17
|
||||
rjmp DialogMgr_Every100ms_loop
|
||||
DialogMgr_Every100ms_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine DialogMgr_CallHandler @global
|
||||
;
|
||||
; @param Y pointer to app data
|
||||
; @param R23 number of function to call
|
||||
; @clobbers R16, R17, R22, X (any)
|
||||
|
||||
DialogMgr_CallHandler:
|
||||
tst yl
|
||||
brne DialogMgr_CallHandler_go
|
||||
tst yh
|
||||
breq DialogMgr_CallHandler_ret
|
||||
DialogMgr_CallHandler_go:
|
||||
ldi xl, LOW(dialogWindow)
|
||||
ldi xh, HIGH(dialogWindow)
|
||||
ldd r16, Y+DIALOG_OFFS_HANDLER_LO
|
||||
ldd r17, Y+DIALOG_OFFS_HANDLER_HI
|
||||
mov r22, r16
|
||||
and r22, r17
|
||||
breq DialogMgr_CallHandler_ret
|
||||
push r16
|
||||
push r17
|
||||
DialogMgr_CallHandler_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine DialogMgr_CallCurrentHandler @global
|
||||
;
|
||||
; @param X pointer to window
|
||||
; @param R23 number of function to call
|
||||
; @clobbers R22 (any)
|
||||
|
||||
DialogMgr_CallCurrentHandler:
|
||||
lds yl, dialogCurrent
|
||||
lds yh, dialogCurrent+1
|
||||
rjmp DialogMgr_CallHandler
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine DialogMgr_PushDialog @global
|
||||
;
|
||||
; @param Y pointer to app data
|
||||
;
|
||||
DialogMgr_PushDialog:
|
||||
lds r16, dialogStackPos
|
||||
cpi r16, DIALOG_MAX_ACTIVE
|
||||
brcc DialogMgr_PushDialog_ret
|
||||
|
||||
tst r16
|
||||
brne DialogMgr_PushDialog_push
|
||||
; deactivate previous app
|
||||
push yl
|
||||
push yh
|
||||
lds yl, dialogCurrent
|
||||
lds yh, dialogCurrent+1
|
||||
ldi r23, DIALOG_FN_HIDE
|
||||
rcall DialogMgr_CallHandler
|
||||
ldd r17, Y+DIALOG_OFFS_OPTIONS
|
||||
cbr r17, (1<<DIALOG_OPT_ACTIVE_BIT)
|
||||
std Y+DIALOG_OFFS_OPTIONS, r17
|
||||
pop yh
|
||||
pop yl
|
||||
|
||||
DialogMgr_PushDialog_push:
|
||||
lds r16, dialogStackPos
|
||||
mov r17, r16
|
||||
add r17, r17 ; *2
|
||||
push xl
|
||||
push xh
|
||||
ldi xl, LOW(dialogStack)
|
||||
ldi xh, HIGH(dialogStack)
|
||||
add xl, r17
|
||||
adc xh, r17
|
||||
sub xh, r17
|
||||
st X+, yl
|
||||
st X, yh
|
||||
pop xh
|
||||
pop xl
|
||||
inc r16
|
||||
sts dialogStackPos, r16
|
||||
sts dialogCurrent, yl
|
||||
sts dialogCurrent+1, yh
|
||||
; activate new app
|
||||
ldd r17, Y+DIALOG_OFFS_OPTIONS
|
||||
ori r17, (1<<DIALOG_OPT_ACTIVE_BIT)
|
||||
std Y+DIALOG_OFFS_OPTIONS, r17
|
||||
|
||||
ldi r23, DIALOG_FN_SHOW
|
||||
rcall DialogMgr_CallHandler
|
||||
sec
|
||||
DialogMgr_PushDialog_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine DialogMgr_PopDialog @global
|
||||
;
|
||||
; @return CFLAG set if app popped from stack, cleared otherwise
|
||||
; @return Y app popped from stack (if CFLAG set)
|
||||
|
||||
DialogMgr_PopDialog:
|
||||
lds r16, dialogStackPos
|
||||
tst r16
|
||||
clc
|
||||
brne DialogMgr_PopDialog_ret
|
||||
; deactivate previous app
|
||||
push yl
|
||||
push yh
|
||||
lds yl, dialogCurrent
|
||||
lds yh, dialogCurrent+1
|
||||
ldi r23, DIALOG_FN_HIDE
|
||||
rcall DialogMgr_CallHandler
|
||||
ldd r17, Y+DIALOG_OFFS_OPTIONS
|
||||
cbr r17, (1<<DIALOG_OPT_ACTIVE_BIT)
|
||||
std Y+DIALOG_OFFS_OPTIONS, r17
|
||||
pop yh
|
||||
pop yl
|
||||
|
||||
lds r16, dialogStackPos
|
||||
dec r16
|
||||
sts dialogStackPos, r16
|
||||
brne DialogMgr_PopDialog_pop
|
||||
clr r16
|
||||
sts dialogCurrent, r16
|
||||
sts dialogCurrent+1, r16
|
||||
sec
|
||||
rjmp DialogMgr_PopDialog_ret
|
||||
DialogMgr_PopDialog_pop:
|
||||
push xl
|
||||
push xh
|
||||
ldi xl, LOW(dialogStack)
|
||||
ldi xh, HIGH(dialogStack)
|
||||
add xl, r16
|
||||
adc xh, r16
|
||||
sub xh, r16
|
||||
ld yl, X+
|
||||
ld yh, X
|
||||
sts dialogCurrent, yl
|
||||
sts dialogCurrent+1, yh
|
||||
pop xh
|
||||
pop xl
|
||||
; activate new active app
|
||||
ldd r17, Y+DIALOG_OFFS_OPTIONS
|
||||
ori r17, (1<<DIALOG_OPT_ACTIVE_BIT)
|
||||
std Y+DIALOG_OFFS_OPTIONS, r17
|
||||
ldi r23, DIALOG_FN_SHOW
|
||||
rcall DialogMgr_CallHandler
|
||||
sec
|
||||
DialogMgr_PopDialog_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Dialog_Init @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers R16, R17, X
|
||||
|
||||
Dialog_Init:
|
||||
mov xl, yl
|
||||
mov xh, yh
|
||||
ldi r17, DIALOG_SIZE
|
||||
clr r16
|
||||
bigcall Utils_FillSram ; (R17, X)
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
#endif ; AQHOME_AVR_MODS_GUI_DIALOG_ASM
|
||||
|
||||
27
avr/modules/lcd2/gui/main.asm
Normal file
27
avr/modules/lcd2/gui/main.asm
Normal file
@@ -0,0 +1,27 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_GUI_MAIN_ASM
|
||||
#define AQH_AVR_GUI_MAIN_ASM
|
||||
|
||||
|
||||
GUI_Init:
|
||||
sec
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
GUI_Every100ms:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
32
avr/modules/lcd2/gui/style.asm
Normal file
32
avr/modules/lcd2/gui/style.asm
Normal file
@@ -0,0 +1,32 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_GUI_STYLE_ASM
|
||||
#define AQH_AVR_GUI_STYLE_ASM
|
||||
|
||||
|
||||
.equ STYLE_WIN_TITLE_BACKGROUND = DISPLAY_COLOR_NAVY
|
||||
.equ STYLE_WIN_TITLE_FOREGROUND = DISPLAY_COLOR_WHITE
|
||||
.equ STYLE_BUTTON_COL_BORDER = DISPLAY_COLOR_BLACK
|
||||
.equ STYLE_BUTTON_COL_BG_NORM = DISPLAY_COLOR_WHITE
|
||||
.equ STYLE_BUTTON_COL_BG_PRESSED = DISPLAY_COLOR_NAVY
|
||||
.equ STYLE_BUTTON_COL_FG_NORM = DISPLAY_COLOR_BLACK
|
||||
.equ STYLE_BUTTON_COL_FG_PRESSED = DISPLAY_COLOR_WHITE
|
||||
|
||||
.equ STYLE_WIN_BACKGROUND = DISPLAY_COLOR_LIGHTGREY
|
||||
.equ STYLE_WIN_FOREGROUND = DISPLAY_COLOR_BLACK
|
||||
.equ STYLE_WIN_FONT = ili9341Font12x16_1
|
||||
.equ STYLE_WIN_FONT_WIDTH = 12
|
||||
.equ STYLE_WIN_FONT_HEIGHT = 16
|
||||
|
||||
.equ STYLE_WIN_TITLE_HEIGHT = (STYLE_WIN_FONT_HEIGHT+4)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
231
avr/modules/lcd2/gui/titlewindow.asm
Normal file
231
avr/modules/lcd2/gui/titlewindow.asm
Normal file
@@ -0,0 +1,231 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_GUI_TITLEWINDOW_ASM
|
||||
#define AQH_AVR_GUI_TITLEWINDOW_ASM
|
||||
|
||||
|
||||
|
||||
.equ TITLEWINDOW_OFFS_SELF = 0
|
||||
.equ TITLEWINDOW_OFFS_TITLEPTR_LO = WIN_SIZE
|
||||
.equ TITLEWINDOW_OFFS_TITLEPTR_HI = WIN_SIZE+1
|
||||
.equ TITLEWINDOW_OFFS_TITLEWIN = TITLEWINDOW_OFFS_TITLEPTR_HI+1
|
||||
.equ TITLEWINDOW_OFFS_CONTENTWIN = TITLEWINDOW_OFFS_TITLEWIN+WIN_SIZE
|
||||
.equ TITLEWINDOW_SIZE = TITLEWINDOW_OFFS_CONTENTWIN+WIN_SIZE
|
||||
|
||||
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_Init @global
|
||||
;
|
||||
; @param Y pointer to titledwindow data (size=TITLEWINDOW_SIZE)
|
||||
|
||||
TitleWindow_Init:
|
||||
rcall Window_Init
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_SetFont @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param Z pointer to font
|
||||
; @clobbers any, !Y
|
||||
|
||||
TitleWindow_SetFont:
|
||||
std Y+WIN_OFFS_FONT_LO, zl
|
||||
std Y+WIN_OFFS_FONT_HI, zh
|
||||
|
||||
; setup title window
|
||||
adiw yh:yl, TITLEWINDOW_OFFS_TITLEWIN
|
||||
std Y+WIN_OFFS_FONT_LO, zl
|
||||
std Y+WIN_OFFS_FONT_HI, zh
|
||||
sbiw yh:yl, TITLEWINDOW_OFFS_TITLEWIN
|
||||
|
||||
; setup content window
|
||||
adiw yh:yl, TITLEWINDOW_OFFS_CONTENTWIN
|
||||
std Y+WIN_OFFS_FONT_LO, zl
|
||||
std Y+WIN_OFFS_FONT_HI, zh
|
||||
sbiw yh:yl, TITLEWINDOW_OFFS_CONTENTWIN
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_SetPosAndSize @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R5:R4 X (abs)
|
||||
; @param R7:R6 Y (abs)
|
||||
; @param R9:R8 W
|
||||
; @param R11:R10 H
|
||||
; @clobbers any, !Y
|
||||
|
||||
TitleWindow_SetPosAndSize:
|
||||
std Y+WIN_OFFS_X_LO, r4
|
||||
std Y+WIN_OFFS_X_HI, r5
|
||||
std Y+WIN_OFFS_Y_LO, r6
|
||||
std Y+WIN_OFFS_Y_HI, r7
|
||||
std Y+WIN_OFFS_WIDTH_LO, r8
|
||||
std Y+WIN_OFFS_WIDTH_HI, r9
|
||||
std Y+WIN_OFFS_HEIGHT_LO, r10
|
||||
std Y+WIN_OFFS_HEIGHT_HI, r11
|
||||
|
||||
; setup title window
|
||||
adiw yh:yl, TITLEWINDOW_OFFS_TITLEWIN
|
||||
std Y+WIN_OFFS_X_LO, r4
|
||||
std Y+WIN_OFFS_X_HI, r5
|
||||
std Y+WIN_OFFS_Y_LO, r6
|
||||
std Y+WIN_OFFS_Y_HI, r7
|
||||
std Y+WIN_OFFS_WIDTH_LO, r8
|
||||
std Y+WIN_OFFS_WIDTH_HI, r9
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT)
|
||||
ldi r17, HIGH(STYLE_WIN_TITLE_HEIGHT)
|
||||
std Y+WIN_OFFS_HEIGHT_LO, r16
|
||||
std Y+WIN_OFFS_HEIGHT_HI, r17
|
||||
sbiw yh:yl, TITLEWINDOW_OFFS_TITLEWIN
|
||||
|
||||
; setup content window
|
||||
adiw yh:yl, TITLEWINDOW_OFFS_CONTENTWIN
|
||||
std Y+WIN_OFFS_X_LO, r4
|
||||
std Y+WIN_OFFS_X_HI, r5
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT)
|
||||
ldi r17, HIGH(STYLE_WIN_TITLE_HEIGHT)
|
||||
add r16, r6
|
||||
adc r16, r7
|
||||
std Y+WIN_OFFS_Y_LO, r16
|
||||
std Y+WIN_OFFS_Y_HI, r17
|
||||
std Y+WIN_OFFS_WIDTH_LO, r8
|
||||
std Y+WIN_OFFS_WIDTH_HI, r9
|
||||
mov r16, r10
|
||||
mov r17, r11
|
||||
subi r16, LOW(STYLE_WIN_TITLE_HEIGHT)
|
||||
sbci r17, HIGH(STYLE_WIN_TITLE_HEIGHT)
|
||||
std Y+WIN_OFFS_HEIGHT_LO, r16
|
||||
std Y+WIN_OFFS_HEIGHT_HI, r17
|
||||
sbiw yh:yl, TITLEWINDOW_OFFS_CONTENTWIN
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_SetFullSize @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers any, !Y
|
||||
|
||||
TitleWindow_SetFullSize:
|
||||
clr r4
|
||||
clr r5
|
||||
clr r6
|
||||
clr r7
|
||||
ldi r16, LOW(DISPLAY_WIDTH)
|
||||
mov r8, r16
|
||||
ldi r16, HIGH(DISPLAY_WIDTH)
|
||||
mov r9, r16
|
||||
ldi r16, LOW(DISPLAY_HEIGHT)
|
||||
mov r10, r16
|
||||
ldi r16, HIGH(DISPLAY_HEIGHT)
|
||||
mov r11, r16
|
||||
rcall TitleWindow_SetPosAndSize
|
||||
ret
|
||||
; @enb
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_SetStyleColors @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers any, !Y
|
||||
|
||||
TitleWindow_SetStyleColors:
|
||||
ldi r16, LOW(STYLE_WIN_BACKGROUND)
|
||||
ldi r17, HIGH(STYLE_WIN_BACKGROUND)
|
||||
std Y+WIN_OFFS_BG_COL_LO, r16
|
||||
std Y+WIN_OFFS_BG_COL_HI, r17
|
||||
ldi r16, LOW(STYLE_WIN_FOREGROUND)
|
||||
ldi r17, HIGH(STYLE_WIN_FOREGROUND)
|
||||
std Y+WIN_OFFS_FG_COL_LO, r16
|
||||
std Y+WIN_OFFS_FG_COL_HI, r17
|
||||
|
||||
; setup title window
|
||||
adiw yh:yl, TITLEWINDOW_OFFS_TITLEWIN
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_BACKGROUND)
|
||||
ldi r17, HIGH(STYLE_WIN_TITLE_BACKGROUND)
|
||||
std Y+WIN_OFFS_BG_COL_LO, r16
|
||||
std Y+WIN_OFFS_BG_COL_HI, r17
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_FOREGROUND)
|
||||
ldi r17, HIGH(STYLE_WIN_TITLE_FOREGROUND)
|
||||
std Y+WIN_OFFS_FG_COL_LO, r16
|
||||
std Y+WIN_OFFS_FG_COL_HI, r17
|
||||
sbiw yh:yl, TITLEWINDOW_OFFS_TITLEWIN
|
||||
|
||||
; setup content window
|
||||
adiw yh:yl, TITLEWINDOW_OFFS_CONTENTWIN
|
||||
ldi r16, LOW(STYLE_WIN_BACKGROUND)
|
||||
ldi r17, HIGH(STYLE_WIN_BACKGROUND)
|
||||
std Y+WIN_OFFS_BG_COL_LO, r16
|
||||
std Y+WIN_OFFS_BG_COL_HI, r17
|
||||
ldi r16, LOW(STYLE_WIN_FOREGROUND)
|
||||
ldi r17, HIGH(STYLE_WIN_FOREGROUND)
|
||||
std Y+WIN_OFFS_FG_COL_LO, r16
|
||||
std Y+WIN_OFFS_FG_COL_HI, r17
|
||||
sbiw yh:yl, TITLEWINDOW_OFFS_CONTENTWIN
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_Draw @global
|
||||
;
|
||||
; @param Y pointer to titledwindow data (size=TITLEWINDOW_SIZE)
|
||||
|
||||
TitleWindow_Draw:
|
||||
; draw title window
|
||||
adiw yh:yl, TITLEWINDOW_OFFS_TITLEWIN
|
||||
rcall Window_Clear
|
||||
sbiw yh:yl, TITLEWINDOW_OFFS_TITLEWIN
|
||||
|
||||
; write header
|
||||
ldd zl, Y+TITLEWINDOW_OFFS_TITLEPTR_LO
|
||||
ldd zh, Y+TITLEWINDOW_OFFS_TITLEPTR_HI
|
||||
adiw yh:yl, TITLEWINDOW_OFFS_TITLEWIN
|
||||
ldi r16, 5
|
||||
mov r4, r16
|
||||
clr r5
|
||||
ldi r16, 2
|
||||
mov r6, r16
|
||||
clr r7
|
||||
rcall Window_DrawTextFlash
|
||||
sbiw yh:yl, TITLEWINDOW_OFFS_TITLEWIN
|
||||
|
||||
; clear content window
|
||||
adiw yh:yl, TITLEWINDOW_OFFS_CONTENTWIN
|
||||
rcall Window_Clear
|
||||
sbiw yh:yl, TITLEWINDOW_OFFS_CONTENTWIN
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
157
avr/modules/lcd2/gui/titlewindow2.asm
Normal file
157
avr/modules/lcd2/gui/titlewindow2.asm
Normal file
@@ -0,0 +1,157 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_GUI_TITLEWINDOW2_ASM
|
||||
#define AQH_AVR_GUI_TITLEWINDOW2_ASM
|
||||
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_Init @global
|
||||
;
|
||||
; @param Y pointer to titledwindow data (size=TITLEWINDOW_SIZE)
|
||||
|
||||
TitleWindow_Init:
|
||||
bigcall Window_Init
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_SetFullSize @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers any, !Y
|
||||
|
||||
TitleWindow_SetFullSize:
|
||||
clr r16
|
||||
std Y+WIN_OFFS_X_LO, r16
|
||||
std Y+WIN_OFFS_X_HI, r16
|
||||
std Y+WIN_OFFS_Y_LO, r16
|
||||
std Y+WIN_OFFS_Y_HI, r16
|
||||
|
||||
ldi r16, LOW(DISPLAY_WIDTH)
|
||||
std Y+WIN_OFFS_WIDTH_LO, r16
|
||||
ldi r16, HIGH(DISPLAY_WIDTH)
|
||||
std Y+WIN_OFFS_WIDTH_HI, r16
|
||||
|
||||
ldi r16, LOW(DISPLAY_HEIGHT)
|
||||
std Y+WIN_OFFS_HEIGHT_LO, r16
|
||||
ldi r16, HIGH(DISPLAY_HEIGHT)
|
||||
std Y+WIN_OFFS_HEIGHT_HI, r16
|
||||
|
||||
ret
|
||||
; @enb
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_SetStyleColors @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers any, !Y
|
||||
|
||||
TitleWindow_SetStyleColors:
|
||||
ldi r16, LOW(STYLE_WIN_BACKGROUND)
|
||||
ldi r17, HIGH(STYLE_WIN_BACKGROUND)
|
||||
std Y+WIN_OFFS_BG_COL_LO, r16
|
||||
std Y+WIN_OFFS_BG_COL_HI, r17
|
||||
ldi r16, LOW(STYLE_WIN_FOREGROUND)
|
||||
ldi r17, HIGH(STYLE_WIN_FOREGROUND)
|
||||
std Y+WIN_OFFS_FG_COL_LO, r16
|
||||
std Y+WIN_OFFS_FG_COL_HI, r17
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_DrawTitle @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param Z pointer to title
|
||||
; @clobbers any, !Y
|
||||
|
||||
TitleWindow_DrawTitle:
|
||||
; fill background of title area
|
||||
clr r4
|
||||
clr r5
|
||||
clr r6
|
||||
clr r7
|
||||
ldd r8, Y+WIN_OFFS_WIDTH_LO
|
||||
ldd r9, Y+WIN_OFFS_WIDTH_HI
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT)
|
||||
ldi r17, HIGH(STYLE_WIN_TITLE_HEIGHT)
|
||||
mov r10, r16
|
||||
mov r11, r17
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_BACKGROUND)
|
||||
mov r2, r16
|
||||
ldi r16, HIGH(STYLE_WIN_TITLE_BACKGROUND)
|
||||
mov r3, r16
|
||||
rcall Window_FillRect
|
||||
|
||||
; draw title
|
||||
ldi r16, 5 ; X
|
||||
mov r4, r16
|
||||
clr r5
|
||||
ldi r16, 2 ; Y
|
||||
mov r6, r16
|
||||
clr r7
|
||||
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_BACKGROUND)
|
||||
mov r0, r16
|
||||
ldi r16, HIGH(STYLE_WIN_TITLE_BACKGROUND)
|
||||
mov r1, r16
|
||||
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_FOREGROUND)
|
||||
mov r2, r16
|
||||
ldi r16, HIGH(STYLE_WIN_TITLE_FOREGROUND)
|
||||
mov r3, r16
|
||||
bigcall Window_DrawColorTextFlash
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_ClearContentArea @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers any, !Y
|
||||
|
||||
TitleWindow_ClearContentArea:
|
||||
clr r4
|
||||
clr r5
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT)
|
||||
mov r6, r16
|
||||
ldi r16, HIGH(STYLE_WIN_TITLE_HEIGHT)
|
||||
mov r7, r16
|
||||
ldd r8, Y+WIN_OFFS_WIDTH_LO
|
||||
ldd r9, Y+WIN_OFFS_WIDTH_HI
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT)
|
||||
ldi r17, HIGH(STYLE_WIN_TITLE_HEIGHT)
|
||||
ldd r10, Y+WIN_OFFS_HEIGHT_LO
|
||||
ldd r11, Y+WIN_OFFS_HEIGHT_HI
|
||||
sub r10, r16
|
||||
sbc r11, r17
|
||||
ldi r16, LOW(STYLE_WIN_BACKGROUND)
|
||||
ldd r2, Y+WIN_OFFS_BG_COL_LO
|
||||
ldd r3, Y+WIN_OFFS_BG_COL_HI
|
||||
rcall Window_FillRect
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
558
avr/modules/lcd2/gui/window.asm
Normal file
558
avr/modules/lcd2/gui/window.asm
Normal file
@@ -0,0 +1,558 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_GUI_WINDOW_ASM
|
||||
#define AQH_AVR_GUI_WINDOW_ASM
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_Init @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers R16, R17, X
|
||||
|
||||
Window_Init:
|
||||
mov xl, yl
|
||||
mov xh, yh
|
||||
ldi r17, WIN_SIZE
|
||||
clr r16
|
||||
bigcall Utils_FillSram ; (R17, X)
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_Clear @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers any, !Y
|
||||
|
||||
Window_Clear:
|
||||
ldd r2, Y+WIN_OFFS_BG_COL_LO ; background color low
|
||||
ldd r3, Y+WIN_OFFS_BG_COL_HI ; background color high
|
||||
ldd r4, Y+WIN_OFFS_X_LO ; X low
|
||||
ldd r5, Y+WIN_OFFS_X_HI ; X high
|
||||
ldd r6, Y+WIN_OFFS_Y_LO ; Y low
|
||||
ldd r7, Y+WIN_OFFS_Y_HI ; Y high
|
||||
ldd r8, Y+WIN_OFFS_WIDTH_LO ; width low
|
||||
ldd r9, Y+WIN_OFFS_WIDTH_HI ; width high
|
||||
ldd r10, Y+WIN_OFFS_HEIGHT_LO ; height low
|
||||
ldd r11, Y+WIN_OFFS_HEIGHT_HI ; height high
|
||||
bigcall Display_FillRect
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_FillRect @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param r3:r2 color
|
||||
; @param r5:r4 X0
|
||||
; @param r7:r6 Y0
|
||||
; @param r9:r8 X1/W
|
||||
; @param r11:r10 Y1/H
|
||||
; @clobbers any, !Y
|
||||
|
||||
Window_FillRect:
|
||||
ldd r16, Y+WIN_OFFS_X_LO ; make absolute coords
|
||||
ldd r17, Y+WIN_OFFS_X_HI
|
||||
add r4, r16
|
||||
adc r5, r17
|
||||
ldd r16, Y+WIN_OFFS_Y_LO
|
||||
ldd r17, Y+WIN_OFFS_Y_HI
|
||||
add r6, r16
|
||||
adc r7, r17
|
||||
bigcall Display_FillRect ; directly call graphics function
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_IsPointInRect @global
|
||||
;
|
||||
; @param Z pointer WINRECT object in FLASH (see @ref WINRECT_OFFS_X_LO)
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @clobbers r16, r17, r18, r19, r20, r21, Z
|
||||
|
||||
Window_IsPointInRect:
|
||||
; check X
|
||||
lpm r16, Z+ ; X
|
||||
lpm r17, Z+
|
||||
mov r18, r4 ; X
|
||||
mov r19, r5
|
||||
sub r18, r16
|
||||
sbc r19, r17 ; r19:r18=X pos relative to rectangle
|
||||
brcs Window_IsPointInRect_clcRet
|
||||
; check Y
|
||||
lpm r16, Z+ ; Y
|
||||
lpm r17, Z+
|
||||
mov r20, r6 ; Y
|
||||
mov r21, r7
|
||||
sub r20, r16
|
||||
sbc r21, r17 ; r21:r20=Y pos relative to rectangle
|
||||
brcs Window_IsPointInRect_clcRet
|
||||
; check width
|
||||
lpm r16, Z+ ; width
|
||||
lpm r17, Z+
|
||||
cp r18, r16 ; width > rel X?
|
||||
cpc r19, r17
|
||||
brcc Window_IsPointInRect_ret
|
||||
; check height
|
||||
lpm r16, Z+ ; height
|
||||
lpm r17, Z+
|
||||
cp r20, r16 ; height > rel Y?
|
||||
cpc r21, r17
|
||||
rjmp Window_IsPointInRect_ret ; CF set if inside rect
|
||||
Window_IsPointInRect_clcRet:
|
||||
clc
|
||||
Window_IsPointInRect_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_DrawTextFlash @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return R5:R4 X pos behind string
|
||||
|
||||
; @clobbers any, !Y, !R6, !R7
|
||||
|
||||
Window_DrawTextFlash:
|
||||
ldd r0, Y+WIN_OFFS_BG_COL_LO
|
||||
ldd r1, Y+WIN_OFFS_BG_COL_HI
|
||||
ldd r2, Y+WIN_OFFS_FG_COL_LO
|
||||
ldd r3, Y+WIN_OFFS_FG_COL_HI
|
||||
|
||||
rjmp Window_DrawColorTextFlash
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_DrawColorTextFlash @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param Z pointer to null-terminated string
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return R5:R4 X pos behind string
|
||||
|
||||
; @clobbers any, !Y, !R6, !R7
|
||||
|
||||
Window_DrawColorTextFlash:
|
||||
rcall winCalcAbsPosAndBorders ; (R18, R19)
|
||||
Window_DrawColorTextFlash_loop:
|
||||
lpm r16, Z
|
||||
tst r16
|
||||
breq Window_DrawColorTextFlash_loopEnd
|
||||
rcall winDrawChar
|
||||
brcc Window_DrawColorTextFlash_loopEnd
|
||||
adiw zh:zl, 1 ; next char
|
||||
rjmp Window_DrawColorTextFlash_loop
|
||||
Window_DrawColorTextFlash_loopEnd:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_DrawCharAt @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R16 char to write
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return R5:R4 X pos behind char
|
||||
; @clobbers any, !Y
|
||||
|
||||
Window_DrawCharAt:
|
||||
rcall winCalcAbsPosAndBorders
|
||||
|
||||
ldd r0, Y+WIN_OFFS_BG_COL_LO
|
||||
ldd r1, Y+WIN_OFFS_BG_COL_HI
|
||||
ldd r2, Y+WIN_OFFS_FG_COL_LO
|
||||
ldd r3, Y+WIN_OFFS_FG_COL_HI
|
||||
|
||||
rjmp winDrawChar
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine winCalcAbsPosAndBorders
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R5:R4 X relative to window
|
||||
; @param R7:R6 Y relative to window
|
||||
; @return R9:R8 first X pos right of windows
|
||||
; @return R5:R4 X relative to screen
|
||||
; @return R7:R6 Y relative to screen
|
||||
; @return R9:R8 first X pos right of window (abs)
|
||||
; @return R11:R10 first Y pos below window (abs)
|
||||
; @clobbers r18, r19
|
||||
|
||||
winCalcAbsPosAndBorders:
|
||||
; calc abs X pos
|
||||
ldd r18, Y+WIN_OFFS_X_LO
|
||||
ldd r19, Y+WIN_OFFS_X_HI
|
||||
add r4, r18 ; add X of window
|
||||
adc r5, r19
|
||||
|
||||
; calc first X pos behind window
|
||||
ldd r8, Y+WIN_OFFS_WIDTH_LO
|
||||
ldd r9, Y+WIN_OFFS_WIDTH_HI
|
||||
add r8, r18
|
||||
adc r9, r19
|
||||
|
||||
; calc abs Y pos
|
||||
ldd r18, Y+WIN_OFFS_Y_LO
|
||||
ldd r19, Y+WIN_OFFS_Y_HI
|
||||
add r6, r18 ; add Y of window
|
||||
adc r7, r19
|
||||
|
||||
; calc first Y pos behind window
|
||||
ldd r10, Y+WIN_OFFS_HEIGHT_LO
|
||||
ldd r11, Y+WIN_OFFS_HEIGHT_HI
|
||||
add r10, r18
|
||||
adc r11, r19
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine winDrawChar
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R16 char to write
|
||||
; @param R5:R4 absolute X on screen
|
||||
; @param R7:R6 absolute Y on screen
|
||||
; @param R9:R8 first X pos right of windows
|
||||
; @return R5:R4 X pos behind char
|
||||
; @clobbers any, !Y, !R6, !R7, !R8, !R9, !R10, !R11
|
||||
|
||||
winDrawChar:
|
||||
push zl
|
||||
push zh
|
||||
mov r12, r16
|
||||
ldd zl, Y+WIN_OFFS_FONT_LO
|
||||
ldd zh, Y+WIN_OFFS_FONT_HI
|
||||
|
||||
; check whether the char fits inside window
|
||||
bigcall FONT_GetCharWidth ; r16=char width
|
||||
|
||||
clr r17
|
||||
add r16, r4 ; char width+X
|
||||
adc r17, r5
|
||||
sub r16, r8 ; check against window width
|
||||
sbc r17, r9
|
||||
brcc winDrawChar_ret ; not fit, jmp
|
||||
|
||||
; actually draw char
|
||||
mov r16, r12
|
||||
push r8
|
||||
push r9
|
||||
push r10
|
||||
push r11
|
||||
bigcall Display_DrawChar
|
||||
pop r11
|
||||
pop r10
|
||||
pop r9
|
||||
pop r8
|
||||
clr r16
|
||||
add r4, r18 ; increment X
|
||||
adc r5, r16
|
||||
sec ; write succeeded
|
||||
winDrawChar_ret:
|
||||
pop zh
|
||||
pop zl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_WriteHexWordAt @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R17:R16 word to write
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return R5:R4 X pos behind string
|
||||
; @clobbers any, !Y
|
||||
|
||||
Window_WriteHexWordAt:
|
||||
push r16
|
||||
mov r16, r17
|
||||
rcall Window_WriteHexByteAt
|
||||
pop r16
|
||||
rcall Window_WriteHexByteAt
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_WriteHexByteAt @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R16 byte to write
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return R5:R4 X pos behind string
|
||||
; @clobbers any, !Y
|
||||
|
||||
Window_WriteHexByteAt:
|
||||
push r16
|
||||
swap r16
|
||||
rcall winWriteNibble
|
||||
pop r16
|
||||
rcall winWriteNibble
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
winWriteNibble:
|
||||
push r4
|
||||
push r5
|
||||
push r6
|
||||
push r7
|
||||
rcall winNibbleToAscii ; write high nibble (r16, r17)
|
||||
rcall Window_DrawCharAt ; draw
|
||||
pop r7
|
||||
pop r6
|
||||
pop r5
|
||||
pop r4
|
||||
clr r17
|
||||
add r4, r18
|
||||
adc r5, r17
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine winNibbleToAscii
|
||||
;
|
||||
; Convert a nibble to an ASCII char.
|
||||
; @return R16 ASCII representation of that nibble (e.g. '0' for 0)
|
||||
; @param R16 byte (in bits 0-3)
|
||||
; @clobbers r16, r17
|
||||
|
||||
winNibbleToAscii:
|
||||
andi r16, 0xf
|
||||
cpi r16, 10
|
||||
brcs winNibbleToAscii_l1
|
||||
ldi r17, 7
|
||||
add r16, r17
|
||||
winNibbleToAscii_l1:
|
||||
ldi r17, '0'
|
||||
add r16, r17
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_DrawTextFlash @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return R5:R4 X pos behind string
|
||||
; @return R7:R6 Y pos behind string
|
||||
; @clobbers any, !Y
|
||||
|
||||
Window_DrawTextFlash:
|
||||
; calc abs X pos
|
||||
ldd r18, Y+WIN_OFFS_X_LO
|
||||
ldd r19, Y+WIN_OFFS_X_HI
|
||||
add r4, r18 ; add X of window
|
||||
adc r5, r19
|
||||
|
||||
; calc first X pos behind window
|
||||
ldd r8, Y+WIN_OFFS_WIDTH_LO
|
||||
ldd r9, Y+WIN_OFFS_WIDTH_HI
|
||||
add r8, r18
|
||||
adc r9, r19
|
||||
|
||||
; calc abs Y pos
|
||||
ldd r18, Y+WIN_OFFS_Y_LO
|
||||
ldd r19, Y+WIN_OFFS_Y_HI
|
||||
add r6, r18 ; add Y of window
|
||||
adc r7, r19
|
||||
|
||||
; calc first Y pos behind window
|
||||
ldd r10, Y+WIN_OFFS_HEIGHT_LO
|
||||
ldd r11, Y+WIN_OFFS_HEIGHT_HI
|
||||
add r10, r18
|
||||
adc r11, r19
|
||||
|
||||
Window_DrawTextFlash_loop:
|
||||
push zl
|
||||
push zh
|
||||
rcall winCalcLengthWordFlash
|
||||
pop zh
|
||||
pop zl
|
||||
mov r18, r4
|
||||
mov r19, r5
|
||||
add r18, r12
|
||||
adc r19, r13
|
||||
sub r18, r8
|
||||
sbc r19, r9
|
||||
brcs Window_DrawTextFlash_xOkay
|
||||
; we need to go to the beginning of the next line
|
||||
rcall Window_DrawTextFlash_nextLine
|
||||
brcc Window_DrawTextFlash_loopEnd ; outside the window, jmp
|
||||
Window_DrawTextFlash_xOkay:
|
||||
rcall winDrawWordFlash ; Z points at blank/0 byte after call
|
||||
lpm r16, Z+
|
||||
tst r16 ; end of string?
|
||||
breq Window_DrawTextFlash_loopEnd
|
||||
cpi r16, 13
|
||||
breq Window_DrawTextFlash_handle13
|
||||
; insert other handled chars here
|
||||
; write blank char
|
||||
push zl
|
||||
push zh
|
||||
ldd zl, Y+WIN_OFFS_FONT_LO
|
||||
ldd zh, Y+WIN_OFFS_FONT_HI
|
||||
ldi r16, 32 ; space
|
||||
bigcall Display_DrawChar
|
||||
pop zh
|
||||
pop zl
|
||||
add r4, r8 ; increment X
|
||||
adc r5, r9
|
||||
|
||||
|
||||
rjmp Window_DrawTextFlash_loopNext
|
||||
Window_DrawTextFlash_handle13:
|
||||
rcall Window_DrawTextFlash_nextLine
|
||||
Window_DrawTextFlash_loopNext:
|
||||
rjmp Window_DrawTextFlash_loop
|
||||
Window_DrawTextFlash_nextLine:
|
||||
push zl
|
||||
push zh
|
||||
ldd zl, Y+WIN_OFFS_FONT_LO
|
||||
ldd zh, Y+WIN_OFFS_FONT_HI
|
||||
bigcall FONT_GetCharWidth ; r16=char width
|
||||
pop zh
|
||||
pop zl
|
||||
ldd r4, Y+WIN_OFFS_X_LO ; X=left border
|
||||
ldd r5, Y+WIN_OFFS_X_HI
|
||||
clr r17
|
||||
add r6, r16 ; increment Y by font height
|
||||
adc r7, r17
|
||||
mov r16, r6 ; check against lower border of window
|
||||
mov r17, r7
|
||||
sub r16, r10
|
||||
sbc r17, r11 ; CF set if inside window, cleared otherwise
|
||||
ret
|
||||
Window_DrawTextFlash_loopEnd:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine winDrawWordFlash
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param Z pointer to string in FLASH
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return r5:r4 next X pos
|
||||
; @return Z pointer to next char behind current word
|
||||
; @clobbers any, !Y, !r1-r15
|
||||
|
||||
winDrawWordFlash:
|
||||
winDrawWordFlash_loop:
|
||||
lpm r16, Z
|
||||
cpi r16, 33
|
||||
brcs winDrawWordFlash_ret
|
||||
push zl
|
||||
push zh
|
||||
ldd zl, Y+WIN_OFFS_FONT_LO
|
||||
ldd zh, Y+WIN_OFFS_FONT_HI
|
||||
bigcall Display_DrawChar
|
||||
pop zh
|
||||
pop zl
|
||||
clr r16
|
||||
add r4, r18 ; increment X
|
||||
adc r5, r16
|
||||
adiw zh:zl, 1
|
||||
rjmp winDrawWordFlash_loop
|
||||
winDrawWordFlash_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine winCalcLengthWordFlash
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param Z pointer to string in FLASH
|
||||
; @return r13:r12 width of next word in pixels
|
||||
; @return Z pointer to next char behind current word
|
||||
; @clobbers any, !Y, !r1-r11, !r14, !r15
|
||||
|
||||
winCalcLengthWordFlash:
|
||||
clr r12
|
||||
clr r13
|
||||
winCalcLengthWordFlash_loop:
|
||||
lpm r16, Z
|
||||
cpi r16, 33
|
||||
brcs winCalcLengthWordFlash_ret
|
||||
push zl
|
||||
push zh
|
||||
ldd zl, Y+WIN_OFFS_FONT_LO
|
||||
ldd zh, Y+WIN_OFFS_FONT_HI
|
||||
bigcall FONT_GetCharWidth ; r16=char width
|
||||
clr r17
|
||||
add r12, r16
|
||||
adc r13, r17
|
||||
pop zh
|
||||
pop zl
|
||||
brcs winCalcLengthWordFlash_error
|
||||
adiw zh:zl, 1 ; next char
|
||||
rjmp winCalcLengthWordFlash_loop
|
||||
winCalcLengthWordFlash_error:
|
||||
ldi r12, 0xff
|
||||
ldi r13, 0xff
|
||||
winCalcLengthWordFlash_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
#endif ; if 0
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
<gwbuild>
|
||||
|
||||
<extradist>
|
||||
defs.asm
|
||||
font12x20.asm
|
||||
font12x20_1.asm
|
||||
font12x16.asm
|
||||
font12x16_1.asm
|
||||
font6x8.asm
|
||||
font6x8_1.asm
|
||||
graphops.asm
|
||||
io_spi.asm
|
||||
main.asm
|
||||
</extradist>
|
||||
|
||||
|
||||
16
avr/modules/lcd2/ili9341/README
Normal file
16
avr/modules/lcd2/ili9341/README
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
|
||||
Display API Implementation for ILI9341 Displays
|
||||
|
||||
|
||||
- Display_FillRect
|
||||
- Display_BitBlit
|
||||
- Display_WriteChar
|
||||
|
||||
- Display_DrawHLine
|
||||
- Display_DrawVLine
|
||||
|
||||
later
|
||||
- Display_DrawLine
|
||||
|
||||
44
avr/modules/lcd2/ili9341/colors.asm
Normal file
44
avr/modules/lcd2/ili9341/colors.asm
Normal file
@@ -0,0 +1,44 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_ILI9341_COLORS_ASM
|
||||
#define AQH_AVR_ILI9341_COLORS_ASM
|
||||
|
||||
|
||||
|
||||
; FEDCBA9876543210
|
||||
; 0bRRRRRGGGGGGBBBBB
|
||||
|
||||
;#define DISPLAY_COLOR_FROM_RGB(r, g, b) ((r<<11) | (g<<5) | (b & 0x1f))
|
||||
|
||||
|
||||
|
||||
.equ DISPLAY_COLOR_BLACK = 0x0000 ; 0, 0, 0
|
||||
.equ DISPLAY_COLOR_NAVY = 0x000F ; 0, 0, 128
|
||||
.equ DISPLAY_COLOR_DARKGREEN = 0x03E0 ; 0, 128, 0
|
||||
.equ DISPLAY_COLOR_DARKCYAN = 0x03EF ; 0, 128, 128
|
||||
.equ DISPLAY_COLOR_MAROON = 0x7800 ; 128, 0, 0
|
||||
.equ DISPLAY_COLOR_PURPLE = 0x780F ; 128, 0, 128
|
||||
.equ DISPLAY_COLOR_OLIVE = 0x7BE0 ; 128, 128, 0
|
||||
.equ DISPLAY_COLOR_LIGHTGREY = 0xC618 ; 192, 192, 192
|
||||
.equ DISPLAY_COLOR_DARKGREY = 0x7BEF ; 128, 128, 128
|
||||
.equ DISPLAY_COLOR_BLUE = 0x001F ; 0, 0, 255
|
||||
.equ DISPLAY_COLOR_GREEN = 0x07E0 ; 0, 255, 0
|
||||
.equ DISPLAY_COLOR_CYAN = 0x07FF ; 0, 255, 255
|
||||
.equ DISPLAY_COLOR_RED = 0xF800 ; 255, 0, 0
|
||||
.equ DISPLAY_COLOR_MAGENTA = 0xF81F ; 255, 0, 255
|
||||
.equ DISPLAY_COLOR_YELLOW = 0xFFE0 ; 255, 255, 0
|
||||
.equ DISPLAY_COLOR_WHITE = 0xFFFF ; 255, 255, 255
|
||||
.equ DISPLAY_COLOR_ORANGE = 0xFD20 ; 255, 165, 0
|
||||
.equ DISPLAY_COLOR_GREENYELLOW = 0xAFE5 ; 173, 255, 47
|
||||
.equ DISPLAY_COLOR_PINK = 0xF81F
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,14 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_ILI9341_DEFS_ASM
|
||||
#define AQH_AVR_ILI9341_DEFS_ASM
|
||||
|
||||
|
||||
|
||||
@@ -58,4 +69,5 @@
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_ILI9341_DEFS_ASM
|
||||
|
||||
|
||||
128
avr/modules/lcd2/ili9341/font12x16.asm
Normal file
128
avr/modules/lcd2/ili9341/font12x16.asm
Normal file
@@ -0,0 +1,128 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_ILI9341_FONT12X16_ASM
|
||||
#define AQH_AVR_ILI9341_FONT12X16_ASM
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ili9341Font12x16MonoHandlerFn
|
||||
;
|
||||
; Handler for 12x16 Mono Fonts
|
||||
;
|
||||
|
||||
ili9341Font12x16MonoHandlerFn:
|
||||
cpi r23, FONT_FN_RENDER
|
||||
breq ili9341Font12x16MonoRenderChar
|
||||
bigjmp FONT_GenericHandler
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ili9341Font12x16RenderCharacter
|
||||
|
||||
; @param R16 character to write
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param Z pointer to font
|
||||
; @return r18 char width in pixel
|
||||
; @return r19 char height in pixel
|
||||
; @clobbers r17, r18, r19, r23, r24, r25, x
|
||||
|
||||
ili9341Font12x16MonoRenderChar:
|
||||
push zl
|
||||
push zh
|
||||
rcall ili9341Font12x16GetCharPosInFont ; (r24, r25, z)
|
||||
ldi r25, 16 ; 16 bytes height
|
||||
ili9341Font12x16MonoRenderChar_loop1:
|
||||
ldi r24, 12 ; 12 bits
|
||||
ldi r23, 8 ; bit counter
|
||||
lpm r17, Z+ ; current font byte
|
||||
ili9341Font12x16MonoRenderChar_loop2:
|
||||
dec r23
|
||||
brne ili9341Font12x16MonoRenderChar_haveByte
|
||||
lpm r17, Z+
|
||||
ldi r23, 8
|
||||
ili9341Font12x16MonoRenderChar_haveByte:
|
||||
lsr r17
|
||||
brcs ili9341Font12x16MonoRenderChar_writeForeground
|
||||
mov r18, r0
|
||||
mov r19, r1
|
||||
rjmp ili9341Font12x16MonoRenderChar_sendToDisplay
|
||||
ili9341Font12x16MonoRenderChar_writeForeground:
|
||||
mov r18, r2
|
||||
mov r19, r3
|
||||
ili9341Font12x16MonoRenderChar_sendToDisplay:
|
||||
mov r16, r19
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r16, r18
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
ili9341Font12x16MonoRenderChar_loop2end:
|
||||
dec r24
|
||||
brne ili9341Font12x16MonoRenderChar_loop2
|
||||
dec r25
|
||||
brne ili9341Font12x16MonoRenderChar_loop1
|
||||
ldi r18, 12
|
||||
ldi r19, 16
|
||||
pop zh
|
||||
pop zl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ili9341Font12x16GetCharPosInFont
|
||||
|
||||
; @param R16 character to write
|
||||
; @param Z pointer to font
|
||||
; @return Z pointer to begin of char data
|
||||
; @clobbers r24, r25, z
|
||||
|
||||
ili9341Font12x16GetCharPosInFont:
|
||||
mov r24, r16
|
||||
adiw zh:zl, FONT_OFFS_FIRSTCHAR
|
||||
lpm r24, Z+ ; first char num
|
||||
lpm r25, Z+ ; num of chars
|
||||
sub r16, r24
|
||||
brcs ili9341Font12x16GetCharPosInFont_ret
|
||||
cp r16, r25
|
||||
brcc ili9341Font12x16GetCharPosInFont_ret
|
||||
|
||||
mov r25, r16 ; x256
|
||||
clr r24
|
||||
|
||||
lsr r25 ; x128
|
||||
ror r24
|
||||
|
||||
lsr r25 ; x64
|
||||
ror r24
|
||||
|
||||
lsr r25 ; x32
|
||||
ror r24
|
||||
|
||||
add zl, r24
|
||||
adc zh, r25
|
||||
ili9341Font12x16GetCharPosInFont_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_ILI9341_FONT12X16_ASM
|
||||
|
||||
135
avr/modules/lcd2/ili9341/font12x16_1.asm
Normal file
135
avr/modules/lcd2/ili9341/font12x16_1.asm
Normal file
@@ -0,0 +1,135 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; This is a font from the project LCD_fonts at
|
||||
; https://github.com/basti79/LCD-fonts.git
|
||||
; which in turn is based on a post by Benedikt K. in a forum post on
|
||||
; https://www.mikrocontroller.net/topic/54860
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_ILI9341_FONT12X16_1_ASM
|
||||
#define AQH_AVR_ILI9341_FONT12X16_1_ASM
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
|
||||
ili9341Font12x16_1:
|
||||
; header
|
||||
.dw ili9341Font12x16MonoHandlerFn ; handlerFn
|
||||
.dw 480 ; needed buffer size
|
||||
.db 12, 16 ; width, height of chars
|
||||
.db 32, 96 ; first char, num of chars in font
|
||||
; data (12x16_horizontal_LSB_2)
|
||||
.db 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, ; 0x20
|
||||
.db 0x60,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x21
|
||||
.db 0x00,0x00,0x00,0x00,0x98,0x01,0x98,0x01,0x98,0x01,0x98,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x22
|
||||
.db 0x00,0x00,0x60,0x06,0x60,0x06,0x60,0x06,0xFC,0x0F,0x30,0x03,0x30,0x03,0x98,0x01,0x98,0x01,0xFE,0x03,0xCC,0x00,0xCC,0x00,0xCC,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x23
|
||||
.db 0x60,0x00,0x60,0x00,0xF8,0x01,0xFC,0x03,0x6C,0x00,0x6C,0x00,0xFC,0x01,0xF8,0x03,0x60,0x03,0x60,0x03,0xFC,0x03,0xF8,0x01,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x24
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x08,0x1C,0x0C,0x1C,0x0E,0x1C,0x07,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x07,0x0E,0x07,0x06,0x07,0x00,0x00,0x00,0x00, ; 0x25
|
||||
.db 0x00,0x00,0xE0,0x00,0xB0,0x01,0x98,0x01,0x98,0x01,0xD8,0x00,0x70,0x00,0x78,0x00,0x7C,0x00,0xCC,0x06,0xCC,0x03,0x8C,0x01,0xDC,0x03,0x78,0x06,0x00,0x00,0x00,0x00, ; 0x26
|
||||
.db 0x70,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x27
|
||||
.db 0xC0,0x01,0x60,0x00,0x70,0x00,0x30,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x30,0x00,0x70,0x00,0x60,0x00,0xC0,0x01,0x00,0x00,0x00,0x00, ; 0x28
|
||||
.db 0x38,0x00,0x60,0x00,0xE0,0x00,0xC0,0x00,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x00,0xE0,0x00,0x60,0x00,0x38,0x00,0x00,0x00,0x00,0x00, ; 0x29
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x6C,0x03,0x6C,0x03,0xF8,0x01,0xF0,0x00,0xFC,0x03,0xF0,0x00,0xF8,0x01,0x6C,0x03,0x6C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFC,0x03,0xFC,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2B
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x30,0x00, ; 0x2C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00, ; 0x2E
|
||||
.db 0x00,0x00,0x00,0x08,0x00,0x0C,0x00,0x0E,0x00,0x07,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2F
|
||||
.db 0xF0,0x01,0xFC,0x07,0x0C,0x06,0x06,0x0E,0x06,0x0F,0x86,0x0D,0xC6,0x0C,0x66,0x0C,0x36,0x0C,0x1E,0x0C,0x0E,0x0C,0x0C,0x06,0xFC,0x07,0xF0,0x01,0x00,0x00,0x00,0x00, ; 0x30
|
||||
.db 0xC0,0x00,0xE0,0x00,0xF8,0x00,0xF8,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xF8,0x07,0xF8,0x07,0x00,0x00,0x00,0x00, ; 0x31
|
||||
.db 0xF8,0x03,0xFC,0x07,0x0E,0x0E,0x06,0x0C,0x06,0x0E,0x00,0x07,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0xFE,0x0F,0xFE,0x0F,0x00,0x00,0x00,0x00, ; 0x32
|
||||
.db 0xF8,0x03,0xFC,0x07,0x0E,0x0E,0x06,0x0C,0x00,0x0C,0x00,0x0E,0xF0,0x07,0xF0,0x03,0x00,0x06,0x00,0x0C,0x06,0x0C,0x0E,0x0E,0xFC,0x07,0xF8,0x03,0x00,0x00,0x00,0x00, ; 0x33
|
||||
.db 0x80,0x03,0xC0,0x03,0xE0,0x03,0x70,0x03,0x38,0x03,0x1C,0x03,0x0E,0x03,0x06,0x03,0xFE,0x0F,0xFE,0x0F,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00, ; 0x34
|
||||
.db 0xFE,0x0F,0xFE,0x0F,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x03,0xFC,0x07,0x00,0x0E,0x00,0x0C,0x00,0x0C,0x06,0x0C,0x0E,0x0E,0xFC,0x07,0xF8,0x03,0x00,0x00,0x00,0x00, ; 0x35
|
||||
.db 0xC0,0x03,0xE0,0x03,0x70,0x00,0x38,0x00,0x1C,0x00,0x0C,0x00,0xFE,0x03,0xFE,0x07,0x0E,0x0E,0x06,0x0C,0x06,0x0C,0x0E,0x0E,0xFC,0x07,0xF8,0x03,0x00,0x00,0x00,0x00, ; 0x36
|
||||
.db 0xFE,0x0F,0xFE,0x0F,0x00,0x06,0x00,0x06,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00, ; 0x37
|
||||
.db 0xF0,0x01,0xF8,0x03,0x1C,0x07,0x0C,0x06,0x0C,0x06,0x1C,0x07,0xF8,0x03,0xFC,0x07,0x0E,0x0E,0x06,0x0C,0x06,0x0C,0x0E,0x0E,0xFC,0x07,0xF8,0x03,0x00,0x00,0x00,0x00, ; 0x38
|
||||
.db 0xF8,0x03,0xFC,0x07,0x0E,0x0E,0x06,0x0C,0x06,0x0C,0x0E,0x0E,0xFC,0x0F,0xF8,0x0F,0x00,0x06,0x00,0x07,0x80,0x03,0xC0,0x01,0xF8,0x00,0x78,0x00,0x00,0x00,0x00,0x00, ; 0x39
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x30,0x00, ; 0x3B
|
||||
.db 0x00,0x03,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x1C,0x00,0x38,0x00,0x70,0x00,0xE0,0x00,0xC0,0x01,0x80,0x03,0x00,0x03,0x00,0x00,0x00,0x00, ; 0x3C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3D
|
||||
.db 0x0C,0x00,0x1C,0x00,0x38,0x00,0x70,0x00,0xE0,0x00,0xC0,0x01,0x80,0x03,0x80,0x03,0xC0,0x01,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00, ; 0x3E
|
||||
.db 0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x07,0x80,0x03,0xC0,0x01,0xE0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x3F
|
||||
.db 0xF8,0x03,0xFC,0x07,0x0C,0x06,0xE6,0x0D,0xF6,0x0D,0xB6,0x0D,0xB6,0x0D,0xB6,0x0D,0xB6,0x0D,0xF6,0x07,0xE6,0x03,0x0E,0x00,0xFC,0x03,0xF0,0x03,0x00,0x00,0x00,0x00, ; 0x40
|
||||
.db 0x60,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xF0,0x00,0x98,0x01,0x98,0x01,0x98,0x01,0x0C,0x03,0xFC,0x03,0xFC,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x41
|
||||
.db 0xFE,0x00,0xFE,0x01,0x86,0x03,0x06,0x03,0x06,0x03,0x86,0x03,0xFE,0x01,0xFE,0x03,0x06,0x07,0x06,0x06,0x06,0x06,0x06,0x07,0xFE,0x03,0xFE,0x01,0x00,0x00,0x00,0x00, ; 0x42
|
||||
.db 0xF0,0x01,0xF8,0x03,0x1C,0x07,0x0C,0x06,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0C,0x06,0x1C,0x07,0xF8,0x03,0xF0,0x01,0x00,0x00,0x00,0x00, ; 0x43
|
||||
.db 0xFE,0x00,0xFE,0x01,0x86,0x03,0x06,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x03,0x86,0x03,0xFE,0x01,0xFE,0x00,0x00,0x00,0x00,0x00, ; 0x44
|
||||
.db 0xFE,0x07,0xFE,0x07,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x01,0xFE,0x01,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00, ; 0x45
|
||||
.db 0xFE,0x07,0xFE,0x07,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x01,0xFE,0x01,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00, ; 0x46
|
||||
.db 0xF0,0x03,0xF8,0x07,0x1C,0x06,0x0C,0x00,0x06,0x00,0x06,0x00,0xC6,0x07,0xC6,0x07,0x06,0x06,0x06,0x06,0x0C,0x06,0x1C,0x06,0xF8,0x07,0xF0,0x07,0x00,0x00,0x00,0x00, ; 0x47
|
||||
.db 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0xFE,0x07,0xFE,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x48
|
||||
.db 0xF8,0x01,0xF8,0x01,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x49
|
||||
.db 0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x06,0x06,0x06,0x06,0x0E,0x03,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x4A
|
||||
.db 0x06,0x06,0x06,0x07,0x86,0x03,0xC6,0x01,0xE6,0x00,0x76,0x00,0x3E,0x00,0x3E,0x00,0x76,0x00,0xE6,0x00,0xC6,0x01,0x86,0x03,0x06,0x07,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x4B
|
||||
.db 0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00, ; 0x4C
|
||||
.db 0x06,0x06,0x0E,0x07,0x0E,0x07,0x9E,0x07,0x9E,0x07,0xF6,0x06,0xF6,0x06,0x66,0x06,0x66,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x4D
|
||||
.db 0x06,0x06,0x0E,0x06,0x0E,0x06,0x1E,0x06,0x36,0x06,0x36,0x06,0x66,0x06,0x66,0x06,0xC6,0x06,0xC6,0x06,0x86,0x07,0x06,0x07,0x06,0x07,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x4E
|
||||
.db 0xF0,0x00,0xF8,0x01,0x9C,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0x9C,0x03,0xF8,0x01,0xF0,0x00,0x00,0x00,0x00,0x00, ; 0x4F
|
||||
.db 0xFE,0x01,0xFE,0x03,0x06,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x07,0xFE,0x03,0xFE,0x01,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00, ; 0x50
|
||||
.db 0xF0,0x00,0xF8,0x01,0x9C,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0xC6,0x06,0xCC,0x03,0x9C,0x03,0xF8,0x07,0xF0,0x06,0x00,0x00,0x00,0x00, ; 0x51
|
||||
.db 0xFE,0x01,0xFE,0x03,0x06,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x07,0xFE,0x03,0xFE,0x01,0xE6,0x00,0xC6,0x01,0x86,0x03,0x06,0x07,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x52
|
||||
.db 0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x00,0x0E,0x00,0xFC,0x01,0xF8,0x03,0x00,0x07,0x00,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x53
|
||||
.db 0xFC,0x03,0xFC,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x54
|
||||
.db 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x55
|
||||
.db 0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x56
|
||||
.db 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x06,0x66,0x06,0xF6,0x06,0x9E,0x07,0x0E,0x07,0x0E,0x07,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x57
|
||||
.db 0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0x98,0x01,0xF0,0x00,0x60,0x00,0x60,0x00,0xF0,0x00,0x98,0x01,0x0C,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00, ; 0x58
|
||||
.db 0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x59
|
||||
.db 0xFE,0x07,0xFE,0x07,0x00,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00, ; 0x5A
|
||||
.db 0xF8,0x01,0xF8,0x01,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x5B
|
||||
.db 0x00,0x00,0x02,0x00,0x06,0x00,0x0E,0x00,0x1C,0x00,0x38,0x00,0x70,0x00,0xE0,0x00,0xC0,0x01,0x80,0x03,0x00,0x07,0x00,0x0E,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x5C
|
||||
.db 0xF8,0x01,0xF8,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x5D
|
||||
.db 0x40,0x00,0xE0,0x00,0xF0,0x01,0xB8,0x03,0x1C,0x07,0x0E,0x0E,0x06,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x5E
|
||||
.db 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,0xFE,0x0F,0xFE,0x0F, ; 0x5F
|
||||
.db 0x00,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x00,0x60,0x00,0x60,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x60
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x03,0xFC,0x07,0x00,0x06,0xF8,0x07,0xFC,0x07,0x06,0x06,0x06,0x06,0xFE,0x07,0xFC,0x07,0x00,0x00,0x00,0x00, ; 0x61
|
||||
.db 0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xF6,0x01,0xFE,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x07,0xFE,0x03,0xFE,0x01,0x00,0x00,0x00,0x00, ; 0x62
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x06,0x06,0x00,0x06,0x00,0x06,0x00,0x0E,0x06,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x63
|
||||
.db 0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0xF8,0x06,0xFC,0x07,0x8E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x06,0xFC,0x07,0xF8,0x07,0x00,0x00,0x00,0x00, ; 0x64
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x06,0xFE,0x07,0xFE,0x03,0x06,0x00,0x0E,0x00,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x65
|
||||
.db 0xE0,0x01,0xF0,0x01,0x38,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0xFE,0x00,0xFE,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00, ; 0x66
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x07,0xFC,0x07,0x0E,0x06,0x06,0x06,0x0E,0x07,0xFC,0x07,0xF8,0x06,0x00,0x06,0x00,0x07,0xFC,0x03,0xFC,0x01, ; 0x67
|
||||
.db 0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xF6,0x00,0xFE,0x01,0x8E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00, ; 0x68
|
||||
.db 0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x69
|
||||
.db 0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x00,0x00,0xC0,0x01,0xC0,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x98,0x01,0xF8,0x01,0xF0,0x00, ; 0x6A
|
||||
.db 0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x8C,0x01,0xCC,0x01,0xEC,0x00,0x7C,0x00,0x7C,0x00,0xEC,0x00,0xCC,0x01,0x8C,0x03,0x0C,0x03,0x00,0x00,0x00,0x00, ; 0x6B
|
||||
.db 0x70,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x6C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9A,0x01,0xFE,0x03,0xFE,0x07,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x00,0x00,0x00,0x00, ; 0x6D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0xFC,0x03,0x0C,0x07,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x0C,0x06,0x00,0x00,0x00,0x00, ; 0x6E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x0E,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x03,0xF8,0x01,0x00,0x00,0x00,0x00, ; 0x6F
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x01,0xFE,0x03,0x06,0x07,0x06,0x06,0x06,0x06,0x0E,0x07,0xFE,0x03,0xF6,0x01,0x06,0x00,0x06,0x00,0x06,0x00, ; 0x70
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x07,0xFC,0x07,0x0E,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x07,0xF8,0x06,0x00,0x06,0x00,0x06,0x00,0x06, ; 0x71
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xEC,0x03,0xFC,0x07,0x1C,0x06,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00, ; 0x72
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFE,0x01,0x06,0x00,0xFE,0x00,0xFC,0x01,0x80,0x01,0x80,0x01,0xFE,0x01,0xFC,0x00,0x00,0x00,0x00,0x00, ; 0x73
|
||||
.db 0x00,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0xFE,0x00,0xFE,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0xF8,0x01,0xF0,0x01,0x00,0x00,0x00,0x00, ; 0x74
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0x07,0xFC,0x07,0xF8,0x06,0x00,0x00,0x00,0x00, ; 0x75
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x76
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0x66,0x06,0xF6,0x06,0xFC,0x03,0x9C,0x03,0x08,0x01,0x00,0x00,0x00,0x00, ; 0x77
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x8E,0x03,0xDC,0x01,0xF8,0x00,0x70,0x00,0xF8,0x00,0xDC,0x01,0x8E,0x03,0x06,0x03,0x00,0x00,0x00,0x00, ; 0x78
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x03,0x0C,0x03,0x98,0x01,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00, ; 0x79
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0xFE,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0xFE,0x03,0xFE,0x03,0x00,0x00,0x00,0x00, ; 0x7A
|
||||
.db 0xC0,0x03,0xE0,0x03,0x70,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x38,0x00,0x1C,0x00,0x38,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x70,0x00,0xE0,0x03,0xC0,0x03,0x00,0x00, ; 0x7B
|
||||
.db 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, ; 0x7C
|
||||
.db 0x3C,0x00,0x7C,0x00,0xE0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x01,0x80,0x03,0xC0,0x01,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xE0,0x00,0x7C,0x00,0x3C,0x00,0x00,0x00, ; 0x7D
|
||||
.db 0x00,0x00,0x00,0x00,0x38,0x06,0x6C,0x03,0xC6,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0xF0,0x00,0x98,0x01,0x0C,0x03,0x06,0x06,0x06,0x06,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7F
|
||||
|
||||
|
||||
#endif ; AQH_AVR_ILI9341_FONT12X16_1_ASM
|
||||
@@ -7,6 +7,10 @@
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_ILI9341_FONT12X20_ASM
|
||||
#define AQH_AVR_ILI9341_FONT12X20_ASM
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
@@ -14,16 +18,15 @@
|
||||
.cseg
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font12x20MonoHandlerFn
|
||||
; @routine ili9341Font12x20MonoHandlerFn
|
||||
;
|
||||
; Handler for 12x20 Mono Fonts
|
||||
;
|
||||
|
||||
font12x20MonoHandlerFn:
|
||||
ili9341Font12x20MonoHandlerFn:
|
||||
cpi r23, FONT_FN_RENDER
|
||||
breq font12x20MonoRenderCharacter
|
||||
breq ili9341Font12x20MonoRenderChar
|
||||
bigjmp FONT_GenericHandler
|
||||
; @end
|
||||
|
||||
@@ -31,45 +34,49 @@ font12x20MonoHandlerFn:
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font12x20RenderCharacter
|
||||
; @routine ili9341Font12x20RenderCharacter
|
||||
|
||||
; @param R16 character to write
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param Z pointer to font
|
||||
; @param X pointer to RAM to store data to
|
||||
; @param r18 char width in pixel
|
||||
; @param r19 char height in pixel
|
||||
; @clobbers r17, r18, r23, r24, r25, x
|
||||
; @return r18 char width in pixel
|
||||
; @return r19 char height in pixel
|
||||
; @clobbers r17, r18, r19, r23, r24, r25, x
|
||||
|
||||
font12x20MonoRenderCharacter:
|
||||
ili9341Font12x20MonoRenderChar:
|
||||
push zl
|
||||
push zh
|
||||
rcall font12x20GetCharPosInFont ; (r17, r24, r25, z)
|
||||
rcall ili9341Font12x20GetCharPosInFont ; (r24, r25, z)
|
||||
ldi r25, 20 ; 20 bytes height
|
||||
font12x20MonoRenderCharacter_loop1:
|
||||
ldi r24, 12 ; 16 bits
|
||||
ldi r23, 8
|
||||
lpm r17, Z+
|
||||
font12x20MonoRenderCharacter_loop2:
|
||||
ili9341Font12x20MonoRenderChar_loop1:
|
||||
ldi r24, 12 ; 12 bits
|
||||
ldi r23, 8 ; bit counter
|
||||
lpm r17, Z+ ; current font byte
|
||||
ili9341Font12x20MonoRenderChar_loop2:
|
||||
dec r23
|
||||
brne font12x20MonoRenderCharacter_haveByte
|
||||
brne ili9341Font12x20MonoRenderChar_haveByte
|
||||
lpm r17, Z+
|
||||
ldi r23, 8
|
||||
font12x20MonoRenderCharacter_haveByte:
|
||||
ili9341Font12x20MonoRenderChar_haveByte:
|
||||
lsr r17
|
||||
brcs font12x20MonoRenderCharacter_writeForeground
|
||||
st X+, r0
|
||||
st X+, r1
|
||||
rjmp font12x20MonoRenderCharacter_loop2end
|
||||
font12x20MonoRenderCharacter_writeForeground:
|
||||
st X+, r2
|
||||
st X+, r3
|
||||
font12x20MonoRenderCharacter_loop2end:
|
||||
brcs ili9341Font12x20MonoRenderChar_writeForeground
|
||||
mov r18, r0
|
||||
mov r19, r1
|
||||
rjmp ili9341Font12x20MonoRenderChar_sendToDisplay
|
||||
ili9341Font12x20MonoRenderChar_writeForeground:
|
||||
mov r18, r2
|
||||
mov r19, r3
|
||||
ili9341Font12x20MonoRenderChar_sendToDisplay:
|
||||
mov r16, r19
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r16, r18
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
ili9341Font12x20MonoRenderChar_loop2end:
|
||||
dec r24
|
||||
brne font12x20MonoRenderCharacter_loop2
|
||||
brne ili9341Font12x20MonoRenderChar_loop2
|
||||
dec r25
|
||||
brne font12x20MonoRenderCharacter_loop1
|
||||
brne ili9341Font12x20MonoRenderChar_loop1
|
||||
ldi r18, 12
|
||||
ldi r19, 20
|
||||
pop zh
|
||||
@@ -80,22 +87,22 @@ font12x20MonoRenderCharacter_loop2end:
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font12x20GetCharPosInFont
|
||||
; @routine ili9341Font12x20GetCharPosInFont
|
||||
|
||||
; @param R16 character to write
|
||||
; @param Z pointer to font
|
||||
; @return Z pointer to begin of char data
|
||||
; @clobbers r17, r24, r25, z
|
||||
; @clobbers r24, r25, z
|
||||
|
||||
font12x20GetCharPosInFont:
|
||||
ili9341Font12x20GetCharPosInFont:
|
||||
mov r24, r16
|
||||
adiw zh:zl, FONT_OFFS_FIRSTCHAR
|
||||
lpm r24, Z+ ; first char num
|
||||
lpm r25, Z+ ; num of chars
|
||||
sub r16, r24
|
||||
brcs font12x20GetCharPosInFont_ret
|
||||
brcs ili9341Font12x20GetCharPosInFont_ret
|
||||
cp r16, r25
|
||||
brcc font12x20GetCharPosInFont_ret
|
||||
brcc ili9341Font12x20GetCharPosInFont_ret
|
||||
|
||||
mov r24, r16
|
||||
clr r25
|
||||
@@ -121,9 +128,11 @@ font12x20GetCharPosInFont:
|
||||
|
||||
add zl, r24
|
||||
adc zh, r25
|
||||
font12x20GetCharPosInFont_ret:
|
||||
ili9341Font12x20GetCharPosInFont_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_ILI9341_FONT12X20_ASM
|
||||
|
||||
136
avr/modules/lcd2/ili9341/font12x20_1.asm
Normal file
136
avr/modules/lcd2/ili9341/font12x20_1.asm
Normal file
@@ -0,0 +1,136 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; This is a font from the project LCD_fonts at
|
||||
; https://github.com/basti79/LCD-fonts.git
|
||||
; which in turn is based on a post by Benedikt K. in a forum post on
|
||||
; https://www.mikrocontroller.net/topic/54860
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_ILI9341_FONT12X20_1_ASM
|
||||
#define AQH_AVR_ILI9341_FONT12X20_1_ASM
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
|
||||
ili9341Font12x20_1:
|
||||
; header
|
||||
.dw ili9341Font12x20MonoHandlerFn ; handlerFn
|
||||
.dw 480 ; needed buffer size
|
||||
.db 12, 20 ; width, height of chars
|
||||
.db 32, 96 ; first char, num of chars in font
|
||||
; data (16x20_horizontal_LSB_2)
|
||||
.db 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, ; 0x20
|
||||
.db 0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x21
|
||||
.db 0x00,0x00,0x8C,0x01,0x8C,0x01,0x8C,0x01,0x8C,0x01,0x8C,0x01,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, ; 0x22
|
||||
.db 0x00,0x00,0x00,0x00,0x20,0x02,0x20,0x02,0x10,0x01,0x10,0x01,0x10,0x01,0xFE,0x0F,0x88,0x00,0x88,0x00,0x88,0x00,0xFE,0x07,0x44,0x00,0x44,0x00,0x22,0x00,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x23
|
||||
.db 0x00,0x00,0x40,0x00,0xF0,0x01,0xF8,0x03,0x4C,0x02,0x4C,0x00,0x4C,0x00,0x78,0x00,0x70,0x00,0xC0,0x01,0xC0,0x01,0x40,0x03,0x40,0x03,0x44,0x03,0xFC,0x01,0xF8,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x24
|
||||
.db 0x00,0x00,0x00,0x00,0x1E,0x08,0x33,0x04,0x33,0x02,0x33,0x01,0xB3,0x00,0xB3,0x00,0x5E,0x00,0xA0,0x07,0xD0,0x0C,0xD0,0x0C,0xC8,0x0C,0xC4,0x0C,0xC2,0x0C,0x81,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x25
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x00,0xF8,0x01,0x98,0x01,0x98,0x01,0xD8,0x00,0x70,0x00,0x3C,0x00,0x66,0x0C,0xE3,0x0C,0xC3,0x0C,0x83,0x07,0x87,0x07,0xFE,0x07,0xFC,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x26
|
||||
.db 0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,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, ; 0x27
|
||||
.db 0x00,0x00,0x00,0x03,0xC0,0x03,0xE0,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x60,0x00,0xE0,0x00,0xC0,0x03,0x00,0x03,0x00,0x00, ; 0x28
|
||||
.db 0x00,0x00,0x0C,0x00,0x3C,0x00,0x70,0x00,0x60,0x00,0xC0,0x00,0xC0,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x70,0x00,0x3C,0x00,0x0C,0x00,0x00,0x00, ; 0x29
|
||||
.db 0x00,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x36,0x03,0xCE,0x03,0x00,0x00,0xD8,0x00,0x9C,0x01,0x88,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFE,0x07,0xFE,0x07,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2B
|
||||
.db 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,0x70,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x00,0x00, ; 0x2C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2D
|
||||
.db 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,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x2E
|
||||
.db 0x00,0x00,0x00,0x06,0x00,0x03,0x00,0x03,0x80,0x01,0x80,0x01,0x80,0x01,0xC0,0x00,0xC0,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0x06,0x00,0x00,0x00, ; 0x2F
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x00,0xF8,0x01,0x0C,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0x0C,0x03,0xF8,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x30
|
||||
.db 0x00,0x00,0x00,0x00,0x60,0x00,0x7C,0x00,0x66,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x31
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x00,0xFC,0x01,0x84,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x32
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x00,0xFC,0x03,0x04,0x03,0x00,0x03,0x80,0x01,0xF8,0x00,0xF8,0x00,0x80,0x01,0x00,0x03,0x00,0x03,0x00,0x03,0x84,0x03,0xFC,0x01,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x33
|
||||
.db 0x00,0x00,0x00,0x00,0x80,0x01,0xC0,0x01,0xE0,0x01,0xA0,0x01,0x90,0x01,0x98,0x01,0x8C,0x01,0x84,0x01,0xFE,0x07,0xFE,0x07,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x34
|
||||
.db 0x00,0x00,0x00,0x00,0xF8,0x03,0xF8,0x03,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0xF8,0x00,0xF8,0x01,0x80,0x03,0x00,0x03,0x00,0x03,0x80,0x03,0xF8,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x35
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x00,0xF8,0x01,0x1C,0x01,0x0C,0x00,0x06,0x00,0xE6,0x00,0xF6,0x01,0x8E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8C,0x03,0xFC,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x36
|
||||
.db 0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x00,0x06,0x00,0x03,0x00,0x01,0x80,0x01,0xC0,0x00,0x40,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x37
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x01,0x8C,0x01,0x8C,0x01,0x9C,0x01,0xF8,0x00,0x70,0x00,0xEC,0x01,0x86,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x38
|
||||
.db 0x00,0x00,0x00,0x00,0x78,0x00,0xFC,0x01,0x8E,0x01,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0x7C,0x03,0x38,0x03,0x00,0x03,0x80,0x01,0xC4,0x01,0xFC,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x39
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x00,0x00, ; 0x3B
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x07,0xC0,0x03,0xE0,0x00,0x38,0x00,0x0E,0x00,0x38,0x00,0xE0,0x00,0xC0,0x03,0x00,0x07,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x0E,0x00,0x3C,0x00,0x70,0x00,0xC0,0x01,0x00,0x07,0xC0,0x01,0x70,0x00,0x3C,0x00,0x0E,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3E
|
||||
.db 0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x03,0x82,0x03,0x00,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x3F
|
||||
.db 0x00,0x00,0x00,0x00,0xF0,0x01,0x18,0x03,0x0C,0x06,0xC6,0x07,0x63,0x06,0x33,0x06,0x33,0x06,0x33,0x07,0x33,0x07,0xF3,0x06,0x66,0x0E,0x06,0x00,0x0C,0x00,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x40
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0xF0,0x00,0xF0,0x00,0xD0,0x00,0x98,0x01,0x98,0x01,0x8C,0x03,0x0C,0x03,0xFC,0x03,0xFE,0x07,0x06,0x06,0x06,0x06,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x41
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x01,0x86,0x01,0x86,0x01,0xC6,0x00,0x7E,0x00,0xFE,0x00,0x86,0x01,0x06,0x03,0x06,0x03,0x06,0x03,0xFE,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x42
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x07,0x1C,0x04,0x0C,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0x3C,0x04,0xF8,0x07,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x43
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x01,0x86,0x03,0x06,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x03,0x86,0x03,0xFE,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x44
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x45
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x07,0xFC,0x07,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x03,0xFC,0x03,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x46
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x03,0xF8,0x07,0x1C,0x04,0x0C,0x00,0x06,0x00,0x06,0x00,0x86,0x07,0x86,0x07,0x06,0x06,0x0C,0x06,0x1C,0x06,0xF8,0x07,0xE0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x47
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0xFE,0x03,0xFE,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x48
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x01,0xFE,0x01,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xFE,0x01,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x49
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xF8,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xC0,0x01,0xFC,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4A
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x07,0x86,0x03,0xC6,0x01,0xE6,0x00,0x66,0x00,0x36,0x00,0x3E,0x00,0x76,0x00,0xE6,0x00,0xC6,0x01,0x86,0x03,0x06,0x07,0x06,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4B
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x07,0xFC,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x8F,0x07,0x8B,0x06,0x8B,0x06,0xDB,0x06,0x53,0x06,0x53,0x06,0x73,0x06,0x23,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x06,0x0E,0x06,0x1E,0x06,0x1E,0x06,0x36,0x06,0x76,0x06,0x66,0x06,0xE6,0x06,0xC6,0x06,0x86,0x07,0x86,0x07,0x06,0x07,0x06,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xFC,0x01,0x8E,0x03,0x07,0x07,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x07,0x07,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x4F
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0xFC,0x03,0x0C,0x07,0x0C,0x06,0x0C,0x06,0x0C,0x07,0xFC,0x03,0xFC,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x50
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xFC,0x01,0x8E,0x03,0x07,0x07,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x06,0x03,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x80,0x03,0x00,0x0F,0x00,0x04,0x00,0x00, ; 0x51
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0xFE,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0xC6,0x01,0xFE,0x00,0x7E,0x00,0xE6,0x00,0xC6,0x01,0x86,0x03,0x06,0x07,0x06,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x52
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0xFC,0x01,0x06,0x01,0x06,0x00,0x0E,0x00,0x3C,0x00,0xF8,0x00,0xC0,0x03,0x00,0x03,0x00,0x03,0x86,0x03,0xFE,0x01,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x53
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x0F,0xFF,0x0F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x54
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x55
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0C,0x06,0x06,0x06,0x06,0x0E,0x06,0x0C,0x03,0x0C,0x03,0x1C,0x03,0x98,0x01,0xB8,0x01,0xB0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x56
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x03,0x0C,0x03,0x0C,0x62,0x04,0x62,0x04,0xE2,0x06,0xF6,0x06,0x96,0x06,0x96,0x06,0x96,0x03,0x9C,0x03,0x9C,0x03,0x0C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x57
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0E,0x0E,0x06,0x0C,0x03,0x98,0x01,0xF8,0x00,0xF0,0x00,0x60,0x00,0xF0,0x00,0xD8,0x01,0x98,0x01,0x0C,0x03,0x06,0x07,0x03,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x58
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0C,0x06,0x06,0x0C,0x03,0x1C,0x03,0x98,0x01,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x59
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x07,0xFE,0x07,0x00,0x06,0x00,0x03,0x80,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0xFE,0x07,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x5A
|
||||
.db 0x00,0x00,0xF0,0x03,0xF0,0x03,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xF0,0x03,0xF0,0x03,0x00,0x00, ; 0x5B
|
||||
.db 0x00,0x00,0x06,0x00,0x0C,0x00,0x0C,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x60,0x00,0x60,0x00,0xC0,0x00,0xC0,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x03,0x00,0x03,0x00,0x06,0x00,0x00, ; 0x5C
|
||||
.db 0x00,0x00,0xFC,0x00,0xFC,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xFC,0x00,0xFC,0x00,0x00,0x00, ; 0x5D
|
||||
.db 0x00,0x00,0x00,0x00,0x40,0x00,0x40,0x00,0xE0,0x00,0xA0,0x00,0xB0,0x00,0xB0,0x01,0x18,0x01,0x18,0x03,0x0C,0x03,0x0C,0x02,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x5E
|
||||
.db 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,0xFF,0x0F,0xFF,0x0F,0x00,0x00,0x00,0x00, ; 0x5F
|
||||
.db 0x60,0x00,0xC0,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, ; 0x60
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x03,0x04,0x03,0x00,0x03,0x00,0x03,0xF8,0x03,0x0C,0x03,0x06,0x03,0x86,0x03,0xFE,0x0F,0x7C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x61
|
||||
.db 0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xE6,0x00,0xF6,0x01,0x9E,0x03,0x0E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x01,0xFE,0x01,0xF6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x62
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xFC,0x03,0x1C,0x02,0x0E,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x0E,0x00,0x1C,0x00,0xFC,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x63
|
||||
.db 0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x78,0x03,0xFC,0x03,0x8C,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x03,0x38,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x64
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x01,0x8C,0x03,0x06,0x03,0xFE,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x0C,0x02,0xFC,0x03,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x65
|
||||
.db 0x00,0x00,0xE0,0x07,0xF0,0x07,0x30,0x00,0x30,0x00,0xFE,0x07,0xFE,0x07,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x66
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x03,0xFC,0x03,0x8C,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xFC,0x03,0x78,0x03,0x00,0x03,0x84,0x03,0xFC,0x01,0xF8,0x00, ; 0x67
|
||||
.db 0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xE6,0x01,0xF6,0x03,0x1E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x68
|
||||
.db 0x00,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0xFC,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x69
|
||||
.db 0x00,0x00,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0xF8,0x01,0xF8,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xC0,0x01,0xFC,0x00,0x7C,0x00, ; 0x6A
|
||||
.db 0x00,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x07,0x8C,0x03,0xCC,0x01,0xEC,0x00,0x6C,0x00,0x7C,0x00,0xEC,0x00,0xCC,0x01,0x8C,0x03,0x0C,0x07,0x0C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6B
|
||||
.db 0x00,0x00,0xFC,0x00,0xFC,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6C
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9B,0x03,0xFF,0x07,0x77,0x06,0x33,0x06,0x33,0x06,0x33,0x06,0x33,0x06,0x33,0x06,0x33,0x06,0x33,0x06,0x33,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE6,0x01,0xF6,0x03,0x1E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0xFC,0x03,0x0C,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0C,0x03,0xFC,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x6F
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF6,0x00,0xFE,0x01,0x8E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x01,0xFE,0x01,0xF6,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00, ; 0x70
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x03,0xFC,0x03,0x8C,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0x7C,0x03,0x38,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03, ; 0x71
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0x03,0xEC,0x03,0x3C,0x02,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x72
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xFC,0x01,0x0C,0x00,0x0C,0x00,0x3C,0x00,0xF0,0x01,0x80,0x03,0x00,0x03,0x04,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x73
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0xFE,0x07,0xFE,0x07,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0xF0,0x07,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x74
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0xC6,0x03,0x7E,0x03,0x3C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x75
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x0C,0x02,0x0C,0x03,0x0C,0x03,0x18,0x01,0x98,0x01,0x98,0x01,0xB0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x76
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x63,0x0C,0x63,0x0C,0xE2,0x04,0xF6,0x04,0x96,0x04,0x96,0x06,0x96,0x07,0x9C,0x03,0x0C,0x03,0x0C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x77
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x07,0x0C,0x03,0x98,0x01,0xB8,0x00,0xF0,0x00,0x60,0x00,0xF0,0x00,0xD8,0x01,0x98,0x01,0x0C,0x03,0x06,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x78
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x0C,0x02,0x0C,0x03,0x1C,0x03,0x98,0x01,0x98,0x01,0xB0,0x00,0xF0,0x00,0xF0,0x00,0x60,0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x3C,0x00,0x1C,0x00, ; 0x79
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0xFE,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0xFE,0x03,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7A
|
||||
.db 0x00,0x00,0xC0,0x03,0xE0,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x3C,0x00,0x3C,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x03,0xC0,0x03,0x00,0x00, ; 0x7B
|
||||
.db 0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00, ; 0x7C
|
||||
.db 0x00,0x00,0x3C,0x00,0x7C,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xC0,0x03,0xC0,0x03,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x7C,0x00,0x3C,0x00,0x00,0x00, ; 0x7D
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x04,0xFE,0x07,0xC2,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7E
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ; 0x7F
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_ILI9341_FONT12X20_1_ASM
|
||||
@@ -7,6 +7,11 @@
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_ILI9341_FONT6X8_ASM
|
||||
#define AQH_AVR_ILI9341_FONT6X8_ASM
|
||||
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
@@ -16,57 +21,63 @@
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font6x8MonoHandlerFn
|
||||
; @routine ili9341Font6x8MonoHandlerFn
|
||||
;
|
||||
; Handler for 6x8 Mono Fonts
|
||||
;
|
||||
|
||||
font6x8MonoHandlerFn:
|
||||
ili9341Font6x8MonoHandlerFn:
|
||||
cpi r23, FONT_FN_RENDER
|
||||
breq font6x8MonoRenderCharacter
|
||||
breq ili9341Font6x8WriteChar
|
||||
rjmp FONT_GenericHandler
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font6x8RenderCharacter
|
||||
; @routine ili9341Font6x8WriteChar
|
||||
|
||||
; @param R16 character to write
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param Z pointer to font
|
||||
; @param X pointer to RAM to store data to
|
||||
; @param r18 char width in pixel
|
||||
; @param r19 char height in pixel
|
||||
; @clobbers r16, r17, r24, r25, x
|
||||
; @return R18 width of char in pixels
|
||||
; @return R19 height of char in pixels
|
||||
; @clobbers r16, r17, r18, r19, r22, r23, r24, r25
|
||||
|
||||
font6x8MonoRenderCharacter:
|
||||
ili9341Font6x8WriteChar:
|
||||
push zl
|
||||
push zh
|
||||
adiw zh:zl, FONT_OFFS_WIDTH
|
||||
lpm r18, Z+ ; char width in pixels
|
||||
lpm r19, Z ; char height in pixels
|
||||
sbiw zh:zl, FONT_OFFS_WIDTH+1
|
||||
rcall font6x8GetCharPosInFont ; (r16, r17, r24, r25, z)
|
||||
mov r25, r19 ; height in pixels
|
||||
font6x8MonoRenderCharacter_loop1:
|
||||
mov r24, r18 ; width in pixels
|
||||
lpm r17, Z+
|
||||
font6x8MonoRenderCharacter_loop2:
|
||||
rcall ili9341Font6x8GetCharPosInFont ; (r16, r24, r25, z)
|
||||
mov r25, r19 ; height in pixels
|
||||
ili9341Font6x8WriteChar_loop1:
|
||||
mov r24, r18 ; width in pixels
|
||||
lpm r17, Z+ ; font data
|
||||
ili9341Font6x8WriteChar_loop2:
|
||||
lsr r17
|
||||
brcs font6x8MonoRenderCharacter_writeForeground
|
||||
st X+, r0
|
||||
st X+, r1
|
||||
rjmp font6x8MonoRenderCharacter_loop2end
|
||||
font6x8MonoRenderCharacter_writeForeground:
|
||||
st X+, r2
|
||||
st X+, r3
|
||||
font6x8MonoRenderCharacter_loop2end:
|
||||
brcs ili9341Font6x8WriteChar_writeForeground
|
||||
mov r22, r0
|
||||
mov r23, r1
|
||||
rjmp ili9341Font6x8WriteChar_sendToDisplay
|
||||
ili9341Font6x8WriteChar_writeForeground:
|
||||
mov r22, r2
|
||||
mov r23, r3
|
||||
ili9341Font6x8WriteChar_sendToDisplay:
|
||||
mov r16, r23
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r16, r22
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
ili9341Font6x8WriteChar_loop2end:
|
||||
dec r24
|
||||
brne font6x8MonoRenderCharacter_loop2
|
||||
brne ili9341Font6x8WriteChar_loop2
|
||||
dec r25
|
||||
brne font6x8MonoRenderCharacter_loop1
|
||||
brne ili9341Font6x8WriteChar_loop1
|
||||
ili9341Font6x8WriteChar_end:
|
||||
pop zh
|
||||
pop zl
|
||||
ret
|
||||
@@ -75,22 +86,22 @@ font6x8MonoRenderCharacter_loop2end:
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine font6x8GetCharPosInFont (same as font8x8GetCharPosInFont!)
|
||||
; @routine ili9341Font6x8GetCharPosInFont (same as font8x8GetCharPosInFont!)
|
||||
|
||||
; @param R16 character to write
|
||||
; @param Z pointer to font
|
||||
; @return Z pointer to begin of char data
|
||||
; @clobbers r16, r17, r24, r25, z
|
||||
; @clobbers r16, r24, r25, z
|
||||
|
||||
font6x8GetCharPosInFont:
|
||||
mov r24, r16
|
||||
ili9341Font6x8GetCharPosInFont:
|
||||
adiw zh:zl, FONT_OFFS_FIRSTCHAR
|
||||
lpm r24, Z+ ; first char num
|
||||
lpm r25, Z+ ; num of chars
|
||||
; Z now points to begin of font data
|
||||
sub r16, r24
|
||||
brcs font6x8GetCharPosInFont_ret
|
||||
brcs ili9341Font6x8GetCharPosInFont_ret
|
||||
cp r16, r25
|
||||
brcc font6x8GetCharPosInFont_ret
|
||||
brcc ili9341Font6x8GetCharPosInFont_ret
|
||||
mov r24, r16
|
||||
clr r25
|
||||
lsl r24 ; x2
|
||||
@@ -101,9 +112,11 @@ font6x8GetCharPosInFont:
|
||||
rol r25
|
||||
add zl, r24
|
||||
adc zh, r25
|
||||
font6x8GetCharPosInFont_ret:
|
||||
ili9341Font6x8GetCharPosInFont_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_ILI9341_FONT6X8_ASM
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
; https://www.mikrocontroller.net/topic/54860
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_ILI9341_FONT6X8_1_ASM
|
||||
#define AQH_AVR_ILI9341_FONT6X8_1_ASM
|
||||
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
@@ -24,9 +28,9 @@
|
||||
|
||||
|
||||
|
||||
font2_6x8:
|
||||
ili9341Font6x8_1:
|
||||
; header
|
||||
.dw font6x8MonoHandlerFn ; handlerFn
|
||||
.dw ili9341Font6x8MonoHandlerFn ; handlerFn
|
||||
.db 96, 0 ; needed buffer size
|
||||
.db 6, 8 ; width, height of chars
|
||||
.db 32, 224 ; first char, num of chars in font
|
||||
@@ -255,3 +259,7 @@ font2_6x8:
|
||||
.db 0x06,0x08,0x04,0x0E,0x00,0x00,0x00,0x00, ; 0xFD
|
||||
.db 0x00,0x00,0x1E,0x1E,0x1E,0x1E,0x00,0x00, ; 0xFE
|
||||
.db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 0xFF
|
||||
|
||||
|
||||
#endif ; AQH_AVR_ILI9341_FONT6X8_1_ASM
|
||||
|
||||
@@ -7,108 +7,53 @@
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_ILI9341_GRAPHOPS_ASM
|
||||
#define AQH_AVR_ILI9341_GRAPHOPS_ASM
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ili9341SetAddressWindow
|
||||
; @routine Display_FillRect @global
|
||||
;
|
||||
; @param r5:r4 X0
|
||||
; @param r7:r6 Y0
|
||||
; @param r9:r8 W
|
||||
; @param r11:r10 H
|
||||
; @clobbers R16, r20, r21
|
||||
|
||||
ili9341SetAddressWindow:
|
||||
; calc XEnd (=X+W-1)
|
||||
mov r20, r8
|
||||
mov r21, r9
|
||||
add r20, r4
|
||||
adc r21, r5
|
||||
subi r20, 1
|
||||
sbci r21, 0
|
||||
|
||||
; send column address
|
||||
ldi r16, ILI9341_CMD_CASET
|
||||
rcall ili9341SendCommand
|
||||
; X0
|
||||
mov r16, r5
|
||||
rcall ili9341SendData
|
||||
mov r16, r4
|
||||
rcall ili9341SendData
|
||||
; X1
|
||||
mov r16, r21
|
||||
rcall ili9341SendData
|
||||
mov r16, r20
|
||||
rcall ili9341SendData
|
||||
|
||||
; calc YEnd (=Y+H-1)
|
||||
mov r20, r10
|
||||
mov r21, r11
|
||||
add r20, r6
|
||||
adc r21, r7
|
||||
subi r20, 1
|
||||
sbci r21, 0
|
||||
|
||||
; send row address
|
||||
ldi r16, ILI9341_CMD_PASET
|
||||
rcall ili9341SendCommand
|
||||
; Y0
|
||||
mov r16, r7
|
||||
rcall ili9341SendData
|
||||
mov r16, r6
|
||||
rcall ili9341SendData
|
||||
; Y1
|
||||
mov r16, r21
|
||||
rcall ili9341SendData
|
||||
mov r16, r20
|
||||
rcall ili9341SendData
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ILI9341_FillRect
|
||||
; @param r3:r2 color
|
||||
; @param r5:r4 X0
|
||||
; @param r7:r6 Y0
|
||||
; @param r9:r8 X1/W
|
||||
; @param r11:r10 Y1/H
|
||||
; @clobbers R16, R17, R20, R21, R22, R23, R24, R25
|
||||
|
||||
ILI9341_FillRect:
|
||||
Display_FillRect:
|
||||
push r15
|
||||
in r15, SREG
|
||||
cli
|
||||
|
||||
rcall ili9341BeginSpi ; (R16, R17)
|
||||
rcall ili9341SetAddressWindow ; (R16, r20, r21)
|
||||
rcall ili9341BeginSpi ; (R16, R17)
|
||||
rcall ili9341SetAddressWindow ; (R16, r20, r21)
|
||||
|
||||
mov r18, r2 ; color
|
||||
mov r19, r3
|
||||
mov r22, r10 ; H low
|
||||
mov r23, r11 ; H high
|
||||
ldi r16, ILI9341_CMD_RAMWR ; start writing ro RAM
|
||||
rcall ili9341SendCommand
|
||||
ldi r16, ILI9341_CMD_RAMWR ; start writing ro RAM
|
||||
rcall ili9341SendCommand ; (R16)
|
||||
|
||||
cbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS low
|
||||
sbi ILI9341_DC_OUTPUT, ILI9341_DC_PIN ; D high (DATA)
|
||||
ILI9341_FillRect_loopH:
|
||||
Display_FillRect_loopH:
|
||||
mov r24, r8 ; W low
|
||||
mov r25, r9 ; W high
|
||||
ILI9341_FillRect_loopW:
|
||||
mov r16, r19
|
||||
rcall SPIHW_MasterTransfer
|
||||
mov r16, r18
|
||||
rcall SPIHW_MasterTransfer
|
||||
Display_FillRect_loopW:
|
||||
mov r16, r3
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r16, r2
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
sbiw r25:r24, 1
|
||||
brne ILI9341_FillRect_loopW
|
||||
mov r24, r22 ; H low
|
||||
mov r25, r23 ; H high
|
||||
brne Display_FillRect_loopW
|
||||
mov r24, r22 ; remaining H low
|
||||
mov r25, r23 ; remaining H high
|
||||
sbiw r25:r24, 1 ; dec
|
||||
mov r22, r24 ; save in r23:r22
|
||||
mov r23, r25
|
||||
brne ILI9341_FillRect_loopH
|
||||
sbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS high
|
||||
brne Display_FillRect_loopH
|
||||
sbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS high
|
||||
rcall ili9341EndSpi
|
||||
out SREG, r15
|
||||
pop r15
|
||||
@@ -118,7 +63,212 @@ ILI9341_FillRect_loopW:
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ili9341BitBlit
|
||||
; @routine Display_DrawRect @global
|
||||
;
|
||||
; @param r3:r2 color
|
||||
; @param r5:r4 X
|
||||
; @param r7:r6 Y
|
||||
; @param r9:r8 W
|
||||
; @param r11:r10 H
|
||||
|
||||
Display_DrawRect:
|
||||
push r15
|
||||
in r15, SREG
|
||||
cli
|
||||
|
||||
; upper H line
|
||||
rcall Display_DrawHLine ; (R16, R17, R20, R21, R24, R25)
|
||||
|
||||
push r6 ; save Y0
|
||||
push r7
|
||||
add r6, r10 ; Y+=(H-1)
|
||||
adc r7, r11
|
||||
ldi r16, 1
|
||||
clr r17
|
||||
sub r6, r16
|
||||
sbc r7, r17
|
||||
; lower H line
|
||||
rcall Display_DrawHLine
|
||||
pop r7
|
||||
pop r6
|
||||
|
||||
; left V line
|
||||
rcall Display_DrawVLine
|
||||
|
||||
push r4 ; save X0
|
||||
push r5
|
||||
add r4, r8 ; X+=W-1
|
||||
adc r5, r9
|
||||
ldi r16, 1
|
||||
clr r17
|
||||
sub r4, r16
|
||||
sbc r5, r17
|
||||
; right V line
|
||||
rcall Display_DrawVLine
|
||||
pop r5
|
||||
pop r4
|
||||
|
||||
out SREG, r15
|
||||
pop r15
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Display_DrawHLine @global
|
||||
;
|
||||
; @param r3:r2 color
|
||||
; @param r5:r4 X
|
||||
; @param r7:r6 Y
|
||||
; @param r9:r8 W
|
||||
; @clobbers R16, R17, R20, R21, R24, R25
|
||||
|
||||
Display_DrawHLine:
|
||||
push r15
|
||||
in r15, SREG
|
||||
cli
|
||||
|
||||
push r10
|
||||
push r11
|
||||
clr r10
|
||||
inc r10 ; height is 1
|
||||
clr r11
|
||||
rcall ili9341BeginSpi ; (R16, R17)
|
||||
rcall ili9341SetAddressWindow ; (R16, r20, r21)
|
||||
pop r11
|
||||
pop r10
|
||||
mov r24, r8 ; W low
|
||||
mov r25, r9 ; W high
|
||||
rcall displaySendColor ; (R16)
|
||||
|
||||
rcall ili9341EndSpi
|
||||
out SREG, r15
|
||||
pop r15
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Display_DrawVLine @global
|
||||
;
|
||||
; @param r3:r2 color
|
||||
; @param r5:r4 X0
|
||||
; @param r7:r6 Y0
|
||||
; @param r11:r10 H
|
||||
; @clobbers R16, R17, R20, R21, R24, R25
|
||||
|
||||
Display_DrawVLine:
|
||||
push r15
|
||||
in r15, SREG
|
||||
cli
|
||||
|
||||
push r8
|
||||
push r9
|
||||
clr r8
|
||||
inc r8 ; width is 1
|
||||
clr r9
|
||||
rcall ili9341BeginSpi ; (R16, R17)
|
||||
rcall ili9341SetAddressWindow ; (R16, r20, r21)
|
||||
pop r9
|
||||
pop r8
|
||||
mov r24, r10 ; H low
|
||||
mov r25, r11 ; H high
|
||||
rcall displaySendColor ; (R16)
|
||||
|
||||
rcall ili9341EndSpi
|
||||
out SREG, r15
|
||||
pop r15
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine displaySendColor
|
||||
|
||||
; @param r25:r24 number of pixel to write
|
||||
; @param r3:r2 color to write
|
||||
; @clobbers r16
|
||||
|
||||
displaySendColor:
|
||||
ldi r16, ILI9341_CMD_RAMWR ; start writing ro RAM
|
||||
rcall ili9341SendCommand ; (R16)
|
||||
|
||||
cbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS low
|
||||
sbi ILI9341_DC_OUTPUT, ILI9341_DC_PIN ; D high (DATA)
|
||||
displaySendColor_loop:
|
||||
mov r16, r3
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r16, r2
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
sbiw r25:r24, 1
|
||||
brne displaySendColor_loop
|
||||
sbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS high
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Display_DrawChar @global
|
||||
|
||||
; @param R16 character to write
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @param Z pointer to font
|
||||
; @return R18 width of char written (in pixel)
|
||||
; @return R19 height of char written (in pixel)
|
||||
; @clobbers any, !Z
|
||||
|
||||
Display_DrawChar:
|
||||
push r15
|
||||
in r15, SREG
|
||||
cli
|
||||
|
||||
push zl
|
||||
push zh
|
||||
mov r22, r16 ; save char to R22
|
||||
adiw zh:zl, FONT_OFFS_WIDTH
|
||||
lpm r8, Z+ ; char width in pixels
|
||||
clr r9
|
||||
lpm r10, Z ; char height in pixels
|
||||
clr r11
|
||||
sbiw zh:zl, FONT_OFFS_WIDTH+1
|
||||
|
||||
rcall ili9341BeginSpi ; (r16, r17)
|
||||
rcall ili9341SetAddressWindow ; (R16, R20, R21)
|
||||
|
||||
ldi r16, ILI9341_CMD_RAMWR ; start writing ro RAM
|
||||
rcall ili9341SendCommand ; (R16)
|
||||
|
||||
cbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS low
|
||||
sbi ILI9341_DC_OUTPUT, ILI9341_DC_PIN ; D high (DATA)
|
||||
|
||||
mov r16, r22 ; char to write
|
||||
rcall FONT_RenderChar ; (any)
|
||||
pop zh
|
||||
pop zl
|
||||
|
||||
sbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS high
|
||||
rcall ili9341EndSpi ; (R16)
|
||||
|
||||
out SREG, r15
|
||||
pop r15
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Display_BitBlit @global
|
||||
|
||||
; @param r5:r4 X (dest)
|
||||
; @param r7:r6 Y (dest)
|
||||
@@ -127,7 +277,7 @@ ILI9341_FillRect_loopW:
|
||||
; @param X source data pointer (RAM)
|
||||
; @clobbers r16, r22, r23, r24, r25, X (r17, r20, r21)
|
||||
|
||||
ili9341BitBlit:
|
||||
Display_BitBlit:
|
||||
push r15
|
||||
in r15, SREG
|
||||
cli
|
||||
@@ -138,30 +288,30 @@ ili9341BitBlit:
|
||||
ldi r16, ILI9341_CMD_RAMWR ; start writing ro RAM
|
||||
rcall ili9341SendCommand
|
||||
|
||||
mov r22, r10
|
||||
mov r22, r10 ; store remaining height
|
||||
mov r23, r11
|
||||
cbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS low
|
||||
sbi ILI9341_DC_OUTPUT, ILI9341_DC_PIN ; D high (DATA)
|
||||
ili9341BitBlit_loopH:
|
||||
mov r24, r8
|
||||
Display_BitBlit_loopH:
|
||||
mov r24, r8 ; r25:r24=width in pixel
|
||||
mov r25, r9
|
||||
ili9341BitBlit_loopW:
|
||||
ld r18, X+
|
||||
Display_BitBlit_loopW:
|
||||
ld r18, X+ ; read color from X
|
||||
ld r19, X+
|
||||
mov r16, r19
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r16, r18
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
sbiw r25:r24, 1
|
||||
brne ili9341BitBlit_loopW
|
||||
brne Display_BitBlit_loopW
|
||||
mov r24, r22
|
||||
mov r25, r23
|
||||
sbiw r25:r24, 1
|
||||
mov r22, r24
|
||||
mov r23, r25
|
||||
brne ili9341BitBlit_loopH
|
||||
sbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS high
|
||||
rcall ili9341EndSpi ; (R16)
|
||||
brne Display_BitBlit_loopH
|
||||
sbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS high
|
||||
rcall ili9341EndSpi ; (R16)
|
||||
out SREG, r15
|
||||
pop r15
|
||||
ret
|
||||
@@ -333,4 +483,105 @@ ili9341BitBlitStretchNWriteLine_loop2:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ili9341SetAddressWindow
|
||||
;
|
||||
; @param r5:r4 X0
|
||||
; @param r7:r6 Y0
|
||||
; @param r9:r8 W
|
||||
; @param r11:r10 H
|
||||
; @clobbers R16, r20, r21
|
||||
|
||||
ili9341SetAddressWindow:
|
||||
rcall ili9341SetColumnAddress ; (R16, r20, r21)
|
||||
rcall ili9341SetRowAddress ; (R16, r20, r21)
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ili9341SetColumnAddress
|
||||
;
|
||||
; @param r5:r4 X0
|
||||
; @param r9:r8 W
|
||||
; @clobbers R16, r20, r21
|
||||
|
||||
ili9341SetColumnAddress:
|
||||
; calc XEnd (=X+W-1)
|
||||
mov r20, r8
|
||||
mov r21, r9
|
||||
add r20, r4
|
||||
adc r21, r5
|
||||
subi r20, 1
|
||||
sbci r21, 0
|
||||
|
||||
; send column address
|
||||
ldi r16, ILI9341_CMD_CASET
|
||||
rcall ili9341SendCommand ; (R16)
|
||||
|
||||
cbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS low
|
||||
sbi ILI9341_DC_OUTPUT, ILI9341_DC_PIN ; D high (DATA)
|
||||
|
||||
; Xstart
|
||||
mov r16, r5
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r16, r4
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
; Xend
|
||||
mov r16, r21
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r16, r20
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
|
||||
sbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS high
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ili9341SetRowAddress
|
||||
;
|
||||
; @param r7:r6 Y0
|
||||
; @param r11:r10 H
|
||||
; @clobbers R16, r20, r21
|
||||
|
||||
ili9341SetRowAddress:
|
||||
; calc YEnd (=Y+H-1)
|
||||
mov r20, r10
|
||||
mov r21, r11
|
||||
add r20, r6
|
||||
adc r21, r7
|
||||
subi r20, 1
|
||||
sbci r21, 0
|
||||
|
||||
; send row address
|
||||
ldi r16, ILI9341_CMD_PASET
|
||||
rcall ili9341SendCommand ; (R16)
|
||||
|
||||
cbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS low
|
||||
sbi ILI9341_DC_OUTPUT, ILI9341_DC_PIN ; D high (DATA)
|
||||
|
||||
; Ystart
|
||||
mov r16, r7
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r16, r6
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
; Yend
|
||||
mov r16, r21
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r16, r20
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
|
||||
sbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS high
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_ILI9341_GRAPHOPS_ASM
|
||||
|
||||
|
||||
19
avr/modules/lcd2/ili9341/images.asm
Normal file
19
avr/modules/lcd2/ili9341/images.asm
Normal file
@@ -0,0 +1,19 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_ILI9341_IMAGES_ASM
|
||||
#define AQH_AVR_ILI9341_IMAGES_ASM
|
||||
|
||||
|
||||
|
||||
.equ DISPLAY_IMAGETYPE_IDX2 = 1 ; 2 bit indexed image
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -7,6 +7,11 @@
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_ILI9341_IO_SPI_ASM
|
||||
#define AQH_AVR_ILI9341_IO_SPI_ASM
|
||||
|
||||
|
||||
|
||||
; generally we use the following parameters here:
|
||||
; @param r1:r0 background color
|
||||
; @param r3:r2 foreground color
|
||||
@@ -59,7 +64,7 @@ ILI9341IoInit:
|
||||
ili9341BeginSpi:
|
||||
ldi r16, ILI9341_SPIMODE
|
||||
ldi r17, ILI9341_DEVICENUM
|
||||
rjmp SPIHW_MasterStart ; (R18)
|
||||
rjmp SPIHW_MasterStart ; (R17)
|
||||
; @end
|
||||
|
||||
|
||||
@@ -75,17 +80,31 @@ ili9341EndSpi:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ili9341SendCommand
|
||||
;
|
||||
; @param r16 byte to send
|
||||
; @return r16 byte received
|
||||
; @clobbers r16
|
||||
|
||||
ili9341SendCommand:
|
||||
cbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS low
|
||||
cbi ILI9341_DC_OUTPUT, ILI9341_DC_PIN ; D low
|
||||
nop
|
||||
rcall SPIHW_MasterTransfer
|
||||
rcall SPIHW_MasterTransfer ; (none)
|
||||
sbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS low
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ili9341SendData
|
||||
;
|
||||
; @param r16 byte to send
|
||||
; @return r16 byte received
|
||||
; @clobbers r16
|
||||
|
||||
ili9341SendData:
|
||||
cbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS low
|
||||
sbi ILI9341_DC_OUTPUT, ILI9341_DC_PIN ; D high
|
||||
@@ -96,7 +115,12 @@ ili9341SendData:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ili9341Send16BitData
|
||||
;
|
||||
; @param r19:18 data
|
||||
; @clobbers r16
|
||||
|
||||
ili9341Send16BitData:
|
||||
cbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS low
|
||||
sbi ILI9341_DC_OUTPUT, ILI9341_DC_PIN ; D high
|
||||
@@ -110,3 +134,5 @@ ili9341Send16BitData:
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_ILI9341_IO_SPI_ASM
|
||||
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_ILI9341_MAIN_ASM
|
||||
#define AQH_AVR_ILI9341_MAIN_ASM
|
||||
|
||||
|
||||
|
||||
; generally we use the following parameters here:
|
||||
; @param r1:r0 background color
|
||||
; @param r3:r2 foreground color
|
||||
@@ -14,6 +19,8 @@
|
||||
; @param r7:r6 Y0
|
||||
; @param r9:r8 X1/W
|
||||
; @param r11:r10 Y1/H
|
||||
; @param r13:r12 source data width in bytes (for bit blit, i.e. byte offset from
|
||||
; one source data line to the next)
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
@@ -65,7 +72,7 @@ ILI9341_Fini:
|
||||
; Z=byte pointer to command list (as for LPM)
|
||||
|
||||
ili9341SendCommands:
|
||||
rcall ili9341BeginSpi
|
||||
rcall ili9341BeginSpi ; (R16, R17)
|
||||
ili9341SendCommands_loop1:
|
||||
lpm r16, Z+ ; read command
|
||||
lpm r18, Z+ ; read number of args
|
||||
@@ -113,7 +120,7 @@ ILI9341_Reset:
|
||||
rcall Utils_WaitForMilliSecs
|
||||
|
||||
rcall ili9341BeginSpi
|
||||
ldi r16, 0x29
|
||||
ldi r16, 0x29 ; display on
|
||||
rcall ili9341SendCommand
|
||||
rcall ili9341EndSpi
|
||||
|
||||
@@ -138,7 +145,7 @@ ILI9341_SetBacklight:
|
||||
ret
|
||||
ILI9341_SetBacklight_on:
|
||||
sbi ILI9341_LED_OUTPUT, ILI9341_LED_PIN
|
||||
|
||||
ret ; DEBUG
|
||||
push r16
|
||||
rcall ili9341BeginSpi
|
||||
|
||||
@@ -168,18 +175,29 @@ ILI9341_SetBacklight_on:
|
||||
|
||||
ILI9341_LeaveSleepMode:
|
||||
rcall ili9341BeginSpi
|
||||
|
||||
ldi r16, 0x11 ; sleep out
|
||||
rcall ili9341SendCommand
|
||||
rcall ili9341EndSpi
|
||||
ldi r16, 5
|
||||
ldi r16, 120
|
||||
rcall Utils_WaitForMilliSecs
|
||||
|
||||
rcall ili9341BeginSpi
|
||||
ldi r16, 0x38 ; idle mode off
|
||||
rcall ili9341SendCommand
|
||||
rcall ili9341EndSpi
|
||||
|
||||
rcall ili9341BeginSpi
|
||||
ldi r16, 0x13 ; normal mode on
|
||||
rcall ili9341SendCommand
|
||||
rcall ili9341EndSpi
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
ili9341InitCommands:
|
||||
#if 1
|
||||
; display off
|
||||
.db 0x28, 0
|
||||
; PowerCtlA
|
||||
@@ -228,4 +246,33 @@ ili9341InitCommands:
|
||||
; end
|
||||
.db 0xff, 0xff
|
||||
|
||||
#else
|
||||
.db 0xef, 3, 0x03, 0x80, 0x02, 0x00
|
||||
.db 0xcf, 3, 0x00, 0xc1, 0x30, 0x00
|
||||
.db 0xed, 4, 0x64, 0x03, 0x12, 0x81
|
||||
.db 0xe8, 3, 0x85, 0x00, 0x78, 0x00
|
||||
.db 0xcb, 5, 0x39, 0x2c, 0x00, 0x34, 0x02, 0x00
|
||||
.db 0xf7, 1, 0x20, 0x00
|
||||
.db 0xea, 2, 0x00, 0x00
|
||||
.db 0xc0, 1, 0x23, 0x00
|
||||
.db 0xc1, 1, 0x10, 0x00
|
||||
.db 0xc5, 2, 0x3e, 0x28
|
||||
; .db 0xc7, 1, 0x86, 0x00
|
||||
.db 0xc7, 1, 0xb7, 0x00
|
||||
.db 0x36, 1, 0b11101000, 0x00
|
||||
.db 0x3a, 1, 0x55, 0x00
|
||||
.db 0xb1, 2, 0x00, ILI9341_FRAMERATE_100_HZ
|
||||
.db 0xb6, 3, 0x08, 0x82, 0x27, 0x00
|
||||
.db 0xf2, 1, 0x00, 0x00
|
||||
.db 0x26, 1, 0x01, 0x00
|
||||
.db 0xe0, 15, 0x0f, 0x31, 0x2b, 0x0c, 0x0e, 0x08, 0x4e, 0xf1
|
||||
.db 0x37, 0x07, 0x10, 0x03, 0x0e, 0x09, 0x00, 0x00
|
||||
.db 0xe1, 15, 0x00, 0x0e, 0x14, 0x03, 0x11, 0x07, 0x31, 0xc1
|
||||
.db 0x48, 0x08, 0x0f, 0x0c, 0x31, 0x36, 0x0f, 0x00
|
||||
; end
|
||||
.db 0xff, 0xff
|
||||
|
||||
|
||||
#endif ; AQH_AVR_ILI9341_MAIN_ASM
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine ili9341_WriteCharacterX1At
|
||||
|
||||
@@ -256,4 +257,4 @@ Debug_WriteHexBuffer_loop:
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif ; if 0
|
||||
|
||||
16
avr/modules/lcd2/staticgui/0BUILD
Normal file
16
avr/modules/lcd2/staticgui/0BUILD
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml?>
|
||||
|
||||
<gwbuild>
|
||||
|
||||
<extradist>
|
||||
defs.asm
|
||||
dialog.asm
|
||||
main.asm
|
||||
style.asm
|
||||
titlewindow.asm
|
||||
window.asm
|
||||
</extradist>
|
||||
|
||||
</gwbuild>
|
||||
|
||||
|
||||
13
avr/modules/lcd2/staticgui/TODO
Normal file
13
avr/modules/lcd2/staticgui/TODO
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
- Screen
|
||||
- functions:
|
||||
- show
|
||||
- unshow
|
||||
- touch
|
||||
- key
|
||||
- activeAreas:
|
||||
- x, y, w, h (in FLASH)
|
||||
- only small variable data in SRAM, no need for heap!
|
||||
|
||||
|
||||
65
avr/modules/lcd2/staticgui/defs.asm
Normal file
65
avr/modules/lcd2/staticgui/defs.asm
Normal file
@@ -0,0 +1,65 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_STATICGUI_DEFS_ASM
|
||||
#define AQH_AVR_STATICGUI_DEFS_ASM
|
||||
|
||||
|
||||
; all offsets in byte size (to be used with LPM)
|
||||
.equ WIN_F_OFFS_X_LO = 0
|
||||
.equ WIN_F_OFFS_X_HI = 1
|
||||
.equ WIN_F_OFFS_Y_LO = 2
|
||||
.equ WIN_F_OFFS_Y_HI = 3
|
||||
.equ WIN_F_OFFS_WIDTH_LO = 4
|
||||
.equ WIN_F_OFFS_WIDTH_HI = 5
|
||||
.equ WIN_F_OFFS_HEIGHT_LO = 6
|
||||
.equ WIN_F_OFFS_HEIGHT_HI = 7
|
||||
.equ WIN_F_SIZE = 8
|
||||
|
||||
.equ COLORWIN_F_OFFS_WIN = WIN_F_SIZE
|
||||
.equ COLORWIN_F_OFFS_BG_COLOR_LO = WIN_F_SIZE
|
||||
.equ COLORWIN_F_OFFS_BG_COLOR_HI = WIN_F_SIZE+1
|
||||
.equ COLORWIN_F_OFFS_FG_COLOR_LO = WIN_F_SIZE+2
|
||||
.equ COLORWIN_F_OFFS_FG_COLOR_HI = WIN_F_SIZE+3
|
||||
.equ COLORWIN_F_SIZE = WIN_F_SIZE+4
|
||||
|
||||
.equ TEXTWIN_F_OFFS_WIN = COLORWIN_F_SIZE
|
||||
.equ TEXTWIN_F_OFFS_FONT_LO = COLORWIN_F_SIZE
|
||||
.equ TEXTWIN_F_OFFS_FONT_HI = COLORWIN_F_SIZE+1
|
||||
.equ TEXTWIN_F_SIZE = COLORWIN_F_SIZE+2
|
||||
|
||||
|
||||
|
||||
.equ WIN_OFFS_X_LO = 0
|
||||
.equ WIN_OFFS_X_HI = 1
|
||||
.equ WIN_OFFS_Y_LO = 2
|
||||
.equ WIN_OFFS_Y_HI = 3
|
||||
.equ WIN_OFFS_WIDTH_LO = 4
|
||||
.equ WIN_OFFS_WIDTH_HI = 5
|
||||
.equ WIN_OFFS_HEIGHT_LO = 6
|
||||
.equ WIN_OFFS_HEIGHT_HI = 7
|
||||
.equ WIN_OFFS_BG_COL_LO = 8
|
||||
.equ WIN_OFFS_BG_COL_HI = 9
|
||||
.equ WIN_OFFS_FG_COL_LO = 10
|
||||
.equ WIN_OFFS_FG_COL_HI = 11
|
||||
.equ WIN_OFFS_FONT_LO = 12 ;byte address!
|
||||
.equ WIN_OFFS_FONT_HI = 13
|
||||
.equ WIN_SIZE = 14
|
||||
|
||||
|
||||
|
||||
.equ WIN_EVENT_DESTROY = 1
|
||||
.equ WIN_EVENT_SHOW = 2
|
||||
.equ WIN_EVENT_HIDE = 3
|
||||
.equ WIN_EVENT_DRAW = 4
|
||||
.equ WIN_EVENT_TIMER = 5
|
||||
|
||||
|
||||
#endif ; AQH_AVR_STATICGUI_DEFS_ASM
|
||||
|
||||
288
avr/modules/lcd2/staticgui/dialog.asm
Normal file
288
avr/modules/lcd2/staticgui/dialog.asm
Normal file
@@ -0,0 +1,288 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQHOME_AVR_MODS_STATICGUI_DIALOG_ASM
|
||||
#define AQHOME_AVR_MODS_STATICGUI_DIALOG_ASM
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; defines
|
||||
|
||||
.equ DIALOG_MAX_ACTIVE = 8
|
||||
|
||||
.equ DIALOG_OFFS_HANDLER_LO = 0
|
||||
.equ DIALOG_OFFS_HANDLER_HI = 1
|
||||
.equ DIALOG_OFFS_OPTIONS = 2
|
||||
.equ DIALOG_OFFS_COUNTER = 3
|
||||
.equ DIALOG_SIZE = 4
|
||||
|
||||
|
||||
.equ DIALOG_OPT_ACTIVE_BIT = 7
|
||||
|
||||
|
||||
.equ DIALOG_FN_INIT = 0
|
||||
.equ DIALOG_FN_FINI = 1
|
||||
.equ DIALOG_FN_SHOW = 2
|
||||
.equ DIALOG_FN_HIDE = 3
|
||||
.equ DIALOG_FN_DRAW = 4
|
||||
.equ DIALOG_FN_TOUCH = 5
|
||||
.equ DIALOG_FN_TIMER = 6
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; data
|
||||
|
||||
.dseg
|
||||
|
||||
dialogCurrent: .byte 2
|
||||
dialogStack: .byte DIALOG_MAX_ACTIVE*2
|
||||
dialogStackPos: .byte 1
|
||||
|
||||
dialogWindow: .byte WIN_SIZE
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine GraphApp_Init @global
|
||||
;
|
||||
|
||||
DialogMgr_Init:
|
||||
clr r16
|
||||
sts dialogStackPos, r16
|
||||
sts dialogCurrent, r16
|
||||
sts dialogCurrent+1, r16
|
||||
|
||||
ldi yl, LOW(dialogWindow)
|
||||
ldi yh, HIGH(dialogWindow)
|
||||
bigcall TitleWindow_Init
|
||||
|
||||
ldi zl, LOW(ili9341Font12x20_1*2)
|
||||
ldi zh, HIGH(ili9341Font12x20_1*2)
|
||||
std Y+WIN_OFFS_FONT_LO, zl
|
||||
std Y+WIN_OFFS_FONT_HI, zh
|
||||
|
||||
bigcall TitleWindow_SetFullSize
|
||||
bigcall TitleWindow_SetStyleColors
|
||||
|
||||
bigcall Window_Clear
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine DialogMgr_Every100ms @global
|
||||
;
|
||||
; Handle display touch events
|
||||
; Send timer event to every app in the stack (started with last added app).
|
||||
|
||||
DialogMgr_Every100ms:
|
||||
; check for touch input changes
|
||||
rcall Display_InputGetState ; r16=flags, r5:r4=x, r7:r6=y
|
||||
mov r17, r16
|
||||
andi r17, (1<<DISPLAY_IFLAGS_CHGCOORD_BIT) | (1<<DISPLAY_IFLAGS_CHGPRESS_BIT)
|
||||
breq DialogMgr_Every100ms_sendTimer
|
||||
ldi r23, DIALOG_FN_TOUCH
|
||||
rcall DialogMgr_CallCurrentHandler
|
||||
DialogMgr_Every100ms_sendTimer:
|
||||
; send timer event to all dialogs in stack
|
||||
ldi xl, LOW(dialogStack)
|
||||
ldi xh, HIGH(dialogStack)
|
||||
|
||||
lds r16, dialogStackPos
|
||||
mov r17, r16
|
||||
add r16, r16
|
||||
add xl, r16
|
||||
adc xh, r16
|
||||
sub xh, r16
|
||||
|
||||
DialogMgr_Every100ms_loop:
|
||||
tst r17
|
||||
breq DialogMgr_Every100ms_ret
|
||||
ld yh, -X
|
||||
ld yl, -X
|
||||
push xl
|
||||
push xh
|
||||
push r17
|
||||
ldi r23, DIALOG_FN_TIMER
|
||||
rcall DialogMgr_CallHandler
|
||||
pop r17
|
||||
pop xh
|
||||
pop xl
|
||||
dec r17
|
||||
rjmp DialogMgr_Every100ms_loop
|
||||
DialogMgr_Every100ms_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine DialogMgr_CallHandler @global
|
||||
;
|
||||
; @param Y pointer to app data
|
||||
; @param R23 number of function to call
|
||||
; @clobbers R16, R17, R22, X (any)
|
||||
|
||||
DialogMgr_CallHandler:
|
||||
ldi xl, LOW(dialogWindow)
|
||||
ldi xh, HIGH(dialogWindow)
|
||||
ldd r16, Y+DIALOG_OFFS_HANDLER_LO
|
||||
ldd r17, Y+DIALOG_OFFS_HANDLER_HI
|
||||
mov r22, r16
|
||||
and r22, r17
|
||||
breq DialogMgr_CallHandler_ret
|
||||
push r16
|
||||
push r17
|
||||
DialogMgr_CallHandler_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine DialogMgr_CallCurrentHandler @global
|
||||
;
|
||||
; @param X pointer to window
|
||||
; @param R23 number of function to call
|
||||
; @clobbers R22 (any)
|
||||
|
||||
DialogMgr_CallCurrentHandler:
|
||||
lds yl, dialogCurrent
|
||||
lds yh, dialogCurrent+1
|
||||
rjmp DialogMgr_CallHandler
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine DialogMgr_PushDialog @global
|
||||
;
|
||||
; @param Y pointer to app data
|
||||
;
|
||||
DialogMgr_PushDialog:
|
||||
lds r16, dialogStackPos
|
||||
cpi r16, DIALOG_MAX_ACTIVE
|
||||
brcc DialogMgr_PushDialog_ret
|
||||
|
||||
tst r16
|
||||
brne DialogMgr_PushDialog_push
|
||||
; deactivate previous app
|
||||
push yl
|
||||
push yh
|
||||
lds yl, dialogCurrent
|
||||
lds yh, dialogCurrent+1
|
||||
ldi r23, DIALOG_FN_HIDE
|
||||
rcall DialogMgr_CallHandler
|
||||
ldd r17, Y+DIALOG_OFFS_OPTIONS
|
||||
cbr r17, (1<<DIALOG_OPT_ACTIVE_BIT)
|
||||
std Y+DIALOG_OFFS_OPTIONS, r17
|
||||
pop yh
|
||||
pop yl
|
||||
|
||||
DialogMgr_PushDialog_push:
|
||||
lds r16, dialogStackPos
|
||||
add r17, r17 ; *2
|
||||
push xl
|
||||
push xh
|
||||
ldi xl, LOW(dialogStack)
|
||||
ldi xh, HIGH(dialogStack)
|
||||
add xl, r17
|
||||
adc xh, r17
|
||||
sub xh, r17
|
||||
st X+, yl
|
||||
st X, yh
|
||||
pop xh
|
||||
pop xl
|
||||
inc r16
|
||||
sts dialogStackPos, r16
|
||||
; activate new app
|
||||
ldd r17, Y+DIALOG_OFFS_OPTIONS
|
||||
ori r17, (1<<DIALOG_OPT_ACTIVE_BIT)
|
||||
std Y+DIALOG_OFFS_OPTIONS, r17
|
||||
ldi r23, DIALOG_FN_SHOW
|
||||
rcall DialogMgr_CallHandler
|
||||
sec
|
||||
DialogMgr_PushDialog_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine DialogMgr_PopDialog @global
|
||||
;
|
||||
; @return CFLAG set if app popped from stack, cleared otherwise
|
||||
; @return Y app popped from stack (if CFLAG set)
|
||||
|
||||
DialogMgr_PopDialog:
|
||||
lds r16, dialogStackPos
|
||||
tst r16
|
||||
clc
|
||||
brne DialogMgr_PopDialog_ret
|
||||
; deactivate previous app
|
||||
push yl
|
||||
push yh
|
||||
lds yl, dialogCurrent
|
||||
lds yh, dialogCurrent+1
|
||||
ldi r23, DIALOG_FN_HIDE
|
||||
rcall DialogMgr_CallHandler
|
||||
ldd r17, Y+DIALOG_OFFS_OPTIONS
|
||||
cbr r17, (1<<DIALOG_OPT_ACTIVE_BIT)
|
||||
std Y+DIALOG_OFFS_OPTIONS, r17
|
||||
pop yh
|
||||
pop yl
|
||||
|
||||
lds r16, dialogStackPos
|
||||
dec r16
|
||||
sts dialogStackPos, r16
|
||||
brne DialogMgr_PopDialog_pop
|
||||
clr r16
|
||||
sts dialogCurrent, r16
|
||||
sts dialogCurrent+1, r16
|
||||
sec
|
||||
rjmp DialogMgr_PopDialog_ret
|
||||
DialogMgr_PopDialog_pop:
|
||||
push xl
|
||||
push xh
|
||||
ldi xl, LOW(dialogStack)
|
||||
ldi xh, HIGH(dialogStack)
|
||||
add xl, r16
|
||||
adc xh, r16
|
||||
sub xh, r16
|
||||
ld yl, X+
|
||||
ld yh, X
|
||||
sts dialogCurrent, yl
|
||||
sts dialogCurrent+1, yh
|
||||
pop xh
|
||||
pop xl
|
||||
; activate new active app
|
||||
ldd r17, Y+DIALOG_OFFS_OPTIONS
|
||||
ori r17, (1<<DIALOG_OPT_ACTIVE_BIT)
|
||||
std Y+DIALOG_OFFS_OPTIONS, r17
|
||||
ldi r23, DIALOG_FN_SHOW
|
||||
rcall DialogMgr_CallHandler
|
||||
sec
|
||||
DialogMgr_PopDialog_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
#endif ; AQHOME_AVR_MODS_STATICGUI_DIALOG_ASM
|
||||
|
||||
27
avr/modules/lcd2/staticgui/main.asm
Normal file
27
avr/modules/lcd2/staticgui/main.asm
Normal file
@@ -0,0 +1,27 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_STATICGUI_MAIN_ASM
|
||||
#define AQH_AVR_STATICGUI_MAIN_ASM
|
||||
|
||||
|
||||
GUI_Init:
|
||||
sec
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
GUI_Every100ms:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_STATICGUI_MAIN_ASM
|
||||
24
avr/modules/lcd2/staticgui/style.asm
Normal file
24
avr/modules/lcd2/staticgui/style.asm
Normal file
@@ -0,0 +1,24 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_STATICGUI_STYLE_ASM
|
||||
#define AQH_AVR_STATICGUI_STYLE_ASM
|
||||
|
||||
|
||||
.equ STYLE_WIN_TITLE_BACKGROUND = DISPLAY_COLOR_NAVY
|
||||
.equ STYLE_WIN_TITLE_FOREGROUND = DISPLAY_COLOR_WHITE
|
||||
.equ STYLE_WIN_BACKGROUND = DISPLAY_COLOR_LIGHTGREY
|
||||
.equ STYLE_WIN_FOREGROUND = DISPLAY_COLOR_BLACK
|
||||
.equ STYLE_WIN_FONT = ili9341Font12x20_1
|
||||
|
||||
.equ STYLE_WIN_TITLE_HEIGHT = 24
|
||||
|
||||
|
||||
#endif ; AQH_AVR_STATICGUI_STYLE_ASM
|
||||
|
||||
158
avr/modules/lcd2/staticgui/titlewindow.asm
Normal file
158
avr/modules/lcd2/staticgui/titlewindow.asm
Normal file
@@ -0,0 +1,158 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_STATICGUI_TITLEWINDOW_ASM
|
||||
#define AQH_AVR_STATICGUI_TITLEWINDOW_ASM
|
||||
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_Init @global
|
||||
;
|
||||
; @param Y pointer to titledwindow data (size=TITLEWINDOW_SIZE)
|
||||
|
||||
TitleWindow_Init:
|
||||
bigcall Window_Init
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_SetFullSize @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers any, !Y
|
||||
|
||||
TitleWindow_SetFullSize:
|
||||
clr r16
|
||||
std Y+WIN_OFFS_X_LO, r16
|
||||
std Y+WIN_OFFS_X_HI, r16
|
||||
std Y+WIN_OFFS_Y_LO, r16
|
||||
std Y+WIN_OFFS_Y_HI, r16
|
||||
|
||||
ldi r16, LOW(DISPLAY_WIDTH)
|
||||
std Y+WIN_OFFS_WIDTH_LO, r16
|
||||
ldi r16, HIGH(DISPLAY_WIDTH)
|
||||
std Y+WIN_OFFS_WIDTH_HI, r16
|
||||
|
||||
ldi r16, LOW(DISPLAY_HEIGHT)
|
||||
std Y+WIN_OFFS_HEIGHT_LO, r16
|
||||
ldi r16, HIGH(DISPLAY_HEIGHT)
|
||||
std Y+WIN_OFFS_HEIGHT_HI, r16
|
||||
|
||||
ret
|
||||
; @enb
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_SetStyleColors @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers any, !Y
|
||||
|
||||
TitleWindow_SetStyleColors:
|
||||
ldi r16, LOW(STYLE_WIN_BACKGROUND)
|
||||
ldi r17, HIGH(STYLE_WIN_BACKGROUND)
|
||||
std Y+WIN_OFFS_BG_COL_LO, r16
|
||||
std Y+WIN_OFFS_BG_COL_HI, r17
|
||||
ldi r16, LOW(STYLE_WIN_FOREGROUND)
|
||||
ldi r17, HIGH(STYLE_WIN_FOREGROUND)
|
||||
std Y+WIN_OFFS_FG_COL_LO, r16
|
||||
std Y+WIN_OFFS_FG_COL_HI, r17
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_DrawTitle @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param Z pointer to title
|
||||
; @clobbers any, !Y
|
||||
|
||||
TitleWindow_DrawTitle:
|
||||
; fill background of title area
|
||||
clr r4
|
||||
clr r5
|
||||
clr r6
|
||||
clr r7
|
||||
ldd r8, Y+WIN_OFFS_WIDTH_LO
|
||||
ldd r9, Y+WIN_OFFS_WIDTH_HI
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT)
|
||||
ldi r17, HIGH(STYLE_WIN_TITLE_HEIGHT)
|
||||
mov r10, r16
|
||||
mov r11, r17
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_BACKGROUND)
|
||||
mov r2, r16
|
||||
ldi r16, HIGH(STYLE_WIN_TITLE_BACKGROUND)
|
||||
mov r3, r16
|
||||
rcall Window_FillRect
|
||||
|
||||
; draw title
|
||||
ldi r16, 5 ; X
|
||||
mov r4, r16
|
||||
clr r5
|
||||
ldi r16, 2 ; Y
|
||||
mov r6, r16
|
||||
clr r7
|
||||
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_BACKGROUND)
|
||||
mov r0, r16
|
||||
ldi r16, HIGH(STYLE_WIN_TITLE_BACKGROUND)
|
||||
mov r1, r16
|
||||
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_FOREGROUND)
|
||||
mov r2, r16
|
||||
ldi r16, HIGH(STYLE_WIN_TITLE_FOREGROUND)
|
||||
mov r3, r16
|
||||
bigcall Window_DrawColorTextFlash
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine TitleWindow_ClearContentArea @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers any, !Y
|
||||
|
||||
TitleWindow_ClearContentArea:
|
||||
clr r4
|
||||
clr r5
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT)
|
||||
mov r6, r16
|
||||
ldi r16, HIGH(STYLE_WIN_TITLE_HEIGHT)
|
||||
mov r7, r16
|
||||
ldd r8, Y+WIN_OFFS_WIDTH_LO
|
||||
ldd r9, Y+WIN_OFFS_WIDTH_HI
|
||||
ldi r16, LOW(STYLE_WIN_TITLE_HEIGHT)
|
||||
ldi r17, HIGH(STYLE_WIN_TITLE_HEIGHT)
|
||||
ldd r10, Y+WIN_OFFS_HEIGHT_LO
|
||||
ldd r11, Y+WIN_OFFS_HEIGHT_HI
|
||||
sub r10, r16
|
||||
sbc r11, r17
|
||||
ldi r16, LOW(STYLE_WIN_BACKGROUND)
|
||||
ldd r2, Y+WIN_OFFS_BG_COL_LO
|
||||
ldd r3, Y+WIN_OFFS_BG_COL_HI
|
||||
rcall Window_FillRect
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_STATICGUI_TITLEWINDOW2_ASM
|
||||
|
||||
512
avr/modules/lcd2/staticgui/window.asm
Normal file
512
avr/modules/lcd2/staticgui/window.asm
Normal file
@@ -0,0 +1,512 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_STATICGUI_WINDOW_ASM
|
||||
#define AQH_AVR_STATICGUI_WINDOW_ASM
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_Init @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers R16, R17, X
|
||||
|
||||
Window_Init:
|
||||
mov xl, yl
|
||||
mov xh, yh
|
||||
ldi r17, WIN_SIZE
|
||||
clr r16
|
||||
bigcall Utils_FillSram ; (R17, X)
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_Clear @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @clobbers any, !Y
|
||||
|
||||
Window_Clear:
|
||||
ldd r2, Y+WIN_OFFS_BG_COL_LO ; background color low
|
||||
ldd r3, Y+WIN_OFFS_BG_COL_HI ; background color high
|
||||
ldd r4, Y+WIN_OFFS_X_LO ; X low
|
||||
ldd r5, Y+WIN_OFFS_X_HI ; X high
|
||||
ldd r6, Y+WIN_OFFS_Y_LO ; Y low
|
||||
ldd r7, Y+WIN_OFFS_Y_HI ; Y high
|
||||
ldd r8, Y+WIN_OFFS_WIDTH_LO ; width low
|
||||
ldd r9, Y+WIN_OFFS_WIDTH_HI ; width high
|
||||
ldd r10, Y+WIN_OFFS_HEIGHT_LO ; height low
|
||||
ldd r11, Y+WIN_OFFS_HEIGHT_HI ; height high
|
||||
bigcall Display_FillRect
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_FillRect @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param r3:r2 color
|
||||
; @param r5:r4 X0
|
||||
; @param r7:r6 Y0
|
||||
; @param r9:r8 X1/W
|
||||
; @param r11:r10 Y1/H
|
||||
; @clobbers any, !Y
|
||||
|
||||
Window_FillRect:
|
||||
ldd r16, Y+WIN_OFFS_X_LO ; make absolute coords
|
||||
ldd r17, Y+WIN_OFFS_X_HI
|
||||
add r4, r16
|
||||
adc r5, r17
|
||||
ldd r16, Y+WIN_OFFS_Y_LO
|
||||
ldd r17, Y+WIN_OFFS_Y_HI
|
||||
add r6, r16
|
||||
adc r7, r17
|
||||
bigcall Display_FillRect ; directly call graphics function
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_DrawTextFlash @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return R5:R4 X pos behind string
|
||||
|
||||
; @clobbers any, !Y, !R6, !R7
|
||||
|
||||
Window_DrawTextFlash:
|
||||
ldd r0, Y+WIN_OFFS_BG_COL_LO
|
||||
ldd r1, Y+WIN_OFFS_BG_COL_HI
|
||||
ldd r2, Y+WIN_OFFS_FG_COL_LO
|
||||
ldd r3, Y+WIN_OFFS_FG_COL_HI
|
||||
|
||||
rjmp Window_DrawColorTextFlash
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_DrawColorTextFlash @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return R5:R4 X pos behind string
|
||||
|
||||
; @clobbers any, !Y, !R6, !R7
|
||||
|
||||
Window_DrawColorTextFlash:
|
||||
rcall winCalcAbsPosAndBorders ; (R18, R19)
|
||||
Window_DrawColorTextFlash_loop:
|
||||
lpm r16, Z
|
||||
tst r16
|
||||
breq Window_DrawColorTextFlash_loopEnd
|
||||
rcall winDrawChar
|
||||
brcc Window_DrawColorTextFlash_loopEnd
|
||||
adiw zh:zl, 1 ; next char
|
||||
rjmp Window_DrawColorTextFlash_loop
|
||||
Window_DrawColorTextFlash_loopEnd:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_DrawCharAt @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R16 char to write
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return R5:R4 X pos behind char
|
||||
; @clobbers any, !Y
|
||||
|
||||
Window_DrawCharAt:
|
||||
rcall winCalcAbsPosAndBorders
|
||||
|
||||
ldd r0, Y+WIN_OFFS_BG_COL_LO
|
||||
ldd r1, Y+WIN_OFFS_BG_COL_HI
|
||||
ldd r2, Y+WIN_OFFS_FG_COL_LO
|
||||
ldd r3, Y+WIN_OFFS_FG_COL_HI
|
||||
|
||||
rjmp winDrawChar
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine winCalcAbsPosAndBorders
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R5:R4 X relative to window
|
||||
; @param R7:R6 Y relative to window
|
||||
; @return R9:R8 first X pos right of windows
|
||||
; @return R5:R4 X relative to screen
|
||||
; @return R7:R6 Y relative to screen
|
||||
; @return R9:R8 first X pos right of window (abs)
|
||||
; @return R11:R10 first Y pos below window (abs)
|
||||
; @clobbers r18, r19
|
||||
|
||||
winCalcAbsPosAndBorders:
|
||||
; calc abs X pos
|
||||
ldd r18, Y+WIN_OFFS_X_LO
|
||||
ldd r19, Y+WIN_OFFS_X_HI
|
||||
add r4, r18 ; add X of window
|
||||
adc r5, r19
|
||||
|
||||
; calc first X pos behind window
|
||||
ldd r8, Y+WIN_OFFS_WIDTH_LO
|
||||
ldd r9, Y+WIN_OFFS_WIDTH_HI
|
||||
add r8, r18
|
||||
adc r9, r19
|
||||
|
||||
; calc abs Y pos
|
||||
ldd r18, Y+WIN_OFFS_Y_LO
|
||||
ldd r19, Y+WIN_OFFS_Y_HI
|
||||
add r6, r18 ; add Y of window
|
||||
adc r7, r19
|
||||
|
||||
; calc first Y pos behind window
|
||||
ldd r10, Y+WIN_OFFS_HEIGHT_LO
|
||||
ldd r11, Y+WIN_OFFS_HEIGHT_HI
|
||||
add r10, r18
|
||||
adc r11, r19
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine winDrawChar
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R16 char to write
|
||||
; @param R5:R4 absolute X on screen
|
||||
; @param R7:R6 absolute Y on screen
|
||||
; @param R9:R8 first X pos right of windows
|
||||
; @return R5:R4 X pos behind char
|
||||
; @clobbers any, !Y, !R6, !R7
|
||||
|
||||
winDrawChar:
|
||||
push zl
|
||||
push zh
|
||||
mov r12, r16
|
||||
ldd zl, Y+WIN_OFFS_FONT_LO
|
||||
ldd zh, Y+WIN_OFFS_FONT_HI
|
||||
|
||||
; check whether the char fits inside window
|
||||
bigcall FONT_GetCharWidth ; r16=char width
|
||||
|
||||
clr r17
|
||||
add r16, r4 ; char width+X
|
||||
adc r17, r5
|
||||
sub r16, r8 ; check against window width
|
||||
sbc r17, r9
|
||||
brcc winDrawChar_ret ; not fit, jmp
|
||||
|
||||
; actually draw char
|
||||
mov r16, r12
|
||||
push r8
|
||||
push r9
|
||||
push r10
|
||||
push r11
|
||||
bigcall Display_DrawChar
|
||||
pop r11
|
||||
pop r10
|
||||
pop r9
|
||||
pop r8
|
||||
clr r16
|
||||
add r4, r18 ; increment X
|
||||
adc r5, r16
|
||||
sec ; write succeeded
|
||||
winDrawChar_ret:
|
||||
pop zh
|
||||
pop zl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_WriteHexWordAt @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R17:R16 word to write
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return R5:R4 X pos behind string
|
||||
; @clobbers any, !Y
|
||||
|
||||
Window_WriteHexWordAt:
|
||||
push r16
|
||||
mov r16, r17
|
||||
rcall Window_WriteHexByteAt
|
||||
pop r16
|
||||
rcall Window_WriteHexByteAt
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_WriteHexByteAt @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R16 byte to write
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return R5:R4 X pos behind string
|
||||
; @clobbers any, !Y
|
||||
|
||||
Window_WriteHexByteAt:
|
||||
push r16
|
||||
swap r16
|
||||
rcall winWriteNibble
|
||||
pop r16
|
||||
rcall winWriteNibble
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
winWriteNibble:
|
||||
push r4
|
||||
push r5
|
||||
push r6
|
||||
push r7
|
||||
rcall winNibbleToAscii ; write high nibble (r16, r17)
|
||||
rcall Window_DrawCharAt ; draw
|
||||
pop r7
|
||||
pop r6
|
||||
pop r5
|
||||
pop r4
|
||||
clr r17
|
||||
add r4, r18
|
||||
adc r5, r17
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine winNibbleToAscii
|
||||
;
|
||||
; Convert a nibble to an ASCII char.
|
||||
; @return R16 ASCII representation of that nibble (e.g. '0' for 0)
|
||||
; @param R16 byte (in bits 0-3)
|
||||
; @clobbers r16, r17
|
||||
|
||||
winNibbleToAscii:
|
||||
andi r16, 0xf
|
||||
cpi r16, 10
|
||||
brcs winNibbleToAscii_l1
|
||||
ldi r17, 7
|
||||
add r16, r17
|
||||
winNibbleToAscii_l1:
|
||||
ldi r17, '0'
|
||||
add r16, r17
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_DrawTextFlash @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return R5:R4 X pos behind string
|
||||
; @return R7:R6 Y pos behind string
|
||||
; @clobbers any, !Y
|
||||
|
||||
Window_DrawTextFlash:
|
||||
; calc abs X pos
|
||||
ldd r18, Y+WIN_OFFS_X_LO
|
||||
ldd r19, Y+WIN_OFFS_X_HI
|
||||
add r4, r18 ; add X of window
|
||||
adc r5, r19
|
||||
|
||||
; calc first X pos behind window
|
||||
ldd r8, Y+WIN_OFFS_WIDTH_LO
|
||||
ldd r9, Y+WIN_OFFS_WIDTH_HI
|
||||
add r8, r18
|
||||
adc r9, r19
|
||||
|
||||
; calc abs Y pos
|
||||
ldd r18, Y+WIN_OFFS_Y_LO
|
||||
ldd r19, Y+WIN_OFFS_Y_HI
|
||||
add r6, r18 ; add Y of window
|
||||
adc r7, r19
|
||||
|
||||
; calc first Y pos behind window
|
||||
ldd r10, Y+WIN_OFFS_HEIGHT_LO
|
||||
ldd r11, Y+WIN_OFFS_HEIGHT_HI
|
||||
add r10, r18
|
||||
adc r11, r19
|
||||
|
||||
Window_DrawTextFlash_loop:
|
||||
push zl
|
||||
push zh
|
||||
rcall winCalcLengthWordFlash
|
||||
pop zh
|
||||
pop zl
|
||||
mov r18, r4
|
||||
mov r19, r5
|
||||
add r18, r12
|
||||
adc r19, r13
|
||||
sub r18, r8
|
||||
sbc r19, r9
|
||||
brcs Window_DrawTextFlash_xOkay
|
||||
; we need to go to the beginning of the next line
|
||||
rcall Window_DrawTextFlash_nextLine
|
||||
brcc Window_DrawTextFlash_loopEnd ; outside the window, jmp
|
||||
Window_DrawTextFlash_xOkay:
|
||||
rcall winDrawWordFlash ; Z points at blank/0 byte after call
|
||||
lpm r16, Z+
|
||||
tst r16 ; end of string?
|
||||
breq Window_DrawTextFlash_loopEnd
|
||||
cpi r16, 13
|
||||
breq Window_DrawTextFlash_handle13
|
||||
; insert other handled chars here
|
||||
; write blank char
|
||||
push zl
|
||||
push zh
|
||||
ldd zl, Y+WIN_OFFS_FONT_LO
|
||||
ldd zh, Y+WIN_OFFS_FONT_HI
|
||||
ldi r16, 32 ; space
|
||||
bigcall Display_DrawChar
|
||||
pop zh
|
||||
pop zl
|
||||
add r4, r8 ; increment X
|
||||
adc r5, r9
|
||||
|
||||
|
||||
rjmp Window_DrawTextFlash_loopNext
|
||||
Window_DrawTextFlash_handle13:
|
||||
rcall Window_DrawTextFlash_nextLine
|
||||
Window_DrawTextFlash_loopNext:
|
||||
rjmp Window_DrawTextFlash_loop
|
||||
Window_DrawTextFlash_nextLine:
|
||||
push zl
|
||||
push zh
|
||||
ldd zl, Y+WIN_OFFS_FONT_LO
|
||||
ldd zh, Y+WIN_OFFS_FONT_HI
|
||||
bigcall FONT_GetCharWidth ; r16=char width
|
||||
pop zh
|
||||
pop zl
|
||||
ldd r4, Y+WIN_OFFS_X_LO ; X=left border
|
||||
ldd r5, Y+WIN_OFFS_X_HI
|
||||
clr r17
|
||||
add r6, r16 ; increment Y by font height
|
||||
adc r7, r17
|
||||
mov r16, r6 ; check against lower border of window
|
||||
mov r17, r7
|
||||
sub r16, r10
|
||||
sbc r17, r11 ; CF set if inside window, cleared otherwise
|
||||
ret
|
||||
Window_DrawTextFlash_loopEnd:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine winDrawWordFlash
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param Z pointer to string in FLASH
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @return r5:r4 next X pos
|
||||
; @return Z pointer to next char behind current word
|
||||
; @clobbers any, !Y, !r1-r15
|
||||
|
||||
winDrawWordFlash:
|
||||
winDrawWordFlash_loop:
|
||||
lpm r16, Z
|
||||
cpi r16, 33
|
||||
brcs winDrawWordFlash_ret
|
||||
push zl
|
||||
push zh
|
||||
ldd zl, Y+WIN_OFFS_FONT_LO
|
||||
ldd zh, Y+WIN_OFFS_FONT_HI
|
||||
bigcall Display_DrawChar
|
||||
pop zh
|
||||
pop zl
|
||||
clr r16
|
||||
add r4, r18 ; increment X
|
||||
adc r5, r16
|
||||
adiw zh:zl, 1
|
||||
rjmp winDrawWordFlash_loop
|
||||
winDrawWordFlash_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine winCalcLengthWordFlash
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param Z pointer to string in FLASH
|
||||
; @return r13:r12 width of next word in pixels
|
||||
; @return Z pointer to next char behind current word
|
||||
; @clobbers any, !Y, !r1-r11, !r14, !r15
|
||||
|
||||
winCalcLengthWordFlash:
|
||||
clr r12
|
||||
clr r13
|
||||
winCalcLengthWordFlash_loop:
|
||||
lpm r16, Z
|
||||
cpi r16, 33
|
||||
brcs winCalcLengthWordFlash_ret
|
||||
push zl
|
||||
push zh
|
||||
ldd zl, Y+WIN_OFFS_FONT_LO
|
||||
ldd zh, Y+WIN_OFFS_FONT_HI
|
||||
bigcall FONT_GetCharWidth ; r16=char width
|
||||
clr r17
|
||||
add r12, r16
|
||||
adc r13, r17
|
||||
pop zh
|
||||
pop zl
|
||||
brcs winCalcLengthWordFlash_error
|
||||
adiw zh:zl, 1 ; next char
|
||||
rjmp winCalcLengthWordFlash_loop
|
||||
winCalcLengthWordFlash_error:
|
||||
ldi r12, 0xff
|
||||
ldi r13, 0xff
|
||||
winCalcLengthWordFlash_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
#endif ; if 0
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_STATICGUI_WINDOW_ASM
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_WIN_H
|
||||
#define AQH_AVR_WIN_H
|
||||
#ifndef AQH_AVR_WIN_DEFS_H
|
||||
#define AQH_AVR_WIN_DEFS_H
|
||||
|
||||
|
||||
; tree/list data
|
||||
@@ -18,15 +18,14 @@
|
||||
.equ OBJ_OFFS_OBJECT = OBJ_OFFS_TREE+TREE_SIZE
|
||||
.equ OBJ_OFFS_HANDLERFN_LO = OBJ_OFFS_OBJECT
|
||||
.equ OBJ_OFFS_HANDLERFN_HI = OBJ_OFFS_OBJECT+1
|
||||
.equ OBJ_OFFS_LINKS_LO = OBJ_OFFS_OBJECT+2
|
||||
.equ OBJ_OFFS_LINKS_HI = OBJ_OFFS_OBJECT+3
|
||||
.equ OBJ_OFFS_TIMERS_LO = OBJ_OFFS_OBJECT+4
|
||||
.equ OBJ_OFFS_TIMERS_HI = OBJ_OFFS_OBJECT+5
|
||||
.equ OBJ_OFFS_OPTIONS = OBJ_OFFS_OBJECT+6
|
||||
.equ OBJ_OFFS_SIZE = OBJ_OFFS_OBJECT+7
|
||||
.equ OBJ_OFFS_TARGET_LO = OBJ_OFFS_OBJECT+2
|
||||
.equ OBJ_OFFS_TARGET_HI = OBJ_OFFS_OBJECT+3
|
||||
.equ OBJ_OFFS_IDFORTARGET = OBJ_OFFS_OBJECT+4
|
||||
.equ OBJ_OFFS_OPTIONS = OBJ_OFFS_OBJECT+5
|
||||
.equ OBJ_SIZE = OBJ_OFFS_OBJECT+6
|
||||
|
||||
; widget data
|
||||
.equ WID_OFFS_WIDGET = OBJ_OFFS_SIZE
|
||||
.equ WID_OFFS_WIDGET = OBJ_SIZE
|
||||
.equ WID_OFFS_OPTIONS1 = WID_OFFS_WIDGET+0
|
||||
.equ WID_OFFS_OPTIONS2 = WID_OFFS_WIDGET+1
|
||||
.equ WID_OFFS_ABS_X_LO = WID_OFFS_WIDGET+2
|
||||
@@ -59,6 +58,7 @@
|
||||
.equ WID_OPTIONS0_BIT_VISIBLE = 0 ; OBJ_OFFS_OPTIONS
|
||||
.equ WID_OPTIONS0_BIT_DIRTY = 1
|
||||
.equ WID_OPTIONS0_BIT_LAYOUT = 2
|
||||
.equ WID_OPTIONS0_BIT_DATAINSDRAM = 3 ; text or other data is in SDRAM, not in flash
|
||||
|
||||
.equ WID_OPTIONS1_BIT_STRETCH_X = 0 ; WID_OFFS_OPTIONS1
|
||||
.equ WID_OPTIONS1_BIT_STRETCH_Y = 1
|
||||
@@ -98,21 +98,6 @@
|
||||
|
||||
|
||||
|
||||
; Links
|
||||
|
||||
.equ OBJ_LINK_OFFS_LIST = 0
|
||||
.equ OBJ_LINK_OFFS_SIGNAL = LIST_SIZE
|
||||
.equ OBJ_LINK_OFFS_SLOT = LIST_SIZE+1
|
||||
.equ OBJ_LINK_OFFS_TARGET_LO = LIST_SIZE+2
|
||||
.equ OBJ_LINK_OFFS_TARGET_HI = LIST_SIZE+3
|
||||
.equ OBJ_LINK_SIZE = LIST_SIZE+4
|
||||
; fns:
|
||||
; - removeLinksTo(Y=win, r19:r18=target)
|
||||
; - addLink(Y=win, r16=signal, r17=slot, r19:r18=target)
|
||||
; - removeLinks(Y=win)
|
||||
|
||||
|
||||
|
||||
.equ TIMER_OFFS_LIST = 0
|
||||
.equ TIMER_OFFS_TIMER = LIST_SIZE
|
||||
.equ TIMER_OFFS_VALUE_LO = TIMER_OFFS_TIMER
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_WIN_OBJECT_H
|
||||
#define AQH_AVR_WIN_OBJECT_H
|
||||
|
||||
|
||||
.cseg
|
||||
|
||||
@@ -15,20 +18,24 @@
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_Init @global
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @param r17 options
|
||||
; @clobbers X
|
||||
; Generally every object only reports its signals to a single other object
|
||||
; (called the target). However, every object can receive signals from multiple
|
||||
; sender objects. To allow this the target assigns its own id (called idForTarget)
|
||||
; to the new object in order to determine who sent the signal and to act accordingly.
|
||||
; There are system signals which don't use idForTarget (like OBJ_SIGNAL_DESTROY).
|
||||
;
|
||||
; @param Y pointer to object in SRAM
|
||||
; @param r18 options
|
||||
; @clobbers r16, r17, X
|
||||
|
||||
OBJ_Init:
|
||||
push r17
|
||||
mov xl, yl
|
||||
mov xh, yh
|
||||
clr r16
|
||||
ldi r17, OBJ_OFFS_SIZE
|
||||
bigcall Utils_FillSram ; (R17, X)
|
||||
bigcall Tree_InitObject ; (R16)
|
||||
pop r17
|
||||
std Y+OBJ_OFFS_OPTIONS, r17
|
||||
mov xl, yl
|
||||
mov xh, yh
|
||||
clr r16
|
||||
ldi r17, OBJ_OFFS_SIZE
|
||||
bigcall Utils_FillSram ; (R17, X)
|
||||
bigcall Tree_InitObject ; (R16)
|
||||
std Y+OBJ_OFFS_OPTIONS, r18
|
||||
ldi r16, LOW(OBJ_DefaultHandler)
|
||||
std Y+OBJ_OFFS_HANDLERFN_LO, r16
|
||||
ldi r16, HIGH(OBJ_DefaultHandler)
|
||||
@@ -38,12 +45,28 @@ OBJ_Init:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_SetTarget @global
|
||||
;
|
||||
; @param r19 srcIdForTarget
|
||||
; @param X pointer to target
|
||||
; @clobbers none
|
||||
|
||||
OBJ_SetTarget:
|
||||
std Y+OBJ_OFFS_TARGET_LO, xl
|
||||
std Y+OBJ_OFFS_TARGET_HI, xh
|
||||
std Y+OBJ_OFFS_IDFORTARGET, r19
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_SetHandler @global
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @param Z pointer to handler function (word address)
|
||||
; @clobbers X
|
||||
; @clobbers none
|
||||
|
||||
OBJ_SetHandler:
|
||||
std Y+OBJ_OFFS_HANDLERFN_LO, zl
|
||||
@@ -68,55 +91,20 @@ OBJ_GetHandler:
|
||||
|
||||
|
||||
|
||||
OBJ_DefaultHandler:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_free @global
|
||||
; @routine OBJ_DefaultHandler @global
|
||||
;
|
||||
; @param Y pointer to object in SRAM
|
||||
; This is a default signal handler which does nothing.
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @param r18 signal
|
||||
; @param r19 srcIdForTarget
|
||||
; @param R20 1st param
|
||||
; @param R21 2nd param
|
||||
; @param X 3rd param
|
||||
; @clobbers any
|
||||
|
||||
OBJ_free:
|
||||
; free children
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
OBJ_free_loop:
|
||||
mov r16, xl
|
||||
or r16, xh
|
||||
breq OBJ_free_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
rcall Tree_GetNextSibling
|
||||
push xl ; next
|
||||
push xh ; next
|
||||
rcall OBJ_free
|
||||
pop xh ; next
|
||||
pop xl ; next
|
||||
rjmp OBJ_free_loop
|
||||
OBJ_free_loopEnd:
|
||||
pop yh
|
||||
pop yl
|
||||
|
||||
rcall Tree_UnlinkObject ; (r16, r17, x)
|
||||
|
||||
push yl
|
||||
push yh
|
||||
ldi r16, OBJ_SIGNAL_DESTROY
|
||||
rcall OBJ_Handler
|
||||
pop yh
|
||||
pop yl
|
||||
rcall objFreeLinks
|
||||
rcall objFreeTimers
|
||||
mov xl, yl
|
||||
mov xh, yh
|
||||
rcall Heap_free
|
||||
OBJ_DefaultHandler:
|
||||
clc
|
||||
ret
|
||||
; @end
|
||||
@@ -124,15 +112,62 @@ OBJ_free_loopEnd:
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_Handler
|
||||
; @routine OBJ_Fini @global
|
||||
;
|
||||
; This routine calls OBJ_Fini on every child object, Then it sends the signal
|
||||
; OBJ_SIGNAL_DESTROY to this object allowing it to release all its ressources
|
||||
; (including memory space if using heap or other dynamic ressources).
|
||||
;
|
||||
; @param Y pointer to object in SRAM
|
||||
; @clobbers any, !Y
|
||||
|
||||
OBJ_Fini:
|
||||
; fini children
|
||||
push yl
|
||||
push yh
|
||||
bigcall Tree_GetFirstChildObject ; (none)
|
||||
OBJ_Fini_loop:
|
||||
mov r16, xl
|
||||
or r16, xh
|
||||
breq OBJ_Fini_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
bigcall Tree_GetNextSibling
|
||||
push xl ; next
|
||||
push xh ; next
|
||||
rcall OBJ_Fini
|
||||
pop xh ; next
|
||||
pop xl ; next
|
||||
rjmp OBJ_Fini_loop
|
||||
OBJ_Fini_loopEnd:
|
||||
pop yh
|
||||
pop yl
|
||||
|
||||
bigcall Tree_UnlinkObject ; (r16, r17, x)
|
||||
|
||||
push yl
|
||||
push yh
|
||||
ldi r18, OBJ_SIGNAL_DESTROY
|
||||
clr r19
|
||||
rcall OBJ_Handler
|
||||
pop yh ; probably no longer usable pointer,
|
||||
pop yl ; especially if using heap!
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_Handler @global
|
||||
;
|
||||
; Signal handler for an object. A signal can have up to 3 parameters
|
||||
; conveyed in registers R18, R19 and X.
|
||||
; conveyed in registers R20, R21 and X.
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @param r16 signal
|
||||
; @param R18 1st param
|
||||
; @param R19 2nd param
|
||||
; @param r18 signal
|
||||
; @param r19 srcIdForTarget
|
||||
; @param R20 1st param
|
||||
; @param R21 2nd param
|
||||
; @param X 3rd param
|
||||
|
||||
OBJ_Handler:
|
||||
@@ -146,22 +181,22 @@ OBJ_Handler:
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_ForwardSignalToChildren
|
||||
; @routine OBJ_ForwardSignalToChildren @global
|
||||
;
|
||||
; Signal handler for an object. A signal can have up to 3 parameters
|
||||
; conveyed in registers R18, R19 and X.
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @param r16 signal
|
||||
; @param R18 1st param
|
||||
; @param R19 2nd param
|
||||
; @param r18 signal
|
||||
; @param R20 1st param
|
||||
; @param R21 2nd param
|
||||
; @param X 3rd param
|
||||
; @clobbers any, !r16, !r18, !r19, !Y
|
||||
; @clobbers any, !r18, !r20, !r21, !Y
|
||||
|
||||
OBJ_ForwardSignalToChildren:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
bigcall Tree_GetFirstChildObject ; (none)
|
||||
OBJ_ForwardSignalToChildren_loop:
|
||||
clc
|
||||
mov r17, xl
|
||||
@@ -169,21 +204,22 @@ OBJ_ForwardSignalToChildren_loop:
|
||||
breq OBJ_ForwardSignalToChildren_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
push r16
|
||||
push r18
|
||||
push r19
|
||||
push r18
|
||||
push r20
|
||||
push r21
|
||||
push xl
|
||||
push xh
|
||||
push yl
|
||||
push yh
|
||||
clr r19 ; srcId for target set to 0 (this is a direct call to the handler)
|
||||
rcall OBJ_Handler
|
||||
pop yh
|
||||
pop yl
|
||||
pop xh
|
||||
pop xl
|
||||
pop r19
|
||||
pop r18
|
||||
pop r16
|
||||
pop r21
|
||||
pop r20
|
||||
pop r18
|
||||
rcall Tree_GetNextSibling
|
||||
rjmp OBJ_ForwardSignalToChildren_loop
|
||||
OBJ_ForwardSignalToChildren_loopEnd:
|
||||
@@ -195,246 +231,27 @@ OBJ_ForwardSignalToChildren_loopEnd:
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_EmitSignal
|
||||
; @routine OBJ_EmitSignal @global
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @param r16 signal to emit
|
||||
; @param R18 1st param
|
||||
; @param R19 2nd param
|
||||
; @param r18 signal
|
||||
; @param R20 1st param
|
||||
; @param R21 2nd param
|
||||
; @param X 3rd param
|
||||
; @clobbers any, !Y
|
||||
|
||||
OBJ_EmitSignal:
|
||||
push yl
|
||||
push yh
|
||||
ldd r17, Y+OBJ_OFFS_LINKS_LO
|
||||
ldd yh, Y+OBJ_OFFS_LINKS_HI
|
||||
mov yl, r17
|
||||
OBJ_EmitSignal_loop:
|
||||
push r16
|
||||
rcall objCheckEmitSignalForLink ; (any, !X, !Y, !R18, !R19)
|
||||
pop r16
|
||||
push xl
|
||||
push xh
|
||||
rcall List_GetNextObject ; (none)
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
pop xh
|
||||
pop xl
|
||||
mov r17, yl
|
||||
or r17, yh
|
||||
brne OBJ_EmitSignal_loop
|
||||
OBJ_EmitSignal_popRet:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_AddLink @global
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @param X pointer to link
|
||||
; @clobbers R16, R17
|
||||
|
||||
OBJ_AddLink:
|
||||
ldd r16, Y+OBJ_OFFS_LINKS_LO
|
||||
ldd r17, Y+OBJ_OFFS_LINKS_HI
|
||||
tst r16
|
||||
brne OBJ_AddLink_addToExisting
|
||||
tst r17
|
||||
brne OBJ_AddLink_addToExisting
|
||||
; empty list, new link is first
|
||||
std Y+OBJ_OFFS_LINKS_LO, xl
|
||||
std Y+OBJ_OFFS_LINKS_HI, xh
|
||||
rjmp OBJ_AddLink_end
|
||||
OBJ_AddLink_addToExisting:
|
||||
push xl
|
||||
push xh
|
||||
push yl
|
||||
push yh
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
mov xl, r16
|
||||
mov xh, r17
|
||||
rcall List_AddObject ; (r16, r17, x)
|
||||
pop yh
|
||||
pop yl
|
||||
pop xh
|
||||
pop xl
|
||||
OBJ_AddLink_end:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_RemoveLink @global
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @param X pointer to link
|
||||
; @clobbers R16, R17
|
||||
|
||||
OBJ_RemoveLink:
|
||||
ldd r16, Y+OBJ_OFFS_LINKS_LO
|
||||
ldd r17, Y+OBJ_OFFS_LINKS_HI
|
||||
cp r16, xl
|
||||
brne OBJ_RemoveLink_notFirst
|
||||
cp r17, xh
|
||||
brne OBJ_RemoveLink_notFirst
|
||||
clr r16
|
||||
std Y+OBJ_OFFS_LINKS_LO, r16
|
||||
std Y+OBJ_OFFS_LINKS_HI, r16
|
||||
rjmp OBJ_RemoveLink_end
|
||||
OBJ_RemoveLink_notFirst:
|
||||
push xl
|
||||
push xh
|
||||
push yl
|
||||
push yh
|
||||
mov yl, xl
|
||||
mov yh, r17
|
||||
mov xl, r16
|
||||
mov xh, r17
|
||||
rcall List_UnlinkObject ; (r16, r17, x)
|
||||
pop yh
|
||||
pop yl
|
||||
pop xh
|
||||
pop xl
|
||||
OBJ_RemoveLink_end:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_AddTimer @global
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @param X pointer to timer
|
||||
; @clobbers R16, R17
|
||||
|
||||
OBJ_AddTimer:
|
||||
ldd r16, Y+OBJ_OFFS_TIMERS_LO
|
||||
ldd r17, Y+OBJ_OFFS_TIMERS_HI
|
||||
tst r16
|
||||
brne OBJ_AddTimer_addToExisting
|
||||
tst r17
|
||||
brne OBJ_AddTimer_addToExisting
|
||||
; empty list, new timer is first
|
||||
std Y+OBJ_OFFS_TIMERS_LO, xl
|
||||
std Y+OBJ_OFFS_TIMERS_HI, xh
|
||||
rjmp OBJ_AddTimer_end
|
||||
OBJ_AddTimer_addToExisting:
|
||||
push xl
|
||||
push xh
|
||||
push yl
|
||||
push yh
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
mov xl, r16
|
||||
mov xh, r17
|
||||
rcall List_AddObject ; (r16, r17, x)
|
||||
pop yh
|
||||
pop yl
|
||||
pop xh
|
||||
pop xl
|
||||
OBJ_AddTimer_end:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_RemoveTimer @global
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @param X pointer to timer
|
||||
; @clobbers R16, R17
|
||||
|
||||
OBJ_RemoveTimer:
|
||||
ldd r16, Y+OBJ_OFFS_TIMERS_LO
|
||||
ldd r17, Y+OBJ_OFFS_TIMERS_HI
|
||||
cp r16, xl
|
||||
brne OBJ_RemoveTimer_notFirst
|
||||
cp r17, xh
|
||||
brne OBJ_RemoveTimer_notFirst
|
||||
clr r16
|
||||
std Y+OBJ_OFFS_TIMERS_LO, r16
|
||||
std Y+OBJ_OFFS_TIMERS_HI, r16
|
||||
rjmp OBJ_RemoveTimer_end
|
||||
OBJ_RemoveTimer_notFirst:
|
||||
push xl
|
||||
push xh
|
||||
push yl
|
||||
push yh
|
||||
mov yl, xl
|
||||
mov yh, r17
|
||||
mov xl, r16
|
||||
mov xh, r17
|
||||
rcall List_UnlinkObject ; (r16, r17, x)
|
||||
pop yh
|
||||
pop yl
|
||||
pop xh
|
||||
pop xl
|
||||
OBJ_RemoveTimer_end:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @param r16 signal
|
||||
; @param Y link
|
||||
; @clobbers any, !X, !Y, !R18, !R19
|
||||
|
||||
objCheckEmitSignalForLink:
|
||||
ldd r17, Y+OBJ_LINK_OFFS_SIGNAL
|
||||
cp r16, r17
|
||||
brne objCheckEmitSignalForLink_ret
|
||||
push yl
|
||||
push yh
|
||||
push xl
|
||||
push xh
|
||||
push r18
|
||||
push r19
|
||||
ldd r16, Y+OBJ_LINK_OFFS_SLOT
|
||||
ldd r17, Y+OBJ_LINK_OFFS_TARGET_LO
|
||||
ldd yh, Y+OBJ_LINK_OFFS_TARGET_HI
|
||||
mov yl, r17
|
||||
rcall OBJ_Handler
|
||||
pop r19
|
||||
pop r18
|
||||
pop xh
|
||||
pop xl
|
||||
pop yh
|
||||
pop yl
|
||||
objCheckEmitSignalForLink_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine objFreeLinks
|
||||
;
|
||||
; @clobbers r16, r17, r18, r19, r24, r25, X
|
||||
|
||||
objFreeLinks:
|
||||
push yl
|
||||
push yh
|
||||
ldd r16, Y+OBJ_OFFS_LINKS_LO
|
||||
ldd r17, Y+OBJ_OFFS_LINKS_HI
|
||||
clr r18
|
||||
std Y+OBJ_OFFS_LINKS_LO, r18
|
||||
std Y+OBJ_OFFS_LINKS_HI, r18
|
||||
ldd r16, Y+OBJ_OFFS_TARGET_LO
|
||||
ldd r17, Y+OBJ_OFFS_TARGET_HI
|
||||
ldd r19, Y+OBJ_OFFS_IDFORTARGET
|
||||
mov yl, r16
|
||||
mov yh, r17
|
||||
ldi zl, LOW(Obj_Link_free)
|
||||
ldi zh, HIGH(Obj_Link_free)
|
||||
rcall List_ForEveryObject ; (r16, r17, r18, r19, r24, r25, X, Y)
|
||||
or r16, r17
|
||||
breq OBJ_EmitSignal_end
|
||||
rcall OBJ_Handler
|
||||
OBJ_EmitSignal_end:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
@@ -442,115 +259,5 @@ objFreeLinks:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine objFreeTimers
|
||||
;
|
||||
; @clobbers r16, r17, r18, r19, r24, r25, X
|
||||
|
||||
objFreeTimers:
|
||||
push yl
|
||||
push yh
|
||||
ldd r16, Y+OBJ_OFFS_TIMERS_LO
|
||||
ldd r17, Y+OBJ_OFFS_TIMERS_HI
|
||||
clr r18
|
||||
std Y+OBJ_OFFS_TIMERS_LO, r18
|
||||
std Y+OBJ_OFFS_TIMERS_HI, r18
|
||||
mov yl, r16
|
||||
mov yh, r17
|
||||
ldi zl, LOW(Obj_Timer_free)
|
||||
ldi zh, HIGH(Obj_Timer_free)
|
||||
rcall List_ForEveryObject ; (r16, r17, r18, r19, r24, r25, X, Y)
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_Link_new @global
|
||||
;
|
||||
; @return CF set if okay, cleared on error
|
||||
; @return Y pointer to SRAM for link
|
||||
; @clobbers r16, r17, X
|
||||
|
||||
OBJ_Link_new:
|
||||
ldi r24, LOW(OBJ_LINK_SIZE)
|
||||
ldi r25, HIGH(OBJ_LINK_SIZE)
|
||||
bigcall Heap_Alloc
|
||||
brcc OBJ_Link_new_end
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
clr r16
|
||||
ldi r17, OBJ_LINK_SIZE
|
||||
bigcall Utils_FillSram ; (R17, X)
|
||||
rcall List_InitObject ; (R16)
|
||||
sec
|
||||
OBJ_Link_new_end:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_Link_free @global
|
||||
;
|
||||
; @param Y pointer to SRAM for link
|
||||
; @clobbers r16, r17, r24, r25, X
|
||||
|
||||
OBJ_Link_free:
|
||||
rcall List_FiniObject ; (R16)
|
||||
mov xl, yl
|
||||
mov xh, yh
|
||||
rcall Heap_free ; (r16, r17, r24, r25, X)
|
||||
clc
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_Timer_new @global
|
||||
;
|
||||
; @return CF set if okay, cleared on error
|
||||
; @return Y pointer to SRAM for timer
|
||||
; @clobbers r16, r17, X
|
||||
|
||||
OBJ_Timer_new:
|
||||
ldi r24, LOW(TIMER_SIZE)
|
||||
ldi r25, HIGH(TIMER_SIZE)
|
||||
bigcall Heap_Alloc
|
||||
brcc OBJ_Timer_new_end
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
clr r16
|
||||
ldi r17, TIMER_SIZE
|
||||
bigcall Utils_FillSram ; (R17, X)
|
||||
rcall List_InitObject ; (R16)
|
||||
sec
|
||||
OBJ_Timer_new_end:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_Timer_free @global
|
||||
;
|
||||
; @param Y pointer to SRAM for timer
|
||||
; @clobbers r16, r17, r24, r25, X
|
||||
|
||||
OBJ_Timer_free:
|
||||
rcall List_FiniObject ; (R16)
|
||||
mov xl, yl
|
||||
mov xh, yh
|
||||
bigcall Heap_free ; (r16, r17, r24, r25, X)
|
||||
clc
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
#endif ; AQH_AVR_WIN_OBJECT_H
|
||||
|
||||
|
||||
770
avr/modules/lcd2/win/w_layout.asm
Normal file
770
avr/modules/lcd2/win/w_layout.asm
Normal file
@@ -0,0 +1,770 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; defs
|
||||
|
||||
.equ WID_WIDGET_INTER_BORDER = 2
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine WID_Widget_new @global
|
||||
;
|
||||
; @param Y pointer to window SRAM
|
||||
; @param X pointer to parent
|
||||
; @param r18 WID_OFFS_OPTIONS1
|
||||
; @param r19 WID_OFFS_OPTIONS2
|
||||
|
||||
WID_Widget_Init:
|
||||
push r18
|
||||
push r19
|
||||
push xl
|
||||
push xh
|
||||
ldi zl, LOW(WID_Widget_Handler)
|
||||
ldi zh, HIGH(WID_Widget_Handler)
|
||||
clr r17
|
||||
rcall OBJ_Init
|
||||
pop xh
|
||||
pop xl
|
||||
pop r19
|
||||
pop r18
|
||||
std Y+WID_OFFS_OPTIONS1, r18
|
||||
std Y+WID_OFFS_OPTIONS2, r19
|
||||
mov r16, xl
|
||||
or r16, xh
|
||||
breq WID_Widget_noParent
|
||||
; copy defaults from parent
|
||||
adiw xh:xl, WID_OFFS_BG_COL_LO
|
||||
ld r16, X+ ; WID_OFFS_BG_COL_LO
|
||||
std Y+WID_OFFS_BG_COL_LO, r16
|
||||
ld r16, X+ ; WID_OFFS_BG_COL_HI
|
||||
std Y+WID_OFFS_BG_COL_HI, r16
|
||||
ld r16, X+ ; WID_OFFS_FG_COL_LO
|
||||
std Y+WID_OFFS_FG_COL_LO, r16
|
||||
ld r16, X+ ; WID_OFFS_FG_COL_HI
|
||||
std Y+WID_OFFS_FG_COL_HI, r16
|
||||
ld r16, X+ ; WID_OFFS_FONT_LO
|
||||
std Y+WID_OFFS_FONT_LO, r16
|
||||
ld r16, X+ ; WID_OFFS_FONT_HI
|
||||
std Y+WID_OFFS_FONT_HI, r16
|
||||
rjmp WID_Widget_end
|
||||
WID_Widget_noParent: ; preset without parent
|
||||
clr r16
|
||||
std Y+WID_OFFS_FONT_LO, r16
|
||||
std Y+WID_OFFS_FONT_HI, r16
|
||||
|
||||
std Y+WID_OFFS_FG_COL_LO, r16 ; foreground black
|
||||
std Y+WID_OFFS_FG_COL_HI, r16
|
||||
dec r16
|
||||
std Y+WID_OFFS_BG_COL_LO, r16 ; background white
|
||||
std Y+WID_OFFS_BG_COL_HI, r16
|
||||
|
||||
ldi r16, 2 ; default borders
|
||||
std Y+WID_OFFS_BORDER_TOP, r16
|
||||
std Y+WID_OFFS_BORDER_BOT, r16
|
||||
std Y+WID_OFFS_BORDER_LEFT, r16
|
||||
std Y+WID_OFFS_BORDER_RIGHT, r16
|
||||
WID_Widget_end:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine WID_Widget_Handler
|
||||
;
|
||||
; Signal handler for an object. A signal can have up to 3 parameters
|
||||
; conveyed in registers R18, R19 and X.
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @param r16 signal
|
||||
; @param R18 1st param
|
||||
; @param R19 2nd param
|
||||
; @param X 3rd param
|
||||
; @clobbers any, !Y
|
||||
|
||||
WID_Widget_Handler:
|
||||
cpi r16, WID_SIGNAL_GETMINWIDTH
|
||||
breq WID_Widget_Handler_getMinWidth
|
||||
cpi r16, WID_SIGNAL_GETMINHEIGHT
|
||||
breq WID_Widget_Handler_getMinHeight
|
||||
cpi r16, WID_SIGNAL_LAYOUT
|
||||
breq WID_Widget_Handler_layout
|
||||
cpi r16, WID_SIGNAL_DRAW
|
||||
breq WID_Widget_Handler_draw
|
||||
; for now just forward signal to all children
|
||||
WID_Widget_Handler_forward:
|
||||
rcall OBJ_ForwardSignalToChildren
|
||||
ret
|
||||
WID_Widget_Handler_getMinWidth:
|
||||
rjmp widgetGetMinWidth
|
||||
WID_Widget_Handler_getMinHeight:
|
||||
rjmp widgetGetMinHeight
|
||||
WID_Widget_Handler_layout:
|
||||
rjmp widgetLayout
|
||||
WID_Widget_Handler_draw:
|
||||
rjmp wDraw
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
wDraw:
|
||||
ldd r16, Y+OBJ_OFFS_OPTIONS
|
||||
sbrs r16, WID_OPTIONS0_BIT_VISIBLE ; only draw visible widgets
|
||||
rjmp wDraw_ret
|
||||
cbr r16, (1<<WID_OPTIONS0_BIT_DIRTY)
|
||||
std Y+OBJ_OFFS_OPTIONS, r16
|
||||
|
||||
; fill window background
|
||||
ldd r2, Y+WID_OFFS_BG_COL_LO
|
||||
ldd r3, Y+WID_OFFS_BG_COL_HI
|
||||
ldd r4, Y+WID_OFFS_ABS_X_LO
|
||||
ldd r5, Y+WID_OFFS_ABS_X_HI
|
||||
ldd r6, Y+WID_OFFS_ABS_Y_LO
|
||||
ldd r7, Y+WID_OFFS_ABS_Y_HI
|
||||
ldd r8, Y+WID_OFFS_WIDTH_LO
|
||||
ldd r9, Y+WID_OFFS_WIDTH_HI
|
||||
ldd r10, Y+WID_OFFS_HEIGHT_LO
|
||||
ldd r11, Y+WID_OFFS_HEIGHT_HI
|
||||
bigcall ILI9341_FillRect
|
||||
wDraw_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
widgetLayout:
|
||||
rjmp wVLayout
|
||||
|
||||
|
||||
|
||||
wVLayout:
|
||||
rcall wSetChildrenWidthsFromMinWidths
|
||||
rcall wSetChildrenHeightsFromMinHeights
|
||||
|
||||
; count number of expandable children
|
||||
ldi r16, (1<<WID_OPTIONS1_BIT_STRETCH_Y) ; value
|
||||
ldi r17, (1<<WID_OPTIONS1_BIT_STRETCH_Y) ; mask
|
||||
rcall widgetCountVisibleChildrenWithOptions1 ; r18=number of matching visible children (r24, r25, X)
|
||||
tst r18
|
||||
breq wVLayout_Ydone ; no expandable children, nothing to distribute
|
||||
; determine full height needed by all children
|
||||
push r18 ; number of visible expandable child widgets
|
||||
clr r17 ; mask=0 -> count all visible children
|
||||
rcall wGetSumOfMatchingVisibleChildrenHeights ; r19:r18=sum of all children heights
|
||||
pop r22
|
||||
clr r23 ; r23:r22=number of visible expandable children
|
||||
; calculate number of bytes to add to each expandable child widget
|
||||
ldd r20, Y+WID_OFFS_HEIGHT_LO ; total height
|
||||
ldd r21, Y+WID_OFFS_HEIGHT_HI
|
||||
clr r16
|
||||
ldd r17, Y+WID_OFFS_BORDER_TOP ; subtract top border
|
||||
sub r20, r17
|
||||
sbc r21, r16
|
||||
brcs wVLayout_heightTooSmall ; jmp if too small
|
||||
ldd r17, Y+WID_OFFS_BORDER_BOT ; subtract bottom border
|
||||
sub r20, r17
|
||||
sbc r21, r16
|
||||
brcs wVLayout_heightTooSmall ; jmp if too small
|
||||
|
||||
sub r20, r18 ; r21:r20 = HEIGHT-SUM_OF_VIS_CHILDREN_HEIGHTS
|
||||
sbc r21, r19
|
||||
brcc wVLayout_heightTooSmall
|
||||
breq wVLayout_yDone ; nothing to distribute
|
||||
bigcall Utils_Divu16_16_16 ; r17:r16 = r21:r20 / r23:r22
|
||||
; add additional pixel to heights of expandable child widgets
|
||||
rcall wAddToHeightsOfExpandableVisibleChildren
|
||||
|
||||
wVLayout_yDone:
|
||||
rcall wSetRelYFromHeightInVisibleChildren
|
||||
rcall wAlignChildrenHorizontally
|
||||
; rcall wSetAbsoluteCoords call in GUI loop after calling layout on all widgets
|
||||
wVLayout_heightTooSmall:
|
||||
; TODO: how to handle this case?
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
wSetAbsoluteCoords:
|
||||
push yl
|
||||
push yh
|
||||
wSetAbsoluteCoords_loop:
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq wSetAbsoluteCoords_nextSibling
|
||||
push yl
|
||||
push yh
|
||||
bigcall Tree_GetParentObject
|
||||
clr r18
|
||||
clr r19
|
||||
clr r20
|
||||
clr r21
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq wSetAbsoluteCoords_r1820set
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
ldd r18, Y+WID_OFFS_ABS_X_LO
|
||||
ldd r19, Y+WID_OFFS_ABS_X_HI
|
||||
ldd r20, Y+WID_OFFS_ABS_Y_LO
|
||||
ldd r21, Y+WID_OFFS_ABS_Y_HI
|
||||
wSetAbsoluteCoords_r1820set:
|
||||
pop yh
|
||||
pop yl
|
||||
; handle X
|
||||
ldd r16, Y+WID_OFFS_REL_X_LO
|
||||
ldd r17, Y+WID_OFFS_REL_X_HI
|
||||
add r16, r18
|
||||
adc r17, r19
|
||||
std Y+WID_OFFS_ABS_X_LO, r16
|
||||
std Y+WID_OFFS_ABS_X_HI, r17
|
||||
; handle Y
|
||||
ldd r16, Y+WID_OFFS_REL_Y_LO
|
||||
ldd r17, Y+WID_OFFS_REL_Y_HI
|
||||
add r16, r20
|
||||
adc r17, r21
|
||||
std Y+WID_OFFS_ABS_Y_LO, r16
|
||||
std Y+WID_OFFS_ABS_Y_HI, r17
|
||||
bigcall Tree_GetObjectBelow
|
||||
rjmp wSetAbsoluteCoords_loopEnd
|
||||
wSetAbsoluteCoords_nextSibling:
|
||||
bigcall Tree_GetNextSibling
|
||||
wSetAbsoluteCoords_loopEnd:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq wSetAbsoluteCoords_end
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
rjmp wSetAbsoluteCoords_loop
|
||||
wSetAbsoluteCoords_end:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wAlignChildrenHorizontally
|
||||
;
|
||||
; Horizontally align children within the width of the parent widget.
|
||||
; Only changes Y+WID_OFFS_REL_X_LO/HI.
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @clobbers r16, r17, r18, r19, r24, r25
|
||||
|
||||
wAlignChildrenHorizontally:
|
||||
push yl
|
||||
push yh
|
||||
ldd r24, Y+WID_OFFS_WIDTH_LO ; parent width
|
||||
ldd r25, Y+WID_OFFS_WIDTH_HI
|
||||
ldd r19, Y+WID_OFFS_BORDER_LEFT ; subtract left border
|
||||
mov r16, r19
|
||||
clr r17
|
||||
sub r24, r16
|
||||
sbc r25, r17
|
||||
ldd r16, Y+WID_OFFS_BORDER_RIGHT ; subtract right border
|
||||
sub r24, r16
|
||||
sbc r25, r17 ; r25:r24=parent width minus lateral borders, r19=left border
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
wAlignChildrenHorizontally_loop:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq wAlignChildrenHorizontally_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq wAlignChildrenHorizontally_loopNext
|
||||
push r24
|
||||
push r25
|
||||
push r19
|
||||
rcall wAlignHorizontally
|
||||
pop r19
|
||||
add r24, r19
|
||||
adc r25, r19
|
||||
sub r25, r19
|
||||
std Y+WID_OFFS_REL_X_LO, r24
|
||||
std Y+WID_OFFS_REL_X_HI, r25
|
||||
pop r25
|
||||
pop r24
|
||||
wAlignChildrenHorizontally_loopNext:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wAlignChildrenHorizontally_loop
|
||||
wAlignChildrenHorizontally_loopEnd:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wAlignHorizontally
|
||||
;
|
||||
; @param r25:r24 parent width minus lateral borders
|
||||
; @return r25:r24 proposed X position relative to parent
|
||||
; @clobbers r16, r17
|
||||
|
||||
wAlignHorizontally:
|
||||
ldd r16, Y+WID_OFFS_OPTIONS1
|
||||
sbrc r16, WID_OPTIONS1_BIT_STRETCH_X
|
||||
rjmp wAlignHorizontally_stretch
|
||||
andi r16, (WID_OPTIONS1_BIT_HALIGN0 | WID_OPTIONS1_BIT_HALIGN1)
|
||||
cpi r16, (0<<WID_OPTIONS1_BIT_HALIGN1) | (0<<WID_OPTIONS1_BIT_HALIGN0)
|
||||
breq wAlignHorizontally_left
|
||||
cpi r16, (0<<WID_OPTIONS1_BIT_HALIGN1) | (1<<WID_OPTIONS1_BIT_HALIGN0)
|
||||
breq wAlignHorizontally_right
|
||||
wAlignHorizontally_center:
|
||||
ldd r16, Y+WID_OFFS_WIDTH_LO
|
||||
ldd r17, Y+WID_OFFS_WIDTH_HI
|
||||
sub r24, r16
|
||||
sbc r25, r17
|
||||
lsr r25
|
||||
ror r24
|
||||
ret
|
||||
wAlignHorizontally_left:
|
||||
clr r24
|
||||
clr r25
|
||||
ret
|
||||
wAlignHorizontally_right:
|
||||
ldd r16, Y+WID_OFFS_WIDTH_LO
|
||||
ldd r17, Y+WID_OFFS_WIDTH_HI
|
||||
sub r24, r16
|
||||
sbc r25, r17
|
||||
wAlignHorizontally_stretch:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wSetRelYFromHeightInVisibleChildren
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @clobbers r17, r18, r19, r24, r25, X
|
||||
|
||||
wSetRelYFromHeightInVisibleChildren:
|
||||
push yl
|
||||
push yh
|
||||
ldd r24, Y+WID_OFFS_BORDER_TOP
|
||||
clr r25
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
wSetRelYFromHeightInVisibleChildren_loop:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq wSetRelYFromHeightInVisibleChildren_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq wSetRelYFromHeightInVisibleChildren_loopNext
|
||||
std Y+WID_OFFS_REL_Y_LO, r24
|
||||
std Y+WID_OFFS_REL_Y_HI, r25
|
||||
ldd r18, Y+WID_OFFS_WIDTH_LO
|
||||
ldd r19, Y+WID_OFFS_WIDTH_HI
|
||||
add r24, r18 ; TODO: handle carry later
|
||||
adc r25, r19
|
||||
adiw r25:r24, WID_WIDGET_INTER_BORDER
|
||||
wSetRelYFromHeightInVisibleChildren_loopNext:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wSetRelYFromHeightInVisibleChildren_loop
|
||||
wSetRelYFromHeightInVisibleChildren_loopEnd:
|
||||
mov r18, r24
|
||||
mov r19, r25
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetGetMinWidth
|
||||
;
|
||||
; @return r19:r18 minimum width of widget
|
||||
; @clobbers any, !Y
|
||||
|
||||
widgetGetMinWidth:
|
||||
ldi r16, WID_SIGNAL_GETMINWIDTH
|
||||
rjmp widgetGetLargestChildMinSize
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetGetMinHeight
|
||||
;
|
||||
; @return r19:r18 minimum height of widget
|
||||
; @clobbers any, !Y
|
||||
|
||||
widgetGetMinHeight:
|
||||
ldi r16, WID_SIGNAL_GETMINHEIGHT
|
||||
rjmp widgetSumOfChildrenMinSize
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetSumOfChildrenMinSize
|
||||
;
|
||||
; @param r16 signal to send (WID_SIGNAL_GETMINWIDTH, WID_SIGNAL_GETMINHEIGHT)
|
||||
; @return r19:r18 minimum width or height of widget
|
||||
; @clobbers any, !Y
|
||||
|
||||
widgetSumOfChildrenMinSize:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
clr r24
|
||||
clr r25
|
||||
widgetSumOfChildrenMinSize_loop:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq widgetSumOfChildrenMinSize_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq widgetSumOfChildrenMinSize_loopNext
|
||||
push r16
|
||||
push r24
|
||||
push r25
|
||||
ldi r18, 1 ; default value for when the signal is not handled
|
||||
ldi r19, 0 ; default value for when the signal is not handled
|
||||
rcall OBJ_Handler ; ask child for its minimum size
|
||||
pop r25
|
||||
pop r24
|
||||
pop r16
|
||||
add r24, r18 ; TODO: handle carry later
|
||||
adc r25, r19
|
||||
adiw r25:r24, WID_WIDGET_INTER_BORDER
|
||||
widgetSumOfChildrenMinSize_loopNext:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp widgetSumOfChildrenMinSize_loop
|
||||
widgetSumOfChildrenMinSize_loopEnd:
|
||||
mov r18, r24
|
||||
mov r19, r25
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetGetLargestChildMinSize
|
||||
;
|
||||
; @param r16 signal to send (WID_SIGNAL_GETMINWIDTH, WID_SIGNAL_GETMINHEIGHT)
|
||||
; @return r19:r18 minimum width or height of widget
|
||||
; @clobbers any, !Y
|
||||
|
||||
widgetGetLargestChildMinSize:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
clr r24
|
||||
clr r25
|
||||
widgetGetLargestChildMinSize_loop:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq widgetGetLargestChildMinSize_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq widgetGetLargestChildMinSize_loopNext
|
||||
push r16
|
||||
push r24
|
||||
push r25
|
||||
ldi r18, 1 ; default value for when the signal is not handled
|
||||
ldi r19, 0 ; default value for when the signal is not handled
|
||||
rcall OBJ_Handler ; ask child for its minimum size
|
||||
pop r25
|
||||
pop r24
|
||||
pop r16
|
||||
sub r24, r18
|
||||
sbc r25, r19
|
||||
add r24, r18
|
||||
adc r25, r19
|
||||
brcc widgetGetLargestChildMinSize_loopNext
|
||||
mov r24, r18
|
||||
mov r25, r19
|
||||
widgetGetLargestChildMinSize_loopNext:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp widgetGetLargestChildMinSize_loop
|
||||
widgetGetLargestChildMinSize_loopEnd:
|
||||
mov r18, r24
|
||||
mov r19, r25
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetCountVisibleChildrenWithOptions1
|
||||
;
|
||||
; Count visible direct children with a matching WID_OFFS_OPTIONS1 field.
|
||||
;
|
||||
; @param r16 option1 value combination wanted
|
||||
; @param r17 option1 mask of bits to match
|
||||
; @return r18 number of matching direct children
|
||||
; @clobbers r18, r24, r25, X
|
||||
|
||||
widgetCountVisibleChildrenWithOptions1:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
clr r24
|
||||
widgetCountVisibleChildrenWithOptions1_loop:
|
||||
mov r25, xl
|
||||
or r25, xh
|
||||
breq widgetCountVisibleChildrenWithOptions1_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq widgetCountVisibleChildrenWithOptions1_next
|
||||
ldd r18, Y+WID_OFFS_OPTIONS1
|
||||
eor r18, r17
|
||||
and r18, r16
|
||||
brne widgetCountVisibleChildrenWithOptions1_next
|
||||
inc r24
|
||||
widgetCountVisibleChildrenWithOptions1_next:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp widgetSumOfChildrenMinSize_loop
|
||||
widgetCountVisibleChildrenWithOptions1_loopEnd:
|
||||
mov r18, r24
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wGetSumOfMatchingVisibleChildrenHeights
|
||||
;
|
||||
; Add heights of all matching visible children.
|
||||
;
|
||||
; @param r16 option1 value combination wanted
|
||||
; @param r17 option1 mask of bits to match
|
||||
; @return r19:r18 sum of widths of all visible direct children
|
||||
; @clobbers r24, r25, X
|
||||
|
||||
wGetSumOfMatchingVisibleChildrenHeights:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
clr r24
|
||||
clr r25
|
||||
wGetSumOfMatchingVisibleChildrenHeights_loop:
|
||||
mov r18, xl
|
||||
or r18, xh
|
||||
breq wGetSumOfMatchingVisibleChildrenHeights_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq wGetSumOfMatchingVisibleChildrenHeights_next
|
||||
ldd r18, Y+WID_OFFS_OPTIONS1
|
||||
eor r18, r17
|
||||
and r18, r16
|
||||
brne wGetSumOfMatchingVisibleChildrenHeights_next
|
||||
ldd r18, Y+WID_OFFS_HEIGHT_LO
|
||||
ldd r19, Y+WID_OFFS_HEIGHT_HI
|
||||
add r24, r18
|
||||
adc r25, r19
|
||||
wGetSumOfMatchingVisibleChildrenHeights_next:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wGetSumOfMatchingVisibleChildrenHeights_loop
|
||||
wGetSumOfMatchingVisibleChildrenHeights_loopEnd:
|
||||
mov r18, r24
|
||||
mov r19, r25
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wAddToWidthsOfExpandableVisibleChildren
|
||||
;
|
||||
; @param Y = pointer to widget data in SRAM
|
||||
; @param r17:r16 number to add to the widths of all visible X-expandable children
|
||||
; @clobbers r18, r19, X
|
||||
|
||||
wAddToWidthsOfExpandableVisibleChildren:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
wAddToWidthsOfExpandableVisibleChildren_loop:
|
||||
mov r18, xl
|
||||
or r18, xh
|
||||
breq wAddToWidthsOfExpandableVisibleChildren_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq wAddToWidthsOfExpandableVisibleChildren_next
|
||||
ldd r18, Y+WID_OFFS_OPTIONS1
|
||||
andi r18, WID_OPTIONS1_BIT_STRETCH_X
|
||||
breq wAddToWidthsOfExpandableVisibleChildren_next
|
||||
ldd r18, Y+WID_OFFS_WIDTH_LO
|
||||
ldd r19, Y+WID_OFFS_WIDTH_HI
|
||||
add r18, r16
|
||||
adc r19, r17
|
||||
std Y+WID_OFFS_WIDTH_LO, r18
|
||||
std Y+WID_OFFS_WIDTH_HI, r19
|
||||
wAddToWidthsOfExpandableVisibleChildren_next:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wAddToWidthsOfExpandableVisibleChildren_loop
|
||||
wAddToWidthsOfExpandableVisibleChildren_loopEnd:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wAddToHeightsOfExpandableVisibleChildren
|
||||
;
|
||||
; @param Y = pointer to widget data in SRAM
|
||||
; @param r17:r16 number to add to the heights of all visible Y-expandable children
|
||||
; @clobbers r18, r19, X
|
||||
|
||||
wAddToHeightsOfExpandableVisibleChildren:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
wAddToHeightsOfExpandableVisibleChildren_loop:
|
||||
mov r18, xl
|
||||
or r18, xh
|
||||
breq wAddToHeightsOfExpandableVisibleChildren_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq wAddToHeightsOfExpandableVisibleChildren_next
|
||||
ldd r18, Y+WID_OFFS_OPTIONS1
|
||||
andi r18, WID_OPTIONS1_BIT_STRETCH_Y
|
||||
breq wAddToHeightsOfExpandableVisibleChildren_next
|
||||
ldd r18, Y+WID_OFFS_HEIGHT_LO
|
||||
ldd r19, Y+WID_OFFS_HEIGHT_HI
|
||||
add r18, r16
|
||||
adc r19, r17
|
||||
std Y+WID_OFFS_HEIGHT_LO, r18
|
||||
std Y+WID_OFFS_HEIGHT_HI, r19
|
||||
wAddToHeightsOfExpandableVisibleChildren_next:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wAddToHeightsOfExpandableVisibleChildren_loop
|
||||
wAddToHeightsOfExpandableVisibleChildren_loopEnd:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wSetChildrenWidthsFromMinWidths
|
||||
;
|
||||
; @clobbers any, !Y
|
||||
|
||||
wSetChildrenWidthsFromMinWidths:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
wSetChildrenWidthsFromMinWidths_loop:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq wSetChildrenWidthsFromMinWidths_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
sbrs r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
rjmp wSetChildrenWidthsFromMinWidths_loopNext ; jump if not visible
|
||||
sbrc r18, WID_OPTIONS1_BIT_FIXED_WIDTH
|
||||
rjmp wSetChildrenWidthsFromMinWidths_loopNext ; jump if fixed width
|
||||
ldi r16, WID_SIGNAL_GETMINWIDTH
|
||||
ldi r18, 1 ; default value for when the signal is not handled
|
||||
ldi r19, 0 ; default value for when the signal is not handled
|
||||
rcall OBJ_Handler ; ask child for its minimum size
|
||||
std Y+WID_OFFS_WIDTH_LO, r18
|
||||
std Y+WID_OFFS_WIDTH_HI, r19
|
||||
wSetChildrenWidthsFromMinWidths_loopNext:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wSetChildrenWidthsFromMinWidths_loop
|
||||
wSetChildrenWidthsFromMinWidths_loopEnd:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wSetChildrenHeightsFromMinHeights
|
||||
;
|
||||
; @clobbers any, !Y
|
||||
|
||||
wSetChildrenHeightsFromMinHeights:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
wSetChildrenHeightsFromMinHeights_loop:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq wSetChildrenHeightsFromMinHeights_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
sbrs r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
rjmp wSetChildrenHeightsFromMinHeights_loopNext ; jump if not visible
|
||||
sbrc r18, WID_OPTIONS1_BIT_FIXED_HEIGHT
|
||||
rjmp wSetChildrenHeightsFromMinHeights_loopNext ; jump if fixed height
|
||||
ldi r16, WID_SIGNAL_GETMINHEIGHT
|
||||
ldi r18, 1 ; default value for when the signal is not handled
|
||||
ldi r19, 0 ; default value for when the signal is not handled
|
||||
rcall OBJ_Handler ; ask child for its minimum size
|
||||
std Y+WID_OFFS_HEIGHT_LO, r18
|
||||
std Y+WID_OFFS_HEIGHT_HI, r19
|
||||
wSetChildrenHeightsFromMinHeights_loopNext:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wSetChildrenHeightsFromMinHeights_loop
|
||||
wSetChildrenHeightsFromMinHeights_loopEnd:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,12 +7,14 @@
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_WIN_WIDGET_H
|
||||
#define AQH_AVR_WIN_WIDGET_H
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; defs
|
||||
|
||||
.equ WID_WIDGET_INTER_BORDER = 2
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
@@ -23,31 +25,41 @@
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine WID_Widget_new @global
|
||||
; @routine Widget_Init @global
|
||||
;
|
||||
; @param Y pointer to window SRAM
|
||||
; @param X pointer to parent
|
||||
; @param r18 WID_OFFS_OPTIONS1
|
||||
; @param r19 WID_OFFS_OPTIONS2
|
||||
; @param r18 OBJ options
|
||||
; @param r19 WID_OFFS_OPTIONS1
|
||||
; @param r20 WID_OFFS_OPTIONS2
|
||||
; @clobbers r16, r17, X, Z
|
||||
|
||||
WID_Widget_Init:
|
||||
push r18
|
||||
push r19
|
||||
Widget_Init:
|
||||
push r19
|
||||
push r20
|
||||
push xl
|
||||
push xh
|
||||
ldi zl, LOW(WID_Widget_Handler)
|
||||
ldi zh, HIGH(WID_Widget_Handler)
|
||||
clr r17
|
||||
rcall OBJ_Init
|
||||
ldi zl, LOW(Widget_Handler) ; handler
|
||||
ldi zh, HIGH(Widget_Handler)
|
||||
rcall OBJ_Init ; (r16, r17, X)
|
||||
pop xh
|
||||
pop xl
|
||||
pop r19
|
||||
pop r18
|
||||
std Y+WID_OFFS_OPTIONS1, r18
|
||||
std Y+WID_OFFS_OPTIONS2, r19
|
||||
pop r20
|
||||
pop r19
|
||||
|
||||
; store options
|
||||
std Y+WID_OFFS_OPTIONS1, r19
|
||||
std Y+WID_OFFS_OPTIONS2, r20
|
||||
|
||||
; set basic handler
|
||||
ldi zl, LOW(Widget_Handler) ; handler
|
||||
ldi zh, HIGH(Widget_Handler)
|
||||
rcall OBJ_SetHandler
|
||||
|
||||
mov r16, xl
|
||||
or r16, xh
|
||||
breq WID_Widget_noParent
|
||||
breq Widget_noParent
|
||||
|
||||
; copy defaults from parent
|
||||
adiw xh:xl, WID_OFFS_BG_COL_LO
|
||||
ld r16, X+ ; WID_OFFS_BG_COL_LO
|
||||
@@ -62,8 +74,9 @@ WID_Widget_Init:
|
||||
std Y+WID_OFFS_FONT_LO, r16
|
||||
ld r16, X+ ; WID_OFFS_FONT_HI
|
||||
std Y+WID_OFFS_FONT_HI, r16
|
||||
rjmp WID_Widget_end
|
||||
WID_Widget_noParent: ; preset without parent
|
||||
rjmp Widget_end
|
||||
|
||||
Widget_noParent: ; preset without parent
|
||||
clr r16
|
||||
std Y+WID_OFFS_FONT_LO, r16
|
||||
std Y+WID_OFFS_FONT_HI, r16
|
||||
@@ -79,55 +92,56 @@ WID_Widget_noParent: ; preset without parent
|
||||
std Y+WID_OFFS_BORDER_BOT, r16
|
||||
std Y+WID_OFFS_BORDER_LEFT, r16
|
||||
std Y+WID_OFFS_BORDER_RIGHT, r16
|
||||
WID_Widget_end:
|
||||
Widget_end:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine WID_Widget_Handler
|
||||
; @routine Widget_Handler @global
|
||||
;
|
||||
; Signal handler for an object. A signal can have up to 3 parameters
|
||||
; conveyed in registers R18, R19 and X.
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @param r16 signal
|
||||
; @param R18 1st param
|
||||
; @param R19 2nd param
|
||||
; @param r18 signal
|
||||
; @param r19 srcIdForTarget
|
||||
; @param R20 1st param
|
||||
; @param R21 2nd param
|
||||
; @param X 3rd param
|
||||
; @clobbers any, !Y
|
||||
|
||||
WID_Widget_Handler:
|
||||
cpi r16, WID_SIGNAL_GETMINWIDTH
|
||||
breq WID_Widget_Handler_getMinWidth
|
||||
cpi r16, WID_SIGNAL_GETMINHEIGHT
|
||||
breq WID_Widget_Handler_getMinHeight
|
||||
cpi r16, WID_SIGNAL_LAYOUT
|
||||
breq WID_Widget_Handler_layout
|
||||
cpi r16, WID_SIGNAL_DRAW
|
||||
breq WID_Widget_Handler_draw
|
||||
; for now just forward signal to all children
|
||||
WID_Widget_Handler_forward:
|
||||
rcall OBJ_ForwardSignalToChildren
|
||||
Widget_Handler:
|
||||
cpi r18, OBJ_SIGNAL_DESTROY
|
||||
breq Widget_Handler_destroy
|
||||
cpi r18, WID_SIGNAL_DRAW
|
||||
breq Widget_Handler_draw
|
||||
clc
|
||||
rjmp Widget_Handler_ret
|
||||
Widget_Handler_destroy:
|
||||
; nothing to do here (for HEAP objects we would call Heap_Free)
|
||||
rjmp Widget_Handler_secRet
|
||||
Widget_Handler_draw:
|
||||
rcall Widget_Draw
|
||||
Widget_Handler_secRet:
|
||||
sec
|
||||
Widget_Handler_ret:
|
||||
ret
|
||||
WID_Widget_Handler_getMinWidth:
|
||||
rjmp widgetGetMinWidth
|
||||
WID_Widget_Handler_getMinHeight:
|
||||
rjmp widgetGetMinHeight
|
||||
WID_Widget_Handler_layout:
|
||||
rjmp widgetLayout
|
||||
WID_Widget_Handler_draw:
|
||||
rjmp wDraw
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_Draw @global
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @clobbers
|
||||
|
||||
wDraw:
|
||||
Widget_Draw:
|
||||
ldd r16, Y+OBJ_OFFS_OPTIONS
|
||||
sbrs r16, WID_OPTIONS0_BIT_VISIBLE ; only draw visible widgets
|
||||
rjmp wDraw_ret
|
||||
rjmp widgetDraw_ret
|
||||
cbr r16, (1<<WID_OPTIONS0_BIT_DIRTY)
|
||||
std Y+OBJ_OFFS_OPTIONS, r16
|
||||
|
||||
@@ -142,74 +156,24 @@ wDraw:
|
||||
ldd r9, Y+WID_OFFS_WIDTH_HI
|
||||
ldd r10, Y+WID_OFFS_HEIGHT_LO
|
||||
ldd r11, Y+WID_OFFS_HEIGHT_HI
|
||||
bigcall ILI9341_FillRect
|
||||
wDraw_ret:
|
||||
bigcall Display_FillRect
|
||||
widgetDraw_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_SetAbsoluteCoords @global
|
||||
;
|
||||
|
||||
widgetLayout:
|
||||
rjmp wVLayout
|
||||
|
||||
|
||||
|
||||
wVLayout:
|
||||
rcall wSetChildrenWidthsFromMinWidths
|
||||
rcall wSetChildrenHeightsFromMinHeights
|
||||
|
||||
; count number of expandable children
|
||||
ldi r16, (1<<WID_OPTIONS1_BIT_STRETCH_Y) ; value
|
||||
ldi r17, (1<<WID_OPTIONS1_BIT_STRETCH_Y) ; mask
|
||||
rcall widgetCountVisibleChildrenWithOptions1 ; r18=number of matching visible children (r24, r25, X)
|
||||
tst r18
|
||||
breq wVLayout_Ydone ; no expandable children, nothing to distribute
|
||||
; determine full height needed by all children
|
||||
push r18 ; number of visible expandable child widgets
|
||||
clr r17 ; mask=0 -> count all visible children
|
||||
rcall wGetSumOfMatchingVisibleChildrenHeights ; r19:r18=sum of all children heights
|
||||
pop r22
|
||||
clr r23 ; r23:r22=number of visible expandable children
|
||||
; calculate number of bytes to add to each expandable child widget
|
||||
ldd r20, Y+WID_OFFS_HEIGHT_LO ; total height
|
||||
ldd r21, Y+WID_OFFS_HEIGHT_HI
|
||||
clr r16
|
||||
ldd r17, Y+WID_OFFS_BORDER_TOP ; subtract top border
|
||||
sub r20, r17
|
||||
sbc r21, r16
|
||||
brcs wVLayout_heightTooSmall ; jmp if too small
|
||||
ldd r17, Y+WID_OFFS_BORDER_BOT ; subtract bottom border
|
||||
sub r20, r17
|
||||
sbc r21, r16
|
||||
brcs wVLayout_heightTooSmall ; jmp if too small
|
||||
|
||||
sub r20, r18 ; r21:r20 = HEIGHT-SUM_OF_VIS_CHILDREN_HEIGHTS
|
||||
sbc r21, r19
|
||||
brcc wVLayout_heightTooSmall
|
||||
breq wVLayout_yDone ; nothing to distribute
|
||||
bigcall Utils_Divu16_16_16 ; r17:r16 = r21:r20 / r23:r22
|
||||
; add additional pixel to heights of expandable child widgets
|
||||
rcall wAddToHeightsOfExpandableVisibleChildren
|
||||
|
||||
wVLayout_yDone:
|
||||
rcall wSetRelYFromHeightInVisibleChildren
|
||||
rcall wAlignChildrenHorizontally
|
||||
; rcall wSetAbsoluteCoords call in GUI loop after calling layout on all widgets
|
||||
wVLayout_heightTooSmall:
|
||||
; TODO: how to handle this case?
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
wSetAbsoluteCoords:
|
||||
Widget_SetAbsoluteCoords:
|
||||
push yl
|
||||
push yh
|
||||
wSetAbsoluteCoords_loop:
|
||||
Widget_SetAbsoluteCoords_loop:
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq wSetAbsoluteCoords_nextSibling
|
||||
breq Widget_SetAbsoluteCoords_nextSibling
|
||||
push yl
|
||||
push yh
|
||||
bigcall Tree_GetParentObject
|
||||
@@ -219,14 +183,14 @@ wSetAbsoluteCoords_loop:
|
||||
clr r21
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq wSetAbsoluteCoords_r1820set
|
||||
breq Widget_SetAbsoluteCoords_r1820set
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
ldd r18, Y+WID_OFFS_ABS_X_LO
|
||||
ldd r19, Y+WID_OFFS_ABS_X_HI
|
||||
ldd r20, Y+WID_OFFS_ABS_Y_LO
|
||||
ldd r21, Y+WID_OFFS_ABS_Y_HI
|
||||
wSetAbsoluteCoords_r1820set:
|
||||
Widget_SetAbsoluteCoords_r1820set:
|
||||
pop yh
|
||||
pop yl
|
||||
; handle X
|
||||
@@ -244,152 +208,17 @@ wSetAbsoluteCoords_r1820set:
|
||||
std Y+WID_OFFS_ABS_Y_LO, r16
|
||||
std Y+WID_OFFS_ABS_Y_HI, r17
|
||||
bigcall Tree_GetObjectBelow
|
||||
rjmp wSetAbsoluteCoords_loopEnd
|
||||
wSetAbsoluteCoords_nextSibling:
|
||||
rjmp Widget_SetAbsoluteCoords_loopEnd
|
||||
Widget_SetAbsoluteCoords_nextSibling:
|
||||
bigcall Tree_GetNextSibling
|
||||
wSetAbsoluteCoords_loopEnd:
|
||||
Widget_SetAbsoluteCoords_loopEnd:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq wSetAbsoluteCoords_end
|
||||
breq Widget_SetAbsoluteCoords_end
|
||||
mov yl, xl
|
||||
mov yh, xh
|
||||
rjmp wSetAbsoluteCoords_loop
|
||||
wSetAbsoluteCoords_end:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wAlignChildrenHorizontally
|
||||
;
|
||||
; Horizontally align children within the width of the parent widget.
|
||||
; Only changes Y+WID_OFFS_REL_X_LO/HI.
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @clobbers r16, r17, r18, r19, r24, r25
|
||||
|
||||
wAlignChildrenHorizontally:
|
||||
push yl
|
||||
push yh
|
||||
ldd r24, Y+WID_OFFS_WIDTH_LO ; parent width
|
||||
ldd r25, Y+WID_OFFS_WIDTH_HI
|
||||
ldd r19, Y+WID_OFFS_BORDER_LEFT ; subtract left border
|
||||
mov r16, r19
|
||||
clr r17
|
||||
sub r24, r16
|
||||
sbc r25, r17
|
||||
ldd r16, Y+WID_OFFS_BORDER_RIGHT ; subtract right border
|
||||
sub r24, r16
|
||||
sbc r25, r17 ; r25:r24=parent width minus lateral borders, r19=left border
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
wAlignChildrenHorizontally_loop:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq wAlignChildrenHorizontally_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq wAlignChildrenHorizontally_loopNext
|
||||
push r24
|
||||
push r25
|
||||
push r19
|
||||
rcall wAlignHorizontally
|
||||
pop r19
|
||||
add r24, r19
|
||||
adc r25, r19
|
||||
sub r25, r19
|
||||
std Y+WID_OFFS_REL_X_LO, r24
|
||||
std Y+WID_OFFS_REL_X_HI, r25
|
||||
pop r25
|
||||
pop r24
|
||||
wAlignChildrenHorizontally_loopNext:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wAlignChildrenHorizontally_loop
|
||||
wAlignChildrenHorizontally_loopEnd:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wAlignHorizontally
|
||||
;
|
||||
; @param r25:r24 parent width minus lateral borders
|
||||
; @return r25:r24 proposed X position relative to parent
|
||||
; @clobbers r16, r17
|
||||
|
||||
wAlignHorizontally:
|
||||
ldd r16, Y+WID_OFFS_OPTIONS1
|
||||
sbrc r16, WID_OPTIONS1_BIT_STRETCH_X
|
||||
rjmp wAlignHorizontally_stretch
|
||||
andi r16, (WID_OPTIONS1_BIT_HALIGN0 | WID_OPTIONS1_BIT_HALIGN1)
|
||||
cpi r16, (0<<WID_OPTIONS1_BIT_HALIGN1) | (0<<WID_OPTIONS1_BIT_HALIGN0)
|
||||
breq wAlignHorizontally_left
|
||||
cpi r16, (0<<WID_OPTIONS1_BIT_HALIGN1) | (1<<WID_OPTIONS1_BIT_HALIGN0)
|
||||
breq wAlignHorizontally_right
|
||||
wAlignHorizontally_center:
|
||||
ldd r16, Y+WID_OFFS_WIDTH_LO
|
||||
ldd r17, Y+WID_OFFS_WIDTH_HI
|
||||
sub r24, r16
|
||||
sbc r25, r17
|
||||
lsr r25
|
||||
ror r24
|
||||
ret
|
||||
wAlignHorizontally_left:
|
||||
clr r24
|
||||
clr r25
|
||||
ret
|
||||
wAlignHorizontally_right:
|
||||
ldd r16, Y+WID_OFFS_WIDTH_LO
|
||||
ldd r17, Y+WID_OFFS_WIDTH_HI
|
||||
sub r24, r16
|
||||
sbc r25, r17
|
||||
wAlignHorizontally_stretch:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wSetRelYFromHeightInVisibleChildren
|
||||
;
|
||||
; @param Y pointer to object SRAM
|
||||
; @clobbers r17, r18, r19, r24, r25, X
|
||||
|
||||
wSetRelYFromHeightInVisibleChildren:
|
||||
push yl
|
||||
push yh
|
||||
ldd r24, Y+WID_OFFS_BORDER_TOP
|
||||
clr r25
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
wSetRelYFromHeightInVisibleChildren_loop:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq wSetRelYFromHeightInVisibleChildren_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq wSetRelYFromHeightInVisibleChildren_loopNext
|
||||
std Y+WID_OFFS_REL_Y_LO, r24
|
||||
std Y+WID_OFFS_REL_Y_HI, r25
|
||||
ldd r18, Y+WID_OFFS_WIDTH_LO
|
||||
ldd r19, Y+WID_OFFS_WIDTH_HI
|
||||
add r24, r18 ; TODO: handle carry later
|
||||
adc r25, r19
|
||||
adiw r25:r24, WID_WIDGET_INTER_BORDER
|
||||
wSetRelYFromHeightInVisibleChildren_loopNext:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wSetRelYFromHeightInVisibleChildren_loop
|
||||
wSetRelYFromHeightInVisibleChildren_loopEnd:
|
||||
mov r18, r24
|
||||
mov r19, r25
|
||||
rjmp Widget_SetAbsoluteCoords_loop
|
||||
Widget_SetAbsoluteCoords_end:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
@@ -400,371 +229,6 @@ wSetRelYFromHeightInVisibleChildren_loopEnd:
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetGetMinWidth
|
||||
;
|
||||
; @return r19:r18 minimum width of widget
|
||||
; @clobbers any, !Y
|
||||
|
||||
widgetGetMinWidth:
|
||||
ldi r16, WID_SIGNAL_GETMINWIDTH
|
||||
rjmp widgetGetLargestChildMinSize
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetGetMinHeight
|
||||
;
|
||||
; @return r19:r18 minimum height of widget
|
||||
; @clobbers any, !Y
|
||||
|
||||
widgetGetMinHeight:
|
||||
ldi r16, WID_SIGNAL_GETMINHEIGHT
|
||||
rjmp widgetSumOfChildrenMinSize
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetSumOfChildrenMinSize
|
||||
;
|
||||
; @param r16 signal to send (WID_SIGNAL_GETMINWIDTH, WID_SIGNAL_GETMINHEIGHT)
|
||||
; @return r19:r18 minimum width or height of widget
|
||||
; @clobbers any, !Y
|
||||
|
||||
widgetSumOfChildrenMinSize:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
clr r24
|
||||
clr r25
|
||||
widgetSumOfChildrenMinSize_loop:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq widgetSumOfChildrenMinSize_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq widgetSumOfChildrenMinSize_loopNext
|
||||
push r16
|
||||
push r24
|
||||
push r25
|
||||
ldi r18, 1 ; default value for when the signal is not handled
|
||||
ldi r19, 0 ; default value for when the signal is not handled
|
||||
rcall OBJ_Handler ; ask child for its minimum size
|
||||
pop r25
|
||||
pop r24
|
||||
pop r16
|
||||
add r24, r18 ; TODO: handle carry later
|
||||
adc r25, r19
|
||||
adiw r25:r24, WID_WIDGET_INTER_BORDER
|
||||
widgetSumOfChildrenMinSize_loopNext:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp widgetSumOfChildrenMinSize_loop
|
||||
widgetSumOfChildrenMinSize_loopEnd:
|
||||
mov r18, r24
|
||||
mov r19, r25
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetGetLargestChildMinSize
|
||||
;
|
||||
; @param r16 signal to send (WID_SIGNAL_GETMINWIDTH, WID_SIGNAL_GETMINHEIGHT)
|
||||
; @return r19:r18 minimum width or height of widget
|
||||
; @clobbers any, !Y
|
||||
|
||||
widgetGetLargestChildMinSize:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
clr r24
|
||||
clr r25
|
||||
widgetGetLargestChildMinSize_loop:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq widgetGetLargestChildMinSize_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq widgetGetLargestChildMinSize_loopNext
|
||||
push r16
|
||||
push r24
|
||||
push r25
|
||||
ldi r18, 1 ; default value for when the signal is not handled
|
||||
ldi r19, 0 ; default value for when the signal is not handled
|
||||
rcall OBJ_Handler ; ask child for its minimum size
|
||||
pop r25
|
||||
pop r24
|
||||
pop r16
|
||||
sub r24, r18
|
||||
sbc r25, r19
|
||||
add r24, r18
|
||||
adc r25, r19
|
||||
brcc widgetGetLargestChildMinSize_loopNext
|
||||
mov r24, r18
|
||||
mov r25, r19
|
||||
widgetGetLargestChildMinSize_loopNext:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp widgetGetLargestChildMinSize_loop
|
||||
widgetGetLargestChildMinSize_loopEnd:
|
||||
mov r18, r24
|
||||
mov r19, r25
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetCountVisibleChildrenWithOptions1
|
||||
;
|
||||
; Count visible direct children with a matching WID_OFFS_OPTIONS1 field.
|
||||
;
|
||||
; @param r16 option1 value combination wanted
|
||||
; @param r17 option1 mask of bits to match
|
||||
; @return r18 number of matching direct children
|
||||
; @clobbers r18, r24, r25, X
|
||||
|
||||
widgetCountVisibleChildrenWithOptions1:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
clr r24
|
||||
widgetCountVisibleChildrenWithOptions1_loop:
|
||||
mov r25, xl
|
||||
or r25, xh
|
||||
breq widgetCountVisibleChildrenWithOptions1_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq widgetCountVisibleChildrenWithOptions1_next
|
||||
ldd r18, Y+WID_OFFS_OPTIONS1
|
||||
eor r18, r17
|
||||
and r18, r16
|
||||
brne widgetCountVisibleChildrenWithOptions1_next
|
||||
inc r24
|
||||
widgetCountVisibleChildrenWithOptions1_next:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp widgetSumOfChildrenMinSize_loop
|
||||
widgetCountVisibleChildrenWithOptions1_loopEnd:
|
||||
mov r18, r24
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wGetSumOfMatchingVisibleChildrenHeights
|
||||
;
|
||||
; Add heights of all matching visible children.
|
||||
;
|
||||
; @param r16 option1 value combination wanted
|
||||
; @param r17 option1 mask of bits to match
|
||||
; @return r19:r18 sum of widths of all visible direct children
|
||||
; @clobbers r24, r25, X
|
||||
|
||||
wGetSumOfMatchingVisibleChildrenHeights:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
clr r24
|
||||
clr r25
|
||||
wGetSumOfMatchingVisibleChildrenHeights_loop:
|
||||
mov r18, xl
|
||||
or r18, xh
|
||||
breq wGetSumOfMatchingVisibleChildrenHeights_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq wGetSumOfMatchingVisibleChildrenHeights_next
|
||||
ldd r18, Y+WID_OFFS_OPTIONS1
|
||||
eor r18, r17
|
||||
and r18, r16
|
||||
brne wGetSumOfMatchingVisibleChildrenHeights_next
|
||||
ldd r18, Y+WID_OFFS_HEIGHT_LO
|
||||
ldd r19, Y+WID_OFFS_HEIGHT_HI
|
||||
add r24, r18
|
||||
adc r25, r19
|
||||
wGetSumOfMatchingVisibleChildrenHeights_next:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wGetSumOfMatchingVisibleChildrenHeights_loop
|
||||
wGetSumOfMatchingVisibleChildrenHeights_loopEnd:
|
||||
mov r18, r24
|
||||
mov r19, r25
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wAddToWidthsOfExpandableVisibleChildren
|
||||
;
|
||||
; @param Y = pointer to widget data in SRAM
|
||||
; @param r17:r16 number to add to the widths of all visible X-expandable children
|
||||
; @clobbers r18, r19, X
|
||||
|
||||
wAddToWidthsOfExpandableVisibleChildren:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
wAddToWidthsOfExpandableVisibleChildren_loop:
|
||||
mov r18, xl
|
||||
or r18, xh
|
||||
breq wAddToWidthsOfExpandableVisibleChildren_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq wAddToWidthsOfExpandableVisibleChildren_next
|
||||
ldd r18, Y+WID_OFFS_OPTIONS1
|
||||
andi r18, WID_OPTIONS1_BIT_STRETCH_X
|
||||
breq wAddToWidthsOfExpandableVisibleChildren_next
|
||||
ldd r18, Y+WID_OFFS_WIDTH_LO
|
||||
ldd r19, Y+WID_OFFS_WIDTH_HI
|
||||
add r18, r16
|
||||
adc r19, r17
|
||||
std Y+WID_OFFS_WIDTH_LO, r18
|
||||
std Y+WID_OFFS_WIDTH_HI, r19
|
||||
wAddToWidthsOfExpandableVisibleChildren_next:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wAddToWidthsOfExpandableVisibleChildren_loop
|
||||
wAddToWidthsOfExpandableVisibleChildren_loopEnd:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wAddToHeightsOfExpandableVisibleChildren
|
||||
;
|
||||
; @param Y = pointer to widget data in SRAM
|
||||
; @param r17:r16 number to add to the heights of all visible Y-expandable children
|
||||
; @clobbers r18, r19, X
|
||||
|
||||
wAddToHeightsOfExpandableVisibleChildren:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
wAddToHeightsOfExpandableVisibleChildren_loop:
|
||||
mov r18, xl
|
||||
or r18, xh
|
||||
breq wAddToHeightsOfExpandableVisibleChildren_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
andi r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
breq wAddToHeightsOfExpandableVisibleChildren_next
|
||||
ldd r18, Y+WID_OFFS_OPTIONS1
|
||||
andi r18, WID_OPTIONS1_BIT_STRETCH_Y
|
||||
breq wAddToHeightsOfExpandableVisibleChildren_next
|
||||
ldd r18, Y+WID_OFFS_HEIGHT_LO
|
||||
ldd r19, Y+WID_OFFS_HEIGHT_HI
|
||||
add r18, r16
|
||||
adc r19, r17
|
||||
std Y+WID_OFFS_HEIGHT_LO, r18
|
||||
std Y+WID_OFFS_HEIGHT_HI, r19
|
||||
wAddToHeightsOfExpandableVisibleChildren_next:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wAddToHeightsOfExpandableVisibleChildren_loop
|
||||
wAddToHeightsOfExpandableVisibleChildren_loopEnd:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wSetChildrenWidthsFromMinWidths
|
||||
;
|
||||
; @clobbers any, !Y
|
||||
|
||||
wSetChildrenWidthsFromMinWidths:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
wSetChildrenWidthsFromMinWidths_loop:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq wSetChildrenWidthsFromMinWidths_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
sbrs r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
rjmp wSetChildrenWidthsFromMinWidths_loopNext ; jump if not visible
|
||||
sbrc r18, WID_OPTIONS1_BIT_FIXED_WIDTH
|
||||
rjmp wSetChildrenWidthsFromMinWidths_loopNext ; jump if fixed width
|
||||
ldi r16, WID_SIGNAL_GETMINWIDTH
|
||||
ldi r18, 1 ; default value for when the signal is not handled
|
||||
ldi r19, 0 ; default value for when the signal is not handled
|
||||
rcall OBJ_Handler ; ask child for its minimum size
|
||||
std Y+WID_OFFS_WIDTH_LO, r18
|
||||
std Y+WID_OFFS_WIDTH_HI, r19
|
||||
wSetChildrenWidthsFromMinWidths_loopNext:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wSetChildrenWidthsFromMinWidths_loop
|
||||
wSetChildrenWidthsFromMinWidths_loopEnd:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine wSetChildrenHeightsFromMinHeights
|
||||
;
|
||||
; @clobbers any, !Y
|
||||
|
||||
wSetChildrenHeightsFromMinHeights:
|
||||
push yl
|
||||
push yh
|
||||
rcall Tree_GetFirstChildObject ; (none)
|
||||
wSetChildrenHeightsFromMinHeights_loop:
|
||||
mov r17, xl
|
||||
or r17, xh
|
||||
breq wSetChildrenHeightsFromMinHeights_loopEnd
|
||||
mov yl, xl
|
||||
mov yh, yl
|
||||
ldd r18, Y+OBJ_OFFS_OPTIONS
|
||||
sbrs r18, WID_OPTIONS0_BIT_VISIBLE
|
||||
rjmp wSetChildrenHeightsFromMinHeights_loopNext ; jump if not visible
|
||||
sbrc r18, WID_OPTIONS1_BIT_FIXED_HEIGHT
|
||||
rjmp wSetChildrenHeightsFromMinHeights_loopNext ; jump if fixed height
|
||||
ldi r16, WID_SIGNAL_GETMINHEIGHT
|
||||
ldi r18, 1 ; default value for when the signal is not handled
|
||||
ldi r19, 0 ; default value for when the signal is not handled
|
||||
rcall OBJ_Handler ; ask child for its minimum size
|
||||
std Y+WID_OFFS_HEIGHT_LO, r18
|
||||
std Y+WID_OFFS_HEIGHT_HI, r19
|
||||
wSetChildrenHeightsFromMinHeights_loopNext:
|
||||
rcall Tree_GetNextSibling ; (none)
|
||||
rjmp wSetChildrenHeightsFromMinHeights_loop
|
||||
wSetChildrenHeightsFromMinHeights_loopEnd:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
#endif ; AQH_AVR_WIN_WIDGET_H
|
||||
|
||||
|
||||
|
||||
@@ -7,5 +7,582 @@
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_XPT2046_MAIN_ASM
|
||||
#define AQH_AVR_XPT2046_MAIN_ASM
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; Module implementing DISPLAY_INPUT using displays with XPT2046 touch
|
||||
; controllers.
|
||||
;
|
||||
; Implements:
|
||||
; - Display_InputGetState
|
||||
; Defines:
|
||||
; - DISPLAY_IFLAGS_PRESSED_BIT
|
||||
; - DISPLAY_IFLAGS_CHGCOORD_BIT
|
||||
; - DISPLAY_IFLAGS_CHGPRESS_BIT
|
||||
; Needs:
|
||||
; - DISPLAY_WIDTH
|
||||
; - DISPLAY_HEIGHT
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; defines
|
||||
|
||||
.equ DISPLAY_IFLAGS_PRESSED_BIT = 7
|
||||
.equ DISPLAY_IFLAGS_CHGCOORD_BIT = 6
|
||||
.equ DISPLAY_IFLAGS_CHGPRESS_BIT = 5
|
||||
|
||||
|
||||
|
||||
.equ XPT2046_SPIMODE = (0<<SPIHW_MODE_SPEED0_BIT) | \
|
||||
(0<<SPIHW_MODE_SPEED1_BIT) | \
|
||||
(1<<SPIHW_MODE_DOUBLESPEED_BIT) | \
|
||||
(0<<SPIHW_MODE_DATAORDER_BIT) | \
|
||||
(0<<SPIHW_MODE_CPOL_BIT) | \
|
||||
(0<<SPIHW_MODE_CPHA_BIT)
|
||||
|
||||
|
||||
.equ XPT2046_CMD_READ_X = 0xd1
|
||||
.equ XPT2046_CMD_READ_Y = 0x91
|
||||
.equ XPT2046_CMD_READ_Z1 = 0xb1
|
||||
.equ XPT2046_CMD_READ_Z2 = 0xc1
|
||||
|
||||
.equ XPT2046_AVERAGE = 2
|
||||
.equ XPT2046_Z_THRESHOLD = 50
|
||||
.equ XPT2046_TIMER_VALUE = 3 ; every 300ms
|
||||
|
||||
.equ XPT2046_CALIB_XLEFT = 0x0c0
|
||||
.equ XPT2046_CALIB_XRIGHT = 0x780
|
||||
|
||||
.equ XPT2046_CALIB_YTOP = 0x0c0
|
||||
.equ XPT2046_CALIB_YBOTTOM = 0x7a0
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; data
|
||||
|
||||
.dseg
|
||||
|
||||
xpt2046ValueBuffer: .byte (XPT2046_AVERAGE*2)
|
||||
xpt2046RawX: .byte 2
|
||||
xpt2046RawY: .byte 2
|
||||
xpt2046CurrentX: .byte 2
|
||||
xpt2046CurrentY: .byte 2
|
||||
xpt2046CurrentZ: .byte 2
|
||||
xpt2046Flags: .byte 1
|
||||
xpt2046Timer: .byte 1
|
||||
|
||||
xpt2046LeftX: .byte 2
|
||||
xpt2046FactorX: .byte 2
|
||||
|
||||
xpt2046TopY: .byte 2
|
||||
xpt2046FactorY: .byte 2
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine XPT2046_Init @global
|
||||
|
||||
XPT2046_Init:
|
||||
clr r16
|
||||
sts xpt2046CurrentX, r16
|
||||
sts xpt2046CurrentX+1, r16
|
||||
|
||||
sts xpt2046CurrentY, r16
|
||||
sts xpt2046CurrentY+1, r16
|
||||
|
||||
sts xpt2046CurrentZ, r16
|
||||
sts xpt2046CurrentZ+1, r16
|
||||
|
||||
sts xpt2046Flags, r16
|
||||
|
||||
sts xpt2046Timer, r16
|
||||
|
||||
rcall xpt2046CalcCalibration
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine XPT2046_Every100ms @global
|
||||
|
||||
XPT2046_Every100ms:
|
||||
lds r16, xpt2046Timer
|
||||
inc r16
|
||||
cpi r16, XPT2046_TIMER_VALUE
|
||||
brcs XPT2046_Every100ms_store
|
||||
rcall xpt2046UpdateValues
|
||||
clr r16
|
||||
XPT2046_Every100ms_store:
|
||||
sts xpt2046Timer, r16
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Display_InputGetState @global
|
||||
;
|
||||
; Get current state, clears stored flags DISPLAY_IFLAGS_CHGCOORD_BIT
|
||||
; and DISPLAY_IFLAGS_CHGPRESS_BIT.
|
||||
;
|
||||
; @return r16 flags
|
||||
; @return r5:r4 X
|
||||
; @return r7:r6 Y
|
||||
; @clobber r17
|
||||
|
||||
Display_InputGetState:
|
||||
lds r16, xpt2046Flags
|
||||
mov r17, r16
|
||||
cbr r17, (1<<DISPLAY_IFLAGS_CHGCOORD_BIT) | (1<<DISPLAY_IFLAGS_CHGPRESS_BIT)
|
||||
sts xpt2046Flags, r17
|
||||
lds r4, xpt2046CurrentX
|
||||
lds r5, xpt2046CurrentX+1
|
||||
lds r6, xpt2046CurrentY
|
||||
lds r7, xpt2046CurrentY+1
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046CalcCalibration
|
||||
;
|
||||
xpt2046CalcCalibration:
|
||||
; calibrate X (hardcoded for now)
|
||||
ldi r18, LOW(XPT2046_CALIB_XLEFT)
|
||||
ldi r19, HIGH(XPT2046_CALIB_XLEFT)
|
||||
ldi r20, LOW(XPT2046_CALIB_XRIGHT)
|
||||
ldi r21, HIGH(XPT2046_CALIB_XRIGHT)
|
||||
ldi r22, LOW(DISPLAY_HEIGHT)
|
||||
ldi r23, HIGH(DISPLAY_HEIGHT)
|
||||
rcall xpt2046CalcCalibX
|
||||
|
||||
; calibrate Y (hardcoded for now)
|
||||
ldi r18, LOW(XPT2046_CALIB_YTOP)
|
||||
ldi r19, HIGH(XPT2046_CALIB_YTOP)
|
||||
ldi r20, LOW(XPT2046_CALIB_YBOTTOM)
|
||||
ldi r21, HIGH(XPT2046_CALIB_YBOTTOM)
|
||||
ldi r22, LOW(DISPLAY_WIDTH)
|
||||
ldi r23, HIGH(DISPLAY_WIDTH)
|
||||
rcall xpt2046CalcCalibY
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046CalcCalibX
|
||||
;
|
||||
; @param r19:r18: xLeft
|
||||
; @param r21:r20 xRight
|
||||
; @param r23:r22 display hardware width
|
||||
|
||||
xpt2046CalcCalibX:
|
||||
sts xpt2046LeftX, r18
|
||||
sts xpt2046LeftX+1, r19
|
||||
|
||||
mov r24, r20
|
||||
mov r25, r21
|
||||
sub r24, r18
|
||||
sbc r25, r19
|
||||
lsl r24 ; *2
|
||||
rol r25
|
||||
lsl r24 ; *4
|
||||
rol r25
|
||||
lsl r24 ; *8
|
||||
rol r25
|
||||
mov r20, r24
|
||||
mov r21, r25
|
||||
bigcall Utils_Divu16_16_16 ; R17:R16=result
|
||||
sts xpt2046FactorX, r16
|
||||
sts xpt2046FactorX+1, r17
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046CalcCalibY
|
||||
;
|
||||
; @param r19:r18: yTop
|
||||
; @param r21:r20 yBottom
|
||||
; @param r23:r22 display hardware height
|
||||
|
||||
xpt2046CalcCalibY:
|
||||
sts xpt2046TopY, r18
|
||||
sts xpt2046TopY+1, r19
|
||||
|
||||
mov r24, r20
|
||||
mov r25, r21
|
||||
sub r24, r18
|
||||
sbc r25, r19
|
||||
lsl r24 ; *2
|
||||
rol r25
|
||||
lsl r24 ; *4
|
||||
rol r25
|
||||
lsl r24 ; *8
|
||||
rol r25
|
||||
mov r20, r24
|
||||
mov r21, r25
|
||||
bigcall Utils_Divu16_16_16 ; R17:R16=result
|
||||
sts xpt2046FactorY, r16
|
||||
sts xpt2046FactorY+1, r17
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046UpdateValues
|
||||
|
||||
xpt2046UpdateValues:
|
||||
push r15
|
||||
in r15, SREG
|
||||
cli
|
||||
|
||||
lds r23, xpt2046Flags
|
||||
rcall xpt2046BeginSpi ; (R16, R17)
|
||||
|
||||
rcall xpt2046UpdateZ
|
||||
|
||||
mov r16, r23
|
||||
andi r16, (1<<DISPLAY_IFLAGS_PRESSED_BIT) ; only read coords if pressed
|
||||
breq xpt2046UpdateValues_storeFlags
|
||||
|
||||
rcall xpt2046UpdateRawX
|
||||
rcall xpt2046UpdateRawY
|
||||
|
||||
rcall xpt2046CalcX
|
||||
rcall xpt2046CalcY
|
||||
|
||||
xpt2046UpdateValues_storeFlags:
|
||||
sts xpt2046Flags, r23
|
||||
rcall xpt2046EndSpi ; (R16, R17)
|
||||
|
||||
out SREG, r15
|
||||
pop r15
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046CalcX
|
||||
;
|
||||
; @param r23 current xpt2046Flag (modified by routine)
|
||||
; @clobbers (r16, r17, r18, r19, r20, r21, r22)
|
||||
|
||||
xpt2046CalcX:
|
||||
push r23
|
||||
lds r20, xpt2046RawY
|
||||
lds r21, xpt2046RawY+1
|
||||
lds r16, xpt2046TopY
|
||||
lds r17, xpt2046TopY+1
|
||||
sub r20, r16
|
||||
sbc r21, r17
|
||||
brcc xpt2046CalcX_trans
|
||||
clr r20
|
||||
clr r21
|
||||
xpt2046CalcX_trans:
|
||||
lsl r20 ; *2
|
||||
rol r21
|
||||
lsl r20 ; *4
|
||||
rol r21
|
||||
lsl r20 ; *8
|
||||
rol r21
|
||||
lds r22, xpt2046FactorY
|
||||
lds r23, xpt2046FactorY+1
|
||||
bigcall Utils_Divu16_16_16
|
||||
lds r18, xpt2046CurrentX
|
||||
lds r19, xpt2046CurrentX+1
|
||||
sts xpt2046CurrentX, r16
|
||||
sts xpt2046CurrentX+1, r17
|
||||
pop r23
|
||||
sub r16, r18
|
||||
sbc r17, r19
|
||||
breq xpt2046CalcX_ret
|
||||
ori r23, (1<<DISPLAY_IFLAGS_CHGCOORD_BIT)
|
||||
xpt2046CalcX_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046CalcY
|
||||
;
|
||||
; @param r23 current xpt2046Flag (modified by routine)
|
||||
; @clobbers (r16, r17, r18, r19, r20, r21, r22)
|
||||
|
||||
xpt2046CalcY:
|
||||
push r23
|
||||
lds r20, xpt2046RawX
|
||||
lds r21, xpt2046RawX+1
|
||||
lds r16, xpt2046LeftX
|
||||
lds r17, xpt2046LeftX+1
|
||||
sub r20, r16
|
||||
sbc r21, r17
|
||||
brcc xpt2046CalcY_trans
|
||||
clr r20
|
||||
clr r21
|
||||
xpt2046CalcY_trans:
|
||||
lsl r20 ; *2
|
||||
rol r21
|
||||
lsl r20 ; *4
|
||||
rol r21
|
||||
lsl r20 ; *8
|
||||
rol r21
|
||||
lds r22, xpt2046FactorX
|
||||
lds r23, xpt2046FactorX+1
|
||||
bigcall Utils_Divu16_16_16
|
||||
lds r18, xpt2046CurrentY
|
||||
lds r19, xpt2046CurrentY+1
|
||||
sts xpt2046CurrentY, r16
|
||||
sts xpt2046CurrentY+1, r17
|
||||
pop r23
|
||||
sub r16, r18
|
||||
sbc r17, r19
|
||||
breq xpt2046CalcY_ret
|
||||
ori r23, (1<<DISPLAY_IFLAGS_CHGCOORD_BIT)
|
||||
xpt2046CalcY_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046UpdateRawX
|
||||
;
|
||||
; @clobbers (r16, r17, r18, r19, r20, r21)
|
||||
|
||||
xpt2046UpdateRawX:
|
||||
; dummy read
|
||||
ldi r16, XPT2046_CMD_READ_X
|
||||
rcall xpt2046SendCommandRecv12Bit ; (R16)
|
||||
|
||||
ldi r16, XPT2046_CMD_READ_X
|
||||
rcall xpt2046ReadAvgValues ; (r16, r18, r19, r20, r21)
|
||||
rcall xpt2046AverageValues ; (r16, r17, r21)
|
||||
|
||||
sts xpt2046RawX, r18
|
||||
sts xpt2046RawX+1, r19
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046UpdateRawY
|
||||
;
|
||||
; @param r23 current xpt2046Flag (modified by routine)
|
||||
; @clobbers (r16, r18, r19, r20, r21)
|
||||
|
||||
xpt2046UpdateRawY:
|
||||
; read Y
|
||||
ldi r16, XPT2046_CMD_READ_Y
|
||||
rcall xpt2046ReadAvgValues ; (r16, r18, r19, r20, r21)
|
||||
rcall xpt2046AverageValues ; (r16, r17, r21)
|
||||
sts xpt2046RawY, r18
|
||||
sts xpt2046RawY+1, r19
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046UpdateZ
|
||||
;
|
||||
; @param r23 current xpt2046Flag (modified by routine)
|
||||
; @clobbers (r16, r18, r19, r20, r21)
|
||||
|
||||
xpt2046UpdateZ:
|
||||
ldi r16, XPT2046_CMD_READ_Z1
|
||||
rcall xpt2046SendCommandRecv12Bit ; (R16)
|
||||
sts xpt2046CurrentZ, r18
|
||||
sts xpt2046CurrentZ+1, r19
|
||||
|
||||
ldi r16, LOW(XPT2046_Z_THRESHOLD)
|
||||
ldi r17, HIGH(XPT2046_Z_THRESHOLD)
|
||||
sub r18, r16
|
||||
sbc r19, r17
|
||||
mov r16, r23
|
||||
brcc xpt2046UpdateZ_aboveThreshold
|
||||
cbr r23, (1<<DISPLAY_IFLAGS_PRESSED_BIT) ; Z below threshold, not pressed
|
||||
rjmp xpt2046UpdateZ_checkPressChg
|
||||
xpt2046UpdateZ_aboveThreshold:
|
||||
ori r23, (1<<DISPLAY_IFLAGS_PRESSED_BIT)
|
||||
xpt2046UpdateZ_checkPressChg:
|
||||
eor r16, r23
|
||||
andi r16, (1<<DISPLAY_IFLAGS_PRESSED_BIT)
|
||||
breq xpt2046UpdateZ_ret
|
||||
ori r23, (1<<DISPLAY_IFLAGS_CHGPRESS_BIT)
|
||||
xpt2046UpdateZ_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046AverageValues
|
||||
;
|
||||
; @return r19:r18 averaged value
|
||||
; @clobbers r16, r17, r21
|
||||
|
||||
xpt2046AverageValues:
|
||||
ldi xl, LOW(xpt2046ValueBuffer)
|
||||
ldi xh, HIGH(xpt2046ValueBuffer)
|
||||
ldi r21, XPT2046_AVERAGE
|
||||
clr r18
|
||||
clr r19
|
||||
xpt2046AverageValues_loop:
|
||||
ld r16, X+
|
||||
ld r17, X+
|
||||
add r18, r16
|
||||
adc r19, r17
|
||||
dec r21
|
||||
brne xpt2046AverageValues_loop
|
||||
|
||||
.if (XPT2046_AVERAGE == 2)
|
||||
lsr r19
|
||||
ror r18
|
||||
.elif (XPT2046_AVERAGE == 4)
|
||||
lsr r19
|
||||
ror r18
|
||||
lsr r19
|
||||
ror r18
|
||||
.else
|
||||
.error "XPT2046_AVERAGE is not 4"
|
||||
.endif
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046ReadAvgValues
|
||||
;
|
||||
; @param r16 command
|
||||
; @clobbers r16, r18, r19, r20, r21
|
||||
|
||||
xpt2046ReadAvgValues:
|
||||
ldi xl, LOW(xpt2046ValueBuffer)
|
||||
ldi xh, HIGH(xpt2046ValueBuffer)
|
||||
mov r20, r16
|
||||
ldi r21, XPT2046_AVERAGE
|
||||
xpt2046ReadAvgValues_loop:
|
||||
mov r16, r20
|
||||
rcall xpt2046SendCommandRecv12Bit ; (R16)
|
||||
st X+, r18
|
||||
st X+, r19
|
||||
dec r21
|
||||
brne xpt2046ReadAvgValues_loop
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046BeginSpi
|
||||
;
|
||||
; @clobbers r16, r17
|
||||
|
||||
xpt2046BeginSpi:
|
||||
ldi r16, XPT2046_SPIMODE
|
||||
ldi r17, XPT2046_DEVICENUM
|
||||
rjmp SPIHW_MasterStart ; (R17)
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046EndSpi
|
||||
;
|
||||
; @clobbers r16
|
||||
|
||||
xpt2046EndSpi:
|
||||
rjmp SPIHW_MasterStop ; (R16)
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046SendCommandRecv12Bit
|
||||
;
|
||||
; @param r16 command
|
||||
; @return r19:18 data
|
||||
; @clobbers r16
|
||||
|
||||
xpt2046SendCommandRecv12Bit:
|
||||
rcall xpt2046SendCommandRecv16Bit
|
||||
lsr r19 ; >>1
|
||||
ror r18
|
||||
lsr r19 ; >>2
|
||||
ror r18
|
||||
lsr r19 ; >>3
|
||||
ror r18
|
||||
lsr r19 ; >>4
|
||||
ror r18
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046SendCommandRecv16Bit
|
||||
;
|
||||
; @param r16 command
|
||||
; @return r19:18 data
|
||||
; @clobbers r16
|
||||
|
||||
xpt2046SendCommandRecv16Bit:
|
||||
cbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS low
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
|
||||
clr r16
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r19, r16
|
||||
clr r16
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r18, r16
|
||||
sbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS high
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine xpt2046SendCommandRecv8Bit
|
||||
;
|
||||
; @param r16 command
|
||||
; @return r16 data
|
||||
; @clobbers r16
|
||||
|
||||
xpt2046SendCommandRecv8Bit:
|
||||
cbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS low
|
||||
rcall SPIHW_MasterTransfer ; (R16)
|
||||
mov r18, r16
|
||||
sbi SPIHW_SS_OUTPUT, SPIHW_SS_PIN ; SS high
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif ; AQH_AVR_XPT2046_MAIN_ASM
|
||||
|
||||
|
||||
@@ -156,8 +156,8 @@ spiHwSelectDevice:
|
||||
; @clobbers none
|
||||
|
||||
SPIHW_MasterTransfer:
|
||||
rcall SPIHW_MasterSendByte
|
||||
rjmp SPIHW_WaitForTransferComplete
|
||||
rcall SPIHW_MasterSendByte ; (none)
|
||||
rjmp SPIHW_WaitForTransferComplete ; (none)
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
|
||||
.equ FIRMWARE_VERSION_MAJOR = 2
|
||||
.equ FIRMWARE_VERSION_MINOR = 0
|
||||
.equ FIRMWARE_VERSION_PATCHLEVEL = 2
|
||||
.equ FIRMWARE_VERSION_PATCHLEVEL = 3
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<data dist="true" install="$(datadir)/aqhome/devices/nodes">
|
||||
aqua_c01.xml
|
||||
aqua_c02.xml
|
||||
aqua_c03.xml
|
||||
aqua_n06.xml
|
||||
aqua_n11.xml
|
||||
aqua_n12.xml
|
||||
|
||||
12
devices/nodes/aqua_c03.xml
Normal file
12
devices/nodes/aqua_c03.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
<device name="aqua_c03" driver="nodes">
|
||||
<manufacturer>AQUA</manufacturer>
|
||||
<devicetype>C</devicetype>
|
||||
<deviceversion>3</deviceversion>
|
||||
|
||||
<values>
|
||||
<value name="LEDTIMING" id="0x88" type="actor" dataType="uint16" />
|
||||
|
||||
</values>
|
||||
|
||||
</device>
|
||||
@@ -23,6 +23,13 @@ case $NODE in
|
||||
EFUSE_ARG="-U efuse:w:0xFF:m"
|
||||
FILE_ARG="-U flash:w:./0-build/avr/devices/c02/boot/c02_boot.hex"
|
||||
;;
|
||||
c03)
|
||||
DEVICE_ARG="-p m644p"
|
||||
HFUSE_ARG="-U hfuse:w:0xD5:m"
|
||||
LFUSE_ARG="-U lfuse:w:0xE2:m"
|
||||
EFUSE_ARG="-U efuse:w:0xFF:m"
|
||||
FILE_ARG="-U flash:w:./0-build/avr/devices/c03/boot/c03_boot.hex"
|
||||
;;
|
||||
n14)
|
||||
DEVICE_ARG="-p t85"
|
||||
HFUSE_ARG="-U hfuse:w:0xD7:m"
|
||||
|
||||
Reference in New Issue
Block a user