MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

ROM Burning- Step by Step Instructions
MUFF WIGGLER Forum Index -> The Harvestman Goto page 1, 2, 3, 4  Next [all]
Author ROM Burning- Step by Step Instructions
Montag
Since proper information for burning eeproms for the Piston Honda (as well as forthcoming modules?) is scattered all over the place, I created a list of instructions to easily achieve this task. Most of this information comes directly from bsmith as he helped me along the process, with added essentials by The Harvestman himself. These instructions are Mac-centric, but I imagine the process is similar, if not simpler, if you're on a PC. I tried to spell everything out, but if it's not clear let me know. Also, I did all the setup last summer, so some details regarding the installation process are a little foggy but should be essentially correct. Okay, here we go!

First get a pickit2:
http://www.mouser.com/ProductDetail/Microchip/PG164120/?qs=FF3lEoAMV0v %252b04QthdnDhQ%3d%3d

And some 25AA512 eeproms:
http://www.mouser.com/ProductDetail/Microchip-Technology/25AA512-I-P/? qs=sGAEpiMZZMuVhdAcoizlRSetfYkAy0SV2%2fnILiVfi4s%3d

The 25AA512's are re-writable so you don't have to get many of them.

Next, download Wave256:
http://www.sonicspot.com/wave256/wave256.html [FIXED LINK]

Since Wave256 is a PC program, you'll need Wine/WineBottler to run it on Mac OS X:
http://winebottler.kronenberg.org/

And IntelHex python scripts to convert the wave256 files into Hex format:
http://mac.softpedia.com/get/Development/Libraries/IntelHex.shtml

And Python to run the conversion between .256 to Hex
http://www.python.org/

Once you download everything, drop wine/winebottler, and wave256 into the applications folder, put the intelhex folder on your desktop (for the example described below), and run the Python installer. If you want to write waveforms or view .256 files, go ahead and use wave256 under Wine.

The Piston Honda doesn't eat .256 files, so you'll have to convert them into hex format. When you're ready to convert .256 files into hex (and you can use the new.256 file that comes with Wave256 as practice), you'll need to use Terminal, which is in your Utilities folder.

Once Terminal is open, change directories until you get to your Intelhex folder (such as on the desktop). To do this, use the "cd [place]" command. If the folder is on your desktop, enter "cd desktop" (without quotations), then "cd intelhex" (again without quotations). Once you're in the Intelhex folder, type "setup.py install" which will install the conversion python script on your computer.

You'll see that inside the intelhex folder is a subfolder called Scripts. The one that's most important for this process is called bin2hex.py.

To convert .256 to .hex, issue a command in terminal "bin2hex.py XXX.256 XXX.HEX" (without quotations, and with XXX being the filename you're converting.)

For example, if you're converting the new.256 file, first drag the new.256 file to your desktop. Then startup Terminal. Enter "CD Desktop"

Enter "bin2hex.py new.256 new.HEX" (without quotations)

And then you'll have a new.hex file sitting on your desktop!

To put a .hex file onto the Piston Honda, get a solderless breadboard at Radio Shack and the little wire lead kit (or some smallish gauge solid wire). Plug the 25AA512 chip into the middle of the breadboard with the little gap between the legs. The dot indentation on the 25AA512 is indication of the top and the numbers for each leg are as follows:

1 8
2 7
3 6
4 5

The numbers on your PicKit2 are as follows, with the arrow pointing to 1:

> 1
2
3
4
5
6

Use the wire to connect the PicKit2 to the 25AA512 as follows (picKit2 on left, chip on right):

1---1
2---8
3---4
4---2
5---6
6---5
and connect pin 7 and 3 on the 25AA512 to pin 8 on the 25AA512

Once you're all hooked up, type in Terminal:

"./pk2cmd -A3.3 -P25LC512 -F/Users/montag/Desktop/XXX.HEX -M"

(without quotations, and substitute "montag" with your user folder name, and substitute "XXX" with the name of your .HEX file)

Your wavetable will now burn to the chip and terminal will let you know if the operation was successful.

Here is a shorthand reference of the process which nixes all the setup. This is helpful for future burns once you're up and running:
Quote:

1. Put xxx.256 file on desktop
2. Open Terminal
3. Enter cd desktop
4. Enter "bin2hex.py xxx.256 xxx.hex"
5. Find the newly created xxx.hex file on the desktop
6. Plug in PICkit Programmer
7. Connect the PICkit to the breadboard w/ chip dot facing up, using below connections

1--1
2--8
3--4
4--2
5--6
6--5
And connect pins 7 and 3 on the 25AA512 to pin 8


8. Type in Terminal:
"./pk2cmd -A3.3 -P25LC512 -F/Users/montag/desktop/XXX.HEX -M"


Voila! Good luck and happy burning!

I hope this takes away some intimidation from the whole process and allows for more wigglers to get some new waveforms on your Piston Hondas. Perhaps the rest of this thread could be a compilation of .HEX files for fellow wigglers to try out?

Cheers,
Alex
lessavyfav
This is great! Super clear applause
but...

The part that is more confusing to me then the hardware setup is how to properly format the audio file... I could handle getting a random audio file down to the right number of samples but getting stuff organized properly into banks with the right number of samples and sample rate and such is somehow the greater mystery for me. I'd love some insight about the process of creating the .256 file- is there a way to create some kind o template in Audacity?

hmmm.....
Bricks
Oh, wow, I literally just finished typing this up in a PM. Might as well post it here too for everyone:

I use audacity to do my editing. I do my work at 44100 hz. Since each waveform is 256 samples, if you divide 44100 by 256, you get 172.265hz, which is the ideal rate to sample external sources at. If you're loading in sound effects and whatnot, it doesn't really matter, but if you're looking to fit a single waveform in 256 samples, this is the way to go.

When we made the 1µp ROM, I recorded samples from my NES as close to that frequency as possible, though I had to use "Change Speed" effect to get it tuned (JBartee helped me find this one - "change speed" will alter the length of the selection without trying to correct for pitch change like most modern timestretch stuff does)

A good way to tune stuff to this frequency is to go to the "Generate" menu in Audacity, select "Tone..." and make a Sine wave that is 172.265 hz, and compare your samples for beating against that frequency.

The rom is just 16 rows of 16 waveforms (with each sample being 256 samples). So 16 * 16 * 256 = 65536 samples total per ROM. The nice thing about audacity is it lets you select and navigate by samples. It took me a while to figure out some of the keystrokes and get comfy in the environment, but now I'm decently speedy at it. You can use the Arrow Keys to go to the end of a selection and paste something in, which is a good way to make sure you're lining up your waveforms in a row and that they're all the right sample length. Keep an eye on your lengths - it is easy to get off by one or two and throw off the whole thing. I try to at least keep each 16 waveform row (4096 samples) as a separated file region, for easy moving stuff around and whatnot.

As far as previewing, I listen as I go - if you select audio in audacity, hold shift, and press space, it will loop. So if you do that with 256 samples (ie a single waveform) you can get a feel for what it will sound like
dude
this thread makes me wish badly that i had some reason to burn roms using these instructions. i have digi osc envy i do. you guys are awesome for helping those not in the know. tis inspiresome. i give you a slow person clapping:
applause
that slow person is me
HueMonContact
Bricks wrote:
Oh, wow, I literally just finished typing this up in a PM. Might as well post it here too for everyone:

I use audacity to do my editing. I do my work at 44100 hz. Since each waveform is 256 samples, if you divide 44100 by 256, you get 172.265hz, which is the ideal rate to sample external sources at. If you're loading in sound effects and whatnot, it doesn't really matter, but if you're looking to fit a single waveform in 256 samples, this is the way to go.

When we made the 1µp ROM, I recorded samples from my NES as close to that frequency as possible, though I had to use "Change Speed" effect to get it tuned (JBartee helped me find this one - "change speed" will alter the length of the selection without trying to correct for pitch change like most modern timestretch stuff does)

A good way to tune stuff to this frequency is to go to the "Generate" menu in Audacity, select "Tone..." and make a Sine wave that is 172.265 hz, and compare your samples for beating against that frequency.

The rom is just 16 rows of 16 waveforms (with each sample being 256 samples). So 16 * 16 * 256 = 65536 samples total per ROM. The nice thing about audacity is it lets you select and navigate by samples. It took me a while to figure out some of the keystrokes and get comfy in the environment, but now I'm decently speedy at it. You can use the Arrow Keys to go to the end of a selection and paste something in, which is a good way to make sure you're lining up your waveforms in a row and that they're all the right sample length. Keep an eye on your lengths - it is easy to get off by one or two and throw off the whole thing. I try to at least keep each 16 waveform row (4096 samples) as a separated file region, for easy moving stuff around and whatnot.

As far as previewing, I listen as I go - if you select audio in audacity, hold shift, and press space, it will loop. So if you do that with 256 samples (ie a single waveform) you can get a feel for what it will sound like


I have a very similar approach using soundforge to make the content of my roms.
amsonx
I'm waiting for a PH and this trhead is very useful for a PH noob as me !
Montang thanks for post this .

Diego
boramx
thanks so much fellas! i'll dig in later when i get my programmer. more questions then, perhaps.
Nuuj
This should become a sticky.

Just got my PH with bsmith ROMs yesterday.
It will probably be a while before I get bored enough of them to want to do my own.

Anyone here any news about the official tool?

the Harvestman programmer
lessavyfav
if you are using Audacity or Soundforge am I correct in assuming that you don't need wave256? Instead of hexing a .256 file you hex a wav?
jbartee
lessavyfav wrote:
if you are using Audacity or Soundforge am I correct in assuming that you don't need wave256? Instead of hexing a .256 file you hex a wav?


You are correct that you don't need wave256, but you don't want to export your work as wav or any other audio file. You want to save as raw data -8bit, unsigned. Haven't used soundforge in over a decade, but in audacity this can be configured in the "export" menu. You then convert the raw binary to hex.
bsmith
Not a bad idea to build a template in wave256 with nothing but ramp waves across all banks or something just to give you visual guideposts when working in soundforge or audacity....
Mans
jbartee wrote:
lessavyfav wrote:
if you are using Audacity or Soundforge am I correct in assuming that you don't need wave256? Instead of hexing a .256 file you hex a wav?


You are correct that you don't need wave256, but you don't want to export your work as wav or any other audio file. You want to save as raw data -8bit, unsigned. Haven't used soundforge in over a decade, but in audacity this can be configured in the "export" menu. You then convert the raw binary to hex.


How does this audio file look then? It's just all the waves after each other? And it gets split up in 16 x 16 by burning it?
jbartee
Mans wrote:
jbartee wrote:
lessavyfav wrote:
if you are using Audacity or Soundforge am I correct in assuming that you don't need wave256? Instead of hexing a .256 file you hex a wav?


You are correct that you don't need wave256, but you don't want to export your work as wav or any other audio file. You want to save as raw data -8bit, unsigned. Haven't used soundforge in over a decade, but in audacity this can be configured in the "export" menu. You then convert the raw binary to hex.


How does this audio file look then? It's just all the waves after each other? And it gets split up in 16 x 16 by burning it?


Yeah, the waves are just sequential. They remain one big chunk when burning, it's not until playback on your wavetable osc of choice that it gets indexed into 16*16.
lessavyfav
[quote="bsmith"]Not a bad idea to build a template in wave256 with nothing but ramp waves across all banks or something just to give you visual guideposts when working in soundforge or audacity....[/quote]

SMART!
Mans
jbartee wrote:
Yeah, the waves are just sequential. They remain one big chunk when burning, it's not until playback on your wavetable osc of choice that it gets indexed into 16*16.


I see! This is begging for some experimentation thumbs up
boramx
Ok guys-
How do we import a .256 of all ramp waves to audacity? The "reference file" spoken of above.
bsmith
Generate the file of ramp waves in wave256 - one way is to morph from a ramp on the first waveform to the same ramp on the 16th waveform (which will just copy the same ramp across the bank), and do the same thing on each bank.
On the opening in audacity tip see jbartee's excellent post here.
Bricks
Once you get handy with audacity, making yourself a reference would be trivial.

I made one just now in about 30 seconds (generated a Saw tone at a frequency of 172.265625 hz, specified it should be 256 samples long, then copy pasted it so I had 16 of them. Consolidated that which made a 4096 sample long block, which I then copy pasted so that I'd have 16 of them.. aka 65536 samples. Aka 256 * 256... aka 2^16)

But I think using the graphics of the waveforms as a reference is tricky, and a good way to fall out of alignment. Definitely get handy with the Selection Start and Selection End tool bars at the bottom of the screen. You can then very easily work in 256 sample chunks
Mans
I plan on using Audition to generate the waves. If you're generating you can work in 16kHz or a multiple: 32kHz/256 = 125Hz.
jbartee
Between this excellent guide and μBurn, I think we should be able to get any mac user who wants to burn roms smoothly sailing. I know Scott's busting out his device programmer at some point soon, which will streamline the process even more. In the meantime, here's a couple pictures of my setup to prove how easy the hardware side of this is:




(if you're wondering why the soldering work is so tragic here, it's because I was trying to eat fish sticks and text at the same time. Whatever man, it works, get off my case)

As long as your USB port can bus power it (which if you're running a mac is a safe bet) then you don't even need any active components. It's just a socket, a small piece of protoboard, and a 6 pin header.
phase ghost
I'm having an issue buring roms. I've downloaded python, intelhex and the latest pickit software (for pickit 2). Also, I've named the folders to PK2CMD and intelhex. Everything seems to be right.

However, after I enter a name for the rom I get the following error:

Traceback (most recent call last):
File "/Users/anthony/Documents/intelhex/scripts/bin2hex.py", line 45 in <module>
from intelhex import bin2hex
ImportError: No module named intelhex

Any ideas?

seriously, i just don't get it
phase ghost
This is using the uBurn software by the way.

Also, I tried to do it the way mentioned in this thread and I get the error when trying to install the setup.py file:

-bash: setup.py: command not found

The setup.py file is obviously there, but I'm not sure why this is not working for me.
bsmith
got download the intelhex sources here:
http://www.bialix.com/intelhex/
go into that directory and:
sudo python setup.py install
and bobs yer uncle.
phase ghost
I can convert to hex using the terminal. However, the line that burns to the rom returns:

./pk2cmd: No such file or directory

edit***

I am calling this from the scripts folder
jbartee
edit

Never mind, I just read your earlier post.
MUFF WIGGLER Forum Index -> The Harvestman Goto page 1, 2, 3, 4  Next [all]
Page 1 of 4
Powered by phpBB © phpBB Group