Jump to content

mobluse

Members
  • Posts

    107
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by mobluse

  1. But my keyword quiz game above finds variable like MX, MY, and MB (which start to work after MOUSE 1) on the token table, but it doesn't find ST, TI, and TI$. You cannot assign to MX, MY, MB, and ST, but you can assign to TI and TI$, but not out of range number to TI (e.g. 1E8) or non-time strings to TI$.
  2. I think this site should upgrade the web emulator to R41 now (since R39 had some bugs), but perhaps have R38 too for old programs that haven't been converted yet or doesn't work in both releases. One should be able to choose if a program should use R38 or R41, but all existing programs should have R38 in order not to break code.
  3. Maybe ComAL is not available for licensing or the source code is not documented. Also ComAL-80 for C64 is a rather large language that came on a bank switching 64 KiB cartridge: https://www.c64-wiki.com/wiki/Commodore-64_Comal_80_rev_2.01
  4. I installed R41 in Raspberry Pi OS (Legacy) with desktop on Raspberry Pi 4 B 8GB from https://snapcraft.io/x16emu and command lines: sudo snap install x16emu --edge sudo snap connect x16emu:alsa After some fix one should not have to use --edge and connect, but for now it is necessary, see https://github.com/popey/x16emu-snap/issues/6
  5. I figured out how to derive the abbreviations from the order of the keywords, see this program and game: Now I'm interested to know how I find built in variables in ROM or RAM: e.g. TI, TI$, and ST; these also exist in C64. There are things in X16 BASIC v2 that now are keywords, e.g. MX and MY, but AFAIK could have been built in variables like ST. Why are variable like things sometimes keywords and sometimes built in variables?
  6. X16&C64 Keywords & Abbreviations Quiz View File This game quizzes the player about the abbreviations for the Commander X16 BASIC v2 keywords. If you know these abbreviations you can code BASIC for X16 and C64 faster and write more code per line. First the program figures out the keywords and abbreviations for the exact release of the ROM. Then you are offered the quiz. The quiz is timed and the errors are counted. If you give the wrong answer you get that question again directly. C64 mode: You can stop the program by pressing the Esc key before the quiz, then type SCREEN 255:RUN 64 and press Enter to only be quizzed for C64 keywords. The game X16&C64 Keywords&Abbreviations is tested with R38 (Try it now) and R41, but may work with later releases. The program is FOSS (license GPLv3) and the source is included in the zip-file, but is also on GitHub: https://github.com/mobluse/chargen-maker Command line: x16emu -bas KEYWORDSABBR.BAS -run -echo By using -echo you can copy the generated program and load it in x16emu and check that the abbreviations really expand correctly. Submitter mobluse Submitted 06/07/22 Category Games  
  7. Version 1.1.0

    5 downloads

    This game quizzes the player about the abbreviations for the Commander X16 BASIC v2 keywords including VIC20 and C64. If you know these abbreviations you can code BASIC for X16 and VIC20/C64 faster and write more code per line. First the program figures out the keywords and abbreviations for the exact release of the ROM. Then you are offered the quiz. The quiz is timed and the errors are counted. If you give the wrong answer you get that question again directly. C64 mode: You can stop the program by pressing the Esc key before the quiz, then type SCREEN 255:RUN 64 and press Enter to only be quizzed for C64 keywords. (VIC20 keywords are identical to C64.) The game X16&C64 Keywords&Abbreviations is tested with R38 (Try it now) and R41, but may work with later releases. The program is FOSS (license GPLv3) and the source is included in the zip-file, but is also on GitHub: https://github.com/mobluse/chargen-maker Command line: x16emu -bas KEYWORDSABBR.BAS -run -echo By using -echo you can copy the generated program and load it in x16emu and check that the abbreviations really expand correctly.
  8. Intel 8088 is also an 8-bit CPU since it has an 8-bit data bus. NEC V20 is an enhanced 8088. NEC V30 is an enhanced Intel 8086, but 8086 is a 16-bit CPU. V20 is programmed the same way as V30. V30 is Intel 80186 compatible and has extra instructions and an 8080 mode. I would be rather easy to find V20 developers since they are the same as other x86 developers. V20 and V30 are drop in replacements for 8088 and 8086, respectively.
  9. There are new versions of MMBasic for Pico and Linux out now, see links above.
  10. If you use this editor for editing in X16 you might be using nano normally to edit BASIC. In that case there is nano syntax coloring etc. in this project: https://github.com/thwill1000/mmb4l/releases (I would use the latest.) There are install instructions if you unpack the tgz file, but beware not to overwrite your own settings.
  11. Version 1.0.2

    11 downloads

    DECPS is an escape sequence to Play Sound (PS) on VT520 and VT525 terminals by Digital Equipment Corporation (DEC). A coming version of Windows Terminal will support this since a pull request was accepted. The corresponding issue had some examples and I converted them automatically to BASIC DATA statements for Commander X16 with my Basicode-3 and -3C sound subroutine. The subroutine has extra features since it can also play polyphonic music by using other entry line numbers. This program can also play a chord for each note. I put all the examples in a file and converted to BASIC v2 DATA statements using this command line in Linux, and then I shortened the lines to less than 80 characters manually: sed 's/printf "\\e\[/REM DATA /;s/;/,/g;s/~\\e\[/1E4,/g;s/~"/2E4/' decps.sh There is a simple 1 to 1 relationship between a string for e.g. VT520 and the DATA statements in this program DECPS.BAS. The open source bas-file is also included in the zip-file and it's FOSS with license GPLv3.
  12. DECPS Player - simulates Play Sound of VT520 & VT525 View File DECPS is an escape sequence to Play Sound (PS) on VT520 and VT525 terminals by Digital Equipment Corporation (DEC). A coming version of Windows Terminal will support this since a pull request was accepted. The corresponding issue had some examples and I converted them automatically to BASIC DATA statements for Commander X16 with my Basicode-3 and -3C sound subroutine. The subroutine has extra features since it can also play polyphonic music by using other entry line numbers. This program can also play a chord for each note. I put all the examples in a file and converted to BASIC v2 DATA statements using this command line in Linux, and then I shortened the lines to less than 80 characters manually: sed 's/printf "\\e\[/REM DATA /;s/;/,/g;s/~\\e\[/1E4,/g;s/~"/2E4/' decps.sh There is a simple 1 to 1 relationship between a string for e.g. VT520 and the DATA statements in this program DECPS.BAS. The open source bas-file is also included in the zip-file and it's FOSS with license GPLv3. Submitter mobluse Submitted 06/04/22 Category Audio Apps  
  13. Version 1.0.1

    16 downloads

    Huge Character Demo prints all the characters in the ROM hugely: PETSCII and ISO8859-15 including ASCII. The faster version uses some new X16 BASIC v2 keywords: BIN$ and LOCATE, but the slower R38 version uses BASIC code or SYS PLOT to do the same. Both programs use the SYS FETCH Kernal function to read character data from ROM bank 6. It's the slower R38 version that runs using the Try it now button. The zip-file contains a version for R38+ and faster versions for R39+ and the open source code as text. This is FOSS with GPLv3 license. One could e.g. develop this into a program to print banners. This is also on GitHub: https://github.com/mobluse/chargen-maker I'm open to suggestions on how to improve the code and make it faster.
  14. Huge Character Demo View File Huge Character Demo prints all the characters in the ROM hugely: PETSCII and ISO8859-15 including ASCII. The faster version uses some new X16 BASIC v2 keywords: BIN$ and LOCATE, but the slower R38 version uses BASIC code or SYS PLOT to do the same. Both programs use the SYS FETCH Kernal function to read character data from ROM bank 6. It's the slower R38 version that runs using the Try it now button. The zip-file contains a version for R38+ and faster versions for R39+ and the open source code as text. This is FOSS with GPLv3 license. One could e.g. develop this into a program to print banners. This is also on GitHub: https://github.com/mobluse/chargen-maker I'm open to suggestions on how to improve the code and make it faster. Submitter mobluse Submitted 06/01/22 Category Demos  
  15. Yes, I saw the video when it came out, but now I've watched it again: BTW The gosuB bug is also in X16 R41. I have some old pocket computers that also have the possibility to abbreviate commands, but those abbreviations are more normal, ending with a dot.
  16. I discovered that the abbreviations can be deduced from the order of the keywords generated by the program. An earlier keyword can have a shorter abbreviation. If a full word is needed it cannot end in a letter of the opposite case. Use R41: x16emu -bas keywords.bas -run -echo Copy console output to a bas-file. x16emu -bas abbr.bas -echo LIST They should be the same program that cannot run, but demonstrates abbreviations that work. It would be possible to write a BASIC program that can list the abbreviation for each keyword. keywords.bas abbr.bas
  17. Now I succeeded to write a program, similar to the original, that lists the keywords in Commander X16 BASIC v2: 10 GOTO 1010 100 POKE $7E,L:POKE $7F,H 110 POKE 780,$7E:POKE 781,B:POKE 782,0:SYS $FF74:REM FETCH 120 G=PEEK(780) 130 RETURN 1010 B=4 1020 BASE=$C0DE 1030 FOR P=BASE TO BASE+388 1035 H=INT(P/256):L=P-256*H 1040 GOSUB 100 1050 PRINT CHR$(G AND 127); 1060 IF G>127 THEN PRINT , 1070 NEXT Now I would like to print the keyword abbreviations, also from ROM. Anyone who knows how to do this?
  18. I've made some progress, and found a block with BASIC keywords in bank 4. 10 GOTO 1000 100 POKE $7E,L:POKE $7F,H 110 POKE 780,$7E:POKE 781,B:POKE 782,0:SYS $FF74 120 G=PEEK(780) 130 RETURN 1000 A$="" 1010 FOR B=0 TO 7 1020 FOR H=$C0 TO $FF 1030 FOR L=0 TO $FF 1040 GOSUB 100 1045 C=G AND 127 1050 IF NOT(ASC("A")<=C AND C<=ASC("Z")) THEN GOTO 1058 1052 A$=A$+CHR$(C) 1054 GOTO 1060 1058 A$="" 1060 IF NOT(G>127) THEN GOTO 1070 1064 A=LEN(A$) 1066 IF A>=3 THEN PRINT A$ 1068 A$="" 1070 NEXT 1080 NEXT 1085 PRINT CHR$(7); 1090 NEXT
  19. I would like to write a program in BASIC or Forth that runs on X16 and that lists the keywords in Commander X16 BASIC v2 by reading them from ROM. I found this old question of mine: https://web.archive.org/web/20200530202849/http://temp.murray2.com/threads/list-basic-keywords-program-in-wiki-doesnt-work.425/ I was wondering if any progress have been made. The problem was that you could not read from another ROM bank than Kernal from BASIC.
  20. I cannot load and list the program MORSE6.PRG. I've tried ../x16-emulator/x16emu -prg MORSE6.PRG x16emu -prg MORSE6.PRG ../x16-emulator/x16emu or x16emu and then type in: LOAD "MORSE6.PRG" I have a latest locally compiled x16emu from GitHub and the latest x16emu from snap https://snapcraft.io/x16emu. I wrote a test program for a subroutine for BASICODE-3 and -3C that uses PSG: Start with e.g.: x16emu -bas psgtest.bas -echo psgtest.bas
  21. POP also exists in AtariBASIC: "If a GOSUB does not have a RETURN, for instance, the stack will still hold the return address. This can be cleared with a POP so as not to cause confusion later. It must be used in the execution path of the program, and must follow a GOSUB not using a RETURN. It is normally the sign of a badly designed program, but is useful in debugging." https://www.page6.org/archive/issue_16/page_43.htm You cannot change the machine stack pointer from BASIC so you need a machine code routine. If it is possible to read the stack pointer from BASIC you could GOSUB 99, swap the two top elements using PEEK and POKE, update the top element to the next next line in BASIC using PEEK and POKE and RETURN twice. That would have the same effect as POP or SYS699 in the program below. Maybe some other solution without machine code is possible. A person in a Swedish C64 forum (commodore64.se that's offline), bjonte, solved the problem using machine code for C64 and VIC20: bjonte used https://archive.org/details/Compute_s_Mapping_the_Commodore_64 and https://archive.org/details/COMPUTEs_Mapping_the_VIC_1984_COMPUTE_Publications as references. POP comes from Apple Integer BASIC by Steve "Woz" Wozniak, and then the later floating point Applesoft BASIC was made backwards compatible with that. Anyway, now it is possible to port some Applesoft or Atari BASIC programs with POP to C64 or VIC20. How is POP useful in debugging?
  22. Which version of x16emu does Commander X16 Bot (@x16bot) run now?
  23. I received BASICODE 2 for C64 and X16 and when I added these routines to BASICODE2 I could run aritm-bc3c.bas in x16emu: 450 OT=TI:SD=60*SD/10 451 GOSUB 200:IF IN$="" AND TI-OT<SD THEN GOTO 451 452 SD=0:RETURN 950 CC(0)=7:CC(1)=0:GOSUB 100:END
  24. Also SHY i.e. CHR$($AD) is not reachable. I didn't read all of this article, but one could type SHY (Syllable HYphen) at the end of a line to indicate that this hyphen can be removed, i.e. a sort of line-continuation character for words: https://jkorpela.fi/shy.html NBSP i.e. CHR$($A0) is reachable.
  25. There are still some characters that cannot be typed in ISO mode AFAIK: ¬¹²³. BTW this Mac keyboard layout is called U.S. Extended or ABC Extended; not just U.S. or ABC because that is a slightly different layout with some AltGr dead keys on other positions.
×
×
  • Create New...

Important Information

Please review our Terms of Use