Picomite(VGA) V5.07.07 betas - bug fixes + focus on PIO


Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11615
Posted: 01:25pm 13 Jan 2023      

Picomite(VGA) V5.07.07b1

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

Bug fix to ON ERROR SKIP (thanks Tom)

New functions

MM.INFO(EXISTS FILE fname$) ' see CMM2 manual for details
MM.INFO(EXISTS DIR dname$) ' see CMM2 manual for details

PIN(FLEVEL pio [,sm, DIR]) ' dir can be RX or TX. If specified gives the level of the specific fifo

PIO (SHIFTCTRL push_threshold [,pull_threshold] [,autopush] [,autopull] [,in_shiftdir] [,out_shiftdir] [,FJOIN_RX] [,FJOIN_TX]) 'additional optional parameters to create 8-word RX or TX FIFOs

PIO CLEAR now clears all the FIFOs for the pio specified
PIO INIT and PIO START clear the specific FIFOs for the pio and sm specified

New Command

NB: RX and TX are from the Basic code perspective

PIO INTERRUPT pio, sm [,RXinterrupt] [,TXinterrupt]

Use the value 0 for RXinterrupt or TXinterrupt to disable an interrupt
Omit values not needed

e.g

PIO INTERRUPT 1,0,,myTXinterrupt
PIO INTERRUPT 1,0,,0
PIO INTERRUPT 1,0,myRXinterrupt
PIO INTERRUPT 1,0,0
PIO INTERRUPT 1,0,myRXinterrupt,myTXinterrupt
PIO INTERRUPT 1,0,0,0


The RX interrupt triggers whenever a word has been "pushed" by the PIO code into the specified FIFO. The data MUST be read in the interrupt to clear it. The interrupt will re-trigger if a second word arrives and the interrupt only processes one.

The TX interrupt triggers whenever the specified FIFO has been FULL and the PIO code has now "pulled" it

PIO interrupts have priority have keyboard interrupts but before anything else. As with all interrupts interrupt conditions are processed one at a time.

NB: I am not convinced about the utility of the TX interrupt. Would it be better to have an interrupt on say half full  when it was previously more than half. This would allow the Basic code to keep the FIFO topped up and know how many writes were allowed NB: the enhanced PIO(FLEVEL ...) function makes it easy for the Basic code to know the FIFO status before writing