TomHarte / CLK

A latency-hating emulator of: the Acorn Electron and Archimedes, Amstrad CPC, Apple II/II+/IIe and early Macintosh, Atari 2600 and ST, ColecoVision, Enterprise 64/128, Commodore Vic-20 and Amiga, MSX 1/2, Oric 1/Atmos, early PC compatibles, Sega Master System, Sinclair ZX80/81 and ZX Spectrum.
MIT License
911 stars 50 forks source link

Apple II Mockingboard support #1307

Closed ryandesign closed 4 months ago

ryandesign commented 5 months ago

What's the status of Mockingboard support for the Apple II series? I see you have a wiki page with notes about it and in a couple other issues you've mentioned it would be fairly easy to add, since you already emulate its chips, but I tried a few Mockingboard demos and they didn't make any sound or they said no Mockingboard was installed, so I'm guessing this has not been implemented yet.

TomHarte commented 5 months ago

No, not yet. I paused slightly because of the potential cost of 6522s across the current virtual interface for Apple II cards. That might be suffering in anticipation though, and I could probably add a template-style case. Looking at the negligible list of supporting titles made this lower priority than it once felt, but conversely it might be a good fit in terms of achieving something concrete with a limited amount of time.

ryandesign commented 5 months ago

I paused slightly because of the potential cost of 6522s across the current virtual interface for Apple II cards.

Could Mockingboard support be optional, via a GUI checkbox or command line switch? Then the overhead would only apply when deliberately enabled by the user.

Looking at the negligible list of supporting titles made this lower priority than it once felt

Yes, there are few historical games with Mockinboard support, but those like me who never had a Mockingboard for our IIe might like to explore those games now through emulation.

And there are modern demos that support the Mockingboard, for example PURE NOISE.

ryandesign commented 5 months ago

Here is the big list of software that supports Mockingboard which could be used for testing:

https://docs.google.com/spreadsheets/d/1ndJo2tpMagqWY79OZMH_p7h0N9-Xuwl6IjxrYsJ97oU/edit?usp=sharing

Tabs at the bottom of the spreadsheet switch between 1980s programs and modern ones.

Adding Mockingboard support to Clock Signal makes it more useful for modern developers looking to create more Mockingboard-supporting software.

TomHarte commented 5 months ago

Having poked at it further, I think probably my initial fears are unfounded; there are good options for ensuring that no virtual calls take place in the main loop. If they'd even have been problematic.

I might have to think through what I can do about stretched cycles though — the fact that every 65th clock cycle is 1/7th longer; the AY is going to need to be aware that it is being fed a a not-quite-regular clock as it has to produce wall-clock-sampled output.

It's probably worth just having a go and seeing what I can do.

TomHarte commented 5 months ago

Oops; don't know how I accidentally closed this. I'm looking into it now, albeit that a brief holiday will interrupt me shortly.