Sunday, December 13, 2015

ROM, EPROM, EEPROM that I like

Here is a quick-check list of different roms that are easy to get.
All run on single supply voltages of 5v and are accessed via a parallel bus.
Also listed is what to do with those pesky control pins when if you just want these to be read by the controlling system (NES, Genesis, z80, etc)

8-bit UV Eproms:

27c16 - 2,048b x8 = 2 KBytes 
27c32 - 4,096b x8 = 4 KBytes
27c64 - 8,192b x8 = 8 KBytes 
27c128 - 16,384b x8 = 16 KBytes
27c256 - 32,768b x8 = 32 KBytes
27c512 - 65,536b x8 = 64 Kbytes

8-bit EEPROMs:

29f010 - 131,072b x8 = 128 KBytes alt: 29ee010, 49f010
29f020 - 262,144b x8 = 256 KBytes alt: 49f020
29f040 - 524,288b x8 = 512 KBytes alt: 49f040

8- or 16-bit UV EPROMs:

27c400 - 512Kb x8 or 256Kb x16
27c800 - 1Mb x8 or 512Kb x16
27c160 - 2Mb x8 or 1Mb x16
27c322 - 2Mb x16 (no 8-bit mode available)

8- or 16-bit EEPROMs:

29f200  -  256Kb x8 or 128Kb x16 (~1.64usd ea)
29f400 - 512Kb x8 or 256Kb x16 (~2.11usd ea)
29f800 - 1Mb x8 or 512Kb x16 (~3.12usd ea)
29f160 - 2Mb x8 or 1Mb x16 (price unknown)

8-bit EEPROMs I am looking into:

29- or 49-f040  - 512Kb x8
29f080  -  more info once I use them
29f016
29f032

There are of course hundreds of other roms, but I don't use them.

Control Pins:

None of these pins can be left hanging (disconnected) as far as I know. So don't do it.
Note: "!" will be used to distinguish low-enable pins. This means that when this input is pulled low, the function is enabled.

!CE - Chip Enable, AKA !E:
Most likely your system will need this to be connected to the control bus of the system. Sometimes it is connected to GND directly if your system has NO other memory that it must address. Sometimes it is connect to !OE, but only if your system has no other memory to access.

!WE - Write Enable. AKA !WR:
Typically your system will not be able to program the rom, so this should be pulled high by a resistor connected to vcc. Sometimes you can get away with connecting this pin directly to vcc without a resistor. Anywhere between 4k7 to 10k ohms should be good.

!OE - Output Enable. AKA !RD, !G:
Most likely your system will need this to be connected to the control bus of the system. Sometimes it is connected to GND directly if your system has NO other memory that it must address. Sometimes it is connect to !CE, but only if your system has no other memory to access.

!PGM - Program Enable:
This is similar to !WE but is only seen on a select few ROMs that also require a VPP voltage. Connet this pin to vcc inside your system.

VPP - Programming voltage:
This is typically a high voltage of 12v to 21v required to program a UV EPROM. This is not going to be used by your system, so it should always be pulled high/VCC/+5v.

!OEVPP - Output Enable / Programming voltage
When low (0v), this pin acts as the data output enable pin. When high (vcc) this pin shuts off data output. When connected to vpp (typ. 12v - 21v) this pin acts as vpp putting the chip into programming mode. Connect this pin to your control bus as though it were just !OE.

Q15A-1 - This pin is very special! When in 16-bit mode (byte pin high), this pin is used as data pin D15 or Q15.When in 8-bit mode (byte pin low), this pin is Address pin minus 1. And yes, by minus 1, this is less than 0. What that means is, the pin will connect to A0 on your computer's bus, eprom pin A0 will then connect to computer side A1, etc. here is a little diagram:

rom ---- computer
A-1 ---- A0
A0 ----- A1
A1 ----- A2
A2 ----- A3

!BYTEVPP - Byte Mode / Program Supply:
This pin is pulled high if using the rom in 16-bit mode, or ground when in 8-bit mode.
When this pin is connected either to VSS or VCC, then VPP is ignored, The only time the VPP function is used is when the voltage connected is 12v to 21v as instructed by the appropriate datasheet.
Further explanation from a datasheet:

The M27C160 (for example) has two organisations, Word-wide and Byte-wide. The organisation is selected by the signal level on the BYTEVPP pin. When BYTEVPP is at VIH the Word-wide organisation is selected and the Q15A–1 pin is used for Q15 Data Output. When the BYTEVPP pin is at VIL the Byte-wide organisation is selected and the Q15A–1 pin is used for the Address Input A–1. When the memory is logically regarded as 16 bit wide, but read in the Byte-wide organisation, then with A–1 at VIL the lower 8 bits of the 16 bit data are selected and with A–1 at VIH the upper 8 bits of the 16 bit data are selected.

For a much more in-depth explanation of eproms, see:
https://wiki.xtronics.com/index.php/How_EPROMS_Work



Saturday, December 12, 2015

Odyssey 2 variety cart

I am also currently working on a flash cart for the Odyssey 2 that supports a wide array of roms, proms, eproms, etc.

27C-, 28F-, 29F-, 29EE-, 49F-, etc.
16, 32, 64, 128, 256, 512, 010, 020, 040, and maybe more.


SwinSID SE - reworked by Me

Been toying with the SwinSID which is a decent DIY version of the SID chip. My version takes up no more space than the original and would be a drop-in-replacement with no extra wiring. Programming the atmega would be a little difficult though since there is no room for an ICSP.

SMS variety Cart

Currently working on a flash cart for the SMS that supports a wide array of roms, proms, eproms, etc.

27C-, 28F-, 29F-, 29EE-, 49F-, etc.
16, 32, 64, 128, 256, 512, 010, 020, 040, and maybe more.

Problem is ... I don't own a Master System to test these out. I will not be printing any until I get one.


Tuesday, December 8, 2015

Composite Video from the Nintendo Gameboy

My latest project is to get some sort of video output from the nintendo gameboy. The signals are all present, but are not in a form that can be connected to any television or monitor. My first thought is to convert the signals into a single analog signal called composite video.

Composite video is named as such because it contains color data (chroma), brightness (luma) and synchronization on wire.

1. Chroma is not important in this case becuase the gameboy is monochrome. All of the color differences will be made with Luma.

2. Luma: As above, the Luma will be used to create our four different colors. The TV looks for an analog signal here. The gameboy has two data pins which are used for this purpose, so connected through a DAC of some sort, we can create four different levels rather than just 0v and 5v.

3. Sync
 Csync or composite sync is an XOR of horizontal and vertical sync. These two signals tell the television to move down one line or to move back to the top of the screen. I am not quite sure how progressive or interlaced are determined by these just yet.

Next, these have to be connected together over one wire. As mentioned, the luma is an analog value but what I forgot to mention was that it is a positive signal whereas sync is negative. From what I have read, composite must be AC coupled because the TV input is DC coupled. That being said, our sync can actually be positive as well, as long as the luma is offset by DC value. Once the signal goes into the TV, the DC coupling circuit will block the average DC offset which is our black level. Black level will become 0 volts inside the Tv so sync will become 0v to -0.4v and Luma will be between 0v and +0.7v.

I am not at liberty to share my schematic at this point but it doesn't' work that well anyhow. :P
As a first attempt however, the result is quite promising.

You will notice that the image scrolls in several directions and that it is repeated three times over from left to right. I believe this is a problem with synchronization and possibly the LCD itself.


Updates to follow shortly. 

Saturday, August 22, 2015

Miracle Piano Final Thougts

I finally had time to probe a few pins inside the Miracle Piano.

AS0012 - Pin 21 (PWM)
It turns out this pin controls the master volume and NOT the envelope as I had originally assumed.
Turning on the keyboard, this pin defaults to about 50%, but as you can see, it is not exactly 50%. How odd.
When the volume is reduced, the pulse width is widened and when the volume is increased, the pulse width is reduced. That is because the integrator, U4A is inverting the output.

Each photo has the scope set to 10 microseconds per division:

Default Volume:



Highest Volume:



Lowest volume:



U4 - Pin 1
This pin goes to the LM13700 to control the master volume, or gain of the sound. It appears as a DC voltage and is remarkably solid. There is no visible ripple as would be expected from an integrator.
No photo is needed of this signal.

J004 - Pins 21-24 (OUT1-OUT4)
The signals from these pins are too small to view on my scope, so I chose the amplified versions from U10. Pins 1, 8, 7 and 14 respectively.

OUT1 is not active for all sound samples, apparently. When Harpsichord and Synthesizer are selected, nothing comes out at all.
When the other four sounds are selected however, the waveform is perfectly clear.

OUT2 is the opposite. Only when Harpsichord and Synth are selected, do we see any activity on this pin.

OUT3 mimics OUT1 exactly, or at least as far as I can tell.

OUT4 on the other hand does not seem to react to any button or key. It simply outputs a DC voltage which measures 5.03v at pin 14 of U10.

I can speculate as to why there are three OUT pins. While probing both Pins 8 and 14 of U4 which has the mixed and filtered outputs split to both left and right output terminals, the waveforms are identical for Harpsichord and Synthesizer but are not identical for the other four sounds. It would seem that Harpsichord and Synthesizer were recorded and digitized in mono while the other four sounds were recorded and digitized in stereo.

I am a little saddened that the envelope is not broken out to any specific pin or sub-circuit.

Some other Notes

J004 - Pin 40 (Bus Strobe)
This pin reacts differently for different sounds, however, when the key is pressed with a sound that has an attack and release; the pin will strobe for the full length of the sound and go to 0 when the note is finished.
For a sound that ends only when the key is released, the pin strobes at key press for a moment, then goes to 0 and strobes once again when the note is released.

I could use this pin for creating a gate and trigger, but it would require that I charge a capacitor then feed it through a comparator and set up some logic to keep the signal high when the key is pressed and low when the key is released. This wouldn't require too much effort, but the function would change from sample to sample since the envelopes are all different. I don't thin the modification is worth it in this case.

"Piano" sample is very hard to photograph since the amplitude changes so rapidly in software. It looks very similar to "Organ, but is more rounded whereas the Organ is more triangular.


"Organ:"



This photo shows a sample that is identical on both sound channels. Trust me, they are identical but the channels are not being displayed the same way.


These two photos show sounds that are not identical from OUT1 and OUT2.



PS: Yes, the reflection in my oscope is naked. Deal with it.

Monday, June 1, 2015

min64 - The bare minimum rom cart for commodore 64

The idea was to design a cart that would fit entirely in the commodore without sticking out. Surprisingly, it could even be made small enough to fit a shell, if I make one in the future.

The board has has one ROM and thats it.








The board is a meer 1.05 inches deep and has notches for easy removal or mounting (granted a shell is designed). Measuring my own commodore, a board of 1.1875 inches would be flush with the chassis. Also has optional reset switch as suggested by catskull.

My main concern was supporting as many proms, eproms and eeproms as I could since too many are no longer made, but easy to find.

Those supported include:

28F010, 28F020, 28F040,
29F010, 29F020, 29F040,
49F010, 49F020, 49F040
2764, 27128, 27256, 27512
27c64, 27c128, 27c256, 27c512

As well as SF's, GL's, EE's, etc.

Also working on support for 2704, 2708, 2716, and 2732. These will fit, but would require a few rerouted pins.

In any case, I can't wait for these to arrive from OSHpark.

Monday, April 27, 2015

Miracle Piano Modding

I am in the market for a Keyboard controller with CV and gate outputs, but am having difficulty winning a cheap on e on ebay lately. This has led me to explore alternate options. I thought it may be reasonable to mod my existing keyboard considering it has MIDI output which can be converted into CV!

Sadly my Miracle Piano is the only keyboard I own right now, so it will have to do. It has a lot of space on the inside, but not all of it is located in the best of locations. Looking here, there is a 2" x 5.75" space perfect for adding pots or 3.5mm jacks.






I also have the prefect schematic to add inside. It is MFOS's MIDI2CV board:

http://musicfromouterspace.com/analogsynth_new/THE_CAVE/MIDI%20to%20CV%20Old%20Design%20I/midi2cv.htm

This board requires +12v and -12v to power the op amps, but the rest of the board runs on +5v. I may or may not add a designated 5 volt regulator, or I may tap into the 5volts on the keyboard. Either way, I need to make sure I get a regulated +12volts so I will have to do some probing around to find a source. The keyboard requires 12VAC to run, but I have been running it on 9VAC...

Without looking at the power section on the board, I expect it to have either a transformer or a bridge rectifier. Hopefully I can access both positive and negative 12 volts. If I cannot I will have to limit the op amp outputs. I really don't want any clipping here...

I want the keyboard to work on the 1volt per octave scheme, but also be able to scale differently with knobs for gain and offset. This would allow for me to change octaves and such. Worse case scenario, I can add internal trimmers to permanently set the offset and gain to a fixed octave.

I also need to make sure the keyboard retains all of its existing functions, which it should. I also want it to fit comfortably without too heavy of modding. I may have to open this thing up several more times after installation. Maybe for more mods!

My design so far is smaller than 2"x5" but he connectors would not fit on the same board. The idea is to stack a second board with headers to connect all of the circuit to the I/O connectors. Then the I/O board will be fastened to the shell by the potentiometers and jacks.

I think that I will design this as a euro module first and foremost, but also keep the board within these few strict rules so I can transplant it into the keyboard. I like this idea the more I think about it.

Stay tuned for more.

Wednesday, March 4, 2015

CCAM - Crystal Clear Audio Mod for Sega Genesis/MegaDrive by Tiido

I took an afternoon to look at Tiido's circuit to clean up and amplify certain channels on the poorer created versions of the Sega Genesis and megadrive. This circuit separates all of the audio channels, amplifies them individually, mixes, amplifies again, offsets the DC output and applies a low pass filter. This is based on the sound filter inside of the original "HD Graphics" models of the sega genesis which arguably has the best sounding output.

I have taken the liberty of redesigning the circuit with all higher quality 1% tolerant, through-hole components, a low power op amp and easy to solder tie points for installation.




































Sunday, February 22, 2015

Fun with the Sega Genesis - Ultimate Portable Game player

Found a crazy deal on fleabay for one of these and had to have it. I had heard stories of how badly they are made, and how miserable the audio is.
All very true, but I think it can be improved a little.

The video is great, the size a too small, the sound from the speaker is crap but the sound from the headphone could be worse.
I immediately took it apart after opening the box. I was THRILLED to see only one epoxy-chip and several SOP's! :D

I want to believe that the audio issue is because of the amp/filter they have used. Through headphones, it sounds ok, but also a little clipped and shallow. This could also be because of the power supply, which is very weak. The battery is 3.7v and droops when the PSG is loud.




Its like a portable MP3 player considering all the titles that have sound tests. :p
You know, except horrible sounding.