diff options
author | danfe <danfe@FreeBSD.org> | 2017-04-26 17:10:00 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2017-04-26 17:10:00 +0800 |
commit | e371ba78e39255f6036d69bf15bb699a2a41fc43 (patch) | |
tree | 6618ddfb5b65566a40282522a725b97ba6789677 /emulators | |
parent | 1241fc1c4682936e12c31c775f9ef3dd271c61c1 (diff) | |
download | freebsd-ports-gnome-e371ba78e39255f6036d69bf15bb699a2a41fc43.tar.gz freebsd-ports-gnome-e371ba78e39255f6036d69bf15bb699a2a41fc43.tar.zst freebsd-ports-gnome-e371ba78e39255f6036d69bf15bb699a2a41fc43.zip |
Add a port of AlmostTI, simple emulator for Z80-based series of Texas
Instruments calculators, written by Marat Fayzullin and modified for
better Unix support by Doug Melton.
Our local modifications offer better keyboard mappings out of the box,
making it suitable as desktop calculator when you need something more
advanced than dc(1), bc(1), or your favorite language's REPL.
WWW: http://fms.komkon.org/ATI85/
TIMESTAMP (AlmostTI13-Unix-DougMelton-051409.tar.gz) = 1261815086
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/Makefile | 1 | ||||
-rw-r--r-- | emulators/almostti/Makefile | 36 | ||||
-rw-r--r-- | emulators/almostti/distinfo | 3 | ||||
-rw-r--r-- | emulators/almostti/files/patch-ATI85_TI85.c | 35 | ||||
-rw-r--r-- | emulators/almostti/files/patch-ATI85_Unix_Unix.c | 101 | ||||
-rw-r--r-- | emulators/almostti/files/patch-EMULib_Rules.Unix | 12 | ||||
-rw-r--r-- | emulators/almostti/files/patch-EMULib_Rules.gcc | 17 | ||||
-rw-r--r-- | emulators/almostti/files/patch-EMULib_Unix_NetUnix.c | 10 | ||||
-rw-r--r-- | emulators/almostti/pkg-descr | 9 | ||||
-rw-r--r-- | emulators/almostti/pkg-plist | 9 |
10 files changed, 233 insertions, 0 deletions
diff --git a/emulators/Makefile b/emulators/Makefile index bbc806bb635d..25c2525c4562 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -8,6 +8,7 @@ SUBDIR += advancemenu SUBDIR += advancemess SUBDIR += aftp + SUBDIR += almostti SUBDIR += aqemu SUBDIR += atari800 SUBDIR += bfe diff --git a/emulators/almostti/Makefile b/emulators/almostti/Makefile new file mode 100644 index 000000000000..61510f0f0935 --- /dev/null +++ b/emulators/almostti/Makefile @@ -0,0 +1,36 @@ +# Created by: Alexey Dokuchaev <danfe@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= almostti +PORTVERSION= 1.3 +CATEGORIES= emulators +MASTER_SITES= http://fms.komkon.org/ATI85/ +DISTNAME= AlmostTI13-Unix-DougMelton-051409 + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Emulator for Z80 series of Texas Instruments calculators + +USES= gmake +USE_XORG= x11 xext + +WRKSRC= ${WRKDIR}/AlmostTI-DougMelton-Source +BUILD_WRKSRC= ${WRKSRC}/ATI85/Unix + +DESKTOP_ENTRIES= "ATI85" "${COMMENT}" "ati85" "ati85" \ + "Utility;Calculator;Emulator;" false + +post-patch: + @${REINPLACE_CMD} -e 's,\./,${DATADIR}/,' ${WRKSRC}/ATI85/TI85.c + +do-install: + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ati85 ${STAGEDIR}${PREFIX}/bin + @${MKDIR} ${STAGEDIR}${DATADIR} +.for model in 82 83 83P 83SE 84SE 85 86 + ${INSTALL_DATA} ${WRKSRC}/ATI85/Maemo/Package/TI${model}.png \ + ${STAGEDIR}${DATADIR} +.endfor + @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/64x64/apps + ${INSTALL_DATA} ${WRKSRC}/ATI85/Maemo/Package/ati85-64x64.png \ + ${STAGEDIR}${PREFIX}/share/icons/hicolor/64x64/apps/ati85.png + +.include <bsd.port.mk> diff --git a/emulators/almostti/distinfo b/emulators/almostti/distinfo new file mode 100644 index 000000000000..1ddd0aa4f325 --- /dev/null +++ b/emulators/almostti/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1261815086 +SHA256 (AlmostTI13-Unix-DougMelton-051409.tar.gz) = c3dcd7d2c03959c62f4f4aba2e7cb911a9fc516487d2c99bdf3f3ac2461d37ae +SIZE (AlmostTI13-Unix-DougMelton-051409.tar.gz) = 1983210 diff --git a/emulators/almostti/files/patch-ATI85_TI85.c b/emulators/almostti/files/patch-ATI85_TI85.c new file mode 100644 index 000000000000..07e5f2ea8005 --- /dev/null +++ b/emulators/almostti/files/patch-ATI85_TI85.c @@ -0,0 +1,35 @@ +--- ATI85/TI85.c.orig 2009-12-17 07:37:54 UTC ++++ ATI85/TI85.c +@@ -61,14 +61,14 @@ int LinkPort = 8385; /* Li + /** Configuration, by model **********************************/
+ const TIConfig Config[] =
+ {
+- { ATI_TI85, "TI85.png", "TI85.ROM", 0x20000, "TI85.RAM", 0x8000 },
+- { ATI_TI86, "TI86.png", "TI86.ROM", 0x40000, "TI86.RAM", 0x20000 },
+- { ATI_TI82, "TI82.png", "TI82.ROM", 0x20000, "TI82.RAM", 0x8000 },
+- { ATI_TI83, "TI83.png", "TI83.ROM", 0x40000, "TI83.RAM", 0x8000 },
+- { ATI_TI83P, "TI83P.png", "TI83P.ROM", 0x80000, "TI83P.RAM", 0x8000 },
+- { ATI_TI83SE,"TI83SE.png","TI83SE.ROM",0x200000,"TI83SE.RAM",0x20000 },
+- { ATI_TI84P, "TI84P.png", "TI84P.ROM", 0x100000,"TI84P.RAM", 0x20000 },
+- { ATI_TI84SE,"TI84SE.png","TI84SE.ROM",0x200000,"TI84SE.RAM",0x20000 },
++ { ATI_TI85, "./" "TI85.png", "TI85.ROM", 0x20000, "TI85.RAM", 0x8000 },
++ { ATI_TI86, "./" "TI86.png", "TI86.ROM", 0x40000, "TI86.RAM", 0x20000 },
++ { ATI_TI82, "./" "TI82.png", "TI82.ROM", 0x20000, "TI82.RAM", 0x8000 },
++ { ATI_TI83, "./" "TI83.png", "TI83.ROM", 0x40000, "TI83.RAM", 0x8000 },
++ { ATI_TI83P, "./" "TI83P.png", "TI83P.ROM", 0x80000, "TI83P.RAM", 0x8000 },
++ { ATI_TI83SE,"./" "TI83SE.png","TI83SE.ROM",0x200000,"TI83SE.RAM",0x20000 },
++ { ATI_TI84P, "./" "TI84P.png", "TI84P.ROM", 0x100000,"TI84P.RAM", 0x20000 },
++ { ATI_TI84SE,"./" "TI84SE.png","TI84SE.ROM",0x200000,"TI84SE.RAM",0x20000 },
+ { 0,0,0,0,0,0 }
+ };
+
+@@ -274,6 +274,9 @@ int ResetTI85(int NewMode)
+ RAMSize = Config[M].RAMSize;
+ ROMSize = Config[M].ROMSize;
+
++ /* Set RAMFile to enable state saving */
++ RAMFile = Config[M].RAMFile;
++
+ /* Clear memory contents */
+ memset(RAM,NORAM,RAMSize);
+
diff --git a/emulators/almostti/files/patch-ATI85_Unix_Unix.c b/emulators/almostti/files/patch-ATI85_Unix_Unix.c new file mode 100644 index 000000000000..cbf88472d073 --- /dev/null +++ b/emulators/almostti/files/patch-ATI85_Unix_Unix.c @@ -0,0 +1,101 @@ +--- ATI85/Unix/Unix.c.orig 2009-12-17 08:32:38 UTC ++++ ATI85/Unix/Unix.c +@@ -228,11 +228,19 @@ int ShowBackdrop(const char *FileName)
+ printf("error: %d\n", decoder.error);
+ return(0);
+ }
++#ifndef PORTRAIT
+ if (decoder.infoPng.width != WIDTH) {
++#else
++ if (decoder.infoPng.height != WIDTH) {
++#endif
+ printf("error: skin width != %d\n", WIDTH);
+ return(0);
+ }
++#ifndef PORTRAIT
+ if (decoder.infoPng.height != HEIGHT) {
++#else
++ if (decoder.infoPng.width != HEIGHT) {
++#endif
+ printf("error: skin height != %d\n", HEIGHT);
+ return(0);
+ }
+@@ -242,10 +250,20 @@ int ShowBackdrop(const char *FileName)
+ pixel *P = (pixel *)OutImage.Data;
+ unsigned char *Q = image;
+
++#ifndef PORTRAIT
+ for (j = HEIGHT * WIDTH; j; j--) {
+ *P++ = X11GetColor(*Q++,*Q++,*Q++);
+ Q++;
+ }
++#else
++ uint k;
++ for (k = 0; k < HEIGHT; k++) {
++ for (j = WIDTH; j > 0; j--) {
++ Q = image + (j * HEIGHT + k) * 4;
++ *P++ = X11GetColor(*Q++,*Q++,*Q++);
++ }
++ }
++#endif
+
+ // Cleanup decoder
+ free(image);
+@@ -291,11 +309,25 @@ void HandleKeys(unsigned int Key)
+ case XK_Up: KBD_RES(KBD_UP);KeyReady=1;break;
+ case XK_Down: KBD_RES(KBD_DOWN);KeyReady=1;break;
+ case XK_greater: KBD_RES(KBD_STO);KeyReady=1;break;
+- case XK_Delete:
+- case XK_BackSpace: KBD_RES(KBD_DEL);KeyReady=1;break;
+- case XK_Home: KBD_RES(KBD_CLEAR);KeyReady=1;break;
++ case XK_Delete: KBD_RES(KBD_DEL);KeyReady=1;break;
++ case XK_BackSpace: KBD_RES(KBD_CLEAR);KeyReady=1;break;
+ case XK_Alt_L:
+ case XK_Alt_R: KBD_RES(KBD_ALPHA);KeyReady=1;break;
++ case XK_KP_Home: KBD_RES(KBD_7);KeyReady=1;break;
++ case XK_KP_Up: KBD_RES(KBD_8);KeyReady=1;break;
++ case XK_KP_Page_Up: KBD_RES(KBD_9);KeyReady=1;break;
++ case XK_KP_Left: KBD_RES(KBD_4);KeyReady=1;break;
++ case XK_KP_Begin: KBD_RES(KBD_5);KeyReady=1;break;
++ case XK_KP_Right: KBD_RES(KBD_6);KeyReady=1;break;
++ case XK_KP_End: KBD_RES(KBD_1);KeyReady=1;break;
++ case XK_KP_Down: KBD_RES(KBD_2);KeyReady=1;break;
++ case XK_KP_Page_Down: KBD_RES(KBD_3);KeyReady=1;break;
++ case XK_KP_Insert: KBD_RES(KBD_0);KeyReady=1;break;
++ case XK_KP_Delete: KBD_RES(KBD_DOT);KeyReady=1;break;
++ case XK_KP_Divide: KBD_RES(KBD_DIV);KeyReady=1;break;
++ case XK_KP_Multiply: KBD_RES(KBD_MUL);KeyReady=1;break;
++ case XK_KP_Subtract: KBD_RES(KBD_MINUS);KeyReady=1;break;
++ case XK_KP_Add: KBD_RES(KBD_PLUS);KeyReady=1;break;
+ default:
+ Key&=CON_KEYCODE;
+ if((Key>=' ')&&(Key<0x80)) { KBD_RES(Key);KeyReady=1; }
+@@ -343,11 +375,25 @@ void HandleKeys(unsigned int Key)
+ case XK_Up: KBD_SET(KBD_UP);KeyReady=1;break;
+ case XK_Down: KBD_SET(KBD_DOWN);KeyReady=1;break;
+ case XK_greater: KBD_SET(KBD_STO);KeyReady=1;break;
+- case XK_Delete:
+- case XK_BackSpace: KBD_SET(KBD_DEL);KeyReady=1;break;
+- case XK_Home: KBD_SET(KBD_CLEAR);KeyReady=1;break;
++ case XK_Delete: KBD_SET(KBD_DEL);KeyReady=1;break;
++ case XK_BackSpace: KBD_SET(KBD_CLEAR);KeyReady=1;break;
+ case XK_Alt_L:
+ case XK_Alt_R: KBD_SET(KBD_ALPHA);KeyReady=1;break;
++ case XK_KP_Home: KBD_SET(KBD_7);KeyReady=1;break;
++ case XK_KP_Up: KBD_SET(KBD_8);KeyReady=1;break;
++ case XK_KP_Page_Up: KBD_SET(KBD_9);KeyReady=1;break;
++ case XK_KP_Left: KBD_SET(KBD_4);KeyReady=1;break;
++ case XK_KP_Begin: KBD_SET(KBD_5);KeyReady=1;break;
++ case XK_KP_Right: KBD_SET(KBD_6);KeyReady=1;break;
++ case XK_KP_End: KBD_SET(KBD_1);KeyReady=1;break;
++ case XK_KP_Down: KBD_SET(KBD_2);KeyReady=1;break;
++ case XK_KP_Page_Down: KBD_SET(KBD_3);KeyReady=1;break;
++ case XK_KP_Insert: KBD_SET(KBD_0);KeyReady=1;break;
++ case XK_KP_Delete: KBD_SET(KBD_DOT);KeyReady=1;break;
++ case XK_KP_Divide: KBD_SET(KBD_DIV);KeyReady=1;break;
++ case XK_KP_Multiply: KBD_SET(KBD_MUL);KeyReady=1;break;
++ case XK_KP_Subtract: KBD_SET(KBD_MINUS);KeyReady=1;break;
++ case XK_KP_Add: KBD_SET(KBD_PLUS);KeyReady=1;break;
+ default:
+ Key&=CON_KEYCODE;
+ if((Key>=' ')&&(Key<0x80)) { KBD_SET(Key);KeyReady=1; }
diff --git a/emulators/almostti/files/patch-EMULib_Rules.Unix b/emulators/almostti/files/patch-EMULib_Rules.Unix new file mode 100644 index 000000000000..159d1f8f057f --- /dev/null +++ b/emulators/almostti/files/patch-EMULib_Rules.Unix @@ -0,0 +1,12 @@ +--- EMULib/Rules.Unix.orig 2009-12-17 07:37:54 UTC ++++ EMULib/Rules.Unix +@@ -6,7 +6,7 @@ +
+ include ../../EMULib/Rules.gcc
+
+-CFLAGS += -I$(EMULIB)/Unix -I/usr/X11R6/include
++CFLAGS += -I$(EMULIB)/Unix -I$(LOCALBASE)/include
+ DEFINES+= -DUNIX -DMITSHM -DBPS16
+-LIBS += -lX11 -lXext
++LIBS += -L$(LOCALBASE)/lib -lX11 -lXext
+ OBJECTS+= $(EMUUNIX)
diff --git a/emulators/almostti/files/patch-EMULib_Rules.gcc b/emulators/almostti/files/patch-EMULib_Rules.gcc new file mode 100644 index 000000000000..c265aa8ab5d7 --- /dev/null +++ b/emulators/almostti/files/patch-EMULib_Rules.gcc @@ -0,0 +1,17 @@ +--- EMULib/Rules.gcc.orig 2009-12-17 07:37:54 UTC ++++ EMULib/Rules.gcc +@@ -5,11 +5,11 @@ LIBZ80 = $(BASEDIR)/Z80
+ LIB6502 = $(BASEDIR)/M6502
+ LIBGBZ = $(BASEDIR)/GBZ80
+
+-CXX = g++
+-CC = gcc
++CXX = c++
++CC = cc
+ CPP = cpp
+ SDT2GAS = perl $(EMULIB)/Tools/sdt2gas.pl
+-CFLAGS = -O3 -pthread -I. -I.. -I$(EMULIB)
++CFLAGS += -pthread -I. -I.. -I$(EMULIB)
+ DEFINES = -DZLIB
+ LIBS = -lz -lpthread
+
diff --git a/emulators/almostti/files/patch-EMULib_Unix_NetUnix.c b/emulators/almostti/files/patch-EMULib_Unix_NetUnix.c new file mode 100644 index 000000000000..bf16554db5f4 --- /dev/null +++ b/emulators/almostti/files/patch-EMULib_Unix_NetUnix.c @@ -0,0 +1,10 @@ +--- EMULib/Unix/NetUnix.c.orig 2009-12-17 07:37:54 UTC ++++ EMULib/Unix/NetUnix.c +@@ -20,6 +20,7 @@ + #include <errno.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
++#include <netinet/in.h>
+
+ static int IsServer = 0;
+ static int Socket = -1;
diff --git a/emulators/almostti/pkg-descr b/emulators/almostti/pkg-descr new file mode 100644 index 000000000000..a9553d187c25 --- /dev/null +++ b/emulators/almostti/pkg-descr @@ -0,0 +1,9 @@ +AlmostTI is a program that emulates Z80-based graphing calculators made by +Texas Instruments. Currently, it supports TI-82, TI-83, TI-83+, TI-83+SE, +TI-84+, TI-84+SE, TI-85, and TI-86. + +It requires ROM image to operate, which must be obtained separately. RAM +state is preserved across different runs, making complex usage scenarios +possible. + +WWW: http://fms.komkon.org/ATI85/ diff --git a/emulators/almostti/pkg-plist b/emulators/almostti/pkg-plist new file mode 100644 index 000000000000..ef9a69061bf1 --- /dev/null +++ b/emulators/almostti/pkg-plist @@ -0,0 +1,9 @@ +bin/ati85 +%%DATADIR%%/TI82.png +%%DATADIR%%/TI83.png +%%DATADIR%%/TI83P.png +%%DATADIR%%/TI83SE.png +%%DATADIR%%/TI84SE.png +%%DATADIR%%/TI85.png +%%DATADIR%%/TI86.png +share/icons/hicolor/64x64/apps/ati85.png |