Package libsidplay.components.cart
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
Cartridge base class.
- Autor:
- Antti Lankila
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprivate booleanCurrent state of cartridge-asserted IRQprivate static final Charsetprivate booleanCurrent state of cartridge-asserted NMIfinal PLAInstance of the system's PLA chip.protected SampleMixerConsumes samples of the cartridge while clocking. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidchangedBA(boolean state) Callback to notify cartridge of current state of BA signal on the system bus.voidchangedIRQ(boolean state) Callback to notify cartridge of current state of IRQ signal on the system bus.voidchangedNMI(boolean state) Callback to notify cartridge of current state of NMI signal on the system bus.voidclock()Clock cartridge chipsstatic final Cartridgecreate(PLA pla, CartridgeType cartType, int sizeKB) Create a cartridge.protected voiddoFreeze()Handle pressing of the freeze button.final voidfreeze()Push cartridge's "freeze" button.getIO1()Acquire the IO1 bankgetIO2()Acquire the IO2 bank.getRomh()Get currently active ROMH bank.getRoml()Get currently active ROML bank.In Ultimax mode, the main memory between 0x1000-0xffff is disconnected.voidinstallBankHooks(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.booleanvoidMixer starts mixingstatic CartridgenullCartridge(PLA pla) Return an instance of cartridge when no real cartridge is connected.static Cartridgeread(PLA pla, CartridgeType cartType, File file) Load a cartridge.static CartridgereadCRT(PLA pla, DataInputStream is) Load a cartridge of type CRT.voidreset()Bring the cart to power-on state.voidsetIRQ(boolean state) Assert IRQ (= electrically pull IRQ low) on the system bus.voidsetNMI(boolean state) Assert NMI (= electrically pull NMI low) on the system bus.voidsetSampler(SampleMixer sampler) Set sampler to put cartridge sound samples into the mixtoString()
-
Felddetails
-
ISO88591
-
pla
Instance of the system's PLA chip. -
nmiState
private boolean nmiStateCurrent state of cartridge-asserted NMI -
irqState
private boolean irqStateCurrent state of cartridge-asserted IRQ -
sampler
Consumes samples of the cartridge while clocking.
-
-
Konstruktordetails
-
Cartridge
-
-
Methodendetails
-
getRoml
Get currently active ROML bank.- Gibt zurück:
- ROML bank
-
getRomh
Get currently active ROMH bank.- Gibt zurück:
- ROMH 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
Acquire the IO1 bank- Gibt zurück:
- The bank responding to IO1 line.
-
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 chipcartType- cartridge typesizeKB- size in KB- Gibt zurück:
- a cartridge instance
- Löst aus:
IOException
-
read
Load a cartridge.- Parameter:
pla- Instance of the system's PLA chipcartType- cartridge typefile- file to load from- Gibt zurück:
- a cartridge instance
- Löst aus:
IOException
-
readCRT
Load a cartridge of type CRT.- Parameter:
pla- Instance of the system's PLA chipis- input stream to load from- Gibt zurück:
- a cartridge instance
- Löst aus:
IOException
-
installBankHooks
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
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
Set sampler to put cartridge sound samples into the mix- Parameter:
sampler-
-
getSampler
-
mixerStart
public void mixerStart()Mixer starts mixing -
clock
public void clock()Clock cartridge chips -
toString
-