all repos — mgba @ 19648c786dcc4c1f66871cecbaedd98418c75854

mGBA Game Boy Advance Emulator

GBA SIO: Add timing data
Jeffrey Pfau jeffrey@endrift.com
Sun, 11 Jan 2015 16:31:02 -0800
commit

19648c786dcc4c1f66871cecbaedd98418c75854

parent

8118c94c8128a4aaf5cef83d87dab1e4b09bd646

2 files changed, 11 insertions(+), 0 deletions(-)

jump to
M src/gba/gba-sio.csrc/gba/gba-sio.c

@@ -7,6 +7,13 @@ #include "gba-sio.h"

#include "gba-io.h" +const int GBASIOCyclesPerTransfer[4][MAX_GBAS] = { + { 31457, 62914, 94371, 125829 }, + { 7864, 15728, 23592, 31457 }, + { 5242, 10485, 15728, 20971 }, + { 2621, 5242, 7864, 10485 } +}; + static struct GBASIODriver* _lookupDriver(struct GBASIO* sio, enum GBASIOMode mode) { switch (mode) { case SIO_NORMAL_8:
M src/gba/gba-sio.hsrc/gba/gba-sio.h

@@ -8,6 +8,10 @@ #define GBA_SIO_H

#include "util/common.h" +#define MAX_GBAS 4 + +extern const int GBASIOCyclesPerTransfer[4][MAX_GBAS]; + enum GBASIOMode { SIO_NORMAL_8 = 0, SIO_NORMAL_32 = 1,