add joydemo to c65/mega65 samples, it works when driver is statically linked

This commit is contained in:
mrdudz
2025-06-25 23:52:59 +02:00
parent ad4d86bbf2
commit 1b815d4148
2 changed files with 15 additions and 2 deletions

View File

@@ -108,6 +108,8 @@ DISK_apple2enh = samples.dsk
DISK_atari = samples.atr
DISK_atarixl = samples.atr
DISK_plus4 = samples.d64
DISK_c65 = samples.d81
DISK_mega65 = samples.d81
# --------------------------------------------------------------------------
# System-dependent settings
@@ -253,6 +255,7 @@ EXELIST_c65 = \
checkversion \
enumdevdir \
hello \
joydemo \
sieve \
tinyshell
@@ -336,6 +339,7 @@ EXELIST_mega65 = \
checkversion \
enumdevdir \
hello \
joydemo \
sieve \
tinyshell
@@ -560,6 +564,12 @@ samples.d64: samples
$(foreach file,$(OVERLAYLIST),$(D64_WRITE_PRG_recipe))
$(foreach file,$(EMD) $(MOU) $(JOY) $(TGI),$(D64_WRITE_SEQ_recipe))
samples.d81: samples
@$(C1541) -format "samples,00" d81 $@ >$(NULLDEV)
$(foreach file,$(EXELIST_$(SYS)),$(D64_WRITE_PRG_recipe))
$(foreach file,$(OVERLAYLIST),$(D64_WRITE_PRG_recipe))
$(foreach file,$(EMD) $(MOU) $(JOY) $(TGI),$(D64_WRITE_SEQ_recipe))
# --------------------------------------------------------------------------
# Rule to make an Apple II disk with all samples. Needs the AppleCommander
# program, available at https://applecommander.github.io/, and a template disk

View File

@@ -3,6 +3,9 @@
#include <stdio.h>
#include <joystick.h>
/* define 0 to link the standard driver statically */
/* #define DYN_DRV 0 */
#ifndef DYN_DRV
# define DYN_DRV 1
#endif
@@ -31,7 +34,7 @@ int main (void)
PRINTF("Driver init..." CR);
#if DYN_DRV
/* Load and initialize the driver */
/* Load and initialize the standard driver driver */
if ((err = joy_load_driver (joy_stddrv))) {
PRINTF ("Driver load error (code %d)." CR
"Warning: This program needs the JOY" CR
@@ -40,7 +43,7 @@ int main (void)
}
PRINTF("Driver loaded OK" CR);
#else
/* Install the driver */
/* Install the standard driver */
joy_install (joy_static_stddrv);
#endif