- [NEW] Frequència del Z80 configurable

This commit is contained in:
2024-12-20 11:24:58 +01:00
parent 4a0e2b3b7d
commit fe36a970c2
5 changed files with 23 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
#include "zx_ula.h"
#include <z80.h>
#include <SDL2/SDL.h>
#define AUDIO_BUFFER_SIZE 2048
@@ -292,7 +293,7 @@ namespace zx_ula
if (t_sound>=317) {
t_sound-=317;
samples_generated++;
if (samples_t >=3500000) {
if (samples_t >=z80::getClock()) {
//printf("%i\n", samples_generated);
samples_generated=0;
samples_t = 0;