The Apple II MouseCard's interrupt requests (IRQs) are indeed synchronized with the vertical blanking interval (VBL). Through oscilloscope analysis and examining the MouseCard's firmware, the author confirmed that the card cleverly uses the VBL signal to time its counter, ensuring consistent IRQ generation every 1/60th of a second. This synchronization prevents screen tearing and jerky mouse movement, as updates are coordinated with the display refresh. Despite prior speculation and documentation suggesting otherwise, the investigation conclusively demonstrates the VBL-synced nature of the MouseCard's IRQ.
Microsoft's older USB mice often included a small USB-to-PS/2 adapter. This adapter wasn't just a passive wiring converter; it contained active circuitry that translated USB signals into PS/2 signals. This allowed the mouse to function on computers with only PS/2 ports, and importantly, enabled support for the "Wake-on-Mouse" feature in some systems, which required a PS/2 connection. The adapter effectively made the USB mouse appear as a PS/2 device to the computer's BIOS, enabling this functionality even on motherboards lacking USB wake support. Therefore, discarding the seemingly insignificant adapter meant losing the potential for wake-on-mouse capabilities.
Hacker News users discuss the intricacies of the Microsoft USB-to-PS/2 adapter, focusing on its active conversion of USB signals to PS/2 rather than simple pin mapping. Several commenters praise the adapter's sophistication, highlighting its ability to handle higher polling rates than standard PS/2 and even emulate multiple PS/2 devices from a single USB port. Some express surprise at learning this detail, having previously assumed passive conversion. Others reminisce about similar PS/2 to serial port adapters, while some debate the technical challenges and cleverness of the implementation. The discussion touches on the historical context of transitioning between these technologies, the complexities of bidirectional communication, and the surprising amount of intelligence packed into this seemingly simple adapter.
Summary of Comments ( 11 )
https://news.ycombinator.com/item?id=43925414
HN commenters discuss the intricacies of the Apple II MouseCard's interrupt handling, particularly its synchronization with the vertical blanking interval (VBL). Some express admiration for the clever engineering required to achieve stable mouse input within the constraints of the Apple II's hardware. One commenter recounts experiences with similar timing challenges on the Atari 8-bit and C64, emphasizing the difficulty of accurate timing without dedicated hardware support. Others delve into the specifics of the MouseCard's design, mentioning the use of a shift register and the challenges of debouncing button presses. The overall tone is one of appreciation for the ingenuity required to implement seemingly simple features on older hardware.
The Hacker News post titled "Yes, the Apple II MouseCard IRQ Is Synced to the VBL" has generated a modest discussion with several insightful comments.
One commenter highlights the cleverness of syncing the MouseCard interrupt request (IRQ) with the vertical blanking interval (VBL). They explain that this synchronization prevents visual artifacts or "snow" that could occur if the interrupt happened during active screen drawing. This method effectively utilizes the VBL's inherent downtime for interrupt handling, maximizing the efficiency of the system.
Another commenter dives deeper into the Apple II's hardware limitations, explaining the rationale behind the chosen IRQ method. They point out that the 6502 processor lacked sophisticated interrupt handling capabilities, making a simple, synchronized approach like tying the IRQ to the VBL the most practical solution. This constraint forced elegant design choices that leveraged existing system timings.
A further comment contrasts the Apple II's method with other systems that used periodic interrupts for mouse input. While acknowledging the potential for slight inaccuracies in the Apple II's approach, they emphasize the simplicity and effectiveness of the VBL-synced IRQ within the context of the Apple II's hardware.
Another commenter shares a personal anecdote about their experience with the Apple II MouseCard, highlighting the surprisingly good performance despite the seemingly rudimentary interrupt mechanism. They suggest that this positive user experience is a testament to the effectiveness of the VBL synchronization.
The overall sentiment in the comments is one of appreciation for the ingenuity and practicality of the Apple II's design choices, particularly in light of the hardware constraints of the era. The discussion provides a fascinating glimpse into the challenges and solutions of early computer engineering.