Close

music contest. -- DEADLINE APPROACHETH!

A project log for Floppy-bird

Use a floppy-disk as a multi-frame-buffer, store audio-samples, and increase capacity to boot!

eric-hertzEric Hertz 09/23/2018 at 01:311 Comment

Update: "DO IT NOW." Deadline in less than 2 weeks!

Further info/updates at the bottom.

===================================

FloppyBird is a two-parter...

The first, proof-of-concept, is to use my new PWM-nibble storage technique to store audio on a floppy disk. The planned 250 (as I recall?) KHz PWM for audio is probably a bit overkill, but it will prove the data-storage concept for the next part...

The second part is using each floppy-track as a framebuffer for an LCD. The new PWM-nibble data storage technique developed in the first/audio part of the project will enable enough data to be stored on a single track on a floppy disk to directly stream an image from the disk to a raster-drawn LCD, in realtime. Each PWM-nibble corresponding to a pixel being drawn (prb 8-color, leaving other nibble-values for hsync, etc.). Since a floppy disk rotates at 300RPM, the track will be read, repeatedly 5 times a second, refreshing the TFT's image 5 times a second, until another of the 160 tracks, each containing a different image, is requested.

OK

back to the music part, since that's the contest du jour...

I *might* actually get to this this month, maybe. And, I've a lot of ideas for taking it in directions irrelevant to the framebuffer. 

E.G. each track could contain a 1/5th second repeating audio-sample, then each track (of 80/side) could correspond to a MIDI note, playable by a MIDI keyboard, etc. 1/5th of a second isn't much, despite far more than that in pure data-storage-ability, but I'm trying to keep this simple... or am I? Regardless, I imagine most effects to sound a bit like a bird chirping, so now FloppyBird has two meanings.

E.G.2 A funky sorta long-duration playback can be implemented by tying the Step input directly to the Index output. After a track is fully played-back, it will auto-advance to the next track. Recording this is difficult, due to the (unmodified) floppy-drive's onboard circuitry (see previous log), and playback would have notable distortion every 1/5th second as the head [may never] settles into the next track. Though, I am curious to hear that effect. And the playback system would require nothing more than a handful of simple parts (no uC for playback! But still need one for recording. Bah!)

E.G.3. (see the previous log) Microstepping could be a thing, audio could be recorded in a spiral... a uC is necessary... and for some weird reason I still insist on using parts from floppy drives, even though the drive circuitry itself will have to be modified. Simpler might be to replace some of that circuitry with custom stuff, dunno why my brain went the path of using *two* drives' circuitry. BUT: This path feeds into another separate project, which may prove useful in the field of data-recovery.

...

So, IF I get to this project in time, there *will* be a uC, regardless of its necessity. MIDI, recording-timing, plausibly microstepping... AN alternative *might* be to use the two-controller method with the auto-stepping method. sheesh. Duh. BUT I don't have my stockpile of parts, so uC it is :/

Anyhow. Got a lotta things going against me this month, project-wise... and to top it off, my laptop with all my tools and custom libraries won't power up. BAH! 

MUCH THANKS to a buddy, here at HaD, (Buddy, wouldja like to be named?) who hooked me up with a custom-built "antPC" even more powerful, and far less power-hungry than the ol' lappy... Size and power are huge considerations, presently, and he solved 'em both, very generously.

So, First, a few potential paths to getting back to uC programming ability, none particularly speedy nor appealing. Guess that's what I get for never getting around to uploading all of #commonCode (not exclusively for AVRs)  :/

Ve Shall See where/if this goes. On the plus side, I'm kinda, slowly as usual, building up to project-momentum again finally. On the other hand, there's surely more pressing things to be worked on. Conundrum.

---------

Update 1: What the?! I had it in mind that the music challenge ended *with* October['s end], not *early in it*.

So for anyone with the same delusion, it appears, actually, to end *with* the end *of the first week* of October! Like Two Weeks!

As @Sophi Kravitz's catchphrase, which indirectly brought this to my attention, says: 

"Do It Now".

Crud, it's 4AM, can I start "tomorrow"?

-------

Update2: Since writing this, I've recalled that, indeed, I do have a couple older projects, with bits of #commonCode (not exclusively for AVRs) in 'em, up on github... and Long Ago, In A Lifestyle Far Far Away, I actually went to somewhat tremendous effort to make it distributable from projects like that! 

Download project, type 'make delocalize', as I recall, and whatever 'commonThings' (aka libraries) are in that project will be installed in a central location for use with all/other/later projects on the system... wow, I was kinda smart once, maybe a tad... That sounds sarcastic because it is... at me. commonCode was always a background thing worked on, sporadically, alongside my actual projects that make use of it, and otherwise pretty much hides in the background, so I litterally had to remind myself that it's way more developed than I remembered.

------

Update 3: "tomorrow" has come and mostly gone. Spent the day trying to fix Lappy (my devel-system). Looks like the CPU fried, it's had fan and thermal shutdown problems since I got it... guess my last thermal-shutdown wasn't quick enough. Rare, in my experience, to find a socketted CPU in a lappy, helped with diagnosis, it's certainly shorted internally on the power rails. Fixing may be easy, but not likely soon. Hard disk may be OK! But my USB gizmo needs an adaptor to try it out.

"antPC" is likely to be the solution. commonCode extracted from an old project in the cloud, along with a bunch of apt-gets, should get my devel-environment going (TODO: Must locate wifi). That poor thing got a bit of a battering, though, so may be another full day or more just to get it running again.

BUT: I have actually picked up tools for a purpose other than van-repair for the first time in... maybe a year? This might actually happen!

Oh, and... as seems typical for me these days, A Bunch of trying to find things, meant digging thoroughly through most everything, finding some long-lost otherthings, a bit of reorganization, but most-importantly refamiliarization with where to find what I need when I need it; always a daunting task that delays many a project... Now it's done, this may actually happen!

-----

Update 4: six days in (!!?) and I've yet to get a computer functioning. MOST of today was spent looking for a friggin' heatsink. Who'da thought that would be hard? Especially at a friggin' Fry's! Seriously, just hand me an old dead mobo and I'll nab the heatsink from the northbridge. I even googled teardowns of LED bulbs.

Wound up at Goodwill with my eye in one vent hole and my phone's flashlight in another, peering intimitely into nearly every electronic device they had, and googling teardowns.

Luck struck with a Clear WiMax modem, I saw what looked like heatsink fins, but nah couldn't be so large as to occupy the entire width of the thing... Checked *everything* else before deciding to take a chance, and sure-nough, that's one durn-near perfect match for what I was looking for. I saw similar on a PCI card at Fry's, just before giving up after hours of browsing,.. almost ready to spend $20 just to rip it apart, but alas, it wouldn'ta worked.

Now, what on earth, though... The one I got interfaces with the PCB, not a chip, and the chips on the other side are tiny. And the CPU doesn't even have any heatsinking anywhere nearby... Weird.

Something I hadn't considered, in my goodwilling, that also turned out quite handy: The device's housing is a darn-near perfect fit for the guts of this "computer." It might be turning into a tablet.

Some dremmelling to be done before the heatsink will fit, gotta wait 'till daylight.

----

Update 5:

Apparently the friggin' CPUs of this era are.... *way* more tolerant to poor cooling than those of my experience. Remember when just booting into POST without a heatsink would cause a red glowing CPU death?

Well, sheeit. I had this guy running, sans-heatsink, for probably 20minutes, booted into X-windows, running terminal, checking CPU-frequency and throttling statistics (hint: /sys/ is another "new-handy", don't bother grepping dmesg), the blasted CPU was *barely* warmer than my finger... but, also running (4 cores!) at ~500MHz, consistently... No Throttling, though!

I then ran "while [ 1 ] ; do cat /sys/.../cpu0/...current_freq ; done" and watched as the CPU freq varied a bit, to roughly 800MHz. Still barely past finger-temp.

Finally, another simultaneous terminal running "while [ 1 ] ; do echo hello ; done" managed to get it up to 1.5GHz, and five minutes later I *think* it was maybe 110deg Fahrenheit. Warm, but not hot.

Alright, so it was still probably spending a lot of time in sleep-mode, waiting for the kernel and X to update the terminal windows, clearing buffers to make room for the next echo, etc... (right?) So, probably not a great test for number-crunching or whatnot... BUT it never throttled, and wasn't even hot, and plenty fast enough for productivity in VIM and probably the few seconds of avr-gcc I'll be needing, sans-heatsink.

So, what'd I do? Spent the rest of the day making a custom heatsink, only to realize much later, upon planning to actually mount it, that there's a *much* more logical way to have customized it. Then spending an hour or so figuring out those details, planning to discard today's work, before *FINALLY* piecing-together that I really don't even need a heatsink to do the long-delayed project at-hand! Weee! 

Can I switch tracks that quickly? That remains to be seen. Stupid brain's on heatsinks and mounting-methods... Next step, I guess, is soldering up the proto; soldering and heatsinking are similar enough, I think I could make that switch tomorrow, but I need to figure out *what* to solder; pinouts, etc... That's an entirely different mental-task for me... the track-switch that is hard to imagine and kinda daunting. Not that I'm no good at that stuff *when* I do it, but that *switching* to that mental-mode is not an easy process. Like using RAM-Doubler or Swap Space; gotta dig it out of the really slow hard-drive, and cache it back into the faster RAM, but only after displacing the current skillset back to the hard-drive, before getting started.

I think I got it... mechanistry -> soldering Parts To Board (no wiring) is an easy-enough transition, then soldering PTB will indirectly refamiliarize myself with what needs to be wired-up... which'll help the transition to pinoutting... OK.

Discussions

Dr. Cockroach wrote 09/29/2018 at 09:43 point

Yup, Get it done :-)

  Are you sure? yes | no