Apple 2 mouse driver and other stuff from Oliver Schmidt

git-svn-id: svn://svn.cc65.org/cc65/trunk@3717 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2006-04-06 19:51:37 +00:00
parent f507124733
commit 685235795c
17 changed files with 660 additions and 46 deletions

View File

@@ -71,7 +71,7 @@ all: $(EXELIST)
ascii: $(CRT0) ascii.o $(CLIB)
@$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
diodemo: $(CRT0) diodemo.o $(CLIB)
diodemo: $(CRT0) diodemo.o $(CLIB)
@$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
fire: $(CRT0) fire.o $(CLIB)
@@ -85,20 +85,26 @@ hello: $(CRT0) hello.o $(CLIB)
# The apple machines need the start address adjusted for the mandelbrot demo
ifeq "$(SYS)" "apple2"
mandelbrot: $(CRT0) mandelbrot.o $(CLIB)
mandelbrot: $(CRT0) mandelbrot.o $(CLIB)
@$(LD) -t $(SYS) -m $(basename $@).map --start-addr 0x4000 -o $@ $^
else
ifeq "$(SYS)" "apple2enh"
mandelbrot: $(CRT0) mandelbrot.o $(CLIB)
mandelbrot: $(CRT0) mandelbrot.o $(CLIB)
@$(LD) -t $(SYS) -m $(basename $@).map --start-addr 0x4000 -o $@ $^
else
mandelbrot: $(CRT0) mandelbrot.o $(CLIB)
mandelbrot: $(CRT0) mandelbrot.o $(CLIB)
@$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
endif
endif
# The Apple ][ needs the start address adjusted for the mousedemo
ifeq "$(SYS)" "apple2"
mousedemo: $(CRT0) mousedemo.o $(CLIB)
@$(LD) -t $(SYS) -m $(basename $@).map --start-addr 0x4000 -o $@ $^
else
mousedemo: $(CRT0) mousedemo.o $(CLIB)
@$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^
endif
nachtm: $(CRT0) nachtm.o $(CLIB)
@$(LD) -t $(SYS) -m $(basename $@).map -Ln $(basename $@).lbl -o $@ $^

View File

@@ -66,7 +66,7 @@ Platforms: All systems with TGI support. You may have to change the
Name: mousedemo
Description: Shows how to use the mouse.
Platforms: All systems with mouse and conio support:
C64, C128
C64, C128, CBM510, Atari, Apple2
-----------------------------------------------------------------------------
Name: nachtm

View File

@@ -1,5 +1,5 @@
/*
* Demo program for mouse usage. Will work for the C64/C128/CBM510/Atari
* Demo program for mouse usage. Will work for the C64/C128/CBM510/Atari/Apple2
*
* Ullrich von Bassewitz, 13.09.2001
*
@@ -12,6 +12,7 @@
#include <string.h>
#include <mouse.h>
#include <conio.h>
#include <ctype.h>
#include <dbg.h>
@@ -61,6 +62,14 @@ static const unsigned char MouseSprite[64] = {
#endif /* __C64__ or __C128__ */
#ifdef __APPLE2__
# define DRIVER "a2.stdmou.mou"
#endif
#ifdef __APPLE2ENH__
# define DRIVER "a2e.stdmou.mou"
#endif
static void CheckError (const char* S, unsigned char Error)
@@ -81,7 +90,7 @@ static void DoWarning (void)
" %s\n"
"on disk! Press 'y' if you have it or\n"
"any other key to exit.\n", DRIVER);
if (cgetc () != 'y') {
if (tolower (cgetc ()) != 'y') {
exit (EXIT_SUCCESS);
}
printf ("Ok. Please wait patiently...\n");
@@ -113,9 +122,9 @@ int main (void)
DoWarning ();
/* Clear the screen, set white on black */
bordercolor (COLOR_BLACK);
bgcolor (COLOR_BLACK);
textcolor (COLOR_GRAY3);
(void) bordercolor (COLOR_BLACK);
(void) bgcolor (COLOR_BLACK);
(void) textcolor (COLOR_GRAY3);
cursor (0);
clrscr ();