Jump to content

mobluse

Members
  • Content Count

    45
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by mobluse

  1. The title in Featured Downloads is overlapped by the name of the developer. This is so in all browsers I tested this in: Chromium, Vivaldi, and Firefox in Raspberry Pi OS. If I press Ctrl+- twice I get zoom 80% and then it doesn't overlap, but that makes the text too tiny. I have 1280x1024 pixels screen.
  2. This bug is also discussed here:
  3. Putting in the better GC of C128 would not help since the bug is also in C128: "I found this bug in all versions of Commodore BASIC, that I investigated, VIC-20, C64, C128, C65, MEGA65." https://c65gs.blogspot.com/2021/03/guest-post-from-bitshifter-fixing.html
  4. Probably Luxor ABC80 from 1978: https://en.wikipedia.org/wiki/ABC_80 Then there was ABC800 from 1981: https://en.wikipedia.org/wiki/ABC_800 And ABC1600 from 1985: https://en.wikipedia.org/wiki/ABC_1600
  5. It would be interesting if someone could make a BASIC v2 program that demonstrates the bug in the garbage collector.
  6. I developed RatBAS2 in order to generate large BASIC v.2 programs from C-like source code: https://github.com/mobluse/ratbas2 RatBAS2 is similar to RatFOR (Rational Fortran). I discovered that RatFOR could be used to generate BASIC since it is similar to Fortran 66 and modern RatFOR has a disabled Fortran 66 mode that I could enable. RatBAS uses only IF...GOTO, but BASIC does have FOR...NEXT loops, ON...GOTO, GOSUB, and ON...GOSUB also. Unfortunately the program that turns a program in BASIC with labels into BASIC with line numbers doesn't handle the ON... constructs. FOR... NEXT is probably faster than using IF...GOTO.
  7. I think VAL() should work for hexadecimal numbers and not only for decimal as it does now. PRINT VAL("$FFFFFFF") should print: 268435455. I believe it would not be too difficult to implement since the code already exists for converting numbers in code. PRINT $FFFFFFF works now, and types: 268435455. Especially now when HEX$() exists in the next prerelease (-39). HEX$() converts without $ as prefix, but I think that's OK since $ could be added easily if one wants. It's also similar to how it works in other BASICs, e.g. GW-BASIC: http://www.antonis.de/qbebooks/gwbasman/hexs.html In GW-BASIC HEX$() also works for negative numbers, e.g. HEX$(-32768) is "8000", but negative numbers doesn't currently work with X16 BASIC HEX$(). I don't think it's necessary to implement VAL() for binary numbers, even though BIN$() exists, but if one did they should probably have % as prefix, e.g. %101. FreePascal uses the same prefixes: https://www.freepascal.org/docs-html/ref/refse6.html
  8. Is it legal to bundle the official rom.bin r39 from the Windows release (when it comes) in the snapcraft version of x16emu? because then the tests of release would work on more platforms that are not officially supported: e.g. for Linux with armhf and i386. https://snapcraft.io/x16emu
  9. "The KERNAL version can be read from location $FF80 in ROM. A value of $FF indicates a custom build. All other values encode the build number. Positive numbers are release versions ($02 = release version 2), two's complement negative numbers are prerelease versions ($FE = $100 - 2 = prerelease version 2)." - https://github.com/commanderx16/x16-docs/blob/master/Commander X16 Programmer's Reference Guide.md
  10. I believe it's only necessary with rom.bin, but you also included basic.bin, dos.bin, and geos.bin. When packaging for Linux according to the Makefile it only includes rom.bin. BTW I succeeded in building it for Raspberry Pi OS Buster on Raspberry Pi 4B and it works with all programs I tested with so far. x16emu_linux-armhf-2021-03-29.zip
  11. There is a flow control command in Applesoft BASIC that might be good to have in X16 BASIC: POP Removes one address from the return stack, i.e. converts last GOSUB into a GOTO. POP could be useful in more advanced BASIC programs. Maybe this could be solved using POKE, but it would be easier with a BASIC command, and then more old Applesoft BASIC programs could run on Commander X16. I did find two programs that uses POP: https://github.com/inexorabletash/jsbasic/blob/master/samples/sample.nuclear.txt https://github.com/inexorabletash/jsbasic/blob/master/samples/sample.pacman.txt https://www.calormen.com/jsbasic/reference.html https://www.landsnail.com/a2ref.htm
  12. In VIC20, C64, and X16 BASIC the AND, OR, and NOT operators are bitwise, but in Applesoft they are logical/boolean. 3=3 is -1 in X16 etc., but 1 in Applesoft. STR$(7) has an extra space for sign in X16 etc., but not in Applesoft. Applesoft is described here: https://www.calormen.com/jsbasic/reference.html X16 BASIC is the same as C64 BASIC (CBM BASIC v.2), but with enhancements: https://github.com/commanderx16/x16-docs/blob/master/Commander X16 Programmer's Reference Guide.md
  13. I could load the C128 program X16C128W70.PRG (above) in x16emu from the host file system using LOAD"X16C128W70.PRG" and LOAD"X16C128W70.PRG",8 but not using LOAD"X16C128W70.PRG",8,1. I've not tried to LOAD from SD card. Also I do not get the text "SEARCHING... LOADING FROM $..." but only "READY." Maybe you have a different release than 38 or this is how it looks when you load from an SD card. Anyway, I think loading should work in Commander X16 as in Commodore computers, because that is what most people expect and know how to handle.
  14. What do you mean would happen with the three line program where one line is skipped by linking in the cases ,8 and ,8,1 and x16emu -prg? I have two programs 3LINES.PRG and 3LINES2.PRG. The last is the hacked version where line 1 links to line 3. x16emu -prg 3LINES2.PRG and LIST gives two lines, but LOAD with ,8 and ,8,1 gives three lines in both x16emu and x64 from VICE. It seems that the program is repaired with both ,8 and ,8,1. 3LINES.PRG 3LINES2.PRG
  15. There are pointers to the next line in the BASIC lines, but the computer doesn't know what it is loading and updates the pointers anyway, but one can probably fix that by having the machine code after the last line of the program. I think I can solve the original problem anyway by using SYS to set screen with to 40 characters in X16 and C128: POKE 780,0:SYS 65375 screen_set_mode/$FF5F https://github.com/commanderx16/x16-docs/blob/master/Commander X16 Programmer's Reference Guide.md#function-name-screen_set_mode I could use screen/$FFED to get the rows and columns, but that doesn't seem to work on C128 - tested in x128 and x128 -80col: SYS 65517:R=PEEK(782):C=PEEK(781) BTW screen_set_mode in C128 is slightly different than in X16 since in C128 it switches between two different physical screens with different screen dimensions AFAIK. In the x128 emulator you have to switch screen manually in the configuration menu.
  16. Edit: THIS IS WRONG, BECAUSE WHEN I TEST IT NOW IT DOESN'T WORK. But it works in xpet and x64 if I change the two start bytes in the C128 file (X16C128W70.PRG) to the correct address for the computers, respectively, and load as machine code with e.g.: x64 -autoload X16C128W7064.PRG That uses: load "X16C128W7064.PRG",8,1 It also works if I load using: LOAD "X16C128W7064.PRG",8,1 in x16emu. That would mean that if you load with ',1' it also changes the pointers, but that would make it difficult to load machine code in C64, since LOAD would change the two bytes after a 0, but I've never heard that is a problem. Does the LOAD"*",8,1 detect if it is a BASIC or machine code program, and try not to modify pointers if it is machine code? Also if people write machine code assuming -prg doesn't change the code, then they might not be able to run the program from within x16emu or the real computer.
  17. It seems the load address of BASIC programs in X16 is the same as in C64 i.e. $0801, because I saved a program from x16emu and used hexdump in Linux. I can LOAD "X16C128W70.PRG" inside x16emu, but when I use x16emu -prg X16C128W70.PRG,0801 it only loads the first line. Strange! xvic, x64, xplus4 in VICE doesn't have this problem. It is possible to load the C128 program in xpet if I hack the start address to $0401 using hexcurse in Linux: xpet -autoload X16C128W70PET.PRG There is a new video about loading in Commodore type computers: LOAD"*",8 vs. LOAD"*",8,1 on the Commodore 64 from 8-Bit Show And Tell.
  18. This difference on $FFF6=65526 could be used, but I stick to 65534 so far. Initially I was thinking about type-in programs or programs imported from text, but this could work for tokenized programs if SCREEN and GRAPHIC had the same token. 10 IF NOT PEEK(65534)=35 THEN GOTO 30 20 SCREEN 0 30 IF NOT PEEK(65534)=23 THEN GOTO 50 40 GRAPHIC 0 50 REM REST OF PROGRAM... A worse matter is that I have not succeeded to load a tokenized C128 program into x16emu even if it only contains PRINT instead of SCREEN/GRAPHIC. If I do, it's only an empty program. Tokenized BASIC programs should be portable between Commodore type computers such as Commander X16, I think, provided they use the same tokens. I can load a tokenized C64 program into x16emu. I include programs generated by petcat in Linux that is included with VICE 3.4 (in my case). p=x16c128 ; cat $p.bas | awk '{print tolower($0)}' | petcat -w2 -o $p.prg cp x16c128.prg X16C128W2.PRG p=x16c128 ; cat $p.bas | awk '{print tolower($0)}' | petcat -w70 -o $p.prg cp x16c128.prg X16C128W70.PRG Both programs can be loaded and run in xvic, x64, x128, and x128 -80col (from VICE), but only X16C128W2.PRG loads in x16emu. x16emu -prg X16C128W2.PRG x128 -80col -basicload -autoload X16C128W2.PRG In the case with C128 and 80 columns one has to enter VICE configuration and switch screen. X16C128W2.PRG X16C128W70.PRG x16c128.bas
  19. In Linux (e.g. Raspberry Pi OS) it's possible to turn on and off keyboard LEDs as you wish using commands both in X and in the non X Linux console, but you may have to do some configuration first. https://www.raspberrypi.org/forums/viewtopic.php?f=41&t=251417&p=1534467
  20. How can I detect that it is Commander X16 BASIC that my BASIC program runs in and not a Commodore BASIC? Preferably an official way that doesn't change with ROM releases. If there are more models of Commander with different capabilities they should also be possible to detect. In Commodore BASIC this is done using PEEK(65534) which gives 72 for C64, 23 for C128, 253/255 for C+4 and C16, and 114 for VIC20. In X16 this was 35 when I tested, but I don't know if that can change. I try to write BASIC programs that work on X16, C64, C128, and VIC20 (and perhaps GW-BASIC on IBM PC, MMBasic on Maximite, Applesoft BASIC on Apple II etc.). I want to set character width to between 20 and 40 (SCREEN 0) and similar colors, but have to do it in different ways depending on computer, but to have one version for each computer is a maintenance problem. The type of calculation program I'm writing doesn't demand much of the hardware. 10 IF NOT MODEL$="X16" THEN GOTO 30 20 SCREEN 0 30 IF NOT MODEL$="C128" THEN GOTO 50 40 GRAPHIC 0 50 REM REST OF PROGRAM...
  21. GeckOS was last developed in 2013 so it might be difficult to get help porting it to X16, but Fuzix is currently developed and the developers are willing to help with ports. I suppose that the only 6502 system that Fuzix runs on yet is a 6502 emulator: https://github.com/EtchedPixels/Virtual65
  22. Fuzix is not a GUI OS. A GUI OS might be too slow.
  23. AcheronVM seems more to be a VM than a complete OS. There would also need to be a C compiler for the VM for it to be useful.
  24. Fuzix (a Unix like OS for 8 bit computers) has lately become popular due to that Fuzix now supports the Raspberry Pi Pico $4 microcontroller. I searched for Fuzix implementations for Commodore 64, but there is none, but Commodore is mentioned here: https://github.com/EtchedPixels/FUZIX/issues?q=is%3Aissue+commodore Fuzix exists for some 6502 based system, but the Fuzix developers thought the floppy disk drives for Commodore were too slow, but Commander's SD card might be fast enough. Also commander has 2 MB RAM maximum, but C64 could have 2 MB RAM using REU. It might be interesting for someone to port Fuzix to Commander X16. I found some video demonstrating Fuzix on a ZX Spectrum:
  25. I tested this: but it skips some numbers each third line when printing 4-digit numbers. I think line wrap and the screen editor should work as normal in 20x15 text mode.
×
×
  • Create New...

Important Information

Please review our Terms of Use