Fixes in 2005/sykes

Add PET program written in the emulator and add it to the try.sh script.

The try.sh script now explicitly requires one hit 'q' (or 'Q') to quit
(or else killing it or hitting interrupt); after one command is done
(hitting ctrl-c) it shows the menu again which has the quit option in
there. This makes it a bit easier or at least clearer (cleaner?).

The Makefile DATA variable had to be updated after file rename.

There were some other issues in the README.md file as well that I missed
yesterday.

The bugs.md file has been updated pointing out that one has to hit
ctrl-c or whatever the interrupt is set to.

I believe now that this entry should be complete.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-22 04:57:20 -08:00
1 parent 45c8e670a5
commit d6824e6732
5 files changed
+58 -18

No files matched your search

+1 -1
View File
@@ -114,7 +114,7 @@ PROG= ${ENTRY}
#
OBJ= ${PROG}.o
ROM_DATA= basic-2-c000.901465-01.bin basic-2-d000.901465-02.bin edit-2-n.901447-24.bin \
nullfill.bin kernal-2.901465-03.bin
nullfill.bin kernel-2.901465-03.bin
DATA= ${ROM_DATA} 6502test DEMO chess
TARGET= pet.rom ${PROG}
#
BIN
View File
Binary file not shown.
+10 -9
View File
@@ -134,15 +134,15 @@ The default is 4.
The control keys are as follows:
```
^A HOME
^L CLR
^R RVS
^E OFF
^Y INST
^X STOP (break)
^F cursor forward
^B cursor back
^N cursor down
^A HOME
^L CLR
^R RVS
^E OFF
^Y INST
^X STOP (break)
^F cursor forward
^B cursor back
^N cursor down
```
Supplied also is a short demo program written in
@@ -172,6 +172,7 @@ RUN
You also might try typing this to see an ancient [Easter egg][]:
```
WAIT 6502,12
```
+19 -7
View File
@@ -15,18 +15,27 @@ make CC="$CC" all >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
while true; do
mode=0
# menu - show menu and prompt for input
menu()
{
echo "(0) Run demo" 1>&2
echo "(1) Show Easter egg" 1>&2
echo "(2) Play chess" 1>&2
echo "(3) Run test-suite" 1>&2
echo "(4) Run pet.rom with -1" 1>&2
echo "(5) Run IOCCC best emulator" 1>&2
echo "(Q) Quit" 1>&2
echo "NOTE: you have to hit ctrl-c or whatever your interrupt combination is to" 1>&2
echo "exit the program to continue here." 1>&2
read -rp "Make your selection (0 - 4 or any other key to exit): " mode
read -rp "Make your selection: " mode
}
while true; do
# print menu and get item to run
menu
echo 1>&2
case "${mode}" in
@@ -45,13 +54,16 @@ while true; do
4) # -1
./sykes pet.rom -1
;;
*)
5) # best emulator of IOCCC 2005
printf "LOAD \"PET\"\nRUN\n" | ./sykes pet.rom 6
;;
q|Q)
exit 0
;;
*) continue
;;
esac
read -r -n 1 -p "Do you want to continue? " ans
if [[ "$ans" != "y" && "$ans" != "Y" ]]; then
break;
fi
# this echo is for a quirk when pressing ctrl-c and showing the menu again
echo 1>&2
done
+28 -1
View File
@@ -3025,6 +3025,32 @@ might be some command line that will let it work that way.
## [2005/sykes](2005/sykes/sykes.c) ([README.md](2005/sykes/README.md]))
Cody added the saved (with the `SAVE` command) BASIC program `PET` which was:
```basic
10 PRINT "2005'S IOCCC BEST EMULATOR"
20 PRINT "BY STEPHEN SYKES!"
```
followed by the commands:
```
SAVE "PET"
READY.
NEW
READY.
LOAD "PET"
READY.
RUN
2005'S IOCCC BEST EMULATOR
BY STEPHEN SYKES!
```
to both save and test run it.
Cody added the [try.sh](2005/sykes/try.sh) script which runs in a loop with a
menu of things one might wish to try, asking if they wish to continue when done.
@@ -3039,7 +3065,8 @@ interrupt is set to in order to exit the program.
## [2005/timwi](2005/timwi/timwi.c) ([README.md](2005/timwi/README.md]))
Cody added [try.sh](2005/timwi/try.sh). It only has one command as he doesn't
want to knacker his brain any more than it might or might not already be.
want to knacker his brain any more than it might or might not already be :-) and
he doesn't want to damage anyone else's brain either. :-)
## [2005/toledo](2005/toledo/toledo.c) ([README.md](2005/toledo/README.md))