dirkwhoffmann / Moira

A Motorola 68000 emulator written in C++
https://dirkwhoffmann.github.io/Moira
Other
109 stars 13 forks source link

exception vector 3 - address error: part of the Moira implementation? #5

Closed elmerucr closed 4 years ago

elmerucr commented 4 years ago

Hi Dirk, I have the impression that Moira allows access to words/long words on uneven addresses. I.e. not raising an exception at that point. Can you confirm this and is there currently an option to turn it on? Best regards, Elmer

dirkwhoffmann commented 4 years ago

Address error checking can be switched on in MoiraConfig.h:

/* Set to true to enable address error checking.
 *
 * The Motorola 68k signals an address error violation if a odd memory location
 * is addressed in combination with word or long word addressing.
 *
 * Enable to improve emulation compatibility, disable to gain speed.
 */
#define EMULATE_ADDRESS_ERROR false

I'm a little unsure about how up-to-date the Moira repo is. The most recent version is the one in the vAmiga repo (main branch). During the last couple of month, I didn't change much though.

If it's possible to perform a word or longword access to an odd address, e.g., with a standard move command, I guess the option mentioned above is set to false. However, there might still be some bugs in corner cases. E.g., at some point, address violations were not detected when an interrupt vector was set to an odd address.

elmerucr commented 4 years ago

Thanks for the help! Enabling the option that way indeed turns on address error checking, also with the Moira version in this repo. I didn't look further than Moira.h looking for the options :-) I guess the issue can be closed then.

dirkwhoffmann commented 4 years ago

OK, cool. Please let me know if you stumble across other issues.