Skip to content

Commit

Permalink
Clear LCD cursor state on reset
Browse files Browse the repository at this point in the history
Data after the palette member isn't cleared on reset, but that's needed for
the cursor state. Especially when switching from CX II emulation to classic
emulation, the cursor remains enabled while the registers are inaccessible.
  • Loading branch information
Vogtinator committed Aug 8, 2023
1 parent c8ad74d commit 8125dce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/lcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ typedef struct lcd_state {
uint32_t control;
uint8_t int_mask;
uint8_t int_status;
uint16_t palette[256];
uint8_t cursor_ram[64*64/4]; // 64x64 2bpp cursor
uint8_t cursor_control;
uint8_t cursor_config;
Expand All @@ -26,6 +25,8 @@ typedef struct lcd_state {
uint16_t cursor_clip;
uint8_t cursor_int_mask;
uint8_t cursor_int_status;
// Below here isn't zeroed in lcd_reset
uint16_t palette[256];
} lcd_state;

void lcd_draw_frame(uint8_t *buffer);
Expand Down

0 comments on commit 8125dce

Please sign in to comment.