It has IO ports set for key, switches, LEDs, and VGA. The buttons and seven segment are hooked up to nothing so that they won't throw errors if written to. See QuadPong to see how the IO ports are mapped on the real board.
Requires .NET 2.0 to run and .NET 3.5 to compile.
Also included is a clone of KCPSM3.EXE. Main advantage over KCPSM3.EXE is that PicoCompile is not a 16-bit program and will therefore run on 64-bit Windows. The files generated by this should be identical to the files generated by running KCPSM3.EXE.
I have only tested my QuadPong, but it ran fine without modification. Some operations,
such as the
TEST operation are completly untested.
To debug programs you can either use
Cpu.Tick() instead of
Cpu.Start() to single
step through programs or add the
BREAKPOINT instruction to your program and attch
It runs at about 65MHz on my Core 2 3.16GHz. There is an adjustable stall inserter and can by be set to make it run at the target rate of 25MHz. The option to enable the VGA frame buffer does not seem to speed things up, so might be removed once I test more drawing intensive programs.
Terrible code warning
I like have no idea how to write a compiler, so there is a good chance the one I wrote is terrible.
Copyright (c) 2009, Austin Wise
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY AUSTIN WISE ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.