mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
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
This commit is contained in:
parent
9fcec73762
commit
85807442d5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=439436
@ -8,6 +8,7 @@
|
||||
SUBDIR += advancemenu
|
||||
SUBDIR += advancemess
|
||||
SUBDIR += aftp
|
||||
SUBDIR += almostti
|
||||
SUBDIR += aqemu
|
||||
SUBDIR += atari800
|
||||
SUBDIR += bfe
|
||||
|
36
emulators/almostti/Makefile
Normal file
36
emulators/almostti/Makefile
Normal file
@ -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>
|
3
emulators/almostti/distinfo
Normal file
3
emulators/almostti/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1261815086
|
||||
SHA256 (AlmostTI13-Unix-DougMelton-051409.tar.gz) = c3dcd7d2c03959c62f4f4aba2e7cb911a9fc516487d2c99bdf3f3ac2461d37ae
|
||||
SIZE (AlmostTI13-Unix-DougMelton-051409.tar.gz) = 1983210
|
35
emulators/almostti/files/patch-ATI85_TI85.c
Normal file
35
emulators/almostti/files/patch-ATI85_TI85.c
Normal file
@ -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);
|
||||
|
101
emulators/almostti/files/patch-ATI85_Unix_Unix.c
Normal file
101
emulators/almostti/files/patch-ATI85_Unix_Unix.c
Normal file
@ -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; }
|
12
emulators/almostti/files/patch-EMULib_Rules.Unix
Normal file
12
emulators/almostti/files/patch-EMULib_Rules.Unix
Normal file
@ -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)
|
17
emulators/almostti/files/patch-EMULib_Rules.gcc
Normal file
17
emulators/almostti/files/patch-EMULib_Rules.gcc
Normal file
@ -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
|
||||
|
10
emulators/almostti/files/patch-EMULib_Unix_NetUnix.c
Normal file
10
emulators/almostti/files/patch-EMULib_Unix_NetUnix.c
Normal file
@ -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;
|
9
emulators/almostti/pkg-descr
Normal file
9
emulators/almostti/pkg-descr
Normal file
@ -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/
|
9
emulators/almostti/pkg-plist
Normal file
9
emulators/almostti/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user