[Debian-lego-team] BrickOS-Bibo Project Updates

Matthew Sheets mesheets at hotmail.com
Fri May 16 23:24:06 BST 2025


A question and a few additional updates:

Question - Playing System Sounds from BrickOS:
The librcx project showed how ROM calls could be used to play the LEGO system sounds.  In brickOS, this compiles and runs but does not play (c.f. end of include/dsound.h).  Might anyone here know if the ROM sound_system call depends on the "init_timer" ROM call having been called previously?  While the librcx demos make that init_timer call, it doesn't appear that BrickOS does, so that could be the reason.  I'm not finding much explanation as to why sound_system hasn't been in BrickOS, but it seems to have been known that this didn't work.

If called in a program, there are no errors, but there is no audible sound, and if sound_playing() is setup in a loop to wait until the sound output has completed, that loop will never exit.

Updates -
Legacy 0.9.0 and Multi-Kernel Support:
* The installation arch name is now just "h8300-lego-coff"
* In *.lxMakeconf, "VERSION_GROUP" is renamed to "VERSION_SERIES"
* I have attached copies of the *.lds and *.lxMakeconf files described in the previous email that would be needed to install legacy-0.9.0 within the new multi-kernel structure

I might not have been clear on this earlier, but the legacy 0.9.0 would still need to be build basically the same way it is being built right now; however, once built, its installation can be transformed to align with the new multi-kernel structure, and then the same tools and utilities used to build *.lx programs for v1 kernels can also be used to build *.lx programs for v0 kernels.  If the updates to genlds are backported to legacy 0.9.0, then I think the existing make/build process for legacy 0.9.0 should output the *.lds file with the updates that multi-kernel support now uses.


BrickEmu, ROM, and BrickOS-Bibo:
The open source ROM implementation from brickEmu can now also be made within brickOS-bibo using the top-level "rom" targets.  By default, the outputs of "make rom-install" will be installed to ${DESTDIR}${prefix}/h8300-lego-coff/boot/.


> I'm also looking at some additional backwards-compatible size reductions around the music notes.

A new configuration CONF_EXTENDED_MUSIC has been added.  If CONF_EXTENDED_MUSIC is not defined, the pitch2freq array is removed and the value of the PITCH_* defines is the frequency code.  In turn, this means that it is no longer readily possible to transpose an array of notes by simply incrementing or decrementing the note index, and it also means that each note_t struct in an array for a song is one byte larger.  However, unless programs have ~100+ note_t elements, this increase is more than offset by the reduced kernel size.  For existing programs that did not try to transpose note_t arrays, no code changes are needed.

As typical *.lx programs have far less than 100 note elements and don't transpose note_t arrays, CONF_EXTENDED_MUSIC has been disabled by default.  To continue using the pitch2freq-based implementation, simply uncomment the "#define CONF_EXTENDED_MUSIC" line in conf.h.


Thank you,
Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legacy-0.9.0.lds
Type: application/octet-stream
Size: 12685 bytes
Desc: legacy-0.9.0.lds
URL: <http://alioth-lists.debian.net/pipermail/debian-lego-team/attachments/20250516/1d4edacc/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legacy-0.9.0.lxMakeconf
Type: application/octet-stream
Size: 73 bytes
Desc: legacy-0.9.0.lxMakeconf
URL: <http://alioth-lists.debian.net/pipermail/debian-lego-team/attachments/20250516/1d4edacc/attachment-0003.obj>


More information about the Debian-lego-team mailing list