move remaining stuff from testcode/lib/ one level up to testcode/

This commit is contained in:
mrdudz
2020-09-29 19:12:34 +02:00
parent 3d8e787e66
commit dcee493e94
83 changed files with 0 additions and 2 deletions

71
testcode/apple2/Makefile Normal file
View File

@@ -0,0 +1,71 @@
# For this one see https://applecommander.github.io/
AC ?= ac.jar
# Just the usual way to find out if we're
# using cmd.exe to execute make rules.
ifneq ($(shell echo),)
CMD_EXE = 1
endif
ifdef CMD_EXE
NULLDEV = nul:
DEL = -del /f
RMDIR = rmdir /s /q
else
NULLDEV = /dev/null
DEL = $(RM)
RMDIR = $(RM) -r
endif
ifdef CC65_HOME
AS = $(CC65_HOME)/bin/ca65
CC = $(CC65_HOME)/bin/cc65
CL = $(CC65_HOME)/bin/cl65
LD = $(CC65_HOME)/bin/ld65
else
AS := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65)
CC := $(if $(wildcard ../../../bin/cc65*),../../../bin/cc65,cc65)
CL := $(if $(wildcard ../../../bin/cl65*),../../../bin/cl65,cl65)
LD := $(if $(wildcard ../../../bin/ld65*),../../../bin/ld65,ld65)
endif
all: hgrshow hgrtest dhgrshow
disk: hgr.dsk dhgr.dsk
hgr.dsk: hgrshow hgrtest
cp prodos.dsk $@
java -jar $(AC) -as $@ hgrshow <hgrshow
java -jar $(AC) -as $@ hgrtest <hgrtest
java -jar $(AC) -p $@ astronaut.hgr bin 0x2000 <astronaut.hgr
java -jar $(AC) -p $@ chips.hgr bin 0x2000 <chips.hgr
java -jar $(AC) -p $@ macrometer.hgr bin 0x2000 <macrometer.hgr
java -jar $(AC) -p $@ mariner.hgr bin 0x2000 <mariner.hgr
java -jar $(AC) -p $@ rose.hgr bin 0x2000 <rose.hgr
java -jar $(AC) -p $@ werner.hgr bin 0x2000 <werner.hgr
java -jar $(AC) -p $@ winston.hgr bin 0x2000 <winston.hgr
hgrshow: hgrshow.c
$(CL) -Oirs -t apple2 --start-addr 0x4000 -m hgrshow.map $^
hgrtest: hgrtest.c werner.s
$(CL) -Oirs -t apple2 -C apple2-hgr.cfg -m hgrtest.map $^
dhgr.dsk: dhgrshow
cp prodos.dsk $@
java -jar $(AC) -as $@ dhgrshow <dhgrshow
java -jar $(AC) -p $@ catface.dhgr bin 0x2000 <catface.dhgr
java -jar $(AC) -p $@ gatsby.dhgr bin 0x2000 <gatsby.dhgr
java -jar $(AC) -p $@ girl.dhgr bin 0x2000 <girl.dhgr
java -jar $(AC) -p $@ monarch.dhgr bin 0x2000 <monarch.dhgr
java -jar $(AC) -p $@ superman.dhgr bin 0x2000 <superman.dhgr
java -jar $(AC) -p $@ venice.dhgr bin 0x2000 <venice.dhgr
dhgrshow: dhgrshow.c
$(CL) -Oirs -t apple2enh --start-addr 0x4000 -m dhgrshow.map $^
clean:
$(RM) hgr.dsk dhgr.dsk
$(RM) hgrshow hgrshow.map
$(RM) hgrtest hgrtest.map
$(RM) dhgrshow dhgrshow.map

Binary file not shown.

Binary file not shown.

BIN
testcode/apple2/chips.hgr Normal file

Binary file not shown.

View File

@@ -0,0 +1,45 @@
// cl65 -t apple2enh --start-addr 0x4000 dhgrshow.c
#include <tgi.h>
#include <conio.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <dirent.h>
#include <peekpoke.h>
void main (void)
{
unsigned old;
DIR *dir;
struct dirent *ent;
old = videomode (VIDEOMODE_80x24);
tgi_install (a2e_hi_tgi);
tgi_init ();
POKE (0xC05E, 0);
dir = opendir (".");
while (ent = readdir (dir)) {
char *ext;
int hgr;
ext = strrchr (ent->d_name, '.');
if (!ext || strcasecmp (ext, ".dhgr"))
continue;
hgr = open (ent->d_name, O_RDONLY);
POKE (0xC055, 0);
read (hgr, (void*)0x2000, 0x2000);
POKE (0xC054, 0);
read (hgr, (void*)0x2000, 0x2000);
close (hgr);
if (cgetc () == '\r')
break;
}
closedir (dir);
tgi_uninstall ();
videomode (old);
}

BIN
testcode/apple2/gatsby.dhgr Normal file

Binary file not shown.

BIN
testcode/apple2/girl.dhgr Normal file

Binary file not shown.

37
testcode/apple2/hgrshow.c Normal file
View File

@@ -0,0 +1,37 @@
// cl65 -t apple2 --start-addr 0x4000 hgrshow.c
#include <tgi.h>
#include <conio.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <dirent.h>
void main (void)
{
DIR *dir;
struct dirent *ent;
tgi_install (a2_hi_tgi);
tgi_init ();
dir = opendir (".");
while (ent = readdir (dir)) {
char *ext;
int hgr;
ext = strrchr (ent->d_name, '.');
if (!ext || strcasecmp (ext, ".hgr"))
continue;
hgr = open (ent->d_name, O_RDONLY);
read (hgr, (void*)0x2000, 0x2000);
close (hgr);
if (cgetc () == '\r')
break;
}
closedir (dir);
tgi_uninstall ();
}

26
testcode/apple2/hgrtest.c Normal file
View File

@@ -0,0 +1,26 @@
// cl65 -t apple2 -C apple2-hgr.cfg hgrtest.c werner.s
#include <tgi.h>
#include <conio.h>
#pragma code-name (push, "LOWCODE")
void say (const char* text)
{
tgi_setcolor (TGI_COLOR_BLACK);
tgi_outtextxy (41, 33, text);
}
#pragma code-name (pop)
void main (void)
{
tgi_install (a2_hi_tgi);
tgi_init ();
cgetc ();
say ("Hi Dude !");
cgetc ();
tgi_uninstall ();
}

Binary file not shown.

BIN
testcode/apple2/mariner.hgr Normal file

Binary file not shown.

Binary file not shown.

BIN
testcode/apple2/rose.hgr Normal file

Binary file not shown.

Binary file not shown.

BIN
testcode/apple2/venice.dhgr Normal file

Binary file not shown.

BIN
testcode/apple2/werner.hgr Normal file

Binary file not shown.

2
testcode/apple2/werner.s Normal file
View File

@@ -0,0 +1,2 @@
.segment "HGR"
.incbin "werner.hgr"

BIN
testcode/apple2/winston.hgr Normal file

Binary file not shown.