1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-23 18:31:53 +00:00

Merge branch 'master' into InST

This commit is contained in:
Thomas Harte 2022-06-15 21:23:18 -04:00
commit cb7230e7b7

View File

@ -175,17 +175,17 @@ struct Microcycle {
} }
/*! /*!
@returns non-zero if this is a byte read and 68000 LDS is asserted. @returns non-zero if the 68000 LDS is asserted; zero otherwise.
*/ */
forceinline int lower_data_select() const { forceinline int lower_data_select() const {
return (operation & SelectByte) & ((*address & 1) << 3); return ((operation & SelectByte) & (*address & 1)) | (operation & SelectWord);
} }
/*! /*!
@returns non-zero if this is a byte read and 68000 UDS is asserted. @returns non-zero if the 68000 UDS is asserted; zero otherwise.
*/ */
forceinline int upper_data_select() const { forceinline int upper_data_select() const {
return (operation & SelectByte) & ~((*address & 1) << 3); return ((operation & SelectByte) & ~(*address & 1)) | (operation & SelectWord);
} }
/*! /*!
@ -229,8 +229,7 @@ struct Microcycle {
} }
/*! /*!
@returns the value currently on the high 8 lines of the data bus if any; @returns the value currently on the high 8 lines of the data bus.
@c 0xff otherwise. Assumes this is a write cycle.
*/ */
forceinline uint8_t value8_high() const { forceinline uint8_t value8_high() const {
const uint8_t values[] = { uint8_t(value->w >> 8), value->b}; const uint8_t values[] = { uint8_t(value->w >> 8), value->b};
@ -238,12 +237,10 @@ struct Microcycle {
} }
/*! /*!
@returns the value currently on the low 8 lines of the data bus if any; @returns the value currently on the low 8 lines of the data bus.
@c 0xff otherwise. Assumes this is a write cycle.
*/ */
forceinline uint8_t value8_low() const { forceinline uint8_t value8_low() const {
const uint8_t values[] = { uint8_t(value->w), value->b}; return value->b;
return values[operation & SelectByte];
} }
/*! /*!