summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/framebuffer.h36
-rw-r--r--include/gui.h27
-rw-r--r--include/kbd81.h76
3 files changed, 139 insertions, 0 deletions
diff --git a/include/framebuffer.h b/include/framebuffer.h
new file mode 100644
index 0000000..80a9469
--- /dev/null
+++ b/include/framebuffer.h
@@ -0,0 +1,36 @@
+/*
+ ds81 - Nintendo DS ZX81 emulator.
+
+ Copyright (C) 2006 Ian Cowburn
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id$
+*/
+#ifndef DS81_FRAMEBUFFER_H
+#define DS81_FRAMEBUFFER_H
+
+#define FB_RGB(r,g,b) ((RGB15(r,g,b))|0x8000)
+
+void FB_Init(uint16 *vram);
+void FB_Print(const char *text, int x, int y, int colour, int paper);
+void FB_Centre(const char *text, int y, int colour, int paper);
+void FB_HLine(int x1, int x2, int y, int colour);
+void FB_VLine(int x, int y1, int y2, int colour);
+void FB_Box(int x, int y, int w, int h, int colour);
+void FB_FillBox(int x, int y, int w, int h, int colour);
+void FB_Clear(void);
+
+#endif /* DS81_FRAMEBUFFER_H */
diff --git a/include/gui.h b/include/gui.h
new file mode 100644
index 0000000..b9363ca
--- /dev/null
+++ b/include/gui.h
@@ -0,0 +1,27 @@
+/*
+ ds81 - Nintendo DS ZX81 emulator.
+
+ Copyright (C) 2006 Ian Cowburn
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id$
+*/
+#ifndef DS81_GUI_H
+#define DS81_GUI_H
+
+int GUI_Menu(const char *opts[]);
+
+#endif /* DS81_GUI_H */
diff --git a/include/kbd81.h b/include/kbd81.h
new file mode 100644
index 0000000..b4e3d62
--- /dev/null
+++ b/include/kbd81.h
@@ -0,0 +1,76 @@
+/*
+ ds81 - Nintendo DS ZX81 emulator.
+
+ Copyright (C) 2006 Ian Cowburn
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id$
+*/
+#ifndef DS81_KBD81_H
+#define DS81_KBD81_H
+
+typedef enum
+{
+ KBD_1,
+ KBD_2,
+ KBD_3,
+ KBD_4,
+ KBD_5,
+ KBD_6,
+ KBD_7,
+ KBD_8,
+ KBD_9,
+ KBD_0,
+ KBD_Q,
+ KBD_W,
+ KBD_E,
+ KBD_R,
+ KBD_T,
+ KBD_Y,
+ KBD_U,
+ KBD_I,
+ KBD_O,
+ KBD_P,
+ KBD_A,
+ KBD_S,
+ KBD_D,
+ KBD_F,
+ KBD_G,
+ KBD_H,
+ KBD_J,
+ KBD_K,
+ KBD_L,
+ KBD_NEWLINE,
+ KBD_SHIFT,
+ KBD_Z,
+ KBD_X,
+ KBD_C,
+ KBD_V,
+ KBD_B,
+ KBD_N,
+ KBD_M,
+ KBD_PERIOD,
+ KBD_SPACE
+} ZX81_Key;
+
+void KBD_Reset(void);
+void KBD_Display(const char *text);
+void KBD_Scan(void);
+ZX81_Key KBD_GetKey(void);
+void KBD_MapKey(KEYPAD_BITS pad, ZX81_Key key);
+void KBD_Probe(int scan);
+
+#endif /* DS81_KBD81_H */