mirror of https://github.com/bsnes-emu/bsnes.git
parent
d8bc2050be
commit
3fb7ff6bfe
|
@ -48,10 +48,7 @@ namespace SameBoy {
|
|||
}
|
||||
|
||||
auto ICD::synchronizeCPU() -> void {
|
||||
if(clock >= 0) {
|
||||
scheduler.desynchronize();
|
||||
co_switch(cpu.thread);
|
||||
}
|
||||
if(clock >= 0) scheduler.resume(cpu.thread);
|
||||
}
|
||||
|
||||
auto ICD::Enter() -> void {
|
||||
|
|
|
@ -12,10 +12,7 @@ namespace SuperFamicom {
|
|||
SA1 sa1;
|
||||
|
||||
auto SA1::synchronizeCPU() -> void {
|
||||
if(clock >= 0) {
|
||||
scheduler.desynchronize();
|
||||
co_switch(cpu.thread);
|
||||
}
|
||||
if(clock >= 0) scheduler.resume(cpu.thread);
|
||||
}
|
||||
|
||||
auto SA1::Enter() -> void {
|
||||
|
|
|
@ -9,10 +9,7 @@ SMP smp;
|
|||
#include "serialization.cpp"
|
||||
|
||||
auto SMP::synchronizeCPU() -> void {
|
||||
if(clock >= 0) {
|
||||
scheduler.desynchronize();
|
||||
co_switch(cpu.thread);
|
||||
}
|
||||
if(clock >= 0) scheduler.resume(cpu.thread);
|
||||
}
|
||||
|
||||
auto SMP::synchronizeDSP() -> void {
|
||||
|
|
|
@ -168,20 +168,6 @@ void co_switch(cothread_t handle) {
|
|||
co_swap(co_active_handle = handle, co_previous_handle);
|
||||
}
|
||||
|
||||
unsigned int co_size(unsigned int size) {
|
||||
size += 512;
|
||||
size &= ~15;
|
||||
return size;
|
||||
}
|
||||
|
||||
void co_save(cothread_t handle, void* memory, unsigned int size) {
|
||||
memcpy(memory, handle, size);
|
||||
}
|
||||
|
||||
void co_load(cothread_t handle, const void* memory, unsigned int size) {
|
||||
memcpy(handle, memory, size);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -18,9 +18,6 @@ cothread_t co_derive(void*, unsigned int, void (*)(void));
|
|||
cothread_t co_create(unsigned int, void (*)(void));
|
||||
void co_delete(cothread_t);
|
||||
void co_switch(cothread_t);
|
||||
unsigned int co_size(unsigned int);
|
||||
void co_save(cothread_t, void*, unsigned int);
|
||||
void co_load(cothread_t, const void*, unsigned int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue