gbdb: remove some conditionals from mem_read()
By reading directly from a "RAM" array, and copying in the cart data over the old bootrom. Also, some other fixups because I'm too lazy to properly split patches for a personal project.
This commit is contained in:
@@ -14,16 +14,15 @@ void gb_video_init(struct gb_video *video)
|
||||
|
||||
void gb_video_cycle(struct gb_video *video)
|
||||
{
|
||||
video->line_counter++;
|
||||
|
||||
if (video->line_counter >= CYCLES_PER_LINE) {
|
||||
if (video->line_counter < CYCLES_PER_LINE - 1) {
|
||||
video->line_counter++;
|
||||
} else {
|
||||
video->line_counter = 0;
|
||||
video->curline += 1;
|
||||
if (video->curline > LCD_Y_MAX) {
|
||||
video->curline = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
uint8_t gb_video_mem_read(struct gb_video *video, uint16_t addr)
|
||||
|
||||
Reference in New Issue
Block a user