• General
  • BESCII the ASCII font for Basic Engine

guidol @uli there isnt anything like a "AUTOEXEC.BAT" for the BASIC-Engine?

Yes, there is, and it's called -- wait for it -- AUTOEXEC.BAS. šŸ˜€

guidol BTW: Why cant I FONT LOAD "/sys/fonts/atascii.ttf" ?
Gives me a Sytax error (expected numeric expression"

Because it's LOAD FONT, not FONT LOAD.

    uli
    AUTOEXEC.BAS did work fine šŸ˜‰

    The font loading was my fault šŸ™
    because of "FONT "atascii" SIZE 8,8
    I had in my head that the FONT keywork should also as the first in the other command šŸ™‚
    The right order of command and it did work with the full path.

    Is the AUTOEXEC.BAS documented? Hadnt read it šŸ™
    BTW: where could I find the Z-Code-Interpreter which is also mention on the webpage for the NG version?

    • uli replied to this.
      7 days later

      guidol Is the AUTOEXEC.BAS documented? Hadnt read it

      Not sure. Lots of things are not properly documented... :-/ The reference manual is pretty much limited to BASIC commands and doesn't contain much information on how to use the system. Feel free to write a user manual. šŸ™‚

      guidol where could I find the Z-Code-Interpreter which is also mention on the webpage for the NG version?

      HELP XYZZY. Moving that to a module and replacing it with a more competent interpreter is also on some TODO list somewhere...

      3 years later

      I remembered this thread existed, lol!

      Well, Bescii updated to v2.

      I included a special nod to playing cards... see if you guys can tell what it is šŸ˜„

      (Pretty sure Ulrich knows what these are) šŸ˜‰

      9 months later

      I decided I would try to port the TicTacToe program to BASIC engine. One port is a C-64 Commodore BASIC 2 that used graphic characters, the second port is a C-128 Commodore BASIC 7 using graphic commands, and the third port is a Quick BASIC using graphic commands. The C-128 is going well after changing the syntax to match BASIC engine. With the quick BASIC porting, I am having issues with the scope of variables in the main code and function code.

      In the C-64 port, I plan to use the BESCII font for the graphic characters in the program. The code has Print statements with graphic characters in "strings " to make the board, noughts and crosses. I know the BESCII font uses Unicode to access the graphic characters. The C-64 used different key combinations on the keyboard to print the graphic characters in strings in the C-64 code. Is there something like ALT code to print these Unicode characters in BASIC engine code? I noticed there are graphic characters in Print strings in the Tetris game code to print the playing screen in the program. How did these graphic characters get inserted in the Print strings?

      Thanks for helping me with these ports, I am use to using the C-64 and C-128 keyboards and limited to only 256 characters.

        Willard Hello!
        To modify the Tetris program I used a modern computer (a Mac). There’s a demo file in the project, and it has all the available characters in the font. So, using a modern computer and a modern IDE (like VSCode or Codium) you can copy from the demo file and paste the character in the BAS file, save and then transfer the program to BE using a SD card.
        I hope it helps. Cheers!

        6 days later

        @Dmian Thanks Dmian for you reply.

        It appears we are working at opposite ends of the software programming spectrum. I am using a Pentium III PC running Windows XP and coding with Notepad++ or PSPad. I told my wife I needed a Mac computer with a modern IDE and she just laughed. I guess I'm in the retro end of the software programming spectrum.

        Update to the porting project. The code I am porting started from Commodore PETSCII to ASCII. In Notepad++ and PSPad, I needed to change the encoding from ASCII to UTF-8 to use Unicode characters. When I do this, I'm able to copy and paste the graphic characters in strings from your Tetris game code to my code.

        The demo file I found is at this URL:

        https://github.com/damianvila/font-bescii/blob/main/demo/demo.html

        If this is not correct, let me know the correct URL to use.

        Using the demo file, I see a chart with the graphic characters that I can copy and paste into the code, but about half of the graphic characters display as squares in the chart and only copy and paste into the code as squares and don't display when the BE code is run. I am not sure why all the Unicode is not displaying in the html file with the browser.

        I am looking at two other porting projects that use PETSCII graphic characters. Does the PETSCII graphic characters display correctly in your Mac workflow system? Thanks for your help, the C-128 port is going well and I will work on the music PLAY code next.


          • Edited

          Willard Hi!
          Yes, the file you linked is correct.
          Normally, all characters over E000 won’t be displayed in any other font except Bescii, because those Unicode points are what’s called ā€œPrivate User Areaā€ or PUA. That’s a part of Unicode reserved for any person to define the character as they please, and what anyone can do there is different, so if you copy, say, E000, it may show something in Bescii and something completely different is Atascii (another of my fonts) simply because different characters are defined.

          In most fonts, though, you’ll see squares, or blank spaces. This is normal, as most commercial or general use fonts don’t define anything specific in these Unicode spaces.

          So, you can open the demo file in a browser in Windows XP, and as long as you are using an app that supports Unicode, that square you are copying should show the correct character when displayed using Bescii in BASIC Engine.

          Working like this is a bit going blind, but it’ll still work in the end.

          The way I set up the demo folder will normally display the characters using Bescii in any modern browser, as those support web fonts, but I think browsers in Windows XP had poor support for web fonts, or don’t support modern web fonts at all, so you’ll have to resort to copying the squares and hope you’re getting the correct character, I’m afraid.

          As for knowing which character is what, I can provide an image with the characters and their position if you need it as a reference, so let me know and I’ll put it here for you.

          Putting these characters in the PUA is the correct way to handle them, but sadly it makes it a bit impractical to use them in older systems. Make sure you're using Unicode everywhere, as any re-encoding may ruin the result.

          Whatever you need, let me know. Cheers!

          7 days later

          Willard The C-64 used different key combinations on the keyboard to print the graphic characters in strings in the C-64 code. Is there something like ALT code to print these Unicode characters in BASIC engine code?

          Not really. I hacked something into the original ESP8266 firmware so you can use the I-don't-even-remember-which modifier key to enter characters above 127, but I don't think that still works in the SDL version.

          What would be very easy is to add a keyboard layout for entering graphics characters to /sys/kbd. The question is what that should look like, though. Unlike the Commodore devices contemporary PC keyboards don't have graphics characters printed on the key caps, and I guess it would be very hard to memorize the layout unless you're a PETSCII artist. (OTOH, there is the keyboard layout popup which might help with that.)

          I was also thinking about something like the emoji menu that mobile device input methods have, but that would be a bigger effort to implement...

          Willard I noticed there are graphic characters in Print strings in the Tetris game code to print the playing screen in the program. How did these graphic characters get inserted in the Print strings?

          I don't remember anymore how they originally got in there, but I'm sure I used a script to convert them from the legacy encoding to UTF-8.

          4 days later
          • Edited

          New version of BESCII!
          https://codeberg.org/Dmian/font-bescii/releases/latest/
          This version adds Slavic languages, Symbols for Legacy Computing (including Supplement) and pangrams in the demo file. Now hosted on Codeberg.
          Except for corrections, it looks like this could be one of the last versions of the font, as it’s way more complete than I ever envisioned.
          Cheers!

          18 days later

          I have written a BE program that displays BESCII characters on the screen. I have it defaulting to the PETSCII graphic characters. I have tested it on both the NG H3 firmware and the Windows SDL firmware platforms that I use. I noticed the NG H3 displays the PETSCII graphic characters, but Windows only displays some of them. I added a save screen option to the BE code to show what is displayed from each platform.

          NG H3 Screen

          WindowsSDL Screen

          I am thinking this is an issue with the Windows SDL firmware but can not be certian because of my limited BE platforms to test it on. Please test this on other BE platforms to see what PETSCII graphic characters are displayed.

          UnicodeChr_ViewSave.BAS

          The program displays a page of 400 characters on the screen. Pressing PgUp and PgDn pages through the characters. Pressing F11 will save the screen to the current directory with a filename of the starting character value and SYS(2) name. Pressing Esc will exit the program. I have tested on NG H3 and Windows SDL firmware.

          I am using a dropbox for the images and program files for the first time. Let me know if you have problems accessing them.

          • uli replied to this.

            Willard I am using a dropbox for the images and program files for the first time. Let me know if you have problems accessing them.

            I can see the images, but I can't download the program.
            I have enabled file uploads for registered users quite some time ago, maybe you could try that...

            I am able to upload the 2 jpg files to my media folder, but I get this error when I try to upload the the UnicodeChr_ViewSave.bas file:

            "Uploading files of this type is not allowed."

            I also get it when I try the Upload icon next to the My Media icon

            NG H3 Screen

            WindowsSDL Screen

            I have changed the extension from .bas to .txt since that seems to be causing problems on DropBox.

            UnicodeChr_ViewSave.txt

            The extension will need to be changed back to .bas to run with BASIC Engine firmware.

            Let me know if this runs on your BE setups.

            I have bisected the problem; it has been introduced with the last BESCII font update. As an immediate fix I have now reverted that update, so things should work again with the next build.

            I also tried the latest version (v3) of the font, and it has the same issue.

              Hi @Willard

              I'm sure the font is ok. When I generate the demo file, I use this tool: https://torinak.com/font/lsfont.html
              It takes all the glyphs from a font and map them on a page. If you open the "demo" folder of my font, you'll see them listed there. You can also try uploading one of the files (for example, the Truetype .ttl file) and the page will show all the glyphs contained in that font. If you can't see all the glyphs on the browser, then the system may have no means of displaying those.

              Just out of curiosity, I printed some of the character between F000 (61440) and F057 (61527) on an old Mac SDL version of BE Ulrich did some time ago for me. I use this as an easy and quick way to check files, as I can open this version directly from Terminal on my Mac.
              Here are the screenshots:

              {Main screen (to see the version)}
              Main screen (to see the version)

              {Printed characters}
              Printed characters

              Cheers.

              uli Hi Ulrich! Can you tell me what have you found?
              When I updated the font to v3, there were problems with the app I'm using (Glyphs Mini), and I had to ask the devs to correct the problems. They seemed to corrects these problems, and I was able to generate the font again, but maybe there are other things that I haven't detected.
              I also included the new "Symbols for legacy computing" plane, and that may have added something that's generating problems with the font?
              Thanks!

              • uli replied to this.

                Dmian When I updated the font to v3, there were problems with the app I'm using (Glyphs Mini), and I had to ask the devs to correct the problems.

                I don't think that's it because the problem already appeared in the previous version (v2.0 IIRC). I rolled back to v1.2 now.
                I'm getting the exact same output as @Willard with v2.0 and up.

                  uli Ok. Thanks! I’ll check to see if I find the problem. Iirc, I built the first version with the more expensive version of the program (Glyphs) that I used in trial mode, and I switched to the cheaper one (Glyphs Mini) after. I had to open the font in Fontforge to correct the leading because Mini doesn’t allow to modify that, and doesn’t generate TTF files.
                  So, it could be that.
                  I may consider buying the more expensive app, but it’s a bit expensive, so not something I can do atm. I’ll see if there’s anything I can do with Fontforge, but it’s a cumbersome app, not native and difficult to use on a Mac.

                  Powered by: FreeFlarum.
                  (remove this footer)