[yoshimi] Re: Techie stuff

  • From: Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Wed, 13 Jun 2018 19:31:51 +0100

On Wed, 13 Jun 2018 18:48:11 +0200
Jesper Lloyd <jpl.lloyd@xxxxxxxxx> wrote:

I see no fundamental errors in what is written, but I would be cautious
about the jump table assumptions (as regards both generated instructions
and the actual performance) without thorough benchmarking.

Good point, and I've done quite a bit of reading on this, as well as some
(admittedly small) comparative tests.

The old ARM1 and ARM2 processors were simple enough that they produced easily
understandable assembly (Borland C compiler). Also, I did quite a bit of
assembly coding on the Acorn Archimedes in the late 1980s. It had a version of
BASIC with an in-line assembler - something you don't see often!

Personally I worry more about maintainability of the Interchange file,
which right now is over 8k lines and not short on magic numbers (albeit
separately documented ones) which are mirrored in the interface code (for
the GUI, and I assume for the CLI). If you don't already know where things
are, and how the numbers fit together (so to speak) it is quite difficult
to navigate and hunt potential bugs.

Another good point. It is much bigger than I originally expected. Currently the
implimentation is still rather fluid, but I've a mind to eventually convert to
enum lists. This would do three things:

Present the values in pseudo text form.

Compact the cases so that they would definitely be jump tables.

Enable new insertions at any point provided we don't exceed 0-254 (255 is used
as a null).

The problem then becomes how to make those lists available to external programs.

Initially, I used powers of 2 as a grouping method in an attempt to make things
more regular and reduce the number of steps. That was a mistake, as it blocks
the above idea. Although those groups still exist I've been slowly 'unlatching'
them.

A particular problem is the engine counts. 0, 1, 2, for add, sub, pad
respectively, then 128 + voice number for voices, and 192 + voice number for
modulators. Testing bits 6/7 makes voices and modulators easily identifiable. It
seemed a good idea at the time!

-- 
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either: 
https://sourceforge.net/projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx

Other related posts: