Jump to content

mobluse

Members
  • Content Count

    54
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by mobluse

  1. It might be possible to write a CP/M 8080 emulator for X16, just like there exists one for C64, which I tested some years ago. I tested the following 8080 emulator with CP/M on Raspberry Pi in 2014: https://nanochess.org/emulator.html This source code is rather difficult to understand, but one could write an Intel 8080 emulator from scratch that has the same instructions for peripheral operations and then the rest of the files should work. Not all CP/M software works on 8080 since Zilog Z80 was more common. I have PCs with V20 and V30 CPUs (80186 super set) that can emulate 8080 in hardware and there was also CP/M-80 for PCs that used that 8080 emulation. My Amstrad PC1512 had originally 8086 CPU, but I switched it to V30. I found a tutorial on how to write an 8080 emulator: http://emulator101.com/
  2. When do start measuring the time? Is it from start of program or e.g. from when OXYGENE is shown? It is a bit faster on second run: about 68% of full speed on my computer.
  3. I got it to run on my computer with dual core x86-64 and Windows 10 using: ..\x16emu_win-r38\x16emu.exe -ram 2048 -run -prg STNICCC.PRG Unfortunately my computer is not that fast so it only run in 50% speed. It said the time was 1:39.96, but it was longer in reality.
  4. I have updated the PETSCII: x16emu: 5 SCREEN0 10 ?CHR$($A5);CHR$($A7) VICE x64: 5 ?"{clear}"; 10 ?CHR$(10*16+5);CHR$(10*16+7) There seems to be an error in the X16 ROM for CHR$($A7) because it is not just thinner, but in the wrong end compared to C64.
  5. From the release notes for r38: "changed PETSCII screen codes $65/$67 to PET 1/8th blocks" I don't see any difference between X16 and C64. I tried this code in x16emu: 5 SCREEN0 10 ?CHR$($65);CHR$($67) and this in x64 in VICE 3.4 SDL2: 5 ?"{clear}"; 10 ?CHR$(6*16+5);CHR$(6*16+7) ({clear} is Shift+Home i.e. a reversed heart.) What is the difference between the C64 character set and X16? I think it's good if there are identical characters in C64 that they are different in X16, because there is no point in having identical characters. It is a problem of how to print them since the Style64.org PETSCII font probably only supports C64.
  6. I use GNU Nano as my main editor in Linux and I noticed a disadvantage of Ctrl+U (Uncut) in X16 Edit: Ctrl+U can only paste once in X16 Edit, but several times in Nano. I hope this will change because I often use Ctrl+U several times in Nano and would like to do so in X16 Edit. I believe there is no advantage of emptying the cut-buffer after the first uncut/paste.
  7. I think this is great. Does it handle labels in ON...GOTO and ON...GOSUB? How do you enter the BPP files? since the built in editor requires line numbers.
  8. There are emulators for other computers that run in a terminal e.g. https://atari800.github.io/ and http://rullf2.xs4all.nl/sg/zx81ce.html. The output of x16emu can be sent through a filter program that converts PETSCII to UTF8: https://github.com/mobluse/x16-petscii2utf8 The difficult thing is to get the keys you press (key down and key up events) in the terminal to be sent to x16emu. I once hacked x16emu so that this was possible, but that slowed down the emulator. One would also need to remove the GUI to make it independent of X and SDL.
  9. I tested my game Aritm using the "Try it now" feature in Chrome on iPhone 8 Plus and it works well, but it requires a Bluetooth keyboard since the web emulator of CX16 doesn't have a screen keyboard and the phone's own touch keyboard doesn't come up. If I click outside the CX16 screen and scroll and return, the Bluetooth keyboard stops working, even if I touch the X16 screen. If I then touch the close button (X, actually a zoom out button) and then go full screen again the Bluetooth keyboard works again in the Commander X16 emulator. Another issue (that isn't only for phones) is that the speaker mute button shows as muted from start, but there is sound (e.g. if you enter wrongly in Aritm) from start. If you toggle the mute button a couple of times then it shows correctly the same way as on e.g. YouTube. (It can be difficult to type "-" (minus sign) on some international Bluetooth keyboards, therefore I've added "." (point/period/stop) as an alternative to minus. Actually, this alternative has existed for a long time since I had this problem in other emulators too.) Maybe @SebastianVoges can help.
  10. 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.
  11. This bug is also discussed here:
  12. 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
  13. 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
  14. It would be interesting if someone could make a BASIC v2 program that demonstrates the bug in the garbage collector.
  15. 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.
  16. 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
  17. 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
  18. "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
  19. 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
  20. 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
  21. 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
  22. 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.
  23. 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
  24. 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.
  25. 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.
×
×
  • Create New...

Important Information

Please review our Terms of Use