Jump to content

mobluse

Members
  • Posts

    86
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by mobluse

  1. Which version of x16emu does Commander X16 Bot (@x16bot) run now?
  2. 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
  3. 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.
  4. 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.
  5. Doesn't work in EN-US United States (with Mac extensions): Alt+; = × Alt+X . (Alt+x followed by space gives .; Alt+x seems to be a dead key.) Alt+, ␣ , Alt+. ␣ . These should work according to https://github.com/commanderx16/x16-docs/blob/master/X16 Reference - 02 - Editor.md The only real problem is how to type × (multiplication sign, $D7). I found this helpful page: https://sites.psu.edu/symbolcodes/mac/codemacext/ In Linux a similar map is English (US) - English (Macintosh): setxkbmap us mac That is not exactly the same U.S. Extended in macOS: https://askubuntu.com/questions/292729/keyboard-layout-identical-to-us-extended-on-macbook-pro
  6. SCREEN -1 and SCREEN $FF work now as they should when I use the current source from GitHub in Raspberry Pi OS Buster. I can not test r41rc1 in Raspberry Pi OS since it is not compiled for ARM and there is no source.
  7. SCREEN -1 doesn't work here in Linux (Raspberry Pi OS Buster) when compiled now from current source. SCREEN $FF works, but changes the colors to default (white on blue) instead of keeping the colors like it does when you use SCREEN 3 or SCREEN 6. I tried to use SCREEN $FF in order to make a version that works both in R38 and R41 and later.
  8. There seems to be a bug in R41 RC in Linux (Raspberry Pi OS Buster) concerning automatic line breaks when you run a simple test program in SCREEN 6 (20x15 text mode). Each third line is blank when it prints 4 digit numbers. You can hold down Ctrl to make it scroll slower. 10 SCREEN 6 60 N=0 70 PRINT N; 80 N=N+1 90 GOTO 70 This was fixed in some earlier experiment: Paste the program after SCREEN 0 or SCREEN 3, because when you paste in SCREEN 6 mode the program is corrupted and only some lines are retained. This seems to be another bug.
  9. I found a way to test my mental calculation training program Aritm for X16, C64, VIC20, ZX81, Apple I, PicoMite and other BASIC computers using Pexpect which is a system for automating logins etc. Pexpects is a Python module, but similar systems exist for other programming languages e.g. Expect for Perl. For X16, C64, and VIC20 I didn't use actual computers or emulators, but a C64 BASIC for console: cbmbasic: https://github.com/mist64/cbmbasic. I only tested one actual computer using USB serial: PicoMite. I tested the ZX81 and Apple I versions using emulators. I converted the X16 BASIC version to cbmbasic using: sed 's/#1,/ /' aritm-x16.bas > aritm-cbm.bas and commented one line that had incompatible commands that only affected colors, screen size, and input prompt. cbmbasic doesn't support removing BASIC prompt using a file handle, but does using a poke, but I tried not to use pokes to make the program less dependent on a particular machine. The test program is currently configured for cbmbasic and Aritm versions for X16, C64, and VIC20 are tested with the same configuration: https://github.com/mobluse/aritmjs/blob/master/expect-aritm.py The test configures Aritm to generate all problems and then answers them, but let you answer the last. In order to speed up testing one can change the delay subroutine in the BASIC program. BASIC dialects are rather incompatible with regards to e.g. precedence rules and floating point precision; so it's important to test. You wouldn't want a program that is supposed to teach you mental calculation to teach you the wrong facts. One could use the official X16 emulator, but that was more difficult to input to since one would have to send key presses to the emulator window, but that is also doable using another Python module, but I have not tested it with x16emu. For future testing it would be good if the real X16 had a serial port, but if it doesn't one could send key presses using the PS/2 port and get output to Expect using e.g. morse or DTMF tones from the sound system or QR codes on the screen.
  10. I guess most people in other countries have a keyboard suited to their language, but programmers often use US keyboard since it has faster access to keys common to programming languages. I think X16 would get critical reviews in the USA if the only US like layouts are US International and Polish Programmers, where Polish Programmers is the best since it only has one dead key: ~. I'm Swedish and used US International in Windows for years since 1994 when I could (i.e. on non laptops and I brought my own keyboard to work), but I think United States (International) with AltGr dead keys is better and it also doesn't irritate native US keyboard users since the dead keys require Alt Gr. In Linux you start this with: setxkbmap us altgr-intl. It's not built in to Windows, but e.g. this exists: https://github.com/thomasfaingnaert/win-us-intl-altgr Now I mostly use UK keyboard in Linux with the layout setxkbmap gb which works rather well also for Swedish and many other languages since it is already international. For US keyboard I prefer EurKEY: https://eurkey.steffen.bruentjen.eu/ That the PETSCII mode has no dead keys is good, but e.g. Forth uses most ASCII characters that are not in PETSCII, and e.g. a light-weight PHP or Python (e.g. Snek) might be ported to X16 and that might need ISO8859-15
  11. It's not a bug, but Linux additions which give more characters from ISO8859-15 on the keyboard (œ, Œ, ï, and Ï) and easier access to some that exist (' and ") without removing any characters since ´ and ¨ doesn't exist in ISO8859-15.
  12. There are some more characters in ISO8859-15 that are on the US International keyboard in Linux "setxkbmap us intl" and "setxkbmap us altgr-intl": œŒ on xX and kK with Alt Gr, ïÏ on jJ. It's a bit strange that œŒ are on two keys. US-International keyboard layout (Linux) also has ®® on vV and ëË on rR. I think one should at least have ®® also on vV since it is unused now, and that would open the opportunity to have ëË on rR later. When using "setxkbmap us intl" in Linux you can type ' using AltGr+' and " using AltGr+Shift+'. I think this is better than ' followed by space and Shift+' followed by space which are the only alternatives in Windows with US-International to type ' and ".
  13. I believe most of those that use US International use the version with AltGr dead keys. The standard US International with dead keys affects the normal use of ` ~ ^ ' ", which is bad for programming e.g. C-like programming languages and Forth. Now X16 has US International with dead keys. If you want to type " now you have to type " and space.
  14. PS/2 keyboards: 0000041D Swedish *3 (I would prefer 0000083B Swedish with Sami to the degree that can be implemented with ISO8859-15 characters.) 00000409 US *2 (I would prefer EurKEY, but US International with AltGr dead keys is OK.) Below keyboards work only in emulators, unless an adapter works: USB keyboards: 00000809 United Kingdom (I would like a layout similar to EurKEY.) 00000406 Danish Bluetooth keyboard: Nordic layout i.e. these on top of each other, but with different colors where there is conflict: 00000414 Norwegian (I think the Norwegian layout is best among the Nordic since it has | and \ easily accessible.) 00000406 Danish 0000041D Swedish 0000040B Finnish (Same as Swedish.) I have another bluetooth keyboard: 00000409 US, but with Å Ä Ö also printed on [ ' ; and that is supported in Linux ("Swedish - Swedish (US, with Swedish letters)"). I have laptops with Nordic layout; also for emulator use.
  15. I've used tapDancer on an Android 4 phone with a C64 Datasette and a Cassette Adapter for MP3 Player with 3.5 mm stereo jack and that worked well to load C64 programs stored as prg-files into a real C64. https://paleotronic.com/software/tapdancer/ "Currently, tapDancer supports Commodore (TAP / T64 / PRG formats), Sinclair ZX Spectrum (TZX / TAP), Amstrad CPC (CDT), Acorn Electron / BBC (UEF), MSX (CAS) and Atari (CAS)."
  16. SCREEN has a new, undocumented side effect in R39: it also changes background color to blue and foreground color to white. This didn't happen before in e.g. R38. R39 behavior breaks compatibility with many of my R38 programs, but I can fix that. I still think it would be better if the colors were preserved as before, because then you can test different screen modes without having to change the colors. SCREEN 6 (20x15) works for me in my game Aritm (see Downloads) in R39 to make a more children friendly font, but "Try it now" is still R38. I could make a version that works in both R38 an R39, by using SCREEN $FF (toggle), but if you RUN it several times it toggles instead of always setting it to 40x30 as it should. When "Try it now" becomes R39 I will probably change it again to SCREEN 3 or SCREEN 6.
  17. SCREEN has a new, undocumented side effect in R39: it also changes background color to blue and foreground color to white. This didn't happen before in e.g. R38. R39 behavior breaks compatibility with many of my R38 programs, but I can fix that. I still think it would be better if the colors were preserved as before, because then you can test different screen modes without having to change the colors. SCREEN 6 (20x15) works for me in my game Aritm (see Downloads) in R39 to make a more children friendly font, but "Try it now" is still R38. I could make a version that works in both R38 an R39, by using SCREEN $FF (toggle), but if you RUN it several times it toggles instead of always setting it to 40x30 as it should. When "Try it now" becomes R39 I will probably change it again to SCREEN 3 or SCREEN 6.
  18. Demonstrating the Apple One clone with color from: https://github.com/alangarf/apple-one Runs on FPGA: iCE40HX8K-EVB with iCE40-IO for VGA screen and PS/2 keyboard. Tests all fonts, background (paper) colors and foreground (ink) colors. Tests the clear screen button. The color code in this Apple 1 clone is the same as in GWBASIC/QBASIC/MMBASIC (RGB), but different from Apple II BASIC (GBR), ZX Spectrum BASIC (GRB) and VT100/ANSI/xterm (BGR). There are 6 possible color codes and all mentioned are different. The Apple II colors are more complicated than just GBR. Why could the computer industry not standardize color codes for 3-bit graphics? I think the ANSI color code is the most sensible, because the colors are in spectral order corresponding to the energy of photons, and the same goes for the electronic color code. Note: The original Apple I didn't have color or different fonts.
  19. There is a new MMBasic for Pico version out now: PicoMite firmware V5.07.03: https://geoffg.net/picomite.html It also includes PicoMiteVGA. There is also MMBasic for Linux: MMB4L: https://github.com/thwill1000/MMB4L Aritm (a mental calculation trainer) now works both in PicoMite (on Maker Pi Pico) and MMB4L: https://github.com/mobluse/aritmjs/blob/master/aritm-mm.bas
  20. Aritm (a mental calculation trainer) can now be run on computers that have BASICODE 3C, and the online version for browsers with JavaScript is here: https://bc3c.orbin.se. The online version also works in browsers for iPhone and Android using at least Chrome because BASICODE online has a screen keyboard that is started by clicking "Keyboard". It also works in GW-BASIC with its BASICODE library. I have not tested BASICODE libraries for other computers. BASICODE leverages the differences between different BASIC dialects. In some cases the differences were so big that a rewrite of the program was necessary and then they used a program called BASICODER that wrote the machine specific program from the source. The BASICODE programs were broadcast over radio or sold on cassettes and had a specific sound format. Most BASICODE programs I found are in Dutch, but some of them are multilingual and you choose language on startup. (BTW I discovered I could read Dutch because I know English, German, Danish, and Swedish.) Here is more information about BASICODE: https://github.com/robhagemans/basicode https://en.wikipedia.org/wiki/BASICODE https://parceladigital.com/2018/06/03/basicode-lenguaje-basic https://marnanel.org/stuff/basicode/manual.pdf I think we should have a BASICODE subroutine library for Commander X16 so we could run all BASICODE programs in existence. I'm certain there is one for C64, but one could also port the GW-BASIC version: https://github.com/robhagemans/basicode/blob/master/tools/BASCODER.BAS. When I developed Aritm for BASICODE I used PCBASIC: https://github.com/robhagemans/pcbasic, because that can run in a mode that uses stdio and that makes it easy to test automatically. I have developed a test-program in Python that tests Aritm for those retro-computer emulators that can use stdio: https://github.com/mobluse/aritmjs/blob/master/expect-aritm.py. I will probably develop this test-program further so that it can send in keypresses to those emulators that cannot use stdin, but I still need stdout to be supported, but luckily that works on x16emu. (Aritm also exists for X16 here among Downloads, but it has not been equally well tested as the versions for GW-BASIC, BASICODE, MMBasic, and ZX81 BASIC.) Also, one can test against the real computers if they have serial ports. The possibility of testing is why I hope X16 will have a serial port in the standard edition, but if it doesn't one could test using a simulated keyboard in and e.g. morse code out. All information about a problem in Aritm is packed into a float since that makes it easy to store the problems in an array and shuffle them. I started the development by improving the GW-BASIC version by changing from double floats to single since BASICODE officially only supports 6 digits of precision, but I found that 7 digits work for GW-BASIC and the online version of BASICODE. I also had to change from functions of two variables to single variable functions, and that I brought in from the Applesoft version. I also had to decrease the number of errors that are counted for each problem from 99 to 9 in order to fit into 7-digits. I will probably make a 6-digit version of Aritm since the Swedish computer Luxor ABC80 only has 6-digit floats. In order to reduce it to 6 digits I have to lose a potential feature of having 2 digit numbers for the second number, but I don't use that currently.
  21. Great that the try it now button works! I believe it is possible to inlude example files that work with the try it now button. You use Ctrl+S for replace, but in ordinary Nano that is save without prompt, and that is one of my favourite commands since it is the same in many editors, e.g. Notepad. In Nano replace is a subcommand to Ctrl+W (search): Ctrl+R.
  22. I made a version of my program Aritm (mental calculation training program), that also exists here among Downloads/Games for X16, for Applesoft BASIC online. See "Select a sample..." and among Games, two rows down from Tetris: https://mobluse.github.io/jsbasic/ and also here http://jsbasic.orbin.se. JSBASIC is not a CPU emulator like X16 for the web, but only an Applesoft BASIC for Apple II simulator, but it has support for some pokes, peeks, and calls. It works on iPhone because the built-in keyboard is activated when the screen is tapped and the simulated Apple II expects input. Unfortunately the built-in keyboard doesn't work on Android (at least not in Chrome on mine). I also made a pull request to the original repository, so hopefully Aritm will be included on the official site https://calormen.com/jsbasic/, but cloning the site is legal, according to the license, and works well for now. I also bought the Applesoft manual as a spiral bound book and am reading it, but it also exists as a pdf: http://cini.classiccmp.org/pdf/Apple/AppleSoft II Basic Programming Manual.PDF. Applesoft does not have the same precedence rules as other Microsoft BASICs, such as CBM BASIC v2 and GW-BASIC, and I think e.g. BASIC2 has better precedence rules that are more like Python, which is similar to mathematics. I also own an Apple II Europlus with Applesoft BASIC, a Commodere 64C with BASIC V2 (built-in), Simons' BASIC, and COMAL80 on cartridges, and an Amstrad PC1512 that can run GWBASIC. I have tested Aritm on my actual C64 using a cassette adapter, but not on the other two even though it's possible to transfer the programs from modern computers using the cassette port in the Apple II case and (USB) serial cable in the PC case (laplink).
  23. I wrote a program that demonstrates some differences between different BASIC dialects. There are four tests. First line of each test has no parenthesis, and then there are two lines with parenthesis, and they have initials of the BASIC code that works the same as the first line. 5 PRINT "AS=APPLESOFT, MM=MMBASIC, GW=GW-BASIC/BASIC V2" 10 PRINT 10,1 OR 1 AND 0 20 PRINT 20,1 OR (1 AND 0),"AS,GW" 30 PRINT 30,(1 OR 1) AND 0,"MM" 40 PRINT 40,1 = 2 <> 0 50 PRINT 50,1 = (2 <> 0),"MM" 60 PRINT 60,(1 = 2) <> 0,"AS,GW" 70 PRINT 70,-1^2 80 PRINT 80,-(1^2),"GW" 90 PRINT 90,(-1)^2,"AS,MM" 100 PRINT 100,NOT 3<7 110 PRINT 110,NOT (3<7),"GW" 120 PRINT 120,(NOT 3)<7,"AS,MM" As you can see MMBasic is rather like AppleSoft BASIC, except for OR and AND, and = and <>. YABasic works as GW-BASIC/BASIC V2 (except False is -1 for GW-BASIC/BASICV2), and Python works as YABasic after translation: print("AS=AppleSoft, MM=MMBasic, GW=GW-BASIC") print(10,1 or 1 and 0) print(20,1 or (1 and 0),"AS,GW") print(30,(1 or 1) and 0,"MM") print(40,1 == 2 != 0) print(50,1 == (2 != 0),"MM") print(60,(1 == 2) != 0,"AS,GW") print(70,-1**2) print(80,-(1**2),"GW") print(90,(-1)**2,"AS,MM") print(100,not 3<7) print(110,not (3<7),"GW") print(120,(not 3)<7,"AS,MM")
  24. There is a similar tool that runs in e.g. Linux: autonum.sh in https://github.com/mobluse/ratbas2 And this too but in Perl for Unix and probably Linux: There are also similar tools that runs in X16:
  25. SD card works also in Maker Pi Pico by Cytron by entering: OPTION SDCARD GP15, GP10, GP11, GP12 I have not tested VGA screen and PS/2 keyboard yet, but a beta build supports them. Aritm for MMBasic on PicoMite has been improved to support sound and RGB LED: https://github.com/mobluse/aritmjs/blob/master/aritm-mm.bas. I use: PicoMiteVGA MMBasic Version 5.07.03b3 Copyright 2011-2021 Geoff Graham Copyright 2016-2021 Peter Mather > option list OPTION MONO VGA ON OPTION COLOURCODE ON OPTION SDCARD GP15, GP10, GP11, GP12 OPTION Audio GP18,GP19, on PWM channel 1
×
×
  • Create New...

Important Information

Please review our Terms of Use