CpuEmulator is a CPU emulator project that aims to emulate a CPU (the 6809 to start with), it’s registers, and system memory. It will allow you to monitor registers, flags and memory as you step through code. Having done SharpiEmu for the Sharp PC–1360 Pocket Computer, the concept seems pretty simple. The 6809 has a number of addressing modes, and different opcodes for the same mnemonic. So I’m expecting it to be somewhat more of a challenge.
Initial version will emulate the CPU, memory, and text video mode.
- Emulate 6809 instructions
- Emulate 32×16 & 80×24 text modes
- Emulate the Coco3’s MMU
- 4K all the way up to 512KB memory options
- Debugger that steps through code, shows current state of registers, selected memory block, and source code from a listing file.
- Break points. They are remembered between runs.
- Memory watcher. When memory at a certain addresses are modified, a breakpoint is triggered so you can see what modified it.
Continue reading 6809 CPU Emulator project started
Bouncy Ball 2 Progress Report 1. First things first. We need to get the Coco 3 into it’s high resolution graphics mode, then display a little something. To start out small, I decided to create a program that sets the video mode, uses the MMU to map in the video memory, then clears the screen. That part was easy, although understanding the MMU was a little whacky.
Continue reading Bouncy Ball 2 Progress Report #1
Radio Shack Catalog Number 26–3143. The Orchestra–90 CC is a stereo 8-bit audio player for the Color Computer. It works by mapping two addresses in the Coco’s address space to two 8-bit DACs. $FF7A is for left, and $FF7B is for the right. This is the first time I have been able to use this cart, never mind program it! So far, it’s pretty easy to program.
Continue reading Orchestra 90 CC Stereo Music Synthesizer
There was an interesting thread on Facebook this week that was talking about optimization. They took an imaginary sprite routine and optimized the crap out of it. In this article I’m going walk through the various stages of optimization and provide my own analysis of why the changes were made, and why (or if) the optimization was any good.
I’m going to assume you know how, or are familiar with some arcane programming language, and are either somewhat familiar with assembly or enjoy punishing your brain.
You might be surprised with the results of version 5 and 5p. Sometimes less instructions doesn’t always mean faster.
Continue reading Optimizing an Imaginary Sprite