Merge pull request #1505 from xexyl/sykes05-fixes

Fixes in 2005/sykes
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-11-22 14:00:19 -07:00
commit a4f558b503
5 files changed
+58 -18

No files matched your search

+1 -1
View File
@@ -114,7 +114,7 @@ PROG= ${ENTRY}
# #
OBJ= ${PROG}.o OBJ= ${PROG}.o
ROM_DATA= basic-2-c000.901465-01.bin basic-2-d000.901465-02.bin edit-2-n.901447-24.bin \ 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 DATA= ${ROM_DATA} 6502test DEMO chess
TARGET= pet.rom ${PROG} 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: The control keys are as follows:
``` ```
^A HOME ^A HOME
^L CLR ^L CLR
^R RVS ^R RVS
^E OFF ^E OFF
^Y INST ^Y INST
^X STOP (break) ^X STOP (break)
^F cursor forward ^F cursor forward
^B cursor back ^B cursor back
^N cursor down ^N cursor down
``` ```
Supplied also is a short demo program written in 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][]: You also might try typing this to see an ancient [Easter egg][]:
``` ```
WAIT 6502,12 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 screen after compilation so that only the entry is shown
clear clear
while true; do mode=0
# menu - show menu and prompt for input
menu()
{
echo "(0) Run demo" 1>&2 echo "(0) Run demo" 1>&2
echo "(1) Show Easter egg" 1>&2 echo "(1) Show Easter egg" 1>&2
echo "(2) Play chess" 1>&2 echo "(2) Play chess" 1>&2
echo "(3) Run test-suite" 1>&2 echo "(3) Run test-suite" 1>&2
echo "(4) Run pet.rom with -1" 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 "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 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 echo 1>&2
case "${mode}" in case "${mode}" in
@@ -45,13 +54,16 @@ while true; do
4) # -1 4) # -1
./sykes pet.rom -1 ./sykes pet.rom -1
;; ;;
*) 5) # best emulator of IOCCC 2005
printf "LOAD \"PET\"\nRUN\n" | ./sykes pet.rom 6
;;
q|Q)
exit 0 exit 0
;;
*) continue
;;
esac esac
read -r -n 1 -p "Do you want to continue? " ans
if [[ "$ans" != "y" && "$ans" != "Y" ]]; then # this echo is for a quirk when pressing ctrl-c and showing the menu again
break;
fi
echo 1>&2 echo 1>&2
done 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])) ## [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 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. 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])) ## [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 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)) ## [2005/toledo](2005/toledo/toledo.c) ([README.md](2005/toledo/README.md))