Added some stuff ...
This commit is contained in:
parent
d07748b059
commit
9624d64b23
|
@ -12,6 +12,7 @@ SRC = src/start.c \
|
|||
src/time.c \
|
||||
src/gui.c \
|
||||
src/memory.c \
|
||||
src/rtc.c \
|
||||
src/ext/img.c
|
||||
OBJ = $(SRC:src/%=build/%.o)
|
||||
|
||||
|
|
|
@ -90,6 +90,13 @@ Works like stext, but here the font is PrintMini and you cannot set the color.
|
|||
|
||||
void stextmini(int x, int y, char *text);
|
||||
|
||||
/* char* sgetvram(void);
|
||||
|
||||
Get the address of the VRAM.
|
||||
*/
|
||||
|
||||
char* sgetvram(void);
|
||||
|
||||
/******* KEYBOARD *******/
|
||||
|
||||
/* int kisdown(void);
|
||||
|
@ -219,6 +226,20 @@ Stop the timer id.
|
|||
|
||||
void tstoptimer(int id);
|
||||
|
||||
/******* RTC *******/
|
||||
|
||||
typedef struct {
|
||||
int year, month, day; /* The current date (unused) */
|
||||
int hour, minute, second, millisecond; /* The current time */
|
||||
} MRtc;
|
||||
|
||||
/* void rgettime(MRtc *rtc);
|
||||
|
||||
Puts the current hour, minute, second and millisecond in the rtc Mrtc struct.
|
||||
*/
|
||||
|
||||
void rgettime(MRtc *rtc);
|
||||
|
||||
/******* CPU *******/
|
||||
|
||||
/* void csleep(void);
|
||||
|
@ -266,6 +287,13 @@ Draws a message box of height height with that contains message.
|
|||
|
||||
void gmessagebox(int height, char *message);
|
||||
|
||||
/* void gpopup(int hlines);
|
||||
|
||||
Draws a popup that has a height of hlines lines.
|
||||
*/
|
||||
|
||||
void gpopup(int hlines);
|
||||
|
||||
/******* Memory *******/
|
||||
|
||||
/* File structure */
|
||||
|
|
|
@ -14,7 +14,7 @@ void _Print(unsigned char *text);
|
|||
void _Bdisp_DrawLineVRAM(int x1, int y1, int x2, int y2);
|
||||
void _Bdisp_ClearLineVRAM(int x1, int y1, int x2, int y2);
|
||||
void _PrintMiniSd(int x, int y, unsigned char *text, int color);
|
||||
void _DisplayMessageBox(int height, unsigned char *message);
|
||||
char* _GetVRAMAddress(void);
|
||||
|
||||
/* Microfx */
|
||||
|
||||
|
@ -65,26 +65,6 @@ void stextmini(int x, int y, char *text) {
|
|||
_PrintMiniSd(x, y, (unsigned char*)text, 0);
|
||||
}
|
||||
|
||||
void gmessagebox(int height, char *message) {
|
||||
_DisplayMessageBox(height, (unsigned char*)message);
|
||||
}
|
||||
|
||||
/******* Tools *******/
|
||||
|
||||
/* Syscalls */
|
||||
|
||||
int _LongToAscHex(int value, char *dest, int digits);
|
||||
|
||||
/* Microfx */
|
||||
|
||||
void itohex(char *buffer, int value, int len) {
|
||||
_LongToAscHex(value, buffer, len);
|
||||
}
|
||||
|
||||
/******* CPU *******/
|
||||
|
||||
/* Microfx */
|
||||
|
||||
void csleep(void) {
|
||||
__asm__("sleep");
|
||||
char* sgetvram(void) {
|
||||
return _GetVRAMAddress();
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
int _InputNumber(unsigned char *heading, int maxlen, int mode);
|
||||
int _InputString(unsigned char *buffer, unsigned char *heading, int maxlen);
|
||||
void _DisplayFKeyIcon(int FKeyPos, unsigned char *pBitmap);
|
||||
void _DisplayMessageBox(int height, unsigned char *message);
|
||||
void _PopupWin(int nlines);
|
||||
|
||||
/* Microfx */
|
||||
|
||||
|
@ -21,3 +23,11 @@ void gstrask(char *buffer, char *message, int maxlen) {
|
|||
void gfkeyset(int pos, unsigned char *img) {
|
||||
_DisplayFKeyIcon(pos, img);
|
||||
}
|
||||
|
||||
void gmessagebox(int height, char *message) {
|
||||
_DisplayMessageBox(height, (unsigned char*)message);
|
||||
}
|
||||
|
||||
void gpopup(int hlines) {
|
||||
_PopupWin(hlines);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#include "../include/microfx/microfx.h"
|
||||
|
||||
void _RTC_GetTime(unsigned int *hour, unsigned int *minute,
|
||||
unsigned int *second, unsigned int *millisecond);
|
||||
|
||||
void rgettime(MRtc *rtc) {
|
||||
_RTC_GetTime((unsigned int *)&rtc->hour, (unsigned int *)&rtc->minute,
|
||||
(unsigned int *)&rtc->second, (unsigned int *)&rtc->millisecond);
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
.text
|
||||
|
||||
/* Screen */
|
||||
.global __Bdisp_PutDisp_DD
|
||||
.global __Bdisp_DrawRectangle
|
||||
.global __Bdisp_AllClr_VRAM
|
||||
|
@ -12,6 +13,7 @@
|
|||
.global __Bdisp_ClearLineVRAM
|
||||
.global __PrintMiniSd
|
||||
.global __DisplayMessageBox
|
||||
.global __GetVRAMAddress
|
||||
/* Keyboard */
|
||||
.global __Keyboard_KeyDown
|
||||
.global __Keyboard_PRGM_GetKey
|
||||
|
@ -24,6 +26,8 @@
|
|||
.global __Timer_Deinstall
|
||||
.global __Timer_Start
|
||||
.global __Timer_Stop
|
||||
/* RTC */
|
||||
.global __RTC_GetTime
|
||||
/* Files */
|
||||
.global __Bfile_DeleteEntry
|
||||
.global __Bfile_Create
|
||||
|
@ -57,6 +61,7 @@
|
|||
.global __InputNumber
|
||||
.global __InputString
|
||||
.global __DisplayFKeyIcon
|
||||
.global __PopupWin
|
||||
|
||||
#define syscall(syscall_number) \
|
||||
mov.l 1f, r0 ;\
|
||||
|
@ -91,6 +96,8 @@ __PrintMiniSd:
|
|||
syscall(0xC4F)
|
||||
__DisplayMessageBox:
|
||||
syscall(0x0901)
|
||||
__GetVRAMAddress:
|
||||
syscall(0x135)
|
||||
/* Keyboard */
|
||||
__Keyboard_KeyDown:
|
||||
syscall(0x24D)
|
||||
|
@ -113,6 +120,9 @@ __Timer_Start:
|
|||
syscall(0x011A)
|
||||
__Timer_Stop:
|
||||
syscall(0x011B)
|
||||
/* RTC */
|
||||
__RTC_GetTime:
|
||||
syscall(0x03A)
|
||||
/* Files */
|
||||
__Bfile_DeleteEntry:
|
||||
mov #0, r5
|
||||
|
@ -176,6 +186,8 @@ __InputString:
|
|||
syscall(0x0CC5)
|
||||
__DisplayFKeyIcon:
|
||||
syscall(0x04D1)
|
||||
__PopupWin:
|
||||
syscall(0x08FE)
|
||||
/* Menu */
|
||||
/* Nothing here ... */
|
||||
|
||||
|
|
|
@ -90,6 +90,13 @@ Works like stext, but here the font is PrintMini and you cannot set the color.
|
|||
|
||||
void stextmini(int x, int y, char *text);
|
||||
|
||||
/* char* sgetvram(void);
|
||||
|
||||
Get the address of the VRAM.
|
||||
*/
|
||||
|
||||
char* sgetvram(void);
|
||||
|
||||
/******* KEYBOARD *******/
|
||||
|
||||
/* int kisdown(void);
|
||||
|
@ -219,6 +226,20 @@ Stop the timer id.
|
|||
|
||||
void tstoptimer(int id);
|
||||
|
||||
/******* RTC *******/
|
||||
|
||||
typedef struct {
|
||||
int year, month, day; /* The current date (unused) */
|
||||
int hour, minute, second, millisecond; /* The current time */
|
||||
} MRtc;
|
||||
|
||||
/* void rgettime(MRtc *rtc);
|
||||
|
||||
Puts the current hour, minute, second and millisecond in the rtc Mrtc struct.
|
||||
*/
|
||||
|
||||
void rgettime(MRtc *rtc);
|
||||
|
||||
/******* CPU *******/
|
||||
|
||||
/* void csleep(void);
|
||||
|
@ -266,6 +287,13 @@ Draws a message box of height height with that contains message.
|
|||
|
||||
void gmessagebox(int height, char *message);
|
||||
|
||||
/* void gpopup(int hlines);
|
||||
|
||||
Draws a popup that has a height of hlines lines.
|
||||
*/
|
||||
|
||||
void gpopup(int hlines);
|
||||
|
||||
/******* Memory *******/
|
||||
|
||||
/* File structure */
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue