![](http://midibox.org/forums/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
yogi
-
Posts
218 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Blogs
Gallery
Posts posted by yogi
-
-
OH very good, will dig into the ref manual ( I know RTFM ;)
Would it be a matter of calling MIOS32_IRQ_Install() and then MIOS32_IRQ_DeInstall() and the appropriate ISR Handler?
Thanks, will do my homework,,
Yogi
-
Hi and Happy Holidays!
I'm trying to determine a way to port a project to MIOS32 or MIOS8 (very cheap for me).
For background, over at Shiftmore Blog is an interesting project :
http://shiftmore.blogspot.com/2012/11/arduino-controlled-nes-2a03-synth-part.html
It is based on the Chip Mastro NES midi interface cart, which in turn is based on a logic design that was presented in a '08 thread @ NESDEV
http://forums.nesdev.com/viewtopic.php?t=3836
Post #12 by kevtris presented a state machine circuit that generates a simple loop on the 2A03 CPU for pushing data to the on chip APU registers.
So, on reset, the CPU fetches data from FFFC and FFFD and will pull the reset vector 0040h (since it's coming from addresses 4 and 5).
This will get the ball rolling, and the CPU will perform the following three opcodes:
0040: LDY #<data byte>
0042: STY 040<address byte>
0045: BRK
the BRK then fetches the address from 6 and 7 which points to 0000h.
0000: LDY #<data byte>
0002: STY 040<address byte>
0005: BRK
and the cycle repeats, over and over again. Your microcontroller or whatever can simply monitor one of the read toggles on one of the latches to figure out when the chip has performed the write.The Shiftmore version uses a couple of 'HCT595s to interface an Arduino UNO (low pin count) to the 2A03, using SPI rather then 16 port pins. It seems like a do-able project to move this hardware to a MIOS platform, STM Disco. But I'm a little confused as to one aspect; the circuit uses one of the outputs of the 'HCT138 to signal the 'safe' window to update the register data to the 2A03. It's a simple matter to use attachISR() in Arduino but is there a similar function in MIOS32?
SO my questions are
1. Are there user pins that can be used as External Interrupt sources?
2. If so, are there provision with in MIOS32/FreeTOS? I have looked at MIOS32_IRQ_Install() and I think it might be what I need. Can anyone point me to a reference for the CMSIS SVD, for an external Interrupt or a code example?
3. If #1 and 2 are not supported, would it be better to use MIOS32_TIMER() @ ~100uS or less, and poll one or more outputs from the 'HCT138 to determine the current step the state machine is at?
I'm concerned that using polling will miss a pass of the 2A03 loop, we need to catch every loop pass. The whole loop takes ~6.8mS and we have a window of about half that when it is safe. (the 2A03 instruction cycle is 559uS x 12 cycles total).. Though this may not be a problem if the TIMER fires @ <= 100uS.
If I read the top 5 outputs, Y7:Y3 (safe during this window), of the 'HCT138, the worst case wait would be 2.23mS; from the end of the 'window' to the next 'window'. But there is the pin overhead with this. J10B would be OK for this?
The basic code would be something along the lines of this:
Transfer_to_2A03()
RC -> low
shift out 16 bits to the 'HCT595's serial registers
start TIMER to test for 2A03 state // Or Ext Interrupt
Return
On_TIMER() // Or Ext Interrupt
Read J10B pin(s)
Test state: pin(s) Low = safe
If state is safe, RC -> High // latch serial data to par output latch to be read by 2A03
disable TIMER and return.
Else, return and wait for next TIMER event.
Thank you and any advice would be welcome,
Yogi
-
Best of luck with your project, would lke to follow your progress. The Dekrispator synth project seems very cool, very glad you posted the link:) Really liking this https://soundcloud.com/bluexav/noaile-on-dekrispator. Very interesting sounds from a minimum of hardware.
Yogi
-
I'm not sure I understand your question, but I will assume that you are new and would like some basic info. If i'm wrong, no ill will intended. :)
The MIDIO 128 application needs to be configured for your own needs and there isn't really a 'kit'. The app allows up to 4 DINx4 and 4 DOUTx4 boards for 128 ins and 128 outs max, as well as analog ins and outs. The configuration process is integrated into MidiBox Studio so it is very easy to define the actions you want for each input or output.
For the LPC core you will need a 'carrier' PCB (you will have to source the Arm LPC and the few parts used on the carrier PCB, Mouser Electronics is one source ) and DINx4 ( 32 inputs each) and DOUTx4 (32 outputs each) boards and parts kit if needed; based on your IO needs. All of which are available through SmashTV's shop. So you would need to buy a number of boards and parts kits to build a full MIDIO 128 but the amount would be up to you.
Of course if you are very DIY, you could build all on perf boards, but for the price, a PCB is well worth the time savings.
I would recommend reviewing the MIDIO 128 wiki page and assessing your needs
Good luck and have fun
Yogi
-
I would guess the only way would be to use a software to translate the midi In (on the PC) to a Key Press. There are some options out there, a Auto It script may work or something like GlovePie. Of course you would have to write the script for your own needs. The usual usage is to send Midi from a key stroke, but some of the softwares are flexible and may do the opposite.
Yogi
-
Very cool, I'm guessing a controller for a soft synth? Really like the ol skool Moog style :)
Yogi
-
Very Cool. The max 2M length is excellent, putting the DAC close to the analog gear and keeping the digital UI in the 'work space'. Thank You
Yogi
-
Sounds interesting. A midi controlled tube amp (? Google Translate not 100%). You might look at http://www.midibox.org/dokuwiki/doku.php?id=midiboxmixer
As this project uses PGAs it may help. Best of luck,
Yogi
-
Wow, interesting designs.
Just recently I got the bug to explore some analog ideas. I'd like to hear more about your experience with the AOUT capabilities of the SID V2 softs.
I'm thinking about a simple mono synth design combining an Electric Druid VCDO (4 CVs) fed into a Shruthi-1 SSM2044 VCF/VCA (4 CVs) board, controlled with a MB AOUT-NG/Core8. These choices are based on the parts/boards I have on hand and am trying to minimize the parts count.
Judging from your notes I think I may be able to strip down the AOUT-NG to just the DAC; the SSM VCF board is designed for raw 5V PWM inputs (from the AVR). So there doesn't seem like there is a need to condition the DAC outs to 0-10V then div the signal back to 0-5V.
As well, the VCDO outputs 5V PWMs that should be fine with the VCF board ( designed for the AVR's raw PWM). The CVs into this chip are 0-5V so I think there only needs to be 1:1 buffers that allows some minor calibration between the DAC and the VCO chip.
One question I have is what, if any, benefit there would be with more filtering on the PWM signals in this user case?
Very much 'up in the air' as to what softs to run on the Core; MBCV 1 or Analog Toolbox or SID V2. It seems like the SID firmware offers the most features, but I'm unsure if it will work as a 'analog synth' controller or if it is more for external filter handling. Can it route Note pitch to CVs in addition to the LFO/modulation CVs? Seems like the Analog Toolbox offers a basic front end - Pitch, LFOs and EGs
Another option I have considered, would it be possible to use 2 AOUT/Cores somewhat like the MB6582? One for VCO/LFOs and the second for 2 VCF/VCA control. In other words, does MB6582 allow for CV control from each core?
Sorry for all the questions, you just seem to have dug deep into the analog control options in the SID software.
Yogi
-
The firmware:
Thx to Nils to have share his initial work with Eptheca and me....
To be continued...
Hi Antichamber
Interested in this, is there a like to PIC firmware (this link is to M4L softs)?
yogi
-
OK.thanks. The differences between standard C, CCS, MPLab C and SDCC in combination with my aging memory is a bad mix:)
Will have to spend some time with the SDCC docs, Thanks again for your efforts, even though MIOS8 is 'old school', it is such a great package to work with:)
yogi
-
So I got a question, and feel like it's a 'dumb' question, but what the hey, I spent the evening working it out and wanted some input.
I'm messing with the 8x8 scan matrix for MIOS8, and am expanding it a bit for a little project. Was setting up variables for transposing note range and Midi out channel.
At first tried adding to the display using 'pin' which is returned from the sm_ButtonHandler, but found it was out of scope in Display_tick(). So above Init() I added sm_button_pin and within SM_NotifyToggle() this:
sm_button_pin=pin;
This works, with sm_button_pin being global. Then added vars for chan_out and note_offset
unsigned char chan_out=0;
This seemed to work but when I tried to set it to 3 or what have you, no change. What I finally did was:
unsigned char chan_out;
And in Init() added this:
char_out=3;
So is there a better/cleaner way? I was thinking it should be in main.h rather then main.c but couldn't get it working; even tried to add sm-button-pin as an export from sm_simple.asm. My C skills are way behind compared to assembly, feeling bad it took so long just setting and using a variable! Are there any online refs for SDCC and C in general? Have a few dusty C++ books and a couple CCS C manuals, guess I'll have to clear of the cobwebs :)
Thanks,
Yogi
-
Hi nebula,
#1 I would avoid. Though it could work it would be a pain to setup. #2 is novel but seems like it could be complicated also.
My preference would be to implement this in a PIC. I have seen this technique used many times to supplement projects, with a single pin you can simulate 4,5 or 6 pins reading switches. This could be designed with one of the low pin count PICs; 3 outputs, 1 analog Input, internal RC Osc, internal MCRL and Vcc and Gnd. Would have to check but I believe there is an 8 pin mid range PIC that fits this list. Very minimal build: the PIC, a filter cap and the wires.
It's very simple. Init the device, start an ADC reading cycle, spin in place till it completes, evaluate the reading and output the desired pattern on the pins, repeat.
While you could do this within MIOS, in some ways it could be harder. Just depends if you are familiar with Asm or more comfortable with MIOS. If you are new to both, I would recommend learning assembly but thats a personal choice.
Are you able to burn a fresh chip? I could have a go at the code in the next few days if you like and I may have a spare chip around here also :)
Yogi
-
Thank you for the info. Ordered a Fluxamasynth after reviewing all the great links here! Had seen the Fluxamasynth (what a name!) but had thought it was more like a VS1052 chip. Those sound samples changed my mind.
For a very long time, off and on, I have wanted to build a Waveblaster GM voice but never could 'commit' to a db50XG. This little board, combined with a MIDIO128 front end will rock! Still would like a XG synth but this guy will be a nice alternate.
yogi
-
Hi Robin, well I got a STM F1 built and collecting dust, maybe we can work a deal?
Yog
EDIT just notice your looking for a UK source; I'm in the US but if nothing else turns up, give me a shout.
-
Like it! Left me wanting more :)
yogi
-
Glad it helped, there are some bad links in the wiki ( think the forum was changed a few years ago, so old links are dead).
Let us know how you make out, I'm planing a clock build in the near term.
Yogi
-
Hi Markus
I've been doing the same searches lately also, the thread in 'Toy of the Week' may help.
Yogi
-
Hello Yogi
The MBAY supports just one Bankstick (127 Patches) and there is one internal Patch.
Sorry, no Mod playback. But for more complex sound creation you can use the FX TABLE (with 32 steps in every patch):
http://www.midibox.org/dokuwiki/lib/exe/fetch.php?media=8912:midiboxay_v2_fx_tab_planer_a3.pdf
And here is a list with the MBAY MIDI Controller (CC):
http://www.subfrequenz.net/midibox/mbayv2/MBAY2MenueLCD.pdf
:-)
- Lemonhorse
Thanks for the info; I already have two sockets for BS but not a big deal :)
I kind of thought that would be the answer in regards to Mods, but I have been eyeing the FX tab (very cool feature!!).
Just about got the boards finished (except the FP) Can't wait!
Yogi
-
Thanks for this project, always loved the ST sound!
Finally getting around to building and have a question. What is the max bank stick count? The wiki doesn't list any under the 'Hardware' but does describe loading patches. Can I add up to the max (8) per MBSID?
Also wondering if MBAY can reproduce some of the ST 'tricks'; SID sound or Mod playback?
Yogi
-
REALLY lik'n the bass line! The whole song works so well.DO MORE :)
-
@ Smithy TNKs for the headsup with Diode mA's EP, lov'n the AT ][ tracking.
Here is something thats more 'computer music' then chip; not VSTi but HW DSP (so it's made on a chip; in a loose way)
Made with DSP Modular Synth plugins for the Kx Driver; KXM.
Back Ground: the Kx driver project is replacement drivers for SB Live and Audigy sound cards. These cards are DSP based and are very capable. Stylus has developed Modular synth micro-code plugins for the DSP that just blow me away.
Yogi
-
Here's some Saga FM fun. Don't know if you call it 'chip'tune or 'fake bit', demo clip for a Saga FM VST.
The sweet thing about the VST is it can serve as a UI for the Littlescale GenMDMidi interface to produce the same sounds on actual HW :)
Yogi
-
1
-
-
If you pause and zoom in the video where it says "Sound IC", you can see that it's a YMZ284 PSG, not exactly equivalent to what's in the NES (the NES has two pulse waves, a triangle wave, and noise, and both pulse waves have pulse width control and independent envelopes; this chip just has three square waves and noise.with one envelope according to the datasheet). And it looks like there's a custom-programmed MCU next to it, plus some sort of ADC for the mics.
Oh Thanks! Even zooming didn't help, your eyes are better ;)
After doing a bit of Googling, it's a variant of the AY 3 8910. I think it was used in the Famicom MMC5 carts that had expanded audio channels.
Did find a interesting Arduino project using this chip:
http://hardchord.org/ymz_shield
Some nice samples @ their site.
Yogi
External Interrupt vs Polled input?
in MIOS programming (C)
Posted
Oh excellent Just been reading chapter 12 so it's a little clearer. The pin mapping seems much easier then Microchip's PPS / Ext/ INT system. Still trying to work out how the ISR handlers are vectored, are there assigned addresses for the jump vectors? Will have to search a bit for an app note that covers this.
unattachISR() as used in the project's Arduino code, was to cut down on ISR calls, I think. Ignoring the 2A03 between APU frame updates. It's probably not an issue with the ARM but the 2A03 circuit will generate a interrupt every 6.7 mS ( the max update rate this circuit can handle) regardless if we have new data pending or not. As long as there is minor impact on the system, the regular ISR calls could be used for synchronizing with the CPU/APU. Could be very useful for direct DPCM playback timing, but still have much research to do there. But with the DAC on the Disco, it's hard to devote much effort to sample playback on the NES CPU, I'll have to think more about that.
Thank you very much for your help,
Yogi.