ndf-zz / asfv1

Alternate Assembler for Spin Semi FV-1
MIT License
38 stars 7 forks source link

Missing COS0/COS1 symbols #4

Open budius opened 3 years ago

budius commented 3 years ago

I was trying to compile the "Dual Head Tape Echo + Spring Reverb" effect from https://mstratman.github.io/fv1-programs/ and got error on lines 162, 163 with cho rdal, cos0/cho rdal, cos1

Log:

FV-1 Assembler v1.2.7
info: Reading input from dv102-2head-reverb.spn
warning: SpinASM compatibility - literals 2,1 read as 2.0,1.0
parse error: Undefined label cos0 on line 162
parse error: Undefined label cos1 on line 163
errors in input, assembly aborted

Spin FV-1 user manual It seems it's a bit of SpinSemi fault to not properly document those registers on page 60, but they can be found on page 55 as below.

spinsemi_cos0

I believe the fix to be a new entry on the symbol table but the value does not seem to be documented on the manual (and my python is a bit rusty to do my own PR sorry).

But I found this https://github.com/eh2k/fv1-emu/issues/9 and this thread http://www.spinsemi.com/forum/viewtopic.php?p=2128 That points to possible values of COS0/COS to be 8/9 respectively. I hope that helps.

ndf-zz commented 3 years ago

Hi Ronaldo,

Thanks for your email. The COS0/COS1 literals in spinasm specify both a shifted COS flag (1) and a SINx LFO value (0 or 1):

COS0 = 8 = (COS<<3) | SIN0 COS1 = 9 = (COS<<3) | SIN1

The correct way to use cho rdal in ASFV1 is to specify the chosen LFO and cho flags as follows:

cho rdal, SIN0, REG|COS

ref: https://github.com/ndf-zz/asfv1#cho-rdal-lfo--flags

There is no 'COS0' LFO, there is just the cosine output of the SIN0 LFO. In asfv1, all of the cho commands have the same template, and the flags work interchangeably (where supported by the fv1).

It's not possible to squeeze a 4 bit value into a 2 bit hole, but it is possible to add a COS0/COS1 spinasm compatability to a future version of asfv1 that would detect and substitute COSx in cho rdal as a macro-like entry - if there's any demand.

Hope that helps,

Nathan

On Wed, 30 Dec 2020, Ronaldo Pace wrote:

I was trying to compile the "Dual Head Tape Echo + Spring Reverb" effect from https://mstratman.github.io/fv1-programs/ and got error on lines 162, 163 with cho rdal, cos0/cho rdal, cos1

Log:

FV-1 Assembler v1.2.7 info: Reading input from dv102-2head-reverb.spn warning: SpinASM compatibility - literals 2,1 read as 2.0,1.0 parse error: Undefined label cos0 on line 162 parse error: Undefined label cos1 on line 163 errors in input, assembly aborted

Spin FV-1 user manual It seems it's a bit of SpinSemi fault to not properly document those registers on page 60, but they can be found on page 55 as below.

spinsemi_cos0

I believe the fix to be a new entry on the symbol table but the value does not seem to be documented on the manual (and my python is a bit rusty to do my own PR sorry).

But I found this eh2k/fv1-emu#9 and this thread http://www.spinsemi.com/forum/viewtopic.php?p=2128 That points to possible values of COS0/COS to be 8/9 respectively. I hope that helps.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, orunsubscribe.[AB6QED2YNDELPJJPLUUN3QTSXM7QZA5CNFSM4VONMQO2YY3PNVWWK3TUL52HS4 DFUVEXG43VMWVGG33NNVSW45C7NFSM4LSIPWSQ.gif]