[Apr 2012]

* Native GEM driver:
  - VTEST starts.

	  - Need to consider FLIP_Y: What returns it, and when?

  	  - BASIC2 fails to launch (also fails on real GEM/3, afaics). System
	    initialisation fails with error 127 (Unknown error) deep down in 
	    calculation based on text metrics and window sizes.

	  - PAINT loads images with the wrong colours.

	  - Screen -> memory -> screen blit gives wrongness for colours
	   >8 -- but only under GEM/2, not GEM/3. Very odd.

  - Getting errors accessing Winchester B:, seemingly at random. Why? 

[Jan 2012]

> All:
	* SID does not step code properly (Single-step interrupt broken?)

	* AEMOUSE: Does not implement functions 0A (define text cursor),
	 13 (Light pen emulation on), 14 (Light pen emulation off),
	 16 (Define screen region for updating) or any MOUSE 2.x+ functions.

> Wang: 
	* Release updated psftools.

	* Wang: Timer frequencies are a bit off.

	On real hardware, T0: 05E7; 05E2; 05DD; 05D8... 
			  T1: 7B85; 6771; 535D; 3F49...
			  T2: 0F46; 0F41; 0F3C; 0F34...

	On QDAE,          T0: 1388; 1388; 1388; ... } Stopped. do we care?
			  T1: F0F0; F0F0; F0F0; ... }
			  T2: 02AD; 02A7; 02A1; ... about 1.7x as fast as it
						    ought.

	* Check that my 8237 changes haven't broken the FP.

> All: Native GSX
	- ACTivity seems to run normally. Sketch does not.

> Native clock driver
	- Need a CP/M-86 equivalent, probably done as an RSX. 

> PC/Xi: No colour emulation (see apr00336.dsk)

> F10 emulation: With an F10 boot ROM, system hangs. Reason:
	The Z80-CTC is interrupting every 5 machine cycles, whereas the
	F1 ROM sets the count to 10922 cycles. Is there something 
	different about the base CTC clock on the F10?

		F10 sends: C7 01
			[Interrupt, counter, prescale=16, falling edge]
		F1  sends: B7 B6
			[Interrupt, timer, prescale=256,rising edge]

	[F1 tech ref tells us that on the F1, the counter uses a 153.8 KHz 
	 clock, while the timer uses a 2.333MHz clock.

		=> 2333333 / (16 x 16 x 10922) = 0.0834515

		=> 153800 / (16 x 5) = 1922.5  ]

	My guess: The F10 is wired differently, and we need a separate
	emulation for it. The Z80-CTC channel 3 is triggered by a 
	single counter pulse.


> FP emulation: 
	>> No speech recognition. 6301 passes self-test, but that's all it 
	  does.

	>> Timer 2 countdown is slightly wrong. Intervals are 752A ; 751B; 750F
				should be                     752B ; 7517; 7506
	   (but that's the best I can do with integers and no exact CPU 
	   timing).

Wish List:
==========
> Support other Winchester controllers: 
	- R7    (one drive only, no interrupt register)
	- MX 80 (one drive only, at secondary addresses)
	- Quad  (four drives)

> Support F2 and F10.
> Support Xen.
> Support Sirius aka Victor 9000.

[Error codes:
23 CRTC. Register test of the 6845 video controller. This test is skipped if no color RAM is present.
27 PIC. Register test of the 8259 programmable interrupt controller.
29 PIT. Does a register test of the clock chip.
33 CLOCK INT. Checks whether a clock interrupt can be generated.
22 SIO. Register test of the Z80 SIO.
28 FDC. Register test of the WD 2797 floppy disk controller.
35 DRIVE TEST. Checks whether Drive 0 exists and can be restored and stepped.
37 DMA. Tests the operation of the 8237 DMA controller by performing a memory move.
38 VOICE. Tests the 6301 speech processor, including a test of the 6301's internal RAM and ROM.
20 PROM. Calculates the checksum of the PROM and compares it to that stored at the start of the PROM.
]	

> Mouse: Are the buttons the right way round?

> If you quit with the mouse captured, it doesn't autorelease.

[Aug 2008]

>> Without the 8089, hangs on boot.

> 8089 status:
	 * CP/M-86 Plus boots and can read and write sectors.

	 * CCP/M-86 reports 0k of free memory at full RAM size. It works
	  with 512k, so I'm using that for now. Can read and write sectors. 

	 * MS-DOS (BIOS 3.1) boots and can read and (maybe) write sectors. 
	  Problem encountered during testing where writes did not save;
          is QDAE closing the drive image properly?
	 * MS-DOS (BIOS 2.4) boots and can read and write sectors. 

	 * xi_msdos_1.dsk boots and can read sectors.

> MS-DOS (3.1) still has an insanely fast typematic rate, despite slowing the
 machine down.

[Oct 2007]

> XI emulation:
	- Launch DEBUG (use the SDAXI9 test script, i.e. ./test). Hit Ctrl+C. 
	 Ouch. Though this may be a genuine BIOS bug.

[Jun 2007]

> Now we have virtual store+fetch, can implement variable RAM size.
 This will require implementing the [f6] settings menu...

> XI emulation:
	- Screen appears to work in text and graphics modes (Text mode 
	 cursor largely untested). There is no proper CRTC emulation, so 
         custom modes won't work as expected.

	- Random, or seemingly random, crashes caused just by moving the 
	 mouse (nb: homebrewed mouse patch in place). May be fixed by the
	 change to the interrupt handler.

	- We have a uScreen in the bottom third of the screen; it appears to
	 work, though some of the control codes don't do anything (eg: 
	 0xE0 query, 0xE4 set time/date, 0xE5/0xE6 mouse on/off, 0xE7 
	 diagnostics)

	- No sound generator.
	- PIC appears to work (more or less) to generate timer interrupts and
	 keyboard input.
	- PIT rigged to pass self-test.
	- Keyboard rigged to pass self-test (albeit with a brief flash of
	  "Error 31")
	- PIC/timer linkage appears to work.
	- 8089 rigged to pass self-test and boot just about anything.

	- Video RAM: Incomplete decoding (virtual store+fetch) implemented 
	 and appears to be operational.

[debugging info]
	ROM font is at FC80:0000 (gets copied to 0680:0000)
	Character mapping is:
		00    => Space
		01-0A => 0 - 9
		0B-11 => Testing
		12-13 => Clock
		14-15 => Uparrow
		16-17 => Hard disk
		18-1F => SroEOKRM
		20-2D => Apricot logo
		2E-31 => ABym
		32-35 => Floppy disk

	Font is copied to RAM at CS:IP = FD10:1D05
	Text drawing takes place at CS:IP = FD10:035E


> Mouse seems to be producing keystrokes, not mouse movement. For example
 use ./qdae a.dsk and run GEM. No mouse movement.

> ./qdae system.dsk  followed by running GRAPHICS.EXE will crash QDAE.


  As QDAE is, indeed, quick and dirty, this TODO list really should read 
'rewrite everything'. But what we have is:

IMMEDIATE

* Backport interrupt fixes (that stopped double-sided DOS loading) to GDE.

* TYPE GEM.KB will crash QDAE.
  -- Believe it or not, a BIOS bug. ESC followed by a byte > 127 will
    crash the BIOS, and QDAE doesn't care for illegal opcodes.

MEDIUM TERM 

i) Z80 CTC is rigged. Time-sensitive functions will be iffy.

ii) Z80 SIO is rigged to pass the POST and provide keyboard input.

iii) No beeper.

iv) No UI to handle such minor matters as inserting floppies.
   -- Add overall settings to UI. 
   -- Add a UI for choosing a boot disk at startup?

v) Booting is slow. Need either some sort of snapshot support, or 
     a bypass, or improved emulation.
   -- Can now press F10 to make it boot from selected media.
   -- If QDAE launched with a disc, it presses F10 itself.

vi) 50/60 screen options in GEM - what do they do, and why don't they save?

LONG TERM

i) Internal architecture rewrite - pick up the JOYCE structure, with a 
  common base class for all devices.

ii) Winchester emulation.
	-- Get Winchester filenames from .qdaerc
	-- Override with -w1 and -w2 options.

iii) Emulate different types of machine, based on what boot disc is passed
    in:
	-- F1/F2/F10 (need Winchester for F10)
	-- PC/Xi
	-- Portable
	-- Xen?

   If no type passed in, get it from boot floppy (if present) otherwise from
   default Winchester.

