1. Bugs
Jupiter Ace: (1 - 1-5, 2 - 6-0, 3 - Cursor) The 6-0 set interferes with the cursor key set. Instead of 1-5 and 6-0,
QAOP-MN would be nice to have, like on the ZX81.
Mattel Aquarius: (1 - QAOP-MN, 2 - 8246-05) after selecting 1 (QAOP-MN) for Joystick #1 and 2 (8246-06) for Joystick #2,
Joystick #1 input always triggers input for both joysticks, while Joystick #2 input has no effect.
Philips P2000: reacts only to left direction input (1 = QAOP-MN, 2 = 8246-05)
Sega SC3000: does not react to any input (1 = QAOP-MN, 2 = 8246-05)
Sord M5: Fire (Space) does not work, the rest is ok (1 - Cursor Keys + Space; no other option)
SVI: cursor joystick reacts only to left direction input (1 - Cursor, 2 - Joystick 1, 3 - Joystick 2)
TRS-80 and
EG2000: reacts only to the O key (joystick 1 "left") (1 - QAOP-MN, 2 - 8246-05)
2. Nice-to-have additions
Bandai RX-78: all ok (Joystick 1 and 2), additional support for cursor keys would be nice to have
Laser 350 / 500: (UNTESTED) currently there is only one option (1 - Joystick 1). Cursor keys would
be nice to have, and if possible also QAOP-MN.
MC-1000: probably all ok (1 - Joystick 1, 2 - Joystick 2), Joystick 2 is still untested.
Additional QAOP-MN support would be nice to have.
Memotech MTX: all ok (1 - Joystick 1, 2 - Joystick 2). Additional support for cursor keys (1 5 3 .) would be nice to have.
Philips VG5000: all ok (1 - Joystick 1, 2 - Joystick 2), additional support for cursor keys would be nice to have
Z9001: all ok (1 - Joystick 1, 2 - Joystick 2), although there are slowdowns when the stick is held in one direction. Cursor key support would be nice to have.
3. All ok
Casio PV-1000: all ok (Joystick 1 and 2)
Casio PV-2000: all ok (1 - QAOP-MN, 2 - 8246-05)
Colecovison: all ok (Joystick 1 and 2)
Galaksija: all ok (1 - Arrows and Space, 2 - 5678-0)
Laser 210 / VZ200: all ok (1 = 1-5, 2 = 6-0, 3 = QAOP-MN)
Microbee: all ok (1 - Arrows and Space, 2 - Arrows + SPACE (256TC), 3 - Joystick on parallel port)
MSX: all ok (1 - Cursor, 2 - Joystick 1, 3 - Joystick 2)
Sharp MZ: all ok (1 - QAOP-MN, 2 - 8246-05)
Super-80: all ok (1 - QAOP-MN, 2 - 8246-05)
ZX80: all ok (1 - QAOP-MN, 2 - 8246-05)
ZX81: all ok (1 - Kempston, 2 - ZXPand, 3 - QAOP-MN, 4 - Cursor)
ZX Spectrum: all ok (1 - Kempston, 2 - Sinclair 1, 3 - Sinclair 2, 4 - Cursor, 5 - Fuller)
4. No joystick.h support yet:
Alphatronic PC,
Amstrad CPC
Camputers Lynx
Exidy Sorcerer
KC 85/2-5
Mitsubishi Multi-8
Nascom
NEC PC-6001 Mk2
Osborne 1
Samsung SPC-1000
Tatung Einstein
Tiki-100
Z1013
Maybe someone could have a look at the bugs, hopefully they are easy to fix.
Here is my little test program?
Code: Select all
/*
joytest.c
joystick test using games.h (based on snakes.c)
Author: RobertK, 2018-12-18
=== Test results ===
Bandai RX-78: all ok (Joystick 1 and 2), additional support for cursor keys would be nice to have
Casio PV-1000: all ok (Joystick 1 and 2)
Casio PV-2000: all ok (1 - QAOP-MN, 2 - 8246-05)
Colecovison: all ok (Joystick 1 and 2)
TRS-80 and
EG2000: reacts only to the O key (joystick 1 "left") (1 - QAOP-MN, 2 - 8246-05)
Galaksija: all ok (1 - Arrows and Space, 2 - 5678-0)
Jupiter Ace: (1 - 1-5, 2 - 6-0, 3 - Cursor) The 6-0 set interferes with the cursor key set. Instead of 1-5 and 6-0,
QAOP-MN would be nice to have, like on the ZX81.
Laser 210 / VZ200: all ok (1 = 1-5, 2 = 6-0, 3 = QAOP-MN)
Laser 350 / 500: (UNTESTED) currently there is only one option (1 - Joytick 1). Cursor keys would
be nice to have, and if possible also QAOP-MN.
Mattel Aquarius: (1 - QAOP-MN, 2 - 8246-05) after selecting 1 (QAOP-MN) for Joystick #1 and 2 (8246-06) for Joystick #2,
Joystick #1 input always triggers input for both joysticks, while Joystick #2 input has no effect.
MC-1000: probably all ok (1 - Joystick 1, 2 - Joystick 2), Joystick 2 is still untested.
Additional QAOP-MN support would be nice to have.
Memotech MTX: all ok (1 - Joystick 1, 2 - Joystick 2). Additional support for cursor keys (1 5 3 .) would be nice to have.
Microbee: all ok (1 - Arrows and Space, 2 - Arrows + SPACE (256TC), 3 - Joystick on parallel port)
MSX: all ok (1 - Cursor, 2 - Joystick 1, 3 - Joystick 2)
Philips P2000: reacts only to left direction input (1 = QAOP-MN, 2 = 8246-05)
Philips VG5000: all ok (1 - Joystick 1, 2 - Joystick 2), additional support for cursor keys would be nice to have
Sega SC3000: does not react to any input (1 = QAOP-MN, 2 = 8246-05)
Sharp MZ: all ok (1 - QAOP-MN, 2 - 8246-05)
Sord M5: Fire (Space) does not work, the rest is ok (1 - Cursor Keys + Space; no other option)
Super-80: all ok (1 - QAOP-MN, 2 - 8246-05)
SVI: cursor joystick reacts only to left direction input (1 - Cursor, 2 - Joystick 1, 3 - Joystick 2)
Z9001: all ok (1 - Joystick 1, 2 - Joystick 2), although there are slowdowns when the stick is held in one direction. Cursor key support would be nice to have.
ZX80: all ok (1 - QAOP-MN, 2 - 8246-05)
ZX81: all ok (1 - Kempston, 2 - ZXPand, 3 - QAOP-MN, 4 - Cursor)
ZX Spectrum: all ok (1 - Kempston, 2 - Sinclair 1, 3 - Sinclair 2, 4 - Cursor, 5 - Fuller)
Alphatronic PC,
Amstrad CPC,
Camputers Lynx,
Exidy Sorcerer,
KC 85/2-5,
Mitsubishi Multi-8,
Nascom,
NEC PC-6001 Mk2,
Osborne 1,
Samsung SPC-1000,
Tatung Einstein,
Tiki-100,
Z1013:
'_joystick_type' not defined, etc.
*/
// zcc +zx81 -create-app -startup=2 -o joytest2_ZX81 joytest2.c
// zcc +ace -vn -create-app joytest2.c -o jt2.bin
// load the game on the Jupiter Ace by typing
// 0 0 bload jt.bin
#include <stdio.h>
#include <games.h>
void main(void) {
int joyType1;
int joyType2;
int x;
char joyTextLeft[7];
char joyTextRight[7];
printf("%c",12); // clear the screen
#if defined(__ZX80__)
gen_tv_field_init(0); // has to be called once for screen-refreshing on the ZX80
#endif
printf("*** joystick test ***");
/*
int XSize,YSize;
screensize(&XSize, &YSize);
printf("\n\nxsize=%d, ysize=%d", XSize, YSize);
*/
// On consoles we don't have a keyboard so we have to preset the joystick selection
#if defined(__PV1000__)
joyType1=0;
joyType2=1;
#elif defined(__COLECO__)
joyType1=1;
joyType2=2;
#else
printf("\n\njoystick 1:\n");
for (x = 0; x != GAME_DEVICES; x++)
printf("%u - %s\n", x + 1, joystick_type[x]);
joyType1 = 0;
while ((joyType1 < 1) || (joyType1 > GAME_DEVICES))
joyType1 = getk() - 48;
#if defined(__ZX80__)
fgetc_cons();
#endif
while (getk())
;
printf("\n\njoystick 2:\n");
for (x = 0; x != GAME_DEVICES; x++)
printf("%u - %s\n", x + 1, joystick_type[x]);
#if defined(__ZX80__)
fgetc_cons();
#endif
joyType2 = 0;
while ((joyType2 < 1) || (joyType2 > GAME_DEVICES))
joyType2 = getk() - 48;
while(1)
{
if (joystick(joyType1) & MOVE_LEFT)
sprintf(joyTextLeft,"%s","left");
else if (joystick(joyType1) & MOVE_RIGHT)
sprintf(joyTextLeft,"%s","right");
else if (joystick(joyType1) & MOVE_UP)
sprintf(joyTextLeft,"%s","up");
else if (joystick(joyType1) & MOVE_DOWN)
sprintf(joyTextLeft,"%s","down");
else if (joystick(joyType1) & MOVE_FIRE1)
sprintf(joyTextLeft,"%s","fire1");
else if (joystick(joyType1) & MOVE_FIRE2)
sprintf(joyTextLeft,"%s","fire2");
else
sprintf(joyTextLeft,"%s"," ");
if (joystick(joyType2) & MOVE_LEFT)
sprintf(joyTextRight,"%s","left");
else if (joystick(joyType2) & MOVE_RIGHT)
sprintf(joyTextRight,"%s","right");
else if (joystick(joyType2) & MOVE_UP)
sprintf(joyTextRight,"%s","up");
else if (joystick(joyType2) & MOVE_DOWN)
sprintf(joyTextRight,"%s","down");
else if (joystick(joyType2) & MOVE_FIRE1)
sprintf(joyTextRight,"%s","fire1");
else if (joystick(joyType2) & MOVE_FIRE2)
sprintf(joyTextRight,"%s","fire2");
else
sprintf(joyTextRight,"%s"," ");
printf("joy 1: %-5s joy 2: %-5s\n",joyTextLeft,joyTextRight);
#if defined(__ZX80__)
gen_tv_field();
#endif
}
}
Code: Select all
setlocal
rem Set your z88dk root path here
set z88root=C:\Misc\z88dk\
set path=%PATH%;%z88root%bin\
set zcccfg=%z88root%lib\config\
set z80_ozfiles=%z88root%lib\
REM === Jupiter Ace ===
del joytest_JupiterAce.tap
zcc +ace -create-app joytest.c -o jt.bin
ren jt.tap joytest_JupiterAce.tap
REM === Alphatronic PC ===
zcc +alphatro -create-app joytest.c -o joytest_alphatronic
REM === Bandai RX-78 ===
zcc +rx78 -o joytest_rx78 -create-app joytest.c
REM === EG2000 ===
zcc +trs80 -lndos -create-app -subtype=eg2000disk -o joytest_eg2000.bin joytest.c
REM === Mattel Aquarius ===
zcc +aquarius -create-app joytest.c -o joytest_aquarius
zcc +aquarius -subtype=rom -create-app joytest.c -o joytest_aquarius
REM === Memotech MTX ===
del joytest_MemotechMTX500
del joytest_MemotechMTX500.mtx
del joytest_MemotechMTX512
del joytest_MemotechMTX512.mtx
REM MTX 500 mode (32K)
REM This memory model works with the MTX512 too, but before loading the user must type:
REM POKE 64122,0
REM NEW
zcc +mtx -create-app joytest.c -o joytest_MemotechMTX500.o
ren joytest_MemotechMTX500 joytest_MemotechMTX500.mtx
REM MTX 512 mode (64K and more)
zcc +mtx -create-app -startup=2 joytest.c -o joytest_MemotechMTX512.o
ren joytest_MemotechMTX512 joytest_MemotechMTX512.mtx
REM === MC-1000 ===
zcc +mc1000 -create-app -Cz--audio joytest.c -o joytest_mc1000
REM === Camputers Lynx ===
del joytest
del joytest.cas
del joytest_CamputersLynx
del joytest_CamputersLynx.tap
zcc +lynx -create-app joytest.c -o joytest
ren joytest joytest_CamputersLynx
ren joytest.tap joytest_CamputersLynx.tap
REM === Colecovision ===
zcc +coleco -o joytest_coleco -create-app joytest.c
REM === Amstrad CPC ===
del joytest_cpc
del joytest_cpc.dsk
del joytest_cpc.cpc
del joytest
del joytest.dsk
del joytest.cpc
zcc +cpc -lndos -subtype=dsk -create-app -o joytest joytest.c
ren joytest joytest_cpc
ren joytest.dsk joytest_cpc.dsk
ren joytest.cpc joytest_cpc.cpc
REM === Tandy TRS-80 ===
zcc +trs80 -lndos -create-app -o joytest_trs80.bin -subtype=disk joytest.c
REM === Tatung Einstein ===
del joytest_einstein.dsk
del joytest_einstein.com
REM Here we define "__EINSTEIN__" so that we know what CP/M machine our program is running on
zcc +cpm -subtype=einstein -o joytest.com joytest.c -create-app -D__EINSTEIN__
ren joytest.dsk joytest_einstein.dsk
ren joytest.com joytest_einstein.com
REM === Exidy Sorcerer ===
REM .srr file for JSorcerer
zcc +srr -lndos -o joytest_sorcerer -create-app joytest.c
REM .wav file for M.A.M.E or real hardware
zcc +srr -lndos -o joytest_sorcerer -create-app joytest.c -Cz--audio
REM === Galaksija ====
del joytest
del joytest.wav
del joytest.gtp
del joytest_galaksija
del joytest_galaksija.wav
del joytest_galaksija.gtp
zcc +gal -create-app -o joytest joytest.c
ren joytest joytest_galaksija
ren joytest.wav joytest_galaksija.wav
ren joytest.gtp joytest_galaksija.gtp
REM === KC 85/2-5 ===
zcc +kc -lndos -create-app joytest.c -o joytest_KC85_2-5
REM === Laser 500 ===
del joytest_laser500_MAME.wav
del joytest_laser500.wav
del joytest_laser500.cas
del joytest_laser500.bin
del joytest_laser500
del joytest.wav
del joytest.cas
del joytest.bin
del joytest
REM we compile it under the name "joytest" (without system suffix) so that the program file inside the cassette file gets this name
REM Will create a file that will load on real hardware.
zcc +laser500 joytest.c -o joytest -create-app -Cz--audio
ren joytest joytest_laser500.bin
ren joytest.cas joytest_laser500.cas
ren joytest.wav joytest_laser500.wav
REM Will create a file that will load on the Mame emulator
zcc +laser500 joytest.c -o joytest -create-app -Cz--audio -Cz--fast
del joytest
del joytest.cas
ren joytest.wav joytest_laser500_MAME.wav
REM === Mitsubishi Multi-8 ===
zcc +multi8 -create-app -o joytest_multi8 joytest.c
REM === Microbee ===
del joytest
del joytest.dsk
del joytest_microbee
del joytest_microbee.dsk
REM Here we define "__BEE__" so that we know what CP/M machine our program is running on
zcc +cpm -subtype=microbee -create-app -o joytest joytest.c -D__BEE__
ren joytest joytest_microbee
ren joytest.dsk joytest_microbee.dsk
REM === MSX ===
del joytest
del joytest.cas
del joytest_msx
del joytest_msx.cas
REM we compile it under the name "joytest" (without system suffix) so that the program file inside the cassette file gets this name
REM The -zorg=49200 option makes the program compatible for 16K machines
zcc +msx -create-app -lndos joytest.c -o joytest -zorg=49200
ren joytest joytest_msx
ren joytest.cas joytest_msx.cas
REM === NASCOM ===
zcc +nascom -o joytest_nascom -create-app joytest.c
rem copy the file to the emulator directory
del C:\Misc\DOS\misc\nascom\joytest.NAS /Q
copy joytest_nascom.nas C:\Misc\DOS\misc\nascom\joytest.NAS
REM === NEC PC-6001 Mk2 ===
zcc +pc6001 -subtype=rom -create-app -o joytest_pc6001Mk2 joytest.c
REM === Osborne 1 ===
del joytest_osborne1.dsk
del joytest_osborne1
REM Here we define "__OSBORNE1__" so that we know what CP/M machine our program is running on
zcc +cpm -subtype=osborne1 -create-app -o joytest joytest.c -D__OSBORNE1__
ren joytest.dsk joytest_osborne1.dsk
ren joytest joytest_osborne1
REM === Philips P2000 ===
zcc +p2000 -o joytest_p2000 -create-app joytest.c
REM copy the file to the emulator directory
del C:\Misc\DOS\misc\p2000\joytest.cas /Q
copy joytest_p2000.cas C:\Misc\DOS\misc\p2000\joytest.cas
REM === Philips VG5000 ===
zcc +vg5k -create-app joytest.c -o joytest_vg5000
REM === PV-1000 ===
zcc +pv1000 -o joytest_pv1000 -create-app joytest.c
REM === PV-2000 ===
zcc +pv2000 -o joytest_pv2000 -create-app joytest.c
REM === Samsung SPC-1000
del joytest
del joytest.spc
del joytest_spc1000
del joytest_spc1000.spc
REM we compile it under the name "joytest" (without system suffix) so that the program file inside the cassette file gets this name
zcc +spc1000 -create-app joytest.c -o joytest
ren joytest joytest_spc1000
ren joytest.spc joytest_spc1000.spc
REM === SC3000 ===
REM In the Takeda emulator, attach the created .rom cart file, not the .sc file!
zcc +sc3000 -subtype=rom -create-app -o joytest_sc3000.sc joytest.c
REM === Sharp MZ ===
del joytest
del joytest.mzt
del joytest_sharpmz
del joytest_sharpmz.mzt
REM we compile it under the name "joytest" (without system suffix) so that the program file inside the cassette file gets this name
zcc +mz -clib=ansi -create-app -o joytest joytest.c
ren joytest joytest_sharpmz
ren joytest.mzt joytest_sharpmz.mzt
REM === Sinclair ZX80 ===
zcc +zx80 -create-app -o joytest_ZX80 joytest.c
REM === Sinclair ZX81 ===
zcc +zx81 -create-app -startup=2 -o joytest_ZX81 joytest.c
REM === Sinclair ZX Spectrum ===
zcc +zx -lndos -create-app -o joytest_ZXSpectrum joytest.c
REM === Sord M5 ===
zcc +m5 -create-app -o joytest_sordm5 joytest.c
REM === Super-80 ===
zcc +super80 -create-app -o joytest_super80 joytest.c
REM === SVI ===
del joytest
del joytest.cas
del joytest_svi
del joytest_svi.cas
REM we compile it under the name "joytest" (without system suffix) so that the program file inside the cassette file gets this name
REM The -zorg=49200 option makes the program compatible for 16K machines
zcc +svi -create-app joytest.c -o joytest -zorg=49200
ren joytest joytest_svi
ren joytest.cas joytest_svi.cas
REM === TIKI-100 ===
del joytest.com
del joytest.dsk
del joytest_tiki100.com
del joytest_tiki100.dsk
zcc +cpm -subtype=tiki100 -ltiki100 -create-app -o joytest.COM joytest.c
ren joytest.com joytest_tiki100.com
ren joytest.dsk joytest_tiki100.dsk
REM === VZ200 / Laser 210 ===
zcc +vz -o joytest_vz200.vz joytest.c
REM === Z1013 ===
zcc +z1013 -create-app joytest.c -o joytest_z1013
REM === Z9001 ===
zcc +z9001 -o joytest_z9001 -create-app joytest.c
endlocal
rem pause