6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Sep 19, 2024 11:02 pm

All times are UTC




Post new topic Reply to topic  [ 746 posts ]  Go to page Previous  1 ... 19, 20, 21, 22, 23, 24, 25 ... 50  Next
Author Message
PostPosted: Sat Nov 14, 2015 11:56 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
Phase Two of the Vulcan-74 Build has now commenced.
The second giant board will become the Four Voice Sound System.

Image
VCC and GND connections have been completed.

It was a little boring cutting and stripping the 145 small GND and VCC wires, but the job is done.
I also added a pair of 74HC245s to buffer and switch the Atari / C64 compatible Joysticks.
The Joysticks drive directly into the main Data Bus when the OE lines are pulled low.
I am only using 5 of the available 8 bits for Up, Down, Left, Right & Fire.

Image
The 74HC245s buffer and switch the Joystick inputs.

Next, I will solder up another set of 512K SRAMs for use as the Sound memory.
This will be done just like last time, as posted here...

http://forum.6502.org/viewtopic.php?f=4&t=3329&p=38423#p38423

Image
10 Nanosecond 512K SRAM made breadboard compatible.

Once the 1 Megabyte of SRAM is ready, I will then layout one of the four sound voices.
Each Voice is identical, and they are mixed down as 4:2 for stereo output.

The Sound Generator will have the following features for each Voice...

Set Volume : 8 Bits
Set Frequency : 16 Bits
Set Low Pass : 8 Bits
Set Sample Position : 20 Bits

To simplify the quad 20 bit counter / multiplexer design, a value of 255 designates EOF (end of file) to stop the sample address counter.
My Vulcan-74 Toolkit converts any WAV file to data compatible with the system, and adds the EOF marker automatically.

If I have board space, I may also include a looping mode / counter.

Later!
Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 17, 2015 12:58 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
On my commute home from work today, I did some thinking about the layout of each Voice in my Sound Generator.
The original design had 1024K of SRAM shared by all Voices through a sequenced multiplexer (lots of chips!).
I realized that if I just give each Voice its own 512K, then this cuts the chip count down by 25 percent.
Another benefit to the new design is double the memory to store samples (2048K total).

Here is the initial layout of the digital section of one Voice...

Image
This will be enough to test single sample playback.

Operation of the digital section is very simple...

The lower 590 counters run from the master "Sound Clock", and wrap at the 16 bit value stored in the 688s.
During a wrap, the 688 resets the 590s, but also pulses the 19 bit counter above, incrementing te sample address.
When a sample is detected as 255 by the EOF (End of File) 688, it triggers a 74 flipflop to shut off the main counters.
Resetting the 74 is the "Play" command to start the sample playing again.
A Sample can begin anywhere in the 512K, and is set by loading the 19 bit counter made of 5 x 193 counters.
The 8 bit data from the SRAM is fed into an 8 bit R2R DAC, and then to an LM358 voltage follower as a buffer.

Image
An 8 Bit R2R DAC feeds an LM358 Voltage Follower.

I will just connect my audio amp to the 358 for now, and work on the other analog parts later.
Also to be included in the analog section will be Volume Control, and a Low Pass Filter (C64 style).

All 4 Voices will be identical in operation and hardware, mixed down to a 1/8 PC compatible stereo output.
When I have 2-3 hours of free time, I will wire things up and put some sound to those bouncing balls!

*Note*.. Yes, I fixed the DAC resistors! Didn't notice until I posted the nice bright photo!

Cheers!
Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 17, 2015 2:17 am 
Offline

Joined: Sun Aug 30, 2015 10:23 pm
Posts: 36
Why do you need the 10ns RAM for sample memory, couldn't you use an off-the-shelf DIP SRAM like the AS6c4008 which is a 512kB SRAM with 55ns time? Seems like less of a hassle, given that you'll be reading memory at audio-rates, not VGA rates like in your video board?


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 17, 2015 5:38 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
Quote:
*Note*.. Yes, I fixed the DAC resistors! Didn't notice until I posted the nice bright photo!

Funny how that happens. I've spent days on PCB layouts, and notice nothing wrong, and as soon as I get the board in hand, I spot a mistake right away.


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 17, 2015 3:56 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
I certainty could! In fact, when I do the PCB, it will have a SOJ land pattern right between the DIP pattern.
The reason I chose to use the CY7C is because Vulcan will then have 10 of the same SRAM, and there is a price break at 10.
The other reason is because I am very eccentric about symmetry. Same color wires for certain functions, things in a row, etc.
Oh, and also because I have a tray of 100+ of these 10ns SRAMs in my collection!

Brad

porcupine wrote:
Why do you need the 10ns RAM for sample memory, couldn't you use an off-the-shelf DIP SRAM like the AS6c4008 which is a 512kB SRAM with 55ns time? Seems like less of a hassle, given that you'll be reading memory at audio-rates, not VGA rates like in your video board?


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 23, 2015 2:23 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
Wow, time has been very limited lately, but I did get 2 hours to connect some wires tonight.
In this test, I use an AVR to load a 32K sample into the 512K memory.
After the sample is loaded, the AVR goes invisible and the 19 Bit Address Generator takes over.
There is no End Of File checking here, so the audio becomes White Noise as random bits are sent.
The 8 Bit R2R Resistor DAC converts the 8 bit data into analog audio, then passes it to the LM358.
The LM358 is a buffer that outputs the audio to the 1/8" PC Speaker compatible jack.

Wiring is a horrible mess, since I am only testing at this point...

Image
A very basic test of the Sample memory and DAC.

Here is a video of Vulcan-74 Rockin' on to music of an appropriate era...

https://youtu.be/CUAbSSq74V4

Funny, last time I had this cranked, I was probably trying to rip sprites from a C64 game!

So, this first basic test proves out the Address Counter and DAC subsystems.
Next, I will connect the 688 that controls the End Of File detection to stop the sample.

The sample data used for the AVR loader was made using my WAVE to DATA converter, which is built into the Vulcan-74 Toolkit I have been working on. This PC program will convert Bitmaps and Wave files to C or Assembly data that can be included in any toolchain for any micro-controller.

The sample was saved at 15,000 Hertz, and used up only 32K of the available 512K dedicated Voice Memory.
Each of the 4 voices will have its own 512K SRAM, so a lot of sample data can be loaded.
With 2MB of dedicated Sound Memory available, game music and effects will be rich indeed!

Ok, next post will show the Frequency Generator and EOF Detector working.

...Like a hurricane!
Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 27, 2015 10:49 am 
Offline

Joined: Fri Nov 27, 2015 10:09 am
Posts: 67
Amazing work, Oneironaut.

I've been thinking about something similar myself, but never had the time to even start it. I thought I'd share some ideas that you might be interested in.

One feature that very few "retro GPU" projects have in their blitter's is support for 3D. None of that texture mapped, pixel shaded rubbish, I mean basic line drawing and polygon filling. On the Amiga the blitter could do line drawing in a normal mode and a special "1 pixel per scanline" mode which it could then use for a simple scanline based fill (start/stop pixels). It wasn't ideal for 3D because you had to draw the lines, then fill the polygon, and then blit it into the main bitmap, but it still got a lot of use in early 3D games. Of course there was no hardware assisted maths processing, the CPU had to do all that.

I'd like to make something that could run 3D games like Hard Drivin or Elite with hardware assisted flat shaded 3D. I think a dedicated "fill scanline between x1 and x2 with colour c" function would probably do it. The CPU could calculate the polygons using whatever clever integer maths hacks the coder could come up with. Performance could be improved by having a draw list, but I think it's more fun to try to pipeline your code.

Maybe this could be achieved with your sprite engine. Just have a flat shaded source bitmap and vary the x position and width. Could be really fun to try.

The other thing I really love are co-processors, or coppers. Fancy building a simple four instruction CPU? :-)

Oh, and for games, you could do some kind of collision detection in hardware. Pixel perfect collision detection is always tricky for CPUs that otherwise avoid handling graphic data. All it would need is some kind of flag that gets set when you see an overlap during blitting... Easier said that done I'm sure.

Keep up the good work, I love following it!


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 27, 2015 11:48 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
A copro to do multiplication, or to do 4x4 matrix multiplication, might be very useful for 3D. Might be worth a look at the SNES' 5A22.


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 27, 2015 6:13 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
Had 2 hours this morning to work on the project, and made progress on the Frequency Generator.
Playback frequency can now be set by the external controller, and the end of sample detector is working.
The master Sound Clock is 20MHz, and playback can be set from 0 to 78 KHz, with 16 bit resolution.
How this works...

Dual 74HC590 counters are chained to create a 16 bit counter, which is clocked at 20MHz.
Dual 74HC688 comparators are set to reset the counter at some 16 bit value.
On a reset, the pulse is sent to a set of 5 x 74HC193 counters, setup as a 19 bit counter to the SRAM.
Sample position is set by loading the value into the 193 counters (3 bytes).
End of playback is detected by an output value of 255 from the SRAM into another 688.
The 688 triggers a 74HC74 flip flop to stop the counters.

Here is a quick demo of it working...

https://youtu.be/fuJz3ERi8Kg

And some photos of the ever growing wiring mess that is soon due for a cleanup!...

Image
Added Frequency Generator and Sample End Detector.

Although I can run the Sound Generator completely independent of the Video Generator, I like to look at something while I work.
Added a little Tribute to Van Halen, since I shamelessly stole the intro to Jump as a test of my Sample Playback Circuit!...

Image
Thanks Eddy!

This part didn't really involve any challenge, as it is nothing but a bunch of slow speed counters and a few logic gates.
The Analog Section will be a lot more fun, as it is much more of a dark art than digital logic!
I will be adding an 8 bit Digital to Analog Volume Control and an 8 Bit controllable Low Pass Filter next.
Both Analog systems will be made of LM358 Op Amps and some discrete components.

Once all of the sub-systems are working, I will build Voice #2 next to Voice#1, with an optimized component layout.
From there, all wiring will be cleanup up, and then the Voices #3 and #4 will be added.
Once all 4 Identical Voices are working, I will add the final dual 2:1 mixer to get Stereo output (Amiga Style).

That's all for a few more days... Cheers!
Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 27, 2015 7:33 pm 
Offline
User avatar

Joined: Fri Oct 30, 2015 9:49 pm
Posts: 54
Location: San Antonio, TX
I just joined and saw this project for the first time...

This is epic, awesome work, keep it up...


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 27, 2015 8:52 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
(ditto, Alamo) I'm a newbie and not horribly informed about what goes on in the world of electronics (ancient or recent!). Your project caught my attention when I saw you bending the SRAM pins and soldering them to DIP sockets. Awesome idea!

My project (still just half an idea) had ruled out video, at the outset, but you make me wonder about what I might make a 65xx do...hmmmm....


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 27, 2015 8:59 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
I am reminded of a youtube talk I just saw the other day. Atari. 6507. I know very little and can barely follow the discussion, but to watch the talk, one gets the idea that 65xx can do lots with video. The early atari games seemed incredibly primitive, but towards the end, the "space" game is quite good! (I just searched youtube and found two talks on Atari assembly language that are much longer; like an hour a piece. I'll put the links here--even though off-topic--for ease of use, but I haven't watched them yet.).

First; https://www.youtube.com/watch?v=oxiNzGCWWeU

And: (1) https://www.youtube.com/watch?v=Ulcq0pVlQ1c (2) https://www.youtube.com/watch?v=aNyebnxV9R8

Now, I think I'll wander over to wikipedia and see if I can figure out what a vulcan is (other than pointy-eared Spock!).


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 27, 2015 9:06 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
Oh, I see; you meant Spock. Well wikipedia says somebody already Vulcan-ized a computer once (a MITS altair clone). Very logical, I guess.


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 27, 2015 9:19 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
Quote:
Should any of these beasts work properly?? Probably not, but they do.
So like a veteran skydiver, I no longer fear the heights of high speed breadboard designs. Success has told me otherwise.

In my lab, a breadboard starts at 20MHz, and only starts to fly apart when you scrape the edge of minimum propagation delays of ICs being used.
So, when I say I will run a 65C02 at 16 or 20 MHz into a 3 foot squared breadboard populated with 300+ logic chips, I ain't kidding man!

For me, the enthusiasm begins when I hear... "that ain't gonna work, dude!".


This gives me hope, but my projects are already too foolish. I shouldn't be encouraged.

( You just gave me a great idea. I have this old image sensor project that never got done, in large part because SMT and PCB was kicking my butt. After visiting this thread I am already thinking about breadboarding the circuit. This would only leave the design of the optics as the "X-factor"!). Thanks. (My image sensor-mess; download/file.php?id=2946&mode=view)


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 30, 2015 12:14 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
Thanks again for the comments.
The weather out here has been abnormally warm (only -2 today), so the new chicken coop has taken my weekend hacking time away lately!
I did alter the Sound Generator somewhat, but have not tested the new design enough to make a new video.

Originally, the 19 bit Sample Address Counters were loaded directly to set the Sample Start Address, but now I have added latches.
This change allows the Sample to be replayed by a single IO line, rather than having to load the 3x8 bits for the Address each time.
When the sample reaches its end, the counters are automatically reloaded by the value in the 74HC574 latches.

I also changed the End of File marker to be a 0 rather than a 255 in order to eliminate the pops when a sample stars or ends.
My WAV to Data converter also ramps the begging and end of a sample to further reduce any chance of a pop.
A loud pop will occur if a sample ends and then starts with a huge difference in the data value. Now this is eliminated.

While putting up walls this afternoon, I had another revelation (crazy thought) on where this project will go next.
Once the current system is redone on the hand wired board, I will then make my own CPU on the 2 giant breadboards.
This will make Vulcan 100% made of 7400 logic components, and require no external CPU at all!

This will be a second version though, and still plan to follow through on this "Compatible with Anything" version.

In similar fashion to the rest of this circuit, it will all be common available logic, and no ROMs, EBay parts, etc.
Microcode will live in SRAM, and by using quad 10ns SRAMs running in parallel, I will create a psuedo-32 bit processor.
16 bit math (Add, Sub, Mul, Div) would be done with preloaded 10ns SRAMs as well for blazing speed.
Reading 32 bits at a time directly into a fast sequencer, I would imagine I could create a fairly fast home brew CPU!
Because it would be created to support Vulcan's Video Hardware, it would be a unique design entirely.

Anyhow, that will be for another day... I have a lot more work to do before Vulcan makes it off the breadboard!
Going to go sit by the wood-stove and re-read "The Spectacular Rise and Fall of Commodore" for the 5th time for some inspiration.

Later...
Radical Brad


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 746 posts ]  Go to page Previous  1 ... 19, 20, 21, 22, 23, 24, 25 ... 50  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: