Página 1 de 6

SE Basic IV 4.2 Cordelia

Publicado: 06 Feb 2019, 16:24
por aowen
Having wrapped up all but one of my Spectrum projects, I'm now working on the firmware for the Chloe 280SE. Initially this will run against the existing ZX core on the Uno. Eventually the idea is that the Chloe will have its own core. Aside from being completely refactored from the ground up the two big changes from the previous version of SE Basic IV are:
  • Native file system commands (no more dot commands).
  • New video mode: 240x192 pixels, 40 column text, 8x1 attributes, 16 colors from a palette of 256 (any foreground/background combinatino possible).
I will be looking for testers for a closed Beta program. Post a reply to register your interest.

Re: SE Basic IV 4.2 Cordelia

Publicado: 07 Feb 2019, 13:38
por nch
Hi, Andrew.
I'm not exactly an advanced user, which I guess will be what you're looking for.
But if you don't mind, if I'd like to try it.
Thank you.

Re: SE Basic IV 4.2 Cordelia

Publicado: 11 Feb 2019, 13:31
por aowen
nch escribió:Hi, Andrew.
I'm not exactly an advanced user, which I guess will be what you're looking for.
But if you don't mind, if I'd like to try it.
Thank you.
Actually this one is aimed squarely at beginners. The trickiest thing that you'll need to do is to install it onto the Uno. That can be done by updating your ROMs with a new .ZX1 file (which I will provide). 40 column mode is causing me some headaches at the moment, so the initial beta will be 80-column only. The only other requirement is that you don't distribute the development versions of the ROM.

Re: SE Basic IV 4.2 Cordelia

Publicado: 11 Feb 2019, 14:32
por nch
Entonces perfecto, cuenta conmigo. :okidoki;

Re: SE Basic IV 4.2 Cordelia

Publicado: 22 Feb 2019, 13:06
por aowen
Phase 1 complete

Development of SE Basic 4.2 is being done along the same lines of the process used by Andy Wright to create SAM BASIC. This is a requirement because the OS kernel is a black box that is tightly tied to a specific ROM. The stating point is a human readable uncommented assembly file for the original ROM. Phase 1 includes the following:
  • Removed redundant code including tape and printer routines.
  • Source broken into separate modules.
  • Added a tokenizer with the ability to ignore external OS commands.
  • Replaced the 7-bit character set with an 8-bit character set suitable for viewing at single and double height.
  • New display code supports 8-bit code pages. The default is page 437.
  • Boot ROM created. This initializes the palette, reads it back to the palette buffer, and copies the font to the frame buffer. It also copies the parts of the OS and BASIC that reside in RAM into the appropriate memory locations.
  • Use % to prefix binary numbers.
  • Moved almost all the data to a separate area of memory starting at $3d00. This avoids the disk hardware trapping the PC for emulation purposes.
  • Renamed commands based on MS-BASIC.
  • Rewrote error messages based on MS-BASIC.
  • New keyboard routines. Meta (set 7) and Control (set 7, res 6, res 5) modes enable entering characters 32 to 255 directly.
  • New command tables.
  • Initial version of COLOR command for text mode enables setting foreground and background from 16 palette registers.
Phase 2 involves the creation of the internal file system commands.

Re: SE Basic IV 4.2 Cordelia

Publicado: 28 Feb 2019, 00:44
por aowen
Phase 2 is complete. The first alpha release is available for testing to those who sign up to be testers.

Re: SE Basic IV 4.2 Cordelia

Publicado: 11 Mar 2019, 20:35
por aowen
Phase 3 is complete.
  • CP1254 - Turkish.
  • Debugged calculator.
  • Light optimization of file commands.
  • Reorganized data.
  • Tokens are now reserved words.
  • LET is optional.
  • Substitute ' for REM.
  • Cleaned up restarts.
  • Cleaned up SKIPS.
  • Added POSIX time support.
  • Updated keyboard handler.
  • Swapped SOUND input parameters.
  • CALL, DELETE, EDIT, END, ERROR, LOCATE and PALETTE commands.
  • Spectrum emulator app.
  • Updated ZCL.
  • Removed redundant flag checks.
  • Increased printable character range.
  • ASCIIZ message printing.
  • Optimized screen module.
  • NMI fix.
  • Added 37 tokens.
  • Move up and down in an edit linie.
  • Delete, Home, End, Page Up, Page Down keys.
  • Sym+ Space / Enter now produces a separate character.
  • NMI break.

Re: SE Basic IV 4.2 Cordelia

Publicado: 13 Mar 2019, 08:31
por Hark0
Me quito el sombrero ante tan excelente proyecto... aunque la mitad de las cosas que expone no las entienda.

:okidoki; :okidoki;

Re: SE Basic IV 4.2 Cordelia

Publicado: 13 Mar 2019, 15:16
por aowen
Hark0 escribió:Me quito el sombrero ante tan excelente proyecto... aunque la mitad de las cosas que expone no las entienda.


:okidoki; :okidoki;
Here's the plain English version, with the latest update.

After a long break in the development of SE Basic, I'm working on version 4.2 again. This is the first version to be specifically built against esxDOS to ensure compatibility. Because esxDOS is tightly tied to the original ROM, I'm using that ROM as a framework, replacing modules one at a time to make sure nothing breaks. This is the same approach Andy Wright used when developing the SAM Coupe BASIC ROM. The source code is modular rather than being a single massive assembly file. Right now there are just three out of 15 modules that contain "non-free" code. When those modules are done I'll open the source repository on GitHub for contributors.

SE Basic 4.2 is one of three components in the Chloe 280SE firmware. There is also the OS kernel (currently esxDOS 0.8.5, but will be UnoDOS 3 in the production version) and the boot ROM. The boot ROM sets up the environment and the frame buffer and then passes control to BASIC. ROM paging is then only required when OS calls are made.

SE Basic 4.2 is specifically designed to be used as the firmware in the Chloe 280SE. It makes no attempt at compatibility with anything except the ZX-Uno hardware and the esxDOS 0.8.5 API, although this version will work on an original Spectrum 128 with a SLAM+128 replacement ULA and divIDE/divMMC.

SE Basic 4.2 is broadly compatible with MS BASIC syntax, including the file commands. The only part of esxDOS it uses is the kernel and all file commands are handled natively in BASIC. Dot commands are not supported.

Some of the highlights of SE Basic 4.2 (most of which were not present in earlier versions) include:
  • 80 x 24 text console with definable foreground and background colors.
  • Keyboard buffer (fewer dropped key strokes, easier to edit long lines)
  • Improved editor navigation (up and down in an edit line; Del, Home, End, Pg Up, Pg Dn keys)
  • 8-bit fonts. All 256 characters are user definable. Native code page is IBM 437. Windows code pages 1250 to 1255 are also provided.
  • Up to 134 tokens available for functions and commands.
  • Single letter token entry with abbreviations. Any character from code 32 to 255 can also be entered directly using Control or Meta modes.
  • Standard 16 color EGA palette. ULAplus complexity is abstracted away from the user.
  • Data (keyboard lookup, tokens, error messages) stored in RAM. This enables localization in software without recompiling.
  • Error messages are null terminated. This means error messages can contain characters 128 to 255.
  • LET is optional and ' is permitted as a substitute for REM.
  • New system variable stores date and time in POSIX (unsigned) format.
  • Built-in file commands write headerless files direct to SD card:
    • BLOAD "filename.bin", a
    • BSAVE "filename.bin", a, l
    • COPY "filename.a" TO "filename.b"
    • CHDIR "path"
    • DLOAD "filename.dat"
    • DSAVE "filename.dat"
    • FILES
    • KILL "filename.ext"
    • LOAD "filename.bas"
    • MKDIR "foldername"
    • NAME "filename.a" TO "filename.b"
    • RMDIR "foldername"
    • SAVE "filename.bas"
  • New commands:
    • CALL a
    • COLOR n, c
    • DELETE s TO e
    • LOCATE (x,y)
    • EDIT l
    • END
    • ERROR n
    • PALETTE r, c
Here are the most noticeable differences from previous versions of SE Basic.
  • No cassette support.
  • No graphics mode or commands.
  • No inline control codes.
  • No separate block graphics or UDGs (every character is a UDG).
SE Basic 4.2 has a 23K RAM footprint (which will permit inclusion of support for a graphics mode) but actually gives you 168 bytes more RAM to use for your own programs than the standard Sinclair ROM.

Re: SE Basic IV 4.2 Cordelia

Publicado: 13 Mar 2019, 15:35
por Hark0
WOW! Great explanation! :chocala!: