### Kudzu To Do

- CXDB to dataset
  - Merge code so it doesnt copy to DS each time on load/save - or move sooner to a db
- ring restrictions on console etc.. by class, or explict inclusion
- PIT/RTC
  - And sleep, needed for ATA
- ATA
- int.parse plug
  - plug article
- tohex plug based on string input of X8 etc
- Express article
- Guess Demo
- Watches - at least locals first
  - CXDB to dataset
- Step over
- Bootstrap - clean up more

### Matthijs - Next Release

- Express isnt showing any templates

### Trivalik - Next Release

- Remove 2008
  - And 2010 suffixes

### Next Release + 1

- Warning 1 Could not read state file "obj\Release\ResolveAssemblyReference.cache". Unable to cast object of type 'Microsoft.Build.Tasks.SystemState' to type 'Microsoft.Build.Tasks.StateFileBase'. C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets 0 1 Guess (source2\Demos\Guess\Guess)
- Merge VSIP and Debugger projects into VSIP project
- Output Window
  - http://msdn.microsoft.com/en-us/library/bb166236.aspx
  - var xDTE = (DTE2)Shell.Package.GetGlobalService(typeof(EnvDTE.DTE));
    var xPane = xDTE.ToolWindows.OutputWindow.OutputWindowPanes;
    xPane.Add("Cosmos");
- Throw exception on null ref...
- Plugs - warn if plugging something that doesnt exists... caused the x08 bug?
- Write out .asm line number to the cxdb file so I can use it in cgdb
- (joint with Kudzu) - Move all critical plugs out of old asms and remove building of old asms.
  - And the plugs also from CustomImplementations in IL2CPU?
- Exceptions dont work. Try int.parse("asdf"). It runs but when the exception is hit we get garbage back instead. (ie exceptions through plug proxy dont work)
- We are still stuck on install.bat.. I made a change in Cosmos.Hardware.. but it didnt take effect until I ran install.bat..
- IL2CPU.AlwaysCompile attribute and get rid of IDT.Dummy
- int j = Array.IndexOf(Digits, s[i]);
  - When Digits is a char array, we get a plug needed error.
- cxdb contains full asm path and filenames over and over... cant we write them out once and use a byte/word index to identify them? This will make it smaller and make reading faster.
- Plugs
  - Source Plugs - Leave as they are
  - Assembly Plugs - Change to have attribute on the TARGET instead of the implementation and only allow assembly.. this cuts out the "proxy" class and makes it easier to find plug impls. See Rings.html for more info. The assembly level plugs can even go in the same assembly, source file and if we can the same class? That is currently these assembly plugs require 3 classes to implement. its ugly and messy... we can get it down to 2 - 1 + assembly (X# only!). Current way is such a mess we even comment them as plugged, but then have to go guessing where the impl is... See example down below....
  - Convert all source plugs and disable old attributes...so for new ones use new names
- We need to dynamically load the plugs etc so we can just rebuild and run and even trace them without rerunnig the bat for each change
- 2010 support
  - http://blogs.msdn.com/b/jacdavis/archive/2010/04/05/vs-2010-version-of-debugenginesample-is-now-available.aspx
  - Trivalik worked on some already
- Ring attributes and enforcement
  - Also allow restriction of assembly references
  - Only allow core to be /unsafe, no others
- Ask on forums: How to debug the vsdebug pkg?
  - http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/6a9a307a-19fa-4c06-8728-303c1f4dd0bc/

### Even later

- localloc - int.parse needs plug for now because of this.
- use INT3 for BP? Will save 3 bytes per call.. which is a lot...
- Gradual X# upgrades (Kudzu)
- Filesystem
- Memory Manager
  - http://www.osdever.net/tutorials/view/memory-management-1
  - http://www.osdever.net/tutorials/view/memory-management-2
- UDP
- TCP
- Cosmos.Debug.Common - much in here is not common and should be moved to VSDebug.. Add Readme.html that NASM and VSDebug use whats left
- foreach / interfaces

### Farther Down

- USB

### Notes

### Assembly Plug Example

#### Old way

(3 classes, often 3 source files as well)

    public class CPUBus {
    	// Plugged
    	public static void Write8(UInt16 aPort, byte aData) { }
    ...

    [Plug(Target = typeof(Cosmos.Kernel.CPUBus))]
    class CPUBus {
    	[PlugMethod(Assembler = typeof(Assemblers.IOWrite8))]
    	public static void Write8(UInt16 aPort, byte aData) { }
    ...

    public sealed class IOWrite8: AssemblerMethod {
    	public override void AssembleNew(object aAssembler, object aMethodInfo) {
    		//TODO: This is a lot of work to write to a single port. We need to have some kind of inline ASM option that can emit a single out instruction
    		new CPUx86.Move { DestinationReg = CPUx86.Registers.EDX, SourceReg = CPUx86.Registers.EBP, SourceDisplacement = 0xC, SourceIsIndirect = true };
    		new CPUx86.Move { DestinationReg = CPUx86.Registers.EAX, SourceReg = CPUx86.Registers.EBP, SourceDisplacement = 0x8, SourceIsIndirect = true };
    		new CPUx86.Out { DestinationReg = CPUx86.Registers.AL };
    	}
    }

#### New way

See how much neater and self contained this is? :)

public class CPUBus {
[AsmBody(Assembler = typeof(IOWrite8))]
public static void Write8(UInt16 aPort, byte aData) { }
// Nested class even... :) Keeps it all in one unit!
public class IOWrite8 : CodeBlock {
public override void Assemble() {
EDX = EBP + 0x0C;
EAX = EBP + 0x08;
Port[DX] = AL;
}
}
}