Mac68k Forums

Home


Welcome, Guest
Guest Settings
Help

Mac68k Forums » Development » Software Hacking

Thread: Serial Disk Driver


Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 72 - Pages: 5 [ Previous | 1 2 3 4 5 | Next ] - Last Post: Oct 29, 2013 12:19 PM Last Post By: bbraun Threads: [ Previous | Next ]
landonf


Posts: 86
Registered: 7/23/12
Re: Serial Disk Driver
Posted: Oct 22, 2012 8:50 AM   in response to: techknight in response to: techknight
Click to report abuse...   Click to reply to this thread Reply
techknight wrote:
If you want to go bigger than a Mega, then your taking the project on yourself. I would be out of it.

AVR is the only MCU series that I use, and familiar with. anything else, game over.

That's a reasonably solid argument for AVR, then!
landonf


Posts: 86
Registered: 7/23/12
Re: Serial Disk Driver
Posted: Oct 22, 2012 8:58 AM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
tt wrote:
Unfortunately I was unable to boot with Serial Disk v0.7, the system bombed again while loading the CP at startup. Does Serial Server influence booting?

command: ./serialserver --stdio --disk serialfile --baud 57600

If there's an error opening or initializing the serial port, the serial driver will call DebugStr, which is unimplemented unless MacsBug is installed (thus causing a bomb).
bbraun


Posts: 493
Registered: 7/25/12
Re: Serial Disk Driver
Posted: Oct 22, 2012 10:29 AM   in response to: landonf in response to: landonf
Click to report abuse...   Click to reply to this thread Reply
landonf wrote:
tt wrote:
Unfortunately I was unable to boot with Serial Disk v0.7, the system bombed again while loading the CP at startup. Does Serial Server influence booting?

command: ./serialserver --stdio --disk serialfile --baud 57600

If there's an error opening or initializing the serial port, the serial driver will call DebugStr, which is unimplemented unless MacsBug is installed (thus causing a bomb).

Ah, yeah. I can remove the DebugStr call, but nothing will work if opening the serial driver fails. Then have some reporting mechanism in the control panel that says 'Ur hosed' or similar. I've never seen this with the real ROM serial driver. I can only assume this is related to Basilisk II's replacement serial driver.
bbraun


Posts: 493
Registered: 7/25/12
Re: Serial Disk Driver
Posted: Oct 22, 2012 12:09 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
I can't reproduce your specific error, but I modified the source to open a driver that doesn't exist, and then went through and handled the resulting errors. The driver will remain loaded, but refuse to open unless the serial driver can be opened and configured successfully. If anything goes wrong, it closes the serial drivers (if opened), and deallocates all allocated storage, but remains loaded. Later, if opening failed during boot, the Control Panel opens the driver again, and the same procedure is followed. If opening is successful, things should work like normal. If not, the control panel reports "No Driver" as the Mount Status.

serialdisk0.9.cpt.hqx
tt


Posts: 144
Registered: 8/25/12
Re: Serial Disk Driver
Posted: Oct 23, 2012 2:29 AM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
That fixed fixed the bombing, but I'm guessing the problem is with my Basilisk settings. What should I have seriala and serialb set to in my prefs file? Here's what it looks like right now:

seriala /dev/cu.Bluetooth-Modem
serialb /dev/null
landonf


Posts: 86
Registered: 7/23/12
Re: Serial Disk Driver
Posted: Oct 23, 2012 10:14 AM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
tt wrote:
That fixed fixed the bombing, but I'm guessing the problem is with my Basilisk settings. What should I have seriala and serialb set to in my prefs file? Here's what it looks like right now:

seriala /dev/cu.Bluetooth-Modem
serialb /dev/null

Here's what i have:
seriala |/Users/landonf/Downloads/serialserver/serialserver --stdio --logfile /Users/landonf/Downloads/serialserver/logf --disk /Users/landonf/Downloads/serialserver/serialfile
serialb
techknight

Posts: 110
Registered: 10/13/12
Re: Serial Disk Driver
Posted: Oct 24, 2012 12:25 AM   in response to: landonf in response to: landonf
Click to report abuse...   Click to reply to this thread Reply
you know what, that bluetooth in your post just gave me a brilliant idea.

What about an android device? hehe. Well I write software for android all the time to use bluetooth as a serial connection. Works great. I could put a bluetooth SPP on the macintosh serial port, and the mac would talk to a disk image server on the droid device ;-)

But hell if i was going to do that, i wonder if basilisk or some other mac emu runs on droid? if so then i could simply do localtalk over bluetooth. But anyway...

Once i get freed up from this large work project, im going to start building the hardware for using the AVR and SD card reader.

Once i get it working, Ill post the schematics/firmware here and then you guys can take it up to the ARM or whatever. I just need to get something base-wise going. Eventually once I get it working, I want to use disk images stored on the SD card with a display unit on the external hardware. The display would show the currently mounted image, and be able to scroll through the images and mount them once the mac ejects it.
techknight

Posts: 110
Registered: 10/13/12
Re: Serial Disk Driver
Posted: Oct 24, 2012 11:45 PM   in response to: techknight in response to: techknight
Click to report abuse...   Click to reply to this thread Reply
I picked up a netduino plus, which is ARM based. And its compatible with VB.NET which is a language I am not too familiar of, but its still basic so it might not be too bad.

Anyway, That might be a faster start on the ARM side.
bbraun


Posts: 493
Registered: 7/25/12
Re: Serial Disk Driver
Posted: Oct 25, 2012 12:11 AM   in response to: techknight in response to: techknight
Click to report abuse...   Click to reply to this thread Reply
No need to do ARM for my sake. My comment in the other thread about the NXP dev board is unrelated. I've got my hands full with Mac OS side software at the moment. :)
landonf


Posts: 86
Registered: 7/23/12
Re: Serial Disk Driver
Posted: Oct 25, 2012 11:37 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
I don't actually have an AVR here tonight to test on, but here's a drop-dead-simple RAM-backed serialserver that should work on an atmega328 or similar. This'll have to wait until tomorrow night until I can actually test it, but on the off chance that anyone has the hardware handy and wants to poke at it, here's what I have.
tt


Posts: 144
Registered: 8/25/12
Re: Serial Disk Driver
Posted: Oct 26, 2012 4:27 AM   in response to: landonf in response to: landonf
Click to report abuse...   Click to reply to this thread Reply
landonf wrote:
Here's what i have:
seriala |/Users/landonf/Downloads/serialserver/serialserver --stdio --logfile /Users/landonf/Downloads/serialserver/logf --disk /Users/landonf/Downloads/serialserver/serialfile
serialb
That did the trick, it works!

The AVR code sounds cool. I have an Arduino, so I can check it out sometime. How would I connect to an SE/30? Should I get a spare serial cable to strip-off one end and connect to TX/RX? And it looks like the disk image is 1K?
landonf


Posts: 86
Registered: 7/23/12
Re: Serial Disk Driver
Posted: Oct 26, 2012 1:43 PM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
tt wrote:

The AVR code sounds cool. I have an Arduino, so I can check it out sometime. How would I connect to an SE/30? Should I get a spare serial cable to strip-off one end and connect to TX/RX?

The USART still requires level shifting, so you'd need something like this http://www.acroname.com/robotics/parts/R115-INT-BRD-KIT.html. I'm just using a Atmel STK600 development board which provides the same.

And it looks like the disk image is 1K?

Yep. Basically useless for anything other than testing the serial comms, but may as well start simple before we start worrying about SPI/SDIO, etc.
tt


Posts: 144
Registered: 8/25/12
Re: Serial Disk Driver
Posted: Oct 26, 2012 3:28 PM   in response to: landonf in response to: landonf
Click to report abuse...   Click to reply to this thread Reply
Is that level shifter using something like a MAX232 to shift voltages? I think I probably have a couple lying around from an old stepper motor project. Arduino I think provides/expects 0&5V on the TX and RX lines, right? What voltages is the serial port using on the Mac side?
landonf


Posts: 86
Registered: 7/23/12
Re: Serial Disk Driver
Posted: Oct 26, 2012 4:10 PM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
tt wrote:
Is that level shifter using something like a MAX232 to shift voltages?

Yep!

I think I probably have a couple lying around from an old stepper motor project. Arduino I think provides/expects 0&5V on the TX and RX lines, right?

Yeah, I believe the Arduino has an on-board 5V voltage regulator. For the actual target hardware, we might consider running the uC at 3.3V to match the SD card interface.

What voltages is the serial port using on the Mac side?

No clue what the Mac is actually using, but someone else might know -- the valid range is +3 to +15, -3 to -15.
landonf


Posts: 86
Registered: 7/23/12
Re: Serial Disk Driver
Posted: Oct 27, 2012 12:54 AM   in response to: landonf in response to: landonf
Click to report abuse...   Click to reply to this thread Reply
Attachment screenshot.png (54.6 K)
landonf wrote:
I don't actually have an AVR here tonight to test on, but here's a drop-dead-simple RAM-backed serialserver that should work on an atmega328 or similar. This'll have to wait until tomorrow night until I can actually test it, but on the off chance that anyone has the hardware handy and wants to poke at it, here's what I have.

Tested it out with Basilisk II and an atmega168 (and modified the code to report a 5MB image). The basics work:



I clocked the AVR at 20 MHz, 57600 baud. Amusingly, my code posted above worked the first time ... once I remembered I had CKDIV8 FUSE set :)

Basilisk II is pretty useless for debugging, so my next step probably be to write my own test client to exercise the serial server code without having to actually mount the thing as a Mac OS disk, and start looking at actually wiring this to real storage.

Point your RSS reader here for a feed of the latest messages in all forums