Thursday, 16 January 2014

Milestag UMT audio



Visit Tagbits to see the full range of tagger products described in this blog.

I'm being asked to do several Milestag projects that use my Tagbits UMT boards, but they need audio resources that are not supported by the standard UMT audio tool.

Jim at Lasertagparts kindly supplies his sample programming utility and audio samples without licence.



However, it only supports 15 sounds, and none are allowed to be longer than the standard samples that Jim provides.

I did a project that shoehorned alternative samples into the lengths available here. But it was a pain.

So I finally got around to writing a utility that allows me to point the PC at a directory with some .WAV files in it.

It reads them all in and works out the lengths, then allocates these to 'sectors' within the ISD1790 playback chip.

This device has analogue memory, with each sector having a timespan of 0.125 seconds.

My program loads the samples up, allocates them sectors, programs them into the the UMT board ISD1790 (combined with custom PIC software to do this), plays the sample from the PC, plays the sample from the UMT board and finally generates a 'C' structure with all the correct addresses in.

Here is a screenshot of the program:



And here is the 'C' output it produces:

 
typedef enum
{
 e01_shot_umt,
 e02_empty_umt,
 e03_clip_umt,
 e04_action_umt,
 e05_miss_umt,
 e06_hit_umt,
 e07_kill_umt,
 e08_power_umt,
 e09_beep_umt,
 e10_buzz_umt,
 e11_medic_umt,
 e12_gameover_umt,
 e13_critical_umt,
 e14_beep2_umt,
 e15_disarm_umt,
} ESoundId;

#define LOWBYTE(value) (value & 0xff)
#define HIGHBYTE(value) (value / 0x100)

typedef struct
{
byte byStartLowByte;
byte byStartHighByte;
byte byEndLowByte;
byte byEndHighByte;
}SSound;

SSound sounds[] =
{
 {LOWBYTE(0x0010),HIGHBYTE(0x0010),LOWBYTE(0x0018),HIGHBYTE(0x0018),},
 {LOWBYTE(0x0019),HIGHBYTE(0x0019),LOWBYTE(0x001A),HIGHBYTE(0x001A),},
 {LOWBYTE(0x001B),HIGHBYTE(0x001B),LOWBYTE(0x001D),HIGHBYTE(0x001D),},
 {LOWBYTE(0x001E),HIGHBYTE(0x001E),LOWBYTE(0x0023),HIGHBYTE(0x0023),},
 {LOWBYTE(0x0024),HIGHBYTE(0x0024),LOWBYTE(0x002A),HIGHBYTE(0x002A),},
 {LOWBYTE(0x002B),HIGHBYTE(0x002B),LOWBYTE(0x002F),HIGHBYTE(0x002F),},
 {LOWBYTE(0x0030),HIGHBYTE(0x0030),LOWBYTE(0x003D),HIGHBYTE(0x003D),},
 {LOWBYTE(0x003E),HIGHBYTE(0x003E),LOWBYTE(0x0048),HIGHBYTE(0x0048),},
 {LOWBYTE(0x0049),HIGHBYTE(0x0049),LOWBYTE(0x004C),HIGHBYTE(0x004C),},
 {LOWBYTE(0x004D),HIGHBYTE(0x004D),LOWBYTE(0x004F),HIGHBYTE(0x004F),},
 {LOWBYTE(0x0050),HIGHBYTE(0x0050),LOWBYTE(0x0056),HIGHBYTE(0x0056),},
 {LOWBYTE(0x0057),HIGHBYTE(0x0057),LOWBYTE(0x005F),HIGHBYTE(0x005F),},
 {LOWBYTE(0x0060),HIGHBYTE(0x0060),LOWBYTE(0x0063),HIGHBYTE(0x0063),},
 {LOWBYTE(0x0064),HIGHBYTE(0x0064),LOWBYTE(0x0067),HIGHBYTE(0x0067),},
 {LOWBYTE(0x0068),HIGHBYTE(0x0068),LOWBYTE(0x006D),HIGHBYTE(0x006D),},
};



It will not work with Jim's standard Milestag UMT software, and I initially thought it could be patched into the existing Milestag code by putting in the new ISD addresses, however, a quick look at a disassembly of Jim's code shows that this will not be possible. However, it could easily be used with my open source UMT code on Github.

Sunday, 12 January 2014

Revised router design

Having finished my router design. I posted some pictures in the forums at http://www.mycncuk.com/, asking for comments. A few of the guys there suggested that my design was potentially weak in that the Y axis SBR20 bearings were loaded incorrectly.

I've had a re-design of the Y gantry. This is now formed from 3 pieces of 15mm aluminium plate bolted together. This depth of 45mm is exactly enough to allow me to mount the Y SBR20 rails on the top and the bottom of this section. Also, I've changed the Y stage to be a rectangular box that surrounds the Y gantry, with the ballnut on one side, and the Z axis on the other.

Thursday, 2 January 2014

Post Xmas Toy



Visit Tagbits to see the full range of tagger products described in this blog.


I've been using my reprap printers to make Milestag Lasertag gun bodies for some time now. But I believe I can make even better gun bodies when removing material, rather than adding it.

So I've designed a CNC router,it's a moving bed design.:



It is designed around some 45mm extruded aluminium that was being thrown out at work. I'm using 20mm (SBR20) linear bearings throughout so it should be pretty tough.

I received the all the linear bits today from Chai at LinearmotionBearings. As my design is a custom build, he made me up an order to my requirements which arrived today, about 14 days after the order, and well packaged:



Everything was there. The ball screws are beautifully machined, but may need a going over with emery cloth when fitting the brackets.



I'd deliberately delayed committing myself to buying any additional parts until these turned up. And I was right to do so. Of the 3 custom linear rail lengths I had requested, two were +5mm in length. This means that I now need to buy custom 45mm aluminium extrusions, rather than the ones I had.

This isn't a major problem, but it has added about 30UKP to the cost of the machine.