svn commit: r439436 - in head/emulators: . almostti almostti/files
Alexey Dokuchaev
danfe at FreeBSD.org
Wed Apr 26 09:10:03 UTC 2017
Author: danfe
Date: Wed Apr 26 09:10:00 2017
New Revision: 439436
URL: https://svnweb.freebsd.org/changeset/ports/439436
Log:
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
Added:
head/emulators/almostti/
head/emulators/almostti/Makefile (contents, props changed)
head/emulators/almostti/distinfo (contents, props changed)
head/emulators/almostti/files/
head/emulators/almostti/files/patch-ATI85_TI85.c (contents, props changed)
head/emulators/almostti/files/patch-ATI85_Unix_Unix.c (contents, props changed)
head/emulators/almostti/files/patch-EMULib_Rules.Unix (contents, props changed)
head/emulators/almostti/files/patch-EMULib_Rules.gcc (contents, props changed)
head/emulators/almostti/files/patch-EMULib_Unix_NetUnix.c (contents, props changed)
head/emulators/almostti/pkg-descr (contents, props changed)
head/emulators/almostti/pkg-plist (contents, props changed)
Modified:
head/emulators/Makefile
Modified: head/emulators/Makefile
==============================================================================
--- head/emulators/Makefile Wed Apr 26 09:05:07 2017 (r439435)
+++ head/emulators/Makefile Wed Apr 26 09:10:00 2017 (r439436)
@@ -8,6 +8,7 @@
SUBDIR += advancemenu
SUBDIR += advancemess
SUBDIR += aftp
+ SUBDIR += almostti
SUBDIR += aqemu
SUBDIR += atari800
SUBDIR += bfe
Added: head/emulators/almostti/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/almostti/Makefile Wed Apr 26 09:10:00 2017 (r439436)
@@ -0,0 +1,36 @@
+# Created by: Alexey Dokuchaev <danfe at FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= almostti
+PORTVERSION= 1.3
+CATEGORIES= emulators
+MASTER_SITES= http://fms.komkon.org/ATI85/
+DISTNAME= AlmostTI13-Unix-DougMelton-051409
+
+MAINTAINER= danfe at 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>
Added: head/emulators/almostti/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/almostti/distinfo Wed Apr 26 09:10:00 2017 (r439436)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1261815086
+SHA256 (AlmostTI13-Unix-DougMelton-051409.tar.gz) = c3dcd7d2c03959c62f4f4aba2e7cb911a9fc516487d2c99bdf3f3ac2461d37ae
+SIZE (AlmostTI13-Unix-DougMelton-051409.tar.gz) = 1983210
Added: head/emulators/almostti/files/patch-ATI85_TI85.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/almostti/files/patch-ATI85_TI85.c Wed Apr 26 09:10:00 2017 (r439436)
@@ -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);
+
Added: head/emulators/almostti/files/patch-ATI85_Unix_Unix.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/almostti/files/patch-ATI85_Unix_Unix.c Wed Apr 26 09:10:00 2017 (r439436)
@@ -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; }
Added: head/emulators/almostti/files/patch-EMULib_Rules.Unix
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/almostti/files/patch-EMULib_Rules.Unix Wed Apr 26 09:10:00 2017 (r439436)
@@ -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)
Added: head/emulators/almostti/files/patch-EMULib_Rules.gcc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/almostti/files/patch-EMULib_Rules.gcc Wed Apr 26 09:10:00 2017 (r439436)
@@ -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
+
Added: head/emulators/almostti/files/patch-EMULib_Unix_NetUnix.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/almostti/files/patch-EMULib_Unix_NetUnix.c Wed Apr 26 09:10:00 2017 (r439436)
@@ -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;
Added: head/emulators/almostti/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/almostti/pkg-descr Wed Apr 26 09:10:00 2017 (r439436)
@@ -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/
Added: head/emulators/almostti/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/almostti/pkg-plist Wed Apr 26 09:10:00 2017 (r439436)
@@ -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
More information about the svn-ports-all
mailing list