Poster | Thread |
NutsAboutAmiga
| |
Progress update on the CW4 (CW3) Device driver Posted on 21-Aug-2006 15:05:26
| | [ #1 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12931
From: Norway | | |
|
| Progress update on the CW4 (CW3) Device driver
The driver is mostly working….
FEATURES:
* The device driver can be controlled from a GUI, this GUI can tell the device what MFM codec to use theoretically Obsolete.
* The device will check for disk change where often at first, but after a while when the diskdrive is inactive the disk change check will not be so often, some folks think the ticking sound is annoying, I believe there is a tool to turn it completely off on the classic Amiga
TODO:
* The device do not work right out of the box, there is problem when trying to mount it before opening the device first. Fixed
* Second problem; programs that do open and use the new device often return whit un-freed signals. Fixed
* If more then one program tries to use the device then this often results in workbench freezing and waiting for ever effect, don’t know way. Fixed
* MSDOS MFM decoding routine is not working, maybe a byte order problem. Fixed 01.11.06
* Minor problem, HD / DD disks are not auto detected. Fixed 01.11.06
* CMD_UPDATE Do not always write content to disk. This one is critical for release of the device to the public.
* CMD_FORMAT Do not always write content to disk. This one is critical for release of the device to the public.
Last edited by NutsAboutAmiga on 10-Nov-2006 at 04:25 PM. Last edited by NutsAboutAmiga on 10-Nov-2006 at 04:23 PM. Last edited by NutsAboutAmiga on 13-Sep-2006 at 02:08 PM. Last edited by NutsAboutAmiga on 13-Sep-2006 at 02:06 PM. Last edited by NutsAboutAmiga on 13-Sep-2006 at 02:01 PM. Last edited by NutsAboutAmiga on 21-Aug-2006 at 05:21 PM.
_________________ http://lifeofliveforit.blogspot.no/ Facebook::LiveForIt Software for AmigaOS |
|
Status: Offline |
|
|
MoonSire
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 21-Aug-2006 16:12:44
| | [ #2 ] |
|
|
|
Member |
Joined: 20-Mar-2005 Posts: 92
From: Behind the Moon | | |
|
| @NutsAboutAmiga
You are doing a great job! Thank you! _________________ www.EtherealWorld.com |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 21-Aug-2006 17:04:36
| | [ #3 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12931
From: Norway | | |
|
| @MoonSire
And one more thing I did not remember to say earlier is that driver do not effect audio, cwfloppy program on OS4Depot did effect audio, so one more step forward
@all developers
Anyway if any can tell me what happens when you mount a device in detail, please explain, so I can try to fix one biggest problem that remains.
Last edited by NutsAboutAmiga on 21-Aug-2006 at 05:20 PM.
_________________ http://lifeofliveforit.blogspot.no/ Facebook::LiveForIt Software for AmigaOS |
|
Status: Offline |
|
|
JurassicC
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 21-Aug-2006 17:08:38
| | [ #4 ] |
|
|
|
Super Member |
Joined: 13-Mar-2003 Posts: 1441
From: Somerset, UK | | |
|
| @NutsAboutAmiga
Excellent
_________________ A1200T 603e 330Mhz - Mediator TX OS4.1 F.E. CDTV 8MB Fast, OS3.1, SCSI, MicroSD SCSI & CD32 FMV X5000, X1000, A1XE with OS4.1F.E. |
|
Status: Offline |
|
|
GrumpyOldMan
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 21-Aug-2006 17:11:51
| | [ #5 ] |
|
|
|
Cult Member |
Joined: 3-Nov-2003 Posts: 675
From: Haukipudas, Finland | | |
|
| @NutsAboutAmiga
Many thanks for your hard work!
_________________ "Those are my principles, and if you don't like them... well, I have others." (Groucho Marx) |
|
Status: Offline |
|
|
MigthyMax
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 22-Aug-2006 6:11:22
| | [ #6 ] |
|
|
|
Member |
Joined: 22-Jul-2004 Posts: 58
From: Unknown | | |
|
| @NutsAboutAmiga
I don't know how the mount actually mounts a device. But why don't you solve it in the way, that your driver on startup mounts itself, like the smbfs does. At least i did it os with my IPodDisk and it works.
Another hint, ask on http://utilitybase.com
regards
Max |
|
Status: Offline |
|
|
tonyw
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 22-Aug-2006 6:20:50
| | [ #7 ] |
|
|
|
Elite Member |
Joined: 8-Mar-2003 Posts: 3240
From: Sydney (of course) | | |
|
| @Nuts
The driver does not do the mounting, the filesystem does that. The driver should do no more than perform read/write/format operations to absolute disk addresses (block numbers).
_________________ cheers tony
Hyperion Support Forum: http://forum.hyperion-entertainment.biz/index.php |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 22-Aug-2006 6:21:57
| | [ #8 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12931
From: Norway | | |
|
| @MigthyMax
Smbfs is filesystem, it don’t work the same way as a bock device, but thanks anyway, file systems works on level over the bock devices, file systems don’t really need a device to work if they are started from command line like smbfs do, file systems looks at bock device, as number of bocks and don’t really care how many heads sectors or tracks there is on the device, all the filesystem cares about is the bock size, and the total number of bocks. _________________ http://lifeofliveforit.blogspot.no/ Facebook::LiveForIt Software for AmigaOS |
|
Status: Offline |
|
|
Antique
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 24-Aug-2006 20:32:06
| | [ #9 ] |
|
|
|
Cult Member |
Joined: 8-Jun-2005 Posts: 887
From: Norway | | |
|
| @NutsAboutAmiga
Got some more progress on the driver???? _________________ I'm an antique. Don't light my fuse |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 25-Aug-2006 13:55:05
| | [ #10 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12931
From: Norway | | |
|
| |
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 28-Aug-2006 9:14:49
| | [ #11 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12931
From: Norway | | |
|
| @NutsAboutAmiga
Tiny progress report:
- The mount bug is found: I did use DOS call’s whit libinit() that casing problems
When libInit() is executed from a program then IDOS -> Open(“con:”,) it works. When libInit() is executed from mount and this code IDOS -> Open(“con:”) executed whit in it completely lockup AmigaDOS, and mount stops before a con: window can be opened.
This ended in a major rewrite of debug text handling; now the device can be mounted directly, whit out staring the device from a program first sweat.
- New bug
I have detected that when forwarding messages to my external debug output program, there are some cases where NT_REPLYMSG is not returned to the sender.
My code looks some thing like this taken out of my memory.
struct my_msg_type { struct Message real_msg char *txt; }
int main() { For(;;) { IExec -> WaitPort(port); While (msg = IExec -> GetMsg(port)) { printf(“%s\n”, msg -> txt); IExec -> Remove( (struct Message) msg ); Msg -> real_msg.mn_Node.ln_Type = NT_REPLYMSG; } IDOS -> Delay(1); } }
On the receiver part, I have some thing like this.
If (Port = IExec -> FindPort(“debugprog”)) { If (msg = (struct my_msg_type *) IExec -> AllocVec(sizeof(struct my_msg_type),MEMF_SHARD | MEMF_CLEAR ) ) { msg -> real_msg.mn_Node.ln_Type = NT_MESSAGE;
for(txtlen=0;txt[txtlen]!=0;txtlen++); if (msg -> txt = IExec -> AllocVec(txtlen + 1, MEMF_SHARD | MEMF_CLEAR)) { For (n=0;n!=txtlen;n++) msg -> txt[n] = txt[n]; Txt[txtlen]=0;
IExec -> PutMsg(port, meg);
// Wait for reply message While (msg -> real_msg.mn_Node.ln_Type != NT_MESSAGE) IDOS -> Delay(1);
IExec -> FreeVec(msg -> txt); IExec -> FreeVec(msg); } } }
Last edited by NutsAboutAmiga on 28-Aug-2006 at 02:07 PM. Last edited by NutsAboutAmiga on 28-Aug-2006 at 02:06 PM. Last edited by NutsAboutAmiga on 28-Aug-2006 at 09:18 AM.
_________________ http://lifeofliveforit.blogspot.no/ Facebook::LiveForIt Software for AmigaOS |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 28-Aug-2006 13:37:33
| | [ #12 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12931
From: Norway | | |
|
| |
Status: Offline |
|
|
tboeckel
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 28-Aug-2006 13:48:50
| | [ #13 ] |
|
|
|
Regular Member |
Joined: 7-Oct-2004 Posts: 274
From: Rehmerloh, Germany | | |
|
| @NutsAboutAmiga
If you just want to display some debugging messages, why don't you use IExec->DebugPrintF() and catch the messages either with a serial terminal or with sashimi? That is much easier and doesn't create any conflicts with Forbid()s or similar. _________________ Why stop it now, just when I am hating it?
Thore Böckelmann |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 28-Aug-2006 14:12:58
| | [ #14 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12931
From: Norway | | |
|
| @tboeckel
I’m fared that my problem do not only extend to debug output but also, is maybe effects how I convert multi treaded IO request into single treaded IO request, I concerned because this routines look where similar.
Don’t you think that end up whit all kinds of debug output if I where to use SashimiPPC? Any way I don’t think I have it installed it on my system. Last edited by NutsAboutAmiga on 28-Aug-2006 at 02:13 PM.
_________________ http://lifeofliveforit.blogspot.no/ Facebook::LiveForIt Software for AmigaOS |
|
Status: Offline |
|
|
salass00
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 28-Aug-2006 14:29:31
| | [ #15 ] |
|
|
|
Elite Member |
Joined: 31-Oct-2003 Posts: 2707
From: Finland | | |
|
| @NutsAboutAmiga
Quote:
- The mount bug is found: I did use DOS call’s whit libinit() that casing problems
When libInit() is executed from a program then IDOS -> Open(“con:”,) it works. When libInit() is executed from mount and this code IDOS -> Open(“con:”) executed whit in it completely lockup AmigaDOS, and mount stops before a con: window can be opened.
|
Since the device is not opened/used from the "mount" command but from the filesystem you can't use DOS anywhere in your device in functions that will run on the filesystem's context unless you start up your own process and do it from there. This is because the process msgport (proc->pr_MsgPort) of the filesystem process which is needed for all DOS file I/O operations is already being used by the filesystem to receive action packets from DOS...
IExec->DebugPrintF() on the other hand doesn't involve DOS so is safe to use in any situation where DOS file I/O can't be used for some reason.Last edited by salass00 on 28-Aug-2006 at 02:30 PM.
|
|
Status: Offline |
|
|
salass00
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 28-Aug-2006 14:36:37
| | [ #16 ] |
|
|
|
Elite Member |
Joined: 31-Oct-2003 Posts: 2707
From: Finland | | |
|
| @NutsAboutAmiga
Quote:
Don’t you think that end up whit all kinds of debug output if I where to use SashimiPPC? Any way I don’t think I have it installed it on my system. |
I use IExec->DebugPrintF() to debug all my programs/projects now, and I have yet to have the problem of getting debug output from other programs than the one I'm currently debugging. Unless you're using the OS4.0 debug kernel for some reason I don't see why you would "end up whit all kinds of debug output", unless you write lots of debug output yourself of course... |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 28-Aug-2006 14:38:45
| | [ #17 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12931
From: Norway | | |
|
| |
Status: Offline |
|
|
tboeckel
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 28-Aug-2006 14:49:39
| | [ #18 ] |
|
|
|
Regular Member |
Joined: 7-Oct-2004 Posts: 274
From: Rehmerloh, Germany | | |
|
| @NutsAboutAmiga
From dos.doc NOTES From V50, this function is definately callable from a task.
Hence it doesn't need any process stuff and should work. But to be 100% sure you should write your own delay function using timer.device. That will always work. _________________ Why stop it now, just when I am hating it?
Thore Böckelmann |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 28-Aug-2006 15:08:02
| | [ #19 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12931
From: Norway | | |
|
| |
Status: Offline |
|
|
Anonymous
| |
Re: Progress update on the CW4 (CW3) Device driver Posted on 28-Aug-2006 15:36:12
| | [ # ] |
|
| @NutsAboutAmiga
Quote:
int main() { For(;;) { IExec -> WaitPort(port); While (msg = IExec -> GetMsg(port)) { printf("%s\n", msg -> txt); IExec -> Remove( (struct Message) msg ); Msg -> real_msg.mn_Node.ln_Type = NT_REPLYMSG; } IDOS -> Delay(1); } } | The additional IExex->Remove() may even crash, IExec->GetMsg() removed the message already. |
|
|
|
|