From 9b56f8086b3c304f334dbd9f40807f1eaebdb486 Mon Sep 17 00:00:00 2001 From: "ol.sc" Date: Sun, 24 Jun 2012 21:15:39 +0000 Subject: [PATCH] Made overlaydemo compatible with the Atari: - 8.3 overlay filenames - exit only after keypress git-svn-id: svn://svn.cc65.org/cc65/trunk@5740 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- samples/Makefile | 5 ++--- samples/overlaydemo.c | 9 ++++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/samples/Makefile b/samples/Makefile index 746de79a7..81372f802 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -79,6 +79,7 @@ EXELIST = ascii \ mandelbrot \ mousedemo \ nachtm \ + ovrldemo \ plasma \ sieve \ tgidemo @@ -122,7 +123,7 @@ endif nachtm: nachtm.o -overlaydemo: overlaydemo.o +ovrldemo: overlaydemo.o @$(LD) -t $(SYS) -m $(basename $@).map -C $(SYS)-overlay.cfg -o $@ $^ $(CLIB) plasma: plasma.o @@ -168,5 +169,3 @@ clean: .PHONY: zap zap: clean $(RM) $(EXELIST) samples.d64 - - diff --git a/samples/overlaydemo.c b/samples/overlaydemo.c index 02451a28a..318a32e63 100644 --- a/samples/overlaydemo.c +++ b/samples/overlaydemo.c @@ -8,6 +8,7 @@ #include +#include #include #include @@ -70,17 +71,19 @@ unsigned char loadfile (char *name, void *addr, void *size) void main (void) { log ("Calling overlay 1 from main"); - if (loadfile ("overlaydemo.1", &_OVERLAY1_LOAD__, &_OVERLAY1_SIZE__)) { + if (loadfile ("ovrldemo.1", &_OVERLAY1_LOAD__, &_OVERLAY1_SIZE__)) { foo (); } log ("Calling overlay 2 from main"); - if (loadfile ("overlaydemo.2", &_OVERLAY2_LOAD__, &_OVERLAY2_SIZE__)) { + if (loadfile ("ovrldemo.2", &_OVERLAY2_LOAD__, &_OVERLAY2_SIZE__)) { bar (); } log ("Calling overlay 3 from main"); - if (loadfile ("overlaydemo.3", &_OVERLAY3_LOAD__, &_OVERLAY3_SIZE__)) { + if (loadfile ("ovrldemo.3", &_OVERLAY3_LOAD__, &_OVERLAY3_SIZE__)) { foobar (); } + + cgetc (); } -- 2.39.5