Skip to content

Commit

Permalink
Merge remote-tracking branch 'tonioni/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Feb 24, 2025
2 parents 767dc80 + a71217d commit ccb310d
Show file tree
Hide file tree
Showing 19 changed files with 11,158 additions and 263 deletions.
466 changes: 308 additions & 158 deletions custom.cpp

Large diffs are not rendered by default.

709 changes: 615 additions & 94 deletions drawing.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ void do_cycles_slow(int cycles_to_add)
// runs CPU emulation with chipset stopped
// when there is free time to do so.
if (event_check_vsync()) {
syncline_cnt = 16;
syncline_cnt = 8;
return;
}
}
Expand Down
5 changes: 5 additions & 0 deletions genlinetoscr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ static void gen_pix_aga(void)
} else {
off += 4 / (1 << outres);
}
outf("internal_pixel_cnt += %d;", 4 / (1 << outres));
}

outf("if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {");
Expand Down Expand Up @@ -713,6 +714,7 @@ static void gen_pix(void)
gen_shiftbpl(maxplanes);
pix++;
}
outf("internal_pixel_cnt += %d;", 4 / pixels);
}
int pixcnt = 0;
for (int i = 0; i < pixels; i++) {
Expand Down Expand Up @@ -880,6 +882,9 @@ static void gen_end(void)
outf(" denise_hcounter_next &= 511;");
outf(" }");
outf(" denise_pixtotal++;");
outf(" if (denise_pixtotal == 0) {");
outf(" internal_pixel_start_cnt = internal_pixel_cnt;");
outf(" }");
outf(" denise_hcounter = denise_hcounter_new;");
outf(" denise_cck++;");
outf(" }");
Expand Down
31 changes: 29 additions & 2 deletions include/drawing.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#ifndef UAE_DRAWING_H
#define UAE_DRAWING_H

#define DISABLE_BPLCON1 0

#include "uae/types.h"

#define SMART_UPDATE 1
Expand Down Expand Up @@ -164,9 +166,33 @@ void set_inhibit_frame(int monid, int bit);
void clear_inhibit_frame(int monid, int bit);
void toggle_inhibit_frame(int monid, int bit);

#define LINE_DRAW_COUNT 3
#define LINETYPE_BLANK 1
#define LINETYPE_BORDER 2
#define LINETYPE_BPL 3
struct linestate
{
int type;
uae_u32 cnt;
uae_u16 ddfstrt, ddfstop;
uae_u16 diwstrt, diwstop, diwhigh;
uae_u16 bplcon0, bplcon1, bplcon2, bplcon3, bplcon4;
uae_u16 fmode;
uae_u32 color0;
uae_u8 *linedatastate, *linecolorstate;
int bpllen;
int colors;
uae_u8 *bplpt[MAX_PLANES];
int hbstrt_offset, hbstop_offset;
int hstrt_offset, hstop_offset;
int bpl1dat_trigger_offset;
int bpl1dat_hcounter;
int fetchmode_size, fetchstart_mask;
};

extern struct color_entry denise_colors;
void draw_denise_line(int gfx_ypos, nln_how how, uae_u32 linecnt, int startpos, int total, int skip, int skip2, int dtotal, int calib_start, int calib_len, bool lol);
bool draw_denise_line_fast(uae_u8 *bplpt[8], int bplstart, int bpllen, int gfx_ypos, enum nln_how how, int total, int dstart, int dtotal, bool vblank, struct denise_fastsprite *dfs);
void draw_denise_line(int gfx_ypos, nln_how how, uae_u32 linecnt, int startpos, int total, int skip, int skip2, int dtotal, int calib_start, int calib_len, bool lol, struct linestate *ls);
bool draw_denise_line_fast(int gfx_ypos, enum nln_how how, struct linestate *ls);
bool start_draw_denise(void);
void end_draw_denise(void);
void denise_update_reg(uae_u16 reg, uae_u16 v);
Expand All @@ -175,6 +201,7 @@ bool denise_update_reg_queued(uae_u16 reg, uae_u16 v, uae_u32 cycle);
void denise_store_registers(void);
void denise_restore_registers(void);
void denise_set_line(int gfx_ypos);
void denise_mark_last_line(void);
void denise_handle_quick_disable_hblank(void);
void denise_handle_quick_strobe(uae_u16 strobe, int offset);

Expand Down
Loading

0 comments on commit ccb310d

Please sign in to comment.