diff --git a/include/x16/joystk.a02 b/include/x16/joystk.a02 index 32822fa..3babf20 100644 --- a/include/x16/joystk.a02 +++ b/include/x16/joystk.a02 @@ -1,11 +1,11 @@ ;Joystick Constants and Functions -;Non-Functional Skeleton for Systems with No Joystick Support +;for Commander X16 Computer JYSTKS EQU 2 ;Number of Joysticks -JYDATA EQU $02BC ;Joystick 0 Data +.JYDATA EQU $02BC ;Joystick 0 Data -GETJOY EQU $FF06 ;Kernal GETJOY Routine +.GETJOY EQU $FF06 ;Kernal GETJOY Routine ;Joystick Bit Masks JOYUP EQU $08 ;Up @@ -29,5 +29,5 @@ JOYSTK: CMP #JYSTKS ;If Invalid Joystick Number ;EOR #$FF ;Invert Bits AND #$CF ;and Mask off Select/Start RTS -JOYSTE: LDA #255 ;Return Error Code +JOYSTE: LDA #255 ;Return Error Code RTS diff --git a/test/x16.bat b/test/x16.bat new file mode 100644 index 0000000..bec90d6 --- /dev/null +++ b/test/x16.bat @@ -0,0 +1,19 @@ +@REM Compile and Run C02 Program for Commander X16 Emulator +@ECHO OFF +IF EXIST %1.c02 GOTO COMPILE + ECHO File %1.c02 not found + GOTO EOF + +:COMPILE +ECHO Compiling File %1.c02 for Commander X16 +..\c02.exe -c 65C02 -h x16 -s x16 -s cbm %1 >%1.dbg +IF %ERRORLEVEL% NEQ 0 GOTO EOF +ECHO Assembling File %1.asm +..\a02.exe -p %1.asm %1.prg %1.lst >%1.out +REM C:\Programs\dasm %1.asm -f1 -o%1.prg -l%1.lst -s%1.sym + +IF %ERRORLEVEL% NEQ 0 GOTO EOF + +ECHO Starting Emulator in Debug Mode +C:\Programs\x16emu\x16emu -prg %1.prg -run -debug -echo raw >%1.out +:EOF