Accept 00000001 Driver



Accept 00000001 Driver

Based on this, I fired up the MCUXpresso IDE and downloaded the latest example from NXP for the flash IAP driver. This example worked as expected on the rev A2 board (rev 1B chip). The flash IAP example utilizes version 2.7.1 of the SDK for the LPC55S69, so my guess is that the SDK in Mbed simply needs updated to the latest version. Typically, Error Code 0x00000001 will occur when a user installs software or hardware not designed for their operating system. For example, a user could install a program designed for Windows 10 on their Windows Vista PC and the issue will appear. Further Information and Manual Repair. Hi, how cookies can be configured with GPOs in a Windows 2012 environment?? Internet explorer maintenace is retired. In Group Policy Preferences appears grayed out. The value you send to the driver is the value the driver consumer (a game?) will use. You can deadzone, smooth and curve the data all you want and then send it to the joystick driver. It is in your control, and that’s a good thing. Each of the X, Y, Z, Rx, Ry, Rz, Slider, Dial and Wheel axis accept values from 0 to 32767.

Originally partially written Friday, 3 February 2006 then forgotten.
Rediscovered, finished, and originally Web posted Tuesday, 3 July 2007.
Content last modified Saturday, 9 January 2021 .
External links last verified Friday, 21 August 2015.

Focusing on version differences and how they affect compatibility

Why This Page?

Computer software and hardware do not always work as expected. Having just spent the last several days (as of the originally written date above) immersed in troubleshooting related to the specific quirks of different Apple CD-ROM and Apple CD/DVD Driver versions’ interactions with specific hardware, i wanted to document my findings in case they might help others.

At present, this page deals primarily with Vintage Mac OS (pre OS X… i.e. OS 9 and earlier) issues. Should i come across any useful OS X findings, i will add them or link to them from here. I use the term “Vintage” to mean “The Mac is directly booted from OS 9 or earlier”, to distinguish from Classic: running OS 9 or earlier in emulation, booted from OS X.

Let’s get into it….

Driver Version and CD Bootability

This section deals almost exclusively with the Vintage Mac OS series, even though similar considerations likely apply to OS X. I have yet to make any bootable OS X CD, nor a home-recorded DVD of any kind. I therefore cannot cover these subtopics at this time.

What got me started on all this testing and research was a freezing problem with a new Pioneer DVR-110D DVD±RW drive, installed in a Beige G3 DT (desktop, non-tower) Mac. The freezing turned out to have two components: Power supply issues (random freezes; not covered here) and Bootable CD driver issues (repeatable, consistent freezes; discussed herein).

One particular bootable CD in my library consistently froze the Mac very early in the startup process, just before the appearance of the Happy Mac (this is an OS 9 CD). No other bootable CDs in my library did this, and this same data CD booted just fine when a different drive (CD-RW or CD-ROM) was installed in the G3!

For a CD (or DVD) to be bootable, it needs:

  1. Proper boot driver code for the applicable hardware and Mac OS.
  2. An appropriate file system structure.
  3. A properly installed and configured Mac OS, whose version is compatible with the Mac(s) to be booted.
  4. A single-session, “closed” disc.
  5. Insertion into a drive whose firmware allows bootability.

Since the first topic is the longest, we’ll take these out of turn…

2. An appropriate file system structure

Vintage Mac OS systems need the CD file structure to be either Mac OS Standard (HFS) or Mac OS Extended (HFS+). Note that some older versions of Toast, such as Toast Titanium 5, can only create bootable CDs with the Mac OS Standard file structure.

I have not worked with OS X enough yet to know whether it allows other file structures, such as UFS, for bootable CDs/DVDs.

3. A properly installed and configured Mac OS, whose version is compatible with the Mac(s) to be booted

Jobs

In the days of the Vintage Mac OS, this was fairly easy:

Driver
  • Create or copy a working Mac OS System Folder.
  • Ideally, remove certain items that do not operate correctly from a locked volume.
  • Drag the System Folder into the disc creation software (following its specific instructions).
  • Write the disc.

I have read that the process in OS X is more difficult, and requires extra steps and precautions.

4. A single-session, “closed” disc

It might be possible to make a bootable CD with more than one session, though i have never seen one. It is required that the disc be “closed”: that is, finalized and unable to accept any further writing/sessions. Only when the disc is “closed” is all the necessary Table Of Contents information written to the disc.

In Toast, choosing “Write Disc” creates a “closed” disc.

5. Insertion into a drive whose firmware allows bootability

This appears to be much less of a problem under OS X than under the Vintage Mac OS. Nevertheless, to date, i have worked 95% with the Vintage Mac OS, and i have almost never had CD booting problems that turned out to be due to a drive’s firmware.

Drive firmware issues will not be covered here, especially since xlr8yourmac.com does such an excellent job… lightyears beyond what i could cover.

1. Proper boot driver code for the applicable hardware and Mac OS

The Driver on the CD

Macintosh computers need to load driver code off of the physical device which starts up (boots) the Mac. In the case of removable discs, that code needs to be on each bootable disc. This page restricts discussion to CDs and DVDs, though similar considerations apply to bootable MO disks, Zip disks, and other removables capable of Mac booting.

The Driver Comes From the Active System Folder used to Write the Disc

The driver code to make a CD or DVD bootable has to come from somewhere, and needs to do so during the process of writing the disc. Turns out that the best (only?) place to get legal and usable optical disc boot code is from the optical disc driver that Apple supplies inside each System Folder (at least on systems equipped with an optical drive). At least this is what Toast does.

Normally, the purpose of the Apple CD-ROM or Apple CD/DVD Driver is to load driver code during normal hard drive startup to allow an attached optical drive to operate… even though there was no disc in it at startup. Without this driver (extension in the Vintage OS), an optical drive would be unusable unless 1) It had a disc in it during Mac startup, and 2) That disc contained boot code. It so happens that this driver also contains the code needed to make an optical disc bootable. The disc writing software extracts this code from this driver, and writes it to an appropriate place on the being-created optical disc.

One might think that the disc writing software would use the Apple CD-ROM or Apple CD/DVD Driver inside the System Folder which is about to be written onto the (future) bootable disc. Wrong! At least in the case of Toast, the Apple CD-ROM or Apple CD/DVD Driver inside the active System Folder running while the disc is being created is the one used. In some cases, this may be the one and only System Folder, both running the Mac currently as the disc is being written, and also being copied onto the disc being written. In other cases, the Systems are different, and this distinction becomes critical to successful bootable disc creation!

In fact, the System Folder on the optical disc really does not need a CD-ROM nor CD/DVD Driver… unless, perhaps, a system might contain multiple optical drives: one used with the disc to boot the Mac, plus one or more others that might be used while booted from the CD.

Driver Version Table

Driver VersionSourceBeige G3 DTIIsiMac Plus
Pioneer DVD±RWLite-On CD-RWApple stock CD-ROM
Apple CD/DVD Driver 1.4.8Mac OS CPU Software 5.0OKOKOKSad Mac
0000000F
00000001
Flashing ?
Apple CD/DVD Driver 1.4.7Mac OS 9.2.1OKOKOKSad Mac
0000000F
00000001
Flashing ?
Apple CD/DVD Driver 1.4.6On the Mac OS 9.2.1 retail install CD (rare)OKOKOKSad Mac
0000000F
00000001
Flashing ?
Apple CD/DVD Driver 1.4.5Mac OS CPU Software 3.5not testednot testednot testednot testednot tested
Apple CD/DVD Driver 1.4.4Disc Burner 1.0.1 softwareOKOKOKSad Mac
0000000F
00000001
Flashing ?
Apple CD/DVD Driver 1.4.3iTunes 1.0OKOKOKSad Mac
0000000F
00000001
Flashing ?
Apple CD/DVD Driver 1.4Mac OS 9.1OKOKOKSad Mac
0000000F
00000001
Flashing ?
Apple CD/DVD Driver 1.3.9Mac OS 9.0.4 w/ Mac OS CPU software 2.5FreezeOKOKOKFlashing ?
Apple CD/DVD Driver 1.3.8Mac OS 9.0.4 w/ Mac OS CPU software 2.3FreezeOKOKSad Mac
0000000F
00000003

or
0000000F
00000066
Flashing ?
Apple CD/DVD Driver 1.3.5Mac OS 9.0.4OKOKOKOKFlashing ?
Apple CD/DVD Driver 1.3.1Mac OS 9.0OKOKOKOKFlashing ?
Apple CD/DVD Driver 1.2.2Mac OS 8.6OKOKOKOKFlashing ?
Apple CD/DVD Driver 1.2Mac OS 8.5 w/ Apple DVD Software 1.1OKOKOKOKFlashing ?
Apple CD/DVD Driver 1.0.1Mac OS 8.5OKOKOKOKFlashing ?
Apple CD-ROM 5.4.2Mac OS 8.1OKOKOKOKFlashing ?
Apple CD-ROM 5.4Apple CD-ROM Software 5.4 & Mac OS 8.0Flashing ?Flashing ?Flashing ?OKFlashing ?
Apple CD-ROM 5.3.3Mac OS 7.6.1Flashing ?Flashing ?Flashing ?OKFlashing ?
Apple CD-ROM 5.3.2CD-ROM Software 5.3.2 (rare)Flashing ?Flashing ?Flashing ?OKOK
Apple CD-ROM 5.3.1Mac OS 7.6Flashing ?Flashing ?Flashing ?OKOK

Determining Driver Version

Figuring out what driver version is present on an existing written CD, whether manufactured or a CD-R or -RW “home written”, is not simple. One needs to use geeky digging and prying tools to find this information.

In fact, the only tool i know of is a program called Sedit, which looks like it may have been meant as an internal Apple tool (not sure about this). Sedit addresses SCSI drives directly, not through their driver, so it can display every data block on an optical disc in a SCSI drive. Presumably anything else which can read every block of an optical disc without going through the normal driver should be able to show the on-disc boot driver version.

If anyone knows of other tools which will show the disc driver version reliably, please let me know so i may list them here. I know that Norton Disk Editor 3.5 does Not: it can display this sort of information for hard drives, but not optical discs.

Driver Offsets

Below is a list of hexadecimal ($) block offsets from the absolute first block of various CDs i have and have made, as shown in Sedit 1.2. “Toast-made” refers to all CDs i have recorded with Toast Titanium 5.2.3. “Apple CD tool” represents discs i happen to know were written by a special internal-use Apple tool circa 1997 when i worked at Apple (the Apple discs where i verified this driver offset and the driver versions all date to right around that time). The other listings reference specific Apple-made discs, with the OS discs being the “retail boxed” versions of those specific OSes.

  • Toast-made: SCSI: $16. ATAPI: $34.
  • Apple CD tool: SCSI: $10. ATAPI: $30. (original PowerMac 9600/8600 CD-ROM is one example)
  • OS 9.2.1, OS 10.2: SCSI: $1E. ATAPI: $4F.
  • OS 9.1: SCSI: $1E. ATAPI: $4A.
  • OS 8.0: SCSI: $31. ATAPI: $58.
  • Mac Test Pro: SCSI: $31. ATAPI: $5D.

Here is what the Sedit display looks like on a Toast-made CD-R:


Here we can see that the disc has SCSI driver version 1.4.8 on it

Here we see that the same disc has ATAPI driver version 1.4.8 on it.

In this instance, both the SCSI and ATAPI driver versions are identical. This is not always the case at all… sometimes the versions are very different!

Driver Version Conclusions

Recommended Versions

• Apple CD/DVD Driver 1.4.8
Looks like the one to use for all Power Macs, and at least OS 8.5 to 9.2.2, if not also earlier.
• Apple CD/DVD Driver 1.3.5
Probably the best choice for 68040 and 68030 Macs, maybe 68020s as well. Should work with these and all newer Beige Macs, with any OSes those machines can use from System 7.5 (or maybe 7.0) up to at least 9.0.4.
• Apple CD-ROM 5.4.2
If, for some reason, CD/DVD Driver 1.3.5 is problematic on 680x0 Macs and/or OSes 8.1 or earlier, try this mature, stable version.
• Apple CD-ROM 5.3.2 (if you can find it) or 5.3.1
Only for those who need or want to support the original 68000 Macs, like the Mac Plus. Should support most or all 680x0 Macs. Do not expect it to support many PPC Macs, except maybe the earliest ones (“G1” [NuBus] and “G2” [first PCIs]).

Apple CD-ROM 5.3.1 Controls All

In recent times, esp. in OS X, the stock Apple driver successfully controls a wider range of optical drives, both stock Apple-shipped and 3rd. party not used by Apple. I have not (yet?) done testing to determine what, if any, restrictions still remain, nor when restrictions started to be loosened up.

Back in the mid-1990s, Apple was using SCSI CD-ROM drives. The Apple CD-ROM driver would look for Apple code in the drive’s firmware, otherwise it would ignore the drive and not control it.

Apple CD-ROM 5.3.1 is a special driver from that era: it does not look for Apple code in the drive’s firmware, and will attempt to control any attached CD-ROM drive.

This page is not going to get into the history of this situation: Accident? On purpose to support Mac clones? Reason for reverting to withdrawing universal drive support? I mostly want to make sure that anyone using these decade-plus old systems (when this page was originally written) knows of the existence of this driver version, in case they have no other driver to control their older 3rd. party drive.

There used to be a very nice article on ResExcellence regarding hacking any of quite a few versions of Apple’s CD/DVD or CD-ROM driver so that they would attempt to control all possible drives. I am not even linking to the information vacuum that is currently at www.resexcellence.com as it seems so hopeless and worthless (early July 2007). Smart cookies will know how to find the textual content, which should be sufficient. Personally, i would not bother, since some folks with newer systems will most likely be happy to give away their copies of old CD drivers from FWB etc. which were designed for all optical drives. Or just move to OS X and make the point moot.

Other Sites

DGM for Mac OS
This page, dedicated to helping Mac folks play some Discipline Global Mobile releases, also has an excellent Apple CD/DVD Driver discussion, and many drivers available for downloading to help resolve issues.
Mac Driver Museum’s Disk, CD-ROM Drivers page (link goes to mirror at 3rz.org)
Site correspondent M A points out this excellent source for Apple CD-ROM 5.3.2 and 5.3.1, and some other amazing old drivers. (Thanks, M A!)

I hope you’ve found something here helpful. I welcome your comments and suggestions.

World O’ Apple & MacintoshThe Sonically Pure Pages

This Siber-Sonically Pure Page is and Transitional compliant.

Using the Joystick Driver

Overview

The joystick driver allows you to:

  • Send X, Y, Z, RX, RY, RZ, Slider, Dial and Wheel axis positions.
  • Press and/or release the hat button.
  • Press and/or release up to 128 buttons.

The Joystick Reader Utility

While developing code that uses the joystick driver, use the reader utility to consume data from the joystick driver. This is easier than using the Windows Game Controller control panel app, or an actual game that consumes joystick data. It will be way faster and will help you understand the data that we need to send to the driver, especially the hat and button bit arrays.

The Joystick Driver Sender Utility

Use the SDK Joystick Driver Sender to send axis, hat and button states to the joystick driver. The joystick driver will appear to Windows as if it is an actual physical joystick. Be sure to press the ‘Connect to Joystick Driver’ before sending data to the driver.

Axis Values

The joystick driver supports nine analog axis. Nine! Not many joysticks have that. Cheap joysticks may have Rx, Ry and a Slider for throttle. Cheap joysticks are full of surprises though, where they may take something like a Rx, which means rotate about the X axis, which would be a pitching motion if it were an aircraft sim, and map it to something strange like Ty. There doesn’t seem to be much logic behind this, but this is what manufacturers, and their driver makers do. That’s why game devs don’t assume that the axis will be used correctly, and allow you to map each joystick driver axis output to a game axis input.

Good joysticks have Rx, Ry, Rz (Rudder) and slider for throttle, and maybe a dial. Throttle quadrants will usually take over the slider for throttle and maybe use the wheel axis as well. Brakes and clutch may use joystick axis. There are many variations out there.

Joysticks also can have a lot of jitter. You can see this if you tweak the Reader code to open a real physical joystick you have laying around. Leaving the stick in the neutral position should only send an unchanged value if you aren’t touching the stick. But a lot of sticks, expensive ones included, will have a ‘noise’ while in neutral. That’s why games have deadzones.

Joysticks also report stick deflection in as a linear value, and this is why games have axis curves. Linear values can be really frustrating to use by end-users.

And finally, joysticks axis can also drift over time and go out of calibration.

A virtual joystick driver has none of these problems. The value you send to the driver is the value the driver consumer (a game?) will use. You can deadzone, smooth and curve the data all you want and then send it to the joystick driver. It is in your control, and that’s a good thing.

Each of the X, Y, Z, Rx, Ry, Rz, Slider, Dial and Wheel axis accept values from 0 to 32767. Using Ry as an example (roll in an airplane), 0 would be deflected fully left, 16384 is neutral, 32767 is full right deflection.

Sending Data to the Driver

First, iterate through all drivers until you find ‘Tetherscript Virtual Joystick’ and connect to that driver. Then send a packed record as a ‘Feature Report’ to the driver. More info on feature reports below:

https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/
Joystick driver reports are based sdk/delphi/common/hut1_12v2.pdf

Delphi

Here’s the joystick driver report Delphi data format. In our Delphi source we call this a Feature, but really it is a standard HID Input Report. This is just the terminology left over from Delphi’s JCL and JVCL libraries.:

type
PTSetFeatureJoy = ^TSetFeatureJoy;
TSetFeatureJoy = packed record
ReportID: Byte;
CommandCode: Byte;
X: Word;
Y: Word;
Z: Word;
rX: Word;
rY: Word;
rZ: Word;
slider: Word;
dial: Word;
wheel: Word;
hat: Byte; //array of 8 bits, one per hat position
buttons: array[0..15] of Byte; //array of 128 bits, one per button
end;

C#

[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct SetFeatureJoy
{
public Byte ReportID;
public Byte CommandCode;
public UInt16 X;
public UInt16 Y;
public UInt16 Z;
public UInt16 rX;
public UInt16 rY;
public UInt16 rZ;
public UInt16 slider;
public UInt16 dial;
public UInt16 wheel;
public Byte hat;
public Byte btn0; //you really could use a byte[15] array here instead, but it's a bit more complex to implement, so we didn't do that here
public Byte btn1;
public Byte btn2;
public Byte btn3;
public Byte btn4;
public Byte btn5;
public Byte btn6;
public Byte btn7;
public Byte btn8;
public Byte btn9;
public Byte btn10;
public Byte btn11;
public Byte btn12;
public Byte btn13;
public Byte btn14;
public Byte btn15;
}

c

This corresponds to the following c struct (this is the actual receiving input report struct from the driver source):

typedef struct _HIDMINI_CONTROL_INFO {
UCHAR ReportId;
UCHAR ControlCode;
unsigned short X;
unsigned short Y;
unsigned short Z;
unsigned short rX;
unsigned short rY;
unsigned short rZ;
unsigned short slider;
unsigned short dial;
unsigned short wheel;
BYTE hat; //array of 8 bits, one per hat position
BYTE buttons[16]; //array of 128 bits, one per button
} HIDMINI_CONTROL_INFO, * PHIDMINI_CONTROL_INFO;

  • ReportID: is always 1. Just leave it as 1.
  • CommandCode: This is 1 or 2. Also known as a ControlCode. Set it to 1 to reset axis, hat and buttons. Set it to 2 to send axis, hat and button info.
  • X, Y, Z: These are translational axis positions. These are more appropriate for a 6DOF device where you can slide along an axis, as well as rotating around the axis. Values are (0-32737). The original spec designers where really thinking ahead to 6DOF, but I have never seen a physical joystick slide along an X, Y or Z axis.
  • RX, RY, RZ: These are rotational axis positions. These are the standard joystick axis where you have pitch=RY, Roll=RY and Yaw=RZ. Values are (0-32737).
  • Slider: This is usually used as a throttle. Values are (0-32737).
  • Dial and Wheel: Rarely found on joysticks, except maybe the really expensive ones. Values are (0-32737).
  • hat: This is a single byte that represents the position of the hat switch. A hat switch indicates direction, such as in a flight sim, head-look to the right. Values are 255, (0-7).
    • 255= hat switch is not pressed
    • 0= hat switch pressed UP
    • 1= hat switch pressed UPPER_RIGHT
    • 2= hat switch pressed RIGHT
    • 3= hat switch pressed DOWN_RIGHT
    • 4= hat switch pressed DOWN
    • 5= hat switch pressed DOWN_LEFT
    • 6= hat switch pressed LEFT
    • 7= hat switch pressed UPPER_LEFT
  • buttons: This is an array of 16 bytes, which is 128 bits, which corresponds to 128 buttons. If a bit is set to 0, the button is up. Set it to a 1 and the button is pressed. So to press a virtual joystick button and release it, you set a bit to 1, wait x ms (try 50ms), then set the bit to zero. Each byte has represents 8 buttons, with the right-most bit representing the first button and the left-most bit representing the last buttons, as shown below (this can be confusing).
    • 00000000 00000000 00000000 00000000…00000000: 16 bytes, all bits are zero, so no buttons are pressed.
    • 00000001 00000000 00000000 00000000…00000000: Button 1 is pressed.
    • 00000010 00000000 00000000 00000000…00000000: Button 2 is pressed.
    • 00000100 00000000 00000000 00000000…00000000: Button 3 is pressed.
    • 00000101 00000000 00000000 00000000…00000000: Button 1 and 3 are pressed.
    • 00000000 00000001 00000000 00000000…00000000: Button 9 is pressed.
    • 00000010 00000001 00000000 00000000…00000000: Button 2 and 9 are pressed.
    • 00000000 00000000 00000000 00000000…00000001: Button 128 is pressed.
    • Simple, right?

Handling Stuck Joystick Buttons

As an example, you may press joystick button 1 (usually the trigger button) and then it is possible that you may have forgotten, or due to your app crashing, that the button remains pressed. There are three ways to unstuck a button.

Accept 00000001 Driver Login

  1. Clear the button by setting its byte array bit to zero.
  2. Send a reset command to the driver. This sets all axis to mid-range (center) and releases the hat and all buttons.
  3. Reboot.

Resetting the Driver

Accept 00000001 Driver Test

00000001

To reset the driver, send the report with a CommandCode = 1 and any values for axis, hat and buttons. The driver will center all axis and release the hat and all buttons.

You can also just send the axis centering values and release the hat and buttons yourself with a CommandCode = 2. It’s up to you. Both methods are equivalent.

Your First Hello-Driver App – a Suggestion

  1. Start the Joystick Reader utility and connect to the driver.
  2. In your app, iterate through the drivers and find and connect to the joystick driver.
  3. In your app, send data with a command code of 2, X = 10000, hat = 0, button array all zeros.
  4. in the reader utility, you should see the X axis deflected a bit left of center.