I'm playing around with the latest H3 build. So far so good. The main thing I'm getting my head round is the new colours (my old programs have the wrong colours and transparency on sprites doesn't work, which I think is all related to the colour changes).

Anyway.. to the editor! Clearly it's a lot more powerful than the old one, which seems great.

I've found that doing edit "file.bas" will launch the editor. If I then exit with XC then launching again does nothing (seems like a no-op). Not sure if I'm doing something wrong or if this is a bug.

The editor also seems to corrupt files that I open; they can no longer be read. Not a problem for me because I have copies, but worth noting! To reproduce, I think you can edit "somefile.bas", then CTL-X, CTL-C to exit, then reboot the H3 (hard reset), then try loading the file.

The first issue arose because atto reasonably expects the OS to clear its global variables whenever it is started. I had initially used it as a loadable extension, and the startup code that the TCCLINK command generates when linking something with a main() function takes care of that. When embedding atto, however, that doesn't happen, so I had to add some code to do it manually.

The second issue was a bit tricky. It turned out that the lib-h3 MMC driver expects buffers to be word-aligned, but POSIX write() does not. So I had to add some code to the _write_r() and _read_r() implementations in allwinner-bare-metal to copy unaligned buffers. The reason why that has never been triggered from BASIC is that the interpreter never uses unaligned buffers...

Anyway, both issues will be fixed in the next build.

Powered by: FreeFlarum.
(remove this footer)