Skip to content

Commit

Permalink
MEGA65: fix alt.palette selection #402
Browse files Browse the repository at this point in the history
Reported/suggested by Mirage_BD on Discord. Thanks!!
  • Loading branch information
lgblgblgb committed Jun 12, 2024
1 parent ec2504d commit ab2290e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion targets/mega65/vic4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,7 @@ static XEMU_INLINE void vic4_render_char_raster ( void )
} else if (CHAR_IS256_COLOR(char_id)) { // 256-color character
// fgcolor in case of FCM should mean colour index $FF
// FIXME: check if the passed palette[color_data & 0xFF] is correct or another index should be used for that $FF colour stuff
const Uint32 *palette_now = SXA_ATTR_ALTPALETTE(color_data) ? altpalette : used_palette;
const Uint32 *palette_now = ((REG_VICIII_ATTRIBS) && SXA_ATTR_ALTPALETTE(color_data)) ? altpalette : used_palette;
vic4_render_fullcolor_char_row(
main_ram + (((char_id * 64) + ((sel_char_row + char_fetch_offset) * 8)) & 0x7FFFF),
8 - glyph_trim,
Expand Down
2 changes: 1 addition & 1 deletion targets/mega65/vic4.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define SXA_ATTR_BOLD(cw) ((cw) & 0x0040)
#define SXA_ATTR_REVERSE(cw) ((cw) & 0x0020)
// BOLD+REVERSE = alternate palette
#define SXA_ATTR_ALTPALETTE(cw) ((cw) & 0x0060)
#define SXA_ATTR_ALTPALETTE(cw) (((cw) & 0x0060) == 0x60)
//#define SXA_TRIM_TOP_BOTTOM(cw) (((cw) & 0x0300) >> 8)


Expand Down

0 comments on commit ab2290e

Please sign in to comment.