de.michab.simulator
Class DefaultChip

java.lang.Object
  extended byde.michab.simulator.DefaultChip
All Implemented Interfaces:
Addressable, Chip
Direct Known Subclasses:
Cia, Cpu6510, Sid, Vic

public abstract class DefaultChip
extends java.lang.Object
implements Chip

This is a helper class providing a default implementation for the memory attribute and a simple port array factory.

Version:
$Revision: 1.13 $
Author:
Michael G. Binz

Constructor Summary
DefaultChip()
           
 
Method Summary
protected  Port[] createPorts(int numOfRegs)
          This creates an array of Ports tied to the Chip.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.michab.simulator.Chip
getPorts, reset
 
Methods inherited from interface de.michab.simulator.Addressable
read, write
 

Constructor Detail

DefaultChip

public DefaultChip()
Method Detail

createPorts

protected final Port[] createPorts(int numOfRegs)
This creates an array of Ports tied to the Chip. A write operation on the Port is forwarded to Chip.write(). Just a helper, can be used by subclasses but not overridden.

Parameters:
numOfRegs - The number of registers to be supported.
Returns:
A newly allocated array of ports. The array index represents the respective port number.