note: pausing writes out zeros, doesn't restore previous values
	which is noticable


doubling length of writes:	still issue
removing rasterbars:		still issue
removing volume bars:		still issue
remove time update:		still issue
remove dead code:		still issue
remove title screen:		still issue
remove all graphics calls:	still issue
remove memory shuffling in back:still issue
remove keyboard:		still issue
remove all non-irq code:	still issue
remove all text print code	still issue
remove multi file (down to 973) still issue
remove dos33 code		still issue
remove lz4 code			still issue
remove interrupt driven		still issue!?
play at 25Hz			still issue
50Hz,inline, no play 11,12,13	still issue
also turn off A/B freq		still issue
also turn off noise/Aamp/Bamp	still issue
move to single output routine	still issue
always volume 12		still issue
fix clear accidentally wr r14	still issue
generate single tone		FINE!!!
only play first 16 notes	still issue
only change C-fine value	still issue
only write val, not address	still issue
use handshake-free porta/6522	still issue

	Look at interrupt registers on 6522

	Emulator: IFR=$C0 IER=$80,	Actual: IFR=$C0,IER=$C0
	For 6552-2 it is $00/$80 on both

Tried soldering so pin 18 (PB1) always high
				still issue

	Tried reading back value from AY-3-8910, always match.
	Channel A and B now have glitches offset by 320ms?
	Interrupt happens at 50Hz=20ms? 16 samples??!??


NOTE: Applewin Bugs
	+ Doesn't support reading back AY-3-8910 (Always returns
		last written value?)
	+ IER doesn't show Timer1 enabled? (returns 80 rather than C0)


Now glitch happens exactly every 640ms (32 50Hz interrupts) when playing
	pattern of 8 notes repeatedly


Remove other cards from machine to see if power issue
				still issue


When down to writing 4 values,
	$51,$3c,$32,$50, issue seems to often hit on
	the 51->3C transition


Down to two values, still only hit on the 51->3c transition.
	Sometimes everytime, sometimes every Xth time.


$51 by itself = fine
$3c by itself = fine

50/3c and 50/32 also have issues, but not quite the same
(Some, audio fading instead of glitch?)


Got new AY-3-8913 chips
Tried looking at the timings.
8913 timings are actually worse in some cases (especially writes)
than 8910, though still in the low us range so we shouldn't be 
hitting it?

The programming manual and timing diagrams hint that you can flip
the address_latch / address ordering when writing.  This does
work on real hardware but not in any of the emulators.

Have a new test, chiptune_smallest:
+ No IRQ, plain busy wait at 20ms
+ No lookups, hardcode the $51 to $3c transition

Still shows the glitch, actually very quickly.
Changes made to test this:
+ Try increasing the WAIT delay from 85 to 120
	(still an issue)
	
