Modifier and Type | Field and Description |
---|---|
Voice[] |
voice
SID voices
|
DEF_BASE_ADDRESS, FC_MAX, REG_COUNT
Constructor and Description |
---|
SID()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clock(int delta_t,
IntConsumer sample)
Clock SID forward using chosen output sampling algorithm.
|
ChipModel |
getChipModel() |
Filter6581 |
getFilter6581() |
Filter8580 |
getFilter8580() |
int |
getInputDigiBoost() |
void |
input(int value)
16-bit input (EXT IN).
|
void |
mute(int channel,
boolean mute)
SID voice muting.
|
byte |
read(int offset)
Read registers.
|
void |
reset()
SID reset.
|
void |
set6581VoiceNonlinearity(float nonLinearity)
Set DAC nonlinearity for 6581 emulation.
|
void |
setChipModel(ChipModel model)
Set chip model.
|
void |
setClockFrequency(double clockFrequency)
Setting of clock frequency.
|
void |
write(int offset,
byte value)
Write registers.
|
public final Voice[] voice
public void set6581VoiceNonlinearity(float nonLinearity)
nonLinearity
- kinkedDac(int, float, int)
public void setChipModel(ChipModel model)
setChipModel
in interface SIDChip
model
- chip model to usepublic ChipModel getChipModel()
getChipModel
in interface SIDChip
public void input(int value)
public byte read(int offset)
Reading a write only register returns the last byte written to any SID register. The individual bits in this value start to fade down towards zero after a few cycles. All bits reach zero within approximately $2000 - $4000 cycles. It has been claimed that this fading happens in an orderly fashion, however sampling of write only registers reveals that this is not the case. NB! This is not correctly modeled. The actual use of write only registers has largely been made in the belief that all SID registers are readable. To support this belief the read would have to be done immediately after a write to the same register (remember that an intermediate write to another register would yield that value instead). With this in mind we return the last value written to any SID register for $2000 cycles without modeling the bit fading.
public void write(int offset, byte value)
public void mute(int channel, boolean mute)
public void setClockFrequency(double clockFrequency)
setClockFrequency
in interface SIDChip
clockFrequency
- System clock frequency at Hzpublic final void clock(int delta_t, IntConsumer sample)
public Filter6581 getFilter6581()
public Filter8580 getFilter8580()
public int getInputDigiBoost()
getInputDigiBoost
in interface SIDChip
Copyright © 2018 Ken Händel. All rights reserved.