Minor alignment with WinUAE files

This commit is contained in:
Dimitris Panokostas 2019-11-19 23:39:53 +01:00
parent 62bf6969c8
commit b59afe192c
2 changed files with 36 additions and 39 deletions

View file

@ -5915,7 +5915,6 @@ static void BLTCMOD (int hpos, uae_u16 v) { maybe_blit (1); blt_info.bltcmod = u
static void BLTDMOD (int hpos, uae_u16 v) { maybe_blit (1); blt_info.bltdmod = uae_s16(v & 0xFFFE); reset_blit (0); } static void BLTDMOD (int hpos, uae_u16 v) { maybe_blit (1); blt_info.bltdmod = uae_s16(v & 0xFFFE); reset_blit (0); }
static void BLTCON0 (int hpos, uae_u16 v) { maybe_blit (2); bltcon0 = v; reset_blit(1); } static void BLTCON0 (int hpos, uae_u16 v) { maybe_blit (2); bltcon0 = v; reset_blit(1); }
/* The next category is "Most useless hardware register". /* The next category is "Most useless hardware register".
* And the winner is... */ * And the winner is... */
static void BLTCON0L (int hpos, uae_u16 v) static void BLTCON0L (int hpos, uae_u16 v)
@ -8104,10 +8103,10 @@ static void hsync_handler_pre (bool onvsync)
hsync_record_line_state (next_lineno, nextline_how, thisline_changed); hsync_record_line_state (next_lineno, nextline_how, thisline_changed);
/* reset light pen latch */ /* reset light pen latch */
//if (vpos == sprite_vblank_endline) { if (vpos == sprite_vblank_endline) {
// lightpen_triggered = 0; // lightpen_triggered = 0;
// sprite_0 = 0; sprite_0 = 0;
//} }
//if (!lightpen_triggered && vpos >= sprite_vblank_endline && (bplcon0 & 8)) { //if (!lightpen_triggered && vpos >= sprite_vblank_endline && (bplcon0 & 8)) {
// // lightpen always triggers at the beginning of the last line // // lightpen always triggers at the beginning of the last line

View file

@ -352,6 +352,8 @@ int coord_native_to_amiga_x (int x)
int coord_native_to_amiga_y (int y) int coord_native_to_amiga_y (int y)
{ {
if (!native2amiga_line_map)
return -1;
return native2amiga_line_map[y] + thisframe_y_adjust - minfirstline; return native2amiga_line_map[y] + thisframe_y_adjust - minfirstline;
} }
@ -2580,18 +2582,15 @@ void init_row_map(void)
//} //}
xfree(row_map_color_burst_buffer); xfree(row_map_color_burst_buffer);
row_map_color_burst_buffer = NULL; row_map_color_burst_buffer = NULL;
if (currprefs.cs_color_burst) if (currprefs.cs_color_burst) {
{
row_map_color_burst_buffer = xcalloc(uae_u8, vidinfo->drawbuffer.height_allocated + 2); row_map_color_burst_buffer = xcalloc(uae_u8, vidinfo->drawbuffer.height_allocated + 2);
} }
j = oldheight == 0 ? max_uae_height : oldheight; j = oldheight == 0 ? max_uae_height : oldheight;
for (i = vidinfo->drawbuffer.height_allocated; i < max_uae_height + 1 && i < j + 1; i++) for (i = vidinfo->drawbuffer.height_allocated; i < max_uae_height + 1 && i < j + 1; i++) {
{
row_map[i] = row_tmp; row_map[i] = row_tmp;
//row_map_genlock[i] = row_tmp; //row_map_genlock[i] = row_tmp;
} }
for (i = 0, j = 0; i < vidinfo->drawbuffer.height_allocated; i++, j += vidinfo->drawbuffer.rowbytes) for (i = 0, j = 0; i < vidinfo->drawbuffer.height_allocated; i++, j += vidinfo->drawbuffer.rowbytes) {
{
row_map[i] = vidinfo->drawbuffer.bufmem + j; row_map[i] = vidinfo->drawbuffer.bufmem + j;
//if (init_genlock_data) { //if (init_genlock_data) {
// row_map_genlock[i] = row_map_genlock_buffer + vidinfo->drawbuffer.width_allocated * (i + 1); // row_map_genlock[i] = row_map_genlock_buffer + vidinfo->drawbuffer.width_allocated * (i + 1);
@ -2609,19 +2608,19 @@ void init_row_map(void)
static void init_aspect_maps(void) static void init_aspect_maps(void)
{ {
struct vidbuf_description *vidinfo = &adisplays.gfxvidinfo; struct vidbuf_description *vidinfo = &adisplays.gfxvidinfo;
int i; int i, maxl, h;
linedbld = linedbl = currprefs.gfx_vresolution; linedbld = linedbl = currprefs.gfx_vresolution;
if (doublescan > 0 && interlace_seen <= 0) { if (doublescan > 0 && interlace_seen <= 0) {
linedbl = 0; linedbl = 0;
linedbld = 1; linedbld = 1;
} }
const int maxl = (MAXVPOS + 1) << linedbld; maxl = (MAXVPOS + 1) << linedbld;
min_ypos_for_screen = minfirstline << linedbl; min_ypos_for_screen = minfirstline << linedbl;
max_drawn_amiga_line = -1; max_drawn_amiga_line = -1;
//vidinfo->xchange = 1 << (RES_MAX - currprefs.gfx_resolution); vidinfo->xchange = 1 << (RES_MAX - currprefs.gfx_resolution);
//vidinfo->ychange = linedbl ? 1 : 2; vidinfo->ychange = linedbl ? 1 : 2;
visible_left_start = 0; visible_left_start = 0;
visible_right_stop = MAX_STOP; visible_right_stop = MAX_STOP;
@ -2629,7 +2628,7 @@ static void init_aspect_maps(void)
visible_bottom_stop = MAX_STOP; visible_bottom_stop = MAX_STOP;
set_blanking_limits(); set_blanking_limits();
const int h = vidinfo->drawbuffer.height_allocated; h = vidinfo->drawbuffer.height_allocated;
if (h == 0) if (h == 0)
/* Do nothing if the gfx driver hasn't initialized the screen yet */ /* Do nothing if the gfx driver hasn't initialized the screen yet */
return; return;
@ -3283,17 +3282,14 @@ static void center_image(void)
} }
} }
#endif #endif
} } else if (vidinfo->drawbuffer.extrawidth) {
else if (vidinfo->drawbuffer.extrawidth) {
visible_left_border = max_diwlastword - w; visible_left_border = max_diwlastword - w;
if (vidinfo->drawbuffer.extrawidth > 0) if (vidinfo->drawbuffer.extrawidth > 0)
visible_left_border += vidinfo->drawbuffer.extrawidth << currprefs.gfx_resolution; visible_left_border += vidinfo->drawbuffer.extrawidth << currprefs.gfx_resolution;
} } else {
else {
if (vidinfo->drawbuffer.inxoffset < 0) { if (vidinfo->drawbuffer.inxoffset < 0) {
visible_left_border = 0; visible_left_border = 0;
} } else {
else {
visible_left_border = vidinfo->drawbuffer.inxoffset - DISPLAY_LEFT_SHIFT; visible_left_border = vidinfo->drawbuffer.inxoffset - DISPLAY_LEFT_SHIFT;
} }
} }
@ -3318,7 +3314,6 @@ static void center_image(void)
max_drawn_amiga_line_tmp = vidinfo->drawbuffer.inheight; max_drawn_amiga_line_tmp = vidinfo->drawbuffer.inheight;
max_drawn_amiga_line_tmp >>= linedbl; max_drawn_amiga_line_tmp >>= linedbl;
//thisframe_y_adjust = minfirstline + currprefs.gfx_monitor.gfx_size.y;
thisframe_y_adjust = minfirstline; thisframe_y_adjust = minfirstline;
if (currprefs.gfx_ycenter && thisframe_first_drawn_line >= 0 && !currprefs.gf[0].gfx_filter_autoscale) { if (currprefs.gfx_ycenter && thisframe_first_drawn_line >= 0 && !currprefs.gf[0].gfx_filter_autoscale) {
@ -4094,6 +4089,7 @@ void reset_drawing(void)
max_diwstop = 0; max_diwstop = 0;
lores_reset (); lores_reset ();
#ifdef AMIBERRY #ifdef AMIBERRY
linestate_first_undecided = 0; linestate_first_undecided = 0;
#endif #endif
@ -4114,6 +4110,8 @@ void reset_drawing(void)
pfield_set_linetoscr(); pfield_set_linetoscr();
frame_res_cnt = currprefs.gfx_autoresolution_delay; frame_res_cnt = currprefs.gfx_autoresolution_delay;
//lightpen_y1[0] = lightpen_y2[0] = -1;
//lightpen_y1[1] = lightpen_y2[1] = -1;
reset_custom_limits (); reset_custom_limits ();