diff --git a/PDP10/ka10_iii.c b/PDP10/ka10_iii.c
index 612a3b2..d9e33d1 100644
--- a/PDP10/ka10_iii.c
+++ b/PDP10/ka10_iii.c
@@ -32,7 +32,6 @@
#if NUM_DEVS_III > 0
#include "display/display.h"
-#include "display/iii.h"
#define III_DEVNUM 0430
@@ -398,7 +397,7 @@ iii_svc (UNIT *uptr)
float ch_sz;
if (uptr->CYCLE > 20) {
- iii_cycle(300, 0);
+ display_age(300, 0);
uptr->CYCLE = 0;
} else {
uptr->CYCLE++;
@@ -637,7 +636,7 @@ t_stat iii_reset (DEVICE *dptr)
} else {
display_reset();
dptr->units[0].POS = 0;
- iii_init(dptr, 1);
+ display_init(DIS_III, 1, dptr);
}
return SCPE_OK;
}
@@ -649,7 +648,7 @@ draw_point(int x, int y, int b, UNIT *uptr)
{
if (x < -512 || x > 512 || y < -501 || y > 522)
uptr->STATUS |= WRP_FBIT;
- iii_point(x, y, b);
+ display_point(x + 512, y + 501, b, 0);
}
/* Draw a line between two points */
@@ -660,7 +659,7 @@ draw_line(int x1, int y1, int x2, int y2, int b, UNIT *uptr)
uptr->STATUS |= WRP_FBIT;
if (x2 < -512 || x2 > 512 || y2 < -501 || y2 > 522)
uptr->STATUS |= WRP_FBIT;
- iii_draw_line(x1, y1, x2, y2, b);
+ display_line(x1 + 512, y1 + 501, x2 + 512, y2 + 501, b);
}
t_stat iii_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
diff --git a/Visual Studio Projects/PDP10-KA.vcproj b/Visual Studio Projects/PDP10-KA.vcproj
index 41cc3f3..9deb1f1 100644
--- a/Visual Studio Projects/PDP10-KA.vcproj
+++ b/Visual Studio Projects/PDP10-KA.vcproj
@@ -435,10 +435,6 @@
RelativePath="..\display\display.h"
>
-
-
@@ -621,10 +617,6 @@
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc"
>
-
-
diff --git a/display/iii.c b/display/iii.c
deleted file mode 100644
index b38243d..0000000
--- a/display/iii.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/* iii.c: Triple III display interface.
-
- Copyright (c) 2020, Richard Cornwell (based on help from Lars Brinkhoff)
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- RICHARD CORNWELL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- Except as contained in this notice, the name of Richard Cornwell shall not be
- used in advertising or otherwise to promote the sale, use or other dealings
- in this Software without prior written authorization from Richard Cornwell
-
-*/
-
-#include "display.h"
-#include "iii.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-int iii_init(void *dev, int debug)
-{
- return display_init(DIS_III, 1, dev);
-}
-
-void iii_point (int x, int y, int l)
-{
- display_point(x + 512, y + 501, l, 0);
-}
-
-int iii_cycle(int us, int slowdown)
-{
- return display_age(us, slowdown);
-}
-
-/* Draw a line between two points */
-void
-iii_draw_line(int x1, int y1, int x2, int y2, int l)
-{
- int dx, ax;
- int dy;
- int i, j;
- int pu, pd, ws, et;
- int ipc, fpc;
-
- /* Origin us to 0 */
- x1 += 512;
- y1 += 501;
- x2 += 512;
- y2 += 501;
-
- /* Always draw top to bottom */
- if (y1 > y2) {
- int temp;
- temp = y1;
- y1 = y2;
- y2 = temp;
- temp = x1;
- x1 = x2;
- x2 = temp;
- }
-
- /* Figure out distances */
- dx = x2 - x1;
- dy = y2 - y1;
- /* Figure out whether we're going left or right */
- if (dx < 0) {
- ax = -1;
- dx = -dx;
- } else {
- ax = 1;
- }
-
- /* Vertical line */
- if (dx == 0) {
- for (i = 1; i < dy; i++) {
- display_point(x1, y1, l, 0);
- y1++;
- }
- return;
- }
- /* Horizontal line */
- if (dy == 0) {
- for (i = 1; i < dx; i++) {
- display_point(x1, y1, l, 0);
- x1+=ax;
- }
- return;
- }
- /* Diagnonal line */
- if (dx == dy) {
- for (i = 1; i < dx; i++) {
- display_point(x1, y1, l, 0);
- x1 += ax;
- y1 ++;
- }
- return;
- }
- /* Determine whether the line is X or Y major */
- if (dx >= dy) {
- /* X major line */
- ws = dx / dy;
- /* Adjust for each y by 1 step */
- pu = (dx % dy) * 2;
- /* Overrun error */
- pd = dy * 2;
- et = (dx % dy) - (dy * 2);
-
- ipc = (ws / 2) + 1;
- fpc = ipc;
- if ((pu == 0) && (ws & 1) == 0)
- ipc--;
- if ((ws & 1) != 0)
- et += dy;
- /* Draw run in x direction */
- for (j = 0; j < ipc; j++) {
- display_point(x1, y1, l, 0);
- x1 += ax;
- }
- y1++;
- /* Draw rest */
- for (i = 0; i< (dy-1); i++) {
- int rl = ws;
- if ((et += pu) > 0) {
- rl++;
- et -= pd;
- }
- for (j = 0; j < rl; j++) {
- display_point(x1, y1, l, 0);
- x1 += ax;
- }
- y1++;
- }
- for (j = 0; j < fpc; j++) {
- display_point(x1, y1, l, 0);
- x1 += ax;
- }
- } else {
- ws = dy / dx;
- pu = (dy % dx) * 2;
- pd = dx * 2;
- et = (dy % dx) - (dx * 2);
- ipc = (ws / 2) + 1;
- fpc = ipc;
- if ((pu == 0) && ((ws & 1) == 0))
- ipc--;
- if ((ws & 1) != 0)
- et += dx;
-
- /* Draw run in y direction */
- for (j = 0; j < ipc; j++) {
- display_point(x1, y1, l, 0);
- y1 ++;
- }
- x1 += ax;
- /* Draw rest */
- for (i = 0; i< (dx-1); i++) {
- int rl = ws;
- if ((et += pu) > 0) {
- rl++;
- et -= pd;
- }
- for (j = 0; j < rl; j++) {
- display_point(x1, y1, l, 0);
- y1 ++;
- }
- x1 += ax;
- }
- for (j = 0; j < fpc; j++) {
- display_point(x1, y1, l, 0);
- y1 ++;
- }
- }
-}
-
-#if defined(__cplusplus)
-}
-#endif
diff --git a/display/iii.h b/display/iii.h
deleted file mode 100644
index 0bb8984..0000000
--- a/display/iii.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* iii.c: Triple III display interface.
-
- Copyright (c) 2020, Richard Cornwell.
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- RICHARD CORNWELL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- Except as contained in this notice, the name of Richard Cornwell shall not be
- used in advertising or otherwise to promote the sale, use or other dealings
- in this Software without prior written authorization from Richard Cornwell
-
-*/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-extern int iii_init(void *, int);
-extern int iii_cycle(int, int);
-extern void iii_point(int, int, int);
-extern void iii_draw_line(int x1, int y1, int x2, int y2, int l);
-
-#if defined(__cplusplus)
-}
-#endif
diff --git a/makefile b/makefile
index b89d203..ec871c9 100644
--- a/makefile
+++ b/makefile
@@ -648,7 +648,6 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
DISPLAYVT = ${DISPLAYD}/vt11.c
DISPLAY340 = ${DISPLAYD}/type340.c
DISPLAYNG = ${DISPLAYD}/ng.c
- DISPLAYIII = ${DISPLAYD}/iii.c
DISPLAYIMLAC = ${DISPLAYD}/imlac.c
DISPLAYTT2500 = ${DISPLAYD}/tt2500.c
DISPLAY_OPT += -DUSE_DISPLAY $(VIDEO_CCDEFS) $(VIDEO_LDFLAGS)
@@ -2104,7 +2103,7 @@ KA10 = ${KA10D}/kx10_cpu.c ${KA10D}/kx10_sys.c ${KA10D}/kx10_df.c \
${KA10D}/pdp6_dcs.c ${KA10D}/ka10_dpk.c ${KA10D}/kx10_dpy.c \
${PDP10D}/ka10_ai.c ${KA10D}/ka10_iii.c ${KA10D}/kx10_disk.c \
${PDP10D}/ka10_pclk.c ${PDP10D}/ka10_tv.c \
- ${DISPLAYL} ${DISPLAY340} ${DISPLAYIII}
+ ${DISPLAYL} ${DISPLAY340}
KA10_OPT = -DKA=1 -DUSE_INT64 -I ${KA10D} -DUSE_SIM_CARD ${NETWORK_OPT} ${DISPLAY_OPT} ${KA10_DISPLAY_OPT}
ifneq (${PANDA_LIGHTS},)
# ONLY for Panda display.