FXCore preprocessor

Post Reply
Frank
Posts: 159
Joined: Sun May 03, 2015 2:43 pm

FXCore preprocessor

Post by Frank »

Have posted V1.0.0 of the FXCore preprocessor for Windows. This works as part of the tool chain so assembler still required. This program will allow programmers to call functions into their FXCore source .fxc file and will generate a .fxo file to run into the assembler. As an example the example_pitch.fxc file contains:

Code: Select all

.rn	in_sig	mr0
.rn	pitched	mr1

@fxcdsp.get_in(in0, in_sig)
@fxcdsp.pitch0(pot0, in_sig, pitched)
@fxcdsp.send_out(out0, pitched)
And after running through the preprocessor will produce a file example_pitch.fxo that will look like:

Code: Select all

.rn	in_sig	mr0
.rn	pitched	mr1

// @fxcdsp.get_in(in0, in_sig)
CPY_CS R0 , IN0    // from library: fxcdsp -- subroutine: get_in -- matching IN with IN0 type ADC -- 
CPY_MC IN_SIG , R0    // from library: fxcdsp -- subroutine: get_in -- matching SIG with IN_SIG type MREG -- 
// end inclusion library fxcdsp --  subroutine get_in

// @fxcdsp.pitch0(pot0, in_sig, pitched)
.MEM PDELAY_5 4096    // from library: fxcdsp -- subroutine: pitch0 -- 
CPY_CS R0 , POT0    // from library: fxcdsp -- subroutine: pitch0 -- matching SHFT with POT0 type POT -- 
WRDLD R1 , 0XC000    // from library: fxcdsp -- subroutine: pitch0 -- 
ADDS R0 , R1    // from library: fxcdsp -- subroutine: pitch0 -- 
WRDLD R0 , 0XFFF0    // from library: fxcdsp -- subroutine: pitch0 -- 
MULTRR ACC32 , R0    // from library: fxcdsp -- subroutine: pitch0 -- 
JGEZ ACC32 , OK_5    // from library: fxcdsp -- subroutine: pitch0 -- 
SLS ACC32 , 1    // from library: fxcdsp -- subroutine: pitch0 -- 
OK_5: CPY_SC RAMP0_F , ACC32    // from library: fxcdsp -- subroutine: pitch0 -- 
CPY_CM ACC32 , IN_SIG    // from library: fxcdsp -- subroutine: pitch0 -- matching SIG_IN with IN_SIG type MREG -- 
WRDEL PDELAY_5 , ACC32    // from library: fxcdsp -- subroutine: pitch0 -- 
PITCH RMP0|L4096 , PDELAY_5    // from library: fxcdsp -- subroutine: pitch0 -- 
CPY_MC PITCHED , ACC32    // from library: fxcdsp -- subroutine: pitch0 -- matching SIG_OUT with PITCHED type MREG -- 
// end inclusion library fxcdsp --  subroutine pitch0

// @fxcdsp.send_out(out0, pitched)
CPY_CM R0 , PITCHED    // from library: fxcdsp -- subroutine: send_out -- matching SIG with PITCHED type MREG -- 
CPY_SC OUT0 , R0    // from library: fxcdsp -- subroutine: send_out -- matching OUT with OUT0 type DAC -- 
// end inclusion library fxcdsp --  subroutine send_out
The eample_pitch.fxo is then run through the assembler to program/create hex file/run on the FXCore.

More info, the sample library file, etc. are all in the .zip, please read the READ ME and PDF files to understand how to integrate this into your tool chain.

Mac versions in beta (thanks to Matthew of Alexander pedals for beta testing, suggestions, etc. )
Frank
Posts: 159
Joined: Sun May 03, 2015 2:43 pm

Re: FXCore preprocessor

Post by Frank »

Mac versions are now posted, please read the docs in the zip files

UPDATE: Accidentally included an incomplete build file so it was not calling the preprocessor for Run from RAM or Program to Location 0, replaced file with correct one 12 Jan 2023
Frank
Posts: 159
Joined: Sun May 03, 2015 2:43 pm

Re: FXCore preprocessor

Post by Frank »

V1.5.0 released for all platforms. Added ability to have equations in macros with parameter substitution into the equation.
Post Reply