mirror of https://github.com/mgba-emu/mgba.git
Merge branch 'master' (early part) into medusa
This commit is contained in:
commit
9d55dd6f03
|
@ -111,7 +111,7 @@ struct mCore {
|
|||
void (*setCursorLocation)(struct mCore*, int x, int y);
|
||||
void (*setCursorDown)(struct mCore*, bool down);
|
||||
|
||||
int32_t (*frameCounter)(const struct mCore*);
|
||||
uint32_t (*frameCounter)(const struct mCore*);
|
||||
int32_t (*frameCycles)(const struct mCore*);
|
||||
int32_t (*frequency)(const struct mCore*);
|
||||
|
||||
|
|
|
@ -329,7 +329,7 @@ struct GBSerializedState {
|
|||
uint32_t reserved;
|
||||
uint32_t nextMode;
|
||||
int32_t dotCounter;
|
||||
int32_t frameCounter;
|
||||
uint32_t frameCounter;
|
||||
|
||||
uint8_t vramCurrentBank;
|
||||
GBSerializedVideoFlags flags;
|
||||
|
|
|
@ -163,7 +163,7 @@ struct GBVideo {
|
|||
|
||||
bool sgbBorders;
|
||||
|
||||
int32_t frameCounter;
|
||||
uint32_t frameCounter;
|
||||
int frameskip;
|
||||
int frameskipCounter;
|
||||
};
|
||||
|
|
|
@ -303,7 +303,7 @@ struct GBASerializedState {
|
|||
int32_t nextEvent;
|
||||
int32_t reserved[5];
|
||||
GBASerializedVideoFlags flags;
|
||||
int32_t frameCounter;
|
||||
uint32_t frameCounter;
|
||||
} video;
|
||||
|
||||
struct {
|
||||
|
|
|
@ -220,7 +220,7 @@ struct GBAVideo {
|
|||
uint16_t* vram;
|
||||
union GBAOAM oam;
|
||||
|
||||
int32_t frameCounter;
|
||||
uint32_t frameCounter;
|
||||
int frameskip;
|
||||
int frameskipCounter;
|
||||
};
|
||||
|
|
|
@ -108,7 +108,7 @@ void mDebuggerRun(struct mDebugger* debugger) {
|
|||
}
|
||||
|
||||
void mDebuggerRunFrame(struct mDebugger* debugger) {
|
||||
int32_t frame = debugger->core->frameCounter(debugger->core);
|
||||
uint32_t frame = debugger->core->frameCounter(debugger->core);
|
||||
do {
|
||||
mDebuggerRun(debugger);
|
||||
} while (debugger->core->frameCounter(debugger->core) == frame);
|
||||
|
|
|
@ -466,7 +466,7 @@ static void _DSCoreSetCursorDown(struct mCore* core, bool down) {
|
|||
dscore->touchDown = down;
|
||||
}
|
||||
|
||||
static int32_t _DSCoreFrameCounter(const struct mCore* core) {
|
||||
static uint32_t _DSCoreFrameCounter(const struct mCore* core) {
|
||||
struct DS* ds = core->board;
|
||||
return ds->video.frameCounter;
|
||||
}
|
||||
|
|
|
@ -648,7 +648,7 @@ static void _GBCoreReset(struct mCore* core) {
|
|||
|
||||
static void _GBCoreRunFrame(struct mCore* core) {
|
||||
struct GB* gb = core->board;
|
||||
int32_t frameCounter = gb->video.frameCounter;
|
||||
uint32_t frameCounter = gb->video.frameCounter;
|
||||
while (gb->video.frameCounter == frameCounter) {
|
||||
SM83Run(core->cpu);
|
||||
}
|
||||
|
@ -711,7 +711,7 @@ static void _GBCoreSetCursorDown(struct mCore* core, bool down) {
|
|||
UNUSED(down);
|
||||
}
|
||||
|
||||
static int32_t _GBCoreFrameCounter(const struct mCore* core) {
|
||||
static uint32_t _GBCoreFrameCounter(const struct mCore* core) {
|
||||
const struct GB* gb = core->board;
|
||||
return gb->video.frameCounter;
|
||||
}
|
||||
|
|
|
@ -676,7 +676,7 @@ static void _GBACoreReset(struct mCore* core) {
|
|||
|
||||
static void _GBACoreRunFrame(struct mCore* core) {
|
||||
struct GBA* gba = core->board;
|
||||
int32_t frameCounter = gba->video.frameCounter;
|
||||
uint32_t frameCounter = gba->video.frameCounter;
|
||||
uint32_t startCycle = mTimingCurrentTime(&gba->timing);
|
||||
while (gba->video.frameCounter == frameCounter && mTimingCurrentTime(&gba->timing) - startCycle < VIDEO_TOTAL_LENGTH + VIDEO_HORIZONTAL_LENGTH) {
|
||||
ARMv4RunLoop(core->cpu);
|
||||
|
@ -734,7 +734,7 @@ static void _GBACoreSetCursorDown(struct mCore* core, bool down) {
|
|||
UNUSED(down);
|
||||
}
|
||||
|
||||
static int32_t _GBACoreFrameCounter(const struct mCore* core) {
|
||||
static uint32_t _GBACoreFrameCounter(const struct mCore* core) {
|
||||
const struct GBA* gba = core->board;
|
||||
return gba->video.frameCounter;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue