Klasse Cartridge

java.lang.Object
libsidplay.components.cart.Cartridge
Bekannte direkte Unterklassen:
ActionReplay, AtomicPower, Comal80, EasyFlash, EpyxFastLoad, Expert, FinalV1, FinalV3, GeoRAM, GMod2, MagicDesk, MikroAss, Normal, OceanType1, REU, Rex, SFXSoundExpander, SFXSoundExpanderOPL3, Zaxxon

public class Cartridge extends Object
Cartridge base class.
Autor:
Antti Lankila
  • Verschachtelte Klassen - Übersicht

    Verschachtelte Klassen
    Modifizierer und Typ
    Klasse
    Beschreibung
    static enum 
    CCS64 cartridge type map
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    private boolean
    Current state of cartridge-asserted IRQ
    private static final Charset
     
    private boolean
    Current state of cartridge-asserted NMI
    final PLA
    Instance of the system's PLA chip.
    protected SampleMixer
    Consumes samples of the cartridge while clocking.
  • Konstruktorübersicht

    Konstruktoren
    Modifizierer
    Konstruktor
    Beschreibung
    protected
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    changedBA(boolean state)
    Callback to notify cartridge of current state of BA signal on the system bus.
    void
    changedIRQ(boolean state)
    Callback to notify cartridge of current state of IRQ signal on the system bus.
    void
    changedNMI(boolean state)
    Callback to notify cartridge of current state of NMI signal on the system bus.
    void
    Clock cartridge chips
    static final Cartridge
    create(PLA pla, CartridgeType cartType, int sizeKB)
    Create a cartridge.
    protected void
    Handle pressing of the freeze button.
    final void
    Push cartridge's "freeze" button.
    Acquire the IO1 bank
    Acquire the IO2 bank.
    Get currently active ROMH bank.
    Get currently active ROML bank.
     
    In Ultimax mode, the main memory between 0x1000-0xffff is disconnected.
    void
    installBankHooks(Bank[] cpuReadMap, Bank[] cpuWriteMap)
    If the cartridge needs to listen to write activity on specific banks, it can install the requisite hooks into the bank here.
    boolean
     
    void
    Mixer starts mixing
    static Cartridge
    Return an instance of cartridge when no real cartridge is connected.
    static Cartridge
    read(PLA pla, CartridgeType cartType, File file)
    Load a cartridge.
    static Cartridge
    Load a cartridge of type CRT.
    void
    Bring the cart to power-on state.
    void
    setIRQ(boolean state)
    Assert IRQ (= electrically pull IRQ low) on the system bus.
    void
    setNMI(boolean state)
    Assert NMI (= electrically pull NMI low) on the system bus.
    void
    Set sampler to put cartridge sound samples into the mix
     

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Felddetails

    • ISO88591

      private static final Charset ISO88591
    • pla

      public final PLA pla
      Instance of the system's PLA chip.
    • nmiState

      private boolean nmiState
      Current state of cartridge-asserted NMI
    • irqState

      private boolean irqState
      Current state of cartridge-asserted IRQ
    • sampler

      protected SampleMixer sampler
      Consumes samples of the cartridge while clocking.
  • Konstruktordetails

    • Cartridge

      protected Cartridge(PLA pla)
  • Methodendetails

    • getRoml

      public Bank getRoml()
      Get currently active ROML bank.
      Gibt zurück:
      ROML bank
    • getRomh

      public Bank getRomh()
      Get currently active ROMH bank.
      Gibt zurück:
      ROMH bank
    • getUltimaxMemory

      public Bank getUltimaxMemory()
      In Ultimax mode, the main memory between 0x1000-0xffff is disconnected. This allows carts to export their own memory for those regions, excluding the areas that will be mapped to ROML, IO and ROMH, though.
      Gibt zurück:
      Memory bank for Ultimax mode
    • getIO1

      public Bank getIO1()
      Acquire the IO1 bank
      Gibt zurück:
      The bank responding to IO1 line.
    • getIO2

      public Bank getIO2()
      Acquire the IO2 bank.
      Gibt zurück:
      The bank responding to IO2 line.
    • create

      public static final Cartridge create(PLA pla, CartridgeType cartType, int sizeKB) throws IOException
      Create a cartridge.
      Parameter:
      pla - Instance of the system's PLA chip
      cartType - cartridge type
      sizeKB - size in KB
      Gibt zurück:
      a cartridge instance
      Löst aus:
      IOException
    • read

      public static Cartridge read(PLA pla, CartridgeType cartType, File file) throws IOException
      Load a cartridge.
      Parameter:
      pla - Instance of the system's PLA chip
      cartType - cartridge type
      file - file to load from
      Gibt zurück:
      a cartridge instance
      Löst aus:
      IOException
    • readCRT

      public static Cartridge readCRT(PLA pla, DataInputStream is) throws IOException
      Load a cartridge of type CRT.
      Parameter:
      pla - Instance of the system's PLA chip
      is - input stream to load from
      Gibt zurück:
      a cartridge instance
      Löst aus:
      IOException
    • installBankHooks

      public void installBankHooks(Bank[] cpuReadMap, Bank[] cpuWriteMap)
      If the cartridge needs to listen to write activity on specific banks, it can install the requisite hooks into the bank here.
      Parameter:
      cpuReadMap -
      cpuWriteMap -
    • nullCartridge

      public static Cartridge nullCartridge(PLA pla)
      Return an instance of cartridge when no real cartridge is connected.
      Gibt zurück:
      the null cartridge
    • reset

      public void reset()
      Bring the cart to power-on state. If overridden, remember to call the superclass method.
    • freeze

      public final void freeze()
      Push cartridge's "freeze" button. Because this is an UI-method, we use thread-safe scheduling to delay the freezing to occur at some safe later time. Subclasses need to override doFreeze().
    • doFreeze

      protected void doFreeze()
      Handle pressing of the freeze button.
    • changedNMI

      public void changedNMI(boolean state)
      Callback to notify cartridge of current state of NMI signal on the system bus. The boolean value is active high.
      Parameter:
      state -
    • changedIRQ

      public void changedIRQ(boolean state)
      Callback to notify cartridge of current state of IRQ signal on the system bus. The boolean value is active high.
      Parameter:
      state -
    • changedBA

      public void changedBA(boolean state)
      Callback to notify cartridge of current state of BA signal on the system bus. The boolean value is active high.
      Parameter:
      state -
    • setNMI

      public void setNMI(boolean state)
      Assert NMI (= electrically pull NMI low) on the system bus. The boolean value is active high. Method is meant for subclasses only.
      Parameter:
      state -
    • setIRQ

      public void setIRQ(boolean state)
      Assert IRQ (= electrically pull IRQ low) on the system bus. The boolean value is active high. Method is meant for subclasses only.
      Parameter:
      state -
    • isCreatingSamples

      public boolean isCreatingSamples()
      Gibt zurück:
      is catridge producing sound?
    • setSampler

      public void setSampler(SampleMixer sampler)
      Set sampler to put cartridge sound samples into the mix
      Parameter:
      sampler -
    • getSampler

      public SampleMixer getSampler()
    • mixerStart

      public void mixerStart()
      Mixer starts mixing
    • clock

      public void clock()
      Clock cartridge chips
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object