From 8bc434fd6e92d1d971b40de5afa4feb4cea8f5a7 Mon Sep 17 00:00:00 2001 From: Francois CARON Date: Sun, 1 Dec 2024 12:11:49 +0100 Subject: [PATCH] Using a theorical memeroy model, on a 16 bits bus, we can expect long write cycle take twice the time of a word/byte acess --- yabause/src/sys/memory/src/memory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yabause/src/sys/memory/src/memory.c b/yabause/src/sys/memory/src/memory.c index 3ea900c84..2ca014b59 100644 --- a/yabause/src/sys/memory/src/memory.c +++ b/yabause/src/sys/memory/src/memory.c @@ -918,6 +918,7 @@ void FASTCALL SH2MappedMemoryWriteByte(SH2_struct *context, u32 addr, u8 val) { int id = addr >> 29; if (context == NULL) id =1; + context->cycles += 1; SH2WriteNotify(context, addr, 1); switch (id) { @@ -987,6 +988,7 @@ void FASTCALL SH2MappedMemoryWriteWord(SH2_struct *context, u32 addr, u16 val) { int id = addr >> 29; if (context == NULL) id =1; + context->cycles += 1; SH2WriteNotify(context, addr, 2); switch (id) { @@ -1058,6 +1060,7 @@ void FASTCALL SH2MappedMemoryWriteLong(SH2_struct *context, u32 addr, u32 val) { int id = addr >> 29; if (context == NULL) id =1; + context->cycles += 2; SH2WriteNotify(context, addr, 4); switch (id) {