Have fun and let us know if you have any further question.
I have a further question.
This really needs to be looked at by someone who has previously programmed in 68000 assembly language - I'm learning it by staring hard at it, which has its disadvantages!
I can't work out this code:
If I'm reading it right (which I'm probably not), this translates to: Load 4 bytes from address A3, store them in address (A2 + _SampleLoopLen), then, only if the 4 bytes are not 0,
divide them by 2 and store them in address (A2 + _SampleLength).
There is another function which does the same, but doesn't check if the bytes are 0 first.
This therefore means that the only
value address (A2 + _SampleLoopLen) can take is 0, or (A2 + _SampleLength) * 2.
Which makes the code to program the Paula chip rather puzzling:
BEQ.B lbC000A98 ; silence channel
(Snipped for relevance and brevity.)
...as this means the address of the sample data can only
take the value of (A2 + _SampleLoopAddress) (since the function is bypassed if _SampleLoopLen = 0).
...which makes you wonder what the point of _SampleLoopLen is.
I really hope I'm wrong.