Cleanup adjustments
This commit is contained in:
parent
7e31fbd582
commit
e97b52e944
|
@ -91,11 +91,6 @@
|
|||
#define CPU_XORBSU 82
|
||||
#define CPU_XORNBSU 83
|
||||
|
||||
/* Functional operand types */
|
||||
#define CPU_LITERAL 0
|
||||
#define CPU_MEMORY 1
|
||||
#define CPU_REGISTER 2
|
||||
|
||||
/* Bit string operations */
|
||||
#define CPU_AND_BS 0
|
||||
#define CPU_ANDN_BS 1
|
||||
|
|
|
@ -643,6 +643,7 @@ VBAPI vbOnWrite vbGetWriteCallback(VB *sim) {
|
|||
VBAPI VB* vbInit(VB *sim) {
|
||||
sim->cart.ram = NULL;
|
||||
sim->cart.rom = NULL;
|
||||
sim->ph.enabled = 0;
|
||||
sim->vsu.out.samples = NULL;
|
||||
sim->onExecute = NULL;
|
||||
sim->onFetch = NULL;
|
||||
|
@ -652,7 +653,7 @@ VBAPI VB* vbInit(VB *sim) {
|
|||
sim->onSamples = NULL;
|
||||
sim->onWrite = NULL;
|
||||
sim->peer = NULL;
|
||||
sim->ph.enabled = 0;
|
||||
sim->tag = NULL;
|
||||
vbReset(sim);
|
||||
return sim;
|
||||
}
|
||||
|
@ -774,6 +775,8 @@ VBAPI int vbSetOption(VB *sim, int key, int value) {
|
|||
VBAPI void vbSetPeer(VB *sim, VB *peer) {
|
||||
if (sim->peer == peer)
|
||||
return;
|
||||
if (sim->peer != NULL)
|
||||
sim->peer->peer = NULL;
|
||||
sim->peer = peer;
|
||||
if (peer == NULL)
|
||||
return;
|
||||
|
@ -784,6 +787,7 @@ VBAPI void vbSetPeer(VB *sim, VB *peer) {
|
|||
|
||||
/* Specify a new value for the program counter */
|
||||
VBAPI uint32_t vbSetProgramCounter(VB *sim, uint32_t value) {
|
||||
sim->cpu.clocks = 0;
|
||||
sim->cpu.operation = CPU_FETCH;
|
||||
sim->cpu.pc = sim->cpu.nextPC = value & 0xFFFFFFFE;
|
||||
sim->cpu.step = 0;
|
||||
|
|
|
@ -345,7 +345,7 @@ static void vsuEmulate(VB *sim, uint32_t clocks) {
|
|||
|
||||
/* Wait for the current sample to finish */
|
||||
if (sim->vsu.clocks != 0)
|
||||
continue;
|
||||
return;
|
||||
|
||||
/* Compute the output sample */
|
||||
output[0] = output[1] = 0;
|
||||
|
|
Loading…
Reference in New Issue