kstenerud / Musashi

Motorola 680x0 emulator written in C
412 stars 94 forks source link

M68K_REG_SR handling fix from dgen #28

Open clbr opened 6 years ago

clbr commented 6 years ago

I noticed this commit from dgen is not present here: https://sourceforge.net/p/dgen/dgen/ci/a6f61a594b996840110a6c4bc0347a9d8e4f81e7/

" musa: fix M68K_REG_SR handling in m68k_set_reg()

m68k_set_reg() is used to set registers to a given value. Modifying the
status register should not check for interrupts and especially not update
the stack pointer.

Fixes various freezes happening when loading save states or cycling between
CPU emulators.

"

zelurker commented 5 years ago

Thanks, at least merged this commit in my fork... !

kstenerud commented 5 years ago

Whatever fixes you've done in your fork, please open a PR here :)

I don't have much time to devote, but I always welcome PRs :)

zelurker commented 5 years ago

Ah, good to know, but for now I think I am going to do some real testing on all this, until now I have just patched this code, not really used it so far except in the example given !

By the way, I am curious, you are the original author or Musashi, right ? I thought you had gone to mamedev, and musashi in mame is really different from what it is here, so why do you maintain this repository here then ? (it's useful for me by the way, I don't think I would have tried to use the musashi in mame, but this one is a lot more welcoming !).

2019-09-05 15:42 UTC+02:00, Karl Stenerud notifications@github.com:

Whatever fixes you've done in your fork, please open a PR here :)

I don't have much time to devote, but I always welcome PRs :)

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kstenerud/Musashi/issues/28#issuecomment-528370753

kstenerud commented 5 years ago

Yes, I am the original author. This is the code as it stood right before putting it into MAME, but the MAME code got really messy, real quick, to the point that I didn't want to untangle it.

zelurker commented 5 years ago

Well indeed, I couldn't go very far in merging the patches from mame, it becomes extremely hard around version 130 only, but the 68040 and its fpu were added in 0.98, at that time the code was still clean and easily mergeable ! I'll test a few things on my side and create a "PR" later then ! :)

2019-09-05 17:11 UTC+02:00, Karl Stenerud notifications@github.com:

Yes, I am the original author. This is the code as it stood right before putting it into MAME, but the MAME code got really messy, real quick, to the point that I didn't want to untangle it.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kstenerud/Musashi/issues/28#issuecomment-528417296

davidgiven commented 3 years ago

I'm updating some code which uses an old version of Musashi (tosemu); it's expecting the stack pointer to be updated when changing the S bit. If modifying SR no longer does this, what's the correct way to do this now?