com.monkeycoder.monkeynes.hardware.mapper
Class MemoryMapperFactory

java.lang.Object
  |
  +--com.monkeycoder.monkeynes.hardware.mapper.MemoryMapperFactory

public class MemoryMapperFactory
extends Object

This factory creates MemoryMappers by number.

Originally part of the MonkeyNES project.

Author:
David Stephens

Constructor Summary
MemoryMapperFactory(NesMainMemory inMainMem, NesVideoMemory inVidMem)
          Creates a new MemoryMapperFactory.
 
Method Summary
 MemoryMapper getMapper(NesRom inRom)
          Creates a new MemoryMapper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryMapperFactory

public MemoryMapperFactory(NesMainMemory inMainMem,
                           NesVideoMemory inVidMem)
Creates a new MemoryMapperFactory.

Parameters:
inMainMem - Main memory bank that will be used to create new mappers.
inVidMem - Video memory bank that will be used to create new mappers.
Method Detail

getMapper

public MemoryMapper getMapper(NesRom inRom)
Creates a new MemoryMapper.

Parameters:
inRom - ROM accessed by this mapper.
Returns:
A new mapper based on the ROM that was passed in.