will need to go over this, it is working, but not as perfect as it should.
This is the first time of me working with a TCL file, so I kind of butchered it together. I was not able to resolve the current working directory so some files need to go exactly where Spin2Gui.exe is. Eric will be able to solve this, but right now it is like it is.
I am using Spin2Gui Version 3.9.27 Compiled on: May 27 2019 this is important because I changed gui.tcl in the src directory of Spin2Gui to add some commands to integrate TAQOZ. As said before Eric might need to make it nicer, but it works!
So I added 4 menu entries and 4 buttons. 'compile with TAQOZ', 'compile & run with TAQOZ', 'compile with TAQOZVGA', 'compile & run with TAQOZVGA'
With help from @Peter Jakacki
I created two different TAQOZ images, one without VGA (TQ_TAQOZ.BIN) and needing the first 64K of Hub-Ram and a second one with VGA (TQ_TAQOZVGA.BIN) needing the first 297K and including a VGA buffer with bmp palette TAQOZ standard VGA running on COG7
The whole shebang works like this:
your Program needs to include either TQ_Driver.spin2 or TQ_DdriverVga.spin2 depending if you need VGA or not. And you have to click the right button in Spin2Gui depending on with VGA or not.
Then FastSpin will compile your Program with a different start address and link the created binary with the correct TAQOZ image creating a combined binary ready to run. TAQOZ starts in COG0 listens to a Mailbox and starts the FastSpin compiled binary in COG1.
If you use TAQOZVGA COG 7 runs the VGA driver inside of TAQOZ.
How to use this:
You need to copy
TQTAQOZ.BIN, TQ_TAQOZVGA.BIN, TQ_Run.spin2 and TQ_RunVga.spin2 right next to spin2gui.exe - Eric will be able to find a better place, but right now they have to be THERE.
and you need to overwrite your existing gui.tcl in the spin2gui src directory with my butchered one.
so rename gui.tct.txt to gui.tcl and overwrite the existing one in spin2gui\src
Then start Spin2Gui and you should see the new commands.
The driver to use it are TQ_Driver.spin2 and TQ_DriverVga.spin2. Both use Eric's std_text_routines.spinh so this file needs to be with them, you need to rename the file from std_text_routines.spinh.txt to std_text_routines.spinh. .
simple example using the non VGA TAQOZ so you need to click 'compile & run with TAQOZ'
' TQ_Test.spin2 compile with TAQOZ
oscmode = $010c3f04
freq = 160_000_000
baud = 230_400
PUB demo | c
ser.start(63, 62, 0, baud)
ser.printf("\nrunning from $%x switched to_clkmode $%x _clkfreq %d - %dMhz\n", tqz#_MAILBOXIN+4, _clkmode, _clkfreq, _clkfreq/1000000)
c := ser.rx
49 : tqz.strCRflush("56 BLINK")
50 : tqz.strCRflush("56 PIN MUTE")
51 : tqz.strCRflush("57 BLINK")
52 : tqz.strCRflush("57 PIN MUTE")
53 : tqz.strCR("22 33 + .")
54 : ser.str(@prompt)
ser.printf("\nsending %s to TAQOZ\n", @cmdline)
other : ser.str(@entrynotvalid)
PRI displayResponse | c, w
w := 30000
w := 30000
until w < 1
byte "1 Test 1 - send 56 BLINK - FLUSH RESPONSE",13,10
byte "2 Test 2 - send 56 PIN MUTE - FLUSH RESPONSE",13,10
byte "3 Test 3 - send 57 BLINK - FLUSH RESPONSE",13,10
byte "4 Test 4 - send 57 PIN MUTE - FLUSH RESPONSE",13,10
byte "5 Test 5 - send 22 33 + . - DISPLAY RESPONSE",13,10
byte "6 Test 6 - send commandline - DISPLAY RESPONSE",13,10,0
byte "Entry not valid, try 1-6",13,10
prompt byte "enter cmd: " ,0
cmdline byte 0,0
I also included the created binary TQ_Test.binary you can just run the binary without changing anything in Spin2Gui...